PageSourceSearch

https://familyhaven.com/assets/affiliates-DYEnBJ8n.js

js familyhaven.com collected 2026-10-06 12:30:07 UTC 9,468 bytes, 1 lines download raw bytes

1import{u as v,r as w,U as S,n as k,j as e,$ as F,B as f,q as o,t as c,bB as A,a4 as m,y as x,ak as P,aw as j,I as h,aM as C,e as M,aY as T,d0 as $}from"./index-DM8ih7Eo.js";import{u as W,F as E,a,b as i,c as r,d as l,e as d,t as H}from"./form-B5PnyoGh.js";import{M as B}from"./marketing-layout-Bu3R9B9a.js";import{T as I}from"./textarea-DZz7IWo3.js";import{S as U}from"./share-2-A-hLusr5.js";import{U as g}from"./user-BjsWbfgB.js";import{P as q}from"./phone-DBkjk35k.js";import{M as L}from"./message-square-zgigV8Gm.js";function K(){const{toast:p}=v(),[b,N]=w.useState(!1),s=W({resolver:H($),defaultValues:{firstName:"",lastName:"",email:"",phone:"",socialHandles:""}}),u=S({mutationFn:async t=>k("POST","/api/affiliate-application",t),onSuccess:()=>{N(!0),p({title:"Application submitted!",description:"We'll be in touch soon."})},onError:()=>{p({title:"Failed to submit",description:"Please try again.",variant:"destructive"})}}),y=t=>{u.mutate(t)};return e.jsx(B,{children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-16 space-y-16",children:[e.jsxs("section",{className:"text-center space-y-6","data-testid":"section-affiliate-hero",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium","data-testid":"badge-partner-program",children:[e.jsx(F,{className:"w-4 h-4"}),"Partner Program"]}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold tracking-tight","data-testid":"text-affiliate-heading",children:"Become a FamilyHaven Affiliate"}),e.jsx("p",{className:"text-xl text-muted-foreground max-w-2xl mx-auto","data-testid":"text-affiliate-subheading",children:"Help families protect what matters most while earning commissions on every referral."}),e.jsxs("div",{className:"pt-2","data-testid":"section-affiliate-login",children:[e.jsx("p",{className:"text-muted-foreground mb-3 text-sm","data-testid":"text-login-prompt",children:"Already an affiliate? Access your dashboard to track referrals and commissions."}),e.jsx(f,{variant:"outline",asChild:!0,"data-testid":"button-affiliate-login",children:e.jsx("a",{href:"/affiliate-login",children:"Affiliate Login"})})]})]}),e.jsxs("section",{className:"grid md:grid-cols-3 gap-6","data-testid":"section-affiliate-benefits",children:[e.jsxs(o,{"data-testid":"card-benefit-commission",children:[e.jsxs(c,{children:[e.jsx("div",{className:"w-12 h-12 rounded-lg bg-green-500/10 flex items-center justify-center mb-2",children:e.jsx(A,{className:"w-6 h-6 text-green-600"})}),e.jsx(m,{"data-testid":"text-benefit-commission-title",children:"$5 Per Subscriber"})]}),e.jsx(x,{children:e.jsx("p",{className:"text-muted-foreground","data-testid":"text-benefit-commission-desc",children:"Earn $5 for every user who becomes a paying subscriber through your unique promo code."})})]}),e.jsxs(o,{"data-testid":"card-benefit-attribution",children:[e.jsxs(c,{children:[e.jsx("div",{className:"w-12 h-12 rounded-lg bg-blue-500/10 flex items-center justify-center mb-2",children:e.jsx(P,{className:"w-6 h-6 text-blue-600"})}),e.jsx(m,{"data-testid":"text-benefit-attribution-title",children:"30-Day Attribution"})]}),e.jsx(x,{children:e.jsx("p",{className:"text-muted-foreground","data-testid":"text-benefit-attribution-desc",children:"Your referrals get their first month free. When they convert to paid, you earn your commission."})})]}),e.jsxs(o,{"data-testid":"card-benefit-promo",children:[e.jsxs(c,{children:[e.jsx("div",{className:"w-12 h-12 rounded-lg bg-violet-500/10 flex items-center justify-center mb-2",children:e.jsx(U,{className:"w-6 h-6 text-violet-600"})}),e.jsx(m,{"data-testid":"text-benefit-promo-title",children:"Custom Promo Code"})]}),e.jsx(x,{children:e.jsx("p",{className:"text-muted-foreground","data-testid":"text-benefit-promo-desc",children:"Get your own personalized promo code to share with your audience across all platforms."})})]})]}),e.jsxs("section",{className:"space-y-8","data-testid":"section-how-it-works",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-3xl font-bold mb-4","data-testid":"text-how-it-works-heading",children:"How It Works"}),e.jsx("p",{className:"text-muted-foreground","data-testid":"text-how-it-works-subheading",children:"Simple steps to start earning"})]}),e.jsx("div",{className:"grid md:grid-cols-4 gap-6",children:[{step:"1",title:"Ap
1ply",desc:"Fill out the application form below"},{step:"2",title:"Get Approved",desc:"We'll review and send your custom code"},{step:"3",title:"Share",desc:"Promote FamilyHaven to your audience"},{step:"4",title:"Earn",desc:"Get paid for each subscriber"}].map(t=>e.jsxs("div",{className:"text-center","data-testid":`step-${t.step}`,children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-primary text-primary-foreground flex items-center justify-center mx-auto mb-4 text-xl font-bold","data-testid":`step-number-${t.step}`,children:t.step}),e.jsx("h3",{className:"font-semibold mb-2","data-testid":`step-title-${t.step}`,children:t.title}),e.jsx("p",{className:"text-sm text-muted-foreground","data-testid":`step-desc-${t.step}`,children:t.desc})]},t.step))})]}),e.jsxs("section",{className:"space-y-8","data-testid":"section-why-partner",children:[e.jsx("div",{className:"text-center",children:e.jsx("h2",{className:"text-3xl font-bold mb-4","data-testid":"text-why-partner-heading",children:"Why Partner With Us"})}),e.jsx("div",{className:"grid md:grid-cols-2 gap-4 max-w-3xl mx-auto",children:["Essential product families actually need","Competitive commission structure","Dedicated affiliate dashboard","Monthly payouts","Marketing materials provided","Personal support from our team"].map((t,n)=>e.jsxs("div",{className:"flex items-center gap-3","data-testid":`benefit-item-${n}`,children:[e.jsx(j,{className:"w-5 h-5 text-green-600 shrink-0"}),e.jsx("span",{"data-testid":`benefit-text-${n}`,children:t})]},t))})]}),e.jsx("section",{className:"max-w-xl mx-auto","data-testid":"section-application-form",children:e.jsxs(o,{children:[e.jsxs(c,{className:"text-center",children:[e.jsx(m,{className:"text-2xl","data-testid":"text-form-heading",children:"Apply to Become an Affiliate"}),e.jsx("p",{className:"text-muted-foreground","data-testid":"text-form-subheading",children:"Tell us about yourself and we'll get back to you within 48 hours."})]}),e.jsx(x,{children:b?e.jsxs("div",{className:"text-center py-8 space-y-4","data-testid":"section-success-message",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-green-500/10 flex items-center justify-center mx-auto",children:e.jsx(j,{className:"w-8 h-8 text-green-600"})}),e.jsx("h3",{className:"text-xl font-semibold","data-testid":"text-success-heading",children:"Application Received!"}),e.jsx("p",{className:"text-muted-foreground","data-testid":"text-success-message",children:"Thank you for your interest. We'll review your application and reach out soon."})]}):e.jsx(E,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(y),className:"space-y-4","data-testid":"form-affiliate-application",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(a,{control:s.control,name:"firstName",render:({field:t})=>e.jsxs(i,{children:[e.jsx(r,{children:"First Name *"}),e.jsx(l,{children:e.jsxs("div",{className:"relative",children:[e.jsx(g,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(h,{...t,placeholder:"Jane",className:"pl-9","data-testid":"input-affiliate-firstname"})]})}),e.jsx(d,{})]})}),e.jsx(a,{control:s.control,name:"lastName",render:({field:t})=>e.jsxs(i,{children:[e.jsx(r,{children:"Last Name *"}),e.jsx(l,{children:e.jsxs("div",{className:"relative",children:[e.jsx(g,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(h,{...t,placeholder:"Smith",className:"pl-9","data-testid":"input-affiliate-lastname"})]})}),e.jsx(d,{})]})})]}),e.jsx(a,{control:s.control,name:"email",render:({field:t})=>e.jsxs(i,{children:[e.jsx(r,{children:"Email *"}),e.jsx(l,{children:e.jsxs("div",{className:"relative",children:[e.jsx(C,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(h,{...t,type:"email",placeholder:"[email protected]",className:"pl-9","data-testid":"input-affiliate-email"})]})}),e.jsx(d,{})]})}),e.jsx(a,{control:s.control,name:"phone",render:({field:t})=>e.jsxs(i,{children:[e.jsx(r,{children:"Phone"}),e.jsx(l,{children:e.jsxs("div",{className:"relative",children:[e.jsx(q,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(h,{...t,type:"tel",placeholder:"555-123-4567",className:"pl-9","data-testid":"input-affiliate-phone",onChange:n=>t.onChange(M(n.target.value))})]})}),e.jsx(d,{})]})}),e.jsx(a,{control:s.control,name:"socialHandles",render:({field:t})=>e.jsxs(i,{children:[e.jsx(r,{children:"Social Media / Website"}),e.jsx(l,{children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-3 top-3 w-4 h-4 text-muted-foreground"}),e.jsx(I,{...t,placeholder:"Share your Instagram, Facebook, TikTok, blog, or other platforms where you have an audie
1nce...",className:"pl-9 min-h-[100px]","data-testid":"textarea-affiliate-social"})]})}),e.jsx(d,{})]})}),e.jsxs(f,{type:"submit",className:"w-full",size:"lg",disabled:u.isPending,"data-testid":"button-affiliate-submit",children:[u.isPending?"Submitting...":"Submit Application",e.jsx(T,{className:"w-4 h-4 ml-2"})]})]})})})]})})]})})}export{K 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.