PageSourceSearch

https://coinmafia.io/assets/token-grid-D9EqatG9.js

js coinmafia.io collected 2026-10-08 09:00:24 UTC 24,235 bytes, 2 lines download raw bytes

1import{c as le,M as Le,r,j as e,P as Ie,T as fe,g as y,$ as Ee,aO as Oe,aZ as $e,Y as pe,a0 as ge,_ as be,L as ze,k as Fe,l as Be,n as _e,o as He,a_ as qe,q as Ue,C as Ge,u as Qe,aQ as _,a$ as We,b0 as Ke,b1 as ae,b2 as Ve,J as re,b3 as Ye,B as xe,b as Ze,b4 as Je,b5 as Xe}from"./main-DsFVbVR7.js";import{C as ye}from"./card-BL0cQjzX.js";import{D as es}from"./dev-stars-B5aNGJUn.js";import{T as ve,a as je,b as we,c as Ne}from"./tooltip-F7KCcDzH.js";import{c as ss}from"./chains-6TeTlZ9K.js";import{W as ts}from"./watchlist-button-OgxFmP9D.js";import{T as as}from"./trending-up-Dc45yYMw.js";import{T as rs}from"./trending-down-BT-r71wz.js";import{s as ns,g as ls}from"./indexer-CQqQ55zc.js";const os=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],is=le("sliders-horizontal",os);const ds=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],cs=le("wifi-off",ds);const ms=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],us=le("wifi",ms),xs=Le,hs=Ie,ke=r.forwardRef(({className:t,...a},n)=>e.jsx(ge,{className:y("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...a,ref:n}));ke.displayName=ge.displayName;const fs=$e("fixed z-50 gap-4 border-gray-800 bg-[#0f0f1a] p-6 text-white shadow-2xl shadow-black/50 transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Ce=r.forwardRef(({side:t="right",className:a,children:n,...l},o)=>e.jsxs(hs,{children:[e.jsx(ke,{}),e.jsxs(fe,{ref:o,className:y(fs({side:t}),a),...l,children:[n,e.jsxs(Ee,{className:"absolute right-4 top-4 roun
1ded-sm text-gray-400 opacity-70 ring-offset-gray-950 transition-opacity hover:text-white hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-800",children:[e.jsx(Oe,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ce.displayName=fe.displayName;const Te=({className:t,...a})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",t),...a});Te.displayName="SheetHeader";const Se=r.forwardRef(({className:t,...a},n)=>e.jsx(pe,{ref:n,className:y("text-lg font-semibold text-white",t),...a}));Se.displayName=pe.displayName;const ps=r.forwardRef(({className:t,...a},n)=>e.jsx(be,{ref:n,className:y("text-sm text-gray-400",t),...a}));ps.displayName=be.displayName;function gs({type:t}){return t==="regular"?null:e.jsx(ve,{children:e.jsxs(je,{children:[e.jsx(we,{asChild:!0,children:e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(Ge,{size:20,checkSize:10,badgeClassName:y(t==="verified"&&"fill-blue-500 stroke-blue-500",t==="kol"&&"fill-yellow-500 stroke-yellow-500")})})}),e.jsx(Ne,{children:e.jsx("p",{children:t==="verified"?"Verified Creator":"KOL Creator"})})]})})}function bs({creatorDisplayName:t,creatorImage:a,creator:n,type:l}){const o=Fe(),m=i=>{i.preventDefault(),i.stopPropagation(),o.navigate({to:"/profile/$address",params:{address:n}})};return e.jsx("div",{className:"hidden justify-between sm:flex",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center overflow-hidden rounded-full bg-gray-600",children:e.jsxs(Be,{className:"h-8 w-8",children:[a&&e.jsx(_e,{src:a,alt:t}),e.jsx(He,{children:t.slice(0,2).toUpperCase()})]})}),e.jsxs("button",{onClick:m,className:"flex w-fit cursor-pointer items-center gap-2 text-gray-400 hover:text-gray-300",children:[e.jsx("span",{className:"w-fit text-sm",children:t}),e.jsx(gs,{type:l})]})]})})}function ys({ipfsHash:t,name:a,chainId:n,logoUrl:l}){const o=m=>qe(m,t);return e.jsxs("div",{className:"relative flex aspect-[4/3] w-full items-center justify-center overflow-hidden rounded-xl bg-[#e8e4d8] sm:aspect-square sm:rounded-[20px]",children:[l?e.jsx("img",{src:l,alt:a+" logo",className:"h-full w-full object-cover"}):t?e.jsx("img",{src:Ue(t)??void 0,alt:a+" logo",className:"h-full w-full object-cover",onError:o}):e.jsx("svg",{className:"h-16 w-16 text-gray-500 sm:h-32 sm:w-32",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),n&&(()=>{const i=ss.find(g=>g.id===n)?.name||`Chain ${n}`;return e.jsx(ve,{children:e.jsxs(je,{children:[e.jsx(we,{asChild:!0,children:e.jsx("div",{className:"absolute right-1 bottom-1 h-5 w-5 overflow-hidden rounded-full border-2 border-white bg-white shadow-md sm:right-2 sm:bottom-2 sm:h-8 sm:w-8",children:e.jsx("img",{src:`/chains/${n}.svg`,alt:`Chain ${n}`,className:"h-full w-full object-cover"})})}),e.jsx(Ne,{className:"z-20 border-gray-700 bg-gray-900 text-white",children:e.jsx("p",{children:i})})]})})})()]})}function vs({symbol:t,name:a,holders:n,holdersDown:l,holdersUp:o,tradesPercentage:m,marketCap:i}){return e.jsxs("div",{className:"space-y-1 sm:space-y-3",children:[e.jsx("span",{className:"line-clamp-1 text-sm font-bold sm:text-2xl",children:a}),e.jsxs("div",{className:"flex items-center justify-between sm:flex-col sm:items-start sm:gap-3",children:[e.jsxs("span",{className:"text-xs text-gray-400 sm:text-base",children:[e.jsxs("span",{className:"sm:hidden",children:["$",t]}),e.jsxs("span",{className:"hidden sm:inline",children:["Ticker: ",e.jsxs("span",{className:"font-bold text-white",children:["$",t]})]})]}),e.jsxs("div",{className:"flex items-center gap-1 sm:w-full sm:justify-between",children:[e.jsx("span",{className:"text-xs font-bold sm:text-base sm:font-bold",children:"Market Cap"}),e.jsx("span",{className:"text-xs font-bold sm:text-base",children:i})]})]})]})}function js({progress:t}){return e.jsxs("div",{className:"flex flex-col gap-0.5 sm:gap-2",children:[e.jsx("div",{className:"relative h-1.5 w-full overflow-hidden rounded-full bg-gray-700 sm:h-5",children:e.jsx("div",{className:"h-full bg-[#0f0] transition-all duration-300",style:{width:`${t}%`}})}),e.jsxs("div",{className:"hidden text-center text-sm font-bold sm:block",children:[t,"%"]})]})}function ws({type:t}){return e.jsxs("div",{className:y("absolute top-1 left-1 z-10 flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-bold backdrop-blur-sm sm:top-2 sm:left-2 sm:px-2 sm:py-1 sm:text-xs",t==="buy"?"bg-green-500/90 text-white":"bg-red-500/90 text-white"),children:[t==="buy"?e.jsx(as,{className:"h-2.5 w-2.5 sm:h-3 sm:w-3"}):e.jsx(rs,{className:"h-2.5 w-2.5 sm:h-3 sm:w-3"}),e.jsx("span",{className:"hidden sm:inline",children:t==="buy"?"BUY":"SELL"})]})}function Ns({type:t}){return e.jsx("div",{className:y("absolute top-[30%] -right-1.5 z-10 h-[80px] w-[16px] rounded-lg",t==="verified"?"bg-blue-500":"bg-orange-500")})}const ks=r.forwardRef(function({contractAddress:a="0x019490...",name:n,symbol:l,supply:o,creator:m="0x019490...",creatorDisplayName:i="",creatorImage:g,deployerType:d="regular",ipfsHash:j,logoUrl:b,devStars:w=0,devStarsBreakdown:u,timestamp:h="1d ago",holders:f=236,holdersDown:N=3,holdersUp:I=90,tradesPercentage:E=-2.2,marketCap:W="$30.23K",progress:H=0,chainId:S,animation:k="none",lastTradeType:P,onAnimationEnd:O,className:K,overrideLink:A=!1,isWatching:$,showWatchlist:V=!1},Y){const R={none:"",nudge:"animate-nudge","pulse-buy":"animate-pulse-buy","pulse-sell":"animate-pulse-sell",promoted:"animate-promoted"},Z={regular:"border-gray-700 hover:border-gray-600",verified:"border-blue-500 hover:border-blue-400",kol:"border-orange-500 hover:border-orange-400"};return e.jsx("div",{ref:Y,className:y("relative transition-transform duration-150 ease-out will-change-transform hover:scale-[1.02] hover:rotate-1",K),children:e.jsx(ze,{to:A?"/mafia":"/token/$address",params:A?void 0:{address:a},children:e.jsxs(ye,{className:y("flex h-full w-full max-w-[600px] flex-col gap-0.5 overflow-hidden rounded-xl bg-[#1a1f2e] text-white transition-all duration-150 hover:shadow-lg sm:gap-2 sm:rounded-[24px]","border sm:border-2",Z[d],R[k],k==="pulse-buy"&&"ring-2 ring-green-500/50",k==="pulse-sell"&&"ring-2 ring-red-500/50",k==="promoted"&&"shadow-lg ring-2 shadow-yellow-500/20 ring-yellow-500/70"),onAnimationEnd:O,children:[k!=="none"&&P&&e.jsx(ws,{type:P}),V&&e.jsx("div",{className:"absolute top-1 right-1 z-10 sm:top-2 sm:right-2",children:e.jsx(ts,{tokenAddress:a,size:"sm",initialIsWatching:$})}),(d==="verified"||d==="kol")&&e.jsx(Ns,{type:d}),e.jsxs("div",{className:"flex flex-col gap-2 p-2 sm:gap-4 sm:p-4",children:[e.jsx(bs,{creatorDisplayName:i||`${m.slice(0,6)}...${m.slice(-4)}`,creatorImage:g,creator:m,type:d}),e.jsx(ys,{ipfsHash:j,name:n,chainId:S,logoUrl:b})]}),e.jsxs("div",{className:"hidden items-center justify-between bg-gray-900 px-4 py-2 sm:flex",children:[e.jsx(es,{stars:w??0,showTooltip:!!u,breakdown:u,size:"md"}),e.jsx("span",{className:"text-base font-semibold text-gray-300",children:h})]}),e.jsxs("div",{className:"flex h-full flex-1 flex-col justify-end gap-1.5 p-2 pt-0 sm:gap-4 sm:p-4 sm:pt-4",children:[e.jsx(vs,{symbol:l,holders:f,name:n,holdersDown:N,holdersUp:I,tradesPercentage:E,marketCap:W}),e.jsx(js,{progress:H})]})]})})})});function Cs(){return e.jsxs(ye,{className:"min-h-[200px] w-full bg-white p-4 animate-pulse",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("div",{className:"h-16 w-16 rounded-lg bg-gray-200"}
1),e.jsx("div",{className:"h-4 w-4 rounded-full bg-gray-200"})]}),e.jsxs("div",{className:"mt-4 space-y-2",children:[e.jsx("div",{className:"h-4 w-1/2 rounded bg-gray-200"}),e.jsx("div",{className:"h-3 w-1/3 rounded bg-gray-200"})]}),e.jsx("div",{className:"mt-4 h-3 w-1/4 rounded bg-gray-200"}),e.jsxs("div",{className:"mt-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"h-3 w-1/4 rounded bg-gray-200"}),e.jsx("div",{className:"h-3 w-1/6 rounded bg-gray-200"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"h-3 w-1/5 rounded bg-gray-200"}),e.jsx("div",{className:"h-3 w-1/6 rounded bg-gray-200"})]})]})]})}function Ts(t){const a=parseFloat(t)/1e18;return a>=1e5?"whale":a>=1e4?"large":a>=1e3?"medium":"small"}function he(t){return{tokenAddress:t.bondingCurve_id,tokenName:t.bondingCurve?.name||"Unknown",tokenSymbol:t.bondingCurve?.symbol||"???",ipfsHash:t.imageUrl||null,chainId:t.bondingCurve?.chainId||369,trader:t.trader,tradeType:t.isBuy?"buy":"sell",plsAmount:t.plsAmount,tokenAmount:t.tokenAmount,price:t.price,txHash:t.txHash,timestamp:new Date(t.timestamp*1e3).toISOString(),tradeSize:Ts(t.plsAmount)}}function Ss({enabled:t=!0,onTrade:a}={}){const[n,l]=r.useState(!1),[o,m]=r.useState(null),[i,g]=r.useState([]),d=r.useRef(new Set),j=r.useRef(!1),b=r.useRef(a);b.current=a;const w=r.useCallback(u=>{if(d.current.has(u.id))return;d.current.add(u.id);const h=he(u);m(h),g(f=>[h,...f].slice(0,50)),b.current?.(h)},[]);return r.useEffect(()=>{if(!t||j.current)return;(async()=>{try{const h=await ls(20),f=h.map(he);h.forEach(I=>d.current.add(I.id)),g(f);const[N]=f;N&&m(N),j.current=!0}catch(h){console.error("Failed to load initial trades:",h)}})()},[t]),r.useEffect(()=>{if(!t)return;const u=ns(w,()=>l(!1),()=>l(!0));return()=>{u(),l(!1)}},[t,w]),{isConnected:n,lastTrade:o,recentTrades:i}}const ne=20,As=1e4,U=[{value:"lastTradeAt",label:"Recent Activity"},{value:"createdAt",label:"Newest"},{value:"marketCapUSD",label:"Market Cap"},{value:"tradeCount",label:"Most Traded"},{value:"holderCount",label:"Most Holders"}],G=[{value:"all",label:"All Tokens"},{value:"bonding",label:"Bonding Curve"},{value:"graduated",label:"Graduated"}],Q=[{value:"all",label:"All Chains",chainId:void 0},...Ve.map(t=>({value:String(t.id),label:t.name,chainId:t.id}))],Ms=(t,a)=>t*a,Ps=async(t,a,n,l,o,m)=>{const i=Ms(t,a),g=a,d=l==="all"?void 0:l==="graduated",j=o==="all"?void 0:Number(o);return Xe({data:{offset:i,limit:g,search:m||void 0,sortBy:n,sortDirection:"desc",graduated:d,chainId:j}})},Rs=(t,a,n,l,o,m)=>Ze({queryKey:["tokens",t,n,l,o,m],queryFn:()=>Ps(t,a,n,l,o,m),placeholderData:Je,staleTime:2e3});function _s(){const t=Qe(),[a,n]=_("page",We.withDefault(1)),[l]=_("search",Ke.withDefault("")),[o,m]=_("sort",ae(U.map(s=>s.value)).withDefault("lastTradeAt")),[i,g]=_("filter",ae(G.map(s=>s.value)).withDefault("all")),[d,j]=_("chain",ae(Q.map(s=>s.value)).withDefault("all")),[b,w]=r.useState(!1),[u,h]=r.useState(!1),[f,N]=r.useState(!1),[I,E]=r.useState(!1),[W,H]=r.useState({}),[S,k]=r.useState([]),{data:P,isPending:O,isError:K,isPlaceholderData:A}=Rs(Math.max(0,a-1),ne,o,i,d,l||void 0),$=r.useRef(null),V=r.useCallback(s=>{const c=s.tokenAddress.toLowerCase(),p=parseFloat(s.plsAmount)/1e18>=As;let L="nudge";s.tradeSize==="whale"||s.tradeSize==="large"?L="promoted":s.tradeType==="buy"?L="pulse-buy":L="pulse-sell",H(x=>({...x,[c]:{animation:L,lastTradeType:s.tradeType}})),p&&a===1&&(k(x=>{const M=x.filter(v=>v!==c);return[c,...M].slice(0,3)}),setTimeout(()=>{k(x=>x.filter(M=>M!==c))},1e4));let F=!1;o==="lastTradeAt"&&a===1?t.setQueryData(["tokens",1,o,i,d,l||void 0],x=>{if(!x)return x;const M=Math.floor(Date.now()/1e3),v=[...x.tokens],T=v.findIndex(B=>B.address.toLowerCase()===c);if(T>-1){const B=v[T];B&&(F=!0,v.splice(T,1),v.unshift({...B,lastTradeAt:M,tradeCount:(B.tradeCount||0)+1}))}return{...x,tokens:v}}):t.setQueryData(["tokens",a,o,i,d,l||void 0],x=>{if(!x)return x;const M=Math.floor(Date.now()/1e3),v=x.tokens.map(T=>T.address.toLowerCase()===c?(F=!0,{...T,lastTradeAt:M,tradeCount:(T.tradeCount||0)+1}):T);return{...x,tokens:v}});const te=F?1e4:2e3;$.current&&clearTimeout($.current),$.current=setTimeout(()=>{t.invalidateQueries({queryKey:["tokens"]})},te)},[a,t,o,i,d,l]),{isConnected:Y,lastTrade:R}=Ss({enabled:!0,onTrade:V}),Z=r.useCallback(s=>{H(c=>({...c,[s]:{animation:"none"}}))},[]),oe=r.useRef(l),ie=r.useRef(o),de=r.useRef(i),ce=r.useRef(d);r.useEffect(()=>{const s=oe.current!==l,c=ie.current!==o,C=de.current!==i,p=ce.current!==d;(s||c||C||p)&&(n(1),oe.current=l,ie.current=o,de.current=i,ce.current=d)},[l,o,i,d,n]),r.useEffect(()=>{const s=()=>{w(!1),h(!1),N(!1)};
1if(b||u||f)return document.addEventListener("click",s),()=>document.removeEventListener("click",s)},[b,u,f]);const me=r.useRef(0),q=P?.pagination.total??0;q>0&&(me.current=q);const D=q>0?q:me.current,J=r.useMemo(()=>{const s=P?.tokens??[];if(S.length===0)return s;const c=[],C=[];for(const p of s)S.includes(p.address.toLowerCase())?c.push(p):C.push(p);return c.sort((p,L)=>{const F=S.indexOf(p.address.toLowerCase()),te=S.indexOf(L.address.toLowerCase());return F-te}),[...c,...C]},[P?.tokens,S]),z=r.useMemo(()=>D?Math.max(1,Math.ceil(D/ne)):1,[D]),ue=r.useMemo(()=>a<z,[a,z]);r.useEffect(()=>{!A&&!O&&D>0&&a>z&&n(1)},[D,a,z,n,A,O]);const Ae=()=>{n(s=>Math.max(1,s-1))},Me=()=>{!A&&ue&&n(s=>s+1)},X=s=>{m(s),w(!1)},ee=s=>{g(s),h(!1)},se=s=>{j(s),N(!1)},Pe=U.find(s=>s.value===o)?.label||"Recent Activity",Re=G.find(s=>s.value===i)?.label||"All Tokens",De=Q.find(s=>s.value===d)?.label||"All Chains";return e.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-2 py-8 sm:gap-8 sm:px-8 sm:py-16",children:[!1,e.jsxs("div",{className:"flex w-full max-w-screen-2xl flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex w-full items-center justify-between gap-3 sm:w-auto sm:justify-start sm:gap-4",children:[e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:Y?e.jsxs(e.Fragment,{children:[e.jsx(us,{className:"h-4 w-4 text-green-500"}),e.jsx("span",{className:"text-xs text-green-500",children:"Live"})]}):e.jsxs(e.Fragment,{children:[e.jsx(cs,{className:"h-4 w-4 text-gray-500"}),e.jsx("span",{className:"text-xs text-gray-500",children:"Connecting..."})]})}),e.jsxs("button",{onClick:()=>E(!0),className:"flex min-h-[44px] items-center gap-2 rounded-lg bg-gray-800 px-3 py-2 text-sm text-gray-200 transition-colors hover:bg-gray-700 sm:hidden",children:[e.jsx(is,{className:"h-4 w-4"}),e.jsx("span",{children:"Filters"}),(o!=="lastTradeAt"||i!=="all"||d!=="all")&&e.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-green-500 text-xs font-medium text-black",children:[o!=="lastTradeAt",i!=="all",d!=="all"].filter(Boolean).length})]}),e.jsxs("div",{className:"hidden gap-3 sm:flex",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:s=>{s.stopPropagation(),w(!b)},className:"flex min-h-[44px] items-center gap-2 rounded-lg bg-gray-800 px-3 py-2 text-sm text-gray-200 transition-colors hover:bg-gray-700",children:[e.jsx("span",{className:"text-gray-400",children:"Sort:"}),e.jsx("span",{children:Pe}),e.jsx(re,{className:`h-4 w-4 shrink-0 transition-transform ${b?"rotate-180":""}`})]}),b&&e.jsx("div",{className:"absolute top-full left-0 z-50 mt-1 min-w-[160px] overflow-hidden rounded-lg border border-gray-700 bg-gray-800 shadow-lg",children:U.map(s=>e.jsx("button",{onClick:c=>{c.stopPropagation(),X(s.value)},className:`min-h-[44px] w-full px-3 py-3 text-left text-sm transition-colors hover:bg-gray-700 ${o===s.value?"bg-gray-700/50 text-green-400":"text-gray-200"}`,children:s.label},s.value))})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:s=>{s.stopPropagation(),h(!u)},className:"flex min-h-[44px] items-center gap-2 rounded-lg bg-gray-800 px-3 py-2 text-sm text-gray-200 transition-colors hover:bg-gray-700",children:[e.jsx("span",{className:"text-gray-400",children:"Filter:"}),e.jsx("span",{children:Re}),e.jsx(re,{className:`h-4 w-4 shrink-0 transition-transform ${u?"rotate-180":""}`})]}),u&&e.jsx("div",{className:"absolute top-full left-0 z-50 mt-1 min-w-[160px] overflow-hidden rounded-lg border border-gray-700 bg-gray-800 shadow-lg",children:G.map(s=>e.jsx("button",{onClick:c=>{c.stopPropagation(),ee(s.value)},className:`min-h-[44px] w-full px-3 py-3 text-left text-sm transition-colors hover:bg-gray-700 ${i===s.value?"bg-gray-700/50 text-green-400":"text-gray-200"}`,children:s.label},s.value))})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:s=>{s.stopPropagation(),N(!f)},className:"flex min-h-[44px] items-center gap-2 rounded-lg bg-gray-800 px-3 py-2 text-sm text-gray-200 transition-colors hover:bg-gray-700",children:[e.jsx("span",{className:"text-gray-400",children:"Chain:"}),e.jsx("span",{children:De}),e.jsx(re,{className:`h-4 w-4 shrink-0 transition-transform ${f?"rotate-180":""}`})]}),f&&e.jsx("div",{className:"absolute top-full left-0 z-50 mt-1 max-h-[300px] min-w-[160px] overflow-y-auto rounded-lg border border-gray-700 bg-gray-800 shadow-lg",children:Q.map(s=>e.jsx("button",{onClick:c=>{c.stopPropagation(),se(s.value)},className:`min-h-[44px] w-full px-3 py-3 text-left text-sm transition-colors hover:bg-gray-700 ${d===s.value?"bg-gray-700/50 text-green-400":"text-gray-200"}`,children:s.label},s.value))})]})]})]}),e.jsx(xs,{open:I,onOpenChange:E,children:e.jsxs(Ce,{side:"right",className:"w-[280px] border-gray-800 bg-gray-900 p-0 sm:hidden",children:[e.jsx(Te,{className:"border-b border-gray-800 px-4 py-4",children:e.jsx(Se,{className:"text-white",children:"Filters"})}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"Sort By"}),e.jsx("div",{className:"flex flex-col gap-1",children:U.map(s=>e.jsx("button",{onClick:()=>{X(s.value)},className:`rounded-lg px-3 py-3 text-left text-sm transition-colors ${o===s.value?"bg-green-500/20 text-green-400":"text-gray-200 hover:bg-gray-800"}`,children:s.label},s.value))})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"Token Status"}),e.jsx("div",{className:"flex flex-col gap-1",children:G.map(s=>e.jsx("button",{onClick:()=>{ee(s.value)},className:`rounded-lg px-3 py-3 text-left text-sm transition-colors ${i===s.value?"bg-green-500/20 text-green-400":"text-gray-200 hover:bg-gray-800"}`,children:s.label},s.value))})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"Chain"}),e.jsx("div",{className:"flex flex-col gap-1",children:Q.map(s=>e.jsx("button",{onClick:()=>{se(s.value)},className:`rounded-lg px-3 py-3 text-left text-sm transition-colors ${d===s.value?"bg-green-500/20 text-green-400":"text-gray-200 hover:bg-gray-800"}`,children:s.label},s.value))})]})]}),e.jsx("div",{className:"absolute inset-x-0 bottom-0 border-t border-gray-800 bg-gray-900 p-4",children:e.jsx("button",{onClick:()=>{X("lastTradeAt"),ee("all"),se("all"),E(!1)},className:"w-full rounded-lg bg-gray-800 px-4 py-3 text-sm font-medium text-gray-200 transition-colors hover:bg-gray-700",children:"Reset All Filters"})})]})}),R&&e.jsxs("div",{className:"hidden items-center gap-2 text-xs text-gray-400 sm:flex",children:[e.jsx("span",{children:"Last trade:"}),e.jsxs("span",{className:R.tradeType==="buy"?"text-green-500":"text-red-500",children:[R.tradeType.toUpperCase()," $",R.tokenSymbol]})]})]}),e.jsx("div",{className:"grid w-full max-w-screen-2xl grid-cols-2 gap-2 sm:gap-3 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",children:O?Array.from({length:ne}).map((s,c)=>e.jsx(Cs,{},c)):K?e.jsx("div",{className:"col-span-full text-center text-red-500",children:"Error loading tokens"}):J&&J.length>0?J.map((s,c)=>{const C=s.address.toLowerCase(),p=W[C];return e.jsx(ks,{contractAddress:s.address,name:s.name,creatorDisplayName:s.creatorDisplayName,creatorImage:s.creatorImage,deployerType:s.creatorType,symbol
1:s.symbol,supply:s.totalSupply,creator:s.creator,ipfsHash:s.ipfsHash??"",chainId:s.chainId,progress:s.isBondingCurve?s.progress:void 0,marketCap:s.isBondingCurve?s.marketCap:void 0,devStars:s.devStars??0,devStarsBreakdown:s.devStarsBreakdown,timestamp:Ye(s.createdAt),animation:p?.animation??"none",lastTradeType:p?.lastTradeType,onAnimationEnd:()=>Z(C),className:"h-full"},s.address)}):e.jsx("div",{className:"col-span-full text-center text-gray-500",children:l?`No tokens found for "${l}"`:"No tokens found"})}),e.jsxs("div",{className:"flex w-full items-center justify-center gap-2 sm:gap-4",children:[e.jsxs(xe,{onClick:Ae,disabled:a<=1,className:"min-h-[44px] px-3 text-sm sm:px-4",children:[e.jsx("span",{className:"hidden sm:inline",children:"Previous Page"}),e.jsx("span",{className:"sm:hidden",children:"Prev"})]}),e.jsxs("span",{className:"min-w-[60px] text-center text-sm sm:min-w-[80px]",children:[a," / ",D>0?z:1]}),e.jsxs(xe,{onClick:Me,disabled:A||!ue,className:"min-h-[44px] px-3 text-sm sm:px-4",children:[e.jsx("span",{className:"hidden sm:inline",children:"Next Page"}),e.jsx("span",{className:"sm:hidden",children:"Next"})]})]})]})}export{_s as A};
2//# sourceMappingURL=token-grid-D9EqatG9.js.map

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.