@orbs-network/spot-react 0.0.38 → 0.0.40
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-jtwNG1lx.js → ccip-DyAeTCJ8.js} +1 -1
- package/dist/{index-KCCFs1DW.js → index-BMFrwTpC.js} +489 -487
- package/dist/spot-react/package.json.d.ts +1 -1
- package/dist/spot-react/src/components/orders/order-preview.d.ts.map +1 -1
- package/dist/spot-react/src/i18n/en.json.d.ts +1 -0
- package/dist/spot-react/src/types.d.ts +1 -0
- package/dist/spot-react/src/types.d.ts.map +1 -1
- package/dist/spot-react.js +1 -1
- package/dist/spot-react.umd.cjs +12 -12
- package/package.json +1 -1
package/dist/spot-react.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(R,B){typeof exports=="object"&&typeof module<"u"?B(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],B):(R=typeof globalThis<"u"?globalThis:R||self,B(R.SpotReact={},R.jsxRuntime,R.React,R.ReactDOM))})(this,(function(R,B,M,ka){"use strict";var LW=Object.defineProperty;var B5=R=>{throw TypeError(R)};var zW=(R,B,M)=>B in R?LW(R,B,{enumerable:!0,configurable:!0,writable:!0,value:M}):R[B]=M;var Yu=(R,B,M)=>zW(R,typeof B!="symbol"?B+"":B,M),vm=(R,B,M)=>B.has(R)||B5("Cannot "+M);var N=(R,B,M)=>(vm(R,B,"read from private field"),M?M.call(R):B.get(R)),le=(R,B,M)=>B.has(R)?B5("Cannot add the same private member more than once"):B instanceof WeakSet?B.add(R):B.set(R,M),ee=(R,B,M,ka)=>(vm(R,B,"write to private field"),ka?ka.call(R,M):B.set(R,M),M),Ae=(R,B,M)=>(vm(R,B,"access private method"),M);var Ku=(R,B,M,ka)=>({set _(Xu){ee(R,B,Xu,M)},get _(){return N(R,B,ka)}});var dn,pa,f5,fa,gs,go,m5,xo,xs,wo,h5,ma,b5,ha,vo,Br,ba,Bt,wc,ya,Yr,Yn,y5,sr,De,vc,qt,ga,Eo,Gn,ws,Ec,ko,Co,xa,wa,vs,To,Ve,Tc,Em,km,Cm,Tm,Sm,Am,Pm,F5,g5,kc,pn,Yt,va,fn,Ss,x5,jn,Kr,Cc,w5,Vn,Es,ar,Wn,qn,Zu,Im,v5,mn,E5,ft,ks,Cs,So,Ao,Ts,Po,Io,k5;function Xu(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 xt=Xu(M),Dt={SpookySwap:{chainName:"ftm",chainId:250,twapVersion:4,twapAddress:"0xd3B290FEB04E353d1821bc0a12397FdEa9a846C0",lensAddress:"0x0221EfDF1Fd3212AF87F23cceB7693a65fAF1d7f",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SpookySwap",partner:"Orbs:TWAP:SpookySwap",exchangeAddress:"0xdF7CCd5fc7077E9de5f27a7b7bfDC837c82f8496",exchangeType:"ExchangeV2",pathfinderKey:""},SpookySwapSonic:{chainName:"sonic",chainId:146,twapVersion:4,twapAddress:"0x8963992816b4EafE5a22b7DB2A99513c18be9afA",lensAddress:"0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SpookySwapSonic",partner:"Orbs:TWAP:SpookySwap",exchangeAddress:"0x6699bE3aF75e5c1B807b1031dBde6dA9A67739F3",exchangeType:"ExchangeV2",pathfinderKey:""},QuickSwap:{chainName:"poly",chainId:137,twapVersion:4,twapAddress:"0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4",lensAddress:"0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"QuickSwap",partner:"Orbs:TWAP:QuickSwap",exchangeAddress:"0x8FCc245209bE85C49D738D0CE5613F74E5d91E86",exchangeType:"ParaswapExchange",pathfinderKey:"QuickSwap,QuickSwapV3"},QuickSwapBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"QuickSwap",partner:"Orbs:TWAP:QuickSwap",exchangeAddress:"0xb7a3d74895bfd3aff6780525e36d79fcf26a895f",exchangeType:"ExchangeV2",pathfinderKey:""},Chronos:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"Chronos",partner:"Orbs:TWAP:Chronos",exchangeAddress:"0x0178e50adAF3b925F27aC518FCd952CE7F9A3B36",exchangeType:"ExchangeV2",pathfinderKey:"Chronos Stable,Chronos Volatile,Chronos V3"},BaseSwap:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"BaseSwap",partner:"Orbs:TWAP:BaseSwap",exchangeAddress:"0xAca3155c17530C4aA96746F226fcC049658490d2",exchangeType:"ExchangeV2",pathfinderKey:"BaseSwap,BaseSwapX"},Arbidex:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"Arbidex",partner:"Orbs:TWAP:Arbidex",exchangeAddress:"0x49d21052f4695d16C7cce6eF561301Aa4d840420",exchangeType:"ExchangeV2",pathfinderKey:"Arbidex Classic,Arbidex Quantum"},Thena:{chainName:"bsc",chainId:56,twapVersion:4,twapAddress:"0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994",lensAddress:"0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"Thena",partner:"Orbs:TWAP:Thena",exchangeAddress:"0x2B2fABDbfa4a15da0d351F947C14F4520db0bDc1",exchangeType:"ExchangeV2",pathfinderKey:"43,47"},PancakeSwap:{chainName:"bsc",chainId:56,twapVersion:4,twapAddress:"0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994",lensAddress:"0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0x1A2bb6B75D58b740d88413ef4840D6fa3F637940",exchangeType:"P2Exchange",pathfinderKey:""},PancakeSwapArbitrum:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0xb37cB9A058c03081Ae6EF934313588cD53d408e7",exchangeType:"P2Exchange",pathfinderKey:""},PancakeSwapBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0xb37cB9A058c03081Ae6EF934313588cD53d408e7",exchangeType:"P2Exchange",pathfinderKey:""},PancakeSwapLinea:{chainName:"linea",chainId:59144,twapVersion:4,twapAddress:"0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78",lensAddress:"0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:100,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0xb37cB9A058c03081Ae6EF934313588cD53d408e7",exchangeType:"P2Exchange",pathfinderKey:""},Lynex:{chainName:"linea",chainId:59144,twapVersion:4,twapAddress:"0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78",lensAddress:"0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:100,name:"Lynex",partner:"Orbs:TWAP:Lynex",exchangeAddress:"0x04C06C96d7D19977156016DD408B5992af0570a2",exchangeType:"ExchangeV2",pathfinderKey:"19,18"},SyncSwap:{chainName:"zkSync",chainId:324,twapVersion:4,twapAddress:"0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68",lensAddress:"0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9",takers:["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC","0xBE452F03Be354CAC397C3F0c8397672067D44531"],bidDelaySeconds:60,minChunkSizeUsd:100,name:"SyncSwap",partner:"Orbs:TWAP:SyncSwap",exchangeAddress:"0x422623a40c42f026Ed33A9910078Aa843FD66e27",exchangeType:"ExchangeV2",pathfinderKey:"2,3"},Retro:{chainName:"poly",chainId:137,twapVersion:4,twapAddress:"0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4",lensAddress:"0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"Retro",partner:"Orbs:TWAP:Retro",exchangeAddress:"0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F",exchangeType:"ExchangeV2",pathfinderKey:"retro,retro-v3"},SushiArb:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"SushiArb",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad",exchangeType:"ExchangeV2",pathfinderKey:""},SushiBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"SushiBase",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad",exchangeType:"ExchangeV2",pathfinderKey:""},SushiEth:{chainName:"eth",chainId:1,twapVersion:4,twapAddress:"0xb1ed8BCAD1EaC8a1DF0764700472391800D12946",lensAddress:"0x0967f448c4d4dbd14c355E635AE9CbF68cc44A60",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:200,name:"SushiEth",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad",exchangeType:"ExchangeV2",pathfinderKey:""},SushiKatana:{chainName:"katana",chainId:747474,twapVersion:4,twapAddress:"0xf2d96E7BE676153d202e1453804E2749923C7c5b",lensAddress:"0x1579EED0527781B1A748043AA1f59a3858Ace4a7",takers:["0xF74437A3Fc45a518640828E5D6A3E8c9A9BbDC3a","0x07A6C715063e94c0D95e809efefFCbF4EBEdfD55"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"SushiKatana",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x92209481507e6B2d14C9b5b70Ed287024177220E",exchangeType:"ExchangeV2",pathfinderKey:""},DragonSwap:{chainName:"sei",chainId:1329,twapVersion:4,twapAddress:"0xde737dB24548F8d41A4a3Ca2Bac8aaaDc4DBA099",lensAddress:"0xa1376f2Bb80D3cF6c2D8ebEf34b3d122e9af4020",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"DragonSwap",partner:"Orbs:TWAP:DragonSwap",exchangeAddress:"0xf2F933FafbDB97062CfA3c447ff373e76A90Efd6",exchangeType:"ExchangeV2",pathfinderKey:""},TeaFi:{chainName:"poly",chainId:137,twapVersion:4,twapAddress:"0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4",lensAddress:"0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"TeaFi",partner:"Orbs:TWAP:TeaFi",exchangeAddress:"0xE9D3b4Cf5B0CC392e78C1a4DD9885D449EEF9793",exchangeType:"ParaswapExchange",pathfinderKey:"AaveV2,AaveV3,AaveV3Stata,AngleStakedStableEUR,AngleStakedStableUSD,ApeSwap,AugustusRFQ,BalancerV2,ComethSwap,CurveV1,CurveV1Factory,CurveV1StableNg,CurveV2,Dfyn,DODOV2,Dystopia,Hashflow,IronV2,JarvisV6,KyberDmm,QuickSwap,QuickSwapV3,Retro,SushiSwap,SushiSwapV3,SwaapV2,Synapse,UniswapV2,UniswapV3,WaultFinance,Wmatic,WooFiV2,wUSDM"},SparkDEX:{chainName:"flare",chainId:14,twapVersion:4,twapAddress:"0x9D70B0b90915Bb8b9bdAC7e6a7e6435bBF1feC4D",lensAddress:"0xf2d96E7BE676153d202e1453804E2749923C7c5b",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SparkDEX",partner:"Orbs:TWAP:SparkDEX",exchangeAddress:"0xe59c53C76bB7EEc01401A18fA8215B94bC65Bf56",exchangeType:"P2Exchange"},Ramses:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"Ramses",partner:"Orbs:TWAP:Ramses",exchangeAddress:"0x8FCc245209bE85C49D738D0CE5613F74E5d91E86",exchangeType:"ParaswapExchange",pathfinderKey:""},SwapX:{chainName:"sonic",chainId:146,twapVersion:4,twapAddress:"0x8963992816b4EafE5a22b7DB2A99513c18be9afA",lensAddress:"0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SwapX",partner:"Orbs:TWAP:SwapX",exchangeAddress:"0xDA902994b7F7a1ecDd8De02E4a17dbFF2E6F67b7",exchangeType:"ExchangeV2",pathfinderKey:""},H2Finance:{chainName:"cronos-zkevm",chainId:388,twapVersion:4,twapAddress:"0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68",lensAddress:"0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9",takers:["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC","0xBE452F03Be354CAC397C3F0c8397672067D44531"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"H2Finance",partner:"Orbs:TWAP:H2Finance",exchangeAddress:"0x2f1f10dc311722Be609e6B427bF3FBac6e44093B",exchangeType:"ExchangeV2"},Shadow:{chainName:"sonic",chainId:146,twapVersion:4,twapAddress:"0x8963992816b4EafE5a22b7DB2A99513c18be9afA",lensAddress:"0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"Shadow",partner:"Orbs:TWAP:Shadow",exchangeAddress:"0x69e3c891450161b7BF27f181eE85E7bAE69E5b07",exchangeType:"ExchangeV2"},Kodiak:{chainName:"berachain",chainId:80094,twapVersion:4,twapAddress:"0xD13609A8ace04D11Ea2FFE176B69dF77C6d9375E",lensAddress:"0xA0b07F9a11dFb01388149abBdbc5B4f2196600AB",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"Kodiak",partner:"Orbs:TWAP:Kodiak",exchangeAddress:"0x69B7aE1250B8d1309954CaD65b6607ae478Ec6eE",exchangeType:"ExchangeV2"},OmniBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"OmniBase",partner:"Orbs:TWAP:OmniBase",exchangeAddress:"0x54435FcFDF3A08150Ed799b6EF472A20a432303F",exchangeType:"ParaswapExchange"},OmniArb:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"OmniArb",partner:"Orbs:TWAP:OmniArb",exchangeAddress:"0xF0607785424d342Cceb33E708f4579CA97a3b392",exchangeType:"ParaswapExchange"},BlackholeAvax:{chainName:"avax",chainId:43114,twapVersion:4,twapAddress:"0xf77Ad005aBF7e31f669ce89a6568B2f39Ca92cDe",lensAddress:"0x48466B82Ce1575c5c9eCa168ac1090048dD47fA3",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"BlackholeAvax",partner:"Orbs:TWAP:BlackholeAvax",exchangeAddress:"0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F",exchangeType:"ExchangeV2"},NewEraBnb:{chainName:"bsc",chainId:56,twapVersion:4,twapAddress:"0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994",lensAddress:"0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"NewEraBnb",partner:"Orbs:TWAP:NewEraBnb",exchangeAddress:"0xA22D7Df24d9Ea4D4EF6dC96b2204bd550430eC42",exchangeType:"ExchangeV2"}},U5=[{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}],O5=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],D5=JSON.parse('[{"inputs":[{"internalType":"address","name":"_iweth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"uint32","name":"slippagePercent","type":"uint32"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"name":"OrderBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"OrderCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"address","name":"taker","type":"address"}],"name":"OrderCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"}],"name":"OrderCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"address","name":"taker","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcAmountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstAmountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"srcFilledAmount","type":"uint256"}],"name":"OrderFilled","type":"event"},{"inputs":[],"name":"MIN_BID_DELAY_SECONDS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_OUTBID_PERCENT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERCENT_BASE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STALE_BID_SECONDS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_CANCELED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_COMPLETED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"_ask","type":"tuple"}],"name":"ask","outputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"uint32","name":"slippagePercent","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"bid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"book","outputs":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"fill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"iweth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"length","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"makerOrders","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"order","outputs":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"internalType":"struct OrderLib.Order","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maker","type":"address"}],"name":"orderIdsByMaker","outputs":[{"internalType":"uint64[]","name":"","type":"uint64[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"prune","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"status","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]'),_5=[{type:"constructor",inputs:[],stateMutability:"nonpayable"},{type:"function",name:"DOMAIN_SEPARATOR",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"cancel",inputs:[{name:"digests",type:"bytes32[]",internalType:"bytes32[]"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"eip712Domain",inputs:[],outputs:[{name:"fields",type:"bytes1",internalType:"bytes1"},{name:"name",type:"string",internalType:"string"},{name:"version",type:"string",internalType:"string"},{name:"chainId",type:"uint256",internalType:"uint256"},{name:"verifyingContract",type:"address",internalType:"address"},{name:"salt",type:"bytes32",internalType:"bytes32"},{name:"extensions",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"view"},{type:"function",name:"hashTypedData",inputs:[{name:"structHash",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"digest",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"repermitWitnessTransferFrom",inputs:[{name:"permit",type:"tuple",internalType:"struct RePermitLib.RePermitTransferFrom",components:[{name:"permitted",type:"tuple",internalType:"struct RePermitLib.TokenPermissions",components:[{name:"token",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}]},{name:"nonce",type:"uint256",internalType:"uint256"},{name:"deadline",type:"uint256",internalType:"uint256"}]},{name:"request",type:"tuple",internalType:"struct RePermitLib.TransferRequest",components:[{name:"to",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}]},{name:"signer",type:"address",internalType:"address"},{name:"witness",type:"bytes32",internalType:"bytes32"},{name:"witnessTypeString",type:"string",internalType:"string"},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"spent",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"event",name:"Cancel",inputs:[{name:"signer",type:"address",indexed:!0,internalType:"address"},{name:"digest",type:"bytes32",indexed:!1,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"EIP712DomainChanged",inputs:[],anonymous:!1},{type:"event",name:"Spend",inputs:[{name:"signer",type:"address",indexed:!0,internalType:"address"},{name:"permitHash",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"token",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!1,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"},{name:"totalSpent",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"error",name:"Canceled",inputs:[]},{type:"error",name:"Expired",inputs:[]},{type:"error",name:"InsufficientAllowance",inputs:[]},{type:"error",name:"InvalidShortString",inputs:[]},{type:"error",name:"InvalidSignature",inputs:[]},{type:"error",name:"SafeERC20FailedOperation",inputs:[{name:"token",type:"address",internalType:"address"}]},{type:"error",name:"StringTooLong",inputs:[{name:"str",type:"string",internalType:"string"}]}],Um=U5,M5=O5,Om=_5,Dm=D5;var ge=(e=>(e.TWAP="TWAP",e.LIMIT="LIMIT",e.STOP_LOSS="STOP_LOSS",e.TAKE_PROFIT="TAKE_PROFIT",e))(ge||{}),lt=(e=>(e.Open="OPEN",e.Canceled="CANCELED",e.Completed="COMPLETED",e.Expired="EXPIRED",e))(lt||{}),Gt=(e=>(e[e.Minutes=6e4]="Minutes",e[e.Hours=36e5]="Hours",e[e.Weeks=6048e5]="Weeks",e[e.Days=864e5]="Days",e[e.Months=2592e6]="Months",e[e.Years=31536e6]="Years",e))(Gt||{}),ut=(e=>(e.LIMIT="limit",e.TWAP_LIMIT="twap-limit",e.TWAP_MARKET="twap-market",e.TRIGGER_PRICE_MARKET="trigger-price-market",e.TRIGGER_PRICE_LIMIT="trigger-price-limit",e))(ut||{}),_m=(e=>(e.Arbidex="arbidex",e.Blackhole="blackhole",e.Chronos="chronos",e.Dragon="dragon",e.Kodiak="kodiak",e.Lynex="lynex",e.Nami="nami",e.Newera="newera",e.Omni="omni",e.Pancake="pancake",e.Quick="quick",e.Ramses="ramses",e.Shadow="shadow",e.Spark="spark",e.Spooky="spooky",e.Swapx="swapx",e.Teafi="teafi",e.Thena="thena",e.Yowie="yowie",e))(_m||{});const wt="0x0000000000000000000000000000000000000000",Ft={eth:{id:1,name:"Ethereum",shortname:"eth",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://eth.llamarpc.com",logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg",explorer:"https://etherscan.io",eip1559:!0},bsc:{id:56,name:"BinanceSmartChain",shortname:"bsc",native:{address:wt,symbol:"BNB",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"},wToken:{symbol:"WBNB",address:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"},publicRpcUrl:"https://bsc-dataseed.binance.org",logoUrl:"https://app.1inch.io/assets/images/network-logos/bsc_2.svg",explorer:"https://bscscan.com",eip1559:!1},poly:{id:137,name:"Polygon",shortname:"poly",native:{address:wt,symbol:"POL",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/64x64/28321.png"},wToken:{symbol:"WPOL",address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270.png"},publicRpcUrl:"https://polygon-rpc.com",logoUrl:"https://app.1inch.io/assets/images/network-logos/polygon.svg",explorer:"https://polygonscan.com",eip1559:!0},arb:{id:42161,name:"Arbitrum",shortname:"arb",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://arb1.arbitrum.io/rpc",logoUrl:"https://app.1inch.io/assets/images/network-logos/arbitrum.svg",explorer:"https://arbiscan.io",eip1559:!0},sei:{id:1329,name:"Sei",shortname:"sei",native:{address:wt,symbol:"SEI",decimals:18,logoUrl:"https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png"},wToken:{symbol:"WSEI",address:"0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://evm-rpc.sei-apis.com",logoUrl:"https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png",explorer:"https://seitrace.com",eip1559:!1},avax:{id:43114,name:"Avalanche",shortname:"avax",native:{address:wt,symbol:"AVAX",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/avalanche.svg"},wToken:{symbol:"WAVAX",address:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7.png"},publicRpcUrl:"https://api.avax.network/ext/bc/C/rpc",logoUrl:"https://app.1inch.io/assets/images/network-logos/avalanche.svg",explorer:"https://snowtrace.io",eip1559:!0},ftm:{id:250,name:"Fantom",shortname:"ftm",native:{address:wt,symbol:"FTM",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/fantom.svg"},wToken:{symbol:"WFTM",address:"0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0x4e15361fd6b4bb609fa63c81a2be19d873717870.png"},publicRpcUrl:"https://rpc.ftm.tools",logoUrl:"https://app.1inch.io/assets/images/network-logos/fantom.svg",explorer:"https://ftmscan.com",eip1559:!0},base:{id:8453,name:"Base",shortname:"base",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x4200000000000000000000000000000000000006",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://mainnet.base.org",logoUrl:"https://app.1inch.io/assets/images/network-logos/base.svg",explorer:"https://basescan.org",eip1559:!1},linea:{id:59144,name:"Linea",shortname:"linea",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://rpc.linea.build",logoUrl:"https://lineascan.build/images/logo.svg",explorer:"https://lineascan.build",eip1559:!1},zksync:{id:324,name:"zksync",shortname:"zksync",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://mainnet.era.zksync.io",logoUrl:"https://raw.githubusercontent.com/matter-labs/zksync/0a4ca2145a0c95b5bafa84c2f095c644907a8825/zkSyncLogo.svg",explorer:"https://explorer.zksync.io/",eip1559:!0},zkevm:{id:1101,name:"zkevm",shortname:"zkevm",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://zkevm-rpc.com",logoUrl:"https://user-images.githubusercontent.com/18598517/235932702-bc47eae5-d672-4dd9-9da2-8ea8f51a93f3.png",explorer:"https://zkevm.polygonscan.com/",eip1559:!0},manta:{id:169,name:"manta",shortname:"manta",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_manta.jpg"},wToken:{symbol:"WETH",address:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://pacific-rpc.manta.network/http",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_manta.jpg",explorer:"https://manta.socialscan.io/",eip1559:!0},blast:{id:81457,name:"blast",shortname:"blast",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_blast"},wToken:{symbol:"WETH",address:"0x4300000000000000000000000000000000000004",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://rpc.ankr.com/blast",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_blast",explorer:"https://blastscan.io/",eip1559:!0},sonic:{id:146,name:"sonic",shortname:"sonic",native:{address:wt,symbol:"S",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_sonic"},wToken:{symbol:"WS",address:"0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_sonic"},publicRpcUrl:"https://rpc.soniclabs.com",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_sonic",explorer:"https://www.sonicscan.org/",eip1559:!0},scroll:{id:534352,name:"scroll",shortname:"scroll",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_scroll"},wToken:{symbol:"WETH",address:"0x5300000000000000000000000000000000000004",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://scroll-rpc.publicnode.com",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_scroll",explorer:"https://scrollscan.com/",eip1559:!0},zircuit:{id:48900,name:"Zircuit",shortname:"zircuit",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x4200000000000000000000000000000000000006",decimals:18,logoUrl:"hhttps://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://zircuit-mainnet.drpc.org",logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg",explorer:"https://explorer.zircuit.com/",eip1559:!0},flare:{id:14,name:"flare",shortname:"flare",native:{address:wt,symbol:"FLR",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48"},wToken:{symbol:"WFLR",address:"0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d",decimals:18,logoUrl:"https://res.cloudinary.com/sparkdex/image/upload/q_100/v1/website-assets/coins/wflr?_a=DATAg1AAZAA0"},publicRpcUrl:"https://flare.network",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48",explorer:"https://flarescan.com",eip1559:!0},cronosZkEvm:{id:388,name:"Cronos zkEVM",shortname:"cronosZkEvm",native:{address:"0x000000000000000000000000000000000000800a",symbol:"zkCRO",decimals:18,logoUrl:"https://cryptologos.cc/logos/cronos-cro-logo.png"},wToken:{symbol:"wzkCRO",address:"0xC1bF55EE54E16229d9b369a5502Bfe5fC9F20b6d",decimals:18,logoUrl:"https://cryptologos.cc/logos/cronos-cro-logo.png"},publicRpcUrl:"https://rpc.zkevm.cronos.org",logoUrl:"https://cryptologos.cc/logos/cronos-cro-logo.png",explorer:"https://explorer.zkevm.cronos.org",eip1559:!0},katana:{id:747474,name:"Katana",shortname:"katana",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://katana.network/assets/katana-logo.svg"},wToken:{symbol:"WETH",address:"0x4200000000000000000000000000000000000006",decimals:18,logoUrl:"https://katana.network/assets/weth-logo.svg"},publicRpcUrl:"https://rpc.katana.network",logoUrl:"https://katana.network/assets/katana-logo.svg",explorer:"https://explorer.katana.garden",eip1559:!0},bera:{id:80094,name:"Bera",shortname:"bera",native:{address:wt,symbol:"BERA",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/24647.png"},wToken:{symbol:"WBERA",address:"0x6969696969696969696969696969696969696969",decimals:18,logoUrl:"https://berascan.com/token/images/wrappedbera_ofc_64.png"},publicRpcUrl:"wss://rpc.berachain-apis.com",logoUrl:"https://katana.network/assets/katana-logo.svg",explorer:"https://berascan.com",eip1559:!0},monad:{id:143,name:"Monad",shortname:"monad",native:{address:wt,symbol:"MONAD",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png"},wToken:{symbol:"WMON",address:"0x3bd359c1119da7da1d913d1c4d2b7c461115433a",decimals:18,logoUrl:"https://assets.coingecko.com/coins/images/70784/standard/wmon.png?1766028904"},publicRpcUrl:"https://monad-mainnet.drpc.org",logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png",explorer:"https://monad.network",eip1559:!0}};var N5=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Qu=Math.ceil,gr=Math.floor,Kt="[BigNumber Error] ",Mm=Kt+"Number primitive has more than 15 significant digits: ",Ur=1e14,xe=14,Ju=9007199254740991,ed=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Kn=1e7,At=1e9;function Nm(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,f=!1,m=1,y=0,g={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},E="0123456789abcdefghijklmnopqrstuvwxyz",v=!0;function w(h,b){var x,S,I,F,_,k,P,O,U=this;if(!(U instanceof w))return new w(h,b);if(b==null){if(h&&h._isBigNumber===!0){U.s=h.s,!h.c||h.e>d?U.c=U.e=null:h.e<u?U.c=[U.e=0]:(U.e=h.e,U.c=h.c.slice());return}if((k=typeof h=="number")&&h*0==0){if(U.s=1/h<0?(h=-h,-1):1,h===~~h){for(F=0,_=h;_>=10;_/=10,F++);F>d?U.c=U.e=null:(U.e=F,U.c=[h]);return}O=String(h)}else{if(!N5.test(O=String(h)))return n(U,O,k);U.s=O.charCodeAt(0)==45?(O=O.slice(1),-1):1}(F=O.indexOf("."))>-1&&(O=O.replace(".","")),(_=O.search(/e/i))>0?(F<0&&(F=_),F+=+O.slice(_+1),O=O.substring(0,_)):F<0&&(F=O.length)}else{if(it(b,2,E.length,"Base"),b==10&&v)return U=new w(h),L(U,o+U.e+1,i);if(O=String(h),k=typeof h=="number"){if(h*0!=0)return n(U,O,k,b);if(U.s=1/h<0?(O=O.slice(1),-1):1,w.DEBUG&&O.replace(/^0\.0*|\./,"").length>15)throw Error(Mm+h)}else U.s=O.charCodeAt(0)===45?(O=O.slice(1),-1):1;for(x=E.slice(0,b),F=_=0,P=O.length;_<P;_++)if(x.indexOf(S=O.charAt(_))<0){if(S=="."){if(_>F){F=P;continue}}else if(!I&&(O==O.toUpperCase()&&(O=O.toLowerCase())||O==O.toLowerCase()&&(O=O.toUpperCase()))){I=!0,_=-1,F=0;continue}return n(U,String(h),k,b)}k=!1,O=r(O,b,10,U.s),(F=O.indexOf("."))>-1?O=O.replace(".",""):F=O.length}for(_=0;O.charCodeAt(_)===48;_++);for(P=O.length;O.charCodeAt(--P)===48;);if(O=O.slice(_,++P)){if(P-=_,k&&w.DEBUG&&P>15&&(h>Ju||h!==gr(h)))throw Error(Mm+U.s*h);if((F=F-_-1)>d)U.c=U.e=null;else if(F<u)U.c=[U.e=0];else{if(U.e=F,U.c=[],_=(F+1)%xe,F<0&&(_+=xe),_<P){for(_&&U.c.push(+O.slice(0,_)),P-=xe;_<P;)U.c.push(+O.slice(_,_+=xe));_=xe-(O=O.slice(_)).length}else _-=P;for(;_--;O+="0");U.c.push(+O)}}else U.c=[U.e=0]}w.clone=Nm,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(h){var b,x;if(h!=null)if(typeof h=="object"){if(h.hasOwnProperty(b="DECIMAL_PLACES")&&(x=h[b],it(x,0,At,b),o=x),h.hasOwnProperty(b="ROUNDING_MODE")&&(x=h[b],it(x,0,8,b),i=x),h.hasOwnProperty(b="EXPONENTIAL_AT")&&(x=h[b],x&&x.pop?(it(x[0],-At,0,b),it(x[1],0,At,b),c=x[0],l=x[1]):(it(x,-At,At,b),c=-(l=x<0?-x:x))),h.hasOwnProperty(b="RANGE"))if(x=h[b],x&&x.pop)it(x[0],-At,-1,b),it(x[1],1,At,b),u=x[0],d=x[1];else if(it(x,-At,At,b),x)u=-(d=x<0?-x:x);else throw Error(Kt+b+" cannot be zero: "+x);if(h.hasOwnProperty(b="CRYPTO"))if(x=h[b],x===!!x)if(x)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=x;else throw f=!x,Error(Kt+"crypto unavailable");else f=x;else throw Error(Kt+b+" not true or false: "+x);if(h.hasOwnProperty(b="MODULO_MODE")&&(x=h[b],it(x,0,9,b),m=x),h.hasOwnProperty(b="POW_PRECISION")&&(x=h[b],it(x,0,At,b),y=x),h.hasOwnProperty(b="FORMAT"))if(x=h[b],typeof x=="object")g=x;else throw Error(Kt+b+" not an object: "+x);if(h.hasOwnProperty(b="ALPHABET"))if(x=h[b],typeof x=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(x))v=x.slice(0,10)=="0123456789",E=x;else throw Error(Kt+b+" invalid: "+x)}else throw Error(Kt+"Object expected: "+h);return{DECIMAL_PLACES:o,ROUNDING_MODE:i,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:f,MODULO_MODE:m,POW_PRECISION:y,FORMAT:g,ALPHABET:E}},w.isBigNumber=function(h){if(!h||h._isBigNumber!==!0)return!1;if(!w.DEBUG)return!0;var b,x,S=h.c,I=h.e,F=h.s;e:if({}.toString.call(S)=="[object Array]"){if((F===1||F===-1)&&I>=-At&&I<=At&&I===gr(I)){if(S[0]===0){if(I===0&&S.length===1)return!0;break e}if(b=(I+1)%xe,b<1&&(b+=xe),String(S[0]).length==b){for(b=0;b<S.length;b++)if(x=S[b],x<0||x>=Ur||x!==gr(x))break e;if(x!==0)return!0}}}else if(S===null&&I===null&&(F===null||F===1||F===-1))return!0;throw Error(Kt+"Invalid BigNumber: "+h)},w.maximum=w.max=function(){return C(arguments,-1)},w.minimum=w.min=function(){return C(arguments,1)},w.random=(function(){var h=9007199254740992,b=Math.random()*h&2097151?function(){return gr(Math.random()*h)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(x){var S,I,F,_,k,P=0,O=[],U=new w(a);if(x==null?x=o:it(x,0,At),_=Qu(x/xe),f)if(crypto.getRandomValues){for(S=crypto.getRandomValues(new Uint32Array(_*=2));P<_;)k=S[P]*131072+(S[P+1]>>>11),k>=9e15?(I=crypto.getRandomValues(new Uint32Array(2)),S[P]=I[0],S[P+1]=I[1]):(O.push(k%1e14),P+=2);P=_/2}else if(crypto.randomBytes){for(S=crypto.randomBytes(_*=7);P<_;)k=(S[P]&31)*281474976710656+S[P+1]*1099511627776+S[P+2]*4294967296+S[P+3]*16777216+(S[P+4]<<16)+(S[P+5]<<8)+S[P+6],k>=9e15?crypto.randomBytes(7).copy(S,P):(O.push(k%1e14),P+=7);P=_/7}else throw f=!1,Error(Kt+"crypto unavailable");if(!f)for(;P<_;)k=b(),k<9e15&&(O[P++]=k%1e14);for(_=O[--P],x%=xe,_&&x&&(k=ed[xe-x],O[P]=gr(_/k)*k);O[P]===0;O.pop(),P--);if(P<0)O=[F=0];else{for(F=-1;O[0]===0;O.splice(0,1),F-=xe);for(P=1,k=O[0];k>=10;k/=10,P++);P<xe&&(F-=xe-P)}return U.e=F,U.c=O,U}})(),w.sum=function(){for(var h=1,b=arguments,x=new w(b[0]);h<b.length;)x=x.plus(b[h++]);return x},r=(function(){var h="0123456789";function b(x,S,I,F){for(var _,k=[0],P,O=0,U=x.length;O<U;){for(P=k.length;P--;k[P]*=S);for(k[0]+=F.indexOf(x.charAt(O++)),_=0;_<k.length;_++)k[_]>I-1&&(k[_+1]==null&&(k[_+1]=0),k[_+1]+=k[_]/I|0,k[_]%=I)}return k.reverse()}return function(x,S,I,F,_){var k,P,O,U,z,H,G,J,pe=x.indexOf("."),he=o,ie=i;for(pe>=0&&(U=y,y=0,x=x.replace(".",""),J=new w(S),H=J.pow(x.length-pe),y=U,J.c=b(hn(wr(H.c),H.e,"0"),10,I,h),J.e=J.c.length),G=b(x,S,I,_?(k=E,h):(k=h,E)),O=U=G.length;G[--U]==0;G.pop());if(!G[0])return k.charAt(0);if(pe<0?--O:(H.c=G,H.e=O,H.s=F,H=t(H,J,he,ie,I),G=H.c,z=H.r,O=H.e),P=O+he+1,pe=G[P],U=I/2,z=z||P<0||G[P+1]!=null,z=ie<4?(pe!=null||z)&&(ie==0||ie==(H.s<0?3:2)):pe>U||pe==U&&(ie==4||z||ie==6&&G[P-1]&1||ie==(H.s<0?8:7)),P<1||!G[0])x=z?hn(k.charAt(1),-he,k.charAt(0)):k.charAt(0);else{if(G.length=P,z)for(--I;++G[--P]>I;)G[P]=0,P||(++O,G=[1].concat(G));for(U=G.length;!G[--U];);for(pe=0,x="";pe<=U;x+=k.charAt(G[pe++]));x=hn(x,O,k.charAt(0))}return x}})(),t=(function(){function h(S,I,F){var _,k,P,O,U=0,z=S.length,H=I%Kn,G=I/Kn|0;for(S=S.slice();z--;)P=S[z]%Kn,O=S[z]/Kn|0,_=G*P+O*H,k=H*P+_%Kn*Kn+U,U=(k/F|0)+(_/Kn|0)+G*O,S[z]=k%F;return U&&(S=[U].concat(S)),S}function b(S,I,F,_){var k,P;if(F!=_)P=F>_?1:-1;else for(k=P=0;k<F;k++)if(S[k]!=I[k]){P=S[k]>I[k]?1:-1;break}return P}function x(S,I,F,_){for(var k=0;F--;)S[F]-=k,k=S[F]<I[F]?1:0,S[F]=k*_+S[F]-I[F];for(;!S[0]&&S.length>1;S.splice(0,1));}return function(S,I,F,_,k){var P,O,U,z,H,G,J,pe,he,ie,de,Be,Q,ve,_e,Ge,ot,Se=S.s==I.s?1:-1,Ee=S.c,be=I.c;if(!Ee||!Ee[0]||!be||!be[0])return new w(!S.s||!I.s||(Ee?be&&Ee[0]==be[0]:!be)?NaN:Ee&&Ee[0]==0||!be?Se*0:Se/0);for(pe=new w(Se),he=pe.c=[],O=S.e-I.e,Se=F+O+1,k||(k=Ur,O=xr(S.e/xe)-xr(I.e/xe),Se=Se/xe|0),U=0;be[U]==(Ee[U]||0);U++);if(be[U]>(Ee[U]||0)&&O--,Se<0)he.push(1),z=!0;else{for(ve=Ee.length,Ge=be.length,U=0,Se+=2,H=gr(k/(be[0]+1)),H>1&&(be=h(be,H,k),Ee=h(Ee,H,k),Ge=be.length,ve=Ee.length),Q=Ge,ie=Ee.slice(0,Ge),de=ie.length;de<Ge;ie[de++]=0);ot=be.slice(),ot=[0].concat(ot),_e=be[0],be[1]>=k/2&&_e++;do{if(H=0,P=b(be,ie,Ge,de),P<0){if(Be=ie[0],Ge!=de&&(Be=Be*k+(ie[1]||0)),H=gr(Be/_e),H>1)for(H>=k&&(H=k-1),G=h(be,H,k),J=G.length,de=ie.length;b(G,ie,J,de)==1;)H--,x(G,Ge<J?ot:be,J,k),J=G.length,P=1;else H==0&&(P=H=1),G=be.slice(),J=G.length;if(J<de&&(G=[0].concat(G)),x(ie,G,de,k),de=ie.length,P==-1)for(;b(be,ie,Ge,de)<1;)H++,x(ie,Ge<de?ot:be,de,k),de=ie.length}else P===0&&(H++,ie=[0]);he[U++]=H,ie[0]?ie[de++]=Ee[Q]||0:(ie=[Ee[Q]],de=1)}while((Q++<ve||ie[0]!=null)&&Se--);z=ie[0]!=null,he[0]||he.splice(0,1)}if(k==Ur){for(U=1,Se=he[0];Se>=10;Se/=10,U++);L(pe,F+(pe.e=U+O*xe-1)+1,_,z)}else pe.e=O,pe.r=+z;return pe}})();function A(h,b,x,S){var I,F,_,k,P;if(x==null?x=i:it(x,0,8),!h.c)return h.toString();if(I=h.c[0],_=h.e,b==null)P=wr(h.c),P=S==1||S==2&&(_<=c||_>=l)?Ac(P,_):hn(P,_,"0");else if(h=L(new w(h),b,x),F=h.e,P=wr(h.c),k=P.length,S==1||S==2&&(b<=F||F<=c)){for(;k<b;P+="0",k++);P=Ac(P,F)}else if(b-=_+(S===2&&F>_),P=hn(P,F,"0"),F+1>k){if(--b>0)for(P+=".";b--;P+="0");}else if(b+=F-k,b>0)for(F+1==k&&(P+=".");b--;P+="0");return h.s<0&&I?"-"+P:P}function C(h,b){for(var x,S,I=1,F=new w(h[0]);I<h.length;I++)S=new w(h[I]),(!S.s||(x=As(F,S))===b||x===0&&F.s===b)&&(F=S);return F}function D(h,b,x){for(var S=1,I=b.length;!b[--I];b.pop());for(I=b[0];I>=10;I/=10,S++);return(x=S+x*xe-1)>d?h.c=h.e=null:x<u?h.c=[h.e=0]:(h.e=x,h.c=b),h}n=(function(){var h=/^(-?)0([xbo])(?=\w[\w.]*$)/i,b=/^([^.]+)\.$/,x=/^\.([^.]+)$/,S=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(F,_,k,P){var O,U=k?_:_.replace(I,"");if(S.test(U))F.s=isNaN(U)?null:U<0?-1:1;else{if(!k&&(U=U.replace(h,function(z,H,G){return O=(G=G.toLowerCase())=="x"?16:G=="b"?2:8,!P||P==O?H:z}),P&&(O=P,U=U.replace(b,"$1").replace(x,"0.$1")),_!=U))return new w(U,O);if(w.DEBUG)throw Error(Kt+"Not a"+(P?" base "+P:"")+" number: "+_);F.s=null}F.c=F.e=null}})();function L(h,b,x,S){var I,F,_,k,P,O,U,z=h.c,H=ed;if(z){e:{for(I=1,k=z[0];k>=10;k/=10,I++);if(F=b-I,F<0)F+=xe,_=b,P=z[O=0],U=gr(P/H[I-_-1]%10);else if(O=Qu((F+1)/xe),O>=z.length)if(S){for(;z.length<=O;z.push(0));P=U=0,I=1,F%=xe,_=F-xe+1}else break e;else{for(P=k=z[O],I=1;k>=10;k/=10,I++);F%=xe,_=F-xe+I,U=_<0?0:gr(P/H[I-_-1]%10)}if(S=S||b<0||z[O+1]!=null||(_<0?P:P%H[I-_-1]),S=x<4?(U||S)&&(x==0||x==(h.s<0?3:2)):U>5||U==5&&(x==4||S||x==6&&(F>0?_>0?P/H[I-_]:0:z[O-1])%10&1||x==(h.s<0?8:7)),b<1||!z[0])return z.length=0,S?(b-=h.e+1,z[0]=H[(xe-b%xe)%xe],h.e=-b||0):z[0]=h.e=0,h;if(F==0?(z.length=O,k=1,O--):(z.length=O+1,k=H[xe-F],z[O]=_>0?gr(P/H[I-_]%H[_])*k:0),S)for(;;)if(O==0){for(F=1,_=z[0];_>=10;_/=10,F++);for(_=z[0]+=k,k=1;_>=10;_/=10,k++);F!=k&&(h.e++,z[0]==Ur&&(z[0]=1));break}else{if(z[O]+=k,z[O]!=Ur)break;z[O--]=0,k=1}for(F=z.length;z[--F]===0;z.pop());}h.e>d?h.c=h.e=null:h.e<u&&(h.c=[h.e=0])}return h}function T(h){var b,x=h.e;return x===null?h.toString():(b=wr(h.c),b=x<=c||x>=l?Ac(b,x):hn(b,x,"0"),h.s<0?"-"+b:b)}return s.absoluteValue=s.abs=function(){var h=new w(this);return h.s<0&&(h.s=1),h},s.comparedTo=function(h,b){return As(this,new w(h,b))},s.decimalPlaces=s.dp=function(h,b){var x,S,I,F=this;if(h!=null)return it(h,0,At),b==null?b=i:it(b,0,8),L(new w(F),h+F.e+1,b);if(!(x=F.c))return null;if(S=((I=x.length-1)-xr(this.e/xe))*xe,I=x[I])for(;I%10==0;I/=10,S--);return S<0&&(S=0),S},s.dividedBy=s.div=function(h,b){return t(this,new w(h,b),o,i)},s.dividedToIntegerBy=s.idiv=function(h,b){return t(this,new w(h,b),0,1)},s.exponentiatedBy=s.pow=function(h,b){var x,S,I,F,_,k,P,O,U,z=this;if(h=new w(h),h.c&&!h.isInteger())throw Error(Kt+"Exponent not an integer: "+T(h));if(b!=null&&(b=new w(b)),k=h.e>14,!z.c||!z.c[0]||z.c[0]==1&&!z.e&&z.c.length==1||!h.c||!h.c[0])return U=new w(Math.pow(+T(z),k?h.s*(2-Sc(h)):+T(h))),b?U.mod(b):U;if(P=h.s<0,b){if(b.c?!b.c[0]:!b.s)return new w(NaN);S=!P&&z.isInteger()&&b.isInteger(),S&&(z=z.mod(b))}else{if(h.e>9&&(z.e>0||z.e<-1||(z.e==0?z.c[0]>1||k&&z.c[1]>=24e7:z.c[0]<8e13||k&&z.c[0]<=9999975e7)))return F=z.s<0&&Sc(h)?-0:0,z.e>-1&&(F=1/F),new w(P?1/F:F);y&&(F=Qu(y/xe+2))}for(k?(x=new w(.5),P&&(h.s=1),O=Sc(h)):(I=Math.abs(+T(h)),O=I%2),U=new w(a);;){if(O){if(U=U.times(z),!U.c)break;F?U.c.length>F&&(U.c.length=F):S&&(U=U.mod(b))}if(I){if(I=gr(I/2),I===0)break;O=I%2}else if(h=h.times(x),L(h,h.e+1,1),h.e>14)O=Sc(h);else{if(I=+T(h),I===0)break;O=I%2}z=z.times(z),F?z.c&&z.c.length>F&&(z.c.length=F):S&&(z=z.mod(b))}return S?U:(P&&(U=a.div(U)),b?U.mod(b):F?L(U,y,i,_):U)},s.integerValue=function(h){var b=new w(this);return h==null?h=i:it(h,0,8),L(b,b.e+1,h)},s.isEqualTo=s.eq=function(h,b){return As(this,new w(h,b))===0},s.isFinite=function(){return!!this.c},s.isGreaterThan=s.gt=function(h,b){return As(this,new w(h,b))>0},s.isGreaterThanOrEqualTo=s.gte=function(h,b){return(b=As(this,new w(h,b)))===1||b===0},s.isInteger=function(){return!!this.c&&xr(this.e/xe)>this.c.length-2},s.isLessThan=s.lt=function(h,b){return As(this,new w(h,b))<0},s.isLessThanOrEqualTo=s.lte=function(h,b){return(b=As(this,new w(h,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(h,b){var x,S,I,F,_=this,k=_.s;if(h=new w(h,b),b=h.s,!k||!b)return new w(NaN);if(k!=b)return h.s=-b,_.plus(h);var P=_.e/xe,O=h.e/xe,U=_.c,z=h.c;if(!P||!O){if(!U||!z)return U?(h.s=-b,h):new w(z?_:NaN);if(!U[0]||!z[0])return z[0]?(h.s=-b,h):new w(U[0]?_:i==3?-0:0)}if(P=xr(P),O=xr(O),U=U.slice(),k=P-O){for((F=k<0)?(k=-k,I=U):(O=P,I=z),I.reverse(),b=k;b--;I.push(0));I.reverse()}else for(S=(F=(k=U.length)<(b=z.length))?k:b,k=b=0;b<S;b++)if(U[b]!=z[b]){F=U[b]<z[b];break}if(F&&(I=U,U=z,z=I,h.s=-h.s),b=(S=z.length)-(x=U.length),b>0)for(;b--;U[x++]=0);for(b=Ur-1;S>k;){if(U[--S]<z[S]){for(x=S;x&&!U[--x];U[x]=b);--U[x],U[S]+=Ur}U[S]-=z[S]}for(;U[0]==0;U.splice(0,1),--O);return U[0]?D(h,U,O):(h.s=i==3?-1:1,h.c=[h.e=0],h)},s.modulo=s.mod=function(h,b){var x,S,I=this;return h=new w(h,b),!I.c||!h.s||h.c&&!h.c[0]?new w(NaN):!h.c||I.c&&!I.c[0]?new w(I):(m==9?(S=h.s,h.s=1,x=t(I,h,0,3),h.s=S,x.s*=S):x=t(I,h,0,m),h=I.minus(x.times(h)),!h.c[0]&&m==1&&(h.s=I.s),h)},s.multipliedBy=s.times=function(h,b){var x,S,I,F,_,k,P,O,U,z,H,G,J,pe,he,ie=this,de=ie.c,Be=(h=new w(h,b)).c;if(!de||!Be||!de[0]||!Be[0])return!ie.s||!h.s||de&&!de[0]&&!Be||Be&&!Be[0]&&!de?h.c=h.e=h.s=null:(h.s*=ie.s,!de||!Be?h.c=h.e=null:(h.c=[0],h.e=0)),h;for(S=xr(ie.e/xe)+xr(h.e/xe),h.s*=ie.s,P=de.length,z=Be.length,P<z&&(J=de,de=Be,Be=J,I=P,P=z,z=I),I=P+z,J=[];I--;J.push(0));for(pe=Ur,he=Kn,I=z;--I>=0;){for(x=0,H=Be[I]%he,G=Be[I]/he|0,_=P,F=I+_;F>I;)O=de[--_]%he,U=de[_]/he|0,k=G*O+U*H,O=H*O+k%he*he+J[F]+x,x=(O/pe|0)+(k/he|0)+G*U,J[F--]=O%pe;J[F]=x}return x?++S:J.splice(0,1),D(h,J,S)},s.negated=function(){var h=new w(this);return h.s=-h.s||null,h},s.plus=function(h,b){var x,S=this,I=S.s;if(h=new w(h,b),b=h.s,!I||!b)return new w(NaN);if(I!=b)return h.s=-b,S.minus(h);var F=S.e/xe,_=h.e/xe,k=S.c,P=h.c;if(!F||!_){if(!k||!P)return new w(I/0);if(!k[0]||!P[0])return P[0]?h:new w(k[0]?S:I*0)}if(F=xr(F),_=xr(_),k=k.slice(),I=F-_){for(I>0?(_=F,x=P):(I=-I,x=k),x.reverse();I--;x.push(0));x.reverse()}for(I=k.length,b=P.length,I-b<0&&(x=P,P=k,k=x,b=I),I=0;b;)I=(k[--b]=k[b]+P[b]+I)/Ur|0,k[b]=Ur===k[b]?0:k[b]%Ur;return I&&(k=[I].concat(k),++_),D(h,k,_)},s.precision=s.sd=function(h,b){var x,S,I,F=this;if(h!=null&&h!==!!h)return it(h,1,At),b==null?b=i:it(b,0,8),L(new w(F),h,b);if(!(x=F.c))return null;if(I=x.length-1,S=I*xe+1,I=x[I]){for(;I%10==0;I/=10,S--);for(I=x[0];I>=10;I/=10,S++);}return h&&F.e+1>S&&(S=F.e+1),S},s.shiftedBy=function(h){return it(h,-Ju,Ju),this.times("1e"+h)},s.squareRoot=s.sqrt=function(){var h,b,x,S,I,F=this,_=F.c,k=F.s,P=F.e,O=o+4,U=new w("0.5");if(k!==1||!_||!_[0])return new w(!k||k<0&&(!_||_[0])?NaN:_?F:1/0);if(k=Math.sqrt(+T(F)),k==0||k==1/0?(b=wr(_),(b.length+P)%2==0&&(b+="0"),k=Math.sqrt(+b),P=xr((P+1)/2)-(P<0||P%2),k==1/0?b="5e"+P:(b=k.toExponential(),b=b.slice(0,b.indexOf("e")+1)+P),x=new w(b)):x=new w(k+""),x.c[0]){for(P=x.e,k=P+O,k<3&&(k=0);;)if(I=x,x=U.times(I.plus(t(F,I,O,1))),wr(I.c).slice(0,k)===(b=wr(x.c)).slice(0,k))if(x.e<P&&--k,b=b.slice(k-3,k+1),b=="9999"||!S&&b=="4999"){if(!S&&(L(I,I.e+o+2,0),I.times(I).eq(F))){x=I;break}O+=4,k+=4,S=1}else{(!+b||!+b.slice(1)&&b.charAt(0)=="5")&&(L(x,x.e+o+2,1),h=!x.times(x).eq(F));break}}return L(x,x.e+o+1,i,h)},s.toExponential=function(h,b){return h!=null&&(it(h,0,At),h++),A(this,h,b,1)},s.toFixed=function(h,b){return h!=null&&(it(h,0,At),h=h+this.e+1),A(this,h,b)},s.toFormat=function(h,b,x){var S,I=this;if(x==null)h!=null&&b&&typeof b=="object"?(x=b,b=null):h&&typeof h=="object"?(x=h,h=b=null):x=g;else if(typeof x!="object")throw Error(Kt+"Argument not an object: "+x);if(S=I.toFixed(h,b),I.c){var F,_=S.split("."),k=+x.groupSize,P=+x.secondaryGroupSize,O=x.groupSeparator||"",U=_[0],z=_[1],H=I.s<0,G=H?U.slice(1):U,J=G.length;if(P&&(F=k,k=P,P=F,J-=F),k>0&&J>0){for(F=J%k||k,U=G.substr(0,F);F<J;F+=k)U+=O+G.substr(F,k);P>0&&(U+=O+G.slice(F)),H&&(U="-"+U)}S=z?U+(x.decimalSeparator||"")+((P=+x.fractionGroupSize)?z.replace(new RegExp("\\d{"+P+"}\\B","g"),"$&"+(x.fractionGroupSeparator||"")):z):U}return(x.prefix||"")+S+(x.suffix||"")},s.toFraction=function(h){var b,x,S,I,F,_,k,P,O,U,z,H,G=this,J=G.c;if(h!=null&&(k=new w(h),!k.isInteger()&&(k.c||k.s!==1)||k.lt(a)))throw Error(Kt+"Argument "+(k.isInteger()?"out of range: ":"not an integer: ")+T(k));if(!J)return new w(G);for(b=new w(a),O=x=new w(a),S=P=new w(a),H=wr(J),F=b.e=H.length-G.e-1,b.c[0]=ed[(_=F%xe)<0?xe+_:_],h=!h||k.comparedTo(b)>0?F>0?b:O:k,_=d,d=1/0,k=new w(H),P.c[0]=0;U=t(k,b,0,1),I=x.plus(U.times(S)),I.comparedTo(h)!=1;)x=S,S=I,O=P.plus(U.times(I=O)),P=I,b=k.minus(U.times(I=b)),k=I;return I=t(h.minus(x),S,0,1),P=P.plus(I.times(O)),x=x.plus(I.times(S)),P.s=O.s=G.s,F=F*2,z=t(O,S,F,i).minus(G).abs().comparedTo(t(P,x,F,i).minus(G).abs())<1?[O,S]:[P,x],d=_,z},s.toNumber=function(){return+T(this)},s.toPrecision=function(h,b){return h!=null&&it(h,1,At),A(this,h,b,2)},s.toString=function(h){var b,x=this,S=x.s,I=x.e;return I===null?S?(b="Infinity",S<0&&(b="-"+b)):b="NaN":(h==null?b=I<=c||I>=l?Ac(wr(x.c),I):hn(wr(x.c),I,"0"):h===10&&v?(x=L(new w(x),o+I+1,i),b=hn(wr(x.c),x.e,"0")):(it(h,2,E.length,"Base"),b=r(hn(wr(x.c),I,"0"),10,h,S,!0)),S<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 xr(e){var t=e|0;return e>0||e===t?t:t-1}function wr(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 As(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 it(e,t,r,n){if(e<t||e>r||e!==gr(e))throw Error(Kt+(n||"Argument")+(typeof e=="number"?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Sc(e){var t=e.c.length-1;return xr(e.e/xe)==t&&e.c[t]%2!=0}function Ac(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function hn(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 j=Nm();const bn=(e,t)=>{if(!e||!t)return"";const r=j(10).pow(e||0);return j(t).times(r).idiv(r).div(r).toFixed()},Pc=(e,t)=>!e||!t?"":z5(t).times(j(10).pow(e)).decimalPlaces(0).toFixed(0),L5=j(0);j(1),j(10),j(1e18);function Lm(e,t){return e instanceof j?e:e?j(e,t):L5}function Ps(e,t){return e==t||e.toLowerCase()==t.toLowerCase()}function z5(e,t,r){if(typeof e!="string")return Lm(e);const n=".",s=e.replace(new RegExp(`[^${n}\\d-]+`,"g"),"");return Lm(s)}const Is=e=>!!Vm.find(t=>Ps(t,e||""));function R5(e){return[Gt.Years,Gt.Months,Gt.Weeks,Gt.Days,Gt.Hours,Gt.Minutes].find(r=>r<=e)||Gt.Minutes}const Zn=e=>e?e.value*e.unit:0,H5=e=>!e||e==="NaN"?"0":j(e).decimalPlaces(0).toFixed(),Bs=e=>Object.values(Ft).find(t=>t.id===e),$5=e=>{if(!e)return;const t=e.map(a=>_t(a)),r=Object.entries(Wm).filter(([a])=>t.includes(a)).flatMap(([,a])=>a),n=e.map(a=>a.exchangeAddress),s=new Set([...n,...r].map(a=>a.toLowerCase()));return Array.from(s)},td=(e,t)=>e.version===1?(e.fillDelay||0)*1e3+id(t):(e.fillDelay||0)*1e3,Fo=e=>typeof window>"u"?null:new URLSearchParams(window.location.search).get(e),zm=e=>gh().filter(t=>t.name===e).map(t=>t.chainId),Rm="https://order-sink-dev.orbs.network",rd="https://order-sink.orbs.network";let nd;const G5=e=>{nd=e},sd=()=>{const e=Fo("env");return e==="prod"?rd:e==="dev"?Rm:nd==="prod"?rd:nd==="dev"?Rm:rd},j5=100,V5=1,Ic=300*1e3,Ca=365*24*60*60*1e3,ad=300*1e3,Hm=new Date(Ic).getMinutes(),$m=e=>`https://hub.orbs.network/api/private/project_cm7nb67z86nyr01z12gs0fxpf/subgraphs/orbs-twap-${e}/prod/gn`,vr="https://hub.orbs.network/api/apikey/subgraphs/id",Gm={[Ft.eth.id]:`${vr}/Bf7bvMYcJbDAvYWJmhMpHZ4cpFjqzkhK6GXXEpnPRq6`,[Ft.bsc.id]:`${vr}/4NfXEi8rreQsnAr4aJ45RLCKgnjcWX46Lbt9SadiCcz6`,[Ft.poly.id]:`${vr}/3PyRPWSvDnMowGbeBy7aNsvUkD5ZuxdXQw2RdJq4NdXi`,[Ft.arb.id]:`${vr}/83bpQexEaqBjHaQbKoFTbtvCXuo5RudRkfLgtRUYqo2c`,[Ft.base.id]:`${vr}/DFhaPQb3HATXkpsWNZw3gydYHehLBVEDiSk4iBdZJyps`,[Ft.sei.id]:`${vr}/5zjzRnURzoddyFSZBw5E5NAM3oBgPq3NasTYbtMk6EL6`,[Ft.linea.id]:`${vr}/6VsNPEYfFLPZCqdMMDadoXQjLHWJdjEwiD768GAtb7j6`,[Ft.sonic.id]:`${vr}/DtBr6a5vsoDd2oAXdPszcn4gLgrr1XC68Q3AJQKXnNLV`,[Ft.ftm.id]:`${vr}/DdRo1pmJkrJC9fjsjEBWnNE1uqrbh7Diz4tVKd7rfupp`,[Ft.katana.id]:`${vr}/CGi9sDFMQcnBwF3C3NoCFqnaE34sssbgwPLTwiskSXmW`,[Ft.avax.id]:`${vr}/FxZ1vMwE5Xy1qvKvZENUMz4vhW8Sh4vXJf9Vp7o17pTx`,[Ft.bera.id]:`${vr}/H7aY53mY1hgaSURwXj3ZVirwNSifExwjgEL5GNtTqmEj`,[Ft.flare.id]:$m("flare"),[Ft.cronosZkEvm.id]:$m("cronos-zkevm")},jm="0x0000000000000000000000000000000000000000",Vm=[jm,"0x0000000000000000000000000000000000001010","0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE","0x000000000000000000000000000000000000dEaD","0x000000000000000000000000000000000000800A","0x000000000000000000000000000000000000800a"],W5="115792089237316195423570985008687907853269984665640564039457584007913129639935",_t=e=>`${e.name}_${e.chainId}`,Wm={[_t(Dt.SushiArb)]:["0x846F2B29ef314bF3D667981b4ffdADc5B858312a","0x08c41f5D1C844061f6D952E25827eeAA576c6536"],[_t(Dt.SushiBase)]:["0x846F2B29ef314bF3D667981b4ffdADc5B858312a","0x08c41f5D1C844061f6D952E25827eeAA576c6536"],[_t(Dt.SushiEth)]:["0xc55943Fa6509004B2903ED8F8ab7347BfC47D0bA","0x08c41f5D1C844061f6D952E25827eeAA576c6536"],[_t(Dt.PancakeSwap)]:["0xb2BAFe188faD927240038cC4FfF2d771d8A58905","0xE2a0c3b9aD19A18c4bBa7fffBe5bC1b0E58Db1CE"],[_t(Dt.PancakeSwapArbitrum)]:["0xE20167871dB616DdfFD0Fd870d9bC068C350DD1F","0x807488ADAD033e95C438F998277bE654152594dc"],[_t(Dt.PancakeSwapBase)]:["0x10ed1F36e4eBE76E161c9AADDa20BE841bc0082c","0x3A9df3eE209b802D0337383f5abCe3204d623588"],[_t(Dt.PancakeSwapLinea)]:["0x3A9df3eE209b802D0337383f5abCe3204d623588"],[_t(Dt.QuickSwap)]:["0x26D0ec4Be402BCE03AAa8aAf0CF67e9428ba54eF"],[_t(Dt.Thena)]:["0xc2aBC02acd77Bb2407efA22348dA9afC8B375290"],[_t(Dt.Lynex)]:["0x72e3e1fD5D2Ee2F1C2Eb695206D490a1D45C3835"],[_t(Dt.DragonSwap)]:["0x101e1B65Bb516FB5f4547C80BAe0b51f1b8D7a22"],[_t(Dt.SpookySwapSonic)]:["0xAd97B770ad64aE47fc7d64B3bD820dCDbF9ff7DA"],[_t(Dt.SpookySwap)]:["0x3924d62219483015f982b160d48c0fa5Fd436Cba"],[_t(Dt.SwapX)]:["0xE5012eBDe5e26EE3Ea41992154731a03023CF274"]},Bc={unit:Gt.Minutes,value:Hm},q5=.25,Y5="100",qm="RePermitWitnessTransferFrom",Ym={RePermitWitnessTransferFrom:[{name:"permitted",type:"TokenPermissions"},{name:"spender",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"},{name:"witness",type:"Order"}],Exchange:[{name:"adapter",type:"address"},{name:"ref",type:"address"},{name:"share",type:"uint32"},{name:"data",type:"bytes"}],Input:[{name:"token",type:"address"},{name:"amount",type:"uint256"},{name:"maxAmount",type:"uint256"}],Order:[{name:"reactor",type:"address"},{name:"executor",type:"address"},{name:"exchange",type:"Exchange"},{name:"swapper",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"},{name:"chainid",type:"uint256"},{name:"exclusivity",type:"uint32"},{name:"epoch",type:"uint32"},{name:"slippage",type:"uint32"},{name:"freshness",type:"uint32"},{name:"input",type:"Input"},{name:"output",type:"Output"}],Output:[{name:"token",type:"address"},{name:"limit",type:"uint256"},{name:"stop",type:"uint256"},{name:"recipient",type:"address"}],TokenPermissions:[{name:"token",type:"address"},{name:"amount",type:"uint256"}]},Fc="https://www.orbs.com/dtwap-and-dlimit-faq/",K5="https://www.orbs.com/dtwap-and-dlimit-faq/#dSLTP",Z5="https://raw.githubusercontent.com/orbs-network/twap-ui/master/logo/orbslogo.svg",X5="https://www.orbs.com/assets/img/common/logo.svg",Q5="https://www.orbs.com/",J5="https://www.orbs.com/dtwap-dlimit-disclaimer";var Uc=(e=>(e.FRESHNESS="freshness",e.MIN_CHUNK_SIZE_USD="minChunkSizeUsd",e.ENV="env",e))(Uc||{});const Km="-5",Zm="10",Xm="-10",Qm="5",ew="Something went wrong";function tw(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}function rw(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const nw={14:{dex:{spark:{type:"default:spark",adapter:"0xB18c633B6584A33E45a8840a759f56dF17117b1D",fee:"0xaeA8C3e1a129A77686E115b1a46D9aD8405F7D2b"}}},56:{dex:{thena:{type:"default:odos-v2",adapter:"0xB75218ba5A99bF57Fd02556B70F05A4A0f1Dbe67",fee:"0x15eBc8b5b3877512FFF23650188694A9a8891FAc"},pancake:{type:"p2:pancakeswap-v2",adapter:"0x654272F7e6e6E912D38650f783eFd44452fD6ee5",fee:"0x37A957f10F458e0d7fDECBE2917971b57F15c927"},newera:{type:"default:odos-v2",adapter:"0x845f459271D800f6Ab32D78400b8Aa18414E80b0",fee:"0x4E7454909eB6D539111D56b50d68897E933D2d11"}}},137:{dex:{quick:{type:"paraswap:paraswap-v5",adapter:"0x023fD6848234f2655818705237F77F02215FEfe5",fee:"0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f"},teafi:{type:"paraswap:paraswap-v5",adapter:"0xe95db7a60164B112C64cE67bA8587b1d4a0E0D29",fee:"0x04Ff96e2c4D62b5771795d307AD679a25b3D2D50"}}},143:{dex:{yowie:{type:"default:openocean-v2",adapter:"0x18bc9533c3539073B9A9acF12b0AbF7cB73e0F1f",fee:"0x6AF3eE77A3A3257777F5649aFa611b4C7Fd975Ef"}}},146:{dex:{spooky:{type:"default:magpie-v3",adapter:"0xdCee7FDdB932104329d528144Cd17A408722B7e2",fee:"0x840Df4684B35BC68BcdA3F6707A3c82A0D662f8b"},swapx:{type:"default:openocean-v2",adapter:"0xecc733D6F6f2DEa341832D650E30822118884FEb",fee:"0x6E03f7BC0f141894612AA017796096399623895F"},shadow:{type:"default:magpie-v3",adapter:"0x5f3E5F6ACCfc65243A01Da3E93b5A700285592C3",fee:"0xb9e3751fAF3187E1bC468E56a707a8A91754460e"}}},1329:{dex:{dragon:{type:"default:dragon",adapter:"0x02d9d5882129241b67ec21Ebc2C86e1BE9BC9890",fee:"0x0dc1E0525202b32e89bA78ed55b1e5cEdB751334"},nami:{type:"default:openocean-v2",adapter:"0x2D4A1237A98f8cb03C3C85960e859aA44036a306",fee:"0xeB58450e23632003f013568703F54446070E2E80"}}},8453:{dex:{quick:{type:"default:kyber-v2",adapter:"0xc73F03c929A123Ee2f3A98EC18BB240f03980AE5",fee:"0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f"}}},42161:{dex:{arbidex:{type:"default:odos-v2",adapter:"0xa734b32151108139e48dCA06eE721538d90A9Ef6",fee:"0xa0c11852f8A44e32F9EC10AD25986A53842f72Ca"},ramses:{type:"paraswap:paraswap-v5",adapter:"0x023fD6848234f2655818705237F77F02215FEfe5",fee:"0xB5BaCB60ECDa0bEF809B2A26eC9B4B926835D7af"},omni:{type:"paraswap:paraswap-v5",adapter:"0xa1baE146161223cd9dCa7137F68eb385934130BE",fee:"0xba5291526c30B097E9F1Fd1Be301E2ab6E0782aa"},chronos:{type:"default:odos-v2",adapter:"0x4Ff90F32aceD08b3e3257B018EA495Fd1Bfe4455",fee:"0x5729af83240EFecAa18eafaAE82961c2DD045Dbe"}}},43114:{dex:{blackhole:{type:"default:kyber-v2",adapter:"0x426ec4bc0d58B80959CDE77576a1942dd40592Fa",fee:"0x7f8B62520D9B5DA0ED517cc36e8dcb2a356f1928"}}},59144:{dex:{lynex:{type:"default:openocean",adapter:"0x4FF6A97A67fe395212f168f011D71fE79E4396f2",fee:"0xcb36ed1B1BfAD8F7FC9651f52d21f04A68677423"}}},80094:{dex:{kodiak:{type:"default:kodiak",adapter:"0xBbaa527Aac00b1Ee9A3909D4D8c4447630E29B1F",fee:"0xBA47Ec15aFbCF6e7e9F52900632049530bB6bAe4"}}},"*":{wm:"0x0005d5cE0dB57e5BE3b2b8b6FeB75f0ccd015000",repermit:"0x00002a9C4D9497df5Bd31768eC5d30eEf5405000",cosigner:"0x0007ec53404c423C935e830ec21903e184690000",reactor:"0x0006a959430e8fBB858D81B2D1140B0ae5c26001",executor:"0x000eBA869d76C618ddc4A6D685A0820A620Ce002",refinery:"0x000E474c0D7084EAA35A501035E73269f4b009A5",salt:{wm:"0xc9b46eae42dfeba3222a0315bf682f33cd5cc9d60c9625642e88406f8415f152",repermit:"0x4871dc9008e605821ea9677b65ea2a60ffb774afb31e0dcaea2e192880096be7",cosigner:"0x37576f2ac1d2a602f00777611edf6f0cbc27611b0980b29bc7856fa79b2b8073",reactor:"0x034169222370f2fd587ef8998082d762cceef58a272330215f5110ec0d76d400",executor:"0xea139bc421fa5e272bed3db74233b2e02077e0aacf8b855f87961e98f2fb467f",refinery:"0x9746de29f1dd31b2c8460d71e92a7aefa34911130e61f274f37776e598c48bec"}}};var od,Jm;function sw(){if(Jm)return od;Jm=1;const e=nw,t=s=>rw(`./out/${s}.sol/${s}.json`).abi,r=()=>({wm:t("WM"),repermit:t("RePermit"),reactor:t("OrderReactor"),executor:t("Executor"),refinery:t("Refinery"),adapter:t("DefaultDexAdapter")});function n(s,a){if(!s||!(a!=null&&a.trim()))return;const{dex:o,...i}=e["*"]??{},c=e[s];if(!c)return;const{dex:l,...u}=c,d=l==null?void 0:l[a];if(d)return{...i,...u,...d}}return od={config:n,abis:r,raw:e},od}var eh=sw();const th=(e,t,r)=>{if(!e||!t||!r)return;const n=j(e).times(t),s=j(10).pow(r);return n.div(s).toFixed(0)},rh=(e,t,r,n)=>{if(r||!n||!e||!t)return j(0).toString();const s=j(e).times(j(t)),a=j(10).pow(n),o=s.div(a);return j.max(1,o).integerValue(j.ROUND_FLOOR).toFixed(0)},nh=(e,t,r,n)=>{if(e===ge.TWAP||e===ge.LIMIT)return"0";if(!n||!t||!r)return;const s=j(t).times(j(r)),a=j(10).pow(n),o=s.div(a);return j.max(1,o).integerValue(j.ROUND_FLOOR).toFixed(0)||"0"},sh=(e,t,r,n)=>{const s=Zn(r)*2*t,a=R5(s);return n||(e===ge.LIMIT?{unit:Gt.Days,value:7}:e===ge.STOP_LOSS||e===ge.TAKE_PROFIT?{unit:Gt.Days,value:1}:{unit:a,value:Number(j(s/a).toFixed(2))})},ah=(e,t,r)=>t!==ge.TWAP?1:r!==void 0?r:e,oh=(e,t,r,n)=>{if(!t||!r||!n)return 1;const a=j(r).times(t).div(n).integerValue(j.ROUND_FLOOR).toNumber(),o=Math.floor(Ca/2/Zn(e));return Math.max(1,Math.min(a,o))},aw=e=>id(e)/1e3/60,ih=(e,t)=>e+Zn(t)+6e4,id=e=>e.bidDelaySeconds*1e3*2,ch=(e,t)=>!e||!t?"0":j(e).div(t).integerValue(j.ROUND_FLOOR).toFixed(0),ow=(e,t)=>({isError:!(e.unit===Bc.unit&&e.value===Bc.value)&&Zn(e)*t>Ca,value:Math.floor(Ca/t)}),lh=(e="",t="",r)=>{if(r===ge.STOP_LOSS)return{isError:j(t||0).gte(j(e||0)),value:e}},uh=(e="",t="",r)=>{if(r===ge.TAKE_PROFIT)return{isError:j(t||0).lte(j(e||0)),value:e}},dh=(e="",t="",r=!1,n)=>{if(!r&&n===ge.STOP_LOSS)return{isError:j(t||0).gte(j(e||0)),value:e}},ph=(e="",t="",r=!1,n)=>{if(!r&&n===ge.TAKE_PROFIT)return{isError:j(t||0).gte(j(e||0)),value:e}},fh=(e,t)=>e===ge.STOP_LOSS||e===ge.TAKE_PROFIT?{isError:Zn(t)>5184e6,value:5184e6}:{isError:Zn(t)>Ca,value:Ca},mh=e=>({isError:Zn(e)<ad,value:ad}),hh=e=>({isError:Zn(e)<Ic,value:Ic}),bh=(e,t,r)=>({isError:j(t||0).multipliedBy(e||0).isLessThan(r),value:r}),yh=(e,t,r)=>({isError:r===ge.TWAP&&j(e).isGreaterThan(t),value:t}),cd=(e,t=0)=>{var o;const r=(o=Object.entries(Dt).find(([i,c])=>c.chainId===t&&i.toLowerCase().indexOf(e.toLowerCase())>=0))==null?void 0:o[1],{abi:n,...s}=eh.config(t,e);return{...s,partner:e,twapConfig:r}},gh=()=>{const e=eh.raw;return Object.entries(e).filter(([t])=>t!=="*").flatMap(([t,r])=>{const n=r==null?void 0:r.dex;return!n||typeof n!="object"?[]:Object.entries(n).map(([s])=>({chainId:Number(t),name:s,config:cd(s,Number(t))}))}).sort((t,r)=>t.name.localeCompare(r.name))},xh=({chainId:e,srcToken:t,dstToken:r,srcAmount:n,deadlineMillis:s,fillDelayMillis:a,slippage:o,account:i,srcAmountPerTrade:c,dstMinAmountPerTrade:l,triggerAmountPerTrade:u,config:d})=>{const f=Date.now().toString(),m=parseInt((a/1e3).toFixed(0)),y=H5(s/1e3),g=Fo(Uc.FRESHNESS),E=g?parseInt(g):60,v={permitted:{token:t,amount:n},spender:d.reactor,nonce:f,deadline:y,witness:{reactor:d.reactor,executor:d.executor,exchange:{adapter:d.adapter,ref:d.fee,share:0,data:"0x"},swapper:i,nonce:f,deadline:y,chainid:e,exclusivity:0,epoch:m,slippage:o,freshness:E,input:{token:t,amount:c,maxAmount:n},output:{token:r,limit:l||"0",stop:!u||j(u||0).isZero()?"0":u,recipient:i}}};return{domain:{name:"RePermit",version:"1",chainId:e,verifyingContract:d.repermit},order:v,types:Ym,primaryType:qm}},iw={version:"0.0.18"},cw=`https://bi.orbs.network/putes/twap-ui-${.7}`,wh=iw.version;let ld="unknown";function vh(e){ld=e}function ud(){const e=Math.random().toString(36).substring(2,16),t=Math.random().toString(36).substring(2,16),r=Date.now().toString(36);return`id_${e+t+r}`}const lw=(e,t,r)=>{var n,s,a,o,i,c,l,u,d;return{spotVersion:wh,partner:e.partner,adapter:e.adapter,cosigner:e.cosigner,executor:e.executor,fee:e.fee,reactor:e.reactor,refinery:e.refinery,repermit:e.repermit,router:e.router,type:e.type,wm:e.wm,chainName:((n=e.twapConfig)==null?void 0:n.chainName)||"",chainId:r||0,twapVersion:((s=e.twapConfig)==null?void 0:s.twapVersion)||0,twapAddress:((a=e.twapConfig)==null?void 0:a.twapAddress)||"",lensAddress:((o=e.twapConfig)==null?void 0:o.lensAddress)||"",bidDelaySeconds:((i=e.twapConfig)==null?void 0:i.bidDelaySeconds)||0,minChunkSizeUsd:t,name:((c=e.twapConfig)==null?void 0:c.name)||"",exchangeAddress:((l=e.twapConfig)==null?void 0:l.exchangeAddress)||"",exchangeType:((u=e.twapConfig)==null?void 0:u.exchangeType)||"",pathfinderKey:((d=e.twapConfig)==null?void 0:d.pathfinderKey)||""}},Eh=async e=>{try{await fetch(cw,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)}).then()}catch(t){console.error("Failed to send BI",t)}};class uw{constructor(){Yu(this,"timeout");Yu(this,"config");Yu(this,"data",{_id:ud()})}async updateAndSend(t={},r=!1,n){try{this.data={...this.data,...t},r?(await Eh(this.data),n==null||n()):(clearTimeout(this.timeout),this.timeout=setTimeout(()=>{Eh(this.data),n==null||n()},1e3))}catch(s){console.error("Failed to update and send BI",s)}}onCancelOrderRequest(t,r){this.updateAndSend({cancelOrderIdsV1:r===1?t:void 0,cancelOrderIdsV2:r===2?t:void 0,action:"cancel order",cancelOrderSuccess:!1,cancelOrderTxHash:void 0,actionError:void 0})}onCancelOrderSuccess(t){this.updateAndSend({cancelOrderTxHash:t,cancelOrderSuccess:!0})}onCancelOrderError(t){this.onTxError(t)}onWrapSuccess(t){this.updateAndSend({wrapTxHash:t})}onWrapRequest(){this.updateAndSend({action:"wrap"})}onWrapError(t){this.onTxError(t)}onApproveRequest(){this.updateAndSend({action:"approve"})}onApproveSuccess(t){this.updateAndSend({approvalTxHash:t})}onApproveError(t){this.onTxError(t)}onCrash(t){var r;this.updateAndSend({action:"crash",actionError:((r=t==null?void 0:t.message)==null?void 0:r.toLowerCase())||(t==null?void 0:t.toLowerCase())})}onTxError(t){var n;const r=((n=t==null?void 0:t.message)==null?void 0:n.toLowerCase())||(t==null?void 0:t.toLowerCase());this.updateAndSend({actionError:r})}onRequestOrder({account:t,chainId:r,module:n,srcToken:s,dstToken:a,fromTokenAmount:o,srcChunkAmount:i,minDstAmountOutPerTrade:c="",triggerPricePerTrade:l="",deadline:u,fillDelay:d,slippage:f,isMarketOrder:m}){const y=j(o).div(i).integerValue(j.ROUND_FLOOR).toNumber();this.updateAndSend({toTokenAddress:a.address,toTokenSymbol:a.symbol,fromTokenAddress:s.address,fromTokenSymbol:s.symbol,fromTokenAmount:o,chunksAmount:y,srcChunkAmount:i,minDstAmountOutPerTrade:c,triggerPricePerTrade:l,deadline:u,fillDelay:d,slippage:f,chainId:r,walletAddress:t,module:n,orderType:m?"market":"limit",actionError:void 0})}onSignOrderRequest(t){this.updateAndSend({action:"sign order",order:t})}onSignOrderError(t){this.onTxError(t)}onSignOrderSuccess(t){this.updateAndSend({action:"sign order",signature:t})}init(t,r,n){var s;this.config=t,n!==((s=this.data)==null?void 0:s.chainId)&&(this.data={_id:ud(),action:"module-import",uiVersion:ld,...lw(t,r,n),origin:window.location.origin},this.updateAndSend(this.data))}onCreateOrderError(t){this.onTxError(t)}onCreateOrderRequest(){this.updateAndSend({action:"create order"})}async onCreateOrderSuccess(t){this.updateAndSend({orderHash:t,orderSuccess:!0},void 0,()=>{this.data={_id:ud(),action:"reset",uiVersion:ld,origin:this.data.origin,spotVersion:wh,partner:this.data.partner,adapter:this.data.adapter,cosigner:this.data.cosigner,executor:this.data.executor,fee:this.data.fee,reactor:this.data.reactor,refinery:this.data.refinery,repermit:this.data.repermit,router:this.data.router,type:this.data.type,wm:this.data.wm,chainName:this.data.chainName||"",chainId:this.data.chainId||0,twapVersion:this.data.twapVersion||0,twapAddress:this.data.twapAddress||"",lensAddress:this.data.lensAddress||"",bidDelaySeconds:this.data.bidDelaySeconds||0,minChunkSizeUsd:this.data.minChunkSizeUsd||0,name:this.data.name||"",exchangeAddress:this.data.exchangeAddress||"",exchangeType:this.data.exchangeType||"",pathfinderKey:this.data.pathfinderKey||""}})}onLoad(){this.updateAndSend({action:"module-import",origin:window.location.origin})}}const dt=new uw,dw=e=>{var s;const t=j(e.order.witness.output.limit||0).gt(1),r=j(e.order.witness.output.stop||0).gt(0),n=((s=e.metadata.chunks)==null?void 0:s.length)||j(e.order.witness.input.maxAmount).div(j(e.order.witness.input.amount)).toNumber();return r&&t?ut.TRIGGER_PRICE_LIMIT:r?ut.TRIGGER_PRICE_MARKET:!t&&n<=1?ut.TWAP_MARKET:n>=1&&t?ut.TWAP_LIMIT:t?ut.LIMIT:ut.TWAP_MARKET},pw=e=>{var s;const t=((s=e.metadata.chunks)==null?void 0:s.filter(a=>a.status==="success").length)||0,r=e.metadata.expectedChunks||0,n=j(t).dividedBy(r).toNumber();return n>=.99?100:n<=0?0:Number((n*100).toFixed(2))},fw=(e,t)=>e.metadata.status==="completed"||t>=99?lt.Completed:["pending","eligible"].includes(e.metadata.status)?lt.Open:e.metadata.description.toLowerCase()==="cancelled by contract"?lt.Canceled:lt.Expired,mw=e=>{var r;return(((r=e.metadata.chunks)==null?void 0:r.filter(n=>n.status==="success"))||[]).map(n=>({inAmount:n.inAmount,outAmount:n.outAmount,timestamp:new Date(n.timestamp).getTime(),txHash:n.txHash}))},hw=(e,t)=>{var n;const r=e.length;return r>=t&&((n=e[r-1])==null?void 0:n.timestamp)||0},kh=e=>{const t=pw(e),r=Number(e.order.witness.output.limit)===1?"":e.order.witness.output.limit,n=e.metadata.expectedChunks||1,s=mw(e);return{id:e.hash,hash:e.hash,version:2,type:dw(e),maker:e.order.witness.swapper,progress:t,srcAmountFilled:s.reduce((a,o)=>a.plus(o.inAmount),new j(0)).toFixed()||"",dstAmountFilled:s.reduce((a,o)=>a.plus(o.outAmount),new j(0)).toFixed()||"",fills:s,srcTokenAddress:e.order.witness.input.token,dstTokenAddress:e.order.witness.output.token,orderDollarValueIn:e.metadata.displayOnlyInputTokenPriceUSD?j(e.metadata.displayOnlyInputTokenPriceUSD).toFixed(6):"",fillDelay:e.order.witness.epoch*1e3,deadline:Number(e.order.deadline)*1e3,createdAt:new Date(e.timestamp).getTime(),srcAmount:e.order.witness.input.maxAmount,dstMinAmountPerTrade:r,triggerPricePerTrade:j(e.order.witness.output.stop||0).isZero()?"":e.order.witness.output.stop,dstMinAmountTotal:j(r).multipliedBy(n).toString(),srcAmountPerTrade:e.order.witness.input.amount,totalTradesAmount:n,isMarketPrice:j(r||0).lte(1),chainId:e.order.witness.chainid,filledOrderTimestamp:hw(s,n),status:fw(e,t),rawOrder:e}},bw=async({chainId:e,signal:t,account:r})=>r?(await(await fetch(`${sd()}/orders?swapper=${r}&chainId=${e}`,{signal:t})).json()).orders.map(kh):[],Ch=async(e,t)=>{try{const r={signature:t,order:e,status:"pending"};console.log("body",r),dt.onCreateOrderRequest();const s=await(await fetch(`${sd()}/orders/new`,{method:"POST",body:JSON.stringify(r)})).json();if(!s.success)throw new Error(`error:${s.message}, code:${s.code}`);const a=kh(s.signedOrder);return dt.onCreateOrderSuccess(a.id),a}catch(r){throw dt.onCreateOrderError(r),console.error(r),r}},yn=(e,t)=>e&&e.length?e.map(t||(r=>`${r}`)):void 0,yw=e=>{if(e)return Gm[e]},dd=async({chainId:e,buildQuery:t,extractResults:r,signal:n,retries:s=1,limit:a=1e3,page:o})=>{const i=yw(e);if(!i)throw new kw;const c=async d=>{let f=0;for(;f<=s;)try{const m=await fetch(i,{method:"POST",body:JSON.stringify({query:d}),signal:n,headers:{"Content-Type":"application/json"}});if(!m.ok)throw new Error(`HTTP error: ${m.status}`);const y=await m.json();if(y.errors)throw new Error(y.errors[0].message);return r(y)}catch(m){if(f===s)throw m;await new Promise(y=>setTimeout(y,500*2**f)),f++}return[]};let l=0;const u=[];if(o!==void 0){const d=t(o,a);try{return await c(d)}catch{console.warn(`Page ${o} failed, retrying one final time...`);try{return await c(d)}catch{return[]}}}for(;;){const d=t(l,a);let f;try{f=await c(d)}catch{console.warn(`Page ${l} failed, retrying one final time...`);try{f=await c(d)}catch{return u}}if(u.push(...f),f.length<a)break;l++}return u},Th=e=>e.map(t=>({inAmount:t.srcAmountIn,outAmount:t.dstAmountOut,timestamp:t.timestamp,txHash:t.transactionHash})),Sh=(e,t)=>{const r=j(e||0).gt(1);return!r&&t===1?ut.TWAP_MARKET:t>1&&r?ut.TWAP_LIMIT:r?ut.LIMIT:ut.TWAP_MARKET},gw=(e,t,r,n)=>{var f;const s=Th(r||[]),a=new j(e.ask_srcAmount||0).div(e.ask_srcBidAmount).integerValue(j.ROUND_FLOOR).toNumber(),i=(r==null?void 0:r.length)===a?(f=r==null?void 0:r[(r==null?void 0:r.length)-1])==null?void 0:f.timestamp:void 0,c=s.reduce((m,y)=>m.plus(y.inAmount),new j(0)).toFixed(),l=s.reduce((m,y)=>m.plus(y.outAmount),new j(0)).toFixed(),u=Ah(e.ask_srcAmount,c),d=Sh(e.ask_dstMinAmount,a);return{version:1,id:e.Contract_id.toString(),hash:"",type:Sh(e.ask_dstMinAmount,a),srcTokenAddress:e.ask_srcToken,dstTokenAddress:e.ask_dstToken,exchangeAddress:e.exchange,twapAddress:e.twapAddress,maker:e.maker,progress:u,dstAmountFilled:l,srcAmountFilled:c,orderDollarValueIn:j(e.dollarValueIn||0).toFixed(6),srcAmount:e.ask_srcAmount,dstMinAmountTotal:j(e.ask_dstMinAmount).multipliedBy(a).toString(),fills:s,fillDelay:e.ask_fillDelay,deadline:e.ask_deadline*1e3,createdAt:new Date(e.timestamp).getTime(),dstMinAmountPerTrade:j(e.ask_dstMinAmount).eq(1)?"":e.ask_dstMinAmount,triggerPricePerTrade:"",srcAmountPerTrade:e.ask_srcBidAmount,txHash:e.transactionHash,totalTradesAmount:a,isMarketPrice:[ut.TWAP_MARKET,ut.TRIGGER_PRICE_MARKET].includes(d),chainId:t,filledOrderTimestamp:i||0,status:n,rawOrder:e}},xw=e=>{var d;if(!e)return"";const t=yn(e.accounts,f=>`"${f.toLowerCase()}"`),r=yn($5(e.configs),f=>`"${f.toLowerCase()}"`),n=yn(e.inTokenSymbols,f=>`"${f.toUpperCase()}"`),s=yn(e.outTokenSymbols,f=>`"${f.toUpperCase()}"`),a=yn(e.inTokenAddresses,f=>`"${f.toLowerCase()}"`),o=yn(e.outTokenAddresses,f=>`"${f.toLowerCase()}"`),i=yn(e.transactionHashes,f=>`"${f.toLowerCase()}"`),c=yn(e.orderIds,f=>`"${f}"`),l=r!=null&&r.length?"":yn((d=e.configs)==null?void 0:d.map(f=>f.twapAddress),f=>`"${f.toLowerCase()}"`),u=e.minDollarValueIn;return[r?`exchange_in: [${r.join(", ")}]`:"",l?`twapAddress_in: [${l.join(", ")}]`:"",t?`maker_in: [${t.join(", ")}]`:"",i?`transactionHash_in: [${i.join(", ")}]`:"",c?`Contract_id_in: [${c.join(", ")}]`:"",u?`dollarValueIn_gte: ${u}`:"",n?`srcTokenSymbol_in: [${n.join(", ")}]`:"",s?`dstTokenSymbol_in: [${s.join(", ")}]`:"",a?`srcTokenAddress_in: [${a.join(", ")}]`:"",o?`dstTokenAddress_in: [${o.join(", ")}]`:"",e!=null&&e.startDate?`blockTimestamp_gte: ${e.startDate}`:"",e!=null&&e.endDate?`blockTimestamp_lte: ${e.endDate}`:"",(e==null?void 0:e.orderType)==="limit"?"ask_dstMinAmount_gt: 1":"",(e==null?void 0:e.orderType)==="market"?"ask_dstMinAmount_lte: 1":""].filter(Boolean).join(", ")};async function ww({chainId:e,signal:t,page:r,limit:n,filters:s}){const a=n||1e3,o=xw(s);return await dd({chainId:e,signal:t,limit:a,page:r,buildQuery:(c,l)=>`
|
|
1
|
+
(function(R,B){typeof exports=="object"&&typeof module<"u"?B(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],B):(R=typeof globalThis<"u"?globalThis:R||self,B(R.SpotReact={},R.jsxRuntime,R.React,R.ReactDOM))})(this,(function(R,B,M,ka){"use strict";var LW=Object.defineProperty;var B5=R=>{throw TypeError(R)};var zW=(R,B,M)=>B in R?LW(R,B,{enumerable:!0,configurable:!0,writable:!0,value:M}):R[B]=M;var Yu=(R,B,M)=>zW(R,typeof B!="symbol"?B+"":B,M),vm=(R,B,M)=>B.has(R)||B5("Cannot "+M);var N=(R,B,M)=>(vm(R,B,"read from private field"),M?M.call(R):B.get(R)),le=(R,B,M)=>B.has(R)?B5("Cannot add the same private member more than once"):B instanceof WeakSet?B.add(R):B.set(R,M),ee=(R,B,M,ka)=>(vm(R,B,"write to private field"),ka?ka.call(R,M):B.set(R,M),M),Ae=(R,B,M)=>(vm(R,B,"access private method"),M);var Ku=(R,B,M,ka)=>({set _(Xu){ee(R,B,Xu,M)},get _(){return N(R,B,ka)}});var dn,pa,f5,fa,gs,go,m5,xo,xs,wo,h5,ma,b5,ha,vo,Br,ba,Bt,wc,ya,Yr,Yn,y5,sr,De,vc,qt,ga,Eo,Gn,ws,Ec,ko,Co,xa,wa,vs,To,Ve,Tc,Em,km,Cm,Tm,Sm,Am,Pm,F5,g5,kc,pn,Yt,va,fn,Ss,x5,jn,Kr,Cc,w5,Vn,Es,ar,Wn,qn,Zu,Im,v5,mn,E5,ft,ks,Cs,So,Ao,Ts,Po,Io,k5;function Xu(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 xt=Xu(M),Dt={SpookySwap:{chainName:"ftm",chainId:250,twapVersion:4,twapAddress:"0xd3B290FEB04E353d1821bc0a12397FdEa9a846C0",lensAddress:"0x0221EfDF1Fd3212AF87F23cceB7693a65fAF1d7f",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SpookySwap",partner:"Orbs:TWAP:SpookySwap",exchangeAddress:"0xdF7CCd5fc7077E9de5f27a7b7bfDC837c82f8496",exchangeType:"ExchangeV2",pathfinderKey:""},SpookySwapSonic:{chainName:"sonic",chainId:146,twapVersion:4,twapAddress:"0x8963992816b4EafE5a22b7DB2A99513c18be9afA",lensAddress:"0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SpookySwapSonic",partner:"Orbs:TWAP:SpookySwap",exchangeAddress:"0x6699bE3aF75e5c1B807b1031dBde6dA9A67739F3",exchangeType:"ExchangeV2",pathfinderKey:""},QuickSwap:{chainName:"poly",chainId:137,twapVersion:4,twapAddress:"0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4",lensAddress:"0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"QuickSwap",partner:"Orbs:TWAP:QuickSwap",exchangeAddress:"0x8FCc245209bE85C49D738D0CE5613F74E5d91E86",exchangeType:"ParaswapExchange",pathfinderKey:"QuickSwap,QuickSwapV3"},QuickSwapBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"QuickSwap",partner:"Orbs:TWAP:QuickSwap",exchangeAddress:"0xb7a3d74895bfd3aff6780525e36d79fcf26a895f",exchangeType:"ExchangeV2",pathfinderKey:""},Chronos:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"Chronos",partner:"Orbs:TWAP:Chronos",exchangeAddress:"0x0178e50adAF3b925F27aC518FCd952CE7F9A3B36",exchangeType:"ExchangeV2",pathfinderKey:"Chronos Stable,Chronos Volatile,Chronos V3"},BaseSwap:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"BaseSwap",partner:"Orbs:TWAP:BaseSwap",exchangeAddress:"0xAca3155c17530C4aA96746F226fcC049658490d2",exchangeType:"ExchangeV2",pathfinderKey:"BaseSwap,BaseSwapX"},Arbidex:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"Arbidex",partner:"Orbs:TWAP:Arbidex",exchangeAddress:"0x49d21052f4695d16C7cce6eF561301Aa4d840420",exchangeType:"ExchangeV2",pathfinderKey:"Arbidex Classic,Arbidex Quantum"},Thena:{chainName:"bsc",chainId:56,twapVersion:4,twapAddress:"0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994",lensAddress:"0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"Thena",partner:"Orbs:TWAP:Thena",exchangeAddress:"0x2B2fABDbfa4a15da0d351F947C14F4520db0bDc1",exchangeType:"ExchangeV2",pathfinderKey:"43,47"},PancakeSwap:{chainName:"bsc",chainId:56,twapVersion:4,twapAddress:"0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994",lensAddress:"0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0x1A2bb6B75D58b740d88413ef4840D6fa3F637940",exchangeType:"P2Exchange",pathfinderKey:""},PancakeSwapArbitrum:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0xb37cB9A058c03081Ae6EF934313588cD53d408e7",exchangeType:"P2Exchange",pathfinderKey:""},PancakeSwapBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0xb37cB9A058c03081Ae6EF934313588cD53d408e7",exchangeType:"P2Exchange",pathfinderKey:""},PancakeSwapLinea:{chainName:"linea",chainId:59144,twapVersion:4,twapAddress:"0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78",lensAddress:"0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:100,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0xb37cB9A058c03081Ae6EF934313588cD53d408e7",exchangeType:"P2Exchange",pathfinderKey:""},Lynex:{chainName:"linea",chainId:59144,twapVersion:4,twapAddress:"0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78",lensAddress:"0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:100,name:"Lynex",partner:"Orbs:TWAP:Lynex",exchangeAddress:"0x04C06C96d7D19977156016DD408B5992af0570a2",exchangeType:"ExchangeV2",pathfinderKey:"19,18"},SyncSwap:{chainName:"zkSync",chainId:324,twapVersion:4,twapAddress:"0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68",lensAddress:"0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9",takers:["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC","0xBE452F03Be354CAC397C3F0c8397672067D44531"],bidDelaySeconds:60,minChunkSizeUsd:100,name:"SyncSwap",partner:"Orbs:TWAP:SyncSwap",exchangeAddress:"0x422623a40c42f026Ed33A9910078Aa843FD66e27",exchangeType:"ExchangeV2",pathfinderKey:"2,3"},Retro:{chainName:"poly",chainId:137,twapVersion:4,twapAddress:"0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4",lensAddress:"0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"Retro",partner:"Orbs:TWAP:Retro",exchangeAddress:"0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F",exchangeType:"ExchangeV2",pathfinderKey:"retro,retro-v3"},SushiArb:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"SushiArb",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad",exchangeType:"ExchangeV2",pathfinderKey:""},SushiBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"SushiBase",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad",exchangeType:"ExchangeV2",pathfinderKey:""},SushiEth:{chainName:"eth",chainId:1,twapVersion:4,twapAddress:"0xb1ed8BCAD1EaC8a1DF0764700472391800D12946",lensAddress:"0x0967f448c4d4dbd14c355E635AE9CbF68cc44A60",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:200,name:"SushiEth",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad",exchangeType:"ExchangeV2",pathfinderKey:""},SushiKatana:{chainName:"katana",chainId:747474,twapVersion:4,twapAddress:"0xf2d96E7BE676153d202e1453804E2749923C7c5b",lensAddress:"0x1579EED0527781B1A748043AA1f59a3858Ace4a7",takers:["0xF74437A3Fc45a518640828E5D6A3E8c9A9BbDC3a","0x07A6C715063e94c0D95e809efefFCbF4EBEdfD55"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"SushiKatana",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x92209481507e6B2d14C9b5b70Ed287024177220E",exchangeType:"ExchangeV2",pathfinderKey:""},DragonSwap:{chainName:"sei",chainId:1329,twapVersion:4,twapAddress:"0xde737dB24548F8d41A4a3Ca2Bac8aaaDc4DBA099",lensAddress:"0xa1376f2Bb80D3cF6c2D8ebEf34b3d122e9af4020",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"DragonSwap",partner:"Orbs:TWAP:DragonSwap",exchangeAddress:"0xf2F933FafbDB97062CfA3c447ff373e76A90Efd6",exchangeType:"ExchangeV2",pathfinderKey:""},TeaFi:{chainName:"poly",chainId:137,twapVersion:4,twapAddress:"0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4",lensAddress:"0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"TeaFi",partner:"Orbs:TWAP:TeaFi",exchangeAddress:"0xE9D3b4Cf5B0CC392e78C1a4DD9885D449EEF9793",exchangeType:"ParaswapExchange",pathfinderKey:"AaveV2,AaveV3,AaveV3Stata,AngleStakedStableEUR,AngleStakedStableUSD,ApeSwap,AugustusRFQ,BalancerV2,ComethSwap,CurveV1,CurveV1Factory,CurveV1StableNg,CurveV2,Dfyn,DODOV2,Dystopia,Hashflow,IronV2,JarvisV6,KyberDmm,QuickSwap,QuickSwapV3,Retro,SushiSwap,SushiSwapV3,SwaapV2,Synapse,UniswapV2,UniswapV3,WaultFinance,Wmatic,WooFiV2,wUSDM"},SparkDEX:{chainName:"flare",chainId:14,twapVersion:4,twapAddress:"0x9D70B0b90915Bb8b9bdAC7e6a7e6435bBF1feC4D",lensAddress:"0xf2d96E7BE676153d202e1453804E2749923C7c5b",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SparkDEX",partner:"Orbs:TWAP:SparkDEX",exchangeAddress:"0xe59c53C76bB7EEc01401A18fA8215B94bC65Bf56",exchangeType:"P2Exchange"},Ramses:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"Ramses",partner:"Orbs:TWAP:Ramses",exchangeAddress:"0x8FCc245209bE85C49D738D0CE5613F74E5d91E86",exchangeType:"ParaswapExchange",pathfinderKey:""},SwapX:{chainName:"sonic",chainId:146,twapVersion:4,twapAddress:"0x8963992816b4EafE5a22b7DB2A99513c18be9afA",lensAddress:"0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SwapX",partner:"Orbs:TWAP:SwapX",exchangeAddress:"0xDA902994b7F7a1ecDd8De02E4a17dbFF2E6F67b7",exchangeType:"ExchangeV2",pathfinderKey:""},H2Finance:{chainName:"cronos-zkevm",chainId:388,twapVersion:4,twapAddress:"0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68",lensAddress:"0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9",takers:["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC","0xBE452F03Be354CAC397C3F0c8397672067D44531"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"H2Finance",partner:"Orbs:TWAP:H2Finance",exchangeAddress:"0x2f1f10dc311722Be609e6B427bF3FBac6e44093B",exchangeType:"ExchangeV2"},Shadow:{chainName:"sonic",chainId:146,twapVersion:4,twapAddress:"0x8963992816b4EafE5a22b7DB2A99513c18be9afA",lensAddress:"0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"Shadow",partner:"Orbs:TWAP:Shadow",exchangeAddress:"0x69e3c891450161b7BF27f181eE85E7bAE69E5b07",exchangeType:"ExchangeV2"},Kodiak:{chainName:"berachain",chainId:80094,twapVersion:4,twapAddress:"0xD13609A8ace04D11Ea2FFE176B69dF77C6d9375E",lensAddress:"0xA0b07F9a11dFb01388149abBdbc5B4f2196600AB",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"Kodiak",partner:"Orbs:TWAP:Kodiak",exchangeAddress:"0x69B7aE1250B8d1309954CaD65b6607ae478Ec6eE",exchangeType:"ExchangeV2"},OmniBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"OmniBase",partner:"Orbs:TWAP:OmniBase",exchangeAddress:"0x54435FcFDF3A08150Ed799b6EF472A20a432303F",exchangeType:"ParaswapExchange"},OmniArb:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"OmniArb",partner:"Orbs:TWAP:OmniArb",exchangeAddress:"0xF0607785424d342Cceb33E708f4579CA97a3b392",exchangeType:"ParaswapExchange"},BlackholeAvax:{chainName:"avax",chainId:43114,twapVersion:4,twapAddress:"0xf77Ad005aBF7e31f669ce89a6568B2f39Ca92cDe",lensAddress:"0x48466B82Ce1575c5c9eCa168ac1090048dD47fA3",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"BlackholeAvax",partner:"Orbs:TWAP:BlackholeAvax",exchangeAddress:"0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F",exchangeType:"ExchangeV2"},NewEraBnb:{chainName:"bsc",chainId:56,twapVersion:4,twapAddress:"0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994",lensAddress:"0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"NewEraBnb",partner:"Orbs:TWAP:NewEraBnb",exchangeAddress:"0xA22D7Df24d9Ea4D4EF6dC96b2204bd550430eC42",exchangeType:"ExchangeV2"}},U5=[{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}],O5=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],D5=JSON.parse('[{"inputs":[{"internalType":"address","name":"_iweth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"uint32","name":"slippagePercent","type":"uint32"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"name":"OrderBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"OrderCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"address","name":"taker","type":"address"}],"name":"OrderCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"}],"name":"OrderCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"address","name":"taker","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcAmountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstAmountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"srcFilledAmount","type":"uint256"}],"name":"OrderFilled","type":"event"},{"inputs":[],"name":"MIN_BID_DELAY_SECONDS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_OUTBID_PERCENT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERCENT_BASE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STALE_BID_SECONDS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_CANCELED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_COMPLETED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"_ask","type":"tuple"}],"name":"ask","outputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"uint32","name":"slippagePercent","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"bid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"book","outputs":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"fill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"iweth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"length","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"makerOrders","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"order","outputs":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"internalType":"struct OrderLib.Order","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maker","type":"address"}],"name":"orderIdsByMaker","outputs":[{"internalType":"uint64[]","name":"","type":"uint64[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"prune","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"status","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]'),_5=[{type:"constructor",inputs:[],stateMutability:"nonpayable"},{type:"function",name:"DOMAIN_SEPARATOR",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"cancel",inputs:[{name:"digests",type:"bytes32[]",internalType:"bytes32[]"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"eip712Domain",inputs:[],outputs:[{name:"fields",type:"bytes1",internalType:"bytes1"},{name:"name",type:"string",internalType:"string"},{name:"version",type:"string",internalType:"string"},{name:"chainId",type:"uint256",internalType:"uint256"},{name:"verifyingContract",type:"address",internalType:"address"},{name:"salt",type:"bytes32",internalType:"bytes32"},{name:"extensions",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"view"},{type:"function",name:"hashTypedData",inputs:[{name:"structHash",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"digest",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"repermitWitnessTransferFrom",inputs:[{name:"permit",type:"tuple",internalType:"struct RePermitLib.RePermitTransferFrom",components:[{name:"permitted",type:"tuple",internalType:"struct RePermitLib.TokenPermissions",components:[{name:"token",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}]},{name:"nonce",type:"uint256",internalType:"uint256"},{name:"deadline",type:"uint256",internalType:"uint256"}]},{name:"request",type:"tuple",internalType:"struct RePermitLib.TransferRequest",components:[{name:"to",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}]},{name:"signer",type:"address",internalType:"address"},{name:"witness",type:"bytes32",internalType:"bytes32"},{name:"witnessTypeString",type:"string",internalType:"string"},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"spent",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"event",name:"Cancel",inputs:[{name:"signer",type:"address",indexed:!0,internalType:"address"},{name:"digest",type:"bytes32",indexed:!1,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"EIP712DomainChanged",inputs:[],anonymous:!1},{type:"event",name:"Spend",inputs:[{name:"signer",type:"address",indexed:!0,internalType:"address"},{name:"permitHash",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"token",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!1,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"},{name:"totalSpent",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"error",name:"Canceled",inputs:[]},{type:"error",name:"Expired",inputs:[]},{type:"error",name:"InsufficientAllowance",inputs:[]},{type:"error",name:"InvalidShortString",inputs:[]},{type:"error",name:"InvalidSignature",inputs:[]},{type:"error",name:"SafeERC20FailedOperation",inputs:[{name:"token",type:"address",internalType:"address"}]},{type:"error",name:"StringTooLong",inputs:[{name:"str",type:"string",internalType:"string"}]}],Um=U5,M5=O5,Om=_5,Dm=D5;var ge=(e=>(e.TWAP="TWAP",e.LIMIT="LIMIT",e.STOP_LOSS="STOP_LOSS",e.TAKE_PROFIT="TAKE_PROFIT",e))(ge||{}),lt=(e=>(e.Open="OPEN",e.Canceled="CANCELED",e.Completed="COMPLETED",e.Expired="EXPIRED",e))(lt||{}),Gt=(e=>(e[e.Minutes=6e4]="Minutes",e[e.Hours=36e5]="Hours",e[e.Weeks=6048e5]="Weeks",e[e.Days=864e5]="Days",e[e.Months=2592e6]="Months",e[e.Years=31536e6]="Years",e))(Gt||{}),ut=(e=>(e.LIMIT="limit",e.TWAP_LIMIT="twap-limit",e.TWAP_MARKET="twap-market",e.TRIGGER_PRICE_MARKET="trigger-price-market",e.TRIGGER_PRICE_LIMIT="trigger-price-limit",e))(ut||{}),_m=(e=>(e.Arbidex="arbidex",e.Blackhole="blackhole",e.Chronos="chronos",e.Dragon="dragon",e.Kodiak="kodiak",e.Lynex="lynex",e.Nami="nami",e.Newera="newera",e.Omni="omni",e.Pancake="pancake",e.Quick="quick",e.Ramses="ramses",e.Shadow="shadow",e.Spark="spark",e.Spooky="spooky",e.Swapx="swapx",e.Teafi="teafi",e.Thena="thena",e.Yowie="yowie",e))(_m||{});const wt="0x0000000000000000000000000000000000000000",Ft={eth:{id:1,name:"Ethereum",shortname:"eth",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://eth.llamarpc.com",logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg",explorer:"https://etherscan.io",eip1559:!0},bsc:{id:56,name:"BinanceSmartChain",shortname:"bsc",native:{address:wt,symbol:"BNB",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"},wToken:{symbol:"WBNB",address:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"},publicRpcUrl:"https://bsc-dataseed.binance.org",logoUrl:"https://app.1inch.io/assets/images/network-logos/bsc_2.svg",explorer:"https://bscscan.com",eip1559:!1},poly:{id:137,name:"Polygon",shortname:"poly",native:{address:wt,symbol:"POL",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/64x64/28321.png"},wToken:{symbol:"WPOL",address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270.png"},publicRpcUrl:"https://polygon-rpc.com",logoUrl:"https://app.1inch.io/assets/images/network-logos/polygon.svg",explorer:"https://polygonscan.com",eip1559:!0},arb:{id:42161,name:"Arbitrum",shortname:"arb",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://arb1.arbitrum.io/rpc",logoUrl:"https://app.1inch.io/assets/images/network-logos/arbitrum.svg",explorer:"https://arbiscan.io",eip1559:!0},sei:{id:1329,name:"Sei",shortname:"sei",native:{address:wt,symbol:"SEI",decimals:18,logoUrl:"https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png"},wToken:{symbol:"WSEI",address:"0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://evm-rpc.sei-apis.com",logoUrl:"https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png",explorer:"https://seitrace.com",eip1559:!1},avax:{id:43114,name:"Avalanche",shortname:"avax",native:{address:wt,symbol:"AVAX",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/avalanche.svg"},wToken:{symbol:"WAVAX",address:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7.png"},publicRpcUrl:"https://api.avax.network/ext/bc/C/rpc",logoUrl:"https://app.1inch.io/assets/images/network-logos/avalanche.svg",explorer:"https://snowtrace.io",eip1559:!0},ftm:{id:250,name:"Fantom",shortname:"ftm",native:{address:wt,symbol:"FTM",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/fantom.svg"},wToken:{symbol:"WFTM",address:"0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0x4e15361fd6b4bb609fa63c81a2be19d873717870.png"},publicRpcUrl:"https://rpc.ftm.tools",logoUrl:"https://app.1inch.io/assets/images/network-logos/fantom.svg",explorer:"https://ftmscan.com",eip1559:!0},base:{id:8453,name:"Base",shortname:"base",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x4200000000000000000000000000000000000006",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://mainnet.base.org",logoUrl:"https://app.1inch.io/assets/images/network-logos/base.svg",explorer:"https://basescan.org",eip1559:!1},linea:{id:59144,name:"Linea",shortname:"linea",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://rpc.linea.build",logoUrl:"https://lineascan.build/images/logo.svg",explorer:"https://lineascan.build",eip1559:!1},zksync:{id:324,name:"zksync",shortname:"zksync",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://mainnet.era.zksync.io",logoUrl:"https://raw.githubusercontent.com/matter-labs/zksync/0a4ca2145a0c95b5bafa84c2f095c644907a8825/zkSyncLogo.svg",explorer:"https://explorer.zksync.io/",eip1559:!0},zkevm:{id:1101,name:"zkevm",shortname:"zkevm",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://zkevm-rpc.com",logoUrl:"https://user-images.githubusercontent.com/18598517/235932702-bc47eae5-d672-4dd9-9da2-8ea8f51a93f3.png",explorer:"https://zkevm.polygonscan.com/",eip1559:!0},manta:{id:169,name:"manta",shortname:"manta",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_manta.jpg"},wToken:{symbol:"WETH",address:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://pacific-rpc.manta.network/http",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_manta.jpg",explorer:"https://manta.socialscan.io/",eip1559:!0},blast:{id:81457,name:"blast",shortname:"blast",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_blast"},wToken:{symbol:"WETH",address:"0x4300000000000000000000000000000000000004",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://rpc.ankr.com/blast",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_blast",explorer:"https://blastscan.io/",eip1559:!0},sonic:{id:146,name:"sonic",shortname:"sonic",native:{address:wt,symbol:"S",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_sonic"},wToken:{symbol:"WS",address:"0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_sonic"},publicRpcUrl:"https://rpc.soniclabs.com",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_sonic",explorer:"https://www.sonicscan.org/",eip1559:!0},scroll:{id:534352,name:"scroll",shortname:"scroll",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_scroll"},wToken:{symbol:"WETH",address:"0x5300000000000000000000000000000000000004",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://scroll-rpc.publicnode.com",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_scroll",explorer:"https://scrollscan.com/",eip1559:!0},zircuit:{id:48900,name:"Zircuit",shortname:"zircuit",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x4200000000000000000000000000000000000006",decimals:18,logoUrl:"hhttps://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://zircuit-mainnet.drpc.org",logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg",explorer:"https://explorer.zircuit.com/",eip1559:!0},flare:{id:14,name:"flare",shortname:"flare",native:{address:wt,symbol:"FLR",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48"},wToken:{symbol:"WFLR",address:"0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d",decimals:18,logoUrl:"https://res.cloudinary.com/sparkdex/image/upload/q_100/v1/website-assets/coins/wflr?_a=DATAg1AAZAA0"},publicRpcUrl:"https://flare.network",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48",explorer:"https://flarescan.com",eip1559:!0},cronosZkEvm:{id:388,name:"Cronos zkEVM",shortname:"cronosZkEvm",native:{address:"0x000000000000000000000000000000000000800a",symbol:"zkCRO",decimals:18,logoUrl:"https://cryptologos.cc/logos/cronos-cro-logo.png"},wToken:{symbol:"wzkCRO",address:"0xC1bF55EE54E16229d9b369a5502Bfe5fC9F20b6d",decimals:18,logoUrl:"https://cryptologos.cc/logos/cronos-cro-logo.png"},publicRpcUrl:"https://rpc.zkevm.cronos.org",logoUrl:"https://cryptologos.cc/logos/cronos-cro-logo.png",explorer:"https://explorer.zkevm.cronos.org",eip1559:!0},katana:{id:747474,name:"Katana",shortname:"katana",native:{address:wt,symbol:"ETH",decimals:18,logoUrl:"https://katana.network/assets/katana-logo.svg"},wToken:{symbol:"WETH",address:"0x4200000000000000000000000000000000000006",decimals:18,logoUrl:"https://katana.network/assets/weth-logo.svg"},publicRpcUrl:"https://rpc.katana.network",logoUrl:"https://katana.network/assets/katana-logo.svg",explorer:"https://explorer.katana.garden",eip1559:!0},bera:{id:80094,name:"Bera",shortname:"bera",native:{address:wt,symbol:"BERA",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/24647.png"},wToken:{symbol:"WBERA",address:"0x6969696969696969696969696969696969696969",decimals:18,logoUrl:"https://berascan.com/token/images/wrappedbera_ofc_64.png"},publicRpcUrl:"wss://rpc.berachain-apis.com",logoUrl:"https://katana.network/assets/katana-logo.svg",explorer:"https://berascan.com",eip1559:!0},monad:{id:143,name:"Monad",shortname:"monad",native:{address:wt,symbol:"MONAD",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png"},wToken:{symbol:"WMON",address:"0x3bd359c1119da7da1d913d1c4d2b7c461115433a",decimals:18,logoUrl:"https://assets.coingecko.com/coins/images/70784/standard/wmon.png?1766028904"},publicRpcUrl:"https://monad-mainnet.drpc.org",logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png",explorer:"https://monad.network",eip1559:!0}};var N5=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Qu=Math.ceil,gr=Math.floor,Kt="[BigNumber Error] ",Mm=Kt+"Number primitive has more than 15 significant digits: ",Ur=1e14,xe=14,Ju=9007199254740991,ed=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Kn=1e7,At=1e9;function Nm(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,f=!1,m=1,y=0,g={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},E="0123456789abcdefghijklmnopqrstuvwxyz",v=!0;function w(h,b){var x,S,I,F,_,k,P,O,U=this;if(!(U instanceof w))return new w(h,b);if(b==null){if(h&&h._isBigNumber===!0){U.s=h.s,!h.c||h.e>d?U.c=U.e=null:h.e<u?U.c=[U.e=0]:(U.e=h.e,U.c=h.c.slice());return}if((k=typeof h=="number")&&h*0==0){if(U.s=1/h<0?(h=-h,-1):1,h===~~h){for(F=0,_=h;_>=10;_/=10,F++);F>d?U.c=U.e=null:(U.e=F,U.c=[h]);return}O=String(h)}else{if(!N5.test(O=String(h)))return n(U,O,k);U.s=O.charCodeAt(0)==45?(O=O.slice(1),-1):1}(F=O.indexOf("."))>-1&&(O=O.replace(".","")),(_=O.search(/e/i))>0?(F<0&&(F=_),F+=+O.slice(_+1),O=O.substring(0,_)):F<0&&(F=O.length)}else{if(it(b,2,E.length,"Base"),b==10&&v)return U=new w(h),L(U,o+U.e+1,i);if(O=String(h),k=typeof h=="number"){if(h*0!=0)return n(U,O,k,b);if(U.s=1/h<0?(O=O.slice(1),-1):1,w.DEBUG&&O.replace(/^0\.0*|\./,"").length>15)throw Error(Mm+h)}else U.s=O.charCodeAt(0)===45?(O=O.slice(1),-1):1;for(x=E.slice(0,b),F=_=0,P=O.length;_<P;_++)if(x.indexOf(S=O.charAt(_))<0){if(S=="."){if(_>F){F=P;continue}}else if(!I&&(O==O.toUpperCase()&&(O=O.toLowerCase())||O==O.toLowerCase()&&(O=O.toUpperCase()))){I=!0,_=-1,F=0;continue}return n(U,String(h),k,b)}k=!1,O=r(O,b,10,U.s),(F=O.indexOf("."))>-1?O=O.replace(".",""):F=O.length}for(_=0;O.charCodeAt(_)===48;_++);for(P=O.length;O.charCodeAt(--P)===48;);if(O=O.slice(_,++P)){if(P-=_,k&&w.DEBUG&&P>15&&(h>Ju||h!==gr(h)))throw Error(Mm+U.s*h);if((F=F-_-1)>d)U.c=U.e=null;else if(F<u)U.c=[U.e=0];else{if(U.e=F,U.c=[],_=(F+1)%xe,F<0&&(_+=xe),_<P){for(_&&U.c.push(+O.slice(0,_)),P-=xe;_<P;)U.c.push(+O.slice(_,_+=xe));_=xe-(O=O.slice(_)).length}else _-=P;for(;_--;O+="0");U.c.push(+O)}}else U.c=[U.e=0]}w.clone=Nm,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(h){var b,x;if(h!=null)if(typeof h=="object"){if(h.hasOwnProperty(b="DECIMAL_PLACES")&&(x=h[b],it(x,0,At,b),o=x),h.hasOwnProperty(b="ROUNDING_MODE")&&(x=h[b],it(x,0,8,b),i=x),h.hasOwnProperty(b="EXPONENTIAL_AT")&&(x=h[b],x&&x.pop?(it(x[0],-At,0,b),it(x[1],0,At,b),c=x[0],l=x[1]):(it(x,-At,At,b),c=-(l=x<0?-x:x))),h.hasOwnProperty(b="RANGE"))if(x=h[b],x&&x.pop)it(x[0],-At,-1,b),it(x[1],1,At,b),u=x[0],d=x[1];else if(it(x,-At,At,b),x)u=-(d=x<0?-x:x);else throw Error(Kt+b+" cannot be zero: "+x);if(h.hasOwnProperty(b="CRYPTO"))if(x=h[b],x===!!x)if(x)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=x;else throw f=!x,Error(Kt+"crypto unavailable");else f=x;else throw Error(Kt+b+" not true or false: "+x);if(h.hasOwnProperty(b="MODULO_MODE")&&(x=h[b],it(x,0,9,b),m=x),h.hasOwnProperty(b="POW_PRECISION")&&(x=h[b],it(x,0,At,b),y=x),h.hasOwnProperty(b="FORMAT"))if(x=h[b],typeof x=="object")g=x;else throw Error(Kt+b+" not an object: "+x);if(h.hasOwnProperty(b="ALPHABET"))if(x=h[b],typeof x=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(x))v=x.slice(0,10)=="0123456789",E=x;else throw Error(Kt+b+" invalid: "+x)}else throw Error(Kt+"Object expected: "+h);return{DECIMAL_PLACES:o,ROUNDING_MODE:i,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:f,MODULO_MODE:m,POW_PRECISION:y,FORMAT:g,ALPHABET:E}},w.isBigNumber=function(h){if(!h||h._isBigNumber!==!0)return!1;if(!w.DEBUG)return!0;var b,x,S=h.c,I=h.e,F=h.s;e:if({}.toString.call(S)=="[object Array]"){if((F===1||F===-1)&&I>=-At&&I<=At&&I===gr(I)){if(S[0]===0){if(I===0&&S.length===1)return!0;break e}if(b=(I+1)%xe,b<1&&(b+=xe),String(S[0]).length==b){for(b=0;b<S.length;b++)if(x=S[b],x<0||x>=Ur||x!==gr(x))break e;if(x!==0)return!0}}}else if(S===null&&I===null&&(F===null||F===1||F===-1))return!0;throw Error(Kt+"Invalid BigNumber: "+h)},w.maximum=w.max=function(){return C(arguments,-1)},w.minimum=w.min=function(){return C(arguments,1)},w.random=(function(){var h=9007199254740992,b=Math.random()*h&2097151?function(){return gr(Math.random()*h)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(x){var S,I,F,_,k,P=0,O=[],U=new w(a);if(x==null?x=o:it(x,0,At),_=Qu(x/xe),f)if(crypto.getRandomValues){for(S=crypto.getRandomValues(new Uint32Array(_*=2));P<_;)k=S[P]*131072+(S[P+1]>>>11),k>=9e15?(I=crypto.getRandomValues(new Uint32Array(2)),S[P]=I[0],S[P+1]=I[1]):(O.push(k%1e14),P+=2);P=_/2}else if(crypto.randomBytes){for(S=crypto.randomBytes(_*=7);P<_;)k=(S[P]&31)*281474976710656+S[P+1]*1099511627776+S[P+2]*4294967296+S[P+3]*16777216+(S[P+4]<<16)+(S[P+5]<<8)+S[P+6],k>=9e15?crypto.randomBytes(7).copy(S,P):(O.push(k%1e14),P+=7);P=_/7}else throw f=!1,Error(Kt+"crypto unavailable");if(!f)for(;P<_;)k=b(),k<9e15&&(O[P++]=k%1e14);for(_=O[--P],x%=xe,_&&x&&(k=ed[xe-x],O[P]=gr(_/k)*k);O[P]===0;O.pop(),P--);if(P<0)O=[F=0];else{for(F=-1;O[0]===0;O.splice(0,1),F-=xe);for(P=1,k=O[0];k>=10;k/=10,P++);P<xe&&(F-=xe-P)}return U.e=F,U.c=O,U}})(),w.sum=function(){for(var h=1,b=arguments,x=new w(b[0]);h<b.length;)x=x.plus(b[h++]);return x},r=(function(){var h="0123456789";function b(x,S,I,F){for(var _,k=[0],P,O=0,U=x.length;O<U;){for(P=k.length;P--;k[P]*=S);for(k[0]+=F.indexOf(x.charAt(O++)),_=0;_<k.length;_++)k[_]>I-1&&(k[_+1]==null&&(k[_+1]=0),k[_+1]+=k[_]/I|0,k[_]%=I)}return k.reverse()}return function(x,S,I,F,_){var k,P,O,U,z,H,G,J,pe=x.indexOf("."),he=o,ie=i;for(pe>=0&&(U=y,y=0,x=x.replace(".",""),J=new w(S),H=J.pow(x.length-pe),y=U,J.c=b(hn(wr(H.c),H.e,"0"),10,I,h),J.e=J.c.length),G=b(x,S,I,_?(k=E,h):(k=h,E)),O=U=G.length;G[--U]==0;G.pop());if(!G[0])return k.charAt(0);if(pe<0?--O:(H.c=G,H.e=O,H.s=F,H=t(H,J,he,ie,I),G=H.c,z=H.r,O=H.e),P=O+he+1,pe=G[P],U=I/2,z=z||P<0||G[P+1]!=null,z=ie<4?(pe!=null||z)&&(ie==0||ie==(H.s<0?3:2)):pe>U||pe==U&&(ie==4||z||ie==6&&G[P-1]&1||ie==(H.s<0?8:7)),P<1||!G[0])x=z?hn(k.charAt(1),-he,k.charAt(0)):k.charAt(0);else{if(G.length=P,z)for(--I;++G[--P]>I;)G[P]=0,P||(++O,G=[1].concat(G));for(U=G.length;!G[--U];);for(pe=0,x="";pe<=U;x+=k.charAt(G[pe++]));x=hn(x,O,k.charAt(0))}return x}})(),t=(function(){function h(S,I,F){var _,k,P,O,U=0,z=S.length,H=I%Kn,G=I/Kn|0;for(S=S.slice();z--;)P=S[z]%Kn,O=S[z]/Kn|0,_=G*P+O*H,k=H*P+_%Kn*Kn+U,U=(k/F|0)+(_/Kn|0)+G*O,S[z]=k%F;return U&&(S=[U].concat(S)),S}function b(S,I,F,_){var k,P;if(F!=_)P=F>_?1:-1;else for(k=P=0;k<F;k++)if(S[k]!=I[k]){P=S[k]>I[k]?1:-1;break}return P}function x(S,I,F,_){for(var k=0;F--;)S[F]-=k,k=S[F]<I[F]?1:0,S[F]=k*_+S[F]-I[F];for(;!S[0]&&S.length>1;S.splice(0,1));}return function(S,I,F,_,k){var P,O,U,z,H,G,J,pe,he,ie,de,Fe,Q,ve,_e,Ge,ot,Se=S.s==I.s?1:-1,Ee=S.c,be=I.c;if(!Ee||!Ee[0]||!be||!be[0])return new w(!S.s||!I.s||(Ee?be&&Ee[0]==be[0]:!be)?NaN:Ee&&Ee[0]==0||!be?Se*0:Se/0);for(pe=new w(Se),he=pe.c=[],O=S.e-I.e,Se=F+O+1,k||(k=Ur,O=xr(S.e/xe)-xr(I.e/xe),Se=Se/xe|0),U=0;be[U]==(Ee[U]||0);U++);if(be[U]>(Ee[U]||0)&&O--,Se<0)he.push(1),z=!0;else{for(ve=Ee.length,Ge=be.length,U=0,Se+=2,H=gr(k/(be[0]+1)),H>1&&(be=h(be,H,k),Ee=h(Ee,H,k),Ge=be.length,ve=Ee.length),Q=Ge,ie=Ee.slice(0,Ge),de=ie.length;de<Ge;ie[de++]=0);ot=be.slice(),ot=[0].concat(ot),_e=be[0],be[1]>=k/2&&_e++;do{if(H=0,P=b(be,ie,Ge,de),P<0){if(Fe=ie[0],Ge!=de&&(Fe=Fe*k+(ie[1]||0)),H=gr(Fe/_e),H>1)for(H>=k&&(H=k-1),G=h(be,H,k),J=G.length,de=ie.length;b(G,ie,J,de)==1;)H--,x(G,Ge<J?ot:be,J,k),J=G.length,P=1;else H==0&&(P=H=1),G=be.slice(),J=G.length;if(J<de&&(G=[0].concat(G)),x(ie,G,de,k),de=ie.length,P==-1)for(;b(be,ie,Ge,de)<1;)H++,x(ie,Ge<de?ot:be,de,k),de=ie.length}else P===0&&(H++,ie=[0]);he[U++]=H,ie[0]?ie[de++]=Ee[Q]||0:(ie=[Ee[Q]],de=1)}while((Q++<ve||ie[0]!=null)&&Se--);z=ie[0]!=null,he[0]||he.splice(0,1)}if(k==Ur){for(U=1,Se=he[0];Se>=10;Se/=10,U++);L(pe,F+(pe.e=U+O*xe-1)+1,_,z)}else pe.e=O,pe.r=+z;return pe}})();function A(h,b,x,S){var I,F,_,k,P;if(x==null?x=i:it(x,0,8),!h.c)return h.toString();if(I=h.c[0],_=h.e,b==null)P=wr(h.c),P=S==1||S==2&&(_<=c||_>=l)?Ac(P,_):hn(P,_,"0");else if(h=L(new w(h),b,x),F=h.e,P=wr(h.c),k=P.length,S==1||S==2&&(b<=F||F<=c)){for(;k<b;P+="0",k++);P=Ac(P,F)}else if(b-=_+(S===2&&F>_),P=hn(P,F,"0"),F+1>k){if(--b>0)for(P+=".";b--;P+="0");}else if(b+=F-k,b>0)for(F+1==k&&(P+=".");b--;P+="0");return h.s<0&&I?"-"+P:P}function C(h,b){for(var x,S,I=1,F=new w(h[0]);I<h.length;I++)S=new w(h[I]),(!S.s||(x=As(F,S))===b||x===0&&F.s===b)&&(F=S);return F}function D(h,b,x){for(var S=1,I=b.length;!b[--I];b.pop());for(I=b[0];I>=10;I/=10,S++);return(x=S+x*xe-1)>d?h.c=h.e=null:x<u?h.c=[h.e=0]:(h.e=x,h.c=b),h}n=(function(){var h=/^(-?)0([xbo])(?=\w[\w.]*$)/i,b=/^([^.]+)\.$/,x=/^\.([^.]+)$/,S=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(F,_,k,P){var O,U=k?_:_.replace(I,"");if(S.test(U))F.s=isNaN(U)?null:U<0?-1:1;else{if(!k&&(U=U.replace(h,function(z,H,G){return O=(G=G.toLowerCase())=="x"?16:G=="b"?2:8,!P||P==O?H:z}),P&&(O=P,U=U.replace(b,"$1").replace(x,"0.$1")),_!=U))return new w(U,O);if(w.DEBUG)throw Error(Kt+"Not a"+(P?" base "+P:"")+" number: "+_);F.s=null}F.c=F.e=null}})();function L(h,b,x,S){var I,F,_,k,P,O,U,z=h.c,H=ed;if(z){e:{for(I=1,k=z[0];k>=10;k/=10,I++);if(F=b-I,F<0)F+=xe,_=b,P=z[O=0],U=gr(P/H[I-_-1]%10);else if(O=Qu((F+1)/xe),O>=z.length)if(S){for(;z.length<=O;z.push(0));P=U=0,I=1,F%=xe,_=F-xe+1}else break e;else{for(P=k=z[O],I=1;k>=10;k/=10,I++);F%=xe,_=F-xe+I,U=_<0?0:gr(P/H[I-_-1]%10)}if(S=S||b<0||z[O+1]!=null||(_<0?P:P%H[I-_-1]),S=x<4?(U||S)&&(x==0||x==(h.s<0?3:2)):U>5||U==5&&(x==4||S||x==6&&(F>0?_>0?P/H[I-_]:0:z[O-1])%10&1||x==(h.s<0?8:7)),b<1||!z[0])return z.length=0,S?(b-=h.e+1,z[0]=H[(xe-b%xe)%xe],h.e=-b||0):z[0]=h.e=0,h;if(F==0?(z.length=O,k=1,O--):(z.length=O+1,k=H[xe-F],z[O]=_>0?gr(P/H[I-_]%H[_])*k:0),S)for(;;)if(O==0){for(F=1,_=z[0];_>=10;_/=10,F++);for(_=z[0]+=k,k=1;_>=10;_/=10,k++);F!=k&&(h.e++,z[0]==Ur&&(z[0]=1));break}else{if(z[O]+=k,z[O]!=Ur)break;z[O--]=0,k=1}for(F=z.length;z[--F]===0;z.pop());}h.e>d?h.c=h.e=null:h.e<u&&(h.c=[h.e=0])}return h}function T(h){var b,x=h.e;return x===null?h.toString():(b=wr(h.c),b=x<=c||x>=l?Ac(b,x):hn(b,x,"0"),h.s<0?"-"+b:b)}return s.absoluteValue=s.abs=function(){var h=new w(this);return h.s<0&&(h.s=1),h},s.comparedTo=function(h,b){return As(this,new w(h,b))},s.decimalPlaces=s.dp=function(h,b){var x,S,I,F=this;if(h!=null)return it(h,0,At),b==null?b=i:it(b,0,8),L(new w(F),h+F.e+1,b);if(!(x=F.c))return null;if(S=((I=x.length-1)-xr(this.e/xe))*xe,I=x[I])for(;I%10==0;I/=10,S--);return S<0&&(S=0),S},s.dividedBy=s.div=function(h,b){return t(this,new w(h,b),o,i)},s.dividedToIntegerBy=s.idiv=function(h,b){return t(this,new w(h,b),0,1)},s.exponentiatedBy=s.pow=function(h,b){var x,S,I,F,_,k,P,O,U,z=this;if(h=new w(h),h.c&&!h.isInteger())throw Error(Kt+"Exponent not an integer: "+T(h));if(b!=null&&(b=new w(b)),k=h.e>14,!z.c||!z.c[0]||z.c[0]==1&&!z.e&&z.c.length==1||!h.c||!h.c[0])return U=new w(Math.pow(+T(z),k?h.s*(2-Sc(h)):+T(h))),b?U.mod(b):U;if(P=h.s<0,b){if(b.c?!b.c[0]:!b.s)return new w(NaN);S=!P&&z.isInteger()&&b.isInteger(),S&&(z=z.mod(b))}else{if(h.e>9&&(z.e>0||z.e<-1||(z.e==0?z.c[0]>1||k&&z.c[1]>=24e7:z.c[0]<8e13||k&&z.c[0]<=9999975e7)))return F=z.s<0&&Sc(h)?-0:0,z.e>-1&&(F=1/F),new w(P?1/F:F);y&&(F=Qu(y/xe+2))}for(k?(x=new w(.5),P&&(h.s=1),O=Sc(h)):(I=Math.abs(+T(h)),O=I%2),U=new w(a);;){if(O){if(U=U.times(z),!U.c)break;F?U.c.length>F&&(U.c.length=F):S&&(U=U.mod(b))}if(I){if(I=gr(I/2),I===0)break;O=I%2}else if(h=h.times(x),L(h,h.e+1,1),h.e>14)O=Sc(h);else{if(I=+T(h),I===0)break;O=I%2}z=z.times(z),F?z.c&&z.c.length>F&&(z.c.length=F):S&&(z=z.mod(b))}return S?U:(P&&(U=a.div(U)),b?U.mod(b):F?L(U,y,i,_):U)},s.integerValue=function(h){var b=new w(this);return h==null?h=i:it(h,0,8),L(b,b.e+1,h)},s.isEqualTo=s.eq=function(h,b){return As(this,new w(h,b))===0},s.isFinite=function(){return!!this.c},s.isGreaterThan=s.gt=function(h,b){return As(this,new w(h,b))>0},s.isGreaterThanOrEqualTo=s.gte=function(h,b){return(b=As(this,new w(h,b)))===1||b===0},s.isInteger=function(){return!!this.c&&xr(this.e/xe)>this.c.length-2},s.isLessThan=s.lt=function(h,b){return As(this,new w(h,b))<0},s.isLessThanOrEqualTo=s.lte=function(h,b){return(b=As(this,new w(h,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(h,b){var x,S,I,F,_=this,k=_.s;if(h=new w(h,b),b=h.s,!k||!b)return new w(NaN);if(k!=b)return h.s=-b,_.plus(h);var P=_.e/xe,O=h.e/xe,U=_.c,z=h.c;if(!P||!O){if(!U||!z)return U?(h.s=-b,h):new w(z?_:NaN);if(!U[0]||!z[0])return z[0]?(h.s=-b,h):new w(U[0]?_:i==3?-0:0)}if(P=xr(P),O=xr(O),U=U.slice(),k=P-O){for((F=k<0)?(k=-k,I=U):(O=P,I=z),I.reverse(),b=k;b--;I.push(0));I.reverse()}else for(S=(F=(k=U.length)<(b=z.length))?k:b,k=b=0;b<S;b++)if(U[b]!=z[b]){F=U[b]<z[b];break}if(F&&(I=U,U=z,z=I,h.s=-h.s),b=(S=z.length)-(x=U.length),b>0)for(;b--;U[x++]=0);for(b=Ur-1;S>k;){if(U[--S]<z[S]){for(x=S;x&&!U[--x];U[x]=b);--U[x],U[S]+=Ur}U[S]-=z[S]}for(;U[0]==0;U.splice(0,1),--O);return U[0]?D(h,U,O):(h.s=i==3?-1:1,h.c=[h.e=0],h)},s.modulo=s.mod=function(h,b){var x,S,I=this;return h=new w(h,b),!I.c||!h.s||h.c&&!h.c[0]?new w(NaN):!h.c||I.c&&!I.c[0]?new w(I):(m==9?(S=h.s,h.s=1,x=t(I,h,0,3),h.s=S,x.s*=S):x=t(I,h,0,m),h=I.minus(x.times(h)),!h.c[0]&&m==1&&(h.s=I.s),h)},s.multipliedBy=s.times=function(h,b){var x,S,I,F,_,k,P,O,U,z,H,G,J,pe,he,ie=this,de=ie.c,Fe=(h=new w(h,b)).c;if(!de||!Fe||!de[0]||!Fe[0])return!ie.s||!h.s||de&&!de[0]&&!Fe||Fe&&!Fe[0]&&!de?h.c=h.e=h.s=null:(h.s*=ie.s,!de||!Fe?h.c=h.e=null:(h.c=[0],h.e=0)),h;for(S=xr(ie.e/xe)+xr(h.e/xe),h.s*=ie.s,P=de.length,z=Fe.length,P<z&&(J=de,de=Fe,Fe=J,I=P,P=z,z=I),I=P+z,J=[];I--;J.push(0));for(pe=Ur,he=Kn,I=z;--I>=0;){for(x=0,H=Fe[I]%he,G=Fe[I]/he|0,_=P,F=I+_;F>I;)O=de[--_]%he,U=de[_]/he|0,k=G*O+U*H,O=H*O+k%he*he+J[F]+x,x=(O/pe|0)+(k/he|0)+G*U,J[F--]=O%pe;J[F]=x}return x?++S:J.splice(0,1),D(h,J,S)},s.negated=function(){var h=new w(this);return h.s=-h.s||null,h},s.plus=function(h,b){var x,S=this,I=S.s;if(h=new w(h,b),b=h.s,!I||!b)return new w(NaN);if(I!=b)return h.s=-b,S.minus(h);var F=S.e/xe,_=h.e/xe,k=S.c,P=h.c;if(!F||!_){if(!k||!P)return new w(I/0);if(!k[0]||!P[0])return P[0]?h:new w(k[0]?S:I*0)}if(F=xr(F),_=xr(_),k=k.slice(),I=F-_){for(I>0?(_=F,x=P):(I=-I,x=k),x.reverse();I--;x.push(0));x.reverse()}for(I=k.length,b=P.length,I-b<0&&(x=P,P=k,k=x,b=I),I=0;b;)I=(k[--b]=k[b]+P[b]+I)/Ur|0,k[b]=Ur===k[b]?0:k[b]%Ur;return I&&(k=[I].concat(k),++_),D(h,k,_)},s.precision=s.sd=function(h,b){var x,S,I,F=this;if(h!=null&&h!==!!h)return it(h,1,At),b==null?b=i:it(b,0,8),L(new w(F),h,b);if(!(x=F.c))return null;if(I=x.length-1,S=I*xe+1,I=x[I]){for(;I%10==0;I/=10,S--);for(I=x[0];I>=10;I/=10,S++);}return h&&F.e+1>S&&(S=F.e+1),S},s.shiftedBy=function(h){return it(h,-Ju,Ju),this.times("1e"+h)},s.squareRoot=s.sqrt=function(){var h,b,x,S,I,F=this,_=F.c,k=F.s,P=F.e,O=o+4,U=new w("0.5");if(k!==1||!_||!_[0])return new w(!k||k<0&&(!_||_[0])?NaN:_?F:1/0);if(k=Math.sqrt(+T(F)),k==0||k==1/0?(b=wr(_),(b.length+P)%2==0&&(b+="0"),k=Math.sqrt(+b),P=xr((P+1)/2)-(P<0||P%2),k==1/0?b="5e"+P:(b=k.toExponential(),b=b.slice(0,b.indexOf("e")+1)+P),x=new w(b)):x=new w(k+""),x.c[0]){for(P=x.e,k=P+O,k<3&&(k=0);;)if(I=x,x=U.times(I.plus(t(F,I,O,1))),wr(I.c).slice(0,k)===(b=wr(x.c)).slice(0,k))if(x.e<P&&--k,b=b.slice(k-3,k+1),b=="9999"||!S&&b=="4999"){if(!S&&(L(I,I.e+o+2,0),I.times(I).eq(F))){x=I;break}O+=4,k+=4,S=1}else{(!+b||!+b.slice(1)&&b.charAt(0)=="5")&&(L(x,x.e+o+2,1),h=!x.times(x).eq(F));break}}return L(x,x.e+o+1,i,h)},s.toExponential=function(h,b){return h!=null&&(it(h,0,At),h++),A(this,h,b,1)},s.toFixed=function(h,b){return h!=null&&(it(h,0,At),h=h+this.e+1),A(this,h,b)},s.toFormat=function(h,b,x){var S,I=this;if(x==null)h!=null&&b&&typeof b=="object"?(x=b,b=null):h&&typeof h=="object"?(x=h,h=b=null):x=g;else if(typeof x!="object")throw Error(Kt+"Argument not an object: "+x);if(S=I.toFixed(h,b),I.c){var F,_=S.split("."),k=+x.groupSize,P=+x.secondaryGroupSize,O=x.groupSeparator||"",U=_[0],z=_[1],H=I.s<0,G=H?U.slice(1):U,J=G.length;if(P&&(F=k,k=P,P=F,J-=F),k>0&&J>0){for(F=J%k||k,U=G.substr(0,F);F<J;F+=k)U+=O+G.substr(F,k);P>0&&(U+=O+G.slice(F)),H&&(U="-"+U)}S=z?U+(x.decimalSeparator||"")+((P=+x.fractionGroupSize)?z.replace(new RegExp("\\d{"+P+"}\\B","g"),"$&"+(x.fractionGroupSeparator||"")):z):U}return(x.prefix||"")+S+(x.suffix||"")},s.toFraction=function(h){var b,x,S,I,F,_,k,P,O,U,z,H,G=this,J=G.c;if(h!=null&&(k=new w(h),!k.isInteger()&&(k.c||k.s!==1)||k.lt(a)))throw Error(Kt+"Argument "+(k.isInteger()?"out of range: ":"not an integer: ")+T(k));if(!J)return new w(G);for(b=new w(a),O=x=new w(a),S=P=new w(a),H=wr(J),F=b.e=H.length-G.e-1,b.c[0]=ed[(_=F%xe)<0?xe+_:_],h=!h||k.comparedTo(b)>0?F>0?b:O:k,_=d,d=1/0,k=new w(H),P.c[0]=0;U=t(k,b,0,1),I=x.plus(U.times(S)),I.comparedTo(h)!=1;)x=S,S=I,O=P.plus(U.times(I=O)),P=I,b=k.minus(U.times(I=b)),k=I;return I=t(h.minus(x),S,0,1),P=P.plus(I.times(O)),x=x.plus(I.times(S)),P.s=O.s=G.s,F=F*2,z=t(O,S,F,i).minus(G).abs().comparedTo(t(P,x,F,i).minus(G).abs())<1?[O,S]:[P,x],d=_,z},s.toNumber=function(){return+T(this)},s.toPrecision=function(h,b){return h!=null&&it(h,1,At),A(this,h,b,2)},s.toString=function(h){var b,x=this,S=x.s,I=x.e;return I===null?S?(b="Infinity",S<0&&(b="-"+b)):b="NaN":(h==null?b=I<=c||I>=l?Ac(wr(x.c),I):hn(wr(x.c),I,"0"):h===10&&v?(x=L(new w(x),o+I+1,i),b=hn(wr(x.c),x.e,"0")):(it(h,2,E.length,"Base"),b=r(hn(wr(x.c),I,"0"),10,h,S,!0)),S<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 xr(e){var t=e|0;return e>0||e===t?t:t-1}function wr(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 As(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 it(e,t,r,n){if(e<t||e>r||e!==gr(e))throw Error(Kt+(n||"Argument")+(typeof e=="number"?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Sc(e){var t=e.c.length-1;return xr(e.e/xe)==t&&e.c[t]%2!=0}function Ac(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function hn(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 j=Nm();const bn=(e,t)=>{if(!e||!t)return"";const r=j(10).pow(e||0);return j(t).times(r).idiv(r).div(r).toFixed()},Pc=(e,t)=>!e||!t?"":z5(t).times(j(10).pow(e)).decimalPlaces(0).toFixed(0),L5=j(0);j(1),j(10),j(1e18);function Lm(e,t){return e instanceof j?e:e?j(e,t):L5}function Ps(e,t){return e==t||e.toLowerCase()==t.toLowerCase()}function z5(e,t,r){if(typeof e!="string")return Lm(e);const n=".",s=e.replace(new RegExp(`[^${n}\\d-]+`,"g"),"");return Lm(s)}const Is=e=>!!Vm.find(t=>Ps(t,e||""));function R5(e){return[Gt.Years,Gt.Months,Gt.Weeks,Gt.Days,Gt.Hours,Gt.Minutes].find(r=>r<=e)||Gt.Minutes}const Zn=e=>e?e.value*e.unit:0,H5=e=>!e||e==="NaN"?"0":j(e).decimalPlaces(0).toFixed(),Bs=e=>Object.values(Ft).find(t=>t.id===e),$5=e=>{if(!e)return;const t=e.map(a=>_t(a)),r=Object.entries(Wm).filter(([a])=>t.includes(a)).flatMap(([,a])=>a),n=e.map(a=>a.exchangeAddress),s=new Set([...n,...r].map(a=>a.toLowerCase()));return Array.from(s)},td=(e,t)=>e.version===1?(e.fillDelay||0)*1e3+id(t):(e.fillDelay||0)*1e3,Fo=e=>typeof window>"u"?null:new URLSearchParams(window.location.search).get(e),zm=e=>gh().filter(t=>t.name===e).map(t=>t.chainId),Rm="https://order-sink-dev.orbs.network",rd="https://order-sink.orbs.network";let nd;const G5=e=>{nd=e},sd=()=>{const e=Fo("env");return e==="prod"?rd:e==="dev"?Rm:nd==="prod"?rd:nd==="dev"?Rm:rd},j5=100,V5=1,Ic=300*1e3,Ca=365*24*60*60*1e3,ad=300*1e3,Hm=new Date(Ic).getMinutes(),$m=e=>`https://hub.orbs.network/api/private/project_cm7nb67z86nyr01z12gs0fxpf/subgraphs/orbs-twap-${e}/prod/gn`,vr="https://hub.orbs.network/api/apikey/subgraphs/id",Gm={[Ft.eth.id]:`${vr}/Bf7bvMYcJbDAvYWJmhMpHZ4cpFjqzkhK6GXXEpnPRq6`,[Ft.bsc.id]:`${vr}/4NfXEi8rreQsnAr4aJ45RLCKgnjcWX46Lbt9SadiCcz6`,[Ft.poly.id]:`${vr}/3PyRPWSvDnMowGbeBy7aNsvUkD5ZuxdXQw2RdJq4NdXi`,[Ft.arb.id]:`${vr}/83bpQexEaqBjHaQbKoFTbtvCXuo5RudRkfLgtRUYqo2c`,[Ft.base.id]:`${vr}/DFhaPQb3HATXkpsWNZw3gydYHehLBVEDiSk4iBdZJyps`,[Ft.sei.id]:`${vr}/5zjzRnURzoddyFSZBw5E5NAM3oBgPq3NasTYbtMk6EL6`,[Ft.linea.id]:`${vr}/6VsNPEYfFLPZCqdMMDadoXQjLHWJdjEwiD768GAtb7j6`,[Ft.sonic.id]:`${vr}/DtBr6a5vsoDd2oAXdPszcn4gLgrr1XC68Q3AJQKXnNLV`,[Ft.ftm.id]:`${vr}/DdRo1pmJkrJC9fjsjEBWnNE1uqrbh7Diz4tVKd7rfupp`,[Ft.katana.id]:`${vr}/CGi9sDFMQcnBwF3C3NoCFqnaE34sssbgwPLTwiskSXmW`,[Ft.avax.id]:`${vr}/FxZ1vMwE5Xy1qvKvZENUMz4vhW8Sh4vXJf9Vp7o17pTx`,[Ft.bera.id]:`${vr}/H7aY53mY1hgaSURwXj3ZVirwNSifExwjgEL5GNtTqmEj`,[Ft.flare.id]:$m("flare"),[Ft.cronosZkEvm.id]:$m("cronos-zkevm")},jm="0x0000000000000000000000000000000000000000",Vm=[jm,"0x0000000000000000000000000000000000001010","0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE","0x000000000000000000000000000000000000dEaD","0x000000000000000000000000000000000000800A","0x000000000000000000000000000000000000800a"],W5="115792089237316195423570985008687907853269984665640564039457584007913129639935",_t=e=>`${e.name}_${e.chainId}`,Wm={[_t(Dt.SushiArb)]:["0x846F2B29ef314bF3D667981b4ffdADc5B858312a","0x08c41f5D1C844061f6D952E25827eeAA576c6536"],[_t(Dt.SushiBase)]:["0x846F2B29ef314bF3D667981b4ffdADc5B858312a","0x08c41f5D1C844061f6D952E25827eeAA576c6536"],[_t(Dt.SushiEth)]:["0xc55943Fa6509004B2903ED8F8ab7347BfC47D0bA","0x08c41f5D1C844061f6D952E25827eeAA576c6536"],[_t(Dt.PancakeSwap)]:["0xb2BAFe188faD927240038cC4FfF2d771d8A58905","0xE2a0c3b9aD19A18c4bBa7fffBe5bC1b0E58Db1CE"],[_t(Dt.PancakeSwapArbitrum)]:["0xE20167871dB616DdfFD0Fd870d9bC068C350DD1F","0x807488ADAD033e95C438F998277bE654152594dc"],[_t(Dt.PancakeSwapBase)]:["0x10ed1F36e4eBE76E161c9AADDa20BE841bc0082c","0x3A9df3eE209b802D0337383f5abCe3204d623588"],[_t(Dt.PancakeSwapLinea)]:["0x3A9df3eE209b802D0337383f5abCe3204d623588"],[_t(Dt.QuickSwap)]:["0x26D0ec4Be402BCE03AAa8aAf0CF67e9428ba54eF"],[_t(Dt.Thena)]:["0xc2aBC02acd77Bb2407efA22348dA9afC8B375290"],[_t(Dt.Lynex)]:["0x72e3e1fD5D2Ee2F1C2Eb695206D490a1D45C3835"],[_t(Dt.DragonSwap)]:["0x101e1B65Bb516FB5f4547C80BAe0b51f1b8D7a22"],[_t(Dt.SpookySwapSonic)]:["0xAd97B770ad64aE47fc7d64B3bD820dCDbF9ff7DA"],[_t(Dt.SpookySwap)]:["0x3924d62219483015f982b160d48c0fa5Fd436Cba"],[_t(Dt.SwapX)]:["0xE5012eBDe5e26EE3Ea41992154731a03023CF274"]},Bc={unit:Gt.Minutes,value:Hm},q5=.25,Y5="100",qm="RePermitWitnessTransferFrom",Ym={RePermitWitnessTransferFrom:[{name:"permitted",type:"TokenPermissions"},{name:"spender",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"},{name:"witness",type:"Order"}],Exchange:[{name:"adapter",type:"address"},{name:"ref",type:"address"},{name:"share",type:"uint32"},{name:"data",type:"bytes"}],Input:[{name:"token",type:"address"},{name:"amount",type:"uint256"},{name:"maxAmount",type:"uint256"}],Order:[{name:"reactor",type:"address"},{name:"executor",type:"address"},{name:"exchange",type:"Exchange"},{name:"swapper",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"},{name:"chainid",type:"uint256"},{name:"exclusivity",type:"uint32"},{name:"epoch",type:"uint32"},{name:"slippage",type:"uint32"},{name:"freshness",type:"uint32"},{name:"input",type:"Input"},{name:"output",type:"Output"}],Output:[{name:"token",type:"address"},{name:"limit",type:"uint256"},{name:"stop",type:"uint256"},{name:"recipient",type:"address"}],TokenPermissions:[{name:"token",type:"address"},{name:"amount",type:"uint256"}]},Fc="https://www.orbs.com/dtwap-and-dlimit-faq/",K5="https://www.orbs.com/dtwap-and-dlimit-faq/#dSLTP",Z5="https://raw.githubusercontent.com/orbs-network/twap-ui/master/logo/orbslogo.svg",X5="https://www.orbs.com/assets/img/common/logo.svg",Q5="https://www.orbs.com/",J5="https://www.orbs.com/dtwap-dlimit-disclaimer";var Uc=(e=>(e.FRESHNESS="freshness",e.MIN_CHUNK_SIZE_USD="minChunkSizeUsd",e.ENV="env",e))(Uc||{});const Km="-5",Zm="10",Xm="-10",Qm="5",ew="Something went wrong";function tw(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}function rw(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const nw={14:{dex:{spark:{type:"default:spark",adapter:"0xB18c633B6584A33E45a8840a759f56dF17117b1D",fee:"0xaeA8C3e1a129A77686E115b1a46D9aD8405F7D2b"}}},56:{dex:{thena:{type:"default:odos-v2",adapter:"0xB75218ba5A99bF57Fd02556B70F05A4A0f1Dbe67",fee:"0x15eBc8b5b3877512FFF23650188694A9a8891FAc"},pancake:{type:"p2:pancakeswap-v2",adapter:"0x654272F7e6e6E912D38650f783eFd44452fD6ee5",fee:"0x37A957f10F458e0d7fDECBE2917971b57F15c927"},newera:{type:"default:odos-v2",adapter:"0x845f459271D800f6Ab32D78400b8Aa18414E80b0",fee:"0x4E7454909eB6D539111D56b50d68897E933D2d11"}}},137:{dex:{quick:{type:"paraswap:paraswap-v5",adapter:"0x023fD6848234f2655818705237F77F02215FEfe5",fee:"0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f"},teafi:{type:"paraswap:paraswap-v5",adapter:"0xe95db7a60164B112C64cE67bA8587b1d4a0E0D29",fee:"0x04Ff96e2c4D62b5771795d307AD679a25b3D2D50"}}},143:{dex:{yowie:{type:"default:openocean-v2",adapter:"0x18bc9533c3539073B9A9acF12b0AbF7cB73e0F1f",fee:"0x6AF3eE77A3A3257777F5649aFa611b4C7Fd975Ef"}}},146:{dex:{spooky:{type:"default:magpie-v3",adapter:"0xdCee7FDdB932104329d528144Cd17A408722B7e2",fee:"0x840Df4684B35BC68BcdA3F6707A3c82A0D662f8b"},swapx:{type:"default:openocean-v2",adapter:"0xecc733D6F6f2DEa341832D650E30822118884FEb",fee:"0x6E03f7BC0f141894612AA017796096399623895F"},shadow:{type:"default:magpie-v3",adapter:"0x5f3E5F6ACCfc65243A01Da3E93b5A700285592C3",fee:"0xb9e3751fAF3187E1bC468E56a707a8A91754460e"}}},1329:{dex:{dragon:{type:"default:dragon",adapter:"0x02d9d5882129241b67ec21Ebc2C86e1BE9BC9890",fee:"0x0dc1E0525202b32e89bA78ed55b1e5cEdB751334"},nami:{type:"default:openocean-v2",adapter:"0x2D4A1237A98f8cb03C3C85960e859aA44036a306",fee:"0xeB58450e23632003f013568703F54446070E2E80"}}},8453:{dex:{quick:{type:"default:kyber-v2",adapter:"0xc73F03c929A123Ee2f3A98EC18BB240f03980AE5",fee:"0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f"}}},42161:{dex:{arbidex:{type:"default:odos-v2",adapter:"0xa734b32151108139e48dCA06eE721538d90A9Ef6",fee:"0xa0c11852f8A44e32F9EC10AD25986A53842f72Ca"},ramses:{type:"paraswap:paraswap-v5",adapter:"0x023fD6848234f2655818705237F77F02215FEfe5",fee:"0xB5BaCB60ECDa0bEF809B2A26eC9B4B926835D7af"},omni:{type:"paraswap:paraswap-v5",adapter:"0xa1baE146161223cd9dCa7137F68eb385934130BE",fee:"0xba5291526c30B097E9F1Fd1Be301E2ab6E0782aa"},chronos:{type:"default:odos-v2",adapter:"0x4Ff90F32aceD08b3e3257B018EA495Fd1Bfe4455",fee:"0x5729af83240EFecAa18eafaAE82961c2DD045Dbe"}}},43114:{dex:{blackhole:{type:"default:kyber-v2",adapter:"0x426ec4bc0d58B80959CDE77576a1942dd40592Fa",fee:"0x7f8B62520D9B5DA0ED517cc36e8dcb2a356f1928"}}},59144:{dex:{lynex:{type:"default:openocean",adapter:"0x4FF6A97A67fe395212f168f011D71fE79E4396f2",fee:"0xcb36ed1B1BfAD8F7FC9651f52d21f04A68677423"}}},80094:{dex:{kodiak:{type:"default:kodiak",adapter:"0xBbaa527Aac00b1Ee9A3909D4D8c4447630E29B1F",fee:"0xBA47Ec15aFbCF6e7e9F52900632049530bB6bAe4"}}},"*":{wm:"0x0005d5cE0dB57e5BE3b2b8b6FeB75f0ccd015000",repermit:"0x00002a9C4D9497df5Bd31768eC5d30eEf5405000",cosigner:"0x0007ec53404c423C935e830ec21903e184690000",reactor:"0x0006a959430e8fBB858D81B2D1140B0ae5c26001",executor:"0x000eBA869d76C618ddc4A6D685A0820A620Ce002",refinery:"0x000E474c0D7084EAA35A501035E73269f4b009A5",salt:{wm:"0xc9b46eae42dfeba3222a0315bf682f33cd5cc9d60c9625642e88406f8415f152",repermit:"0x4871dc9008e605821ea9677b65ea2a60ffb774afb31e0dcaea2e192880096be7",cosigner:"0x37576f2ac1d2a602f00777611edf6f0cbc27611b0980b29bc7856fa79b2b8073",reactor:"0x034169222370f2fd587ef8998082d762cceef58a272330215f5110ec0d76d400",executor:"0xea139bc421fa5e272bed3db74233b2e02077e0aacf8b855f87961e98f2fb467f",refinery:"0x9746de29f1dd31b2c8460d71e92a7aefa34911130e61f274f37776e598c48bec"}}};var od,Jm;function sw(){if(Jm)return od;Jm=1;const e=nw,t=s=>rw(`./out/${s}.sol/${s}.json`).abi,r=()=>({wm:t("WM"),repermit:t("RePermit"),reactor:t("OrderReactor"),executor:t("Executor"),refinery:t("Refinery"),adapter:t("DefaultDexAdapter")});function n(s,a){if(!s||!(a!=null&&a.trim()))return;const{dex:o,...i}=e["*"]??{},c=e[s];if(!c)return;const{dex:l,...u}=c,d=l==null?void 0:l[a];if(d)return{...i,...u,...d}}return od={config:n,abis:r,raw:e},od}var eh=sw();const th=(e,t,r)=>{if(!e||!t||!r)return;const n=j(e).times(t),s=j(10).pow(r);return n.div(s).toFixed(0)},rh=(e,t,r,n)=>{if(r||!n||!e||!t)return j(0).toString();const s=j(e).times(j(t)),a=j(10).pow(n),o=s.div(a);return j.max(1,o).integerValue(j.ROUND_FLOOR).toFixed(0)},nh=(e,t,r,n)=>{if(e===ge.TWAP||e===ge.LIMIT)return"0";if(!n||!t||!r)return;const s=j(t).times(j(r)),a=j(10).pow(n),o=s.div(a);return j.max(1,o).integerValue(j.ROUND_FLOOR).toFixed(0)||"0"},sh=(e,t,r,n)=>{const s=Zn(r)*2*t,a=R5(s);return n||(e===ge.LIMIT?{unit:Gt.Days,value:7}:e===ge.STOP_LOSS||e===ge.TAKE_PROFIT?{unit:Gt.Days,value:1}:{unit:a,value:Number(j(s/a).toFixed(2))})},ah=(e,t,r)=>t!==ge.TWAP?1:r!==void 0?r:e,oh=(e,t,r,n)=>{if(!t||!r||!n)return 1;const a=j(r).times(t).div(n).integerValue(j.ROUND_FLOOR).toNumber(),o=Math.floor(Ca/2/Zn(e));return Math.max(1,Math.min(a,o))},aw=e=>id(e)/1e3/60,ih=(e,t)=>e+Zn(t)+6e4,id=e=>e.bidDelaySeconds*1e3*2,ch=(e,t)=>!e||!t?"0":j(e).div(t).integerValue(j.ROUND_FLOOR).toFixed(0),ow=(e,t)=>({isError:!(e.unit===Bc.unit&&e.value===Bc.value)&&Zn(e)*t>Ca,value:Math.floor(Ca/t)}),lh=(e="",t="",r)=>{if(r===ge.STOP_LOSS)return{isError:j(t||0).gte(j(e||0)),value:e}},uh=(e="",t="",r)=>{if(r===ge.TAKE_PROFIT)return{isError:j(t||0).lte(j(e||0)),value:e}},dh=(e="",t="",r=!1,n)=>{if(!r&&n===ge.STOP_LOSS)return{isError:j(t||0).gte(j(e||0)),value:e}},ph=(e="",t="",r=!1,n)=>{if(!r&&n===ge.TAKE_PROFIT)return{isError:j(t||0).gte(j(e||0)),value:e}},fh=(e,t)=>e===ge.STOP_LOSS||e===ge.TAKE_PROFIT?{isError:Zn(t)>5184e6,value:5184e6}:{isError:Zn(t)>Ca,value:Ca},mh=e=>({isError:Zn(e)<ad,value:ad}),hh=e=>({isError:Zn(e)<Ic,value:Ic}),bh=(e,t,r)=>({isError:j(t||0).multipliedBy(e||0).isLessThan(r),value:r}),yh=(e,t,r)=>({isError:r===ge.TWAP&&j(e).isGreaterThan(t),value:t}),cd=(e,t=0)=>{var o;const r=(o=Object.entries(Dt).find(([i,c])=>c.chainId===t&&i.toLowerCase().indexOf(e.toLowerCase())>=0))==null?void 0:o[1],{abi:n,...s}=eh.config(t,e);return{...s,partner:e,twapConfig:r}},gh=()=>{const e=eh.raw;return Object.entries(e).filter(([t])=>t!=="*").flatMap(([t,r])=>{const n=r==null?void 0:r.dex;return!n||typeof n!="object"?[]:Object.entries(n).map(([s])=>({chainId:Number(t),name:s,config:cd(s,Number(t))}))}).sort((t,r)=>t.name.localeCompare(r.name))},xh=({chainId:e,srcToken:t,dstToken:r,srcAmount:n,deadlineMillis:s,fillDelayMillis:a,slippage:o,account:i,srcAmountPerTrade:c,dstMinAmountPerTrade:l,triggerAmountPerTrade:u,config:d})=>{const f=Date.now().toString(),m=parseInt((a/1e3).toFixed(0)),y=H5(s/1e3),g=Fo(Uc.FRESHNESS),E=g?parseInt(g):60,v={permitted:{token:t,amount:n},spender:d.reactor,nonce:f,deadline:y,witness:{reactor:d.reactor,executor:d.executor,exchange:{adapter:d.adapter,ref:d.fee,share:0,data:"0x"},swapper:i,nonce:f,deadline:y,chainid:e,exclusivity:0,epoch:m,slippage:o,freshness:E,input:{token:t,amount:c,maxAmount:n},output:{token:r,limit:l||"0",stop:!u||j(u||0).isZero()?"0":u,recipient:i}}};return{domain:{name:"RePermit",version:"1",chainId:e,verifyingContract:d.repermit},order:v,types:Ym,primaryType:qm}},iw={version:"0.0.18"},cw=`https://bi.orbs.network/putes/twap-ui-${.7}`,wh=iw.version;let ld="unknown";function vh(e){ld=e}function ud(){const e=Math.random().toString(36).substring(2,16),t=Math.random().toString(36).substring(2,16),r=Date.now().toString(36);return`id_${e+t+r}`}const lw=(e,t,r)=>{var n,s,a,o,i,c,l,u,d;return{spotVersion:wh,partner:e.partner,adapter:e.adapter,cosigner:e.cosigner,executor:e.executor,fee:e.fee,reactor:e.reactor,refinery:e.refinery,repermit:e.repermit,router:e.router,type:e.type,wm:e.wm,chainName:((n=e.twapConfig)==null?void 0:n.chainName)||"",chainId:r||0,twapVersion:((s=e.twapConfig)==null?void 0:s.twapVersion)||0,twapAddress:((a=e.twapConfig)==null?void 0:a.twapAddress)||"",lensAddress:((o=e.twapConfig)==null?void 0:o.lensAddress)||"",bidDelaySeconds:((i=e.twapConfig)==null?void 0:i.bidDelaySeconds)||0,minChunkSizeUsd:t,name:((c=e.twapConfig)==null?void 0:c.name)||"",exchangeAddress:((l=e.twapConfig)==null?void 0:l.exchangeAddress)||"",exchangeType:((u=e.twapConfig)==null?void 0:u.exchangeType)||"",pathfinderKey:((d=e.twapConfig)==null?void 0:d.pathfinderKey)||""}},Eh=async e=>{try{await fetch(cw,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)}).then()}catch(t){console.error("Failed to send BI",t)}};class uw{constructor(){Yu(this,"timeout");Yu(this,"config");Yu(this,"data",{_id:ud()})}async updateAndSend(t={},r=!1,n){try{this.data={...this.data,...t},r?(await Eh(this.data),n==null||n()):(clearTimeout(this.timeout),this.timeout=setTimeout(()=>{Eh(this.data),n==null||n()},1e3))}catch(s){console.error("Failed to update and send BI",s)}}onCancelOrderRequest(t,r){this.updateAndSend({cancelOrderIdsV1:r===1?t:void 0,cancelOrderIdsV2:r===2?t:void 0,action:"cancel order",cancelOrderSuccess:!1,cancelOrderTxHash:void 0,actionError:void 0})}onCancelOrderSuccess(t){this.updateAndSend({cancelOrderTxHash:t,cancelOrderSuccess:!0})}onCancelOrderError(t){this.onTxError(t)}onWrapSuccess(t){this.updateAndSend({wrapTxHash:t})}onWrapRequest(){this.updateAndSend({action:"wrap"})}onWrapError(t){this.onTxError(t)}onApproveRequest(){this.updateAndSend({action:"approve"})}onApproveSuccess(t){this.updateAndSend({approvalTxHash:t})}onApproveError(t){this.onTxError(t)}onCrash(t){var r;this.updateAndSend({action:"crash",actionError:((r=t==null?void 0:t.message)==null?void 0:r.toLowerCase())||(t==null?void 0:t.toLowerCase())})}onTxError(t){var n;const r=((n=t==null?void 0:t.message)==null?void 0:n.toLowerCase())||(t==null?void 0:t.toLowerCase());this.updateAndSend({actionError:r})}onRequestOrder({account:t,chainId:r,module:n,srcToken:s,dstToken:a,fromTokenAmount:o,srcChunkAmount:i,minDstAmountOutPerTrade:c="",triggerPricePerTrade:l="",deadline:u,fillDelay:d,slippage:f,isMarketOrder:m}){const y=j(o).div(i).integerValue(j.ROUND_FLOOR).toNumber();this.updateAndSend({toTokenAddress:a.address,toTokenSymbol:a.symbol,fromTokenAddress:s.address,fromTokenSymbol:s.symbol,fromTokenAmount:o,chunksAmount:y,srcChunkAmount:i,minDstAmountOutPerTrade:c,triggerPricePerTrade:l,deadline:u,fillDelay:d,slippage:f,chainId:r,walletAddress:t,module:n,orderType:m?"market":"limit",actionError:void 0})}onSignOrderRequest(t){this.updateAndSend({action:"sign order",order:t})}onSignOrderError(t){this.onTxError(t)}onSignOrderSuccess(t){this.updateAndSend({action:"sign order",signature:t})}init(t,r,n){var s;this.config=t,n!==((s=this.data)==null?void 0:s.chainId)&&(this.data={_id:ud(),action:"module-import",uiVersion:ld,...lw(t,r,n),origin:window.location.origin},this.updateAndSend(this.data))}onCreateOrderError(t){this.onTxError(t)}onCreateOrderRequest(){this.updateAndSend({action:"create order"})}async onCreateOrderSuccess(t){this.updateAndSend({orderHash:t,orderSuccess:!0},void 0,()=>{this.data={_id:ud(),action:"reset",uiVersion:ld,origin:this.data.origin,spotVersion:wh,partner:this.data.partner,adapter:this.data.adapter,cosigner:this.data.cosigner,executor:this.data.executor,fee:this.data.fee,reactor:this.data.reactor,refinery:this.data.refinery,repermit:this.data.repermit,router:this.data.router,type:this.data.type,wm:this.data.wm,chainName:this.data.chainName||"",chainId:this.data.chainId||0,twapVersion:this.data.twapVersion||0,twapAddress:this.data.twapAddress||"",lensAddress:this.data.lensAddress||"",bidDelaySeconds:this.data.bidDelaySeconds||0,minChunkSizeUsd:this.data.minChunkSizeUsd||0,name:this.data.name||"",exchangeAddress:this.data.exchangeAddress||"",exchangeType:this.data.exchangeType||"",pathfinderKey:this.data.pathfinderKey||""}})}onLoad(){this.updateAndSend({action:"module-import",origin:window.location.origin})}}const dt=new uw,dw=e=>{var s;const t=j(e.order.witness.output.limit||0).gt(1),r=j(e.order.witness.output.stop||0).gt(0),n=((s=e.metadata.chunks)==null?void 0:s.length)||j(e.order.witness.input.maxAmount).div(j(e.order.witness.input.amount)).toNumber();return r&&t?ut.TRIGGER_PRICE_LIMIT:r?ut.TRIGGER_PRICE_MARKET:!t&&n<=1?ut.TWAP_MARKET:n>=1&&t?ut.TWAP_LIMIT:t?ut.LIMIT:ut.TWAP_MARKET},pw=e=>{var s;const t=((s=e.metadata.chunks)==null?void 0:s.filter(a=>a.status==="success").length)||0,r=e.metadata.expectedChunks||0,n=j(t).dividedBy(r).toNumber();return n>=.99?100:n<=0?0:Number((n*100).toFixed(2))},fw=(e,t)=>e.metadata.status==="completed"||t>=99?lt.Completed:["pending","eligible"].includes(e.metadata.status)?lt.Open:e.metadata.description.toLowerCase()==="cancelled by contract"?lt.Canceled:lt.Expired,mw=e=>{var r;return(((r=e.metadata.chunks)==null?void 0:r.filter(n=>n.status==="success"))||[]).map(n=>({inAmount:n.inAmount,outAmount:n.outAmount,timestamp:new Date(n.timestamp).getTime(),txHash:n.txHash}))},hw=(e,t)=>{var n;const r=e.length;return r>=t&&((n=e[r-1])==null?void 0:n.timestamp)||0},kh=e=>{const t=pw(e),r=Number(e.order.witness.output.limit)===1?"":e.order.witness.output.limit,n=e.metadata.expectedChunks||1,s=mw(e);return{id:e.hash,hash:e.hash,version:2,type:dw(e),maker:e.order.witness.swapper,progress:t,srcAmountFilled:s.reduce((a,o)=>a.plus(o.inAmount),new j(0)).toFixed()||"",dstAmountFilled:s.reduce((a,o)=>a.plus(o.outAmount),new j(0)).toFixed()||"",fills:s,srcTokenAddress:e.order.witness.input.token,dstTokenAddress:e.order.witness.output.token,orderDollarValueIn:e.metadata.displayOnlyInputTokenPriceUSD?j(e.metadata.displayOnlyInputTokenPriceUSD).toFixed(6):"",fillDelay:e.order.witness.epoch*1e3,deadline:Number(e.order.deadline)*1e3,createdAt:new Date(e.timestamp).getTime(),srcAmount:e.order.witness.input.maxAmount,dstMinAmountPerTrade:r,triggerPricePerTrade:j(e.order.witness.output.stop||0).isZero()?"":e.order.witness.output.stop,dstMinAmountTotal:j(r).multipliedBy(n).toString(),srcAmountPerTrade:e.order.witness.input.amount,totalTradesAmount:n,isMarketPrice:j(r||0).lte(1),chainId:e.order.witness.chainid,filledOrderTimestamp:hw(s,n),status:fw(e,t),rawOrder:e}},bw=async({chainId:e,signal:t,account:r})=>r?(await(await fetch(`${sd()}/orders?swapper=${r}&chainId=${e}`,{signal:t})).json()).orders.map(kh):[],Ch=async(e,t)=>{try{const r={signature:t,order:e,status:"pending"};console.log("body",r),dt.onCreateOrderRequest();const s=await(await fetch(`${sd()}/orders/new`,{method:"POST",body:JSON.stringify(r)})).json();if(!s.success)throw new Error(`error:${s.message}, code:${s.code}`);const a=kh(s.signedOrder);return dt.onCreateOrderSuccess(a.id),a}catch(r){throw dt.onCreateOrderError(r),console.error(r),r}},yn=(e,t)=>e&&e.length?e.map(t||(r=>`${r}`)):void 0,yw=e=>{if(e)return Gm[e]},dd=async({chainId:e,buildQuery:t,extractResults:r,signal:n,retries:s=1,limit:a=1e3,page:o})=>{const i=yw(e);if(!i)throw new kw;const c=async d=>{let f=0;for(;f<=s;)try{const m=await fetch(i,{method:"POST",body:JSON.stringify({query:d}),signal:n,headers:{"Content-Type":"application/json"}});if(!m.ok)throw new Error(`HTTP error: ${m.status}`);const y=await m.json();if(y.errors)throw new Error(y.errors[0].message);return r(y)}catch(m){if(f===s)throw m;await new Promise(y=>setTimeout(y,500*2**f)),f++}return[]};let l=0;const u=[];if(o!==void 0){const d=t(o,a);try{return await c(d)}catch{console.warn(`Page ${o} failed, retrying one final time...`);try{return await c(d)}catch{return[]}}}for(;;){const d=t(l,a);let f;try{f=await c(d)}catch{console.warn(`Page ${l} failed, retrying one final time...`);try{f=await c(d)}catch{return u}}if(u.push(...f),f.length<a)break;l++}return u},Th=e=>e.map(t=>({inAmount:t.srcAmountIn,outAmount:t.dstAmountOut,timestamp:t.timestamp,txHash:t.transactionHash})),Sh=(e,t)=>{const r=j(e||0).gt(1);return!r&&t===1?ut.TWAP_MARKET:t>1&&r?ut.TWAP_LIMIT:r?ut.LIMIT:ut.TWAP_MARKET},gw=(e,t,r,n)=>{var f;const s=Th(r||[]),a=new j(e.ask_srcAmount||0).div(e.ask_srcBidAmount).integerValue(j.ROUND_FLOOR).toNumber(),i=(r==null?void 0:r.length)===a?(f=r==null?void 0:r[(r==null?void 0:r.length)-1])==null?void 0:f.timestamp:void 0,c=s.reduce((m,y)=>m.plus(y.inAmount),new j(0)).toFixed(),l=s.reduce((m,y)=>m.plus(y.outAmount),new j(0)).toFixed(),u=Ah(e.ask_srcAmount,c),d=Sh(e.ask_dstMinAmount,a);return{version:1,id:e.Contract_id.toString(),hash:"",type:Sh(e.ask_dstMinAmount,a),srcTokenAddress:e.ask_srcToken,dstTokenAddress:e.ask_dstToken,exchangeAddress:e.exchange,twapAddress:e.twapAddress,maker:e.maker,progress:u,dstAmountFilled:l,srcAmountFilled:c,orderDollarValueIn:j(e.dollarValueIn||0).toFixed(6),srcAmount:e.ask_srcAmount,dstMinAmountTotal:j(e.ask_dstMinAmount).multipliedBy(a).toString(),fills:s,fillDelay:e.ask_fillDelay,deadline:e.ask_deadline*1e3,createdAt:new Date(e.timestamp).getTime(),dstMinAmountPerTrade:j(e.ask_dstMinAmount).eq(1)?"":e.ask_dstMinAmount,triggerPricePerTrade:"",srcAmountPerTrade:e.ask_srcBidAmount,txHash:e.transactionHash,totalTradesAmount:a,isMarketPrice:[ut.TWAP_MARKET,ut.TRIGGER_PRICE_MARKET].includes(d),chainId:t,filledOrderTimestamp:i||0,status:n,rawOrder:e}},xw=e=>{var d;if(!e)return"";const t=yn(e.accounts,f=>`"${f.toLowerCase()}"`),r=yn($5(e.configs),f=>`"${f.toLowerCase()}"`),n=yn(e.inTokenSymbols,f=>`"${f.toUpperCase()}"`),s=yn(e.outTokenSymbols,f=>`"${f.toUpperCase()}"`),a=yn(e.inTokenAddresses,f=>`"${f.toLowerCase()}"`),o=yn(e.outTokenAddresses,f=>`"${f.toLowerCase()}"`),i=yn(e.transactionHashes,f=>`"${f.toLowerCase()}"`),c=yn(e.orderIds,f=>`"${f}"`),l=r!=null&&r.length?"":yn((d=e.configs)==null?void 0:d.map(f=>f.twapAddress),f=>`"${f.toLowerCase()}"`),u=e.minDollarValueIn;return[r?`exchange_in: [${r.join(", ")}]`:"",l?`twapAddress_in: [${l.join(", ")}]`:"",t?`maker_in: [${t.join(", ")}]`:"",i?`transactionHash_in: [${i.join(", ")}]`:"",c?`Contract_id_in: [${c.join(", ")}]`:"",u?`dollarValueIn_gte: ${u}`:"",n?`srcTokenSymbol_in: [${n.join(", ")}]`:"",s?`dstTokenSymbol_in: [${s.join(", ")}]`:"",a?`srcTokenAddress_in: [${a.join(", ")}]`:"",o?`dstTokenAddress_in: [${o.join(", ")}]`:"",e!=null&&e.startDate?`blockTimestamp_gte: ${e.startDate}`:"",e!=null&&e.endDate?`blockTimestamp_lte: ${e.endDate}`:"",(e==null?void 0:e.orderType)==="limit"?"ask_dstMinAmount_gt: 1":"",(e==null?void 0:e.orderType)==="market"?"ask_dstMinAmount_lte: 1":""].filter(Boolean).join(", ")};async function ww({chainId:e,signal:t,page:r,limit:n,filters:s}){const a=n||1e3,o=xw(s);return await dd({chainId:e,signal:t,limit:a,page:r,buildQuery:(c,l)=>`
|
|
2
2
|
{
|
|
3
3
|
orderCreateds(
|
|
4
4
|
${o?`where: { ${o} }`:""},
|
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
dollarValueOut
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
`,extractResults:d=>{var f;return(((f=d.data)==null?void 0:f.orderFilleds)||[]).map(m=>({...m,timestamp:new Date(m.timestamp).getTime()}))}})};class kw extends Error{constructor(){super("No graph endpoint found"),this.name="NoGraphEndpointError"}}const Cw=async({chainId:e,signal:t,page:r,limit:n,filters:s})=>{const a=await ww({chainId:e,signal:t,page:r,limit:n,filters:s}),[o,i]=await Promise.all([Ew({chainId:e,orders:a,signal:t}),vw({chainId:e,orders:a,signal:t})]);return a.map(l=>{const u=o==null?void 0:o.filter(d=>d.TWAP_id===Number(l.Contract_id)&&Ps(d.exchange,l.exchange)&&Ps(d.twapAddress,l.twapAddress));return gw(l,e,u,Tw(l,u||[],i))}).sort((l,u)=>u.createdAt-l.createdAt)},Tw=(e,t,r)=>{var i;const n=(i=r==null?void 0:r.find(c=>c.twapId===e.Contract_id.toString()&&Ps(c.twapAddress,e.twapAddress)))==null?void 0:i.status,a=Th(t).reduce((c,l)=>c.plus(l.inAmount),new j(0)).toFixed(),o=Ah(e.ask_srcAmount,a);return Sw(o,e.ask_deadline*1e3,n)},Ah=(e,t)=>{if(!t||!e)return 0;const r=j(t).dividedBy(e).toNumber();return r>=.99?100:r<=0?0:Number((r*100).toFixed(2))},Sw=(e,t,r)=>e===100?lt.Completed:r==="CANCELED"?lt.Canceled:r==="COMPLETED"?lt.Completed:t>Date.now()?lt.Open:lt.Expired,Ph=async({signal:e,page:t,chainId:r,limit:n,config:s,account:a})=>(await Promise.all([s?Cw({chainId:r,signal:e,page:t,limit:n,filters:{accounts:[a],configs:[s]}}):Promise.resolve([]),bw({chainId:r,signal:e,account:a})]).then(([c,l])=>[...c,...l])).sort((c,l)=>l.createdAt-c.createdAt),Aw={version:"0.0.38"};var Ta=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(){}},Pw={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Iw=(f5=class{constructor(){le(this,dn,Pw);le(this,pa,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&N(this,pa)&&e!==N(this,dn)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:N(this,dn),provider:e}),ee(this,dn,e),process.env.NODE_ENV!=="production"&&ee(this,pa,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&ee(this,pa,!0),N(this,dn).setTimeout(e,t)}clearTimeout(e){N(this,dn).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&ee(this,pa,!0),N(this,dn).setInterval(e,t)}clearInterval(e){N(this,dn).clearInterval(e)}},dn=new WeakMap,pa=new WeakMap,f5),Fs=new Iw;function Bw(e){setTimeout(e,0)}var Us=typeof window>"u"||"Deno"in globalThis;function jt(){}function Fw(e,t){return typeof e=="function"?e(t):e}function fd(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ih(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Xn(e,t){return typeof e=="function"?e(t):e}function Er(e,t){return typeof e=="function"?e(t):e}function Bh(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:a,queryKey:o,stale:i}=e;if(o){if(n){if(t.queryHash!==md(o,t.options))return!1}else if(!Uo(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 Fh(e,t){const{exact:r,status:n,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Os(t.options.mutationKey)!==Os(a))return!1}else if(!Uo(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function md(e,t){return((t==null?void 0:t.queryKeyHashFn)||Os)(e)}function Os(e){return JSON.stringify(e,(t,r)=>bd(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Uo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Uo(e[r],t[r])):!1}var Uw=Object.prototype.hasOwnProperty;function hd(e,t){if(e===t)return e;const r=Uh(e)&&Uh(t);if(!r&&!(bd(e)&&bd(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],f=t[u];if(d===f){i[u]=d,(r?l<s:Uw.call(e,u))&&c++;continue}if(d===null||f===null||typeof d!="object"||typeof f!="object"){i[u]=f;continue}const m=hd(d,f);i[u]=m,m===d&&c++}return s===o&&c===s?e:i}function Oc(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 bd(e){if(!Oh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Oh(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Oh(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ow(e){return new Promise(t=>{Fs.setTimeout(t,e)})}function yd(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 hd(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 hd(e,t)}return t}function Dw(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function _w(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Dc=Symbol();function Dh(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Dc&&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===Dc?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _h(e,t){return typeof e=="function"?e(...t):!!e}var Mw=(m5=class extends Ta{constructor(){super();le(this,fa);le(this,gs);le(this,go);ee(this,go,t=>{if(!Us&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){N(this,gs)||this.setEventListener(N(this,go))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,gs))==null||t.call(this),ee(this,gs,void 0))}setEventListener(t){var r;ee(this,go,t),(r=N(this,gs))==null||r.call(this),ee(this,gs,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){N(this,fa)!==t&&(ee(this,fa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof N(this,fa)=="boolean"?N(this,fa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},fa=new WeakMap,gs=new WeakMap,go=new WeakMap,m5),gd=new Mw;function xd(){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 Nw=Bw;function Lw(){let e=[],t=0,r=i=>{i()},n=i=>{i()},s=Nw;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 kt=Lw(),zw=(h5=class extends Ta{constructor(){super();le(this,xo,!0);le(this,xs);le(this,wo);ee(this,wo,t=>{if(!Us&&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,xs)||this.setEventListener(N(this,wo))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,xs))==null||t.call(this),ee(this,xs,void 0))}setEventListener(t){var r;ee(this,wo,t),(r=N(this,xs))==null||r.call(this),ee(this,xs,t(this.setOnline.bind(this)))}setOnline(t){N(this,xo)!==t&&(ee(this,xo,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return N(this,xo)}},xo=new WeakMap,xs=new WeakMap,wo=new WeakMap,h5),_c=new zw;function Rw(e){return Math.min(1e3*2**e,3e4)}function Mh(e){return(e??"online")==="online"?_c.isOnline():!0}var wd=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Nh(e){let t=!1,r=0,n;const s=xd(),a=()=>s.status!=="pending",o=g=>{var E;if(!a()){const v=new wd(g);f(v),(E=e.onCancel)==null||E.call(e,v)}},i=()=>{t=!0},c=()=>{t=!1},l=()=>gd.isFocused()&&(e.networkMode==="always"||_c.isOnline())&&e.canRun(),u=()=>Mh(e.networkMode)&&e.canRun(),d=g=>{a()||(n==null||n(),s.resolve(g))},f=g=>{a()||(n==null||n(),s.reject(g))},m=()=>new Promise(g=>{var E;n=v=>{(a()||l())&&g(v)},(E=e.onPause)==null||E.call(e)}).then(()=>{var g;n=void 0,a()||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(a())return;let g;const E=r===0?e.initialPromise:void 0;try{g=E??e.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(d).catch(v=>{var L;if(a())return;const w=e.retry??(Us?0:3),A=e.retryDelay??Rw,C=typeof A=="function"?A(r,v):A,D=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,v);if(t||!D){f(v);return}r++,(L=e.onFail)==null||L.call(e,r,v),Ow(C).then(()=>l()?void 0:m()).then(()=>{t?f(v):y()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n==null||n(),s),cancelRetry:i,continueRetry:c,canStart:u,start:()=>(u()?y():m().then(y),s)}}var Lh=(b5=class{constructor(){le(this,ma)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fd(this.gcTime)&&ee(this,ma,Fs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Us?1/0:300*1e3))}clearGcTimeout(){N(this,ma)&&(Fs.clearTimeout(N(this,ma)),ee(this,ma,void 0))}},ma=new WeakMap,b5),Hw=(y5=class extends Lh{constructor(t){super();le(this,Yr);le(this,ha);le(this,vo);le(this,Br);le(this,ba);le(this,Bt);le(this,wc);le(this,ya);ee(this,ya,!1),ee(this,wc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,ba,t.client),ee(this,Br,N(this,ba).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,ha,Hh(this.options)),this.state=t.state??N(this,ha),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=N(this,Bt))==null?void 0:t.promise}setOptions(t){if(this.options={...N(this,wc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Hh(this.options);r.data!==void 0&&(this.setState(Rh(r.data,r.dataUpdatedAt)),ee(this,ha,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Br).remove(this)}setData(t,r){const n=yd(this.state.data,t,this.options);return Ae(this,Yr,Yn).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,Yr,Yn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=N(this,Bt))==null?void 0:n.promise;return(s=N(this,Bt))==null||s.cancel(t),r?r.then(jt).catch(jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,ha))}isActive(){return this.observers.some(t=>Er(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Dc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Xn(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,Bt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Bt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),N(this,Br).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,Bt)&&(N(this,ya)?N(this,Bt).cancel({revert:!0}):N(this,Bt).cancelRetry()),this.scheduleGc()),N(this,Br).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ae(this,Yr,Yn).call(this,{type:"invalidate"})}async fetch(t,r){var c,l,u,d,f,m,y,g,E,v,w,A;if(this.state.fetchStatus!=="idle"&&((c=N(this,Bt))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(N(this,Bt))return N(this,Bt).continueRetry(),N(this,Bt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(D=>D.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,ya,!0),n.signal)})},a=()=>{const C=Dh(this.options,r),L=(()=>{const T={client:N(this,ba),queryKey:this.queryKey,meta:this.meta};return s(T),T})();return ee(this,ya,!1),this.options.persister?this.options.persister(C,L,this):C(L)},i=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:N(this,ba),state:this.state,fetchFn:a};return s(C),C})();(l=this.options.behavior)==null||l.onFetch(i,this),ee(this,vo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&Ae(this,Yr,Yn).call(this,{type:"fetch",meta:(d=i.fetchOptions)==null?void 0:d.meta}),ee(this,Bt,Nh({initialPromise:r==null?void 0:r.initialPromise,fn:i.fetchFn,onCancel:C=>{C instanceof wd&&C.revert&&this.setState({...N(this,vo),fetchStatus:"idle"}),n.abort()},onFail:(C,D)=>{Ae(this,Yr,Yn).call(this,{type:"failed",failureCount:C,error:D})},onPause:()=>{Ae(this,Yr,Yn).call(this,{type:"pause"})},onContinue:()=>{Ae(this,Yr,Yn).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}));try{const C=await N(this,Bt).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),(m=(f=N(this,Br).config).onSuccess)==null||m.call(f,C,this),(g=(y=N(this,Br).config).onSettled)==null||g.call(y,C,this.state.error,this),C}catch(C){if(C instanceof wd){if(C.silent)return N(this,Bt).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Ae(this,Yr,Yn).call(this,{type:"error",error:C}),(v=(E=N(this,Br).config).onError)==null||v.call(E,C,this),(A=(w=N(this,Br).config).onSettled)==null||A.call(w,this.state.data,C,this),C}finally{this.scheduleGc()}}},ha=new WeakMap,vo=new WeakMap,Br=new WeakMap,ba=new WeakMap,Bt=new WeakMap,wc=new WeakMap,ya=new WeakMap,Yr=new WeakSet,Yn=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,...zh(n.data,this.options),fetchMeta:t.meta??null};case"success":const s={...n,...Rh(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,vo,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),kt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),N(this,Br).notify({query:this,type:"updated",action:t})})},y5);function zh(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Mh(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Rh(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Hh(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 $w=(g5=class extends Ta{constructor(t,r){super();le(this,Ve);le(this,sr);le(this,De);le(this,vc);le(this,qt);le(this,ga);le(this,Eo);le(this,Gn);le(this,ws);le(this,Ec);le(this,ko);le(this,Co);le(this,xa);le(this,wa);le(this,vs);le(this,To,new Set);this.options=r,ee(this,sr,t),ee(this,ws,null),ee(this,Gn,xd()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,De).addObserver(this),$h(N(this,De),this.options)?Ae(this,Ve,Tc).call(this):this.updateResult(),Ae(this,Ve,Tm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return vd(N(this,De),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return vd(N(this,De),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ae(this,Ve,Sm).call(this),Ae(this,Ve,Am).call(this),N(this,De).removeObserver(this)}setOptions(t){const r=this.options,n=N(this,De);if(this.options=N(this,sr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Er(this.options.enabled,N(this,De))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ae(this,Ve,Pm).call(this),N(this,De).setOptions(this.options),r._defaulted&&!Oc(this.options,r)&&N(this,sr).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,De),observer:this});const s=this.hasListeners();s&&Gh(N(this,De),n,this.options,r)&&Ae(this,Ve,Tc).call(this),this.updateResult(),s&&(N(this,De)!==n||Er(this.options.enabled,N(this,De))!==Er(r.enabled,N(this,De))||Xn(this.options.staleTime,N(this,De))!==Xn(r.staleTime,N(this,De)))&&Ae(this,Ve,Em).call(this);const a=Ae(this,Ve,km).call(this);s&&(N(this,De)!==n||Er(this.options.enabled,N(this,De))!==Er(r.enabled,N(this,De))||a!==N(this,vs))&&Ae(this,Ve,Cm).call(this,a)}getOptimisticResult(t){const r=N(this,sr).getQueryCache().build(N(this,sr),t),n=this.createResult(r,t);return jw(this,n)&&(ee(this,qt,n),ee(this,Eo,this.options),ee(this,ga,N(this,De).state)),n}getCurrentResult(){return N(this,qt)}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,Gn).status==="pending"&&N(this,Gn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){N(this,To).add(t)}getCurrentQuery(){return N(this,De)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=N(this,sr).defaultQueryOptions(t),n=N(this,sr).getQueryCache().build(N(this,sr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ae(this,Ve,Tc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,qt)))}createResult(t,r){var b;const n=N(this,De),s=this.options,a=N(this,qt),o=N(this,ga),i=N(this,Eo),l=t!==n?t.state:N(this,vc),{state:u}=t;let d={...u},f=!1,m;if(r._optimisticResults){const x=this.hasListeners(),S=!x&&$h(t,r),I=x&&Gh(t,n,r,s);(S||I)&&(d={...d,...zh(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:E}=d;m=d.data;let v=!1;if(r.placeholderData!==void 0&&m===void 0&&E==="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,Co))==null?void 0:b.state.data,N(this,Co)):r.placeholderData,x!==void 0&&(E="success",m=yd(a==null?void 0:a.data,x,r),f=!0)}if(r.select&&m!==void 0&&!v)if(a&&m===(o==null?void 0:o.data)&&r.select===N(this,Ec))m=N(this,ko);else try{ee(this,Ec,r.select),m=r.select(m),m=yd(a==null?void 0:a.data,m,r),ee(this,ko,m),ee(this,ws,null)}catch(x){ee(this,ws,x)}N(this,ws)&&(y=N(this,ws),m=N(this,ko),g=Date.now(),E="error");const w=d.fetchStatus==="fetching",A=E==="pending",C=E==="error",D=A&&w,L=m!==void 0,h={status:E,fetchStatus:d.fetchStatus,isPending:A,isSuccess:E==="success",isError:C,isInitialLoading:D,isLoading:D,data:m,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&&!A,isLoadingError:C&&!L,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:C&&L,isStale:Ed(t,r),refetch:this.refetch,promise:N(this,Gn),isEnabled:Er(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const x=F=>{h.status==="error"?F.reject(h.error):h.data!==void 0&&F.resolve(h.data)},S=()=>{const F=ee(this,Gn,h.promise=xd());x(F)},I=N(this,Gn);switch(I.status){case"pending":t.queryHash===n.queryHash&&x(I);break;case"fulfilled":(h.status==="error"||h.data!==I.value)&&S();break;case"rejected":(h.status!=="error"||h.error!==I.reason)&&S();break}}return h}updateResult(){const t=N(this,qt),r=this.createResult(N(this,De),this.options);if(ee(this,ga,N(this,De).state),ee(this,Eo,this.options),N(this,ga).data!==void 0&&ee(this,Co,N(this,De)),Oc(r,t))return;ee(this,qt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!N(this,To).size)return!0;const o=new Set(a??N(this,To));return this.options.throwOnError&&o.add("error"),Object.keys(N(this,qt)).some(i=>{const c=i;return N(this,qt)[c]!==t[c]&&o.has(c)})};Ae(this,Ve,F5).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ae(this,Ve,Tm).call(this)}},sr=new WeakMap,De=new WeakMap,vc=new WeakMap,qt=new WeakMap,ga=new WeakMap,Eo=new WeakMap,Gn=new WeakMap,ws=new WeakMap,Ec=new WeakMap,ko=new WeakMap,Co=new WeakMap,xa=new WeakMap,wa=new WeakMap,vs=new WeakMap,To=new WeakMap,Ve=new WeakSet,Tc=function(t){Ae(this,Ve,Pm).call(this);let r=N(this,De).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(jt)),r},Em=function(){Ae(this,Ve,Sm).call(this);const t=Xn(this.options.staleTime,N(this,De));if(Us||N(this,qt).isStale||!fd(t))return;const n=Ih(N(this,qt).dataUpdatedAt,t)+1;ee(this,xa,Fs.setTimeout(()=>{N(this,qt).isStale||this.updateResult()},n))},km=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,De)):this.options.refetchInterval)??!1},Cm=function(t){Ae(this,Ve,Am).call(this),ee(this,vs,t),!(Us||Er(this.options.enabled,N(this,De))===!1||!fd(N(this,vs))||N(this,vs)===0)&&ee(this,wa,Fs.setInterval(()=>{(this.options.refetchIntervalInBackground||gd.isFocused())&&Ae(this,Ve,Tc).call(this)},N(this,vs)))},Tm=function(){Ae(this,Ve,Em).call(this),Ae(this,Ve,Cm).call(this,Ae(this,Ve,km).call(this))},Sm=function(){N(this,xa)&&(Fs.clearTimeout(N(this,xa)),ee(this,xa,void 0))},Am=function(){N(this,wa)&&(Fs.clearInterval(N(this,wa)),ee(this,wa,void 0))},Pm=function(){const t=N(this,sr).getQueryCache().build(N(this,sr),this.options);if(t===N(this,De))return;const r=N(this,De);ee(this,De,t),ee(this,vc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},F5=function(t){kt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(N(this,qt))}),N(this,sr).getQueryCache().notify({query:N(this,De),type:"observerResultsUpdated"})})},g5);function Gw(e,t){return Er(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $h(e,t){return Gw(e,t)||e.state.data!==void 0&&vd(e,t,t.refetchOnMount)}function vd(e,t,r){if(Er(t.enabled,e)!==!1&&Xn(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ed(e,t)}return!1}function Gh(e,t,r,n){return(e!==t||Er(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ed(e,r)}function Ed(e,t){return Er(t.enabled,e)!==!1&&e.isStaleByTime(Xn(t.staleTime,e))}function jw(e,t){return!Oc(e.getCurrentResult(),t)}function jh(e){return{onFetch:(t,r)=>{var u,d,f,m,y;const n=t.options,s=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,a=((m=t.state.data)==null?void 0:m.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let g=!1;const E=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},v=Dh(t.options,t.fetchOptions),w=async(A,C,D)=>{if(g)return Promise.reject();if(C==null&&A.pages.length)return Promise.resolve(A);const T=(()=>{const S={client:t.client,queryKey:t.queryKey,pageParam:C,direction:D?"backward":"forward",meta:t.options.meta};return E(S),S})(),h=await v(T),{maxPages:b}=t.options,x=D?_w:Dw;return{pages:x(A.pages,h,b),pageParams:x(A.pageParams,C,b)}};if(s&&a.length){const A=s==="backward",C=A?Vw:Vh,D={pages:a,pageParams:o},L=C(n,D);i=await w(D,L,A)}else{const A=e??a.length;do{const C=c===0?o[0]??n.initialPageParam:Vh(n,i);if(c>0&&C==null)break;i=await w(i,C),c++}while(c<A)}return i};t.options.persister?t.fetchFn=()=>{var g,E;return(E=(g=t.options).persister)==null?void 0:E.call(g,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function Vh(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 Vw(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 Ww=(x5=class extends Lh{constructor(t){super();le(this,fn);le(this,kc);le(this,pn);le(this,Yt);le(this,va);ee(this,kc,t.client),this.mutationId=t.mutationId,ee(this,Yt,t.mutationCache),ee(this,pn,[]),this.state=t.state||Wh(),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,pn).includes(t)||(N(this,pn).push(t),this.clearGcTimeout(),N(this,Yt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,pn,N(this,pn).filter(r=>r!==t)),this.scheduleGc(),N(this,Yt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,pn).length||(this.state.status==="pending"?this.scheduleGc():N(this,Yt).remove(this))}continue(){var t;return((t=N(this,va))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,c,l,u,d,f,m,y,g,E,v,w,A,C,D,L,T,h,b;const r=()=>{Ae(this,fn,Ss).call(this,{type:"continue"})},n={client:N(this,kc),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,va,Nh({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(x,S)=>{Ae(this,fn,Ss).call(this,{type:"failed",failureCount:x,error:S})},onPause:()=>{Ae(this,fn,Ss).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,Yt).canRun(this)}));const s=this.state.status==="pending",a=!N(this,va).canStart();try{if(s)r();else{Ae(this,fn,Ss).call(this,{type:"pending",variables:t,isPaused:a}),await((i=(o=N(this,Yt).config).onMutate)==null?void 0:i.call(o,t,this,n));const S=await((l=(c=this.options).onMutate)==null?void 0:l.call(c,t,n));S!==this.state.context&&Ae(this,fn,Ss).call(this,{type:"pending",context:S,variables:t,isPaused:a})}const x=await N(this,va).start();return await((d=(u=N(this,Yt).config).onSuccess)==null?void 0:d.call(u,x,t,this.state.context,this,n)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,x,t,this.state.context,n)),await((g=(y=N(this,Yt).config).onSettled)==null?void 0:g.call(y,x,null,this.state.variables,this.state.context,this,n)),await((v=(E=this.options).onSettled)==null?void 0:v.call(E,x,null,t,this.state.context,n)),Ae(this,fn,Ss).call(this,{type:"success",data:x}),x}catch(x){try{throw await((A=(w=N(this,Yt).config).onError)==null?void 0:A.call(w,x,t,this.state.context,this,n)),await((D=(C=this.options).onError)==null?void 0:D.call(C,x,t,this.state.context,n)),await((T=(L=N(this,Yt).config).onSettled)==null?void 0:T.call(L,void 0,x,this.state.variables,this.state.context,this,n)),await((b=(h=this.options).onSettled)==null?void 0:b.call(h,void 0,x,t,this.state.context,n)),x}finally{Ae(this,fn,Ss).call(this,{type:"error",error:x})}}finally{N(this,Yt).runNext(this)}}},kc=new WeakMap,pn=new WeakMap,Yt=new WeakMap,va=new WeakMap,fn=new WeakSet,Ss=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),kt.batch(()=>{N(this,pn).forEach(n=>{n.onMutationUpdate(t)}),N(this,Yt).notify({mutation:this,type:"updated",action:t})})},x5);function Wh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qw=(w5=class extends Ta{constructor(t={}){super();le(this,jn);le(this,Kr);le(this,Cc);this.config=t,ee(this,jn,new Set),ee(this,Kr,new Map),ee(this,Cc,0)}build(t,r,n){const s=new Ww({client:t,mutationCache:this,mutationId:++Ku(this,Cc)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){N(this,jn).add(t);const r=Mc(t);if(typeof r=="string"){const n=N(this,Kr).get(r);n?n.push(t):N(this,Kr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(N(this,jn).delete(t)){const r=Mc(t);if(typeof r=="string"){const n=N(this,Kr).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,Kr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Mc(t);if(typeof r=="string"){const n=N(this,Kr).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=Mc(t);if(typeof r=="string"){const s=(n=N(this,Kr).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(){kt.batch(()=>{N(this,jn).forEach(t=>{this.notify({type:"removed",mutation:t})}),N(this,jn).clear(),N(this,Kr).clear()})}getAll(){return Array.from(N(this,jn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Fh(r,n))}findAll(t={}){return this.getAll().filter(r=>Fh(t,r))}notify(t){kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return kt.batch(()=>Promise.all(t.map(r=>r.continue().catch(jt))))}},jn=new WeakMap,Kr=new WeakMap,Cc=new WeakMap,w5);function Mc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Yw=(v5=class extends Ta{constructor(t,r){super();le(this,qn);le(this,Vn);le(this,Es);le(this,ar);le(this,Wn);ee(this,Vn,t),this.setOptions(r),this.bindMethods(),Ae(this,qn,Zu).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,Vn).defaultMutationOptions(t),Oc(this.options,r)||N(this,Vn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,ar),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Os(r.mutationKey)!==Os(this.options.mutationKey)?this.reset():((n=N(this,ar))==null?void 0:n.state.status)==="pending"&&N(this,ar).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=N(this,ar))==null||t.removeObserver(this)}onMutationUpdate(t){Ae(this,qn,Zu).call(this),Ae(this,qn,Im).call(this,t)}getCurrentResult(){return N(this,Es)}reset(){var t;(t=N(this,ar))==null||t.removeObserver(this),ee(this,ar,void 0),Ae(this,qn,Zu).call(this),Ae(this,qn,Im).call(this)}mutate(t,r){var n;return ee(this,Wn,r),(n=N(this,ar))==null||n.removeObserver(this),ee(this,ar,N(this,Vn).getMutationCache().build(N(this,Vn),this.options)),N(this,ar).addObserver(this),N(this,ar).execute(t)}},Vn=new WeakMap,Es=new WeakMap,ar=new WeakMap,Wn=new WeakMap,qn=new WeakSet,Zu=function(){var r;const t=((r=N(this,ar))==null?void 0:r.state)??Wh();ee(this,Es,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Im=function(t){kt.batch(()=>{var r,n,s,a,o,i,c,l;if(N(this,Wn)&&this.hasListeners()){const u=N(this,Es).variables,d=N(this,Es).context,f={client:N(this,Vn),meta:this.options.meta,mutationKey:this.options.mutationKey};(t==null?void 0:t.type)==="success"?((n=(r=N(this,Wn)).onSuccess)==null||n.call(r,t.data,u,d,f),(a=(s=N(this,Wn)).onSettled)==null||a.call(s,t.data,null,u,d,f)):(t==null?void 0:t.type)==="error"&&((i=(o=N(this,Wn)).onError)==null||i.call(o,t.error,u,d,f),(l=(c=N(this,Wn)).onSettled)==null||l.call(c,void 0,t.error,u,d,f))}this.listeners.forEach(u=>{u(N(this,Es))})})},v5),Kw=(E5=class extends Ta{constructor(t={}){super();le(this,mn);this.config=t,ee(this,mn,new Map)}build(t,r,n){const s=r.queryKey,a=r.queryHash??md(s,r);let o=this.get(a);return o||(o=new Hw({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){N(this,mn).has(t.queryHash)||(N(this,mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=N(this,mn).get(t.queryHash);r&&(t.destroy(),r===t&&N(this,mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,mn).get(t)}getAll(){return[...N(this,mn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Bh(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Bh(t,n)):r}notify(t){kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},mn=new WeakMap,E5),Zw=(k5=class{constructor(e={}){le(this,ft);le(this,ks);le(this,Cs);le(this,So);le(this,Ao);le(this,Ts);le(this,Po);le(this,Io);ee(this,ft,e.queryCache||new Kw),ee(this,ks,e.mutationCache||new qw),ee(this,Cs,e.defaultOptions||{}),ee(this,So,new Map),ee(this,Ao,new Map),ee(this,Ts,0)}mount(){Ku(this,Ts)._++,N(this,Ts)===1&&(ee(this,Po,gd.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ft).onFocus())})),ee(this,Io,_c.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ft).onOnline())})))}unmount(){var e,t;Ku(this,Ts)._--,N(this,Ts)===0&&((e=N(this,Po))==null||e.call(this),ee(this,Po,void 0),(t=N(this,Io))==null||t.call(this),ee(this,Io,void 0))}isFetching(e){return N(this,ft).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,ks).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,ft).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=N(this,ft).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Xn(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return N(this,ft).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,ft).get(n.queryHash),a=s==null?void 0:s.state.data,o=Fw(t,a);if(o!==void 0)return N(this,ft).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return kt.batch(()=>N(this,ft).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,ft).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=N(this,ft);kt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=N(this,ft);return kt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=kt.batch(()=>N(this,ft).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(jt).catch(jt)}invalidateQueries(e,t={}){return kt.batch(()=>(N(this,ft).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=kt.batch(()=>N(this,ft).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,r);return r.throwOnError||(a=a.catch(jt)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=N(this,ft).build(this,t);return r.isStaleByTime(Xn(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jt).catch(jt)}fetchInfiniteQuery(e){return e.behavior=jh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jt).catch(jt)}ensureInfiniteQueryData(e){return e.behavior=jh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _c.isOnline()?N(this,ks).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,ft)}getMutationCache(){return N(this,ks)}getDefaultOptions(){return N(this,Cs)}setDefaultOptions(e){ee(this,Cs,e)}setQueryDefaults(e,t){N(this,So).set(Os(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,So).values()],r={};return t.forEach(n=>{Uo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){N(this,Ao).set(Os(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,Ao).values()],r={};return t.forEach(n=>{Uo(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...N(this,Cs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=md(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===Dc&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,Cs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,ft).clear(),N(this,ks).clear()}},ft=new WeakMap,ks=new WeakMap,Cs=new WeakMap,So=new WeakMap,Ao=new WeakMap,Ts=new WeakMap,Po=new WeakMap,Io=new WeakMap,k5),qh=xt.createContext(void 0),Nc=e=>{const t=xt.useContext(qh);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Xw=({client:e,children:t})=>(xt.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),B.jsx(qh.Provider,{value:e,children:t})),Yh=xt.createContext(!1),Qw=()=>xt.useContext(Yh);Yh.Provider;function Jw(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var e3=xt.createContext(Jw()),t3=()=>xt.useContext(e3),r3=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},n3=e=>{xt.useEffect(()=>{e.clearReset()},[e])},s3=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||_h(r,[e.error,n])),a3=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))}},o3=(e,t)=>e.isLoading&&e.isFetching&&!t,i3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Kh=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function c3(e,t,r){var d,f,m,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=Qw(),s=t3(),a=Nc(),o=a.defaultQueryOptions(e);(f=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.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",a3(o),r3(o,s),n3(s);const i=!a.getQueryCache().get(o.queryHash),[c]=xt.useState(()=>new t(a,o)),l=c.getOptimisticResult(o),u=!n&&e.subscribed!==!1;if(xt.useSyncExternalStore(xt.useCallback(E=>{const v=u?c.subscribe(kt.batchCalls(E)):jt;return c.updateResult(),v},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),xt.useEffect(()=>{c.setOptions(o)},[o,c]),i3(o,l))throw Kh(o,c,s);if(s3({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;if((y=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||y.call(m,o,l),o.experimental_prefetchInRender&&!Us&&o3(l,n)){const E=i?Kh(o,c,s):(g=a.getQueryCache().get(o.queryHash))==null?void 0:g.promise;E==null||E.catch(jt).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function l3(e,t){return c3(e,$w)}function gn(e,t){const r=Nc(),[n]=xt.useState(()=>new Yw(r,e));xt.useEffect(()=>{n.setOptions(e)},[n,e]);const s=xt.useSyncExternalStore(xt.useCallback(o=>n.subscribe(kt.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=xt.useCallback((o,i)=>{n.mutate(o,i).catch(jt)},[n]);if(s.error&&_h(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}const u3=M.createContext(null),kd={didCatch:!1,error:null};class d3 extends M.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=kd}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(kd)}}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&&p3(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(kd)}}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=M.createElement(n,c);else if(s!==void 0)i=s;else throw o}return M.createElement(u3.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},i)}}function p3(){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]))}const Zh=e=>{let t;const r=new Set,n=(l,u)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const f=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(m=>m(t,f))}},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},f3=(e=>e?Zh(e):Zh),m3=e=>e;function h3(e,t=m3){const r=M.useSyncExternalStore(e.subscribe,M.useCallback(()=>t(e.getState()),[e,t]),M.useCallback(()=>t(e.getInitialState()),[e,t]));return M.useDebugValue(r),r}const Xh=e=>{const t=f3(e),r=n=>h3(t,n);return Object.assign(r,t),r},b3=(e=>e?Xh(e):Xh),Qh={disclaimerAccepted:!0,currentTime:Date.now(),swapExecution:{}},Z=b3((e,t)=>({state:Qh,updateState:r=>e(n=>({state:{...n.state,...r}})),updateSwapExecution:r=>e(n=>({state:{...n.state,swapExecution:{...n.state.swapExecution,...r}}})),resetState:()=>{e({state:{...Qh,currentTime:Date.now(),swapExecution:{...t().state.swapExecution,error:void 0,parsedError:void 0,status:void 0},isMarketOrder:t().state.isMarketOrder}})}}));(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 Oo({children:e,className:t=""}){return B.jsx("p",{className:`${t} ${Ne("Text")}`,children:e})}const Jh=M.createContext({});function y3({children:e,...t}){return B.jsx(Jh.Provider,{value:t,children:e})}const Zr=()=>M.useContext(Jh);var mt=(e=>(e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILED=3]="FAILED",e))(mt||{});const g3=({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:`${Ne("Spinner")} ${e}`,style:a})};function Lc({className:e="",body:t,footerLink:r,footerText:n,title:s,children:a}){return B.jsxs("div",{className:`${Ne("TradeStepLayout")} ${e}`,children:[B.jsxs("div",{className:Ne("TradeStepLayoutHeader"),children:[B.jsx(k3,{}),s&&B.jsx(Oo,{className:Ne("TradeStepLayoutTitle"),children:s})]}),t&&B.jsx("div",{className:Ne("TradeStepLayoutBody"),children:t}),B.jsx(x3,{link:r,text:n}),a]})}const x3=({link:e,text:t})=>{const{swapStatus:r}=Zr();return!e&&!t?null:B.jsxs("div",{className:Ne("TradeStepLayoutFooter"),children:[B.jsx(T3,{}),e?B.jsx(w3,{link:e,text:t}):r===mt.FAILED?void 0:B.jsx(Oo,{children:t})]})},w3=({link:e,text:t})=>B.jsx("a",{target:"_blank",className:Ne("TradeStepLayoutFooterLink"),href:e,children:t});function v3(){const{components:e}=Zr();return e.SuccessIcon?e.SuccessIcon:B.jsxs("svg",{fill:"none",viewBox:"0 0 16 16",className:Ne("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 E3(){const{components:e}=Zr();return e.FailedIcon?e.FailedIcon:B.jsxs("svg",{className:Ne("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 k3=()=>{const{swapStatus:e}=Zr();return e===mt.SUCCESS?B.jsx(v3,{}):e===mt.FAILED?B.jsx(E3,{}):B.jsx(C3,{})},C3=()=>{const{components:e}=Zr();return e.Loader?e.Loader:B.jsx(g3,{size:60,borderWidth:5,className:Ne("TradeStepLayoutSpinner")})},T3=()=>{const{totalSteps:e,currentStepIndex:t=0,swapStatus:r}=Zr();return r!==mt.LOADING||e===1?null:B.jsx("div",{className:Ne("StepIndicator"),children:B.jsx("div",{style:{width:`${100/(e||0)}%`,left:`${t*100/(e||0)}%`},className:Ne("StepIndicatorLine")})})},S3=({error:e,footerLink:t,footerText:r})=>B.jsx(Lc,{footerLink:t,footerText:r,body:e||B.jsx("p",{className:Ne("FailedContentMsg"),children:"Something went wrong"}),className:Ne("FailedContent")});function A3(){return B.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",className:Ne("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 e1=({inTokenOnly:e})=>{const{inToken:t,outToken:r,inAmount:n,outAmount:s,components:a}=Zr();return B.jsxs("div",{className:Ne("TradePreview"),children:[B.jsx(t1,{token:t,amount:n,Logo:a==null?void 0:a.SrcTokenLogo}),!e&&B.jsxs(B.Fragment,{children:[B.jsx(A3,{}),B.jsx(t1,{token:r,amount:s,Logo:a==null?void 0:a.DstTokenLogo})]})]})},t1=({token:e,amount:t,Logo:r})=>B.jsxs("div",{className:Ne("TradePreviewToken"),children:[r||B.jsx("img",{src:e==null?void 0:e.logoUrl,className:Ne("TradepPreviewLogo"),alt:`${e==null?void 0:e.symbol} logo`}),B.jsxs(Oo,{children:[t," ",e==null?void 0:e.symbol]})]});function P3({title:e,footerLink:t,footerText:r,hideTokens:n}){return B.jsx(Lc,{title:e,className:Ne("Success"),body:!n&&B.jsx(e1,{}),footerLink:t,footerText:r})}const r1=({$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:`${Ne("FlexColumn")} ${n}`,style:a,children:r})};function n1({styles:e={},className:t=""}){return B.jsx("div",{style:e,className:`${Ne("SkeletonLoader")} ${t}`})}const I3=()=>B.jsxs("div",{className:`${Ne("MainContentLoader")}`,children:[B.jsx(n1,{className:`${Ne("MainContentCircleLoader")}`}),B.jsx(n1,{className:`${Ne("MainContentRectengularLoader")}`})]}),B3=({fromTitle:e,toTitle:t,inUsd:r,outUsd:n})=>{const{swapStatus:s,outAmount:a,inAmount:o,inToken:i,outToken:c,components:l,totalSteps:u}=Zr(),d=B.jsx(a1,{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(F3,{}):B.jsxs(r1,{children:[d,B.jsx(I3,{})]}):B.jsx(r1,{children:d})},s1=({amount:e,token:t,usd:r,title:n,Logo:s})=>B.jsxs("div",{className:`${Ne("MainToken")}`,children:[B.jsxs("div",{className:`${Ne("MainTokenLeft")}`,children:[B.jsx(Oo,{className:`${Ne("MainTokenTitle")}`,children:n}),B.jsx(Oo,{className:` ${Ne("MainTokenAmount")}`,children:`${e&&Number(e)>0?e:""} ${(t==null?void 0:t.symbol)||""}`}),r&&B.jsx("div",{className:` ${Ne("MainTokenUsd")}`,children:r})]}),s||B.jsx("div",{className:` ${Ne("MainTokenLogo")}`,children:t!=null&&t.logoUrl?B.jsx("img",{src:t==null?void 0:t.logoUrl,alt:"Token logo"}):null})]});function F3(){const{currentStep:e}=Zr();return e?B.jsx(Lc,{footerLink:e.footerLink,footerText:e.footerText,title:e.title,body:e.hideTokens?void 0:B.jsx(e1,{inTokenOnly:e==null?void 0:e.inTokenOnly})}):null}const a1=({fromTitle:e,inUsd:t,inToken:r,toTitle:n,outUsd:s,outToken:a,inAmount:o,outAmount:i,SrcTokenLogo:c,DstTokenLogo:l})=>B.jsxs("div",{className:`${Ne("Main")}`,children:[B.jsx(s1,{title:e||"Swap from",usd:t,token:r,amount:o,Logo:c}),B.jsx(s1,{title:n||"Swap to",usd:s,token:a,amount:i,Logo:l})]}),Qn=e=>B.jsx(y3,{...e,children:B.jsx(U3,{})}),U3=()=>{const{swapStatus:e,components:t,className:r}=Zr();return B.jsx("div",{className:`${Ne("SwapFlow")} ${r}`,children:e===mt.SUCCESS?t==null?void 0:t.Success:e===mt.FAILED?t==null?void 0:t.Failed:t==null?void 0:t.Main})};Qn.Success=P3,Qn.Failed=S3,Qn.Main=B3,Qn.StepLayout=Lc;var Mt=(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))(Mt||{}),Ds=(e=>(e.WRAP="wrap",e.APPROVE="approve",e.CREATE="create",e))(Ds||{});const O3=e=>e.replace(/,/g,""),D3=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}},o1=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(" ")},Cd=(e,t)=>e?`${e.substring(0,(t==null?void 0:t.start)||6)}...${e.substring(e.length-((t==null?void 0:t.end)||5))}`:"",_3=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 Do(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 f=o.slice(0,t).replace(/0+$/,""),m=f?"."+f:"";return n+a+m}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 Td=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"))},M3=e=>{switch(e){case Ft.base.id:return 1e-4;default:return .01}},i1=(e,t,r)=>{if(!j(e.srcAmountFilled||0).gt(0)||!j(e.dstAmountFilled||0).gt(0))return"";const n=bn(t,e.srcAmountFilled),s=bn(r,e.dstAmountFilled);return j(s).div(n).toFixed()},c1=(e,t,r)=>{if(e.type===ut.TWAP_MARKET)return"";const n=bn(t,e.srcAmountPerTrade),s=bn(r,e.dstMinAmountPerTrade);return j(s).div(n).toFixed()},l1=(e,t)=>{const r=Bs(t);return r&&Is(e.address)?r.wToken:e};function u1(e){return e?e/864e5:0}function Sd(e){return e?e/6e4:0}const N3=(e,t)=>e?ut.TWAP_MARKET:t===1?ut.LIMIT:ut.TWAP_LIMIT,Ad=(e,t,r)=>{const n=Bs(r);return Is((e==null?void 0:e.address)||"")&&Ps((t==null?void 0:t.address)||"",(n==null?void 0:n.wToken.address)||"")},Pd=(e,t,r)=>{const n=Bs(r);return Ps((e==null?void 0:e.address)||"",(n==null?void 0:n.wToken.address)||"")&&Is((t==null?void 0:t.address)||"")},_o=(e,t)=>{if(!t)return"";const r=Bs(t);return`${r==null?void 0:r.explorer}/tx/${e}`};function p(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 L3(){return{}}const z3=p({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}),R3=p({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}),H3=p({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}),$3=p({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}),G3=p({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}),j3=p({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}),d1="2.43.3";let Mo={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${d1}`},$=class Bm extends Error{constructor(t,r={}){var i;const n=(()=>{var c;return r.cause instanceof Bm?r.cause.details:(c=r.cause)!=null&&c.message?r.cause.message:r.details})(),s=r.cause instanceof Bm&&r.cause.docsPath||r.docsPath,a=(i=Mo.getDocsUrl)==null?void 0:i.call(Mo,{...r,docsPath:s}),o=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...n?[`Details: ${n}`]:[],...Mo.version?[`Version: ${Mo.version}`]:[]].join(`
|
|
65
|
-
`);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=d1}walk(t){return p1(this,t)}};function p1(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?p1(e.cause,t):t?null:e}let f1=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"})}},V3=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 W3 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 q3=class extends ${constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function Or(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function ct(e){return Or(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function Zt(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}let m1=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"})}},h1=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 b1 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 _s(e,{dir:t,size:r=32}={}){return typeof e=="string"?Jn(e,{dir:t,size:r}):Y3(e,{dir:t,size:r})}function Jn(e,{dir:t,size:r=32}={}){if(r===null)return e;const n=e.replace("0x","");if(n.length>r*2)throw new h1({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function Y3(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new h1({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}const K3=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Fe(e,t={}){return typeof e=="number"||typeof e=="bigint"?q(e,t):typeof e=="string"?Sa(e,t):typeof e=="boolean"?y1(e,t):vt(e,t)}function y1(e,t={}){const r=`0x${Number(e)}`;return typeof t.size=="number"?(Dr(r,{size:t.size}),_s(r,{size:t.size})):r}function vt(e,t={}){let r="";for(let s=0;s<e.length;s++)r+=K3[e[s]];const n=`0x${r}`;return typeof t.size=="number"?(Dr(n,{size:t.size}),_s(n,{dir:"right",size:t.size})):n}function q(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 f1({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?_s(i,{size:n}):i}const Z3=new TextEncoder;function Sa(e,t={}){const r=Z3.encode(e);return vt(r,t)}const X3=new TextEncoder;function xn(e,t={}){return typeof e=="number"||typeof e=="bigint"?J3(e,t):typeof e=="boolean"?Q3(e,t):Or(e)?or(e,t):Ms(e,t)}function Q3(e,t={}){const r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(Dr(r,{size:t.size}),_s(r,{size:t.size})):r}const wn={zero:48,nine:57,A:65,F:70,a:97,f:102};function g1(e){if(e>=wn.zero&&e<=wn.nine)return e-wn.zero;if(e>=wn.A&&e<=wn.F)return e-(wn.A-10);if(e>=wn.a&&e<=wn.f)return e-(wn.a-10)}function or(e,t={}){let r=e;t.size&&(Dr(r,{size:t.size}),r=_s(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=g1(n.charCodeAt(i++)),l=g1(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 J3(e,t){const r=q(e,t);return or(r)}function Ms(e,t={}){const r=X3.encode(e);return typeof t.size=="number"?(Dr(r,{size:t.size}),_s(r,{dir:"right",size:t.size})):r}function Dr(e,{size:t}){if(ct(e)>t)throw new q3({givenSize:ct(e),maxSize:t})}function Le(e,t={}){const{signed:r}=t;t.size&&Dr(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 e8(e,t={}){let r=e;if(t.size&&(Dr(r,{size:t.size}),r=Zt(r)),Zt(r)==="0x00")return!1;if(Zt(r)==="0x01")return!0;throw new W3(r)}function ir(e,t={}){return Number(Le(e,t))}function zc(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 x1={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Ns(e,t){const r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?ir(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?ir(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?x1[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=t8(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 Rc=zc("transaction",Ns);function t8(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 Id(e,t){const r=(e.transactions??[]).map(n=>typeof n=="string"?n:Ns(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 Bd=zc("block",Id);function Xr(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}:{}}}const w1={"0x0":"reverted","0x1":"success"};function Hc(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=>Xr(n)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?ir(e.transactionIndex):null,status:e.status?w1[e.status]:null,type:e.type?x1[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}const Fd=zc("transactionReceipt",Hc),r8={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function _r(e,t){const r={};return typeof e.authorizationList<"u"&&(r.authorizationList=n8(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=>vt(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=q(e.gas)),typeof e.gasPrice<"u"&&(r.gasPrice=q(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=q(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(r.maxFeePerGas=q(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=q(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(r.nonce=q(e.nonce)),typeof e.to<"u"&&(r.to=e.to),typeof e.type<"u"&&(r.type=r8[e.type]),typeof e.value<"u"&&(r.value=q(e.value)),r}const Ud=zc("transactionRequest",_r);function n8(e){return e.map(t=>({address:t.address,r:t.r?q(BigInt(t.r)):t.r,s:t.s?q(BigInt(t.s)):t.s,chainId:q(t.chainId),nonce:q(t.nonce),...typeof t.yParity<"u"?{yParity:q(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:q(t.v)}:{}}))}const s8=2n**16n-1n,Ls=2n**256n-1n,Od=50000n,v1=s8*32n,E1={block:Bd({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=E1.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?Le(e.l1BatchNumber):null,l1BatchTimestamp:e.l1BatchTimestamp?Le(e.l1BatchTimestamp):null,transactions:t}}}),transaction:Rc({format(e){const t={};return e.type==="0x71"?t.type="eip712":e.type==="0xff"&&(t.type="priority"),{...t,l1BatchNumber:e.l1BatchNumber?Le(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?Le(e.l1BatchTxIndex):null}}}),transactionReceipt:Fd({format(e){return{l1BatchNumber:e.l1BatchNumber?Le(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?Le(e.l1BatchTxIndex):null,logs:e.logs.map(t=>({...Xr(t),l1BatchNumber:t.l1BatchNumber?Le(t.l1BatchNumber):null,transactionLogIndex:ir(t.transactionLogIndex),logType:t.logType})),l2ToL1Logs:e.l2ToL1Logs.map(t=>({blockNumber:Le(t.blockHash),blockHash:t.blockHash,l1BatchNumber:t.l1BatchNumber?Le(t.l1BatchNumber):null,transactionIndex:Le(t.transactionIndex),shardId:Le(t.shardId),isService:t.isService,sender:t.sender,key:t.key,value:t.value,transactionHash:t.transactionHash,logIndex:Le(t.logIndex)}))}}}),transactionRequest:Ud({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(e){return e.gasPerPubdata||e.paymaster&&e.paymasterInput||e.factoryDeps||e.customSignature?{eip712Meta:{...e.gasPerPubdata?{gasPerPubdata:Fe(e.gasPerPubdata)}:{gasPerPubdata:Fe(Od)},...e.paymaster&&e.paymasterInput?{paymasterParams:{paymaster:e.paymaster,paymasterInput:Array.from(or(e.paymasterInput))}}:{},...e.factoryDeps?{factoryDeps:e.factoryDeps.map(t=>Array.from(or(t)))}:{},...e.customSignature?{customSignature:Array.from(or(e.customSignature))}:{}},type:"0x71"}:{}}})};function cr(e){return typeof e[0]=="string"?lr(e):a8(e)}function a8(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 lr(e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}let k1=class extends ${constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},C1=class extends ${constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},o8=class extends ${constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const i8={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 o8({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new C1({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new k1({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 k1({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 Dd(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(i8);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}function Qr(e,t="hex"){const r=T1(e),n=Dd(new Uint8Array(r.length));return r.encode(n),t==="hex"?vt(n.bytes):n.bytes}function T1(e){return Array.isArray(e)?c8(e.map(t=>T1(t))):l8(e)}function c8(e){const t=e.reduce((s,a)=>s+a.length,0),r=S1(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 l8(e){const t=typeof e=="string"?or(e):e,r=S1(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 S1(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.")}const u8={gwei:9,wei:18},d8={ether:-9,wei:9};function A1(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 _d(e,t="wei"){return A1(e,u8[t])}function Xt(e,t="wei"){return A1(e,d8[t])}function No(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(`
|
|
66
|
-
`)}class p8 extends ${constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class f8 extends ${constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",No(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 m8=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 h8 extends ${constructor(t,{account:r,docsPath:n,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:f}){var y;const m=No({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 f<"u"&&`${_d(f)} ${((y=s==null?void 0:s.nativeCurrency)==null?void 0:y.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Xt(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Xt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Xt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class P1 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 I1 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 B1 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 b8 extends ${constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}function y8(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?Fe(n):"0x",o,s?Fe(s):"0x",..._a({},a)])}return t}function Md(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=>or(a)):e.blobs,s=[];for(const a of n)s.push(Uint8Array.from(t.blobToKzgCommitment(a)));return r==="bytes"?s:s.map(a=>vt(a))}function Nd(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=>or(o)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(o=>or(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=>vt(o))}const Aa=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function g8(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Lo(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function zs(e,...t){if(!g8(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 x8(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Lo(e.outputLen),Lo(e.blockLen)}function Pa(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 F1(e,t){zs(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function w8(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function es(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ld(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Jr(e,t){return e<<32-t|e>>>t}const v8=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function E8(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function k8(e){for(let t=0;t<e.length;t++)e[t]=E8(e[t]);return e}const U1=v8?e=>e:k8;function C8(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function $c(e){return typeof e=="string"&&(e=C8(e)),zs(e),e}function T8(...e){let t=0;for(let n=0;n<e.length;n++){const s=e[n];zs(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 zd{}function Gc(e){const t=n=>e().update($c(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function S8(e=32){if(Aa&&typeof Aa.getRandomValues=="function")return Aa.getRandomValues(new Uint8Array(e));if(Aa&&typeof Aa.randomBytes=="function")return Uint8Array.from(Aa.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function A8(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 P8(e,t,r){return e&t^~e&r}function I8(e,t,r){return e&t^e&r^t&r}class O1 extends zd{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=Ld(this.buffer)}update(t){Pa(this),t=$c(t),zs(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=Ld(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){Pa(this),F1(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:s,isLE:a}=this;let{pos:o}=this;r[o++]=128,es(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(n,0),o=0);for(let d=o;d<s;d++)r[d]=0;A8(n,s-8,BigInt(this.length*8),a),this.process(n,0);const i=Ld(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 ts=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Nt=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Lt=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),jc=BigInt(2**32-1),D1=BigInt(32);function B8(e,t=!1){return t?{h:Number(e&jc),l:Number(e>>D1&jc)}:{h:Number(e>>D1&jc)|0,l:Number(e&jc)|0}}function _1(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}=B8(e[a],t);[n[a],s[a]]=[o,i]}return[n,s]}const M1=(e,t,r)=>e>>>r,N1=(e,t,r)=>e<<32-r|t>>>r,Ia=(e,t,r)=>e>>>r|t<<32-r,Ba=(e,t,r)=>e<<32-r|t>>>r,Vc=(e,t,r)=>e<<64-r|t>>>r-32,Wc=(e,t,r)=>e>>>r-32|t<<64-r,F8=(e,t,r)=>e<<r|t>>>32-r,U8=(e,t,r)=>t<<r|e>>>32-r,O8=(e,t,r)=>t<<r-32|e>>>64-r,D8=(e,t,r)=>e<<r-32|t>>>64-r;function vn(e,t,r,n){const s=(t>>>0)+(n>>>0);return{h:e+r+(s/2**32|0)|0,l:s|0}}const _8=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),M8=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,N8=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),L8=(e,t,r,n,s)=>t+r+n+s+(e/2**32|0)|0,z8=(e,t,r,n,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(s>>>0),R8=(e,t,r,n,s,a)=>t+r+n+s+a+(e/2**32|0)|0,H8=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]),rs=new Uint32Array(64);class $8 extends O1{constructor(t=32){super(64,t,8,!1),this.A=ts[0]|0,this.B=ts[1]|0,this.C=ts[2]|0,this.D=ts[3]|0,this.E=ts[4]|0,this.F=ts[5]|0,this.G=ts[6]|0,this.H=ts[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)rs[d]=t.getUint32(r,!1);for(let d=16;d<64;d++){const f=rs[d-15],m=rs[d-2],y=Jr(f,7)^Jr(f,18)^f>>>3,g=Jr(m,17)^Jr(m,19)^m>>>10;rs[d]=g+rs[d-7]+y+rs[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 f=Jr(i,6)^Jr(i,11)^Jr(i,25),m=u+f+P8(i,c,l)+H8[d]+rs[d]|0,g=(Jr(n,2)^Jr(n,13)^Jr(n,22))+I8(n,s,a)|0;u=l,l=c,c=i,i=o+m|0,o=a,a=s,s=n,n=m+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(){es(rs)}destroy(){this.set(0,0,0,0,0,0,0,0),es(this.buffer)}}const L1=_1(["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))),G8=L1[0],j8=L1[1],ns=new Uint32Array(80),ss=new Uint32Array(80);class z1 extends O1{constructor(t=64){super(128,t,16,!1),this.Ah=Lt[0]|0,this.Al=Lt[1]|0,this.Bh=Lt[2]|0,this.Bl=Lt[3]|0,this.Ch=Lt[4]|0,this.Cl=Lt[5]|0,this.Dh=Lt[6]|0,this.Dl=Lt[7]|0,this.Eh=Lt[8]|0,this.El=Lt[9]|0,this.Fh=Lt[10]|0,this.Fl=Lt[11]|0,this.Gh=Lt[12]|0,this.Gl=Lt[13]|0,this.Hh=Lt[14]|0,this.Hl=Lt[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:f,Gh:m,Gl:y,Hh:g,Hl:E}=this;return[t,r,n,s,a,o,i,c,l,u,d,f,m,y,g,E]}set(t,r,n,s,a,o,i,c,l,u,d,f,m,y,g,E){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=f|0,this.Gh=m|0,this.Gl=y|0,this.Hh=g|0,this.Hl=E|0}process(t,r){for(let A=0;A<16;A++,r+=4)ns[A]=t.getUint32(r),ss[A]=t.getUint32(r+=4);for(let A=16;A<80;A++){const C=ns[A-15]|0,D=ss[A-15]|0,L=Ia(C,D,1)^Ia(C,D,8)^M1(C,D,7),T=Ba(C,D,1)^Ba(C,D,8)^N1(C,D,7),h=ns[A-2]|0,b=ss[A-2]|0,x=Ia(h,b,19)^Vc(h,b,61)^M1(h,b,6),S=Ba(h,b,19)^Wc(h,b,61)^N1(h,b,6),I=N8(T,S,ss[A-7],ss[A-16]),F=L8(I,L,x,ns[A-7],ns[A-16]);ns[A]=F|0,ss[A]=I|0}let{Ah:n,Al:s,Bh:a,Bl:o,Ch:i,Cl:c,Dh:l,Dl:u,Eh:d,El:f,Fh:m,Fl:y,Gh:g,Gl:E,Hh:v,Hl:w}=this;for(let A=0;A<80;A++){const C=Ia(d,f,14)^Ia(d,f,18)^Vc(d,f,41),D=Ba(d,f,14)^Ba(d,f,18)^Wc(d,f,41),L=d&m^~d&g,T=f&y^~f&E,h=z8(w,D,T,j8[A],ss[A]),b=R8(h,v,C,L,G8[A],ns[A]),x=h|0,S=Ia(n,s,28)^Vc(n,s,34)^Vc(n,s,39),I=Ba(n,s,28)^Wc(n,s,34)^Wc(n,s,39),F=n&a^n&i^a&i,_=s&o^s&c^o&c;v=g|0,w=E|0,g=m|0,E=y|0,m=d|0,y=f|0,{h:d,l:f}=vn(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 k=_8(x,I,_);n=M8(k,b,S,F),s=k|0}({h:n,l:s}=vn(this.Ah|0,this.Al|0,n|0,s|0)),{h:a,l:o}=vn(this.Bh|0,this.Bl|0,a|0,o|0),{h:i,l:c}=vn(this.Ch|0,this.Cl|0,i|0,c|0),{h:l,l:u}=vn(this.Dh|0,this.Dl|0,l|0,u|0),{h:d,l:f}=vn(this.Eh|0,this.El|0,d|0,f|0),{h:m,l:y}=vn(this.Fh|0,this.Fl|0,m|0,y|0),{h:g,l:E}=vn(this.Gh|0,this.Gl|0,g|0,E|0),{h:v,l:w}=vn(this.Hh|0,this.Hl|0,v|0,w|0),this.set(n,s,a,o,i,c,l,u,d,f,m,y,g,E,v,w)}roundClean(){es(ns,ss)}destroy(){es(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class V8 extends z1{constructor(){super(48),this.Ah=Nt[0]|0,this.Al=Nt[1]|0,this.Bh=Nt[2]|0,this.Bl=Nt[3]|0,this.Ch=Nt[4]|0,this.Cl=Nt[5]|0,this.Dh=Nt[6]|0,this.Dl=Nt[7]|0,this.Eh=Nt[8]|0,this.El=Nt[9]|0,this.Fh=Nt[10]|0,this.Fl=Nt[11]|0,this.Gh=Nt[12]|0,this.Gl=Nt[13]|0,this.Hh=Nt[14]|0,this.Hl=Nt[15]|0}}const Rd=Gc(()=>new $8),W8=Gc(()=>new z1),q8=Gc(()=>new V8),R1=Rd;function H1(e,t){const r=t||"hex",n=R1(Or(e,{strict:!1})?xn(e):e);return r==="bytes"?n:Fe(n)}function Y8(e){const{commitment:t,version:r=1}=e,n=e.to??(typeof t=="string"?"hex":"bytes"),s=H1(t,"bytes");return s.set([r],0),n==="bytes"?s:vt(s)}function $1(e){const{commitments:t,version:r}=e,n=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const a of t)s.push(Y8({commitment:a,to:n,version:r}));return s}const G1=6,j1=32,Hd=4096,V1=j1*Hd,W1=V1*G1-1-1*Hd*G1,q1=1;class K8 extends ${constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"})}}class Y1 extends ${constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Z8 extends ${constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"})}}class X8 extends ${constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${q1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"})}}function Q8(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?or(e.data):e.data,n=ct(r);if(!n)throw new Y1;if(n>W1)throw new K8({maxSize:W1,size:n});const s=[];let a=!0,o=0;for(;a;){const i=Dd(new Uint8Array(V1));let c=0;for(;c<Hd;){const l=r.slice(o,o+(j1-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=>vt(i.bytes))}function K1(e){const{data:t,kzg:r,to:n}=e,s=e.blobs??Q8({data:t,to:n}),a=e.commitments??Md({blobs:s,kzg:r,to:n}),o=e.proofs??Nd({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}let Ct=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"})}};class $d 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 J8 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 ev 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(`
|
|
64
|
+
`,extractResults:d=>{var f;return(((f=d.data)==null?void 0:f.orderFilleds)||[]).map(m=>({...m,timestamp:new Date(m.timestamp).getTime()}))}})};class kw extends Error{constructor(){super("No graph endpoint found"),this.name="NoGraphEndpointError"}}const Cw=async({chainId:e,signal:t,page:r,limit:n,filters:s})=>{const a=await ww({chainId:e,signal:t,page:r,limit:n,filters:s}),[o,i]=await Promise.all([Ew({chainId:e,orders:a,signal:t}),vw({chainId:e,orders:a,signal:t})]);return a.map(l=>{const u=o==null?void 0:o.filter(d=>d.TWAP_id===Number(l.Contract_id)&&Ps(d.exchange,l.exchange)&&Ps(d.twapAddress,l.twapAddress));return gw(l,e,u,Tw(l,u||[],i))}).sort((l,u)=>u.createdAt-l.createdAt)},Tw=(e,t,r)=>{var i;const n=(i=r==null?void 0:r.find(c=>c.twapId===e.Contract_id.toString()&&Ps(c.twapAddress,e.twapAddress)))==null?void 0:i.status,a=Th(t).reduce((c,l)=>c.plus(l.inAmount),new j(0)).toFixed(),o=Ah(e.ask_srcAmount,a);return Sw(o,e.ask_deadline*1e3,n)},Ah=(e,t)=>{if(!t||!e)return 0;const r=j(t).dividedBy(e).toNumber();return r>=.99?100:r<=0?0:Number((r*100).toFixed(2))},Sw=(e,t,r)=>e===100?lt.Completed:r==="CANCELED"?lt.Canceled:r==="COMPLETED"?lt.Completed:t>Date.now()?lt.Open:lt.Expired,Ph=async({signal:e,page:t,chainId:r,limit:n,config:s,account:a})=>(await Promise.all([s?Cw({chainId:r,signal:e,page:t,limit:n,filters:{accounts:[a],configs:[s]}}):Promise.resolve([]),bw({chainId:r,signal:e,account:a})]).then(([c,l])=>[...c,...l])).sort((c,l)=>l.createdAt-c.createdAt),Aw={version:"0.0.40"};var Ta=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(){}},Pw={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Iw=(f5=class{constructor(){le(this,dn,Pw);le(this,pa,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&N(this,pa)&&e!==N(this,dn)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:N(this,dn),provider:e}),ee(this,dn,e),process.env.NODE_ENV!=="production"&&ee(this,pa,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&ee(this,pa,!0),N(this,dn).setTimeout(e,t)}clearTimeout(e){N(this,dn).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&ee(this,pa,!0),N(this,dn).setInterval(e,t)}clearInterval(e){N(this,dn).clearInterval(e)}},dn=new WeakMap,pa=new WeakMap,f5),Fs=new Iw;function Bw(e){setTimeout(e,0)}var Us=typeof window>"u"||"Deno"in globalThis;function jt(){}function Fw(e,t){return typeof e=="function"?e(t):e}function fd(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ih(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Xn(e,t){return typeof e=="function"?e(t):e}function Er(e,t){return typeof e=="function"?e(t):e}function Bh(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:a,queryKey:o,stale:i}=e;if(o){if(n){if(t.queryHash!==md(o,t.options))return!1}else if(!Uo(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 Fh(e,t){const{exact:r,status:n,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Os(t.options.mutationKey)!==Os(a))return!1}else if(!Uo(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function md(e,t){return((t==null?void 0:t.queryKeyHashFn)||Os)(e)}function Os(e){return JSON.stringify(e,(t,r)=>bd(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Uo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Uo(e[r],t[r])):!1}var Uw=Object.prototype.hasOwnProperty;function hd(e,t){if(e===t)return e;const r=Uh(e)&&Uh(t);if(!r&&!(bd(e)&&bd(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],f=t[u];if(d===f){i[u]=d,(r?l<s:Uw.call(e,u))&&c++;continue}if(d===null||f===null||typeof d!="object"||typeof f!="object"){i[u]=f;continue}const m=hd(d,f);i[u]=m,m===d&&c++}return s===o&&c===s?e:i}function Oc(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 bd(e){if(!Oh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Oh(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Oh(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ow(e){return new Promise(t=>{Fs.setTimeout(t,e)})}function yd(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 hd(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 hd(e,t)}return t}function Dw(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function _w(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Dc=Symbol();function Dh(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Dc&&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===Dc?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _h(e,t){return typeof e=="function"?e(...t):!!e}var Mw=(m5=class extends Ta{constructor(){super();le(this,fa);le(this,gs);le(this,go);ee(this,go,t=>{if(!Us&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){N(this,gs)||this.setEventListener(N(this,go))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,gs))==null||t.call(this),ee(this,gs,void 0))}setEventListener(t){var r;ee(this,go,t),(r=N(this,gs))==null||r.call(this),ee(this,gs,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){N(this,fa)!==t&&(ee(this,fa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof N(this,fa)=="boolean"?N(this,fa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},fa=new WeakMap,gs=new WeakMap,go=new WeakMap,m5),gd=new Mw;function xd(){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 Nw=Bw;function Lw(){let e=[],t=0,r=i=>{i()},n=i=>{i()},s=Nw;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 kt=Lw(),zw=(h5=class extends Ta{constructor(){super();le(this,xo,!0);le(this,xs);le(this,wo);ee(this,wo,t=>{if(!Us&&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,xs)||this.setEventListener(N(this,wo))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,xs))==null||t.call(this),ee(this,xs,void 0))}setEventListener(t){var r;ee(this,wo,t),(r=N(this,xs))==null||r.call(this),ee(this,xs,t(this.setOnline.bind(this)))}setOnline(t){N(this,xo)!==t&&(ee(this,xo,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return N(this,xo)}},xo=new WeakMap,xs=new WeakMap,wo=new WeakMap,h5),_c=new zw;function Rw(e){return Math.min(1e3*2**e,3e4)}function Mh(e){return(e??"online")==="online"?_c.isOnline():!0}var wd=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Nh(e){let t=!1,r=0,n;const s=xd(),a=()=>s.status!=="pending",o=g=>{var E;if(!a()){const v=new wd(g);f(v),(E=e.onCancel)==null||E.call(e,v)}},i=()=>{t=!0},c=()=>{t=!1},l=()=>gd.isFocused()&&(e.networkMode==="always"||_c.isOnline())&&e.canRun(),u=()=>Mh(e.networkMode)&&e.canRun(),d=g=>{a()||(n==null||n(),s.resolve(g))},f=g=>{a()||(n==null||n(),s.reject(g))},m=()=>new Promise(g=>{var E;n=v=>{(a()||l())&&g(v)},(E=e.onPause)==null||E.call(e)}).then(()=>{var g;n=void 0,a()||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(a())return;let g;const E=r===0?e.initialPromise:void 0;try{g=E??e.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(d).catch(v=>{var L;if(a())return;const w=e.retry??(Us?0:3),A=e.retryDelay??Rw,C=typeof A=="function"?A(r,v):A,D=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,v);if(t||!D){f(v);return}r++,(L=e.onFail)==null||L.call(e,r,v),Ow(C).then(()=>l()?void 0:m()).then(()=>{t?f(v):y()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n==null||n(),s),cancelRetry:i,continueRetry:c,canStart:u,start:()=>(u()?y():m().then(y),s)}}var Lh=(b5=class{constructor(){le(this,ma)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fd(this.gcTime)&&ee(this,ma,Fs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Us?1/0:300*1e3))}clearGcTimeout(){N(this,ma)&&(Fs.clearTimeout(N(this,ma)),ee(this,ma,void 0))}},ma=new WeakMap,b5),Hw=(y5=class extends Lh{constructor(t){super();le(this,Yr);le(this,ha);le(this,vo);le(this,Br);le(this,ba);le(this,Bt);le(this,wc);le(this,ya);ee(this,ya,!1),ee(this,wc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,ba,t.client),ee(this,Br,N(this,ba).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,ha,Hh(this.options)),this.state=t.state??N(this,ha),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=N(this,Bt))==null?void 0:t.promise}setOptions(t){if(this.options={...N(this,wc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Hh(this.options);r.data!==void 0&&(this.setState(Rh(r.data,r.dataUpdatedAt)),ee(this,ha,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Br).remove(this)}setData(t,r){const n=yd(this.state.data,t,this.options);return Ae(this,Yr,Yn).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,Yr,Yn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=N(this,Bt))==null?void 0:n.promise;return(s=N(this,Bt))==null||s.cancel(t),r?r.then(jt).catch(jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,ha))}isActive(){return this.observers.some(t=>Er(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Dc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Xn(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,Bt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Bt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),N(this,Br).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,Bt)&&(N(this,ya)?N(this,Bt).cancel({revert:!0}):N(this,Bt).cancelRetry()),this.scheduleGc()),N(this,Br).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ae(this,Yr,Yn).call(this,{type:"invalidate"})}async fetch(t,r){var c,l,u,d,f,m,y,g,E,v,w,A;if(this.state.fetchStatus!=="idle"&&((c=N(this,Bt))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(N(this,Bt))return N(this,Bt).continueRetry(),N(this,Bt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(D=>D.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,ya,!0),n.signal)})},a=()=>{const C=Dh(this.options,r),L=(()=>{const T={client:N(this,ba),queryKey:this.queryKey,meta:this.meta};return s(T),T})();return ee(this,ya,!1),this.options.persister?this.options.persister(C,L,this):C(L)},i=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:N(this,ba),state:this.state,fetchFn:a};return s(C),C})();(l=this.options.behavior)==null||l.onFetch(i,this),ee(this,vo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&Ae(this,Yr,Yn).call(this,{type:"fetch",meta:(d=i.fetchOptions)==null?void 0:d.meta}),ee(this,Bt,Nh({initialPromise:r==null?void 0:r.initialPromise,fn:i.fetchFn,onCancel:C=>{C instanceof wd&&C.revert&&this.setState({...N(this,vo),fetchStatus:"idle"}),n.abort()},onFail:(C,D)=>{Ae(this,Yr,Yn).call(this,{type:"failed",failureCount:C,error:D})},onPause:()=>{Ae(this,Yr,Yn).call(this,{type:"pause"})},onContinue:()=>{Ae(this,Yr,Yn).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}));try{const C=await N(this,Bt).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),(m=(f=N(this,Br).config).onSuccess)==null||m.call(f,C,this),(g=(y=N(this,Br).config).onSettled)==null||g.call(y,C,this.state.error,this),C}catch(C){if(C instanceof wd){if(C.silent)return N(this,Bt).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Ae(this,Yr,Yn).call(this,{type:"error",error:C}),(v=(E=N(this,Br).config).onError)==null||v.call(E,C,this),(A=(w=N(this,Br).config).onSettled)==null||A.call(w,this.state.data,C,this),C}finally{this.scheduleGc()}}},ha=new WeakMap,vo=new WeakMap,Br=new WeakMap,ba=new WeakMap,Bt=new WeakMap,wc=new WeakMap,ya=new WeakMap,Yr=new WeakSet,Yn=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,...zh(n.data,this.options),fetchMeta:t.meta??null};case"success":const s={...n,...Rh(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,vo,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),kt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),N(this,Br).notify({query:this,type:"updated",action:t})})},y5);function zh(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Mh(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Rh(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Hh(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 $w=(g5=class extends Ta{constructor(t,r){super();le(this,Ve);le(this,sr);le(this,De);le(this,vc);le(this,qt);le(this,ga);le(this,Eo);le(this,Gn);le(this,ws);le(this,Ec);le(this,ko);le(this,Co);le(this,xa);le(this,wa);le(this,vs);le(this,To,new Set);this.options=r,ee(this,sr,t),ee(this,ws,null),ee(this,Gn,xd()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,De).addObserver(this),$h(N(this,De),this.options)?Ae(this,Ve,Tc).call(this):this.updateResult(),Ae(this,Ve,Tm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return vd(N(this,De),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return vd(N(this,De),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ae(this,Ve,Sm).call(this),Ae(this,Ve,Am).call(this),N(this,De).removeObserver(this)}setOptions(t){const r=this.options,n=N(this,De);if(this.options=N(this,sr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Er(this.options.enabled,N(this,De))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ae(this,Ve,Pm).call(this),N(this,De).setOptions(this.options),r._defaulted&&!Oc(this.options,r)&&N(this,sr).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,De),observer:this});const s=this.hasListeners();s&&Gh(N(this,De),n,this.options,r)&&Ae(this,Ve,Tc).call(this),this.updateResult(),s&&(N(this,De)!==n||Er(this.options.enabled,N(this,De))!==Er(r.enabled,N(this,De))||Xn(this.options.staleTime,N(this,De))!==Xn(r.staleTime,N(this,De)))&&Ae(this,Ve,Em).call(this);const a=Ae(this,Ve,km).call(this);s&&(N(this,De)!==n||Er(this.options.enabled,N(this,De))!==Er(r.enabled,N(this,De))||a!==N(this,vs))&&Ae(this,Ve,Cm).call(this,a)}getOptimisticResult(t){const r=N(this,sr).getQueryCache().build(N(this,sr),t),n=this.createResult(r,t);return jw(this,n)&&(ee(this,qt,n),ee(this,Eo,this.options),ee(this,ga,N(this,De).state)),n}getCurrentResult(){return N(this,qt)}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,Gn).status==="pending"&&N(this,Gn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){N(this,To).add(t)}getCurrentQuery(){return N(this,De)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=N(this,sr).defaultQueryOptions(t),n=N(this,sr).getQueryCache().build(N(this,sr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ae(this,Ve,Tc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,qt)))}createResult(t,r){var b;const n=N(this,De),s=this.options,a=N(this,qt),o=N(this,ga),i=N(this,Eo),l=t!==n?t.state:N(this,vc),{state:u}=t;let d={...u},f=!1,m;if(r._optimisticResults){const x=this.hasListeners(),S=!x&&$h(t,r),I=x&&Gh(t,n,r,s);(S||I)&&(d={...d,...zh(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:E}=d;m=d.data;let v=!1;if(r.placeholderData!==void 0&&m===void 0&&E==="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,Co))==null?void 0:b.state.data,N(this,Co)):r.placeholderData,x!==void 0&&(E="success",m=yd(a==null?void 0:a.data,x,r),f=!0)}if(r.select&&m!==void 0&&!v)if(a&&m===(o==null?void 0:o.data)&&r.select===N(this,Ec))m=N(this,ko);else try{ee(this,Ec,r.select),m=r.select(m),m=yd(a==null?void 0:a.data,m,r),ee(this,ko,m),ee(this,ws,null)}catch(x){ee(this,ws,x)}N(this,ws)&&(y=N(this,ws),m=N(this,ko),g=Date.now(),E="error");const w=d.fetchStatus==="fetching",A=E==="pending",C=E==="error",D=A&&w,L=m!==void 0,h={status:E,fetchStatus:d.fetchStatus,isPending:A,isSuccess:E==="success",isError:C,isInitialLoading:D,isLoading:D,data:m,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&&!A,isLoadingError:C&&!L,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:C&&L,isStale:Ed(t,r),refetch:this.refetch,promise:N(this,Gn),isEnabled:Er(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const x=F=>{h.status==="error"?F.reject(h.error):h.data!==void 0&&F.resolve(h.data)},S=()=>{const F=ee(this,Gn,h.promise=xd());x(F)},I=N(this,Gn);switch(I.status){case"pending":t.queryHash===n.queryHash&&x(I);break;case"fulfilled":(h.status==="error"||h.data!==I.value)&&S();break;case"rejected":(h.status!=="error"||h.error!==I.reason)&&S();break}}return h}updateResult(){const t=N(this,qt),r=this.createResult(N(this,De),this.options);if(ee(this,ga,N(this,De).state),ee(this,Eo,this.options),N(this,ga).data!==void 0&&ee(this,Co,N(this,De)),Oc(r,t))return;ee(this,qt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!N(this,To).size)return!0;const o=new Set(a??N(this,To));return this.options.throwOnError&&o.add("error"),Object.keys(N(this,qt)).some(i=>{const c=i;return N(this,qt)[c]!==t[c]&&o.has(c)})};Ae(this,Ve,F5).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ae(this,Ve,Tm).call(this)}},sr=new WeakMap,De=new WeakMap,vc=new WeakMap,qt=new WeakMap,ga=new WeakMap,Eo=new WeakMap,Gn=new WeakMap,ws=new WeakMap,Ec=new WeakMap,ko=new WeakMap,Co=new WeakMap,xa=new WeakMap,wa=new WeakMap,vs=new WeakMap,To=new WeakMap,Ve=new WeakSet,Tc=function(t){Ae(this,Ve,Pm).call(this);let r=N(this,De).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(jt)),r},Em=function(){Ae(this,Ve,Sm).call(this);const t=Xn(this.options.staleTime,N(this,De));if(Us||N(this,qt).isStale||!fd(t))return;const n=Ih(N(this,qt).dataUpdatedAt,t)+1;ee(this,xa,Fs.setTimeout(()=>{N(this,qt).isStale||this.updateResult()},n))},km=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,De)):this.options.refetchInterval)??!1},Cm=function(t){Ae(this,Ve,Am).call(this),ee(this,vs,t),!(Us||Er(this.options.enabled,N(this,De))===!1||!fd(N(this,vs))||N(this,vs)===0)&&ee(this,wa,Fs.setInterval(()=>{(this.options.refetchIntervalInBackground||gd.isFocused())&&Ae(this,Ve,Tc).call(this)},N(this,vs)))},Tm=function(){Ae(this,Ve,Em).call(this),Ae(this,Ve,Cm).call(this,Ae(this,Ve,km).call(this))},Sm=function(){N(this,xa)&&(Fs.clearTimeout(N(this,xa)),ee(this,xa,void 0))},Am=function(){N(this,wa)&&(Fs.clearInterval(N(this,wa)),ee(this,wa,void 0))},Pm=function(){const t=N(this,sr).getQueryCache().build(N(this,sr),this.options);if(t===N(this,De))return;const r=N(this,De);ee(this,De,t),ee(this,vc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},F5=function(t){kt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(N(this,qt))}),N(this,sr).getQueryCache().notify({query:N(this,De),type:"observerResultsUpdated"})})},g5);function Gw(e,t){return Er(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $h(e,t){return Gw(e,t)||e.state.data!==void 0&&vd(e,t,t.refetchOnMount)}function vd(e,t,r){if(Er(t.enabled,e)!==!1&&Xn(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ed(e,t)}return!1}function Gh(e,t,r,n){return(e!==t||Er(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ed(e,r)}function Ed(e,t){return Er(t.enabled,e)!==!1&&e.isStaleByTime(Xn(t.staleTime,e))}function jw(e,t){return!Oc(e.getCurrentResult(),t)}function jh(e){return{onFetch:(t,r)=>{var u,d,f,m,y;const n=t.options,s=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,a=((m=t.state.data)==null?void 0:m.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let g=!1;const E=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},v=Dh(t.options,t.fetchOptions),w=async(A,C,D)=>{if(g)return Promise.reject();if(C==null&&A.pages.length)return Promise.resolve(A);const T=(()=>{const S={client:t.client,queryKey:t.queryKey,pageParam:C,direction:D?"backward":"forward",meta:t.options.meta};return E(S),S})(),h=await v(T),{maxPages:b}=t.options,x=D?_w:Dw;return{pages:x(A.pages,h,b),pageParams:x(A.pageParams,C,b)}};if(s&&a.length){const A=s==="backward",C=A?Vw:Vh,D={pages:a,pageParams:o},L=C(n,D);i=await w(D,L,A)}else{const A=e??a.length;do{const C=c===0?o[0]??n.initialPageParam:Vh(n,i);if(c>0&&C==null)break;i=await w(i,C),c++}while(c<A)}return i};t.options.persister?t.fetchFn=()=>{var g,E;return(E=(g=t.options).persister)==null?void 0:E.call(g,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function Vh(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 Vw(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 Ww=(x5=class extends Lh{constructor(t){super();le(this,fn);le(this,kc);le(this,pn);le(this,Yt);le(this,va);ee(this,kc,t.client),this.mutationId=t.mutationId,ee(this,Yt,t.mutationCache),ee(this,pn,[]),this.state=t.state||Wh(),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,pn).includes(t)||(N(this,pn).push(t),this.clearGcTimeout(),N(this,Yt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,pn,N(this,pn).filter(r=>r!==t)),this.scheduleGc(),N(this,Yt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,pn).length||(this.state.status==="pending"?this.scheduleGc():N(this,Yt).remove(this))}continue(){var t;return((t=N(this,va))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,c,l,u,d,f,m,y,g,E,v,w,A,C,D,L,T,h,b;const r=()=>{Ae(this,fn,Ss).call(this,{type:"continue"})},n={client:N(this,kc),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,va,Nh({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(x,S)=>{Ae(this,fn,Ss).call(this,{type:"failed",failureCount:x,error:S})},onPause:()=>{Ae(this,fn,Ss).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,Yt).canRun(this)}));const s=this.state.status==="pending",a=!N(this,va).canStart();try{if(s)r();else{Ae(this,fn,Ss).call(this,{type:"pending",variables:t,isPaused:a}),await((i=(o=N(this,Yt).config).onMutate)==null?void 0:i.call(o,t,this,n));const S=await((l=(c=this.options).onMutate)==null?void 0:l.call(c,t,n));S!==this.state.context&&Ae(this,fn,Ss).call(this,{type:"pending",context:S,variables:t,isPaused:a})}const x=await N(this,va).start();return await((d=(u=N(this,Yt).config).onSuccess)==null?void 0:d.call(u,x,t,this.state.context,this,n)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,x,t,this.state.context,n)),await((g=(y=N(this,Yt).config).onSettled)==null?void 0:g.call(y,x,null,this.state.variables,this.state.context,this,n)),await((v=(E=this.options).onSettled)==null?void 0:v.call(E,x,null,t,this.state.context,n)),Ae(this,fn,Ss).call(this,{type:"success",data:x}),x}catch(x){try{throw await((A=(w=N(this,Yt).config).onError)==null?void 0:A.call(w,x,t,this.state.context,this,n)),await((D=(C=this.options).onError)==null?void 0:D.call(C,x,t,this.state.context,n)),await((T=(L=N(this,Yt).config).onSettled)==null?void 0:T.call(L,void 0,x,this.state.variables,this.state.context,this,n)),await((b=(h=this.options).onSettled)==null?void 0:b.call(h,void 0,x,t,this.state.context,n)),x}finally{Ae(this,fn,Ss).call(this,{type:"error",error:x})}}finally{N(this,Yt).runNext(this)}}},kc=new WeakMap,pn=new WeakMap,Yt=new WeakMap,va=new WeakMap,fn=new WeakSet,Ss=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),kt.batch(()=>{N(this,pn).forEach(n=>{n.onMutationUpdate(t)}),N(this,Yt).notify({mutation:this,type:"updated",action:t})})},x5);function Wh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qw=(w5=class extends Ta{constructor(t={}){super();le(this,jn);le(this,Kr);le(this,Cc);this.config=t,ee(this,jn,new Set),ee(this,Kr,new Map),ee(this,Cc,0)}build(t,r,n){const s=new Ww({client:t,mutationCache:this,mutationId:++Ku(this,Cc)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){N(this,jn).add(t);const r=Mc(t);if(typeof r=="string"){const n=N(this,Kr).get(r);n?n.push(t):N(this,Kr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(N(this,jn).delete(t)){const r=Mc(t);if(typeof r=="string"){const n=N(this,Kr).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,Kr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Mc(t);if(typeof r=="string"){const n=N(this,Kr).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=Mc(t);if(typeof r=="string"){const s=(n=N(this,Kr).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(){kt.batch(()=>{N(this,jn).forEach(t=>{this.notify({type:"removed",mutation:t})}),N(this,jn).clear(),N(this,Kr).clear()})}getAll(){return Array.from(N(this,jn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Fh(r,n))}findAll(t={}){return this.getAll().filter(r=>Fh(t,r))}notify(t){kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return kt.batch(()=>Promise.all(t.map(r=>r.continue().catch(jt))))}},jn=new WeakMap,Kr=new WeakMap,Cc=new WeakMap,w5);function Mc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Yw=(v5=class extends Ta{constructor(t,r){super();le(this,qn);le(this,Vn);le(this,Es);le(this,ar);le(this,Wn);ee(this,Vn,t),this.setOptions(r),this.bindMethods(),Ae(this,qn,Zu).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,Vn).defaultMutationOptions(t),Oc(this.options,r)||N(this,Vn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,ar),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Os(r.mutationKey)!==Os(this.options.mutationKey)?this.reset():((n=N(this,ar))==null?void 0:n.state.status)==="pending"&&N(this,ar).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=N(this,ar))==null||t.removeObserver(this)}onMutationUpdate(t){Ae(this,qn,Zu).call(this),Ae(this,qn,Im).call(this,t)}getCurrentResult(){return N(this,Es)}reset(){var t;(t=N(this,ar))==null||t.removeObserver(this),ee(this,ar,void 0),Ae(this,qn,Zu).call(this),Ae(this,qn,Im).call(this)}mutate(t,r){var n;return ee(this,Wn,r),(n=N(this,ar))==null||n.removeObserver(this),ee(this,ar,N(this,Vn).getMutationCache().build(N(this,Vn),this.options)),N(this,ar).addObserver(this),N(this,ar).execute(t)}},Vn=new WeakMap,Es=new WeakMap,ar=new WeakMap,Wn=new WeakMap,qn=new WeakSet,Zu=function(){var r;const t=((r=N(this,ar))==null?void 0:r.state)??Wh();ee(this,Es,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Im=function(t){kt.batch(()=>{var r,n,s,a,o,i,c,l;if(N(this,Wn)&&this.hasListeners()){const u=N(this,Es).variables,d=N(this,Es).context,f={client:N(this,Vn),meta:this.options.meta,mutationKey:this.options.mutationKey};(t==null?void 0:t.type)==="success"?((n=(r=N(this,Wn)).onSuccess)==null||n.call(r,t.data,u,d,f),(a=(s=N(this,Wn)).onSettled)==null||a.call(s,t.data,null,u,d,f)):(t==null?void 0:t.type)==="error"&&((i=(o=N(this,Wn)).onError)==null||i.call(o,t.error,u,d,f),(l=(c=N(this,Wn)).onSettled)==null||l.call(c,void 0,t.error,u,d,f))}this.listeners.forEach(u=>{u(N(this,Es))})})},v5),Kw=(E5=class extends Ta{constructor(t={}){super();le(this,mn);this.config=t,ee(this,mn,new Map)}build(t,r,n){const s=r.queryKey,a=r.queryHash??md(s,r);let o=this.get(a);return o||(o=new Hw({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){N(this,mn).has(t.queryHash)||(N(this,mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=N(this,mn).get(t.queryHash);r&&(t.destroy(),r===t&&N(this,mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,mn).get(t)}getAll(){return[...N(this,mn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Bh(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Bh(t,n)):r}notify(t){kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},mn=new WeakMap,E5),Zw=(k5=class{constructor(e={}){le(this,ft);le(this,ks);le(this,Cs);le(this,So);le(this,Ao);le(this,Ts);le(this,Po);le(this,Io);ee(this,ft,e.queryCache||new Kw),ee(this,ks,e.mutationCache||new qw),ee(this,Cs,e.defaultOptions||{}),ee(this,So,new Map),ee(this,Ao,new Map),ee(this,Ts,0)}mount(){Ku(this,Ts)._++,N(this,Ts)===1&&(ee(this,Po,gd.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ft).onFocus())})),ee(this,Io,_c.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ft).onOnline())})))}unmount(){var e,t;Ku(this,Ts)._--,N(this,Ts)===0&&((e=N(this,Po))==null||e.call(this),ee(this,Po,void 0),(t=N(this,Io))==null||t.call(this),ee(this,Io,void 0))}isFetching(e){return N(this,ft).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,ks).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,ft).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=N(this,ft).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Xn(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return N(this,ft).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,ft).get(n.queryHash),a=s==null?void 0:s.state.data,o=Fw(t,a);if(o!==void 0)return N(this,ft).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return kt.batch(()=>N(this,ft).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,ft).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=N(this,ft);kt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=N(this,ft);return kt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=kt.batch(()=>N(this,ft).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(jt).catch(jt)}invalidateQueries(e,t={}){return kt.batch(()=>(N(this,ft).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=kt.batch(()=>N(this,ft).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,r);return r.throwOnError||(a=a.catch(jt)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=N(this,ft).build(this,t);return r.isStaleByTime(Xn(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jt).catch(jt)}fetchInfiniteQuery(e){return e.behavior=jh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jt).catch(jt)}ensureInfiniteQueryData(e){return e.behavior=jh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _c.isOnline()?N(this,ks).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,ft)}getMutationCache(){return N(this,ks)}getDefaultOptions(){return N(this,Cs)}setDefaultOptions(e){ee(this,Cs,e)}setQueryDefaults(e,t){N(this,So).set(Os(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,So).values()],r={};return t.forEach(n=>{Uo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){N(this,Ao).set(Os(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,Ao).values()],r={};return t.forEach(n=>{Uo(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...N(this,Cs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=md(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===Dc&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,Cs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,ft).clear(),N(this,ks).clear()}},ft=new WeakMap,ks=new WeakMap,Cs=new WeakMap,So=new WeakMap,Ao=new WeakMap,Ts=new WeakMap,Po=new WeakMap,Io=new WeakMap,k5),qh=xt.createContext(void 0),Nc=e=>{const t=xt.useContext(qh);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Xw=({client:e,children:t})=>(xt.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),B.jsx(qh.Provider,{value:e,children:t})),Yh=xt.createContext(!1),Qw=()=>xt.useContext(Yh);Yh.Provider;function Jw(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var e3=xt.createContext(Jw()),t3=()=>xt.useContext(e3),r3=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},n3=e=>{xt.useEffect(()=>{e.clearReset()},[e])},s3=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||_h(r,[e.error,n])),a3=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))}},o3=(e,t)=>e.isLoading&&e.isFetching&&!t,i3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Kh=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function c3(e,t,r){var d,f,m,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=Qw(),s=t3(),a=Nc(),o=a.defaultQueryOptions(e);(f=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.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",a3(o),r3(o,s),n3(s);const i=!a.getQueryCache().get(o.queryHash),[c]=xt.useState(()=>new t(a,o)),l=c.getOptimisticResult(o),u=!n&&e.subscribed!==!1;if(xt.useSyncExternalStore(xt.useCallback(E=>{const v=u?c.subscribe(kt.batchCalls(E)):jt;return c.updateResult(),v},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),xt.useEffect(()=>{c.setOptions(o)},[o,c]),i3(o,l))throw Kh(o,c,s);if(s3({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;if((y=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||y.call(m,o,l),o.experimental_prefetchInRender&&!Us&&o3(l,n)){const E=i?Kh(o,c,s):(g=a.getQueryCache().get(o.queryHash))==null?void 0:g.promise;E==null||E.catch(jt).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function l3(e,t){return c3(e,$w)}function gn(e,t){const r=Nc(),[n]=xt.useState(()=>new Yw(r,e));xt.useEffect(()=>{n.setOptions(e)},[n,e]);const s=xt.useSyncExternalStore(xt.useCallback(o=>n.subscribe(kt.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=xt.useCallback((o,i)=>{n.mutate(o,i).catch(jt)},[n]);if(s.error&&_h(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}const u3=M.createContext(null),kd={didCatch:!1,error:null};class d3 extends M.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=kd}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(kd)}}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&&p3(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(kd)}}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=M.createElement(n,c);else if(s!==void 0)i=s;else throw o}return M.createElement(u3.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},i)}}function p3(){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]))}const Zh=e=>{let t;const r=new Set,n=(l,u)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const f=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(m=>m(t,f))}},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},f3=(e=>e?Zh(e):Zh),m3=e=>e;function h3(e,t=m3){const r=M.useSyncExternalStore(e.subscribe,M.useCallback(()=>t(e.getState()),[e,t]),M.useCallback(()=>t(e.getInitialState()),[e,t]));return M.useDebugValue(r),r}const Xh=e=>{const t=f3(e),r=n=>h3(t,n);return Object.assign(r,t),r},b3=(e=>e?Xh(e):Xh),Qh={disclaimerAccepted:!0,currentTime:Date.now(),swapExecution:{}},Z=b3((e,t)=>({state:Qh,updateState:r=>e(n=>({state:{...n.state,...r}})),updateSwapExecution:r=>e(n=>({state:{...n.state,swapExecution:{...n.state.swapExecution,...r}}})),resetState:()=>{e({state:{...Qh,currentTime:Date.now(),swapExecution:{...t().state.swapExecution,error:void 0,parsedError:void 0,status:void 0},isMarketOrder:t().state.isMarketOrder}})}}));(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 Oo({children:e,className:t=""}){return B.jsx("p",{className:`${t} ${Ne("Text")}`,children:e})}const Jh=M.createContext({});function y3({children:e,...t}){return B.jsx(Jh.Provider,{value:t,children:e})}const Zr=()=>M.useContext(Jh);var mt=(e=>(e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILED=3]="FAILED",e))(mt||{});const g3=({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:`${Ne("Spinner")} ${e}`,style:a})};function Lc({className:e="",body:t,footerLink:r,footerText:n,title:s,children:a}){return B.jsxs("div",{className:`${Ne("TradeStepLayout")} ${e}`,children:[B.jsxs("div",{className:Ne("TradeStepLayoutHeader"),children:[B.jsx(k3,{}),s&&B.jsx(Oo,{className:Ne("TradeStepLayoutTitle"),children:s})]}),t&&B.jsx("div",{className:Ne("TradeStepLayoutBody"),children:t}),B.jsx(x3,{link:r,text:n}),a]})}const x3=({link:e,text:t})=>{const{swapStatus:r}=Zr();return!e&&!t?null:B.jsxs("div",{className:Ne("TradeStepLayoutFooter"),children:[B.jsx(T3,{}),e?B.jsx(w3,{link:e,text:t}):r===mt.FAILED?void 0:B.jsx(Oo,{children:t})]})},w3=({link:e,text:t})=>B.jsx("a",{target:"_blank",className:Ne("TradeStepLayoutFooterLink"),href:e,children:t});function v3(){const{components:e}=Zr();return e.SuccessIcon?e.SuccessIcon:B.jsxs("svg",{fill:"none",viewBox:"0 0 16 16",className:Ne("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 E3(){const{components:e}=Zr();return e.FailedIcon?e.FailedIcon:B.jsxs("svg",{className:Ne("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 k3=()=>{const{swapStatus:e}=Zr();return e===mt.SUCCESS?B.jsx(v3,{}):e===mt.FAILED?B.jsx(E3,{}):B.jsx(C3,{})},C3=()=>{const{components:e}=Zr();return e.Loader?e.Loader:B.jsx(g3,{size:60,borderWidth:5,className:Ne("TradeStepLayoutSpinner")})},T3=()=>{const{totalSteps:e,currentStepIndex:t=0,swapStatus:r}=Zr();return r!==mt.LOADING||e===1?null:B.jsx("div",{className:Ne("StepIndicator"),children:B.jsx("div",{style:{width:`${100/(e||0)}%`,left:`${t*100/(e||0)}%`},className:Ne("StepIndicatorLine")})})},S3=({error:e,footerLink:t,footerText:r})=>B.jsx(Lc,{footerLink:t,footerText:r,body:e||B.jsx("p",{className:Ne("FailedContentMsg"),children:"Something went wrong"}),className:Ne("FailedContent")});function A3(){return B.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",className:Ne("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 e1=({inTokenOnly:e})=>{const{inToken:t,outToken:r,inAmount:n,outAmount:s,components:a}=Zr();return B.jsxs("div",{className:Ne("TradePreview"),children:[B.jsx(t1,{token:t,amount:n,Logo:a==null?void 0:a.SrcTokenLogo}),!e&&B.jsxs(B.Fragment,{children:[B.jsx(A3,{}),B.jsx(t1,{token:r,amount:s,Logo:a==null?void 0:a.DstTokenLogo})]})]})},t1=({token:e,amount:t,Logo:r})=>B.jsxs("div",{className:Ne("TradePreviewToken"),children:[r||B.jsx("img",{src:e==null?void 0:e.logoUrl,className:Ne("TradepPreviewLogo"),alt:`${e==null?void 0:e.symbol} logo`}),B.jsxs(Oo,{children:[t," ",e==null?void 0:e.symbol]})]});function P3({title:e,footerLink:t,footerText:r,hideTokens:n}){return B.jsx(Lc,{title:e,className:Ne("Success"),body:!n&&B.jsx(e1,{}),footerLink:t,footerText:r})}const r1=({$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:`${Ne("FlexColumn")} ${n}`,style:a,children:r})};function n1({styles:e={},className:t=""}){return B.jsx("div",{style:e,className:`${Ne("SkeletonLoader")} ${t}`})}const I3=()=>B.jsxs("div",{className:`${Ne("MainContentLoader")}`,children:[B.jsx(n1,{className:`${Ne("MainContentCircleLoader")}`}),B.jsx(n1,{className:`${Ne("MainContentRectengularLoader")}`})]}),B3=({fromTitle:e,toTitle:t,inUsd:r,outUsd:n})=>{const{swapStatus:s,outAmount:a,inAmount:o,inToken:i,outToken:c,components:l,totalSteps:u}=Zr(),d=B.jsx(a1,{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(F3,{}):B.jsxs(r1,{children:[d,B.jsx(I3,{})]}):B.jsx(r1,{children:d})},s1=({amount:e,token:t,usd:r,title:n,Logo:s})=>B.jsxs("div",{className:`${Ne("MainToken")}`,children:[B.jsxs("div",{className:`${Ne("MainTokenLeft")}`,children:[B.jsx(Oo,{className:`${Ne("MainTokenTitle")}`,children:n}),B.jsx(Oo,{className:` ${Ne("MainTokenAmount")}`,children:`${e&&Number(e)>0?e:""} ${(t==null?void 0:t.symbol)||""}`}),r&&B.jsx("div",{className:` ${Ne("MainTokenUsd")}`,children:r})]}),s||B.jsx("div",{className:` ${Ne("MainTokenLogo")}`,children:t!=null&&t.logoUrl?B.jsx("img",{src:t==null?void 0:t.logoUrl,alt:"Token logo"}):null})]});function F3(){const{currentStep:e}=Zr();return e?B.jsx(Lc,{footerLink:e.footerLink,footerText:e.footerText,title:e.title,body:e.hideTokens?void 0:B.jsx(e1,{inTokenOnly:e==null?void 0:e.inTokenOnly})}):null}const a1=({fromTitle:e,inUsd:t,inToken:r,toTitle:n,outUsd:s,outToken:a,inAmount:o,outAmount:i,SrcTokenLogo:c,DstTokenLogo:l})=>B.jsxs("div",{className:`${Ne("Main")}`,children:[B.jsx(s1,{title:e||"Swap from",usd:t,token:r,amount:o,Logo:c}),B.jsx(s1,{title:n||"Swap to",usd:s,token:a,amount:i,Logo:l})]}),Qn=e=>B.jsx(y3,{...e,children:B.jsx(U3,{})}),U3=()=>{const{swapStatus:e,components:t,className:r}=Zr();return B.jsx("div",{className:`${Ne("SwapFlow")} ${r}`,children:e===mt.SUCCESS?t==null?void 0:t.Success:e===mt.FAILED?t==null?void 0:t.Failed:t==null?void 0:t.Main})};Qn.Success=P3,Qn.Failed=S3,Qn.Main=B3,Qn.StepLayout=Lc;var Mt=(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))(Mt||{}),Ds=(e=>(e.WRAP="wrap",e.APPROVE="approve",e.CREATE="create",e))(Ds||{});const O3=e=>e.replace(/,/g,""),D3=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}},o1=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(" ")},Cd=(e,t)=>e?`${e.substring(0,(t==null?void 0:t.start)||6)}...${e.substring(e.length-((t==null?void 0:t.end)||5))}`:"",_3=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 Do(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 f=o.slice(0,t).replace(/0+$/,""),m=f?"."+f:"";return n+a+m}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 Td=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"))},M3=e=>{switch(e){case Ft.base.id:return 1e-4;default:return .01}},i1=(e,t,r)=>{if(!j(e.srcAmountFilled||0).gt(0)||!j(e.dstAmountFilled||0).gt(0))return"";const n=bn(t,e.srcAmountFilled),s=bn(r,e.dstAmountFilled);return j(s).div(n).toFixed()},c1=(e,t,r)=>{if(e.type===ut.TWAP_MARKET)return"";const n=bn(t,e.srcAmountPerTrade),s=bn(r,e.dstMinAmountPerTrade);return j(s).div(n).toFixed()},l1=(e,t)=>{const r=Bs(t);return r&&Is(e.address)?r.wToken:e};function u1(e){return e?e/864e5:0}function Sd(e){return e?e/6e4:0}const N3=(e,t)=>e?ut.TWAP_MARKET:t===1?ut.LIMIT:ut.TWAP_LIMIT,Ad=(e,t,r)=>{const n=Bs(r);return Is((e==null?void 0:e.address)||"")&&Ps((t==null?void 0:t.address)||"",(n==null?void 0:n.wToken.address)||"")},Pd=(e,t,r)=>{const n=Bs(r);return Ps((e==null?void 0:e.address)||"",(n==null?void 0:n.wToken.address)||"")&&Is((t==null?void 0:t.address)||"")},_o=(e,t)=>{if(!t)return"";const r=Bs(t);return`${r==null?void 0:r.explorer}/tx/${e}`};function p(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 L3(){return{}}const z3=p({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}),R3=p({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}),H3=p({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}),$3=p({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}),G3=p({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}),j3=p({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}),d1="2.43.3";let Mo={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${d1}`},$=class Bm extends Error{constructor(t,r={}){var i;const n=(()=>{var c;return r.cause instanceof Bm?r.cause.details:(c=r.cause)!=null&&c.message?r.cause.message:r.details})(),s=r.cause instanceof Bm&&r.cause.docsPath||r.docsPath,a=(i=Mo.getDocsUrl)==null?void 0:i.call(Mo,{...r,docsPath:s}),o=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...n?[`Details: ${n}`]:[],...Mo.version?[`Version: ${Mo.version}`]:[]].join(`
|
|
65
|
+
`);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=d1}walk(t){return p1(this,t)}};function p1(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?p1(e.cause,t):t?null:e}let f1=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"})}},V3=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 W3 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 q3=class extends ${constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function Or(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function ct(e){return Or(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function Zt(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}let m1=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"})}},h1=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 b1 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 _s(e,{dir:t,size:r=32}={}){return typeof e=="string"?Jn(e,{dir:t,size:r}):Y3(e,{dir:t,size:r})}function Jn(e,{dir:t,size:r=32}={}){if(r===null)return e;const n=e.replace("0x","");if(n.length>r*2)throw new h1({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function Y3(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new h1({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}const K3=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ue(e,t={}){return typeof e=="number"||typeof e=="bigint"?q(e,t):typeof e=="string"?Sa(e,t):typeof e=="boolean"?y1(e,t):vt(e,t)}function y1(e,t={}){const r=`0x${Number(e)}`;return typeof t.size=="number"?(Dr(r,{size:t.size}),_s(r,{size:t.size})):r}function vt(e,t={}){let r="";for(let s=0;s<e.length;s++)r+=K3[e[s]];const n=`0x${r}`;return typeof t.size=="number"?(Dr(n,{size:t.size}),_s(n,{dir:"right",size:t.size})):n}function q(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 f1({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?_s(i,{size:n}):i}const Z3=new TextEncoder;function Sa(e,t={}){const r=Z3.encode(e);return vt(r,t)}const X3=new TextEncoder;function xn(e,t={}){return typeof e=="number"||typeof e=="bigint"?J3(e,t):typeof e=="boolean"?Q3(e,t):Or(e)?or(e,t):Ms(e,t)}function Q3(e,t={}){const r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(Dr(r,{size:t.size}),_s(r,{size:t.size})):r}const wn={zero:48,nine:57,A:65,F:70,a:97,f:102};function g1(e){if(e>=wn.zero&&e<=wn.nine)return e-wn.zero;if(e>=wn.A&&e<=wn.F)return e-(wn.A-10);if(e>=wn.a&&e<=wn.f)return e-(wn.a-10)}function or(e,t={}){let r=e;t.size&&(Dr(r,{size:t.size}),r=_s(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=g1(n.charCodeAt(i++)),l=g1(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 J3(e,t){const r=q(e,t);return or(r)}function Ms(e,t={}){const r=X3.encode(e);return typeof t.size=="number"?(Dr(r,{size:t.size}),_s(r,{dir:"right",size:t.size})):r}function Dr(e,{size:t}){if(ct(e)>t)throw new q3({givenSize:ct(e),maxSize:t})}function Le(e,t={}){const{signed:r}=t;t.size&&Dr(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 e8(e,t={}){let r=e;if(t.size&&(Dr(r,{size:t.size}),r=Zt(r)),Zt(r)==="0x00")return!1;if(Zt(r)==="0x01")return!0;throw new W3(r)}function ir(e,t={}){return Number(Le(e,t))}function zc(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 x1={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Ns(e,t){const r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?ir(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?ir(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?x1[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=t8(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 Rc=zc("transaction",Ns);function t8(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 Id(e,t){const r=(e.transactions??[]).map(n=>typeof n=="string"?n:Ns(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 Bd=zc("block",Id);function Xr(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}:{}}}const w1={"0x0":"reverted","0x1":"success"};function Hc(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=>Xr(n)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?ir(e.transactionIndex):null,status:e.status?w1[e.status]:null,type:e.type?x1[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}const Fd=zc("transactionReceipt",Hc),r8={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function _r(e,t){const r={};return typeof e.authorizationList<"u"&&(r.authorizationList=n8(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=>vt(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=q(e.gas)),typeof e.gasPrice<"u"&&(r.gasPrice=q(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=q(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(r.maxFeePerGas=q(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=q(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(r.nonce=q(e.nonce)),typeof e.to<"u"&&(r.to=e.to),typeof e.type<"u"&&(r.type=r8[e.type]),typeof e.value<"u"&&(r.value=q(e.value)),r}const Ud=zc("transactionRequest",_r);function n8(e){return e.map(t=>({address:t.address,r:t.r?q(BigInt(t.r)):t.r,s:t.s?q(BigInt(t.s)):t.s,chainId:q(t.chainId),nonce:q(t.nonce),...typeof t.yParity<"u"?{yParity:q(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:q(t.v)}:{}}))}const s8=2n**16n-1n,Ls=2n**256n-1n,Od=50000n,v1=s8*32n,E1={block:Bd({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=E1.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?Le(e.l1BatchNumber):null,l1BatchTimestamp:e.l1BatchTimestamp?Le(e.l1BatchTimestamp):null,transactions:t}}}),transaction:Rc({format(e){const t={};return e.type==="0x71"?t.type="eip712":e.type==="0xff"&&(t.type="priority"),{...t,l1BatchNumber:e.l1BatchNumber?Le(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?Le(e.l1BatchTxIndex):null}}}),transactionReceipt:Fd({format(e){return{l1BatchNumber:e.l1BatchNumber?Le(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?Le(e.l1BatchTxIndex):null,logs:e.logs.map(t=>({...Xr(t),l1BatchNumber:t.l1BatchNumber?Le(t.l1BatchNumber):null,transactionLogIndex:ir(t.transactionLogIndex),logType:t.logType})),l2ToL1Logs:e.l2ToL1Logs.map(t=>({blockNumber:Le(t.blockHash),blockHash:t.blockHash,l1BatchNumber:t.l1BatchNumber?Le(t.l1BatchNumber):null,transactionIndex:Le(t.transactionIndex),shardId:Le(t.shardId),isService:t.isService,sender:t.sender,key:t.key,value:t.value,transactionHash:t.transactionHash,logIndex:Le(t.logIndex)}))}}}),transactionRequest:Ud({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(e){return e.gasPerPubdata||e.paymaster&&e.paymasterInput||e.factoryDeps||e.customSignature?{eip712Meta:{...e.gasPerPubdata?{gasPerPubdata:Ue(e.gasPerPubdata)}:{gasPerPubdata:Ue(Od)},...e.paymaster&&e.paymasterInput?{paymasterParams:{paymaster:e.paymaster,paymasterInput:Array.from(or(e.paymasterInput))}}:{},...e.factoryDeps?{factoryDeps:e.factoryDeps.map(t=>Array.from(or(t)))}:{},...e.customSignature?{customSignature:Array.from(or(e.customSignature))}:{}},type:"0x71"}:{}}})};function cr(e){return typeof e[0]=="string"?lr(e):a8(e)}function a8(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 lr(e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}let k1=class extends ${constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},C1=class extends ${constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},o8=class extends ${constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const i8={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 o8({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new C1({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new k1({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 k1({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 Dd(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(i8);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}function Qr(e,t="hex"){const r=T1(e),n=Dd(new Uint8Array(r.length));return r.encode(n),t==="hex"?vt(n.bytes):n.bytes}function T1(e){return Array.isArray(e)?c8(e.map(t=>T1(t))):l8(e)}function c8(e){const t=e.reduce((s,a)=>s+a.length,0),r=S1(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 l8(e){const t=typeof e=="string"?or(e):e,r=S1(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 S1(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.")}const u8={gwei:9,wei:18},d8={ether:-9,wei:9};function A1(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 _d(e,t="wei"){return A1(e,u8[t])}function Xt(e,t="wei"){return A1(e,d8[t])}function No(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(`
|
|
66
|
+
`)}class p8 extends ${constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class f8 extends ${constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",No(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 m8=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 h8 extends ${constructor(t,{account:r,docsPath:n,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:f}){var y;const m=No({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 f<"u"&&`${_d(f)} ${((y=s==null?void 0:s.nativeCurrency)==null?void 0:y.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Xt(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Xt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Xt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class P1 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 I1 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 B1 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 b8 extends ${constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}function y8(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?Ue(n):"0x",o,s?Ue(s):"0x",..._a({},a)])}return t}function Md(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=>or(a)):e.blobs,s=[];for(const a of n)s.push(Uint8Array.from(t.blobToKzgCommitment(a)));return r==="bytes"?s:s.map(a=>vt(a))}function Nd(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=>or(o)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(o=>or(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=>vt(o))}const Aa=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function g8(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Lo(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function zs(e,...t){if(!g8(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 x8(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Lo(e.outputLen),Lo(e.blockLen)}function Pa(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 F1(e,t){zs(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function w8(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function es(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ld(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Jr(e,t){return e<<32-t|e>>>t}const v8=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function E8(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function k8(e){for(let t=0;t<e.length;t++)e[t]=E8(e[t]);return e}const U1=v8?e=>e:k8;function C8(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function $c(e){return typeof e=="string"&&(e=C8(e)),zs(e),e}function T8(...e){let t=0;for(let n=0;n<e.length;n++){const s=e[n];zs(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 zd{}function Gc(e){const t=n=>e().update($c(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function S8(e=32){if(Aa&&typeof Aa.getRandomValues=="function")return Aa.getRandomValues(new Uint8Array(e));if(Aa&&typeof Aa.randomBytes=="function")return Uint8Array.from(Aa.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function A8(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 P8(e,t,r){return e&t^~e&r}function I8(e,t,r){return e&t^e&r^t&r}class O1 extends zd{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=Ld(this.buffer)}update(t){Pa(this),t=$c(t),zs(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=Ld(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){Pa(this),F1(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:s,isLE:a}=this;let{pos:o}=this;r[o++]=128,es(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(n,0),o=0);for(let d=o;d<s;d++)r[d]=0;A8(n,s-8,BigInt(this.length*8),a),this.process(n,0);const i=Ld(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 ts=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Nt=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Lt=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),jc=BigInt(2**32-1),D1=BigInt(32);function B8(e,t=!1){return t?{h:Number(e&jc),l:Number(e>>D1&jc)}:{h:Number(e>>D1&jc)|0,l:Number(e&jc)|0}}function _1(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}=B8(e[a],t);[n[a],s[a]]=[o,i]}return[n,s]}const M1=(e,t,r)=>e>>>r,N1=(e,t,r)=>e<<32-r|t>>>r,Ia=(e,t,r)=>e>>>r|t<<32-r,Ba=(e,t,r)=>e<<32-r|t>>>r,Vc=(e,t,r)=>e<<64-r|t>>>r-32,Wc=(e,t,r)=>e>>>r-32|t<<64-r,F8=(e,t,r)=>e<<r|t>>>32-r,U8=(e,t,r)=>t<<r|e>>>32-r,O8=(e,t,r)=>t<<r-32|e>>>64-r,D8=(e,t,r)=>e<<r-32|t>>>64-r;function vn(e,t,r,n){const s=(t>>>0)+(n>>>0);return{h:e+r+(s/2**32|0)|0,l:s|0}}const _8=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),M8=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,N8=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),L8=(e,t,r,n,s)=>t+r+n+s+(e/2**32|0)|0,z8=(e,t,r,n,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(s>>>0),R8=(e,t,r,n,s,a)=>t+r+n+s+a+(e/2**32|0)|0,H8=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]),rs=new Uint32Array(64);class $8 extends O1{constructor(t=32){super(64,t,8,!1),this.A=ts[0]|0,this.B=ts[1]|0,this.C=ts[2]|0,this.D=ts[3]|0,this.E=ts[4]|0,this.F=ts[5]|0,this.G=ts[6]|0,this.H=ts[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)rs[d]=t.getUint32(r,!1);for(let d=16;d<64;d++){const f=rs[d-15],m=rs[d-2],y=Jr(f,7)^Jr(f,18)^f>>>3,g=Jr(m,17)^Jr(m,19)^m>>>10;rs[d]=g+rs[d-7]+y+rs[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 f=Jr(i,6)^Jr(i,11)^Jr(i,25),m=u+f+P8(i,c,l)+H8[d]+rs[d]|0,g=(Jr(n,2)^Jr(n,13)^Jr(n,22))+I8(n,s,a)|0;u=l,l=c,c=i,i=o+m|0,o=a,a=s,s=n,n=m+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(){es(rs)}destroy(){this.set(0,0,0,0,0,0,0,0),es(this.buffer)}}const L1=_1(["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))),G8=L1[0],j8=L1[1],ns=new Uint32Array(80),ss=new Uint32Array(80);class z1 extends O1{constructor(t=64){super(128,t,16,!1),this.Ah=Lt[0]|0,this.Al=Lt[1]|0,this.Bh=Lt[2]|0,this.Bl=Lt[3]|0,this.Ch=Lt[4]|0,this.Cl=Lt[5]|0,this.Dh=Lt[6]|0,this.Dl=Lt[7]|0,this.Eh=Lt[8]|0,this.El=Lt[9]|0,this.Fh=Lt[10]|0,this.Fl=Lt[11]|0,this.Gh=Lt[12]|0,this.Gl=Lt[13]|0,this.Hh=Lt[14]|0,this.Hl=Lt[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:f,Gh:m,Gl:y,Hh:g,Hl:E}=this;return[t,r,n,s,a,o,i,c,l,u,d,f,m,y,g,E]}set(t,r,n,s,a,o,i,c,l,u,d,f,m,y,g,E){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=f|0,this.Gh=m|0,this.Gl=y|0,this.Hh=g|0,this.Hl=E|0}process(t,r){for(let A=0;A<16;A++,r+=4)ns[A]=t.getUint32(r),ss[A]=t.getUint32(r+=4);for(let A=16;A<80;A++){const C=ns[A-15]|0,D=ss[A-15]|0,L=Ia(C,D,1)^Ia(C,D,8)^M1(C,D,7),T=Ba(C,D,1)^Ba(C,D,8)^N1(C,D,7),h=ns[A-2]|0,b=ss[A-2]|0,x=Ia(h,b,19)^Vc(h,b,61)^M1(h,b,6),S=Ba(h,b,19)^Wc(h,b,61)^N1(h,b,6),I=N8(T,S,ss[A-7],ss[A-16]),F=L8(I,L,x,ns[A-7],ns[A-16]);ns[A]=F|0,ss[A]=I|0}let{Ah:n,Al:s,Bh:a,Bl:o,Ch:i,Cl:c,Dh:l,Dl:u,Eh:d,El:f,Fh:m,Fl:y,Gh:g,Gl:E,Hh:v,Hl:w}=this;for(let A=0;A<80;A++){const C=Ia(d,f,14)^Ia(d,f,18)^Vc(d,f,41),D=Ba(d,f,14)^Ba(d,f,18)^Wc(d,f,41),L=d&m^~d&g,T=f&y^~f&E,h=z8(w,D,T,j8[A],ss[A]),b=R8(h,v,C,L,G8[A],ns[A]),x=h|0,S=Ia(n,s,28)^Vc(n,s,34)^Vc(n,s,39),I=Ba(n,s,28)^Wc(n,s,34)^Wc(n,s,39),F=n&a^n&i^a&i,_=s&o^s&c^o&c;v=g|0,w=E|0,g=m|0,E=y|0,m=d|0,y=f|0,{h:d,l:f}=vn(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 k=_8(x,I,_);n=M8(k,b,S,F),s=k|0}({h:n,l:s}=vn(this.Ah|0,this.Al|0,n|0,s|0)),{h:a,l:o}=vn(this.Bh|0,this.Bl|0,a|0,o|0),{h:i,l:c}=vn(this.Ch|0,this.Cl|0,i|0,c|0),{h:l,l:u}=vn(this.Dh|0,this.Dl|0,l|0,u|0),{h:d,l:f}=vn(this.Eh|0,this.El|0,d|0,f|0),{h:m,l:y}=vn(this.Fh|0,this.Fl|0,m|0,y|0),{h:g,l:E}=vn(this.Gh|0,this.Gl|0,g|0,E|0),{h:v,l:w}=vn(this.Hh|0,this.Hl|0,v|0,w|0),this.set(n,s,a,o,i,c,l,u,d,f,m,y,g,E,v,w)}roundClean(){es(ns,ss)}destroy(){es(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class V8 extends z1{constructor(){super(48),this.Ah=Nt[0]|0,this.Al=Nt[1]|0,this.Bh=Nt[2]|0,this.Bl=Nt[3]|0,this.Ch=Nt[4]|0,this.Cl=Nt[5]|0,this.Dh=Nt[6]|0,this.Dl=Nt[7]|0,this.Eh=Nt[8]|0,this.El=Nt[9]|0,this.Fh=Nt[10]|0,this.Fl=Nt[11]|0,this.Gh=Nt[12]|0,this.Gl=Nt[13]|0,this.Hh=Nt[14]|0,this.Hl=Nt[15]|0}}const Rd=Gc(()=>new $8),W8=Gc(()=>new z1),q8=Gc(()=>new V8),R1=Rd;function H1(e,t){const r=t||"hex",n=R1(Or(e,{strict:!1})?xn(e):e);return r==="bytes"?n:Ue(n)}function Y8(e){const{commitment:t,version:r=1}=e,n=e.to??(typeof t=="string"?"hex":"bytes"),s=H1(t,"bytes");return s.set([r],0),n==="bytes"?s:vt(s)}function $1(e){const{commitments:t,version:r}=e,n=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const a of t)s.push(Y8({commitment:a,to:n,version:r}));return s}const G1=6,j1=32,Hd=4096,V1=j1*Hd,W1=V1*G1-1-1*Hd*G1,q1=1;class K8 extends ${constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"})}}class Y1 extends ${constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Z8 extends ${constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"})}}class X8 extends ${constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${q1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"})}}function Q8(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?or(e.data):e.data,n=ct(r);if(!n)throw new Y1;if(n>W1)throw new K8({maxSize:W1,size:n});const s=[];let a=!0,o=0;for(;a;){const i=Dd(new Uint8Array(V1));let c=0;for(;c<Hd;){const l=r.slice(o,o+(j1-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=>vt(i.bytes))}function K1(e){const{data:t,kzg:r,to:n}=e,s=e.blobs??Q8({data:t,to:n}),a=e.commitments??Md({blobs:s,kzg:r,to:n}),o=e.proofs??Nd({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}let Ct=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"})}};class $d 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 J8 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 ev 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(`
|
|
67
67
|
`),{name:"ChainNotFoundError"})}}class Z1 extends ${constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}let Fa=class extends ${constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}};class Ua 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(Ua,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(Ua,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});let as=class extends ${constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Xt(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}};Object.defineProperty(as,"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 Gd extends ${constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Xt(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Gd,"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 jd 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(jd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Vd 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(`
|
|
68
68
|
`),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(Vd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class Wd 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(Wd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class qd extends ${constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
69
69
|
`),{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(qd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class Yd 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(Yd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class Kd 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(Kd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Zd extends ${constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Zd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});let Oa=class extends ${constructor({cause:t,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${Xt(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${Xt(n)} gwei`:""}).`].join(`
|
|
70
|
-
`),{cause:t,name:"TipAboveFeeCapError"})}};Object.defineProperty(Oa,"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 zo extends ${constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}let Da=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 tv=BigInt(0),Ro=BigInt(1),rv=BigInt(2),nv=BigInt(7),sv=BigInt(256),av=BigInt(113),X1=[],Q1=[],J1=[];for(let e=0,t=Ro,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],X1.push(2*(5*n+r)),Q1.push((e+1)*(e+2)/2%64);let s=tv;for(let a=0;a<7;a++)t=(t<<Ro^(t>>nv)*av)%sv,t&rv&&(s^=Ro<<(Ro<<BigInt(a))-Ro);J1.push(s)}const eb=_1(J1,!0),ov=eb[0],iv=eb[1],tb=(e,t,r)=>r>32?O8(e,t,r):F8(e,t,r),rb=(e,t,r)=>r>32?D8(e,t,r):U8(e,t,r);function cv(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=tb(l,u,1)^r[i],f=rb(l,u,1)^r[i+1];for(let m=0;m<50;m+=10)e[o+m]^=d,e[o+m+1]^=f}let s=e[2],a=e[3];for(let o=0;o<24;o++){const i=Q1[o],c=tb(s,a,i),l=rb(s,a,i),u=X1[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]^=ov[n],e[1]^=iv[n]}es(r)}class Xd extends zd{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,Lo(n),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=w8(this.state)}clone(){return this._cloneInto()}keccak(){U1(this.state32),cv(this.state32,this.rounds),U1(this.state32),this.posOut=0,this.pos=0}update(t){Pa(this),t=$c(t),zs(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){Pa(this,!1),zs(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 Lo(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(F1(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,es(this.state)}_cloneInto(t){const{blockLen:r,suffix:n,outputLen:s,rounds:a,enableXOF:o}=this;return t||(t=new Xd(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 lv=(e,t,r)=>Gc(()=>new Xd(t,e,r)),nb=lv(1,136,256/8);function Ut(e,t){const r=t||"hex",n=nb(Or(e,{strict:!1})?xn(e):e);return r==="bytes"?n:
|
|
71
|
-
`),{name:"InvalidEip712TransactionError"})}}function ib(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 cb(e){const{chainId:t,to:r,from:n,paymaster:s,paymasterInput:a}=e;if(!ib(e))throw new wv;if(!t||t<=0)throw new Fa({chainId:t});if(r&&!rt(r))throw new Ct({address:r});if(n&&!rt(n))throw new Ct({address:n});if(s&&!rt(s))throw new Ct({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 vv(e,t){return ib(e)?kv(e):qc(e,t)}const Ev={transaction:vv};function kv(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:f,gasPerPubdata:m,data:y}=e;cb(e);const g=[n?Fe(n):"0x",c?Fe(c):"0x",i?Fe(i):"0x",r?Fe(r):"0x",s??"0x",o?Fe(o):"0x",y??"0x",Fe(t),Fe(""),Fe(""),Fe(t),a??"0x",Fe(m||Od),u??[],l??"0x",d&&f?[d,f]:[]];return lr(["0x71",Qr(g)])}class Cv extends ${constructor({givenLength:t,maxBytecodeSize:r}){super(`Bytecode cannot be longer than ${r} bytes. Given length: ${t}`,{name:"BytecodeLengthExceedsMaxSizeError"})}}class Tv extends ${constructor({givenLengthInWords:t}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${t}`,{name:"BytecodeLengthInWordsMustBeOddError"})}}class Sv extends ${constructor({givenLength:t}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${t}`,{name:"BytecodeLengthMustBeDivisibleBy32Error"})}}function Av(e){const t=xn(e);if(t.length%32!==0)throw new Sv({givenLength:t.length});if(t.length>v1)throw new Cv({givenLength:t.length,maxBytecodeSize:v1});const r=H1(t),n=xn(r),s=t.length/32;if(s%2===0)throw new Tv({givenLengthInWords:s});const a=xn(s),o=_s(a,{size:2}),i=new Uint8Array([1,0]);return n.set(i,0),n.set(o,2),n}const Pv=e=>{cb(e);const t=Iv(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 Iv(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:f}=e;return{txType:113n,from:BigInt(s),to:n?BigInt(n):0n,gasLimit:t??0n,gasPerPubdataByteLimit:d??Od,maxFeePerGas:o??0n,maxPriorityFeePerGas:i??0n,paymaster:l?BigInt(l):0n,nonce:r?BigInt(r):0n,value:a??0n,data:f??"0x",factoryDeps:(c==null?void 0:c.map(m=>Fe(Av(m))))??[],paymasterInput:u||"0x"}}const ur={blockTime:1e3,formatters:E1,serializers:Ev,custom:{getEip712Domain:Pv}},Bv=p({...ur,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}}}),Fv=p({...ur,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}}}),Uv=p({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}),Ov=p({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}),Dv=p({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}),_v=p({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}),Mv=p({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}),Nv=p({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}}}),Lv=p({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}),zv=p({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}),Rv=p({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}),lb={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},sp={block:Bd({format(e){var r;return{transactions:(r=e.transactions)==null?void 0:r.map(n=>{if(typeof n=="string")return n;const s=Ns(n);return s.typeHex==="0x7e"&&(s.isSystemTx=n.isSystemTx,s.mint=n.mint?Le(n.mint):void 0,s.sourceHash=n.sourceHash,s.type="deposit"),s}),stateRoot:e.stateRoot}}}),transaction:Rc({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?Le(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:Fd({format(e){return{l1GasPrice:e.l1GasPrice?Le(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?Le(e.l1GasUsed):null,l1Fee:e.l1Fee?Le(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function ub(e,t){return Gv(e)?$v(e):qc(e,t)}const Hv={transaction:ub};function $v(e){jv(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?Fe(o):"0x",c?Fe(c):"0x",s?Fe(s):"0x",a?"0x1":"0x",r??"0x"];return lr(["0x7e",Qr(l)])}function Gv(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function jv(e){const{from:t,to:r}=e;if(t&&!rt(t))throw new Ct({address:t});if(r&&!rt(r))throw new Ct({address:r})}const V={blockTime:2e3,contracts:lb,formatters:sp,serializers:Hv},Yc=1,Vv=p({...V,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:{...V.contracts,l2OutputOracle:{[Yc]:{address:"0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"}},portal:{[Yc]:{address:"0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",blockCreated:19070571}},l1StandardBridge:{[Yc]:{address:"0xd5e3eDf5b68135D559D572E26bF863FBC1950033",blockCreated:19070571}}},sourceId:Yc}),Kc=11155111,Wv=p({...V,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:{...V.contracts,l2OutputOracle:{[Kc]:{address:"0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"}},portal:{[Kc]:{address:"0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",blockCreated:4972908}},l1StandardBridge:{[Kc]:{address:"0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",blockCreated:4972908}}},sourceId:Kc}),qv=p({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"]}}}),Yv=p({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}),Kv=p({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}),Zv=p({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"}}}),Xv=p({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}}}),Qv=p({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}),Jv=p({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}}}),eE=p({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}),tE=p({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}),rE=p({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"}}}),nE=p({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}),sE=p({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}),aE=p({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}),oE=p({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}),iE=p({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}}}),cE=p({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}}}),lE=p({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:{}}),uE=p({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}}}),dE=p({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}),pE=p({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}),fE=p({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}),mE=p({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}),hE=p({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}}}),bE=p({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}),yE=p({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}),gE=p({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/"}}}),xE=p({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}}}),wE=p({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}),vE=p({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}),EE=p({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}),kE=p({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"}}}),Go=1,db=p({...V,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:{...V.contracts,disputeGameFactory:{[Go]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[Go]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[Go]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[Go]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:Go}),CE=p({...db,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}}),TE=p({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}),Zc=5,SE=p({...V,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:{...V.contracts,l2OutputOracle:{[Zc]:{address:"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988},portal:{[Zc]:{address:"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"}},l1StandardBridge:{[Zc]:{address:"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"}}},testnet:!0,sourceId:Zc}),jo=11155111,pb=p({...V,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:{...V.contracts,disputeGameFactory:{[jo]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[jo]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[jo]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[jo]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:jo}),AE=p({...pb,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}}),PE=p({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}}}),IE=p({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}),BE=p({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"}}}),FE=p({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}),UE=p({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}),OE=p({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}),DE=p({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}),_E=p({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}),ME=p({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"}}}),NE=p({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}),LE=p({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"}}}),zE=p({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}),RE=p({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"}}}),HE=p({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}),$E=p({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}}}),GE=p({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}),jE=p({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}),VE=p({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}}}),WE=p({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}),Xc=1,qE=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:212929},l2OutputOracle:{[Xc]:{address:"0x826D1B0D4111Ad9146Eb8941D7Ca2B6a44215c76",blockCreated:19300358}},portal:{[Xc]:{address:"0x0Ec68c5B10F21EFFb74f2A5C61DFe6b08C0Db6Cb",blockCreated:19300357}},l1StandardBridge:{[Xc]:{address:"0x697402166Fbf2F22E970df8a6486Ef171dbfc524",blockCreated:19300360}}},sourceId:Xc}),YE=p({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}),ap=1,KE=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:23131},l2OutputOracle:{[ap]:{address:"0xdDa53E23f8a32640b04D7256e651C1db98dB11C1",blockCreated:4462615}},portal:{[ap]:{address:"0x8AdeE124447435fE03e3CD24dF3f4cAE32E65a3E",blockCreated:4462615}}},sourceId:ap}),ZE=p({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}}}),XE=p({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}),op=11155111,QE=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:35677},l2OutputOracle:{[op]:{address:"0x14D0069452b4AE2b250B395b8adAb771E4267d2f",blockCreated:4462615}},portal:{[op]:{address:"0x867B1Aa872b9C8cB5E9F7755feDC45BB24Ad0ae4",blockCreated:4462615}}},testnet:!0,sourceId:op}),JE=p({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}),ek=p({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"}}}),tk=p({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}),rk=p({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}),nk=p({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}),sk=p({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"}}}),ak=p({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}),ok=p({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}}}),ik=p({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}),ck=p({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}),lk=p({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"}}}),uk=p({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}),dk=p({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"}}}),pk=p({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}),fk=p({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"}}}),mk=p({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}),hk=p({id:13370,name:"Cannon",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),bk=p({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}}}),yk={estimateFeesPerGas:async e=>{var s;if(!((s=e.request)!=null&&s.feeCurrency))return null;const[t,r]=await Promise.all([gk(e.client,e.request.feeCurrency),xk(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(t-r)+r,maxPriorityFeePerGas:r}}};async function gk(e,t){const r=await e.request({method:"eth_gasPrice",params:[t]});return BigInt(r)}async function xk(e,t){const r=await e.request({method:"eth_maxPriorityFeePerGas",params:[t]});return BigInt(r)}function fb(e){return e===0||e===0n||e===void 0||e===null||e==="0"||e===""||typeof e=="string"&&(Zt(e).toLowerCase()==="0x"||Zt(e).toLowerCase()==="0x00")}function Vo(e){return!fb(e)}function wk(e){return typeof e.maxFeePerGas<"u"&&typeof e.maxPriorityFeePerGas<"u"}function mb(e){return e.type==="cip64"?!0:wk(e)&&Vo(e.feeCurrency)}const vk={block:Bd({format(e){var r;return{transactions:(r=e.transactions)==null?void 0:r.map(n=>typeof n=="string"?n:{...Ns(n),...n.gatewayFee?{gatewayFee:Le(n.gatewayFee),gatewayFeeRecipient:n.gatewayFeeRecipient}:{},feeCurrency:n.feeCurrency})}}}),transaction:Rc({format(e){if(e.type==="0x7e")return{isSystemTx:e.isSystemTx,mint:e.mint?Le(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?Le(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:Ud({format(e){const t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),mb(e)&&(t.type="0x7b"),t}})};function Ek(e,t){return mb(e)?Ck(e,t):ub(e,t)}const kk={transaction:Ek};function Ck(e,t){Sk(e);const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,accessList:l,feeCurrency:u,data:d}=e,f=[Fe(r),s?Fe(s):"0x",c?Fe(c):"0x",i?Fe(i):"0x",n?Fe(n):"0x",a??"0x",o?Fe(o):"0x",d??"0x",$o(l),u,..._a(e,t)];return lr(["0x7b",Qr(f)])}const Tk=Ls;function Sk(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a,feeCurrency:o}=e;if(t<=0)throw new Fa({chainId:t});if(a&&!rt(a))throw new Ct({address:a});if(n)throw new $("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(Vo(s)&&s>Tk)throw new as({maxFeePerGas:s});if(Vo(r)&&Vo(s)&&r>s)throw new Oa({maxFeePerGas:s,maxPriorityFeePerGas:r});if(Vo(o)&&!rt(o))throw new $("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(fb(o))throw new $("`feeCurrency` must be provided for CIP-64 transactions.")}const Wo={blockTime:1e3,contracts:lb,formatters:vk,serializers:kk,fees:yk},Ak=p({...Wo,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}),Qc=17e3,Pk=p({...Wo,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:{...Wo.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001},portal:{[Qc]:{address:"0x82527353927d8D069b3B452904c942dA149BA381",blockCreated:2411324}},disputeGameFactory:{[Qc]:{address:"0xE28AAdcd9883746c0e5068F58f9ea06027b214cb",blockCreated:2411324}},l2OutputOracle:{[Qc]:{address:"0x4a2635e9e4f6e45817b1D402ac4904c1d1752438",blockCreated:2411324}},l1StandardBridge:{[Qc]:{address:"0xD1B0E0581973c9eB7f886967A606b9441A897037",blockCreated:2411324}}},testnet:!0}),ip=11155111,Ik=p({...Wo,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:{...Wo.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1},portal:{[ip]:{address:"0x44ae3d41a335a7d05eb533029917aad35662dcc2",blockCreated:8825790}},disputeGameFactory:{[ip]:{address:"0x57c45d82d1a995f1e135b8d7edc0a6bb5211cfaa",blockCreated:8825790}},l1StandardBridge:{[ip]:{address:"0xec18a3c30131a0db4246e785355fbc16e2eaf408",blockCreated:8825790}}},testnet:!0}),Bk=p({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"}}}),Fk=p({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}}}),Uk=p({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"]}}}),Ok=p({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}),Dk=p({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"}}}),_k=p({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}),Mk=p({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}),Nk=p({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}}}),Lk=p({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}}}),zk=p({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}),Rk=p({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}),Hk=p({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}),$k=p({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}),Gk=p({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}),jk=p({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}}}),Vk=p({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}),Wk=p({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}),qk=p({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}),Yk=p({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}),Kk=p({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}}}),Zk=p({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}),Xk=p({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}}}),Qk=p({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}),Jk=p({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}}}),e7=p({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}),t7=p({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}),r7=p({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}}}),n7=p({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}),s7=p({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}),a7=p({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}),o7=p({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}}}),i7=p({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}),c7=p({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}),l7=p({...V,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:{...V.contracts}}),u7=p({...V,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:{...V.contracts}}),d7=p({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}}}),p7=p({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}),f7=p({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"}}}),m7=p({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}}}),h7=p({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}),b7=p({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"}}}),y7=p({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}),g7=p({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}}}),x7=p({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}),w7=p({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}}}),v7=p({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}}}),E7=p({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}),k7=p({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"}}});function cp({chain:e,currentChainId:t}){if(!e)throw new ev;if(t!==e.id)throw new J8({chain:e,currentChainId:t})}function Ma({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 $d({chain:t,contract:{name:r}});if(e&&n.blockCreated&&n.blockCreated>e)throw new $d({blockNumber:e,chain:t,contract:{name:r,blockCreated:n.blockCreated}});return n.address}const C7=p({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}),T7=p({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}),S7=p({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}),A7=p({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"}}}),P7=p({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}),I7=p({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"}}}),B7=p({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"}}}),F7=p({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}}}),U7=p({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"}}}),O7=p({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}),D7=p({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}),_7=p({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"}}}),M7=p({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}),N7=p({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}),L7=p({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}),z7=p({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}),R7=p({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}),H7=p({...V,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}),$7=p({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}),G7=p({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}),j7=p({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}),V7=p({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}),W7=p({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:{}}),q7=p({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}}}),Y7=p({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}),K7=p({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"}}}),Z7=p({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}}}),X7=p({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}),Q7=p({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}),J7=p({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}),eC=p({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"}}}),tC=p({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"}}}),rC=p({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/"}}}),nC=p({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"}}}),sC=p({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}),aC=p({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"}}}),oC=p({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"}}}),iC=p({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}}}),cC=p({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}),lC=p({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}),uC=p({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"}}}),dC=p({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}}}),pC=p({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}),fC=p({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}),mC=p({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}}}),hC=p({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}}}),bC=p({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}),yC=p({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}),gC=p({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}}}),xC=p({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}),wC=p({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}}}),vC=p({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}),EC=p({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}),kC=p({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,CC=p({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:{...V.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}),TC=p({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}}}),La=11155111,SC=p({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:{...V.contracts,addressManager:{[La]:{address:"0xd5C38fa934f7fd7477D4800F4f38a1c5BFdF1373"}},l1CrossDomainMessenger:{[La]:{address:"0x37A68565c4BE9700b3E3Ec60cC4416cAC3052FAa"}},l2OutputOracle:{[La]:{address:"0x9eA2239E65a59EC9C7F1ED4C116dD58Da71Fc1e2"}},portal:{[La]:{address:"0x60377e3cE15dF4CCA24c4beF076b60314240b032"}},l1StandardBridge:{[La]:{address:"0xD4531f633942b2725896F47cD2aFd260b44Ab1F7"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0,sourceId:La}),AC=p({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"}}}),PC=p({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"]}}}),Jc=1,IC=p({...V,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:{...V.contracts,l2OutputOracle:{[Jc]:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Jc]:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:19135323}},l1StandardBridge:{[Jc]:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:19135323}}},sourceId:Jc}),el=17e3,BC=p({...V,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:{...V.contracts,l2OutputOracle:{[el]:{address:"0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[el]:{address:"0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d",blockCreated:318416}},l1StandardBridge:{[el]:{address:"0x0BaafC217162f64930909aD9f2B27125121d6332",blockCreated:318416}}},sourceId:el}),FC=p({...V,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:{...V.contracts},sourceId:1}),UC=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:11155111}),OC=p({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}}}),DC=p({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"}}}),_C=p({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}),MC=p({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}),tl=17e3,NC=p({...V,name:"Garnet Testnet",testnet:!0,id:17069,sourceId:tl,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[tl]:{address:"0x57ee40586fbE286AfC75E67cb69511A6D9aF5909",blockCreated:1274684}},l2OutputOracle:{[tl]:{address:"0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B",blockCreated:1274684}},l1StandardBridge:{[tl]:{address:"0x09bcDd311FE398F80a78BE37E489f5D440DB95DE",blockCreated:1274684}}}}),LC=p({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}),zC=p({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}}}),RC=p({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}),rl=11155111,hb=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[rl]:{address:"0x37347caB2afaa49B776372279143D71ad1f354F6"}},portal:{[rl]:{address:"0x956962C34687A954e611A83619ABaA37Ce6bC78A"}},l1StandardBridge:{[rl]:{address:"0x77b2ffc0F57598cAe1DB76cb398059cF5d10A7E7"}}},testnet:!0,sourceId:rl}),HC=p({...hb,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-rpc-flashblocks.giwa.io"]}}}),$C=p({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}),GC=p({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}),jC=p({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}}}),VC=p({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}),WC=p({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}}}),qC=p({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}),YC=p({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}),KC=p({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}),ZC=p({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}),XC=p({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}),QC=p({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}),JC=p({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}}}),e9=p({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}}}),t9=p({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}),r9=p({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}),n9=p({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"}}}),s9=p({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}),a9=p({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"}}}),o9=p({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"}}}),i9=p({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),c9=p({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}}}),l9=p({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}}}),u9=p({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}),d9=p({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}),p9=p({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}),f9=p({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}),m9=p({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}),h9=p({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}),b9=p({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}),y9=p({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}),g9=p({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}),x9=p({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"}}}),w9=p({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}),v9=p({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}),E9=p({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}),k9=p({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}),C9=p({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}),T9=p({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}),S9=p({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}),A9=p({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}),P9=p({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}),I9=p({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}}}),B9=p({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"}}}),F9=p({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}),U9=p({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}),bb=p({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}),O9=p({id:998,name:"Hyperliquid EVM Testnet",nativeCurrency:{name:"HYPE",symbol:"HYPE",decimals:18},rpcUrls:{default:{http:["https://rpc.hyperliquid-testnet.xyz/evm"]}},testnet:!0}),D9=p({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}),_9=p({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}),M9=p({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}}}),N9=p({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}),L9=p({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}}}),z9=p({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}}}),R9=p({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}),H9=p({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}),$9=p({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}),nl=1,G9=p({...V,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},...V.contracts,disputeGameFactory:{[nl]:{address:"0x10d7b35078d3baabb96dd45a9143b94be65b12cd"}},portal:{[nl]:{address:"0x5d66c1782664115999c47c9fa5cd031f495d3e4f"}},l1StandardBridge:{[nl]:{address:"0x88ff1e5b602916615391f55854588efcbb7663f0"}}},testnet:!1,sourceId:nl}),sl=11155111,j9=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[sl]:{address:"0x860e626c700af381133d9f4af31412a2d1db3d5d"}},portal:{[sl]:{address:"0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7"}},l1StandardBridge:{[sl]:{address:"0x33f60714bbd74d62b66d79213c348614de51901c"}}},testnet:!0,sourceId:sl}),V9=p({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}}}),W9=p({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}),q9=p({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}}}),Y9=p({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}),K9=p({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"}}}),Z9=p({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}),X9=p({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}),Q9=p({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}),J9=p({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}),eT=p({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}),tT=p({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}),rT=p({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}),nT=p({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}),sT=p({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"}}}),aT=p({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"}}}),oT=p({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"}}}),iT=p({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"}}}),cT=p({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"}}}),lT=p({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"}}}),uT=p({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"}}}),dT=p({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"}}}),pT=p({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"}}}),fT=p({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"}}}),mT=p({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}),hT=p({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"}}}),bT=p({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"}}}),yT=p({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}}}),gT=p({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}),xT=p({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}),wT=p({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}),vT=p({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}),ET=p({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}),kT=p({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}),CT=p({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}),TT=p({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}),ST=p({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}),AT=p({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}),PT=p({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}),IT=p({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}}}),BT=p({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}),FT=p({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}),UT=p({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}),OT=p({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}),DT=p({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}),_T=p({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}),MT=p({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}),NT=p({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"}}}),LT=p({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}),zT=p({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}),RT=p({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}),HT=p({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});function Ke(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}class En 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(`
|
|
70
|
+
`),{cause:t,name:"TipAboveFeeCapError"})}};Object.defineProperty(Oa,"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 zo extends ${constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}let Da=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 tv=BigInt(0),Ro=BigInt(1),rv=BigInt(2),nv=BigInt(7),sv=BigInt(256),av=BigInt(113),X1=[],Q1=[],J1=[];for(let e=0,t=Ro,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],X1.push(2*(5*n+r)),Q1.push((e+1)*(e+2)/2%64);let s=tv;for(let a=0;a<7;a++)t=(t<<Ro^(t>>nv)*av)%sv,t&rv&&(s^=Ro<<(Ro<<BigInt(a))-Ro);J1.push(s)}const eb=_1(J1,!0),ov=eb[0],iv=eb[1],tb=(e,t,r)=>r>32?O8(e,t,r):F8(e,t,r),rb=(e,t,r)=>r>32?D8(e,t,r):U8(e,t,r);function cv(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=tb(l,u,1)^r[i],f=rb(l,u,1)^r[i+1];for(let m=0;m<50;m+=10)e[o+m]^=d,e[o+m+1]^=f}let s=e[2],a=e[3];for(let o=0;o<24;o++){const i=Q1[o],c=tb(s,a,i),l=rb(s,a,i),u=X1[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]^=ov[n],e[1]^=iv[n]}es(r)}class Xd extends zd{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,Lo(n),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=w8(this.state)}clone(){return this._cloneInto()}keccak(){U1(this.state32),cv(this.state32,this.rounds),U1(this.state32),this.posOut=0,this.pos=0}update(t){Pa(this),t=$c(t),zs(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){Pa(this,!1),zs(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 Lo(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(F1(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,es(this.state)}_cloneInto(t){const{blockLen:r,suffix:n,outputLen:s,rounds:a,enableXOF:o}=this;return t||(t=new Xd(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 lv=(e,t,r)=>Gc(()=>new Xd(t,e,r)),nb=lv(1,136,256/8);function Ut(e,t){const r=t||"hex",n=nb(Or(e,{strict:!1})?xn(e):e);return r==="bytes"?n:Ue(n)}const Qd=new Da(8192);function Ho(e,t){if(Qd.has(`${e}.${t}`))return Qd.get(`${e}.${t}`);const r=e.substring(2).toLowerCase(),n=Ut(Ms(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 Qd.set(`${e}.${t}`,a),a}function Jd(e,t){if(!rt(e,{strict:!1}))throw new Ct({address:e});return Ho(e,t)}const uv=/^0x[a-fA-F0-9]{40}$/,ep=new Da(8192);function rt(e,t){const{strict:r=!0}=t??{},n=`${e}.${r}`;if(ep.has(n))return ep.get(n);const s=uv.test(e)?e.toLowerCase()===e?!0:r?Ho(e)===e:!0:!1;return ep.set(n,s),s}function Rs(e,t,r,{strict:n}={}){return Or(e,{strict:!1})?tp(e,t,r,{strict:n}):ob(e,t,r,{strict:n})}function sb(e,t){if(typeof t=="number"&&t>0&&t>ct(e)-1)throw new m1({offset:t,position:"start",size:ct(e)})}function ab(e,t,r){if(typeof t=="number"&&typeof r=="number"&&ct(e)!==r-t)throw new m1({offset:r,position:"end",size:ct(e)})}function ob(e,t,r,{strict:n}={}){sb(e,t);const s=e.slice(t,r);return n&&ab(s,t,r),s}function tp(e,t,r,{strict:n}={}){sb(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&ab(s,t,r),s}function dv(e){const{authorizationList:t}=e;if(t)for(const r of t){const{chainId:n}=r,s=r.address;if(!rt(s))throw new Ct({address:s});if(n<0)throw new Fa({chainId:n})}rp(e)}function pv(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new Y1;for(const r of t){const n=ct(r),s=ir(Rs(r,0,1));if(n!==32)throw new Z8({hash:r,size:n});if(s!==q1)throw new X8({hash:r,version:s})}}rp(e)}function rp(e){const{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:n,to:s}=e;if(t<=0)throw new Fa({chainId:t});if(s&&!rt(s))throw new Ct({address:s});if(n&&n>Ls)throw new as({maxFeePerGas:n});if(r&&n&&r>n)throw new Oa({maxFeePerGas:n,maxPriorityFeePerGas:r})}function fv(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a}=e;if(t<=0)throw new Fa({chainId:t});if(a&&!rt(a))throw new Ct({address:a});if(r||s)throw new $("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>Ls)throw new as({maxFeePerGas:n})}function mv(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a}=e;if(a&&!rt(a))throw new Ct({address:a});if(typeof t<"u"&&t<=0)throw new Fa({chainId:t});if(r||s)throw new $("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>Ls)throw new as({maxFeePerGas:n})}function np(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 f8({transaction:e})}function $o(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 m8({storageKey:s[a]});if(!rt(n,{strict:!1}))throw new Ct({address:n});t.push([n,s])}return t}function qc(e,t){const r=np(e);return r==="eip1559"?yv(e,t):r==="eip2930"?gv(e,t):r==="eip4844"?bv(e,t):r==="eip7702"?hv(e,t):xv(e,t)}function hv(e,t){const{authorizationList:r,chainId:n,gas:s,nonce:a,to:o,value:i,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;dv(e);const f=$o(u),m=y8(r);return lr(["0x04",Qr([q(n),a?q(a):"0x",l?q(l):"0x",c?q(c):"0x",s?q(s):"0x",o??"0x",i?q(i):"0x",d??"0x",f,m,..._a(e,t)])])}function bv(e,t){const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerBlobGas:i,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;pv(e);let f=e.blobVersionedHashes,m=e.sidecars;if(e.blobs&&(typeof f>"u"||typeof m>"u")){const A=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(L=>vt(L)),C=e.kzg,D=Md({blobs:A,kzg:C});if(typeof f>"u"&&(f=$1({commitments:D})),typeof m>"u"){const L=Nd({blobs:A,commitments:D,kzg:C});m=K1({blobs:A,commitments:D,proofs:L})}}const y=$o(u),g=[q(r),s?q(s):"0x",l?q(l):"0x",c?q(c):"0x",n?q(n):"0x",a??"0x",o?q(o):"0x",d??"0x",y,i?q(i):"0x",f??[],..._a(e,t)],E=[],v=[],w=[];if(m)for(let A=0;A<m.length;A++){const{blob:C,commitment:D,proof:L}=m[A];E.push(C),v.push(D),w.push(L)}return lr(["0x03",Qr(m?[g,E,v,w]:g)])}function yv(e,t){const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,accessList:l,data:u}=e;rp(e);const d=$o(l),f=[q(r),s?q(s):"0x",c?q(c):"0x",i?q(i):"0x",n?q(n):"0x",a??"0x",o?q(o):"0x",u??"0x",d,..._a(e,t)];return lr(["0x02",Qr(f)])}function gv(e,t){const{chainId:r,gas:n,data:s,nonce:a,to:o,value:i,accessList:c,gasPrice:l}=e;fv(e);const u=$o(c),d=[q(r),a?q(a):"0x",l?q(l):"0x",n?q(n):"0x",o??"0x",i?q(i):"0x",s??"0x",u,..._a(e,t)];return lr(["0x01",Qr(d)])}function xv(e,t){const{chainId:r=0,gas:n,data:s,nonce:a,to:o,value:i,gasPrice:c}=e;mv(e);let l=[a?q(a):"0x",c?q(c):"0x",n?q(n):"0x",o??"0x",i?q(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 m=27n+(t.v===27n?0n:1n);if(t.v!==m)throw new p8({v:t.v});return m})(),d=Zt(t.r),f=Zt(t.s);l=[...l,q(u),d==="0x00"?"0x":d,f==="0x00"?"0x":f]}else r>0&&(l=[...l,q(r),"0x","0x"]);return Qr(l)}function _a(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=Zt(r.r),o=Zt(r.s);return[typeof s=="number"?s?q(1):"0x":n===0n?"0x":n===1n?q(1):n===27n?"0x":q(1),a==="0x00"?"0x":a,o==="0x00"?"0x":o]}class wv 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(`
|
|
71
|
+
`),{name:"InvalidEip712TransactionError"})}}function ib(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 cb(e){const{chainId:t,to:r,from:n,paymaster:s,paymasterInput:a}=e;if(!ib(e))throw new wv;if(!t||t<=0)throw new Fa({chainId:t});if(r&&!rt(r))throw new Ct({address:r});if(n&&!rt(n))throw new Ct({address:n});if(s&&!rt(s))throw new Ct({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 vv(e,t){return ib(e)?kv(e):qc(e,t)}const Ev={transaction:vv};function kv(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:f,gasPerPubdata:m,data:y}=e;cb(e);const g=[n?Ue(n):"0x",c?Ue(c):"0x",i?Ue(i):"0x",r?Ue(r):"0x",s??"0x",o?Ue(o):"0x",y??"0x",Ue(t),Ue(""),Ue(""),Ue(t),a??"0x",Ue(m||Od),u??[],l??"0x",d&&f?[d,f]:[]];return lr(["0x71",Qr(g)])}class Cv extends ${constructor({givenLength:t,maxBytecodeSize:r}){super(`Bytecode cannot be longer than ${r} bytes. Given length: ${t}`,{name:"BytecodeLengthExceedsMaxSizeError"})}}class Tv extends ${constructor({givenLengthInWords:t}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${t}`,{name:"BytecodeLengthInWordsMustBeOddError"})}}class Sv extends ${constructor({givenLength:t}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${t}`,{name:"BytecodeLengthMustBeDivisibleBy32Error"})}}function Av(e){const t=xn(e);if(t.length%32!==0)throw new Sv({givenLength:t.length});if(t.length>v1)throw new Cv({givenLength:t.length,maxBytecodeSize:v1});const r=H1(t),n=xn(r),s=t.length/32;if(s%2===0)throw new Tv({givenLengthInWords:s});const a=xn(s),o=_s(a,{size:2}),i=new Uint8Array([1,0]);return n.set(i,0),n.set(o,2),n}const Pv=e=>{cb(e);const t=Iv(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 Iv(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:f}=e;return{txType:113n,from:BigInt(s),to:n?BigInt(n):0n,gasLimit:t??0n,gasPerPubdataByteLimit:d??Od,maxFeePerGas:o??0n,maxPriorityFeePerGas:i??0n,paymaster:l?BigInt(l):0n,nonce:r?BigInt(r):0n,value:a??0n,data:f??"0x",factoryDeps:(c==null?void 0:c.map(m=>Ue(Av(m))))??[],paymasterInput:u||"0x"}}const ur={blockTime:1e3,formatters:E1,serializers:Ev,custom:{getEip712Domain:Pv}},Bv=p({...ur,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}}}),Fv=p({...ur,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}}}),Uv=p({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}),Ov=p({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}),Dv=p({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}),_v=p({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}),Mv=p({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}),Nv=p({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}}}),Lv=p({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}),zv=p({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}),Rv=p({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}),lb={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},sp={block:Bd({format(e){var r;return{transactions:(r=e.transactions)==null?void 0:r.map(n=>{if(typeof n=="string")return n;const s=Ns(n);return s.typeHex==="0x7e"&&(s.isSystemTx=n.isSystemTx,s.mint=n.mint?Le(n.mint):void 0,s.sourceHash=n.sourceHash,s.type="deposit"),s}),stateRoot:e.stateRoot}}}),transaction:Rc({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?Le(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:Fd({format(e){return{l1GasPrice:e.l1GasPrice?Le(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?Le(e.l1GasUsed):null,l1Fee:e.l1Fee?Le(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function ub(e,t){return Gv(e)?$v(e):qc(e,t)}const Hv={transaction:ub};function $v(e){jv(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?Ue(o):"0x",c?Ue(c):"0x",s?Ue(s):"0x",a?"0x1":"0x",r??"0x"];return lr(["0x7e",Qr(l)])}function Gv(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function jv(e){const{from:t,to:r}=e;if(t&&!rt(t))throw new Ct({address:t});if(r&&!rt(r))throw new Ct({address:r})}const V={blockTime:2e3,contracts:lb,formatters:sp,serializers:Hv},Yc=1,Vv=p({...V,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:{...V.contracts,l2OutputOracle:{[Yc]:{address:"0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"}},portal:{[Yc]:{address:"0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",blockCreated:19070571}},l1StandardBridge:{[Yc]:{address:"0xd5e3eDf5b68135D559D572E26bF863FBC1950033",blockCreated:19070571}}},sourceId:Yc}),Kc=11155111,Wv=p({...V,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:{...V.contracts,l2OutputOracle:{[Kc]:{address:"0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"}},portal:{[Kc]:{address:"0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",blockCreated:4972908}},l1StandardBridge:{[Kc]:{address:"0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",blockCreated:4972908}}},sourceId:Kc}),qv=p({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"]}}}),Yv=p({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}),Kv=p({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}),Zv=p({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"}}}),Xv=p({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}}}),Qv=p({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}),Jv=p({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}}}),eE=p({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}),tE=p({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}),rE=p({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"}}}),nE=p({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}),sE=p({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}),aE=p({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}),oE=p({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}),iE=p({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}}}),cE=p({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}}}),lE=p({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:{}}),uE=p({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}}}),dE=p({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}),pE=p({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}),fE=p({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}),mE=p({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}),hE=p({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}}}),bE=p({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}),yE=p({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}),gE=p({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/"}}}),xE=p({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}}}),wE=p({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}),vE=p({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}),EE=p({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}),kE=p({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"}}}),Go=1,db=p({...V,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:{...V.contracts,disputeGameFactory:{[Go]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[Go]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[Go]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[Go]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:Go}),CE=p({...db,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}}),TE=p({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}),Zc=5,SE=p({...V,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:{...V.contracts,l2OutputOracle:{[Zc]:{address:"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988},portal:{[Zc]:{address:"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"}},l1StandardBridge:{[Zc]:{address:"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"}}},testnet:!0,sourceId:Zc}),jo=11155111,pb=p({...V,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:{...V.contracts,disputeGameFactory:{[jo]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[jo]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[jo]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[jo]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:jo}),AE=p({...pb,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}}),PE=p({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}}}),IE=p({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}),BE=p({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"}}}),FE=p({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}),UE=p({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}),OE=p({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}),DE=p({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}),_E=p({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}),ME=p({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"}}}),NE=p({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}),LE=p({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"}}}),zE=p({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}),RE=p({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"}}}),HE=p({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}),$E=p({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}}}),GE=p({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}),jE=p({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}),VE=p({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}}}),WE=p({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}),Xc=1,qE=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:212929},l2OutputOracle:{[Xc]:{address:"0x826D1B0D4111Ad9146Eb8941D7Ca2B6a44215c76",blockCreated:19300358}},portal:{[Xc]:{address:"0x0Ec68c5B10F21EFFb74f2A5C61DFe6b08C0Db6Cb",blockCreated:19300357}},l1StandardBridge:{[Xc]:{address:"0x697402166Fbf2F22E970df8a6486Ef171dbfc524",blockCreated:19300360}}},sourceId:Xc}),YE=p({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}),ap=1,KE=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:23131},l2OutputOracle:{[ap]:{address:"0xdDa53E23f8a32640b04D7256e651C1db98dB11C1",blockCreated:4462615}},portal:{[ap]:{address:"0x8AdeE124447435fE03e3CD24dF3f4cAE32E65a3E",blockCreated:4462615}}},sourceId:ap}),ZE=p({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}}}),XE=p({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}),op=11155111,QE=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:35677},l2OutputOracle:{[op]:{address:"0x14D0069452b4AE2b250B395b8adAb771E4267d2f",blockCreated:4462615}},portal:{[op]:{address:"0x867B1Aa872b9C8cB5E9F7755feDC45BB24Ad0ae4",blockCreated:4462615}}},testnet:!0,sourceId:op}),JE=p({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}),ek=p({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"}}}),tk=p({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}),rk=p({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}),nk=p({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}),sk=p({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"}}}),ak=p({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}),ok=p({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}}}),ik=p({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}),ck=p({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}),lk=p({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"}}}),uk=p({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}),dk=p({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"}}}),pk=p({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}),fk=p({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"}}}),mk=p({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}),hk=p({id:13370,name:"Cannon",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),bk=p({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}}}),yk={estimateFeesPerGas:async e=>{var s;if(!((s=e.request)!=null&&s.feeCurrency))return null;const[t,r]=await Promise.all([gk(e.client,e.request.feeCurrency),xk(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(t-r)+r,maxPriorityFeePerGas:r}}};async function gk(e,t){const r=await e.request({method:"eth_gasPrice",params:[t]});return BigInt(r)}async function xk(e,t){const r=await e.request({method:"eth_maxPriorityFeePerGas",params:[t]});return BigInt(r)}function fb(e){return e===0||e===0n||e===void 0||e===null||e==="0"||e===""||typeof e=="string"&&(Zt(e).toLowerCase()==="0x"||Zt(e).toLowerCase()==="0x00")}function Vo(e){return!fb(e)}function wk(e){return typeof e.maxFeePerGas<"u"&&typeof e.maxPriorityFeePerGas<"u"}function mb(e){return e.type==="cip64"?!0:wk(e)&&Vo(e.feeCurrency)}const vk={block:Bd({format(e){var r;return{transactions:(r=e.transactions)==null?void 0:r.map(n=>typeof n=="string"?n:{...Ns(n),...n.gatewayFee?{gatewayFee:Le(n.gatewayFee),gatewayFeeRecipient:n.gatewayFeeRecipient}:{},feeCurrency:n.feeCurrency})}}}),transaction:Rc({format(e){if(e.type==="0x7e")return{isSystemTx:e.isSystemTx,mint:e.mint?Le(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?Le(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:Ud({format(e){const t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),mb(e)&&(t.type="0x7b"),t}})};function Ek(e,t){return mb(e)?Ck(e,t):ub(e,t)}const kk={transaction:Ek};function Ck(e,t){Sk(e);const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,accessList:l,feeCurrency:u,data:d}=e,f=[Ue(r),s?Ue(s):"0x",c?Ue(c):"0x",i?Ue(i):"0x",n?Ue(n):"0x",a??"0x",o?Ue(o):"0x",d??"0x",$o(l),u,..._a(e,t)];return lr(["0x7b",Qr(f)])}const Tk=Ls;function Sk(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a,feeCurrency:o}=e;if(t<=0)throw new Fa({chainId:t});if(a&&!rt(a))throw new Ct({address:a});if(n)throw new $("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(Vo(s)&&s>Tk)throw new as({maxFeePerGas:s});if(Vo(r)&&Vo(s)&&r>s)throw new Oa({maxFeePerGas:s,maxPriorityFeePerGas:r});if(Vo(o)&&!rt(o))throw new $("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(fb(o))throw new $("`feeCurrency` must be provided for CIP-64 transactions.")}const Wo={blockTime:1e3,contracts:lb,formatters:vk,serializers:kk,fees:yk},Ak=p({...Wo,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}),Qc=17e3,Pk=p({...Wo,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:{...Wo.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001},portal:{[Qc]:{address:"0x82527353927d8D069b3B452904c942dA149BA381",blockCreated:2411324}},disputeGameFactory:{[Qc]:{address:"0xE28AAdcd9883746c0e5068F58f9ea06027b214cb",blockCreated:2411324}},l2OutputOracle:{[Qc]:{address:"0x4a2635e9e4f6e45817b1D402ac4904c1d1752438",blockCreated:2411324}},l1StandardBridge:{[Qc]:{address:"0xD1B0E0581973c9eB7f886967A606b9441A897037",blockCreated:2411324}}},testnet:!0}),ip=11155111,Ik=p({...Wo,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:{...Wo.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1},portal:{[ip]:{address:"0x44ae3d41a335a7d05eb533029917aad35662dcc2",blockCreated:8825790}},disputeGameFactory:{[ip]:{address:"0x57c45d82d1a995f1e135b8d7edc0a6bb5211cfaa",blockCreated:8825790}},l1StandardBridge:{[ip]:{address:"0xec18a3c30131a0db4246e785355fbc16e2eaf408",blockCreated:8825790}}},testnet:!0}),Bk=p({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"}}}),Fk=p({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}}}),Uk=p({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"]}}}),Ok=p({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}),Dk=p({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"}}}),_k=p({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}),Mk=p({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}),Nk=p({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}}}),Lk=p({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}}}),zk=p({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}),Rk=p({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}),Hk=p({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}),$k=p({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}),Gk=p({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}),jk=p({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}}}),Vk=p({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}),Wk=p({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}),qk=p({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}),Yk=p({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}),Kk=p({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}}}),Zk=p({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}),Xk=p({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}}}),Qk=p({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}),Jk=p({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}}}),e7=p({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}),t7=p({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}),r7=p({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}}}),n7=p({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}),s7=p({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}),a7=p({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}),o7=p({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}}}),i7=p({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}),c7=p({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}),l7=p({...V,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:{...V.contracts}}),u7=p({...V,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:{...V.contracts}}),d7=p({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}}}),p7=p({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}),f7=p({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"}}}),m7=p({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}}}),h7=p({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}),b7=p({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"}}}),y7=p({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}),g7=p({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}}}),x7=p({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}),w7=p({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}}}),v7=p({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}}}),E7=p({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}),k7=p({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"}}});function cp({chain:e,currentChainId:t}){if(!e)throw new ev;if(t!==e.id)throw new J8({chain:e,currentChainId:t})}function Ma({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 $d({chain:t,contract:{name:r}});if(e&&n.blockCreated&&n.blockCreated>e)throw new $d({blockNumber:e,chain:t,contract:{name:r,blockCreated:n.blockCreated}});return n.address}const C7=p({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}),T7=p({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}),S7=p({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}),A7=p({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"}}}),P7=p({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}),I7=p({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"}}}),B7=p({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"}}}),F7=p({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}}}),U7=p({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"}}}),O7=p({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}),D7=p({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}),_7=p({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"}}}),M7=p({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}),N7=p({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}),L7=p({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}),z7=p({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}),R7=p({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}),H7=p({...V,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}),$7=p({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}),G7=p({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}),j7=p({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}),V7=p({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}),W7=p({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:{}}),q7=p({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}}}),Y7=p({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}),K7=p({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"}}}),Z7=p({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}}}),X7=p({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}),Q7=p({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}),J7=p({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}),eC=p({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"}}}),tC=p({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"}}}),rC=p({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/"}}}),nC=p({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"}}}),sC=p({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}),aC=p({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"}}}),oC=p({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"}}}),iC=p({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}}}),cC=p({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}),lC=p({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}),uC=p({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"}}}),dC=p({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}}}),pC=p({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}),fC=p({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}),mC=p({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}}}),hC=p({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}}}),bC=p({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}),yC=p({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}),gC=p({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}}}),xC=p({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}),wC=p({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}}}),vC=p({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}),EC=p({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}),kC=p({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,CC=p({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:{...V.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}),TC=p({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}}}),La=11155111,SC=p({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:{...V.contracts,addressManager:{[La]:{address:"0xd5C38fa934f7fd7477D4800F4f38a1c5BFdF1373"}},l1CrossDomainMessenger:{[La]:{address:"0x37A68565c4BE9700b3E3Ec60cC4416cAC3052FAa"}},l2OutputOracle:{[La]:{address:"0x9eA2239E65a59EC9C7F1ED4C116dD58Da71Fc1e2"}},portal:{[La]:{address:"0x60377e3cE15dF4CCA24c4beF076b60314240b032"}},l1StandardBridge:{[La]:{address:"0xD4531f633942b2725896F47cD2aFd260b44Ab1F7"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0,sourceId:La}),AC=p({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"}}}),PC=p({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"]}}}),Jc=1,IC=p({...V,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:{...V.contracts,l2OutputOracle:{[Jc]:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Jc]:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:19135323}},l1StandardBridge:{[Jc]:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:19135323}}},sourceId:Jc}),el=17e3,BC=p({...V,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:{...V.contracts,l2OutputOracle:{[el]:{address:"0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[el]:{address:"0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d",blockCreated:318416}},l1StandardBridge:{[el]:{address:"0x0BaafC217162f64930909aD9f2B27125121d6332",blockCreated:318416}}},sourceId:el}),FC=p({...V,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:{...V.contracts},sourceId:1}),UC=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:11155111}),OC=p({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}}}),DC=p({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"}}}),_C=p({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}),MC=p({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}),tl=17e3,NC=p({...V,name:"Garnet Testnet",testnet:!0,id:17069,sourceId:tl,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[tl]:{address:"0x57ee40586fbE286AfC75E67cb69511A6D9aF5909",blockCreated:1274684}},l2OutputOracle:{[tl]:{address:"0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B",blockCreated:1274684}},l1StandardBridge:{[tl]:{address:"0x09bcDd311FE398F80a78BE37E489f5D440DB95DE",blockCreated:1274684}}}}),LC=p({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}),zC=p({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}}}),RC=p({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}),rl=11155111,hb=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[rl]:{address:"0x37347caB2afaa49B776372279143D71ad1f354F6"}},portal:{[rl]:{address:"0x956962C34687A954e611A83619ABaA37Ce6bC78A"}},l1StandardBridge:{[rl]:{address:"0x77b2ffc0F57598cAe1DB76cb398059cF5d10A7E7"}}},testnet:!0,sourceId:rl}),HC=p({...hb,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-rpc-flashblocks.giwa.io"]}}}),$C=p({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}),GC=p({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}),jC=p({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}}}),VC=p({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}),WC=p({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}}}),qC=p({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}),YC=p({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}),KC=p({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}),ZC=p({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}),XC=p({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}),QC=p({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}),JC=p({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}}}),e9=p({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}}}),t9=p({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}),r9=p({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}),n9=p({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"}}}),s9=p({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}),a9=p({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"}}}),o9=p({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"}}}),i9=p({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),c9=p({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}}}),l9=p({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}}}),u9=p({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}),d9=p({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}),p9=p({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}),f9=p({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}),m9=p({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}),h9=p({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}),b9=p({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}),y9=p({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}),g9=p({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}),x9=p({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"}}}),w9=p({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}),v9=p({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}),E9=p({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}),k9=p({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}),C9=p({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}),T9=p({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}),S9=p({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}),A9=p({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}),P9=p({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}),I9=p({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}}}),B9=p({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"}}}),F9=p({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}),U9=p({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}),bb=p({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}),O9=p({id:998,name:"Hyperliquid EVM Testnet",nativeCurrency:{name:"HYPE",symbol:"HYPE",decimals:18},rpcUrls:{default:{http:["https://rpc.hyperliquid-testnet.xyz/evm"]}},testnet:!0}),D9=p({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}),_9=p({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}),M9=p({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}}}),N9=p({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}),L9=p({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}}}),z9=p({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}}}),R9=p({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}),H9=p({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}),$9=p({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}),nl=1,G9=p({...V,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},...V.contracts,disputeGameFactory:{[nl]:{address:"0x10d7b35078d3baabb96dd45a9143b94be65b12cd"}},portal:{[nl]:{address:"0x5d66c1782664115999c47c9fa5cd031f495d3e4f"}},l1StandardBridge:{[nl]:{address:"0x88ff1e5b602916615391f55854588efcbb7663f0"}}},testnet:!1,sourceId:nl}),sl=11155111,j9=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[sl]:{address:"0x860e626c700af381133d9f4af31412a2d1db3d5d"}},portal:{[sl]:{address:"0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7"}},l1StandardBridge:{[sl]:{address:"0x33f60714bbd74d62b66d79213c348614de51901c"}}},testnet:!0,sourceId:sl}),V9=p({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}}}),W9=p({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}),q9=p({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}}}),Y9=p({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}),K9=p({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"}}}),Z9=p({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}),X9=p({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}),Q9=p({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}),J9=p({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}),eT=p({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}),tT=p({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}),rT=p({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}),nT=p({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}),sT=p({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"}}}),aT=p({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"}}}),oT=p({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"}}}),iT=p({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"}}}),cT=p({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"}}}),lT=p({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"}}}),uT=p({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"}}}),dT=p({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"}}}),pT=p({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"}}}),fT=p({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"}}}),mT=p({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}),hT=p({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"}}}),bT=p({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"}}}),yT=p({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}}}),gT=p({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}),xT=p({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}),wT=p({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}),vT=p({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}),ET=p({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}),kT=p({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}),CT=p({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}),TT=p({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}),ST=p({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}),AT=p({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}),PT=p({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}),IT=p({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}}}),BT=p({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}),FT=p({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}),UT=p({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}),OT=p({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}),DT=p({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}),_T=p({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}),MT=p({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}),NT=p({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"}}}),LT=p({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}),zT=p({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}),RT=p({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}),HT=p({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});function Ke(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}class En 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(`
|
|
72
72
|
`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class Hs extends ${constructor({docsPath:t,metaMessages:r,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:t,metaMessages:r,name:"AccountTypeNotSupportedError"})}}const $T={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."},yb={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},GT={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function Mr(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new n4(e.type);return`${e.name}(${al(e.inputs,{includeName:t})})`}function al(e,{includeName:t=!1}={}){return e?e.map(r=>jT(r,{includeName:t})).join(t?", ":","):""}function jT(e,{includeName:t}){return e.type.startsWith("tuple")?`(${al(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class VT 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(`
|
|
73
73
|
`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class gb 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(`
|
|
74
74
|
`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class xb extends ${constructor({data:t,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(`
|
|
@@ -102,11 +102,11 @@ ${bS(m)}`),super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessa
|
|
|
102
102
|
`):`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 gS 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 xS 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 ul 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 Gs 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: ${Xo(o)}`,t&&`Request body: ${ht(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 vp extends ${constructor({body:t,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${Xo(n)}`,`Request body: ${ht(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 Zb extends ${constructor({body:t,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${Xo(r)}`,`Request body: ${ht(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=r}}const wS=-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 vp?t.code:r??wS}}class pr 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 Qo extends Jt{constructor(t){super(t,{code:Qo.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(Qo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class Jo extends Jt{constructor(t){super(t,{code:Jo.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(Jo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class ei extends Jt{constructor(t,{method:r}={}){super(t,{code:ei.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`})}}Object.defineProperty(ei,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class ti extends Jt{constructor(t){super(t,{code:ti.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
103
103
|
`)})}}Object.defineProperty(ti,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class js extends Jt{constructor(t){super(t,{code:js.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(js,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class is extends Jt{constructor(t){super(t,{code:is.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
104
104
|
`)})}}Object.defineProperty(is,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class ri extends Jt{constructor(t){super(t,{code:ri.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(ri,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class ni extends Jt{constructor(t){super(t,{code:ni.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(ni,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class si extends Jt{constructor(t){super(t,{code:si.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(si,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Vs extends Jt{constructor(t,{method:r}={}){super(t,{code:Vs.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`})}}Object.defineProperty(Vs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Ga extends Jt{constructor(t){super(t,{code:Ga.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Ga,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class ai extends Jt{constructor(t){super(t,{code:ai.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(ai,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class ja extends pr{constructor(t){super(t,{code:ja.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(ja,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class oi extends pr{constructor(t){super(t,{code:oi.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(oi,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class ii extends pr{constructor(t,{method:r}={}){super(t,{code:ii.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`})}}Object.defineProperty(ii,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class ci extends pr{constructor(t){super(t,{code:ci.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(ci,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class li extends pr{constructor(t){super(t,{code:li.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(li,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class ui extends pr{constructor(t){super(t,{code:ui.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(ui,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class Va extends pr{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 di extends pr{constructor(t){super(t,{code:di.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(di,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class pi extends pr{constructor(t){super(t,{code:pi.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(pi,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class fi extends pr{constructor(t){super(t,{code:fi.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(fi,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class mi extends pr{constructor(t){super(t,{code:mi.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(mi,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class hi extends pr{constructor(t){super(t,{code:hi.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(hi,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class Wa extends pr{constructor(t){super(t,{code:Wa.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Wa,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class vS extends Jt{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}function dl(e,t){const r=(e.details||"").toLowerCase(),n=e instanceof $?e.walk(s=>(s==null?void 0:s.code)===Ua.code):e;return n instanceof $?new Ua({cause:e,message:n.details}):Ua.nodeMessage.test(r)?new Ua({cause:e,message:e.details}):as.nodeMessage.test(r)?new as({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Gd.nodeMessage.test(r)?new Gd({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):jd.nodeMessage.test(r)?new jd({cause:e,nonce:t==null?void 0:t.nonce}):Vd.nodeMessage.test(r)?new Vd({cause:e,nonce:t==null?void 0:t.nonce}):Wd.nodeMessage.test(r)?new Wd({cause:e,nonce:t==null?void 0:t.nonce}):qd.nodeMessage.test(r)?new qd({cause:e}):Yd.nodeMessage.test(r)?new Yd({cause:e,gas:t==null?void 0:t.gas}):Kd.nodeMessage.test(r)?new Kd({cause:e,gas:t==null?void 0:t.gas}):Zd.nodeMessage.test(r)?new Zd({cause:e}):Oa.nodeMessage.test(r)?new Oa({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new zo({cause:e})}function Ep(e,{docsPath:t,...r}){const n=(()=>{const s=dl(e,r);return s instanceof zo?e:s})();return new Yb(n,{docsPath:t,...r})}function Ws(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 en(e){const{account:t,maxFeePerGas:r,maxPriorityFeePerGas:n,to:s}=e,a=t?Ke(t):void 0;if(a&&!rt(a.address))throw new Ct({address:a.address});if(s&&!rt(s))throw new Ct({address:s});if(r&&r>Ls)throw new as({maxFeePerGas:r});if(n&&r&&n>r)throw new Oa({maxFeePerGas:r,maxPriorityFeePerGas:n})}async function ES(e,t){var s,a,o;const{account:r=e.account}=t;if(!r)throw new En;const n=Ke(r);try{const{accessList:i,blockNumber:c,blockTag:l,data:u,gas:d,gasPrice:f,maxFeePerGas:m,maxPriorityFeePerGas:y,nonce:g,to:E,value:v,...w}=t,C=(typeof c=="bigint"?q(c):void 0)||l;en(t);const D=(o=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionRequest)==null?void 0:o.format,T=(D||_r)({...Ws(w,{format:D}),account:n,accessList:i,data:u,gas:d,gasPrice:f,maxFeePerGas:m,maxPriorityFeePerGas:y,nonce:g,to:E,value:v},"estimateGas"),{baseFeePerGas:h,gasLimit:b,priorityFeePerGas:x}=await e.request({method:"linea_estimateGas",params:C?[T,C]:[T]});return{baseFeePerGas:BigInt(h),gasLimit:BigInt(b),priorityFeePerGas:BigInt(x)}}catch(i){throw Ep(i,{...t,account:n,chain:e.chain})}}const kp={fees:{estimateFeesPerGas:Xb,async maxPriorityFeePerGas({block:e,client:t,request:r}){const n=await Xb({block:e,client:t,multiply:s=>s,request:r,type:"eip1559"});return n!=null&&n.maxPriorityFeePerGas?n.maxPriorityFeePerGas:null}}};async function Xb({client:e,multiply:t,request:r,type:n}){try{const s=await ES(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 kS=p({...kp,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}),CS=p({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}),TS=p({...kp,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}),SS=p({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}),pl=1,AS=p({...V,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:{...V.contracts,multicall3:{address:"0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0"},l2OutputOracle:{[pl]:{address:"0x113cB99283AF242Da0A0C54347667edF531Aa7d6"}},portal:{[pl]:{address:"0x26dB93F8b8b4f7016240af62F7730979d353f9A7"}},l1StandardBridge:{[pl]:{address:"0x2658723Bf70c7667De6B25F99fcce13A16D25d08"}}},sourceId:pl}),fl=11155111,PS=p({...V,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:{...V.contracts,l2OutputOracle:{[fl]:{address:"0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[fl]:{address:"0xe3d90F21490686Ec7eF37BE788E02dfC12787264"}},l1StandardBridge:{[fl]:{address:"0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5"}}},testnet:!0,sourceId:fl}),IS=p({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}),BS=p({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),FS=p({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}),US=p({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}}}),OS=p({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}),DS=p({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}),_S=p({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}),MS=p({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}),NS=p({id:105363,name:"Lumoz Testnet",nativeCurrency:{decimals:18,name:"Lumoz Testnet Token",symbol:"MOZ"},rpcUrls:{default:{http:["https://testnet-rpc.lumoz.org"]}},testnet:!0}),LS=p({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"}}}),zS=p({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}}}),RS=p({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}}}),HS=p({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}),$S=p({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}}}),GS=p({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}),jS=p({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}),VS=p({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}}}),WS=p({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}),qS=p({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}),YS=p({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}),KS=p({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"}}}),ZS=p({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}),XS=p({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"}}}),QS=p({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}),JS=p({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}),eA=p({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}),tA=p({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}),rA=p({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}}}),nA=p({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"}}}),sA=p({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}),aA=p({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"}}}),oA=p({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}),iA=p({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}}}),cA=p({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}),lA=p({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}),ml=1,uA=p({...V,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:{...V.contracts,l2OutputOracle:{[ml]:{address:"0x3B1F7aDa0Fcc26B13515af752Dd07fB1CAc11426"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},portal:{[ml]:{address:"0x3F37aBdE2C6b5B2ed6F8045787Df1ED1E3753956"}},l1StandardBridge:{[ml]:{address:"0x6d0f65D59b55B0FEC5d2d15365154DcADC140BF3"}}},sourceId:ml}),dA=p({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"}}}),pA=p({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"}}}),fA=p({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}}}),mA=p({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}}}),hA=p({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}}}),bA=p({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}}}),yA=p({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}),gA=p({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}),xA=p({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}),wA=p({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}),hl=1,vA=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2465882},l2OutputOracle:{[hl]:{address:"0x4317ba146D4933D889518a3e5E11Fe7a53199b04"}},portal:{[hl]:{address:"0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07"}},l1StandardBridge:{[hl]:{address:"0x735aDBbE72226BD52e818E7181953f42E3b0FF21"}}},sourceId:hl}),bl=11155111,EA=p({...V,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:{...V.contracts,l2OutputOracle:{[bl]:{address:"0x2634BD65ba27AB63811c74A63118ACb312701Bfa",blockCreated:3778393}},portal:{[bl]:{address:"0x320e1580effF37E008F1C92700d1eBa47c1B23fD",blockCreated:3778395}},l1StandardBridge:{[bl]:{address:"0xbC5C679879B2965296756CD959C3C739769995E2",blockCreated:3778392}},multicall3:{address:"0xBAba8373113Fb7a68f195deF18732e01aF8eDfCF",blockCreated:3019007}},testnet:!0,sourceId:bl}),kA=p({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}}}),CA=p({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}),TA=p({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}),SA=p({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}),AA=p({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"]}}}),PA=p({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}),IA=p({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}),BA=p({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}),FA=p({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}),UA=p({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}),OA=p({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"}}}),DA=p({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}),_A=p({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}),MA=p({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}),NA=p({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}),LA=p({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}),zA=p({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}),RA=p({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}),HA=p({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}}}),$A=p({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}}}),GA=p({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}}}),jA=p({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"}}}),VA=p({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}),WA=p({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}),qA=p({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"}}}),YA=p({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}),KA=p({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}}}),ZA=p({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}),XA=p({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}),QA=p({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}),JA=p({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}),eP=p({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"}}}),yl=56,tP=p({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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:512881},l2OutputOracle:{[yl]:{address:"0x153CAB79f4767E2ff862C94aa49573294B13D169"}},portal:{[yl]:{address:"0x1876EA7702C0ad0C6A2ae6036DE7733edfBca519"}},l1StandardBridge:{[yl]:{address:"0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea"}}},sourceId:yl}),gl=97,rP=p({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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3705108},l2OutputOracle:{[gl]:{address:"0xFf2394Bb843012562f4349C6632a0EcB92fC8810"}},portal:{[gl]:{address:"0x4386C8ABf2009aC0c263462Da568DD9d46e52a31"}},l1StandardBridge:{[gl]:{address:"0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840"}}},testnet:!0,sourceId:gl}),nP=p({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}),bi=1,sP=p({...V,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:{...V.contracts,disputeGameFactory:{[bi]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[bi]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[bi]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[bi]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:bi}),xl=5,aP=p({...V,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:{...V.contracts,l2OutputOracle:{[xl]:{address:"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461},portal:{[xl]:{address:"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383"}},l1StandardBridge:{[xl]:{address:"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8"}}},testnet:!0,sourceId:xl}),yi=11155111,oP=p({...V,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:{...V.contracts,disputeGameFactory:{[yi]:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{[yi]:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{[yi]:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{[yi]:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:yi}),iP=p({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}),cP=p({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}),lP=p({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}),uP=p({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}),dP=p({id:41144114,name:"Otim Devnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["http://devnet.otim.xyz"]}},contracts:{batchInvoker:{address:"0x5FbDB2315678afecb367f032d93F642f64180aa3"}}}),pP=p({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}}}),fP=p({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}),mP=p({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}}}),wl=1,hP=p({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:{[wl]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3380209},portal:{[wl]:{address:"0xb26Fd985c5959bBB382BAFdD0b879E149e48116c"}},l1StandardBridge:{[wl]:{address:"0xD0204B9527C1bA7bD765Fa5CCD9355d38338272b"}}},formatters:sp,sourceId:wl}),vl=11155111,bP=p({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:{[vl]:{address:"0xD5bAc3152ffC25318F848B3DD5dA6C85171BaEEe"}},portal:{[vl]:{address:"0xF04BdD5353Bb0EFF6CA60CfcC78594278eBfE179"}},l1StandardBridge:{[vl]:{address:"0xFaE6abCAF30D23e233AC7faF747F2fC3a5a6Bfa3"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3754925}},formatters:sp,sourceId:vl,testnet:!0}),yP=p({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}}}),gP=p({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}),xP=p({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}}}),wP=p({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}}}),vP=p({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}),EP=p({...ur,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}),kP=p({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}}}),CP=p({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}),TP=p({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}),SP=p({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}),AP=p({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}),PP=p({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}),IP=p({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}),BP=p({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}}}),FP=p({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}),UP=p({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}),OP=p({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}}}),DP=p({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}}}),_P=p({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}}}),MP=p({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"}}}),NP=p({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"}}}),LP=p({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}),zP=p({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}),RP=p({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}),HP=p({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}}}),$P=p({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}}}),GP=p({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}),Qb=11155111,jP=p({...V,name:"Pyrope Testnet",testnet:!0,id:695569,sourceId:Qb,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:{...V.contracts,l1StandardBridge:{[Qb]:{address:"0xC24932c31D9621aE9e792576152B7ef010cFC2F8"}}}}),VP=p({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}),WP=p({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"}}}),qP=p({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}),YP=p({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}),KP=p({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}),ZP=p({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}),XP=p({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}}}),QP=p({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}),JP=p({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}),eI=p({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}),tI=p({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}),El=1,rI=p({...V,name:"Redstone",id:690,sourceId:El,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[El]:{address:"0xC7bCb0e8839a28A1cFadd1CF716de9016CdA51ae",blockCreated:19578329}},l2OutputOracle:{[El]:{address:"0xa426A052f657AEEefc298b3B5c35a470e4739d69",blockCreated:19578337}},l1StandardBridge:{[El]:{address:"0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69",blockCreated:19578331}}}}),nI=p({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}),sI=p({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}),aI=p({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}),oI=p({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}),iI=p({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}}}),cI=p({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}}}),lI=p({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}}}),uI=p({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}}}),dI=p({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}),pI=p({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}}}),fI=p({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}),kl=1,mI=p({...V,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:{...V.contracts,l2OutputOracle:{[kl]:{address:"0xE6f24d2C32B3109B18ed33cF08eFb490b1e09C10"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14193},portal:{[kl]:{address:"0x6A12432491bbbE8d3babf75F759766774C778Db4",blockCreated:19387057}},l1StandardBridge:{[kl]:{address:"0x4cbab69108Aa72151EDa5A3c164eA86845f18438"}}},sourceId:kl}),Cl=11155111,hI=p({...V,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:{...V.contracts,l2OutputOracle:{[Cl]:{address:"0xDb5c46C3Eaa6Ed6aE8b2379785DF7dd029C0dC81"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:55697},portal:{[Cl]:{address:"0xcBD77E8E1E7F06B25baDe67142cdE82652Da7b57",blockCreated:5345035}},l1StandardBridge:{[Cl]:{address:"0xdDD29bb63B0839FB1cE0eE439Ff027738595D07B"}}},testnet:!0,sourceId:Cl}),bI=p({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}),yI=p({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}}}),gI=p({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}),xI=p({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}),wI=p({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}}}),vI=p({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}),EI=p({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"}}}),kI=p({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}),CI=p({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}),TI=p({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}),SI=p({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"}}}),AI=p({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}),PI=p({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}),II=p({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}),BI=p({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}),Tl=1,FI=p({...V,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:{...V.contracts,l2OutputOracle:{[Tl]:{address:"0x6Ef8c69CfE4635d866e3E02732068022c06e724D",blockCreated:20369940}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1},portal:{[Tl]:{address:"0xEB06fFa16011B5628BaB98E29776361c83741dd3",blockCreated:20369933}},l1StandardBridge:{[Tl]:{address:"0x62Edd5f4930Ea92dCa3fB81689bDD9b9d076b57B",blockCreated:20369935}}},sourceId:Tl}),UI=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0,sourceId:11155111}),OI=p({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}),DI=p({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}),_I=p({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}}}),MI=p({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}),NI=p({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}),LI=p({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"}}}),zI=p({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}),RI=p({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"}}}),HI=p({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}),$I=p({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"}}}),GI=p({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}),jI=p({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}),VI=p({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:{}}),WI=p({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}}}),qI=p({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}),YI=p({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:{}}),KI=p({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:{}}),ZI=p({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}}}),XI=p({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}),QI=p({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:{}}),JI=p({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:{}}),eB=p({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}}}),tB=p({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}),rB=p({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:{}}),nB=p({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=p({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=p({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}}}),oB=p({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=p({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}),gi=1,cB=p({...V,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:{...V.contracts,disputeGameFactory:{[gi]:{address:"0x472562Fcf26D6b2793f8E0b0fB660ba0E5e08A46"}},l2OutputOracle:{[gi]:{address:"0x2172e492Fc807F5d5645D0E3543f139ECF539294"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[gi]:{address:"0x79f446D024d74D0Bb6E699C131c703463c5D65E9"}},l1StandardBridge:{[gi]:{address:"0x6534Bdb6b5c060d3e6aa833433333135eFE8E0aA"}}},sourceId:gi}),xi=11155111,lB=p({...V,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:{...V.contracts,disputeGameFactory:{[xi]:{address:"0x206a75d89d45F146C54020F132FF93bEDD09f55E"}},l2OutputOracle:{[xi]:{address:"0x60e3A368a4cdCEf85ffB964e372726F56A46221e"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[xi]:{address:"0xb5afdd0E8dDF081Ef90e8A3e0c7b5798e66E954E"}},l1StandardBridge:{[xi]:{address:"0xbd37E1a59D4C00C9A46F75018dffd84061bC5f74"}}},testnet:!0,sourceId:xi}),uB=p({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}),dB=p({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}),wi=1,pB=p({...V,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:{...V.contracts,disputeGameFactory:{[wi]:{address:"0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0"}},l2OutputOracle:{[wi]:{address:"0x0000000000000000000000000000000000000000"}},portal:{[wi]:{address:"0x88e529a6ccd302c948689cd5156c83d4614fae92",blockCreated:7061266}},l1StandardBridge:{[wi]:{address:"0xeb9bf100225c214efc3e7c651ebbadcf85177607",blockCreated:7061266}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},sourceId:wi}),vi=11155111,fB=p({...V,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:{...V.contracts,disputeGameFactory:{[vi]:{address:"0xB3Ad2c38E6e0640d7ce6aA952AB3A60E81bf7a01"}},l2OutputOracle:{[vi]:{address:"0x710e5286C746eC38beeB7538d0146f60D27be343"}},portal:{[vi]:{address:"0x65ea1489741A5D72fFdD8e6485B216bBdcC15Af3",blockCreated:6466136}},l1StandardBridge:{[vi]:{address:"0x5f5a404A5edabcDD80DB05E8e54A78c9EBF000C2",blockCreated:6466136}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},testnet:!0,sourceId:vi}),mB=p({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}}}),hB=p({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}),bB=p({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}),yB=p({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}),gB=p({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}),xB=p({...ur,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}),wB=p({...ur,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}),vB=p({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}),EB=p({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}),kB=p({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}),CB=p({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}),Jb=p({...kp,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}),TB=p({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}),SB=p({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}),AB=p({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}),PB=p({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}),IB=p({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}),BB=p({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"}}}),FB=p({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}),UB=p({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}),Ei=1,OB=p({...V,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:{...V.contracts,disputeGameFactory:{[Ei]:{address:"0x8b097CF1f9BbD9cbFD0DD561858a1FCbC8857Be0",blockCreated:20737481}},l2OutputOracle:{[Ei]:{address:"0x693A0F8854F458D282DE3C5b69E8eE5EEE8aA949",blockCreated:20737481}},portal:{[Ei]:{address:"0x2c2150aa5c75A24fB93d4fD2F2a895D618054f07",blockCreated:20737481}},l1StandardBridge:{[Ei]:{address:"0x8b0576E39F1233679109F9b40cFcC2a7E0901Ede",blockCreated:20737481}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},sourceId:Ei}),Cp=11155111,DB=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},portal:{[Cp]:{address:"0x7A0db8C51432d2C3eb4e8f360a2EeB26FF2809fB",blockCreated:5523438}},l1StandardBridge:{[Cp]:{address:"0x2B227A603fAAdB3De0ED050b63ADD232B5f2c28C",blockCreated:5523442}}},testnet:!0,sourceId:Cp}),_B=p({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}),MB=p({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}),NB=p({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}),LB=p({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}),zB=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}}}),RB=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}}}),HB=p({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}),$B=p({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}}}),GB=p({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}}}),jB=p({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}}}),VB=p({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}),WB=p({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}}}),qB=p({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}),YB=p({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}),KB=p({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}),ZB=p({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"}}}),XB=p({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"}}}),QB=p({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"}}}),JB=p({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}),eF=p({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}),tF=p({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}),rF=p({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}}}),nF=p({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 Tp=BigInt(0),Sp=BigInt(1);function ki(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ap(e){if(!ki(e))throw new Error("Uint8Array expected")}function Ci(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Sl(e){const t=e.toString(16);return t.length&1?"0"+t:t}function ey(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Tp:BigInt("0x"+e)}const ty=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",sF=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ti(e){if(Ap(e),ty)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=sF[e[r]];return t}const Sn={_0:48,_9:57,A:65,F:70,a:97,f:102};function ry(e){if(e>=Sn._0&&e<=Sn._9)return e-Sn._0;if(e>=Sn.A&&e<=Sn.F)return e-(Sn.A-10);if(e>=Sn.a&&e<=Sn.f)return e-(Sn.a-10)}function Al(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(ty)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=ry(e.charCodeAt(a)),i=ry(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 qs(e){return ey(Ti(e))}function ny(e){return Ap(e),ey(Ti(Uint8Array.from(e).reverse()))}function Si(e,t){return Al(e.toString(16).padStart(t*2,"0"))}function sy(e,t){return Si(e,t).reverse()}function kr(e,t,r){let n;if(typeof t=="string")try{n=Al(t)}catch(a){throw new Error(e+" must be hex string or Uint8Array, cause: "+a)}else if(ki(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 Pl(...e){let t=0;for(let n=0;n<e.length;n++){const s=e[n];Ap(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 Pp=e=>typeof e=="bigint"&&Tp<=e;function Ip(e,t,r){return Pp(e)&&Pp(t)&&Pp(r)&&t<=e&&e<r}function qa(e,t,r,n){if(!Ip(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function aF(e){let t;for(t=0;e>Tp;e>>=Sp,t+=1);return t}const Il=e=>(Sp<<BigInt(e))-Sp,Bp=e=>new Uint8Array(e),ay=e=>Uint8Array.from(e);function oF(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=Bp(e),s=Bp(e),a=0;const o=()=>{n.fill(1),s.fill(0),a=0},i=(...d)=>r(s,n,...d),c=(d=Bp(0))=>{s=i(ay([0]),d),n=i(),d.length!==0&&(s=i(ay([1]),d),n=i())},l=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const f=[];for(;d<t;){n=i();const m=n.slice();f.push(m),d+=n.length}return Pl(...f)};return(d,f)=>{o(),c(d);let m;for(;!(m=f(l()));)c();return o(),m}}const iF={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"||ki(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 Bl(e,t,r={}){const n=(s,a,o)=>{const i=iF[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 oy(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 cF="0.1.1";function lF(){return cF}class oe extends Error{static setStaticOptions(t){oe.prototype.docsOrigin=t.docsOrigin,oe.prototype.showVersion=t.showVersion,oe.prototype.version=t.version}constructor(t,r={}){const n=(()=>{var u;if(r.cause instanceof oe){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 oe&&r.cause.docsPath||r.docsPath,a=r.docsOrigin??oe.prototype.docsOrigin,o=`${a}${s??""}`,i=!!(r.version??oe.prototype.showVersion),c=r.version??oe.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(`
|
|
105
|
-
`);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 iy(this,t)}}Object.defineProperty(oe,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${lF()}`}}),oe.setStaticOptions(oe.defaultStaticOptions);function iy(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?iy(e.cause,t):t?null:e}function Ya(e,t){if(Ka(e)>t)throw new DF({givenSize:Ka(e),maxSize:t})}const An={zero:48,nine:57,A:65,F:70,a:97,f:102};function cy(e){if(e>=An.zero&&e<=An.nine)return e-An.zero;if(e>=An.A&&e<=An.F)return e-(An.A-10);if(e>=An.a&&e<=An.f)return e-(An.a-10)}function uF(e,t={}){const{dir:r,size:n=32}=t;if(n===0)return e;if(e.length>n)throw new _F({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 ly(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 Fl(e,t){if(bt(e)>t)throw new xF({givenSize:bt(e),maxSize:t})}function dF(e,t){if(typeof t=="number"&&t>0&&t>bt(e)-1)throw new yy({offset:t,position:"start",size:bt(e)})}function pF(e,t,r){if(typeof t=="number"&&typeof r=="number"&&bt(e)!==r-t)throw new yy({offset:r,position:"end",size:bt(e)})}function uy(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 wF({size:Math.ceil(s.length/2),targetSize:n,type:"Hex"});return`0x${s[r==="right"?"padEnd":"padStart"](n*2,"0")}`}function fF(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 mF="#__bigint";function Ai(e,t,r){return JSON.stringify(e,(n,s)=>typeof s=="bigint"?s.toString()+mF:s,r)}const hF=new TextEncoder,bF=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function yF(e,t={}){const{strict:r=!1}=t;if(!e)throw new hy(e);if(typeof e!="string")throw new hy(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new by(e);if(!e.startsWith("0x"))throw new by(e)}function pt(...e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function Ul(e){return e instanceof Uint8Array?Pt(e):Array.isArray(e)?Pt(new Uint8Array(e)):e}function dy(e,t={}){const r=`0x${Number(e)}`;return typeof t.size=="number"?(Fl(r,t.size),Ys(r,t.size)):r}function Pt(e,t={}){let r="";for(let s=0;s<e.length;s++)r+=bF[e[s]];const n=`0x${r}`;return typeof t.size=="number"?(Fl(n,t.size),Ks(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 my({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?Ys(c,n):c}function Pi(e,t={}){return Pt(hF.encode(e),t)}function Ys(e,t){return uy(e,{dir:"left",size:t})}function Ks(e,t){return uy(e,{dir:"right",size:t})}function py(e){return Pt(AF(e))}function Pe(e,t,r,n={}){const{strict:s}=n;dF(e,t);const a=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return s&&pF(a,t,r),a}function bt(e){return Math.ceil((e.length-2)/2)}function Fp(e){return fF(e,{dir:"left"})}function yt(e,t={}){const{signed:r}=t;t.size&&Fl(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 Ii(e,t={}){const{signed:r,size:n}=t;return Number(!r&&!n?e:yt(e,t))}function fy(e,t={}){const{size:r}=t;let n=cs(e);return r&&(Ya(n,r),n=wy(n)),new TextDecoder().decode(n)}function Nr(e,t={}){const{strict:r=!1}=t;try{return yF(e,{strict:r}),!0}catch{return!1}}class my extends oe{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 hy extends oe{constructor(t){super(`Value \`${typeof t=="object"?Ai(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 by extends oe{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 gF extends oe{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"})}}let xF=class extends oe{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 yy extends oe{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"})}}let wF=class extends oe{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"})}};const vF=new TextDecoder,EF=new TextEncoder;function kF(e){if(!(e instanceof Uint8Array)){if(!e)throw new Ol(e);if(typeof e!="object")throw new Ol(e);if(!("BYTES_PER_ELEMENT"in e))throw new Ol(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new Ol(e)}}function CF(...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 Up(e){return e instanceof Uint8Array?e:typeof e=="string"?cs(e):TF(e)}function TF(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function cs(e,t={}){const{size:r}=t;let n=e;r&&(Fl(e,r),n=Ks(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=cy(s.charCodeAt(c++)),u=cy(s.charCodeAt(c++));if(l===void 0||u===void 0)throw new oe(`Invalid byte sequence ("${s[c-2]}${s[c-1]}" in "${s}").`);o[i]=l<<4|u}return o}function gy(e,t={}){const{size:r}=t,n=EF.encode(e);return typeof r=="number"?(Ya(n,r),SF(n,r)):n}function SF(e,t){return uF(e,{dir:"right",size:t})}function AF(e){return crypto.getRandomValues(new Uint8Array(e))}function Ka(e){return e.length}function PF(e,t,r,n={}){const{strict:s}=n;return e.slice(t,r)}function IF(e,t={}){const{size:r}=t;typeof r<"u"&&Ya(e,r);const n=Pt(e,t);return yt(n,t)}function BF(e,t={}){const{size:r}=t;let n=e;if(typeof r<"u"&&(Ya(n,r),n=xy(n)),n.length>1||n[0]>1)throw new OF(n);return!!n[0]}function Pn(e,t={}){const{size:r}=t;typeof r<"u"&&Ya(e,r);const n=Pt(e,t);return Ii(n,t)}function FF(e,t={}){const{size:r}=t;let n=e;return typeof r<"u"&&(Ya(n,r),n=wy(n)),vF.decode(n)}function xy(e){return ly(e,{dir:"left"})}function wy(e){return ly(e,{dir:"right"})}function UF(e){try{return kF(e),!0}catch{return!1}}class OF extends oe{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 Ol extends oe{constructor(t){super(`Value \`${typeof t=="object"?Ai(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"})}}class DF extends oe{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"})}}class _F extends oe{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"})}}class MF 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 Op={checksum:new MF(8192)}.checksum;function Bi(e,t={}){const{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=nb(Up(e));return r==="Bytes"?n:Pt(n)}function NF(e,t={}){const{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=R1(Up(e));return r==="Bytes"?n:Pt(n)}function LF(e){return Nr(e)&&bt(e)===32}function vy(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 ky({prefix:n,cause:new jF});return}if(r===!0||typeof s=="bigint"&&typeof a>"u"){if(n!==3&&n!==2)throw new ky({prefix:n,cause:new GF});return}throw new $F({publicKey:e})}function zF(e){const t=(()=>{if(Nr(e))return Ey(e);if(UF(e))return RF(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 vy(t),t}function RF(e){return Ey(Pt(e))}function Ey(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new VF({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 HF(e,t={}){return cs(Dp(e,t))}function Dp(e,t={}){vy(e);const{prefix:r,x:n,y:s}=e,{includePrefix:a=!0}=t;return pt(a?X(r,{size:1}):"0x",X(n,{size:32}),typeof s=="bigint"?X(s,{size:32}):"0x")}class $F extends oe{constructor({publicKey:t}){super(`Value \`${Ai(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 ky extends oe{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 GF extends oe{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 jF extends oe{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let VF=class extends oe{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 ${bt(Ul(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const WF=/^0x[a-fA-F0-9]{40}$/;function Lr(e,t={}){const{strict:r=!0}=t;if(!WF.test(e))throw new Cy({address:e,cause:new YF});if(r){if(e.toLowerCase()===e)return;if(_p(e)!==e)throw new Cy({address:e,cause:new KF})}}function _p(e){if(Op.has(e))return Op.get(e);Lr(e,{strict:!1});const t=e.substring(2).toLowerCase(),r=Bi(gy(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 Op.set(e,s),s}function qF(e,t={}){const{checksum:r=!1}=t;return Lr(e),r?_p(e):e}function Dl(e,t={}){const r=Bi(`0x${Dp(e).slice(4)}`).substring(26);return qF(`0x${r}`,t)}function Mp(e,t){return Lr(e,{strict:!1}),Lr(t,{strict:!1}),e.toLowerCase()===t.toLowerCase()}function _l(e,t={}){const{strict:r=!0}=t??{};try{return Lr(e,{strict:r}),!0}catch{return!1}}class Cy extends oe{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 YF extends oe{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 KF extends oe{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const er=BigInt(0),Vt=BigInt(1),Zs=BigInt(2),ZF=BigInt(3),Ty=BigInt(4),Sy=BigInt(5),Ay=BigInt(8);function tr(e,t){const r=e%t;return r>=er?r:t+r}function Cr(e,t,r){let n=e;for(;t-- >er;)n*=n,n%=r;return n}function Np(e,t){if(e===er)throw new Error("invert: expected non-zero number");if(t<=er)throw new Error("invert: expected positive modulus, got "+t);let r=tr(e,t),n=t,s=er,a=Vt;for(;r!==er;){const i=n/r,c=n%r,l=s-a*i;n=r,r=c,s=a,a=l}if(n!==Vt)throw new Error("invert: does not exist");return tr(s,t)}function Py(e,t){const r=(e.ORDER+Vt)/Ty,n=e.pow(t,r);if(!e.eql(e.sqr(n),t))throw new Error("Cannot find square root");return n}function XF(e,t){const r=(e.ORDER-Sy)/Ay,n=e.mul(t,Zs),s=e.pow(n,r),a=e.mul(t,s),o=e.mul(e.mul(a,Zs),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 QF(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-Vt,r=0;for(;t%Zs===er;)t/=Zs,r++;let n=Zs;const s=Za(e);for(;By(s,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return Py;let a=s.pow(n,t);const o=(t+Vt)/Zs;return function(c,l){if(c.is0(l))return l;if(By(c,l)!==1)throw new Error("Cannot find square root");let u=r,d=c.mul(c.ONE,a),f=c.pow(l,t),m=c.pow(l,o);for(;!c.eql(f,c.ONE);){if(c.is0(f))return c.ZERO;let y=1,g=c.sqr(f);for(;!c.eql(g,c.ONE);)if(y++,g=c.sqr(g),y===u)throw new Error("Cannot find square root");const E=Vt<<BigInt(u-y-1),v=c.pow(d,E);u=y,d=c.sqr(v),f=c.mul(f,d),m=c.mul(m,v)}return m}}function JF(e){return e%Ty===ZF?Py:e%Ay===Sy?XF:QF(e)}const eU=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function tU(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=eU.reduce((n,s)=>(n[s]="function",n),t);return Bl(e,r)}function rU(e,t,r){if(r<er)throw new Error("invalid exponent, negatives unsupported");if(r===er)return e.ONE;if(r===Vt)return t;let n=e.ONE,s=t;for(;r>er;)r&Vt&&(n=e.mul(n,s)),s=e.sqr(s),r>>=Vt;return n}function Iy(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 By(e,t){const r=(e.ORDER-Vt)/Zs,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 Fy(e,t){t!==void 0&&Lo(t);const r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Za(e,t,r=!1,n={}){if(e<=er)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:s,nByteLength:a}=Fy(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:Il(s),ZERO:er,ONE:Vt,create:c=>tr(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return er<=c&&c<e},is0:c=>c===er,isOdd:c=>(c&Vt)===Vt,neg:c=>tr(-c,e),eql:(c,l)=>c===l,sqr:c=>tr(c*c,e),add:(c,l)=>tr(c+l,e),sub:(c,l)=>tr(c-l,e),mul:(c,l)=>tr(c*l,e),pow:(c,l)=>rU(i,c,l),div:(c,l)=>tr(c*Np(l,e),e),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Np(c,e),sqrt:n.sqrt||(c=>(o||(o=JF(e)),o(i,c))),toBytes:c=>r?sy(c,a):Si(c,a),fromBytes:c=>{if(c.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+c.length);return r?ny(c):qs(c)},invertBatch:c=>Iy(i,c),cmov:(c,l,u)=>u?l:c});return Object.freeze(i)}function Uy(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 Oy(e){const t=Uy(e);return t+Math.ceil(t/2)}function nU(e,t,r=!1){const n=e.length,s=Uy(t),a=Oy(t);if(n<16||n<a||n>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+n);const o=r?ny(e):qs(e),i=tr(o,t-Vt)+Vt;return r?sy(i,s):Si(i,s)}class Dy extends zd{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,x8(t);const n=$c(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),es(a)}update(t){return Pa(this),this.iHash.update(t),this}digestInto(t){Pa(this),zs(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 _y=(e,t,r)=>new Dy(e,t).update(r).digest();_y.create=(e,t)=>new Dy(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const My=BigInt(0),Lp=BigInt(1);function zp(e,t){const r=t.negate();return e?r:t}function Ny(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Rp(e,t){Ny(e,t);const r=Math.ceil(t/e)+1,n=2**(e-1),s=2**e,a=Il(e),o=BigInt(e);return{windows:r,windowSize:n,mask:a,maxNumber:s,shiftBy:o}}function Ly(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+=Lp);const l=t*n,u=l+Math.abs(i)-1,d=i===0,f=i<0,m=t%2!==0;return{nextN:c,offset:u,isZero:d,isNeg:f,isNegF:m,offsetF:l}}function sU(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 aU(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 Hp=new WeakMap,zy=new WeakMap;function $p(e){return zy.get(e)||1}function oU(e,t){return{constTimeNegate:zp,hasPrecomputes(r){return $p(r)!==1},unsafeLadder(r,n,s=e.ZERO){let a=r;for(;n>My;)n&Lp&&(s=s.add(a)),a=a.double(),n>>=Lp;return s},precomputeWindow(r,n){const{windows:s,windowSize:a}=Rp(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=Rp(r,t);for(let c=0;c<i.windows;c++){const{nextN:l,offset:u,isZero:d,isNeg:f,isNegF:m,offsetF:y}=Ly(s,c,i);s=l,d?o=o.add(zp(m,n[y])):a=a.add(zp(f,n[u]))}return{p:a,f:o}},wNAFUnsafe(r,n,s,a=e.ZERO){const o=Rp(r,t);for(let i=0;i<o.windows&&s!==My;i++){const{nextN:c,offset:l,isZero:u,isNeg:d}=Ly(s,i,o);if(s=c,!u){const f=n[l];a=a.add(d?f.negate():f)}}return a},getPrecomputes(r,n,s){let a=Hp.get(n);return a||(a=this.precomputeWindow(n,r),r!==1&&Hp.set(n,s(a))),a},wNAFCached(r,n,s){const a=$p(r);return this.wNAF(a,this.getPrecomputes(a,r,s),n)},wNAFCachedUnsafe(r,n,s,a){const o=$p(r);return o===1?this.unsafeLadder(r,n,a):this.wNAFUnsafe(o,this.getPrecomputes(o,r,s),n,a)},setWindowSize(r,n){Ny(n,t),zy.set(r,n),Hp.delete(r)}}}function iU(e,t,r,n){sU(r,e),aU(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=aF(BigInt(s));let c=1;i>12?c=i-3:i>4?c=i-2:i>0&&(c=2);const l=Il(c),u=new Array(Number(l)+1).fill(o),d=Math.floor((t.BITS-1)/c)*c;let f=o;for(let m=d;m>=0;m-=c){u.fill(o);for(let g=0;g<a;g++){const E=n[g],v=Number(E>>BigInt(m)&l);u[v]=u[v].add(r[g])}let y=o;for(let g=u.length-1,E=o;g>0;g--)E=E.add(u[g]),y=y.add(E);if(f=f.add(y),m!==0)for(let g=0;g<c;g++)f=f.double()}return f}function Ry(e){return tU(e.Fp),Bl(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Fy(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Hy(e){e.lowS!==void 0&&Ci("lowS",e.lowS),e.prehash!==void 0&&Ci("prehash",e.prehash)}function cU(e){const t=Ry(e);Bl(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 lU extends Error{constructor(t=""){super(t)}}const In={Err:lU,_tlv:{encode:(e,t)=>{const{Err:r}=In;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=Sl(n);if(s.length/2&128)throw new r("tlv.encode: long form length too big");const a=n>127?Sl(s.length/2|128):"";return Sl(e)+a+s+t},decode(e,t){const{Err:r}=In;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}=In;if(e<Bn)throw new t("integer: negative integers are not allowed");let r=Sl(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}=In;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 qs(e)}},toSig(e){const{Err:t,_int:r,_tlv:n}=In,s=kr("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}=In,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 Gp(e,t){return Ti(Si(e,t))}const Bn=BigInt(0),It=BigInt(1);BigInt(2);const jp=BigInt(3),uU=BigInt(4);function dU(e){const t=cU(e),{Fp:r}=t,n=Za(t.n,t.nBitLength),s=t.toBytes||((A,C,D)=>{const L=C.toAffine();return Pl(Uint8Array.from([4]),r.toBytes(L.x),r.toBytes(L.y))}),a=t.fromBytes||(A=>{const C=A.subarray(1),D=r.fromBytes(C.subarray(0,r.BYTES)),L=r.fromBytes(C.subarray(r.BYTES,2*r.BYTES));return{x:D,y:L}});function o(A){const{a:C,b:D}=t,L=r.sqr(A),T=r.mul(L,A);return r.add(r.add(T,r.mul(A,C)),D)}function i(A,C){const D=r.sqr(C),L=o(A);return r.eql(D,L)}if(!i(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=r.mul(r.pow(t.a,jp),uU),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(A){return Ip(A,It,t.n)}function d(A){const{allowedPrivateKeyLengths:C,nByteLength:D,wrapPrivateKey:L,n:T}=t;if(C&&typeof A!="bigint"){if(ki(A)&&(A=Ti(A)),typeof A!="string"||!C.includes(A.length))throw new Error("invalid private key");A=A.padStart(D*2,"0")}let h;try{h=typeof A=="bigint"?A:qs(kr("private key",A,D))}catch{throw new Error("invalid private key, expected hex or "+D+" bytes, got "+typeof A)}return L&&(h=tr(h,T)),qa("private key",h,It,T),h}function f(A){if(!(A instanceof g))throw new Error("ProjectivePoint expected")}const m=oy((A,C)=>{const{px:D,py:L,pz:T}=A;if(r.eql(T,r.ONE))return{x:D,y:L};const h=A.is0();C==null&&(C=h?r.ONE:r.inv(T));const b=r.mul(D,C),x=r.mul(L,C),S=r.mul(T,C);if(h)return{x:r.ZERO,y:r.ZERO};if(!r.eql(S,r.ONE))throw new Error("invZ was invalid");return{x:b,y:x}}),y=oy(A=>{if(A.is0()){if(t.allowInfinityPoint&&!r.is0(A.py))return;throw new Error("bad point: ZERO")}const{x:C,y:D}=A.toAffine();if(!r.isValid(C)||!r.isValid(D))throw new Error("bad point: x or y not FE");if(!i(C,D))throw new Error("bad point: equation left != right");if(!A.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class g{constructor(C,D,L){if(C==null||!r.isValid(C))throw new Error("x required");if(D==null||!r.isValid(D)||r.is0(D))throw new Error("y required");if(L==null||!r.isValid(L))throw new Error("z required");this.px=C,this.py=D,this.pz=L,Object.freeze(this)}static fromAffine(C){const{x:D,y:L}=C||{};if(!C||!r.isValid(D)||!r.isValid(L))throw new Error("invalid affine point");if(C instanceof g)throw new Error("projective point not allowed");const T=h=>r.eql(h,r.ZERO);return T(D)&&T(L)?g.ZERO:new g(D,L,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(C){const D=Iy(r,C.map(L=>L.pz));return C.map((L,T)=>L.toAffine(D[T])).map(g.fromAffine)}static fromHex(C){const D=g.fromAffine(a(kr("pointHex",C)));return D.assertValidity(),D}static fromPrivateKey(C){return g.BASE.multiply(d(C))}static msm(C,D){return iU(g,n,C,D)}_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){f(C);const{px:D,py:L,pz:T}=this,{px:h,py:b,pz:x}=C,S=r.eql(r.mul(D,x),r.mul(h,T)),I=r.eql(r.mul(L,x),r.mul(b,T));return S&&I}negate(){return new g(this.px,r.neg(this.py),this.pz)}double(){const{a:C,b:D}=t,L=r.mul(D,jp),{px:T,py:h,pz:b}=this;let x=r.ZERO,S=r.ZERO,I=r.ZERO,F=r.mul(T,T),_=r.mul(h,h),k=r.mul(b,b),P=r.mul(T,h);return P=r.add(P,P),I=r.mul(T,b),I=r.add(I,I),x=r.mul(C,I),S=r.mul(L,k),S=r.add(x,S),x=r.sub(_,S),S=r.add(_,S),S=r.mul(x,S),x=r.mul(P,x),I=r.mul(L,I),k=r.mul(C,k),P=r.sub(F,k),P=r.mul(C,P),P=r.add(P,I),I=r.add(F,F),F=r.add(I,F),F=r.add(F,k),F=r.mul(F,P),S=r.add(S,F),k=r.mul(h,b),k=r.add(k,k),F=r.mul(k,P),x=r.sub(x,F),I=r.mul(k,_),I=r.add(I,I),I=r.add(I,I),new g(x,S,I)}add(C){f(C);const{px:D,py:L,pz:T}=this,{px:h,py:b,pz:x}=C;let S=r.ZERO,I=r.ZERO,F=r.ZERO;const _=t.a,k=r.mul(t.b,jp);let P=r.mul(D,h),O=r.mul(L,b),U=r.mul(T,x),z=r.add(D,L),H=r.add(h,b);z=r.mul(z,H),H=r.add(P,O),z=r.sub(z,H),H=r.add(D,T);let G=r.add(h,x);return H=r.mul(H,G),G=r.add(P,U),H=r.sub(H,G),G=r.add(L,T),S=r.add(b,x),G=r.mul(G,S),S=r.add(O,U),G=r.sub(G,S),F=r.mul(_,H),S=r.mul(k,U),F=r.add(S,F),S=r.sub(O,F),F=r.add(O,F),I=r.mul(S,F),O=r.add(P,P),O=r.add(O,P),U=r.mul(_,U),H=r.mul(k,H),O=r.add(O,U),U=r.sub(P,U),U=r.mul(_,U),H=r.add(H,U),P=r.mul(O,H),I=r.add(I,P),P=r.mul(G,H),S=r.mul(z,S),S=r.sub(S,P),P=r.mul(z,O),F=r.mul(G,F),F=r.add(F,P),new g(S,I,F)}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:D,n:L}=t;qa("scalar",C,Bn,L);const T=g.ZERO;if(C===Bn)return T;if(this.is0()||C===It)return this;if(!D||w.hasPrecomputes(this))return w.wNAFCachedUnsafe(this,C,g.normalizeZ);let{k1neg:h,k1:b,k2neg:x,k2:S}=D.splitScalar(C),I=T,F=T,_=this;for(;b>Bn||S>Bn;)b&It&&(I=I.add(_)),S&It&&(F=F.add(_)),_=_.double(),b>>=It,S>>=It;return h&&(I=I.negate()),x&&(F=F.negate()),F=new g(r.mul(F.px,D.beta),F.py,F.pz),I.add(F)}multiply(C){const{endo:D,n:L}=t;qa("scalar",C,It,L);let T,h;if(D){const{k1neg:b,k1:x,k2neg:S,k2:I}=D.splitScalar(C);let{p:F,f:_}=this.wNAF(x),{p:k,f:P}=this.wNAF(I);F=w.constTimeNegate(b,F),k=w.constTimeNegate(S,k),k=new g(r.mul(k.px,D.beta),k.py,k.pz),T=F.add(k),h=_.add(P)}else{const{p:b,f:x}=this.wNAF(C);T=b,h=x}return g.normalizeZ([T,h])[0]}multiplyAndAddUnsafe(C,D,L){const T=g.BASE,h=(x,S)=>S===Bn||S===It||!x.equals(T)?x.multiplyUnsafe(S):x.multiply(S),b=h(this,D).add(h(C,L));return b.is0()?void 0:b}toAffine(C){return m(this,C)}isTorsionFree(){const{h:C,isTorsionFree:D}=t;if(C===It)return!0;if(D)return D(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:C,clearCofactor:D}=t;return C===It?this:D?D(g,this):this.multiplyUnsafe(t.h)}toRawBytes(C=!0){return Ci("isCompressed",C),this.assertValidity(),s(g,this,C)}toHex(C=!0){return Ci("isCompressed",C),Ti(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:E,nBitLength:v}=t,w=oU(g,E?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:g,normPrivateKeyToScalar:d,weierstrassEquation:o,isWithinCurveOrder:u}}function pU(e){const t=Ry(e);return Bl(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function fU(e){const t=pU(e),{Fp:r,n,nByteLength:s,nBitLength:a}=t,o=r.BYTES+1,i=2*r.BYTES+1;function c(k){return tr(k,n)}function l(k){return Np(k,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:f,isWithinCurveOrder:m}=dU({...t,toBytes(k,P,O){const U=P.toAffine(),z=r.toBytes(U.x),H=Pl;return Ci("isCompressed",O),O?H(Uint8Array.from([P.hasEvenY()?2:3]),z):H(Uint8Array.from([4]),z,r.toBytes(U.y))},fromBytes(k){const P=k.length,O=k[0],U=k.subarray(1);if(P===o&&(O===2||O===3)){const z=qs(U);if(!Ip(z,It,r.ORDER))throw new Error("Point is not on curve");const H=f(z);let G;try{G=r.sqrt(H)}catch(he){const ie=he instanceof Error?": "+he.message:"";throw new Error("Point is not on curve"+ie)}const J=(G&It)===It;return(O&1)===1!==J&&(G=r.neg(G)),{x:z,y:G}}else if(P===i&&O===4){const z=r.fromBytes(U.subarray(0,r.BYTES)),H=r.fromBytes(U.subarray(r.BYTES,2*r.BYTES));return{x:z,y:H}}else{const z=o,H=i;throw new Error("invalid Point, expected length of "+z+", or uncompressed "+H+", got "+P)}}});function y(k){const P=n>>It;return k>P}function g(k){return y(k)?c(-k):k}const E=(k,P,O)=>qs(k.slice(P,O));class v{constructor(P,O,U){qa("r",P,It,n),qa("s",O,It,n),this.r=P,this.s=O,U!=null&&(this.recovery=U),Object.freeze(this)}static fromCompact(P){const O=s;return P=kr("compactSignature",P,O*2),new v(E(P,0,O),E(P,O,2*O))}static fromDER(P){const{r:O,s:U}=In.toSig(kr("DER",P));return new v(O,U)}assertValidity(){}addRecoveryBit(P){return new v(this.r,this.s,P)}recoverPublicKey(P){const{r:O,s:U,recovery:z}=this,H=T(kr("msgHash",P));if(z==null||![0,1,2,3].includes(z))throw new Error("recovery id invalid");const G=z===2||z===3?O+t.n:O;if(G>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const J=(z&1)===0?"02":"03",pe=u.fromHex(J+Gp(G,r.BYTES)),he=l(G),ie=c(-H*he),de=c(U*he),Be=u.BASE.multiplyAndAddUnsafe(pe,ie,de);if(!Be)throw new Error("point at infinify");return Be.assertValidity(),Be}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new v(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Al(this.toDERHex())}toDERHex(){return In.hexFromSig(this)}toCompactRawBytes(){return Al(this.toCompactHex())}toCompactHex(){const P=s;return Gp(this.r,P)+Gp(this.s,P)}}const w={isValidPrivateKey(k){try{return d(k),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const k=Oy(t.n);return nU(t.randomBytes(k),t.n)},precompute(k=8,P=u.BASE){return P._setWindowSize(k),P.multiply(BigInt(3)),P}};function A(k,P=!0){return u.fromPrivateKey(k).toRawBytes(P)}function C(k){if(typeof k=="bigint")return!1;if(k instanceof u)return!0;const O=kr("key",k).length,U=r.BYTES,z=U+1,H=2*U+1;if(!(t.allowedPrivateKeyLengths||s===z))return O===z||O===H}function D(k,P,O=!0){if(C(k)===!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(k)).toRawBytes(O)}const L=t.bits2int||function(k){if(k.length>8192)throw new Error("input is too large");const P=qs(k),O=k.length*8-a;return O>0?P>>BigInt(O):P},T=t.bits2int_modN||function(k){return c(L(k))},h=Il(a);function b(k){return qa("num < 2^"+a,k,Bn,h),Si(k,s)}function x(k,P,O=S){if(["recovered","canonical"].some(ve=>ve in O))throw new Error("sign() legacy options not supported");const{hash:U,randomBytes:z}=t;let{lowS:H,prehash:G,extraEntropy:J}=O;H==null&&(H=!0),k=kr("msgHash",k),Hy(O),G&&(k=kr("prehashed msgHash",U(k)));const pe=T(k),he=d(P),ie=[b(he),b(pe)];if(J!=null&&J!==!1){const ve=J===!0?z(r.BYTES):J;ie.push(kr("extraEntropy",ve))}const de=Pl(...ie),Be=pe;function Q(ve){const _e=L(ve);if(!m(_e))return;const Ge=l(_e),ot=u.BASE.multiply(_e).toAffine(),Se=c(ot.x);if(Se===Bn)return;const Ee=c(Ge*c(Be+Se*he));if(Ee===Bn)return;let be=(ot.x===Se?0:2)|Number(ot.y&It),Ze=Ee;return H&&y(Ee)&&(Ze=g(Ee),be^=1),new v(Se,Ze,be)}return{seed:de,k2sig:Q}}const S={lowS:t.lowS,prehash:!1},I={lowS:t.lowS,prehash:!1};function F(k,P,O=S){const{seed:U,k2sig:z}=x(k,P,O),H=t;return oF(H.hash.outputLen,H.nByteLength,H.hmac)(U,z)}u.BASE._setWindowSize(8);function _(k,P,O,U=I){var be;const z=k;P=kr("msgHash",P),O=kr("publicKey",O);const{lowS:H,prehash:G,format:J}=U;if(Hy(U),"strict"in U)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 z=="string"||ki(z),he=!pe&&!J&&typeof z=="object"&&z!==null&&typeof z.r=="bigint"&&typeof z.s=="bigint";if(!pe&&!he)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let ie,de;try{if(he&&(ie=new v(z.r,z.s)),pe){try{J!=="compact"&&(ie=v.fromDER(z))}catch(Ze){if(!(Ze instanceof In.Err))throw Ze}!ie&&J!=="der"&&(ie=v.fromCompact(z))}de=u.fromHex(O)}catch{return!1}if(!ie||H&&ie.hasHighS())return!1;G&&(P=t.hash(P));const{r:Be,s:Q}=ie,ve=T(P),_e=l(Q),Ge=c(ve*_e),ot=c(Be*_e),Se=(be=u.BASE.multiplyAndAddUnsafe(de,Ge,ot))==null?void 0:be.toAffine();return Se?c(Se.x)===Be:!1}return{CURVE:t,getPublicKey:A,getSharedSecret:D,sign:F,verify:_,ProjectivePoint:u,Signature:v,utils:w}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function mU(e){return{hash:e,hmac:(t,...r)=>_y(e,t,T8(...r)),randomBytes:S8}}function Ml(e,t){const r=n=>fU({...e,...mU(n)});return{...r(t),create:r}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const $y=Za(BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff")),hU=$y.create(BigInt("-3")),bU=BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),yU=Ml({a:hU,b:bU,Fp:$y,n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),h:BigInt(1),lowS:!1},Rd),Gy=Za(BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff")),gU=Gy.create(BigInt("-3")),xU=BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef");Ml({a:gU,b:xU,Fp:Gy,n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"),h:BigInt(1),lowS:!1},q8);const jy=Za(BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")),wU=jy.create(BigInt("-3")),vU=BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00");Ml({a:wU,b:vU,Fp:jy,n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"),h:BigInt(1),lowS:!1,allowedPrivateKeyLengths:[130,131,132]},W8);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const EU=yU;function Vy(e){const{hash:t,payload:r,publicKey:n,signature:s}=e;return EU.verify(s,r instanceof Uint8Array?r:cs(r),Dp(n).substring(2),...t?[{prehash:!0,lowS:!0}]:[])}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Wy=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),qy=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),kU=BigInt(0),CU=BigInt(1),Vp=BigInt(2),Yy=(e,t)=>(e+t/Vp)/t;function TU(e){const t=Wy,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=Cr(u,r,t)*u%t,f=Cr(d,r,t)*u%t,m=Cr(f,Vp,t)*l%t,y=Cr(m,s,t)*m%t,g=Cr(y,a,t)*y%t,E=Cr(g,i,t)*g%t,v=Cr(E,c,t)*E%t,w=Cr(v,i,t)*g%t,A=Cr(w,r,t)*u%t,C=Cr(A,o,t)*y%t,D=Cr(C,n,t)*l%t,L=Cr(D,Vp,t);if(!Wp.eql(Wp.sqr(L),e))throw new Error("Cannot find square root");return L}const Wp=Za(Wy,void 0,void 0,{sqrt:TU}),Fi=Ml({a:kU,b:BigInt(7),Fp:Wp,n:qy,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=qy,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-CU*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,o=BigInt("0x100000000000000000000000000000000"),i=Yy(a*e,t),c=Yy(-n*e,t);let l=tr(e-i*r-c*s,t),u=tr(-i*n-c*a,t);const d=l>o,f=u>o;if(d&&(l=t-l),f&&(u=t-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:l,k2neg:f,k2:u}}}},Rd),SU=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:Fi},Symbol.toStringTag,{value:"Module"}));function Ky(e){return Dl(AU(e))}function AU(e){const{payload:t,signature:r}=e,{r:n,s,yParity:a}=r,i=new Fi.Signature(BigInt(n),BigInt(s)).addRecoveryBit(a).recoverPublicKey(Ul(t).substring(2));return zF(i)}function PU(e){const{address:t,hash:r,payload:n,publicKey:s,signature:a}=e;return t?Mp(t,Ky({payload:n,signature:a})):Fi.verify(a,Up(n),HF(s),...r?[{prehash:!0,lowS:!0}]:[])}const IU=/^(.*)\[([0-9]*)\]$/,BU=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Zy=/^(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)?$/,Xy=2n**256n-1n;function Nl(e,t={}){const{recovered:r}=t;if(typeof e.r>"u")throw new Xp({signature:e});if(typeof e.s>"u")throw new Xp({signature:e});if(r&&typeof e.yParity>"u")throw new Xp({signature:e});if(e.r<0n||e.r>Xy)throw new NU({value:e.r});if(e.s<0n||e.s>Xy)throw new LU({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new zl({value:e.yParity})}function FU(e){return qp(Pt(e))}function qp(e){if(e.length!==130&&e.length!==132)throw new MU({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 Kp(s)}catch{throw new zl({value:s})}})();return typeof n>"u"?{r:t,s:r}:{r:t,s:r,yParity:n}}function Qy(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return Ll(e)}function Ll(e){const t=typeof e=="string"?qp(e):e instanceof Uint8Array?FU(e):typeof e.r=="string"?Yp(e):e.v?UU(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return Nl(t),t}function UU(e){return{r:e.r,s:e.s,yParity:Kp(e.v)}}function Yp(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=Kp(r)),typeof n!="number")throw new zl({value:e.yParity});return n})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function OU(e){const[t,r,n]=e;return Ll({r:r==="0x"?0n:BigInt(r),s:n==="0x"?0n:BigInt(n),yParity:t==="0x"?0:Number(t)})}function DU(e){Nl(e);const t=e.r,r=e.s;return pt(X(t,{size:32}),X(r,{size:32}),typeof e.yParity=="number"?X(Zp(e.yParity),{size:1}):"0x")}function Jy(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 _U(e){const{r:t,s:r,yParity:n}=e;return[n?"0x01":"0x",t===0n?"0x":Fp(X(t)),r===0n?"0x":Fp(X(r))]}function Kp(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 zU({value:e})}function Zp(e){if(e===0)return 27;if(e===1)return 28;throw new zl({value:e})}class MU extends oe{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${bt(Ul(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class Xp extends oe{constructor({signature:t}){super(`Signature \`${Ai(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class NU extends oe{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 LU extends oe{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 zl extends oe{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 zU extends oe{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"})}}const RU=new TextEncoder;Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[t,e.charCodeAt(0)]);const Rl={...Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[e.charCodeAt(0),t])),61:0,45:62,95:63};function HU(e){const t=e.replace(/=+$/,""),r=t.length,n=new Uint8Array(r+3);RU.encodeInto(t+"===",n);for(let a=0,o=0;a<t.length;a+=4,o+=3){const i=(Rl[n[a]]<<18)+(Rl[n[a+1]]<<12)+(Rl[n[a+2]]<<6)+Rl[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 $U(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=cs(o);if(d.length<37)return!1;const f=d[32];if((f&1)!==1||u&&(f&4)!==4||(f&8)!==8&&(f&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 m=i!==void 0?c.slice(Number(i)).match(/^"challenge":"(.*?)"/):c.match(/"challenge":"(.*?)"/);if(!m)return!1;const[y,g]=m;if(Pt(HU(g))!==t)return!1;const E=NF(gy(c),{as:"Bytes"}),v=CF(d,E);return Vy({hash:r,payload:v,publicKey:s,signature:a})}const Qp="0x01",Jp="0x02",eg="0x03",Xs="0x7777777777777777777777777777777777777777777777777777777777777777";function Xa(e){const t=e.endsWith(Xs.slice(2))?Pe(e,0,-bt(Xs)):e;if(bt(t)===65){const o=qp(t);return Nl(o),{signature:o,type:"secp256k1"}}const n=Pe(t,0,1),s=Pe(t,1),a=bt(s);if(n===Qp){if(a!==129)throw new Di({reason:`Invalid P256 signature envelope size: expected 129 bytes, got ${a} bytes`,serialized:t});return{publicKey:{prefix:4,x:yt(Pe(s,64,96)),y:yt(Pe(s,96,128))},prehash:Ii(Pe(s,128,129))!==0,signature:{r:yt(Pe(s,0,32)),s:yt(Pe(s,32,64))},type:"p256"}}if(n===Jp){if(a<128)throw new Di({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=fy(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 Di({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{publicKey:{prefix:4,x:yt(Pe(s,o+64,o+96)),y:yt(Pe(s,o+96,o+128))},metadata:{authenticatorData:c,clientDataJSON:l},signature:{r:yt(Pe(s,o,o+32)),s:yt(Pe(s,o+32,o+64))},type:"webAuthn"}}if(n===eg){const o=Pe(s,0,20),i=Xa(Pe(s,20));return{userAddress:o,inner:i,type:"keychain"}}throw new Di({reason:`Unknown signature type identifier: ${n}. Expected ${Qp} (P256) or ${Jp} (WebAuthn)`,serialized:t})}function Ui(e){if(typeof e=="string")return Xa(e);if(typeof e=="object"&&e!==null&&"r"in e&&"s"in e&&"yParity"in e)return{signature:e,type:"secp256k1"};const t=ef(e);return{...e,...t==="p256"?{prehash:e.prehash}:{},type:t}}function Hl(e){if(e.type==="secp256k1")return{signature:Yp(e),type:"secp256k1"};if(e.type==="p256")return{prehash:e.preHash,publicKey:{prefix:4,x:yt(e.pubKeyX),y:yt(e.pubKeyY)},signature:{r:yt(e.r),s:yt(e.s)},type:"p256"};if(e.type==="webAuthn"){const t=e.webauthnData,r=bt(t);let n,s;for(let a=37;a<r;a++){const o=fy(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 Di({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:yt(e.pubKeyX),y:yt(e.pubKeyY)},signature:{r:yt(e.r),s:yt(e.s)},type:"webAuthn"}}if(e.type==="keychain"||"userAddress"in e&&"signature"in e)return{type:"keychain",userAddress:e.userAddress,inner:Hl(e.signature)};throw new Oi({envelope:e})}function ef(e){if(typeof e!="object"||e===null)throw new Oi({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 Oi({envelope:e})}function $l(e,t={}){const r=ef(e);if(r==="secp256k1")return pt(DU(e.signature),t.magic?Xs:"0x");if(r==="p256"){const n=e;return pt(Qp,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?Xs:"0x")}if(r==="webAuthn"){const n=e,s=pt(n.metadata.authenticatorData,Pi(n.metadata.clientDataJSON));return pt(Jp,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?Xs:"0x")}if(r==="keychain"){const n=e;return pt(eg,n.userAddress,$l(n.inner),t.magic?Xs:"0x")}throw new Oi({envelope:e})}function tf(e){const t=ef(e);if(t==="secp256k1")return{...Jy(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=pt(r.metadata.authenticatorData,Pi(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:tf(r.inner)}}throw new Oi({envelope:e})}function GU(e,t){const{payload:r}=t,n=(()=>{if(t.address)return t.address;if(t.publicKey)return Dl(t.publicKey)})();if(!n)return!1;const s=Ui(e);if(s.type==="secp256k1")return n?PU({address:n,payload:r,signature:s.signature}):!1;if(s.type==="p256"){const a=Dl(s.publicKey);return Mp(a,n)?Vy({hash:s.prehash,publicKey:s.publicKey,payload:r,signature:s.signature}):!1}if(s.type==="webAuthn"){const a=Dl(s.publicKey);return Mp(a,n)?$U({challenge:Ul(r),metadata:s.metadata,publicKey:s.publicKey,signature:s.signature}):!1}throw new jU(`Unable to verify signature envelope of type "${s.type}".`)}class Oi extends oe{constructor({envelope:t}){super(`Unable to coerce value (\`${Ai(t)}\`) to a valid signature envelope.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.CoercionError"})}}let Di=class extends oe{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"})}},jU=class extends oe{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.VerificationError"})}};async function Gl(e,{address:t,blockNumber:r,blockTag:n="latest"}){const s=r!==void 0?q(r):void 0,a=await e.request({method:"eth_getCode",params:[t,s||n]},{dedupe:!!s});if(a!=="0x")return a}function Qa(e,t,r){const{checksumAddress:n,staticPosition:s}=r,a=af(t.type);if(a){const[o,i]=a;return WU(e,{...t,type:i},{checksumAddress:n,length:o,staticPosition:s})}if(t.type==="tuple")return ZU(e,t,{checksumAddress:n,staticPosition:s});if(t.type==="address")return VU(e,{checksum:n});if(t.type==="bool")return qU(e);if(t.type.startsWith("bytes"))return YU(e,t,{staticPosition:s});if(t.type.startsWith("uint")||t.type.startsWith("int"))return KU(e,t);if(t.type==="string")return XU(e,{staticPosition:s});throw new uf(t.type)}const tg=32,rf=32;function VU(e,t={}){const{checksum:r=!1}=t,n=e.readBytes(32);return[(a=>r?_p(a):a)(Pt(PF(n,-20))),32]}function WU(e,t,r){const{checksumAddress:n,length:s,staticPosition:a}=r;if(!s){const c=Pn(e.readBytes(rf)),l=a+c,u=l+tg;e.setPosition(l);const d=Pn(e.readBytes(tg)),f=_i(t);let m=0;const y=[];for(let g=0;g<d;++g){e.setPosition(u+(f?g*32:m));const[E,v]=Qa(e,t,{checksumAddress:n,staticPosition:u});m+=v,y.push(E)}return e.setPosition(a+32),[y,32]}if(_i(t)){const c=Pn(e.readBytes(rf)),l=a+c,u=[];for(let d=0;d<s;++d){e.setPosition(l+d*32);const[f]=Qa(e,t,{checksumAddress:n,staticPosition:l});u.push(f)}return e.setPosition(a+32),[u,32]}let o=0;const i=[];for(let c=0;c<s;++c){const[l,u]=Qa(e,t,{checksumAddress:n,staticPosition:a+o});o+=u,i.push(l)}return[i,o]}function qU(e){return[BF(e.readBytes(32),{size:32}),32]}function YU(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),[Pt(c),32]}return[Pt(e.readBytes(Number.parseInt(s,10),32)),32]}function KU(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?IF(s,{signed:r}):Pn(s,{signed:r}),32]}function ZU(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(_i(t)){const c=Pn(e.readBytes(rf)),l=s+c;for(let u=0;u<t.components.length;++u){const d=t.components[u];e.setPosition(l+i);const[f,m]=Qa(e,d,{checksumAddress:n,staticPosition:l});i+=m,o[a?u:d==null?void 0:d.name]=f}return e.setPosition(s+32),[o,32]}for(let c=0;c<t.components.length;++c){const l=t.components[c],[u,d]=Qa(e,l,{checksumAddress:n,staticPosition:s});o[a?c:l==null?void 0:l.name]=u,i+=d}return[o,i]}function XU(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=FF(xy(a));return e.setPosition(t+32),[o,32]}function QU({checksumAddress:e,parameters:t,values:r}){const n=[];for(let s=0;s<t.length;s++)n.push(nf({checksumAddress:e,parameter:t[s],value:r[s]}));return n}function nf({checksumAddress:e=!1,parameter:t,value:r}){const n=t,s=af(n.type);if(s){const[a,o]=s;return eO(r,{checksumAddress:e,length:a,parameter:{...n,type:o}})}if(n.type==="tuple")return aO(r,{checksumAddress:e,parameter:n});if(n.type==="address")return JU(r,{checksum:e});if(n.type==="bool")return rO(r);if(n.type.startsWith("uint")||n.type.startsWith("int")){const a=n.type.startsWith("int"),[,,o="256"]=Zy.exec(n.type)??[];return nO(r,{signed:a,size:Number(o)})}if(n.type.startsWith("bytes"))return tO(r,{type:n.type});if(n.type==="string")return sO(r);throw new uf(n.type)}function sf(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?t+=32:t+=bt(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+=bt(i)):r.push(i)}return pt(...r,...n)}function JU(e,t){const{checksum:r=!1}=t;return Lr(e,{strict:r}),{dynamic:!1,encoded:Ys(e.toLowerCase())}}function eO(e,t){const{checksumAddress:r,length:n,parameter:s}=t,a=n===null;if(!Array.isArray(e))throw new fO(e);if(!a&&e.length!==n)throw new pO({expectedLength:n,givenLength:e.length,type:`${s.type}[${n}]`});let o=!1;const i=[];for(let c=0;c<e.length;c++){const l=nf({checksumAddress:r,parameter:s,value:e[c]});l.dynamic&&(o=!0),i.push(l)}if(a||o){const c=sf(i);if(a){const l=X(i.length,{size:32});return{dynamic:!0,encoded:i.length>0?pt(l,c):l}}if(o)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:pt(...i.map(({encoded:c})=>c))}}function tO(e,{type:t}){const[,r]=t.split("bytes"),n=bt(e);if(!r){let s=e;return n%32!==0&&(s=Ks(s,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:pt(Ys(X(n,{size:32})),s)}}if(n!==Number.parseInt(r,10))throw new sg({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:Ks(e)}}function rO(e){if(typeof e!="boolean")throw new oe(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Ys(dy(e))}}function nO(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 my({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 sO(e){const t=Pi(e),r=Math.ceil(bt(t)/32),n=[];for(let s=0;s<r;s++)n.push(Ks(Pe(t,s*32,(s+1)*32)));return{dynamic:!0,encoded:pt(Ks(X(bt(t),{size:32})),...n)}}function aO(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=nf({checksumAddress:r,parameter:i,value:e[c]});a.push(l),l.dynamic&&(s=!0)}return{dynamic:s,encoded:s?sf(a):pt(...a.map(({encoded:o})=>o))}}function af(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function _i(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(_i);const r=af(e.type);return!!(r&&_i({...e,type:r[1]}))}const oO={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 cO({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new iO({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new rg({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 rg({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 of(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(oO);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}class rg extends oe{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class iO extends oe{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 cO extends oe{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 lO(e,t,r={}){const{as:n="Array",checksumAddress:s=!1}=r,a=typeof t=="string"?cs(t):t,o=of(a);if(Ka(a)===0&&e.length>0)throw new dO;if(Ka(a)&&Ka(a)<32)throw new uO({data:typeof t=="string"?t:Pt(t),parameters:e,size:Ka(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,f]=Qa(o,u,{checksumAddress:s,staticPosition:0});i+=f,n==="Array"?c.push(d):c[u.name??l]=d}return c}function cf(e,t,r){const{checksumAddress:n=!1}={};if(e.length!==t.length)throw new ag({expectedLength:e.length,givenLength:t.length});const s=QU({checksumAddress:n,parameters:e,values:t}),a=sf(s);return a.length===0?"0x":a}function lf(e,t){if(e.length!==t.length)throw new ag({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(lf.encode(s,a))}return pt(...r)}(function(e){function t(r,n,s=!1){if(r==="address"){const c=n;return Lr(c),Ys(c.toLowerCase(),s?32:0)}if(r==="string")return Pi(n);if(r==="bytes")return n;if(r==="bool")return Ys(dy(n),s?32:1);const a=r.match(Zy);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(BU);if(o){const[c,l]=o;if(Number.parseInt(l,10)!==(n.length-2)/2)throw new sg({expectedSize:Number.parseInt(l,10),value:n});return Ks(n,s?32:0)}const i=r.match(IU);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":pt(...u)}throw new uf(r)}e.encode=t})(lf||(lf={}));function ng(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?Rb(e):e}class uO extends oe{constructor({data:t,parameters:r,size:n}){super(`Data size of ${n} bytes is too small for given parameters.`,{metaMessages:[`Params: (${Ra(r)})`,`Data: ${t} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class dO extends oe{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class pO extends oe{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 sg extends oe{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${bt(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class ag extends oe{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${r}`].join(`
|
|
106
|
-
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class fO extends oe{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class uf extends oe{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}const og="0x6492649264926492649264926492649264926492649264926492649264926492";function mO(e){if(Pe(e,-32)!==og)throw new yO(e)}function hO(e){const{data:t,signature:r,to:n}=e;return pt(cf(ng("address, bytes, bytes"),[n,t,r]),og)}function bO(e){try{return mO(e),!0}catch{return!1}}let yO=class extends oe{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 gO(e){return xO(e,"Hex")}function xO(e,t){const r=t,n=(()=>{if(typeof e=="string"){if(e.length>3&&e.length%2!==0)throw new gF(e);return cs(e)}return e})(),s=of(n,{recursiveReadLimit:Number.POSITIVE_INFINITY});return ig(s,r)}function ig(e,t="Hex"){if(e.bytes.length===0)return t==="Hex"?Pt(e.bytes):e.bytes;const r=e.readByte();if(r<128&&e.decrementPosition(1),r<192){const s=cg(e,r,128),a=e.readBytes(s);return t==="Hex"?Pt(a):a}const n=cg(e,r,192);return wO(e,n,t)}function cg(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 oe("Invalid RLP prefix")}function wO(e,t,r){const n=e.position,s=[];for(;e.position-n<t;)s.push(ig(e,r));return s}function vO(e,t){const{as:r}=t,n=lg(e),s=of(new Uint8Array(n.length));return n.encode(s),r==="Hex"?Pt(s.bytes):s.bytes}function EO(e,t={}){const{as:r="Hex"}=t;return vO(e,{as:r})}function lg(e){return Array.isArray(e)?kO(e.map(t=>lg(t))):CO(e)}function kO(e){const t=e.reduce((s,a)=>s+a.length,0),r=ug(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 CO(e){const t=typeof e=="string"?cs(e):e,r=ug(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 ug(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=16777215)return 3;if(e<=4294967295)return 4;throw new oe("Length is too large.")}function TO(e,t={}){return typeof e.chainId=="string"?dg(e):{...e,...t.signature}}function dg(e){const{address:t,chainId:r,nonce:n}=e,s=Qy(e);return{address:t,chainId:Number(r),nonce:BigInt(n),...s}}function SO(e){return e.map(dg)}function AO(e){const{address:t,chainId:r,nonce:n,...s}=e;return{address:t,chainId:X(r),nonce:X(n),...Jy(s)}}function PO(e){return e.map(AO)}const IO="0x8010801080108010801080108010801080108010801080108010801080108010",BO=ng("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function pg(e){if(typeof e=="string"){if(Pe(e,-32)!==IO)throw new OO(e)}else Nl(e.authorization)}function FO(e){pg(e);const t=Ii(Pe(e,-64,-32)),r=Pe(e,-t-64,-64),n=Pe(e,0,-t-64),[s,a,o]=lO(BO,r);return{authorization:TO({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 UO(e){try{return pg(e),!0}catch{return!1}}class OO extends oe{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"})}}const jl=[{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"}],df=[{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"}]}],fg=[{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"}],mg=[...fg,{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"}]}],DO=[...fg,{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"}]}],hg=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],bg=[{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"}]}],yg=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],gg=[{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"}],xg=[{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"}]}],wg="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",_O="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",MO="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",pf="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",ff="/docs/contract/encodeDeployData";function Vl(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 VT({docsPath:ff});if(!("inputs"in s))throw new gb({docsPath:ff});if(!s.inputs||s.inputs.length===0)throw new gb({docsPath:ff});const a=os(s.inputs,r);return lr([n,a])}const vg="/docs/contract/encodeFunctionData";function NO(e){const{abi:t,args:r,functionName:n}=e;let s=t[0];if(n){const a=$s({abi:t,args:r,name:n});if(!a)throw new za(n,{docsPath:vg});s=a}if(s.type!=="function")throw new za(void 0,{docsPath:vg});return{abi:[s],functionName:Yo(Mr(s))}}function fr(e){const{args:t}=e,{abi:r,functionName:n}=(()=>{var i;return e.abi.length===1&&((i=e.functionName)!=null&&i.startsWith("0x"))?e:NO(e)})(),s=r[0],a=n,o="inputs"in s&&s.inputs?os(s.inputs,t??[]):void 0;return lr([a,o??"0x"])}function Ja(e,t){if(!rt(e,{strict:!1}))throw new Ct({address:e});if(!rt(t,{strict:!1}))throw new Ct({address:t});return e.toLowerCase()===t.toLowerCase()}function LO(e){const t=Ut(`0x${e.substring(4)}`).substring(26);return Ho(`0x${t}`)}async function zO({hash:e,signature:t}){const r=Or(e)?e:Fe(e),{secp256k1:n}=await Promise.resolve().then(()=>SU);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:l,s:u,v:d,yParity:f}=t,m=Number(f??d),y=Eg(m);return new n.Signature(Le(l),Le(u)).addRecoveryBit(y)}const o=Or(t)?t:Fe(t);if(ct(o)!==65)throw new Error("invalid signature length");const i=ir(`0x${o.slice(130)}`),c=Eg(i);return n.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function Eg(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 kg({hash:e,signature:t}){return LO(await zO({hash:e,signature:t}))}function RO(e){const{chainId:t,nonce:r,to:n}=e,s=e.contractAddress??e.address,a=Ut(lr(["0x05",Qr([t?q(t):"0x",s,r?q(r):"0x"])]));return n==="bytes"?or(a):a}async function Wl(e){const{authorization:t,signature:r}=e;return kg({hash:RO(t),signature:r??t})}async function HO({address:e,authorization:t,signature:r}){return Ja(Jd(e),await Wl({authorization:t,signature:r}))}function se(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 $O({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 Fi.Signature(Le(e),Le(t)).toCompactHex()}${a===0?"1b":"1c"}`;return r==="hex"?o:or(o)}function GO(e){return{address:e.address,amount:X(e.amount),index:X(e.index),validatorIndex:X(e.validatorIndex)}}function Cg(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(GO)}}}const jO="0x82ad56cb",mf="/docs/contract/decodeFunctionResult";function Qs(e){const{abi:t,args:r,functionName:n,data:s}=e;let a=t[0];if(n){const i=$s({abi:t,args:r,name:n});if(!i)throw new za(n,{docsPath:mf});a=i}if(a.type!=="function")throw new za(void 0,{docsPath:mf});if(!a.outputs)throw new kb(a.name,{docsPath:mf});const o=Ko(a.outputs,s);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}function hf(){let e=()=>{},t=()=>{};return{promise:new Promise((n,s)=>{e=n,t=s}),resolve:e,reject:t}}const bf=new Map;function Tg({fn:e,id:t,shouldSplitBatch:r,wait:n=0,sort:s}){const a=async()=>{const u=c();o();const d=u.map(({args:f})=>f);d.length!==0&&e(d).then(f=>{s&&Array.isArray(f)&&f.sort(s);for(let m=0;m<u.length;m++){const{resolve:y}=u[m];y==null||y([f[m],f])}}).catch(f=>{for(let m=0;m<u.length;m++){const{reject:y}=u[m];y==null||y(f)}})},o=()=>bf.delete(t),i=()=>c().map(({args:u})=>u),c=()=>bf.get(t)||[],l=u=>bf.set(t,[...c(),u]);return{flush:o,async schedule(u){const{promise:d,resolve:f,reject:m}=hf();return(r==null?void 0:r([...i(),u]))&&a(),c().length>0?(l({args:u,resolve:f,reject:m}),d):(l({args:u,resolve:f,reject:m}),setTimeout(a,n),d)}}}function Sg(e){if(!(!e||e.length===0))return e.reduce((t,{slot:r,value:n})=>{if(r.length!==66)throw new b1({size:r.length,targetSize:66,type:"hex"});if(n.length!==66)throw new b1({size:n.length,targetSize:66,type:"hex"});return t[r]=n,t},{})}function VO(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=q(t)),r!==void 0&&(o.nonce=q(r)),n!==void 0&&(o.state=Sg(n)),s!==void 0){if(o.state)throw new hS;o.stateDiff=Sg(s)}return o}function yf(e){if(!e)return;const t={};for(const{address:r,...n}of e){if(!rt(r,{strict:!1}))throw new Ct({address:r});if(t[r])throw new mS({address:r});t[r]=VO(n)}return t}async function Mi(e,t){var F,_,k,P;const{account:r=e.account,authorizationList:n,batch:s=!!((F=e.batch)!=null&&F.multicall),blockNumber:a,blockTag:o=e.experimental_blockTag??"latest",accessList:i,blobs:c,blockOverrides:l,code:u,data:d,factory:f,factoryData:m,gas:y,gasPrice:g,maxFeePerBlobGas:E,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:A,to:C,value:D,stateOverride:L,...T}=t,h=r?Ke(r):void 0;if(u&&(f||m))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=f&&m&&C&&d,S=b||x,I=b?Ag({code:u,data:d}):x?YO({data:d,factory:f,factoryData:m,to:C}):d;try{en(t);const U=(typeof a=="bigint"?q(a):void 0)||o,z=l?Cg(l):void 0,H=yf(L),G=(P=(k=(_=e.chain)==null?void 0:_.formatters)==null?void 0:k.transactionRequest)==null?void 0:P.format,pe=(G||_r)({...Ws(T,{format:G}),accessList:i,account:h,authorizationList:n,blobs:c,data:I,gas:y,gasPrice:g,maxFeePerBlobGas:E,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:A,to:S?void 0:C,value:D},"call");if(s&&WO({request:pe})&&!H&&!z)try{return await qO(e,{...pe,blockNumber:a,blockTag:o})}catch(de){if(!(de instanceof Z1)&&!(de instanceof $d))throw de}const he=(()=>{const de=[pe,U];return H&&z?[...de,H,z]:H?[...de,H]:z?[...de,{},z]:de})(),ie=await e.request({method:"eth_call",params:he});return ie==="0x"?{data:void 0}:{data:ie}}catch(O){const U=KO(O),{offchainLookup:z,offchainLookupSignature:H}=await Promise.resolve().then(()=>IN);if(e.ccipRead!==!1&&(U==null?void 0:U.slice(0,10))===H&&C)return{data:await z(e,{data:U,to:C})};throw S&&(U==null?void 0:U.slice(0,10))==="0x101bb98d"?new xS({factory:f}):Ep(O,{...t,account:h,chain:e.chain})}}function WO({request:e}){const{data:t,to:r,...n}=e;return!(!t||t.startsWith(jO)||!r||Object.values(n).filter(s=>typeof s<"u").length>0)}async function qO(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 Ma({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new Z1})(),d=(typeof a=="bigint"?q(a):void 0)||o,{schedule:f}=Tg({id:`${e.uid}.${d}`,wait:s,shouldSplitBatch(E){return E.reduce((w,{data:A})=>w+(A.length-2),0)>r*2},fn:async E=>{const v=E.map(C=>({allowFailure:!0,callData:C.data,target:C.to})),w=fr({abi:jl,args:[v],functionName:"aggregate3"}),A=await e.request({method:"eth_call",params:[{...l===null?{data:Ag({code:pf,data:w})}:{to:l,data:w}},d]});return Qs({abi:jl,args:[v],functionName:"aggregate3",data:A||"0x"})}}),[{returnData:m,success:y}]=await f({data:i,to:c});if(!y)throw new ul({data:m});return m==="0x"?{data:void 0}:{data:m}}function Ag(e){const{code:t,data:r}=e;return Vl({abi:Lb(["constructor(bytes, bytes)"]),bytecode:wg,args:[t,r]})}function YO(e){const{data:t,factory:r,factoryData:n,to:s}=e;return Vl({abi:Lb(["constructor(address, bytes, address, bytes)"]),bytecode:_O,args:[s,t,r,n]})}function KO(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}const ZO=3;function Js(e,{abi:t,address:r,args:n,docsPath:s,functionName:a,sender:o}){const i=e instanceof ul?e:e instanceof $?e.walk(y=>"data"in y)||e.walk():{},{code:c,data:l,details:u,message:d,shortMessage:f}=i,m=e instanceof qo?new gS({functionName:a}):[ZO,js.code].includes(c)&&(l||u||d||f)||c===is.code&&u==="execution reverted"&&l?new wp({abi:t,data:typeof l=="object"?l.data:l,functionName:a,message:i instanceof vp?u:f??d}):e;return new Kb(m,{abi:t,args:n,contractAddress:r,docsPath:s,functionName:a,sender:o})}async function zr(e,t){const{abi:r,address:n,args:s,functionName:a,...o}=t,i=fr({abi:r,args:s,functionName:a});try{const{data:c}=await se(e,Mi,"call")({...o,data:i,to:n});return Qs({abi:r,args:s,functionName:a,data:c||"0x"})}catch(c){throw Js(c,{abi:r,address:n,args:s,docsPath:"/docs/contract/readContract",functionName:a})}}async function Ni(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 f=t.signature;return Or(f)?f:typeof f=="object"&&"r"in f&&"s"in f?$O(f):vt(f)})();try{return UO(i)?await XO(e,{...t,multicallAddress:o,signature:i}):await QO(e,{...t,verifierAddress:a,signature:i})}catch(f){try{if(Ja(Jd(r),await kg({hash:s,signature:i})))return!0}catch{}if(f instanceof ea)return!1;throw f}}async function XO(e,t){var E;const{address:r,blockNumber:n,blockTag:s,hash:a,multicallAddress:o}=t,{authorization:i,data:c,signature:l,to:u}=FO(t.signature);if(await Gl(e,{address:r,blockNumber:n,blockTag:s})===lr(["0xef0100",i.address]))return await JO(e,{address:r,blockNumber:n,blockTag:s,hash:a,signature:l});const f={address:i.address,chainId:Number(i.chainId),nonce:Number(i.nonce),r:q(i.r,{size:32}),s:q(i.s,{size:32}),yParity:i.yParity};if(!await HO({address:r,authorization:f}))throw new ea;const y=await se(e,zr,"readContract")({...o?{address:o}:{code:pf},authorizationList:[f],abi:jl,blockNumber:n,blockTag:"pending",functionName:"aggregate3",args:[[...c?[{allowFailure:!0,target:u??r,callData:c}]:[],{allowFailure:!0,target:r,callData:fr({abi:yg,functionName:"isValidSignature",args:[a,l]})}]]}),g=(E=y[y.length-1])==null?void 0:E.returnData;if(g!=null&&g.startsWith("0x1626ba7e"))return!0;throw new ea}async function QO(e,t){const{address:r,factory:n,factoryData:s,hash:a,signature:o,verifierAddress:i,...c}=t,l=await(async()=>!n&&!s||bO(o)?o:hO({data:s,signature:o,to:n}))(),u=i?{to:i,data:fr({abi:gg,functionName:"isValidSig",args:[r,a,l]}),...c}:{data:Vl({abi:gg,args:[r,a,l],bytecode:MO}),...c},{data:d}=await se(e,Mi,"call")(u).catch(f=>{throw f instanceof Yb?new ea:f});if(e8(d??"0x0"))return!0;throw new ea}async function JO(e,t){const{address:r,blockNumber:n,blockTag:s,hash:a,signature:o}=t;if((await se(e,zr,"readContract")({address:r,abi:yg,args:[a,o],blockNumber:n,blockTag:s,functionName:"isValidSignature"}).catch(c=>{throw c instanceof Kb?new ea:c})).startsWith("0x1626ba7e"))return!0;throw new ea}class ea extends Error{}function eD(e,t={}){return typeof e.chainId=="string"?Pg(e):t.signature?{...e,signature:t.signature}:e}function Pg(e){const{address:t,chainId:r,nonce:n}=e,s=Hl(e.signature);return{address:t,chainId:Number(r),nonce:BigInt(n),signature:s}}function tD(e){return e.map(t=>Pg(t))}function rD(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=Xa(s)),eD(a)}function nD(e){const t=[];for(const r of e)t.push(rD(r));return t}function sD(e){const{address:t,chainId:r,nonce:n,signature:s}=e;return{address:t,chainId:X(r),nonce:X(n),signature:tf(s)}}function aD(e){return e.map(t=>sD(t))}function oD(e){const{address:t,chainId:r,nonce:n}=e,s=e.signature?$l(e.signature):void 0;return[r?X(r):"0x",t,n?X(n):"0x",...s?[s]:[]]}function iD(e){if(!e||e.length===0)return[];const t=[];for(const r of e)t.push(oD(r));return t}function cD(e,t={}){return typeof e.expiry=="string"?Ig(e):t.signature?{...e,signature:Ui(t.signature)}:e}function Ig(e){const{chainId:t="0x0",keyId:r,expiry:n=0,limits:s,keyType:a}=e,o=Hl(e.signature);return{address:r,chainId:t==="0x"?0n:yt(t),expiry:Number(n),limits:s==null?void 0:s.map(i=>({token:i.token,limit:BigInt(i.limit)})),signature:o,type:a}}function lD(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"?Ii(o):void 0,type:c,...n!=="0x"?{chainId:yt(n)}:{},...typeof o<"u"?{expiry:Ii(o)}:{},...typeof i<"u"?{limits:i.map(([u,d])=>({token:u,limit:BigInt(d)}))}:{}};return r&&(l.signature=Xa(r)),cD(l)}function uD(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:tf(o),keyType:a}}function dD(e){const{address:t,chainId:r=0n,expiry:n,limits:s}=e,a=e.signature?$l(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 pD="0x20c0";function Bg(e){if(typeof e=="string")return Lr(e),e;const t=X(e,{size:18});return pt(pD,t)}const Fg={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"},Ug={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function fD(e,t={}){if(!e)return null;const r=Qy(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=SO(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=Ug[e.type]??e.type),r&&(n.v=Zp(r.yParity)),n}const Og={...Fg,tempo:"0x76"},mD={...Ug,"0x76":"tempo"};function hD(e,t={}){if(!e)return null;const r=fD(e);return r.type=mD[e.type],e.aaAuthorizationList&&(r.authorizationList=tD(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=Hl(e.signature)),e.validAfter&&(r.validAfter=Number(e.validAfter)),e.validBefore&&(r.validBefore=Number(e.validBefore)),e.keyAuthorization&&(r.keyAuthorization=Ig(e.keyAuthorization)),e.feePayerSignature&&(r.feePayerSignature=Yp(e.feePayerSignature),r.feePayerSignature.v=Zp(r.feePayerSignature.yParity)),r}function bD(e){const t={};return typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.authorizationList<"u"&&(t.authorizationList=PO(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=Fg[e.type]||e.type),typeof e.value<"u"&&(t.value=X(e.value)),t}function yD(e){const t=bD({...e,authorizationList:void 0});e.authorizationList&&(t.authorizationList=aD(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=Bg(e.feeToken)),e.keyAuthorization&&(t.keyAuthorization=uD(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 py(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=Og.tempo,delete t.data,delete t.input,delete t.to,delete t.value),t}function gD(e){const t=[];for(let r=0;r<e.length;r++){const[n,s]=e[r];n&&Lr(n,{strict:!1}),t.push({address:n,storageKeys:s.map(a=>LF(a)?a:Fp(a))})}return t}function xD(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(bt(n[s])!==32)throw new wD({storageKey:n[s]});r&&Lr(r,{strict:!1}),t.push([r,n])}return t}class wD extends oe{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${bt(t)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccessList.InvalidStorageKeySizeError"})}}const Dg={wei:0,gwei:9,szabo:12,finney:15,ether:18};function vD(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 gf(e,t="wei"){return vD(e,Dg.gwei-Dg[t])}class ED extends oe{constructor({feeCap:t}={}){super(`The fee cap (\`maxFeePerGas\`/\`maxPriorityFeePerGas\`${t?` = ${gf(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 kD extends oe{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 CD extends oe{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 TD extends oe{constructor({maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${gf(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${gf(r)} gwei`:""}).`].join(`
|
|
107
|
-
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.TipAboveFeeCapError"})}}const SD="0x78",AD="0x76",_g="tempo";function xf(e){const{calls:t,chainId:r,maxFeePerGas:n,maxPriorityFeePerGas:s,validBefore:a,validAfter:o}=e;if(!t||t.length===0)throw new OD;if(typeof a=="number"&&typeof o=="number"&&a<=o)throw new DD({validBefore:a,validAfter:o});if(t)for(const i of t)i.to&&Lr(i.to,{strict:!1});if(r<=0)throw new kD({chainId:r});if(n&&BigInt(n)>2n**256n-1n)throw new ED({feeCap:n});if(s&&n&&s>n)throw new TD({maxFeePerGas:n,maxPriorityFeePerGas:s})}function PD(e){const t=gO(Pe(e,1)),[r,n,s,a,o,i,c,l,u,d,f,m,y,g,E]=t,v=Array.isArray(g)?g:void 0,w=v?E:g;if(!(t.length===13||t.length===14||t.length===15))throw new CD({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:f,feePayerSignatureOrSender:m,...t.length>12?{signature:w}:{}},serialized:e,type:_g});let A={chainId:Number(r),type:_g};if(Nr(a)&&a!=="0x"&&(A.gas=BigInt(a)),Nr(l)&&(A.nonce=l==="0x"?0n:BigInt(l)),Nr(s)&&s!=="0x"&&(A.maxFeePerGas=BigInt(s)),Nr(n)&&n!=="0x"&&(A.maxPriorityFeePerGas=BigInt(n)),Nr(c)&&(A.nonceKey=c==="0x"?0n:BigInt(c)),Nr(u)&&u!=="0x"&&(A.validBefore=Number(u)),Nr(d)&&d!=="0x"&&(A.validAfter=Number(d)),Nr(f)&&f!=="0x"&&(A.feeToken=f),o&&o!=="0x"){const D=o;A.calls=D.map(L=>{const[T,h,b]=L,x={};return T&&T!=="0x"&&(x.to=T),h&&h!=="0x"&&(x.value=BigInt(h)),b&&b!=="0x"&&(x.data=b),x})}(i==null?void 0:i.length)!==0&&i!=="0x"&&(A.accessList=gD(i)),(y==null?void 0:y.length)!==0&&y!=="0x"&&(A.authorizationList=nD(y)),m!=="0x"&&m!==void 0&&(m==="0x00"||_l(m)?A.feePayerSignature=null:A.feePayerSignature=OU(m)),v&&(A.keyAuthorization=lD(v));const C=w?Xa(w):void 0;return C&&(A={...A,signature:C}),xf(A),A}function ID(e,t={}){const{feePayerSignature:r,signature:n}=t,s=typeof e=="string"?PD(e):e;return xf(s),{...s,...n?{signature:Ui(n)}:{},...r?{feePayerSignature:Ll(r)}:{},type:"tempo"}}function Li(e,t={}){const{accessList:r,authorizationList:n,calls:s,chainId:a,feeToken:o,gas:i,keyAuthorization:c,nonce:l,nonceKey:u,maxFeePerGas:d,maxPriorityFeePerGas:f,validBefore:m,validAfter:y}=e;xf(e);const g=xD(r),E=t.signature||e.signature,v=iD(n),w=s.map(D=>[D.to??"0x",D.value?X(D.value):"0x",D.data??"0x"]),A=(()=>{if(t.sender)return t.sender;const D=typeof t.feePayerSignature<"u"?t.feePayerSignature:e.feePayerSignature;return D===null?"0x00":D?_U(D):"0x"})(),C=[X(a),f?X(f):"0x",d?X(d):"0x",i?X(i):"0x",w,g,u?X(u):"0x",l?X(l):"0x",typeof m=="number"?X(m):"0x",typeof y=="number"?X(y):"0x",typeof o=="bigint"||typeof o=="string"?Bg(o):"0x",A,v,...c?[dD(c)]:[],...E?[$l(Ui(E))]:[]];return pt(t.format==="feePayer"?SD:AD,EO(C))}function BD(e){return FD(e,{presign:!0})}function FD(e,t={}){const r=Li({...e,...t.presign?{signature:void 0}:{}});return Bi(r)}function UD(e,t){const{sender:r}=t,n=Li({...e,signature:void 0},{sender:r,format:"feePayer"});return Bi(n)}class OD extends oe{constructor(){super("Calls list cannot be empty."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.CallsEmptyError"})}}class DD extends oe{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 Mg(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:np(e)}function wf(e){try{return Mg(e)==="tempo"}catch{return!1}}async function _D(e,t){if(!wf(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 qc(e,{r:X(n,{size:32}),s:X(s,{size:32}),yParity:a})}return qc(e,t)}if(Mg(e)==="tempo")return MD(e,t);throw new Error("Unsupported transaction type")}async function MD(e,t){var l;const r=(()=>{if(e.signature)return e.signature;if(t&&"type"in t)return t;if(t)return Ui({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=ID(c,{signature:r}),d=(()=>{if(e.from)return e.from;if(r.type==="secp256k1")return Ky({payload:BD(u),signature:r.signature});throw new Error("Unable to extract sender from transaction or signature.")})(),f=UD(u,{sender:d}),m=await e.feePayer.sign({hash:f});return Li(u,{feePayerSignature:Ll(m)})}if(s===!0){const u=Li(c,{feePayerSignature:null,signature:r});return e.from&&r?pt(u,e.from,"0xfeefeefeefee"):u}return Li({...c,...s?{feeToken:void 0}:{}},{feePayerSignature:void 0,signature:r})}function ND(e){if(!wf(e))return Ns(e);const{feePayerSignature:t,gasPrice:r,nonce:n,...s}=hD(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:Og[s.type],type:s.type}}function LD(e){return Hc(e)}function zD(e,t){const r=e,n=r.account?Ke(r.account):void 0;if(!wf(r))return _r(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=yD({...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 RD=HD();function HD(){return new Map}function $D(e){return`${e.address.toLowerCase()}-${e.chainId}`}function Ng(e,t){const r=$D(t);let n=e.get(r);return n||(n={counter:0,resetScheduled:!1},e.set(r,n)),n}function GD(e,t){const r=Ng(e,t);r.counter=0,r.resetScheduled=!1}function jD(e,t){const r=Ng(e,t);r.resetScheduled||(r.resetScheduled=!0,queueMicrotask(()=>GD(e,t)));const n=r.counter;return r.counter++,n===0?0n:yt(py(6))}const vf={blockTime:1e3,extendSchema:L3(),formatters:{transaction:Rc({exclude:["aaAuthorizationList"],format:ND}),transactionReceipt:Fd({format:LD}),transactionRequest:Ud({format:zD})},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=jD(RD,{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)=>_D(e,t))},async verifyHash(e,t){const{address:r,hash:n,signature:s}=t;if(typeof s=="string"&&s.endsWith(Xs.slice(2))){const a=Xa(s);if(a.type!=="keychain"){const o=await Gl(e,{address:r,blockNumber:t.blockNumber,blockTag:t.blockTag});if(!o||o==="0xef01007702c00000000000000000000000000000000000")return GU(a,{address:r,payload:n})}}return await se(e,Ni,"verifyHash")({...t,chain:null})}},VD=p({...vf,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"]}}}),WD=p({...vf,id:1337,name:"Tempo",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["http://localhost:8545"]}}}),qD=p({...vf,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"]}}}),YD=p({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}),KD=p({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}),ZD=p({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}),XD=p({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}),QD=p({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}),JD=p({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}),e_=p({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}),t_=p({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}),r_=p({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}),n_=p({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}),s_=p({...ur,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}),a_=p({...ur,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}),o_=p({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"}}}),i_=p({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}),c_=p({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}),l_=p({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_=p({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"}}}),d_=p({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}),p_=p({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}),f_=p({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}),ql=1,m_=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[ql]:{address:"0x2F12d621a16e2d3285929C9996f478508951dFe4"}},portal:{[ql]:{address:"0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2"}},l1StandardBridge:{[ql]:{address:"0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA"}}},sourceId:ql}),Yl=11155111,h_=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},portal:{[Yl]:{address:"0x0d83dab629f0e0F9d36c0Cbc89B69a489f0751bD"}},l1StandardBridge:{[Yl]:{address:"0xea58fcA6849d79EAd1f26608855c2D6407d54Ce2"}},disputeGameFactory:{[Yl]:{address:"0xeff73e5aa3B9AEC32c659Aa3E00444d20a84394b"}}},testnet:!0,sourceId:Yl}),b_=p({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/"}}}),y_=p({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}),g_=p({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/"}}}),x_=p({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}}}),w_=p({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}}}),v_=p({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}),E_=p({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}),k_=p({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"}}}),C_=p({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}),T_=p({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}),S_=p({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}),A_=p({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}),P_=p({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}),I_=p({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}}}),B_=p({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}),F_=p({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}),U_=p({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"}}}),O_=p({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}),D_=p({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}),__=p({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}}}),M_=p({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"}}),N_=p({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}),zi=1,L_=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[zi]:{address:"0x069c4c579671f8c120b1327a73217D01Ea2EC5ea"}},l2OutputOracle:{[zi]:{address:"0x19A6d1E9034596196295CF148509796978343c5D"}},portal:{[zi]:{address:"0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C"}},l1StandardBridge:{[zi]:{address:"0x470458C91978D2d929704489Ad730DC3E3001113"}}},testnet:!1,sourceId:zi}),Ri=11155111,z_=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Ri]:{address:"0x8Ec1111f67Dad6b6A93B3F42DfBC92D81c98449A"}},l2OutputOracle:{[Ri]:{address:"0xc8886f8BAb6Eaeb215aDB5f1c686BF699248300e"}},portal:{[Ri]:{address:"0xFf6EBa109271fe6d4237EeeD4bAb1dD9A77dD1A4"}},l1StandardBridge:{[Ri]:{address:"0xd7DF54b3989855eb66497301a4aAEc33Dbb3F8DE"}}},testnet:!0,sourceId:Ri}),R_=p({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}),H_=p({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}),$_=p({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}),G_=p({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}}}),j_=p({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}}}),V_=p({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}}}),Lg=p({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}),W_=p({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}),q_=p({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}),Y_=p({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}),K_=p({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}),Z_=p({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}),X_=p({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}),Q_=p({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}),J_=p({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}),eM=p({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}),tM=p({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"}}}),rM=p({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}),nM=p({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}),sM=p({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}),aM=p({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}),oM=p({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}),iM=p({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}),cM=p({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}),lM=p({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}),uM=p({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}),Ef=1,dM=p({...V,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:{[Ef]:{address:"0x92Ef6Af472b39F1b363da45E35530c24619245A4"}},portal:{[Ef]:{address:"0x17bfAfA932d2e23Bd9B909Fd5B4D2e2a27043fb1"}},l1StandardBridge:{[Ef]:{address:"0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8"}}},testnet:!1}),kf=11155111,pM=p({...V,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:{[kf]:{address:"0xd69D3AC5CA686cCF94b258291772bc520FEAf211"}},portal:{[kf]:{address:"0x4E21A71Ac3F7607Da5c06153A17B1DD20E702c21"}},l1StandardBridge:{[kf]:{address:"0x87a7E2bCA9E35BA49282E832a28A6023904460D8"}}},testnet:!0}),Cf=11155111,fM=p({...V,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:{[Cf]:{address:"0x740C2dac453aEf7140809F80b72bf0e647af8148"}},portal:{[Cf]:{address:"0x787f1C8c5924178689E0560a43D848bF8E54b23e"}},l1StandardBridge:{[Cf]:{address:"0x0545c5fe980098C16fcD0eCB5E79753afa6d9af9"}}},testnet:!0}),mM=p({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}),hM=p({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}),bM=p({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"}}}),yM=p({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"}}}),zg=p({...ur,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}}}),Rg=p({...ur,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}),gM=p({...ur,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}),xM=p({...ur,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}),wM=p({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}),Hg=p({...ur,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}),$g=p({...ur,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}),Kl=1,vM=p({...V,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:{...V.contracts,l2OutputOracle:{[Kl]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882},portal:{[Kl]:{address:"0x1a0ad011913A150f69f6A19DF447A0CfD9551054"}},l1StandardBridge:{[Kl]:{address:"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631"}}},sourceId:Kl}),Zl=11155111,EM=p({...V,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:{...V.contracts,l2OutputOracle:{[Zl]:{address:"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160},portal:{[Zl]:{address:"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f"}},l1StandardBridge:{[Zl]:{address:"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB"}}},sourceId:Zl,testnet:!0}),Gg=5,kM=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123},portal:{[Gg]:{address:"0xDb9F51790365e7dc196e7D072728df39Be958ACe"}}},sourceId:Gg,testnet:!0}),CM=Object.freeze(Object.defineProperty({__proto__:null,abey:j3,abstract:Bv,abstractTestnet:Fv,acala:Uv,acria:Ov,adf:Dv,agungTestnet:_v,aioz:Mv,alephZero:Nv,alephZeroTestnet:Lv,alienx:zv,alienxHalTestnet:Rv,ancient8:Vv,ancient8Sepolia:Wv,anvil:qv,apeChain:Yv,apexTestnet:Kv,apollo:Zv,arbitrum:Xv,arbitrumGoerli:Qv,arbitrumNova:Jv,arbitrumSepolia:eE,arcTestnet:tE,arenaz:rE,areonNetwork:nE,areonNetworkTestnet:sE,areum:aE,artelaTestnet:oE,arthera:iE,artheraTestnet:cE,assetChain:lE,assetChainTestnet:uE,astar:dE,astarZkEVM:pE,astarZkyoto:fE,atletaOlympia:mE,aurora:hE,auroraTestnet:bE,auroria:yE,autheoTestnet:gE,avalanche:xE,avalancheFuji:wE,b3:vE,b3Sepolia:EE,bahamut:kE,base:db,baseGoerli:SE,basePreconf:CE,baseSepolia:pb,baseSepoliaPreconf:AE,basecampTestnet:TE,beam:PE,beamTestnet:IE,bearNetworkChainMainnet:BE,bearNetworkChainTestnet:FE,berachain:UE,berachainBepolia:OE,berachainTestnet:DE,berachainTestnetbArtio:_E,bevmMainnet:ME,bifrost:NE,birdlayer:LE,bitTorrent:VE,bitTorrentTestnet:WE,bitgert:zE,bitkub:RE,bitkubTestnet:HE,bitlayer:$E,bitlayerTestnet:GE,bitrock:jE,blast:qE,blastSepolia:YE,bob:KE,bobSepolia:QE,boba:ZE,bobaSepolia:XE,boolBetaMainnet:JE,botanix:ek,botanixTestnet:tk,bounceBit:rk,bounceBitTestnet:nk,bronos:sk,bronosTestnet:ak,bsc:ok,bscGreenfield:ik,bscTestnet:ck,bsquared:lk,bsquaredTestnet:uk,btr:dk,btrTestnet:pk,bxn:fk,bxnTestnet:mk,cannon:hk,canto:bk,celo:Ak,celoAlfajores:Pk,celoSepolia:Ik,chang:Bk,chiliz:Fk,chips:Uk,citreaTestnet:Ok,classic:Dk,coinbit:_k,coinex:Mk,confluxESpace:Nk,confluxESpaceTestnet:Lk,coreDao:zk,coreTestnet1:Rk,coreTestnet2:Hk,corn:$k,cornTestnet:Gk,crab:jk,creatorTestnet:Vk,creditCoin3Devnet:Wk,creditCoin3Mainnet:qk,creditCoin3Testnet:Yk,cronos:Kk,cronosTestnet:Zk,cronoszkEVM:Xk,cronoszkEVMTestnet:Qk,crossbell:Jk,crossfi:e7,curtis:t7,cyber:r7,cyberTestnet:n7,dailyNetwork:s7,dailyNetworkTestnet:a7,darwinia:o7,datahavenTestnet:i7,dbkchain:c7,dchain:l7,dchainTestnet:u7,defichainEvm:d7,defichainEvmTestnet:p7,degen:f7,dfk:m7,diode:h7,disChain:b7,dodochainTestnet:y7,dogechain:g7,domaTestnet:x7,donatuz:w7,dosChain:v7,dosChainTestnet:E7,dreyerxMainnet:k7,dreyerxTestnet:C7,dustboyIoT:T7,dymension:S7,edexa:A7,edexaTestnet:P7,edgeless:I7,edgelessTestnet:B7,edgeware:F7,edgewareTestnet:U7,eduChain:O7,eduChainTestnet:D7,ekta:_7,ektaTestnet:M7,elastos:N7,elastosTestnet:L7,electroneum:z7,electroneumTestnet:R7,elysiumTestnet:H7,energy:$7,eni:G7,eniTestnet:j7,enuls:V7,eon:W7,eos:q7,eosTestnet:Y7,eteria:K7,etherlink:Z7,etherlinkShadownetTestnet:X7,etherlinkTestnet:Q7,ethernity:J7,etp:eC,evmos:tC,evmosTestnet:rC,excelonMainnet:nC,expanse:sC,exsat:aC,exsatTestnet:oC,fantom:iC,fantomSonicTestnet:cC,fantomTestnet:lC,fibo:uC,filecoin:dC,filecoinCalibration:pC,filecoinHyperspace:fC,fireChain:G3,flame:mC,flare:hC,flareTestnet:bC,flowMainnet:yC,flowPreviewnet:gC,flowTestnet:xC,fluence:wC,fluenceStage:vC,fluenceTestnet:EC,fluentTestnet:kC,form:CC,formTestnet:SC,forma:TC,formicarium:sA,forta:AC,foundry:PC,fraxtal:IC,fraxtalTestnet:BC,funkiMainnet:FC,funkiSepolia:UC,fuse:OC,fuseSparknet:DC,fusion:_C,fusionTestnet:MC,garnet:NC,gatechain:LC,geist:zC,genesys:RC,giwaSepolia:hb,giwaSepoliaPreconf:HC,glideL1Protocol:$C,glideL2Protocol:GC,gnosis:jC,gnosisChiado:VC,goChain:YC,goat:WC,gobi:qC,godwoken:KC,goerli:ZC,graphite:XC,graphiteTestnet:QC,gravity:JC,gunz:e9,guruNetwork:t9,guruTestnet:r9,ham:n9,happychainTestnet:s9,haqqMainnet:a9,haqqTestedge2:o9,hardhat:i9,harmonyOne:c9,hashkey:l9,hashkeyTestnet:u9,haustTestnet:d9,hedera:p9,hederaPreviewnet:f9,hederaTestnet:m9,hela:h9,heliosTestnet:b9,hemi:y9,hemiSepolia:g9,henesys:x9,holesky:w9,hoodi:v9,hpb:E9,hpp:k9,hppSepolia:C9,huddle01Mainnet:T9,huddle01Testnet:S9,humanity:A9,humanityTestnet:P9,humanode:I9,humanodeTestnet5:B9,hychain:F9,hychainTestnet:U9,hyperEvm:bb,hyperliquid:bb,hyperliquidEvmTestnet:O9,iSunCoin:K9,icbNetwork:D9,idchain:_9,immutableZkEvm:M9,immutableZkEvmTestnet:N9,inEVM:L9,initVerse:z9,initVerseGenesis:R9,injective:H9,injectiveTestnet:$9,ink:G9,inkSepolia:j9,iota:V9,iotaTestnet:W9,iotex:q9,iotexTestnet:Y9,jasmyChain:Z9,jasmyChainTestnet:X9,jbc:Q9,jbcTestnet:J9,jocMainnet:eT,jocTestnet:tT,jovay:rT,jovaySepolia:nT,juneo:sT,juneoBCH1Chain:aT,juneoDAI1Chain:oT,juneoDOGE1Chain:iT,juneoEUR1Chain:cT,juneoGLD1Chain:lT,juneoLINK1Chain:uT,juneoLTC1Chain:dT,juneoSGD1Chain:fT,juneoSocotraTestnet:mT,juneoUSD1Chain:hT,juneoUSDT1Chain:bT,juneomBTC1Chain:pT,kaia:yT,kairos:gT,kakarotSepolia:xT,kakarotStarknetSepolia:wT,kardiaChain:vT,karura:ET,katana:kT,kava:CT,kavaTestnet:TT,kcc:ST,kiiTestnetOro:AT,kinto:PT,klaytn:IT,klaytnBaobab:BT,koi:FT,kroma:UT,kromaSepolia:OT,l3x:DT,l3xTestnet:_T,lavita:MT,lens:NT,lensTestnet:LT,lestnet:zT,lightlinkPegasus:RT,lightlinkPhoenix:HT,linea:kS,lineaGoerli:CS,lineaSepolia:TS,lineaTestnet:SS,lisk:AS,liskSepolia:PS,loadAlphanet:IS,localhost:BS,loop:FS,lukso:US,luksoTestnet:OS,lumiaMainnet:DS,lumiaTestnet:_S,lumoz:MS,lumozTestnet:NS,lycan:LS,lyra:zS,mainnet:RS,mandala:HS,manta:$S,mantaSepoliaTestnet:GS,mantaTestnet:jS,mantle:VS,mantleSepoliaTestnet:WS,mantleTestnet:qS,mantraDuKongEVMTestnet:YS,mantraEVM:KS,mapProtocol:ZS,matchain:XS,matchainTestnet:QS,mchVerse:JS,megaethTestnet:eA,mekong:tA,meld:rA,memecore:nA,merlin:aA,merlinErigonTestnet:oA,metachain:iA,metachainIstanbul:cA,metadium:lA,metalL2:uA,meter:dA,meterTestnet:pA,metis:fA,metisGoerli:mA,metisSepolia:hA,mev:bA,mevTestnet:yA,mint:gA,mintSepoliaTestnet:xA,mitosisTestnet:wA,mode:vA,modeTestnet:EA,monad:kA,monadTestnet:CA,moonbaseAlpha:TA,moonbeam:SA,moonbeamDev:AA,moonriver:PA,morph:IA,morphHolesky:BA,morphSepolia:FA,nahmii:UA,nautilus:OA,near:DA,nearTestnet:_A,neonDevnet:MA,neonMainnet:NA,neoxMainnet:LA,neoxT4:zA,newton:RA,nexi:HA,nexilix:$A,nibiru:GA,nitrographTestnet:jA,nomina:VA,oasisTestnet:WA,oasys:qA,odysseyTestnet:YA,okc:KA,omax:ZA,omni:XA,omniOmega:QA,oneWorld:JA,oortMainnetDev:eP,opBNB:tP,opBNBTestnet:rP,openledger:nP,optimism:sP,optimismGoerli:aP,optimismSepolia:oP,optopia:iP,optopiaTestnet:cP,orderly:lP,orderlySepolia:uP,otimDevnet:dP,palm:pP,palmTestnet:fP,peaq:mP,pgn:hP,pgnTestnet:bP,phoenix:yP,planq:gP,plasma:xP,plasmaDevnet:wP,plasmaTestnet:vP,playfiAlbireo:EP,plinga:kP,plume:CP,plumeDevnet:TP,plumeMainnet:SP,plumeSepolia:AP,plumeTestnet:PP,polterTestnet:IP,polygon:BP,polygonAmoy:FP,polygonMumbai:UP,polygonZkEvm:OP,polygonZkEvmCardona:DP,polygonZkEvmTestnet:_P,polynomial:MP,polynomialSepolia:NP,potos:LP,potosTestnet:zP,premiumBlockTestnet:RP,pulsechain:HP,pulsechainV4:$P,pumpfiTestnet:GP,pyrope:jP,qMainnet:WP,qTestnet:qP,ql1:VP,quai:YP,quaiTestnet:KP,reactiveTestnet:ZP,real:XP,redbellyMainnet:QP,redbellyTestnet:JP,reddio:eI,reddioSepolia:tI,redstone:rI,rei:nI,reyaNetwork:sI,riseTestnet:aI,rivalz:oI,rollux:iI,rolluxTestnet:cI,ronin:lI,root:uI,rootPorcini:dI,rootstock:pI,rootstockTestnet:fI,rss3:mI,rss3Sepolia:hI,saakuru:bI,saga:yI,saigon:gI,sanko:xI,sapphire:wI,sapphireTestnet:vI,satoshiVM:EI,satoshiVMTestnet:kI,scroll:CI,scrollSepolia:TI,sei:SI,seiDevnet:AI,seiTestnet:II,seismicDevnet:PI,sepolia:BI,shape:FI,shapeSepolia:UI,shardeum:OI,shardeumSphinx:DI,shibarium:_I,shibariumTestnet:MI,shiden:NI,shimmer:LI,shimmerTestnet:zI,sidraChain:RI,silentData:HI,silicon:$I,siliconSepolia:GI,sixProtocol:jI,skaleBase:nB,skaleBaseSepoliaTestnet:sB,skaleBlockBrawlers:VI,skaleCalypso:WI,skaleCalypsoTestnet:qI,skaleCryptoBlades:YI,skaleCryptoColosseum:KI,skaleEuropa:ZI,skaleEuropaTestnet:XI,skaleExorde:QI,skaleHumanProtocol:JI,skaleNebula:eB,skaleNebulaTestnet:tB,skaleRazor:rB,skaleTitan:aB,skaleTitanTestnet:oB,sketchpad:iB,snax:cB,snaxTestnet:lB,somnia:uB,somniaTestnet:dB,soneium:pB,soneiumMinato:fB,songbird:mB,songbirdTestnet:hB,sonic:bB,sonicBlazeTestnet:yB,sonicTestnet:gB,sophon:xB,sophonTestnet:wB,sova:vB,sovaSepolia:EB,spicy:kB,stableTestnet:CB,statusNetworkSepolia:Jb,statusSepolia:Jb,step:TB,story:SB,storyAeneid:AB,storyOdyssey:PB,storyTestnet:IB,stratis:BB,superlumio:FB,superposition:UB,superseed:OB,superseedSepolia:DB,surgeTestnet:_B,swan:MB,swanProximaTestnet:NB,swanSaturnTestnet:LB,swellchain:zB,swellchainTestnet:RB,swissdlt:HB,syscoin:$B,syscoinTestnet:GB,tac:jB,tacSPB:VB,taiko:WB,taikoHekla:qB,taikoHoodi:YB,taikoJolnir:KB,taikoKatla:ZB,taikoTestnetSepolia:XB,taraxa:QB,taraxaTestnet:JB,teaSepolia:eF,telcoinTestnet:tF,telos:rF,telosTestnet:nF,tempoDevnet:VD,tempoLocalnet:WD,tempoTestnet:qD,tenet:YD,ternoa:KD,thaiChain:ZD,that:XD,theta:QD,thetaTestnet:JD,thunderCore:e_,thunderTestnet:t_,tiktrixTestnet:r_,tomb:n_,treasure:s_,treasureTopaz:a_,tron:o_,tronNile:i_,tronShasta:c_,ubiq:l_,ultra:u_,ultraTestnet:d_,ultron:p_,ultronTestnet:f_,unichain:m_,unichainSepolia:h_,unique:b_,uniqueOpal:y_,uniqueQuartz:g_,unreal:x_,vana:w_,vanaMoksha:v_,vanar:E_,vechain:k_,velas:C_,viction:T_,victionTestnet:S_,vision:A_,visionTestnet:P_,wanchain:I_,wanchainTestnet:B_,weaveVMAlphanet:F_,wemix:U_,wemixTestnet:O_,westendAssetHub:D_,whitechain:__,whitechainTestnet:M_,wmcTestnet:N_,worldLand:R_,worldchain:L_,worldchainSepolia:z_,x1Testnet:Lg,xLayer:V_,xLayerTestnet:Lg,xai:H_,xaiTestnet:$_,xdc:G_,xdcTestnet:j_,xoneMainnet:W_,xoneTestnet:q_,xphereMainnet:Y_,xphereTestnet:K_,xrOne:Z_,xrSepolia:eM,xrplevm:X_,xrplevmDevnet:Q_,xrplevmTestnet:J_,yooldoVerse:tM,yooldoVerseTestnet:rM,zenchainTestnet:nM,zeniq:sM,zeroG:z3,zeroGGalileoTestnet:R3,zeroGMainnet:H3,zeroGTestnet:$3,zeroNetwork:aM,zetachain:oM,zetachainAthensTestnet:iM,zhejiang:cM,zilliqa:lM,zilliqaTestnet:uM,zircuit:dM,zircuitGarfieldTestnet:pM,zircuitTestnet:fM,zkFair:mM,zkFairTestnet:hM,zkLinkNova:bM,zkLinkNovaSepoliaTestnet:yM,zkSync:zg,zkSyncInMemoryNode:Rg,zkSyncLocalNode:Hg,zkSyncSepoliaTestnet:$g,zksync:zg,zksyncInMemoryNode:Rg,zksyncLocalCustomHyperchain:gM,zksyncLocalHyperchain:xM,zksyncLocalHyperchainL1:wM,zksyncLocalNode:Hg,zksyncSepoliaTestnet:$g,zora:vM,zoraSepolia:EM,zoraTestnet:kM},Symbol.toStringTag,{value:"Module"}));class TM extends ${constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}const jg="/docs/contract/encodeEventTopics";function Hi(e){var c;const{abi:t,eventName:r,args:n}=e;let s=t[0];if(r){const l=$s({abi:t,name:r});if(!l)throw new Eb(r,{docsPath:jg});s=l}if(s.type!=="event")throw new Eb(void 0,{docsPath:jg});const a=Mr(s),o=ll(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,f)=>Array.isArray(u[f])?u[f].map((m,y)=>Vg({param:d,value:u[f][y]})):typeof u[f]<"u"&&u[f]!==null?Vg({param:d,value:u[f]}):null))??[])}return[o,...i]}function Vg({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return Ut(xn(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new TM(e.type);return os([e],[t])}function Xl(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 Wg(e,t){const{address:r,abi:n,args:s,eventName:a,fromBlock:o,strict:i,toBlock:c}=t,l=Xl(e,{method:"eth_newFilter"}),u=a?Hi({abi:n,args:s,eventName:a}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof o=="bigint"?q(o):o,toBlock:typeof c=="bigint"?q(c):c,topics:u}]});return{abi:n,args:s,eventName:a,id:d,request:l(d),strict:!!i,type:"event"}}class SM extends ${constructor(t,{account:r,docsPath:n,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:f}){var y;const m=No({from:r==null?void 0:r.address,to:d,value:typeof f<"u"&&`${_d(f)} ${((y=s==null?void 0:s.nativeCurrency)==null?void 0:y.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Xt(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Xt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Xt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function AM(e,{docsPath:t,...r}){const n=(()=>{const s=dl(e,r);return s instanceof zo?e:s})();return new SM(n,{docsPath:t,...r})}class qg extends ${constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Tf extends ${constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class PM extends ${constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Xt(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class Yg 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"})}}async function Rr(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?q(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 Yg({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)||Id)(i,"getBlock")}async function Sf(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function IM(e,t){return Kg(e,t)}async function Kg(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 se(e,Rr,"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 Le(c)}catch{const[i,c]=await Promise.all([r?Promise.resolve(r):se(e,Rr,"getBlock")({}),se(e,Sf,"getGasPrice")({})]);if(typeof i.baseFeePerGas!="bigint")throw new Tf;const l=c-i.baseFeePerGas;return l<0n?0n:l}}async function BM(e,t){return Af(e,t)}async function Af(e,t){var f,m;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 qg;const c=10**(((f=o.toString().split(".")[1])==null?void 0:f.length)??0),l=y=>y*BigInt(Math.ceil(o*c))/BigInt(c),u=r||await se(e,Rr,"getBlock")({});if(typeof((m=n==null?void 0:n.fees)==null?void 0:m.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 Tf;const y=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await Kg(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 se(e,Sf,"getGasPrice")({}))}}async function Pf(e,{address:t,blockTag:r="latest",blockNumber:n}){const s=await e.request({method:"eth_getTransactionCount",params:[t,typeof n=="bigint"?q(n):r]},{dedupe:!!n});return ir(s)}function Ql(e,{docsPath:t,...r}){const n=(()=>{const s=dl(e,r);return s instanceof zo?e:s})();return new h8(n,{docsPath:t,...r})}async function ls(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return ir(t)}async function If(e,t){var h,b,x,S,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:f,maxPriorityFeePerGas:m,nonce:y,nonceManager:g,to:E,type:v,value:w,...A}=t,C=await(async()=>{if(!r||!g||typeof y<"u")return y;const F=Ke(r),_=a?a.id:await se(e,ls,"getChainId")({});return await g.consume({address:F.address,chainId:_,client:e})})();en(t);const D=(b=(h=a==null?void 0:a.formatters)==null?void 0:h.transactionRequest)==null?void 0:b.format,T=(D||_r)({...Ws(A,{format:D}),account:r?Ke(r):void 0,accessList:n,authorizationList:s,blobs:i,blobVersionedHashes:o,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:f,maxPriorityFeePerGas:m,nonce:C,to:E,type:v,value:w},"fillTransaction");try{const F=await e.request({method:"eth_fillTransaction",params:[T]}),k=(((S=(x=a==null?void 0:a.formatters)==null?void 0:x.transaction)==null?void 0:S.format)||Ns)(F.tx);delete k.blockHash,delete k.blockNumber,delete k.r,delete k.s,delete k.transactionIndex,delete k.v,delete k.yParity,k.data=k.input,k.gas&&(k.gas=t.gas??k.gas),k.gasPrice&&(k.gasPrice=t.gasPrice??k.gasPrice),k.maxFeePerBlobGas&&(k.maxFeePerBlobGas=t.maxFeePerBlobGas??k.maxFeePerBlobGas),k.maxFeePerGas&&(k.maxFeePerGas=t.maxFeePerGas??k.maxFeePerGas),k.maxPriorityFeePerGas&&(k.maxPriorityFeePerGas=t.maxPriorityFeePerGas??k.maxPriorityFeePerGas),k.nonce&&(k.nonce=t.nonce??k.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 se(e,Rr,"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 qg;const U=10**(((I=P.toString().split(".")[1])==null?void 0:I.length)??0),z=H=>H*BigInt(Math.ceil(P*U))/BigInt(U);return k.maxFeePerGas&&!t.maxFeePerGas&&(k.maxFeePerGas=z(k.maxFeePerGas)),k.gasPrice&&!t.gasPrice&&(k.gasPrice=z(k.gasPrice)),{raw:F.raw,transaction:{from:T.from,...k}}}catch(F){throw Ql(F,{...t,chain:e.chain})}}const Bf=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Zg=new Map,Ff=new Da(128);async function $i(e,t){var C,D,L;let r=t;r.account??(r.account=e.account),r.parameters??(r.parameters=Bf);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 se(e,ls,"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 m=((o.includes("blobVersionedHashes")||o.includes("sidecars"))&&r.kzg&&r.blobs||Ff.get(e.uid)===!1||!["fees","gas"].some(h=>o.includes(h))?!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 se(e,If,"fillTransaction")({...r,nonce:d}).then(T=>{const{chainId:h,from:b,gas:x,gasPrice:S,nonce:I,maxFeePerBlobGas:F,maxFeePerGas:_,maxPriorityFeePerGas:k,type:P,...O}=T.transaction;return Ff.set(e.uid,!0),{...r,...b?{from:b}:{},...P?{type:P}:{},...typeof h<"u"?{chainId:h}:{},...typeof x<"u"?{gas:x}:{},...typeof S<"u"?{gasPrice:S}:{},...typeof I<"u"?{nonce:I}:{},...typeof F<"u"?{maxFeePerBlobGas:F}:{},...typeof _<"u"?{maxFeePerGas:_}:{},...typeof k<"u"?{maxPriorityFeePerGas:k}:{},..."nonceKey"in O&&typeof O.nonceKey<"u"?{nonceKey:O.nonceKey}:{}}}).catch(T=>{var x;const h=T;return h.name!=="TransactionExecutionError"||((x=h.walk)==null?void 0:x.call(h,S=>{const I=S;return I.name==="MethodNotFoundRpcError"||I.name==="MethodNotSupportedRpcError"}))&&Ff.set(e.uid,!1),r}):r;d??(d=m.nonce),r={...m,...u?{from:u==null?void 0:u.address}:{},...d?{nonce:d}:{}};const{blobs:y,gas:g,kzg:E,type:v}=r;i!=null&&i.fn&&((D=i.runAt)!=null&&D.includes("beforeFillParameters"))&&(r=await i.fn({...r,chain:s},{phase:"beforeFillParameters"}));let w;async function A(){return w||(w=await se(e,Rr,"getBlock")({blockTag:"latest"}),w)}if(o.includes("nonce")&&typeof d>"u"&&u&&!a&&(r.nonce=await se(e,Pf,"getTransactionCount")({address:u.address,blockTag:"pending"})),(o.includes("blobVersionedHashes")||o.includes("sidecars"))&&y&&E){const T=Md({blobs:y,kzg:E});if(o.includes("blobVersionedHashes")){const h=$1({commitments:T,to:"hex"});r.blobVersionedHashes=h}if(o.includes("sidecars")){const h=Nd({blobs:y,commitments:T,kzg:E}),b=K1({blobs:y,commitments:T,proofs:h,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=np(r)}catch{let T=Zg.get(e.uid);if(typeof T>"u"){const h=await A();T=typeof(h==null?void 0:h.baseFeePerGas)=="bigint",Zg.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 A(),{maxFeePerGas:h,maxPriorityFeePerGas:b}=await Af(e,{block:T,chain:s,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<b)throw new PM({maxPriorityFeePerGas:b});r.maxPriorityFeePerGas=b,r.maxFeePerGas=h}}else{if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")throw new Tf;if(typeof r.gasPrice>"u"){const T=await A(),{gasPrice:h}=await Af(e,{block:T,chain:s,request:r,type:"legacy"});r.gasPrice=h}}return o.includes("gas")&&typeof g>"u"&&(r.gas=await se(e,Uf,"estimateGas")({...r,account:u,prepare:(u==null?void 0:u.type)==="local"?[]:["blobVersionedHashes"]})),i!=null&&i.fn&&((L=i.runAt)!=null&&L.includes("afterFillParameters"))&&(r=await i.fn({...r,chain:s},{phase:"afterFillParameters"})),en(r),delete r.parameters,r}async function Uf(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 Wl({authorization:t.authorizationList[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:u,authorizationList:d,blobs:f,blobVersionedHashes:m,blockNumber:y,blockTag:g,data:E,gas:v,gasPrice:w,maxFeePerBlobGas:A,maxFeePerGas:C,maxPriorityFeePerGas:D,nonce:L,value:T,stateOverride:h,...b}=n?await $i(e,{...t,parameters:a,to:l}):t;if(v&&t.gas!==v)return v;const S=(typeof y=="bigint"?q(y):void 0)||g,I=yf(h);en(t);const F=(c=(i=(o=e.chain)==null?void 0:o.formatters)==null?void 0:i.transactionRequest)==null?void 0:c.format,k=(F||_r)({...Ws(b,{format:F}),account:s,accessList:u,authorizationList:d,blobs:f,blobVersionedHashes:m,data:E,gasPrice:w,maxFeePerBlobGas:A,maxFeePerGas:C,maxPriorityFeePerGas:D,nonce:L,to:l,value:T},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:I?[k,S??e.experimental_blockTag??"latest",I]:S?[k,S]:[k]}))}catch(l){throw AM(l,{...t,account:s,chain:e.chain})}}async function FM(e,t){const{abi:r,address:n,args:s,functionName:a,dataSuffix:o,...i}=t,c=fr({abi:r,args:s,functionName:a});try{return await se(e,Uf,"estimateGas")({data:`${c}${o?o.replace("0x",""):""}`,to:n,...i})}catch(l){const u=i.account?Ke(i.account):void 0;throw Js(l,{abi:r,address:n,args:s,docsPath:"/docs/contract/estimateContractGas",functionName:a,sender:u==null?void 0:u.address})}}const Xg="/docs/contract/decodeEventLog";function Jl(e){const{abi:t,data:r,strict:n,topics:s}=e,a=n??!0,[o,...i]=s;if(!o)throw new ZT({docsPath:Xg});const c=t.find(g=>g.type==="event"&&o===ll(Mr(g)));if(!(c&&"name"in c)||c.type!=="event")throw new XT(o,{docsPath:Xg});const{name:l,inputs:u}=c,d=u==null?void 0:u.some(g=>!("name"in g&&g.name)),f=d?[]:{},m=u.map((g,E)=>[g,E]).filter(([g])=>"indexed"in g&&g.indexed);for(let g=0;g<m.length;g++){const[E,v]=m[g],w=i[g];if(!w)throw new lp({abiItem:c,param:E});f[d?v:E.name||v]=UM({param:E,value:w})}const y=u.filter(g=>!("indexed"in g&&g.indexed));if(y.length>0){if(r&&r!=="0x")try{const g=Ko(y,r);if(g)if(d)for(let E=0;E<u.length;E++)f[E]=f[E]??g.shift();else for(let E=0;E<y.length;E++)f[y[E].name]=g[E]}catch(g){if(a)throw g instanceof xb||g instanceof C1?new ol({abiItem:c,data:r,params:y,size:ct(r)}):g}else if(a)throw new ol({abiItem:c,data:"0x",params:y,size:0})}return{eventName:l,args:Object.values(f).length>0?f:void 0}}function UM({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Ko([e],t)||[])[0]}function Of(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]===ll(d));if(i.length===0)return null;let c,l;for(const d of i)try{c=Jl({...o,abi:[d],strict:!0}),l=d;break}catch{}if(!c&&!s){l=i[0];try{c=Jl({...o,abi:[l],strict:!1})}catch{const d=(u=l.inputs)==null?void 0:u.some(f=>!("name"in f&&f.name));return{...o,args:d?[]:{},eventName:l.name}}}return!c||!l||a&&!a.includes(c.eventName)||!OM({args:c.args,inputs:l.inputs,matchArgs:r})?null:{...c,...o}}).filter(Boolean)}function OM(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"?Ja(o,i):a.type==="string"||a.type==="bytes"?Ut(xn(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}async function Df(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=>Hi({abi:[g],eventName:g.name,args:o?void 0:i}))],a&&(d=d[0]));let f;r?f=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):f=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:typeof n=="bigint"?q(n):n,toBlock:typeof s=="bigint"?q(s):s}]});const m=f.map(y=>Xr(y));return u?Of({abi:u,args:i,logs:m,strict:l}):m}async function Qg(e,t){const{abi:r,address:n,args:s,blockHash:a,eventName:o,fromBlock:i,toBlock:c,strict:l}=t,u=o?$s({abi:r,name:o}):void 0,d=u?void 0:r.filter(f=>f.type==="event");return se(e,Df,"getLogs")({address:n,args:s,blockHash:a,event:u,events:d,fromBlock:i,toBlock:c,strict:l})}async function DM(e,t){const{abi:r,address:n,args:s,dataSuffix:a,functionName:o,...i}=t,c=i.account?Ke(i.account):e.account,l=fr({abi:r,args:s,functionName:o});try{const{data:u}=await se(e,Mi,"call")({batch:!1,data:`${l}${a?a.replace("0x",""):""}`,to:n,...i,account:c}),d=Qs({abi:r,args:s,functionName:o,data:u||"0x"}),f=r.filter(m=>"name"in m&&m.name===t.functionName);return{result:d,request:{abi:f,address:n,args:s,dataSuffix:a,functionName:o,...i,account:c}}}catch(u){throw Js(u,{abi:r,address:n,args:s,docsPath:"/docs/contract/simulateContract",functionName:o,sender:c==null?void 0:c.address})}}const _f=new Map,Jg=new Map;let _M=0;function Fn(e,t,r){const n=++_M,s=()=>_f.get(e)||[],a=()=>{const u=s();_f.set(e,u.filter(d=>d.id!==n))},o=()=>{const u=s();if(!u.some(f=>f.id===n))return;const d=Jg.get(e);if(u.length===1&&d){const f=d();f instanceof Promise&&f.catch(()=>{})}a()},i=s();if(_f.set(e,[...i,{id:n,fns:t}]),i&&i.length>0)return o;const c={};for(const u in t)c[u]=((...d)=>{var m,y;const f=s();if(f.length!==0)for(const g of f)(y=(m=g.fns)[u])==null||y.call(m,...d)});const l=r(c);return typeof l=="function"&&Jg.set(e,l),o}async function Mf(e){return new Promise(t=>setTimeout(t,e))}function eo(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 Mf(c);const l=async()=>{s&&(await e({unpoll:a}),await Mf(n),l())};l()})(),a}const MM=new Map,NM=new Map;function LM(e){const t=(s,a)=>({clear:()=>a.delete(s),get:()=>a.get(s),set:o=>a.set(s,o)}),r=t(e,MM),n=t(e,NM);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function zM(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){const n=LM(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 RM=e=>`blockNumber.${e}`;async function Gi(e,{cacheTime:t=e.cacheTime}={}){const r=await zM(()=>e.request({method:"eth_blockNumber"}),{cacheKey:RM(e.uid),cacheTime:t});return BigInt(r)}async function eu(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=>Xr(a));return!("abi"in t)||!t.abi?s:Of({abi:t.abi,logs:s,strict:r})}async function tu(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function HM(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:f}=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 E=f??!1,v=ht(["watchContractEvent",n,s,a,e.uid,o,d,E,i]);return Fn(v,{onLogs:l,onError:c},w=>{let A;i!==void 0&&(A=i-1n);let C,D=!1;const L=eo(async()=>{var T;if(!D){try{C=await se(e,Wg,"createContractEventFilter")({abi:r,address:n,args:s,eventName:o,strict:E,fromBlock:i})}catch{}D=!0;return}try{let h;if(C)h=await se(e,eu,"getFilterChanges")({filter:C});else{const b=await se(e,Gi,"getBlockNumber")({});A&&A<b?h=await se(e,Qg,"getContractEvents")({abi:r,address:n,args:s,eventName:o,fromBlock:A+1n,toBlock:b,strict:E}):h=[],A=b}if(h.length===0)return;if(a)w.onLogs(h);else for(const b of h)w.onLogs([b])}catch(h){C&&h instanceof is&&(D=!1),(T=w.onError)==null||T.call(w,h)}},{emitOnBegin:!0,interval:d});return async()=>{C&&await se(e,tu,"uninstallFilter")({filter:C}),L()}})})():(()=>{const E=f??!1,v=ht(["watchContractEvent",n,s,a,e.uid,o,d,E]);let w=!0,A=()=>w=!1;return Fn(v,{onLogs:l,onError:c},C=>((async()=>{try{const D=(()=>{if(e.transport.type==="fallback"){const h=e.transport.transports.find(b=>b.config.type==="webSocket"||b.config.type==="ipc");return h?h.value:e.transport}return e.transport})(),L=o?Hi({abi:r,eventName:o,args:s}):[],{unsubscribe:T}=await D.subscribe({params:["logs",{address:n,topics:L}],onData(h){var x;if(!w)return;const b=h.result;try{const{eventName:S,args:I}=Jl({abi:r,data:b.data,topics:b.topics,strict:f}),F=Xr(b,{args:I,eventName:S});C.onLogs([F])}catch(S){let I,F;if(S instanceof ol||S instanceof lp){if(f)return;I=S.abiItem.name,F=(x=S.abiItem.inputs)==null?void 0:x.some(k=>!("name"in k&&k.name))}const _=Xr(b,{args:F?[]:{},eventName:I});C.onLogs([_])}},onError(h){var b;(b=C.onError)==null||b.call(C,h)}});A=T,w||A()}catch(D){c==null||c(D)}})(),()=>A()))})()}async function Nf(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const Lf=new Da(128);async function ru(e,t){var w,A,C,D;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:f,nonce:m,type:y,value:g,...E}=t;if(typeof r>"u")throw new En({docsPath:"/docs/actions/wallet/sendTransaction"});const v=r?Ke(r):null;try{en(t);const L=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await Wl({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 se(e,ls,"getChainId")({}),cp({currentChainId:T,chain:n}));const h=(C=(A=(w=e.chain)==null?void 0:w.formatters)==null?void 0:A.transactionRequest)==null?void 0:C.format,x=(h||_r)({...Ws(E,{format:h}),accessList:s,account:v,authorizationList:a,blobs:o,chainId:T,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,to:L,type:y,value:g},"sendTransaction"),S=Lf.get(e.uid),I=S?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:I,params:[x]},{retryCount:0})}catch(F){if(S===!1)throw F;const _=F;if(_.name==="InvalidInputRpcError"||_.name==="InvalidParamsRpcError"||_.name==="MethodNotFoundRpcError"||_.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[x]},{retryCount:0}).then(k=>(Lf.set(e.uid,!0),k)).catch(k=>{const P=k;throw P.name==="MethodNotFoundRpcError"||P.name==="MethodNotSupportedRpcError"?(Lf.set(e.uid,!1),_):P});throw _}}if((v==null?void 0:v.type)==="local"){const T=await se(e,$i,"prepareTransactionRequest")({account:v,accessList:s,authorizationList:a,blobs:o,chain:n,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,nonceManager:v.nonceManager,parameters:[...Bf,"sidecars"],type:y,value:g,...E,to:L}),h=(D=n==null?void 0:n.serializers)==null?void 0:D.transaction,b=await v.signTransaction(T,{serializer:h});return await se(e,Nf,"sendRawTransaction")({serializedTransaction:b})}throw(v==null?void 0:v.type)==="smart"?new Hs({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Hs({docsPath:"/docs/actions/wallet/sendTransaction",type:v==null?void 0:v.type})}catch(L){throw L instanceof Hs?L:Ql(L,{...t,account:v,chain:t.chain||void 0})}}async function ji(e,t){return ji.internal(e,ru,"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,...f}=a;if(typeof i>"u")throw new En({docsPath:"/docs/contract/writeContract"});const m=i?Ke(i):null,y=fr({abi:o,args:l,functionName:d});try{return await se(r,n,s)({data:`${y}${u?u.replace("0x",""):""}`,to:c,account:m,...f})}catch(g){throw Js(g,{abi:o,address:c,args:l,docsPath:"/docs/contract/writeContract",functionName:d,sender:m==null?void 0:m.address})}}e.internal=t})(ji||(ji={}));class $M 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 nu(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 Mf(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 e6="0x5792579257925792579257925792579257925792579257925792579257925792",t6=q(0,{size:32});async function r6(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(f=>{const m=f,y=m.abi?fr({abi:m.abi,functionName:m.functionName,args:m.args}):m.data;return{data:m.dataSuffix&&y?cr([y,m.dataSuffix]):y,to:m.to,value:m.value?q(m.value):void 0}});try{const f=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:i,calls:d,capabilities:n,chainId:q(s.id),from:u==null?void 0:u.address,id:c,version:l}]},{retryCount:0});return typeof f=="string"?{id:f}:f}catch(f){const m=f;if(a&&(m.name==="MethodNotFoundRpcError"||m.name==="MethodNotSupportedRpcError"||m.name==="UnknownRpcError"||m.details.toLowerCase().includes("does not exist / is not available")||m.details.toLowerCase().includes("missing or invalid. request()")||m.details.toLowerCase().includes("did not match any variant of untagged enum")||m.details.toLowerCase().includes("account upgraded to unsupported contract")||m.details.toLowerCase().includes("eip-7702 not supported")||m.details.toLowerCase().includes("unsupported wc_ method")||m.details.toLowerCase().includes("feature toggled misconfigured")||m.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 Wa(new $(v,{details:v}))}const y=[];for(const v of d){const w=ru(e,{account:u,chain:s,data:v.data,to:v.to,value:v.value?Le(v.value):void 0});y.push(w),o>0&&await new Promise(A=>setTimeout(A,o))}const g=await Promise.allSettled(y);if(g.every(v=>v.status==="rejected"))throw g[0].reason;const E=g.map(v=>v.status==="fulfilled"?v.value:t6);return{id:cr([...E,q(s.id,{size:32}),e6])}}throw Ql(f,{...t,account:u,chain:t.chain})}}async function n6(e,t){async function r(u){if(u.endsWith(e6.slice(2))){const f=Zt(tp(u,-64,-32)),m=tp(u,0,-64).slice(2).match(/.{1,64}/g),y=await Promise.all(m.map(E=>t6.slice(2)!==E?e.request({method:"eth_getTransactionReceipt",params:[`0x${E}`]},{dedupe:!0}):void 0)),g=y.some(E=>E===null)?100:y.every(E=>(E==null?void 0:E.status)==="0x1")?200:y.every(E=>(E==null?void 0:E.status)==="0x0")?500:600;return{atomic:!1,chainId:ir(f),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?ir(s):void 0,receipts:(a==null?void 0:a.map(u=>({...u,blockNumber:Le(u.blockNumber),gasUsed:Le(u.gasUsed),status:w1[u.status]})))??[],statusCode:l,status:c,version:o}}async function s6(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=ht(["waitForCallsStatus",e.uid,r]),{promise:u,resolve:d,reject:f}=hf();let m;const y=Fn(l,{resolve:d,reject:f},g=>{const E=eo(async()=>{const v=w=>{clearTimeout(m),E(),w(),y()};try{const w=await nu(async()=>{const A=await se(e,n6,"getCallsStatus")({id:r});if(c&&A.status==="failure")throw new $M(A);return A},{retryCount:a,delay:o});if(!s(w))return;v(()=>g.resolve(w))}catch(w){v(()=>g.reject(w))}},{interval:n,emitOnBegin:!0});return E});return m=i?setTimeout(()=>{y(),clearTimeout(m),f(new GM({id:r}))},i):void 0,await u}class GM extends ${constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const zf=256;let su=zf,au;function a6(e=11){if(!au||su+e>zf*2){au="",su=0;for(let t=0;t<zf;t++)au+=(256+Math.random()*256|0).toString(16).substring(1)}return au.substring(su,su+++e)}function o6(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,f=e.account?Ke(e.account):void 0,{config:m,request:y,value:g}=e.transport({account:f,chain:r,pollingInterval:u}),E={...m,...g},v={account:f,batch:t,cacheTime:d,ccipRead:n,chain:r,key:s,name:a,pollingInterval:u,request:y,transport:E,type:o,uid:a6(),...i?{experimental_blockTag:i}:{}};function w(A){return C=>{const D=C(A);for(const T in v)delete D[T];const L={...A,...D};return Object.assign(L,{extend:w(L)})}}return Object.assign(v,{extend:w(v)})}function Rf(e){var r,n,s,a,o,i;if(!(e instanceof $))return!1;const t=e.walk(c=>c instanceof wp);return t instanceof wp?((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 jM(e){const{abi:t,data:r}=e,n=Rs(r,0,4),s=t.find(a=>a.type==="function"&&n===Yo(Mr(a)));if(!s)throw new QT(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:s.name,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Ko(s.inputs,Rs(r,4)):void 0}}const Hf="/docs/contract/encodeErrorResult";function i6(e){const{abi:t,errorName:r,args:n}=e;let s=t[0];if(r){const c=$s({abi:t,args:n,name:r});if(!c)throw new wb(r,{docsPath:Hf});s=c}if(s.type!=="error")throw new wb(void 0,{docsPath:Hf});const a=Mr(s),o=Yo(a);let i="0x";if(n&&n.length>0){if(!s.inputs)throw new KT(s.name,{docsPath:Hf});i=os(s.inputs,n)}return lr([o,i])}const $f="/docs/contract/encodeFunctionResult";function VM(e){const{abi:t,functionName:r,result:n}=e;let s=t[0];if(r){const o=$s({abi:t,name:r});if(!o)throw new za(r,{docsPath:$f});s=o}if(s.type!=="function")throw new za(void 0,{docsPath:$f});if(!s.outputs)throw new kb(s.name,{docsPath:$f});const a=(()=>{if(s.outputs.length===0)return[];if(s.outputs.length===1)return[n];if(Array.isArray(n))return n;throw new Cb(n)})();return os(s.outputs,a)}const Vi="x-batch-gateway:true";async function c6(e){const{data:t,ccipRequest:r}=e,{args:[n]}=jM({abi:df,data:t}),s=[],a=[];return await Promise.all(n.map(async(o,i)=>{try{a[i]=o.urls.includes(Vi)?await c6({data:o.data,ccipRequest:r}):await r(o),s[i]=!1}catch(c){s[i]=!0,a[i]=WM(c)}})),VM({abi:df,functionName:"query",result:[s,a]})}function WM(e){return e.name==="HttpRequestError"&&e.status?i6({abi:df,errorName:"HttpError",args:[e.status,e.shortMessage]}):i6({abi:[yb],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}function l6(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Or(t)?t:null}function Gf(e){let t=new Uint8Array(32).fill(0);if(!e)return vt(t);const r=e.split(".");for(let n=r.length-1;n>=0;n-=1){const s=l6(r[n]),a=s?xn(s):Ut(Ms(r[n]),"bytes");t=Ut(cr([t,a]),"bytes")}return vt(t)}function qM(e){return`[${e.slice(2)}]`}function YM(e){const t=new Uint8Array(32).fill(0);return e?l6(e)||Ut(Ms(e)):vt(t)}function jf(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const r=new Uint8Array(Ms(t).byteLength+2);let n=0;const s=t.split(".");for(let a=0;a<s.length;a++){let o=Ms(s[a]);o.byteLength>255&&(o=Ms(qM(YM(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 KM(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 Ma({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(f=>a.endsWith(f)))return null;const d=s!=null?[Gf(a),BigInt(s)]:[Gf(a)];try{const f=fr({abi:bg,functionName:"addr",args:d}),m={address:l,abi:mg,functionName:"resolveWithGateways",args:[Fe(jf(a)),f,o??[Vi]],blockNumber:r,blockTag:n},g=await se(e,zr,"readContract")(m);if(g[0]==="0x")return null;const E=Qs({abi:bg,args:d,functionName:"addr",data:g[0]});return E==="0x"||Zt(E)==="0x00"?null:E}catch(f){if(i)throw f;if(Rf(f))return null;throw f}}class ZM 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 Wi extends ${constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class Vf 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 XM extends ${constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const QM=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,JM=/^(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>\/.*)?$/,eN=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,tN=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function rN(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 u6(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function d6({uri:e,gatewayUrls:t}){const r=eN.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};const n=u6(t==null?void 0:t.ipfs,"https://ipfs.io"),s=u6(t==null?void 0:t.arweave,"https://arweave.net"),a=e.match(QM),{protocol:o,subpath:i,target:c,subtarget:l=""}=(a==null?void 0:a.groups)||{},u=o==="ipns:/"||i==="ipns/",d=o==="ipfs:/"||i==="ipfs/"||JM.test(e);if(e.startsWith("http")&&!u&&!d){let m=e;return t!=null&&t.arweave&&(m=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:m,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 f=e.replace(tN,"");if(f.startsWith("<svg")&&(f=`data:image/svg+xml;base64,${btoa(f)}`),f.startsWith("data:")||f.startsWith("{"))return{uri:f,isOnChain:!0,isEncoded:!1};throw new Vf({uri:e})}function p6(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new ZM({data:e});return e.image||e.image_url||e.image_data}async function nN({gatewayUrls:e,uri:t}){try{const r=await fetch(t).then(s=>s.json());return await Wf({gatewayUrls:e,uri:p6(r)})}catch{throw new Vf({uri:t})}}async function Wf({gatewayUrls:e,uri:t}){const{uri:r,isOnChain:n}=d6({uri:t,gatewayUrls:e});if(n||await rN(r))return r;throw new Vf({uri:t})}function sN(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 Wi({reason:"Only EIP-155 supported"});if(!o)throw new Wi({reason:"Chain ID not found"});if(!c)throw new Wi({reason:"Contract address not found"});if(!s)throw new Wi({reason:"Token ID not found"});if(!i)throw new Wi({reason:"ERC namespace not found"});return{chainID:Number.parseInt(o,10),namespace:i.toLowerCase(),contractAddress:c,tokenID:s}}async function aN(e,{nft:t}){if(t.namespace==="erc721")return zr(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 zr(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 XM({namespace:t.namespace})}async function oN(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?iN(e,{gatewayUrls:t,record:r}):Wf({uri:r,gatewayUrls:t})}async function iN(e,{gatewayUrls:t,record:r}){const n=sN(r),s=await aN(e,{nft:n}),{uri:a,isOnChain:o,isEncoded:i}=d6({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 Wf({uri:p6(u),gatewayUrls:t})}let c=n.tokenID;return n.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),nN({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,c)})}async function f6(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 Ma({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:mg,args:[Fe(jf(a)),fr({abi:hg,functionName:"text",args:[Gf(a),s]}),o??[Vi]],functionName:"resolveWithGateways",blockNumber:r,blockTag:n},m=await se(e,zr,"readContract")(d);if(m[0]==="0x")return null;const y=Qs({abi:hg,functionName:"text",data:m[0]});return y===""?null:y}catch(d){if(i)throw d;if(Rf(d))return null;throw d}}async function cN(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:s,gatewayUrls:a,strict:o,universalResolverAddress:i}){const c=await se(e,f6,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:s,universalResolverAddress:i,gatewayUrls:a,strict:o});if(!c)return null;try{return await oN(e,{record:c,gatewayUrls:n})}catch{return null}}async function lN(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 Ma({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})();try{const u={address:l,abi:DO,args:[r,a,o??[Vi]],functionName:"reverseWithGateways",blockNumber:n,blockTag:s},d=se(e,zr,"readContract"),[f]=await d(u);return f||null}catch(u){if(i)throw u;if(Rf(u))return null;throw u}}async function uN(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 Ma({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 se(e,zr,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Fe(jf(s))],blockNumber:r,blockTag:n});return c}async function m6(e,t){var E,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:f,value:m,...y}=t,g=r?Ke(r):void 0;try{en(t);const C=(typeof n=="bigint"?q(n):void 0)||s,D=(w=(v=(E=e.chain)==null?void 0:E.formatters)==null?void 0:v.transactionRequest)==null?void 0:w.format,T=(D||_r)({...Ws(y,{format:D}),account:g,blobs:a,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,to:f,value:m},"createAccessList"),h=await e.request({method:"eth_createAccessList",params:[T,C]});return{accessList:h.accessList,gasUsed:BigInt(h.gasUsed)}}catch(A){throw Ep(A,{...t,account:g,chain:e.chain})}}async function dN(e){const t=Xl(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}async function h6(e,{address:t,args:r,event:n,events:s,fromBlock:a,strict:o,toBlock:i}={}){const c=s??(n?[n]:void 0),l=Xl(e,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(m=>Hi({abi:[m],eventName:m.name,args:r}))],n&&(u=u[0]));const d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof a=="bigint"?q(a):a,toBlock:typeof i=="bigint"?q(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 b6(e){const t=Xl(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}async function pN(e,{address:t,blockNumber:r,blockTag:n=e.experimental_blockTag??"latest"}){const s=typeof r=="bigint"?q(r):void 0,a=await e.request({method:"eth_getBalance",params:[t,s||n]});return BigInt(a)}async function fN(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}async function mN(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){const s=r!==void 0?q(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}),ir(a)}class hN 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 bN(e,t){const{address:r,factory:n,factoryData:s}=t;try{const[a,o,i,c,l,u,d]=await se(e,zr,"readContract")({abi:yN,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 hN({address:r}):o}}const yN=[{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 gN(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 xN(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:s}){const a=typeof r=="bigint"?q(r):void 0,o=await e.request({method:"eth_feeHistory",params:[q(t),a||n,s]},{dedupe:!!a});return gN(o)}async function wN(e,{filter:t}){const r=t.strict??!1,s=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(a=>Xr(a));return t.abi?Of({abi:t.abi,logs:s,strict:r}):s}const ou=new Da(8192);function vN(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(ou.get(r))return ou.get(r);const n=e().finally(()=>ou.delete(r));return ou.set(r,n),n}function EN(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 Vs(new Error("method not supported"),{method:l});if(a!=null&&a.include&&!a.include.includes(l))throw new Vs(new Error("method not supported"),{method:l});const u=s?Sa(`${c}.${ht(r)}`):void 0;return vN(()=>nu(async()=>{try{return await e(r)}catch(f){const m=f;switch(m.code){case Qo.code:throw new Qo(m);case Jo.code:throw new Jo(m);case ei.code:throw new ei(m,{method:r.method});case ti.code:throw new ti(m);case js.code:throw new js(m);case is.code:throw new is(m);case ri.code:throw new ri(m);case ni.code:throw new ni(m);case si.code:throw new si(m);case Vs.code:throw new Vs(m,{method:r.method});case Ga.code:throw new Ga(m);case ai.code:throw new ai(m);case ja.code:throw new ja(m);case oi.code:throw new oi(m);case ii.code:throw new ii(m);case ci.code:throw new ci(m);case li.code:throw new li(m);case ui.code:throw new ui(m);case Va.code:throw new Va(m);case di.code:throw new di(m);case pi.code:throw new pi(m);case fi.code:throw new fi(m);case mi.code:throw new mi(m);case hi.code:throw new hi(m);case Wa.code:throw new Wa(m);case 5e3:throw new ja(m);default:throw f instanceof $?f:new vS(m)}}},{delay:({count:f,error:m})=>{var y;if(m&&m instanceof Gs){const g=(y=m==null?void 0:m.headers)==null?void 0:y.get("Retry-After");if(g!=null&&g.match(/\d/))return Number.parseInt(g,10)*1e3}return~~(1<<f)*o},retryCount:i,shouldRetry:({error:f})=>kN(f)}),{enabled:s,id:u})}}function kN(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Ga.code||e.code===js.code:e instanceof Gs&&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 CN 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=>` ${Xo(c)}`)],` Sender: ${a}`,` Data: ${n}`,` Callback selector: ${t}`,` Extra data: ${s}`].flat(),name:"OffchainLookupError"})}}class TN extends ${constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${Xo(r)}`,`Response: ${ht(t)}`],name:"OffchainLookupResponseMalformedError"})}}class SN 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 AN="0x556f1830",y6={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 PN(e,{blockNumber:t,blockTag:r,data:n,to:s}){const{args:a}=jb({data:n,abi:[y6]}),[o,i,c,l,u]=a,{ccipRead:d}=e,f=d&&typeof(d==null?void 0:d.request)=="function"?d.request:g6;try{if(!Ja(s,o))throw new SN({sender:o,to:s});const m=i.includes(Vi)?await c6({data:c,ccipRequest:f}):await f({data:c,sender:o,urls:i}),{data:y}=await Mi(e,{blockNumber:t,blockTag:r,data:cr([l,os([{type:"bytes"},{type:"bytes"}],[m,u])]),to:s});return y}catch(m){throw new CN({callbackSelector:l,cause:m,data:n,extraData:u,sender:o,urls:i})}}async function g6({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 Gs({body:c,details:d!=null&&d.error?ht(d.error):u.statusText,headers:u.headers,status:u.status,url:o});continue}if(!Or(d)){n=new TN({result:d,url:o});continue}return d}catch(u){n=new Gs({body:c,details:u.message,url:o})}}throw n}const IN=Object.freeze(Object.defineProperty({__proto__:null,ccipRequest:g6,offchainLookup:PN,offchainLookupAbiItem:y6,offchainLookupSignature:AN},Symbol.toStringTag,{value:"Module"}));function BN(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 FN(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const x6=FN();function UN(e,t={}){return{async request(r){var f;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 m=await BN(async({signal:g})=>{const E={...c,body:Array.isArray(n)?ht(n.map(C=>({jsonrpc:"2.0",id:C.id??x6.take(),...C}))):ht({jsonrpc:"2.0",id:n.id??x6.take(),...n}),headers:{"Content-Type":"application/json",...l},method:u||"POST",signal:d||(i>0?g:null)},v=new Request(e,E),w=await(a==null?void 0:a(v,E))??{...E,url:e};return await s(w.url??e,w)},{errorInstance:new Zb({body:n,url:e}),timeout:i,signal:!0});o&&await o(m);let y;if((f=m.headers.get("Content-Type"))!=null&&f.startsWith("application/json"))y=await m.json();else{y=await m.text();try{y=JSON.parse(y||"{}")}catch(g){if(m.ok)throw g;y={error:y}}}if(!m.ok)throw new Gs({body:n,details:ht(y.error)||m.statusText,headers:m.headers,status:m.status,url:e});return y}catch(m){throw m instanceof Gs||m instanceof Zb?m:new Gs({body:n,cause:m,url:e})}}}}const ON=`Ethereum Signed Message:
|
|
108
|
-
`;function DN(e){const t=typeof e=="string"?Sa(e):typeof e.raw=="string"?e.raw:vt(e.raw),r=Sa(`${ON}${ct(t)}`);return cr([r,t])}function w6(e,t){return Ut(DN(e),t)}class _N extends ${constructor({domain:t}){super(`Invalid domain "${ht(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class MN 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 NN extends ${constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function LN(e){const{domain:t,message:r,primaryType:n,types:s}=e,a=(c,l)=>{const u={...l};for(const d of c){const{name:f,type:m}=d;m==="address"&&(u[f]=u[f].toLowerCase())}return u},o=s.EIP712Domain?t?a(s.EIP712Domain,t):{}:{},i=(()=>{if(n!=="EIP712Domain")return a(s[n],r)})();return ht({domain:o,message:i,primaryType:n,types:s})}function v6(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],f=u.match($b);if(f&&(typeof d=="number"||typeof d=="bigint")){const[g,E,v]=f;q(d,{signed:E==="int",size:Number.parseInt(v,10)/8})}if(u==="address"&&typeof d=="string"&&!rt(d))throw new Ct({address:d});const m=u.match(Q4);if(m){const[g,E]=m;if(E&&ct(d)!==Number.parseInt(E,10))throw new e4({expectedSize:Number.parseInt(E,10),givenSize:ct(d)})}const y=s[u];y&&(zN(u),a(y,d))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new _N({domain:t});a(s.EIP712Domain,t)}if(n!=="EIP712Domain")if(s[n])a(s[n],r);else throw new MN({primaryType:n,types:s})}function E6({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 zN(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new NN({type:e})}function RN(e){const{domain:t={},message:r,primaryType:n}=e,s={EIP712Domain:E6({domain:t}),...e.types};v6({domain:t,message:r,primaryType:n,types:s});const a=["0x1901"];return t&&a.push(HN({domain:t,types:s})),n!=="EIP712Domain"&&a.push(k6({data:r,primaryType:n,types:s})),Ut(cr(a))}function HN({domain:e,types:t}){return k6({data:e,primaryType:"EIP712Domain",types:t})}function k6({data:e,primaryType:t,types:r}){const n=C6({data:e,primaryType:t,types:r});return Ut(n)}function C6({data:e,primaryType:t,types:r}){const n=[{type:"bytes32"}],s=[$N({primaryType:t,types:r})];for(const a of r[t]){const[o,i]=S6({types:r,name:a.name,type:a.type,value:e[a.name]});n.push(o),s.push(i)}return os(n,s)}function $N({primaryType:e,types:t}){const r=Fe(GN({primaryType:e,types:t}));return Ut(r)}function GN({primaryType:e,types:t}){let r="";const n=T6({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 T6({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])T6({primaryType:a.type,types:t},r);return r}function S6({types:e,name:t,type:r,value:n}){if(e[r]!==void 0)return[{type:"bytes32"},Ut(C6({data:n,primaryType:r,types:e}))];if(r==="bytes")return[{type:"bytes32"},Ut(n)];if(r==="string")return[{type:"bytes32"},Ut(Fe(n))];if(r.lastIndexOf("]")===r.length-1){const s=r.slice(0,r.lastIndexOf("[")),a=n.map(o=>S6({name:t,type:s,types:e,value:o}));return[{type:"bytes32"},Ut(os(a.map(([o])=>o),a.map(([,o])=>o)))]}return[{type:r},n]}function jN(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function VN(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?ir(e.nonce):void 0,storageProof:e.storageProof?jN(e.storageProof):void 0}}async function WN(e,{address:t,blockNumber:r,blockTag:n,storageKeys:s}){const a=n??"latest",o=r!==void 0?q(r):void 0,i=await e.request({method:"eth_getProof",params:[t,s,o||a]});return VN(i)}async function qN(e,{address:t,blockNumber:r,blockTag:n="latest",slot:s}){const a=r!==void 0?q(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,s,a||n]})}async function qf(e,{blockHash:t,blockNumber:r,blockTag:n,hash:s,index:a,sender:o,nonce:i}){var f,m,y;const c=n||"latest",l=r!==void 0?q(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,q(a)]},{dedupe:!0}):typeof a=="number"?u=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,q(a)]},{dedupe:!!l}):o&&typeof i=="number"&&(u=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[o,q(i)]},{dedupe:!0})),!u)throw new P1({blockHash:t,blockNumber:r,blockTag:c,hash:s,index:a});return(((y=(m=(f=e.chain)==null?void 0:f.formatters)==null?void 0:m.transaction)==null?void 0:y.format)||Ns)(u,"getTransaction")}async function YN(e,{hash:t,transactionReceipt:r}){const[n,s]=await Promise.all([se(e,Gi,"getBlockNumber")({}),t?se(e,qf,"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 iu(e,{hash:t}){var s,a,o;const r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new I1({hash:t});return(((o=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionReceipt)==null?void 0:o.format)||Hc)(r,"getTransactionReceipt")}async function KN(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:{},f=(()=>{if(t.multicallAddress)return t.multicallAddress;if(d)return null;if(e.chain)return Ma({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),m=[[]];let y=0,g=0;for(let A=0;A<l.length;A++){const{abi:C,address:D,args:L,functionName:T}=l[A];try{const h=fr({abi:C,args:L,functionName:T});g+=(h.length-2)/2,u>0&&g>u&&m[y].length>0&&(y++,g=(h.length-2)/2,m[y]=[]),m[y]=[...m[y],{allowFailure:!0,callData:h,target:D}]}catch(h){const b=Js(h,{abi:C,address:D,args:L,docsPath:"/docs/contract/multicall",functionName:T,sender:r});if(!s)throw b;m[y]=[...m[y],{allowFailure:!0,callData:"0x",target:D}]}}const E=await Promise.allSettled(m.map(A=>se(e,zr,"readContract")({...f===null?{code:pf}:{address:f},abi:jl,account:r,args:[A],authorizationList:n,blockNumber:a,blockOverrides:o,blockTag:i,functionName:"aggregate3",stateOverride:c}))),v=[];for(let A=0;A<E.length;A++){const C=E[A];if(C.status==="rejected"){if(!s)throw C.reason;for(let L=0;L<m[A].length;L++)v.push({status:"failure",error:C.reason,result:void 0});continue}const D=C.value;for(let L=0;L<D.length;L++){const{returnData:T,success:h}=D[L],{callData:b}=m[A][L],{abi:x,address:S,functionName:I,args:F}=l[v.length];try{if(b==="0x")throw new qo;if(!h)throw new ul({data:T});const _=Qs({abi:x,args:F,data:T,functionName:I});v.push(s?{result:_,status:"success"}:_)}catch(_){const k=Js(_,{abi:x,address:S,args:F,docsPath:"/docs/contract/multicall",functionName:I});if(!s)throw k;v.push({error:k,result:void 0,status:"failure"})}}}if(v.length!==l.length)throw new $("multicall results mismatch");return v}async function Yf(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 f of s){const m=f.blockOverrides?Cg(f.blockOverrides):void 0,y=f.calls.map(E=>{const v=E,w=v.account?Ke(v.account):void 0,A=v.abi?fr(v):v.data,C={...v,account:w,data:v.dataSuffix?cr([A||"0x",v.dataSuffix]):A,from:v.from??(w==null?void 0:w.address)};return en(C),_r(C)}),g=f.stateOverrides?yf(f.stateOverrides):void 0;c.push({blockOverrides:m,calls:y,stateOverrides:g})}const u=(typeof r=="bigint"?q(r):void 0)||n;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:a,traceTransfers:o,validation:i},u]})).map((f,m)=>({...Id(f),calls:f.calls.map((y,g)=>{var x,S;const{abi:E,args:v,functionName:w,to:A}=s[m].calls[g],C=((x=y.error)==null?void 0:x.data)??y.returnData,D=BigInt(y.gasUsed),L=(S=y.logs)==null?void 0:S.map(I=>Xr(I)),T=y.status==="0x1"?"success":"failure",h=E&&T==="success"&&C!=="0x"?Qs({abi:E,data:C,functionName:w}):null,b=(()=>{var F;if(T==="success")return;let I;if(((F=y.error)==null?void 0:F.data)==="0x"?I=new qo:y.error&&(I=new ul(y.error)),!!I)return Js(I,{abi:E??[],address:A??"0x",args:v,functionName:w??"<unknown>"})})();return{data:C,gasUsed:D,logs:L,status:T,...T==="success"?{result:h}:{error:b}}})}))}catch(c){const l=c,u=dl(l,{});throw u instanceof zo?l:u}}function Kf(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 oe("Unable to normalize signature.");return s}function Zf(e,t){const r=typeof e,n=t.type;switch(n){case"address":return _l(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)=>Zf(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=>Zf(s,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function A6(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 A6(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")?_l(r[n],{strict:!1}):o.includes("address")&&o.includes("bytes")?_l(r[n],{strict:!1}):!1)return o}}function P6(e,t={}){const{prepare:r=!0}=t,n=Array.isArray(e)||typeof e=="string"?zb(e):e;return{...n,...r?{hash:to(n)}:{}}}function cu(e,t,r){const{args:n=[],prepare:s=!0}=r??{},a=Nr(t,{strict:!1}),o=e.filter(l=>a?l.type==="function"||l.type==="error"?I6(l)===Pe(t,0,4):l.type==="event"?to(l)===t:!1:"name"in l&&l.name===t);if(o.length===0)throw new lu({name:t});if(o.length===1)return{...o[0],...s?{hash:to(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:to(l)}:{}};continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==n.length)continue;if(n.every((d,f)=>{const m="inputs"in l&&l.inputs[f];return m?Zf(d,m):!1})){if(i&&"inputs"in i&&i.inputs){const d=A6(l.inputs,i.inputs,n);if(d)throw new XN({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 lu({name:t});return{...c,...s?{hash:to(c)}:{}}}function I6(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,n]=e;return cu(r,n)}return e[0]})();return Pe(to(t),0,4)}function ZN(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,s]=e;return cu(n,s)}return e[0]})(),r=typeof t=="string"?t:il(t);return Kf(r)}function to(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,n]=e;return cu(r,n)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:Bi(Pi(ZN(t)))}class XN extends oe{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${Kf(il(t.abiItem))}\`, and`,`\`${r.type}\` in \`${Kf(il(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 lu extends oe{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 QN(...e){var a;const[t,r]=(()=>{if(Array.isArray(e[0])){const[o,i]=e;return[eL(o),i]}return e})(),{bytecode:n,args:s}=r;return pt(n,(a=t.inputs)!=null&&a.length&&(s!=null&&s.length)?cf(t.inputs,s):"0x")}function JN(e){return P6(e)}function eL(e){const t=e.find(r=>r.type==="constructor");if(!t)throw new lu({name:"constructor"});return t}function tL(...e){const[t,r=[]]=(()=>{if(Array.isArray(e[0])){const[l,u,d]=e;return[B6(l,u,{args:d}),d]}const[i,c]=e;return[i,c]})(),{overloads:n}=t,s=n?B6([t,...n],t.name,{args:r}):t,a=rL(s),o=r.length>0?cf(s.inputs,r):void 0;return o?pt(a,o):a}function ro(e,t={}){return P6(e,t)}function B6(e,t,r){const n=cu(e,t,r);if(n.type!=="function")throw new lu({name:t,type:"function"});return n}function rL(e){return I6(e)}const nL="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",tn="0x0000000000000000000000000000000000000000",sL="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function aL(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?QN(JN("constructor(bytes, bytes)"),{bytecode:wg,args:[sL,tL(ro("function getBalance(address)"),[l.address])]}):void 0,d=o?await Promise.all(t.calls.map(async U=>{if(!U.data&&!U.abi)return;const{accessList:z}=await m6(e,{account:l.address,...U,data:U.abi?fr(U):U.data});return z.map(({address:H,storageKeys:G})=>G.length>0?H:null)})).then(U=>U.flat().filter(Boolean)):[],f=await Yf(e,{blockNumber:r,blockTag:n,blocks:[...o?[{calls:[{data:u}],stateOverrides:a},{calls:d.map((U,z)=>({abi:[ro("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:U,from:tn,nonce:z})),stateOverrides:[{address:tn,nonce:0}]}]:[],{calls:[...s,{}].map(U=>({...U,from:l==null?void 0:l.address})),stateOverrides:a},...o?[{calls:[{data:u}]},{calls:d.map((U,z)=>({abi:[ro("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:U,from:tn,nonce:z})),stateOverrides:[{address:tn,nonce:0}]},{calls:d.map((U,z)=>({to:U,abi:[ro("function decimals() returns (uint256)")],functionName:"decimals",from:tn,nonce:z})),stateOverrides:[{address:tn,nonce:0}]},{calls:d.map((U,z)=>({to:U,abi:[ro("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:tn,nonce:z})),stateOverrides:[{address:tn,nonce:0}]},{calls:d.map((U,z)=>({to:U,abi:[ro("function symbol() returns (string)")],functionName:"symbol",from:tn,nonce:z})),stateOverrides:[{address:tn,nonce:0}]}]:[]],traceTransfers:i,validation:c}),m=o?f[2]:f[0],[y,g,,E,v,w,A,C]=o?f:[],{calls:D,...L}=m,T=D.slice(0,-1)??[],h=(y==null?void 0:y.calls)??[],b=(g==null?void 0:g.calls)??[],x=[...h,...b].map(U=>U.status==="success"?Le(U.data):null),S=(E==null?void 0:E.calls)??[],I=(v==null?void 0:v.calls)??[],F=[...S,...I].map(U=>U.status==="success"?Le(U.data):null),_=((w==null?void 0:w.calls)??[]).map(U=>U.status==="success"?U.result:null),k=((C==null?void 0:C.calls)??[]).map(U=>U.status==="success"?U.result:null),P=((A==null?void 0:A.calls)??[]).map(U=>U.status==="success"?U.result:null),O=[];for(const[U,z]of F.entries()){const H=x[U];if(typeof z!="bigint"||typeof H!="bigint")continue;const G=_[U-1],J=k[U-1],pe=P[U-1],he=U===0?{address:nL,decimals:18,symbol:"ETH"}:{address:d[U-1],decimals:pe||G?Number(G??1):void 0,symbol:J??void 0};O.some(ie=>ie.token.address===he.address)||O.push({token:he,value:{pre:H,post:z,diff:z-H}})}return{assetChanges:O,block:L,results:T}}async function oL(e,{address:t,message:r,factory:n,factoryData:s,signature:a,...o}){const i=w6(r);return se(e,Ni,"verifyHash")({address:t,factory:n,factoryData:s,hash:i,signature:a,...o})}async function iL(e,t){const{address:r,factory:n,factoryData:s,signature:a,message:o,primaryType:i,types:c,domain:l,...u}=t,d=RN({message:o,primaryType:i,types:c,domain:l});return se(e,Ni,"verifyHash")({address:r,factory:n,factoryData:s,hash:d,signature:a,...u})}function F6(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=ht(["watchBlockNumber",e.uid,t,r,o]);return Fn(d,{onBlockNumber:n,onError:s},f=>eo(async()=>{var m;try{const y=await se(e,Gi,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(y===c)return;if(y-c>1&&r)for(let g=c+1n;g<y;g++)f.onBlockNumber(g,c),c=g}(c===void 0||y>c)&&(f.onBlockNumber(y,c),c=y)}catch(y){(m=f.onError)==null||m.call(f,y)}},{emitOnBegin:t,interval:o}))})():(()=>{const d=ht(["watchBlockNumber",e.uid,t,r]);return Fn(d,{onBlockNumber:n,onError:s},f=>{let m=!0,y=()=>m=!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:E}=await g.subscribe({params:["newHeads"],onData(v){var A;if(!m)return;const w=Le((A=v.result)==null?void 0:A.number);f.onBlockNumber(w,c),c=w},onError(v){var w;(w=f.onError)==null||w.call(f,v)}});y=E,m||y()}catch(g){s==null||s(g)}})(),()=>y()})})()}async function U6(e,t){const{checkReplacement:r=!0,confirmations:n=1,hash:s,onReplaced:a,retryCount:o=6,retryDelay:i=({count:D})=>~~(1<<D)*200,timeout:c=18e4}=t,l=ht(["waitForTransactionReceipt",e.uid,s]),u=(()=>{var D;return t.pollingInterval?t.pollingInterval:(D=e.chain)!=null&&D.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let d,f,m,y=!1,g,E;const{promise:v,resolve:w,reject:A}=hf(),C=c?setTimeout(()=>{E==null||E(),g==null||g(),A(new b8({hash:s}))},c):void 0;return g=Fn(l,{onReplaced:a,resolve:w,reject:A},async D=>{if(m=await se(e,iu,"getTransactionReceipt")({hash:s}).catch(()=>{}),m&&n<=1){clearTimeout(C),D.resolve(m),g==null||g();return}E=se(e,F6,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:u,async onBlockNumber(L){const T=b=>{clearTimeout(C),E==null||E(),b(),g==null||g()};let h=L;if(!y)try{if(m){if(n>1&&(!m.blockNumber||h-m.blockNumber+1n<n))return;T(()=>D.resolve(m));return}if(r&&!d&&(y=!0,await nu(async()=>{d=await se(e,qf,"getTransaction")({hash:s}),d.blockNumber&&(h=d.blockNumber)},{delay:i,retryCount:o}),y=!1),m=await se(e,iu,"getTransactionReceipt")({hash:s}),n>1&&(!m.blockNumber||h-m.blockNumber+1n<n))return;T(()=>D.resolve(m))}catch(b){if(b instanceof P1||b instanceof I1){if(!d){y=!1;return}try{f=d,y=!0;const x=await nu(()=>se(e,Rr,"getBlock")({blockNumber:h,includeTransactions:!0}),{delay:i,retryCount:o,shouldRetry:({error:F})=>F instanceof Yg});y=!1;const S=x.transactions.find(({from:F,nonce:_})=>F===f.from&&_===f.nonce);if(!S||(m=await se(e,iu,"getTransactionReceipt")({hash:S.hash}),n>1&&(!m.blockNumber||h-m.blockNumber+1n<n)))return;let I="replaced";S.to===f.to&&S.value===f.value&&S.input===f.input?I="repriced":S.from===S.to&&S.value===0n&&(I="cancelled"),T(()=>{var F;(F=D.onReplaced)==null||F.call(D,{reason:I,replacedTransaction:f,transaction:S,transactionReceipt:m}),D.resolve(m)})}catch(x){T(()=>D.reject(x))}}else T(()=>D.reject(b))}}})}),v}function cL(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=ht(["watchBlocks",e.uid,t,r,n,u,c]);return Fn(y,{onBlock:s,onError:a},g=>eo(async()=>{var E;try{const v=await se(e,Rr,"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 A=await se(e,Rr,"getBlock")({blockNumber:w,includeTransactions:u});g.onBlock(A,d),d=A}}((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){(E=g.onError)==null||E.call(g,v)}},{emitOnBegin:n,interval:c}))})():(()=>{let y=!0,g=!0,E=()=>y=!1;return(async()=>{try{n&&se(e,Rr,"getBlock")({blockTag:t,includeTransactions:u}).then(A=>{y&&g&&(s(A,void 0),g=!1)}).catch(a);const v=(()=>{if(e.transport.type==="fallback"){const A=e.transport.transports.find(C=>C.config.type==="webSocket"||C.config.type==="ipc");return A?A.value:e.transport}return e.transport})(),{unsubscribe:w}=await v.subscribe({params:["newHeads"],async onData(A){var D;if(!y)return;const C=await se(e,Rr,"getBlock")({blockNumber:(D=A.result)==null?void 0:D.number,includeTransactions:u}).catch(()=>{});y&&(s(C,d),g=!1,d=C)},onError(A){a==null||a(A)}});E=w,y||E()}catch(v){a==null||a(v)}})(),()=>E()})()}function lL(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 f=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")),m=d??!1;return f?(()=>{const E=ht(["watchEvent",t,r,n,e.uid,s,u,o]);return Fn(E,{onLogs:c,onError:i},v=>{let w;o!==void 0&&(w=o-1n);let A,C=!1;const D=eo(async()=>{var L;if(!C){try{A=await se(e,h6,"createEventFilter")({address:t,args:r,event:s,events:a,strict:m,fromBlock:o})}catch{}C=!0;return}try{let T;if(A)T=await se(e,eu,"getFilterChanges")({filter:A});else{const h=await se(e,Gi,"getBlockNumber")({});w&&w!==h?T=await se(e,Df,"getLogs")({address:t,args:r,event:s,events:a,fromBlock:w+1n,toBlock:h}):T=[],w=h}if(T.length===0)return;if(n)v.onLogs(T);else for(const h of T)v.onLogs([h])}catch(T){A&&T instanceof is&&(C=!1),(L=v.onError)==null||L.call(v,T)}},{emitOnBegin:!0,interval:u});return async()=>{A&&await se(e,tu,"uninstallFilter")({filter:A}),D()}})})():(()=>{let E=!0,v=()=>E=!1;return(async()=>{try{const w=(()=>{if(e.transport.type==="fallback"){const L=e.transport.transports.find(T=>T.config.type==="webSocket"||T.config.type==="ipc");return L?L.value:e.transport}return e.transport})(),A=a??(s?[s]:void 0);let C=[];A&&(C=[A.flatMap(T=>Hi({abi:[T],eventName:T.name,args:r}))],s&&(C=C[0]));const{unsubscribe:D}=await w.subscribe({params:["logs",{address:t,topics:C}],onData(L){var h;if(!E)return;const T=L.result;try{const{eventName:b,args:x}=Jl({abi:A??[],data:T.data,topics:T.topics,strict:m}),S=Xr(T,{args:x,eventName:b});c([S])}catch(b){let x,S;if(b instanceof ol||b instanceof lp){if(d)return;x=b.abiItem.name,S=(h=b.abiItem.inputs)==null?void 0:h.some(F=>!("name"in F&&F.name))}const I=Xr(T,{args:S?[]:{},eventName:x});c([I])}},onError(L){i==null||i(L)}});v=D,E||v()}catch(w){i==null||i(w)}})(),()=>v()})()}function uL(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=ht(["watchPendingTransactions",e.uid,t,a]);return Fn(l,{onTransactions:n,onError:r},u=>{let d;const f=eo(async()=>{var m;try{if(!d)try{d=await se(e,b6,"createPendingTransactionFilter")({});return}catch(g){throw f(),g}const y=await se(e,eu,"getFilterChanges")({filter:d});if(y.length===0)return;if(t)u.onTransactions(y);else for(const g of y)u.onTransactions([g])}catch(y){(m=u.onError)==null||m.call(u,y)}},{emitOnBegin:!0,interval:a});return async()=>{d&&await se(e,tu,"uninstallFilter")({filter:d}),f()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:d}=await e.transport.subscribe({params:["newPendingTransactions"],onData(f){if(!l)return;const m=f.result;n([m])},onError(f){r==null||r(f)}});u=d,l||u()}catch(d){r==null||r(d)}})(),()=>u()})()}function dL(e){var d,f,m;const{scheme:t,statement:r,...n}=((d=e.match(pL))==null?void 0:d.groups)??{},{chainId:s,expirationTime:a,issuedAt:o,notBefore:i,requestId:c,...l}=((f=e.match(fL))==null?void 0:f.groups)??{},u=(m=e.split("Resources:")[1])==null?void 0:m.split(`
|
|
109
|
-
- `).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 pL=/^(?:(?<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)?/,fL=/(?: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 mL(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&&!Ja(n.address,t))return!1}catch{return!1}return!0}async function hL(e,t){const{address:r,domain:n,message:s,nonce:a,scheme:o,signature:i,time:c=new Date,...l}=t,u=dL(s);if(!u.address||!mL({address:r,domain:n,message:u,nonce:a,scheme:o,time:c}))return!1;const f=w6(s);return Ni(e,{address:u.address,hash:f,signature:i,...l})}async function Xf(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:n}){var i,c,l;const s=await e.request({method:"eth_sendRawTransactionSync",params:n?[t,q(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)||Hc)(s);if(o.status==="reverted"&&r)throw new B1({receipt:o});return o}function bL(e){return{call:t=>Mi(e,t),createAccessList:t=>m6(e,t),createBlockFilter:()=>dN(e),createContractEventFilter:t=>Wg(e,t),createEventFilter:t=>h6(e,t),createPendingTransactionFilter:()=>b6(e),estimateContractGas:t=>FM(e,t),estimateGas:t=>Uf(e,t),getBalance:t=>pN(e,t),getBlobBaseFee:()=>fN(e),getBlock:t=>Rr(e,t),getBlockNumber:t=>Gi(e,t),getBlockTransactionCount:t=>mN(e,t),getBytecode:t=>Gl(e,t),getChainId:()=>ls(e),getCode:t=>Gl(e,t),getContractEvents:t=>Qg(e,t),getEip712Domain:t=>bN(e,t),getEnsAddress:t=>KM(e,t),getEnsAvatar:t=>cN(e,t),getEnsName:t=>lN(e,t),getEnsResolver:t=>uN(e,t),getEnsText:t=>f6(e,t),getFeeHistory:t=>xN(e,t),estimateFeesPerGas:t=>BM(e,t),getFilterChanges:t=>eu(e,t),getFilterLogs:t=>wN(e,t),getGasPrice:()=>Sf(e),getLogs:t=>Df(e,t),getProof:t=>WN(e,t),estimateMaxPriorityFeePerGas:t=>IM(e,t),fillTransaction:t=>If(e,t),getStorageAt:t=>qN(e,t),getTransaction:t=>qf(e,t),getTransactionConfirmations:t=>YN(e,t),getTransactionCount:t=>Pf(e,t),getTransactionReceipt:t=>iu(e,t),multicall:t=>KN(e,t),prepareTransactionRequest:t=>$i(e,t),readContract:t=>zr(e,t),sendRawTransaction:t=>Nf(e,t),sendRawTransactionSync:t=>Xf(e,t),simulate:t=>Yf(e,t),simulateBlocks:t=>Yf(e,t),simulateCalls:t=>aL(e,t),simulateContract:t=>DM(e,t),verifyHash:t=>Ni(e,t),verifyMessage:t=>oL(e,t),verifySiweMessage:t=>hL(e,t),verifyTypedData:t=>iL(e,t),uninstallFilter:t=>tu(e,t),waitForTransactionReceipt:t=>U6(e,t),watchBlocks:t=>cL(e,t),watchBlockNumber:t=>F6(e,t),watchContractEvent:t=>HM(e,t),watchEvent:t=>lL(e,t),watchPendingTransactions:t=>uL(e,t)}}function yL(e){const{key:t="public",name:r="Public Client"}=e;return o6({...e,key:t,name:r,type:"publicClient"}).extend(bL)}async function gL(e,{chain:t}){const{id:r,name:n,nativeCurrency:s,rpcUrls:a,blockExplorers:o}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:q(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 xL(e,t){const{abi:r,args:n,bytecode:s,...a}=t,o=Vl({abi:r,args:n,bytecode:s});return ru(e,{...a,...a.authorizationList?{to:null}:{},data:o})}async function wL(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=>Ho(n))}async function vL(e,t={}){const{account:r=e.account,chainId:n}=t,s=r?Ke(r):void 0,a=n?[s==null?void 0:s.address,[q(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 EL(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function O6(e,t){var c;const{account:r=e.account,chainId:n,nonce:s}=t;if(!r)throw new En({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 se(e,ls,"getChainId")({})),typeof i.nonce>"u"&&(i.nonce=await se(e,Pf,"getTransactionCount")({address:a.address,blockTag:"pending"}),(o==="self"||o!=null&&o.address&&Ja(o.address,a.address))&&(i.nonce+=1)),i}async function kL(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(r=>Jd(r))}async function CL(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function TL(e,t){const{chain:r=e.chain}=t,n=t.timeout??Math.max(((r==null?void 0:r.blockTime)??0)*3,5e3),s=await r6(e,t);return await s6(e,{...t,id:s.id,timeout:n})}const Qf=new Da(128);async function D6(e,t){var D,L,T,h;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:f,nonce:m,pollingInterval:y,throwOnReceiptRevert:g,type:E,value:v,...w}=t,A=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof r>"u")throw new En({docsPath:"/docs/actions/wallet/sendTransactionSync"});const C=r?Ke(r):null;try{en(t);const b=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await Wl({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 se(e,ls,"getChainId")({}),cp({currentChainId:x,chain:n}));const S=(T=(L=(D=e.chain)==null?void 0:D.formatters)==null?void 0:L.transactionRequest)==null?void 0:T.format,F=(S||_r)({...Ws(w,{format:S}),accessList:s,account:C,authorizationList:a,blobs:o,chainId:x,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,to:b,type:E,value:v},"sendTransaction"),_=Qf.get(e.uid),k=_?"wallet_sendTransaction":"eth_sendTransaction",P=await(async()=>{try{return await e.request({method:k,params:[F]},{retryCount:0})}catch(U){if(_===!1)throw U;const z=U;if(z.name==="InvalidInputRpcError"||z.name==="InvalidParamsRpcError"||z.name==="MethodNotFoundRpcError"||z.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[F]},{retryCount:0}).then(H=>(Qf.set(e.uid,!0),H)).catch(H=>{const G=H;throw G.name==="MethodNotFoundRpcError"||G.name==="MethodNotSupportedRpcError"?(Qf.set(e.uid,!1),z):G});throw z}})(),O=await se(e,U6,"waitForTransactionReceipt")({checkReplacement:!1,hash:P,pollingInterval:y,timeout:A});if(g&&O.status==="reverted")throw new B1({receipt:O});return O}if((C==null?void 0:C.type)==="local"){const x=await se(e,$i,"prepareTransactionRequest")({account:C,accessList:s,authorizationList:a,blobs:o,chain:n,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,nonceManager:C.nonceManager,parameters:[...Bf,"sidecars"],type:E,value:v,...w,to:b}),S=(h=n==null?void 0:n.serializers)==null?void 0:h.transaction,I=await C.signTransaction(x,{serializer:S});return await se(e,Xf,"sendRawTransactionSync")({serializedTransaction:I,throwOnReceiptRevert:g})}throw(C==null?void 0:C.type)==="smart"?new Hs({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Hs({docsPath:"/docs/actions/wallet/sendTransactionSync",type:C==null?void 0:C.type})}catch(b){throw b instanceof Hs?b:Ql(b,{...t,account:C,chain:t.chain||void 0})}}async function SL(e,t){const{id:r}=t;await e.request({method:"wallet_showCallsStatus",params:[r]})}async function AL(e,t){const{account:r=e.account}=t;if(!r)throw new En({docsPath:"/docs/eip7702/signAuthorization"});const n=Ke(r);if(!n.signAuthorization)throw new Hs({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const s=await O6(e,t);return n.signAuthorization(s)}async function PL(e,{account:t=e.account,message:r}){if(!t)throw new En({docsPath:"/docs/actions/wallet/signMessage"});const n=Ke(t);if(n.signMessage)return n.signMessage({message:r});const s=typeof r=="string"?Sa(r):r.raw instanceof Uint8Array?Fe(r.raw):r.raw;return e.request({method:"personal_sign",params:[s,n.address]},{retryCount:0})}async function IL(e,t){var l,u,d,f;const{account:r=e.account,chain:n=e.chain,...s}=t;if(!r)throw new En({docsPath:"/docs/actions/wallet/signTransaction"});const a=Ke(r);en({account:a,...t});const o=await se(e,ls,"getChainId")({});n!==null&&cp({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)||_r;return a.signTransaction?a.signTransaction({...s,chainId:o},{serializer:(f=(d=e.chain)==null?void 0:d.serializers)==null?void 0:f.transaction}):await e.request({method:"eth_signTransaction",params:[{...c({...s,account:a},"signTransaction"),chainId:q(o),from:a.address}]},{retryCount:0})}async function BL(e,t){const{account:r=e.account,domain:n,message:s,primaryType:a}=t;if(!r)throw new En({docsPath:"/docs/actions/wallet/signTypedData"});const o=Ke(r),i={EIP712Domain:E6({domain:n}),...t.types};if(v6({domain:n,message:s,primaryType:a,types:i}),o.signTypedData)return o.signTypedData({domain:n,message:s,primaryType:a,types:i});const c=LN({domain:n,message:s,primaryType:a,types:i});return e.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function FL(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:q(t)}]},{retryCount:0})}async function UL(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function OL(e,t){return ji.internal(e,D6,"sendTransactionSync",t)}function DL(e){return{addChain:t=>gL(e,t),deployContract:t=>xL(e,t),fillTransaction:t=>If(e,t),getAddresses:()=>wL(e),getCallsStatus:t=>n6(e,t),getCapabilities:t=>vL(e,t),getChainId:()=>ls(e),getPermissions:()=>EL(e),prepareAuthorization:t=>O6(e,t),prepareTransactionRequest:t=>$i(e,t),requestAddresses:()=>kL(e),requestPermissions:t=>CL(e,t),sendCalls:t=>r6(e,t),sendCallsSync:t=>TL(e,t),sendRawTransaction:t=>Nf(e,t),sendRawTransactionSync:t=>Xf(e,t),sendTransaction:t=>ru(e,t),sendTransactionSync:t=>D6(e,t),showCallsStatus:t=>SL(e,t),signAuthorization:t=>AL(e,t),signMessage:t=>PL(e,t),signTransaction:t=>IL(e,t),signTypedData:t=>BL(e,t),switchChain:t=>FL(e,t),waitForCallsStatus:t=>s6(e,t),watchAsset:t=>UL(e,t),writeContract:t=>ji(e,t),writeContractSync:t=>OL(e,t)}}function _L(e){const{key:t="wallet",name:r="Wallet Client",transport:n}=e;return o6({...e,key:t,name:r,transport:n,type:"walletClient"}).extend(DL)}function _6({key:e,methods:t,name:r,request:n,retryCount:s=3,retryDelay:a=150,timeout:o,type:i},c){const l=a6();return{config:{key:e,methods:t,name:r,request:n,retryCount:s,retryDelay:a,timeout:o,type:i},request:EN(n,{methods:t,retryCount:s,retryDelay:a,uid:l}),value:c}}function ML(e,t={}){const{key:r="custom",methods:n,name:s="Custom Provider",retryDelay:a}=t;return({retryCount:o})=>_6({key:r,methods:n,name:s,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:a,type:"custom"})}class NL 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 LL(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:f,retryCount:m,timeout:y})=>{const{batchSize:g=1e3,wait:E=0}=typeof r=="object"?r:{},v=t.retryCount??m,w=y??t.timeout??1e4,A=f==null?void 0:f.rpcUrls.default.http[0];if(!A)throw new NL;const C=UN(A,{fetchFn:n,fetchOptions:s,onRequest:c,onResponse:l,timeout:w});return _6({key:a,methods:o,name:i,async request({method:D,params:L}){const T={method:D,params:L},{schedule:h}=Tg({id:A,wait:E,shouldSplitBatch(I){return I.length>g},fn:I=>C.request({body:I}),sort:(I,F)=>I.id-F.id}),b=async I=>r?h(I):[await C.request({body:I})],[{error:x,result:S}]=await b(T);if(d)return{error:x,result:S};if(x)throw new vp({body:T,error:x,url:A});return S},retryCount:v,retryDelay:u,timeout:w,type:"http"},{fetchOptions:s,url:A})}}function zL(e){const{r:t,s:r}=Fi.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:q(t,{size:32}),s:q(r,{size:32}),v:s,yParity:a}:{r:q(t,{size:32}),s:q(r,{size:32}),yParity:a}}const RL=(e,t)=>{const r=Object.values(CM).find(o=>o.id===e);if(!r)return{walletClient:void 0,publicClient:void 0};const n=t?ML(t):void 0,s=n?_L({chain:r,transport:n}):void 0,a=yL({chain:r,transport:n||LL()});return{walletClient:s,publicClient:a}},HL=()=>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 $L({children:e}){return B.jsx(d3,{FallbackComponent:HL,onError:t=>dt.onCrash(t),children:B.jsx(B.Fragment,{children:e})})}const Jf=M.createContext({}),GL=new Zw({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),jL=e=>{var n,s,a;const t=Z(o=>o.updateState),r=Z(o=>o.state.isMarketOrder);return M.useEffect(()=>{setInterval(()=>{t({currentTime:Date.now()})},6e4)},[t]),M.useEffect(()=>{var o,i,c,l,u,d,f,m,y,g,E,v;t({isMarketOrder:e.module!==ge.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:(m=(f=e.overrides)==null?void 0:f.state)==null?void 0:m.duration,typedLimitPrice:(g=(y=e.overrides)==null?void 0:y.state)==null?void 0:g.limitPrice,typedTriggerPrice:(v=(E=e.overrides)==null?void 0:E.state)==null?void 0:v.triggerPrice,triggerPricePercent:void 0,limitPricePercent:void 0})},[(n=e.overrides)==null?void 0:n.state,e.module]),M.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]),M.useEffect(()=>{e.module===ge.LIMIT&&t({isMarketOrder:!1})},[e.module]),M.useEffect(()=>{r&&t({isInvertedTrade:!1})},[r]),null},VL=({marketReferencePrice:e,srcToken:t,dstToken:r,chainId:n})=>{const s=Z(a=>a.state.typedSrcAmount);return M.useMemo(()=>{if(Ad(t,r,n)||Pd(t,r,n))return{isLoading:!1,noLiquidity:!1,value:Pc((t==null?void 0:t.decimals)||18,s||"0")};if(j(e.value||0).isZero()||j(s||0).isZero())return e;const a=j(e.value||0).dividedBy(s||0).toFixed();return{...e,value:a}},[e,s,t,r,n])},WL=e=>{const t=Fo(Uc.MIN_CHUNK_SIZE_USD);return t?parseInt(t):e},qL=e=>{const t=Z(l=>l.state.acceptedMarketPrice),{walletClient:r,publicClient:n}=M.useMemo(()=>RL(e.chainId,e.provider),[e.chainId,e.provider]),s=M.useMemo(()=>zm(e.partner),[e.partner]),a=M.useMemo(()=>{const l=s[0];return e.chainId&&s.includes(e.chainId)?e.chainId:l},[e.chainId,s]),o=M.useMemo(()=>cd(e.partner,a),[e.partner,a]),i=VL(e),c=M.useMemo(()=>WL(e.minChunkSizeUsd),[e.minChunkSizeUsd]);return M.useEffect(()=>{dt.init(o,c,a)},[o,a,c]),B.jsxs(Jf.Provider,{value:{minChunkSizeUsd:c,account:e.account,walletClient:r,publicClient:n,marketPrice:t||i.value,marketPriceLoading:!t&&i.isLoading,noLiquidity:!t&&i.noLiquidity,config:o,slippage:e.priceProtection,supportedChains:s,chainId:a,partner:e.partner,module:e.module,fees:e.fees||0,components:e.components,overrides:e.overrides,callbacks:e.callbacks,getTranslation:e.getTranslation,translations:e.translations,useToken:e.useToken,refetchBalances:e.refetchBalances,srcUsd1Token:e.srcUsd1Token,dstUsd1Token:e.dstUsd1Token,srcBalance:e.srcBalance,dstBalance:e.dstBalance,srcToken:e.srcToken,dstToken:e.dstToken},children:[B.jsx(jL,{...e}),B.jsx($L,{children:e.children})]})},YL=e=>B.jsx(Xw,{client:GL,children:B.jsx(qL,{...e})}),ne=()=>{if(!Jf)throw new Error("useSpotContext must be used within a WidgetProvider");return M.useContext(Jf)},KL=2e4,ZL=[{text:"Minutes",value:Gt.Minutes},{text:"Hours",value:Gt.Hours},{text:"Days",value:Gt.Days}],XL="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 e0={},QL=[{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/"}],t0={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},r0=M.createContext&&M.createContext(t0),us=function(){return us=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},us.apply(this,arguments)},JL=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 M.createElement(t.tag,us({key:r},t.attr),M6(t.child))})}function ez(e){return function(t){return M.createElement(N6,us({attr:us({},e.attr)},t),M6(e.child))}}function N6(e){var t=function(r){var n=e.attr,s=e.size,a=e.title,o=JL(e,["attr","size","title"]),i=s||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),M.createElement("svg",us({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:c,style:us(us({color:e.color||r.color},r.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),a&&M.createElement("title",null,a),e.children)};return r0!==void 0?M.createElement(r0.Consumer,null,function(r){return t(r)}):t(t0)}const uu=tw(Object.freeze(Object.defineProperty({__proto__:null,DefaultContext:t0,GenIcon:ez,IconBase:N6,IconContext:r0,IconsManifest:QL},Symbol.toStringTag,{value:"Module"})));var L6;function tz(){if(L6)return e0;L6=1;var e=uu.GenIcon;return e0.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)},e0}var rz=tz(),n0={},z6;function nz(){if(z6)return n0;z6=1;var e=uu.GenIcon;return n0.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)},n0}var sz=nz();//! moment.js
|
|
105
|
+
`);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 iy(this,t)}}Object.defineProperty(oe,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${lF()}`}}),oe.setStaticOptions(oe.defaultStaticOptions);function iy(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?iy(e.cause,t):t?null:e}function Ya(e,t){if(Ka(e)>t)throw new DF({givenSize:Ka(e),maxSize:t})}const An={zero:48,nine:57,A:65,F:70,a:97,f:102};function cy(e){if(e>=An.zero&&e<=An.nine)return e-An.zero;if(e>=An.A&&e<=An.F)return e-(An.A-10);if(e>=An.a&&e<=An.f)return e-(An.a-10)}function uF(e,t={}){const{dir:r,size:n=32}=t;if(n===0)return e;if(e.length>n)throw new _F({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 ly(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 Fl(e,t){if(bt(e)>t)throw new xF({givenSize:bt(e),maxSize:t})}function dF(e,t){if(typeof t=="number"&&t>0&&t>bt(e)-1)throw new yy({offset:t,position:"start",size:bt(e)})}function pF(e,t,r){if(typeof t=="number"&&typeof r=="number"&&bt(e)!==r-t)throw new yy({offset:r,position:"end",size:bt(e)})}function uy(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 wF({size:Math.ceil(s.length/2),targetSize:n,type:"Hex"});return`0x${s[r==="right"?"padEnd":"padStart"](n*2,"0")}`}function fF(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 mF="#__bigint";function Ai(e,t,r){return JSON.stringify(e,(n,s)=>typeof s=="bigint"?s.toString()+mF:s,r)}const hF=new TextEncoder,bF=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function yF(e,t={}){const{strict:r=!1}=t;if(!e)throw new hy(e);if(typeof e!="string")throw new hy(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new by(e);if(!e.startsWith("0x"))throw new by(e)}function pt(...e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function Ul(e){return e instanceof Uint8Array?Pt(e):Array.isArray(e)?Pt(new Uint8Array(e)):e}function dy(e,t={}){const r=`0x${Number(e)}`;return typeof t.size=="number"?(Fl(r,t.size),Ys(r,t.size)):r}function Pt(e,t={}){let r="";for(let s=0;s<e.length;s++)r+=bF[e[s]];const n=`0x${r}`;return typeof t.size=="number"?(Fl(n,t.size),Ks(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 my({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?Ys(c,n):c}function Pi(e,t={}){return Pt(hF.encode(e),t)}function Ys(e,t){return uy(e,{dir:"left",size:t})}function Ks(e,t){return uy(e,{dir:"right",size:t})}function py(e){return Pt(AF(e))}function Pe(e,t,r,n={}){const{strict:s}=n;dF(e,t);const a=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return s&&pF(a,t,r),a}function bt(e){return Math.ceil((e.length-2)/2)}function Fp(e){return fF(e,{dir:"left"})}function yt(e,t={}){const{signed:r}=t;t.size&&Fl(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 Ii(e,t={}){const{signed:r,size:n}=t;return Number(!r&&!n?e:yt(e,t))}function fy(e,t={}){const{size:r}=t;let n=cs(e);return r&&(Ya(n,r),n=wy(n)),new TextDecoder().decode(n)}function Nr(e,t={}){const{strict:r=!1}=t;try{return yF(e,{strict:r}),!0}catch{return!1}}class my extends oe{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 hy extends oe{constructor(t){super(`Value \`${typeof t=="object"?Ai(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 by extends oe{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 gF extends oe{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"})}}let xF=class extends oe{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 yy extends oe{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"})}}let wF=class extends oe{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"})}};const vF=new TextDecoder,EF=new TextEncoder;function kF(e){if(!(e instanceof Uint8Array)){if(!e)throw new Ol(e);if(typeof e!="object")throw new Ol(e);if(!("BYTES_PER_ELEMENT"in e))throw new Ol(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new Ol(e)}}function CF(...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 Up(e){return e instanceof Uint8Array?e:typeof e=="string"?cs(e):TF(e)}function TF(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function cs(e,t={}){const{size:r}=t;let n=e;r&&(Fl(e,r),n=Ks(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=cy(s.charCodeAt(c++)),u=cy(s.charCodeAt(c++));if(l===void 0||u===void 0)throw new oe(`Invalid byte sequence ("${s[c-2]}${s[c-1]}" in "${s}").`);o[i]=l<<4|u}return o}function gy(e,t={}){const{size:r}=t,n=EF.encode(e);return typeof r=="number"?(Ya(n,r),SF(n,r)):n}function SF(e,t){return uF(e,{dir:"right",size:t})}function AF(e){return crypto.getRandomValues(new Uint8Array(e))}function Ka(e){return e.length}function PF(e,t,r,n={}){const{strict:s}=n;return e.slice(t,r)}function IF(e,t={}){const{size:r}=t;typeof r<"u"&&Ya(e,r);const n=Pt(e,t);return yt(n,t)}function BF(e,t={}){const{size:r}=t;let n=e;if(typeof r<"u"&&(Ya(n,r),n=xy(n)),n.length>1||n[0]>1)throw new OF(n);return!!n[0]}function Pn(e,t={}){const{size:r}=t;typeof r<"u"&&Ya(e,r);const n=Pt(e,t);return Ii(n,t)}function FF(e,t={}){const{size:r}=t;let n=e;return typeof r<"u"&&(Ya(n,r),n=wy(n)),vF.decode(n)}function xy(e){return ly(e,{dir:"left"})}function wy(e){return ly(e,{dir:"right"})}function UF(e){try{return kF(e),!0}catch{return!1}}class OF extends oe{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 Ol extends oe{constructor(t){super(`Value \`${typeof t=="object"?Ai(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"})}}class DF extends oe{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"})}}class _F extends oe{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"})}}class MF 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 Op={checksum:new MF(8192)}.checksum;function Bi(e,t={}){const{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=nb(Up(e));return r==="Bytes"?n:Pt(n)}function NF(e,t={}){const{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=R1(Up(e));return r==="Bytes"?n:Pt(n)}function LF(e){return Nr(e)&&bt(e)===32}function vy(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 ky({prefix:n,cause:new jF});return}if(r===!0||typeof s=="bigint"&&typeof a>"u"){if(n!==3&&n!==2)throw new ky({prefix:n,cause:new GF});return}throw new $F({publicKey:e})}function zF(e){const t=(()=>{if(Nr(e))return Ey(e);if(UF(e))return RF(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 vy(t),t}function RF(e){return Ey(Pt(e))}function Ey(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new VF({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 HF(e,t={}){return cs(Dp(e,t))}function Dp(e,t={}){vy(e);const{prefix:r,x:n,y:s}=e,{includePrefix:a=!0}=t;return pt(a?X(r,{size:1}):"0x",X(n,{size:32}),typeof s=="bigint"?X(s,{size:32}):"0x")}class $F extends oe{constructor({publicKey:t}){super(`Value \`${Ai(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 ky extends oe{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 GF extends oe{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 jF extends oe{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let VF=class extends oe{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 ${bt(Ul(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const WF=/^0x[a-fA-F0-9]{40}$/;function Lr(e,t={}){const{strict:r=!0}=t;if(!WF.test(e))throw new Cy({address:e,cause:new YF});if(r){if(e.toLowerCase()===e)return;if(_p(e)!==e)throw new Cy({address:e,cause:new KF})}}function _p(e){if(Op.has(e))return Op.get(e);Lr(e,{strict:!1});const t=e.substring(2).toLowerCase(),r=Bi(gy(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 Op.set(e,s),s}function qF(e,t={}){const{checksum:r=!1}=t;return Lr(e),r?_p(e):e}function Dl(e,t={}){const r=Bi(`0x${Dp(e).slice(4)}`).substring(26);return qF(`0x${r}`,t)}function Mp(e,t){return Lr(e,{strict:!1}),Lr(t,{strict:!1}),e.toLowerCase()===t.toLowerCase()}function _l(e,t={}){const{strict:r=!0}=t??{};try{return Lr(e,{strict:r}),!0}catch{return!1}}class Cy extends oe{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 YF extends oe{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 KF extends oe{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const er=BigInt(0),Vt=BigInt(1),Zs=BigInt(2),ZF=BigInt(3),Ty=BigInt(4),Sy=BigInt(5),Ay=BigInt(8);function tr(e,t){const r=e%t;return r>=er?r:t+r}function Cr(e,t,r){let n=e;for(;t-- >er;)n*=n,n%=r;return n}function Np(e,t){if(e===er)throw new Error("invert: expected non-zero number");if(t<=er)throw new Error("invert: expected positive modulus, got "+t);let r=tr(e,t),n=t,s=er,a=Vt;for(;r!==er;){const i=n/r,c=n%r,l=s-a*i;n=r,r=c,s=a,a=l}if(n!==Vt)throw new Error("invert: does not exist");return tr(s,t)}function Py(e,t){const r=(e.ORDER+Vt)/Ty,n=e.pow(t,r);if(!e.eql(e.sqr(n),t))throw new Error("Cannot find square root");return n}function XF(e,t){const r=(e.ORDER-Sy)/Ay,n=e.mul(t,Zs),s=e.pow(n,r),a=e.mul(t,s),o=e.mul(e.mul(a,Zs),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 QF(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-Vt,r=0;for(;t%Zs===er;)t/=Zs,r++;let n=Zs;const s=Za(e);for(;By(s,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return Py;let a=s.pow(n,t);const o=(t+Vt)/Zs;return function(c,l){if(c.is0(l))return l;if(By(c,l)!==1)throw new Error("Cannot find square root");let u=r,d=c.mul(c.ONE,a),f=c.pow(l,t),m=c.pow(l,o);for(;!c.eql(f,c.ONE);){if(c.is0(f))return c.ZERO;let y=1,g=c.sqr(f);for(;!c.eql(g,c.ONE);)if(y++,g=c.sqr(g),y===u)throw new Error("Cannot find square root");const E=Vt<<BigInt(u-y-1),v=c.pow(d,E);u=y,d=c.sqr(v),f=c.mul(f,d),m=c.mul(m,v)}return m}}function JF(e){return e%Ty===ZF?Py:e%Ay===Sy?XF:QF(e)}const eU=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function tU(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=eU.reduce((n,s)=>(n[s]="function",n),t);return Bl(e,r)}function rU(e,t,r){if(r<er)throw new Error("invalid exponent, negatives unsupported");if(r===er)return e.ONE;if(r===Vt)return t;let n=e.ONE,s=t;for(;r>er;)r&Vt&&(n=e.mul(n,s)),s=e.sqr(s),r>>=Vt;return n}function Iy(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 By(e,t){const r=(e.ORDER-Vt)/Zs,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 Fy(e,t){t!==void 0&&Lo(t);const r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Za(e,t,r=!1,n={}){if(e<=er)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:s,nByteLength:a}=Fy(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:Il(s),ZERO:er,ONE:Vt,create:c=>tr(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return er<=c&&c<e},is0:c=>c===er,isOdd:c=>(c&Vt)===Vt,neg:c=>tr(-c,e),eql:(c,l)=>c===l,sqr:c=>tr(c*c,e),add:(c,l)=>tr(c+l,e),sub:(c,l)=>tr(c-l,e),mul:(c,l)=>tr(c*l,e),pow:(c,l)=>rU(i,c,l),div:(c,l)=>tr(c*Np(l,e),e),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Np(c,e),sqrt:n.sqrt||(c=>(o||(o=JF(e)),o(i,c))),toBytes:c=>r?sy(c,a):Si(c,a),fromBytes:c=>{if(c.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+c.length);return r?ny(c):qs(c)},invertBatch:c=>Iy(i,c),cmov:(c,l,u)=>u?l:c});return Object.freeze(i)}function Uy(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 Oy(e){const t=Uy(e);return t+Math.ceil(t/2)}function nU(e,t,r=!1){const n=e.length,s=Uy(t),a=Oy(t);if(n<16||n<a||n>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+n);const o=r?ny(e):qs(e),i=tr(o,t-Vt)+Vt;return r?sy(i,s):Si(i,s)}class Dy extends zd{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,x8(t);const n=$c(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),es(a)}update(t){return Pa(this),this.iHash.update(t),this}digestInto(t){Pa(this),zs(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 _y=(e,t,r)=>new Dy(e,t).update(r).digest();_y.create=(e,t)=>new Dy(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const My=BigInt(0),Lp=BigInt(1);function zp(e,t){const r=t.negate();return e?r:t}function Ny(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Rp(e,t){Ny(e,t);const r=Math.ceil(t/e)+1,n=2**(e-1),s=2**e,a=Il(e),o=BigInt(e);return{windows:r,windowSize:n,mask:a,maxNumber:s,shiftBy:o}}function Ly(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+=Lp);const l=t*n,u=l+Math.abs(i)-1,d=i===0,f=i<0,m=t%2!==0;return{nextN:c,offset:u,isZero:d,isNeg:f,isNegF:m,offsetF:l}}function sU(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 aU(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 Hp=new WeakMap,zy=new WeakMap;function $p(e){return zy.get(e)||1}function oU(e,t){return{constTimeNegate:zp,hasPrecomputes(r){return $p(r)!==1},unsafeLadder(r,n,s=e.ZERO){let a=r;for(;n>My;)n&Lp&&(s=s.add(a)),a=a.double(),n>>=Lp;return s},precomputeWindow(r,n){const{windows:s,windowSize:a}=Rp(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=Rp(r,t);for(let c=0;c<i.windows;c++){const{nextN:l,offset:u,isZero:d,isNeg:f,isNegF:m,offsetF:y}=Ly(s,c,i);s=l,d?o=o.add(zp(m,n[y])):a=a.add(zp(f,n[u]))}return{p:a,f:o}},wNAFUnsafe(r,n,s,a=e.ZERO){const o=Rp(r,t);for(let i=0;i<o.windows&&s!==My;i++){const{nextN:c,offset:l,isZero:u,isNeg:d}=Ly(s,i,o);if(s=c,!u){const f=n[l];a=a.add(d?f.negate():f)}}return a},getPrecomputes(r,n,s){let a=Hp.get(n);return a||(a=this.precomputeWindow(n,r),r!==1&&Hp.set(n,s(a))),a},wNAFCached(r,n,s){const a=$p(r);return this.wNAF(a,this.getPrecomputes(a,r,s),n)},wNAFCachedUnsafe(r,n,s,a){const o=$p(r);return o===1?this.unsafeLadder(r,n,a):this.wNAFUnsafe(o,this.getPrecomputes(o,r,s),n,a)},setWindowSize(r,n){Ny(n,t),zy.set(r,n),Hp.delete(r)}}}function iU(e,t,r,n){sU(r,e),aU(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=aF(BigInt(s));let c=1;i>12?c=i-3:i>4?c=i-2:i>0&&(c=2);const l=Il(c),u=new Array(Number(l)+1).fill(o),d=Math.floor((t.BITS-1)/c)*c;let f=o;for(let m=d;m>=0;m-=c){u.fill(o);for(let g=0;g<a;g++){const E=n[g],v=Number(E>>BigInt(m)&l);u[v]=u[v].add(r[g])}let y=o;for(let g=u.length-1,E=o;g>0;g--)E=E.add(u[g]),y=y.add(E);if(f=f.add(y),m!==0)for(let g=0;g<c;g++)f=f.double()}return f}function Ry(e){return tU(e.Fp),Bl(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Fy(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Hy(e){e.lowS!==void 0&&Ci("lowS",e.lowS),e.prehash!==void 0&&Ci("prehash",e.prehash)}function cU(e){const t=Ry(e);Bl(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 lU extends Error{constructor(t=""){super(t)}}const In={Err:lU,_tlv:{encode:(e,t)=>{const{Err:r}=In;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=Sl(n);if(s.length/2&128)throw new r("tlv.encode: long form length too big");const a=n>127?Sl(s.length/2|128):"";return Sl(e)+a+s+t},decode(e,t){const{Err:r}=In;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}=In;if(e<Bn)throw new t("integer: negative integers are not allowed");let r=Sl(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}=In;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 qs(e)}},toSig(e){const{Err:t,_int:r,_tlv:n}=In,s=kr("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}=In,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 Gp(e,t){return Ti(Si(e,t))}const Bn=BigInt(0),It=BigInt(1);BigInt(2);const jp=BigInt(3),uU=BigInt(4);function dU(e){const t=cU(e),{Fp:r}=t,n=Za(t.n,t.nBitLength),s=t.toBytes||((A,C,D)=>{const L=C.toAffine();return Pl(Uint8Array.from([4]),r.toBytes(L.x),r.toBytes(L.y))}),a=t.fromBytes||(A=>{const C=A.subarray(1),D=r.fromBytes(C.subarray(0,r.BYTES)),L=r.fromBytes(C.subarray(r.BYTES,2*r.BYTES));return{x:D,y:L}});function o(A){const{a:C,b:D}=t,L=r.sqr(A),T=r.mul(L,A);return r.add(r.add(T,r.mul(A,C)),D)}function i(A,C){const D=r.sqr(C),L=o(A);return r.eql(D,L)}if(!i(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=r.mul(r.pow(t.a,jp),uU),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(A){return Ip(A,It,t.n)}function d(A){const{allowedPrivateKeyLengths:C,nByteLength:D,wrapPrivateKey:L,n:T}=t;if(C&&typeof A!="bigint"){if(ki(A)&&(A=Ti(A)),typeof A!="string"||!C.includes(A.length))throw new Error("invalid private key");A=A.padStart(D*2,"0")}let h;try{h=typeof A=="bigint"?A:qs(kr("private key",A,D))}catch{throw new Error("invalid private key, expected hex or "+D+" bytes, got "+typeof A)}return L&&(h=tr(h,T)),qa("private key",h,It,T),h}function f(A){if(!(A instanceof g))throw new Error("ProjectivePoint expected")}const m=oy((A,C)=>{const{px:D,py:L,pz:T}=A;if(r.eql(T,r.ONE))return{x:D,y:L};const h=A.is0();C==null&&(C=h?r.ONE:r.inv(T));const b=r.mul(D,C),x=r.mul(L,C),S=r.mul(T,C);if(h)return{x:r.ZERO,y:r.ZERO};if(!r.eql(S,r.ONE))throw new Error("invZ was invalid");return{x:b,y:x}}),y=oy(A=>{if(A.is0()){if(t.allowInfinityPoint&&!r.is0(A.py))return;throw new Error("bad point: ZERO")}const{x:C,y:D}=A.toAffine();if(!r.isValid(C)||!r.isValid(D))throw new Error("bad point: x or y not FE");if(!i(C,D))throw new Error("bad point: equation left != right");if(!A.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class g{constructor(C,D,L){if(C==null||!r.isValid(C))throw new Error("x required");if(D==null||!r.isValid(D)||r.is0(D))throw new Error("y required");if(L==null||!r.isValid(L))throw new Error("z required");this.px=C,this.py=D,this.pz=L,Object.freeze(this)}static fromAffine(C){const{x:D,y:L}=C||{};if(!C||!r.isValid(D)||!r.isValid(L))throw new Error("invalid affine point");if(C instanceof g)throw new Error("projective point not allowed");const T=h=>r.eql(h,r.ZERO);return T(D)&&T(L)?g.ZERO:new g(D,L,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(C){const D=Iy(r,C.map(L=>L.pz));return C.map((L,T)=>L.toAffine(D[T])).map(g.fromAffine)}static fromHex(C){const D=g.fromAffine(a(kr("pointHex",C)));return D.assertValidity(),D}static fromPrivateKey(C){return g.BASE.multiply(d(C))}static msm(C,D){return iU(g,n,C,D)}_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){f(C);const{px:D,py:L,pz:T}=this,{px:h,py:b,pz:x}=C,S=r.eql(r.mul(D,x),r.mul(h,T)),I=r.eql(r.mul(L,x),r.mul(b,T));return S&&I}negate(){return new g(this.px,r.neg(this.py),this.pz)}double(){const{a:C,b:D}=t,L=r.mul(D,jp),{px:T,py:h,pz:b}=this;let x=r.ZERO,S=r.ZERO,I=r.ZERO,F=r.mul(T,T),_=r.mul(h,h),k=r.mul(b,b),P=r.mul(T,h);return P=r.add(P,P),I=r.mul(T,b),I=r.add(I,I),x=r.mul(C,I),S=r.mul(L,k),S=r.add(x,S),x=r.sub(_,S),S=r.add(_,S),S=r.mul(x,S),x=r.mul(P,x),I=r.mul(L,I),k=r.mul(C,k),P=r.sub(F,k),P=r.mul(C,P),P=r.add(P,I),I=r.add(F,F),F=r.add(I,F),F=r.add(F,k),F=r.mul(F,P),S=r.add(S,F),k=r.mul(h,b),k=r.add(k,k),F=r.mul(k,P),x=r.sub(x,F),I=r.mul(k,_),I=r.add(I,I),I=r.add(I,I),new g(x,S,I)}add(C){f(C);const{px:D,py:L,pz:T}=this,{px:h,py:b,pz:x}=C;let S=r.ZERO,I=r.ZERO,F=r.ZERO;const _=t.a,k=r.mul(t.b,jp);let P=r.mul(D,h),O=r.mul(L,b),U=r.mul(T,x),z=r.add(D,L),H=r.add(h,b);z=r.mul(z,H),H=r.add(P,O),z=r.sub(z,H),H=r.add(D,T);let G=r.add(h,x);return H=r.mul(H,G),G=r.add(P,U),H=r.sub(H,G),G=r.add(L,T),S=r.add(b,x),G=r.mul(G,S),S=r.add(O,U),G=r.sub(G,S),F=r.mul(_,H),S=r.mul(k,U),F=r.add(S,F),S=r.sub(O,F),F=r.add(O,F),I=r.mul(S,F),O=r.add(P,P),O=r.add(O,P),U=r.mul(_,U),H=r.mul(k,H),O=r.add(O,U),U=r.sub(P,U),U=r.mul(_,U),H=r.add(H,U),P=r.mul(O,H),I=r.add(I,P),P=r.mul(G,H),S=r.mul(z,S),S=r.sub(S,P),P=r.mul(z,O),F=r.mul(G,F),F=r.add(F,P),new g(S,I,F)}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:D,n:L}=t;qa("scalar",C,Bn,L);const T=g.ZERO;if(C===Bn)return T;if(this.is0()||C===It)return this;if(!D||w.hasPrecomputes(this))return w.wNAFCachedUnsafe(this,C,g.normalizeZ);let{k1neg:h,k1:b,k2neg:x,k2:S}=D.splitScalar(C),I=T,F=T,_=this;for(;b>Bn||S>Bn;)b&It&&(I=I.add(_)),S&It&&(F=F.add(_)),_=_.double(),b>>=It,S>>=It;return h&&(I=I.negate()),x&&(F=F.negate()),F=new g(r.mul(F.px,D.beta),F.py,F.pz),I.add(F)}multiply(C){const{endo:D,n:L}=t;qa("scalar",C,It,L);let T,h;if(D){const{k1neg:b,k1:x,k2neg:S,k2:I}=D.splitScalar(C);let{p:F,f:_}=this.wNAF(x),{p:k,f:P}=this.wNAF(I);F=w.constTimeNegate(b,F),k=w.constTimeNegate(S,k),k=new g(r.mul(k.px,D.beta),k.py,k.pz),T=F.add(k),h=_.add(P)}else{const{p:b,f:x}=this.wNAF(C);T=b,h=x}return g.normalizeZ([T,h])[0]}multiplyAndAddUnsafe(C,D,L){const T=g.BASE,h=(x,S)=>S===Bn||S===It||!x.equals(T)?x.multiplyUnsafe(S):x.multiply(S),b=h(this,D).add(h(C,L));return b.is0()?void 0:b}toAffine(C){return m(this,C)}isTorsionFree(){const{h:C,isTorsionFree:D}=t;if(C===It)return!0;if(D)return D(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:C,clearCofactor:D}=t;return C===It?this:D?D(g,this):this.multiplyUnsafe(t.h)}toRawBytes(C=!0){return Ci("isCompressed",C),this.assertValidity(),s(g,this,C)}toHex(C=!0){return Ci("isCompressed",C),Ti(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:E,nBitLength:v}=t,w=oU(g,E?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:g,normPrivateKeyToScalar:d,weierstrassEquation:o,isWithinCurveOrder:u}}function pU(e){const t=Ry(e);return Bl(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function fU(e){const t=pU(e),{Fp:r,n,nByteLength:s,nBitLength:a}=t,o=r.BYTES+1,i=2*r.BYTES+1;function c(k){return tr(k,n)}function l(k){return Np(k,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:f,isWithinCurveOrder:m}=dU({...t,toBytes(k,P,O){const U=P.toAffine(),z=r.toBytes(U.x),H=Pl;return Ci("isCompressed",O),O?H(Uint8Array.from([P.hasEvenY()?2:3]),z):H(Uint8Array.from([4]),z,r.toBytes(U.y))},fromBytes(k){const P=k.length,O=k[0],U=k.subarray(1);if(P===o&&(O===2||O===3)){const z=qs(U);if(!Ip(z,It,r.ORDER))throw new Error("Point is not on curve");const H=f(z);let G;try{G=r.sqrt(H)}catch(he){const ie=he instanceof Error?": "+he.message:"";throw new Error("Point is not on curve"+ie)}const J=(G&It)===It;return(O&1)===1!==J&&(G=r.neg(G)),{x:z,y:G}}else if(P===i&&O===4){const z=r.fromBytes(U.subarray(0,r.BYTES)),H=r.fromBytes(U.subarray(r.BYTES,2*r.BYTES));return{x:z,y:H}}else{const z=o,H=i;throw new Error("invalid Point, expected length of "+z+", or uncompressed "+H+", got "+P)}}});function y(k){const P=n>>It;return k>P}function g(k){return y(k)?c(-k):k}const E=(k,P,O)=>qs(k.slice(P,O));class v{constructor(P,O,U){qa("r",P,It,n),qa("s",O,It,n),this.r=P,this.s=O,U!=null&&(this.recovery=U),Object.freeze(this)}static fromCompact(P){const O=s;return P=kr("compactSignature",P,O*2),new v(E(P,0,O),E(P,O,2*O))}static fromDER(P){const{r:O,s:U}=In.toSig(kr("DER",P));return new v(O,U)}assertValidity(){}addRecoveryBit(P){return new v(this.r,this.s,P)}recoverPublicKey(P){const{r:O,s:U,recovery:z}=this,H=T(kr("msgHash",P));if(z==null||![0,1,2,3].includes(z))throw new Error("recovery id invalid");const G=z===2||z===3?O+t.n:O;if(G>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const J=(z&1)===0?"02":"03",pe=u.fromHex(J+Gp(G,r.BYTES)),he=l(G),ie=c(-H*he),de=c(U*he),Fe=u.BASE.multiplyAndAddUnsafe(pe,ie,de);if(!Fe)throw new Error("point at infinify");return Fe.assertValidity(),Fe}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new v(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Al(this.toDERHex())}toDERHex(){return In.hexFromSig(this)}toCompactRawBytes(){return Al(this.toCompactHex())}toCompactHex(){const P=s;return Gp(this.r,P)+Gp(this.s,P)}}const w={isValidPrivateKey(k){try{return d(k),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const k=Oy(t.n);return nU(t.randomBytes(k),t.n)},precompute(k=8,P=u.BASE){return P._setWindowSize(k),P.multiply(BigInt(3)),P}};function A(k,P=!0){return u.fromPrivateKey(k).toRawBytes(P)}function C(k){if(typeof k=="bigint")return!1;if(k instanceof u)return!0;const O=kr("key",k).length,U=r.BYTES,z=U+1,H=2*U+1;if(!(t.allowedPrivateKeyLengths||s===z))return O===z||O===H}function D(k,P,O=!0){if(C(k)===!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(k)).toRawBytes(O)}const L=t.bits2int||function(k){if(k.length>8192)throw new Error("input is too large");const P=qs(k),O=k.length*8-a;return O>0?P>>BigInt(O):P},T=t.bits2int_modN||function(k){return c(L(k))},h=Il(a);function b(k){return qa("num < 2^"+a,k,Bn,h),Si(k,s)}function x(k,P,O=S){if(["recovered","canonical"].some(ve=>ve in O))throw new Error("sign() legacy options not supported");const{hash:U,randomBytes:z}=t;let{lowS:H,prehash:G,extraEntropy:J}=O;H==null&&(H=!0),k=kr("msgHash",k),Hy(O),G&&(k=kr("prehashed msgHash",U(k)));const pe=T(k),he=d(P),ie=[b(he),b(pe)];if(J!=null&&J!==!1){const ve=J===!0?z(r.BYTES):J;ie.push(kr("extraEntropy",ve))}const de=Pl(...ie),Fe=pe;function Q(ve){const _e=L(ve);if(!m(_e))return;const Ge=l(_e),ot=u.BASE.multiply(_e).toAffine(),Se=c(ot.x);if(Se===Bn)return;const Ee=c(Ge*c(Fe+Se*he));if(Ee===Bn)return;let be=(ot.x===Se?0:2)|Number(ot.y&It),Ze=Ee;return H&&y(Ee)&&(Ze=g(Ee),be^=1),new v(Se,Ze,be)}return{seed:de,k2sig:Q}}const S={lowS:t.lowS,prehash:!1},I={lowS:t.lowS,prehash:!1};function F(k,P,O=S){const{seed:U,k2sig:z}=x(k,P,O),H=t;return oF(H.hash.outputLen,H.nByteLength,H.hmac)(U,z)}u.BASE._setWindowSize(8);function _(k,P,O,U=I){var be;const z=k;P=kr("msgHash",P),O=kr("publicKey",O);const{lowS:H,prehash:G,format:J}=U;if(Hy(U),"strict"in U)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 z=="string"||ki(z),he=!pe&&!J&&typeof z=="object"&&z!==null&&typeof z.r=="bigint"&&typeof z.s=="bigint";if(!pe&&!he)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let ie,de;try{if(he&&(ie=new v(z.r,z.s)),pe){try{J!=="compact"&&(ie=v.fromDER(z))}catch(Ze){if(!(Ze instanceof In.Err))throw Ze}!ie&&J!=="der"&&(ie=v.fromCompact(z))}de=u.fromHex(O)}catch{return!1}if(!ie||H&&ie.hasHighS())return!1;G&&(P=t.hash(P));const{r:Fe,s:Q}=ie,ve=T(P),_e=l(Q),Ge=c(ve*_e),ot=c(Fe*_e),Se=(be=u.BASE.multiplyAndAddUnsafe(de,Ge,ot))==null?void 0:be.toAffine();return Se?c(Se.x)===Fe:!1}return{CURVE:t,getPublicKey:A,getSharedSecret:D,sign:F,verify:_,ProjectivePoint:u,Signature:v,utils:w}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function mU(e){return{hash:e,hmac:(t,...r)=>_y(e,t,T8(...r)),randomBytes:S8}}function Ml(e,t){const r=n=>fU({...e,...mU(n)});return{...r(t),create:r}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const $y=Za(BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff")),hU=$y.create(BigInt("-3")),bU=BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),yU=Ml({a:hU,b:bU,Fp:$y,n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),h:BigInt(1),lowS:!1},Rd),Gy=Za(BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff")),gU=Gy.create(BigInt("-3")),xU=BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef");Ml({a:gU,b:xU,Fp:Gy,n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"),h:BigInt(1),lowS:!1},q8);const jy=Za(BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")),wU=jy.create(BigInt("-3")),vU=BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00");Ml({a:wU,b:vU,Fp:jy,n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"),h:BigInt(1),lowS:!1,allowedPrivateKeyLengths:[130,131,132]},W8);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const EU=yU;function Vy(e){const{hash:t,payload:r,publicKey:n,signature:s}=e;return EU.verify(s,r instanceof Uint8Array?r:cs(r),Dp(n).substring(2),...t?[{prehash:!0,lowS:!0}]:[])}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Wy=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),qy=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),kU=BigInt(0),CU=BigInt(1),Vp=BigInt(2),Yy=(e,t)=>(e+t/Vp)/t;function TU(e){const t=Wy,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=Cr(u,r,t)*u%t,f=Cr(d,r,t)*u%t,m=Cr(f,Vp,t)*l%t,y=Cr(m,s,t)*m%t,g=Cr(y,a,t)*y%t,E=Cr(g,i,t)*g%t,v=Cr(E,c,t)*E%t,w=Cr(v,i,t)*g%t,A=Cr(w,r,t)*u%t,C=Cr(A,o,t)*y%t,D=Cr(C,n,t)*l%t,L=Cr(D,Vp,t);if(!Wp.eql(Wp.sqr(L),e))throw new Error("Cannot find square root");return L}const Wp=Za(Wy,void 0,void 0,{sqrt:TU}),Fi=Ml({a:kU,b:BigInt(7),Fp:Wp,n:qy,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=qy,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-CU*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,o=BigInt("0x100000000000000000000000000000000"),i=Yy(a*e,t),c=Yy(-n*e,t);let l=tr(e-i*r-c*s,t),u=tr(-i*n-c*a,t);const d=l>o,f=u>o;if(d&&(l=t-l),f&&(u=t-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:l,k2neg:f,k2:u}}}},Rd),SU=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:Fi},Symbol.toStringTag,{value:"Module"}));function Ky(e){return Dl(AU(e))}function AU(e){const{payload:t,signature:r}=e,{r:n,s,yParity:a}=r,i=new Fi.Signature(BigInt(n),BigInt(s)).addRecoveryBit(a).recoverPublicKey(Ul(t).substring(2));return zF(i)}function PU(e){const{address:t,hash:r,payload:n,publicKey:s,signature:a}=e;return t?Mp(t,Ky({payload:n,signature:a})):Fi.verify(a,Up(n),HF(s),...r?[{prehash:!0,lowS:!0}]:[])}const IU=/^(.*)\[([0-9]*)\]$/,BU=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Zy=/^(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)?$/,Xy=2n**256n-1n;function Nl(e,t={}){const{recovered:r}=t;if(typeof e.r>"u")throw new Xp({signature:e});if(typeof e.s>"u")throw new Xp({signature:e});if(r&&typeof e.yParity>"u")throw new Xp({signature:e});if(e.r<0n||e.r>Xy)throw new NU({value:e.r});if(e.s<0n||e.s>Xy)throw new LU({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new zl({value:e.yParity})}function FU(e){return qp(Pt(e))}function qp(e){if(e.length!==130&&e.length!==132)throw new MU({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 Kp(s)}catch{throw new zl({value:s})}})();return typeof n>"u"?{r:t,s:r}:{r:t,s:r,yParity:n}}function Qy(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return Ll(e)}function Ll(e){const t=typeof e=="string"?qp(e):e instanceof Uint8Array?FU(e):typeof e.r=="string"?Yp(e):e.v?UU(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return Nl(t),t}function UU(e){return{r:e.r,s:e.s,yParity:Kp(e.v)}}function Yp(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=Kp(r)),typeof n!="number")throw new zl({value:e.yParity});return n})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function OU(e){const[t,r,n]=e;return Ll({r:r==="0x"?0n:BigInt(r),s:n==="0x"?0n:BigInt(n),yParity:t==="0x"?0:Number(t)})}function DU(e){Nl(e);const t=e.r,r=e.s;return pt(X(t,{size:32}),X(r,{size:32}),typeof e.yParity=="number"?X(Zp(e.yParity),{size:1}):"0x")}function Jy(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 _U(e){const{r:t,s:r,yParity:n}=e;return[n?"0x01":"0x",t===0n?"0x":Fp(X(t)),r===0n?"0x":Fp(X(r))]}function Kp(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 zU({value:e})}function Zp(e){if(e===0)return 27;if(e===1)return 28;throw new zl({value:e})}class MU extends oe{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${bt(Ul(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class Xp extends oe{constructor({signature:t}){super(`Signature \`${Ai(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class NU extends oe{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 LU extends oe{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 zl extends oe{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 zU extends oe{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"})}}const RU=new TextEncoder;Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[t,e.charCodeAt(0)]);const Rl={...Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[e.charCodeAt(0),t])),61:0,45:62,95:63};function HU(e){const t=e.replace(/=+$/,""),r=t.length,n=new Uint8Array(r+3);RU.encodeInto(t+"===",n);for(let a=0,o=0;a<t.length;a+=4,o+=3){const i=(Rl[n[a]]<<18)+(Rl[n[a+1]]<<12)+(Rl[n[a+2]]<<6)+Rl[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 $U(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=cs(o);if(d.length<37)return!1;const f=d[32];if((f&1)!==1||u&&(f&4)!==4||(f&8)!==8&&(f&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 m=i!==void 0?c.slice(Number(i)).match(/^"challenge":"(.*?)"/):c.match(/"challenge":"(.*?)"/);if(!m)return!1;const[y,g]=m;if(Pt(HU(g))!==t)return!1;const E=NF(gy(c),{as:"Bytes"}),v=CF(d,E);return Vy({hash:r,payload:v,publicKey:s,signature:a})}const Qp="0x01",Jp="0x02",eg="0x03",Xs="0x7777777777777777777777777777777777777777777777777777777777777777";function Xa(e){const t=e.endsWith(Xs.slice(2))?Pe(e,0,-bt(Xs)):e;if(bt(t)===65){const o=qp(t);return Nl(o),{signature:o,type:"secp256k1"}}const n=Pe(t,0,1),s=Pe(t,1),a=bt(s);if(n===Qp){if(a!==129)throw new Di({reason:`Invalid P256 signature envelope size: expected 129 bytes, got ${a} bytes`,serialized:t});return{publicKey:{prefix:4,x:yt(Pe(s,64,96)),y:yt(Pe(s,96,128))},prehash:Ii(Pe(s,128,129))!==0,signature:{r:yt(Pe(s,0,32)),s:yt(Pe(s,32,64))},type:"p256"}}if(n===Jp){if(a<128)throw new Di({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=fy(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 Di({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{publicKey:{prefix:4,x:yt(Pe(s,o+64,o+96)),y:yt(Pe(s,o+96,o+128))},metadata:{authenticatorData:c,clientDataJSON:l},signature:{r:yt(Pe(s,o,o+32)),s:yt(Pe(s,o+32,o+64))},type:"webAuthn"}}if(n===eg){const o=Pe(s,0,20),i=Xa(Pe(s,20));return{userAddress:o,inner:i,type:"keychain"}}throw new Di({reason:`Unknown signature type identifier: ${n}. Expected ${Qp} (P256) or ${Jp} (WebAuthn)`,serialized:t})}function Ui(e){if(typeof e=="string")return Xa(e);if(typeof e=="object"&&e!==null&&"r"in e&&"s"in e&&"yParity"in e)return{signature:e,type:"secp256k1"};const t=ef(e);return{...e,...t==="p256"?{prehash:e.prehash}:{},type:t}}function Hl(e){if(e.type==="secp256k1")return{signature:Yp(e),type:"secp256k1"};if(e.type==="p256")return{prehash:e.preHash,publicKey:{prefix:4,x:yt(e.pubKeyX),y:yt(e.pubKeyY)},signature:{r:yt(e.r),s:yt(e.s)},type:"p256"};if(e.type==="webAuthn"){const t=e.webauthnData,r=bt(t);let n,s;for(let a=37;a<r;a++){const o=fy(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 Di({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:yt(e.pubKeyX),y:yt(e.pubKeyY)},signature:{r:yt(e.r),s:yt(e.s)},type:"webAuthn"}}if(e.type==="keychain"||"userAddress"in e&&"signature"in e)return{type:"keychain",userAddress:e.userAddress,inner:Hl(e.signature)};throw new Oi({envelope:e})}function ef(e){if(typeof e!="object"||e===null)throw new Oi({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 Oi({envelope:e})}function $l(e,t={}){const r=ef(e);if(r==="secp256k1")return pt(DU(e.signature),t.magic?Xs:"0x");if(r==="p256"){const n=e;return pt(Qp,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?Xs:"0x")}if(r==="webAuthn"){const n=e,s=pt(n.metadata.authenticatorData,Pi(n.metadata.clientDataJSON));return pt(Jp,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?Xs:"0x")}if(r==="keychain"){const n=e;return pt(eg,n.userAddress,$l(n.inner),t.magic?Xs:"0x")}throw new Oi({envelope:e})}function tf(e){const t=ef(e);if(t==="secp256k1")return{...Jy(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=pt(r.metadata.authenticatorData,Pi(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:tf(r.inner)}}throw new Oi({envelope:e})}function GU(e,t){const{payload:r}=t,n=(()=>{if(t.address)return t.address;if(t.publicKey)return Dl(t.publicKey)})();if(!n)return!1;const s=Ui(e);if(s.type==="secp256k1")return n?PU({address:n,payload:r,signature:s.signature}):!1;if(s.type==="p256"){const a=Dl(s.publicKey);return Mp(a,n)?Vy({hash:s.prehash,publicKey:s.publicKey,payload:r,signature:s.signature}):!1}if(s.type==="webAuthn"){const a=Dl(s.publicKey);return Mp(a,n)?$U({challenge:Ul(r),metadata:s.metadata,publicKey:s.publicKey,signature:s.signature}):!1}throw new jU(`Unable to verify signature envelope of type "${s.type}".`)}class Oi extends oe{constructor({envelope:t}){super(`Unable to coerce value (\`${Ai(t)}\`) to a valid signature envelope.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.CoercionError"})}}let Di=class extends oe{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"})}},jU=class extends oe{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.VerificationError"})}};async function Gl(e,{address:t,blockNumber:r,blockTag:n="latest"}){const s=r!==void 0?q(r):void 0,a=await e.request({method:"eth_getCode",params:[t,s||n]},{dedupe:!!s});if(a!=="0x")return a}function Qa(e,t,r){const{checksumAddress:n,staticPosition:s}=r,a=af(t.type);if(a){const[o,i]=a;return WU(e,{...t,type:i},{checksumAddress:n,length:o,staticPosition:s})}if(t.type==="tuple")return ZU(e,t,{checksumAddress:n,staticPosition:s});if(t.type==="address")return VU(e,{checksum:n});if(t.type==="bool")return qU(e);if(t.type.startsWith("bytes"))return YU(e,t,{staticPosition:s});if(t.type.startsWith("uint")||t.type.startsWith("int"))return KU(e,t);if(t.type==="string")return XU(e,{staticPosition:s});throw new uf(t.type)}const tg=32,rf=32;function VU(e,t={}){const{checksum:r=!1}=t,n=e.readBytes(32);return[(a=>r?_p(a):a)(Pt(PF(n,-20))),32]}function WU(e,t,r){const{checksumAddress:n,length:s,staticPosition:a}=r;if(!s){const c=Pn(e.readBytes(rf)),l=a+c,u=l+tg;e.setPosition(l);const d=Pn(e.readBytes(tg)),f=_i(t);let m=0;const y=[];for(let g=0;g<d;++g){e.setPosition(u+(f?g*32:m));const[E,v]=Qa(e,t,{checksumAddress:n,staticPosition:u});m+=v,y.push(E)}return e.setPosition(a+32),[y,32]}if(_i(t)){const c=Pn(e.readBytes(rf)),l=a+c,u=[];for(let d=0;d<s;++d){e.setPosition(l+d*32);const[f]=Qa(e,t,{checksumAddress:n,staticPosition:l});u.push(f)}return e.setPosition(a+32),[u,32]}let o=0;const i=[];for(let c=0;c<s;++c){const[l,u]=Qa(e,t,{checksumAddress:n,staticPosition:a+o});o+=u,i.push(l)}return[i,o]}function qU(e){return[BF(e.readBytes(32),{size:32}),32]}function YU(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),[Pt(c),32]}return[Pt(e.readBytes(Number.parseInt(s,10),32)),32]}function KU(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?IF(s,{signed:r}):Pn(s,{signed:r}),32]}function ZU(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(_i(t)){const c=Pn(e.readBytes(rf)),l=s+c;for(let u=0;u<t.components.length;++u){const d=t.components[u];e.setPosition(l+i);const[f,m]=Qa(e,d,{checksumAddress:n,staticPosition:l});i+=m,o[a?u:d==null?void 0:d.name]=f}return e.setPosition(s+32),[o,32]}for(let c=0;c<t.components.length;++c){const l=t.components[c],[u,d]=Qa(e,l,{checksumAddress:n,staticPosition:s});o[a?c:l==null?void 0:l.name]=u,i+=d}return[o,i]}function XU(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=FF(xy(a));return e.setPosition(t+32),[o,32]}function QU({checksumAddress:e,parameters:t,values:r}){const n=[];for(let s=0;s<t.length;s++)n.push(nf({checksumAddress:e,parameter:t[s],value:r[s]}));return n}function nf({checksumAddress:e=!1,parameter:t,value:r}){const n=t,s=af(n.type);if(s){const[a,o]=s;return eO(r,{checksumAddress:e,length:a,parameter:{...n,type:o}})}if(n.type==="tuple")return aO(r,{checksumAddress:e,parameter:n});if(n.type==="address")return JU(r,{checksum:e});if(n.type==="bool")return rO(r);if(n.type.startsWith("uint")||n.type.startsWith("int")){const a=n.type.startsWith("int"),[,,o="256"]=Zy.exec(n.type)??[];return nO(r,{signed:a,size:Number(o)})}if(n.type.startsWith("bytes"))return tO(r,{type:n.type});if(n.type==="string")return sO(r);throw new uf(n.type)}function sf(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?t+=32:t+=bt(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+=bt(i)):r.push(i)}return pt(...r,...n)}function JU(e,t){const{checksum:r=!1}=t;return Lr(e,{strict:r}),{dynamic:!1,encoded:Ys(e.toLowerCase())}}function eO(e,t){const{checksumAddress:r,length:n,parameter:s}=t,a=n===null;if(!Array.isArray(e))throw new fO(e);if(!a&&e.length!==n)throw new pO({expectedLength:n,givenLength:e.length,type:`${s.type}[${n}]`});let o=!1;const i=[];for(let c=0;c<e.length;c++){const l=nf({checksumAddress:r,parameter:s,value:e[c]});l.dynamic&&(o=!0),i.push(l)}if(a||o){const c=sf(i);if(a){const l=X(i.length,{size:32});return{dynamic:!0,encoded:i.length>0?pt(l,c):l}}if(o)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:pt(...i.map(({encoded:c})=>c))}}function tO(e,{type:t}){const[,r]=t.split("bytes"),n=bt(e);if(!r){let s=e;return n%32!==0&&(s=Ks(s,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:pt(Ys(X(n,{size:32})),s)}}if(n!==Number.parseInt(r,10))throw new sg({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:Ks(e)}}function rO(e){if(typeof e!="boolean")throw new oe(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Ys(dy(e))}}function nO(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 my({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 sO(e){const t=Pi(e),r=Math.ceil(bt(t)/32),n=[];for(let s=0;s<r;s++)n.push(Ks(Pe(t,s*32,(s+1)*32)));return{dynamic:!0,encoded:pt(Ks(X(bt(t),{size:32})),...n)}}function aO(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=nf({checksumAddress:r,parameter:i,value:e[c]});a.push(l),l.dynamic&&(s=!0)}return{dynamic:s,encoded:s?sf(a):pt(...a.map(({encoded:o})=>o))}}function af(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function _i(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(_i);const r=af(e.type);return!!(r&&_i({...e,type:r[1]}))}const oO={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 cO({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new iO({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new rg({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 rg({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 of(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(oO);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}class rg extends oe{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class iO extends oe{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 cO extends oe{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 lO(e,t,r={}){const{as:n="Array",checksumAddress:s=!1}=r,a=typeof t=="string"?cs(t):t,o=of(a);if(Ka(a)===0&&e.length>0)throw new dO;if(Ka(a)&&Ka(a)<32)throw new uO({data:typeof t=="string"?t:Pt(t),parameters:e,size:Ka(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,f]=Qa(o,u,{checksumAddress:s,staticPosition:0});i+=f,n==="Array"?c.push(d):c[u.name??l]=d}return c}function cf(e,t,r){const{checksumAddress:n=!1}={};if(e.length!==t.length)throw new ag({expectedLength:e.length,givenLength:t.length});const s=QU({checksumAddress:n,parameters:e,values:t}),a=sf(s);return a.length===0?"0x":a}function lf(e,t){if(e.length!==t.length)throw new ag({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(lf.encode(s,a))}return pt(...r)}(function(e){function t(r,n,s=!1){if(r==="address"){const c=n;return Lr(c),Ys(c.toLowerCase(),s?32:0)}if(r==="string")return Pi(n);if(r==="bytes")return n;if(r==="bool")return Ys(dy(n),s?32:1);const a=r.match(Zy);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(BU);if(o){const[c,l]=o;if(Number.parseInt(l,10)!==(n.length-2)/2)throw new sg({expectedSize:Number.parseInt(l,10),value:n});return Ks(n,s?32:0)}const i=r.match(IU);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":pt(...u)}throw new uf(r)}e.encode=t})(lf||(lf={}));function ng(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?Rb(e):e}class uO extends oe{constructor({data:t,parameters:r,size:n}){super(`Data size of ${n} bytes is too small for given parameters.`,{metaMessages:[`Params: (${Ra(r)})`,`Data: ${t} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class dO extends oe{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class pO extends oe{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 sg extends oe{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${bt(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class ag extends oe{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${r}`].join(`
|
|
106
|
+
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class fO extends oe{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class uf extends oe{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}const og="0x6492649264926492649264926492649264926492649264926492649264926492";function mO(e){if(Pe(e,-32)!==og)throw new yO(e)}function hO(e){const{data:t,signature:r,to:n}=e;return pt(cf(ng("address, bytes, bytes"),[n,t,r]),og)}function bO(e){try{return mO(e),!0}catch{return!1}}let yO=class extends oe{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 gO(e){return xO(e,"Hex")}function xO(e,t){const r=t,n=(()=>{if(typeof e=="string"){if(e.length>3&&e.length%2!==0)throw new gF(e);return cs(e)}return e})(),s=of(n,{recursiveReadLimit:Number.POSITIVE_INFINITY});return ig(s,r)}function ig(e,t="Hex"){if(e.bytes.length===0)return t==="Hex"?Pt(e.bytes):e.bytes;const r=e.readByte();if(r<128&&e.decrementPosition(1),r<192){const s=cg(e,r,128),a=e.readBytes(s);return t==="Hex"?Pt(a):a}const n=cg(e,r,192);return wO(e,n,t)}function cg(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 oe("Invalid RLP prefix")}function wO(e,t,r){const n=e.position,s=[];for(;e.position-n<t;)s.push(ig(e,r));return s}function vO(e,t){const{as:r}=t,n=lg(e),s=of(new Uint8Array(n.length));return n.encode(s),r==="Hex"?Pt(s.bytes):s.bytes}function EO(e,t={}){const{as:r="Hex"}=t;return vO(e,{as:r})}function lg(e){return Array.isArray(e)?kO(e.map(t=>lg(t))):CO(e)}function kO(e){const t=e.reduce((s,a)=>s+a.length,0),r=ug(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 CO(e){const t=typeof e=="string"?cs(e):e,r=ug(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 ug(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=16777215)return 3;if(e<=4294967295)return 4;throw new oe("Length is too large.")}function TO(e,t={}){return typeof e.chainId=="string"?dg(e):{...e,...t.signature}}function dg(e){const{address:t,chainId:r,nonce:n}=e,s=Qy(e);return{address:t,chainId:Number(r),nonce:BigInt(n),...s}}function SO(e){return e.map(dg)}function AO(e){const{address:t,chainId:r,nonce:n,...s}=e;return{address:t,chainId:X(r),nonce:X(n),...Jy(s)}}function PO(e){return e.map(AO)}const IO="0x8010801080108010801080108010801080108010801080108010801080108010",BO=ng("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function pg(e){if(typeof e=="string"){if(Pe(e,-32)!==IO)throw new OO(e)}else Nl(e.authorization)}function FO(e){pg(e);const t=Ii(Pe(e,-64,-32)),r=Pe(e,-t-64,-64),n=Pe(e,0,-t-64),[s,a,o]=lO(BO,r);return{authorization:TO({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 UO(e){try{return pg(e),!0}catch{return!1}}class OO extends oe{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"})}}const jl=[{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"}],df=[{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"}]}],fg=[{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"}],mg=[...fg,{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"}]}],DO=[...fg,{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"}]}],hg=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],bg=[{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"}]}],yg=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],gg=[{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"}],xg=[{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"}]}],wg="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",_O="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",MO="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",pf="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",ff="/docs/contract/encodeDeployData";function Vl(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 VT({docsPath:ff});if(!("inputs"in s))throw new gb({docsPath:ff});if(!s.inputs||s.inputs.length===0)throw new gb({docsPath:ff});const a=os(s.inputs,r);return lr([n,a])}const vg="/docs/contract/encodeFunctionData";function NO(e){const{abi:t,args:r,functionName:n}=e;let s=t[0];if(n){const a=$s({abi:t,args:r,name:n});if(!a)throw new za(n,{docsPath:vg});s=a}if(s.type!=="function")throw new za(void 0,{docsPath:vg});return{abi:[s],functionName:Yo(Mr(s))}}function fr(e){const{args:t}=e,{abi:r,functionName:n}=(()=>{var i;return e.abi.length===1&&((i=e.functionName)!=null&&i.startsWith("0x"))?e:NO(e)})(),s=r[0],a=n,o="inputs"in s&&s.inputs?os(s.inputs,t??[]):void 0;return lr([a,o??"0x"])}function Ja(e,t){if(!rt(e,{strict:!1}))throw new Ct({address:e});if(!rt(t,{strict:!1}))throw new Ct({address:t});return e.toLowerCase()===t.toLowerCase()}function LO(e){const t=Ut(`0x${e.substring(4)}`).substring(26);return Ho(`0x${t}`)}async function zO({hash:e,signature:t}){const r=Or(e)?e:Ue(e),{secp256k1:n}=await Promise.resolve().then(()=>SU);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:l,s:u,v:d,yParity:f}=t,m=Number(f??d),y=Eg(m);return new n.Signature(Le(l),Le(u)).addRecoveryBit(y)}const o=Or(t)?t:Ue(t);if(ct(o)!==65)throw new Error("invalid signature length");const i=ir(`0x${o.slice(130)}`),c=Eg(i);return n.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function Eg(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 kg({hash:e,signature:t}){return LO(await zO({hash:e,signature:t}))}function RO(e){const{chainId:t,nonce:r,to:n}=e,s=e.contractAddress??e.address,a=Ut(lr(["0x05",Qr([t?q(t):"0x",s,r?q(r):"0x"])]));return n==="bytes"?or(a):a}async function Wl(e){const{authorization:t,signature:r}=e;return kg({hash:RO(t),signature:r??t})}async function HO({address:e,authorization:t,signature:r}){return Ja(Jd(e),await Wl({authorization:t,signature:r}))}function se(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 $O({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 Fi.Signature(Le(e),Le(t)).toCompactHex()}${a===0?"1b":"1c"}`;return r==="hex"?o:or(o)}function GO(e){return{address:e.address,amount:X(e.amount),index:X(e.index),validatorIndex:X(e.validatorIndex)}}function Cg(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(GO)}}}const jO="0x82ad56cb",mf="/docs/contract/decodeFunctionResult";function Qs(e){const{abi:t,args:r,functionName:n,data:s}=e;let a=t[0];if(n){const i=$s({abi:t,args:r,name:n});if(!i)throw new za(n,{docsPath:mf});a=i}if(a.type!=="function")throw new za(void 0,{docsPath:mf});if(!a.outputs)throw new kb(a.name,{docsPath:mf});const o=Ko(a.outputs,s);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}function hf(){let e=()=>{},t=()=>{};return{promise:new Promise((n,s)=>{e=n,t=s}),resolve:e,reject:t}}const bf=new Map;function Tg({fn:e,id:t,shouldSplitBatch:r,wait:n=0,sort:s}){const a=async()=>{const u=c();o();const d=u.map(({args:f})=>f);d.length!==0&&e(d).then(f=>{s&&Array.isArray(f)&&f.sort(s);for(let m=0;m<u.length;m++){const{resolve:y}=u[m];y==null||y([f[m],f])}}).catch(f=>{for(let m=0;m<u.length;m++){const{reject:y}=u[m];y==null||y(f)}})},o=()=>bf.delete(t),i=()=>c().map(({args:u})=>u),c=()=>bf.get(t)||[],l=u=>bf.set(t,[...c(),u]);return{flush:o,async schedule(u){const{promise:d,resolve:f,reject:m}=hf();return(r==null?void 0:r([...i(),u]))&&a(),c().length>0?(l({args:u,resolve:f,reject:m}),d):(l({args:u,resolve:f,reject:m}),setTimeout(a,n),d)}}}function Sg(e){if(!(!e||e.length===0))return e.reduce((t,{slot:r,value:n})=>{if(r.length!==66)throw new b1({size:r.length,targetSize:66,type:"hex"});if(n.length!==66)throw new b1({size:n.length,targetSize:66,type:"hex"});return t[r]=n,t},{})}function VO(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=q(t)),r!==void 0&&(o.nonce=q(r)),n!==void 0&&(o.state=Sg(n)),s!==void 0){if(o.state)throw new hS;o.stateDiff=Sg(s)}return o}function yf(e){if(!e)return;const t={};for(const{address:r,...n}of e){if(!rt(r,{strict:!1}))throw new Ct({address:r});if(t[r])throw new mS({address:r});t[r]=VO(n)}return t}async function Mi(e,t){var F,_,k,P;const{account:r=e.account,authorizationList:n,batch:s=!!((F=e.batch)!=null&&F.multicall),blockNumber:a,blockTag:o=e.experimental_blockTag??"latest",accessList:i,blobs:c,blockOverrides:l,code:u,data:d,factory:f,factoryData:m,gas:y,gasPrice:g,maxFeePerBlobGas:E,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:A,to:C,value:D,stateOverride:L,...T}=t,h=r?Ke(r):void 0;if(u&&(f||m))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=f&&m&&C&&d,S=b||x,I=b?Ag({code:u,data:d}):x?YO({data:d,factory:f,factoryData:m,to:C}):d;try{en(t);const U=(typeof a=="bigint"?q(a):void 0)||o,z=l?Cg(l):void 0,H=yf(L),G=(P=(k=(_=e.chain)==null?void 0:_.formatters)==null?void 0:k.transactionRequest)==null?void 0:P.format,pe=(G||_r)({...Ws(T,{format:G}),accessList:i,account:h,authorizationList:n,blobs:c,data:I,gas:y,gasPrice:g,maxFeePerBlobGas:E,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:A,to:S?void 0:C,value:D},"call");if(s&&WO({request:pe})&&!H&&!z)try{return await qO(e,{...pe,blockNumber:a,blockTag:o})}catch(de){if(!(de instanceof Z1)&&!(de instanceof $d))throw de}const he=(()=>{const de=[pe,U];return H&&z?[...de,H,z]:H?[...de,H]:z?[...de,{},z]:de})(),ie=await e.request({method:"eth_call",params:he});return ie==="0x"?{data:void 0}:{data:ie}}catch(O){const U=KO(O),{offchainLookup:z,offchainLookupSignature:H}=await Promise.resolve().then(()=>IN);if(e.ccipRead!==!1&&(U==null?void 0:U.slice(0,10))===H&&C)return{data:await z(e,{data:U,to:C})};throw S&&(U==null?void 0:U.slice(0,10))==="0x101bb98d"?new xS({factory:f}):Ep(O,{...t,account:h,chain:e.chain})}}function WO({request:e}){const{data:t,to:r,...n}=e;return!(!t||t.startsWith(jO)||!r||Object.values(n).filter(s=>typeof s<"u").length>0)}async function qO(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 Ma({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new Z1})(),d=(typeof a=="bigint"?q(a):void 0)||o,{schedule:f}=Tg({id:`${e.uid}.${d}`,wait:s,shouldSplitBatch(E){return E.reduce((w,{data:A})=>w+(A.length-2),0)>r*2},fn:async E=>{const v=E.map(C=>({allowFailure:!0,callData:C.data,target:C.to})),w=fr({abi:jl,args:[v],functionName:"aggregate3"}),A=await e.request({method:"eth_call",params:[{...l===null?{data:Ag({code:pf,data:w})}:{to:l,data:w}},d]});return Qs({abi:jl,args:[v],functionName:"aggregate3",data:A||"0x"})}}),[{returnData:m,success:y}]=await f({data:i,to:c});if(!y)throw new ul({data:m});return m==="0x"?{data:void 0}:{data:m}}function Ag(e){const{code:t,data:r}=e;return Vl({abi:Lb(["constructor(bytes, bytes)"]),bytecode:wg,args:[t,r]})}function YO(e){const{data:t,factory:r,factoryData:n,to:s}=e;return Vl({abi:Lb(["constructor(address, bytes, address, bytes)"]),bytecode:_O,args:[s,t,r,n]})}function KO(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}const ZO=3;function Js(e,{abi:t,address:r,args:n,docsPath:s,functionName:a,sender:o}){const i=e instanceof ul?e:e instanceof $?e.walk(y=>"data"in y)||e.walk():{},{code:c,data:l,details:u,message:d,shortMessage:f}=i,m=e instanceof qo?new gS({functionName:a}):[ZO,js.code].includes(c)&&(l||u||d||f)||c===is.code&&u==="execution reverted"&&l?new wp({abi:t,data:typeof l=="object"?l.data:l,functionName:a,message:i instanceof vp?u:f??d}):e;return new Kb(m,{abi:t,args:n,contractAddress:r,docsPath:s,functionName:a,sender:o})}async function zr(e,t){const{abi:r,address:n,args:s,functionName:a,...o}=t,i=fr({abi:r,args:s,functionName:a});try{const{data:c}=await se(e,Mi,"call")({...o,data:i,to:n});return Qs({abi:r,args:s,functionName:a,data:c||"0x"})}catch(c){throw Js(c,{abi:r,address:n,args:s,docsPath:"/docs/contract/readContract",functionName:a})}}async function Ni(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 f=t.signature;return Or(f)?f:typeof f=="object"&&"r"in f&&"s"in f?$O(f):vt(f)})();try{return UO(i)?await XO(e,{...t,multicallAddress:o,signature:i}):await QO(e,{...t,verifierAddress:a,signature:i})}catch(f){try{if(Ja(Jd(r),await kg({hash:s,signature:i})))return!0}catch{}if(f instanceof ea)return!1;throw f}}async function XO(e,t){var E;const{address:r,blockNumber:n,blockTag:s,hash:a,multicallAddress:o}=t,{authorization:i,data:c,signature:l,to:u}=FO(t.signature);if(await Gl(e,{address:r,blockNumber:n,blockTag:s})===lr(["0xef0100",i.address]))return await JO(e,{address:r,blockNumber:n,blockTag:s,hash:a,signature:l});const f={address:i.address,chainId:Number(i.chainId),nonce:Number(i.nonce),r:q(i.r,{size:32}),s:q(i.s,{size:32}),yParity:i.yParity};if(!await HO({address:r,authorization:f}))throw new ea;const y=await se(e,zr,"readContract")({...o?{address:o}:{code:pf},authorizationList:[f],abi:jl,blockNumber:n,blockTag:"pending",functionName:"aggregate3",args:[[...c?[{allowFailure:!0,target:u??r,callData:c}]:[],{allowFailure:!0,target:r,callData:fr({abi:yg,functionName:"isValidSignature",args:[a,l]})}]]}),g=(E=y[y.length-1])==null?void 0:E.returnData;if(g!=null&&g.startsWith("0x1626ba7e"))return!0;throw new ea}async function QO(e,t){const{address:r,factory:n,factoryData:s,hash:a,signature:o,verifierAddress:i,...c}=t,l=await(async()=>!n&&!s||bO(o)?o:hO({data:s,signature:o,to:n}))(),u=i?{to:i,data:fr({abi:gg,functionName:"isValidSig",args:[r,a,l]}),...c}:{data:Vl({abi:gg,args:[r,a,l],bytecode:MO}),...c},{data:d}=await se(e,Mi,"call")(u).catch(f=>{throw f instanceof Yb?new ea:f});if(e8(d??"0x0"))return!0;throw new ea}async function JO(e,t){const{address:r,blockNumber:n,blockTag:s,hash:a,signature:o}=t;if((await se(e,zr,"readContract")({address:r,abi:yg,args:[a,o],blockNumber:n,blockTag:s,functionName:"isValidSignature"}).catch(c=>{throw c instanceof Kb?new ea:c})).startsWith("0x1626ba7e"))return!0;throw new ea}class ea extends Error{}function eD(e,t={}){return typeof e.chainId=="string"?Pg(e):t.signature?{...e,signature:t.signature}:e}function Pg(e){const{address:t,chainId:r,nonce:n}=e,s=Hl(e.signature);return{address:t,chainId:Number(r),nonce:BigInt(n),signature:s}}function tD(e){return e.map(t=>Pg(t))}function rD(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=Xa(s)),eD(a)}function nD(e){const t=[];for(const r of e)t.push(rD(r));return t}function sD(e){const{address:t,chainId:r,nonce:n,signature:s}=e;return{address:t,chainId:X(r),nonce:X(n),signature:tf(s)}}function aD(e){return e.map(t=>sD(t))}function oD(e){const{address:t,chainId:r,nonce:n}=e,s=e.signature?$l(e.signature):void 0;return[r?X(r):"0x",t,n?X(n):"0x",...s?[s]:[]]}function iD(e){if(!e||e.length===0)return[];const t=[];for(const r of e)t.push(oD(r));return t}function cD(e,t={}){return typeof e.expiry=="string"?Ig(e):t.signature?{...e,signature:Ui(t.signature)}:e}function Ig(e){const{chainId:t="0x0",keyId:r,expiry:n=0,limits:s,keyType:a}=e,o=Hl(e.signature);return{address:r,chainId:t==="0x"?0n:yt(t),expiry:Number(n),limits:s==null?void 0:s.map(i=>({token:i.token,limit:BigInt(i.limit)})),signature:o,type:a}}function lD(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"?Ii(o):void 0,type:c,...n!=="0x"?{chainId:yt(n)}:{},...typeof o<"u"?{expiry:Ii(o)}:{},...typeof i<"u"?{limits:i.map(([u,d])=>({token:u,limit:BigInt(d)}))}:{}};return r&&(l.signature=Xa(r)),cD(l)}function uD(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:tf(o),keyType:a}}function dD(e){const{address:t,chainId:r=0n,expiry:n,limits:s}=e,a=e.signature?$l(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 pD="0x20c0";function Bg(e){if(typeof e=="string")return Lr(e),e;const t=X(e,{size:18});return pt(pD,t)}const Fg={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"},Ug={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function fD(e,t={}){if(!e)return null;const r=Qy(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=SO(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=Ug[e.type]??e.type),r&&(n.v=Zp(r.yParity)),n}const Og={...Fg,tempo:"0x76"},mD={...Ug,"0x76":"tempo"};function hD(e,t={}){if(!e)return null;const r=fD(e);return r.type=mD[e.type],e.aaAuthorizationList&&(r.authorizationList=tD(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=Hl(e.signature)),e.validAfter&&(r.validAfter=Number(e.validAfter)),e.validBefore&&(r.validBefore=Number(e.validBefore)),e.keyAuthorization&&(r.keyAuthorization=Ig(e.keyAuthorization)),e.feePayerSignature&&(r.feePayerSignature=Yp(e.feePayerSignature),r.feePayerSignature.v=Zp(r.feePayerSignature.yParity)),r}function bD(e){const t={};return typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.authorizationList<"u"&&(t.authorizationList=PO(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=Fg[e.type]||e.type),typeof e.value<"u"&&(t.value=X(e.value)),t}function yD(e){const t=bD({...e,authorizationList:void 0});e.authorizationList&&(t.authorizationList=aD(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=Bg(e.feeToken)),e.keyAuthorization&&(t.keyAuthorization=uD(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 py(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=Og.tempo,delete t.data,delete t.input,delete t.to,delete t.value),t}function gD(e){const t=[];for(let r=0;r<e.length;r++){const[n,s]=e[r];n&&Lr(n,{strict:!1}),t.push({address:n,storageKeys:s.map(a=>LF(a)?a:Fp(a))})}return t}function xD(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(bt(n[s])!==32)throw new wD({storageKey:n[s]});r&&Lr(r,{strict:!1}),t.push([r,n])}return t}class wD extends oe{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${bt(t)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccessList.InvalidStorageKeySizeError"})}}const Dg={wei:0,gwei:9,szabo:12,finney:15,ether:18};function vD(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 gf(e,t="wei"){return vD(e,Dg.gwei-Dg[t])}class ED extends oe{constructor({feeCap:t}={}){super(`The fee cap (\`maxFeePerGas\`/\`maxPriorityFeePerGas\`${t?` = ${gf(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 kD extends oe{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 CD extends oe{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 TD extends oe{constructor({maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${gf(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${gf(r)} gwei`:""}).`].join(`
|
|
107
|
+
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.TipAboveFeeCapError"})}}const SD="0x78",AD="0x76",_g="tempo";function xf(e){const{calls:t,chainId:r,maxFeePerGas:n,maxPriorityFeePerGas:s,validBefore:a,validAfter:o}=e;if(!t||t.length===0)throw new OD;if(typeof a=="number"&&typeof o=="number"&&a<=o)throw new DD({validBefore:a,validAfter:o});if(t)for(const i of t)i.to&&Lr(i.to,{strict:!1});if(r<=0)throw new kD({chainId:r});if(n&&BigInt(n)>2n**256n-1n)throw new ED({feeCap:n});if(s&&n&&s>n)throw new TD({maxFeePerGas:n,maxPriorityFeePerGas:s})}function PD(e){const t=gO(Pe(e,1)),[r,n,s,a,o,i,c,l,u,d,f,m,y,g,E]=t,v=Array.isArray(g)?g:void 0,w=v?E:g;if(!(t.length===13||t.length===14||t.length===15))throw new CD({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:f,feePayerSignatureOrSender:m,...t.length>12?{signature:w}:{}},serialized:e,type:_g});let A={chainId:Number(r),type:_g};if(Nr(a)&&a!=="0x"&&(A.gas=BigInt(a)),Nr(l)&&(A.nonce=l==="0x"?0n:BigInt(l)),Nr(s)&&s!=="0x"&&(A.maxFeePerGas=BigInt(s)),Nr(n)&&n!=="0x"&&(A.maxPriorityFeePerGas=BigInt(n)),Nr(c)&&(A.nonceKey=c==="0x"?0n:BigInt(c)),Nr(u)&&u!=="0x"&&(A.validBefore=Number(u)),Nr(d)&&d!=="0x"&&(A.validAfter=Number(d)),Nr(f)&&f!=="0x"&&(A.feeToken=f),o&&o!=="0x"){const D=o;A.calls=D.map(L=>{const[T,h,b]=L,x={};return T&&T!=="0x"&&(x.to=T),h&&h!=="0x"&&(x.value=BigInt(h)),b&&b!=="0x"&&(x.data=b),x})}(i==null?void 0:i.length)!==0&&i!=="0x"&&(A.accessList=gD(i)),(y==null?void 0:y.length)!==0&&y!=="0x"&&(A.authorizationList=nD(y)),m!=="0x"&&m!==void 0&&(m==="0x00"||_l(m)?A.feePayerSignature=null:A.feePayerSignature=OU(m)),v&&(A.keyAuthorization=lD(v));const C=w?Xa(w):void 0;return C&&(A={...A,signature:C}),xf(A),A}function ID(e,t={}){const{feePayerSignature:r,signature:n}=t,s=typeof e=="string"?PD(e):e;return xf(s),{...s,...n?{signature:Ui(n)}:{},...r?{feePayerSignature:Ll(r)}:{},type:"tempo"}}function Li(e,t={}){const{accessList:r,authorizationList:n,calls:s,chainId:a,feeToken:o,gas:i,keyAuthorization:c,nonce:l,nonceKey:u,maxFeePerGas:d,maxPriorityFeePerGas:f,validBefore:m,validAfter:y}=e;xf(e);const g=xD(r),E=t.signature||e.signature,v=iD(n),w=s.map(D=>[D.to??"0x",D.value?X(D.value):"0x",D.data??"0x"]),A=(()=>{if(t.sender)return t.sender;const D=typeof t.feePayerSignature<"u"?t.feePayerSignature:e.feePayerSignature;return D===null?"0x00":D?_U(D):"0x"})(),C=[X(a),f?X(f):"0x",d?X(d):"0x",i?X(i):"0x",w,g,u?X(u):"0x",l?X(l):"0x",typeof m=="number"?X(m):"0x",typeof y=="number"?X(y):"0x",typeof o=="bigint"||typeof o=="string"?Bg(o):"0x",A,v,...c?[dD(c)]:[],...E?[$l(Ui(E))]:[]];return pt(t.format==="feePayer"?SD:AD,EO(C))}function BD(e){return FD(e,{presign:!0})}function FD(e,t={}){const r=Li({...e,...t.presign?{signature:void 0}:{}});return Bi(r)}function UD(e,t){const{sender:r}=t,n=Li({...e,signature:void 0},{sender:r,format:"feePayer"});return Bi(n)}class OD extends oe{constructor(){super("Calls list cannot be empty."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.CallsEmptyError"})}}class DD extends oe{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 Mg(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:np(e)}function wf(e){try{return Mg(e)==="tempo"}catch{return!1}}async function _D(e,t){if(!wf(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 qc(e,{r:X(n,{size:32}),s:X(s,{size:32}),yParity:a})}return qc(e,t)}if(Mg(e)==="tempo")return MD(e,t);throw new Error("Unsupported transaction type")}async function MD(e,t){var l;const r=(()=>{if(e.signature)return e.signature;if(t&&"type"in t)return t;if(t)return Ui({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=ID(c,{signature:r}),d=(()=>{if(e.from)return e.from;if(r.type==="secp256k1")return Ky({payload:BD(u),signature:r.signature});throw new Error("Unable to extract sender from transaction or signature.")})(),f=UD(u,{sender:d}),m=await e.feePayer.sign({hash:f});return Li(u,{feePayerSignature:Ll(m)})}if(s===!0){const u=Li(c,{feePayerSignature:null,signature:r});return e.from&&r?pt(u,e.from,"0xfeefeefeefee"):u}return Li({...c,...s?{feeToken:void 0}:{}},{feePayerSignature:void 0,signature:r})}function ND(e){if(!wf(e))return Ns(e);const{feePayerSignature:t,gasPrice:r,nonce:n,...s}=hD(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:Og[s.type],type:s.type}}function LD(e){return Hc(e)}function zD(e,t){const r=e,n=r.account?Ke(r.account):void 0;if(!wf(r))return _r(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=yD({...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 RD=HD();function HD(){return new Map}function $D(e){return`${e.address.toLowerCase()}-${e.chainId}`}function Ng(e,t){const r=$D(t);let n=e.get(r);return n||(n={counter:0,resetScheduled:!1},e.set(r,n)),n}function GD(e,t){const r=Ng(e,t);r.counter=0,r.resetScheduled=!1}function jD(e,t){const r=Ng(e,t);r.resetScheduled||(r.resetScheduled=!0,queueMicrotask(()=>GD(e,t)));const n=r.counter;return r.counter++,n===0?0n:yt(py(6))}const vf={blockTime:1e3,extendSchema:L3(),formatters:{transaction:Rc({exclude:["aaAuthorizationList"],format:ND}),transactionReceipt:Fd({format:LD}),transactionRequest:Ud({format:zD})},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=jD(RD,{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)=>_D(e,t))},async verifyHash(e,t){const{address:r,hash:n,signature:s}=t;if(typeof s=="string"&&s.endsWith(Xs.slice(2))){const a=Xa(s);if(a.type!=="keychain"){const o=await Gl(e,{address:r,blockNumber:t.blockNumber,blockTag:t.blockTag});if(!o||o==="0xef01007702c00000000000000000000000000000000000")return GU(a,{address:r,payload:n})}}return await se(e,Ni,"verifyHash")({...t,chain:null})}},VD=p({...vf,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"]}}}),WD=p({...vf,id:1337,name:"Tempo",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["http://localhost:8545"]}}}),qD=p({...vf,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"]}}}),YD=p({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}),KD=p({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}),ZD=p({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}),XD=p({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}),QD=p({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}),JD=p({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}),e_=p({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}),t_=p({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}),r_=p({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}),n_=p({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}),s_=p({...ur,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}),a_=p({...ur,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}),o_=p({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"}}}),i_=p({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}),c_=p({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}),l_=p({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_=p({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"}}}),d_=p({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}),p_=p({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}),f_=p({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}),ql=1,m_=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[ql]:{address:"0x2F12d621a16e2d3285929C9996f478508951dFe4"}},portal:{[ql]:{address:"0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2"}},l1StandardBridge:{[ql]:{address:"0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA"}}},sourceId:ql}),Yl=11155111,h_=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},portal:{[Yl]:{address:"0x0d83dab629f0e0F9d36c0Cbc89B69a489f0751bD"}},l1StandardBridge:{[Yl]:{address:"0xea58fcA6849d79EAd1f26608855c2D6407d54Ce2"}},disputeGameFactory:{[Yl]:{address:"0xeff73e5aa3B9AEC32c659Aa3E00444d20a84394b"}}},testnet:!0,sourceId:Yl}),b_=p({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/"}}}),y_=p({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}),g_=p({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/"}}}),x_=p({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}}}),w_=p({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}}}),v_=p({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}),E_=p({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}),k_=p({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"}}}),C_=p({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}),T_=p({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}),S_=p({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}),A_=p({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}),P_=p({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}),I_=p({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}}}),B_=p({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}),F_=p({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}),U_=p({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"}}}),O_=p({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}),D_=p({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}),__=p({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}}}),M_=p({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"}}),N_=p({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}),zi=1,L_=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[zi]:{address:"0x069c4c579671f8c120b1327a73217D01Ea2EC5ea"}},l2OutputOracle:{[zi]:{address:"0x19A6d1E9034596196295CF148509796978343c5D"}},portal:{[zi]:{address:"0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C"}},l1StandardBridge:{[zi]:{address:"0x470458C91978D2d929704489Ad730DC3E3001113"}}},testnet:!1,sourceId:zi}),Ri=11155111,z_=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Ri]:{address:"0x8Ec1111f67Dad6b6A93B3F42DfBC92D81c98449A"}},l2OutputOracle:{[Ri]:{address:"0xc8886f8BAb6Eaeb215aDB5f1c686BF699248300e"}},portal:{[Ri]:{address:"0xFf6EBa109271fe6d4237EeeD4bAb1dD9A77dD1A4"}},l1StandardBridge:{[Ri]:{address:"0xd7DF54b3989855eb66497301a4aAEc33Dbb3F8DE"}}},testnet:!0,sourceId:Ri}),R_=p({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}),H_=p({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}),$_=p({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}),G_=p({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}}}),j_=p({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}}}),V_=p({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}}}),Lg=p({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}),W_=p({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}),q_=p({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}),Y_=p({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}),K_=p({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}),Z_=p({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}),X_=p({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}),Q_=p({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}),J_=p({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}),eM=p({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}),tM=p({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"}}}),rM=p({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}),nM=p({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}),sM=p({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}),aM=p({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}),oM=p({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}),iM=p({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}),cM=p({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}),lM=p({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}),uM=p({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}),Ef=1,dM=p({...V,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:{[Ef]:{address:"0x92Ef6Af472b39F1b363da45E35530c24619245A4"}},portal:{[Ef]:{address:"0x17bfAfA932d2e23Bd9B909Fd5B4D2e2a27043fb1"}},l1StandardBridge:{[Ef]:{address:"0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8"}}},testnet:!1}),kf=11155111,pM=p({...V,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:{[kf]:{address:"0xd69D3AC5CA686cCF94b258291772bc520FEAf211"}},portal:{[kf]:{address:"0x4E21A71Ac3F7607Da5c06153A17B1DD20E702c21"}},l1StandardBridge:{[kf]:{address:"0x87a7E2bCA9E35BA49282E832a28A6023904460D8"}}},testnet:!0}),Cf=11155111,fM=p({...V,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:{[Cf]:{address:"0x740C2dac453aEf7140809F80b72bf0e647af8148"}},portal:{[Cf]:{address:"0x787f1C8c5924178689E0560a43D848bF8E54b23e"}},l1StandardBridge:{[Cf]:{address:"0x0545c5fe980098C16fcD0eCB5E79753afa6d9af9"}}},testnet:!0}),mM=p({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}),hM=p({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}),bM=p({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"}}}),yM=p({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"}}}),zg=p({...ur,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}}}),Rg=p({...ur,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}),gM=p({...ur,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}),xM=p({...ur,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}),wM=p({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}),Hg=p({...ur,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}),$g=p({...ur,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}),Kl=1,vM=p({...V,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:{...V.contracts,l2OutputOracle:{[Kl]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882},portal:{[Kl]:{address:"0x1a0ad011913A150f69f6A19DF447A0CfD9551054"}},l1StandardBridge:{[Kl]:{address:"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631"}}},sourceId:Kl}),Zl=11155111,EM=p({...V,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:{...V.contracts,l2OutputOracle:{[Zl]:{address:"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160},portal:{[Zl]:{address:"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f"}},l1StandardBridge:{[Zl]:{address:"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB"}}},sourceId:Zl,testnet:!0}),Gg=5,kM=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123},portal:{[Gg]:{address:"0xDb9F51790365e7dc196e7D072728df39Be958ACe"}}},sourceId:Gg,testnet:!0}),CM=Object.freeze(Object.defineProperty({__proto__:null,abey:j3,abstract:Bv,abstractTestnet:Fv,acala:Uv,acria:Ov,adf:Dv,agungTestnet:_v,aioz:Mv,alephZero:Nv,alephZeroTestnet:Lv,alienx:zv,alienxHalTestnet:Rv,ancient8:Vv,ancient8Sepolia:Wv,anvil:qv,apeChain:Yv,apexTestnet:Kv,apollo:Zv,arbitrum:Xv,arbitrumGoerli:Qv,arbitrumNova:Jv,arbitrumSepolia:eE,arcTestnet:tE,arenaz:rE,areonNetwork:nE,areonNetworkTestnet:sE,areum:aE,artelaTestnet:oE,arthera:iE,artheraTestnet:cE,assetChain:lE,assetChainTestnet:uE,astar:dE,astarZkEVM:pE,astarZkyoto:fE,atletaOlympia:mE,aurora:hE,auroraTestnet:bE,auroria:yE,autheoTestnet:gE,avalanche:xE,avalancheFuji:wE,b3:vE,b3Sepolia:EE,bahamut:kE,base:db,baseGoerli:SE,basePreconf:CE,baseSepolia:pb,baseSepoliaPreconf:AE,basecampTestnet:TE,beam:PE,beamTestnet:IE,bearNetworkChainMainnet:BE,bearNetworkChainTestnet:FE,berachain:UE,berachainBepolia:OE,berachainTestnet:DE,berachainTestnetbArtio:_E,bevmMainnet:ME,bifrost:NE,birdlayer:LE,bitTorrent:VE,bitTorrentTestnet:WE,bitgert:zE,bitkub:RE,bitkubTestnet:HE,bitlayer:$E,bitlayerTestnet:GE,bitrock:jE,blast:qE,blastSepolia:YE,bob:KE,bobSepolia:QE,boba:ZE,bobaSepolia:XE,boolBetaMainnet:JE,botanix:ek,botanixTestnet:tk,bounceBit:rk,bounceBitTestnet:nk,bronos:sk,bronosTestnet:ak,bsc:ok,bscGreenfield:ik,bscTestnet:ck,bsquared:lk,bsquaredTestnet:uk,btr:dk,btrTestnet:pk,bxn:fk,bxnTestnet:mk,cannon:hk,canto:bk,celo:Ak,celoAlfajores:Pk,celoSepolia:Ik,chang:Bk,chiliz:Fk,chips:Uk,citreaTestnet:Ok,classic:Dk,coinbit:_k,coinex:Mk,confluxESpace:Nk,confluxESpaceTestnet:Lk,coreDao:zk,coreTestnet1:Rk,coreTestnet2:Hk,corn:$k,cornTestnet:Gk,crab:jk,creatorTestnet:Vk,creditCoin3Devnet:Wk,creditCoin3Mainnet:qk,creditCoin3Testnet:Yk,cronos:Kk,cronosTestnet:Zk,cronoszkEVM:Xk,cronoszkEVMTestnet:Qk,crossbell:Jk,crossfi:e7,curtis:t7,cyber:r7,cyberTestnet:n7,dailyNetwork:s7,dailyNetworkTestnet:a7,darwinia:o7,datahavenTestnet:i7,dbkchain:c7,dchain:l7,dchainTestnet:u7,defichainEvm:d7,defichainEvmTestnet:p7,degen:f7,dfk:m7,diode:h7,disChain:b7,dodochainTestnet:y7,dogechain:g7,domaTestnet:x7,donatuz:w7,dosChain:v7,dosChainTestnet:E7,dreyerxMainnet:k7,dreyerxTestnet:C7,dustboyIoT:T7,dymension:S7,edexa:A7,edexaTestnet:P7,edgeless:I7,edgelessTestnet:B7,edgeware:F7,edgewareTestnet:U7,eduChain:O7,eduChainTestnet:D7,ekta:_7,ektaTestnet:M7,elastos:N7,elastosTestnet:L7,electroneum:z7,electroneumTestnet:R7,elysiumTestnet:H7,energy:$7,eni:G7,eniTestnet:j7,enuls:V7,eon:W7,eos:q7,eosTestnet:Y7,eteria:K7,etherlink:Z7,etherlinkShadownetTestnet:X7,etherlinkTestnet:Q7,ethernity:J7,etp:eC,evmos:tC,evmosTestnet:rC,excelonMainnet:nC,expanse:sC,exsat:aC,exsatTestnet:oC,fantom:iC,fantomSonicTestnet:cC,fantomTestnet:lC,fibo:uC,filecoin:dC,filecoinCalibration:pC,filecoinHyperspace:fC,fireChain:G3,flame:mC,flare:hC,flareTestnet:bC,flowMainnet:yC,flowPreviewnet:gC,flowTestnet:xC,fluence:wC,fluenceStage:vC,fluenceTestnet:EC,fluentTestnet:kC,form:CC,formTestnet:SC,forma:TC,formicarium:sA,forta:AC,foundry:PC,fraxtal:IC,fraxtalTestnet:BC,funkiMainnet:FC,funkiSepolia:UC,fuse:OC,fuseSparknet:DC,fusion:_C,fusionTestnet:MC,garnet:NC,gatechain:LC,geist:zC,genesys:RC,giwaSepolia:hb,giwaSepoliaPreconf:HC,glideL1Protocol:$C,glideL2Protocol:GC,gnosis:jC,gnosisChiado:VC,goChain:YC,goat:WC,gobi:qC,godwoken:KC,goerli:ZC,graphite:XC,graphiteTestnet:QC,gravity:JC,gunz:e9,guruNetwork:t9,guruTestnet:r9,ham:n9,happychainTestnet:s9,haqqMainnet:a9,haqqTestedge2:o9,hardhat:i9,harmonyOne:c9,hashkey:l9,hashkeyTestnet:u9,haustTestnet:d9,hedera:p9,hederaPreviewnet:f9,hederaTestnet:m9,hela:h9,heliosTestnet:b9,hemi:y9,hemiSepolia:g9,henesys:x9,holesky:w9,hoodi:v9,hpb:E9,hpp:k9,hppSepolia:C9,huddle01Mainnet:T9,huddle01Testnet:S9,humanity:A9,humanityTestnet:P9,humanode:I9,humanodeTestnet5:B9,hychain:F9,hychainTestnet:U9,hyperEvm:bb,hyperliquid:bb,hyperliquidEvmTestnet:O9,iSunCoin:K9,icbNetwork:D9,idchain:_9,immutableZkEvm:M9,immutableZkEvmTestnet:N9,inEVM:L9,initVerse:z9,initVerseGenesis:R9,injective:H9,injectiveTestnet:$9,ink:G9,inkSepolia:j9,iota:V9,iotaTestnet:W9,iotex:q9,iotexTestnet:Y9,jasmyChain:Z9,jasmyChainTestnet:X9,jbc:Q9,jbcTestnet:J9,jocMainnet:eT,jocTestnet:tT,jovay:rT,jovaySepolia:nT,juneo:sT,juneoBCH1Chain:aT,juneoDAI1Chain:oT,juneoDOGE1Chain:iT,juneoEUR1Chain:cT,juneoGLD1Chain:lT,juneoLINK1Chain:uT,juneoLTC1Chain:dT,juneoSGD1Chain:fT,juneoSocotraTestnet:mT,juneoUSD1Chain:hT,juneoUSDT1Chain:bT,juneomBTC1Chain:pT,kaia:yT,kairos:gT,kakarotSepolia:xT,kakarotStarknetSepolia:wT,kardiaChain:vT,karura:ET,katana:kT,kava:CT,kavaTestnet:TT,kcc:ST,kiiTestnetOro:AT,kinto:PT,klaytn:IT,klaytnBaobab:BT,koi:FT,kroma:UT,kromaSepolia:OT,l3x:DT,l3xTestnet:_T,lavita:MT,lens:NT,lensTestnet:LT,lestnet:zT,lightlinkPegasus:RT,lightlinkPhoenix:HT,linea:kS,lineaGoerli:CS,lineaSepolia:TS,lineaTestnet:SS,lisk:AS,liskSepolia:PS,loadAlphanet:IS,localhost:BS,loop:FS,lukso:US,luksoTestnet:OS,lumiaMainnet:DS,lumiaTestnet:_S,lumoz:MS,lumozTestnet:NS,lycan:LS,lyra:zS,mainnet:RS,mandala:HS,manta:$S,mantaSepoliaTestnet:GS,mantaTestnet:jS,mantle:VS,mantleSepoliaTestnet:WS,mantleTestnet:qS,mantraDuKongEVMTestnet:YS,mantraEVM:KS,mapProtocol:ZS,matchain:XS,matchainTestnet:QS,mchVerse:JS,megaethTestnet:eA,mekong:tA,meld:rA,memecore:nA,merlin:aA,merlinErigonTestnet:oA,metachain:iA,metachainIstanbul:cA,metadium:lA,metalL2:uA,meter:dA,meterTestnet:pA,metis:fA,metisGoerli:mA,metisSepolia:hA,mev:bA,mevTestnet:yA,mint:gA,mintSepoliaTestnet:xA,mitosisTestnet:wA,mode:vA,modeTestnet:EA,monad:kA,monadTestnet:CA,moonbaseAlpha:TA,moonbeam:SA,moonbeamDev:AA,moonriver:PA,morph:IA,morphHolesky:BA,morphSepolia:FA,nahmii:UA,nautilus:OA,near:DA,nearTestnet:_A,neonDevnet:MA,neonMainnet:NA,neoxMainnet:LA,neoxT4:zA,newton:RA,nexi:HA,nexilix:$A,nibiru:GA,nitrographTestnet:jA,nomina:VA,oasisTestnet:WA,oasys:qA,odysseyTestnet:YA,okc:KA,omax:ZA,omni:XA,omniOmega:QA,oneWorld:JA,oortMainnetDev:eP,opBNB:tP,opBNBTestnet:rP,openledger:nP,optimism:sP,optimismGoerli:aP,optimismSepolia:oP,optopia:iP,optopiaTestnet:cP,orderly:lP,orderlySepolia:uP,otimDevnet:dP,palm:pP,palmTestnet:fP,peaq:mP,pgn:hP,pgnTestnet:bP,phoenix:yP,planq:gP,plasma:xP,plasmaDevnet:wP,plasmaTestnet:vP,playfiAlbireo:EP,plinga:kP,plume:CP,plumeDevnet:TP,plumeMainnet:SP,plumeSepolia:AP,plumeTestnet:PP,polterTestnet:IP,polygon:BP,polygonAmoy:FP,polygonMumbai:UP,polygonZkEvm:OP,polygonZkEvmCardona:DP,polygonZkEvmTestnet:_P,polynomial:MP,polynomialSepolia:NP,potos:LP,potosTestnet:zP,premiumBlockTestnet:RP,pulsechain:HP,pulsechainV4:$P,pumpfiTestnet:GP,pyrope:jP,qMainnet:WP,qTestnet:qP,ql1:VP,quai:YP,quaiTestnet:KP,reactiveTestnet:ZP,real:XP,redbellyMainnet:QP,redbellyTestnet:JP,reddio:eI,reddioSepolia:tI,redstone:rI,rei:nI,reyaNetwork:sI,riseTestnet:aI,rivalz:oI,rollux:iI,rolluxTestnet:cI,ronin:lI,root:uI,rootPorcini:dI,rootstock:pI,rootstockTestnet:fI,rss3:mI,rss3Sepolia:hI,saakuru:bI,saga:yI,saigon:gI,sanko:xI,sapphire:wI,sapphireTestnet:vI,satoshiVM:EI,satoshiVMTestnet:kI,scroll:CI,scrollSepolia:TI,sei:SI,seiDevnet:AI,seiTestnet:II,seismicDevnet:PI,sepolia:BI,shape:FI,shapeSepolia:UI,shardeum:OI,shardeumSphinx:DI,shibarium:_I,shibariumTestnet:MI,shiden:NI,shimmer:LI,shimmerTestnet:zI,sidraChain:RI,silentData:HI,silicon:$I,siliconSepolia:GI,sixProtocol:jI,skaleBase:nB,skaleBaseSepoliaTestnet:sB,skaleBlockBrawlers:VI,skaleCalypso:WI,skaleCalypsoTestnet:qI,skaleCryptoBlades:YI,skaleCryptoColosseum:KI,skaleEuropa:ZI,skaleEuropaTestnet:XI,skaleExorde:QI,skaleHumanProtocol:JI,skaleNebula:eB,skaleNebulaTestnet:tB,skaleRazor:rB,skaleTitan:aB,skaleTitanTestnet:oB,sketchpad:iB,snax:cB,snaxTestnet:lB,somnia:uB,somniaTestnet:dB,soneium:pB,soneiumMinato:fB,songbird:mB,songbirdTestnet:hB,sonic:bB,sonicBlazeTestnet:yB,sonicTestnet:gB,sophon:xB,sophonTestnet:wB,sova:vB,sovaSepolia:EB,spicy:kB,stableTestnet:CB,statusNetworkSepolia:Jb,statusSepolia:Jb,step:TB,story:SB,storyAeneid:AB,storyOdyssey:PB,storyTestnet:IB,stratis:BB,superlumio:FB,superposition:UB,superseed:OB,superseedSepolia:DB,surgeTestnet:_B,swan:MB,swanProximaTestnet:NB,swanSaturnTestnet:LB,swellchain:zB,swellchainTestnet:RB,swissdlt:HB,syscoin:$B,syscoinTestnet:GB,tac:jB,tacSPB:VB,taiko:WB,taikoHekla:qB,taikoHoodi:YB,taikoJolnir:KB,taikoKatla:ZB,taikoTestnetSepolia:XB,taraxa:QB,taraxaTestnet:JB,teaSepolia:eF,telcoinTestnet:tF,telos:rF,telosTestnet:nF,tempoDevnet:VD,tempoLocalnet:WD,tempoTestnet:qD,tenet:YD,ternoa:KD,thaiChain:ZD,that:XD,theta:QD,thetaTestnet:JD,thunderCore:e_,thunderTestnet:t_,tiktrixTestnet:r_,tomb:n_,treasure:s_,treasureTopaz:a_,tron:o_,tronNile:i_,tronShasta:c_,ubiq:l_,ultra:u_,ultraTestnet:d_,ultron:p_,ultronTestnet:f_,unichain:m_,unichainSepolia:h_,unique:b_,uniqueOpal:y_,uniqueQuartz:g_,unreal:x_,vana:w_,vanaMoksha:v_,vanar:E_,vechain:k_,velas:C_,viction:T_,victionTestnet:S_,vision:A_,visionTestnet:P_,wanchain:I_,wanchainTestnet:B_,weaveVMAlphanet:F_,wemix:U_,wemixTestnet:O_,westendAssetHub:D_,whitechain:__,whitechainTestnet:M_,wmcTestnet:N_,worldLand:R_,worldchain:L_,worldchainSepolia:z_,x1Testnet:Lg,xLayer:V_,xLayerTestnet:Lg,xai:H_,xaiTestnet:$_,xdc:G_,xdcTestnet:j_,xoneMainnet:W_,xoneTestnet:q_,xphereMainnet:Y_,xphereTestnet:K_,xrOne:Z_,xrSepolia:eM,xrplevm:X_,xrplevmDevnet:Q_,xrplevmTestnet:J_,yooldoVerse:tM,yooldoVerseTestnet:rM,zenchainTestnet:nM,zeniq:sM,zeroG:z3,zeroGGalileoTestnet:R3,zeroGMainnet:H3,zeroGTestnet:$3,zeroNetwork:aM,zetachain:oM,zetachainAthensTestnet:iM,zhejiang:cM,zilliqa:lM,zilliqaTestnet:uM,zircuit:dM,zircuitGarfieldTestnet:pM,zircuitTestnet:fM,zkFair:mM,zkFairTestnet:hM,zkLinkNova:bM,zkLinkNovaSepoliaTestnet:yM,zkSync:zg,zkSyncInMemoryNode:Rg,zkSyncLocalNode:Hg,zkSyncSepoliaTestnet:$g,zksync:zg,zksyncInMemoryNode:Rg,zksyncLocalCustomHyperchain:gM,zksyncLocalHyperchain:xM,zksyncLocalHyperchainL1:wM,zksyncLocalNode:Hg,zksyncSepoliaTestnet:$g,zora:vM,zoraSepolia:EM,zoraTestnet:kM},Symbol.toStringTag,{value:"Module"}));class TM extends ${constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}const jg="/docs/contract/encodeEventTopics";function Hi(e){var c;const{abi:t,eventName:r,args:n}=e;let s=t[0];if(r){const l=$s({abi:t,name:r});if(!l)throw new Eb(r,{docsPath:jg});s=l}if(s.type!=="event")throw new Eb(void 0,{docsPath:jg});const a=Mr(s),o=ll(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,f)=>Array.isArray(u[f])?u[f].map((m,y)=>Vg({param:d,value:u[f][y]})):typeof u[f]<"u"&&u[f]!==null?Vg({param:d,value:u[f]}):null))??[])}return[o,...i]}function Vg({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return Ut(xn(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new TM(e.type);return os([e],[t])}function Xl(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 Wg(e,t){const{address:r,abi:n,args:s,eventName:a,fromBlock:o,strict:i,toBlock:c}=t,l=Xl(e,{method:"eth_newFilter"}),u=a?Hi({abi:n,args:s,eventName:a}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof o=="bigint"?q(o):o,toBlock:typeof c=="bigint"?q(c):c,topics:u}]});return{abi:n,args:s,eventName:a,id:d,request:l(d),strict:!!i,type:"event"}}class SM extends ${constructor(t,{account:r,docsPath:n,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:f}){var y;const m=No({from:r==null?void 0:r.address,to:d,value:typeof f<"u"&&`${_d(f)} ${((y=s==null?void 0:s.nativeCurrency)==null?void 0:y.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Xt(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Xt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Xt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function AM(e,{docsPath:t,...r}){const n=(()=>{const s=dl(e,r);return s instanceof zo?e:s})();return new SM(n,{docsPath:t,...r})}class qg extends ${constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Tf extends ${constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class PM extends ${constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Xt(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class Yg 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"})}}async function Rr(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?q(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 Yg({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)||Id)(i,"getBlock")}async function Sf(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function IM(e,t){return Kg(e,t)}async function Kg(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 se(e,Rr,"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 Le(c)}catch{const[i,c]=await Promise.all([r?Promise.resolve(r):se(e,Rr,"getBlock")({}),se(e,Sf,"getGasPrice")({})]);if(typeof i.baseFeePerGas!="bigint")throw new Tf;const l=c-i.baseFeePerGas;return l<0n?0n:l}}async function BM(e,t){return Af(e,t)}async function Af(e,t){var f,m;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 qg;const c=10**(((f=o.toString().split(".")[1])==null?void 0:f.length)??0),l=y=>y*BigInt(Math.ceil(o*c))/BigInt(c),u=r||await se(e,Rr,"getBlock")({});if(typeof((m=n==null?void 0:n.fees)==null?void 0:m.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 Tf;const y=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await Kg(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 se(e,Sf,"getGasPrice")({}))}}async function Pf(e,{address:t,blockTag:r="latest",blockNumber:n}){const s=await e.request({method:"eth_getTransactionCount",params:[t,typeof n=="bigint"?q(n):r]},{dedupe:!!n});return ir(s)}function Ql(e,{docsPath:t,...r}){const n=(()=>{const s=dl(e,r);return s instanceof zo?e:s})();return new h8(n,{docsPath:t,...r})}async function ls(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return ir(t)}async function If(e,t){var h,b,x,S,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:f,maxPriorityFeePerGas:m,nonce:y,nonceManager:g,to:E,type:v,value:w,...A}=t,C=await(async()=>{if(!r||!g||typeof y<"u")return y;const F=Ke(r),_=a?a.id:await se(e,ls,"getChainId")({});return await g.consume({address:F.address,chainId:_,client:e})})();en(t);const D=(b=(h=a==null?void 0:a.formatters)==null?void 0:h.transactionRequest)==null?void 0:b.format,T=(D||_r)({...Ws(A,{format:D}),account:r?Ke(r):void 0,accessList:n,authorizationList:s,blobs:i,blobVersionedHashes:o,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:f,maxPriorityFeePerGas:m,nonce:C,to:E,type:v,value:w},"fillTransaction");try{const F=await e.request({method:"eth_fillTransaction",params:[T]}),k=(((S=(x=a==null?void 0:a.formatters)==null?void 0:x.transaction)==null?void 0:S.format)||Ns)(F.tx);delete k.blockHash,delete k.blockNumber,delete k.r,delete k.s,delete k.transactionIndex,delete k.v,delete k.yParity,k.data=k.input,k.gas&&(k.gas=t.gas??k.gas),k.gasPrice&&(k.gasPrice=t.gasPrice??k.gasPrice),k.maxFeePerBlobGas&&(k.maxFeePerBlobGas=t.maxFeePerBlobGas??k.maxFeePerBlobGas),k.maxFeePerGas&&(k.maxFeePerGas=t.maxFeePerGas??k.maxFeePerGas),k.maxPriorityFeePerGas&&(k.maxPriorityFeePerGas=t.maxPriorityFeePerGas??k.maxPriorityFeePerGas),k.nonce&&(k.nonce=t.nonce??k.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 se(e,Rr,"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 qg;const U=10**(((I=P.toString().split(".")[1])==null?void 0:I.length)??0),z=H=>H*BigInt(Math.ceil(P*U))/BigInt(U);return k.maxFeePerGas&&!t.maxFeePerGas&&(k.maxFeePerGas=z(k.maxFeePerGas)),k.gasPrice&&!t.gasPrice&&(k.gasPrice=z(k.gasPrice)),{raw:F.raw,transaction:{from:T.from,...k}}}catch(F){throw Ql(F,{...t,chain:e.chain})}}const Bf=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Zg=new Map,Ff=new Da(128);async function $i(e,t){var C,D,L;let r=t;r.account??(r.account=e.account),r.parameters??(r.parameters=Bf);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 se(e,ls,"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 m=((o.includes("blobVersionedHashes")||o.includes("sidecars"))&&r.kzg&&r.blobs||Ff.get(e.uid)===!1||!["fees","gas"].some(h=>o.includes(h))?!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 se(e,If,"fillTransaction")({...r,nonce:d}).then(T=>{const{chainId:h,from:b,gas:x,gasPrice:S,nonce:I,maxFeePerBlobGas:F,maxFeePerGas:_,maxPriorityFeePerGas:k,type:P,...O}=T.transaction;return Ff.set(e.uid,!0),{...r,...b?{from:b}:{},...P?{type:P}:{},...typeof h<"u"?{chainId:h}:{},...typeof x<"u"?{gas:x}:{},...typeof S<"u"?{gasPrice:S}:{},...typeof I<"u"?{nonce:I}:{},...typeof F<"u"?{maxFeePerBlobGas:F}:{},...typeof _<"u"?{maxFeePerGas:_}:{},...typeof k<"u"?{maxPriorityFeePerGas:k}:{},..."nonceKey"in O&&typeof O.nonceKey<"u"?{nonceKey:O.nonceKey}:{}}}).catch(T=>{var x;const h=T;return h.name!=="TransactionExecutionError"||((x=h.walk)==null?void 0:x.call(h,S=>{const I=S;return I.name==="MethodNotFoundRpcError"||I.name==="MethodNotSupportedRpcError"}))&&Ff.set(e.uid,!1),r}):r;d??(d=m.nonce),r={...m,...u?{from:u==null?void 0:u.address}:{},...d?{nonce:d}:{}};const{blobs:y,gas:g,kzg:E,type:v}=r;i!=null&&i.fn&&((D=i.runAt)!=null&&D.includes("beforeFillParameters"))&&(r=await i.fn({...r,chain:s},{phase:"beforeFillParameters"}));let w;async function A(){return w||(w=await se(e,Rr,"getBlock")({blockTag:"latest"}),w)}if(o.includes("nonce")&&typeof d>"u"&&u&&!a&&(r.nonce=await se(e,Pf,"getTransactionCount")({address:u.address,blockTag:"pending"})),(o.includes("blobVersionedHashes")||o.includes("sidecars"))&&y&&E){const T=Md({blobs:y,kzg:E});if(o.includes("blobVersionedHashes")){const h=$1({commitments:T,to:"hex"});r.blobVersionedHashes=h}if(o.includes("sidecars")){const h=Nd({blobs:y,commitments:T,kzg:E}),b=K1({blobs:y,commitments:T,proofs:h,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=np(r)}catch{let T=Zg.get(e.uid);if(typeof T>"u"){const h=await A();T=typeof(h==null?void 0:h.baseFeePerGas)=="bigint",Zg.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 A(),{maxFeePerGas:h,maxPriorityFeePerGas:b}=await Af(e,{block:T,chain:s,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<b)throw new PM({maxPriorityFeePerGas:b});r.maxPriorityFeePerGas=b,r.maxFeePerGas=h}}else{if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")throw new Tf;if(typeof r.gasPrice>"u"){const T=await A(),{gasPrice:h}=await Af(e,{block:T,chain:s,request:r,type:"legacy"});r.gasPrice=h}}return o.includes("gas")&&typeof g>"u"&&(r.gas=await se(e,Uf,"estimateGas")({...r,account:u,prepare:(u==null?void 0:u.type)==="local"?[]:["blobVersionedHashes"]})),i!=null&&i.fn&&((L=i.runAt)!=null&&L.includes("afterFillParameters"))&&(r=await i.fn({...r,chain:s},{phase:"afterFillParameters"})),en(r),delete r.parameters,r}async function Uf(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 Wl({authorization:t.authorizationList[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:u,authorizationList:d,blobs:f,blobVersionedHashes:m,blockNumber:y,blockTag:g,data:E,gas:v,gasPrice:w,maxFeePerBlobGas:A,maxFeePerGas:C,maxPriorityFeePerGas:D,nonce:L,value:T,stateOverride:h,...b}=n?await $i(e,{...t,parameters:a,to:l}):t;if(v&&t.gas!==v)return v;const S=(typeof y=="bigint"?q(y):void 0)||g,I=yf(h);en(t);const F=(c=(i=(o=e.chain)==null?void 0:o.formatters)==null?void 0:i.transactionRequest)==null?void 0:c.format,k=(F||_r)({...Ws(b,{format:F}),account:s,accessList:u,authorizationList:d,blobs:f,blobVersionedHashes:m,data:E,gasPrice:w,maxFeePerBlobGas:A,maxFeePerGas:C,maxPriorityFeePerGas:D,nonce:L,to:l,value:T},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:I?[k,S??e.experimental_blockTag??"latest",I]:S?[k,S]:[k]}))}catch(l){throw AM(l,{...t,account:s,chain:e.chain})}}async function FM(e,t){const{abi:r,address:n,args:s,functionName:a,dataSuffix:o,...i}=t,c=fr({abi:r,args:s,functionName:a});try{return await se(e,Uf,"estimateGas")({data:`${c}${o?o.replace("0x",""):""}`,to:n,...i})}catch(l){const u=i.account?Ke(i.account):void 0;throw Js(l,{abi:r,address:n,args:s,docsPath:"/docs/contract/estimateContractGas",functionName:a,sender:u==null?void 0:u.address})}}const Xg="/docs/contract/decodeEventLog";function Jl(e){const{abi:t,data:r,strict:n,topics:s}=e,a=n??!0,[o,...i]=s;if(!o)throw new ZT({docsPath:Xg});const c=t.find(g=>g.type==="event"&&o===ll(Mr(g)));if(!(c&&"name"in c)||c.type!=="event")throw new XT(o,{docsPath:Xg});const{name:l,inputs:u}=c,d=u==null?void 0:u.some(g=>!("name"in g&&g.name)),f=d?[]:{},m=u.map((g,E)=>[g,E]).filter(([g])=>"indexed"in g&&g.indexed);for(let g=0;g<m.length;g++){const[E,v]=m[g],w=i[g];if(!w)throw new lp({abiItem:c,param:E});f[d?v:E.name||v]=UM({param:E,value:w})}const y=u.filter(g=>!("indexed"in g&&g.indexed));if(y.length>0){if(r&&r!=="0x")try{const g=Ko(y,r);if(g)if(d)for(let E=0;E<u.length;E++)f[E]=f[E]??g.shift();else for(let E=0;E<y.length;E++)f[y[E].name]=g[E]}catch(g){if(a)throw g instanceof xb||g instanceof C1?new ol({abiItem:c,data:r,params:y,size:ct(r)}):g}else if(a)throw new ol({abiItem:c,data:"0x",params:y,size:0})}return{eventName:l,args:Object.values(f).length>0?f:void 0}}function UM({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Ko([e],t)||[])[0]}function Of(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]===ll(d));if(i.length===0)return null;let c,l;for(const d of i)try{c=Jl({...o,abi:[d],strict:!0}),l=d;break}catch{}if(!c&&!s){l=i[0];try{c=Jl({...o,abi:[l],strict:!1})}catch{const d=(u=l.inputs)==null?void 0:u.some(f=>!("name"in f&&f.name));return{...o,args:d?[]:{},eventName:l.name}}}return!c||!l||a&&!a.includes(c.eventName)||!OM({args:c.args,inputs:l.inputs,matchArgs:r})?null:{...c,...o}}).filter(Boolean)}function OM(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"?Ja(o,i):a.type==="string"||a.type==="bytes"?Ut(xn(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}async function Df(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=>Hi({abi:[g],eventName:g.name,args:o?void 0:i}))],a&&(d=d[0]));let f;r?f=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):f=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:typeof n=="bigint"?q(n):n,toBlock:typeof s=="bigint"?q(s):s}]});const m=f.map(y=>Xr(y));return u?Of({abi:u,args:i,logs:m,strict:l}):m}async function Qg(e,t){const{abi:r,address:n,args:s,blockHash:a,eventName:o,fromBlock:i,toBlock:c,strict:l}=t,u=o?$s({abi:r,name:o}):void 0,d=u?void 0:r.filter(f=>f.type==="event");return se(e,Df,"getLogs")({address:n,args:s,blockHash:a,event:u,events:d,fromBlock:i,toBlock:c,strict:l})}async function DM(e,t){const{abi:r,address:n,args:s,dataSuffix:a,functionName:o,...i}=t,c=i.account?Ke(i.account):e.account,l=fr({abi:r,args:s,functionName:o});try{const{data:u}=await se(e,Mi,"call")({batch:!1,data:`${l}${a?a.replace("0x",""):""}`,to:n,...i,account:c}),d=Qs({abi:r,args:s,functionName:o,data:u||"0x"}),f=r.filter(m=>"name"in m&&m.name===t.functionName);return{result:d,request:{abi:f,address:n,args:s,dataSuffix:a,functionName:o,...i,account:c}}}catch(u){throw Js(u,{abi:r,address:n,args:s,docsPath:"/docs/contract/simulateContract",functionName:o,sender:c==null?void 0:c.address})}}const _f=new Map,Jg=new Map;let _M=0;function Fn(e,t,r){const n=++_M,s=()=>_f.get(e)||[],a=()=>{const u=s();_f.set(e,u.filter(d=>d.id!==n))},o=()=>{const u=s();if(!u.some(f=>f.id===n))return;const d=Jg.get(e);if(u.length===1&&d){const f=d();f instanceof Promise&&f.catch(()=>{})}a()},i=s();if(_f.set(e,[...i,{id:n,fns:t}]),i&&i.length>0)return o;const c={};for(const u in t)c[u]=((...d)=>{var m,y;const f=s();if(f.length!==0)for(const g of f)(y=(m=g.fns)[u])==null||y.call(m,...d)});const l=r(c);return typeof l=="function"&&Jg.set(e,l),o}async function Mf(e){return new Promise(t=>setTimeout(t,e))}function eo(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 Mf(c);const l=async()=>{s&&(await e({unpoll:a}),await Mf(n),l())};l()})(),a}const MM=new Map,NM=new Map;function LM(e){const t=(s,a)=>({clear:()=>a.delete(s),get:()=>a.get(s),set:o=>a.set(s,o)}),r=t(e,MM),n=t(e,NM);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function zM(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){const n=LM(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 RM=e=>`blockNumber.${e}`;async function Gi(e,{cacheTime:t=e.cacheTime}={}){const r=await zM(()=>e.request({method:"eth_blockNumber"}),{cacheKey:RM(e.uid),cacheTime:t});return BigInt(r)}async function eu(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=>Xr(a));return!("abi"in t)||!t.abi?s:Of({abi:t.abi,logs:s,strict:r})}async function tu(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function HM(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:f}=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 E=f??!1,v=ht(["watchContractEvent",n,s,a,e.uid,o,d,E,i]);return Fn(v,{onLogs:l,onError:c},w=>{let A;i!==void 0&&(A=i-1n);let C,D=!1;const L=eo(async()=>{var T;if(!D){try{C=await se(e,Wg,"createContractEventFilter")({abi:r,address:n,args:s,eventName:o,strict:E,fromBlock:i})}catch{}D=!0;return}try{let h;if(C)h=await se(e,eu,"getFilterChanges")({filter:C});else{const b=await se(e,Gi,"getBlockNumber")({});A&&A<b?h=await se(e,Qg,"getContractEvents")({abi:r,address:n,args:s,eventName:o,fromBlock:A+1n,toBlock:b,strict:E}):h=[],A=b}if(h.length===0)return;if(a)w.onLogs(h);else for(const b of h)w.onLogs([b])}catch(h){C&&h instanceof is&&(D=!1),(T=w.onError)==null||T.call(w,h)}},{emitOnBegin:!0,interval:d});return async()=>{C&&await se(e,tu,"uninstallFilter")({filter:C}),L()}})})():(()=>{const E=f??!1,v=ht(["watchContractEvent",n,s,a,e.uid,o,d,E]);let w=!0,A=()=>w=!1;return Fn(v,{onLogs:l,onError:c},C=>((async()=>{try{const D=(()=>{if(e.transport.type==="fallback"){const h=e.transport.transports.find(b=>b.config.type==="webSocket"||b.config.type==="ipc");return h?h.value:e.transport}return e.transport})(),L=o?Hi({abi:r,eventName:o,args:s}):[],{unsubscribe:T}=await D.subscribe({params:["logs",{address:n,topics:L}],onData(h){var x;if(!w)return;const b=h.result;try{const{eventName:S,args:I}=Jl({abi:r,data:b.data,topics:b.topics,strict:f}),F=Xr(b,{args:I,eventName:S});C.onLogs([F])}catch(S){let I,F;if(S instanceof ol||S instanceof lp){if(f)return;I=S.abiItem.name,F=(x=S.abiItem.inputs)==null?void 0:x.some(k=>!("name"in k&&k.name))}const _=Xr(b,{args:F?[]:{},eventName:I});C.onLogs([_])}},onError(h){var b;(b=C.onError)==null||b.call(C,h)}});A=T,w||A()}catch(D){c==null||c(D)}})(),()=>A()))})()}async function Nf(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const Lf=new Da(128);async function ru(e,t){var w,A,C,D;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:f,nonce:m,type:y,value:g,...E}=t;if(typeof r>"u")throw new En({docsPath:"/docs/actions/wallet/sendTransaction"});const v=r?Ke(r):null;try{en(t);const L=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await Wl({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 se(e,ls,"getChainId")({}),cp({currentChainId:T,chain:n}));const h=(C=(A=(w=e.chain)==null?void 0:w.formatters)==null?void 0:A.transactionRequest)==null?void 0:C.format,x=(h||_r)({...Ws(E,{format:h}),accessList:s,account:v,authorizationList:a,blobs:o,chainId:T,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,to:L,type:y,value:g},"sendTransaction"),S=Lf.get(e.uid),I=S?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:I,params:[x]},{retryCount:0})}catch(F){if(S===!1)throw F;const _=F;if(_.name==="InvalidInputRpcError"||_.name==="InvalidParamsRpcError"||_.name==="MethodNotFoundRpcError"||_.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[x]},{retryCount:0}).then(k=>(Lf.set(e.uid,!0),k)).catch(k=>{const P=k;throw P.name==="MethodNotFoundRpcError"||P.name==="MethodNotSupportedRpcError"?(Lf.set(e.uid,!1),_):P});throw _}}if((v==null?void 0:v.type)==="local"){const T=await se(e,$i,"prepareTransactionRequest")({account:v,accessList:s,authorizationList:a,blobs:o,chain:n,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,nonceManager:v.nonceManager,parameters:[...Bf,"sidecars"],type:y,value:g,...E,to:L}),h=(D=n==null?void 0:n.serializers)==null?void 0:D.transaction,b=await v.signTransaction(T,{serializer:h});return await se(e,Nf,"sendRawTransaction")({serializedTransaction:b})}throw(v==null?void 0:v.type)==="smart"?new Hs({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Hs({docsPath:"/docs/actions/wallet/sendTransaction",type:v==null?void 0:v.type})}catch(L){throw L instanceof Hs?L:Ql(L,{...t,account:v,chain:t.chain||void 0})}}async function ji(e,t){return ji.internal(e,ru,"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,...f}=a;if(typeof i>"u")throw new En({docsPath:"/docs/contract/writeContract"});const m=i?Ke(i):null,y=fr({abi:o,args:l,functionName:d});try{return await se(r,n,s)({data:`${y}${u?u.replace("0x",""):""}`,to:c,account:m,...f})}catch(g){throw Js(g,{abi:o,address:c,args:l,docsPath:"/docs/contract/writeContract",functionName:d,sender:m==null?void 0:m.address})}}e.internal=t})(ji||(ji={}));class $M 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 nu(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 Mf(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 e6="0x5792579257925792579257925792579257925792579257925792579257925792",t6=q(0,{size:32});async function r6(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(f=>{const m=f,y=m.abi?fr({abi:m.abi,functionName:m.functionName,args:m.args}):m.data;return{data:m.dataSuffix&&y?cr([y,m.dataSuffix]):y,to:m.to,value:m.value?q(m.value):void 0}});try{const f=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:i,calls:d,capabilities:n,chainId:q(s.id),from:u==null?void 0:u.address,id:c,version:l}]},{retryCount:0});return typeof f=="string"?{id:f}:f}catch(f){const m=f;if(a&&(m.name==="MethodNotFoundRpcError"||m.name==="MethodNotSupportedRpcError"||m.name==="UnknownRpcError"||m.details.toLowerCase().includes("does not exist / is not available")||m.details.toLowerCase().includes("missing or invalid. request()")||m.details.toLowerCase().includes("did not match any variant of untagged enum")||m.details.toLowerCase().includes("account upgraded to unsupported contract")||m.details.toLowerCase().includes("eip-7702 not supported")||m.details.toLowerCase().includes("unsupported wc_ method")||m.details.toLowerCase().includes("feature toggled misconfigured")||m.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 Wa(new $(v,{details:v}))}const y=[];for(const v of d){const w=ru(e,{account:u,chain:s,data:v.data,to:v.to,value:v.value?Le(v.value):void 0});y.push(w),o>0&&await new Promise(A=>setTimeout(A,o))}const g=await Promise.allSettled(y);if(g.every(v=>v.status==="rejected"))throw g[0].reason;const E=g.map(v=>v.status==="fulfilled"?v.value:t6);return{id:cr([...E,q(s.id,{size:32}),e6])}}throw Ql(f,{...t,account:u,chain:t.chain})}}async function n6(e,t){async function r(u){if(u.endsWith(e6.slice(2))){const f=Zt(tp(u,-64,-32)),m=tp(u,0,-64).slice(2).match(/.{1,64}/g),y=await Promise.all(m.map(E=>t6.slice(2)!==E?e.request({method:"eth_getTransactionReceipt",params:[`0x${E}`]},{dedupe:!0}):void 0)),g=y.some(E=>E===null)?100:y.every(E=>(E==null?void 0:E.status)==="0x1")?200:y.every(E=>(E==null?void 0:E.status)==="0x0")?500:600;return{atomic:!1,chainId:ir(f),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?ir(s):void 0,receipts:(a==null?void 0:a.map(u=>({...u,blockNumber:Le(u.blockNumber),gasUsed:Le(u.gasUsed),status:w1[u.status]})))??[],statusCode:l,status:c,version:o}}async function s6(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=ht(["waitForCallsStatus",e.uid,r]),{promise:u,resolve:d,reject:f}=hf();let m;const y=Fn(l,{resolve:d,reject:f},g=>{const E=eo(async()=>{const v=w=>{clearTimeout(m),E(),w(),y()};try{const w=await nu(async()=>{const A=await se(e,n6,"getCallsStatus")({id:r});if(c&&A.status==="failure")throw new $M(A);return A},{retryCount:a,delay:o});if(!s(w))return;v(()=>g.resolve(w))}catch(w){v(()=>g.reject(w))}},{interval:n,emitOnBegin:!0});return E});return m=i?setTimeout(()=>{y(),clearTimeout(m),f(new GM({id:r}))},i):void 0,await u}class GM extends ${constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const zf=256;let su=zf,au;function a6(e=11){if(!au||su+e>zf*2){au="",su=0;for(let t=0;t<zf;t++)au+=(256+Math.random()*256|0).toString(16).substring(1)}return au.substring(su,su+++e)}function o6(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,f=e.account?Ke(e.account):void 0,{config:m,request:y,value:g}=e.transport({account:f,chain:r,pollingInterval:u}),E={...m,...g},v={account:f,batch:t,cacheTime:d,ccipRead:n,chain:r,key:s,name:a,pollingInterval:u,request:y,transport:E,type:o,uid:a6(),...i?{experimental_blockTag:i}:{}};function w(A){return C=>{const D=C(A);for(const T in v)delete D[T];const L={...A,...D};return Object.assign(L,{extend:w(L)})}}return Object.assign(v,{extend:w(v)})}function Rf(e){var r,n,s,a,o,i;if(!(e instanceof $))return!1;const t=e.walk(c=>c instanceof wp);return t instanceof wp?((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 jM(e){const{abi:t,data:r}=e,n=Rs(r,0,4),s=t.find(a=>a.type==="function"&&n===Yo(Mr(a)));if(!s)throw new QT(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:s.name,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Ko(s.inputs,Rs(r,4)):void 0}}const Hf="/docs/contract/encodeErrorResult";function i6(e){const{abi:t,errorName:r,args:n}=e;let s=t[0];if(r){const c=$s({abi:t,args:n,name:r});if(!c)throw new wb(r,{docsPath:Hf});s=c}if(s.type!=="error")throw new wb(void 0,{docsPath:Hf});const a=Mr(s),o=Yo(a);let i="0x";if(n&&n.length>0){if(!s.inputs)throw new KT(s.name,{docsPath:Hf});i=os(s.inputs,n)}return lr([o,i])}const $f="/docs/contract/encodeFunctionResult";function VM(e){const{abi:t,functionName:r,result:n}=e;let s=t[0];if(r){const o=$s({abi:t,name:r});if(!o)throw new za(r,{docsPath:$f});s=o}if(s.type!=="function")throw new za(void 0,{docsPath:$f});if(!s.outputs)throw new kb(s.name,{docsPath:$f});const a=(()=>{if(s.outputs.length===0)return[];if(s.outputs.length===1)return[n];if(Array.isArray(n))return n;throw new Cb(n)})();return os(s.outputs,a)}const Vi="x-batch-gateway:true";async function c6(e){const{data:t,ccipRequest:r}=e,{args:[n]}=jM({abi:df,data:t}),s=[],a=[];return await Promise.all(n.map(async(o,i)=>{try{a[i]=o.urls.includes(Vi)?await c6({data:o.data,ccipRequest:r}):await r(o),s[i]=!1}catch(c){s[i]=!0,a[i]=WM(c)}})),VM({abi:df,functionName:"query",result:[s,a]})}function WM(e){return e.name==="HttpRequestError"&&e.status?i6({abi:df,errorName:"HttpError",args:[e.status,e.shortMessage]}):i6({abi:[yb],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}function l6(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Or(t)?t:null}function Gf(e){let t=new Uint8Array(32).fill(0);if(!e)return vt(t);const r=e.split(".");for(let n=r.length-1;n>=0;n-=1){const s=l6(r[n]),a=s?xn(s):Ut(Ms(r[n]),"bytes");t=Ut(cr([t,a]),"bytes")}return vt(t)}function qM(e){return`[${e.slice(2)}]`}function YM(e){const t=new Uint8Array(32).fill(0);return e?l6(e)||Ut(Ms(e)):vt(t)}function jf(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const r=new Uint8Array(Ms(t).byteLength+2);let n=0;const s=t.split(".");for(let a=0;a<s.length;a++){let o=Ms(s[a]);o.byteLength>255&&(o=Ms(qM(YM(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 KM(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 Ma({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(f=>a.endsWith(f)))return null;const d=s!=null?[Gf(a),BigInt(s)]:[Gf(a)];try{const f=fr({abi:bg,functionName:"addr",args:d}),m={address:l,abi:mg,functionName:"resolveWithGateways",args:[Ue(jf(a)),f,o??[Vi]],blockNumber:r,blockTag:n},g=await se(e,zr,"readContract")(m);if(g[0]==="0x")return null;const E=Qs({abi:bg,args:d,functionName:"addr",data:g[0]});return E==="0x"||Zt(E)==="0x00"?null:E}catch(f){if(i)throw f;if(Rf(f))return null;throw f}}class ZM 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 Wi extends ${constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class Vf 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 XM extends ${constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const QM=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,JM=/^(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>\/.*)?$/,eN=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,tN=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function rN(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 u6(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function d6({uri:e,gatewayUrls:t}){const r=eN.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};const n=u6(t==null?void 0:t.ipfs,"https://ipfs.io"),s=u6(t==null?void 0:t.arweave,"https://arweave.net"),a=e.match(QM),{protocol:o,subpath:i,target:c,subtarget:l=""}=(a==null?void 0:a.groups)||{},u=o==="ipns:/"||i==="ipns/",d=o==="ipfs:/"||i==="ipfs/"||JM.test(e);if(e.startsWith("http")&&!u&&!d){let m=e;return t!=null&&t.arweave&&(m=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:m,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 f=e.replace(tN,"");if(f.startsWith("<svg")&&(f=`data:image/svg+xml;base64,${btoa(f)}`),f.startsWith("data:")||f.startsWith("{"))return{uri:f,isOnChain:!0,isEncoded:!1};throw new Vf({uri:e})}function p6(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new ZM({data:e});return e.image||e.image_url||e.image_data}async function nN({gatewayUrls:e,uri:t}){try{const r=await fetch(t).then(s=>s.json());return await Wf({gatewayUrls:e,uri:p6(r)})}catch{throw new Vf({uri:t})}}async function Wf({gatewayUrls:e,uri:t}){const{uri:r,isOnChain:n}=d6({uri:t,gatewayUrls:e});if(n||await rN(r))return r;throw new Vf({uri:t})}function sN(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 Wi({reason:"Only EIP-155 supported"});if(!o)throw new Wi({reason:"Chain ID not found"});if(!c)throw new Wi({reason:"Contract address not found"});if(!s)throw new Wi({reason:"Token ID not found"});if(!i)throw new Wi({reason:"ERC namespace not found"});return{chainID:Number.parseInt(o,10),namespace:i.toLowerCase(),contractAddress:c,tokenID:s}}async function aN(e,{nft:t}){if(t.namespace==="erc721")return zr(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 zr(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 XM({namespace:t.namespace})}async function oN(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?iN(e,{gatewayUrls:t,record:r}):Wf({uri:r,gatewayUrls:t})}async function iN(e,{gatewayUrls:t,record:r}){const n=sN(r),s=await aN(e,{nft:n}),{uri:a,isOnChain:o,isEncoded:i}=d6({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 Wf({uri:p6(u),gatewayUrls:t})}let c=n.tokenID;return n.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),nN({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,c)})}async function f6(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 Ma({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:mg,args:[Ue(jf(a)),fr({abi:hg,functionName:"text",args:[Gf(a),s]}),o??[Vi]],functionName:"resolveWithGateways",blockNumber:r,blockTag:n},m=await se(e,zr,"readContract")(d);if(m[0]==="0x")return null;const y=Qs({abi:hg,functionName:"text",data:m[0]});return y===""?null:y}catch(d){if(i)throw d;if(Rf(d))return null;throw d}}async function cN(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:s,gatewayUrls:a,strict:o,universalResolverAddress:i}){const c=await se(e,f6,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:s,universalResolverAddress:i,gatewayUrls:a,strict:o});if(!c)return null;try{return await oN(e,{record:c,gatewayUrls:n})}catch{return null}}async function lN(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 Ma({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})();try{const u={address:l,abi:DO,args:[r,a,o??[Vi]],functionName:"reverseWithGateways",blockNumber:n,blockTag:s},d=se(e,zr,"readContract"),[f]=await d(u);return f||null}catch(u){if(i)throw u;if(Rf(u))return null;throw u}}async function uN(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 Ma({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 se(e,zr,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Ue(jf(s))],blockNumber:r,blockTag:n});return c}async function m6(e,t){var E,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:f,value:m,...y}=t,g=r?Ke(r):void 0;try{en(t);const C=(typeof n=="bigint"?q(n):void 0)||s,D=(w=(v=(E=e.chain)==null?void 0:E.formatters)==null?void 0:v.transactionRequest)==null?void 0:w.format,T=(D||_r)({...Ws(y,{format:D}),account:g,blobs:a,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,to:f,value:m},"createAccessList"),h=await e.request({method:"eth_createAccessList",params:[T,C]});return{accessList:h.accessList,gasUsed:BigInt(h.gasUsed)}}catch(A){throw Ep(A,{...t,account:g,chain:e.chain})}}async function dN(e){const t=Xl(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}async function h6(e,{address:t,args:r,event:n,events:s,fromBlock:a,strict:o,toBlock:i}={}){const c=s??(n?[n]:void 0),l=Xl(e,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(m=>Hi({abi:[m],eventName:m.name,args:r}))],n&&(u=u[0]));const d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof a=="bigint"?q(a):a,toBlock:typeof i=="bigint"?q(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 b6(e){const t=Xl(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}async function pN(e,{address:t,blockNumber:r,blockTag:n=e.experimental_blockTag??"latest"}){const s=typeof r=="bigint"?q(r):void 0,a=await e.request({method:"eth_getBalance",params:[t,s||n]});return BigInt(a)}async function fN(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}async function mN(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){const s=r!==void 0?q(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}),ir(a)}class hN 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 bN(e,t){const{address:r,factory:n,factoryData:s}=t;try{const[a,o,i,c,l,u,d]=await se(e,zr,"readContract")({abi:yN,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 hN({address:r}):o}}const yN=[{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 gN(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 xN(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:s}){const a=typeof r=="bigint"?q(r):void 0,o=await e.request({method:"eth_feeHistory",params:[q(t),a||n,s]},{dedupe:!!a});return gN(o)}async function wN(e,{filter:t}){const r=t.strict??!1,s=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(a=>Xr(a));return t.abi?Of({abi:t.abi,logs:s,strict:r}):s}const ou=new Da(8192);function vN(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(ou.get(r))return ou.get(r);const n=e().finally(()=>ou.delete(r));return ou.set(r,n),n}function EN(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 Vs(new Error("method not supported"),{method:l});if(a!=null&&a.include&&!a.include.includes(l))throw new Vs(new Error("method not supported"),{method:l});const u=s?Sa(`${c}.${ht(r)}`):void 0;return vN(()=>nu(async()=>{try{return await e(r)}catch(f){const m=f;switch(m.code){case Qo.code:throw new Qo(m);case Jo.code:throw new Jo(m);case ei.code:throw new ei(m,{method:r.method});case ti.code:throw new ti(m);case js.code:throw new js(m);case is.code:throw new is(m);case ri.code:throw new ri(m);case ni.code:throw new ni(m);case si.code:throw new si(m);case Vs.code:throw new Vs(m,{method:r.method});case Ga.code:throw new Ga(m);case ai.code:throw new ai(m);case ja.code:throw new ja(m);case oi.code:throw new oi(m);case ii.code:throw new ii(m);case ci.code:throw new ci(m);case li.code:throw new li(m);case ui.code:throw new ui(m);case Va.code:throw new Va(m);case di.code:throw new di(m);case pi.code:throw new pi(m);case fi.code:throw new fi(m);case mi.code:throw new mi(m);case hi.code:throw new hi(m);case Wa.code:throw new Wa(m);case 5e3:throw new ja(m);default:throw f instanceof $?f:new vS(m)}}},{delay:({count:f,error:m})=>{var y;if(m&&m instanceof Gs){const g=(y=m==null?void 0:m.headers)==null?void 0:y.get("Retry-After");if(g!=null&&g.match(/\d/))return Number.parseInt(g,10)*1e3}return~~(1<<f)*o},retryCount:i,shouldRetry:({error:f})=>kN(f)}),{enabled:s,id:u})}}function kN(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Ga.code||e.code===js.code:e instanceof Gs&&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 CN 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=>` ${Xo(c)}`)],` Sender: ${a}`,` Data: ${n}`,` Callback selector: ${t}`,` Extra data: ${s}`].flat(),name:"OffchainLookupError"})}}class TN extends ${constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${Xo(r)}`,`Response: ${ht(t)}`],name:"OffchainLookupResponseMalformedError"})}}class SN 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 AN="0x556f1830",y6={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 PN(e,{blockNumber:t,blockTag:r,data:n,to:s}){const{args:a}=jb({data:n,abi:[y6]}),[o,i,c,l,u]=a,{ccipRead:d}=e,f=d&&typeof(d==null?void 0:d.request)=="function"?d.request:g6;try{if(!Ja(s,o))throw new SN({sender:o,to:s});const m=i.includes(Vi)?await c6({data:c,ccipRequest:f}):await f({data:c,sender:o,urls:i}),{data:y}=await Mi(e,{blockNumber:t,blockTag:r,data:cr([l,os([{type:"bytes"},{type:"bytes"}],[m,u])]),to:s});return y}catch(m){throw new CN({callbackSelector:l,cause:m,data:n,extraData:u,sender:o,urls:i})}}async function g6({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 Gs({body:c,details:d!=null&&d.error?ht(d.error):u.statusText,headers:u.headers,status:u.status,url:o});continue}if(!Or(d)){n=new TN({result:d,url:o});continue}return d}catch(u){n=new Gs({body:c,details:u.message,url:o})}}throw n}const IN=Object.freeze(Object.defineProperty({__proto__:null,ccipRequest:g6,offchainLookup:PN,offchainLookupAbiItem:y6,offchainLookupSignature:AN},Symbol.toStringTag,{value:"Module"}));function BN(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 FN(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const x6=FN();function UN(e,t={}){return{async request(r){var f;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 m=await BN(async({signal:g})=>{const E={...c,body:Array.isArray(n)?ht(n.map(C=>({jsonrpc:"2.0",id:C.id??x6.take(),...C}))):ht({jsonrpc:"2.0",id:n.id??x6.take(),...n}),headers:{"Content-Type":"application/json",...l},method:u||"POST",signal:d||(i>0?g:null)},v=new Request(e,E),w=await(a==null?void 0:a(v,E))??{...E,url:e};return await s(w.url??e,w)},{errorInstance:new Zb({body:n,url:e}),timeout:i,signal:!0});o&&await o(m);let y;if((f=m.headers.get("Content-Type"))!=null&&f.startsWith("application/json"))y=await m.json();else{y=await m.text();try{y=JSON.parse(y||"{}")}catch(g){if(m.ok)throw g;y={error:y}}}if(!m.ok)throw new Gs({body:n,details:ht(y.error)||m.statusText,headers:m.headers,status:m.status,url:e});return y}catch(m){throw m instanceof Gs||m instanceof Zb?m:new Gs({body:n,cause:m,url:e})}}}}const ON=`Ethereum Signed Message:
|
|
108
|
+
`;function DN(e){const t=typeof e=="string"?Sa(e):typeof e.raw=="string"?e.raw:vt(e.raw),r=Sa(`${ON}${ct(t)}`);return cr([r,t])}function w6(e,t){return Ut(DN(e),t)}class _N extends ${constructor({domain:t}){super(`Invalid domain "${ht(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class MN 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 NN extends ${constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function LN(e){const{domain:t,message:r,primaryType:n,types:s}=e,a=(c,l)=>{const u={...l};for(const d of c){const{name:f,type:m}=d;m==="address"&&(u[f]=u[f].toLowerCase())}return u},o=s.EIP712Domain?t?a(s.EIP712Domain,t):{}:{},i=(()=>{if(n!=="EIP712Domain")return a(s[n],r)})();return ht({domain:o,message:i,primaryType:n,types:s})}function v6(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],f=u.match($b);if(f&&(typeof d=="number"||typeof d=="bigint")){const[g,E,v]=f;q(d,{signed:E==="int",size:Number.parseInt(v,10)/8})}if(u==="address"&&typeof d=="string"&&!rt(d))throw new Ct({address:d});const m=u.match(Q4);if(m){const[g,E]=m;if(E&&ct(d)!==Number.parseInt(E,10))throw new e4({expectedSize:Number.parseInt(E,10),givenSize:ct(d)})}const y=s[u];y&&(zN(u),a(y,d))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new _N({domain:t});a(s.EIP712Domain,t)}if(n!=="EIP712Domain")if(s[n])a(s[n],r);else throw new MN({primaryType:n,types:s})}function E6({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 zN(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new NN({type:e})}function RN(e){const{domain:t={},message:r,primaryType:n}=e,s={EIP712Domain:E6({domain:t}),...e.types};v6({domain:t,message:r,primaryType:n,types:s});const a=["0x1901"];return t&&a.push(HN({domain:t,types:s})),n!=="EIP712Domain"&&a.push(k6({data:r,primaryType:n,types:s})),Ut(cr(a))}function HN({domain:e,types:t}){return k6({data:e,primaryType:"EIP712Domain",types:t})}function k6({data:e,primaryType:t,types:r}){const n=C6({data:e,primaryType:t,types:r});return Ut(n)}function C6({data:e,primaryType:t,types:r}){const n=[{type:"bytes32"}],s=[$N({primaryType:t,types:r})];for(const a of r[t]){const[o,i]=S6({types:r,name:a.name,type:a.type,value:e[a.name]});n.push(o),s.push(i)}return os(n,s)}function $N({primaryType:e,types:t}){const r=Ue(GN({primaryType:e,types:t}));return Ut(r)}function GN({primaryType:e,types:t}){let r="";const n=T6({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 T6({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])T6({primaryType:a.type,types:t},r);return r}function S6({types:e,name:t,type:r,value:n}){if(e[r]!==void 0)return[{type:"bytes32"},Ut(C6({data:n,primaryType:r,types:e}))];if(r==="bytes")return[{type:"bytes32"},Ut(n)];if(r==="string")return[{type:"bytes32"},Ut(Ue(n))];if(r.lastIndexOf("]")===r.length-1){const s=r.slice(0,r.lastIndexOf("[")),a=n.map(o=>S6({name:t,type:s,types:e,value:o}));return[{type:"bytes32"},Ut(os(a.map(([o])=>o),a.map(([,o])=>o)))]}return[{type:r},n]}function jN(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function VN(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?ir(e.nonce):void 0,storageProof:e.storageProof?jN(e.storageProof):void 0}}async function WN(e,{address:t,blockNumber:r,blockTag:n,storageKeys:s}){const a=n??"latest",o=r!==void 0?q(r):void 0,i=await e.request({method:"eth_getProof",params:[t,s,o||a]});return VN(i)}async function qN(e,{address:t,blockNumber:r,blockTag:n="latest",slot:s}){const a=r!==void 0?q(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,s,a||n]})}async function qf(e,{blockHash:t,blockNumber:r,blockTag:n,hash:s,index:a,sender:o,nonce:i}){var f,m,y;const c=n||"latest",l=r!==void 0?q(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,q(a)]},{dedupe:!0}):typeof a=="number"?u=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,q(a)]},{dedupe:!!l}):o&&typeof i=="number"&&(u=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[o,q(i)]},{dedupe:!0})),!u)throw new P1({blockHash:t,blockNumber:r,blockTag:c,hash:s,index:a});return(((y=(m=(f=e.chain)==null?void 0:f.formatters)==null?void 0:m.transaction)==null?void 0:y.format)||Ns)(u,"getTransaction")}async function YN(e,{hash:t,transactionReceipt:r}){const[n,s]=await Promise.all([se(e,Gi,"getBlockNumber")({}),t?se(e,qf,"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 iu(e,{hash:t}){var s,a,o;const r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new I1({hash:t});return(((o=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionReceipt)==null?void 0:o.format)||Hc)(r,"getTransactionReceipt")}async function KN(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:{},f=(()=>{if(t.multicallAddress)return t.multicallAddress;if(d)return null;if(e.chain)return Ma({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),m=[[]];let y=0,g=0;for(let A=0;A<l.length;A++){const{abi:C,address:D,args:L,functionName:T}=l[A];try{const h=fr({abi:C,args:L,functionName:T});g+=(h.length-2)/2,u>0&&g>u&&m[y].length>0&&(y++,g=(h.length-2)/2,m[y]=[]),m[y]=[...m[y],{allowFailure:!0,callData:h,target:D}]}catch(h){const b=Js(h,{abi:C,address:D,args:L,docsPath:"/docs/contract/multicall",functionName:T,sender:r});if(!s)throw b;m[y]=[...m[y],{allowFailure:!0,callData:"0x",target:D}]}}const E=await Promise.allSettled(m.map(A=>se(e,zr,"readContract")({...f===null?{code:pf}:{address:f},abi:jl,account:r,args:[A],authorizationList:n,blockNumber:a,blockOverrides:o,blockTag:i,functionName:"aggregate3",stateOverride:c}))),v=[];for(let A=0;A<E.length;A++){const C=E[A];if(C.status==="rejected"){if(!s)throw C.reason;for(let L=0;L<m[A].length;L++)v.push({status:"failure",error:C.reason,result:void 0});continue}const D=C.value;for(let L=0;L<D.length;L++){const{returnData:T,success:h}=D[L],{callData:b}=m[A][L],{abi:x,address:S,functionName:I,args:F}=l[v.length];try{if(b==="0x")throw new qo;if(!h)throw new ul({data:T});const _=Qs({abi:x,args:F,data:T,functionName:I});v.push(s?{result:_,status:"success"}:_)}catch(_){const k=Js(_,{abi:x,address:S,args:F,docsPath:"/docs/contract/multicall",functionName:I});if(!s)throw k;v.push({error:k,result:void 0,status:"failure"})}}}if(v.length!==l.length)throw new $("multicall results mismatch");return v}async function Yf(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 f of s){const m=f.blockOverrides?Cg(f.blockOverrides):void 0,y=f.calls.map(E=>{const v=E,w=v.account?Ke(v.account):void 0,A=v.abi?fr(v):v.data,C={...v,account:w,data:v.dataSuffix?cr([A||"0x",v.dataSuffix]):A,from:v.from??(w==null?void 0:w.address)};return en(C),_r(C)}),g=f.stateOverrides?yf(f.stateOverrides):void 0;c.push({blockOverrides:m,calls:y,stateOverrides:g})}const u=(typeof r=="bigint"?q(r):void 0)||n;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:a,traceTransfers:o,validation:i},u]})).map((f,m)=>({...Id(f),calls:f.calls.map((y,g)=>{var x,S;const{abi:E,args:v,functionName:w,to:A}=s[m].calls[g],C=((x=y.error)==null?void 0:x.data)??y.returnData,D=BigInt(y.gasUsed),L=(S=y.logs)==null?void 0:S.map(I=>Xr(I)),T=y.status==="0x1"?"success":"failure",h=E&&T==="success"&&C!=="0x"?Qs({abi:E,data:C,functionName:w}):null,b=(()=>{var F;if(T==="success")return;let I;if(((F=y.error)==null?void 0:F.data)==="0x"?I=new qo:y.error&&(I=new ul(y.error)),!!I)return Js(I,{abi:E??[],address:A??"0x",args:v,functionName:w??"<unknown>"})})();return{data:C,gasUsed:D,logs:L,status:T,...T==="success"?{result:h}:{error:b}}})}))}catch(c){const l=c,u=dl(l,{});throw u instanceof zo?l:u}}function Kf(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 oe("Unable to normalize signature.");return s}function Zf(e,t){const r=typeof e,n=t.type;switch(n){case"address":return _l(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)=>Zf(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=>Zf(s,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function A6(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 A6(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")?_l(r[n],{strict:!1}):o.includes("address")&&o.includes("bytes")?_l(r[n],{strict:!1}):!1)return o}}function P6(e,t={}){const{prepare:r=!0}=t,n=Array.isArray(e)||typeof e=="string"?zb(e):e;return{...n,...r?{hash:to(n)}:{}}}function cu(e,t,r){const{args:n=[],prepare:s=!0}=r??{},a=Nr(t,{strict:!1}),o=e.filter(l=>a?l.type==="function"||l.type==="error"?I6(l)===Pe(t,0,4):l.type==="event"?to(l)===t:!1:"name"in l&&l.name===t);if(o.length===0)throw new lu({name:t});if(o.length===1)return{...o[0],...s?{hash:to(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:to(l)}:{}};continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==n.length)continue;if(n.every((d,f)=>{const m="inputs"in l&&l.inputs[f];return m?Zf(d,m):!1})){if(i&&"inputs"in i&&i.inputs){const d=A6(l.inputs,i.inputs,n);if(d)throw new XN({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 lu({name:t});return{...c,...s?{hash:to(c)}:{}}}function I6(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,n]=e;return cu(r,n)}return e[0]})();return Pe(to(t),0,4)}function ZN(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,s]=e;return cu(n,s)}return e[0]})(),r=typeof t=="string"?t:il(t);return Kf(r)}function to(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,n]=e;return cu(r,n)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:Bi(Pi(ZN(t)))}class XN extends oe{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${Kf(il(t.abiItem))}\`, and`,`\`${r.type}\` in \`${Kf(il(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 lu extends oe{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 QN(...e){var a;const[t,r]=(()=>{if(Array.isArray(e[0])){const[o,i]=e;return[eL(o),i]}return e})(),{bytecode:n,args:s}=r;return pt(n,(a=t.inputs)!=null&&a.length&&(s!=null&&s.length)?cf(t.inputs,s):"0x")}function JN(e){return P6(e)}function eL(e){const t=e.find(r=>r.type==="constructor");if(!t)throw new lu({name:"constructor"});return t}function tL(...e){const[t,r=[]]=(()=>{if(Array.isArray(e[0])){const[l,u,d]=e;return[B6(l,u,{args:d}),d]}const[i,c]=e;return[i,c]})(),{overloads:n}=t,s=n?B6([t,...n],t.name,{args:r}):t,a=rL(s),o=r.length>0?cf(s.inputs,r):void 0;return o?pt(a,o):a}function ro(e,t={}){return P6(e,t)}function B6(e,t,r){const n=cu(e,t,r);if(n.type!=="function")throw new lu({name:t,type:"function"});return n}function rL(e){return I6(e)}const nL="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",tn="0x0000000000000000000000000000000000000000",sL="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function aL(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?QN(JN("constructor(bytes, bytes)"),{bytecode:wg,args:[sL,tL(ro("function getBalance(address)"),[l.address])]}):void 0,d=o?await Promise.all(t.calls.map(async U=>{if(!U.data&&!U.abi)return;const{accessList:z}=await m6(e,{account:l.address,...U,data:U.abi?fr(U):U.data});return z.map(({address:H,storageKeys:G})=>G.length>0?H:null)})).then(U=>U.flat().filter(Boolean)):[],f=await Yf(e,{blockNumber:r,blockTag:n,blocks:[...o?[{calls:[{data:u}],stateOverrides:a},{calls:d.map((U,z)=>({abi:[ro("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:U,from:tn,nonce:z})),stateOverrides:[{address:tn,nonce:0}]}]:[],{calls:[...s,{}].map(U=>({...U,from:l==null?void 0:l.address})),stateOverrides:a},...o?[{calls:[{data:u}]},{calls:d.map((U,z)=>({abi:[ro("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:U,from:tn,nonce:z})),stateOverrides:[{address:tn,nonce:0}]},{calls:d.map((U,z)=>({to:U,abi:[ro("function decimals() returns (uint256)")],functionName:"decimals",from:tn,nonce:z})),stateOverrides:[{address:tn,nonce:0}]},{calls:d.map((U,z)=>({to:U,abi:[ro("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:tn,nonce:z})),stateOverrides:[{address:tn,nonce:0}]},{calls:d.map((U,z)=>({to:U,abi:[ro("function symbol() returns (string)")],functionName:"symbol",from:tn,nonce:z})),stateOverrides:[{address:tn,nonce:0}]}]:[]],traceTransfers:i,validation:c}),m=o?f[2]:f[0],[y,g,,E,v,w,A,C]=o?f:[],{calls:D,...L}=m,T=D.slice(0,-1)??[],h=(y==null?void 0:y.calls)??[],b=(g==null?void 0:g.calls)??[],x=[...h,...b].map(U=>U.status==="success"?Le(U.data):null),S=(E==null?void 0:E.calls)??[],I=(v==null?void 0:v.calls)??[],F=[...S,...I].map(U=>U.status==="success"?Le(U.data):null),_=((w==null?void 0:w.calls)??[]).map(U=>U.status==="success"?U.result:null),k=((C==null?void 0:C.calls)??[]).map(U=>U.status==="success"?U.result:null),P=((A==null?void 0:A.calls)??[]).map(U=>U.status==="success"?U.result:null),O=[];for(const[U,z]of F.entries()){const H=x[U];if(typeof z!="bigint"||typeof H!="bigint")continue;const G=_[U-1],J=k[U-1],pe=P[U-1],he=U===0?{address:nL,decimals:18,symbol:"ETH"}:{address:d[U-1],decimals:pe||G?Number(G??1):void 0,symbol:J??void 0};O.some(ie=>ie.token.address===he.address)||O.push({token:he,value:{pre:H,post:z,diff:z-H}})}return{assetChanges:O,block:L,results:T}}async function oL(e,{address:t,message:r,factory:n,factoryData:s,signature:a,...o}){const i=w6(r);return se(e,Ni,"verifyHash")({address:t,factory:n,factoryData:s,hash:i,signature:a,...o})}async function iL(e,t){const{address:r,factory:n,factoryData:s,signature:a,message:o,primaryType:i,types:c,domain:l,...u}=t,d=RN({message:o,primaryType:i,types:c,domain:l});return se(e,Ni,"verifyHash")({address:r,factory:n,factoryData:s,hash:d,signature:a,...u})}function F6(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=ht(["watchBlockNumber",e.uid,t,r,o]);return Fn(d,{onBlockNumber:n,onError:s},f=>eo(async()=>{var m;try{const y=await se(e,Gi,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(y===c)return;if(y-c>1&&r)for(let g=c+1n;g<y;g++)f.onBlockNumber(g,c),c=g}(c===void 0||y>c)&&(f.onBlockNumber(y,c),c=y)}catch(y){(m=f.onError)==null||m.call(f,y)}},{emitOnBegin:t,interval:o}))})():(()=>{const d=ht(["watchBlockNumber",e.uid,t,r]);return Fn(d,{onBlockNumber:n,onError:s},f=>{let m=!0,y=()=>m=!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:E}=await g.subscribe({params:["newHeads"],onData(v){var A;if(!m)return;const w=Le((A=v.result)==null?void 0:A.number);f.onBlockNumber(w,c),c=w},onError(v){var w;(w=f.onError)==null||w.call(f,v)}});y=E,m||y()}catch(g){s==null||s(g)}})(),()=>y()})})()}async function U6(e,t){const{checkReplacement:r=!0,confirmations:n=1,hash:s,onReplaced:a,retryCount:o=6,retryDelay:i=({count:D})=>~~(1<<D)*200,timeout:c=18e4}=t,l=ht(["waitForTransactionReceipt",e.uid,s]),u=(()=>{var D;return t.pollingInterval?t.pollingInterval:(D=e.chain)!=null&&D.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let d,f,m,y=!1,g,E;const{promise:v,resolve:w,reject:A}=hf(),C=c?setTimeout(()=>{E==null||E(),g==null||g(),A(new b8({hash:s}))},c):void 0;return g=Fn(l,{onReplaced:a,resolve:w,reject:A},async D=>{if(m=await se(e,iu,"getTransactionReceipt")({hash:s}).catch(()=>{}),m&&n<=1){clearTimeout(C),D.resolve(m),g==null||g();return}E=se(e,F6,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:u,async onBlockNumber(L){const T=b=>{clearTimeout(C),E==null||E(),b(),g==null||g()};let h=L;if(!y)try{if(m){if(n>1&&(!m.blockNumber||h-m.blockNumber+1n<n))return;T(()=>D.resolve(m));return}if(r&&!d&&(y=!0,await nu(async()=>{d=await se(e,qf,"getTransaction")({hash:s}),d.blockNumber&&(h=d.blockNumber)},{delay:i,retryCount:o}),y=!1),m=await se(e,iu,"getTransactionReceipt")({hash:s}),n>1&&(!m.blockNumber||h-m.blockNumber+1n<n))return;T(()=>D.resolve(m))}catch(b){if(b instanceof P1||b instanceof I1){if(!d){y=!1;return}try{f=d,y=!0;const x=await nu(()=>se(e,Rr,"getBlock")({blockNumber:h,includeTransactions:!0}),{delay:i,retryCount:o,shouldRetry:({error:F})=>F instanceof Yg});y=!1;const S=x.transactions.find(({from:F,nonce:_})=>F===f.from&&_===f.nonce);if(!S||(m=await se(e,iu,"getTransactionReceipt")({hash:S.hash}),n>1&&(!m.blockNumber||h-m.blockNumber+1n<n)))return;let I="replaced";S.to===f.to&&S.value===f.value&&S.input===f.input?I="repriced":S.from===S.to&&S.value===0n&&(I="cancelled"),T(()=>{var F;(F=D.onReplaced)==null||F.call(D,{reason:I,replacedTransaction:f,transaction:S,transactionReceipt:m}),D.resolve(m)})}catch(x){T(()=>D.reject(x))}}else T(()=>D.reject(b))}}})}),v}function cL(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=ht(["watchBlocks",e.uid,t,r,n,u,c]);return Fn(y,{onBlock:s,onError:a},g=>eo(async()=>{var E;try{const v=await se(e,Rr,"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 A=await se(e,Rr,"getBlock")({blockNumber:w,includeTransactions:u});g.onBlock(A,d),d=A}}((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){(E=g.onError)==null||E.call(g,v)}},{emitOnBegin:n,interval:c}))})():(()=>{let y=!0,g=!0,E=()=>y=!1;return(async()=>{try{n&&se(e,Rr,"getBlock")({blockTag:t,includeTransactions:u}).then(A=>{y&&g&&(s(A,void 0),g=!1)}).catch(a);const v=(()=>{if(e.transport.type==="fallback"){const A=e.transport.transports.find(C=>C.config.type==="webSocket"||C.config.type==="ipc");return A?A.value:e.transport}return e.transport})(),{unsubscribe:w}=await v.subscribe({params:["newHeads"],async onData(A){var D;if(!y)return;const C=await se(e,Rr,"getBlock")({blockNumber:(D=A.result)==null?void 0:D.number,includeTransactions:u}).catch(()=>{});y&&(s(C,d),g=!1,d=C)},onError(A){a==null||a(A)}});E=w,y||E()}catch(v){a==null||a(v)}})(),()=>E()})()}function lL(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 f=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")),m=d??!1;return f?(()=>{const E=ht(["watchEvent",t,r,n,e.uid,s,u,o]);return Fn(E,{onLogs:c,onError:i},v=>{let w;o!==void 0&&(w=o-1n);let A,C=!1;const D=eo(async()=>{var L;if(!C){try{A=await se(e,h6,"createEventFilter")({address:t,args:r,event:s,events:a,strict:m,fromBlock:o})}catch{}C=!0;return}try{let T;if(A)T=await se(e,eu,"getFilterChanges")({filter:A});else{const h=await se(e,Gi,"getBlockNumber")({});w&&w!==h?T=await se(e,Df,"getLogs")({address:t,args:r,event:s,events:a,fromBlock:w+1n,toBlock:h}):T=[],w=h}if(T.length===0)return;if(n)v.onLogs(T);else for(const h of T)v.onLogs([h])}catch(T){A&&T instanceof is&&(C=!1),(L=v.onError)==null||L.call(v,T)}},{emitOnBegin:!0,interval:u});return async()=>{A&&await se(e,tu,"uninstallFilter")({filter:A}),D()}})})():(()=>{let E=!0,v=()=>E=!1;return(async()=>{try{const w=(()=>{if(e.transport.type==="fallback"){const L=e.transport.transports.find(T=>T.config.type==="webSocket"||T.config.type==="ipc");return L?L.value:e.transport}return e.transport})(),A=a??(s?[s]:void 0);let C=[];A&&(C=[A.flatMap(T=>Hi({abi:[T],eventName:T.name,args:r}))],s&&(C=C[0]));const{unsubscribe:D}=await w.subscribe({params:["logs",{address:t,topics:C}],onData(L){var h;if(!E)return;const T=L.result;try{const{eventName:b,args:x}=Jl({abi:A??[],data:T.data,topics:T.topics,strict:m}),S=Xr(T,{args:x,eventName:b});c([S])}catch(b){let x,S;if(b instanceof ol||b instanceof lp){if(d)return;x=b.abiItem.name,S=(h=b.abiItem.inputs)==null?void 0:h.some(F=>!("name"in F&&F.name))}const I=Xr(T,{args:S?[]:{},eventName:x});c([I])}},onError(L){i==null||i(L)}});v=D,E||v()}catch(w){i==null||i(w)}})(),()=>v()})()}function uL(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=ht(["watchPendingTransactions",e.uid,t,a]);return Fn(l,{onTransactions:n,onError:r},u=>{let d;const f=eo(async()=>{var m;try{if(!d)try{d=await se(e,b6,"createPendingTransactionFilter")({});return}catch(g){throw f(),g}const y=await se(e,eu,"getFilterChanges")({filter:d});if(y.length===0)return;if(t)u.onTransactions(y);else for(const g of y)u.onTransactions([g])}catch(y){(m=u.onError)==null||m.call(u,y)}},{emitOnBegin:!0,interval:a});return async()=>{d&&await se(e,tu,"uninstallFilter")({filter:d}),f()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:d}=await e.transport.subscribe({params:["newPendingTransactions"],onData(f){if(!l)return;const m=f.result;n([m])},onError(f){r==null||r(f)}});u=d,l||u()}catch(d){r==null||r(d)}})(),()=>u()})()}function dL(e){var d,f,m;const{scheme:t,statement:r,...n}=((d=e.match(pL))==null?void 0:d.groups)??{},{chainId:s,expirationTime:a,issuedAt:o,notBefore:i,requestId:c,...l}=((f=e.match(fL))==null?void 0:f.groups)??{},u=(m=e.split("Resources:")[1])==null?void 0:m.split(`
|
|
109
|
+
- `).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 pL=/^(?:(?<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)?/,fL=/(?: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 mL(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&&!Ja(n.address,t))return!1}catch{return!1}return!0}async function hL(e,t){const{address:r,domain:n,message:s,nonce:a,scheme:o,signature:i,time:c=new Date,...l}=t,u=dL(s);if(!u.address||!mL({address:r,domain:n,message:u,nonce:a,scheme:o,time:c}))return!1;const f=w6(s);return Ni(e,{address:u.address,hash:f,signature:i,...l})}async function Xf(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:n}){var i,c,l;const s=await e.request({method:"eth_sendRawTransactionSync",params:n?[t,q(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)||Hc)(s);if(o.status==="reverted"&&r)throw new B1({receipt:o});return o}function bL(e){return{call:t=>Mi(e,t),createAccessList:t=>m6(e,t),createBlockFilter:()=>dN(e),createContractEventFilter:t=>Wg(e,t),createEventFilter:t=>h6(e,t),createPendingTransactionFilter:()=>b6(e),estimateContractGas:t=>FM(e,t),estimateGas:t=>Uf(e,t),getBalance:t=>pN(e,t),getBlobBaseFee:()=>fN(e),getBlock:t=>Rr(e,t),getBlockNumber:t=>Gi(e,t),getBlockTransactionCount:t=>mN(e,t),getBytecode:t=>Gl(e,t),getChainId:()=>ls(e),getCode:t=>Gl(e,t),getContractEvents:t=>Qg(e,t),getEip712Domain:t=>bN(e,t),getEnsAddress:t=>KM(e,t),getEnsAvatar:t=>cN(e,t),getEnsName:t=>lN(e,t),getEnsResolver:t=>uN(e,t),getEnsText:t=>f6(e,t),getFeeHistory:t=>xN(e,t),estimateFeesPerGas:t=>BM(e,t),getFilterChanges:t=>eu(e,t),getFilterLogs:t=>wN(e,t),getGasPrice:()=>Sf(e),getLogs:t=>Df(e,t),getProof:t=>WN(e,t),estimateMaxPriorityFeePerGas:t=>IM(e,t),fillTransaction:t=>If(e,t),getStorageAt:t=>qN(e,t),getTransaction:t=>qf(e,t),getTransactionConfirmations:t=>YN(e,t),getTransactionCount:t=>Pf(e,t),getTransactionReceipt:t=>iu(e,t),multicall:t=>KN(e,t),prepareTransactionRequest:t=>$i(e,t),readContract:t=>zr(e,t),sendRawTransaction:t=>Nf(e,t),sendRawTransactionSync:t=>Xf(e,t),simulate:t=>Yf(e,t),simulateBlocks:t=>Yf(e,t),simulateCalls:t=>aL(e,t),simulateContract:t=>DM(e,t),verifyHash:t=>Ni(e,t),verifyMessage:t=>oL(e,t),verifySiweMessage:t=>hL(e,t),verifyTypedData:t=>iL(e,t),uninstallFilter:t=>tu(e,t),waitForTransactionReceipt:t=>U6(e,t),watchBlocks:t=>cL(e,t),watchBlockNumber:t=>F6(e,t),watchContractEvent:t=>HM(e,t),watchEvent:t=>lL(e,t),watchPendingTransactions:t=>uL(e,t)}}function yL(e){const{key:t="public",name:r="Public Client"}=e;return o6({...e,key:t,name:r,type:"publicClient"}).extend(bL)}async function gL(e,{chain:t}){const{id:r,name:n,nativeCurrency:s,rpcUrls:a,blockExplorers:o}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:q(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 xL(e,t){const{abi:r,args:n,bytecode:s,...a}=t,o=Vl({abi:r,args:n,bytecode:s});return ru(e,{...a,...a.authorizationList?{to:null}:{},data:o})}async function wL(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=>Ho(n))}async function vL(e,t={}){const{account:r=e.account,chainId:n}=t,s=r?Ke(r):void 0,a=n?[s==null?void 0:s.address,[q(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 EL(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function O6(e,t){var c;const{account:r=e.account,chainId:n,nonce:s}=t;if(!r)throw new En({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 se(e,ls,"getChainId")({})),typeof i.nonce>"u"&&(i.nonce=await se(e,Pf,"getTransactionCount")({address:a.address,blockTag:"pending"}),(o==="self"||o!=null&&o.address&&Ja(o.address,a.address))&&(i.nonce+=1)),i}async function kL(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(r=>Jd(r))}async function CL(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function TL(e,t){const{chain:r=e.chain}=t,n=t.timeout??Math.max(((r==null?void 0:r.blockTime)??0)*3,5e3),s=await r6(e,t);return await s6(e,{...t,id:s.id,timeout:n})}const Qf=new Da(128);async function D6(e,t){var D,L,T,h;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:f,nonce:m,pollingInterval:y,throwOnReceiptRevert:g,type:E,value:v,...w}=t,A=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof r>"u")throw new En({docsPath:"/docs/actions/wallet/sendTransactionSync"});const C=r?Ke(r):null;try{en(t);const b=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await Wl({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 se(e,ls,"getChainId")({}),cp({currentChainId:x,chain:n}));const S=(T=(L=(D=e.chain)==null?void 0:D.formatters)==null?void 0:L.transactionRequest)==null?void 0:T.format,F=(S||_r)({...Ws(w,{format:S}),accessList:s,account:C,authorizationList:a,blobs:o,chainId:x,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,to:b,type:E,value:v},"sendTransaction"),_=Qf.get(e.uid),k=_?"wallet_sendTransaction":"eth_sendTransaction",P=await(async()=>{try{return await e.request({method:k,params:[F]},{retryCount:0})}catch(U){if(_===!1)throw U;const z=U;if(z.name==="InvalidInputRpcError"||z.name==="InvalidParamsRpcError"||z.name==="MethodNotFoundRpcError"||z.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[F]},{retryCount:0}).then(H=>(Qf.set(e.uid,!0),H)).catch(H=>{const G=H;throw G.name==="MethodNotFoundRpcError"||G.name==="MethodNotSupportedRpcError"?(Qf.set(e.uid,!1),z):G});throw z}})(),O=await se(e,U6,"waitForTransactionReceipt")({checkReplacement:!1,hash:P,pollingInterval:y,timeout:A});if(g&&O.status==="reverted")throw new B1({receipt:O});return O}if((C==null?void 0:C.type)==="local"){const x=await se(e,$i,"prepareTransactionRequest")({account:C,accessList:s,authorizationList:a,blobs:o,chain:n,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,nonceManager:C.nonceManager,parameters:[...Bf,"sidecars"],type:E,value:v,...w,to:b}),S=(h=n==null?void 0:n.serializers)==null?void 0:h.transaction,I=await C.signTransaction(x,{serializer:S});return await se(e,Xf,"sendRawTransactionSync")({serializedTransaction:I,throwOnReceiptRevert:g})}throw(C==null?void 0:C.type)==="smart"?new Hs({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Hs({docsPath:"/docs/actions/wallet/sendTransactionSync",type:C==null?void 0:C.type})}catch(b){throw b instanceof Hs?b:Ql(b,{...t,account:C,chain:t.chain||void 0})}}async function SL(e,t){const{id:r}=t;await e.request({method:"wallet_showCallsStatus",params:[r]})}async function AL(e,t){const{account:r=e.account}=t;if(!r)throw new En({docsPath:"/docs/eip7702/signAuthorization"});const n=Ke(r);if(!n.signAuthorization)throw new Hs({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const s=await O6(e,t);return n.signAuthorization(s)}async function PL(e,{account:t=e.account,message:r}){if(!t)throw new En({docsPath:"/docs/actions/wallet/signMessage"});const n=Ke(t);if(n.signMessage)return n.signMessage({message:r});const s=typeof r=="string"?Sa(r):r.raw instanceof Uint8Array?Ue(r.raw):r.raw;return e.request({method:"personal_sign",params:[s,n.address]},{retryCount:0})}async function IL(e,t){var l,u,d,f;const{account:r=e.account,chain:n=e.chain,...s}=t;if(!r)throw new En({docsPath:"/docs/actions/wallet/signTransaction"});const a=Ke(r);en({account:a,...t});const o=await se(e,ls,"getChainId")({});n!==null&&cp({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)||_r;return a.signTransaction?a.signTransaction({...s,chainId:o},{serializer:(f=(d=e.chain)==null?void 0:d.serializers)==null?void 0:f.transaction}):await e.request({method:"eth_signTransaction",params:[{...c({...s,account:a},"signTransaction"),chainId:q(o),from:a.address}]},{retryCount:0})}async function BL(e,t){const{account:r=e.account,domain:n,message:s,primaryType:a}=t;if(!r)throw new En({docsPath:"/docs/actions/wallet/signTypedData"});const o=Ke(r),i={EIP712Domain:E6({domain:n}),...t.types};if(v6({domain:n,message:s,primaryType:a,types:i}),o.signTypedData)return o.signTypedData({domain:n,message:s,primaryType:a,types:i});const c=LN({domain:n,message:s,primaryType:a,types:i});return e.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function FL(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:q(t)}]},{retryCount:0})}async function UL(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function OL(e,t){return ji.internal(e,D6,"sendTransactionSync",t)}function DL(e){return{addChain:t=>gL(e,t),deployContract:t=>xL(e,t),fillTransaction:t=>If(e,t),getAddresses:()=>wL(e),getCallsStatus:t=>n6(e,t),getCapabilities:t=>vL(e,t),getChainId:()=>ls(e),getPermissions:()=>EL(e),prepareAuthorization:t=>O6(e,t),prepareTransactionRequest:t=>$i(e,t),requestAddresses:()=>kL(e),requestPermissions:t=>CL(e,t),sendCalls:t=>r6(e,t),sendCallsSync:t=>TL(e,t),sendRawTransaction:t=>Nf(e,t),sendRawTransactionSync:t=>Xf(e,t),sendTransaction:t=>ru(e,t),sendTransactionSync:t=>D6(e,t),showCallsStatus:t=>SL(e,t),signAuthorization:t=>AL(e,t),signMessage:t=>PL(e,t),signTransaction:t=>IL(e,t),signTypedData:t=>BL(e,t),switchChain:t=>FL(e,t),waitForCallsStatus:t=>s6(e,t),watchAsset:t=>UL(e,t),writeContract:t=>ji(e,t),writeContractSync:t=>OL(e,t)}}function _L(e){const{key:t="wallet",name:r="Wallet Client",transport:n}=e;return o6({...e,key:t,name:r,transport:n,type:"walletClient"}).extend(DL)}function _6({key:e,methods:t,name:r,request:n,retryCount:s=3,retryDelay:a=150,timeout:o,type:i},c){const l=a6();return{config:{key:e,methods:t,name:r,request:n,retryCount:s,retryDelay:a,timeout:o,type:i},request:EN(n,{methods:t,retryCount:s,retryDelay:a,uid:l}),value:c}}function ML(e,t={}){const{key:r="custom",methods:n,name:s="Custom Provider",retryDelay:a}=t;return({retryCount:o})=>_6({key:r,methods:n,name:s,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:a,type:"custom"})}class NL 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 LL(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:f,retryCount:m,timeout:y})=>{const{batchSize:g=1e3,wait:E=0}=typeof r=="object"?r:{},v=t.retryCount??m,w=y??t.timeout??1e4,A=f==null?void 0:f.rpcUrls.default.http[0];if(!A)throw new NL;const C=UN(A,{fetchFn:n,fetchOptions:s,onRequest:c,onResponse:l,timeout:w});return _6({key:a,methods:o,name:i,async request({method:D,params:L}){const T={method:D,params:L},{schedule:h}=Tg({id:A,wait:E,shouldSplitBatch(I){return I.length>g},fn:I=>C.request({body:I}),sort:(I,F)=>I.id-F.id}),b=async I=>r?h(I):[await C.request({body:I})],[{error:x,result:S}]=await b(T);if(d)return{error:x,result:S};if(x)throw new vp({body:T,error:x,url:A});return S},retryCount:v,retryDelay:u,timeout:w,type:"http"},{fetchOptions:s,url:A})}}function zL(e){const{r:t,s:r}=Fi.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:q(t,{size:32}),s:q(r,{size:32}),v:s,yParity:a}:{r:q(t,{size:32}),s:q(r,{size:32}),yParity:a}}const RL=(e,t)=>{const r=Object.values(CM).find(o=>o.id===e);if(!r)return{walletClient:void 0,publicClient:void 0};const n=t?ML(t):void 0,s=n?_L({chain:r,transport:n}):void 0,a=yL({chain:r,transport:n||LL()});return{walletClient:s,publicClient:a}},HL=()=>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 $L({children:e}){return B.jsx(d3,{FallbackComponent:HL,onError:t=>dt.onCrash(t),children:B.jsx(B.Fragment,{children:e})})}const Jf=M.createContext({}),GL=new Zw({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),jL=e=>{var n,s,a;const t=Z(o=>o.updateState),r=Z(o=>o.state.isMarketOrder);return M.useEffect(()=>{setInterval(()=>{t({currentTime:Date.now()})},6e4)},[t]),M.useEffect(()=>{var o,i,c,l,u,d,f,m,y,g,E,v;t({isMarketOrder:e.module!==ge.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:(m=(f=e.overrides)==null?void 0:f.state)==null?void 0:m.duration,typedLimitPrice:(g=(y=e.overrides)==null?void 0:y.state)==null?void 0:g.limitPrice,typedTriggerPrice:(v=(E=e.overrides)==null?void 0:E.state)==null?void 0:v.triggerPrice,triggerPricePercent:void 0,limitPricePercent:void 0})},[(n=e.overrides)==null?void 0:n.state,e.module]),M.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]),M.useEffect(()=>{e.module===ge.LIMIT&&t({isMarketOrder:!1})},[e.module]),M.useEffect(()=>{r&&t({isInvertedTrade:!1})},[r]),null},VL=({marketReferencePrice:e,srcToken:t,dstToken:r,chainId:n})=>{const s=Z(a=>a.state.typedSrcAmount);return M.useMemo(()=>{if(Ad(t,r,n)||Pd(t,r,n))return{isLoading:!1,noLiquidity:!1,value:Pc((t==null?void 0:t.decimals)||18,s||"0")};if(j(e.value||0).isZero()||j(s||0).isZero())return e;const a=j(e.value||0).dividedBy(s||0).toFixed();return{...e,value:a}},[e,s,t,r,n])},WL=e=>{const t=Fo(Uc.MIN_CHUNK_SIZE_USD);return t?parseInt(t):e},qL=e=>{const t=Z(l=>l.state.acceptedMarketPrice),{walletClient:r,publicClient:n}=M.useMemo(()=>RL(e.chainId,e.provider),[e.chainId,e.provider]),s=M.useMemo(()=>zm(e.partner),[e.partner]),a=M.useMemo(()=>{const l=s[0];return e.chainId&&s.includes(e.chainId)?e.chainId:l},[e.chainId,s]),o=M.useMemo(()=>cd(e.partner,a),[e.partner,a]),i=VL(e),c=M.useMemo(()=>WL(e.minChunkSizeUsd),[e.minChunkSizeUsd]);return M.useEffect(()=>{dt.init(o,c,a)},[o,a,c]),B.jsxs(Jf.Provider,{value:{minChunkSizeUsd:c,account:e.account,walletClient:r,publicClient:n,marketPrice:t||i.value,marketPriceLoading:!t&&i.isLoading,noLiquidity:!t&&i.noLiquidity,config:o,slippage:e.priceProtection,supportedChains:s,chainId:a,partner:e.partner,module:e.module,fees:e.fees||0,components:e.components,overrides:e.overrides,callbacks:e.callbacks,getTranslation:e.getTranslation,translations:e.translations,useToken:e.useToken,refetchBalances:e.refetchBalances,srcUsd1Token:e.srcUsd1Token,dstUsd1Token:e.dstUsd1Token,srcBalance:e.srcBalance,dstBalance:e.dstBalance,srcToken:e.srcToken,dstToken:e.dstToken},children:[B.jsx(jL,{...e}),B.jsx($L,{children:e.children})]})},YL=e=>B.jsx(Xw,{client:GL,children:B.jsx(qL,{...e})}),ne=()=>{if(!Jf)throw new Error("useSpotContext must be used within a WidgetProvider");return M.useContext(Jf)},KL=2e4,ZL=[{text:"Minutes",value:Gt.Minutes},{text:"Hours",value:Gt.Hours},{text:"Days",value:Gt.Days}],XL="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 e0={},QL=[{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/"}],t0={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},r0=M.createContext&&M.createContext(t0),us=function(){return us=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},us.apply(this,arguments)},JL=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 M.createElement(t.tag,us({key:r},t.attr),M6(t.child))})}function ez(e){return function(t){return M.createElement(N6,us({attr:us({},e.attr)},t),M6(e.child))}}function N6(e){var t=function(r){var n=e.attr,s=e.size,a=e.title,o=JL(e,["attr","size","title"]),i=s||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),M.createElement("svg",us({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:c,style:us(us({color:e.color||r.color},r.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),a&&M.createElement("title",null,a),e.children)};return r0!==void 0?M.createElement(r0.Consumer,null,function(r){return t(r)}):t(t0)}const uu=tw(Object.freeze(Object.defineProperty({__proto__:null,DefaultContext:t0,GenIcon:ez,IconBase:N6,IconContext:r0,IconsManifest:QL},Symbol.toStringTag,{value:"Module"})));var L6;function tz(){if(L6)return e0;L6=1;var e=uu.GenIcon;return e0.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)},e0}var rz=tz(),n0={},z6;function nz(){if(z6)return n0;z6=1;var e=uu.GenIcon;return n0.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)},n0}var sz=nz();//! moment.js
|
|
110
110
|
//! version : 2.30.1
|
|
111
111
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
112
112
|
//! license : MIT
|
|
@@ -123,4 +123,4 @@ te.version="2.30.1",az(Je),te.fn=Y,te.min=qR,te.max=YR,te.now=KR,te.utc=rn,te.un
|
|
|
123
123
|
Prefix can't start with '-' when allowNegative is true.
|
|
124
124
|
prefix: `+s+`
|
|
125
125
|
allowNegative: `+a+`
|
|
126
|
-
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function vG(e){e=wG(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=L0);var a=e.onBlur;a===void 0&&(a=L0);var o=e.thousandSeparator,i=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,m=e.onValueChange,y=aG(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=Uu(e),E=g.decimalSeparator,v=g.allowedDecimalSeparators,w=function(P){return j2(P,e)},A=function(P,O){return gG(P,O,e)},C=fo(d)?u:d,D=f??yG(C,l,t);fo(d)?fo(u)||(D=D||typeof u=="number"):D=D||typeof d=="number";var L=function(P){return L2(P)?P:(typeof P=="number"&&(P=$2(P)),D&&typeof i=="number"?G2(P,i,!!c):P)},T=mG(L(d),L(u),!!D,w,A,m),h=T[0],b=h.numAsString,x=h.formattedValue,S=T[1],I=function(P){var O=P.target,U=P.key,z=O.selectionStart,H=O.selectionEnd,G=O.value;if(G===void 0&&(G=""),(U==="Backspace"||U==="Delete")&&H<l.length){P.preventDefault();return}if(z!==H){s(P);return}U==="Backspace"&&G[0]==="-"&&z===l.length+1&&r&&sc(O,1),i&&c&&(U==="Backspace"&&G[z-1]===E?(sc(O,z-1),P.preventDefault()):U==="Delete"&&G[z]===E&&P.preventDefault()),v!=null&&v.includes(U)&&G[z]===E&&sc(O,z+1);var J=o===!0?",":o;U==="Backspace"&&G[z-1]===J&&sc(O,z-1),U==="Delete"&&G[z]===J&&sc(O,z+1),s(P)},F=function(P){var O=b;if(O.match(/\d/g)||(O=""),n||(O=dG(O)),c&&i&&(O=G2(O,i,c)),O!==b){var U=j2(O,e);S({formattedValue:U,value:O,floatValue:parseFloat(O)},{event:P,source:N0.event})}a(P)},_=function(P){return P===E?!0:N2(P)},k=function(P){var O=P.currentValue,U=P.lastValue,z=P.formattedValue,H=P.currentValueIndex,G=P.formattedValueIndex,J=O[H],pe=z[G],he=pG(U,O),ie=he.to,de=function(Be){return A(Be).indexOf(".")+l.length};return d===0&&c&&i&&O[ie.start]===E&&de(O)<H&&de(z)>G?!1:H>=ie.start&&H<ie.end&&v&&v.includes(J)&&pe===E?!0:J===pe};return Object.assign(Object.assign({},y),{value:x,valueIsNumericString:!1,isValidInputCharacter:_,isCharacterSame:k,onValueChange:S,format:w,removeFormatting:A,getCaretBoundary:function(P){return xG(P,e)},onKeyDown:I,onBlur:F})}const V2=(e,t)=>M.useMemo(()=>Pc(e,t),[e,t]),Vr=(e,t)=>M.useMemo(()=>bn(e,t),[e,t]),ac=()=>{const{chainId:e}=ne();return M.useMemo(()=>Bs(e),[e])},R0=e=>{const t=ac();return M.useMemo(()=>{if(!(!e||!t))return _o(e,t.id)},[e,t])},aa=(e,t)=>M.useMemo(()=>!e||!t||j(e||"0").isZero()||j(t||"0").isZero()?"":j(e||"0").times(t).toFixed(),[e,t]),EG=()=>{const{srcToken:e,dstToken:t,chainId:r}=ne();return M.useMemo(()=>Ad(e,t,r),[e,t,r])},kG=()=>{const{srcToken:e,dstToken:t,chainId:r}=ne();return M.useMemo(()=>Pd(e,t,r),[e,t,r])},CG=()=>{const e=EG(),t=kG();return e||t},H0=e=>{const{overrides:t}=ne();return M.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 TG(){const{callbacks:e}=ne();return M.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 SG=(e,t)=>M.useMemo(()=>Do(e==null?void 0:e.toString(),t),[e,t]),ze=({value:e,decimalScale:t=3,prefix:r,suffix:n})=>{var c;const s=SG(e,t),{overrides:a}=ne(),o=a==null?void 0:a.numberFormat,i=vG({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()},AG={expirationTooltip:"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.",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.",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",tradeIntervalLabel:"Trade interval",expirationLabel:"Expiration",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 {minChunks}",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",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 PG(e){let t=e;const r=/\{[^{}]*\}/g;for(;r.test(t);)t=t.replace(r,"");return t}const Ue=()=>{const e=ne();return M.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])||AG[r];return PG(a.replace(/{(\w+)}/g,(c,l)=>(n==null?void 0:n[l])||c))},[e.getTranslation,e.translations])},Ou=({value:e})=>{const t=ze({value:e,decimalScale:2});return t?B.jsx("small",{className:"twap-order-details__detail-row-value-usd",children:` ($${t})`}):null},IG=({deadline:e,label:t,tooltip:r})=>{const n=H0(e);return B.jsx(hr,{title:t,tooltip:r,children:n})},BG=({price:e,dstToken:t,label:r,tooltip:n,usd:s})=>{const a=ze({value:e});return j(e||0).isZero()?null:B.jsx(hr,{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(Ou,{value:s})]})})},FG=({price:e,dstToken:t,percentage:r,isMarketOrder:n})=>{const s=ze({value:e}),a=Ue();return n?null:B.jsx(hr,{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}%)`})]})})},UG=({tradeSize:e,srcToken:t,trades:r,label:n,tooltip:s})=>r===1?null:B.jsx(hr,{title:n,tooltip:s,children:`${e||"-"} ${(t==null?void 0:t.symbol)||""}`}),OG=({dstToken:e,dstMinAmountOut:t,label:r,tooltip:n,usd:s})=>{const a=ze({value:t});return j(t||0).isZero()?null:B.jsxs(hr,{title:r,tooltip:n,children:[`${t?a:"-"} ${e==null?void 0:e.symbol}`,B.jsx(Ou,{value:s})]})},DG=({trades:e,label:t,tooltip:r})=>e===1?null:B.jsx(hr,{title:t,tooltip:r,children:e}),_G=()=>{var s;const e=Ue(),{account:t}=ne(),r=(s=ac())==null?void 0:s.explorer,n=Cd(t);return B.jsx(hr,{title:e("recipient")||"",children:r?B.jsx("a",{href:`${r}/address/${t}`,target:"_blank",children:n}):n})},MG=({fillDelayMillis:e,chunks:t=0,label:r,tooltip:n})=>{const s=M.useMemo(()=>o1(e),[e]);return t===1?null:B.jsx(hr,{title:r,tooltip:n,children:s})},hr=({title:e,tooltip:t,children:r,className:n="",onClick:s,style:a})=>{const{components:o}=ne(),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})]})},NG=({id:e})=>{const{components:t}=ne(),r=t==null?void 0:t.Tooltip,n=TG();return e.startsWith("0x")?B.jsx(hr,{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:Cd(e)}),B.jsx(sz.AiOutlineCopy,{})]})})}):B.jsx(hr,{title:"ID",children:e})},LG=({version:e})=>B.jsx(hr,{title:"Version",children:e});function we({children:e,className:t=""}){return B.jsx("div",{className:`${t} twap-order-details`,children:e})}const zG=({children:e})=>e,RG=({fees:e,label:t,usd:r,dstTokenSymbol:n})=>{const s=ze({value:e});return B.jsxs(hr,{title:t,children:[`${e?s:"-"} ${n}`,B.jsx(Ou,{value:r})]})};we.Deadline=IG,we.Fees=RG,we.TradeSize=UG,we.MinDestAmount=OG,we.TradesAmount=DG,we.Recipient=_G,we.TradeInterval=MG,we.DetailRow=hr,we.TriggerPrice=BG,we.LimitPrice=FG,we.OrderID=NG,we.Container=zG,we.OrderVersion=LG,we.USD=Ou;const $0=()=>{const{publicClient:e}=ne();return gn({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},G0=()=>{const{account:e,walletClient:t,publicClient:r,config:n,callbacks:s,chainId:a}=ne(),o=$0(),i=Z(u=>u.updateState),c=async u=>{dt.onCancelOrderRequest(u.map(d=>d.id.toString()),1);try{return(await Promise.all(u.map(f=>t.writeContract({account:e,address:f.twapAddress,abi:Dm,functionName:"cancel",args:[f.id],chain:t.chain}))))[0]}catch(d){throw dt.onCancelOrderError(d),d}},l=async u=>{var d;try{dt.onCancelOrderRequest(u.map(y=>y.hash),2);const f=await t.writeContract({account:e,address:n.repermit,abi:Om,functionName:"cancel",args:[u.map(y=>y.hash)],chain:t.chain}),m=await o(f);if(!m)throw new Error("failed to get transaction receipt");if(m.status==="reverted")throw new Error("failed to cancel order");return dt.onCancelOrderSuccess(f),(d=s==null?void 0:s.onCancelOrderSuccess)==null||d.call(s,{orders:u,txHash:f,explorerUrl:_o(f,a)}),m.transactionHash}catch(f){throw dt.onCancelOrderError(f),f}};return gn({mutationFn:async({orders:u})=>{var d,f;if(!e||!t||!r||!n)throw new Error("missing required parameters");try{(d=s==null?void 0:s.onCancelOrderRequest)==null||d.call(s,u),i({cancelOrderStatus:mt.LOADING,cancelOrderTxHash:void 0,cancelOrderError:void 0});const m=u.filter(v=>v.version===1),y=u.filter(v=>v.version===2),[g,E]=await Promise.all([m.length?c(m):Promise.resolve(""),y.length?l(y):Promise.resolve("")]);return i({cancelOrderStatus:mt.SUCCESS,orderIdsToCancel:[]}),[...g||[],E]}catch(m){console.error("cancel order error",m),(f=s==null?void 0:s.onCancelOrderFailed)==null||f.call(s,m),Td(m)?i({cancelOrderStatus:void 0}):(i({cancelOrderStatus:mt.FAILED}),dt.onCancelOrderError(m))}}})},W2=e=>{const t=Ue();return M.useMemo(()=>e?e.type===ut.TRIGGER_PRICE_MARKET?t("triggerPriceMarket"):e.type===ut.TRIGGER_PRICE_LIMIT?t("triggerPriceLimit"):e.type===ut.TWAP_MARKET?t("twapMarket"):e.type===ut.TWAP_LIMIT?t("twapLimit"):t("twapMarket"):t("twapMarket"),[t,e==null?void 0:e.type])},j0=()=>{const{account:e,config:t,chainId:r}=ne();return M.useMemo(()=>["useTwapOrderHistoryManager",e,t==null?void 0:t.partner,r],[e,t,r])},HG=()=>{const e=Nc(),{account:t}=ne(),r=j0();return M.useCallback(n=>{e.setQueryData(r,s=>s?s!=null&&s.some(a=>a.id===n.id)?s:[n,...s]:[n])},[e,r,t])},$G=()=>{const{callbacks:e,refetchBalances:t}=ne(),r=Nc(),n=j0();return M.useCallback(s=>{var c;const a=r.getQueryData(n);let o=!1;const i=[];a&&a.forEach(l=>{var d;const u=s.find(f=>f.id===l.id);u&&u.progress!==l.progress&&(o=!0,i.push(u),u.status===lt.Completed&&((d=e==null?void 0:e.onOrderFilled)==null||d.call(e,u)))}),o&&((c=e==null?void 0:e.onOrdersProgressUpdate)==null||c.call(e,i),t==null||t())},[r,n,e,t])},GG=()=>{const{account:e,config:t,chainId:r}=ne(),n=j0(),s=$G();return l3({refetchInterval:KL,refetchOnWindowFocus:!0,retry:!1,staleTime:1/0,queryKey:n,queryFn:async({signal:a})=>{if(!e||!r||!t)return[];const o=await Ph({signal:a,chainId:r,config:t.twapConfig,account:e});return s(o),o.map(i=>t!=null&&t.twapConfig?{...i,fillDelayMillis:td(i,t.twapConfig)}:i)}})},Du=()=>{const{data:e,isLoading:t,error:r,refetch:n,isRefetching:s}=GG(),{mutateAsync:a}=G0();return M.useMemo(()=>({orders:{all:e??[],open:_u(e??[],lt.Open),completed:_u(e??[],lt.Completed),expired:_u(e??[],lt.Expired),canceled:_u(e??[],lt.Canceled)},isLoading:t,error:r,refetch:()=>n().then(o=>o.data),cancelOrder:a,isRefetching:s}),[e,t,r,n,a,s])},q2=()=>{const e=Z(r=>r.state.orderHistoryStatusFilter),{orders:t}=Du();return M.useMemo(()=>e?t.all.filter(r=>r.status.toLowerCase()===e.toLowerCase())||[]:t.all,[e,t])},_u=(e,t)=>e.filter(r=>r.status===t).sort((r,n)=>n.createdAt-r.createdAt),jG=(e,t,r)=>M.useMemo(()=>{if(!(!e||!t||!r||r!=null&&r.isMarketPrice))return c1(r,e==null?void 0:e.decimals,t==null?void 0:t.decimals)},[r,e,t]),VG=(e,t,r)=>M.useMemo(()=>{if(!(!e||!t||!r))return i1(r,e.decimals,t.decimals)},[r,e,t]),Y2=()=>{const e=Z(r=>r.updateState),t=Z(r=>r.state.orderIdsToCancel);return M.useCallback(r=>{t!=null&&t.includes(r)?e({orderIdsToCancel:t==null?void 0:t.filter(n=>n!==r)}):e({orderIdsToCancel:[...t||[],r]})},[e,t])},WG=()=>{var T,h;const e=Ue(),{orders:t,isLoading:r,refetch:n,isRefetching:s}=Du(),{mutateAsync:a,isPending:o}=G0(),i=q2(),c=Z(b=>b.updateState),l=Z(b=>b.state.orderHistoryStatusFilter),u=Z(b=>b.state.cancelOrdersMode),d=Z(b=>b.state.orderIdsToCancel),f=M.useCallback(b=>c({cancelOrdersMode:b,orderIdsToCancel:[]}),[c]),m=M.useCallback(()=>c({selectedOrderID:void 0}),[c]),y=M.useCallback(b=>a({orders:b}),[a]),g=M.useCallback(b=>c({orderHistoryStatusFilter:b}),[]),E=M.useMemo(()=>{const b=Object.keys(lt).map(x=>({text:x,value:x}));return[{text:e("allOrders"),value:""},...b]},[e]),v=Y2(),w=Z(b=>b.state.selectedOrderID),A=Z2(w),C=M.useMemo(()=>t.all.filter(b=>d==null?void 0:d.includes(b.id)),[t,d]),D=M.useCallback(()=>c({orderIdsToCancel:t.open.map(b=>b.id)}),[c,t]),L=M.useCallback(b=>a({orders:[b]}).then(x=>(x==null?void 0:x[0])||""),[a]);return{refetch:n,onHideSelectedOrder:m,onCancelOrders:y,onCancelOrder:L,onSelectStatus:g,onToggleCancelOrdersMode:f,onSelectOrder:v,isRefetching:s,orders:t,ordersToDisplay:i,isLoading:r,selectedOrder:w?A:void 0,openOrdersCount:((T=t==null?void 0:t.open)==null?void 0:T.length)||0,isCancelOrdersLoading:o,selectedStatus:l||((h=E[0])==null?void 0:h.value)||"",statuses:E,cancelOrdersMode:u,ordersToCancel:C,onSelectAllOrdersToCancel:D}},K2=e=>{const t=Ue(),r=ze({value:e.srcAmount}),n=ze({value:e.limitPrice}),s=ze({value:e.limitPriceUsd}),a=ze({value:e.srcAmountPerTrade}),o=ze({value:e.srcAmountPerTradeUsd,decimalScale:2}),i=ze({value:e.minDestAmountPerTrade}),c=ze({value:e.minDestAmountPerTradeUsd,decimalScale:2}),l=ze({value:e.triggerPricePerTrade}),u=ze({value:e.triggerPricePerTradeUsd,decimalScale:2}),d=ze({value:e.srcUsd,decimalScale:2}),f=ze({value:e.dstUsd,decimalScale:2}),m=ze({value:e.dstAmount});return M.useMemo(()=>({srcToken:e.srcToken,dstToken:e.dstToken,srcUsd:d||"",dstUsd:f||"",limitPrice:{label:t("limitPrice"),value:n||"",usd:s||""},deadline:{tooltip:t("expirationTooltip"),label:t("expirationLabel"),value:e.deadline||0},srcAmount:{label:t("amountOut"),value:r||"",usd:d||""},dstAmount:{value:m||"",usd:f||""},sizePerTrade:{tooltip:t("tradeSizeTooltip"),label:t("individualTradeSize"),value:a||"",usd:o},totalTrades:{tooltip:t("totalTradesTooltip"),label:t("numberOfTrades"),value:e.totalTrades||0},minDestAmountPerTrade:{tooltip:t("minDstAmountTooltip"),label:t(e.totalTrades&&e.totalTrades>1?"minReceivedPerTrade":"minReceived"),value:i||"",usd:c},tradeInterval:{tooltip:t("tradeIntervalTootlip"),label:t("tradeIntervalLabel"),value:e.tradeInterval||0},triggerPricePerTrade:{tooltip:t("triggerPriceTooltip"),label:t(e.totalTrades&&e.totalTrades>1?"triggerPricePerChunk":"triggerPrice"),value:l||"",usd:u},recipient:{label:t("recipient"),value:e.account||""}}),[d,f,n,r,a,o,i,l,u,n,s,m,f,c])},Z2=e=>{const{orders:t}=Du(),{useToken:r,config:n}=ne(),s=Ue(),a=M.useMemo(()=>t==null?void 0:t.all.find(C=>C.id===e),[t,e])||{},o=W2(a),i=r==null?void 0:r(a==null?void 0:a.srcTokenAddress),c=r==null?void 0:r(a==null?void 0:a.dstTokenAddress),l=Vr(i==null?void 0:i.decimals,a==null?void 0:a.srcAmount),u=jG(i,c,a),d=ze({value:VG(i,c,a)}),f=ze({value:Vr(i==null?void 0:i.decimals,a==null?void 0:a.srcAmountFilled)}),m=ze({value:Vr(c==null?void 0:c.decimals,a==null?void 0:a.dstAmountFilled)}),y=ze({value:a==null?void 0:a.progress,decimalScale:2}),g=Vr(i==null?void 0:i.decimals,a==null?void 0:a.srcAmountPerTrade),E=Vr(c==null?void 0:c.decimals,a==null?void 0:a.dstMinAmountPerTrade),v=Vr(c==null?void 0:c.decimals,a==null?void 0:a.triggerPricePerTrade),w=M.useMemo(()=>a?a.version===2?a.fillDelay:n.twapConfig?td(a,n.twapConfig):0:0,[a,n]),A=K2({srcToken:i,dstToken:c,account:a==null?void 0:a.maker,limitPrice:u,deadline:a==null?void 0:a.deadline,tradeInterval:w,srcAmount:l,totalTrades:a==null?void 0:a.totalTradesAmount,srcAmountPerTrade:g,minDestAmountPerTrade:E,triggerPricePerTrade:v});return M.useMemo(()=>({original:a,title:o,...A,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:f},amountOutFilled:{label:s("amountReceived"),value:m,token:c},progress:{label:s("progress"),value:y},excecutionPrice:{label:s((a==null?void 0:a.totalTradesAmount)===1?"finalExcecutionPrice":"averageExecutionPrice"),value:d},version:{label:s("version"),value:a==null?void 0:a.version}}),[a,s,d,f,m,y,o,i,c,A])},X2=M.createContext({}),Rt=()=>M.useContext(X2),qG=()=>{const e=Z(c=>c.state.selectedOrderID),t=Z2(e),r=Ue(),[n,s]=M.useState("panel1"),{components:a}=ne(),o=a.TokenLogo;M.useEffect(()=>{s("panel1")},[t.id.value]);const i=c=>{s(n===c?!1:c)};return t?B.jsx(X2.Provider,{value:{order:t},children:B.jsxs("div",{className:"twap-orders__selected-order",children:[B.jsx(a1,{SrcTokenLogo:o&&B.jsx(o,{token:t.srcToken}),DstTokenLogo:o&&B.jsx(o,{token:t.dstToken}),fromTitle:r("from"),inToken:t.srcToken,toTitle:r("to"),outToken:t.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(Q2,{title:r("excecutionSummary"),onClick:()=>i("panel1"),expanded:n==="panel1",children:B.jsx(rj,{})}),B.jsx(Q2,{title:r("orderInfo"),expanded:n==="panel2",onClick:()=>i("panel2"),children:B.jsx(YG,{})})]}),B.jsx(sj,{})]})})]})}):null},Q2=({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(rz.IoIosArrowDown,{style:{transform:e?"rotate(180deg)":"rotate(0deg)"}})]}),e&&B.jsx("div",{className:"twap-orders__selected-order-accordion-details",children:r})]}),YG=()=>B.jsxs(we,{children:[B.jsx(tj,{}),B.jsx(aj,{}),B.jsx(QG,{}),B.jsx(oj,{}),B.jsx(KG,{}),B.jsx(ZG,{}),B.jsx(XG,{}),B.jsx(JG,{}),B.jsx(ej,{}),B.jsx(dj,{}),B.jsx(we.Recipient,{})]}),KG=()=>{const{order:e}=Rt();return B.jsx(we.TradeSize,{tradeSize:e.sizePerTrade.value,srcToken:e.srcToken,label:e.sizePerTrade.label,tooltip:e.sizePerTrade.tooltip,trades:e.totalTrades.value})},ZG=()=>{const{order:e}=Rt();return B.jsx(we.TradesAmount,{trades:e.totalTrades.value,label:e.totalTrades.label,tooltip:e.totalTrades.tooltip})},XG=()=>{const{order:e}=Rt();return B.jsx(we.MinDestAmount,{dstToken:e.dstToken,dstMinAmountOut:e.minDestAmountPerTrade.value,label:e.minDestAmountPerTrade.label,tooltip:e.minDestAmountPerTrade.tooltip})},QG=()=>{const{order:e}=Rt();return B.jsx(we.Deadline,{deadline:e.deadline.value,label:e.deadline.label,tooltip:e.deadline.tooltip})},JG=()=>{const{order:e}=Rt();return B.jsx(we.TradeInterval,{fillDelayMillis:e.tradeInterval.value,chunks:e.totalTrades.value,label:e.tradeInterval.label,tooltip:e.tradeInterval.tooltip})},ej=()=>{const{order:e}=Rt();return B.jsx(we.TriggerPrice,{dstToken:e.dstToken,price:e.triggerPricePerTrade.value,label:e.triggerPricePerTrade.label,tooltip:e.triggerPricePerTrade.tooltip})},tj=()=>{const{order:e}=Rt();return B.jsx(we.OrderID,{id:e.id.value||""})},rj=()=>B.jsxs(we,{children:[B.jsx(lj,{}),B.jsx(ij,{}),B.jsx(nj,{}),B.jsx(uj,{}),B.jsx(pj,{})]}),nj=()=>{var r;const{order:e}=Rt(),t=ze({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.dstToken)==null?void 0:r.symbol]})}):null},sj=()=>{const{order:e}=Rt(),{mutateAsync:t,isPending:r}=G0(),{components:n}=ne(),s=n.Button,a=M.useCallback(async()=>t({orders:[e.original]}),[t,e]);return!e||e.original.status!==lt.Open||!s?null:B.jsx(s,{loading:r,onClick:a,disabled:r,className:"twap-cancel-order",children:"Cancel"})},aj=()=>{const{order:e}=Rt(),t=Ue(),r=H0(e.createdAt.value);return B.jsx(we.DetailRow,{title:t("createdAt")||"",children:B.jsx("p",{children:r})})},oj=()=>{var n;const{order:e}=Rt(),t=Ue(),r=ze({value:e.srcAmount.value,decimalScale:3});return B.jsx(we.DetailRow,{title:t("amountOut")||"",children:B.jsxs("p",{children:[r||0," ",(n=e.srcToken)==null?void 0:n.symbol]})})},ij=()=>{var r;const{order:e}=Rt(),t=ze({value:e.amountInFilled.value,decimalScale:3});return B.jsx(we.DetailRow,{title:e.amountInFilled.label,children:B.jsxs("p",{children:[t||"-"," ",(r=e.srcToken)==null?void 0:r.symbol]})})},cj=()=>{const{order:e}=Rt(),t=Ue();return M.useMemo(()=>{switch(e.original.status){case lt.Open:return t("Open")||"";case lt.Completed:return t("Completed")||"";case lt.Expired:return t("Expired")||"";case lt.Canceled:return t("Canceled")||""}},[e.original.status,t])},lj=()=>{const e=Ue(),t=cj();return B.jsx(we.DetailRow,{title:e("status")||"",children:B.jsx("p",{children:t})})},uj=()=>{const{order:e}=Rt(),t=ze({value:e.progress.value,decimalScale:2});return B.jsx(we.DetailRow,{title:e.progress.label,children:B.jsxs("p",{children:[t||0,"%"]})})},dj=()=>{const{order:e}=Rt(),t=Ue();return e.limitPrice.value?B.jsx(J2,{title:t("limitPrice")||"",price:e.limitPrice.value,srcToken:e.srcToken,dstToken:e.dstToken}):null},pj=()=>{const{order:e}=Rt();return e.excecutionPrice.value?B.jsx(J2,{title:e.excecutionPrice.label,price:e.excecutionPrice.value,srcToken:e.srcToken,dstToken:e.dstToken}):null},J2=({price:e,srcToken:t,dstToken:r,title:n})=>{const s=ze({value:e,decimalScale:3});return B.jsx(we.DetailRow,{title:n,children:j(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 V0={},ex;function fj(){if(ex)return V0;ex=1;var e=uu.GenIcon;return V0.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)},V0}var mj=fj();const Mu=0,ms=1,mo=2,tx=4;function rx(e){return()=>e}function hj(e){e()}function nx(e,t){return r=>e(t(r))}function sx(e,t){return()=>e(t)}function bj(e,t){return r=>e(t,r)}function W0(e){return e!==void 0}function yj(...e){return()=>{e.map(hj)}}function ho(){}function Nu(e,t){return t(e),e}function gj(e,t){return t(e)}function et(...e){return e}function je(e,t){return e(ms,t)}function Ce(e,t){e(Mu,t)}function q0(e){e(mo)}function st(e){return e(tx)}function ce(e,t){return je(e,bj(t,Mu))}function Wr(e,t){const r=e(ms,n=>{r(),t(n)});return r}function ax(e){let t,r;return n=>s=>{t=s,r&&clearTimeout(r),r=setTimeout(()=>{n(t)},e)}}function ox(e,t){return e===t}function tt(e=ox){let t;return r=>n=>{e(t,n)||(t=n,r(n))}}function fe(e){return t=>r=>{e(r)&&t(r)}}function re(e){return t=>nx(t,e)}function on(e){return t=>()=>{t(e)}}function W(e,...t){const r=xj(...t);return(n,s)=>{switch(n){case mo:q0(e);return;case ms:return je(e,r(s))}}}function cn(e,t){return r=>n=>{r(t=e(t,n))}}function oa(e){return t=>r=>{e>0?e--:t(r)}}function Hn(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 xj(...e){return t=>e.reduceRight(gj,t)}function wj(e){let t,r;const n=()=>t==null?void 0:t();return function(s,a){switch(s){case ms:return a?r===a?void 0:(n(),r=a,t=je(e,a),t):(n(),ho);case mo:n(),r=null;return}}}function K(e){let t=e;const r=Oe();return(n,s)=>{switch(n){case Mu:t=s;break;case ms:{s(t);break}case tx:return t}return r(n,s)}}function Ht(e,t){return Nu(K(t),r=>ce(e,r))}function Oe(){const e=[];return(t,r)=>{switch(t){case Mu:e.slice().forEach(n=>{n(r)});return;case mo:e.splice(0,e.length);return;case ms:return e.push(r),()=>{const n=e.indexOf(r);n>-1&&e.splice(n,1)}}}}function br(e){return Nu(Oe(),t=>ce(e,t))}function $e(e,t=[],{singleton:r}={singleton:!0}){return{constructor:e,dependencies:t,id:vj(),singleton:r}}const vj=()=>Symbol();function Ej(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 Et(...e){const t=Oe(),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 mo:{q0(t);return}case ms:return n===s&&o(r),je(t,o)}}}function me(e,t=ox){return W(e,tt(t))}function Y0(...e){return function(t,r){switch(t){case mo:return;case ms:return yj(...e.map(n=>je(n,r)))}}}var nr=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(nr||{});const kj={0:"debug",3:"error",1:"log",2:"warn"},Cj=()=>typeof globalThis>"u"?window:globalThis,hs=$e(()=>{const e=K(3);return{log:K((t,r,n=1)=>{var s;const a=(s=Cj().VIRTUOSO_LOG_LEVEL)!=null?s:st(e);n>=a&&console[kj[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,r)}),logLevel:e}},[],{singleton:!0});function ia(e,t,r){return K0(e,t,r).callbackRef}function K0(e,t,r){const n=M.useRef(null);let s=o=>{};const a=M.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 Tj(e,t,r,n,s,a,o,i,c){const l=M.useCallback(u=>{const d=Sj(u.children,t,i?"offsetWidth":"offsetHeight",s);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const m=f.lastElementChild.dataset.viewportType==="window";let y;m&&(y=f.ownerDocument.defaultView);const g=o?i?o.scrollLeft:o.scrollTop:m?i?y.scrollX||y.document.documentElement.scrollLeft:y.scrollY||y.document.documentElement.scrollTop:i?f.scrollLeft:f.scrollTop,E=o?i?o.scrollWidth:o.scrollHeight:m?i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight:i?f.scrollWidth:f.scrollHeight,v=o?i?o.offsetWidth:o.offsetHeight:m?i?y.innerWidth:y.innerHeight:i?f.offsetWidth:f.offsetHeight;n({scrollHeight:E,scrollTop:Math.max(g,0),viewportHeight:v}),a==null||a(i?ix("column-gap",getComputedStyle(u).columnGap,s):ix("row-gap",getComputedStyle(u).rowGap,s)),d!==null&&e(d)},[e,t,s,a,o,n,i]);return K0(l,r,c)}function Sj(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},nr.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 ix(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,nr.WARN),t==="normal"?0:parseInt(t??"0",10)}function cx(e,t,r){const n=M.useRef(null),s=M.useCallback(c=>{if(!(c!=null&&c.offsetParent))return;const l=c.getBoundingClientRect(),u=l.width;let d,f;if(t){const m=t.getBoundingClientRect(),y=l.top-m.top;f=m.height-Math.max(0,y),d=y+t.scrollTop}else{const m=o.current.ownerDocument.defaultView;f=m.innerHeight-Math.max(0,l.top),d=l.top+m.scrollY}n.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(n.current)},[e,t]),{callbackRef:a,ref:o}=K0(s,!0,r),i=M.useCallback(()=>{s(o.current)},[s,o]);return M.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 Wt=$e(()=>{const e=Oe(),t=Oe(),r=K(0),n=Oe(),s=K(0),a=Oe(),o=Oe(),i=K(0),c=K(0),l=K(0),u=K(0),d=Oe(),f=Oe(),m=K(!1),y=K(!1),g=K(!1);return ce(W(e,re(({scrollTop:E})=>E)),t),ce(W(e,re(({scrollHeight:E})=>E)),o),ce(t,s),{deviation:r,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:i,horizontalDirection:y,scrollBy:f,scrollContainerState:e,scrollHeight:o,scrollingInProgress:m,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:n,statefulScrollTop:s,viewportHeight:a}},[],{singleton:!0}),oc={lvl:0};function lx(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===oc}function ic(e,t){if(!qe(e))return t===e.k?e.v:t<e.k?ic(e.l,t):ic(e.r,t)}function qr(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=qr(e.r,t,r);return n[0]===-1/0?[e.k,e.v]:n}return qr(e.l,t,r)}function yr(e,t,r){return qe(e)?px(t,r,1):t===e.k?St(e,{k:t,v:r}):t<e.k?fx(St(e,{l:yr(e.l,t,r)})):fx(St(e,{r:yr(e.r,t,r)}))}function bo(){return oc}function yo(e,t,r){if(qe(e))return[];const n=qr(e,t)[0];return Aj(X0(e,n,r))}function Z0(e,t){if(qe(e))return oc;const{k:r,l:n,r:s}=e;if(t===r){if(qe(n))return s;if(qe(s))return n;{const[a,o]=dx(n);return Lu(St(e,{k:a,l:ux(n),v:o}))}}else return t<r?Lu(St(e,{l:Z0(n,t)})):Lu(St(e,{r:Z0(s,t)}))}function ca(e){return qe(e)?[]:[...ca(e.l),{k:e.k,v:e.v},...ca(e.r)]}function X0(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(X0(s,t,r))),n>=t&&n<=r&&i.push({k:n,v:o}),n<=r&&(i=i.concat(X0(a,t,r))),i}function Lu(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(Q0(t))return mx(St(e,{lvl:r-1}));if(!qe(t)&&!qe(t.r))return St(t.r,{l:St(t,{r:t.r.l}),lvl:r,r:St(e,{l:t.r.r,lvl:r-1})});throw new Error("Unexpected empty nodes")}else{if(Q0(e))return J0(St(e,{lvl:r-1}));if(!qe(n)&&!qe(n.l)){const s=n.l,a=Q0(s)?n.lvl-1:n.lvl;return St(s,{l:St(e,{lvl:r-1,r:s.l}),lvl:s.lvl+1,r:J0(St(n,{l:s.r,lvl:a}))})}else throw new Error("Unexpected empty nodes")}}function St(e,t){return px(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 ux(e){return qe(e.r)?e.l:Lu(St(e,{r:ux(e.r)}))}function Q0(e){return qe(e)||e.lvl>e.r.lvl}function dx(e){return qe(e.r)?[e.k,e.v]:dx(e.r)}function px(e,t,r,n=oc,s=oc){return{k:e,l:n,lvl:r,r:s,v:t}}function fx(e){return J0(mx(e))}function mx(e){const{l:t}=e;return!qe(t)&&t.lvl===e.lvl?St(t,{r:St(e,{l:t.r})}):e}function J0(e){const{lvl:t,r}=e;return!qe(r)&&!qe(r.r)&&r.lvl===t&&r.r.lvl===t?St(r,{l:St(e,{r:r.l}),lvl:t+1}):e}function Aj(e){return lx(e,({k:t,v:r})=>({index:t,value:r}))}function hx(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function cc(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const em=$e(()=>({recalcInProgress:K(!1)}),[],{singleton:!0});function bx(e,t,r){return e[zu(e,t,r)]}function zu(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 Pj(e,t,r,n){const s=zu(e,t,n),a=zu(e,r,n,s);return e.slice(s,a+1)}function bs(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ru(e){return!qe(e.groupOffsetTree)}function tm({index:e},t){return t===e?0:t<e?-1:1}function Ij(){return{groupIndices:[],groupOffsetTree:bo(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:bo()}}function Bj(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=yr(e,0,a);continue}const i=yo(e,o-1,s+1);if(i.some(Nj(n)))continue;let c=!1,l=!1;for(const{end:u,start:d,value:f}of i)c?(s>=d||a===f)&&(e=Z0(e,d)):(l=f!==a,c=!0),u>s&&s>=d&&f!==a&&(e=yr(e,s+1,f));l&&(e=yr(e,o,a))}return[e,r]}function Fj(e){return typeof e.groupIndex<"u"}function Uj({offset:e},t){return t===e?0:t<e?-1:1}function lc(e,t,r){if(t.length===0)return 0;const{index:n,offset:s,size:a}=bx(t,e,tm),o=e-n,i=a*o+(o-1)*r+s;return i>0?i+r:i}function yx(e,t){if(!Ru(t))return e;let r=0;for(;t.groupIndices[r]<=e+r;)r++;return e+r}function gx(e,t,r){if(Fj(e))return t.groupIndices[e.groupIndex]+1;{const n=e.index==="LAST"?r:e.index;let s=yx(n,t);return s=Math.max(0,s,Math.min(r,s)),s}}function Oj(e,t,r,n=0){return n>0&&(t=Math.max(t,bx(e,n,tm).offset)),lx(Pj(e,t,r,Uj),Mj)}function Dj(e,[t,r,n,s]){t.length>0&&n("received item sizes",t,nr.DEBUG);const a=e.sizeTree;let o=a,i=0;if(r.length>0&&qe(a)&&t.length===2){const f=t[0].size,m=t[1].size;o=r.reduce((y,g)=>yr(yr(y,g,f),g+1,m),o)}else[o,i]=Bj(o,t);if(o===a)return e;const{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=rm(e.offsetTree,i,o,s);return{groupIndices:r,groupOffsetTree:r.reduce((f,m)=>yr(f,m,lc(m,d,s)),bo()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function _j(e){return ca(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 xx(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 rm(e,t,r,n){let s=e,a=0,o=0,i=0,c=0;if(t!==0){c=zu(s,t-1,tm),i=s[c].offset;const l=qr(r,t-1);a=l[0],o=l[1],s.length&&s[c].size===qr(r,t)[1]&&(c-=1),s=s.slice(0,c+1)}else s=[];for(const{start:l,value:u}of yo(r,t,1/0)){const d=l-a,f=d*o+i+d*n;s.push({index:l,offset:f,size:u}),a=l,i=f,o=u}return{lastIndex:a,lastOffset:i,lastSize:o,offsetTree:s}}function Mj(e){return{index:e.index,value:e}}function Nj(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 Lj={offsetHeight:"height",offsetWidth:"width"},ln=$e(([{log:e},{recalcInProgress:t}])=>{const r=Oe(),n=Oe(),s=Ht(n,0),a=Oe(),o=Oe(),i=K(0),c=K([]),l=K(void 0),u=K(void 0),d=K(void 0),f=K(void 0),m=K((T,h)=>bs(T,Lj[h])),y=K(void 0),g=K(0),E=Ij(),v=Ht(W(r,Te(c,e,g),cn(Dj,E),tt()),E),w=Ht(W(c,tt(),cn((T,h)=>({current:h,prev:T.current}),{current:[],prev:[]}),re(({prev:T})=>T)),[]);ce(W(c,fe(T=>T.length>0),Te(v,g),re(([T,h,b])=>{const x=T.reduce((S,I,F)=>yr(S,I,lc(I,h.offsetTree,b)||F),bo());return{...h,groupIndices:T,groupOffsetTree:x}})),v),ce(W(n,Te(v),fe(([T,{lastIndex:h}])=>T<h),re(([T,{lastIndex:h,lastSize:b}])=>[{endIndex:h,size:b,startIndex:T}])),r),ce(l,u);const A=Ht(W(l,re(T=>T===void 0)),!0);ce(W(u,fe(T=>T!==void 0&&qe(st(v).sizeTree)),re(T=>{const h=st(d),b=st(c).length>0;return h?b?[{endIndex:0,size:h,startIndex:0},{endIndex:1,size:T,startIndex:1}]:[]:[{endIndex:0,size:T,startIndex:0}]})),r),ce(W(f,fe(T=>T!==void 0&&T.length>0&&qe(st(v).sizeTree)),re(T=>{const h=[];let b=T[0],x=0;for(let S=1;S<T.length;S++){const I=T[S];I!==b&&(h.push({endIndex:S-1,size:b,startIndex:x}),b=I,x=S)}return h.push({endIndex:T.length-1,size:b,startIndex:x}),h})),r),ce(W(c,Te(d,u),fe(([,T,h])=>T!==void 0&&h!==void 0),re(([T,h,b])=>{const x=[];for(let S=0;S<T.length;S++){const I=T[S],F=T[S+1];x.push({startIndex:I,endIndex:I,size:h}),F!==void 0&&x.push({startIndex:I+1,endIndex:F-1,size:b})}return x})),r);const C=br(W(r,Te(v),cn(({sizes:T},[h,b])=>({changed:b!==T,sizes:b}),{changed:!1,sizes:E}),re(T=>T.changed)));je(W(i,cn((T,h)=>({diff:T.prev-h,prev:h}),{diff:0,prev:0}),re(T=>T.diff)),T=>{const{groupIndices:h}=st(v);if(T>0)Ce(t,!0),Ce(a,T+xx(T,h));else if(T<0){const b=st(w);b.length>0&&(T-=xx(-T,b)),Ce(o,T)}}),je(W(i,Te(e)),([T,h])=>{T<0&&h("`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},nr.ERROR)});const D=br(a);ce(W(a,Te(v),re(([T,h])=>{const b=h.groupIndices.length>0,x=[],S=h.lastSize;if(b){const I=ic(h.sizeTree,0);let F=0,_=0;for(;F<T;){const P=h.groupIndices[_],O=h.groupIndices.length===_+1?1/0:h.groupIndices[_+1]-P-1;x.push({endIndex:P,size:I,startIndex:P}),x.push({endIndex:P+1+O-1,size:S,startIndex:P+1}),_++,F+=O+1}const k=ca(h.sizeTree);return F!==T&&k.shift(),k.reduce((P,{k:O,v:U})=>{let z=P.ranges;return P.prevSize!==0&&(z=[...P.ranges,{endIndex:O+T-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:O+T,prevSize:U,ranges:z}},{prevIndex:T,prevSize:0,ranges:x}).ranges}return ca(h.sizeTree).reduce((I,{k:F,v:_})=>({prevIndex:F+T,prevSize:_,ranges:[...I.ranges,{endIndex:F+T-1,size:I.prevSize,startIndex:I.prevIndex}]}),{prevIndex:0,prevSize:S,ranges:[]}).ranges})),r);const L=br(W(o,Te(v,g),re(([T,{offsetTree:h},b])=>{const x=-T;return lc(x,h,b)})));return ce(W(o,Te(v,g),re(([T,h,b])=>{if(h.groupIndices.length>0){if(qe(h.sizeTree))return h;let x=bo();const S=st(w);let I=0,F=0,_=0;for(;I<-T;){_=S[F];const k=S[F+1]-_-1;F++,I+=k+1}if(x=ca(h.sizeTree).reduce((k,{k:P,v:O})=>yr(k,Math.max(0,P+T),O),x),I!==-T){const k=ic(h.sizeTree,_);x=yr(x,0,k);const P=qr(h.sizeTree,-T+1)[1];x=yr(x,1,P)}return{...h,sizeTree:x,...rm(h.offsetTree,0,x,b)}}else{const x=ca(h.sizeTree).reduce((S,{k:I,v:F})=>yr(S,Math.max(0,I+T),F),bo());return{...h,sizeTree:x,...rm(h.offsetTree,0,x,b)}}})),v),{beforeUnshiftWith:D,data:y,defaultItemSize:u,firstItemIndex:i,fixedItemSize:l,fixedGroupSize:d,gap:g,groupIndices:c,heightEstimates:f,itemSize:m,listRefresh:C,shiftWith:o,shiftWithOffset:L,sizeRanges:r,sizes:v,statefulTotalCount:s,totalCount:n,trackItemSizes:A,unshiftWith:a}},et(hs,em),{singleton:!0});function zj(e){return e.reduce((t,r)=>(t.groupIndices.push(t.totalCount),t.totalCount+=r+1,t),{groupIndices:[],totalCount:0})}const wx=$e(([{groupIndices:e,sizes:t,totalCount:r},{headerHeight:n,scrollTop:s}])=>{const a=Oe(),o=Oe(),i=br(W(a,re(zj)));return ce(W(i,re(c=>c.totalCount)),r),ce(W(i,re(c=>c.groupIndices)),e),ce(W(Et(s,t,n),fe(([c,l])=>Ru(l)),re(([c,l,u])=>qr(l.groupOffsetTree,Math.max(c-u,0),"v")[0]),tt(),re(c=>[c])),o),{groupCounts:a,topItemsIndexes:o}},et(ln,Wt)),ys=$e(([{log:e}])=>{const t=K(!1),r=br(W(t,fe(n=>n),tt()));return je(t,n=>{n&&st(e)("props updated",{},nr.DEBUG)}),{didMount:r,propsReady:t}},et(hs),{singleton:!0}),Rj=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function vx(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Rj)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const uc=$e(([{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:f}])=>{const m=Oe(),y=Oe(),g=K(0);let E=null,v=null,w=null;function A(){E&&(E(),E=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),Ce(c,!1)}return ce(W(m,Te(r,d,n,g,i,o,f),Te(e,a,s),re(([[C,D,L,T,h,b,x,S],I,F,_])=>{const k=vx(C),{align:P,behavior:O,offset:U}=k,z=T-1,H=gx(k,D,z);let G=lc(H,D.offsetTree,I)+b;P==="end"?(G+=F+qr(D.sizeTree,H)[1]-L+_,H===z&&(G+=x)):P==="center"?G+=(F+qr(D.sizeTree,H)[1]-L+_)/2:G-=h,U&&(G+=U);const J=pe=>{A(),pe?(S("retrying to scroll to",{location:C},nr.DEBUG),Ce(m,C)):(Ce(y,!0),S("list did not change, scroll successful",{},nr.DEBUG))};if(A(),O==="smooth"){let pe=!1;w=je(t,he=>{pe=pe||he}),E=Wr(u,()=>{J(pe)})}else E=Wr(W(t,Hj(150)),J);return v=setTimeout(()=>{A()},1200),Ce(c,!0),S("scrolling from index to",{behavior:O,index:H,top:G},nr.DEBUG),{behavior:O,top:G}})),l),{scrollTargetReached:y,scrollToIndex:m,topListHeight:g}},et(ln,Wt,hs),{singleton:!0});function Hj(e){return t=>{const r=setTimeout(()=>{t(!1)},e);return n=>{n&&(t(!0),clearTimeout(r))}}}function nm(e,t){e==0?t():requestAnimationFrame(()=>{nm(e-1,t)})}function sm(e,t){const r=t-1;return typeof e=="number"?e:e.index==="LAST"?r:e.index}const dc=$e(([{defaultItemSize:e,listRefresh:t,sizes:r},{scrollTop:n},{scrollTargetReached:s,scrollToIndex:a},{didMount:o}])=>{const i=K(!0),c=K(0),l=K(!0);return ce(W(o,Te(c),fe(([u,d])=>!!d),on(!1)),i),ce(W(o,Te(c),fe(([u,d])=>!!d),on(!1)),l),je(W(Et(t,o),Te(i,r,e,l),fe(([[,u],d,{sizeTree:f},m,y])=>u&&(!qe(f)||W0(m))&&!d&&!y),Te(c)),([,u])=>{Wr(s,()=>{Ce(l,!0)}),nm(4,()=>{Wr(n,()=>{Ce(i,!0)}),Ce(a,u)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:i}},et(ln,Wt,uc,ys),{singleton:!0});function Ex(e,t){return Math.abs(e-t)<1.01}const pc="up",fc="down",$j="none",Gj={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},jj=0,mc=$e(([{footerHeight:e,headerHeight:t,scrollBy:r,scrollContainerState:n,scrollTop:s,viewportHeight:a}])=>{const o=K(!1),i=K(!0),c=Oe(),l=Oe(),u=K(4),d=K(jj),f=Ht(W(Y0(W(me(s),oa(1),on(!0)),W(me(s),oa(1),on(!1),ax(100))),tt()),!1),m=Ht(W(Y0(W(r,on(!0)),W(r,on(!1),ax(200))),tt()),!1);ce(W(Et(me(s),me(d)),re(([w,A])=>w<=A),tt()),i),ce(W(i,Hn(50)),l);const y=br(W(Et(n,me(a),me(t),me(e),me(u)),cn((w,[{scrollHeight:A,scrollTop:C},D,L,T,h])=>{const b=C+D-A>-h,x={scrollHeight:A,scrollTop:C,viewportHeight:D};if(b){let I,F;return C>w.state.scrollTop?(I="SCROLLED_DOWN",F=w.state.scrollTop-C):(I="SIZE_DECREASED",F=w.state.scrollTop-C||w.scrollTopDelta),{atBottom:!0,atBottomBecause:I,scrollTopDelta:F,state:x}}let S;return x.scrollHeight>w.state.scrollHeight?S="SIZE_INCREASED":D<w.state.viewportHeight?S="VIEWPORT_HEIGHT_DECREASING":C<w.state.scrollTop?S="SCROLLING_UPWARDS":S="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:S,state:x}},Gj),tt((w,A)=>w&&w.atBottom===A.atBottom))),g=Ht(W(n,cn((w,{scrollHeight:A,scrollTop:C,viewportHeight:D})=>{if(Ex(w.scrollHeight,A))return{changed:!1,jump:0,scrollHeight:A,scrollTop:C};{const L=A-(C+D)<1;return w.scrollTop!==C&&L?{changed:!0,jump:w.scrollTop-C,scrollHeight:A,scrollTop:C}:{changed:!0,jump:0,scrollHeight:A,scrollTop:C}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),fe(w=>w.changed),re(w=>w.jump)),0);ce(W(y,re(w=>w.atBottom)),o),ce(W(o,Hn(50)),c);const E=K(fc);ce(W(n,re(({scrollTop:w})=>w),tt(),cn((w,A)=>st(m)?{direction:w.direction,prevScrollTop:A}:{direction:A<w.prevScrollTop?pc:fc,prevScrollTop:A},{direction:fc,prevScrollTop:0}),re(w=>w.direction)),E),ce(W(n,Hn(50),on($j)),E);const v=K(0);return ce(W(f,fe(w=>!w),on(0)),v),ce(W(s,Hn(100),Te(f),fe(([w,A])=>!!A),cn(([w,A],[C])=>[A,C],[0,0]),re(([w,A])=>A-w)),v),{atBottomState:y,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:o,isAtTop:i,isScrolling:f,lastJumpDueToItemResize:g,scrollDirection:E,scrollVelocity:v}},et(Wt)),hc="top",bc="bottom",kx="none";function Cx(e,t,r){return typeof e=="number"?r===pc&&t===hc||r===fc&&t===bc?e:0:r===pc?t===hc?e.main:e.reverse:t===bc?e.main:e.reverse}function Tx(e,t){var r;return typeof e=="number"?e:(r=e[t])!=null?r:0}const am=$e(([{deviation:e,fixedHeaderHeight:t,headerHeight:r,scrollTop:n,viewportHeight:s}])=>{const a=Oe(),o=K(0),i=K(0),c=K(0),l=Ht(W(Et(me(n),me(s),me(r),me(a,cc),me(c),me(o),me(t),me(e),me(i)),re(([u,d,f,[m,y],g,E,v,w,A])=>{const C=u-w,D=E+v,L=Math.max(f-C,0);let T=kx;const h=Tx(A,hc),b=Tx(A,bc);return m-=w,m+=f+v,y+=f+v,y-=w,m>u+D-h&&(T=pc),y<u-L+d+b&&(T=fc),T!==kx?[Math.max(C-f-Cx(g,hc,T)-h,0),C-L-v+d+Cx(g,bc,T)+b]:null}),fe(u=>u!=null),tt(cc)),[0,0]);return{increaseViewportBy:i,listBoundary:a,overscan:c,topListHeight:o,visibleRange:l}},et(Wt),{singleton:!0});function Vj(e,t,r){if(Ru(t)){const n=yx(e,t);return[{index:qr(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 om={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Hu(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,f=i+d*c+(d-1)*n,m=l,y=f-u;return{bottom:u,firstItemIndex:a,items:Ax(e,s,a),offsetBottom:y,offsetTop:l,top:m,topItems:Ax(t,s,a),topListHeight:t.reduce((g,E)=>E.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=sm(t,i),l=Array.from({length:i}).map((u,d)=>({data:a[d+c],index:d+c,offset:0,size:0}));return Hu(l,[],i,s,r,n)}function Ax(e,t,r){if(e.length===0)return[];if(!Ru(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=yo(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 Px(e,t){var r;return e===void 0?0:typeof e=="number"?e:(r=e[t])!=null?r:0}const la=$e(([{data:e,firstItemIndex:t,gap:r,sizes:n,totalCount:s},a,{listBoundary:o,topListHeight:i,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:m},{recalcInProgress:y}])=>{const g=K([]),E=K(0),v=Oe(),w=K(0);ce(a.topItemsIndexes,g);const A=Ht(W(Et(m,y,me(c,cc),me(s),me(n),me(l),u,me(g),me(t),me(r),me(w),e),fe(([T,h,,b,,,,,,,,x])=>{const S=x&&x.length!==b;return T&&!h&&!S}),re(([,,[T,h],b,x,S,I,F,_,k,P,O])=>{var U,z,H,G;const J=x,{offsetTree:pe,sizeTree:he}=J,ie=st(E);if(b===0)return{...om,totalCount:b};if(T===0&&h===0)return ie===0?{...om,totalCount:b}:Sx(ie,S,x,_,k,O||[]);if(qe(he))return ie>0?null:Hu(Vj(sm(S,b),J,O),[],b,k,J,_);const de=[];if(F.length>0){const Se=F[0],Ee=F[F.length-1];let be=0;for(const Ze of yo(he,Se,Ee)){const Ye=Ze.value,Xe=Math.max(Ze.start,Se),Fr=Math.min(Ze.end,Ee);for(let Ot=Xe;Ot<=Fr;Ot++)de.push({data:O==null?void 0:O[Ot],index:Ot,offset:be,size:Ye}),be+=Ye}}if(!I)return Hu([],de,b,k,J,_);const Be=F.length>0?F[F.length-1]+1:0,Q=Oj(pe,T,h,Be);if(Q.length===0)return null;const ve=b-1,_e=Nu([],Se=>{for(const Ee of Q){const be=Ee.value;let Ze=be.offset,Ye=Ee.start;const Xe=be.size;if(be.offset<T){Ye+=Math.floor((T-be.offset+k)/(Xe+k));const Ot=Ye-Ee.start;Ze+=Ot*Xe+Ot*k}Ye<Be&&(Ze+=(Be-Ye)*Xe,Ye=Be);const Fr=Math.min(Ee.end,ve);for(let Ot=Ye;Ot<=Fr&&!(Ze>=h);Ot++)Se.push({data:O==null?void 0:O[Ot],index:Ot,offset:Ze,size:Xe}),Ze+=Xe+k}}),Ge=Px(P,hc),ot=Px(P,bc);if(_e.length>0&&(Ge>0||ot>0)){const Se=_e[0],Ee=_e[_e.length-1];if(Ge>0&&Se.index>Be){const be=Math.min(Ge,Se.index-Be),Ze=[];let Ye=Se.offset;for(let Xe=Se.index-1;Xe>=Se.index-be;Xe--){const Fr=(z=(U=yo(he,Xe,Xe)[0])==null?void 0:U.value)!=null?z:Se.size;Ye-=Fr+k,Ze.unshift({data:O==null?void 0:O[Xe],index:Xe,offset:Ye,size:Fr})}_e.unshift(...Ze)}if(ot>0&&Ee.index<ve){const be=Math.min(ot,ve-Ee.index);let Ze=Ee.offset+Ee.size+k;for(let Ye=Ee.index+1;Ye<=Ee.index+be;Ye++){const Xe=(G=(H=yo(he,Ye,Ye)[0])==null?void 0:H.value)!=null?G:Ee.size;_e.push({data:O==null?void 0:O[Ye],index:Ye,offset:Ze,size:Xe}),Ze+=Xe+k}}}return Hu(_e,de,b,k,J,_)}),fe(T=>T!==null),tt()),om);ce(W(e,fe(W0),re(T=>T==null?void 0:T.length)),s),ce(W(A,re(T=>T.topListHeight)),d),ce(d,i),ce(W(A,re(T=>[T.top,T.bottom])),o),ce(W(A,re(T=>T.items)),v);const C=br(W(A,fe(({items:T})=>T.length>0),Te(s,e),fe(([{items:T},h])=>T[T.length-1].originalIndex===h-1),re(([,T,h])=>[T-1,h]),tt(cc),re(([T])=>T))),D=br(W(A,Hn(200),fe(({items:T,topItems:h})=>T.length>0&&T[0].originalIndex===h.length),re(({items:T})=>T[0].index),tt())),L=br(W(A,fe(({items:T})=>T.length>0),re(({items:T})=>{let h=0,b=T.length-1;for(;T[h].type==="group"&&h<b;)h++;for(;T[b].type==="group"&&b>h;)b--;return{endIndex:T[b].index,startIndex:T[h].index}}),tt(hx)));return{endReached:C,initialItemCount:E,itemsRendered:v,listState:A,minOverscanItemCount:w,rangeChanged:L,startReached:D,topItemsIndexes:g,...f}},et(ln,wx,am,dc,uc,mc,ys,em),{singleton:!0}),Ix=$e(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:r,headerHeight:n},{listState:s}])=>{const a=Oe(),o=Ht(W(Et(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(Wt,la),{singleton:!0}),Wj=$e(([{viewportHeight:e},{totalListHeight:t}])=>{const r=K(!1),n=Ht(W(Et(r,e,t),fe(([s])=>s),re(([,s,a])=>Math.max(0,s-a)),Hn(0),tt()),0);return{alignToBottom:r,paddingTopAddition:n}},et(Wt,Ix),{singleton:!0}),Bx=$e(()=>({context:K(null)})),qj=({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,Fx=$e(([{gap:e,sizes:t,totalCount:r},{fixedFooterHeight:n,fixedHeaderHeight:s,headerHeight:a,scrollingInProgress:o,scrollTop:i,viewportHeight:c},{scrollToIndex:l}])=>{const u=Oe();return ce(W(u,Te(t,c,r,a,s,n,i),Te(e),re(([[d,f,m,y,g,E,v,w],A])=>{const{align:C,behavior:D,calculateViewLocation:L=qj,done:T,...h}=d,b=gx(d,f,y-1),x=lc(b,f.offsetTree,A)+g+E,S=x+qr(f.sizeTree,b)[1],I=w+E,F=w+m-v,_=L({itemBottom:S,itemTop:x,locationParams:{align:C,behavior:D,...h},viewportBottom:F,viewportTop:I});return _?T&&Wr(W(o,fe(k=>!k),oa(st(o)?1:2)),T):T&&T(),_}),fe(d=>d!==null)),l),{scrollIntoView:u}},et(ln,Wt,uc,la,hs),{singleton:!0});function Ux(e){return e?e==="smooth"?"smooth":"auto":!1}const Yj=(e,t)=>typeof e=="function"?Ux(e(t)):t&&Ux(e),Kj=$e(([{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:f},{scrollIntoView:m}])=>{const y=K(!1),g=Oe();let E=null;function v(D){Ce(o,{align:"end",behavior:D,index:"LAST"})}je(W(Et(W(me(t),oa(1)),c),Te(me(y),a,i,d),re(([[D,L],T,h,b,x])=>{let S=L&&b,I="auto";return S&&(I=Yj(T,h||x),S=S&&!!I),{followOutputBehavior:I,shouldFollow:S,totalCount:D}}),fe(({shouldFollow:D})=>D)),({followOutputBehavior:D,totalCount:L})=>{E&&(E(),E=null),st(r)?requestAnimationFrame(()=>{st(u)("following output to ",{totalCount:L},nr.DEBUG),v(D)}):E=Wr(e,()=>{st(u)("following output to ",{totalCount:L},nr.DEBUG),v(D),E=null})});function w(D){const L=Wr(s,T=>{D&&!T.atBottom&&T.notAtBottomBecause==="SIZE_INCREASED"&&!E&&(st(u)("scrolling to bottom due to increased size",{},nr.DEBUG),v("auto"))});setTimeout(L,100)}je(W(Et(me(y),t,l),fe(([D,,L])=>D&&L),cn(({value:D},[,L])=>({refreshed:D===L,value:L}),{refreshed:!1,value:0}),fe(({refreshed:D})=>D),Te(y,t)),([,D])=>{st(i)&&w(D!==!1)}),je(g,()=>{w(st(y)!==!1)}),je(Et(me(y),s),([D,L])=>{D&&!L.atBottom&&L.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const A=K(null),C=Oe();return ce(Y0(W(me(n),re(D=>{var L;return(L=D==null?void 0:D.length)!=null?L:0})),W(me(t))),C),je(W(Et(W(C,oa(1)),c),Te(me(A),i,d,f),re(([[D,L],T,h,b,x])=>L&&h&&(T==null?void 0:T({context:x,totalCount:D,scrollingInProgress:b}))),fe(D=>!!D),Hn(0)),D=>{E&&(E(),E=null),st(r)?requestAnimationFrame(()=>{st(u)("scrolling into view",{}),Ce(m,D)}):E=Wr(e,()=>{st(u)("scrolling into view",{}),Ce(m,D),E=null})}),{autoscrollToBottom:g,followOutput:y,scrollIntoViewOnChange:A}},et(ln,mc,uc,dc,ys,hs,Wt,Bx,Fx)),Zj=$e(([{data:e,firstItemIndex:t,gap:r,sizes:n},{initialTopMostItemIndex:s},{initialItemCount:a,listState:o},{didMount:i}])=>(ce(W(i,Te(a),fe(([,c])=>c!==0),Te(s,n,t,r,e),re(([[,c],l,u,d,f,m=[]])=>Sx(c,l,u,d,f,m))),o),{}),et(ln,dc,la,ys),{singleton:!0}),Xj=$e(([{didMount:e},{scrollTo:t},{listState:r}])=>{const n=K(0);return je(W(e,Te(n),fe(([,s])=>s!==0),re(([,s])=>({top:s}))),s=>{Wr(W(r,oa(1),fe(a=>a.items.length>1)),()=>{requestAnimationFrame(()=>{Ce(t,s)})})}),{initialScrollTop:n}},et(ys,Wt,la),{singleton:!0}),Ox=$e(([{scrollVelocity:e}])=>{const t=K(!1),r=Oe(),n=K(!1);return ce(W(e,Te(n,t,r),fe(([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(W(Et(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(mc),{singleton:!0}),im=$e(([{scrollContainerState:e,scrollTo:t}])=>{const r=Oe(),n=Oe(),s=Oe(),a=K(!1),o=K(void 0);return ce(W(Et(r,n),re(([{scrollHeight:i,scrollTop:c,viewportHeight:l},{offsetTop:u}])=>({scrollHeight:i,scrollTop:Math.max(0,c-u),viewportHeight:l}))),e),ce(W(t,Te(n),re(([i,{offsetTop:c}])=>({...i,top:i.top+c}))),s),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:r,windowScrollTo:s,windowViewportRect:n}},et(Wt)),Qj=$e(([{sizeRanges:e,sizes:t},{headerHeight:r,scrollTop:n},{initialTopMostItemIndex:s},{didMount:a},{useWindowScroll:o,windowScrollContainerState:i,windowViewportRect:c}])=>{const l=Oe(),u=K(void 0),d=K(null),f=K(null);return ce(i,d),ce(c,f),je(W(l,Te(t,n,o,d,f,r)),([m,y,g,E,v,w,A])=>{const C=_j(y.sizeTree);E&&v!==null&&w!==null&&(g=v.scrollTop-w.offsetTop),g-=A,m({ranges:C,scrollTop:g})}),ce(W(u,fe(W0),re(Jj)),s),ce(W(a,Te(u),fe(([,m])=>m!==void 0),tt(),re(([,m])=>m.ranges)),e),{getState:l,restoreStateFrom:u}},et(ln,Wt,dc,ys,im));function Jj(e){return{align:"start",index:0,offset:e.scrollTop}}const eV=$e(([{topItemsIndexes:e}])=>{const t=K(0);return ce(W(t,fe(r=>r>=0),re(r=>Array.from({length:r}).map((n,s)=>s))),e),{topItemCount:t}},et(la));function Dx(e){let t=!1,r;return()=>(t||(t=!0,r=e()),r)}const tV=Dx(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),rV=$e(([{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:f},{log:m},{recalcInProgress:y}])=>{const g=br(W(c,Te(o),cn(([,v,w,A],[{bottom:C,items:D,offsetBottom:L,totalCount:T},h])=>{const b=C+L;let x=0;return w===T&&v.length>0&&D.length>0&&(D[0].originalIndex===0&&v[0].originalIndex===0||(x=b-A,x!==0&&(x+=h))),[x,D,T,b]},[0,[],0,0]),fe(([v])=>v!==0),Te(n,i,r,s,m,y),fe(([,v,w,A,,,C])=>!C&&!A&&v!==0&&w===pc),re(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},nr.DEBUG),v))));function E(v){v>0?(Ce(t,{behavior:"auto",top:-v}),Ce(e,0)):(Ce(e,0),Ce(t,{behavior:"auto",top:-v}))}return je(W(g,Te(e,a)),([v,w,A])=>{A&&tV()?Ce(e,w-v):E(-v)}),je(W(Et(Ht(a,!1),e,y),fe(([v,w,A])=>!v&&!A&&w!==0),re(([v,w])=>w),Hn(1)),E),ce(W(d,re(v=>({top:-v}))),t),je(W(l,Te(f,u),re(([v,{groupIndices:w,lastSize:A,sizeTree:C},D])=>{function L(T){return T*(A+D)}if(w.length===0)return L(v);{let T=0;const h=ic(C,0);let b=0,x=0;for(;b<v;){b++,T+=h;let S=w.length===x+1?1/0:w[x+1]-w[x]-1;b+S>v&&(T-=h,S=v-b+1),b+=S,T+=L(S),x++}return T}})),v=>{Ce(e,v),requestAnimationFrame(()=>{Ce(t,{top:v}),requestAnimationFrame(()=>{Ce(e,0),Ce(y,!1)})})}),{deviation:e}},et(Wt,mc,la,ln,hs,em)),nV=$e(([e,t,r,n,s,a,o,i,c,l,u])=>({...e,...t,...r,...n,...s,...a,...o,...i,...c,...l,...u}),et(am,Zj,ys,Ox,Ix,Xj,Wj,im,Fx,hs,Bx)),_x=$e(([{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:f,trackItemSizes:m},{initialItemFinalLocationReached:y,initialTopMostItemIndex:g,scrolledToInitialItem:E},v,w,A,C,{scrollToIndex:D},L,{topItemCount:T},{groupCounts:h},b])=>{const{listState:x,minOverscanItemCount:S,topItemsIndexes:I,rangeChanged:F,..._}=C;return ce(F,b.scrollSeekRangeChanged),ce(W(b.windowViewportRect,re(k=>k.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:r,fixedItemHeight:n,fixedGroupHeight:s,gap:a,groupCounts:h,heightEstimates:i,initialItemFinalLocationReached:y,initialTopMostItemIndex:g,scrolledToInitialItem:E,sizeRanges:l,topItemCount:T,topItemsIndexes:I,totalCount:f,...A,groupIndices:o,itemSize:c,listState:x,minOverscanItemCount:S,scrollToIndex:D,statefulTotalCount:d,trackItemSizes:m,rangeChanged:F,..._,...b,...v,sizes:u,...w}},et(ln,dc,Wt,Qj,Kj,la,uc,rV,eV,wx,nV));function sV(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 $u=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Mx(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=M.createContext({});function c(E,v){E.propsReady&&Ce(E.propsReady,!1);for(const w of n){const A=E[t.required[w]];Ce(A,v[w])}for(const w of s)if(w in v){const A=E[t.optional[w]];Ce(A,v[w])}E.propsReady&&Ce(E.propsReady,!0)}function l(E){return a.reduce((v,w)=>(v[w]=A=>{const C=E[t.methods[w]];Ce(C,A)},v),{})}function u(E){return o.reduce((v,w)=>(v[w]=wj(E[t.events[w]]),v),{})}const d=M.forwardRef((E,v)=>{const{children:w,...A}=E,[C]=M.useState(()=>Nu(Ej(e),T=>{c(T,A)})),[D]=M.useState(sx(u,C));$u(()=>{for(const T of o)T in A&&je(D[T],A[T]);return()=>{Object.values(D).map(q0)}},[A,D,C]),$u(()=>{c(C,A)}),M.useImperativeHandle(v,rx(l(C)));const L=r;return B.jsx(i.Provider,{value:C,children:r?B.jsx(L,{...sV([...n,...s,...o],A),children:w}):w})}),f=E=>{const v=M.useContext(i);return M.useCallback(w=>{Ce(v[E],w)},[v,E])},m=E=>{const v=M.useContext(i)[E],w=M.useCallback(A=>je(v,A),[v]);return M.useSyncExternalStore(w,()=>st(v),()=>st(v))},y=E=>{const v=M.useContext(i)[E],[w,A]=M.useState(sx(st,v));return $u(()=>je(v,C=>{C!==w&&A(rx(C))}),[v,w]),w},g=M.version.startsWith("18")?m:y;return{Component:d,useEmitter:(E,v)=>{const w=M.useContext(i)[E];$u(()=>je(w,v),[v,w])},useEmitterValue:g,usePublisher:f}}const Nx=M.createContext(void 0),Lx=M.createContext(void 0),zx=typeof document<"u"?M.useLayoutEffect:M.useEffect;function cm(e){return"self"in e}function aV(e){return"body"in e}function Rx(e,t,r,n=ho,s,a){const o=M.useRef(null),i=M.useRef(null),c=M.useRef(null),l=M.useCallback(f=>{let m,y,g;const E=f.target;if(aV(E)||cm(E)){const w=cm(E)?E:E.defaultView;g=a?w.scrollX:w.scrollY,m=a?w.document.documentElement.scrollWidth:w.document.documentElement.scrollHeight,y=a?w.innerWidth:w.innerHeight}else g=a?E.scrollLeft:E.scrollTop,m=a?E.scrollWidth:E.scrollHeight,y=a?E.offsetWidth:E.offsetHeight;const v=()=>{e({scrollHeight:m,scrollTop:Math.max(g,0),viewportHeight:y})};f.suppressFlushSync?v():ka.flushSync(v),i.current!==null&&(g===i.current||g<=0||g===m-y)&&(i.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t,a]);M.useEffect(()=>{const f=s||o.current;return n(s||o.current),l({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",l,{passive:!0}),()=>{n(null),f.removeEventListener("scroll",l)}},[o,l,r,n,s]);function u(f){const m=o.current;if(!m||(a?"offsetWidth"in m&&m.offsetWidth===0:"offsetHeight"in m&&m.offsetHeight===0))return;const y=f.behavior==="smooth";let g,E,v;cm(m)?(E=Math.max(bs(m.document.documentElement,a?"width":"height"),a?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight),g=a?m.innerWidth:m.innerHeight,v=a?window.scrollX:window.scrollY):(E=m[a?"scrollWidth":"scrollHeight"],g=bs(m,a?"width":"height"),v=m[a?"scrollLeft":"scrollTop"]);const w=E-g;if(f.top=Math.ceil(Math.max(Math.min(w,f.top),0)),Ex(g,E)||f.top===v){e({scrollHeight:E,scrollTop:v,viewportHeight:g}),y&&t(!0);return}y?(i.current=f.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,i.current=null,t(!0)},1e3)):i.current=null,a&&(f={behavior:f.behavior,left:f.top}),m.scrollTo(f)}function d(f){a&&(f={behavior:f.behavior,left:f.top}),o.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}const lm="-webkit-sticky",Hx="sticky",um=Dx(()=>{if(typeof document>"u")return Hx;const e=document.createElement("div");return e.style.position=lm,e.style.position===lm?lm:Hx});function dm(e){return e}const oV=$e(()=>{const e=K(i=>`Item ${i}`),t=K(i=>`Group ${i}`),r=K({}),n=K(dm),s=K("div"),a=K(ho),o=(i,c=null)=>Ht(W(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")}}),iV=$e(([e,t])=>({...e,...t}),et(_x,oV)),cV=({height:e})=>B.jsx("div",{style:{height:e}}),lV={overflowAnchor:"none",position:um(),zIndex:1},$x={overflowAnchor:"none"},uV={...$x,display:"inline-block",height:"100%"},Gx=M.memo(function({showTopList:e=!1}){const t=ye("listState"),r=Pr("sizeRanges"),n=ye("useWindowScroll"),s=ye("customScrollParent"),a=Pr("windowScrollContainerState"),o=Pr("scrollContainerState"),i=s||n?a:o,c=ye("itemContent"),l=ye("context"),u=ye("groupContent"),d=ye("trackItemSizes"),f=ye("itemSize"),m=ye("log"),y=Pr("gap"),g=ye("horizontalDirection"),{callbackRef:E}=Tj(r,f,d,e?ho:i,m,y,s,g,ye("skipAnimationFrameInResizeObserver")),[v,w]=M.useState(0);pm("deviation",_=>{v!==_&&w(_)});const A=ye("EmptyPlaceholder"),C=ye("ScrollSeekPlaceholder")||cV,D=ye("ListComponent"),L=ye("ItemComponent"),T=ye("GroupComponent"),h=ye("computeItemKey"),b=ye("isSeeking"),x=ye("groupIndices").length>0,S=ye("alignToBottom"),I=ye("initialItemFinalLocationReached"),F=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:S?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:S?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...I?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&A?B.jsx(A,{...$t(A,l)}):B.jsx(D,{...$t(D,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:E,style:F,children:(e?t.topItems:t.items).map(_=>{const k=_.originalIndex,P=h(k+t.firstItemIndex,_.data,l);return b?M.createElement(C,{...$t(C,l),height:_.size,index:_.index,key:P,type:_.type||"item",..._.type==="group"?{}:{groupIndex:_.groupIndex}}):_.type==="group"?M.createElement(T,{...$t(T,l),"data-index":k,"data-item-index":_.index,"data-known-size":_.size,key:P,style:lV},u(_.index,l)):M.createElement(L,{...$t(L,l),...mV(L,_.data),"data-index":k,"data-item-group-index":_.groupIndex,"data-item-index":_.index,"data-known-size":_.size,key:P,style:g?uV:$x},x?c(_.index,_.groupIndex,_.data,l):c(_.index,_.data,l))})})}),dV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},pV={outline:"none",overflowX:"auto",position:"relative"},Gu=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),fV={position:um(),top:0,width:"100%",zIndex:1};function $t(e,t){if(typeof e!="string")return{context:t}}function mV(e,t){return{item:typeof e=="string"?void 0:t}}const hV=M.memo(function(){const e=ye("HeaderComponent"),t=Pr("headerHeight"),r=ye("HeaderFooterTag"),n=ia(M.useMemo(()=>a=>{t(bs(a,"height"))},[t]),!0,ye("skipAnimationFrameInResizeObserver")),s=ye("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...$t(e,s)})}):null}),bV=M.memo(function(){const e=ye("FooterComponent"),t=Pr("footerHeight"),r=ye("HeaderFooterTag"),n=ia(M.useMemo(()=>a=>{t(bs(a,"height"))},[t]),!0,ye("skipAnimationFrameInResizeObserver")),s=ye("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...$t(e,s)})}):null});function jx({useEmitter:e,useEmitterValue:t,usePublisher:r}){return M.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:f,scrollerRef:m,scrollToCallback:y}=Rx(i,l,c,u,void 0,d);return e("scrollTo",y),e("scrollBy",f),B.jsx(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:m,style:{...d?pV:dV,...s},tabIndex:0,...o,...$t(c,a),children:n})})}function Vx({useEmitter:e,useEmitterValue:t,usePublisher:r}){return M.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"),f=t("customScrollParent"),m=M.useRef(null),y=t("scrollerRef"),{scrollByCallback:g,scrollerRef:E,scrollToCallback:v}=Rx(i,l,c,y,f);return zx(()=>{var w;return E.current=f||((w=m.current)==null?void 0:w.ownerDocument.defaultView),()=>{E.current=null}},[E,f]),e("windowScrollTo",v),e("scrollBy",g),B.jsx(c,{ref:m,"data-virtuoso-scroller":!0,style:{position:"relative",...s,...u!==0?{height:u+d}:{}},...o,...$t(c,a),children:n})})}const yV=({children:e})=>{const t=M.useContext(Nx),r=Pr("viewportHeight"),n=Pr("fixedItemHeight"),s=ye("alignToBottom"),a=ye("horizontalDirection"),o=M.useMemo(()=>nx(r,c=>bs(c,a?"width":"height")),[r,a]),i=ia(o,!0,ye("skipAnimationFrameInResizeObserver"));return M.useEffect(()=>{t&&(r(t.viewportHeight),n(t.itemHeight))},[t,r,n]),B.jsx("div",{"data-viewport-type":"element",ref:i,style:Gu(s),children:e})},gV=({children:e})=>{const t=M.useContext(Nx),r=Pr("windowViewportRect"),n=Pr("fixedItemHeight"),s=ye("customScrollParent"),a=cx(r,s,ye("skipAnimationFrameInResizeObserver")),o=ye("alignToBottom");return M.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:Gu(o),children:e})},xV=({children:e})=>{const t=ye("TopItemListComponent")||"div",r=ye("headerHeight"),n={...fV,marginTop:`${r}px`},s=ye("context");return B.jsx(t,{style:n,...$t(t,s),children:e})},wV=M.memo(function(e){const t=ye("useWindowScroll"),r=ye("topItemsIndexes").length>0,n=ye("customScrollParent"),s=ye("context");return B.jsxs(n||t?kV:EV,{...e,context:s,children:[r&&B.jsx(xV,{children:B.jsx(Gx,{showTopList:!0})}),B.jsxs(n||t?gV:yV,{children:[B.jsx(hV,{}),B.jsx(Gx,{}),B.jsx(bV,{})]})]})}),{Component:vV,useEmitter:pm,useEmitterValue:ye,usePublisher:Pr}=Mx(iV,{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"}},wV),EV=jx({useEmitter:pm,useEmitterValue:ye,usePublisher:Pr}),kV=Vx({useEmitter:pm,useEmitterValue:ye,usePublisher:Pr}),CV=vV;et(_x,$e(()=>{const e=K(l=>B.jsxs("td",{children:["Item $",l]})),t=K(null),r=K(l=>B.jsxs("td",{colSpan:1e3,children:["Group ",l]})),n=K(null),s=K(null),a=K({}),o=K(dm),i=K(ho),c=(l,u=null)=>Ht(W(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")}})),um();const Wx={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},TV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:qx,floor:ju,max:yc,min:fm,round:Yx}=Math;function Kx(e,t,r){return Array.from({length:t-e+1}).map((n,s)=>({data:r===null?null:r[s+e],index:s+e}))}function SV(e){return{...TV,items:e}}function Vu(e,t){return e&&e.width===t.width&&e.height===t.height}function AV(e,t){return e&&e.column===t.column&&e.row===t.row}const PV=$e(([{increaseViewportBy:e,listBoundary:t,overscan:r,visibleRange:n},{footerHeight:s,headerHeight:a,scrollBy:o,scrollContainerState:i,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},f,m,{didMount:y,propsReady:g},{customScrollParent:E,useWindowScroll:v,windowScrollContainerState:w,windowScrollTo:A,windowViewportRect:C},D])=>{const L=K(0),T=K(0),h=K(Wx),b=K({height:0,width:0}),x=K({height:0,width:0}),S=Oe(),I=Oe(),F=K(0),_=K(null),k=K({column:0,row:0}),P=Oe(),O=Oe(),U=K(!1),z=K(0),H=K(!0),G=K(!1),J=K(!1);je(W(y,Te(z),fe(([Q,ve])=>!!ve)),()=>{Ce(H,!1)}),je(W(Et(y,H,x,b,z,G),fe(([Q,ve,_e,Ge,,ot])=>Q&&!ve&&_e.height!==0&&Ge.height!==0&&!ot)),([,,,,Q])=>{Ce(G,!0),nm(1,()=>{Ce(S,Q)}),Wr(W(l),()=>{Ce(t,[0,0]),Ce(H,!0)})}),ce(W(O,fe(Q=>Q!=null&&Q.scrollTop>0),on(0)),T),je(W(y,Te(O),fe(([,Q])=>Q!=null)),([,Q])=>{Q&&(Ce(b,Q.viewport),Ce(x,Q.item),Ce(k,Q.gap),Q.scrollTop>0&&(Ce(U,!0),Wr(W(l,oa(1)),ve=>{Ce(U,!1)}),Ce(c,{top:Q.scrollTop})))}),ce(W(b,re(({height:Q})=>Q)),d),ce(W(Et(me(b,Vu),me(x,Vu),me(k,(Q,ve)=>Q&&Q.column===ve.column&&Q.row===ve.row),me(l)),re(([Q,ve,_e,Ge])=>({gap:_e,item:ve,scrollTop:Ge,viewport:Q}))),P),ce(W(Et(me(L),n,me(k,AV),me(x,Vu),me(b,Vu),me(_),me(T),me(U),me(H),me(z)),fe(([,,,,,,,Q])=>!Q),re(([Q,[ve,_e],Ge,ot,Se,Ee,be,,Ze,Ye])=>{const{column:Xe,row:Fr}=Ge,{height:Ot,width:wm}=ot,{width:C5}=Se;if(be===0&&(Q===0||C5===0))return Wx;if(wm===0){const I5=sm(Ye,Q),NW=I5+Math.max(be-1,0);return SV(Kx(I5,NW,Ee))}const qu=Zx(C5,wm,Xe);let Bo,Ea;Ze?ve===0&&_e===0&&be>0?(Bo=0,Ea=be-1):(Bo=qu*ju((ve+Fr)/(Ot+Fr)),Ea=qu*qx((_e+Fr)/(Ot+Fr))-1,Ea=fm(Q-1,yc(Ea,qu-1)),Bo=fm(Ea,yc(0,Bo))):(Bo=0,Ea=-1);const T5=Kx(Bo,Ea,Ee),{bottom:S5,top:A5}=Xx(Se,Ge,ot,T5),P5=qx(Q/qu),MW=P5*Ot+(P5-1)*Fr-S5;return{bottom:S5,itemHeight:Ot,items:T5,itemWidth:wm,offsetBottom:MW,offsetTop:A5,top:A5}})),h),ce(W(_,fe(Q=>Q!==null),re(Q=>Q.length)),L),ce(W(Et(b,x,h,k),fe(([Q,ve,{items:_e}])=>_e.length>0&&ve.height!==0&&Q.height!==0),re(([Q,ve,{items:_e},Ge])=>{const{bottom:ot,top:Se}=Xx(Q,Ge,ve,_e);return[Se,ot]}),tt(cc)),t);const pe=K(!1);ce(W(l,Te(pe),re(([Q,ve])=>ve||Q!==0)),pe);const he=br(W(Et(h,L),fe(([{items:Q}])=>Q.length>0),Te(pe),fe(([[Q,ve],_e])=>{const Ge=Q.items[Q.items.length-1].index===ve-1;return(_e||Q.bottom>0&&Q.itemHeight>0&&Q.offsetBottom===0&&Q.items.length===ve)&&Ge}),re(([[,Q]])=>Q-1),tt())),ie=br(W(me(h),fe(({items:Q})=>Q.length>0&&Q[0].index===0),on(0),tt())),de=br(W(me(h),Te(U),fe(([{items:Q},ve])=>Q.length>0&&!ve),re(([{items:Q}])=>({endIndex:Q[Q.length-1].index,startIndex:Q[0].index})),tt(hx),Hn(0)));ce(de,m.scrollSeekRangeChanged),ce(W(S,Te(b,x,L,k),re(([Q,ve,_e,Ge,ot])=>{const Se=vx(Q),{align:Ee,behavior:be,offset:Ze}=Se;let Ye=Se.index;Ye==="LAST"&&(Ye=Ge-1),Ye=yc(0,Ye,fm(Ge-1,Ye));let Xe=mm(ve,ot,_e,Ye);return Ee==="end"?Xe=Yx(Xe-ve.height+_e.height):Ee==="center"&&(Xe=Yx(Xe-ve.height/2+_e.height/2)),Ze&&(Xe+=Ze),{behavior:be,top:Xe}})),c);const Be=Ht(W(h,re(Q=>Q.offsetBottom+Q.bottom)),0);return ce(W(C,re(Q=>({height:Q.visibleHeight,width:Q.visibleWidth}))),b),{customScrollParent:E,data:_,deviation:F,footerHeight:s,gap:k,headerHeight:a,increaseViewportBy:e,initialItemCount:T,itemDimensions:x,overscan:r,restoreStateFrom:O,scrollBy:o,scrollContainerState:i,scrollHeight:I,scrollTo:c,scrollToIndex:S,scrollTop:l,smoothScrollTargetReached:u,totalCount:L,useWindowScroll:v,viewportDimensions:b,windowScrollContainerState:w,windowScrollTo:A,windowViewportRect:C,...m,gridState:h,horizontalDirection:J,initialTopMostItemIndex:z,totalListHeight:Be,...f,endReached:he,propsReady:g,rangeChanged:de,startReached:ie,stateChanged:P,stateRestoreInProgress:U,...D}},et(am,Wt,mc,Ox,ys,im,hs));function Zx(e,t,r){return yc(1,ju((e+r)/(ju(t)+r)))}function Xx(e,t,r,n){const{height:s}=r;if(s===void 0||n.length===0)return{bottom:0,top:0};const a=mm(e,t,r,n[0].index);return{bottom:mm(e,t,r,n[n.length-1].index)+s,top:a}}function mm(e,t,r,n){const s=Zx(e.width,r.width,t.column),a=ju(n/s),o=a*r.height+yc(0,a-1)*t.row;return o>0?o+t.row:o}const IV=$e(()=>{const e=K(d=>`Item ${d}`),t=K({}),r=K(null),n=K("virtuoso-grid-item"),s=K("virtuoso-grid-list"),a=K(dm),o=K("div"),i=K(ho),c=(d,f=null)=>Ht(W(t,re(m=>m[d]),tt()),f),l=K(!1),u=K(!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")}}),BV=$e(([e,t])=>({...e,...t}),et(PV,IV)),FV=M.memo(function(){const e=at("gridState"),t=at("listClassName"),r=at("itemClassName"),n=at("itemContent"),s=at("computeItemKey"),a=at("isSeeking"),o=Ir("scrollHeight"),i=at("ItemComponent"),c=at("ListComponent"),l=at("ScrollSeekPlaceholder"),u=at("context"),d=Ir("itemDimensions"),f=Ir("gap"),m=at("log"),y=at("stateRestoreInProgress"),g=Ir("reportReadyState"),E=ia(M.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;o(w);const A=v.firstChild;if(A){const{height:C,width:D}=A.getBoundingClientRect();d({height:C,width:D})}f({column:Jx("column-gap",getComputedStyle(v).columnGap,m),row:Jx("row-gap",getComputedStyle(v).rowGap,m)})},[o,d,f,m]),!0,!1);return zx(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),y?null:B.jsx(c,{className:t,ref:E,...$t(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,{...$t(l,u),height:e.itemHeight,index:v.index,width:e.itemWidth},w):M.createElement(i,{...$t(i,u),className:r,"data-index":v.index,key:w},n(v.index,v.data,u))})})}),UV=M.memo(function(){const e=at("HeaderComponent"),t=Ir("headerHeight"),r=at("headerFooterTag"),n=ia(M.useMemo(()=>a=>{t(bs(a,"height"))},[t]),!0,!1),s=at("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...$t(e,s)})}):null}),OV=M.memo(function(){const e=at("FooterComponent"),t=Ir("footerHeight"),r=at("headerFooterTag"),n=ia(M.useMemo(()=>a=>{t(bs(a,"height"))},[t]),!0,!1),s=at("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...$t(e,s)})}):null}),DV=({children:e})=>{const t=M.useContext(Lx),r=Ir("itemDimensions"),n=Ir("viewportDimensions"),s=ia(M.useMemo(()=>a=>{n(a.getBoundingClientRect())},[n]),!0,!1);return M.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:Gu(!1),children:e})},_V=({children:e})=>{const t=M.useContext(Lx),r=Ir("windowViewportRect"),n=Ir("itemDimensions"),s=at("customScrollParent"),a=cx(r,s,!1);return M.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:Gu(!1),children:e})},MV=M.memo(function({...e}){const t=at("useWindowScroll"),r=at("customScrollParent"),n=r||t?LV:NV,s=r||t?_V:DV,a=at("context");return B.jsx(n,{...e,...$t(n,a),children:B.jsxs(s,{children:[B.jsx(UV,{}),B.jsx(FV,{}),B.jsx(OV,{})]})})}),{useEmitter:Qx,useEmitterValue:at,usePublisher:Ir}=Mx(BV,{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"}},MV),NV=jx({useEmitter:Qx,useEmitterValue:at,usePublisher:Ir}),LV=Vx({useEmitter:Qx,useEmitterValue:at,usePublisher:Ir});function Jx(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,nr.WARN),t==="normal"?0:parseInt(t??"0",10)}var hm={},e5;function zV(){if(e5)return hm;e5=1;var e=uu.GenIcon;return hm.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)},hm}var RV=zV();function HV({logo:e,className:t="",style:r={},alt:n="Token logo"}){const[s,a]=M.useState(!1);return M.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(RV.AiFillQuestionCircle,{style:{width:20,height:20},className:"twap-token-svg"})}const $V=()=>B.jsx("div",{className:"twap-orders__loader",children:B.jsx("p",{children:"Loading..."})}),GV=()=>{const{isLoading:e}=Du(),t=q2(),r=Z(a=>a.state.orderIdsToCancel),n=Z(a=>a.state.cancelOrdersMode),s=Y2();return B.jsx(B.Fragment,{children:e?B.jsx($V,{}):t!=null&&t.length?B.jsx("div",{className:`twap-orders__list ${n?"twap-orders__list-select-mode":""}`,children:B.jsx(CV,{style:{height:"100%"},data:t,itemContent:(a,o)=>B.jsx(jV,{cancelOrdersMode:!!n,selected:(r==null?void 0:r.includes(o.id))||!1,selectOrder:s,order:o},a)})}):B.jsx(VV,{})})},jV=({order:e,selectOrder:t,selected:r,cancelOrdersMode:n})=>{const s=Z(i=>i.updateState),a=xt.useCallback(()=>{s({selectedOrderID:e==null?void 0:e.id})},[s,e==null?void 0:e.id]),o=xt.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(WV,{order:e}),B.jsx(qV,{value:e.progress||0}),B.jsxs("div",{className:"twap-orders__list-item-tokens",children:[B.jsx(t5,{address:e.srcTokenAddress}),B.jsx(mj.HiArrowRight,{className:"twap-orders__list-item-tokens-arrow"}),B.jsx(t5,{address:e.dstTokenAddress})]})]})})},VV=()=>{const e=Z(n=>n.state.orderHistoryStatusFilter),t=Ue(),r=xt.useMemo(()=>e||"",[e]);return B.jsx("div",{className:"twap-orders__list-empty",children:B.jsx("p",{children:t("noOrders",{status:r})})})},WV=({order:e})=>{const t=e&&e.status,r=W2(e),n=H0(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})]})},t5=e=>{const{useToken:t,components:r}=ne(),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(HV,{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 qV(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 YV=()=>{const e=Z(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(qG,{}):B.jsx(GV,{})})},KV=e=>{const t=Ue(),{marketPrice:r}=ne(),n=Z(a=>a.state.typedSrcAmount);return M.useMemo(()=>{const{isError:a,value:o}=hh(e);if(!(!a||j(n||"0").isZero()||!r))return{type:Mt.MIN_FILL_DELAY,value:o,message:t("minFillDelayError",{fillDelay:`${Sd(o)} ${t("minutes")}`})}},[e,t,n,r])},ua=()=>{const e=Z(s=>s.state.typedFillDelay),t=Z(s=>s.updateState),r=M.useMemo(()=>e||Bc,[e]),n=KV(r);return{fillDelay:r,onChange:M.useCallback(s=>t({typedFillDelay:s}),[t]),error:n,milliseconds:r.unit*r.value}},ZV=()=>{const{onChange:e,fillDelay:t,error:r}=ua(),n=Ue(),s=M.useCallback(o=>e({unit:t.unit,value:Number(o)}),[e,t]),a=M.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")}},un=()=>{const{srcToken:e}=ne(),t=Ue(),r=Z(a=>a.state.typedSrcAmount),s=Z(a=>a.state.acceptedSrcAmount)||r;return{amountWei:V2(e==null?void 0:e.decimals,s),amountUI:s,error:j(s||0).isZero()?t("enterAmount"):void 0}},XV=(e,t)=>{const{module:r,srcUsd1Token:n,marketPrice:s,minChunkSizeUsd:a}=ne(),o=Ue(),i=Z(c=>c.state.typedSrcAmount);return M.useMemo(()=>{if(j(i||"0").isZero()||!s)return;if(!e)return{type:Mt.MIN_CHUNKS,value:1,message:o("minChunksError",{minChunks:"1"})};const{isError:c}=yh(e,t,r);if(c)return{type:Mt.MAX_CHUNKS,value:t,message:o("maxChunksError",{maxChunks:`${t}`})};const{isError:l,value:u}=bh(i||"",n||"",a||0);if(l)return{type:Mt.MIN_TRADE_SIZE,value:u,message:o("minTradeSizeError",{minTradeSize:`${u}`})}},[e,t,r,i,n,a,o,s])},$n=()=>{const{srcToken:e,srcUsd1Token:t,module:r,minChunkSizeUsd:n}=ne(),s=Z(g=>g.state.typedChunks),a=ua().fillDelay,o=Z(g=>g.updateState),{amountWei:i,amountUI:c}=un(),l=M.useMemo(()=>oh(a,c||"",t||"",n||0),[c,t,n,a]),u=M.useMemo(()=>ah(l,r,s),[l,s,r]),d=M.useCallback(g=>o({typedChunks:g}),[o]),f=M.useMemo(()=>ch(i||"",u),[i,u]),m=Vr(e==null?void 0:e.decimals,f),y=M.useMemo(()=>t?j(m||"0").times(t||0).toString():"0",[m,t]);return{totalTrades:u,maxTrades:l,amountPerTradeUI:m,amountPerTradeWei:f,amountPerTradeUsd:y,onChange:d,error:XV(u,l)}},QV=()=>{const{srcToken:e,dstToken:t}=ne(),r=Ue(),{onChange:n,totalTrades:s,amountPerTradeUsd:a,amountPerTradeUI:o,error:i,maxTrades:c,amountPerTradeWei:l}=$n(),u=ze({value:o}),d=ze({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}},JV=e=>{const{module:t,marketPrice:r}=ne(),n=Ue();return M.useMemo(()=>{const s=fh(t,e),a=mh(e);if(r){if(s.isError)return{type:Mt.MAX_ORDER_DURATION,value:s.value,message:n("maxDurationError",{duration:`${Math.floor(u1(s.value)).toFixed(0)} ${n("days")}`})};if(a.isError)return{type:Mt.MIN_ORDER_DURATION,value:a.value,message:n("minDurationError",{duration:`${Math.floor(Sd(a.value)).toFixed(0)} ${n("minutes")}`})}}},[e,n,t,r])},bm=()=>{const{module:e}=ne(),t=Z(i=>i.state.typedDuration),r=Z(i=>i.updateState),n=$n().totalTrades,s=ua().fillDelay,a=M.useMemo(()=>sh(e,n,s,t),[n,s,t,e]),o=JV(a);return{duration:a,setDuration:M.useCallback(i=>r({typedDuration:i}),[r]),error:o}},eW=()=>{const{module:e}=ne(),t=Ue(),{duration:r,setDuration:n,error:s}=bm(),a=M.useCallback(c=>{n({unit:r.unit,value:Number(c)})},[n,r]),o=M.useCallback(c=>{n({unit:c,value:r.value})},[n,r]),i=M.useMemo(()=>e===ge.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}},tW=()=>{const e=Z(a=>a.state.isMarketOrder),{module:t}=ne(),r=Ue(),n=M.useMemo(()=>{if(e&&!(t!==ge.STOP_LOSS&&t!==ge.TAKE_PROFIT))return{text:r("triggerMarketPriceDisclaimer"),url:Fc}},[e,r,t]),s=M.useMemo(()=>{if(!(t!==ge.LIMIT&&t!==ge.TWAP))return{text:r(e?"marketOrderWarning":"limitPriceMessage"),url:"https://www.orbs.com/dtwap-and-dlimit-faq/"}},[e,r,t]);return n||s},Wu=()=>{const{srcToken:e,dstToken:t,marketPriceLoading:r}=ne(),n=Z(l=>l.updateState),s=Z(l=>l.state.isInvertedTrade),a=Z(l=>l.state.typedTriggerPrice),o=Z(l=>l.state.typedLimitPrice),i=Z(l=>l.state.isMarketOrder);return{onInvert:M.useCallback(()=>{a!==void 0&&n({typedTriggerPrice:j(1).div(a).toFixed()}),o!==void 0&&n({typedLimitPrice:j(1).div(o).toFixed()}),n({isInvertedTrade:!s})},[n,s,a,o,r]),isInverted:s,fromToken:s?t:e,toToken:s?e:t,isMarketPrice:i}},r5=({typedValue:e,tokenDecimals:t=18,initialPrice:r="0",percentage:n,setValue:s,setPercentage:a})=>{const{srcUsd1Token:o,dstUsd1Token:i}=ne(),{isInverted:c}=Wu(),l=M.useMemo(()=>{if(e!==void 0){const g=c?j(e).isZero()?j(0):j(1).div(e):j(e);return Pc(t,g.toFixed())}if(n!==void 0&&j(r||"0").gt(0)&&!j(r||"0").isNaN()){const g=j(r||"0"),E=j(n||0).div(100);return g.plus(g.multipliedBy(E)).decimalPlaces(0).toFixed()}return j(r).gt(0)?r:""},[e,n,t,r,c]),u=M.useCallback(g=>{s(g),a(null)},[s,a]),d=M.useCallback(g=>{s(void 0),a(g)},[s,a]),f=M.useMemo(()=>{if(!r||j(r).isZero())return"";if(n!=null)return n;if(l){const g=j(r),v=j(l).minus(g).div(g).multipliedBy(100).decimalPlaces(2).toString();return j(v||"0").isZero()?"":v}return""},[l,r,n]),m=M.useMemo(()=>{let g="";if(e!==void 0)g=e;else{const E=bn(t,l);if(j(E||"0").isZero())return"";g=c?j(1).div(E).toFixed():E}return Do(g,6,t)},[e,t,l,c]),y=aa(c?o:i,m||"0");return{amountWei:j(l).isNaN()?"":l,amountUI:j(m).isNaN()?"":m,selectedPercentage:f,onChange:u,onPercentageChange:d,isInverted:c,usd:j(y).isNaN()?"":y}},rW=()=>{const{module:e}=ne();return M.useMemo(()=>e===ge.STOP_LOSS?Km:Zm,[e])},ym=()=>{const{module:e}=ne(),t=Z(r=>r.state.isMarketOrder);return M.useMemo(()=>e!==ge.STOP_LOSS&&e!==ge.TAKE_PROFIT||t?void 0:e===ge.STOP_LOSS?Xm:Qm,[e,t])},nW=(e="")=>{const{module:t,marketPrice:r}=ne(),n=Ue(),s=Z(a=>a.state.typedSrcAmount);return M.useMemo(()=>{if(j(s||"0").isZero()||!r||t!==ge.STOP_LOSS&&t!==ge.TAKE_PROFIT)return;const a=lh(r||"",e||"",t);if(a!=null&&a.isError)return{type:Mt.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE,value:a.value,message:n("StopLossTriggerPriceError")||""};const o=uh(r||"",e||"",t);if(o!=null&&o.isError)return{type:Mt.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE,value:o.value,message:n("TakeProfitTriggerPriceError")||""};if(!e||j(e||0).isZero())return{type:Mt.EMPTY_TRIGGER_PRICE,value:e,message:n("emptyTriggerPrice")||""}},[r,e,t,n,s])},sW=e=>{const{srcToken:t,dstToken:r,module:n}=ne(),s=$n().amountPerTradeWei,a=Z(i=>i.state.isMarketOrder),o=M.useMemo(()=>nh(n,s,e,(t==null?void 0:t.decimals)||0),[e,s,a,t==null?void 0:t.decimals,n]);return{amountWei:o,amountUI:Vr((r==null?void 0:r.decimals)||0,o)}},da=()=>{const{dstToken:e,marketPrice:t,module:r}=ne(),n=Z(m=>m.updateState),s=rW(),a=Z(m=>m.state.triggerPricePercent),o=M.useCallback(m=>{n({triggerPricePercent:m})},[n]),i=a===void 0?s:a,c=r===ge.STOP_LOSS||r===ge.TAKE_PROFIT,l=r5({typedValue:Z(m=>m.state.typedTriggerPrice),percentage:i,tokenDecimals:e==null?void 0:e.decimals,initialPrice:c?t:void 0,setValue:M.useCallback(m=>n({typedTriggerPrice:m}),[n]),setPercentage:o}),u=nW(l.amountWei),{amountWei:d,amountUI:f}=sW(l.amountWei);return M.useMemo(()=>({...l,error:u,pricePerChunkWei:d,pricePerChunkUI:f}),[l,u,d,f])},aW=()=>{const{module:e,marketPrice:t,marketPriceLoading:r}=ne(),n=Ue(),{amountUI:s,onChange:a,onPercentageChange:o,usd:i,selectedPercentage:c,error:l}=da(),u=Z(w=>w.state.isMarketOrder),d=Z(w=>w.updateState),{isInverted:f,onInvert:m,fromToken:y,toToken:g}=Wu(),E=M.useCallback(()=>{d({triggerPricePercent:void 0,typedTriggerPrice:void 0})},[d]),v=e!==ge.STOP_LOSS&&e!==ge.TAKE_PROFIT;return{price:s,error:l,label:n("stopLossLabel"),tooltip:e===ge.STOP_LOSS?n("stopLossTooltip"):n("takeProfitTooltip"),onChange:a,onPercentageChange:o,percentage:c,isActive:!u,onReset:E,usd:i,fromToken:y,toToken:g,prefix:"",isLoading:r||!t,isInverted:f,hide:v,onInvert:m}},oW=e=>{const{module:t,marketPrice:r}=ne(),n=Ue(),{amountWei:s}=da(),a=Z(i=>i.state.isMarketOrder),o=Z(i=>i.state.typedSrcAmount);return M.useMemo(()=>{if(j(o||"0").isZero()||!s||!r)return;const i=dh(s,e,a,t),c=ph(s,e,a,t);if(i!=null&&i.isError)return{type:Mt.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:n("triggerLimitPriceError")||"",value:i.value};if(c!=null&&c.isError)return{type:Mt.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:n("triggerLimitPriceError")||"",value:c.value};if(e&&j(e||0).isZero())return{type:Mt.MISSING_LIMIT_PRICE,message:n("emptyLimitPrice")||"",value:e||""}},[e,n,s,t,a,o,r])},gc=()=>{const{dstToken:e,marketPrice:t,module:r}=ne(),n=Z(l=>l.updateState),s=ym(),a=Z(l=>l.state.limitPricePercent),o=a===void 0?s:a,i=r5({typedValue:Z(l=>l.state.typedLimitPrice),percentage:o,tokenDecimals:e==null?void 0:e.decimals,initialPrice:t,setValue:M.useCallback(l=>n({typedLimitPrice:l}),[n]),setPercentage:M.useCallback(l=>{n({limitPricePercent:l})},[n,r])}),c=oW(i.amountWei);return M.useMemo(()=>({...i,error:c}),[i,c])},iW=()=>{const{module:e}=ne(),t=Z(i=>i.updateState),r=Z(i=>i.state.isMarketOrder),n=ym(),s=Z(i=>i.state.triggerPricePercent)||0,a=e===ge.LIMIT,o=M.useCallback(()=>{!r&&e===ge.STOP_LOSS&&t({limitPricePercent:n}),t({isMarketOrder:!r})},[t,s,e,r,n]);return{isLimitPrice:!r,toggleLimitPrice:o,hide:a}},cW=()=>{const{module:e,marketPriceLoading:t}=ne(),r=Ue(),{amountUI:n,onChange:s,onPercentageChange:a,usd:o,selectedPercentage:i,error:c}=gc(),l=Z(L=>L.state.isMarketOrder),u=Z(L=>L.updateState),d=ym(),{isLimitPrice:f,toggleLimitPrice:m}=iW(),{triggerPricePercent:y}=Z(L=>L.state),{isInverted:g,onInvert:E,fromToken:v,toToken:w}=Wu(),A=M.useMemo(()=>{if(!(e!==ge.STOP_LOSS&&e!==ge.TAKE_PROFIT||!l))return{text:r("triggerMarketPriceDisclaimer"),url:Fc}},[y,r,e,l]),C=M.useCallback(()=>{u({typedLimitPrice:void 0}),u({limitPricePercent:d})},[u,e,d]),D=M.useMemo(()=>e===ge.STOP_LOSS?r("stopLossLimitPriceTooltip"):r("limitPriceTooltip"),[r,e]);return{price:n,error:c,warning:A,label:r("limitPrice"),tooltip:D,onChange:s,onPercentageChange:a,onReset:C,usd:o,fromToken:v,toToken:w,percentage:i,isInverted:g,isLoading:t,isLimitPrice:f,toggleLimitPrice:m,onInvert:E}},n5=()=>{const{module:e,marketPrice:t}=ne(),r=gc().amountWei,n=da().amountWei,s=Z(a=>a.state.isMarketOrder);return e===ge.LIMIT||!s?r||"":e===ge.STOP_LOSS||e===ge.TAKE_PROFIT?n||"":t||""},xc=()=>{const{srcToken:e,dstToken:t}=ne(),r=n5(),n=un().amountWei,s=M.useMemo(()=>th(n||"",r,(e==null?void 0:e.decimals)||0),[n,r,e==null?void 0:e.decimals]);return{amountWei:s,amountUI:Vr(t==null?void 0:t.decimals,s)}},gm=()=>{const{srcToken:e,dstToken:t,dstUsd1Token:r}=ne(),n=n5(),s=$n().amountPerTradeWei,a=Z(c=>c.state.isMarketOrder),o=M.useMemo(()=>rh(s,n,!!a,(e==null?void 0:e.decimals)||0),[s,n,a,e==null?void 0:e.decimals]),i=Vr(t==null?void 0:t.decimals,o);return{amountWei:o,amountUI:i,usd:aa(i,r)}},s5=()=>{const{srcBalance:e,chainId:t}=ne(),r=Ue(),n=un().amountWei;return M.useMemo(()=>{if(e&&j(n).gt(e))return{type:Mt.INSUFFICIENT_BALANCE,message:r("insufficientFunds"),value:e||""}},[e,n,r,t])};function a5(){const{marketPrice:e,marketPriceLoading:t}=ne(),r=Z(l=>l.state.typedSrcAmount),n=s5(),{error:s}=da(),{error:a}=gc(),{error:o}=$n(),{error:i}=ua(),{error:c}=bm();return M.useMemo(()=>{const l=Fo("ignore-errors");if(!(j(e||0).isZero()||j(r||0).isZero()||t||l))return s||a||o||i||c||n},[e,t,r,s,a,o,i,c,n])}const o5=(e,t)=>{const{marketPriceLoading:r,srcToken:n,dstToken:s,srcBalance:a,dstBalance:o}=ne(),i=Z(C=>C.state.typedSrcAmount),c=Z(C=>C.updateState),{srcUsd1Token:l,dstUsd1Token:u}=ne(),d=aa(i,l),f=aa(t,u),m=CG(),y=e?n:s,g=Vr(y==null?void 0:y.decimals,e?a:o),E=s5(),v=M.useCallback(C=>{e&&c({typedSrcAmount:C})},[c,e]),w=M.useCallback(()=>{e&&c({typedSrcAmount:Do(g,8)})},[c,e,g]),A=m||e?i:Do(t||"",8);return{balance:g,usd:e||m?d:f,value:A||"",valueWei:V2(y==null?void 0:y.decimals,A),onChange:v,onMax:w,isLoading:i?e?!1:r:!1,token:y,isInsufficientBalance:e?E:void 0}},lW=()=>o5(!0),uW=()=>{const e=xc().amountUI,t=Z(r=>r.state.typedSrcAmount);return o5(!1,t?e:"")},dW=()=>{const e=Z(t=>t.updateState);return{amount:Z(t=>t.state.typedSrcAmount)||"",reset:M.useCallback(()=>e({typedSrcAmount:""}),[e])}},pW=()=>{const e=Z(n=>n.state.isMarketOrder),t=Z(n=>n.updateState),r=M.useCallback(()=>{t({isMarketOrder:!e})},[t,e]);return{isMarketPrice:!e,togglePrice:r}},xm=()=>{const e=Z(r=>r.state.currentTime),t=bm().duration;return M.useMemo(()=>ih(e,t),[e,t])},fW=()=>{const{srcUsd1Token:e,dstUsd1Token:t}=ne(),r=un().amountUI,n=xc().amountUI,s=aa(r,e),a=aa(n,t);return{srcAmountUsd:s,dstAmountUsd:a}},mW=()=>{const{fees:e,dstUsd1Token:t}=ne(),{amountUI:r}=xc(),n=M.useMemo(()=>!e||!r?"":j(r).multipliedBy(e).dividedBy(100).toFixed(),[r,e]);return{amount:n,percent:e,usd:aa(n,t)}},i5=()=>{const{srcToken:e,dstToken:t,account:r,chainId:n,slippage:s,config:a}=ne(),{amountWei:o}=un(),{amountWei:i}=gc(),{amountPerTradeWei:c,totalTrades:l}=$n(),u=xm(),{amountWei:d}=gm(),{amountWei:f}=da(),{milliseconds:m}=ua();return M.useMemo(()=>{var y;return{srcToken:e,dstToken:t,limitPrice:i,deadline:u,srcAmount:o,srcAmountPerTrade:c,totalTrades:l,minDestAmountPerTrade:d,tradeInterval:m,triggerPricePerTrade:f,maker:r,rePermitData:xh({chainId:n,srcToken:Is((e==null?void 0:e.address)||"")?((y=Bs(n))==null?void 0:y.wToken.address)||"":(e==null?void 0:e.address)||"",dstToken:(t==null?void 0:t.address)||"",srcAmount:o,deadlineMillis:u,fillDelayMillis:!l||l===1?0:m,slippage:s*100,account:r,srcAmountPerTrade:c,dstMinAmountPerTrade:d,triggerAmountPerTrade:f,config:a})}},[e,t,i,u,o,c,l,d,f,r,m,s,n,a])},c5=()=>{const{srcToken:e,dstToken:t,account:r}=ne(),n=Ue(),{amountUI:s,usd:a}=gm(),{amountPerTradeUI:o,amountPerTradeUsd:i,totalTrades:c}=$n(),{amountUI:l,usd:u}=da(),d=xm(),{amountUI:f,usd:m}=gc(),{amount:y,percent:g,usd:E}=mW(),{milliseconds:v}=ua(),{amountUI:w}=xc(),{srcAmountUsd:A,dstAmountUsd:C}=fW(),D=un().amountUI,L=Z(x=>x.state.isMarketOrder),T=K2({srcToken:e,dstToken:t,account:r,limitPrice:L?void 0:f,limitPriceUsd:L?void 0:m,deadline:d,tradeInterval:v,srcAmount:D,totalTrades:c,srcAmountPerTrade:o,srcAmountPerTradeUsd:i,minDestAmountPerTrade:s,minDestAmountPerTradeUsd:a,triggerPricePerTrade:l,triggerPricePerTradeUsd:u,srcUsd:A,dstUsd:C,dstAmount:w}),h=ze({value:y}),b=ze({value:E});return M.useMemo(()=>({...T,fees:{label:n("fees",{value:`${g}%`}),amount:h,usd:b||"",percentage:g}}),[T,h,b,g])},l5=M.createContext({}),hW=({children:e,...t})=>B.jsx(l5.Provider,{value:t,children:e}),bW=()=>M.useContext(l5),u5=()=>{var s,a;const e=Ue(),{wrapTxHash:t,srcToken:r}=Z(o=>o.state.swapExecution),n=(a=(s=ac())==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},yW=(e=!1,t=1)=>{const{module:r}=ne(),n=Ue();return M.useMemo(()=>r===ge.STOP_LOSS?n("stopLoss"):r===ge.TAKE_PROFIT?n("takeProfit"):n(e?"twapMarket":t===1?"limit":"twapLimit"),[n,r,e,t])},gW=({price:e,dstTokenSymbol:t,label:r,usd:n})=>B.jsxs(we.DetailRow,{title:r,children:[`${e||"-"} ${t||""}`,B.jsx(we.USD,{value:n})]}),d5=()=>{const e=Ue(),t=Z(a=>a.state.isMarketOrder),r=Z(a=>a.state.swapExecution.status),{totalTrades:n}=$n(),s=yW(t,n);return r===mt.SUCCESS?e("createOrderActionSuccess",{name:s}):e("createOrderAction",{name:s})},xW=()=>{const e=Z(y=>y.state.swapExecution.srcToken),t=Ue(),{step:r,wrapTxHash:n,approveTxHash:s}=Z(y=>y.state.swapExecution),a=ac(),o=R0(n),i=R0(n),c=R0(s),l=Z(y=>y.state.swapExecution.status),d=Is((e==null?void 0:e.address)||"")?(a==null?void 0:a.native.symbol)||"":(e==null?void 0:e.symbol)||"",f=a==null?void 0:a.wToken.symbol,m=d5();return M.useMemo(()=>r===Ds.WRAP?{title:t("wrapAction",{symbol:d}),footerLink:o,footerText:t(o?"viewOnExplorer":"proceedInWallet")}:r===Ds.APPROVE?{title:t("approveAction",{symbol:d}),footerLink:c,footerText:t(c?"viewOnExplorer":"proceedInWallet")}:{title:m,footerText:l===mt.LOADING?t("proceedInWallet"):void 0},[r,c,d,m,t,o,i,f,l])},wW=({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(u5,{})]});function vW({error:e}){const{components:t}=ne(),r=Ue(),n=Z(o=>{var i;return(i=o.state.swapExecution)==null?void 0:i.wrapTxHash}),s=t.SubmitOrderErrorView,a=B.jsx(Qn.Failed,{error:B.jsx(wW,{error:e}),footerLink:Fc,footerText:r("viewOnExplorer")});return s?B.jsx(s,{wrapTxHash:n,error:e,children:a}):a}const EW=()=>{const{components:e}=ne(),t=Z(u=>u.state.swapExecution.srcToken),r=Z(u=>u.state.swapExecution.dstToken),{reviewDetails:n}=bW(),s=Ue(),a=Z(u=>{var d;return!!((d=u.state.swapExecution)!=null&&d.status)}),o=c5(),i=e.USD,c=e.SubmitOrderMainView,l=B.jsxs(B.Fragment,{children:[B.jsx(Qn.Main,{fromTitle:s("from"),toTitle:s("to"),inUsd:i?B.jsx(i,{value:o.srcUsd,isLoading:!1}):`$${o.srcUsd}`,outUsd:i?B.jsx(i,{value:o.dstUsd,isLoading:!1}):`$${o.dstUsd}`}),!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.deadline.value,label:o.deadline.label,tooltip:o.deadline.tooltip||""}),B.jsx(we.TriggerPrice,{price:o.triggerPricePerTrade.value,dstToken:r,label:o.triggerPricePerTrade.label,tooltip:o.triggerPricePerTrade.tooltip||"",usd:o.triggerPricePerTrade.usd}),B.jsx(gW,{price:o.limitPrice.value,dstTokenSymbol:r==null?void 0:r.symbol,label:o.limitPrice.label,usd:o.limitPrice.usd}),B.jsx(we.MinDestAmount,{dstToken:r,dstMinAmountOut:o.minDestAmountPerTrade.value,label:o.minDestAmountPerTrade.label,tooltip:o.minDestAmountPerTrade.tooltip||"",usd:o.minDestAmountPerTrade.usd}),B.jsx(we.TradeSize,{tradeSize:o.sizePerTrade.value,trades:o.totalTrades.value,srcToken:t,label:o.sizePerTrade.label,tooltip:o.sizePerTrade.tooltip}),B.jsx(we.TradesAmount,{trades:o.totalTrades.value,label:o.totalTrades.label,tooltip:o.totalTrades.tooltip}),B.jsx(we.TradeInterval,{chunks:o.totalTrades.value,fillDelayMillis:o.tradeInterval.value,label:o.tradeInterval.label,tooltip:o.tradeInterval.tooltip}),B.jsx(we.Recipient,{}),o.fees.amount&&B.jsx(we.Fees,{fees:o.fees.amount,label:o.fees.label,usd:o.fees.usd,dstTokenSymbol:r==null?void 0:r.symbol})]})}),n]})]});return c?B.jsx(c,{children:l}):l},kW=e=>{const{status:t,stepIndex:r,totalSteps:n,parsedError:s}=Z(w=>w.state.swapExecution),{components:a}=ne(),o=a.Spinner,i=a.SuccessIcon,c=a.ErrorIcon,l=a.TokenLogo,{srcToken:u,dstToken:d}=ne(),f=un().amountUI,m=xc().amountUI,y=ze({value:f,decimalScale:2}),g=ze({value:m,decimalScale:2}),E=M.useMemo(()=>({symbol:u==null?void 0:u.symbol,logoUrl:u==null?void 0:u.logoUrl}),[u]),v=M.useMemo(()=>({symbol:d==null?void 0:d.symbol,logoUrl:d==null?void 0:d.logoUrl}),[d]);return B.jsx(hW,{...e,children:B.jsx(Qn,{inAmount:y,outAmount:g,swapStatus:t,totalSteps:n,currentStep:xW(),currentStepIndex:r,inToken:E,outToken:v,components:{SrcTokenLogo:l&&B.jsx(l,{token:u}),DstTokenLogo:l&&B.jsx(l,{token:d}),Failed:B.jsx(vW,{error:s}),Success:B.jsx(CW,{}),Main:B.jsx(EW,{}),Loader:o,SuccessIcon:i,FailedIcon:c}})})},CW=()=>{const e=d5(),{components:t}=ne(),r=Z(a=>a.state.swapExecution.orderId),n=t.SubmitOrderSuccessView,s=B.jsxs(B.Fragment,{children:[B.jsx(Qn.Success,{title:e}),B.jsx(u5,{})]});return n?B.jsx(n,{newOrderId:r,children:s}):s},TW=()=>{const{supportedChains:e}=ne();return M.useMemo(()=>e,[e])},SW=()=>{const{config:e}=ne();return M.useMemo(()=>({spender:e.repermit}),[e])},AW=()=>{var c;const{account:e,walletClient:t,overrides:r,refetchBalances:n,callbacks:s,chainId:a}=ne(),o=(c=ac())==null?void 0:c.wToken,i=$0();return gn({mutationFn:async({onHash:l,srcAmountWei:u})=>{var m,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;dt.onWrapRequest(),(m=s==null?void 0:s.onWrapRequest)==null||m.call(s),r!=null&&r.wrap?d=await r.wrap(BigInt(u)):d=await t.writeContract({abi:Um,functionName:"deposit",account:e,address:o.address,value:BigInt(u),chain:t.chain}),l==null||l(d);const f=await i(d);if(!f)throw new Error("failed to get transaction receipt");if(f.status==="reverted")throw new Error("failed to wrap token");return dt.onWrapSuccess(d),(y=s==null?void 0:s.onWrapSuccess)==null||y.call(s,{txHash:f.transactionHash,explorerUrl:_o(f.transactionHash,a),amount:bn(o.decimals,u)}),n==null||n(),f},onError:l=>{throw dt.onWrapError(l),l}})},PW=()=>{const{account:e,walletClient:t,chainId:r,callbacks:n}=ne(),s=i5().rePermitData,a=HG();return gn({mutationFn:async()=>{var y,g,E,v;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!r)throw new Error("missing chainId");const{order:o,domain:i,types:c,primaryType:l}=s;dt.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),dt.onSignOrderError(w),w}dt.onSignOrderSuccess(u),(E=n==null?void 0:n.onSignOrderSuccess)==null||E.call(n,u);const d=zL(u),f={v:q(d.v||0),r:d.r,s:d.s},m=await Ch(o,f);return(v=n==null?void 0:n.onOrderCreated)==null||v.call(n,m),a(m),m}})},p5=()=>{const{account:e,publicClient:t,config:r}=ne();return gn({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");console.log(r.repermit,"repermit");const a=await t.readContract({address:n,abi:xg,functionName:"allowance",args:[e,r.repermit]}).then(i=>i.toString()),o=j(a||"0").lt(j(s).toString());return{allowance:a,approvalRequired:o}}})},IW=()=>{const{account:e,walletClient:t,overrides:r,config:n,chainId:s,callbacks:a}=ne(),o=$0(),{mutateAsync:i}=p5();return gn({onError:c=>{dt.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),dt.onApproveRequest();let d;if(r!=null&&r.approveOrder?d=await r.approveOrder({tokenAddress:c.address,spenderAddress:n.repermit,amount:Ls}):d=await t.writeContract({abi:xg,functionName:"approve",account:e,address:c.address,args:[n.repermit,Ls],chain:t.chain}),!d)throw new Error("failed to approve token");l(d);const f=await o(d);if(!f)throw new Error("failed to get transaction receipt");if(f.status==="reverted")throw new Error("failed to approve token");let m=!1;for(let E=0;E<3;E++){const{approvalRequired:v}=await i({tokenAddress:c.address,srcAmountWei:u});if(!v){m=!0;break}E<2&&await new Promise(w=>setTimeout(w,3e3))}if(!m)throw new Error(`Insufficient ${c.symbol} allowance to perform the swap. Please approve the token first.`);return dt.onApproveSuccess(f.transactionHash),(g=a==null?void 0:a.onApproveSuccess)==null||g.call(a,{txHash:f.transactionHash,explorerUrl:_o(f.transactionHash,s),token:c,amount:bn(c.decimals,u)}),f}})},BW=()=>{const{account:e,chainId:t,srcToken:r,dstToken:n,module:s,slippage:a}=ne(),o=da(),i=un().amountWei,c=$n().amountPerTradeWei,l=xm(),u=ua().fillDelay,d=gm().amountWei,f=Z(m=>m.state.isMarketOrder);return gn({mutationFn:async()=>{dt.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:f||!1})}})};function FW(e){const t=e.message,r=t.match(/,\s*code\s*:\s*(\d+)/i);return{message:t.replace(/^error\s*:/i,"").replace(/,\s*code\s*:\s*\d+/i,"").trim()||"",code:r?Number(r[1]):0}}const UW=()=>{const{srcToken:e,dstToken:t,chainId:r,callbacks:n}=ne(),s=IW().mutateAsync,a=AW().mutateAsync,o=PW().mutateAsync,{mutateAsync:i}=p5(),c=Z(d=>d.updateSwapExecution),{amountWei:l}=un(),u=BW().mutate;return gn({mutationFn:async()=>{var f,m;const d=Is((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=l1(e,r);c({allowanceLoading:!0});const{approvalRequired:g}=await i({tokenAddress:y.address,srcAmountWei:l});let E=0,v=1;d&&v++,g&&v++,c({totalSteps:v,stepIndex:E,allowanceLoading:!1,status:mt.LOADING}),u(),d&&(c({step:Ds.WRAP}),await a({onHash:A=>c({wrapTxHash:A}),srcAmountWei:l}),E++,c({stepIndex:E})),g&&(c({step:Ds.APPROVE}),await s({token:y,onHash:A=>c({approveTxHash:A}),srcAmountWei:l}),E++,c({stepIndex:E})),c({step:Ds.CREATE});const w=await o();return c({status:mt.SUCCESS,orderId:w.id}),w}catch(y){if(Td(y))(f=n==null?void 0:n.onSubmitOrderRejected)==null||f.call(n),c({step:void 0,status:void 0,stepIndex:void 0,error:y});else{const g=FW(y);(m=n==null?void 0:n.onSubmitOrderFailed)==null||m.call(n,g),c({status:mt.FAILED,parsedError:g,error:y})}throw y}}})},OW=()=>{const{marketPrice:e,srcToken:t,dstToken:r}=ne(),n=UW(),s=Z(f=>f.updateState),{amountUI:a}=un(),o=Z(f=>f.resetState),i=Z(f=>f.state.swapExecution),c=M.useCallback(()=>{(i==null?void 0:i.status)===mt.SUCCESS&&(s({typedSrcAmount:""}),setTimeout(()=>{o()},1e3))},[i==null?void 0:i.status,o,s]),l=M.useCallback(()=>{(i==null?void 0:i.status)!==mt.LOADING&&s({acceptedSrcAmount:void 0,acceptedMarketPrice:void 0,swapExecution:{srcToken:t,dstToken:r}})},[s,t,r]),u=gn({mutationFn:async()=>(s({acceptedSrcAmount:a,acceptedMarketPrice:e}),await n.mutateAsync())}),d=M.useCallback(()=>u.mutateAsync(),[u]);return M.useMemo(()=>({reset:o,onCloseModal:c,onOpenModal:l,onSubmit:d,...i,isLoading:!!((i==null?void 0:i.status)===mt.LOADING||i!=null&&i.allowanceLoading),isSuccess:(i==null?void 0:i.status)===mt.SUCCESS,isFailed:(i==null?void 0:i.status)===mt.FAILED}),[o,c,d,i])},DW=()=>{const e=Ue(),{marketPrice:t,srcToken:r,dstToken:n,marketPriceLoading:s,srcBalance:a,srcUsd1Token:o,noLiquidity:i}=ne(),c=s||j(o||"0").isZero()||a===void 0||j(t||"0").isZero(),l=Z(y=>y.state.typedSrcAmount),u=!!(r&&n&&l&&c),d=a5(),f=M.useMemo(()=>i?e("noLiquidity"):j(l||"0").isZero()?e("enterAmount"):(d==null?void 0:d.type)===Mt.INSUFFICIENT_BALANCE?e("insufficientFunds"):e("placeOrder"),[d,e,l,i]),m=!!(d||i||u||j(l||"0").isZero()||!r||!n);return M.useMemo(()=>({disabled:m,text:f,loading:u}),[m,f,u])};vh(Aw.version);const _W={SubmitOrderPanel:kW,Orders:YV};R.CRASH_ERROR_MESSAGE=ew,R.Components=_W,R.Configs=Dt,R.DEFAULT_DURATION_OPTIONS=ZL,R.DEFAULT_FILL_DELAY=Bc,R.DEFAULT_STOP_LOSS_LIMIT_PERCENTAGE=Xm,R.DEFAULT_STOP_LOSS_PERCENTAGE=Km,R.DEFAULT_TAKE_PROFIT_LIMIT_PERCENTAGE=Qm,R.DEFAULT_TAKE_PROFIT_PERCENTAGE=Zm,R.DISCLAIMER_URL=J5,R.EIP712_TYPES=Ym,R.ERC20_ABI=M5,R.EXCLUSIVITY_OVERRIDE_BPS=Y5,R.FEES=q5,R.IWETH_ABI=Um,R.InputErrors=Mt,R.LEGACY_EXCHANGES_MAP=Wm,R.MAX_ORDER_DURATION_MILLIS=Ca,R.MIN_CHUNKS=V5,R.MIN_FILL_DELAY_MILLIS=Ic,R.MIN_FILL_DELAY_MINUTES=Hm,R.MIN_ORDER_DURATION_MILLIS=ad,R.Module=ge,R.ORBS_LOGO=Z5,R.ORBS_LOGO_FALLBACK=X5,R.ORBS_SLTP_FAQ_URL=K5,R.ORBS_TWAP_FAQ_URL=Fc,R.ORBS_WEBSITE_URL=Q5,R.OrderStatus=lt,R.OrderType=ut,R.PRICE_PROTECTION_SETTINGS=XL,R.Partners=_m,R.QUERY_PARAMS=Uc,R.REPERMIT_ABI=Om,R.REPERMIT_PRIMARY_TYPE=qm,R.SUGGEST_CHUNK_VALUE=j5,R.SpotProvider=YL,R.Steps=Ds,R.SwapStatus=mt,R.THE_GRAPH_ORDERS_API=Gm,R.TWAP_ABI=Dm,R.TimeUnit=Gt,R.amountBN=Pc,R.amountUi=bn,R.analytics=dt,R.buildRePermitOrderData=xh,R.copy=D3,R.ensureWrappedToken=l1,R.eqIgnoreCase=Ps,R.fillDelayText=o1,R.formatDecimals=Do,R.getAccountOrders=Ph,R.getApiEndpoint=sd,R.getChunks=ah,R.getConfig=cd,R.getDeadline=ih,R.getDestTokenAmount=th,R.getDestTokenMinAmountPerChunk=rh,R.getDuration=sh,R.getEstimatedDelayBetweenChunksMillis=id,R.getExplorerUrl=_o,R.getMaxChunksError=yh,R.getMaxFillDelayError=ow,R.getMaxOrderDurationError=fh,R.getMaxPossibleChunks=oh,R.getMinFillDelayError=hh,R.getMinNativeBalance=M3,R.getMinOrderDurationError=mh,R.getMinTradeSizeError=bh,R.getMinimumDelayMinutes=aw,R.getNetwork=Bs,R.getOrderExcecutionRate=i1,R.getOrderFillDelayMillis=td,R.getOrderLimitPriceRate=c1,R.getOrderType=N3,R.getPartnerChains=zm,R.getPartnerIdentifier=_t,R.getPartners=gh,R.getQueryParam=Fo,R.getSrcTokenChunkAmount=ch,R.getStopLossLimitPriceError=dh,R.getStopLossPriceError=lh,R.getTakeProfitLimitPriceError=ph,R.getTakeProfitPriceError=uh,R.getTriggerPricePerChunk=nh,R.isNativeAddress=Is,R.isTxRejected=Td,R.makeElipsisAddress=Cd,R.maxUint256=W5,R.millisToDays=u1,R.millisToMinutes=Sd,R.nativeTokenAddresses=Vm,R.networks=Ft,R.parseError=_3,R.removeCommas=O3,R.setApiMode=G5,R.setUIVersion=vh,R.shouldUnwrapOnly=Pd,R.shouldWrapOnly=Ad,R.submitOrder=Ch,R.useAddresses=SW,R.useDisclaimerPanel=tW,R.useDstTokenPanel=uW,R.useDurationPanel=eW,R.useFillDelayPanel=ZV,R.useFormatNumber=ze,R.useInputErrors=a5,R.useInvertTradePanel=Wu,R.useLimitPricePanel=cW,R.useOrder=i5,R.useOrderHistoryPanel=WG,R.useOrderInfo=c5,R.usePartnerChains=TW,R.useSrcTokenPanel=lW,R.useSubmitOrderButton=DW,R.useSubmitOrderPanel=OW,R.useTogglePricePanel=pW,R.useTradesPanel=QV,R.useTranslations=Ue,R.useTriggerPricePanel=aW,R.useTypedSrcAmount=dW,R.zeroAddress=jm,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})}));
|
|
126
|
+
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function vG(e){e=wG(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=L0);var a=e.onBlur;a===void 0&&(a=L0);var o=e.thousandSeparator,i=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,m=e.onValueChange,y=aG(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=Uu(e),E=g.decimalSeparator,v=g.allowedDecimalSeparators,w=function(P){return j2(P,e)},A=function(P,O){return gG(P,O,e)},C=fo(d)?u:d,D=f??yG(C,l,t);fo(d)?fo(u)||(D=D||typeof u=="number"):D=D||typeof d=="number";var L=function(P){return L2(P)?P:(typeof P=="number"&&(P=$2(P)),D&&typeof i=="number"?G2(P,i,!!c):P)},T=mG(L(d),L(u),!!D,w,A,m),h=T[0],b=h.numAsString,x=h.formattedValue,S=T[1],I=function(P){var O=P.target,U=P.key,z=O.selectionStart,H=O.selectionEnd,G=O.value;if(G===void 0&&(G=""),(U==="Backspace"||U==="Delete")&&H<l.length){P.preventDefault();return}if(z!==H){s(P);return}U==="Backspace"&&G[0]==="-"&&z===l.length+1&&r&&sc(O,1),i&&c&&(U==="Backspace"&&G[z-1]===E?(sc(O,z-1),P.preventDefault()):U==="Delete"&&G[z]===E&&P.preventDefault()),v!=null&&v.includes(U)&&G[z]===E&&sc(O,z+1);var J=o===!0?",":o;U==="Backspace"&&G[z-1]===J&&sc(O,z-1),U==="Delete"&&G[z]===J&&sc(O,z+1),s(P)},F=function(P){var O=b;if(O.match(/\d/g)||(O=""),n||(O=dG(O)),c&&i&&(O=G2(O,i,c)),O!==b){var U=j2(O,e);S({formattedValue:U,value:O,floatValue:parseFloat(O)},{event:P,source:N0.event})}a(P)},_=function(P){return P===E?!0:N2(P)},k=function(P){var O=P.currentValue,U=P.lastValue,z=P.formattedValue,H=P.currentValueIndex,G=P.formattedValueIndex,J=O[H],pe=z[G],he=pG(U,O),ie=he.to,de=function(Fe){return A(Fe).indexOf(".")+l.length};return d===0&&c&&i&&O[ie.start]===E&&de(O)<H&&de(z)>G?!1:H>=ie.start&&H<ie.end&&v&&v.includes(J)&&pe===E?!0:J===pe};return Object.assign(Object.assign({},y),{value:x,valueIsNumericString:!1,isValidInputCharacter:_,isCharacterSame:k,onValueChange:S,format:w,removeFormatting:A,getCaretBoundary:function(P){return xG(P,e)},onKeyDown:I,onBlur:F})}const V2=(e,t)=>M.useMemo(()=>Pc(e,t),[e,t]),Vr=(e,t)=>M.useMemo(()=>bn(e,t),[e,t]),ac=()=>{const{chainId:e}=ne();return M.useMemo(()=>Bs(e),[e])},R0=e=>{const t=ac();return M.useMemo(()=>{if(!(!e||!t))return _o(e,t.id)},[e,t])},aa=(e,t)=>M.useMemo(()=>!e||!t||j(e||"0").isZero()||j(t||"0").isZero()?"":j(e||"0").times(t).toFixed(),[e,t]),EG=()=>{const{srcToken:e,dstToken:t,chainId:r}=ne();return M.useMemo(()=>Ad(e,t,r),[e,t,r])},kG=()=>{const{srcToken:e,dstToken:t,chainId:r}=ne();return M.useMemo(()=>Pd(e,t,r),[e,t,r])},CG=()=>{const e=EG(),t=kG();return e||t},H0=e=>{const{overrides:t}=ne();return M.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 TG(){const{callbacks:e}=ne();return M.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 SG=(e,t)=>M.useMemo(()=>Do(e==null?void 0:e.toString(),t),[e,t]),ze=({value:e,decimalScale:t=3,prefix:r,suffix:n})=>{var c;const s=SG(e,t),{overrides:a}=ne(),o=a==null?void 0:a.numberFormat,i=vG({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()},AG={expirationTooltip:"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.",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.",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",tradeIntervalLabel:"Trade interval",expirationLabel:"Expiration",limitPrice:"Limit Price",finalExcecutionPrice:"Final execution price",marketPrice:"Market price",from:"From",to:"To (estimated)",Open:"Open",Completed:"Completed",Expired:"Expired",Canceled:"Canceled",cancelOrder:"Cancel Order",minReceivedPerTrade:"Min. received per trade",triggerPricePerChunk:"Trigger Price per trade",maxChunksError:"Max. trades amount is {maxChunks}",minChunksError:"Min. trades amount is {minChunks}",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",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 PG(e){let t=e;const r=/\{[^{}]*\}/g;for(;r.test(t);)t=t.replace(r,"");return t}const Be=()=>{const e=ne();return M.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])||AG[r];return PG(a.replace(/{(\w+)}/g,(c,l)=>(n==null?void 0:n[l])||c))},[e.getTranslation,e.translations])},Ou=({value:e})=>{const t=ze({value:e,decimalScale:2});return t?B.jsx("small",{className:"twap-order-details__detail-row-value-usd",children:` ($${t})`}):null},IG=({deadline:e,label:t,tooltip:r})=>{const n=H0(e);return B.jsx(hr,{title:t,tooltip:r,children:n})},BG=({price:e,dstToken:t,label:r,tooltip:n,usd:s})=>{const a=ze({value:e});return j(e||0).isZero()?null:B.jsx(hr,{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(Ou,{value:s})]})})},FG=({price:e,dstToken:t,percentage:r,isMarketOrder:n})=>{const s=ze({value:e}),a=Be();return n?null:B.jsx(hr,{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}%)`})]})})},UG=({tradeSize:e,srcToken:t,trades:r,label:n,tooltip:s})=>r===1?null:B.jsx(hr,{title:n,tooltip:s,children:`${e||"-"} ${(t==null?void 0:t.symbol)||""}`}),OG=({dstToken:e,dstMinAmountOut:t,label:r,tooltip:n,usd:s})=>{const a=ze({value:t});return j(t||0).isZero()?null:B.jsxs(hr,{title:r,tooltip:n,children:[`${t?a:"-"} ${e==null?void 0:e.symbol}`,B.jsx(Ou,{value:s})]})},DG=({trades:e,label:t,tooltip:r})=>e===1?null:B.jsx(hr,{title:t,tooltip:r,children:e}),_G=()=>{var s;const e=Be(),{account:t}=ne(),r=(s=ac())==null?void 0:s.explorer,n=Cd(t);return B.jsx(hr,{title:e("recipient")||"",children:r?B.jsx("a",{href:`${r}/address/${t}`,target:"_blank",children:n}):n})},MG=({fillDelayMillis:e,chunks:t=0,label:r,tooltip:n})=>{const s=M.useMemo(()=>o1(e),[e]);return t===1?null:B.jsx(hr,{title:r,tooltip:n,children:s})},hr=({title:e,tooltip:t,children:r,className:n="",onClick:s,style:a})=>{const{components:o}=ne(),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})]})},NG=({id:e})=>{const{components:t}=ne(),r=t==null?void 0:t.Tooltip,n=TG();return e.startsWith("0x")?B.jsx(hr,{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:Cd(e)}),B.jsx(sz.AiOutlineCopy,{})]})})}):B.jsx(hr,{title:"ID",children:e})},LG=({version:e})=>B.jsx(hr,{title:"Version",children:e});function we({children:e,className:t=""}){return B.jsx("div",{className:`${t} twap-order-details`,children:e})}const zG=({children:e})=>e,RG=({fees:e,label:t,usd:r,dstTokenSymbol:n})=>{const s=ze({value:e});return B.jsxs(hr,{title:t,children:[`${e?s:"-"} ${n}`,B.jsx(Ou,{value:r})]})};we.Deadline=IG,we.Fees=RG,we.TradeSize=UG,we.MinDestAmount=OG,we.TradesAmount=DG,we.Recipient=_G,we.TradeInterval=MG,we.DetailRow=hr,we.TriggerPrice=BG,we.LimitPrice=FG,we.OrderID=NG,we.Container=zG,we.OrderVersion=LG,we.USD=Ou;const $0=()=>{const{publicClient:e}=ne();return gn({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},G0=()=>{const{account:e,walletClient:t,publicClient:r,config:n,callbacks:s,chainId:a}=ne(),o=$0(),i=Z(u=>u.updateState),c=async u=>{dt.onCancelOrderRequest(u.map(d=>d.id.toString()),1);try{return(await Promise.all(u.map(f=>t.writeContract({account:e,address:f.twapAddress,abi:Dm,functionName:"cancel",args:[f.id],chain:t.chain}))))[0]}catch(d){throw dt.onCancelOrderError(d),d}},l=async u=>{var d;try{dt.onCancelOrderRequest(u.map(y=>y.hash),2);const f=await t.writeContract({account:e,address:n.repermit,abi:Om,functionName:"cancel",args:[u.map(y=>y.hash)],chain:t.chain}),m=await o(f);if(!m)throw new Error("failed to get transaction receipt");if(m.status==="reverted")throw new Error("failed to cancel order");return dt.onCancelOrderSuccess(f),(d=s==null?void 0:s.onCancelOrderSuccess)==null||d.call(s,{orders:u,txHash:f,explorerUrl:_o(f,a)}),m.transactionHash}catch(f){throw dt.onCancelOrderError(f),f}};return gn({mutationFn:async({orders:u})=>{var d,f;if(!e||!t||!r||!n)throw new Error("missing required parameters");try{(d=s==null?void 0:s.onCancelOrderRequest)==null||d.call(s,u),i({cancelOrderStatus:mt.LOADING,cancelOrderTxHash:void 0,cancelOrderError:void 0});const m=u.filter(v=>v.version===1),y=u.filter(v=>v.version===2),[g,E]=await Promise.all([m.length?c(m):Promise.resolve(""),y.length?l(y):Promise.resolve("")]);return i({cancelOrderStatus:mt.SUCCESS,orderIdsToCancel:[]}),[...g||[],E]}catch(m){console.error("cancel order error",m),(f=s==null?void 0:s.onCancelOrderFailed)==null||f.call(s,m),Td(m)?i({cancelOrderStatus:void 0}):(i({cancelOrderStatus:mt.FAILED}),dt.onCancelOrderError(m))}}})},W2=e=>{const t=Be();return M.useMemo(()=>e?e.type===ut.TRIGGER_PRICE_MARKET?t("triggerPriceMarket"):e.type===ut.TRIGGER_PRICE_LIMIT?t("triggerPriceLimit"):e.type===ut.TWAP_MARKET?t("twapMarket"):e.type===ut.TWAP_LIMIT?t("twapLimit"):t("twapMarket"):t("twapMarket"),[t,e==null?void 0:e.type])},j0=()=>{const{account:e,config:t,chainId:r}=ne();return M.useMemo(()=>["useTwapOrderHistoryManager",e,t==null?void 0:t.partner,r],[e,t,r])},HG=()=>{const e=Nc(),{account:t}=ne(),r=j0();return M.useCallback(n=>{e.setQueryData(r,s=>s?s!=null&&s.some(a=>a.id===n.id)?s:[n,...s]:[n])},[e,r,t])},$G=()=>{const{callbacks:e,refetchBalances:t}=ne(),r=Nc(),n=j0();return M.useCallback(s=>{var c;const a=r.getQueryData(n);let o=!1;const i=[];a&&a.forEach(l=>{var d;const u=s.find(f=>f.id===l.id);u&&u.progress!==l.progress&&(o=!0,i.push(u),u.status===lt.Completed&&((d=e==null?void 0:e.onOrderFilled)==null||d.call(e,u)))}),o&&((c=e==null?void 0:e.onOrdersProgressUpdate)==null||c.call(e,i),t==null||t())},[r,n,e,t])},GG=()=>{const{account:e,config:t,chainId:r}=ne(),n=j0(),s=$G();return l3({refetchInterval:KL,refetchOnWindowFocus:!0,retry:!1,staleTime:1/0,queryKey:n,queryFn:async({signal:a})=>{if(!e||!r||!t)return[];const o=await Ph({signal:a,chainId:r,config:t.twapConfig,account:e});return s(o),o.map(i=>t!=null&&t.twapConfig?{...i,fillDelayMillis:td(i,t.twapConfig)}:i)}})},Du=()=>{const{data:e,isLoading:t,error:r,refetch:n,isRefetching:s}=GG(),{mutateAsync:a}=G0();return M.useMemo(()=>({orders:{all:e??[],open:_u(e??[],lt.Open),completed:_u(e??[],lt.Completed),expired:_u(e??[],lt.Expired),canceled:_u(e??[],lt.Canceled)},isLoading:t,error:r,refetch:()=>n().then(o=>o.data),cancelOrder:a,isRefetching:s}),[e,t,r,n,a,s])},q2=()=>{const e=Z(r=>r.state.orderHistoryStatusFilter),{orders:t}=Du();return M.useMemo(()=>e?t.all.filter(r=>r.status.toLowerCase()===e.toLowerCase())||[]:t.all,[e,t])},_u=(e,t)=>e.filter(r=>r.status===t).sort((r,n)=>n.createdAt-r.createdAt),jG=(e,t,r)=>M.useMemo(()=>{if(!(!e||!t||!r||r!=null&&r.isMarketPrice))return c1(r,e==null?void 0:e.decimals,t==null?void 0:t.decimals)},[r,e,t]),VG=(e,t,r)=>M.useMemo(()=>{if(!(!e||!t||!r))return i1(r,e.decimals,t.decimals)},[r,e,t]),Y2=()=>{const e=Z(r=>r.updateState),t=Z(r=>r.state.orderIdsToCancel);return M.useCallback(r=>{t!=null&&t.includes(r)?e({orderIdsToCancel:t==null?void 0:t.filter(n=>n!==r)}):e({orderIdsToCancel:[...t||[],r]})},[e,t])},WG=()=>{var T,h;const e=Be(),{orders:t,isLoading:r,refetch:n,isRefetching:s}=Du(),{mutateAsync:a,isPending:o}=G0(),i=q2(),c=Z(b=>b.updateState),l=Z(b=>b.state.orderHistoryStatusFilter),u=Z(b=>b.state.cancelOrdersMode),d=Z(b=>b.state.orderIdsToCancel),f=M.useCallback(b=>c({cancelOrdersMode:b,orderIdsToCancel:[]}),[c]),m=M.useCallback(()=>c({selectedOrderID:void 0}),[c]),y=M.useCallback(b=>a({orders:b}),[a]),g=M.useCallback(b=>c({orderHistoryStatusFilter:b}),[]),E=M.useMemo(()=>{const b=Object.keys(lt).map(x=>({text:x,value:x}));return[{text:e("allOrders"),value:""},...b]},[e]),v=Y2(),w=Z(b=>b.state.selectedOrderID),A=Z2(w),C=M.useMemo(()=>t.all.filter(b=>d==null?void 0:d.includes(b.id)),[t,d]),D=M.useCallback(()=>c({orderIdsToCancel:t.open.map(b=>b.id)}),[c,t]),L=M.useCallback(b=>a({orders:[b]}).then(x=>(x==null?void 0:x[0])||""),[a]);return{refetch:n,onHideSelectedOrder:m,onCancelOrders:y,onCancelOrder:L,onSelectStatus:g,onToggleCancelOrdersMode:f,onSelectOrder:v,isRefetching:s,orders:t,ordersToDisplay:i,isLoading:r,selectedOrder:w?A:void 0,openOrdersCount:((T=t==null?void 0:t.open)==null?void 0:T.length)||0,isCancelOrdersLoading:o,selectedStatus:l||((h=E[0])==null?void 0:h.value)||"",statuses:E,cancelOrdersMode:u,ordersToCancel:C,onSelectAllOrdersToCancel:D}},K2=e=>{const t=Be(),r=ze({value:e.srcAmount}),n=ze({value:e.limitPrice}),s=ze({value:e.limitPriceUsd}),a=ze({value:e.srcAmountPerTrade}),o=ze({value:e.srcAmountPerTradeUsd,decimalScale:2}),i=ze({value:e.minDestAmountPerTrade}),c=ze({value:e.minDestAmountPerTradeUsd,decimalScale:2}),l=ze({value:e.triggerPricePerTrade}),u=ze({value:e.triggerPricePerTradeUsd,decimalScale:2}),d=ze({value:e.srcUsd,decimalScale:2}),f=ze({value:e.dstUsd,decimalScale:2}),m=ze({value:e.dstAmount});return M.useMemo(()=>({srcToken:e.srcToken,dstToken:e.dstToken,srcUsd:d||"",dstUsd:f||"",limitPrice:{label:t("limitPrice"),value:n||"",usd:s||""},deadline:{tooltip:t("expirationTooltip"),label:t("expirationLabel"),value:e.deadline||0},srcAmount:{label:t("amountOut"),value:r||"",usd:d||""},dstAmount:{value:m||"",usd:f||""},sizePerTrade:{tooltip:t("tradeSizeTooltip"),label:t("individualTradeSize"),value:a||"",usd:o},totalTrades:{tooltip:t("totalTradesTooltip"),label:t("numberOfTrades"),value:e.totalTrades||0},minDestAmountPerTrade:{tooltip:t("minDstAmountTooltip"),label:t(e.totalTrades&&e.totalTrades>1?"minReceivedPerTrade":"minReceived"),value:i||"",usd:c},tradeInterval:{tooltip:t("tradeIntervalTootlip"),label:t("tradeIntervalLabel"),value:e.tradeInterval||0},triggerPricePerTrade:{tooltip:t("triggerPriceTooltip"),label:t(e.totalTrades&&e.totalTrades>1?"triggerPricePerChunk":"triggerPrice"),value:l||"",usd:u},recipient:{label:t("recipient"),value:e.account||""}}),[d,f,n,r,a,o,i,l,u,n,s,m,f,c])},Z2=e=>{const{orders:t}=Du(),{useToken:r,config:n}=ne(),s=Be(),a=M.useMemo(()=>t==null?void 0:t.all.find(C=>C.id===e),[t,e])||{},o=W2(a),i=r==null?void 0:r(a==null?void 0:a.srcTokenAddress),c=r==null?void 0:r(a==null?void 0:a.dstTokenAddress),l=Vr(i==null?void 0:i.decimals,a==null?void 0:a.srcAmount),u=jG(i,c,a),d=ze({value:VG(i,c,a)}),f=ze({value:Vr(i==null?void 0:i.decimals,a==null?void 0:a.srcAmountFilled)}),m=ze({value:Vr(c==null?void 0:c.decimals,a==null?void 0:a.dstAmountFilled)}),y=ze({value:a==null?void 0:a.progress,decimalScale:2}),g=Vr(i==null?void 0:i.decimals,a==null?void 0:a.srcAmountPerTrade),E=Vr(c==null?void 0:c.decimals,a==null?void 0:a.dstMinAmountPerTrade),v=Vr(c==null?void 0:c.decimals,a==null?void 0:a.triggerPricePerTrade),w=M.useMemo(()=>a?a.version===2?a.fillDelay:n.twapConfig?td(a,n.twapConfig):0:0,[a,n]),A=K2({srcToken:i,dstToken:c,account:a==null?void 0:a.maker,limitPrice:u,deadline:a==null?void 0:a.deadline,tradeInterval:w,srcAmount:l,totalTrades:a==null?void 0:a.totalTradesAmount,srcAmountPerTrade:g,minDestAmountPerTrade:E,triggerPricePerTrade:v});return M.useMemo(()=>({original:a,title:o,...A,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:f},amountOutFilled:{label:s("amountReceived"),value:m,token:c},progress:{label:s("progress"),value:y},excecutionPrice:{label:s((a==null?void 0:a.totalTradesAmount)===1?"finalExcecutionPrice":"averageExecutionPrice"),value:d},version:{label:s("version"),value:a==null?void 0:a.version}}),[a,s,d,f,m,y,o,i,c,A])},X2=M.createContext({}),Rt=()=>M.useContext(X2),qG=()=>{const e=Z(c=>c.state.selectedOrderID),t=Z2(e),r=Be(),[n,s]=M.useState("panel1"),{components:a}=ne(),o=a.TokenLogo;M.useEffect(()=>{s("panel1")},[t.id.value]);const i=c=>{s(n===c?!1:c)};return t?B.jsx(X2.Provider,{value:{order:t},children:B.jsxs("div",{className:"twap-orders__selected-order",children:[B.jsx(a1,{SrcTokenLogo:o&&B.jsx(o,{token:t.srcToken}),DstTokenLogo:o&&B.jsx(o,{token:t.dstToken}),fromTitle:r("from"),inToken:t.srcToken,toTitle:r("to"),outToken:t.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(Q2,{title:r("excecutionSummary"),onClick:()=>i("panel1"),expanded:n==="panel1",children:B.jsx(rj,{})}),B.jsx(Q2,{title:r("orderInfo"),expanded:n==="panel2",onClick:()=>i("panel2"),children:B.jsx(YG,{})})]}),B.jsx(sj,{})]})})]})}):null},Q2=({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(rz.IoIosArrowDown,{style:{transform:e?"rotate(180deg)":"rotate(0deg)"}})]}),e&&B.jsx("div",{className:"twap-orders__selected-order-accordion-details",children:r})]}),YG=()=>B.jsxs(we,{children:[B.jsx(tj,{}),B.jsx(aj,{}),B.jsx(QG,{}),B.jsx(oj,{}),B.jsx(KG,{}),B.jsx(ZG,{}),B.jsx(XG,{}),B.jsx(JG,{}),B.jsx(ej,{}),B.jsx(dj,{}),B.jsx(we.Recipient,{})]}),KG=()=>{const{order:e}=Rt();return B.jsx(we.TradeSize,{tradeSize:e.sizePerTrade.value,srcToken:e.srcToken,label:e.sizePerTrade.label,tooltip:e.sizePerTrade.tooltip,trades:e.totalTrades.value})},ZG=()=>{const{order:e}=Rt();return B.jsx(we.TradesAmount,{trades:e.totalTrades.value,label:e.totalTrades.label,tooltip:e.totalTrades.tooltip})},XG=()=>{const{order:e}=Rt();return B.jsx(we.MinDestAmount,{dstToken:e.dstToken,dstMinAmountOut:e.minDestAmountPerTrade.value,label:e.minDestAmountPerTrade.label,tooltip:e.minDestAmountPerTrade.tooltip})},QG=()=>{const{order:e}=Rt();return B.jsx(we.Deadline,{deadline:e.deadline.value,label:e.deadline.label,tooltip:e.deadline.tooltip})},JG=()=>{const{order:e}=Rt();return B.jsx(we.TradeInterval,{fillDelayMillis:e.tradeInterval.value,chunks:e.totalTrades.value,label:e.tradeInterval.label,tooltip:e.tradeInterval.tooltip})},ej=()=>{const{order:e}=Rt();return B.jsx(we.TriggerPrice,{dstToken:e.dstToken,price:e.triggerPricePerTrade.value,label:e.triggerPricePerTrade.label,tooltip:e.triggerPricePerTrade.tooltip})},tj=()=>{const{order:e}=Rt();return B.jsx(we.OrderID,{id:e.id.value||""})},rj=()=>B.jsxs(we,{children:[B.jsx(lj,{}),B.jsx(ij,{}),B.jsx(nj,{}),B.jsx(uj,{}),B.jsx(pj,{})]}),nj=()=>{var r;const{order:e}=Rt(),t=ze({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.dstToken)==null?void 0:r.symbol]})}):null},sj=()=>{const{order:e}=Rt(),t=Be(),{mutateAsync:r,isPending:n}=G0(),{components:s}=ne(),a=s.Button,o=M.useCallback(async()=>r({orders:[e.original]}),[r,e]);return!e||e.original.status!==lt.Open||!a?null:B.jsx(a,{loading:n,onClick:o,disabled:n,className:"twap-cancel-order",text:t("cancelOrder"),children:t("cancelOrder")})},aj=()=>{const{order:e}=Rt(),t=Be(),r=H0(e.createdAt.value);return B.jsx(we.DetailRow,{title:t("createdAt")||"",children:B.jsx("p",{children:r})})},oj=()=>{var n;const{order:e}=Rt(),t=Be(),r=ze({value:e.srcAmount.value,decimalScale:3});return B.jsx(we.DetailRow,{title:t("amountOut")||"",children:B.jsxs("p",{children:[r||0," ",(n=e.srcToken)==null?void 0:n.symbol]})})},ij=()=>{var r;const{order:e}=Rt(),t=ze({value:e.amountInFilled.value,decimalScale:3});return B.jsx(we.DetailRow,{title:e.amountInFilled.label,children:B.jsxs("p",{children:[t||"-"," ",(r=e.srcToken)==null?void 0:r.symbol]})})},cj=()=>{const{order:e}=Rt(),t=Be();return M.useMemo(()=>{switch(e.original.status){case lt.Open:return t("Open")||"";case lt.Completed:return t("Completed")||"";case lt.Expired:return t("Expired")||"";case lt.Canceled:return t("Canceled")||""}},[e.original.status,t])},lj=()=>{const e=Be(),t=cj();return B.jsx(we.DetailRow,{title:e("status")||"",children:B.jsx("p",{children:t})})},uj=()=>{const{order:e}=Rt(),t=ze({value:e.progress.value,decimalScale:2});return B.jsx(we.DetailRow,{title:e.progress.label,children:B.jsxs("p",{children:[t||0,"%"]})})},dj=()=>{const{order:e}=Rt(),t=Be();return e.limitPrice.value?B.jsx(J2,{title:t("limitPrice")||"",price:e.limitPrice.value,srcToken:e.srcToken,dstToken:e.dstToken}):null},pj=()=>{const{order:e}=Rt();return e.excecutionPrice.value?B.jsx(J2,{title:e.excecutionPrice.label,price:e.excecutionPrice.value,srcToken:e.srcToken,dstToken:e.dstToken}):null},J2=({price:e,srcToken:t,dstToken:r,title:n})=>{const s=ze({value:e,decimalScale:3});return B.jsx(we.DetailRow,{title:n,children:j(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 V0={},ex;function fj(){if(ex)return V0;ex=1;var e=uu.GenIcon;return V0.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)},V0}var mj=fj();const Mu=0,ms=1,mo=2,tx=4;function rx(e){return()=>e}function hj(e){e()}function nx(e,t){return r=>e(t(r))}function sx(e,t){return()=>e(t)}function bj(e,t){return r=>e(t,r)}function W0(e){return e!==void 0}function yj(...e){return()=>{e.map(hj)}}function ho(){}function Nu(e,t){return t(e),e}function gj(e,t){return t(e)}function et(...e){return e}function je(e,t){return e(ms,t)}function Ce(e,t){e(Mu,t)}function q0(e){e(mo)}function st(e){return e(tx)}function ce(e,t){return je(e,bj(t,Mu))}function Wr(e,t){const r=e(ms,n=>{r(),t(n)});return r}function ax(e){let t,r;return n=>s=>{t=s,r&&clearTimeout(r),r=setTimeout(()=>{n(t)},e)}}function ox(e,t){return e===t}function tt(e=ox){let t;return r=>n=>{e(t,n)||(t=n,r(n))}}function fe(e){return t=>r=>{e(r)&&t(r)}}function re(e){return t=>nx(t,e)}function on(e){return t=>()=>{t(e)}}function W(e,...t){const r=xj(...t);return(n,s)=>{switch(n){case mo:q0(e);return;case ms:return je(e,r(s))}}}function cn(e,t){return r=>n=>{r(t=e(t,n))}}function oa(e){return t=>r=>{e>0?e--:t(r)}}function Hn(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 xj(...e){return t=>e.reduceRight(gj,t)}function wj(e){let t,r;const n=()=>t==null?void 0:t();return function(s,a){switch(s){case ms:return a?r===a?void 0:(n(),r=a,t=je(e,a),t):(n(),ho);case mo:n(),r=null;return}}}function K(e){let t=e;const r=Oe();return(n,s)=>{switch(n){case Mu:t=s;break;case ms:{s(t);break}case tx:return t}return r(n,s)}}function Ht(e,t){return Nu(K(t),r=>ce(e,r))}function Oe(){const e=[];return(t,r)=>{switch(t){case Mu:e.slice().forEach(n=>{n(r)});return;case mo:e.splice(0,e.length);return;case ms:return e.push(r),()=>{const n=e.indexOf(r);n>-1&&e.splice(n,1)}}}}function br(e){return Nu(Oe(),t=>ce(e,t))}function $e(e,t=[],{singleton:r}={singleton:!0}){return{constructor:e,dependencies:t,id:vj(),singleton:r}}const vj=()=>Symbol();function Ej(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 Et(...e){const t=Oe(),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 mo:{q0(t);return}case ms:return n===s&&o(r),je(t,o)}}}function me(e,t=ox){return W(e,tt(t))}function Y0(...e){return function(t,r){switch(t){case mo:return;case ms:return yj(...e.map(n=>je(n,r)))}}}var nr=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(nr||{});const kj={0:"debug",3:"error",1:"log",2:"warn"},Cj=()=>typeof globalThis>"u"?window:globalThis,hs=$e(()=>{const e=K(3);return{log:K((t,r,n=1)=>{var s;const a=(s=Cj().VIRTUOSO_LOG_LEVEL)!=null?s:st(e);n>=a&&console[kj[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,r)}),logLevel:e}},[],{singleton:!0});function ia(e,t,r){return K0(e,t,r).callbackRef}function K0(e,t,r){const n=M.useRef(null);let s=o=>{};const a=M.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 Tj(e,t,r,n,s,a,o,i,c){const l=M.useCallback(u=>{const d=Sj(u.children,t,i?"offsetWidth":"offsetHeight",s);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const m=f.lastElementChild.dataset.viewportType==="window";let y;m&&(y=f.ownerDocument.defaultView);const g=o?i?o.scrollLeft:o.scrollTop:m?i?y.scrollX||y.document.documentElement.scrollLeft:y.scrollY||y.document.documentElement.scrollTop:i?f.scrollLeft:f.scrollTop,E=o?i?o.scrollWidth:o.scrollHeight:m?i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight:i?f.scrollWidth:f.scrollHeight,v=o?i?o.offsetWidth:o.offsetHeight:m?i?y.innerWidth:y.innerHeight:i?f.offsetWidth:f.offsetHeight;n({scrollHeight:E,scrollTop:Math.max(g,0),viewportHeight:v}),a==null||a(i?ix("column-gap",getComputedStyle(u).columnGap,s):ix("row-gap",getComputedStyle(u).rowGap,s)),d!==null&&e(d)},[e,t,s,a,o,n,i]);return K0(l,r,c)}function Sj(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},nr.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 ix(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,nr.WARN),t==="normal"?0:parseInt(t??"0",10)}function cx(e,t,r){const n=M.useRef(null),s=M.useCallback(c=>{if(!(c!=null&&c.offsetParent))return;const l=c.getBoundingClientRect(),u=l.width;let d,f;if(t){const m=t.getBoundingClientRect(),y=l.top-m.top;f=m.height-Math.max(0,y),d=y+t.scrollTop}else{const m=o.current.ownerDocument.defaultView;f=m.innerHeight-Math.max(0,l.top),d=l.top+m.scrollY}n.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(n.current)},[e,t]),{callbackRef:a,ref:o}=K0(s,!0,r),i=M.useCallback(()=>{s(o.current)},[s,o]);return M.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 Wt=$e(()=>{const e=Oe(),t=Oe(),r=K(0),n=Oe(),s=K(0),a=Oe(),o=Oe(),i=K(0),c=K(0),l=K(0),u=K(0),d=Oe(),f=Oe(),m=K(!1),y=K(!1),g=K(!1);return ce(W(e,re(({scrollTop:E})=>E)),t),ce(W(e,re(({scrollHeight:E})=>E)),o),ce(t,s),{deviation:r,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:i,horizontalDirection:y,scrollBy:f,scrollContainerState:e,scrollHeight:o,scrollingInProgress:m,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:n,statefulScrollTop:s,viewportHeight:a}},[],{singleton:!0}),oc={lvl:0};function lx(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===oc}function ic(e,t){if(!qe(e))return t===e.k?e.v:t<e.k?ic(e.l,t):ic(e.r,t)}function qr(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=qr(e.r,t,r);return n[0]===-1/0?[e.k,e.v]:n}return qr(e.l,t,r)}function yr(e,t,r){return qe(e)?px(t,r,1):t===e.k?St(e,{k:t,v:r}):t<e.k?fx(St(e,{l:yr(e.l,t,r)})):fx(St(e,{r:yr(e.r,t,r)}))}function bo(){return oc}function yo(e,t,r){if(qe(e))return[];const n=qr(e,t)[0];return Aj(X0(e,n,r))}function Z0(e,t){if(qe(e))return oc;const{k:r,l:n,r:s}=e;if(t===r){if(qe(n))return s;if(qe(s))return n;{const[a,o]=dx(n);return Lu(St(e,{k:a,l:ux(n),v:o}))}}else return t<r?Lu(St(e,{l:Z0(n,t)})):Lu(St(e,{r:Z0(s,t)}))}function ca(e){return qe(e)?[]:[...ca(e.l),{k:e.k,v:e.v},...ca(e.r)]}function X0(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(X0(s,t,r))),n>=t&&n<=r&&i.push({k:n,v:o}),n<=r&&(i=i.concat(X0(a,t,r))),i}function Lu(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(Q0(t))return mx(St(e,{lvl:r-1}));if(!qe(t)&&!qe(t.r))return St(t.r,{l:St(t,{r:t.r.l}),lvl:r,r:St(e,{l:t.r.r,lvl:r-1})});throw new Error("Unexpected empty nodes")}else{if(Q0(e))return J0(St(e,{lvl:r-1}));if(!qe(n)&&!qe(n.l)){const s=n.l,a=Q0(s)?n.lvl-1:n.lvl;return St(s,{l:St(e,{lvl:r-1,r:s.l}),lvl:s.lvl+1,r:J0(St(n,{l:s.r,lvl:a}))})}else throw new Error("Unexpected empty nodes")}}function St(e,t){return px(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 ux(e){return qe(e.r)?e.l:Lu(St(e,{r:ux(e.r)}))}function Q0(e){return qe(e)||e.lvl>e.r.lvl}function dx(e){return qe(e.r)?[e.k,e.v]:dx(e.r)}function px(e,t,r,n=oc,s=oc){return{k:e,l:n,lvl:r,r:s,v:t}}function fx(e){return J0(mx(e))}function mx(e){const{l:t}=e;return!qe(t)&&t.lvl===e.lvl?St(t,{r:St(e,{l:t.r})}):e}function J0(e){const{lvl:t,r}=e;return!qe(r)&&!qe(r.r)&&r.lvl===t&&r.r.lvl===t?St(r,{l:St(e,{r:r.l}),lvl:t+1}):e}function Aj(e){return lx(e,({k:t,v:r})=>({index:t,value:r}))}function hx(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function cc(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const em=$e(()=>({recalcInProgress:K(!1)}),[],{singleton:!0});function bx(e,t,r){return e[zu(e,t,r)]}function zu(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 Pj(e,t,r,n){const s=zu(e,t,n),a=zu(e,r,n,s);return e.slice(s,a+1)}function bs(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ru(e){return!qe(e.groupOffsetTree)}function tm({index:e},t){return t===e?0:t<e?-1:1}function Ij(){return{groupIndices:[],groupOffsetTree:bo(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:bo()}}function Bj(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=yr(e,0,a);continue}const i=yo(e,o-1,s+1);if(i.some(Nj(n)))continue;let c=!1,l=!1;for(const{end:u,start:d,value:f}of i)c?(s>=d||a===f)&&(e=Z0(e,d)):(l=f!==a,c=!0),u>s&&s>=d&&f!==a&&(e=yr(e,s+1,f));l&&(e=yr(e,o,a))}return[e,r]}function Fj(e){return typeof e.groupIndex<"u"}function Uj({offset:e},t){return t===e?0:t<e?-1:1}function lc(e,t,r){if(t.length===0)return 0;const{index:n,offset:s,size:a}=bx(t,e,tm),o=e-n,i=a*o+(o-1)*r+s;return i>0?i+r:i}function yx(e,t){if(!Ru(t))return e;let r=0;for(;t.groupIndices[r]<=e+r;)r++;return e+r}function gx(e,t,r){if(Fj(e))return t.groupIndices[e.groupIndex]+1;{const n=e.index==="LAST"?r:e.index;let s=yx(n,t);return s=Math.max(0,s,Math.min(r,s)),s}}function Oj(e,t,r,n=0){return n>0&&(t=Math.max(t,bx(e,n,tm).offset)),lx(Pj(e,t,r,Uj),Mj)}function Dj(e,[t,r,n,s]){t.length>0&&n("received item sizes",t,nr.DEBUG);const a=e.sizeTree;let o=a,i=0;if(r.length>0&&qe(a)&&t.length===2){const f=t[0].size,m=t[1].size;o=r.reduce((y,g)=>yr(yr(y,g,f),g+1,m),o)}else[o,i]=Bj(o,t);if(o===a)return e;const{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=rm(e.offsetTree,i,o,s);return{groupIndices:r,groupOffsetTree:r.reduce((f,m)=>yr(f,m,lc(m,d,s)),bo()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function _j(e){return ca(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 xx(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 rm(e,t,r,n){let s=e,a=0,o=0,i=0,c=0;if(t!==0){c=zu(s,t-1,tm),i=s[c].offset;const l=qr(r,t-1);a=l[0],o=l[1],s.length&&s[c].size===qr(r,t)[1]&&(c-=1),s=s.slice(0,c+1)}else s=[];for(const{start:l,value:u}of yo(r,t,1/0)){const d=l-a,f=d*o+i+d*n;s.push({index:l,offset:f,size:u}),a=l,i=f,o=u}return{lastIndex:a,lastOffset:i,lastSize:o,offsetTree:s}}function Mj(e){return{index:e.index,value:e}}function Nj(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 Lj={offsetHeight:"height",offsetWidth:"width"},ln=$e(([{log:e},{recalcInProgress:t}])=>{const r=Oe(),n=Oe(),s=Ht(n,0),a=Oe(),o=Oe(),i=K(0),c=K([]),l=K(void 0),u=K(void 0),d=K(void 0),f=K(void 0),m=K((T,h)=>bs(T,Lj[h])),y=K(void 0),g=K(0),E=Ij(),v=Ht(W(r,Te(c,e,g),cn(Dj,E),tt()),E),w=Ht(W(c,tt(),cn((T,h)=>({current:h,prev:T.current}),{current:[],prev:[]}),re(({prev:T})=>T)),[]);ce(W(c,fe(T=>T.length>0),Te(v,g),re(([T,h,b])=>{const x=T.reduce((S,I,F)=>yr(S,I,lc(I,h.offsetTree,b)||F),bo());return{...h,groupIndices:T,groupOffsetTree:x}})),v),ce(W(n,Te(v),fe(([T,{lastIndex:h}])=>T<h),re(([T,{lastIndex:h,lastSize:b}])=>[{endIndex:h,size:b,startIndex:T}])),r),ce(l,u);const A=Ht(W(l,re(T=>T===void 0)),!0);ce(W(u,fe(T=>T!==void 0&&qe(st(v).sizeTree)),re(T=>{const h=st(d),b=st(c).length>0;return h?b?[{endIndex:0,size:h,startIndex:0},{endIndex:1,size:T,startIndex:1}]:[]:[{endIndex:0,size:T,startIndex:0}]})),r),ce(W(f,fe(T=>T!==void 0&&T.length>0&&qe(st(v).sizeTree)),re(T=>{const h=[];let b=T[0],x=0;for(let S=1;S<T.length;S++){const I=T[S];I!==b&&(h.push({endIndex:S-1,size:b,startIndex:x}),b=I,x=S)}return h.push({endIndex:T.length-1,size:b,startIndex:x}),h})),r),ce(W(c,Te(d,u),fe(([,T,h])=>T!==void 0&&h!==void 0),re(([T,h,b])=>{const x=[];for(let S=0;S<T.length;S++){const I=T[S],F=T[S+1];x.push({startIndex:I,endIndex:I,size:h}),F!==void 0&&x.push({startIndex:I+1,endIndex:F-1,size:b})}return x})),r);const C=br(W(r,Te(v),cn(({sizes:T},[h,b])=>({changed:b!==T,sizes:b}),{changed:!1,sizes:E}),re(T=>T.changed)));je(W(i,cn((T,h)=>({diff:T.prev-h,prev:h}),{diff:0,prev:0}),re(T=>T.diff)),T=>{const{groupIndices:h}=st(v);if(T>0)Ce(t,!0),Ce(a,T+xx(T,h));else if(T<0){const b=st(w);b.length>0&&(T-=xx(-T,b)),Ce(o,T)}}),je(W(i,Te(e)),([T,h])=>{T<0&&h("`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},nr.ERROR)});const D=br(a);ce(W(a,Te(v),re(([T,h])=>{const b=h.groupIndices.length>0,x=[],S=h.lastSize;if(b){const I=ic(h.sizeTree,0);let F=0,_=0;for(;F<T;){const P=h.groupIndices[_],O=h.groupIndices.length===_+1?1/0:h.groupIndices[_+1]-P-1;x.push({endIndex:P,size:I,startIndex:P}),x.push({endIndex:P+1+O-1,size:S,startIndex:P+1}),_++,F+=O+1}const k=ca(h.sizeTree);return F!==T&&k.shift(),k.reduce((P,{k:O,v:U})=>{let z=P.ranges;return P.prevSize!==0&&(z=[...P.ranges,{endIndex:O+T-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:O+T,prevSize:U,ranges:z}},{prevIndex:T,prevSize:0,ranges:x}).ranges}return ca(h.sizeTree).reduce((I,{k:F,v:_})=>({prevIndex:F+T,prevSize:_,ranges:[...I.ranges,{endIndex:F+T-1,size:I.prevSize,startIndex:I.prevIndex}]}),{prevIndex:0,prevSize:S,ranges:[]}).ranges})),r);const L=br(W(o,Te(v,g),re(([T,{offsetTree:h},b])=>{const x=-T;return lc(x,h,b)})));return ce(W(o,Te(v,g),re(([T,h,b])=>{if(h.groupIndices.length>0){if(qe(h.sizeTree))return h;let x=bo();const S=st(w);let I=0,F=0,_=0;for(;I<-T;){_=S[F];const k=S[F+1]-_-1;F++,I+=k+1}if(x=ca(h.sizeTree).reduce((k,{k:P,v:O})=>yr(k,Math.max(0,P+T),O),x),I!==-T){const k=ic(h.sizeTree,_);x=yr(x,0,k);const P=qr(h.sizeTree,-T+1)[1];x=yr(x,1,P)}return{...h,sizeTree:x,...rm(h.offsetTree,0,x,b)}}else{const x=ca(h.sizeTree).reduce((S,{k:I,v:F})=>yr(S,Math.max(0,I+T),F),bo());return{...h,sizeTree:x,...rm(h.offsetTree,0,x,b)}}})),v),{beforeUnshiftWith:D,data:y,defaultItemSize:u,firstItemIndex:i,fixedItemSize:l,fixedGroupSize:d,gap:g,groupIndices:c,heightEstimates:f,itemSize:m,listRefresh:C,shiftWith:o,shiftWithOffset:L,sizeRanges:r,sizes:v,statefulTotalCount:s,totalCount:n,trackItemSizes:A,unshiftWith:a}},et(hs,em),{singleton:!0});function zj(e){return e.reduce((t,r)=>(t.groupIndices.push(t.totalCount),t.totalCount+=r+1,t),{groupIndices:[],totalCount:0})}const wx=$e(([{groupIndices:e,sizes:t,totalCount:r},{headerHeight:n,scrollTop:s}])=>{const a=Oe(),o=Oe(),i=br(W(a,re(zj)));return ce(W(i,re(c=>c.totalCount)),r),ce(W(i,re(c=>c.groupIndices)),e),ce(W(Et(s,t,n),fe(([c,l])=>Ru(l)),re(([c,l,u])=>qr(l.groupOffsetTree,Math.max(c-u,0),"v")[0]),tt(),re(c=>[c])),o),{groupCounts:a,topItemsIndexes:o}},et(ln,Wt)),ys=$e(([{log:e}])=>{const t=K(!1),r=br(W(t,fe(n=>n),tt()));return je(t,n=>{n&&st(e)("props updated",{},nr.DEBUG)}),{didMount:r,propsReady:t}},et(hs),{singleton:!0}),Rj=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function vx(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Rj)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const uc=$e(([{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:f}])=>{const m=Oe(),y=Oe(),g=K(0);let E=null,v=null,w=null;function A(){E&&(E(),E=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),Ce(c,!1)}return ce(W(m,Te(r,d,n,g,i,o,f),Te(e,a,s),re(([[C,D,L,T,h,b,x,S],I,F,_])=>{const k=vx(C),{align:P,behavior:O,offset:U}=k,z=T-1,H=gx(k,D,z);let G=lc(H,D.offsetTree,I)+b;P==="end"?(G+=F+qr(D.sizeTree,H)[1]-L+_,H===z&&(G+=x)):P==="center"?G+=(F+qr(D.sizeTree,H)[1]-L+_)/2:G-=h,U&&(G+=U);const J=pe=>{A(),pe?(S("retrying to scroll to",{location:C},nr.DEBUG),Ce(m,C)):(Ce(y,!0),S("list did not change, scroll successful",{},nr.DEBUG))};if(A(),O==="smooth"){let pe=!1;w=je(t,he=>{pe=pe||he}),E=Wr(u,()=>{J(pe)})}else E=Wr(W(t,Hj(150)),J);return v=setTimeout(()=>{A()},1200),Ce(c,!0),S("scrolling from index to",{behavior:O,index:H,top:G},nr.DEBUG),{behavior:O,top:G}})),l),{scrollTargetReached:y,scrollToIndex:m,topListHeight:g}},et(ln,Wt,hs),{singleton:!0});function Hj(e){return t=>{const r=setTimeout(()=>{t(!1)},e);return n=>{n&&(t(!0),clearTimeout(r))}}}function nm(e,t){e==0?t():requestAnimationFrame(()=>{nm(e-1,t)})}function sm(e,t){const r=t-1;return typeof e=="number"?e:e.index==="LAST"?r:e.index}const dc=$e(([{defaultItemSize:e,listRefresh:t,sizes:r},{scrollTop:n},{scrollTargetReached:s,scrollToIndex:a},{didMount:o}])=>{const i=K(!0),c=K(0),l=K(!0);return ce(W(o,Te(c),fe(([u,d])=>!!d),on(!1)),i),ce(W(o,Te(c),fe(([u,d])=>!!d),on(!1)),l),je(W(Et(t,o),Te(i,r,e,l),fe(([[,u],d,{sizeTree:f},m,y])=>u&&(!qe(f)||W0(m))&&!d&&!y),Te(c)),([,u])=>{Wr(s,()=>{Ce(l,!0)}),nm(4,()=>{Wr(n,()=>{Ce(i,!0)}),Ce(a,u)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:i}},et(ln,Wt,uc,ys),{singleton:!0});function Ex(e,t){return Math.abs(e-t)<1.01}const pc="up",fc="down",$j="none",Gj={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},jj=0,mc=$e(([{footerHeight:e,headerHeight:t,scrollBy:r,scrollContainerState:n,scrollTop:s,viewportHeight:a}])=>{const o=K(!1),i=K(!0),c=Oe(),l=Oe(),u=K(4),d=K(jj),f=Ht(W(Y0(W(me(s),oa(1),on(!0)),W(me(s),oa(1),on(!1),ax(100))),tt()),!1),m=Ht(W(Y0(W(r,on(!0)),W(r,on(!1),ax(200))),tt()),!1);ce(W(Et(me(s),me(d)),re(([w,A])=>w<=A),tt()),i),ce(W(i,Hn(50)),l);const y=br(W(Et(n,me(a),me(t),me(e),me(u)),cn((w,[{scrollHeight:A,scrollTop:C},D,L,T,h])=>{const b=C+D-A>-h,x={scrollHeight:A,scrollTop:C,viewportHeight:D};if(b){let I,F;return C>w.state.scrollTop?(I="SCROLLED_DOWN",F=w.state.scrollTop-C):(I="SIZE_DECREASED",F=w.state.scrollTop-C||w.scrollTopDelta),{atBottom:!0,atBottomBecause:I,scrollTopDelta:F,state:x}}let S;return x.scrollHeight>w.state.scrollHeight?S="SIZE_INCREASED":D<w.state.viewportHeight?S="VIEWPORT_HEIGHT_DECREASING":C<w.state.scrollTop?S="SCROLLING_UPWARDS":S="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:S,state:x}},Gj),tt((w,A)=>w&&w.atBottom===A.atBottom))),g=Ht(W(n,cn((w,{scrollHeight:A,scrollTop:C,viewportHeight:D})=>{if(Ex(w.scrollHeight,A))return{changed:!1,jump:0,scrollHeight:A,scrollTop:C};{const L=A-(C+D)<1;return w.scrollTop!==C&&L?{changed:!0,jump:w.scrollTop-C,scrollHeight:A,scrollTop:C}:{changed:!0,jump:0,scrollHeight:A,scrollTop:C}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),fe(w=>w.changed),re(w=>w.jump)),0);ce(W(y,re(w=>w.atBottom)),o),ce(W(o,Hn(50)),c);const E=K(fc);ce(W(n,re(({scrollTop:w})=>w),tt(),cn((w,A)=>st(m)?{direction:w.direction,prevScrollTop:A}:{direction:A<w.prevScrollTop?pc:fc,prevScrollTop:A},{direction:fc,prevScrollTop:0}),re(w=>w.direction)),E),ce(W(n,Hn(50),on($j)),E);const v=K(0);return ce(W(f,fe(w=>!w),on(0)),v),ce(W(s,Hn(100),Te(f),fe(([w,A])=>!!A),cn(([w,A],[C])=>[A,C],[0,0]),re(([w,A])=>A-w)),v),{atBottomState:y,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:o,isAtTop:i,isScrolling:f,lastJumpDueToItemResize:g,scrollDirection:E,scrollVelocity:v}},et(Wt)),hc="top",bc="bottom",kx="none";function Cx(e,t,r){return typeof e=="number"?r===pc&&t===hc||r===fc&&t===bc?e:0:r===pc?t===hc?e.main:e.reverse:t===bc?e.main:e.reverse}function Tx(e,t){var r;return typeof e=="number"?e:(r=e[t])!=null?r:0}const am=$e(([{deviation:e,fixedHeaderHeight:t,headerHeight:r,scrollTop:n,viewportHeight:s}])=>{const a=Oe(),o=K(0),i=K(0),c=K(0),l=Ht(W(Et(me(n),me(s),me(r),me(a,cc),me(c),me(o),me(t),me(e),me(i)),re(([u,d,f,[m,y],g,E,v,w,A])=>{const C=u-w,D=E+v,L=Math.max(f-C,0);let T=kx;const h=Tx(A,hc),b=Tx(A,bc);return m-=w,m+=f+v,y+=f+v,y-=w,m>u+D-h&&(T=pc),y<u-L+d+b&&(T=fc),T!==kx?[Math.max(C-f-Cx(g,hc,T)-h,0),C-L-v+d+Cx(g,bc,T)+b]:null}),fe(u=>u!=null),tt(cc)),[0,0]);return{increaseViewportBy:i,listBoundary:a,overscan:c,topListHeight:o,visibleRange:l}},et(Wt),{singleton:!0});function Vj(e,t,r){if(Ru(t)){const n=yx(e,t);return[{index:qr(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 om={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Hu(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,f=i+d*c+(d-1)*n,m=l,y=f-u;return{bottom:u,firstItemIndex:a,items:Ax(e,s,a),offsetBottom:y,offsetTop:l,top:m,topItems:Ax(t,s,a),topListHeight:t.reduce((g,E)=>E.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=sm(t,i),l=Array.from({length:i}).map((u,d)=>({data:a[d+c],index:d+c,offset:0,size:0}));return Hu(l,[],i,s,r,n)}function Ax(e,t,r){if(e.length===0)return[];if(!Ru(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=yo(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 Px(e,t){var r;return e===void 0?0:typeof e=="number"?e:(r=e[t])!=null?r:0}const la=$e(([{data:e,firstItemIndex:t,gap:r,sizes:n,totalCount:s},a,{listBoundary:o,topListHeight:i,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:m},{recalcInProgress:y}])=>{const g=K([]),E=K(0),v=Oe(),w=K(0);ce(a.topItemsIndexes,g);const A=Ht(W(Et(m,y,me(c,cc),me(s),me(n),me(l),u,me(g),me(t),me(r),me(w),e),fe(([T,h,,b,,,,,,,,x])=>{const S=x&&x.length!==b;return T&&!h&&!S}),re(([,,[T,h],b,x,S,I,F,_,k,P,O])=>{var U,z,H,G;const J=x,{offsetTree:pe,sizeTree:he}=J,ie=st(E);if(b===0)return{...om,totalCount:b};if(T===0&&h===0)return ie===0?{...om,totalCount:b}:Sx(ie,S,x,_,k,O||[]);if(qe(he))return ie>0?null:Hu(Vj(sm(S,b),J,O),[],b,k,J,_);const de=[];if(F.length>0){const Se=F[0],Ee=F[F.length-1];let be=0;for(const Ze of yo(he,Se,Ee)){const Ye=Ze.value,Xe=Math.max(Ze.start,Se),Fr=Math.min(Ze.end,Ee);for(let Ot=Xe;Ot<=Fr;Ot++)de.push({data:O==null?void 0:O[Ot],index:Ot,offset:be,size:Ye}),be+=Ye}}if(!I)return Hu([],de,b,k,J,_);const Fe=F.length>0?F[F.length-1]+1:0,Q=Oj(pe,T,h,Fe);if(Q.length===0)return null;const ve=b-1,_e=Nu([],Se=>{for(const Ee of Q){const be=Ee.value;let Ze=be.offset,Ye=Ee.start;const Xe=be.size;if(be.offset<T){Ye+=Math.floor((T-be.offset+k)/(Xe+k));const Ot=Ye-Ee.start;Ze+=Ot*Xe+Ot*k}Ye<Fe&&(Ze+=(Fe-Ye)*Xe,Ye=Fe);const Fr=Math.min(Ee.end,ve);for(let Ot=Ye;Ot<=Fr&&!(Ze>=h);Ot++)Se.push({data:O==null?void 0:O[Ot],index:Ot,offset:Ze,size:Xe}),Ze+=Xe+k}}),Ge=Px(P,hc),ot=Px(P,bc);if(_e.length>0&&(Ge>0||ot>0)){const Se=_e[0],Ee=_e[_e.length-1];if(Ge>0&&Se.index>Fe){const be=Math.min(Ge,Se.index-Fe),Ze=[];let Ye=Se.offset;for(let Xe=Se.index-1;Xe>=Se.index-be;Xe--){const Fr=(z=(U=yo(he,Xe,Xe)[0])==null?void 0:U.value)!=null?z:Se.size;Ye-=Fr+k,Ze.unshift({data:O==null?void 0:O[Xe],index:Xe,offset:Ye,size:Fr})}_e.unshift(...Ze)}if(ot>0&&Ee.index<ve){const be=Math.min(ot,ve-Ee.index);let Ze=Ee.offset+Ee.size+k;for(let Ye=Ee.index+1;Ye<=Ee.index+be;Ye++){const Xe=(G=(H=yo(he,Ye,Ye)[0])==null?void 0:H.value)!=null?G:Ee.size;_e.push({data:O==null?void 0:O[Ye],index:Ye,offset:Ze,size:Xe}),Ze+=Xe+k}}}return Hu(_e,de,b,k,J,_)}),fe(T=>T!==null),tt()),om);ce(W(e,fe(W0),re(T=>T==null?void 0:T.length)),s),ce(W(A,re(T=>T.topListHeight)),d),ce(d,i),ce(W(A,re(T=>[T.top,T.bottom])),o),ce(W(A,re(T=>T.items)),v);const C=br(W(A,fe(({items:T})=>T.length>0),Te(s,e),fe(([{items:T},h])=>T[T.length-1].originalIndex===h-1),re(([,T,h])=>[T-1,h]),tt(cc),re(([T])=>T))),D=br(W(A,Hn(200),fe(({items:T,topItems:h})=>T.length>0&&T[0].originalIndex===h.length),re(({items:T})=>T[0].index),tt())),L=br(W(A,fe(({items:T})=>T.length>0),re(({items:T})=>{let h=0,b=T.length-1;for(;T[h].type==="group"&&h<b;)h++;for(;T[b].type==="group"&&b>h;)b--;return{endIndex:T[b].index,startIndex:T[h].index}}),tt(hx)));return{endReached:C,initialItemCount:E,itemsRendered:v,listState:A,minOverscanItemCount:w,rangeChanged:L,startReached:D,topItemsIndexes:g,...f}},et(ln,wx,am,dc,uc,mc,ys,em),{singleton:!0}),Ix=$e(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:r,headerHeight:n},{listState:s}])=>{const a=Oe(),o=Ht(W(Et(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(Wt,la),{singleton:!0}),Wj=$e(([{viewportHeight:e},{totalListHeight:t}])=>{const r=K(!1),n=Ht(W(Et(r,e,t),fe(([s])=>s),re(([,s,a])=>Math.max(0,s-a)),Hn(0),tt()),0);return{alignToBottom:r,paddingTopAddition:n}},et(Wt,Ix),{singleton:!0}),Bx=$e(()=>({context:K(null)})),qj=({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,Fx=$e(([{gap:e,sizes:t,totalCount:r},{fixedFooterHeight:n,fixedHeaderHeight:s,headerHeight:a,scrollingInProgress:o,scrollTop:i,viewportHeight:c},{scrollToIndex:l}])=>{const u=Oe();return ce(W(u,Te(t,c,r,a,s,n,i),Te(e),re(([[d,f,m,y,g,E,v,w],A])=>{const{align:C,behavior:D,calculateViewLocation:L=qj,done:T,...h}=d,b=gx(d,f,y-1),x=lc(b,f.offsetTree,A)+g+E,S=x+qr(f.sizeTree,b)[1],I=w+E,F=w+m-v,_=L({itemBottom:S,itemTop:x,locationParams:{align:C,behavior:D,...h},viewportBottom:F,viewportTop:I});return _?T&&Wr(W(o,fe(k=>!k),oa(st(o)?1:2)),T):T&&T(),_}),fe(d=>d!==null)),l),{scrollIntoView:u}},et(ln,Wt,uc,la,hs),{singleton:!0});function Ux(e){return e?e==="smooth"?"smooth":"auto":!1}const Yj=(e,t)=>typeof e=="function"?Ux(e(t)):t&&Ux(e),Kj=$e(([{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:f},{scrollIntoView:m}])=>{const y=K(!1),g=Oe();let E=null;function v(D){Ce(o,{align:"end",behavior:D,index:"LAST"})}je(W(Et(W(me(t),oa(1)),c),Te(me(y),a,i,d),re(([[D,L],T,h,b,x])=>{let S=L&&b,I="auto";return S&&(I=Yj(T,h||x),S=S&&!!I),{followOutputBehavior:I,shouldFollow:S,totalCount:D}}),fe(({shouldFollow:D})=>D)),({followOutputBehavior:D,totalCount:L})=>{E&&(E(),E=null),st(r)?requestAnimationFrame(()=>{st(u)("following output to ",{totalCount:L},nr.DEBUG),v(D)}):E=Wr(e,()=>{st(u)("following output to ",{totalCount:L},nr.DEBUG),v(D),E=null})});function w(D){const L=Wr(s,T=>{D&&!T.atBottom&&T.notAtBottomBecause==="SIZE_INCREASED"&&!E&&(st(u)("scrolling to bottom due to increased size",{},nr.DEBUG),v("auto"))});setTimeout(L,100)}je(W(Et(me(y),t,l),fe(([D,,L])=>D&&L),cn(({value:D},[,L])=>({refreshed:D===L,value:L}),{refreshed:!1,value:0}),fe(({refreshed:D})=>D),Te(y,t)),([,D])=>{st(i)&&w(D!==!1)}),je(g,()=>{w(st(y)!==!1)}),je(Et(me(y),s),([D,L])=>{D&&!L.atBottom&&L.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const A=K(null),C=Oe();return ce(Y0(W(me(n),re(D=>{var L;return(L=D==null?void 0:D.length)!=null?L:0})),W(me(t))),C),je(W(Et(W(C,oa(1)),c),Te(me(A),i,d,f),re(([[D,L],T,h,b,x])=>L&&h&&(T==null?void 0:T({context:x,totalCount:D,scrollingInProgress:b}))),fe(D=>!!D),Hn(0)),D=>{E&&(E(),E=null),st(r)?requestAnimationFrame(()=>{st(u)("scrolling into view",{}),Ce(m,D)}):E=Wr(e,()=>{st(u)("scrolling into view",{}),Ce(m,D),E=null})}),{autoscrollToBottom:g,followOutput:y,scrollIntoViewOnChange:A}},et(ln,mc,uc,dc,ys,hs,Wt,Bx,Fx)),Zj=$e(([{data:e,firstItemIndex:t,gap:r,sizes:n},{initialTopMostItemIndex:s},{initialItemCount:a,listState:o},{didMount:i}])=>(ce(W(i,Te(a),fe(([,c])=>c!==0),Te(s,n,t,r,e),re(([[,c],l,u,d,f,m=[]])=>Sx(c,l,u,d,f,m))),o),{}),et(ln,dc,la,ys),{singleton:!0}),Xj=$e(([{didMount:e},{scrollTo:t},{listState:r}])=>{const n=K(0);return je(W(e,Te(n),fe(([,s])=>s!==0),re(([,s])=>({top:s}))),s=>{Wr(W(r,oa(1),fe(a=>a.items.length>1)),()=>{requestAnimationFrame(()=>{Ce(t,s)})})}),{initialScrollTop:n}},et(ys,Wt,la),{singleton:!0}),Ox=$e(([{scrollVelocity:e}])=>{const t=K(!1),r=Oe(),n=K(!1);return ce(W(e,Te(n,t,r),fe(([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(W(Et(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(mc),{singleton:!0}),im=$e(([{scrollContainerState:e,scrollTo:t}])=>{const r=Oe(),n=Oe(),s=Oe(),a=K(!1),o=K(void 0);return ce(W(Et(r,n),re(([{scrollHeight:i,scrollTop:c,viewportHeight:l},{offsetTop:u}])=>({scrollHeight:i,scrollTop:Math.max(0,c-u),viewportHeight:l}))),e),ce(W(t,Te(n),re(([i,{offsetTop:c}])=>({...i,top:i.top+c}))),s),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:r,windowScrollTo:s,windowViewportRect:n}},et(Wt)),Qj=$e(([{sizeRanges:e,sizes:t},{headerHeight:r,scrollTop:n},{initialTopMostItemIndex:s},{didMount:a},{useWindowScroll:o,windowScrollContainerState:i,windowViewportRect:c}])=>{const l=Oe(),u=K(void 0),d=K(null),f=K(null);return ce(i,d),ce(c,f),je(W(l,Te(t,n,o,d,f,r)),([m,y,g,E,v,w,A])=>{const C=_j(y.sizeTree);E&&v!==null&&w!==null&&(g=v.scrollTop-w.offsetTop),g-=A,m({ranges:C,scrollTop:g})}),ce(W(u,fe(W0),re(Jj)),s),ce(W(a,Te(u),fe(([,m])=>m!==void 0),tt(),re(([,m])=>m.ranges)),e),{getState:l,restoreStateFrom:u}},et(ln,Wt,dc,ys,im));function Jj(e){return{align:"start",index:0,offset:e.scrollTop}}const eV=$e(([{topItemsIndexes:e}])=>{const t=K(0);return ce(W(t,fe(r=>r>=0),re(r=>Array.from({length:r}).map((n,s)=>s))),e),{topItemCount:t}},et(la));function Dx(e){let t=!1,r;return()=>(t||(t=!0,r=e()),r)}const tV=Dx(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),rV=$e(([{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:f},{log:m},{recalcInProgress:y}])=>{const g=br(W(c,Te(o),cn(([,v,w,A],[{bottom:C,items:D,offsetBottom:L,totalCount:T},h])=>{const b=C+L;let x=0;return w===T&&v.length>0&&D.length>0&&(D[0].originalIndex===0&&v[0].originalIndex===0||(x=b-A,x!==0&&(x+=h))),[x,D,T,b]},[0,[],0,0]),fe(([v])=>v!==0),Te(n,i,r,s,m,y),fe(([,v,w,A,,,C])=>!C&&!A&&v!==0&&w===pc),re(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},nr.DEBUG),v))));function E(v){v>0?(Ce(t,{behavior:"auto",top:-v}),Ce(e,0)):(Ce(e,0),Ce(t,{behavior:"auto",top:-v}))}return je(W(g,Te(e,a)),([v,w,A])=>{A&&tV()?Ce(e,w-v):E(-v)}),je(W(Et(Ht(a,!1),e,y),fe(([v,w,A])=>!v&&!A&&w!==0),re(([v,w])=>w),Hn(1)),E),ce(W(d,re(v=>({top:-v}))),t),je(W(l,Te(f,u),re(([v,{groupIndices:w,lastSize:A,sizeTree:C},D])=>{function L(T){return T*(A+D)}if(w.length===0)return L(v);{let T=0;const h=ic(C,0);let b=0,x=0;for(;b<v;){b++,T+=h;let S=w.length===x+1?1/0:w[x+1]-w[x]-1;b+S>v&&(T-=h,S=v-b+1),b+=S,T+=L(S),x++}return T}})),v=>{Ce(e,v),requestAnimationFrame(()=>{Ce(t,{top:v}),requestAnimationFrame(()=>{Ce(e,0),Ce(y,!1)})})}),{deviation:e}},et(Wt,mc,la,ln,hs,em)),nV=$e(([e,t,r,n,s,a,o,i,c,l,u])=>({...e,...t,...r,...n,...s,...a,...o,...i,...c,...l,...u}),et(am,Zj,ys,Ox,Ix,Xj,Wj,im,Fx,hs,Bx)),_x=$e(([{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:f,trackItemSizes:m},{initialItemFinalLocationReached:y,initialTopMostItemIndex:g,scrolledToInitialItem:E},v,w,A,C,{scrollToIndex:D},L,{topItemCount:T},{groupCounts:h},b])=>{const{listState:x,minOverscanItemCount:S,topItemsIndexes:I,rangeChanged:F,..._}=C;return ce(F,b.scrollSeekRangeChanged),ce(W(b.windowViewportRect,re(k=>k.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:r,fixedItemHeight:n,fixedGroupHeight:s,gap:a,groupCounts:h,heightEstimates:i,initialItemFinalLocationReached:y,initialTopMostItemIndex:g,scrolledToInitialItem:E,sizeRanges:l,topItemCount:T,topItemsIndexes:I,totalCount:f,...A,groupIndices:o,itemSize:c,listState:x,minOverscanItemCount:S,scrollToIndex:D,statefulTotalCount:d,trackItemSizes:m,rangeChanged:F,..._,...b,...v,sizes:u,...w}},et(ln,dc,Wt,Qj,Kj,la,uc,rV,eV,wx,nV));function sV(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 $u=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Mx(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=M.createContext({});function c(E,v){E.propsReady&&Ce(E.propsReady,!1);for(const w of n){const A=E[t.required[w]];Ce(A,v[w])}for(const w of s)if(w in v){const A=E[t.optional[w]];Ce(A,v[w])}E.propsReady&&Ce(E.propsReady,!0)}function l(E){return a.reduce((v,w)=>(v[w]=A=>{const C=E[t.methods[w]];Ce(C,A)},v),{})}function u(E){return o.reduce((v,w)=>(v[w]=wj(E[t.events[w]]),v),{})}const d=M.forwardRef((E,v)=>{const{children:w,...A}=E,[C]=M.useState(()=>Nu(Ej(e),T=>{c(T,A)})),[D]=M.useState(sx(u,C));$u(()=>{for(const T of o)T in A&&je(D[T],A[T]);return()=>{Object.values(D).map(q0)}},[A,D,C]),$u(()=>{c(C,A)}),M.useImperativeHandle(v,rx(l(C)));const L=r;return B.jsx(i.Provider,{value:C,children:r?B.jsx(L,{...sV([...n,...s,...o],A),children:w}):w})}),f=E=>{const v=M.useContext(i);return M.useCallback(w=>{Ce(v[E],w)},[v,E])},m=E=>{const v=M.useContext(i)[E],w=M.useCallback(A=>je(v,A),[v]);return M.useSyncExternalStore(w,()=>st(v),()=>st(v))},y=E=>{const v=M.useContext(i)[E],[w,A]=M.useState(sx(st,v));return $u(()=>je(v,C=>{C!==w&&A(rx(C))}),[v,w]),w},g=M.version.startsWith("18")?m:y;return{Component:d,useEmitter:(E,v)=>{const w=M.useContext(i)[E];$u(()=>je(w,v),[v,w])},useEmitterValue:g,usePublisher:f}}const Nx=M.createContext(void 0),Lx=M.createContext(void 0),zx=typeof document<"u"?M.useLayoutEffect:M.useEffect;function cm(e){return"self"in e}function aV(e){return"body"in e}function Rx(e,t,r,n=ho,s,a){const o=M.useRef(null),i=M.useRef(null),c=M.useRef(null),l=M.useCallback(f=>{let m,y,g;const E=f.target;if(aV(E)||cm(E)){const w=cm(E)?E:E.defaultView;g=a?w.scrollX:w.scrollY,m=a?w.document.documentElement.scrollWidth:w.document.documentElement.scrollHeight,y=a?w.innerWidth:w.innerHeight}else g=a?E.scrollLeft:E.scrollTop,m=a?E.scrollWidth:E.scrollHeight,y=a?E.offsetWidth:E.offsetHeight;const v=()=>{e({scrollHeight:m,scrollTop:Math.max(g,0),viewportHeight:y})};f.suppressFlushSync?v():ka.flushSync(v),i.current!==null&&(g===i.current||g<=0||g===m-y)&&(i.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t,a]);M.useEffect(()=>{const f=s||o.current;return n(s||o.current),l({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",l,{passive:!0}),()=>{n(null),f.removeEventListener("scroll",l)}},[o,l,r,n,s]);function u(f){const m=o.current;if(!m||(a?"offsetWidth"in m&&m.offsetWidth===0:"offsetHeight"in m&&m.offsetHeight===0))return;const y=f.behavior==="smooth";let g,E,v;cm(m)?(E=Math.max(bs(m.document.documentElement,a?"width":"height"),a?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight),g=a?m.innerWidth:m.innerHeight,v=a?window.scrollX:window.scrollY):(E=m[a?"scrollWidth":"scrollHeight"],g=bs(m,a?"width":"height"),v=m[a?"scrollLeft":"scrollTop"]);const w=E-g;if(f.top=Math.ceil(Math.max(Math.min(w,f.top),0)),Ex(g,E)||f.top===v){e({scrollHeight:E,scrollTop:v,viewportHeight:g}),y&&t(!0);return}y?(i.current=f.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,i.current=null,t(!0)},1e3)):i.current=null,a&&(f={behavior:f.behavior,left:f.top}),m.scrollTo(f)}function d(f){a&&(f={behavior:f.behavior,left:f.top}),o.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}const lm="-webkit-sticky",Hx="sticky",um=Dx(()=>{if(typeof document>"u")return Hx;const e=document.createElement("div");return e.style.position=lm,e.style.position===lm?lm:Hx});function dm(e){return e}const oV=$e(()=>{const e=K(i=>`Item ${i}`),t=K(i=>`Group ${i}`),r=K({}),n=K(dm),s=K("div"),a=K(ho),o=(i,c=null)=>Ht(W(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")}}),iV=$e(([e,t])=>({...e,...t}),et(_x,oV)),cV=({height:e})=>B.jsx("div",{style:{height:e}}),lV={overflowAnchor:"none",position:um(),zIndex:1},$x={overflowAnchor:"none"},uV={...$x,display:"inline-block",height:"100%"},Gx=M.memo(function({showTopList:e=!1}){const t=ye("listState"),r=Pr("sizeRanges"),n=ye("useWindowScroll"),s=ye("customScrollParent"),a=Pr("windowScrollContainerState"),o=Pr("scrollContainerState"),i=s||n?a:o,c=ye("itemContent"),l=ye("context"),u=ye("groupContent"),d=ye("trackItemSizes"),f=ye("itemSize"),m=ye("log"),y=Pr("gap"),g=ye("horizontalDirection"),{callbackRef:E}=Tj(r,f,d,e?ho:i,m,y,s,g,ye("skipAnimationFrameInResizeObserver")),[v,w]=M.useState(0);pm("deviation",_=>{v!==_&&w(_)});const A=ye("EmptyPlaceholder"),C=ye("ScrollSeekPlaceholder")||cV,D=ye("ListComponent"),L=ye("ItemComponent"),T=ye("GroupComponent"),h=ye("computeItemKey"),b=ye("isSeeking"),x=ye("groupIndices").length>0,S=ye("alignToBottom"),I=ye("initialItemFinalLocationReached"),F=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:S?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:S?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...I?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&A?B.jsx(A,{...$t(A,l)}):B.jsx(D,{...$t(D,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:E,style:F,children:(e?t.topItems:t.items).map(_=>{const k=_.originalIndex,P=h(k+t.firstItemIndex,_.data,l);return b?M.createElement(C,{...$t(C,l),height:_.size,index:_.index,key:P,type:_.type||"item",..._.type==="group"?{}:{groupIndex:_.groupIndex}}):_.type==="group"?M.createElement(T,{...$t(T,l),"data-index":k,"data-item-index":_.index,"data-known-size":_.size,key:P,style:lV},u(_.index,l)):M.createElement(L,{...$t(L,l),...mV(L,_.data),"data-index":k,"data-item-group-index":_.groupIndex,"data-item-index":_.index,"data-known-size":_.size,key:P,style:g?uV:$x},x?c(_.index,_.groupIndex,_.data,l):c(_.index,_.data,l))})})}),dV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},pV={outline:"none",overflowX:"auto",position:"relative"},Gu=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),fV={position:um(),top:0,width:"100%",zIndex:1};function $t(e,t){if(typeof e!="string")return{context:t}}function mV(e,t){return{item:typeof e=="string"?void 0:t}}const hV=M.memo(function(){const e=ye("HeaderComponent"),t=Pr("headerHeight"),r=ye("HeaderFooterTag"),n=ia(M.useMemo(()=>a=>{t(bs(a,"height"))},[t]),!0,ye("skipAnimationFrameInResizeObserver")),s=ye("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...$t(e,s)})}):null}),bV=M.memo(function(){const e=ye("FooterComponent"),t=Pr("footerHeight"),r=ye("HeaderFooterTag"),n=ia(M.useMemo(()=>a=>{t(bs(a,"height"))},[t]),!0,ye("skipAnimationFrameInResizeObserver")),s=ye("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...$t(e,s)})}):null});function jx({useEmitter:e,useEmitterValue:t,usePublisher:r}){return M.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:f,scrollerRef:m,scrollToCallback:y}=Rx(i,l,c,u,void 0,d);return e("scrollTo",y),e("scrollBy",f),B.jsx(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:m,style:{...d?pV:dV,...s},tabIndex:0,...o,...$t(c,a),children:n})})}function Vx({useEmitter:e,useEmitterValue:t,usePublisher:r}){return M.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"),f=t("customScrollParent"),m=M.useRef(null),y=t("scrollerRef"),{scrollByCallback:g,scrollerRef:E,scrollToCallback:v}=Rx(i,l,c,y,f);return zx(()=>{var w;return E.current=f||((w=m.current)==null?void 0:w.ownerDocument.defaultView),()=>{E.current=null}},[E,f]),e("windowScrollTo",v),e("scrollBy",g),B.jsx(c,{ref:m,"data-virtuoso-scroller":!0,style:{position:"relative",...s,...u!==0?{height:u+d}:{}},...o,...$t(c,a),children:n})})}const yV=({children:e})=>{const t=M.useContext(Nx),r=Pr("viewportHeight"),n=Pr("fixedItemHeight"),s=ye("alignToBottom"),a=ye("horizontalDirection"),o=M.useMemo(()=>nx(r,c=>bs(c,a?"width":"height")),[r,a]),i=ia(o,!0,ye("skipAnimationFrameInResizeObserver"));return M.useEffect(()=>{t&&(r(t.viewportHeight),n(t.itemHeight))},[t,r,n]),B.jsx("div",{"data-viewport-type":"element",ref:i,style:Gu(s),children:e})},gV=({children:e})=>{const t=M.useContext(Nx),r=Pr("windowViewportRect"),n=Pr("fixedItemHeight"),s=ye("customScrollParent"),a=cx(r,s,ye("skipAnimationFrameInResizeObserver")),o=ye("alignToBottom");return M.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:Gu(o),children:e})},xV=({children:e})=>{const t=ye("TopItemListComponent")||"div",r=ye("headerHeight"),n={...fV,marginTop:`${r}px`},s=ye("context");return B.jsx(t,{style:n,...$t(t,s),children:e})},wV=M.memo(function(e){const t=ye("useWindowScroll"),r=ye("topItemsIndexes").length>0,n=ye("customScrollParent"),s=ye("context");return B.jsxs(n||t?kV:EV,{...e,context:s,children:[r&&B.jsx(xV,{children:B.jsx(Gx,{showTopList:!0})}),B.jsxs(n||t?gV:yV,{children:[B.jsx(hV,{}),B.jsx(Gx,{}),B.jsx(bV,{})]})]})}),{Component:vV,useEmitter:pm,useEmitterValue:ye,usePublisher:Pr}=Mx(iV,{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"}},wV),EV=jx({useEmitter:pm,useEmitterValue:ye,usePublisher:Pr}),kV=Vx({useEmitter:pm,useEmitterValue:ye,usePublisher:Pr}),CV=vV;et(_x,$e(()=>{const e=K(l=>B.jsxs("td",{children:["Item $",l]})),t=K(null),r=K(l=>B.jsxs("td",{colSpan:1e3,children:["Group ",l]})),n=K(null),s=K(null),a=K({}),o=K(dm),i=K(ho),c=(l,u=null)=>Ht(W(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")}})),um();const Wx={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},TV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:qx,floor:ju,max:yc,min:fm,round:Yx}=Math;function Kx(e,t,r){return Array.from({length:t-e+1}).map((n,s)=>({data:r===null?null:r[s+e],index:s+e}))}function SV(e){return{...TV,items:e}}function Vu(e,t){return e&&e.width===t.width&&e.height===t.height}function AV(e,t){return e&&e.column===t.column&&e.row===t.row}const PV=$e(([{increaseViewportBy:e,listBoundary:t,overscan:r,visibleRange:n},{footerHeight:s,headerHeight:a,scrollBy:o,scrollContainerState:i,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},f,m,{didMount:y,propsReady:g},{customScrollParent:E,useWindowScroll:v,windowScrollContainerState:w,windowScrollTo:A,windowViewportRect:C},D])=>{const L=K(0),T=K(0),h=K(Wx),b=K({height:0,width:0}),x=K({height:0,width:0}),S=Oe(),I=Oe(),F=K(0),_=K(null),k=K({column:0,row:0}),P=Oe(),O=Oe(),U=K(!1),z=K(0),H=K(!0),G=K(!1),J=K(!1);je(W(y,Te(z),fe(([Q,ve])=>!!ve)),()=>{Ce(H,!1)}),je(W(Et(y,H,x,b,z,G),fe(([Q,ve,_e,Ge,,ot])=>Q&&!ve&&_e.height!==0&&Ge.height!==0&&!ot)),([,,,,Q])=>{Ce(G,!0),nm(1,()=>{Ce(S,Q)}),Wr(W(l),()=>{Ce(t,[0,0]),Ce(H,!0)})}),ce(W(O,fe(Q=>Q!=null&&Q.scrollTop>0),on(0)),T),je(W(y,Te(O),fe(([,Q])=>Q!=null)),([,Q])=>{Q&&(Ce(b,Q.viewport),Ce(x,Q.item),Ce(k,Q.gap),Q.scrollTop>0&&(Ce(U,!0),Wr(W(l,oa(1)),ve=>{Ce(U,!1)}),Ce(c,{top:Q.scrollTop})))}),ce(W(b,re(({height:Q})=>Q)),d),ce(W(Et(me(b,Vu),me(x,Vu),me(k,(Q,ve)=>Q&&Q.column===ve.column&&Q.row===ve.row),me(l)),re(([Q,ve,_e,Ge])=>({gap:_e,item:ve,scrollTop:Ge,viewport:Q}))),P),ce(W(Et(me(L),n,me(k,AV),me(x,Vu),me(b,Vu),me(_),me(T),me(U),me(H),me(z)),fe(([,,,,,,,Q])=>!Q),re(([Q,[ve,_e],Ge,ot,Se,Ee,be,,Ze,Ye])=>{const{column:Xe,row:Fr}=Ge,{height:Ot,width:wm}=ot,{width:C5}=Se;if(be===0&&(Q===0||C5===0))return Wx;if(wm===0){const I5=sm(Ye,Q),NW=I5+Math.max(be-1,0);return SV(Kx(I5,NW,Ee))}const qu=Zx(C5,wm,Xe);let Bo,Ea;Ze?ve===0&&_e===0&&be>0?(Bo=0,Ea=be-1):(Bo=qu*ju((ve+Fr)/(Ot+Fr)),Ea=qu*qx((_e+Fr)/(Ot+Fr))-1,Ea=fm(Q-1,yc(Ea,qu-1)),Bo=fm(Ea,yc(0,Bo))):(Bo=0,Ea=-1);const T5=Kx(Bo,Ea,Ee),{bottom:S5,top:A5}=Xx(Se,Ge,ot,T5),P5=qx(Q/qu),MW=P5*Ot+(P5-1)*Fr-S5;return{bottom:S5,itemHeight:Ot,items:T5,itemWidth:wm,offsetBottom:MW,offsetTop:A5,top:A5}})),h),ce(W(_,fe(Q=>Q!==null),re(Q=>Q.length)),L),ce(W(Et(b,x,h,k),fe(([Q,ve,{items:_e}])=>_e.length>0&&ve.height!==0&&Q.height!==0),re(([Q,ve,{items:_e},Ge])=>{const{bottom:ot,top:Se}=Xx(Q,Ge,ve,_e);return[Se,ot]}),tt(cc)),t);const pe=K(!1);ce(W(l,Te(pe),re(([Q,ve])=>ve||Q!==0)),pe);const he=br(W(Et(h,L),fe(([{items:Q}])=>Q.length>0),Te(pe),fe(([[Q,ve],_e])=>{const Ge=Q.items[Q.items.length-1].index===ve-1;return(_e||Q.bottom>0&&Q.itemHeight>0&&Q.offsetBottom===0&&Q.items.length===ve)&&Ge}),re(([[,Q]])=>Q-1),tt())),ie=br(W(me(h),fe(({items:Q})=>Q.length>0&&Q[0].index===0),on(0),tt())),de=br(W(me(h),Te(U),fe(([{items:Q},ve])=>Q.length>0&&!ve),re(([{items:Q}])=>({endIndex:Q[Q.length-1].index,startIndex:Q[0].index})),tt(hx),Hn(0)));ce(de,m.scrollSeekRangeChanged),ce(W(S,Te(b,x,L,k),re(([Q,ve,_e,Ge,ot])=>{const Se=vx(Q),{align:Ee,behavior:be,offset:Ze}=Se;let Ye=Se.index;Ye==="LAST"&&(Ye=Ge-1),Ye=yc(0,Ye,fm(Ge-1,Ye));let Xe=mm(ve,ot,_e,Ye);return Ee==="end"?Xe=Yx(Xe-ve.height+_e.height):Ee==="center"&&(Xe=Yx(Xe-ve.height/2+_e.height/2)),Ze&&(Xe+=Ze),{behavior:be,top:Xe}})),c);const Fe=Ht(W(h,re(Q=>Q.offsetBottom+Q.bottom)),0);return ce(W(C,re(Q=>({height:Q.visibleHeight,width:Q.visibleWidth}))),b),{customScrollParent:E,data:_,deviation:F,footerHeight:s,gap:k,headerHeight:a,increaseViewportBy:e,initialItemCount:T,itemDimensions:x,overscan:r,restoreStateFrom:O,scrollBy:o,scrollContainerState:i,scrollHeight:I,scrollTo:c,scrollToIndex:S,scrollTop:l,smoothScrollTargetReached:u,totalCount:L,useWindowScroll:v,viewportDimensions:b,windowScrollContainerState:w,windowScrollTo:A,windowViewportRect:C,...m,gridState:h,horizontalDirection:J,initialTopMostItemIndex:z,totalListHeight:Fe,...f,endReached:he,propsReady:g,rangeChanged:de,startReached:ie,stateChanged:P,stateRestoreInProgress:U,...D}},et(am,Wt,mc,Ox,ys,im,hs));function Zx(e,t,r){return yc(1,ju((e+r)/(ju(t)+r)))}function Xx(e,t,r,n){const{height:s}=r;if(s===void 0||n.length===0)return{bottom:0,top:0};const a=mm(e,t,r,n[0].index);return{bottom:mm(e,t,r,n[n.length-1].index)+s,top:a}}function mm(e,t,r,n){const s=Zx(e.width,r.width,t.column),a=ju(n/s),o=a*r.height+yc(0,a-1)*t.row;return o>0?o+t.row:o}const IV=$e(()=>{const e=K(d=>`Item ${d}`),t=K({}),r=K(null),n=K("virtuoso-grid-item"),s=K("virtuoso-grid-list"),a=K(dm),o=K("div"),i=K(ho),c=(d,f=null)=>Ht(W(t,re(m=>m[d]),tt()),f),l=K(!1),u=K(!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")}}),BV=$e(([e,t])=>({...e,...t}),et(PV,IV)),FV=M.memo(function(){const e=at("gridState"),t=at("listClassName"),r=at("itemClassName"),n=at("itemContent"),s=at("computeItemKey"),a=at("isSeeking"),o=Ir("scrollHeight"),i=at("ItemComponent"),c=at("ListComponent"),l=at("ScrollSeekPlaceholder"),u=at("context"),d=Ir("itemDimensions"),f=Ir("gap"),m=at("log"),y=at("stateRestoreInProgress"),g=Ir("reportReadyState"),E=ia(M.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;o(w);const A=v.firstChild;if(A){const{height:C,width:D}=A.getBoundingClientRect();d({height:C,width:D})}f({column:Jx("column-gap",getComputedStyle(v).columnGap,m),row:Jx("row-gap",getComputedStyle(v).rowGap,m)})},[o,d,f,m]),!0,!1);return zx(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),y?null:B.jsx(c,{className:t,ref:E,...$t(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,{...$t(l,u),height:e.itemHeight,index:v.index,width:e.itemWidth},w):M.createElement(i,{...$t(i,u),className:r,"data-index":v.index,key:w},n(v.index,v.data,u))})})}),UV=M.memo(function(){const e=at("HeaderComponent"),t=Ir("headerHeight"),r=at("headerFooterTag"),n=ia(M.useMemo(()=>a=>{t(bs(a,"height"))},[t]),!0,!1),s=at("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...$t(e,s)})}):null}),OV=M.memo(function(){const e=at("FooterComponent"),t=Ir("footerHeight"),r=at("headerFooterTag"),n=ia(M.useMemo(()=>a=>{t(bs(a,"height"))},[t]),!0,!1),s=at("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...$t(e,s)})}):null}),DV=({children:e})=>{const t=M.useContext(Lx),r=Ir("itemDimensions"),n=Ir("viewportDimensions"),s=ia(M.useMemo(()=>a=>{n(a.getBoundingClientRect())},[n]),!0,!1);return M.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:Gu(!1),children:e})},_V=({children:e})=>{const t=M.useContext(Lx),r=Ir("windowViewportRect"),n=Ir("itemDimensions"),s=at("customScrollParent"),a=cx(r,s,!1);return M.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:Gu(!1),children:e})},MV=M.memo(function({...e}){const t=at("useWindowScroll"),r=at("customScrollParent"),n=r||t?LV:NV,s=r||t?_V:DV,a=at("context");return B.jsx(n,{...e,...$t(n,a),children:B.jsxs(s,{children:[B.jsx(UV,{}),B.jsx(FV,{}),B.jsx(OV,{})]})})}),{useEmitter:Qx,useEmitterValue:at,usePublisher:Ir}=Mx(BV,{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"}},MV),NV=jx({useEmitter:Qx,useEmitterValue:at,usePublisher:Ir}),LV=Vx({useEmitter:Qx,useEmitterValue:at,usePublisher:Ir});function Jx(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,nr.WARN),t==="normal"?0:parseInt(t??"0",10)}var hm={},e5;function zV(){if(e5)return hm;e5=1;var e=uu.GenIcon;return hm.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)},hm}var RV=zV();function HV({logo:e,className:t="",style:r={},alt:n="Token logo"}){const[s,a]=M.useState(!1);return M.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(RV.AiFillQuestionCircle,{style:{width:20,height:20},className:"twap-token-svg"})}const $V=()=>B.jsx("div",{className:"twap-orders__loader",children:B.jsx("p",{children:"Loading..."})}),GV=()=>{const{isLoading:e}=Du(),t=q2(),r=Z(a=>a.state.orderIdsToCancel),n=Z(a=>a.state.cancelOrdersMode),s=Y2();return B.jsx(B.Fragment,{children:e?B.jsx($V,{}):t!=null&&t.length?B.jsx("div",{className:`twap-orders__list ${n?"twap-orders__list-select-mode":""}`,children:B.jsx(CV,{style:{height:"100%"},data:t,itemContent:(a,o)=>B.jsx(jV,{cancelOrdersMode:!!n,selected:(r==null?void 0:r.includes(o.id))||!1,selectOrder:s,order:o},a)})}):B.jsx(VV,{})})},jV=({order:e,selectOrder:t,selected:r,cancelOrdersMode:n})=>{const s=Z(i=>i.updateState),a=xt.useCallback(()=>{s({selectedOrderID:e==null?void 0:e.id})},[s,e==null?void 0:e.id]),o=xt.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(WV,{order:e}),B.jsx(qV,{value:e.progress||0}),B.jsxs("div",{className:"twap-orders__list-item-tokens",children:[B.jsx(t5,{address:e.srcTokenAddress}),B.jsx(mj.HiArrowRight,{className:"twap-orders__list-item-tokens-arrow"}),B.jsx(t5,{address:e.dstTokenAddress})]})]})})},VV=()=>{const e=Z(n=>n.state.orderHistoryStatusFilter),t=Be(),r=xt.useMemo(()=>e||"",[e]);return B.jsx("div",{className:"twap-orders__list-empty",children:B.jsx("p",{children:t("noOrders",{status:r})})})},WV=({order:e})=>{const t=e&&e.status,r=W2(e),n=H0(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})]})},t5=e=>{const{useToken:t,components:r}=ne(),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(HV,{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 qV(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 YV=()=>{const e=Z(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(qG,{}):B.jsx(GV,{})})},KV=e=>{const t=Be(),{marketPrice:r}=ne(),n=Z(a=>a.state.typedSrcAmount);return M.useMemo(()=>{const{isError:a,value:o}=hh(e);if(!(!a||j(n||"0").isZero()||!r))return{type:Mt.MIN_FILL_DELAY,value:o,message:t("minFillDelayError",{fillDelay:`${Sd(o)} ${t("minutes")}`})}},[e,t,n,r])},ua=()=>{const e=Z(s=>s.state.typedFillDelay),t=Z(s=>s.updateState),r=M.useMemo(()=>e||Bc,[e]),n=KV(r);return{fillDelay:r,onChange:M.useCallback(s=>t({typedFillDelay:s}),[t]),error:n,milliseconds:r.unit*r.value}},ZV=()=>{const{onChange:e,fillDelay:t,error:r}=ua(),n=Be(),s=M.useCallback(o=>e({unit:t.unit,value:Number(o)}),[e,t]),a=M.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")}},un=()=>{const{srcToken:e}=ne(),t=Be(),r=Z(a=>a.state.typedSrcAmount),s=Z(a=>a.state.acceptedSrcAmount)||r;return{amountWei:V2(e==null?void 0:e.decimals,s),amountUI:s,error:j(s||0).isZero()?t("enterAmount"):void 0}},XV=(e,t)=>{const{module:r,srcUsd1Token:n,marketPrice:s,minChunkSizeUsd:a}=ne(),o=Be(),i=Z(c=>c.state.typedSrcAmount);return M.useMemo(()=>{if(j(i||"0").isZero()||!s)return;if(!e)return{type:Mt.MIN_CHUNKS,value:1,message:o("minChunksError",{minChunks:"1"})};const{isError:c}=yh(e,t,r);if(c)return{type:Mt.MAX_CHUNKS,value:t,message:o("maxChunksError",{maxChunks:`${t}`})};const{isError:l,value:u}=bh(i||"",n||"",a||0);if(l)return{type:Mt.MIN_TRADE_SIZE,value:u,message:o("minTradeSizeError",{minTradeSize:`${u}`})}},[e,t,r,i,n,a,o,s])},$n=()=>{const{srcToken:e,srcUsd1Token:t,module:r,minChunkSizeUsd:n}=ne(),s=Z(g=>g.state.typedChunks),a=ua().fillDelay,o=Z(g=>g.updateState),{amountWei:i,amountUI:c}=un(),l=M.useMemo(()=>oh(a,c||"",t||"",n||0),[c,t,n,a]),u=M.useMemo(()=>ah(l,r,s),[l,s,r]),d=M.useCallback(g=>o({typedChunks:g}),[o]),f=M.useMemo(()=>ch(i||"",u),[i,u]),m=Vr(e==null?void 0:e.decimals,f),y=M.useMemo(()=>t?j(m||"0").times(t||0).toString():"0",[m,t]);return{totalTrades:u,maxTrades:l,amountPerTradeUI:m,amountPerTradeWei:f,amountPerTradeUsd:y,onChange:d,error:XV(u,l)}},QV=()=>{const{srcToken:e,dstToken:t}=ne(),r=Be(),{onChange:n,totalTrades:s,amountPerTradeUsd:a,amountPerTradeUI:o,error:i,maxTrades:c,amountPerTradeWei:l}=$n(),u=ze({value:o}),d=ze({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}},JV=e=>{const{module:t,marketPrice:r}=ne(),n=Be();return M.useMemo(()=>{const s=fh(t,e),a=mh(e);if(r){if(s.isError)return{type:Mt.MAX_ORDER_DURATION,value:s.value,message:n("maxDurationError",{duration:`${Math.floor(u1(s.value)).toFixed(0)} ${n("days")}`})};if(a.isError)return{type:Mt.MIN_ORDER_DURATION,value:a.value,message:n("minDurationError",{duration:`${Math.floor(Sd(a.value)).toFixed(0)} ${n("minutes")}`})}}},[e,n,t,r])},bm=()=>{const{module:e}=ne(),t=Z(i=>i.state.typedDuration),r=Z(i=>i.updateState),n=$n().totalTrades,s=ua().fillDelay,a=M.useMemo(()=>sh(e,n,s,t),[n,s,t,e]),o=JV(a);return{duration:a,setDuration:M.useCallback(i=>r({typedDuration:i}),[r]),error:o}},eW=()=>{const{module:e}=ne(),t=Be(),{duration:r,setDuration:n,error:s}=bm(),a=M.useCallback(c=>{n({unit:r.unit,value:Number(c)})},[n,r]),o=M.useCallback(c=>{n({unit:c,value:r.value})},[n,r]),i=M.useMemo(()=>e===ge.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}},tW=()=>{const e=Z(a=>a.state.isMarketOrder),{module:t}=ne(),r=Be(),n=M.useMemo(()=>{if(e&&!(t!==ge.STOP_LOSS&&t!==ge.TAKE_PROFIT))return{text:r("triggerMarketPriceDisclaimer"),url:Fc}},[e,r,t]),s=M.useMemo(()=>{if(!(t!==ge.LIMIT&&t!==ge.TWAP))return{text:r(e?"marketOrderWarning":"limitPriceMessage"),url:"https://www.orbs.com/dtwap-and-dlimit-faq/"}},[e,r,t]);return n||s},Wu=()=>{const{srcToken:e,dstToken:t,marketPriceLoading:r}=ne(),n=Z(l=>l.updateState),s=Z(l=>l.state.isInvertedTrade),a=Z(l=>l.state.typedTriggerPrice),o=Z(l=>l.state.typedLimitPrice),i=Z(l=>l.state.isMarketOrder);return{onInvert:M.useCallback(()=>{a!==void 0&&n({typedTriggerPrice:j(1).div(a).toFixed()}),o!==void 0&&n({typedLimitPrice:j(1).div(o).toFixed()}),n({isInvertedTrade:!s})},[n,s,a,o,r]),isInverted:s,fromToken:s?t:e,toToken:s?e:t,isMarketPrice:i}},r5=({typedValue:e,tokenDecimals:t=18,initialPrice:r="0",percentage:n,setValue:s,setPercentage:a})=>{const{srcUsd1Token:o,dstUsd1Token:i}=ne(),{isInverted:c}=Wu(),l=M.useMemo(()=>{if(e!==void 0){const g=c?j(e).isZero()?j(0):j(1).div(e):j(e);return Pc(t,g.toFixed())}if(n!==void 0&&j(r||"0").gt(0)&&!j(r||"0").isNaN()){const g=j(r||"0"),E=j(n||0).div(100);return g.plus(g.multipliedBy(E)).decimalPlaces(0).toFixed()}return j(r).gt(0)?r:""},[e,n,t,r,c]),u=M.useCallback(g=>{s(g),a(null)},[s,a]),d=M.useCallback(g=>{s(void 0),a(g)},[s,a]),f=M.useMemo(()=>{if(!r||j(r).isZero())return"";if(n!=null)return n;if(l){const g=j(r),v=j(l).minus(g).div(g).multipliedBy(100).decimalPlaces(2).toString();return j(v||"0").isZero()?"":v}return""},[l,r,n]),m=M.useMemo(()=>{let g="";if(e!==void 0)g=e;else{const E=bn(t,l);if(j(E||"0").isZero())return"";g=c?j(1).div(E).toFixed():E}return Do(g,6,t)},[e,t,l,c]),y=aa(c?o:i,m||"0");return{amountWei:j(l).isNaN()?"":l,amountUI:j(m).isNaN()?"":m,selectedPercentage:f,onChange:u,onPercentageChange:d,isInverted:c,usd:j(y).isNaN()?"":y}},rW=()=>{const{module:e}=ne();return M.useMemo(()=>e===ge.STOP_LOSS?Km:Zm,[e])},ym=()=>{const{module:e}=ne(),t=Z(r=>r.state.isMarketOrder);return M.useMemo(()=>e!==ge.STOP_LOSS&&e!==ge.TAKE_PROFIT||t?void 0:e===ge.STOP_LOSS?Xm:Qm,[e,t])},nW=(e="")=>{const{module:t,marketPrice:r}=ne(),n=Be(),s=Z(a=>a.state.typedSrcAmount);return M.useMemo(()=>{if(j(s||"0").isZero()||!r||t!==ge.STOP_LOSS&&t!==ge.TAKE_PROFIT)return;const a=lh(r||"",e||"",t);if(a!=null&&a.isError)return{type:Mt.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE,value:a.value,message:n("StopLossTriggerPriceError")||""};const o=uh(r||"",e||"",t);if(o!=null&&o.isError)return{type:Mt.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE,value:o.value,message:n("TakeProfitTriggerPriceError")||""};if(!e||j(e||0).isZero())return{type:Mt.EMPTY_TRIGGER_PRICE,value:e,message:n("emptyTriggerPrice")||""}},[r,e,t,n,s])},sW=e=>{const{srcToken:t,dstToken:r,module:n}=ne(),s=$n().amountPerTradeWei,a=Z(i=>i.state.isMarketOrder),o=M.useMemo(()=>nh(n,s,e,(t==null?void 0:t.decimals)||0),[e,s,a,t==null?void 0:t.decimals,n]);return{amountWei:o,amountUI:Vr((r==null?void 0:r.decimals)||0,o)}},da=()=>{const{dstToken:e,marketPrice:t,module:r}=ne(),n=Z(m=>m.updateState),s=rW(),a=Z(m=>m.state.triggerPricePercent),o=M.useCallback(m=>{n({triggerPricePercent:m})},[n]),i=a===void 0?s:a,c=r===ge.STOP_LOSS||r===ge.TAKE_PROFIT,l=r5({typedValue:Z(m=>m.state.typedTriggerPrice),percentage:i,tokenDecimals:e==null?void 0:e.decimals,initialPrice:c?t:void 0,setValue:M.useCallback(m=>n({typedTriggerPrice:m}),[n]),setPercentage:o}),u=nW(l.amountWei),{amountWei:d,amountUI:f}=sW(l.amountWei);return M.useMemo(()=>({...l,error:u,pricePerChunkWei:d,pricePerChunkUI:f}),[l,u,d,f])},aW=()=>{const{module:e,marketPrice:t,marketPriceLoading:r}=ne(),n=Be(),{amountUI:s,onChange:a,onPercentageChange:o,usd:i,selectedPercentage:c,error:l}=da(),u=Z(w=>w.state.isMarketOrder),d=Z(w=>w.updateState),{isInverted:f,onInvert:m,fromToken:y,toToken:g}=Wu(),E=M.useCallback(()=>{d({triggerPricePercent:void 0,typedTriggerPrice:void 0})},[d]),v=e!==ge.STOP_LOSS&&e!==ge.TAKE_PROFIT;return{price:s,error:l,label:n("stopLossLabel"),tooltip:e===ge.STOP_LOSS?n("stopLossTooltip"):n("takeProfitTooltip"),onChange:a,onPercentageChange:o,percentage:c,isActive:!u,onReset:E,usd:i,fromToken:y,toToken:g,prefix:"",isLoading:r||!t,isInverted:f,hide:v,onInvert:m}},oW=e=>{const{module:t,marketPrice:r}=ne(),n=Be(),{amountWei:s}=da(),a=Z(i=>i.state.isMarketOrder),o=Z(i=>i.state.typedSrcAmount);return M.useMemo(()=>{if(j(o||"0").isZero()||!s||!r)return;const i=dh(s,e,a,t),c=ph(s,e,a,t);if(i!=null&&i.isError)return{type:Mt.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:n("triggerLimitPriceError")||"",value:i.value};if(c!=null&&c.isError)return{type:Mt.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:n("triggerLimitPriceError")||"",value:c.value};if(e&&j(e||0).isZero())return{type:Mt.MISSING_LIMIT_PRICE,message:n("emptyLimitPrice")||"",value:e||""}},[e,n,s,t,a,o,r])},gc=()=>{const{dstToken:e,marketPrice:t,module:r}=ne(),n=Z(l=>l.updateState),s=ym(),a=Z(l=>l.state.limitPricePercent),o=a===void 0?s:a,i=r5({typedValue:Z(l=>l.state.typedLimitPrice),percentage:o,tokenDecimals:e==null?void 0:e.decimals,initialPrice:t,setValue:M.useCallback(l=>n({typedLimitPrice:l}),[n]),setPercentage:M.useCallback(l=>{n({limitPricePercent:l})},[n,r])}),c=oW(i.amountWei);return M.useMemo(()=>({...i,error:c}),[i,c])},iW=()=>{const{module:e}=ne(),t=Z(i=>i.updateState),r=Z(i=>i.state.isMarketOrder),n=ym(),s=Z(i=>i.state.triggerPricePercent)||0,a=e===ge.LIMIT,o=M.useCallback(()=>{!r&&e===ge.STOP_LOSS&&t({limitPricePercent:n}),t({isMarketOrder:!r})},[t,s,e,r,n]);return{isLimitPrice:!r,toggleLimitPrice:o,hide:a}},cW=()=>{const{module:e,marketPriceLoading:t}=ne(),r=Be(),{amountUI:n,onChange:s,onPercentageChange:a,usd:o,selectedPercentage:i,error:c}=gc(),l=Z(L=>L.state.isMarketOrder),u=Z(L=>L.updateState),d=ym(),{isLimitPrice:f,toggleLimitPrice:m}=iW(),{triggerPricePercent:y}=Z(L=>L.state),{isInverted:g,onInvert:E,fromToken:v,toToken:w}=Wu(),A=M.useMemo(()=>{if(!(e!==ge.STOP_LOSS&&e!==ge.TAKE_PROFIT||!l))return{text:r("triggerMarketPriceDisclaimer"),url:Fc}},[y,r,e,l]),C=M.useCallback(()=>{u({typedLimitPrice:void 0}),u({limitPricePercent:d})},[u,e,d]),D=M.useMemo(()=>e===ge.STOP_LOSS?r("stopLossLimitPriceTooltip"):r("limitPriceTooltip"),[r,e]);return{price:n,error:c,warning:A,label:r("limitPrice"),tooltip:D,onChange:s,onPercentageChange:a,onReset:C,usd:o,fromToken:v,toToken:w,percentage:i,isInverted:g,isLoading:t,isLimitPrice:f,toggleLimitPrice:m,onInvert:E}},n5=()=>{const{module:e,marketPrice:t}=ne(),r=gc().amountWei,n=da().amountWei,s=Z(a=>a.state.isMarketOrder);return e===ge.LIMIT||!s?r||"":e===ge.STOP_LOSS||e===ge.TAKE_PROFIT?n||"":t||""},xc=()=>{const{srcToken:e,dstToken:t}=ne(),r=n5(),n=un().amountWei,s=M.useMemo(()=>th(n||"",r,(e==null?void 0:e.decimals)||0),[n,r,e==null?void 0:e.decimals]);return{amountWei:s,amountUI:Vr(t==null?void 0:t.decimals,s)}},gm=()=>{const{srcToken:e,dstToken:t,dstUsd1Token:r}=ne(),n=n5(),s=$n().amountPerTradeWei,a=Z(c=>c.state.isMarketOrder),o=M.useMemo(()=>rh(s,n,!!a,(e==null?void 0:e.decimals)||0),[s,n,a,e==null?void 0:e.decimals]),i=Vr(t==null?void 0:t.decimals,o);return{amountWei:o,amountUI:i,usd:aa(i,r)}},s5=()=>{const{srcBalance:e,chainId:t}=ne(),r=Be(),n=un().amountWei;return M.useMemo(()=>{if(e&&j(n).gt(e))return{type:Mt.INSUFFICIENT_BALANCE,message:r("insufficientFunds"),value:e||""}},[e,n,r,t])};function a5(){const{marketPrice:e,marketPriceLoading:t}=ne(),r=Z(l=>l.state.typedSrcAmount),n=s5(),{error:s}=da(),{error:a}=gc(),{error:o}=$n(),{error:i}=ua(),{error:c}=bm();return M.useMemo(()=>{const l=Fo("ignore-errors");if(!(j(e||0).isZero()||j(r||0).isZero()||t||l))return s||a||o||i||c||n},[e,t,r,s,a,o,i,c,n])}const o5=(e,t)=>{const{marketPriceLoading:r,srcToken:n,dstToken:s,srcBalance:a,dstBalance:o}=ne(),i=Z(C=>C.state.typedSrcAmount),c=Z(C=>C.updateState),{srcUsd1Token:l,dstUsd1Token:u}=ne(),d=aa(i,l),f=aa(t,u),m=CG(),y=e?n:s,g=Vr(y==null?void 0:y.decimals,e?a:o),E=s5(),v=M.useCallback(C=>{e&&c({typedSrcAmount:C})},[c,e]),w=M.useCallback(()=>{e&&c({typedSrcAmount:Do(g,8)})},[c,e,g]),A=m||e?i:Do(t||"",8);return{balance:g,usd:e||m?d:f,value:A||"",valueWei:V2(y==null?void 0:y.decimals,A),onChange:v,onMax:w,isLoading:i?e?!1:r:!1,token:y,isInsufficientBalance:e?E:void 0}},lW=()=>o5(!0),uW=()=>{const e=xc().amountUI,t=Z(r=>r.state.typedSrcAmount);return o5(!1,t?e:"")},dW=()=>{const e=Z(t=>t.updateState);return{amount:Z(t=>t.state.typedSrcAmount)||"",reset:M.useCallback(()=>e({typedSrcAmount:""}),[e])}},pW=()=>{const e=Z(n=>n.state.isMarketOrder),t=Z(n=>n.updateState),r=M.useCallback(()=>{t({isMarketOrder:!e})},[t,e]);return{isMarketPrice:!e,togglePrice:r}},xm=()=>{const e=Z(r=>r.state.currentTime),t=bm().duration;return M.useMemo(()=>ih(e,t),[e,t])},fW=()=>{const{srcUsd1Token:e,dstUsd1Token:t}=ne(),r=un().amountUI,n=xc().amountUI,s=aa(r,e),a=aa(n,t);return{srcAmountUsd:s,dstAmountUsd:a}},mW=()=>{const{fees:e,dstUsd1Token:t}=ne(),{amountUI:r}=xc(),n=M.useMemo(()=>!e||!r?"":j(r).multipliedBy(e).dividedBy(100).toFixed(),[r,e]);return{amount:n,percent:e,usd:aa(n,t)}},i5=()=>{const{srcToken:e,dstToken:t,account:r,chainId:n,slippage:s,config:a}=ne(),{amountWei:o}=un(),{amountWei:i}=gc(),{amountPerTradeWei:c,totalTrades:l}=$n(),u=xm(),{amountWei:d}=gm(),{amountWei:f}=da(),{milliseconds:m}=ua();return M.useMemo(()=>{var y;return{srcToken:e,dstToken:t,limitPrice:i,deadline:u,srcAmount:o,srcAmountPerTrade:c,totalTrades:l,minDestAmountPerTrade:d,tradeInterval:m,triggerPricePerTrade:f,maker:r,rePermitData:xh({chainId:n,srcToken:Is((e==null?void 0:e.address)||"")?((y=Bs(n))==null?void 0:y.wToken.address)||"":(e==null?void 0:e.address)||"",dstToken:(t==null?void 0:t.address)||"",srcAmount:o,deadlineMillis:u,fillDelayMillis:!l||l===1?0:m,slippage:s*100,account:r,srcAmountPerTrade:c,dstMinAmountPerTrade:d,triggerAmountPerTrade:f,config:a})}},[e,t,i,u,o,c,l,d,f,r,m,s,n,a])},c5=()=>{const{srcToken:e,dstToken:t,account:r}=ne(),n=Be(),{amountUI:s,usd:a}=gm(),{amountPerTradeUI:o,amountPerTradeUsd:i,totalTrades:c}=$n(),{amountUI:l,usd:u}=da(),d=xm(),{amountUI:f,usd:m}=gc(),{amount:y,percent:g,usd:E}=mW(),{milliseconds:v}=ua(),{amountUI:w}=xc(),{srcAmountUsd:A,dstAmountUsd:C}=fW(),D=un().amountUI,L=Z(x=>x.state.isMarketOrder),T=K2({srcToken:e,dstToken:t,account:r,limitPrice:L?void 0:f,limitPriceUsd:L?void 0:m,deadline:d,tradeInterval:v,srcAmount:D,totalTrades:c,srcAmountPerTrade:o,srcAmountPerTradeUsd:i,minDestAmountPerTrade:s,minDestAmountPerTradeUsd:a,triggerPricePerTrade:l,triggerPricePerTradeUsd:u,srcUsd:A,dstUsd:C,dstAmount:w}),h=ze({value:y}),b=ze({value:E});return M.useMemo(()=>({...T,fees:{label:n("fees",{value:`${g}%`}),amount:h,usd:b||"",percentage:g}}),[T,h,b,g])},l5=M.createContext({}),hW=({children:e,...t})=>B.jsx(l5.Provider,{value:t,children:e}),bW=()=>M.useContext(l5),u5=()=>{var s,a;const e=Be(),{wrapTxHash:t,srcToken:r}=Z(o=>o.state.swapExecution),n=(a=(s=ac())==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},yW=(e=!1,t=1)=>{const{module:r}=ne(),n=Be();return M.useMemo(()=>r===ge.STOP_LOSS?n("stopLoss"):r===ge.TAKE_PROFIT?n("takeProfit"):n(e?"twapMarket":t===1?"limit":"twapLimit"),[n,r,e,t])},gW=({price:e,dstTokenSymbol:t,label:r,usd:n})=>B.jsxs(we.DetailRow,{title:r,children:[`${e||"-"} ${t||""}`,B.jsx(we.USD,{value:n})]}),d5=()=>{const e=Be(),t=Z(a=>a.state.isMarketOrder),r=Z(a=>a.state.swapExecution.status),{totalTrades:n}=$n(),s=yW(t,n);return r===mt.SUCCESS?e("createOrderActionSuccess",{name:s}):e("createOrderAction",{name:s})},xW=()=>{const e=Z(y=>y.state.swapExecution.srcToken),t=Be(),{step:r,wrapTxHash:n,approveTxHash:s}=Z(y=>y.state.swapExecution),a=ac(),o=R0(n),i=R0(n),c=R0(s),l=Z(y=>y.state.swapExecution.status),d=Is((e==null?void 0:e.address)||"")?(a==null?void 0:a.native.symbol)||"":(e==null?void 0:e.symbol)||"",f=a==null?void 0:a.wToken.symbol,m=d5();return M.useMemo(()=>r===Ds.WRAP?{title:t("wrapAction",{symbol:d}),footerLink:o,footerText:t(o?"viewOnExplorer":"proceedInWallet")}:r===Ds.APPROVE?{title:t("approveAction",{symbol:d}),footerLink:c,footerText:t(c?"viewOnExplorer":"proceedInWallet")}:{title:m,footerText:l===mt.LOADING?t("proceedInWallet"):void 0},[r,c,d,m,t,o,i,f,l])},wW=({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(u5,{})]});function vW({error:e}){const{components:t}=ne(),r=Be(),n=Z(o=>{var i;return(i=o.state.swapExecution)==null?void 0:i.wrapTxHash}),s=t.SubmitOrderErrorView,a=B.jsx(Qn.Failed,{error:B.jsx(wW,{error:e}),footerLink:Fc,footerText:r("viewOnExplorer")});return s?B.jsx(s,{wrapTxHash:n,error:e,children:a}):a}const EW=()=>{const{components:e}=ne(),t=Z(u=>u.state.swapExecution.srcToken),r=Z(u=>u.state.swapExecution.dstToken),{reviewDetails:n}=bW(),s=Be(),a=Z(u=>{var d;return!!((d=u.state.swapExecution)!=null&&d.status)}),o=c5(),i=e.USD,c=e.SubmitOrderMainView,l=B.jsxs(B.Fragment,{children:[B.jsx(Qn.Main,{fromTitle:s("from"),toTitle:s("to"),inUsd:i?B.jsx(i,{value:o.srcUsd,isLoading:!1}):`$${o.srcUsd}`,outUsd:i?B.jsx(i,{value:o.dstUsd,isLoading:!1}):`$${o.dstUsd}`}),!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.deadline.value,label:o.deadline.label,tooltip:o.deadline.tooltip||""}),B.jsx(we.TriggerPrice,{price:o.triggerPricePerTrade.value,dstToken:r,label:o.triggerPricePerTrade.label,tooltip:o.triggerPricePerTrade.tooltip||"",usd:o.triggerPricePerTrade.usd}),B.jsx(gW,{price:o.limitPrice.value,dstTokenSymbol:r==null?void 0:r.symbol,label:o.limitPrice.label,usd:o.limitPrice.usd}),B.jsx(we.MinDestAmount,{dstToken:r,dstMinAmountOut:o.minDestAmountPerTrade.value,label:o.minDestAmountPerTrade.label,tooltip:o.minDestAmountPerTrade.tooltip||"",usd:o.minDestAmountPerTrade.usd}),B.jsx(we.TradeSize,{tradeSize:o.sizePerTrade.value,trades:o.totalTrades.value,srcToken:t,label:o.sizePerTrade.label,tooltip:o.sizePerTrade.tooltip}),B.jsx(we.TradesAmount,{trades:o.totalTrades.value,label:o.totalTrades.label,tooltip:o.totalTrades.tooltip}),B.jsx(we.TradeInterval,{chunks:o.totalTrades.value,fillDelayMillis:o.tradeInterval.value,label:o.tradeInterval.label,tooltip:o.tradeInterval.tooltip}),B.jsx(we.Recipient,{}),o.fees.amount&&B.jsx(we.Fees,{fees:o.fees.amount,label:o.fees.label,usd:o.fees.usd,dstTokenSymbol:r==null?void 0:r.symbol})]})}),n]})]});return c?B.jsx(c,{children:l}):l},kW=e=>{const{status:t,stepIndex:r,totalSteps:n,parsedError:s}=Z(w=>w.state.swapExecution),{components:a}=ne(),o=a.Spinner,i=a.SuccessIcon,c=a.ErrorIcon,l=a.TokenLogo,{srcToken:u,dstToken:d}=ne(),f=un().amountUI,m=xc().amountUI,y=ze({value:f,decimalScale:2}),g=ze({value:m,decimalScale:2}),E=M.useMemo(()=>({symbol:u==null?void 0:u.symbol,logoUrl:u==null?void 0:u.logoUrl}),[u]),v=M.useMemo(()=>({symbol:d==null?void 0:d.symbol,logoUrl:d==null?void 0:d.logoUrl}),[d]);return B.jsx(hW,{...e,children:B.jsx(Qn,{inAmount:y,outAmount:g,swapStatus:t,totalSteps:n,currentStep:xW(),currentStepIndex:r,inToken:E,outToken:v,components:{SrcTokenLogo:l&&B.jsx(l,{token:u}),DstTokenLogo:l&&B.jsx(l,{token:d}),Failed:B.jsx(vW,{error:s}),Success:B.jsx(CW,{}),Main:B.jsx(EW,{}),Loader:o,SuccessIcon:i,FailedIcon:c}})})},CW=()=>{const e=d5(),{components:t}=ne(),r=Z(a=>a.state.swapExecution.orderId),n=t.SubmitOrderSuccessView,s=B.jsxs(B.Fragment,{children:[B.jsx(Qn.Success,{title:e}),B.jsx(u5,{})]});return n?B.jsx(n,{newOrderId:r,children:s}):s},TW=()=>{const{supportedChains:e}=ne();return M.useMemo(()=>e,[e])},SW=()=>{const{config:e}=ne();return M.useMemo(()=>({spender:e.repermit}),[e])},AW=()=>{var c;const{account:e,walletClient:t,overrides:r,refetchBalances:n,callbacks:s,chainId:a}=ne(),o=(c=ac())==null?void 0:c.wToken,i=$0();return gn({mutationFn:async({onHash:l,srcAmountWei:u})=>{var m,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;dt.onWrapRequest(),(m=s==null?void 0:s.onWrapRequest)==null||m.call(s),r!=null&&r.wrap?d=await r.wrap(BigInt(u)):d=await t.writeContract({abi:Um,functionName:"deposit",account:e,address:o.address,value:BigInt(u),chain:t.chain}),l==null||l(d);const f=await i(d);if(!f)throw new Error("failed to get transaction receipt");if(f.status==="reverted")throw new Error("failed to wrap token");return dt.onWrapSuccess(d),(y=s==null?void 0:s.onWrapSuccess)==null||y.call(s,{txHash:f.transactionHash,explorerUrl:_o(f.transactionHash,a),amount:bn(o.decimals,u)}),n==null||n(),f},onError:l=>{throw dt.onWrapError(l),l}})},PW=()=>{const{account:e,walletClient:t,chainId:r,callbacks:n}=ne(),s=i5().rePermitData,a=HG();return gn({mutationFn:async()=>{var y,g,E,v;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!r)throw new Error("missing chainId");const{order:o,domain:i,types:c,primaryType:l}=s;dt.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),dt.onSignOrderError(w),w}dt.onSignOrderSuccess(u),(E=n==null?void 0:n.onSignOrderSuccess)==null||E.call(n,u);const d=zL(u),f={v:q(d.v||0),r:d.r,s:d.s},m=await Ch(o,f);return(v=n==null?void 0:n.onOrderCreated)==null||v.call(n,m),a(m),m}})},p5=()=>{const{account:e,publicClient:t,config:r}=ne();return gn({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");console.log(r.repermit,"repermit");const a=await t.readContract({address:n,abi:xg,functionName:"allowance",args:[e,r.repermit]}).then(i=>i.toString()),o=j(a||"0").lt(j(s).toString());return{allowance:a,approvalRequired:o}}})},IW=()=>{const{account:e,walletClient:t,overrides:r,config:n,chainId:s,callbacks:a}=ne(),o=$0(),{mutateAsync:i}=p5();return gn({onError:c=>{dt.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),dt.onApproveRequest();let d;if(r!=null&&r.approveOrder?d=await r.approveOrder({tokenAddress:c.address,spenderAddress:n.repermit,amount:Ls}):d=await t.writeContract({abi:xg,functionName:"approve",account:e,address:c.address,args:[n.repermit,Ls],chain:t.chain}),!d)throw new Error("failed to approve token");l(d);const f=await o(d);if(!f)throw new Error("failed to get transaction receipt");if(f.status==="reverted")throw new Error("failed to approve token");let m=!1;for(let E=0;E<3;E++){const{approvalRequired:v}=await i({tokenAddress:c.address,srcAmountWei:u});if(!v){m=!0;break}E<2&&await new Promise(w=>setTimeout(w,3e3))}if(!m)throw new Error(`Insufficient ${c.symbol} allowance to perform the swap. Please approve the token first.`);return dt.onApproveSuccess(f.transactionHash),(g=a==null?void 0:a.onApproveSuccess)==null||g.call(a,{txHash:f.transactionHash,explorerUrl:_o(f.transactionHash,s),token:c,amount:bn(c.decimals,u)}),f}})},BW=()=>{const{account:e,chainId:t,srcToken:r,dstToken:n,module:s,slippage:a}=ne(),o=da(),i=un().amountWei,c=$n().amountPerTradeWei,l=xm(),u=ua().fillDelay,d=gm().amountWei,f=Z(m=>m.state.isMarketOrder);return gn({mutationFn:async()=>{dt.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:f||!1})}})};function FW(e){const t=e.message,r=t.match(/,\s*code\s*:\s*(\d+)/i);return{message:t.replace(/^error\s*:/i,"").replace(/,\s*code\s*:\s*\d+/i,"").trim()||"",code:r?Number(r[1]):0}}const UW=()=>{const{srcToken:e,dstToken:t,chainId:r,callbacks:n}=ne(),s=IW().mutateAsync,a=AW().mutateAsync,o=PW().mutateAsync,{mutateAsync:i}=p5(),c=Z(d=>d.updateSwapExecution),{amountWei:l}=un(),u=BW().mutate;return gn({mutationFn:async()=>{var f,m;const d=Is((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=l1(e,r);c({allowanceLoading:!0});const{approvalRequired:g}=await i({tokenAddress:y.address,srcAmountWei:l});let E=0,v=1;d&&v++,g&&v++,c({totalSteps:v,stepIndex:E,allowanceLoading:!1,status:mt.LOADING}),u(),d&&(c({step:Ds.WRAP}),await a({onHash:A=>c({wrapTxHash:A}),srcAmountWei:l}),E++,c({stepIndex:E})),g&&(c({step:Ds.APPROVE}),await s({token:y,onHash:A=>c({approveTxHash:A}),srcAmountWei:l}),E++,c({stepIndex:E})),c({step:Ds.CREATE});const w=await o();return c({status:mt.SUCCESS,orderId:w.id}),w}catch(y){if(Td(y))(f=n==null?void 0:n.onSubmitOrderRejected)==null||f.call(n),c({step:void 0,status:void 0,stepIndex:void 0,error:y});else{const g=FW(y);(m=n==null?void 0:n.onSubmitOrderFailed)==null||m.call(n,g),c({status:mt.FAILED,parsedError:g,error:y})}throw y}}})},OW=()=>{const{marketPrice:e,srcToken:t,dstToken:r}=ne(),n=UW(),s=Z(f=>f.updateState),{amountUI:a}=un(),o=Z(f=>f.resetState),i=Z(f=>f.state.swapExecution),c=M.useCallback(()=>{(i==null?void 0:i.status)===mt.SUCCESS&&(s({typedSrcAmount:""}),setTimeout(()=>{o()},1e3))},[i==null?void 0:i.status,o,s]),l=M.useCallback(()=>{(i==null?void 0:i.status)!==mt.LOADING&&s({acceptedSrcAmount:void 0,acceptedMarketPrice:void 0,swapExecution:{srcToken:t,dstToken:r}})},[s,t,r]),u=gn({mutationFn:async()=>(s({acceptedSrcAmount:a,acceptedMarketPrice:e}),await n.mutateAsync())}),d=M.useCallback(()=>u.mutateAsync(),[u]);return M.useMemo(()=>({reset:o,onCloseModal:c,onOpenModal:l,onSubmit:d,...i,isLoading:!!((i==null?void 0:i.status)===mt.LOADING||i!=null&&i.allowanceLoading),isSuccess:(i==null?void 0:i.status)===mt.SUCCESS,isFailed:(i==null?void 0:i.status)===mt.FAILED}),[o,c,d,i])},DW=()=>{const e=Be(),{marketPrice:t,srcToken:r,dstToken:n,marketPriceLoading:s,srcBalance:a,srcUsd1Token:o,noLiquidity:i}=ne(),c=s||j(o||"0").isZero()||a===void 0||j(t||"0").isZero(),l=Z(y=>y.state.typedSrcAmount),u=!!(r&&n&&l&&c),d=a5(),f=M.useMemo(()=>i?e("noLiquidity"):j(l||"0").isZero()?e("enterAmount"):(d==null?void 0:d.type)===Mt.INSUFFICIENT_BALANCE?e("insufficientFunds"):e("placeOrder"),[d,e,l,i]),m=!!(d||i||u||j(l||"0").isZero()||!r||!n);return M.useMemo(()=>({disabled:m,text:f,loading:u}),[m,f,u])};vh(Aw.version);const _W={SubmitOrderPanel:kW,Orders:YV};R.CRASH_ERROR_MESSAGE=ew,R.Components=_W,R.Configs=Dt,R.DEFAULT_DURATION_OPTIONS=ZL,R.DEFAULT_FILL_DELAY=Bc,R.DEFAULT_STOP_LOSS_LIMIT_PERCENTAGE=Xm,R.DEFAULT_STOP_LOSS_PERCENTAGE=Km,R.DEFAULT_TAKE_PROFIT_LIMIT_PERCENTAGE=Qm,R.DEFAULT_TAKE_PROFIT_PERCENTAGE=Zm,R.DISCLAIMER_URL=J5,R.EIP712_TYPES=Ym,R.ERC20_ABI=M5,R.EXCLUSIVITY_OVERRIDE_BPS=Y5,R.FEES=q5,R.IWETH_ABI=Um,R.InputErrors=Mt,R.LEGACY_EXCHANGES_MAP=Wm,R.MAX_ORDER_DURATION_MILLIS=Ca,R.MIN_CHUNKS=V5,R.MIN_FILL_DELAY_MILLIS=Ic,R.MIN_FILL_DELAY_MINUTES=Hm,R.MIN_ORDER_DURATION_MILLIS=ad,R.Module=ge,R.ORBS_LOGO=Z5,R.ORBS_LOGO_FALLBACK=X5,R.ORBS_SLTP_FAQ_URL=K5,R.ORBS_TWAP_FAQ_URL=Fc,R.ORBS_WEBSITE_URL=Q5,R.OrderStatus=lt,R.OrderType=ut,R.PRICE_PROTECTION_SETTINGS=XL,R.Partners=_m,R.QUERY_PARAMS=Uc,R.REPERMIT_ABI=Om,R.REPERMIT_PRIMARY_TYPE=qm,R.SUGGEST_CHUNK_VALUE=j5,R.SpotProvider=YL,R.Steps=Ds,R.SwapStatus=mt,R.THE_GRAPH_ORDERS_API=Gm,R.TWAP_ABI=Dm,R.TimeUnit=Gt,R.amountBN=Pc,R.amountUi=bn,R.analytics=dt,R.buildRePermitOrderData=xh,R.copy=D3,R.ensureWrappedToken=l1,R.eqIgnoreCase=Ps,R.fillDelayText=o1,R.formatDecimals=Do,R.getAccountOrders=Ph,R.getApiEndpoint=sd,R.getChunks=ah,R.getConfig=cd,R.getDeadline=ih,R.getDestTokenAmount=th,R.getDestTokenMinAmountPerChunk=rh,R.getDuration=sh,R.getEstimatedDelayBetweenChunksMillis=id,R.getExplorerUrl=_o,R.getMaxChunksError=yh,R.getMaxFillDelayError=ow,R.getMaxOrderDurationError=fh,R.getMaxPossibleChunks=oh,R.getMinFillDelayError=hh,R.getMinNativeBalance=M3,R.getMinOrderDurationError=mh,R.getMinTradeSizeError=bh,R.getMinimumDelayMinutes=aw,R.getNetwork=Bs,R.getOrderExcecutionRate=i1,R.getOrderFillDelayMillis=td,R.getOrderLimitPriceRate=c1,R.getOrderType=N3,R.getPartnerChains=zm,R.getPartnerIdentifier=_t,R.getPartners=gh,R.getQueryParam=Fo,R.getSrcTokenChunkAmount=ch,R.getStopLossLimitPriceError=dh,R.getStopLossPriceError=lh,R.getTakeProfitLimitPriceError=ph,R.getTakeProfitPriceError=uh,R.getTriggerPricePerChunk=nh,R.isNativeAddress=Is,R.isTxRejected=Td,R.makeElipsisAddress=Cd,R.maxUint256=W5,R.millisToDays=u1,R.millisToMinutes=Sd,R.nativeTokenAddresses=Vm,R.networks=Ft,R.parseError=_3,R.removeCommas=O3,R.setApiMode=G5,R.setUIVersion=vh,R.shouldUnwrapOnly=Pd,R.shouldWrapOnly=Ad,R.submitOrder=Ch,R.useAddresses=SW,R.useDisclaimerPanel=tW,R.useDstTokenPanel=uW,R.useDurationPanel=eW,R.useFillDelayPanel=ZV,R.useFormatNumber=ze,R.useInputErrors=a5,R.useInvertTradePanel=Wu,R.useLimitPricePanel=cW,R.useOrder=i5,R.useOrderHistoryPanel=WG,R.useOrderInfo=c5,R.usePartnerChains=TW,R.useSrcTokenPanel=lW,R.useSubmitOrderButton=DW,R.useSubmitOrderPanel=OW,R.useTogglePricePanel=pW,R.useTradesPanel=QV,R.useTranslations=Be,R.useTriggerPricePanel=aW,R.useTypedSrcAmount=dW,R.zeroAddress=jm,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})}));
|