(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[1474],{251474(__unused_webpack_module,__webpack_exports__,__webpack_require__){(function(){if(!this.ST)return()=>{};with(this.ST)with(this.RH)with(this.G)return function(){"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>o});var e=__webpack_require__(303280);__webpack_require__.n(e);var t=__webpack_require__(860012);var r=__webpack_require__(521476);var l=__webpack_require__.n(r);var n=__webpack_require__(48084);var a=__webpack_require__(365337);var u=__webpack_require__(657218);var s=__webpack_require__(880909);var i=__webpack_require__(683683);var c=__webpack_require__(509289);function o(r){let o=(0,e.c)(30);let{tokens:h,address:m,includeFailedTokens:f,hideZeroBalanceTokens:v}=r;let b=f===undefined?!1:f;let g=v===undefined?!1:v;let{chainId:_,rpcUrl:p}=(0,n.d4)(u.Iv);let{address:S}=(0,n.d4)(a._,n.bN);let T=m??S;let k;o[0]!==h?.length?(k=()=>h?.length>=0,o[0]=h?.length,o[1]=k):k=o[1];let[w,y]=(0,t.useState)(k);let C;o[2]===Symbol.for("react.memo_cache_sentinel")?(C=[],o[2]=C):C=o[2];let[E,R]=(0,t.useState)(C);let[A,L]=(0,t.useState)(null);let B=(0,t.useRef)(null);let H=(0,c.S)(h);let I;o[3]!==g||o[4]!==H?(I=e=>{R((g?e.filter(d):e).map(e=>{let t=H.find(t=>(0,i.y)(t.address,e.address));return{...e,isERC721:t?.isERC721,image:t?.image}})),y(!1),L(null)},o[3]=g,o[4]=H,o[5]=I):I=o[5];let N=I;let P;o[6]===Symbol.for("react.memo_cache_sentinel")?(P=e=>{L(e),y(!1)},o[6]=P):P=o[6];let Z=P;let $;o[7]===Symbol.for("react.memo_cache_sentinel")?($=()=>{B.current&&(B.current.stop(),B.current.removeAllListeners("update"),B.current.removeAllListeners("error"),B.current=null)},o[7]=$):$=o[7];let D=$;let F;o[8]!==b||o[9]!==N?(F=(e,t)=>{D(),B.current=new(l())({userAddress:e,provider:globalThis.ethereumProvider,tokens:t,includeFailedTokens:b,pollingInterval:s.Z2*8,balanceDecimals:5}),B.current.on("update",N),B.current.on("error",Z),B.current.updateBalances()},o[8]=b,o[9]=N,o[10]=F):F=o[10];let G=F;let M;let j;o[11]===Symbol.for("react.memo_cache_sentinel")?(j=()=>D,M=[D],o[11]=M,o[12]=j):(M=o[11],j=o[12]),(0,t.useEffect)(j,M);let q;o[13]!==G||o[14]!==_||o[15]!==H||o[16]!==N||o[17]!==T?(q=()=>{if(y(!0),!T||_===undefined||!globalThis.ethereumProvider){D();return}H.length===0&&N([]),G(T,H)},o[13]=G,o[14]=_,o[15]=H,o[16]=N,o[17]=T,o[18]=q):q=o[18];let x;o[19]!==G||o[20]!==_||o[21]!==H||o[22]!==p||o[23]!==N||o[24]!==T?(x=[T,D,_,p,H,N,G],o[19]=G,o[20]=_,o[21]=H,o[22]=p,o[23]=N,o[24]=T,o[25]=x):x=o[25],(0,t.useEffect)(q,x);let z;return o[26]!==A||o[27]!==w||o[28]!==E?(z={loading:w,tokensWithBalances:E,error:A},o[26]=A,o[27]=w,o[28]=E,o[29]=z):z=o[29],z}function d(e){return Number(e.balance)>0}}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()}}]);