PageSourceSearch

https://extremebargains.uk/assets/Join-5FRJkQ8a.js

js extremebargains.uk collected 2026-10-09 23:06:01 UTC 12,727 bytes, 1 lines download raw bytes

1import{j as e,i as D,l as R,v as y,T,w as G,n as _,o as $,p as V,q as Y,I as k,B as S,m as K,L as Q,g as X,x as Z,r as a,N as ee,s as b,y as se,z as re,t as E}from"./index-Bj3g7Z6n.js";import{S as ae}from"./SEOMetaTags-CXUV2KLP.js";import{t as te}from"./trackAffiliateClick-C4AIHTO8.js";import{u as ne}from"./BotProtection-PCXNABpg.js";import{H as ie}from"./heart-B-4k_9nU.js";import{U as I}from"./users-CwEKp0xP.js";import{L as U}from"./label-ZAJAkNWx.js";import{E as oe}from"./eye-off-D-bE27Zb.js";import{E as le}from"./eye-C93GB6sI.js";const ce=[{icon:T,title:"Daily Deals",description:"Discover amazing new deals every day across all categories. Never miss out on limited-time offers and flash sales."},{icon:G,title:"Price Drop Alerts",description:"Track your favorite products and get instant notifications when prices drop. Save money on items you actually want."},{icon:ie,title:"Wishlists & Boards",description:"Save deals to personalised wishlists and boards. Organise your finds and share them with the community."},{icon:I,title:"Deal Community",description:"Join thousands of bargain hunters sharing deals, tips, and money-saving strategies. Vote on the best deals."},{icon:_,title:"Earn Points & Rewards",description:"Earn points for participating in the community. Redeem points in our shop, enter auctions, and join competitions for prizes."},{icon:T,title:"Budget Planner",description:"Track your spending, set savings goals, and get insights into your deal purchases with our smart budget tools."}],de=()=>e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-3xl font-montserrat font-bold text-foreground mb-4",children:"Why Join Extreme Bargains?"}),e.jsx("p",{className:"text-muted-foreground text-lg",children:"Unlock powerful money-saving tools and join a community dedicated to finding the best deals and maximizing your savings."})]}),e.jsx("div",{className:"grid gap-6",children:ce.map((r,x)=>e.jsx(D,{className:"border-border/50 bg-card/80 backdrop-blur-sm hover:bg-card/90 transition-all duration-200 group",children:e.jsx(R,{className:"p-6",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"p-3 rounded-lg bg-primary/10 text-primary group-hover:bg-primary/20 transition-colors",children:e.jsx(r.icon,{className:"w-6 h-6"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"font-montserrat font-bold text-lg text-foreground mb-2",children:r.title}),e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:r.description})]})]})})},x))}),e.jsxs("div",{className:"bg-accent/50 rounded-lg p-6 mt-8",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx(y,{className:"w-5 h-5 text-primary"}),e.jsx("span",{className:"font-montserrat font-semibold text-foreground",children:"Join thousands of savvy deal hunters"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{className:"w-4 h-4 text-primary"}),e.jsx("span",{children:"Always free to join"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{className:"w-4 h-4 text-primary"}),e.jsx("span",{children:"Trusted by thousands"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{className:"w-4 h-4 text-primary"}),e.jsx("span",{children:"Exclusive deal alerts"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{className:"w-4 h-4 text-primary"}),e.jsx("span",{children:"No spam, ever"})]})]})]})]}),me=({email:r,onEmailChange:x,password:j,onPasswordChange:v,username:t,onUsernameChange:l,displayName:u,onDisplayNameChange:N,showPassword:n,onTogglePassword:p,isSubmitting:f,onSubmit:h,onGoogleSignUp:w,BotProtectionComponent:g})=>e.jsxs("div",{className:"lg:sticky lg:top-24",children:[e.jsxs(D,{className:"shadow-2xl border-0 bg-card/95 backdrop-blur-sm",children:[e.jsxs($,{className:"text-center pb-6",children:[e.jsx(V,{className:"text-3xl font-montserrat font-bold",children:"Create Your Account"}),e.jsx(Y,{className:"text-base",children:"Start saving money with the best deals today"})]}),e.jsxs("form",{onSubmit:h,children:[e.jsxs(R,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(U,{htmlFor:"username",className:"text-sm font-montserrat font-semibold uppercase tracking-wide",children:"Username"}),e.jsx(k,{id:"username",placeholder:"Choose a username",value:t,onChange:c=>{const d=c.target.value;d.includes("@")||l(d)},required:!0,className:"h-11 bg-muted/50 border-border/50 rounded-lg focus:bg-background transition-colors"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(U,{htmlFor:"email",className:"text-sm font-montserrat font-semibold uppercase tracking-wide",children:"Email Address"}),e.jsx(k,{id:"email",type:"email",placeholder:"[email protected]",value:r,onChange:c=>x(c.target.value),required:!0,className:"h-12 bg-muted/50 border-border/50 rounded-lg focus:bg-background transition-colors"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(U,{htmlFor:"password",className:"text-sm font-montserrat font-semibold uppercase tracking-wide",children:"Password"}),e.jsxs("div",{className:"relative",children:[e.jsx(k,{id:"password",type:n?"text":"password",placeholder:"Create a strong password",value:j,onChange:c=>v(c.target.value),required:!0,className:"h-12 bg-muted/50 border-border/50 rounded-lg focus:bg-background transition-colors pr-12"}),e.jsx(S,{type:"button",variant:"ghost",size:"sm",className:"absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 p-0 hover:bg-transparent",onClick:p,children:n?e.jsx(oe,{className:"w-4 h-4"}):e.jsx(le,{className:"w-4 h-4"})})]})]}),g]}),e.jsxs(K,{className:"flex flex-col space-y-4 pt-6",children:[e.jsx(S,{type:"submit",className:"w-full h-12 text-lg font-montserrat font-semibold rounded-pill bg-primary hover:bg-primary/90 transition-all duration-200",disabled:f,children:f?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border-2 border-primary-foreground border-t-transparent roun
1ded-full animate-spin"}),"Creating your account..."]}):"Create My Account"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t border-border"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"Or continue with"})})]}),e.jsxs(S,{type:"button",variant:"outline",className:"w-full h-12 font-montserrat font-semibold rounded-pill hover:bg-muted/50 transition-all duration-200",onClick:w,children:[e.jsxs("svg",{className:"w-5 h-5 mr-2",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Continue with Google"]}),e.jsx("p",{className:"text-xs text-muted-foreground text-center leading-relaxed",children:"By creating an account, you agree to our Terms of Service and Privacy Policy. We'll never share your information or send spam."})]})]})]}),e.jsx("div",{className:"text-center mt-6",children:e.jsxs("p",{className:"text-muted-foreground",children:["Already have an account?"," ",e.jsx(Q,{to:"/signin",className:"text-primary hover:text-primary/80 font-semibold transition-colors",children:"Sign in here"})]})})]});function Ne(){const{user:r,loading:x,signUp:j}=X(),[v]=Z(),t=v.get("ref"),[l,u]=a.useState(null),[N,n]=a.useState(null),[p,f]=a.useState(!1),[h,w]=a.useState(""),[g,c]=a.useState(""),[d,F]=a.useState(""),[C,z]=a.useState(""),[B,J]=a.useState(!1),[H,A]=a.useState(!1),{isHuman:ue,honeypot:L,BotProtectionComponent:M}=ne();if(a.useEffect(()=>{(async()=>{const{data:{user:i}}=await b.auth.getUser();if(i&&p){const s=await se(i.id);s.success||console.error("Failed to process affiliate referral:",s.message)}})()},[r,p]),a.useEffect(()=>{(async()=>{if(!r||!l||p)return;const i=`referral_processed_${r.id}`;if(localStorage.getItem(i)!=="true")try{const{data:s,error:o}=await b.functions.invoke("process-referral",{body:{newUserId:r.id,referrerId:l}});o?console.error("process-referral error:",o):localStorage.setItem(i,"true")}catch(s){console.error("Failed to invoke process-referral:",s)}})()},[r,l,p]),a.useEffect(()=>{(async()=>{if(!t){u(null),n(null),f(!1);return}if(re.debug("Referrer param type:",t.startsWith("aff_")?"affiliate":"user"),t.startsWith("aff_")){f(!0),te(t),n("an affiliate partner");return}const i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t);try{let s=b.from("profiles").select("id, display_name, username");i?s=s.eq("id",t):s=s.ilike("username",t);const{data:o,error:P}=await s.maybeSingle();if(P)console.error("Error looking up referrer:",P),u(null),n(null);else if(o){u(o.id),n(o.display_name||o.username||"Someone");try{localStorage.setItem("pending_referrer_id",o.id)}catch(O){console.warn("Could not persist pending_referrer_id:",O)}}else u(null),n(null)}catch(s){console.error("Error in referrer lookup:",s),u(null),n(null)}})()},[t]),x)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-primary/5 via-background to-secondary/10",children:e.jsxs("div",{className:"flex items-center gap-3 text-lg text-muted-foreground",children:[e.jsx("div",{className:"w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin"}),"Loading..."]})});if(r)return e.jsx(ee,{to:"/",replace:!0});const q=async m=>{if(m.preventDefault(),!h||!g)return;if(L){E.error("Something went wrong. Please try again.");return}if(d.includes("@")){E.error("Username cannot contain @ symbols");return}if(C.includes("@")){E.error("Display name cannot contain @ symbols");return}A(!0);const s={username:d,display_name:C||d};l&&(s.referrer_id=l),await j(h,g,s),A(!1)},W=async()=>{const{error:m}=await b.auth.signInWithOAuth({provider:"google",options:{redirectTo:`${window.location.origin}/`}});m&&console.error("Google sign up error:",m)};return e.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-primary/5 via-background to-secondary/10",children:[e.jsx(ae,{title:"Join Extreme Bargains - Start Saving Money Today",description:"Join Extreme Bargains to discover daily deals, track prices, earn points for rewards, and save money with our deal-hunting community.",keywords:"join extreme bargains, sign up, daily deals, price drops, points rewards, money saving",canonicalUrl:"/join"}),e.jsx("div",{className:"pt-12 pb-12 w-full",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 w-full",children:[N&&e.jsx("div",{className:"mb-8 max-w-2xl mx-auto",children:e.jsxs("div",{className:"bg-gradient-to-r from-primary/10 to-primary/5 border-2 border-primary/20 rounded-lg p-6 text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[e.jsx(I,{className:"w-5 h-5 text-primary"}),e.jsxs("h2",{className:"text-xl font-montserrat font-bold text-foreground",children:["You Have Been Referred By ",N]})]}),e.jsx("p",{className:"text-muted-foreground",children:"Sign up now to earn bonus points and start saving together!"})]})}),e.jsxs("div",{className:"text-center mb-8 sm:mb-16",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 mb-4 sm:mb-6",children:[e.jsx(_,{className:"w-6 h-6 sm:w-10 sm:h-10 text-primary"}),e.jsx("h1",{className:"text-2xl sm:text-5xl md:text-6xl font-montserrat font-bold text-foreground",children:"Join Extreme Bargains"})]}),e.jsx("p",{className:"text-sm sm:text-xl text-muted-foreground max-w-2xl mx-auto leading-relaxed",children:"Discover incredible daily deals, track prices, earn rewards, and save money with our deal-hunting community."})]}),e.jsxs("div",{className:"flex flex-col-reverse lg:grid lg:grid-cols-2 gap-12 items-start",children:[e.jsx(de,{}),e.jsx(me,{email:h,onEmailChange:w,password:g,onPasswordChange:c,username:d,onUsern
1ameChange:F,displayName:C,onDisplayNameChange:z,showPassword:B,onTogglePassword:()=>J(!B),isSubmitting:H,onSubmit:q,onGoogleSignUp:W,BotProtectionComponent:M})]})]})})]})}export{Ne 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.