1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="946829fa-88d9-4076-ad5c-81f91615aabb",e._sentryDebugIdIdentifier="sentry-dbid-946829fa-88d9-4076-ad5c-81f91615aabb")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7102],{59605:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(350979),l=n(25963),i=n(680797),o=n(501823);let s=(0,i.I4)(o.A).withConfig({componentId:"sc-439ad811-0"})(["border-bottom:",";overflow-x:auto;padding:",";::-webkit-scrollbar{display:none;}-ms-overflow-style:none;scrollbar-width:none;"],e=>{let{isShowBorderBottom:t,theme:n}=e;return t?`2px solid ${n.colors.input}`:"none"},e=>{let{fullWidth:t}=e;return t?0:"16px 16px 0 16px"}),a=(0,i.I4)(o.A).withConfig({componentId:"sc-439ad811-1"})(["justify-content:space-between;& > button + button{margin-left:",";}& > button{flex-grow:",";}","{flex-grow:",";}flex-grow:",";"],e=>{let{gap:t}=e;return t||"4px"},e=>{let{fullWidth:t}=e;return+!!t},e=>{let{theme:t}=e;return t.mediaQueries.md},e=>{let{fullWidth:t}=e;return+!!t},e=>{let{fullWidth:t}=e;return+!!t}),d=e=>{let{activeIndex:t=0,onItemClick:n,children:i,fullWidth:o,gap:d,isColorInverse:c=!1,isShowBorderBottom:u=!0}=e;return(0,r.jsx)(s,{p:["0 4px","0 16px"],fullWidth:o,isShowBorderBottom:u,children:(0,r.jsx)(a,{fullWidth:o,gap:d,children:l.Children.map(i,(e,r)=>{let i=t===r;return(0,l.cloneElement)(e,{isActive:i,onClick:n?()=>n(r):void 0,color:c?i?"textSubtle":"backgroundAlt":i?"backgroundAlt":"textSubtle",backgroundColor:c?i?"input":"textSubtle":i?"textSubtle":"input"})})})})}},64595:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/token/[chain]/[address]",function(){return n(366455)}])},124696:(e,t,n)=>{"use strict";n.d(t,{Wk:()=>l,rx:()=>i,t8:()=>o});var r=n(985148);let l=(0,n(656862).tG)("pcs:rwa-geofence-confirmation",{},void 0,{getOnInit:!0}),i=(0,r.eU)({}),o=(0,r.eU)(e=>{let t=e(l),n=e(i);return e=>!!(t[e]||n[e])})},245009:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(350979),l=n(25963),i=n(680797),o=n(913688),s=n(619005);let a=i.I4.div.withConfig({componentId:"sc-740b37a2-0"})(["align-items:center;color:",";display:flex;justify-content:center;padding-left:4px;padding-right:4px;","{padding-left:8px;padding-right:8px;}","{padding-left:16px;padding-right:16px;}"],e=>{let{theme:t}=e;return t.colors.textDisabled},e=>{let{theme:t}=e;return t.mediaQueries.sm},e=>{let{theme:t}=e;return t.mediaQueries.md}),d=i.I4.ul.withConfig({componentId:"sc-740b37a2-1"})(["align-items:center;display:flex;flex-wrap:wrap;list-style-type:none;a{color:",";&:hover{color:",";}}",""],e=>{let{theme:t}=e;return t.colors.primary},e=>{let{theme:t}=e;return t.colors.primaryBright},o.xe),c=(0,r.jsx)(s.A,{color:"currentColor",width:"24px"}),u=(0,l.forwardRef)((e,t)=>{let n,{separator:i=c,children:o}=e,s=(n=l.Children.toArray(o).filter(e=>(0,l.isValidElement)(e)),n.reduce((e,t,n)=>(n>0&&e.push((0,r.jsx)(a,{"aria-hidden":!0,children:i},`separator-${n}`)),e.push(t),e),[]));return(0,r.jsx)(d,{ref:t,children:s.map((e,t)=>(0,r.jsx)("li",{children:e},`child-${t}`))})})},344601:(e,t,n)=>{"use strict";n.d(t,{e:()=>s});var r=n(64914),l=n(662928),i=n(25963);let o=async()=>{var e;let t=await fetch("/api/stocks/rwa-family-map");if(!t.ok)throw Error(`RWA family map fallback fetch failed: ${t.status}`);let n=await t.json(),l=new Map;for(let t of null!=(e=n.entries)?e:[])l.set(`${t.chainId}:${(0,r.Q)(t.address)}`,t.family);return l};function s(e){let{data:t,isLoading:n,isError:s}=(0,l.I)({queryKey:["rwa-family-map-fallback"],queryFn:o,enabled:e,staleTime:6e5,gcTime:6e5,refetchOnWindowFocus:!1,retry:1});return{resolve:(0,i.useCallback)((e,n)=>null==t?void 0:t.get(`${e}:${(0,r.Q)(n)}`),[t]),isLoading:n,isError:s}}},366455:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>nn});var r=n(350979),l=n(501823),i=n(554945),o=n(605641),s=n(769932),a=n(87242),d=n.n(a),c=n(326848),u=n(25963),p=n(805860),m=n(428089),x=n(796898),h=n(59605),f=n(756083),g=n(228876),y=n(2828),v=n(312680),b=n(282304),A=n(995315),j=n(557423),w=n(310085);let k=e=>{let{isOpen:t,onConfirm:n,onCancel:l}=e,{t:i}=(0,s.A)(),[a,d]=(0,u.useState)(!1),c=(0,u.useCallback)(()=>{n(a),d(!1)},[n,a]),p=(0,u.useCallback)(()=>{l(),d(!1)},[l]);return(0,r.jsx)(v.aF,{isOpen:t,closeOnOverlayClick:!1,onDismiss:p,children:(0,r.jsx)(b.Ay,{title:i("Restricted Jurisdiction Confirmation"),hideCloseButton:!0,maxWidth:"480px",children:(0,r.jsxs)(A.A,{flexDirection:"column",gap:"16px",children:[(0,r.jsx)(o.A,{color:"textSubtle",children:i("Tokenized stock products are not available to residents of certain
1jurisdictions. By clicking confirm, you represent that you are not located in, incorporated in, or accessing this service from a restricted jurisdiction.")}),(0,r.jsx)(j.A,{variant:"primary",width:"100%",onClick:c,children:i("Confirm")}),(0,r.jsx)(j.A,{variant:"primary60Outline",width:"100%",onClick:p,children:i("Cancel")}),(0,r.jsx)("label",{htmlFor:"rwa-geofence-dont-show-again-detail",style:{cursor:"pointer"},children:(0,r.jsxs)(A.A,{alignItems:"center",gap:"8px",children:[(0,r.jsx)(w.A,{id:"rwa-geofence-dont-show-again-detail",scale:"sm",checked:a,onChange:e=>d(e.target.checked)}),(0,r.jsx)(o.A,{small:!0,children:i("Don't show this again")})]})})]})})})};var I=n(537694),C=n(680797),S=n(814795),D=n(456194),U=n(659665),N=n(734658),L=n(899188),T=n(529208),F=n(928768),$=n(974134);let q=C.Ay.div.withConfig({componentId:"sc-c1136936-0"})(["display:flex;gap:12px;width:100%;"," & > button{white-space:nowrap;padding-left:12px;padding-right:12px;}"],e=>{let{$stack:t}=e;return t&&"flex-direction: column; align-items: stretch;"}),M=e=>{let{ctx:t,stack:n}=e,{t:l}=(0,s.A)(),i=(0,c.useRouter)(),{switchNetworkIfNecessary:o}=(0,$.Hk)(),a=L.RW[t.chainId],d=!!F.nn[t.chainId],p=(0,u.useCallback)(()=>{var e;let n=null!=(e=t.symbol)?e:t.address;i.push(`/liquidity/pools?network=${t.chainId}&search=${encodeURIComponent(n)}`)},[i,t.chainId,t.symbol,t.address]),m=(0,u.useCallback)(()=>{o(t.chainId).catch(()=>{});let e=new URLSearchParams({chainId:String(t.chainId),[T.hy]:"1"});t.address!==N.cF&&(e.set("outputCurrency",t.address),e.set("chainOut",a)),i.push(`/swap?${e.toString()}`)},[i,t.chainId,t.address,a,o]);return(0,r.jsxs)(q,{$stack:n,children:[(0,r.jsx)(j.A,{onClick:p,disabled:d,style:{flex:1},children:l("Add Liquidity")}),(0,r.jsx)(j.A,{variant:"primary60Outline",onClick:m,style:{flex:1},children:l("Swap")})]})};var R=n(898719),E=n(331281),B=n(733775),O=n(670420);let z=[O.is,O.pI,O.dM,O.d7,O.KB,O.vb],P=(e,t)=>e===g.Cb.SOLANA?`${e}:${t}`:`${e}:${t.toLowerCase()}`,H=z.map(e=>{let t=new Set;for(let n of Object.values(e))(null==n?void 0:n.address)&&t.add(P(n.chainId,n.address));return t}),V=C.Ay.div.withConfig({componentId:"sc-96e27293-0"})(["background:",";border-radius:24px;border:1px solid ",";padding:24px;display:flex;flex-direction:column;gap:16px;"],e=>{let{theme:t}=e;return t.colors.backgroundAlt},e=>{let{theme:t}=e;return t.colors.cardBorder}),W=(0,C.Ay)(o.A).withConfig({componentId:"sc-96e27293-1"})(["font-size:12px;font-weight:600;letter-spacing:0.06em;text-transform:uppercase;color:",";"],e=>{let{theme:t}=e;return t.colors.textSubtle}),_=(0,C.Ay)(l.A).withConfig({componentId:"sc-96e27293-2"})(["align-items:center;justify-content:space-between;gap:12px;"]),G=C.Ay.div.withConfig({componentId:"sc-96e27293-3"})(["display:flex;align-items:center;justify-content:center;margin:8px auto 4px;color:",";"],e=>{let{theme:t}=e;return t.colors.primary}),K=e=>{let t=parseFloat(e);return Number.isFinite(t)?0===t?"0":t<1e-6?"<0.000001":t.toLocaleString(void 0,{maximumFractionDigits:6}):"â"},Y=e=>({chainId:e.chainId,address:e.token.address,isNative:"0x0000000000000000000000000000000000000000"===e.token.address,isToken:"0x0000000000000000000000000000000000000000"!==e.token.address,decimals:e.token.decimals,symbol:e.token.symbol,name:e.token.name,logoURI:e.token.logoURI}),Q=e=>{var t,n;let{ctx:a}=e,{t:d}=(0,s.A)(),{balances:c,isLoading:p}=(0,E.G3)(),m=function(e,t){let n=P(e,t);return H.find(e=>e.has(n))}(a.chainId,a.address),x=null==(t=a.symbol)?void 0:t.toLowerCase(),{current:h,others:f}=(0,u.useMemo)(()=>{let e,t=e=>e.chainId===a.chainId&&(a.chainId===g.Cb.SOLANA?e.token.address===a.address:(0,B.ho)(e.token.address,a.address)||a.isNative&&"0x0000000000000000000000000000000000000000"===e.token.address),n=c.filter(e=>{var n,r,l;if(!(m?(r=e.chainId,l=e.token.address,m.has(P(r,l))):!!x&&(null==(n=e.token.symbol)?void 0:n.toLowerCase())===x)&&!t(e))return!1;let i=parseFloat(e.quantity);return Number.isFinite(i)&&i>0}),r=[];return n.forEach(n=>{t(n)?e=n:n.chainId!==a.chainId&&r.push(n)}),r.sort((e,t)=>{var n,r,l,i;return(null!=(l=null==(n=t.price)?void 0:n.totalUsd)?l:0)-(null!=(i=null==(r=e.price)?void 0:r.totalUsd)?i:0)}),{current:e,others:r}},[c,m,x,a.chainId,a.address,a.isNative]),y=h||f.length>0;return(0,r.jsxs)(V,{children:[(0,r.jsxs)(l.A,{flexDirection:"column",style:{gap:8},children:[(0,r.jsx)(W,{children:d("Your balance")}),p&&!y?(0,r.jsx)(l.A,{height:"40px",alignItems:"center",justifyContent:"center",children:(0,r.jsx)(i.A,{size:24})}):h?(0,r.jsxs)(_,{children:[(0,r.jsxs)(A.A,{alignItems:"center",gap:"12px",children:[(0,r.jsx)(R.Z,{showChainLogo:!0,currency:Y(h),size:"40px"}),(0,r.jsx)(o.A,{bold:!0,fontSize:"20px",children:(null==(n=h.price)?void 0:n.totalUsd)!=null?`$${(0,D.e)(h.price.totalUsd)}`:"â"})]}),(0,r.jsx)(o.A,{color:"textSubtle",children:K(h.quantity)})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(_,{children:[(0,r.jsxs)(A.A,{alignItems:"center",gap:"12px",children:[(0,r.jsx)(R.Z,{showChainLogo:!0,currency:a.currencyForLogo,size:"40px"}),(0,r.jsx)(o.A,{bold:!0,fontSize:"20px",children:"$0"})]}),(0,r.jsx)(o.A,{color:"textSubtle",children:"0"})]}),(0,r.jsx)(G,{children:(0,r.jsxs)("svg",{width:"80",height:"64",viewBox:"0 0 80 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M8 24h64v32a4 4 0 0 1-4 4H12a4 4 0 0 1-4-4V24Z",fill:"currentColor",opacity:".18"}
1),(0,r.jsx)("path",{d:"M4 16h72v12H4z",fill:"currentColor",opacity:".35"}),(0,r.jsx)("path",{d:"M36 16h8v44h-8z",fill:"currentColor",opacity:".55"}),(0,r.jsx)("path",{d:"M40 16c-6 0-10-3.5-10-8s3-6 6-6c5 0 7 4 8 14h-4Zm0 0c6 0 10-3.5 10-8s-3-6-6-6c-5 0-7 4-8 14h4Z",stroke:"currentColor",strokeWidth:"2",fill:"none"})]})}),(0,r.jsx)(o.A,{bold:!0,textAlign:"center",children:d("No balance yet")}),(0,r.jsx)(o.A,{color:"textSubtle",fontSize:"12px",textAlign:"center",children:d("Swap or receive this token to get started")})]})]}),f.length>0&&(0,r.jsxs)(l.A,{flexDirection:"column",style:{gap:8},children:[(0,r.jsx)(W,{children:d("Other networks")}),f.map(e=>{var t;return(0,r.jsxs)(_,{children:[(0,r.jsxs)(A.A,{alignItems:"center",gap:"12px",children:[(0,r.jsx)(R.Z,{showChainLogo:!0,currency:Y(e),size:"32px"}),(0,r.jsx)(o.A,{bold:!0,fontSize:"16px",children:(null==(t=e.price)?void 0:t.totalUsd)!=null?`$${(0,D.e)(e.price.totalUsd)}`:"â"})]}),(0,r.jsx)(o.A,{color:"textSubtle",children:K(e.quantity)})]},`${e.chainId}-${e.token.address}`)})]})]})};var X=n(245009),Z=n(905470);let J=e=>{let{symbol:t}=e,{t:n}=(0,s.A)();return t?(0,r.jsx)(l.A,{justifyContent:"space-between",children:(0,r.jsxs)(X.A,{mb:"32px",children:[(0,r.jsx)(Z.Y,{to:"/liquidity/pools",children:(0,r.jsx)(o.A,{color:"primary60",children:n("Farms")})}),(0,r.jsx)(l.A,{children:(0,r.jsx)(o.A,{mr:"8px",children:t})})]})}):null};var ee=n(812297),et=n(819324),en=n(450253),er=n.n(en),el=n(405213),ei=n(774900),eo=n(662928);let es="So11111111111111111111111111111111111111112";function ea(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{enabled:n=!0}=t;return(0,eo.I)({queryKey:["solanaTokenPools",e],queryFn:async t=>{var n,r;let{signal:l}=t;return e&&null!=(r=null==(n=(await ei.pg.GET("/cached/v1/pools/info/mint",{signal:l,params:{query:{token0:e,poolType:"all",sortType:"desc",sortField:"tvl",pageSize:100,page:1}}})).data)?void 0:n.data)?r:[]},enabled:n&&!!e,staleTime:6e4,retry:1})}let ed="https://sol-explorer.pancakeswap.com/api",ec={"1D":"15m","1W":"1H","1M":"4H","1Y":"1D"},eu={"1D":86400,"1W":604800,"1M":2592e3,"1Y":31536e3},ep=["1D","1W","1M","1Y"],em={"1D":"D","1W":"W","1M":"M","1Y":"Y"},ex=["v2","v3","stable","infinityCl","infinityBin"],eh=d()(()=>Promise.all([n.e(1478),n.e(1930)]).then(n.bind(n,621930)),{loadableGenerated:{webpack:()=>[621930]},ssr:!1}),ef=d()(()=>Promise.all([n.e(1478),n.e(5497)]).then(n.bind(n,525497)),{loadableGenerated:{webpack:()=>[525497]},ssr:!1}),eg=d()(()=>Promise.all([n.e(1478),n.e(9562)]).then(n.bind(n,989562)),{loadableGenerated:{webpack:()=>[989562]},ssr:!1}),ey=C.Ay.div.withConfig({componentId:"sc-3283eb9-0"})(["background:",";border-radius:24px;border:1px solid ",";display:flex;flex-direction:column;overflow:hidden;"],e=>{let{theme:t}=e;return t.colors.backgroundAlt},e=>{let{theme:t}=e;return t.colors.cardBorder}),ev=C.Ay.div.withConfig({componentId:"sc-3283eb9-1"})(["height:320px;width:100%;display:flex;flex-shrink:0;"]),eb=(0,C.Ay)(j.A).attrs({variant:"text"}).withConfig({componentId:"sc-3283eb9-2"})(["background:transparent;border:none;padding:4px 0;cursor:pointer;font-size:14px;font-weight:600;color:",";&:hover{color:",";}"],e=>{let{theme:t,$active:n}=e;return n?t.colors.secondary:t.colors.textSubtle},e=>{let{theme:t}=e;return t.colors.secondary}),eA=(0,C.Ay)(l.A).withConfig({componentId:"sc-3283eb9-3"})(["gap:24px;flex-wrap:wrap;align-items:center;"]),ej=C.Ay.div.withConfig({componentId:"sc-3283eb9-4"})(["height:1px;margin:12px 0;background:",";"],e=>{let{theme:t}=e;return t.colors.cardBorder}),ew=C.Ay.div.withConfig({componentId:"sc-3283eb9-5"})(["@media (max-width:967px){width:100%;& > div{width:100%;}& > div > button{flex:1 1 0;}}"]),ek=[{key:"price",labelKey:"Price"},{key:"tvl",labelKey:"TVL"},{key:"volume",labelKey:"Volume"}],eI=e=>{let{data:t,period:n,onPeriodChange:a,priceLabel:d,hiddenTabs:c}=e,{t:p}=(0,s.A)(),{isMobile:m,isTablet:h}=(0,x.A)(),f=m||h,g=(0,u.useMemo)(()=>ek.filter(e=>!(null==c?void 0:c.includes(e.key))),[c]),[y,v]=(0,u.useState)(()=>{var e,t;return null!=(t=null==(e=g[0])?void 0:e.key)?t:"tvl"});(0,u.useEffect)(()=>
1{if(!g.some(e=>e.key===y)){var e,t;v(null!=(t=null==(e=g[0])?void 0:e.key)?t:"tvl")}},[g,y]);let[b,j]=(0,u.useState)(),[w,k]=(0,u.useState)();(0,u.useEffect)(()=>{j(void 0),k(void 0)},[y,n]);let I=ep.indexOf(n),{isLoading:C}=(0,u.useMemo)(()=>"price"===y?t.price:"tvl"===y?t.tvl:t.volume,[y,t]),S="price"===y&&0===t.price.points.length||"tvl"===y&&0===t.tvl.points.length||"volume"===y&&0===t.volume.points.length,U=(0,u.useMemo)(()=>{var e,n;if(null!=b&&Number.isFinite(b))return`$${(0,D.e)(b)}`;if("price"===y)return d;if("tvl"===y){let e=null==(n=t.tvl.points[t.tvl.points.length-1])?void 0:n.value;return null!=e?`$${(0,D.e)(e)}`:"â"}let r=null==(e=t.volume.points[t.volume.points.length-1])?void 0:e.value;return null!=r?`$${(0,D.e)(r)}`:"â"},[b,y,d,t.tvl.points,t.volume.points]),N=(0,u.useMemo)(()=>{if(w)return w;let e=e=>er()(e).format("MMM D, YYYY h:mm A [(UTC)]");if("price"===y){let n=t.price.points[t.price.points.length-1];return n?e(1e3*n.time):""}if("tvl"===y){let n=t.tvl.points[t.tvl.points.length-1];return n?e(n.time.getTime()):""}let n=t.volume.points[t.volume.points.length-1];return n?e(n.time.getTime()):""},[w,y,t.price.points,t.tvl.points,t.volume.points]);return(0,r.jsxs)(ey,{children:[(0,r.jsxs)(A.A,{justifyContent:"space-between",alignItems:f?"flex-start":"center",flexDirection:f?"column":"row",gap:"16px",padding:"12px 24px 0",children:[(0,r.jsx)(eA,{children:g.map(e=>{let{key:t,labelKey:n}=e;return(0,r.jsx)(eb,{$active:y===t,onClick:()=>v(t),type:"button",children:p(n)},t)})}),(0,r.jsx)(ew,{children:(0,r.jsx)(ee.A,{scale:"sm",variant:"subtle",activeIndex:I<0?0:I,onItemClick:e=>a(ep[e]),children:ep.map(e=>(0,r.jsx)(et.A,{children:em[e]},e))})})]}),(0,r.jsx)(ej,{}),(0,r.jsxs)(A.A,{flexDirection:"column",gap:"4px",padding:"6px 24px",children:[(0,r.jsx)(o.A,{bold:!0,fontSize:"32px",lineHeight:"1.1",children:U}),(0,r.jsx)(o.A,{color:"textSubtle",fontSize:"12px",style:{minHeight:18},children:N})]}),(0,r.jsx)(ev,{children:C&&S?(0,r.jsx)(l.A,{flex:"1",alignItems:"center",justifyContent:"center",children:(0,r.jsx)(i.A,{})}):S?(0,r.jsx)(l.A,{flex:"1",alignItems:"center",justifyContent:"center",children:(0,r.jsx)(o.A,{color:"textSubtle",children:p("Chart data unavailable")})}):"price"===y?(0,r.jsx)(eh,{data:t.price.points,setValue:j,setLabel:k,hideTimeAxis:!0}):"tvl"===y?(0,r.jsx)(ef,{data:t.tvl.points,setHoverValue:j,setHoverDate:k,hideTimeAxis:!0}):(0,r.jsx)(eg,{data:t.volume.points,setHoverValue:j,setHoverDate:k,hideTimeAxis:!0})})]})};var eC=n(838649),eS=n(253286),eD=n(546061),eU=n(179087),eN=n(721665),eL=n(796764),eT=n(70619),eF=n(350682),e$=n(600977),eq=n(522357),eM=n(311560),eR=n(659197),eE=n(793058),eB=n(972916),eO=n(727353),ez=n(658064),eP=n(295485),eH=n(477796),eV=n.n(eH);let eW=[{label:"All",value:null},{label:"Infinity",value:eP.d},{label:"V3",value:eR.Zs.V3},{label:"V2",value:eR.Zs.V2},{label:"StableSwap",value:[eR.Zs.STABLE]}],e_=(0,C.Ay)(l.A).withConfig({componentId:"sc-182985e6-0"})(["gap:12px;align-items:center;flex-direction:column;align-items:stretch;& > *{width:100%;min-width:0;}& > .protocol-cell{justify-content:flex-start;}@media (min-width:968px){flex-direction:row;flex-wrap:wrap;align-items:center;& > .search-cell{flex:1 1 0;width:auto;
1min-width:200px;}& > .protocol-cell{flex:1 1 0;width:auto;min-width:0;justify-content:flex-end;}}"]),eG=e=>{var t;let{value:n,onChange:i}=e,{t:o}=(0,s.A)(),{isMobile:a,isTablet:d}=(0,x.A)(),c=a||d,p=(0,u.useCallback)(e=>i({selectedProtocolIndex:e}),[i]),[m,h]=(0,u.useState)(null!=(t=n.search)?t:""),f=(0,u.useRef)(i);(0,u.useEffect)(()=>{f.current=i},[i]);let g=(0,u.useRef)(eV()(e=>{f.current({search:e})},300)),y=(0,u.useCallback)(e=>{h(e.target.value),g.current(e.target.value)},[]);(0,u.useEffect)(()=>{var e,t;(null!=(e=n.search)?e:"")!==m&&h(null!=(t=n.search)?t:"")},[n.search]),(0,u.useEffect)(()=>{let e=g.current;return()=>e.cancel()},[]);let v=(0,u.useMemo)(()=>eW.map(e=>({...e,label:"StableSwap"===e.label?c?o("SS"):o("StableSwap"):"All"===e.label?o("All"):e.label})),[c,o]);return(0,r.jsxs)(e_,{children:[(0,r.jsx)(l.A,{className:"search-cell",alignItems:"center",children:(0,r.jsx)(eE.A,{startIcon:(0,r.jsx)(eB.A,{color:"textSubtle"}),children:(0,r.jsx)(eO.A,{placeholder:o("Search by token symbol, name, or address"),value:m,onChange:y})})}),(0,r.jsx)(l.A,{className:"protocol-cell",alignSelf:"flex-start",children:(0,r.jsx)(ez.Q,{data:v,activeIndex:n.selectedProtocolIndex,onChange:p})})]})};var eK=n(990296),eY=n(44922),eQ=n(350375);function eX(e){var t,n;if(null==e.vol24hUsd)return;let r=Number(e.vol24hUsd),l=Number(null!=(t=e.feeTier)?t:0),i=Number(null!=(n=e.feeTierBase)?n:1e6);if(Number.isFinite(r)&&Number.isFinite(l)&&!(i<=0)&&!(l<0))return l/i*r}let eZ=C.Ay.div.withConfig({componentId:"sc-2efad0b4-0"})(["background:",";border-radius:24px;border:1px solid ",";display:flex;flex-direction:column;overflow:hidden;"],e=>{let{theme:t}=e;return t.colors.backgroundAlt},e=>{let{theme:t}=e;return t.colors.cardBorder}),eJ=(0,C.Ay)(l.A).withConfig({componentId:"sc-2efad0b4-1"})(["padding:32px 24px;justify-content:center;color:",";"],e=>{let{theme:t}=e;return t.colors.textSubtle}),e0=C.Ay.div.withConfig({componentId:"sc-2efad0b4-2"})(["display:grid;grid-template-columns:2fr 1fr 1fr 1fr 1fr;gap:12px;padding:16px 24px;font-size:12px;font-weight:600;letter-spacing:0.06em;text-transform:uppercase;color:",";border-bottom:1px solid ",";@media (max-width:720px){grid-template-columns:2fr 1fr 1fr;& > .hide-sm{display:none;}}"],e=>{let{theme:t}=e;return t.colors.secondary},e=>{let{theme:t}=e;return t.colors.cardBorder}),e1=C.Ay.span.withConfig({componentId:"sc-2efad0b4-3"})(["display:inline-flex;align-items:center;gap:4px;"]),e2=C.Ay.button.withConfig({componentId:"sc-2efad0b4-4"})(["all:unset;cursor:pointer;display:grid;grid-template-columns:2fr 1fr 1fr 1fr 1fr;gap:12px;padding:16px 24px;align-items:center;border-bottom:1px solid ",";&:hover{background:",";}&:last-child{border-bottom:none;}@media (max-width:720px){grid-template-columns:2fr 1fr 1fr;& > .hide-sm{display:none;}}"],e=>{let{theme:t}=e;return t.colors.cardBorder},e=>{let{theme:t}=e;return t.colors.tertiary}),e6=(0,C.Ay)(l.A).withConfig({componentId:"sc-2efad0b4-5"})(["align-items:center;gap:12px;"]),e4=(0,C.Ay)(l.A).withConfig({componentId:"sc-2efad0b4-6"})(["position:relative;width:48px;height:32px;& > img{width:32px;height:32px;border-radius:16px;background:",";}& > img:nth-child(2){margin-left:-10px;}"],e=>{let{theme:t}=e;return t.colors.background}),e8=C.Ay.span.withConfig({componentId:"sc-2efad0b4-7"})(["display:inline-block;padding:4px 8px;border-radius:8px;background:",";font-size:12px;font-weight:600;"],e=>{let{theme:t}=e;return t.colors.tertiary}),e7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=",e9=e=>{var t,n,r;return(null!=(n=null==(t=e.day)?void 0:t.volume)?n:0)*(null!=(r=e.feeRate)?r:0)},e3=e=>{var t;let{ctx:n}=e,{t:i}=(0,s.A)(),a=(0,c.useRouter)(),d=ea(n.isNative?es:n.address),p=null!=(t=d.data)?t:[],m=(0,u.useCallback)(e=>a.push((0,eN.Pe)(e)),[a]),[x,h]=(0,u.useState)(null),[f,g]=(0,u.useState)(eC.q.NULL),y=(0,u.useCallback)((e,t)=>{t===eC.q.NULL?(h(null),g(eC.q.NULL)):(h(e),g(t))},[]),v=e=>x===e?f:eC.q.NULL,b=(0,u.useMemo)(()=>{let e=p.filter(e=>e.tvl>0&&e.tvl<1e9),t=f===eC.q.ASC?1:-1,n=e=>"apr"===x?(e=>{var t;return(null==(t=e.day)?void 0:t.apr)!=null?100*e.day.apr:0})(e):"fees24h"===x?e9(e):e.tvl;return null==x||f===eC.q.NULL?[...e].sort((e,t)=>
1t.tvl-e.tvl):[...e].sort((e,r)=>(n(e)-n(r))*t)},[p,x,f]);return d.isLoading&&0===b.length?(0,r.jsx)(eZ,{children:(0,r.jsx)(l.A,{py:"24px",justifyContent:"center",children:(0,r.jsx)(eD.A,{})})}):0===b.length?(0,r.jsx)(eZ,{children:(0,r.jsx)(eJ,{children:i("No pools found for this token")})}):(0,r.jsxs)(eZ,{children:[(0,r.jsxs)(e0,{children:[(0,r.jsx)("span",{children:i("All Pools")}),(0,r.jsx)("span",{children:i("Fee Tier")}),(0,r.jsxs)(e1,{className:"hide-sm",children:[i("APR"),(0,r.jsx)(eC.c,{onlyDESC:!0,width:"14px",sortOrder:v("apr"),onSort:e=>y("apr",e)})]}),(0,r.jsxs)(e1,{children:[i("TVL"),(0,r.jsx)(eC.c,{onlyDESC:!0,width:"14px",sortOrder:v("tvl"),onSort:e=>y("tvl",e)})]}),(0,r.jsxs)(e1,{className:"hide-sm",children:[i("Fees 24H"),(0,r.jsx)(eC.c,{onlyDESC:!0,width:"14px",sortOrder:v("fees24h"),onSort:e=>y("fees24h",e)})]})]}),b.map(e=>{var t,n,s;let a=(null==(t=e.day)?void 0:t.apr)!=null?100*e.day.apr:void 0,d=e9(e);return(0,r.jsxs)(e2,{type:"button",onClick:()=>m(e.id),children:[(0,r.jsxs)(e6,{children:[(0,r.jsxs)(e4,{children:[(0,r.jsx)(e5,{mint:e.mintA}),(0,r.jsx)(e5,{mint:e.mintB})]}),(0,r.jsxs)(l.A,{flexDirection:"column",children:[(0,r.jsxs)(o.A,{bold:!0,children:[null!=(n=e.mintA.symbol)?n:"?"," / ",null!=(s=e.mintB.symbol)?s:"?"]}),(0,r.jsx)(o.A,{fontSize:"12px",color:"textSubtle",children:i("Concentrated")})]})]}),(0,r.jsx)(l.A,{alignItems:"center",children:(0,r.jsxs)(e8,{children:[(100*e.feeRate).toFixed(2),"%"]})}),(0,r.jsx)(l.A,{className:"hide-sm",alignItems:"center",children:null!=a&&Number.isFinite(a)?`${a.toFixed(2)}%`:"â"}),(0,r.jsxs)(l.A,{alignItems:"center",children:["$",(0,D.e)(e.tvl)]}),(0,r.jsx)(l.A,{className:"hide-sm",alignItems:"center",children:d>0?`$${(0,D.e)(d)}`:"â"})]},e.id)})]})},e5=e=>{var t,n;let{mint:l}=e;return(0,r.jsx)("img",{src:null!=(t=l.logoURI)?t:e7,alt:null!=(n=l.symbol)?n:"",onError:e=>{let t=e.currentTarget;t.src!==e7&&(t.src=e7)}})},te={sortBy:"",sortOrder:eC.q.NULL},tt=C.Ay.div.withConfig({componentId:"sc-e75a89f5-0"})(["background:",";border-radius:24px;border:1px solid ",";display:flex;flex-direction:column;"],e=>{let{theme:t}=e;return t.colors.backgroundAlt},e=>{let{theme:t}=e;return t.colors.cardBorder}),tn=C.Ay.div.withConfig({componentId:"sc-e75a89f5-1"})(["padding:16px 24px;"]),tr=C.Ay.div.withConfig({componentId:"sc-e75a89f5-2"})(["overflow:hidden;border-bottom-left-radius:24px;border-bottom-right-radius:24px;"]),tl=(0,C.Ay)(l.A).withConfig({componentId:"sc-e75a89f5-3"})(["padding:24px 0;justify-content:center;"]),ti=e=>{let{ctx:t}=e;return(0,U.FD)(t.chainId)?(0,r.jsx)(e3,{ctx:t}):(0,r.jsx)(eF.l,{children:(0,r.jsx)(to,{ctx:t})})},to=e=>{let{ctx:t}=e,{t:n}=(0,s.A)(),{isMobile:i,isTablet:o}=(0,x.A)(),a=(0,c.useRouter)(),[d,p]=(0,u.useState)({selectedProtocolIndex:0,search:""}),[m,h]=(0,u.useState)(te),f=(0,u.useCallback)(e=>p(t=>({...t,...e})),[]),g=(0,u.useCallback)(e=>{let{order:t,dataIndex:n}=e;t===eC.q.DESC||t===eC.q.ASC?h({sortBy:String(n),sortOrder:t}):h(te)},[]),y=(0,u.useMemo)(()=>(function(e){if(null==e||0===e)return[];let t=eW[e];return t?Array.isArray(t.value)?t.value:t.value?[t.value]:[]:[]})(d.selectedProtocolIndex),[d.selectedProtocolIndex]),v=(0,u.useMemo)(()=>{let e=t.address.toLowerCase();if(t.address===N.cF){var n,r;let l=null==(r=eM.xQ[t.chainId])||null==(n=r.address)?void 0:n.toLowerCase();return l?[e,l]:[e]}return[e]},[t.address,t.chainId]),b=d.search.trim().length>0,A=(0,u.useMemo)(()=>({chains:[t.chainId],protocols:y,tokens:v.map(e=>`${t.chainId}:${e}`),symbols:b?[d.search.trim()]:void 0,sortBy:b?"":m.sortBy,sortOrder:b?void 0:m.sortOrder}),[v,t.chainId,b,d.search,m.sortBy,m.sortOrder,y]),{pools:j,state:w,setPage:k,hasNextPage:I}=(0,e$.m)({enabled:!0,queries:A}),C=(0,u.useMemo)(()=>{let e=d.search.trim().toLowerCase();return j.filter(t=>{if(y.length>0&&!y.includes(t.protocol))return!1;let n=[t.token0,t.token1];return!!n.map(e=>{var t,n;return null!=(n=null==(t=e&&(0,eM.eG)(e))?void 0:t.toLowerCase())?n:""}).some(e=>v.includes(e))&&(!e||n.some(t=>{var n,r,l,i;let o=null!=(r=null==(n=t&&(0,eM.eG)(t))?void 0:n.toLowerCase())?r:"",s=(null!=(l=null==t?void 0:t.symbol)?l:"").toLowerCase(),a=(null!=(i=null==t?void 0:t.name)?i:"").toLowerCase();return s.includes(e)||a.includes(e)||o.includes(e)}))})},[j,d.search,v,y]),S=(0,u.useMemo)(()=>
1{if(m.sortOrder===eC.q.NULL||!m.sortBy)return C;let e=m.sortBy,t=m.sortOrder===eC.q.ASC?1:-1,n=t=>{var n,r,l,i,o,s,a,d,c;return"feeUSD24h"===e?null!=(n=eX(t))?n:0:"tvlUsd"===e?Number(null!=(r=t.tvlUsd)?r:0):"lpApr"===e?Number(null!=(a=null!=(s=t.lpApr)?s:null==(l=t.farm)?void 0:l.lpApr)?a:0)+Number(null!=(d=null==(o=t.farm)||null==(i=o.cakeApr)?void 0:i.value)?d:0):"vol24hUsd"===e?Number(null!=(c=t.vol24hUsd)?c:0):0};return[...C].sort((e,r)=>(n(e)-n(r))*t)},[C,m.sortBy,m.sortOrder]),D=(()=>{let{t:e}=(0,s.A)(),t=(0,x.A)(),n=(()=>{let{t:e}=(0,s.A)();return(0,u.useMemo)(()=>({title:e("Fees 24H"),dataIndex:"feeUSD24h",key:"fees",minWidth:"125px",render:(e,t)=>{let n=eX(t);return null!=n?(0,r.jsx)(eY.u,{value:n,showFullDigitsTooltip:!1}):(0,r.jsx)(eK.Ay,{width:60})}}),[e])})(),l=(0,eQ.Ke)(),i=(0,eQ.I_)(),o=(0,eQ.j_)(),a=(0,eQ.sY)(!1);return(0,u.useMemo)(()=>[{title:e("All Pools"),dataIndex:null,key:"name",minWidth:"210px",render:(e,t)=>(0,r.jsx)(eQ.bS,{data:t})},{...i,display:t.isXl||t.isXxl},{...o,sorter:!0},{...l,sorter:!0,display:t.isXl||t.isXxl},{...n,sorter:!0,display:t.isXl||t.isXxl||t.isLg},{...a,display:t.isXxl},{title:"",render:e=>(0,r.jsx)(eT.K5,{pool:e}),dataIndex:null,key:"action",clickable:!1}],[e,t,o,i,n,l,a])})(),U=(0,u.useCallback)(async e=>{let t=await (0,eN.VZ)(e);a.push(t)},[a]),L=(0,u.useCallback)(e=>{var t,n;let{farm:r}=e;return r?(0,eL.sc)(r):[e.chainId,e.protocol,null!=(n=null!=(t=e.lpAddress)?t:e.poolId)?n:""].join(":")},[]),{observerRef:T,isIntersecting:F}=(0,eU.BL)({threshold:.1});(0,u.useEffect)(()=>{F&&k(e=>e+1)},[F,k]);let $=w===eq.Bk.SEARCHING;(0,u.useEffect)(()=>{!$&&0===S.length&&I&&k(e=>e+1)},[$,S.length,I,k]);let q=0===S.length&&!$&&!I;return(0,r.jsxs)(tt,{children:[(0,r.jsx)(tn,{children:(0,r.jsx)(eG,{onChange:f,value:d})}),(0,r.jsxs)(tr,{children:[q?(0,r.jsx)(l.A,{justifyContent:"center",py:"24px",children:n("No pools found for this token")}):i||o?(0,r.jsx)(eT.uO,{data:S,onRowClick:U}):(0,r.jsx)(eS.Q,{getRowKey:L,columns:D,data:S,sortOrder:m.sortOrder,sortField:m.sortBy,onSort:g,onRowClick:U}),$&&(0,r.jsx)(tl,{children:(0,r.jsx)(eD.A,{})}),!$&&S.length>0&&(0,r.jsx)("div",{ref:T})]})]})};var ts=n(286844);let ta=(0,C.Ay)(A.A).withConfig({componentId:"sc-72fcb6bd-0"})(["display:flex;align-items:center;gap:24px;@media (max-width:967px){display:grid;grid-template-columns:1fr 1fr;gap:16px 24px;width:100%;align-items:start;& > hr,& > [class*='VerticalDivider']{display:none;}}"]),td=C.Ay.div.withConfig({componentId:"sc-72fcb6bd-1"})(["display:flex;flex-direction:column;gap:4px;min-width:0;"]),tc=(0,C.Ay)(o.A).attrs({bold:!0}).withConfig({componentId:"sc-72fcb6bd-2"})(["font-size:11px;letter-spacing:0.06em;text-transform:uppercase;color:",";@media (max-width:967px){color:",";}"],e=>{let{theme:t}=e;return t.colors.secondary},e=>{let{theme:t}=e;return t.colors.textSubtle}),tu=(0,C.Ay)(o.A).attrs({bold:!0}).withConfig({componentId:"sc-72fcb6bd-3"})(["font-size:18px;color:",";line-height:1.2;"],e=>{let{theme:t}=e;return t.colors.text}),tp=e=>{let{tvlUSD:t,fdv:n,volumeUSD24h:l,volumeUSD7d:i}=e,{t:o}=(0,s.A)(),{isMobile:a,isTablet:d}=(0,x.A)(),c=a||d,p=[{key:"tvl",label:o("TVL"),amount:t},{key:"fdv",label:o("FDV"),amount:n},{key:"vol24",label:o("24h Volume"),amount:l},{key:"vol7d",label:o("7d Volume"),amount:i}].filter(e=>null!=e.amount).map(e=>{let{key:t,label:n,amount:r}=e;return{key:t,label:n,value:`$${(0,D.e)(r)}`}}),m=c?["tvl","vol24","fdv","vol7d"].map(e=>p.find(t=>t.key===e)).filter(e=>null!=e):p;return 0===m.length?null:(0,r.jsx)(ta,{children:m.map((e,t)=>(0,r.jsxs)(u.Fragment,{children:[(0,r.jsxs)(td,{children:[(0,r.jsx)(tc,{children:e.label}),(0,r.jsx)(tu,{children:e.value})]},e.key),!c&&t!==m.length-1&&(0,r.jsx)(ts.G,{bg:"cardBorder",height:"100%"})]},e.key))})};var tm=n(334404),tx=n(785459),th=n(681711),tf=n(688724),tg=n(502774);let ty=C.Ay.div.withConfig({componentId:"sc-32d42751-0"})(["display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px;background:",";border-radius:24px;border:1px solid ",";flex-wrap:wrap;"],e=>{let{theme:t}=e;return t.colors.backgroundAlt},e=>{let{theme:t}=e;return t.colors.cardBorder}),tv=C.Ay.span.withConfig({componentId:"sc-32d42751-1"})(["display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;background:transparent;border:none;cursor:pointer;&:hover svg{fill:"," !important;}"],e=>{let{theme:t}=e;return t.colors.text}),tb=e=>{var t;let{ctx:n,topStats:i}=e,{t:a}=(0,s.A)(),d=(0,tg.i)(),{isMobile:c,isTablet:p}=(0,x.A)(),m=c||p,{toastSuccess:h}=(0,tm.d)(),f=!n.isNative&&!!n.address,g=f?d(n.address,"address",n.chainId):void 0,y=n.symbol?`https://x.com/search?q=%24${encodeURIComponent(n.symbol)}`:void 0,v=(0,u.useCallback)(()=>{var e;f&&(null==(e=navigator.clipboard)||e.writeText(n.address).then(()=>{h(a("Copied!"))}))},[f,n.address,h,a]);return(0,r.jsxs)(ty,{children:[(0,r.jsxs)(A.A,{alignItems:"center",gap:"12px",minWidth:0,children:[(0,r.jsx)(R.Z,{showChainLogo:!0,currency:n.currencyForLogo,size:m?"32px":"40px"}),(0,r.jsxs)(A.A,{alignItems:"center",gap:"8px",flexWrap:"wrap",minWidth:0,children:[(0,r.jsx)(o.A,{bold:!0,fontSize:m?"24px":"32px",lineHeight:"1.1",children:null!=(t=n.symbol)?t:"â"}),(0,r.jsxs)(A.A,{alignItems:"center",gap:"8px",children:[g&&(0,r.jsx)(tv,{as:"a",href:g,target:"_blank",rel:"noreferrer noopener",children:(0,r.jsx)(tx.A,{width:"16px",color:"textSubtle"})}),f&&(0,r.jsx)(tv,{as:"button",type:"button",onClick:v,"aria-label":a("Copy address"),title:n.address,children:(0,r.jsx)(th.A,{width:"16px",color:"textSubtle"})}),y&&(0,r.jsx)(tv,{as:"a",href:y,target:"_blank",rel:"noreferrer noopener","aria-label":a("Search on X"),children:(0,r.jsx)(tf.A,{width:"16px",color:"textSubtle"})})]})]})]}),i&&(0,r.jsx)(l.A,{flex:"1 1 auto",justifyContent:m?"flex-start":"flex-end",width:m?"100%":"auto",children:i})]})},tA=["v2","v3","stable","infinityCl","infinityBin"];var tj=n(892977),tw=n(795904),tk=n(770773),tI=n(619005);let tC=C.Ay.a.withConfig({componentId:"sc-646e36a7-0"})(["display:flex;align-items:center;gap:12px;padding:16px;border-bottom:1px solid ",";text-decoration:none;color:inherit;&:last-child{border-bottom:none;}&:hover{background:",";}"],e=>{let{theme:t}=e;return t.colors.cardBorder},e=>{let{theme:t}=e;return t.colors.dropdown}),tS=C.Ay.span.withConfig({componentId:"sc-646e36a7-1"})(["display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;border-radius:999px;background:",";color:",";"],e=>{let{theme:t,$kind:n}=e;return"swap"===n?t.colors.primary:"mint"===n?t.colors.success:"burn"===n?t.colors.failure:t.colors.textSubtle},e=>{let{theme:t}=e;return t.colors.invertedContrast}),tD=C.Ay.div.withConfig({componentId:"sc-646e36a7-2"})(["flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px;"]),tU=C.Ay.div.withConfig({componentId:"sc-646e36a7-3"})(["display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;"]),tN=(0,C.Ay)(o.A).withConfig({componentId:"sc-646e36a7-4"})(["font-size:14px;color:",";text-transform:uppercase;letter-spacing:0.04em;line-height:1.4;& strong{font-weight:600;}"],e=>{let{theme:t}=e;return t.colors.text}),tL=(0,C.Ay)(o.A).attrs({bold:!0}).withConfig({componentId:"sc-646e36a7-5"})(["font-size:12px;color:",";text-transform:uppercase;letter-spacing:0.04em;"],e=>{let{theme:t}=e;return t.colors.secondary}),tT=(0,C.Ay)(o.A).attrs({bold:!0}).withConfig({componentId:"sc-646e36a7-6"})(["font-size:14px;color:",";text-transform:uppercase;letter-spacing:0.04em;"],e=>{let{theme:t}=e;return t.colors.text}),tF=e=>{let{kind:t}=e;return"mint"===t?(0,r.jsx)(tj.A,{width:"20px",color:"invertedContrast"}):"burn"===t?(0,r.jsx)(tw.A,{width:"20px",color:"invertedContrast"}):(0,r.jsx)(tk.A,{width:"20px",color:"invertedContrast"})},t$=e=>{var t;let n,{row:l}=e,{t:i}=(0,s.A)(),o=g.$t[l.chainId],a=(0,B.Bz)(l.txHash,"transaction",l.chainId),d="generic"===l.kind?null!=(t=l.label)?t:i("Transaction"):i("swap"===l.kind?"Swap":"mint"===l.kind?"Add Liquidity":"burn"===l.kind?"Remove Liquidity":"approve"===l.kind?"Approved":"send"===l.kind?"Sent":"Received");if("generic"===l.kind)n=l.summary;else if((e=>"swap"===e.kind||"mint"===e.kind||"burn"===e.kind)(l)){let e=i("swap"===l.kind?"Swap":"mint"===l.kind?"Add":"Remove"),t=i("swap"===l.kind?"for":"and");n=(0,r.jsxs)(r.Fragment,{children:[e," ",(0,r.jsxs)("strong",{children:[l.tokenIn.amount," ",l.tokenIn.token.symbol]})," ",t," ",(0,r.jsxs)("strong",{children:[l.tokenOut.amount," ",l.tokenOut.token.symbol]})]})}else{let e=l.unlimited?i("Unlimited"):l.token.amount,t=i("approve"===l.kind?"Approve":"send"===l.kind?"Send":"Receive");n=(0,r.jsxs)(r.Fragment,{children:[t," ",(0,r.jsxs)("strong",{children:[e," ",l.token.token.symbol]})]})}return(0,r.jsxs)(tC,{href:a,target:"_blank",rel:"noreferrer noopener",children:[(0,r.jsx)(tS,{$kind:l.kind,children:(0,r.jsx)(tF,{kind:l.kind})}),(0,r.jsxs)(tD,{children:[(0,r.jsxs)(tU,{children:[(0,r.jsx)(tT,{children:d}),o&&(0,r.jsx)(tL,{children:o})]}),(0,r.jsx)(tN,{as:"div",children:n})]}),(0,r.jsx)(A.A,{alignItems:"center",flexShrink:0,children:(0,r.jsx)(tI.A,{width:"20px",color:"primary60"})})]})};var tq=n(669896),tM=n(562949),tR=n(941672);let tE=C.Ay.div.withConfig({componentId:"sc-298758f6-0"})(["position:relative;width:100%;"]),tB=C.Ay.button.withConfig({componentId:"sc-298758f6-1"})(["display:flex;align-items:center;gap:8px;width:100%;background:",";border:1px solid ",";border-bottom-width:2px;border-radius:16px;padding:7px 8px 9px 16px;cursor:pointer;font:inherit;text-align:left;color:",";&:hover{opacity:0.85;}"],e=>{let{theme:t}=e;return t.colors.input},e=>{let{theme:t}=e;return t.colors.inputSecondary},e=>{let{theme:t}=e;return t.colors.text}),tO=C.Ay.div.withConfig({componentId:"sc-298758f6-2"})(["position:absolute;top:calc(100% + 4px);left:0;right:0;background:",";border:1px solid ",";border-radius:16px;box-shadow:",";z-index:",";overflow:hidden;"],e=>{let{theme:t}=e;return t.colors.input},e=>{let{theme:t}=e;return t.colors.inputSecondary},e=>{let{theme:t}=e;
1return t.tooltip.boxShadow},e=>{let{theme:t}=e;return t.zIndices.dropdown}),tz=C.Ay.button.withConfig({componentId:"sc-298758f6-3"})(["display:flex;align-items:center;width:100%;background:",";border:none;padding:10px 16px;cursor:pointer;font:inherit;color:",";text-align:left;&:hover{background:",";}"],e=>{let{theme:t,$active:n}=e;return n?t.colors.inputSecondary:"transparent"},e=>{let{theme:t}=e;return t.colors.text},e=>{let{theme:t}=e;return t.colors.inputSecondary}),tP=e=>{let{value:t,onChange:n}=e,{t:l}=(0,s.A)(),[i,a]=(0,u.useState)(!1),d=(0,u.useRef)(null),[c,p]=(0,u.useState)(null);(0,u.useEffect)(()=>p(d.current),[]),(0,tM.A)(c,()=>a(!1));let m={all:l("All Types"),swap:l("Swapped"),mint:l("Add Liquidity"),burn:l("Remove Liquidity")},x=(0,u.useCallback)(e=>{n(e),a(!1)},[n]);return(0,r.jsxs)(tE,{ref:d,children:[(0,r.jsxs)(tB,{type:"button",onClick:()=>a(e=>!e),children:[(0,r.jsx)(eB.A,{width:"24px",color:"textSubtle"}),(0,r.jsx)(o.A,{style:{flex:1},color:"all"===t?"textSubtle":"text",children:m[t]}),(0,r.jsx)(tR.A,{width:"24px",color:"text"})]}),i&&(0,r.jsx)(tO,{children:["all","swap","mint","burn"].map(e=>(0,r.jsx)(tz,{type:"button",$active:e===t,onClick:()=>x(e),children:m[e]},e))})]})},tH=C.Ay.div.withConfig({componentId:"sc-d65558cd-0"})(["background:",";border-radius:24px;border:1px solid ",";overflow:hidden;display:flex;flex-direction:column;"],e=>{let{theme:t}=e;return t.colors.backgroundAlt},e=>{let{theme:t}=e;return t.colors.cardBorder}),tV=C.Ay.div.withConfig({componentId:"sc-d65558cd-1"})(["display:flex;gap:16px;padding:24px;border-bottom:1px solid ",";align-items:center;& > *{flex:1 1 0;
1min-width:200px;}@media (max-width:800px){padding:16px;}"],e=>{let{theme:t}=e;return t.colors.cardBorder}),tW=C.Ay.div.withConfig({componentId:"sc-d65558cd-2"})(["display:grid;grid-template-columns:180px 120px minmax(0,1fr) 120px 140px;align-items:center;border-bottom:1px solid ",";& > *{padding:16px;}"],e=>{let{theme:t}=e;return t.colors.cardBorder}),t_=C.Ay.div.withConfig({componentId:"sc-d65558cd-3"})(["display:flex;align-items:center;justify-content:",";gap:8px;"],e=>{let{$align:t}=e;return"right"===t?"flex-end":"flex-start"}),tG=(0,C.Ay)(o.A).attrs({bold:!0}).withConfig({componentId:"sc-d65558cd-4"})(["font-size:12px;color:",";text-transform:uppercase;letter-spacing:0.06em;white-space:nowrap;"],e=>{let{theme:t}=e;return t.colors.secondary}),tK=e=>{var t;let n=Math.abs(e);return 0===n?"0":n<1e-4?"<0.0001":null!=(t=(0,D.e)(n))?t:n.toString()},tY=e=>{let{ctx:t}=e,{t:n}=(0,s.A)(),{isMobile:a,isTablet:d}=(0,x.A)(),c=a||d,{rows:p,isLoading:m}=function(e){let{chainId:t,tokenAddress:n,limit:r=50}=e,l=null!=t?ei.L1[t]:void 0,i=!!l&&!!n,o=(0,el.E)({queries:tA.map(e=>({queryKey:["tokenTxs",e,t,n],queryFn:async t=>{let{signal:r}=t;if(!l||!n)return[];let i=await ei.D$.GET(`/cached/tx/${e}/{chainName}/recent`,{signal:r,params:{path:{chainName:l},query:{token:n}}});return(Array.isArray(i.data)?i.data:[]).map(t=>{var n,r,l;let i;return t&&"string"==typeof t.id&&"string"==typeof t.transactionHash?"swap"!==(i=t.type)&&"mint"!==i&&"burn"!==i?null:{protocol:e,type:t.type,id:t.id,transactionHash:t.transactionHash,poolId:"string"==typeof t.poolId?t.poolId:"",timestamp:"string"!=typeof t.timestamp||Number.isNaN(Date.parse(t.timestamp))?new Date(0).toISOString():t.timestamp,amountUSD:Number(null!=(n=t.amountUSD)?n:0),amount0:Number(null!=(r=t.amount0)?r:0),amount1:Number(null!=(l=t.amount1)?l:0),origin:"string"==typeof t.origin?t.origin:"",recipient:"string"==typeof t.recipient?t.recipient:"",token0:t.token0,token1:t.token1}:null}).filter(e=>null!=e)},enabled:i,staleTime:3e4,retry:1}))});return(0,u.useMemo)(()=>({rows:o.flatMap(e=>{var t;return null!=(t=e.data)?t:[]}).sort((e,t)=>new Date(t.timestamp).getTime()-new Date(e.timestamp).getTime()).slice(0,r),isLoading:o.some(e=>e.isLoading)}),[o,r])}({chainId:t.chainId,tokenAddress:t.address}),[h,f]=(0,u.useState)("all"),[g,y]=(0,u.useState)("totalUsd"),[v,b]=(0,u.useState)(eC.q.DESC),A=(0,u.useMemo)(()=>p.map(e=>(function(e,t,n){var r,l,i,o,s,a,d,c;let u=(null==(l=e.token0)||null==(r=l.id)?void 0:r.toLowerCase())===n.toLowerCase(),p=u?e.token0:e.token1,m=u?e.token1:e.token0,x=u?e.amount0:e.amount1,h=u?e.amount1:e.amount0,f={token:{chainId:t,address:null!=(i=null==p?void 0:p.id)?i:"",symbol:null!=(o=null==p?void 0:p.symbol)?o:"?",name:null==p?void 0:p.name,decimals:null!=(s=null==p?void 0:p.decimals)?s:18},amount:tK(x),amountRaw:Number(x)||0},g={token:{chainId:t,address:null!=(a=null==m?void 0:m.id)?a:"",symbol:null!=(d=null==m?void 0:m.symbol)?d:"?",name:null==m?void 0:m.name,decimals:null!=(c=null==m?void 0:m.decimals)?c:18},amount:tK(h),amountRaw:Number(h)||0},y=Number.isNaN(Date.parse(e.timestamp))?Date.now():Date.parse(e.timestamp);return{id:e.id,txHash:e.transactionHash,timestamp:y,totalUsd:e.amountUSD,chainId:t,kind:e.type,tokenIn:f,tokenOut:g}})(e,t.chainId,t.address)),[p,t.chainId,t.address]),j=(0,u.useMemo)(()=>"all"===h?A:A.filter(e=>e.kind===h),[A,h]),w=(0,u.useMemo)(()=>{if(v===eC.q.NULL)return j;let e=v===eC.q.ASC?1:-1,t=[...j];return t.sort((t,n)=>{var r,l;return"totalUsd"===g?e*((null!=(r=t.totalUsd)?r:0)-(null!=(l=n.totalUsd)?l:0)):"type"===g?e*t.kind.localeCompare(n.kind):e*(("tokenIn"in t?t.tokenIn.amountRaw:0)-("tokenIn"in n?n.tokenIn.amountRaw:0))}),t},[j,g,v]),k=e=>t=>{y(e),b(t)},I=w.length>0;return(0,r.jsxs)(tH,{children:[(0,r.jsx)(tV,{children:(0,r.jsx)(tP,{value:h,onChange:f})}),!c&&(0,r.jsxs)(tW,{children:[(0,r.jsx)(t_,{children:(0,r.jsx)(tG,{children:n("Time")})}),(0,r.jsxs)(t_,{$align:"right",children:[(0,r.jsx)(tG,{children:n("Type")}),(0,r.jsx)(eC.c,{onlyDESC:!0,width:"14px",sortOrder:"type"===g?v:eC.q.NULL,onSort:k("type")})]}),(0,r.jsxs)(t_,{children:[(0,r.jsx)(tG,{children:n("Amount")}),(0,r.jsx)(eC.c,{onlyDESC:!0,width:"14px",sortOrder:"amount"===g?v:eC.q.NULL,onSort:k("amount")})]}),(0,r.jsxs)(t_,{$align:"right",children:[(0,r.jsx)(tG,{children:n("Total Value")}),(0,r.jsx)(eC.c,{onlyDESC:!0,width:"14px",sortOrder:"totalUsd"===g?v:eC.q.NULL,onSort:k("totalUsd")})]}),(0,r.jsx)(t_,{$align:"right",children:(0,r.jsx)(tG,{children:n("Tx")})})]}),m&&!I?(0,r.jsx)(l.A,{justifyContent:"center",py:"40px",children:(0,r.jsx)(i.A,{size:32})}):I?c?w.map(e=>(0,r.jsx)(t$,{row:e},`${e.kind}-${e.id}`)):w.map(e=>(0,r.jsx)(tq.j,{row:e},`${e.kind}-${e.id}`)):(0,r.jsx)(l.A,{justifyContent:"center",py:"40px",children:(0,r.jsx)(o.A,{color:"textSubtle",children:n("No transactions yet")})})]})};var tQ=n(459587),tX=n(735872),tZ=n(401368),tJ=n(18468),t0=n(821497),t1=n(708033),t2=n(90811),t6=n(72912);let t4=[{path:"/cached/tokens/v2/{chainName}/{address}",useWrapped:!0},{path:"/cached/tokens/v3/{chainName}/{address}",useWrapped:!0},{path:"/cached/tokens/stable/{chainName}/{address}",useWrapped:!0},{path:"/cached/tokens/infinityBin/{chainName}/{address}",useWrapped:!1},{path:"/cached/tokens/infinityCl/{chainName}/{address}",useWrapped:!1}],t8=(0,C.Ay)(p.A).withConfig({componentId:"sc-7e7878bd-0"})(["padding:8px 24px;font-size:16px;font-weight:600;border:1px solid ",";border-bottom:none;"],e=>{let{theme:t}=e;return t.colors.cardBorder}),t7=(0,C.Ay)(m.Ay).withConfig({componentId:"sc-7e7878bd-1"})(["& > div:first-child{padding:0 0 0 24px;}"]),t9=C.Ay.div.withConfig({componentId:"sc-7e7878bd-2"})(["display:grid;grid-template-columns:minmax(0,1fr) 320px;
1gap:24px;@media (max-width:967px){grid-template-columns:1fr;}"]),t3=C.Ay.div.withConfig({componentId:"sc-7e7878bd-3"})(["position:sticky;bottom:calc(","px + env(safe-area-inset-bottom));left:0;right:0;margin-left:-24px;width:100vw;background:",";padding:12px 16px;border-top:1px solid ",";z-index:19;"],f.v6,e=>{let{theme:t}=e;return t.colors.backgroundAlt},e=>{let{theme:t}=e;return t.colors.cardBorder}),t5=e=>{var t,n;let{chainId:a,address:d}=e,{t:p}=(0,s.A)(),f=(0,c.useRouter)(),{isMobile:v,isTablet:b}=(0,x.A)(),A=v||b,j=function(e){let t=null!=e.chainId&&(0,U.FD)(e.chainId),n=function(e){var t,n;let{chainId:r,rawAddress:l,logoURI:i,enabled:o}=e,s=l===N.cF,a=null!=r?ei.L1[r]:void 0,d=null!=r?function(e,t){var n,r;if(t)return e!==g.Cb.SOLANA||t&&t!==N.cF?t===N.cF&&null!=(r=null==(n=eM.xQ[e])?void 0:n.address)?r:t:es}(r,l):void 0,c=(0,el.E)({queries:t4.map(e=>{let{path:t,useWrapped:n}=e,i=n?d:l;return{queryKey:["tokenDetail",t,r,i],queryFn:async e=>{var n;let{signal:r}=e;return a&&i&&null!=(n=(await ei.D$.GET(t,{signal:r,params:{path:{chainName:a,address:i}}})).data)?n:null},enabled:o&&!!a&&!!i,staleTime:6e4,retry:1}})}),p=(0,u.useMemo)(()=>c.map(e=>e.data).filter(e=>null!=e),[c]),m=(0,u.useMemo)(()=>{if(!p.length)return{volumeUSD24h:void 0,volumeUSD7d:void 0,tvlUSD:void 0,top:void 0};let e=e=>{let t=!1,n=p.reduce((n,r)=>{let l=Number(r[e]);return Number.isFinite(l)?(t=!0,n+l):n},0);return t?n:void 0},t=p.reduce((e,t)=>{var n;let r=Number(t.volumeUSD24h),l=Number(null!=(n=null==e?void 0:e.volumeUSD24h)?n:-1/0);return Number.isFinite(r)&&r>l?t:e},p[0]);return{volumeUSD24h:e("volumeUSD24h"),volumeUSD7d:e("volumeUSD7d"),tvlUSD:e("tvlUSD"),top:t}},[p]),x=null!=r&&(0,U.T6)(r),h=(0,eo.I)({queryKey:["tokenDetailOnchainMeta",r,d],queryFn:async()=>{if(!x||!d)return null;let e=(0,tJ.Rt)({chainId:r});if(!e)return null;let t={address:d,abi:t0.xw},[n,l,i,o]=await e.multicall({contracts:[{...t,functionName:"name"},{...t,functionName:"symbol"},{...t,functionName:"decimals"},{...t,functionName:"totalSupply"}],allowFailure:!0});return{name:"success"===n.status?n.result:void 0,symbol:"success"===l.status?l.result:void 0,decimals:"success"===i.status?i.result:void 0,totalSupply:"success"===o.status?o.result:void 0}},enabled:o&&x&&!s&&!!d,staleTime:3e5,retry:1}),f=(0,u.useMemo)(()=>{var e,t,n;if(s&&null!=r&&(0,U.T6)(r))try{let e=eM.we.onChain(r);return{decimals:e.decimals,symbol:e.symbol,name:e.name}}catch{}let l=p.find(e=>e.symbol||e.name||null!=e.decimals),i=h.data;return{decimals:null!=(e=null==l?void 0:l.decimals)?e:null==i?void 0:i.decimals,symbol:null!=(t=null==l?void 0:l.symbol)?t:null==i?void 0:i.symbol,name:null!=(n=null==l?void 0:l.name)?n:null==i?void 0:i.name}},[p,s,r,h.data]),y=(0,u.useMemo)(()=>{var e;let t=null==(e=h.data)?void 0:e.totalSupply;if(null==t||null==f.decimals)return;let n=Number((0,t1.J)(t,f.decimals));return Number.isFinite(n)?n:void 0},[null==(t=h.data)?void 0:t.totalSupply,f.decimals]),v=(0,u.useMemo)(()=>{var e,t;if(!o||!x||null==r)return;if(s)return eM.we.onChain(r);if(!l||null==f.decimals)return;let n=(0,tZ.Sf)(r,l);if(n)return new eM.GH(r,n,f.decimals,null!=(e=f.symbol)?e:"",null!=(t=f.name)?t:"")},[o,x,r,s,l,f.decimals,f.symbol,f.name]),b=(0,tQ.GB)(v),A=(0,u.useMemo)(()=>{var e,t;let n=b.data;if(null!=n&&Number.isFinite(n)&&n>0)return n;let r=Number(null!=(t=null==(e=m.top)?void 0:e.priceUSD)?t:NaN);return Number.isFinite(r)&&r>0?r:void 0},[b.data,null==(n=m.top)?void 0:n.priceUSD]),j=(0,u.useMemo)(()=>{let{top:e}=m;if(!e)return;let t=Number(e.priceUSD),n=Number(e.priceUSD24h);if(Number.isFinite(t)&&Number.isFinite(n)&&0!==n)return(t-n)/n*100},[m.top]),w=(0,u.useMemo)(()=>{if(null!=A&&null!=y)return y*A},[A,y]),k=(0,tX.V6)(),I=(0,u.useMemo)(()=>{var e,t;if(s||null==r||!x||!l)return;let n=(0,tZ.QR)(l);if(n)return null==(t=k[r])||null==(e=t[n])?void 0:e.token.logoURI},[k,s,r,x,l]);return{ctx:(0,u.useMemo)(()=>{var e,t,n;if(o&&null!=r&&l)return{chainId:r,address:l,isNative:s,decimals:f.decimals,symbol:f.symbol,name:f.name,currencyForLogo:{chainId:r,address:s?void 0:l,isNative:s,isToken:!s,decimals:null!=(e=f.decimals)?e:18,symbol
1:null!=(t=f.symbol)?t:"",name:null!=(n=f.name)?n:"",logoURI:null!=i?i:I},priceCurrency:v}},[o,r,l,s,f,i,I,v]),chartAddress:d,isLoading:o&&(c.some(e=>e.isLoading)||h.isLoading||b.isLoading),protocolStats:p,priceUSD:A,priceChange24hPercent:j,tvlUSD:m.tvlUSD,volumeUSD24h:m.volumeUSD24h,volumeUSD7d:m.volumeUSD7d,fdv:w,totalSupply:y}}({...e,enabled:!t}),r=function(e){var t;let{chainId:n,rawAddress:r,logoURI:l,enabled:i}=e,o=r===N.cF,s=o?es:r,a=(0,t2.n)(s,{enabled:i}),d=null===a,c=(0,t6.wm)({mint:s,enabled:i}),p=(0,eo.I)({queryKey:["solanaTokenPrice24h",s],queryFn:async e=>{var t,n,r;let{signal:l}=e;if(s)return null!=(r=(null!=(n=null==(t=(await ei.pg.GET("/cached/v1/tokens/price24h",{signal:l,params:{query:{ids:s}}})).data)?void 0:t.data)?n:{})[s])?r:void 0},enabled:i&&!!s,staleTime:6e4,retry:1}),m=ea(s,{enabled:i}),x=(0,u.useMemo)(()=>{var e;let t=null!=(e=m.data)?e:[];if(0===t.length)return{tvlUSD:void 0,volumeUSD24h:void 0,volumeUSD7d:void 0};let n=0,r=0,l=0;return t.forEach(e=>{var t,i,o,s;e.tvl>0&&e.tvl<1e9&&(n+=e.tvl),r+=null!=(o=null==(t=e.day)?void 0:t.volume)?o:0,l+=null!=(s=null==(i=e.week)?void 0:i.volume)?s:0}),{tvlUSD:n>0?n:void 0,volumeUSD24h:r>0?r:void 0,volumeUSD7d:l>0?l:void 0}},[m.data]),h=(0,u.useMemo)(()=>o?{decimals:9,symbol:"SOL",name:"Solana",logoURI:null==a?void 0:a.logoURI}:a?{decimals:a.decimals,symbol:a.symbol,name:a.name,logoURI:a.logoURI}:{decimals:void 0,symbol:void 0,name:void 0,logoURI:void 0},[o,a]),f=null!=(t=c.data)?t:void 0,y=(0,u.useMemo)(()=>{let e=p.data;if(null!=f&&null!=e&&Number.isFinite(e)&&0!==e)return(f-e)/e*100},[f,p.data]);return{ctx:(0,u.useMemo)(()=>{var e,t,i;if(n===g.Cb.SOLANA&&r)return{chainId:n,address:r,isNative:o,decimals:h.decimals,symbol:h.symbol,name:h.name,currencyForLogo:{chainId:n,address:o?void 0:r,isNative:o,isToken:!o,decimals:null!=(e=h.decimals)?e:9,symbol:null!=(t=h.symbol)?t:"",name:null!=(i=h.name)?i:"",logoURI:null!=l?l:h.logoURI},priceCurrency:void 0}},[n,r,o,h,l]),chartAddress:s,isLoading:d,protocolStats:[],priceUSD:f,priceChange24hPercent:y,tvlUSD:x.tvlUSD,volumeUSD24h:x.volumeUSD24h,volumeUSD7d:x.volumeUSD7d,fdv:void 0,totalSupply:void 0}}({...e,enabled:t});return t?r:n}({chainId:a,rawAddress:d}),w=(0,I.T)(null==(t=j.ctx)?void 0:t.chainId,null==(n=j.ctx)?void 0:n.address),[C,L]=(0,u.useState)("1D"),[T,F]=(0,u.useState)("pools"),$=function(e){let t=null!=e.chainId&&(0,U.FD)(e.chainId),n=function(e){let{chainId:t,chartAddress:n,period:r,enabled:l}=e,i=null!=t?ei.L1[t]:void 0,o=l&&!!i&&!!n,s=(0,el.E)({queries:[{queryKey:["tokenDetailChart","price",t,n,r],queryFn:async e=>{var t;let{signal:l}=e;return i&&n&&null!=(t=(await ei.D$.GET("/cached/tokens/chart/{chainName}/{address}/price",{signal:l,params:{path:{chainName:i,address:n},query:{period:r}}})).data)?t:[]},enabled:o,staleTime:6e4,retry:1}]}),a=(0,el.E)({queries:ex.map(e=>({queryKey:["tokenDetailChart","tvl",e,t,n,r],queryFn:async t=>{var l;let{signal:o}=t;return i&&n&&null!=(l=(await ei.D$.GET(`/cached/tokens/chart/{chainName}/{address}/${e}/tvl`,{signal:o,params:{path:{chainName:i,address:n},query:{period:r}}})).data)?l:[]},enabled:o,staleTime:6e4,retry:1}))}),d=(0,el.E)({queries:ex.map(e=>({queryKey:["tokenDetailChart","volume",e,t,n,r],queryFn:async t=>{var l;let{signal:o}=t;return i&&n&&null!=(l=(await ei.D$.GET(`/cached/tokens/chart/{chainName}/{address}/${e}/volume`,{signal:o,params:{path:{chainName:i,address:n},query:{period:r}}})).data)?l:[]},enabled:o,staleTime:6e4,retry:1}))}),c=(0,u.useMemo)(()=>{var e;return{points:(null!=(e=s[0].data)?e:[]).map(e=>{let t="string"==typeof e.bucket?Math.floor(er()(e.bucket).valueOf()/1e3):NaN,n=Number(e.open),r=Number(e.high),l=Number(e.low),i=Number(e.close);return[t,n,r,l,i].every(Number.isFinite)?{time:t,open:n,high:r,low:l,close:i}:null}).filter(e=>null!=e).sort((e,t)=>e.time-t.time),isLoading:s[0].isLoading}},[s]);return{price:c,tvl:(0,u.useMemo)(()=>{let e=new Map;return a.forEach(t=>{var n;(null!=(n=t.data)?n:[]).forEach(t=>{var n;if("string"!=typeof t.bucket)return;let r=Number(t.tvlUSD);Number.isFinite(r)&&!(r>1e15)&&e.set(t.bucket,(null!=(n=e.get(t.bucket))?n:0)+r)})}),{points:Array.from(e.entries()).map(e=>{let[t,n]=e;return{time:er()(t).toDate(),value:n}}).sort((e,t)=>
1e.time.getTime()-t.time.getTime()),isLoading:a.some(e=>e.isLoading)}},[a]),volume:(0,u.useMemo)(()=>{let e=new Map;return d.forEach(t=>{var n;(null!=(n=t.data)?n:[]).forEach(t=>{var n;if("string"!=typeof t.bucket)return;let r=Number(t.volumeUSD);Number.isFinite(r)&&!(r>1e15)&&e.set(t.bucket,(null!=(n=e.get(t.bucket))?n:0)+r)})}),{points:Array.from(e.entries()).map(e=>{let[t,n]=e;return{time:er()(t).toDate(),value:n}}).sort((e,t)=>e.time.getTime()-t.time.getTime()),isLoading:d.some(e=>e.isLoading)}},[d])}}({...e,enabled:!t}),r=function(e){let{chartAddress:t,period:n,enabled:r}=e,l=ea(t===N.cF?es:t,{enabled:r}),i=(0,u.useMemo)(()=>{var e;let t=null!=(e=l.data)?e:[];if(0===t.length)return;let n=t.reduce((e,t)=>{var n,r,l,i;let o=null!=(i=null!=(l=null==(n=t.week)?void 0:n.volume)?l:null==(r=t.day)?void 0:r.volume)?i:0;return o>0&&(!e||o>e.score)?{pool:t,score:o}:e},void 0);return n?n.pool.id:t.reduce((e,t)=>t.tvl>e.tvl?t:e,t[0]).id},[l.data]),o=(0,eo.I)({queryKey:["solanaTokenOhlcv",i,n],queryFn:async e=>{var t,r;let{signal:l}=e;if(!i||!ed)return[];let o=Math.floor(Date.now()/1e3),s=new URLSearchParams({poolId:i,type:ec[n],time_from:String(o-eu[n]),time_to:String(o)}),a=await fetch(`${ed}/cached/v1/pools/ohlcv/pair?${s}`,{signal:l});if(!a.ok)throw Error(`OHLCV fetch failed: ${a.status}`);return null!=(r=null==(t=(await a.json()).data)?void 0:t.items)?r:[]},enabled:r&&!!i&&!!ed,staleTime:6e4,retry:1}),s=(0,eo.I)({queryKey:["solanaPoolTvlLine",i],queryFn:async e=>{var t;let{signal:n}=e;if(!i||!ed)return[];let r=new URLSearchParams({poolId:i}),l=await fetch(`${ed}/cached/v1/pools/line/tvl?${r}`,{signal:n});if(!l.ok)throw Error(`TVL line fetch failed: ${l.status}`);return null!=(t=(await l.json()).data)?t:[]},enabled:r&&!!i&&!!ed,staleTime:6e4,retry:1}),a=(0,u.useMemo)(()=>({points:[],isLoading:!1}),[]),d=(0,u.useMemo)(()=>{var e;return{points:(null!=(e=o.data)?e:[]).map(e=>Number.isFinite(e.unixTime)&&Number.isFinite(e.v)?{time:new Date(1e3*e.unixTime),value:e.v}:null).filter(e=>null!=e).sort((e,t)=>e.time.getTime()-t.time.getTime()),isLoading:o.isLoading||l.isLoading}},[o.data,o.isLoading,l.isLoading]);return{price:a,tvl:(0,u.useMemo)(()=>{var e;return{points:(null!=(e=s.data)?e:[]).map(e=>{let t=function(e){if("number"==typeof e.timestamp)return e.timestamp;if("string"==typeof e.date){let t=Date.parse(e.date);return Number.isFinite(t)?Math.floor(t/1e3):null}return null}(e);return null!=t&&Number.isFinite(e.tvl)?{time:new Date(1e3*t),value:e.tvl}:null}).filter(e=>null!=e).sort((e,t)=>e.time.getTime()-t.time.getTime()),isLoading:s.isLoading||l.isLoading}},[s.data,s.isLoading,l.isLoading]),volume:d}}({...e,enabled:t});return t?r:n}({chainId:a,chartAddress:j.chartAddress,period:C}),q=(0,u.useCallback)(()=>f.push("/"),[f]);if(!j.ctx&&j.isLoading)return(0,r.jsx)(S.A,{children:(0,r.jsx)(l.A,{justifyContent:"center",mt:"80px",children:(0,r.jsx)(i.A,{})})});if(!j.ctx)return(0,r.jsx)(S.A,{children:(0,r.jsx)(o.A,{color:"textSubtle",textAlign:"center",mt:"80px",children:p("Token not found")})});if("resolving"===w.status)return(0,r.jsx)(S.A,{children:(0,r.jsx)(l.A,{justifyContent:"center",mt:"80px",children:(0,r.jsx)(i.A,{})})});if("pending"===w.status)return(0,r.jsx)(S.A,{children:(0,r.jsx)(k,{isOpen:!0,onConfirm:w.confirm,onCancel:q})});if("blocked"===w.status)return(0,r.jsx)(S.A,{children:(0,r.jsx)(o.A,{color:"textSubtle",textAlign:"center",mt:"80px",children:j.ctx.symbol?p("The tokenized stock %symbol% is not available to residents of your jurisdiction.",{symbol:j.ctx.symbol}):p("This tokenized stock is not available to residents of your jurisdiction.")})});if("unverifiable"===w.status)return(0,r.jsx)(S.A,{children:(0,r.jsx)(o.A,{color:"textSubtle",textAlign:"center",mt:"80px",children:j.ctx.symbol?p("We couldn't verify your location for %symbol%. Please refresh the page or try again shortly.",{symbol:j.ctx.symbol}):p("We couldn't verify your location for this asset. Please refresh the page or try again shortly.")})});let R=(0,r.jsx)(tp,{tvlUSD:j.tvlUSD,fdv:j.fdv,volumeUSD24h:j.volumeUSD24h,volumeUSD7d:j.volumeUSD7d}),E=g.$t[j.ctx.chainId],B=(()=>
1{let{name:e,symbol:t}=j.ctx;return e&&t?`${e} (${t})${E?` on ${E}`:""}`:t?`${t}${E?` on ${E}`:""}`:p("Token Details")})(),O=j.ctx.symbol?p("View %symbol% price, statistics, and liquidity pools on PancakeSwap.",{symbol:j.ctx.symbol}):p("View token price, statistics, and liquidity pools on PancakeSwap.");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(S.A,{children:[(0,r.jsx)(y.bV,{title:B,description:O}),(0,r.jsx)(J,{symbol:j.ctx.symbol}),(0,r.jsx)(m.Ay,{my:"24px",children:(0,r.jsx)(tb,{ctx:j.ctx,topStats:R})}),(0,r.jsxs)(t9,{children:[(0,r.jsx)(eI,{data:$,period:C,onPeriodChange:L,priceLabel:null!=j.priceUSD?`$${(0,D.e)(j.priceUSD)}`:"â",hiddenTabs:(0,U.FD)(j.ctx.chainId)?["price"]:void 0}),(0,r.jsxs)(l.A,{flexDirection:"column",style:{gap:16},children:[!A&&(0,r.jsx)(M,{ctx:j.ctx,stack:!1}),(0,r.jsx)(Q,{ctx:j.ctx})]})]}),(()=>{let e=(0,U.FD)(j.ctx.chainId),t=e?"pools":T;return(0,r.jsxs)(t7,{mt:"24px",children:[(0,r.jsx)(h.A,{gap:"0",activeIndex:+("pools"!==t),onItemClick:e=>F(0===e?"pools":"transactions"),isShowBorderBottom:!1,children:[(0,r.jsx)(t8,{children:p("Pools")},"pools"),...e?[]:[(0,r.jsx)(t8,{children:p("Transactions")},"transactions")]]}),"pools"===t?(0,r.jsx)(ti,{ctx:j.ctx}):(0,r.jsx)(tY,{ctx:j.ctx})]})})()]}),A&&(0,r.jsx)(t3,{children:(0,r.jsx)(M,{ctx:j.ctx})})]})},ne=()=>{let e=(0,c.useRouter)(),{t}=(0,s.A)(),{chain:n,address:a}=e.query,d=(0,u.useMemo)(()=>{let e="string"==typeof n?(0,U.Mm)(n):void 0;if(null==e)return null;let t=(0,U.CR)(e,"string"==typeof a?a:void 0);return null==t?null:{chainId:e,address:t}},[n,a]);return e.isReady?d?(0,r.jsx)(u.Suspense,{fallback:(0,r.jsx)(l.A,{mt:"80px",justifyContent:"center",children:(0,r.jsx)(i.A,{})}),children:(0,r.jsx)(t5,{chainId:d.chainId,address:d.address})}):(0,r.jsx)(l.A,{mt:"80px",justifyContent:"center",children:(0,r.jsx)(o.A,{color:"textSubtle",children:t("Token not found")})}):(0,r.jsx)(l.A,{mt:"80px",justifyContent:"center",children:(0,r.jsx)(i.A,{})})},nt=d()(()=>Promise.resolve(ne),{ssr:!1});nt.chains=[];let nn=nt},531979:(e,t,n)=>{"use strict";n.d(t,{k:()=>x});var r=n(350979),l=n(810286),i=n(131619),o=n(687287),s=n(428089),a=n(605641),d=n(579518),c=n(889948),u=n(91168),p=n(25963);let m=e=>{let{value:t,display:n,suffix:l,significantDigits:i=6,placeholder:o,extraTooltip:m,...x}=e,{short:h,full:f,autoTruncated:g}=(0,p.useMemo)(()=>{let e=String(t),n=new u.A(e);if(!n.isFinite())return{short:null!=o?o:e,full:e,autoTruncated:!1};let r=n.sd()>i;return{short:(r?n.sd(i,u.A.ROUND_HALF_UP):n).toFixed(),full:n.toFixed(),autoTruncated:r}},[t,i,o]),y=null!=n?n:h,v=null!=n?f!==n:g,b=e=>l?`${e} ${l}`:e,A=(0,p.useMemo)(()=>v||m?(0,r.jsxs)(s.Ay,{children:[v&&(0,r.jsx)(a.A,{small:!0,children:b(f)}),m]}):null,[v,f,l,m]),{targetRef:j,tooltip:w,tooltipVisible:k}=(0,d.A)(A,{placement:"top"});return A?(0,r.jsxs)(r.Fragment,{children:[k&&w,(0,r.jsx)(c.A,{ref:j,...x,children:b(y)})]}):(0,r.jsx)(a.A,{...x,children:b(y)})},x=e=>{let{uiAmount:t,chainId:n,address:s,symbol:a,display:d,rawDisplay:c,...u}=e,p=(0,i.Jg)(s,n),x=(0,o.dm)(t,p),h=(0,l.$Y)({currency:p,amount:c?void 0:x,rawDisplay:c});return(0,r.jsx)(m,{value:t,display:d,suffix:a,extraTooltip:h,...u})}},537694:(e,t,n)=>{"use strict";n.d(t,{T:()=>p,p:()=>u});var r=n(538471),l=n(286255),i=n(118708),o=n(726053),s=n(25963),a=n(893403),d=n(344601),c=n(124696);function u(e){let{hasTokenIdentifier:t,areRwaListsSettled:n,isFamilyResolutionPending:l,isFamilyResolutionUnreliable:i,family:o,isGeoLoading:s,isGeoError:a,country:d,isFamilyConfirmed:c}=e;if(t&&!n)return"resolving";if(!o)return l?"resolving":i?"unverifiable":"clear";if(s)return"resolving";let u=r.pq.getFamily(o);return a||!d?r.pq.familyHasHardBlockedRegions(u)?"unverifiable":"pending":r.pq.familyRequiresHardBlock(u,d)?"blocked":c?"clear":r.pq.familyRequiresGeofenceConfirmation(u,d)?"pending":"clear"}function p(e,t){var n;let p=(0,i.md)(o.yp),m=(0,i.md)(o.Rq),{areRwaListsSettled:x}=(0,a.A)(),h=(0,i.md)(c.t8),f=(0,i.Xr)(c.Wk),g=(0,i.Xr)(c.rx),y=x&&!m,{resolve:v,isLoading:b,isError:A}=(0,d.e)(y),j=(0,s.useMemo)(()=>{var n,l;if(null==e||!t||!x)return;let i=null!=(l=null==(n=r.pq.getFamilyByToken(e,t,p))?void 0:n.type)?l:v(e,t);return i&&r.pq.isGeofenceConfirmationFamily(r.pq.getFamily(i))?i:void 0},[e,t,x,p,v]),w=(0,l.U)(!!j);return{status:(0,s.useMemo)(()=>{var n;return u({hasTokenIdentifier:null!=e&&!!t,areRwaListsSettled:x,isFamilyResolutionPending:y&&b,isFamilyResolutionUnreliable:y&&A,family:j,isGeoLoading:w.isLoading,isGeoError:w.isError,country:null==(n=w.data)?void 0:n.country,isFamilyConfirmed:!!j&&h(j)})},[e,t,x,y,b,A,j,w.isLoading,w.isError,null==(n=w.data)?void 0:n.country,h]),confirm:(0,s.useCallback)(e=>{if(!j)return;let t={[j]:!0};(e?f:g)(e=>({...e,...t}))},[j,f,g])}}}
1,658064:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r.Q});var r=n(699549)},669896:(e,t,n)=>{"use strict";n.d(t,{j:()=>U});var r=n(350979),l=n(769932),i=n(501823),o=n(494350),s=n(892977),a=n(795904),d=n(605641),c=n(32654),u=n(721745),p=n(450253),m=n.n(p),x=n(680797),h=n(733775),f=n(456194),g=n(228876),y=n(995315),v=n(898719),b=n(531979),A=n(401368);let j=e=>{let{amount:t,token:n}=e,l=g.$t[n.chainId];return(0,r.jsxs)(y.A,{alignItems:"center",gap:"8px",children:[(0,r.jsx)(v.Z,{showChainLogo:!0,currency:(e=>{var t;let n=!e.address||"0x0000000000000000000000000000000000000000"===e.address.toLowerCase()||e.address===A.KJ||(0,g.fT)(e.chainId)&&(null==(t=e.symbol)?void 0:t.toUpperCase())==="SOL";return{chainId:e.chainId,address:e.address,isNative:n,isToken:!n,decimals:e.decimals,symbol:e.symbol,name:e.name,logoURI:e.logoURI}})(n),size:"40px"}),(0,r.jsxs)(y.A,{flexDirection:"column",minWidth:0,children:[(0,r.jsx)(b.k,{bold:!0,ellipsis:!0,uiAmount:t,chainId:n.chainId,address:n.address,symbol:n.symbol}),l&&(0,r.jsx)(d.A,{bold:!0,color:"textSubtle",fontSize:"12px",textTransform:"uppercase",style:{letterSpacing:"0.06em"},children:l})]})]})},w=x.Ay.div.withConfig({componentId:"sc-fc63a365-0"})(["display:grid;grid-template-columns:180px 120px minmax(0,1fr) 120px 140px;align-items:center;border-bottom:1px solid ",";& > *{padding:16px;}&:last-child{border-bottom:none;}"],e=>{let{theme:t}=e;return t.colors.cardBorder}),k=x.Ay.div.withConfig({componentId:"sc-fc63a365-1"})(["display:flex;align-items:center;justify-content:flex-end;"]),I=x.Ay.div.withConfig({componentId:"sc-fc63a365-2"})(["display:grid;grid-template-columns:1fr 80px 1fr;align-items:center;gap:16px;min-width:0;"]),C=x.Ay.a.withConfig({componentId:"sc-fc63a365-3"})(["display:inline-flex;align-items:center;gap:8px;color:",";font-weight:600;text-decoration:none;&:hover{text-decoration:underline;}"],e=>{let{theme:t}=e;return t.colors.primary60}),S=(0,x.Ay)(i.A).withConfig({componentId:"sc-fc63a365-4"})(["width:24px;height:24px;align-items:center;justify-content:center;color:",";"],e=>{let{theme:t}=e;return t.colors.textSubtle}),D=e=>{let{kind:t}=e;return(0,r.jsx)(S,{children:"swap"===t?(0,r.jsx)(o.A,{width:"20px",color:"textSubtle"}):"mint"===t?(0,r.jsx)(s.A,{width:"20px",color:"textSubtle"}):(0,r.jsx)(a.A,{width:"20px",color:"textSubtle"})})},U=e=>{var t;let{row:n}=e,{t:i}=(0,l.A)(),o=(()=>{let{t:e}=(0,l.A)();return{swap:e("Swap"),mint:e("Add Liquidity"),burn:e("Remove Liquidity"),approve:e("Approved"),send:e("Sent"),receive:e("Received")}})(),s=m()(n.timestamp).format("MMM D, YYYY h:mma"),a=(0,h.Bz)(n.txHash,"transaction",n.chainId),p="generic"===n.kind?null!=(t=n.label)?t:i("Transaction"):o[n.kind];return(0,r.jsxs)(w,{children:[(0,r.jsx)(d.A,{color:"textSubtle",children:s}),(0,r.jsx)(k,{children:(0,r.jsx)(d.A,{children:p})}),(0,r.jsx)(I,{children:"generic"===n.kind?(0,r.jsx)(d.A,{style:{gridColumn:"1 / -1"},ellipsis:!0,children:n.summary}):(e=>"swap"===e.kind||"mint"===e.kind||"burn"===e.kind)(n)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j,{amount:n.tokenIn.amount,token:n.tokenIn.token}),(0,r.jsx)(D,{kind:n.kind}),(0,r.jsx)(j,{amount:n.tokenOut.amount,token:n.tokenOut.token})]}):(0,r.jsx)(j,{amount:n.unlimited?i("Unlimited"):n.token.amount,token:n.token.token})}),(0,r.jsx)(k,{children:(0,r.jsx)(d.A,{children:(e=>{var t;if(null==e)return"â";let n=Math.abs(e);return 0===n?"$0":n<.01?"<$0.01":`$${null!=(t=(0,f.e)(n))?t:n.toFixed(2)}`})(n.totalUsd)})}),(0,r.jsx)(k,{children:(0,r.jsxs)(C,{href:a,target:"_blank",rel:"noreferrer noopener",children:[(0,u.A)(n.txHash,5,4),(0,r.jsx)(c.A,{width:"16px",color:"primary60"})]})})]})}},805860:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(680797),l=n(913688);let i=r.I4.button.withConfig({componentId:"sc-24d92339-0"})(["display:inline-flex;justify-content:center;cursor:pointer;border:0;outline:0;flex-grow:1;padding:",";border-radius:",";font-size:16px;font-weight:600;","{flex-grow:0;}",""],e=>{let{scale:t}=e;return"md"===t?"8px":"16px"},e=>{let{scale:t}=e;return"md"===t?"16px 16px 0 0":"24px 24px 0 0"},e=>{let{theme:t}=e;return t.mediaQueries.md},l.yW);i.defaultProps={scale:"md"};let o=i},893403:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(538471),l=n(118708),i=n(25963),o=n(334804);let s=Array.from(new Set(r.pq.families.flatMap(e=>e.listUrls))),a=null;function d(){let e=(0,o.gJ)(),t=(0,l.Xr)(o.uY),[n,r]=(0,i.useState)(!1);return(0,i.useEffect)(()=>
1{if(!e)return;let n=!1;return(!a&&(a=t(s)),a).finally(()=>{n||r(!0)}),()=>{n=!0}},[e,t]),{areRwaListsSettled:e&&n}}}},e=>{e.O(0,[7964,3821,5139,7578,3732,4306,4374,3892,2845,7121,7061,9596,2141,3577,6341,8516,2806,6270,7881,143,2259,3387,6175,2299,7969,7618,2560,7212,1480,6335,4711,9818,7635,64,2775,8269,6283,5018,9508,4712,7287,4641,8686,8837,6010,4522,4586,2911,2269,3484,770,245,7094,7869,2457,1729,7207,6763,3189,604,636,6593,8792],()=>e(e.s=64595)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.