PageSourceSearch

https://ee.show/assets/js/GuestApplication.tsx-CJGE8IyJ.js

js ee.show collected 2026-10-02 15:23:43 UTC 16,685 bytes, 1 lines download raw bytes

1import{o as e}from"./chunk-C_JJxWoe.js";import{r as s}from"./chunk-Dv4tCFv-.js";import{c as t,f as a}from"./chunk-Pkhj_1Nm.js";import{s as i}from"./chunk-mAnUq8cn.js";import{n}from"./chunk-pbrEGh0G.js";import{$n as r,Cn as l,Ir as o,Mr as c,Nt as d,Pt as m,Rr as h,Rt as p,Wt as u,a as x,dn as v}from"../index-DkGUPYoQ.js";import{n as j}from"./chunk-BM0pDCyk2.js";import{t as g}from"./chunk-D1FDdKOe.js";import{t as f}from"./chunk-CJ1Dl5N5.js";import{a as _,i as y,n as b,r as N,t as k}from"./chunk-DZP29MQJ.js";import{t as w}from"./chunk-HpbWOqlt.js";import{t as C}from"./chunk-Cn13GsAy.js";import{i as F,n as S,r as E,t as P}from"./chunk-COWuvEhX.js";var I=e(h(),1),z=c();function K(){const e=l(),{toast:c}=o(),[h,K]=(0,I.useState)(!1),[$,A]=(0,I.useState)({applicant_name:"",email:"",phone:"",visited_eesystem:!1,center_visited:"",experience_type:"",inspirational_story:"",has_book:!1,book_title:"",book_publisher:"",book_release_date:"",book_amazon_link:"",has_product:!1,product_name:"",product_description:"",product_url:"",promotional_intensity:"light",previous_podcast_experience:!1,previous_podcasts:[],niche_topic:"",trending_topic:!1,wants_affiliate:!1}),[M,q]=(0,I.useState)([{platform:"instagram",handle:"",follower_count:0,engagement_rate:0,url:""}]),[T,D]=(0,I.useState)({video:null,headshot:null,mediaKit:null}),[B,L]=(0,I.useState)(!1),R=async(e,s)=>{const{data:t,error:a}=await j.storage.from("guest-applications").upload(s,e,{upsert:!0});if(a)throw a;const{data:{publicUrl:i}}=j.storage.from("guest-applications").getPublicUrl(t.path);return i},U=(e,s)=>{D(t=>({...t,[e]:s}))};return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(x,{title:"Apply as a Guest | EEShow Podcast",description:"Apply to be a guest on Everything's Energy podcast. Share your inspirational story and insights with our audience.",canonicalUrl:"/apply"}),(0,z.jsx)("div",{className:"min-h-screen bg-background py-12 px-4",children:(0,z.jsxs)("div",{className:"max-w-container mx-auto",children:[(0,z.jsxs)("div",{className:"text-center mb-8",children:[(0,z.jsx)(a,{className:"w-16 h-16 mx-auto mb-4 text-primary"}),(0,z.jsx)("h1",{className:"text-4xl font-bold text-foreground mb-4",children:"Apply to be a Guest"}),(0,z.jsx)("p",{className:"text-muted-foreground text-lg mb-4",children:"Share your inspirational story with the Everything's Energy community"}),(0,z.jsxs)("div",{className:"inline-flex items-center gap-2 px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-medium",children:[(0,z.jsx)(s,{className:"w-4 h-4"}),(0,z.jsx)("span",{children:"Quick apply in 5 minutes · Most fields are optional"})]})]}),(0,z.jsx)(p,{className:"p-8",children:(0,z.jsxs)("form",{onSubmit:async s=>{s.preventDefault(),K(!0),L(!0);try{const s={};if(T.video){const e=`${Date.now()}-video-${T.video.name}`;s.video=await R(T.video,e)}if(T.headshot){const e=`${Date.now()}-headshot-${T.headshot.name}`;s.headshot=await R(T.headshot,e)}if(T.mediaKit){const e=`${Date.now()}-mediakit-${T.mediaKit.name}`;s.mediaKit=await R(T.mediaKit,e)}L(!1);const a=M.reduce((e,s)=>e+(s.follower_count||0),0),i=M.reduce((e,s)=>e+(s.engagement_rate||0),0)/M.length,n=localStorage.getItem("guest_quiz_score"),r=localStorage.getItem("guest_quiz_tier"),l=d(),{data:o,error:h}=await j.from("guest_applications").insert({...$,book_release_date:$.book_release_date||null,total_followers:a,engagement_rate:i,quiz_score:n?parseInt(n):null,quiz_tier:r||null,referral_source:m(l),referral_session_id:l?.session_id??null,utm_source:l?.utm_source??null,utm_medium:l?.utm_medium??null,utm_campaign:l?.utm_campaign??null,video_introduction_url:s.video,headshot_url:s.headshot,media_kit_url:s.mediaKit}).select().single();if(h)throw h;if(M.length>0){const e=M.filter(e=>e.handle&&e.platform).map(e=>({guest_application_id:o.id,...e}));if(e.length>0){const{error:s}=await j.from("guest_social_media").insert(e);if(s)throw s}}await j.functions.invoke("calculate-guest-score",{body:{applicationId:o.id}});try{await j.functions.invoke("send-email",{body:{to:$.email,toName:$.applicant_name,type:"application_received",applicationId:o.id,data:{name:$.applicant_name},addToAudience:"ee-show-guests"}})}catch(t){}
1v(),c({title:"Application submitted!",description:"We'll review your application and get back to you within 3-5 business days."}),e("/")}catch(a){c({title:"Submission failed",description:a.message,variant:"destructive"})}finally{K(!1),L(!1)}},className:"space-y-6",children:[(0,z.jsxs)("div",{className:"space-y-4",children:[(0,z.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,z.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:"Essential Information"}),(0,z.jsx)("span",{className:"text-sm text-muted-foreground",children:"Required fields *"})]}),(0,z.jsxs)("div",{children:[(0,z.jsx)(w,{htmlFor:"name",children:"Full Name *"}),(0,z.jsx)(g,{id:"name",required:!0,value:$.applicant_name,onChange:e=>A({...$,applicant_name:e.target.value})})]}),(0,z.jsxs)("div",{children:[(0,z.jsx)(w,{htmlFor:"email",children:"Email *"}),(0,z.jsx)(g,{id:"email",type:"email",required:!0,value:$.email,onChange:e=>A({...$,email:e.target.value})})]}),(0,z.jsxs)("div",{children:[(0,z.jsx)(w,{htmlFor:"phone",children:"Phone"}),(0,z.jsx)(g,{id:"phone",type:"tel",value:$.phone,onChange:e=>A({...$,phone:e.target.value})})]})]}),(0,z.jsxs)("div",{className:"space-y-4 pt-6 border-t",children:[(0,z.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:"EESystem Experience"}),(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(C,{id:"visited",checked:$.visited_eesystem,onCheckedChange:e=>A({...$,visited_eesystem:!!e})}),(0,z.jsx)(w,{htmlFor:"visited",children:"I have visited an EESystem center *"})]}),$.visited_eesystem&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("div",{children:[(0,z.jsx)(w,{htmlFor:"center",children:"Which center did you visit?"}),(0,z.jsx)(g,{id:"center",value:$.center_visited,onChange:e=>A({...$,center_visited:e.target.value})})]}),(0,z.jsxs)("div",{children:[(0,z.jsx)(w,{htmlFor:"experience",children:"How would you describe your experience?"}),(0,z.jsxs)(k,{value:$.experience_type,onValueChange:e=>A({...$,experience_type:e}),children:[(0,z.jsx)(y,{children:(0,z.jsx)(_,{placeholder:"Select experience type"})}),(0,z.jsxs)(b,{children:[(0,z.jsx)(N,{value:"light_fluffy",children:"Light & Fluffy"}),(0,z.jsx)(N,{value:"great_experience",children:"Great Experience"}),(0,z.jsx)(N,{value:"transformative",children:"Transformative"}),(0,z.jsx)(N,{value:"life_changing",children:"Life Changing"})]})]})]})]})]}),(0,z.jsxs)("div",{className:"space-y-4 pt-6 border-t",children:[(0,z.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:"Your Story"}),(0,z.jsxs)("div",{children:[(0,z.jsx)(w,{htmlFor:"story",children:"Tell us your inspirational story *"}),(0,z.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"How can your story help our listeners improve their lives? (500 words minimum)"}),(0,z.jsx)(f,{id:"story",required:!0,rows:10,value:$.inspirational_story,onChange:e=>A({...$,inspirational_story:e.target.value})}),(0,z.jsxs)("p",{className:"text-sm text-muted-foreground mt-1",children:[$.inspirational_story.length," characters"]})]}),(0,z.jsxs)("div",{children:[(0,z.jsx)(w,{htmlFor:"niche",children:"What makes your story/topic unique?"}),(0,z.jsx)(g,{id:"niche",value:$.niche_topic,onChange:e=>A({...$,niche_topic:e.target.value})})]}),(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(C,{id:"trending",checked:$.trending_topic,onCheckedChange:e=>A({...$,trending_topic:!!e})}),(0,z.jsx)(w,{htmlFor:"trending",children:"My topic is currently trending or timely"})]})]}),(0,z.jsxs)("div",{className:"pt-6 border-t",children:[(0,z.jsx)("div",{className:"mb-4 text-sm text-muted-foreground",children:"Optional sections below - expand only if relevant to you"}),(0,z.jsxs)(P,{type:"multiple",className:"space-y-4",children:[(0,z.jsxs)(E,{value:"promotion",className:"border rounded-lg px-4",children:[(0,z.jsx)(F,{className:"hover:no-underline py-4",children:(0,z.jsxs)("div",{className:"flex items-center gap-3 text-left",children:[(0,z.jsx)("span",{className:"text-xl",children:"📚"}),(0,z.jsxs)("div",{children:[(0,z.jsx)("div",{className:"text-lg font-semibold",children:"Book or Product (Optional)"}),(0,z.jsx)("div",{className:"text-sm text-muted-foreground font-normal",children:"Expand if you have something to promote"})]})]})}),(0,z.jsxs)(S,{className:"space-y-4 pb-4",children:[(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(C,{id:"hasBook",checked:$.has_book,onCheckedChange:e=>A({...$,has_book:!!e})}),(0,z.jsx)(w,{htmlFor:"hasBook",children:"I have a book to promote"})]}),$.has_book&&(0,z.jsxs)("div",{className:"space-y-4 ml-6",children:[(0,z.jsx)(g,{placeholder:"Book Title",value:$.book_title,onChange:e=>A({...$,book_title:e.target.value})}),(0,z.jsx)(g,{placeholder:"Publisher",value:$.book_publisher,onCh
1ange:e=>A({...$,book_publisher:e.target.value})}),(0,z.jsx)(g,{type:"date",placeholder:"Release Date",value:$.book_release_date,onChange:e=>A({...$,book_release_date:e.target.value})}),(0,z.jsx)(g,{placeholder:"Amazon Link",value:$.book_amazon_link,onChange:e=>A({...$,book_amazon_link:e.target.value})})]}),(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(C,{id:"hasProduct",checked:$.has_product,onCheckedChange:e=>A({...$,has_product:!!e})}),(0,z.jsx)(w,{htmlFor:"hasProduct",children:"I have a product/service to promote"})]}),$.has_product&&(0,z.jsxs)("div",{className:"space-y-4 ml-6",children:[(0,z.jsx)(g,{placeholder:"Product/Service Name",value:$.product_name,onChange:e=>A({...$,product_name:e.target.value})}),(0,z.jsx)(f,{placeholder:"Description",value:$.product_description,onChange:e=>A({...$,product_description:e.target.value})}),(0,z.jsx)(g,{placeholder:"Website URL",value:$.product_url,onChange:e=>A({...$,product_url:e.target.value})})]})]})]}),(0,z.jsxs)(E,{value:"social",className:"border rounded-lg px-4",children:[(0,z.jsx)(F,{className:"hover:no-underline py-4",children:(0,z.jsxs)("div",{className:"flex items-center gap-3 text-left",children:[(0,z.jsx)("span",{className:"text-xl",children:"📱"}),(0,z.jsxs)("div",{children:[(0,z.jsx)("div",{className:"text-lg font-semibold",children:"Social Media Presence"}),(0,z.jsx)("div",{className:"text-sm text-muted-foreground font-normal",children:"Share your platforms and reach"})]})]})}),(0,z.jsxs)(S,{className:"space-y-4 pb-4",children:[M.map((e,s)=>(0,z.jsxs)("div",{className:"grid grid-cols-2 gap-4 p-4 border rounded-lg",children:[(0,z.jsxs)(k,{value:e.platform,onValueChange:e=>{const t=[...M];t[s].platform=e,q(t)},children:[(0,z.jsx)(y,{children:(0,z.jsx)(_,{})}),(0,z.jsxs)(b,{children:[(0,z.jsx)(N,{value:"instagram",children:"Instagram"}),(0,z.jsx)(N,{value:"tiktok",children:"TikTok"}),(0,z.jsx)(N,{value:"youtube",children:"YouTube"}),(0,z.jsx)(N,{value:"linkedin",children:"LinkedIn"}),(0,z.jsx)(N,{value:"twitter",children:"Twitter/X"}),(0,z.jsx)(N,{value:"facebook",children:"Facebook"})]})]}),(0,z.jsx)(g,{placeholder:"@handle",value:e.handle,onChange:t=>{const a=[...M];a[s].handle=t.target.value,a[s].url=((e,s)=>{if(!s)return"";const t=s.replace("@","");return{instagram:`https://instagram.com/${t}`,tiktok:`https://tiktok.com/@${t}`,youtube:`https://youtube.com/@${t}`,linkedin:`https://linkedin.com/in/${t}`,twitter:`https://twitter.com/${t}`,facebook:`https://facebook.com/${t}`}[e]||""})(e.platform,t.target.value),q(a)}}),(0,z.jsx)(g,{type:"number",placeholder:"Follower count",value:e.follower_count||"",onChange:e=>{const t=[...M];t[s].follower_count=parseInt(e.target.value)||0,q(t)}}),(0,z.jsx)(g,{type:"number",step:"0.1",placeholder:"Engagement rate %",value:e.engagement_rate||"",onChange:e=>{const t=[...M];t[s].engagement_rate=parseFloat(e.target.value)||0,q(t)}})]},s)),(0,z.jsx)(u,{type:"button",variant:"outline",onClick:()=>{q([...M,{platform:"instagram",handle:"",follower_count:0,engagement_rate:0,url:""}])},children:"Add Another Platform"})]})]}),(0,z.jsxs)(E,{value:"experience",className:"border rounded-lg px-4",children:[(0,z.jsx)(F,{className:"hover:no-underline py-4",children:(0,z.jsxs)("div",{className:"flex items-center gap-3 text-left",children:[(0,z.jsx)("span",{className:"text-xl",children:"🎙️"}),(0,z.jsxs)("div",{children:[(0,z.jsx)("div",{className:"text-lg font-semibold",children:"Podcast Experience"}),(0,z.jsx)("div",{className:"text-sm text-muted-foreground font-normal",children:"Previous podcast appearances (if any)"})]})]})}),(0,z.jsxs)(S,{className:"space-y-4 pb-4",children:[(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(C,{id:"podcastExp",checked:$.previous_podcast_experience,onCheckedChange:e=>A({...$,previous_podcast_experience:!!e})}),(0,z.jsx)(w,{htmlFor:"podcastExp",children:"I've been a guest on other podcasts"})]}),$.previous_podcast_experience&&(0,z.jsxs)("div",{className:"space-y-3 ml-6",children:[$.previous_podcasts.map((e,s)=>(0,z.jsxs)("div",{className:"grid grid-cols-3 gap-2 p-3 border rounded-lg",children:[(0,z.jsx)(g,{placeholder:"Podcast Name",value:e.name||"",onChange:e=>{const t=[...$.previous_podcasts];t[s]={...t[s],name:e.target.value},A({...$,previous_podcasts:t})}}),(0,z.jsx)(g,{placeholder:"Episode URL",value:e.url||"",onChange:e=>{const t=[...$.previous_podcasts];t[s]={...t[s],url:e.target.value},A({...$,previous_podcasts:t})}}),(0,z.jsx)(g,{type:"date",value:e.date||"",onChange:e=>{const t=[...$.previous_podcasts];t[s]={...t[s],date:e.target.value},A({...$,previous_podcasts:t})}})]},s)),(0,z.jsx)(u,{type:"button",variant:"outline",size:"sm",onClick:()=>A({...$,previous_podcasts:[...$.previous_podcasts,{name:"",url:"",date:""}]}),children:"Add Another Podcast"})]})]})]}),(0,z.jsxs)(E,{value:"files",className:"border rounded-lg px-4",children:[(0,z.jsx)(F,{className:"hover:no-underline py-4",children:(0,z.jsxs)("div",{className:"flex items-center gap-3 text-left",children:[(0,z.jsx)("span",{className:"text-xl",children:"📎"}),(0,z.jsxs)("div",{children:[(0,z.jsx)("div",{className:"text-lg font-semibold",children:"Media Files (Optional)"}),(0,z.jsx)("div",{className:"text-sm text-muted-foreground font-normal",children:"Video intro, headsh
1ot, media kit"})]})]})}),(0,z.jsxs)(S,{className:"space-y-4 pb-4",children:[(0,z.jsxs)("div",{children:[(0,z.jsx)(w,{htmlFor:"video",children:"Video Introduction (60 seconds max, MP4 or MOV)"}),(0,z.jsxs)("div",{className:"mt-2",children:[(0,z.jsx)(g,{id:"video",type:"file",accept:"video/mp4,video/quicktime",onChange:e=>U("video",e.target.files?.[0]||null),className:"cursor-pointer"}),T.video&&(0,z.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,z.jsx)(i,{className:"w-4 h-4"}),(0,z.jsx)("span",{children:T.video.name}),(0,z.jsx)(u,{type:"button",variant:"ghost",size:"sm",onClick:()=>U("video",null),children:(0,z.jsx)(r,{className:"w-4 h-4"})})]})]})]}),(0,z.jsxs)("div",{children:[(0,z.jsx)(w,{htmlFor:"headshot",children:"Professional Headshot (JPG or PNG, 2MB max)"}),(0,z.jsxs)("div",{className:"mt-2",children:[(0,z.jsx)(g,{id:"headshot",type:"file",accept:"image/jpeg,image/png",onChange:e=>U("headshot",e.target.files?.[0]||null),className:"cursor-pointer"}),T.headshot&&(0,z.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,z.jsx)(i,{className:"w-4 h-4"}),(0,z.jsx)("span",{children:T.headshot.name}),(0,z.jsx)(u,{type:"button",variant:"ghost",size:"sm",onClick:()=>U("headshot",null),children:(0,z.jsx)(r,{className:"w-4 h-4"})})]})]})]}),(0,z.jsxs)("div",{children:[(0,z.jsx)(w,{htmlFor:"mediaKit",children:"Media Kit (PDF, 5MB max)"}),(0,z.jsxs)("div",{className:"mt-2",children:[(0,z.jsx)(g,{id:"mediaKit",type:"file",accept:"application/pdf",onChange:e=>U("mediaKit",e.target.files?.[0]||null),className:"cursor-pointer"}),T.mediaKit&&(0,z.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,z.jsx)(i,{className:"w-4 h-4"}),(0,z.jsx)("span",{children:T.mediaKit.name}),(0,z.jsx)(u,{type:"button",variant:"ghost",size:"sm",onClick:()=>U("mediaKit",null),children:(0,z.jsx)(r,{className:"w-4 h-4"})})]})]})]})]})]})]})]}),(0,z.jsx)("div",{className:"pt-6",children:(0,z.jsx)(u,{type:"submit",size:"lg",className:"w-full",disabled:h||!$.visited_eesystem,children:h?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(n,{className:"mr-2 h-4 w-4 animate-spin"}),B?"Uploading files...":"Submitting..."]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(t,{className:"mr-2 h-4 w-4"}),"Submit Application"]})})})]})})]})})]})}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.