1import{r,c as R,a as q,s as C,j as e,y as Z,G as z,F as H,E as J,h as Q,bp as K,Q as F}from"./index-DocTL6Xp.js";import{P as V,a as X,b as S,c as Y,d as ee,e as te,f as se}from"./pagination-v-dvXuWQ.js";import"./chevron-left-DuzCoyNm.js";const s={bg:"#FAF9F5",surface:"#FFFFFF",ink:"#1A1A1A",inkMuted:"#6B6B68",accent:"#2563EB",border:"#E8E5DD",borderStrong:"#D8D3C5"},ne=({endTime:h})=>{const[c,j]=r.useState(null);return r.useEffect(()=>{if(!h)return;const b=()=>{const m=new Date(h).getTime()-Date.now();if(m<=0)return j({days:0,hours:0,minutes:0,seconds:0});j({days:Math.floor(m/864e5),hours:Math.floor(m%864e5/36e5),minutes:Math.floor(m%36e5/6e4),seconds:Math.floor(m%6e4/1e3)})};b();const w=setInterval(b,1e3);return()=>clearInterval(w)},[h]),c?!c.days&&!c.hours&&!c.minutes&&!c.seconds?e.jsx("span",{className:"text-xs font-medium",style:{color:s.inkMuted},children:"Ended"}):e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-mono",style:{color:s.ink},children:[e.jsx(K,{className:"w-3 h-3"}),c.days,"d ",c.hours,"h ",c.minutes,"m ",c.seconds,"s"]}):e.jsx("span",{className:"text-xs",style:{color:s.inkMuted},children:"-"})};function le(){const[h,c]=r.useState(null),[j,b]=r.useState(!0),[w,N]=r.useState([]),[m,M]=r.useState("time_desc"),[p,L]=r.useState(""),[g,$]=r.useState("all"),[I,P]=r.useState([]),[D,T]=r.useState({});r.useState(null);const[l,y]=r.useState(1),[u,B]=r.useState(50),_=R();q(h);const k={background:s.surface,color:s.ink,border:`1px solid ${s.borderStrong}`,borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.08)"},G={success:(t,n)=>F.success(t,{description:n,style:k}),error:(t,n)=>F.error(t,{description:n,style:k}),info:(t,n)=>F.info(t,{description:n,style:k})};r.useEffect(()=>{document.title="Top 100 Gname Auctions - GoExpired.com"},[]),r.useEffect(()=>{(async()=>{const{data:{user:n}}=await C.auth.getUser();c(n||null),n&&await U(n.id),await E(),b(!1)})()},[]),r.useEffect(()=>{y(1)},[p,m,g]),r.useEffect(()=>{const t=setInterval(()=>{const a=Date.now();N(o=>{const d=o.filter(i=>i.end_time&&new Date(i.end_time).getTime()>a);return d.length===o.length?o:d})},1e3),n=setInterval(()=>{E()},6e4);return()=>{clearInterval(t),clearInterval(n)}},[]);const U=async t=>{const{data:n}=await C.from("user_appraisal_history").select("domain, appraisal_value, appraisal_source").eq("user_id",t).order("appraised_at",{ascending:!1}).limit(1e3);if(!n)return;const a={};for(const o of n){const d=(o.domain||"").toLowerCase().trim();d&&!a[d]&&(a[d]={value:Number(o.appraisal_value),source:o.appraisal_source||"AI Assistant"})}T(a)},E=async()=>{try{const t=new Date().toISOString(),{data:n,error:a}=await C.from("gname_auctions").select("domain, url, end_time").gt("end_time",t).order("end_time",{ascending:!0,nullsFirst:!1}).limit(100);if(a)throw a;const o=(n||[]).map(i=>({domain:i.domain,url:i.url,end_time:i.end_time,length:i.domain?String(i.domain).split(".")[0].length:null,description:null})),d=Array.from(new Set(o.map(i=>i.length).filter(i=>i!=null))).sort((i,O)=>i-O);P(d),N(o)}catch(t){console.error(t),G.error("Failed to load Gname auctions")}},f=r.useMemo(()=>{let t=[...w];if(p.trim()&&(t=t.filter(n=>n.domain.toLowerCase().includes(p.toLowerCase()))),g!=="all"){const n=parseInt(g);t=t.filter(a=>a.length===n)}return t.sort((n,a)=>{const o=n.end_time?new Date(n.end_time).getTime():0,d=a.end_time?new Date(a.end_time).getTime():0;switch(m){case"alphabetical_asc":return n.domain.localeCompare(a.domain);case"alphabetical_desc":return a.domain.localeCompare(n.domain);case"time_asc":return d-o;case"time_desc":return o-d;case"length_asc":return(n.length||0)-(a.length||0);case"length_desc":return(a.length||0)-(n.length||0)}return 0}),t},[w,p,m,g]),x=u==="all"?1:Math.ceil(f.length/u),A=u==="all"?f:f.slice((l-1)*u,l*u),W=()=>{const t=[];if(x<=7)for(let n=1;n<=x;n++)t.push(n);else{t.push(1),l>3&&t.push("ellipsis");const n=Math.max(2,l-1),a=Math.min(x-1,l+1);for(let o=n;o<=a;o++)t.push(o);l<x-2&&t.push("ellipsis"),t.push(x)}return t};if(j)return e.jsx("div",{style:{backgroundColor:s.bg,color:s.inkMuted},className:"min-h-screen flex items-center justify-center",children:e.jsx(Z,{className:"h-8 w-8 animate-spin"})});const v={backgroundColor:s.surface,border:`1px solid ${s.border}`,color:s.ink};return e.jsxs("div",{style:{backgroundColor:s.bg,color:s.ink,fontFamily:"'Inter', system-ui, sans-serif"},className:"min-h-screen",children:[e.jsx(z,{}),e.jsxs("main",{children:[e.jsxs("section",{className:"max-w-7xl mx-auto px-6 md:px-8 pt-16 md:pt-20 pb-10",children:[e.jsxs("h1",{className:"text-5xl md:text-6xl leading-[1.05] tracking-tight mb-4 flex flex-col md:flex-row md:items-center gap-x-3",style:{fontFamily:"'Cormorant', serif",fontWeight:600},children:[e.jsx("span",{children:"Top 100 Gname Expired Auctions"}),e.jsx("span",{className:"inline-flex items-center rounded px-2 py-0.5 text-xs font-bold tracking-wider up
1percase border w-fit",style:{backgroundColor:"#EFF6FF",color:"#2563EB",borderColor:"#BFDBFE",fontFamily:"'Inter', sans-serif"},children:"BETA"})]}),e.jsxs("p",{className:"text-lg max-w-2xl",style:{color:s.inkMuted,fontFamily:"'Cormorant', serif",fontWeight:500},children:["We review thousands of Gname auctions and only surface the 100 most promising opportunities."," ","Don't have a Gname account yet?"," ",e.jsx("a",{href:"https://www.gname.com/register?lang=us&tt=357460&ttbj=",target:"_blank",rel:"noopener noreferrer",className:"underline",style:{color:"#2563EB"},children:"Register here"}),"."]})]}),e.jsx("section",{className:"max-w-7xl mx-auto px-6 md:px-8 pb-24",children:h?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 rounded-full flex-1 min-w-[240px]",style:v,children:[e.jsx(H,{className:"w-4 h-4",style:{color:s.inkMuted}}),e.jsx("input",{type:"text",value:p,onChange:t=>L(t.target.value),placeholder:"Search domainsâ¦",className:"bg-transparent outline-none text-sm flex-1",style:{color:s.ink}})]}),e.jsxs("select",{value:g,onChange:t=>$(t.target.value),className:"px-4 py-2.5 rounded-full text-sm outline-none cursor-pointer",style:v,children:[e.jsx("option",{value:"all",children:"Any length"}),I.map(t=>e.jsxs("option",{value:String(t),children:[t," ",t===1?"char":"chars"]},t))]}),e.jsxs("select",{value:m,onChange:t=>M(t.target.value),className:"px-4 py-2.5 rounded-full text-sm outline-none cursor-pointer",style:v,children:[e.jsx("option",{value:"time_desc",children:"Ending soon"}),e.jsx("option",{value:"time_asc",children:"Ending later"}),e.jsx("option",{value:"alphabetical_asc",children:"A-Z"}),e.jsx("option",{value:"alphabetical_desc",children:"Z-A"}),e.jsx("option",{value:"length_asc",children:"Length: Short to long"}),e.jsx("option",{value:"length_desc",children:"Length: Long to short"})]}),e.jsxs("select",{value:String(u),onChange:t=>{B(t.target.value==="all"?"all":parseInt(t.target.value)),y(1)},className:"px-4 py-2.5 rounded-full text-sm outline-none cursor-pointer",style:v,children:[e.jsx("option",{value:"25",children:"25 per page"}),e.jsx("option",{value:"50",children:"50 per page"}),e.jsx("option",{value:"100",children:"100 per page"}),e.jsx("option",{value:"all",children:"Show all"})]})]}),e.jsxs("p",{className:"text-sm mb-6",style:{color:s.inkMuted},children:[u==="all"?`Showing all ${f.length} live auctions`:`Showing ${(l-1)*u+1}-${Math.min(l*u,f.length)} of ${f.length} live auctions (Page ${l} of ${x})`,p&&` matching "${p}"`]}),A.length===0?e.jsxs("div",{className:"text-center py-20 rounded-2xl",style:{backgroundColor:s.surface,border:`1px solid ${s.border}`},children:[e.jsx("h3",{className:"text-2xl mb-2",style:{fontFamily:"'Cormorant', serif",fontWeight:600},children:"No auctions found"}),e.jsx("p",{className:"text-sm",style:{color:s.inkMuted},children:p?"Try adjusting your search criteria.":"No live auctions are currently available."})]}):e.jsx("div",{className:"rounded-2xl overflow-hidden",style:{backgroundColor:s.surface,border:`1px solid ${s.border}`},children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{style:{backgroundColor:"#F5F2EA",borderBottom:`1px solid ${s.border}`,color:s.inkMuted},children:[e.jsx("th",{className:"text-left font-medium px-4 py-3",children:"Domain"}),e.jsx("th",{className:"text-left font-medium px-4 py-3 whitespace-nowrap",children:"Appraise"}),e.jsx("th",{className:"text-left font-medium px-4 py-3 whitespace-nowrap",children:"Time left"})]})}),e.jsx("tbody",{children:A.map((t,n)=>{const a=D[t.domain.toLowerCase()];return e.jsxs("tr",{style:{borderBottom:`1px solid ${s.border}`},className:"hover:bg-[#FAF7EF] transition-colors",children:[e.jsx("td",{className:"px-4 py-3",children:t.url?e.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 font-medium hover:underline",style:{color:s.accent},children:[e.jsx("span",{className:"truncate max-w-[200px]",children:t.domain}),e.jsx(J,{className:"w-3 h-3 opacity-60"})]}):e.jsx("span",{className:"font-medium",children:t.domain})}),e.jsx("td",{className:"px-4 py-3 whitespace-nowrap",children:e.jsx("div",{className:"inline-flex items-center gap-2",children:a?e.jsxs("span",{className:"font-semibold",style:{color:s.accent}
1,children:["$",a.value.toLocaleString()]}):e.jsx("a",{href:`/appraise-your-domain?domain=${encodeURIComponent(t.domain)}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs hover:underline",style:{color:s.accent},children:"Appraise"})})}),e.jsx("td",{className:"px-4 py-3 whitespace-nowrap",children:e.jsx(ne,{endTime:t.end_time})})]},`${t.domain}-${n}`)})})]})})}),u!=="all"&&x>1&&e.jsx("div",{className:"flex justify-center mt-8",children:e.jsx(V,{children:e.jsxs(X,{children:[e.jsx(S,{children:e.jsx(Y,{onClick:()=>{l>1&&(y(l-1),window.scrollTo({top:0,behavior:"smooth"}))},className:l===1?"pointer-events-none opacity-50":"cursor-pointer"})}),W().map((t,n)=>e.jsx(S,{children:t==="ellipsis"?e.jsx(ee,{}):e.jsx(te,{onClick:()=>{y(t),window.scrollTo({top:0,behavior:"smooth"})},isActive:l===t,className:"cursor-pointer",children:t})},n)),e.jsx(S,{children:e.jsx(se,{onClick:()=>{l<x&&(y(l+1),window.scrollTo({top:0,behavior:"smooth"}))},className:l===x?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]}):e.jsxs("div",{className:"rounded-3xl p-10 md:p-14 text-center max-w-3xl mx-auto",style:{backgroundColor:s.surface,border:`1px solid ${s.border}`,boxShadow:"0 12px 40px rgba(0,0,0,0.06)"},children:[e.jsx("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium mb-6",style:{backgroundColor:"#EEF2FF",color:s.accent},children:"Free account required"}),e.jsx("h2",{className:"text-4xl md:text-5xl leading-[1.05] tracking-tight mb-4",style:{fontFamily:"Cormorant, serif",fontWeight:600},children:"Unlock Gname auctions."}),e.jsx("p",{className:"text-lg mb-8 max-w-xl mx-auto",style:{color:s.inkMuted,fontFamily:"Cormorant, serif",fontWeight:500},children:"Create a free GoExpired account in seconds and get instant access to our AI-curated list of Gname auctions - searchable, sortable, and updated continuously."}),e.jsx("ul",{className:"text-left max-w-md mx-auto mb-8 space-y-3 text-sm",style:{color:s.ink},children:["Browse every curated Gname auction in one place","Filter by length and time left","One-click straight to the auction page","100% free - no credit card, no commitment"].map(t=>e.jsxs("li",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"inline-flex items-center justify-center w-5 h-5 rounded-full mt-0.5 flex-shrink-0",style:{backgroundColor:s.accent,color:"#fff",fontSize:12},children:"â"}),e.jsx("span",{children:t})]},t))}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[e.jsx("button",{onClick:()=>_("/auth"),className:"px-6 py-3 rounded-full text-sm font-medium transition-opacity hover:opacity-90",style:{backgroundColor:s.accent,color:"#fff"},children:"Create free account"}),e.jsx("button",{onClick:()=>_("/auth"),className:"px-6 py-3 rounded-full text-sm font-medium",style:{border:`1px solid ${s.borderStrong}`,color:s.ink,backgroundColor:s.surface},children:"Sign in"})]}),e.jsx("p",{className:"text-xs mt-6",style:{color:s.inkMuted},children:"Already trusted by 1,900+ domain investors worldwide."})]})})]}),e.jsx(Q,{})]})}export{le as default};
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.