1import{e as N,u as k,b as $,D as S,j as e}from"./index-CiCw9Duq.js";import{r}from"./vendor-i18n-BBu7i065.js";import{b as C,L as _}from"./vendor-react-BL5zx_iT.js";import{c as R}from"./clipboard-CRurzJ4W.js";import{X as T,c as E,z as P,J as D,Q as L}from"./vendor-ui-Ct1FBp4w.js";import"./vendor-solana-BIelvPCZ.js";import"./vendor-supabase-DbyvBBOg.js";const c="limitlessflo_referral_popup_last",O=1440*60*1e3,z=7*O,I=1500,A=["/wallet","/staking","/boost","/marketplace","/services","/dropshipping","/store","/ad"];function U(){const{user:a}=N(),{theme:u}=k(),t=u==="light",{toast:y}=$(),x=C(),[d,m]=r.useState(!1),[i,h]=r.useState(!1),p=r.useRef(null),[l,g]=r.useState(!1),o=a?`https://limitlessflo.com/?ref=${a.username}`:"";r.useEffect(()=>{if(!a)return;const s=x.pathname||"/";if(A.some(j=>s.startsWith(j)))return;const f=localStorage.getItem(c);if(f&&Date.now()-Number(f)<z)return;const v=setTimeout(()=>{m(!0),localStorage.setItem(c,String(Date.now()))},I);return()=>clearTimeout(v)},[a,x.pathname]);const n=()=>{h(!0),localStorage.setItem(c,String(Date.now())),setTimeout(()=>{m(!1),h(!1)},220)},b=async()=>{const s=await R(o);g(s),y({title:s?"Link copied":"Failed to copy"}),s&&setTimeout(()=>g(!1),2e3)},w=async()=>{if(navigator.share)try{await navigator.share({title:"Join LimitlessFlo",text:"Sign up with my link.",url:o})}catch{}else b()};return S(p,d&&!i&&!!a),!d||!a?null:e.jsxs("div",{ref:p,className:`fixed inset-0 z-[55] flex items-center justify-center transition-opacity duration-200 ${i?"opacity-0":"opacity-100"}`,onClick:n,role:"dialog","aria-modal":"true","aria-label":"Referral program",children:[e.jsx("div",{className:`absolute inset-0 backdrop-blur-md ${t?"bg-black/40":"bg-black/80"}`}),e.jsx("div",{className:`relative w-full max-w-[420px] mx-3 rounded-2xl border shadow-[0_20px_50px_-25px_rgba(0,0,0,0.6)] transition-all duration-200 ${t?"border-gray-200 bg-white":"border-white/15 bg-black"} ${i?"translate-y-3 scale-[0.98] opacity-0":""}`,style:i?void 0:{animation:"ref-slide 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards"},onClick:s=>s.stopPropagation(),children:e.jsxs("div",{className:"relative rounded-2xl overflow-hidden",children:[e.jsx("button",{onClick:n,className:`absolute top-3.5 right-3.5 z-10 p-1.5 rounded-md transition-colors ${t?"text-gray-400 hover:text-gray-700 hover:bg-gray-100":"text-white/40 hover:text-white hover:bg-white/5"}`,"aria-label":"Close",children:e.jsx(T,{className:"w-4 h-4"})}),e.jsxs("div",{className:"relative px-6 pt-6 pb-5",children:[e.jsx("div",{className:`text-[10px] font-semibold uppercase tracking-[0.2em] mb-2 ${t?"text-[#1d9bf0]/80":"text-[#7cc4f7]/80"}`,children:"Referral Program"}),e.jsxs("h3",{className:`text-[22px] font-bold tracking-tight leading-tight ${t?"text-gray-900":"text-white"}`,children:["Earn from every signup"," ",e.jsx("span",{className:"bg-clip-text text-transparent",style:{backgroundImage:"linear-gradient(to right, #38bdf8, #60a5fa, #818cf8)"},children:"you bring."})]}),e.jsx("p",{className:`text-[13px] mt-2 leading-relaxed ${t?"text-gray-500":"text-white/50"}`,children:"Three revenue streams. One link."})]}),e.jsxs("div",{className:`relative mx-6 mb-5 rounded-xl overflow-hidden border ${t?"border-gray-200/70":"border-white/[0.08]"}`,children:[e.jsxs("div",{className:`flex items-center justify-between px-4 py-3 ${t?"bg-white":"bg-white/[0.02]"}`,children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:`text-[13px] font-semibold ${t?"text-gray-900":"text-white"}`,children:"Premium"}),e.jsx("div",{className:`text-[11px] mt-0.5 ${t?"text-gray-400":"text-white/35"}`,children:"One-time per signup"})]}),e.jsx("div",{className:`text-[15px] font-semibold tabular-nums ${t?"text-gray-900":"text-white"}`,children:"$1.50"})]}),e.jsx("div",{className:`h-px ${t?"bg-gray-200/70":"bg-white/[0.06]"}`}),e.jsxs("div",{className:`flex items-center justify-between px-4 py-3 ${t?"bg-white":"bg-white/[0.02]"}`,children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:`text-[13px] font-semibold ${t?"text-gray-900":"text-white"}`,children:"Prime"}),e.jsx("div",{className:`text-[11px] mt-0.5 ${t?"text-gray-400":"text-white/35"}`,children:"Recurring monthly"})]}),e.jsxs("div",{className:`text-[15px] font-semibold tabular-nums ${t?"text-gray-900":"text-white"}`,children:["$2.50",e.jsx("span",{className:`text-[10px] font-normal ml-0.5 ${t?"text-gray-400":"text-white/35"}`,children:"/mo"})]})]}),e.jsx("div",{className:`h-px ${t?"bg-gray-200/70":"bg-white/[0.06]"}`}),e.jsx("div",{className:"relative px-4 py-3.5",style:{backgroundImage:t?"linear-gradient(to right, rgba(240,249,255,0.8), rgba(238,242,255,0.4))":"linear-gradient(to right, rgba(14,165,233,0.06), rgba(99,102,241,0.04))"},children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`text-[13px] font-semibold ${t?"text-gray-900":"text-white"}`,children:"Top Referrer Pool"}),e.jsx("span",{className:`text-[9px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded ${t?"bg-[#e0f2fe] text-[#0369a1]":"bg-white/10 text-[#7cc4f7]"}`,children:"Grand Prize"})]}),e.jsx("div",{className:`text-[11px] mt-1 leading-snug ${t?"text-gray-500":"text-white/45"}`,children:"Top referrers split a share of platform revenue for 2 years."})]}),e.jsx("div",{className:`text-[15px] font-semibold tabular-nums shrink-0 ${t?"text-[#0369a1]":"text-[#7cc4f7]"}`,children:"10â20%"})]})})]}),e.jsx("div",{className:"relative px-6 pb-3",children:e.jsxs("div",{className:`flex items-center gap-1 rounded-xl p-1 border ${t?"bg-gray-50 border-gray-200":"bg-white/[0.03] border-white/[0.08]"}`,children:[e.jsx("span",{className:`flex-1 text-[11px] font-mono truncate px-3 select-all ${t?"text-gray-500":"text-white/40"}`,children:o}),e.jsxs("button",{onClick:b,"aria-label":l?"Referral link copied":"Copy referral link",className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[11px] font-semibold transition-all shrink-0 active:scale-95 focus:outline-none focus-visible:ring-2 focus-visible:ring-sky-500/60 ${l?"bg-emerald-500 text-white":t?"bg-white text-gray-700 border border-gray-200 hover:border-gray-300":"bg-white/[0.06] text-white/70 hover:bg-white/[0.1] hover:text-white"}`,children:[l?e.jsx(E,{className:"w-3 h-3"}):e.jsx(P,{className:"w-3 h-3"}),l?"Copied":"Copy"]})]})}),e.jsxs("div",{className:"relative px-6 pb-6 flex gap-2",children:[e.jsx("button",{onClick:w,"aria-label":"Share referral link",className:`relative flex-1 flex items-center justify-center gap-2 py-3 rounded-xl text-[13px] font-semibold transition-all active:scale-[0.98] overflow-hidden group focus:outline-none focus-visible:ring-2 focus-visible:ring-sky-500/60 ${t?"bg-gray-900 text-white hover:bg-black":"bg-white text-black hover:bg-white/90"}`,children:e.jsxs("span",{className:"relative z-10 inline-flex items-center gap-2",children:[e.jsx(D,{className:"w-4 h-4"}),"Share link"]})}),e.jsxs(_,{to:"/ad",onClick:n,className:`flex items-center justify-center gap-1.5 px-4 py-3 rounded-xl text-[13px] font-semibold transition-colors border ${t?"border-gray-200 text-gray-700 hover:bg-gray-50":"border-white/10 text-white/80 hover:bg-white/5 hover:border-white/20"}`,children:["Details",e.jsx(L,{className:"w-3.5 h-3.5"})]})]})]})}),e.jsx("style",{children:`
2 @keyframes ref-slide { 3 from { opacity: 0; transform: translateY(20px) scale(0.97); } 4 to { opacity: 1; transform: translateY(0) scale(1); } 5 } 6 `})]})}export{U 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.