1import{r as T,j as e,J as u}from"./vendor-CSpQeQFa.js";import{u as P,o as $,B as d,s as z}from"./entry-main-PLc9_a6q.js";import{u as B,g as U,c as R}from"./UpgradeTracks-BWrtGOBg.js";import{H as I}from"./Header-hhSgwNBz.js";import{F as G}from"./Footer-CGWiw4oR.js";import{P as M}from"./PremiumBackground-CfGZV0_T.js";import{C as l,c as i}from"./uploadLimits-Bk-o1hAt.js";import{A as F,a as H,b as V,c as q,d as J,e as O,f as W,g as X,h as K}from"./alert-dialog-B3s9CDLG.js";import{d as N}from"./HomePage-BpRny74E.js";import{S as v}from"./signatureCeremonyModalGuard-vHUWzdXW.js";import{S as Q}from"./InviteRedirect-DyEuM7Le.js";import{b as Z,M as ee}from"./useCreditPurchaseRedirect-BG4b5Ixo.js";import{T as re}from"./bookingIdentityPing-D51nG8yv.js";import{U as te}from"./imagePrewarm-Cu68tRU8.js";import{V as se,E as y}from"./perfConfigSelect-DHd8mvGs.js";import{L as oe}from"./languages-thgbfhkj.js";import{G as ae}from"./usePerfUgcSettings-BIDJqd_O.js";import{C as le}from"./contestMediaDisplay-WupF8w-m.js";import{C as ie}from"./brandOutreachLogo-DX112xbb.js";import{C as ne}from"./modelFamilies-Dcg73pIM.js";import{C as ce}from"./AccountCreated-Bo6ZhvJn.js";const w=()=>{try{return new URLSearchParams(window.location.search).get("admin_preview")==="true"||localStorage.getItem("creator-preview-state")!==null}catch{return!1}},Le=()=>{const{profile:r,user:h,refreshProfile:C}=P(),{hasCreatorRole:A,isLoading:k}=$(),s=B(),[_,g]=T.useState(!1),o=U(s)?.name||"Bronze";if(!w()&&!k&&(!r||!A))return null;const D=async()=>{if(w()){u("Preview Mode",{description:"Actions are disabled in preview mode."});return}if(h){g(!0);try{const{error:t}=await z.from("profiles").update({application_status:null,bio:null,portfolio_url:null,content_types:null,experience_level:null,years_experience:null,social_links:null,how_heard_about_us:null}).eq("id",h.id);if(t)throw t;await C(),u("Application Deleted",{description:"Your application has been deleted. You can apply again anytime."}),window.location.href="/creator"}catch(t){console.error("Error deleting application:",t),u.error("Error",{description:"Failed to delete application. Please try again."})}finally{g(!1)}}},S=r?.application_status!==null&&r?.application_status!==void 0,Y=r?.application_status,b={pending:{icon:ie,color:"text-yellow-400",bgColor:"bg-yellow-500/20",borderColor:"border-yellow-400/40",title:"Application Under Review",description:`Your ${o} tier upgrade application is being reviewed. In the meantime, start earning by competing in credit contests!`},rejected:{icon:ne,color:"text-red-400",bgColor:"bg-red-500/20",borderColor:"border-red-400/40",title:"Application Not Approved",description:"Unfortunately, your application was not approved at this time. You can edit and resubmit, or delete and start fresh."},approved:{icon:ce,color:"text-green-400",bgColor:"bg-green-500/20",borderColor:"border-green-400/40",title:`You're a ${o} Creator!`,description:o==="Legend"?"Congratulations! You've reached the highest tier with exclusive access to all contests and benefits.":o==="Gold"?"Congratulations! You have full access to all contests including cash prizes.":o==="Silver"?"Congratulations! You can access contests with higher prize pools.":"Welcome! You can enter credit-based contests and start building your portfolio."},"not-applied":{icon:N,color:"text-cyan-400",bgColor:"bg-electric-cyan/20",borderColor:"border-electric-cyan/40",title:`${o} Creator`,description:o==="Legend"?"You've reached the highest tier! You have access to all exclusive contests and benefits.":`You're currently a ${o} tier creator. Apply to upgrade to the next tier and unlock more opportunities!`}},n=S?Y:"not-applied",c=b[n]||b["not-applied"],E=c.icon,m=r?.social_links,p=r?.content_types||null,x=r?.languages||null,L=r?.experience_level||null,f=r?.years_experience||null,j=r?.timezone||null;return e.jsxs("div",{className:"min-h-screen bg-premium-dark text-foreground noise-overlay",children:[e.jsx(M,{}),e.jsx(I,{}),e.jsxs("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 md:px-8 pt-32 pb-20",children:[e.jsxs("section",{className:"mb-8 text-center",children:[e.jsx("div",{className:"flex justify-center mb-6",children:e.jsx("div",{className:`p-6 rounded-full ${c.bgColor} border-2 ${c.borderColor}`,children:e.jsx(E,{className:`h-16 w-16 ${c.color}`})})}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-foreground mb-4",children:c.title}),e.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:c.description})]}),(n==="not-applied"||n==="approved")&&R(s)&&e.jsx("section",{className:"mb-8",children:e.jsx(l,{className:`bg-card border-2 ${s==="gold"?"bg-gradient-to-br from-purple-500/20 to-pink-500/20 border-purple-400/30":"bg-gradient-to-br from-amber-500/20 to-orange-500/20 border-amber-400/30"}`,children:e.jsx(i,{className:"p-6 md:p-8",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-6",children:[e.jsx("div",{className:`p-4 rounded-2xl border ${s==="gold"?"bg-purple-400/20 border-purple-400/40":"bg-
1amber-400/20 border-amber-400/40"}`,children:e.jsx(N,{className:`h-10 w-10 ${s==="gold"?"text-purple-400":"text-amber-400"}`})}),e.jsxs("div",{className:"flex-1 text-center md:text-left",children:[e.jsx("h3",{className:"text-xl font-bold text-foreground mb-2",children:s==="gold"?"You've Reached the Top!":"Ready to Upgrade Your Tier?"}),e.jsx("p",{className:"text-foreground",children:s==="gold"?"You're already at Gold tier with access to all contests and the highest payouts.":"Apply to upgrade to Silver or Gold tier to access higher prize pools and exclusive contests."})]}),e.jsxs(d,{onClick:()=>window.location.href="/creator/apply-for-upgrade",size:"lg",className:`rounded-full px-8 whitespace-nowrap ${s==="gold"?"bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600 text-white":"bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 text-white"}`,children:[e.jsx(v,{className:"mr-2 h-5 w-5"}),s==="gold"?"View Status":"Apply to Upgrade"]})]})})})}),(n==="pending"||n==="rejected")&&e.jsx("section",{className:"mb-8",children:e.jsx(l,{className:"bg-card/5 backdrop-blur-sm border border-border",children:e.jsx(i,{className:"p-6",children:e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground mb-1",children:"Manage Your Application"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Edit your application or delete it to start fresh"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs(d,{onClick:()=>window.location.href="/creator-application",variant:"outline",className:"border-blue-500/50 text-blue-400 hover:bg-blue-500/10",children:[e.jsx(Q,{className:"h-4 w-4 mr-2"}),"Edit Application"]}),e.jsxs(F,{children:[e.jsx(H,{asChild:!0,children:e.jsxs(d,{variant:"outline",className:"border-red-500/50 text-red-400 hover:bg-red-500/10",disabled:_,children:[e.jsx(Z,{className:"h-4 w-4 mr-2"}),"Delete"]})}),e.jsxs(V,{className:"bg-card border-border",children:[e.jsxs(q,{children:[e.jsx(J,{className:"text-foreground",children:"Delete Application?"}),e.jsx(O,{className:"text-muted-foreground",children:"This permanently deletes your application and also clears your bio, portfolio link and social links from your profile. Your videos and contest entries are not affected, and you can apply again at any time."})]}),e.jsxs(W,{children:[e.jsx(X,{className:"bg-muted text-foreground border-border hover:bg-muted",children:"Cancel"}),e.jsx(K,{onClick:D,className:"bg-red-600 hover:bg-red-700 text-white",children:"Delete Application"})]})]})]})]})]})})})}),n!=="approved"&&s!=="gold"&&e.jsx("section",{className:"mb-12",children:e.jsx(l,{className:"bg-card bg-gradient-to-br from-electric-cyan/20 to-blue-500/20 border-2 border-electric-cyan/40",children:e.jsx(i,{className:"p-6 md:p-8",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-6",children:[e.jsx("div",{className:"p-4 rounded-2xl bg-electric-cyan/30 border border-electric-cyan/50",children:e.jsx(re,{className:"h-10 w-10 text-cyan-400"})}),e.jsxs("div",{className:"flex-1 text-center md:text-left",children:[e.jsx("h3",{className:"text-xl font-bold text-foreground mb-2",children:"Start Earning Now By Entering a Contest"}),e.jsx("p",{className:"text-foreground",children:"Don't wait! Compete in contests to earn credits for AI tools, build your portfolio, and increase your chances of upgrading your tier."})]}),e.jsxs(d,{onClick:()=>window.location.href="/creator?filter=credit",size:"lg",className:"bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 hover:to-blue-600 text-white rounded-full px-8 whitespace-nowrap",children:[e.jsx(v,{className:"mr-2 h-5 w-5"}),"Browse Contests"]})]})})})}),e.jsxs("section",{className:"space-y-6",children:[e.jsx("h2",{className:"text-2xl font-bold text-foreground mb-6",children:"Your Application Details"}),e.jsx(l,{className:"bg-card/5 backdrop-blur-sm border border-border",children:e.jsxs(i,{className:"p-6 space-y-4",children:[e.jsxs("h3",{className:"text-lg font-semibold text-foreground mb-4 flex items-center gap-2",children:[e.jsx(te,{className:"h-5 w-5 text-electric-blue"}),"Basic Information"]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Display Name"}),e.jsx("p",{className:"text-foreground font-medium",children:r.display_name||"Not provided"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Email"}),e.jsxs("p",{className:"text-foreground font-medium flex items-center gap-2",children:[e.jsx(ee,{className:"h-4 w-4 text-muted-foreground"}),r.email]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Experience Level"}),e.jsx("p",{className:"text-foreground font-medium capitalize",children:L||"Not provided"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Years of Experience"}),e.jsx("p",{className:"text-foreground font-medium",children:f?`${f} years`:"Not provided"})]})]}),r.bio&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Bio"}),e.jsx("p",{className:"text-foreground",children:r.bio})]})]})}),(p||x)&&e.jsx(l,{className:"bg-card/5 backdrop-blur-sm border border-border",children:e.jsxs(i,{className:"p-6 space-y-4",children:[e.jsxs("h3",{className:"text-lg font-semibold text-foreground mb-4 flex items-center gap-2",children:[e.jsx(se,{className:"h-5 w-5 text-electric-blue"}),"Content & Skills"]}),p&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Content Types"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:p.map((t,a)=>e.jsx("span",{className:"px-3 py-1 rounded-full bg-electric-blue/20 text-electric-blue text-sm border border-electric-blue/30",children:t},a))})]}),x&&e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm text-muted-foreground mb-2 flex items-center gap-2",children:[e.jsx(oe,{className:"h-4 w-4"}),"Languages"]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:x.map((t,a)=>e.jsx("span",{className:"px-3 py-1 rounded-full bg-card/10 text-foreground text-sm border border-border",children:t},a))})]})]})}),(r.portfolio_url||m)&&e.jsx(l,{className:"bg-card/5 backdrop-blur-sm border border-border",children:e.jsxs(i,{className:"p-6 space-y-4",children:[e.jsxs("h3",{className:"text-lg font-semibold text-foreground mb-4 flex items-center gap-2",children:[e.jsx(ae,{className:"h-5 w-5 text-electric-blue"}),"Portfolio & Social Links"]}),r.portfolio_url&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Portfolio URL"}),e.jsxs("a",{href:r.portfolio_url,target:"_blank",rel:"noopener noreferrer",className:"text-electric-blue hover:text-electric-blue/80 flex items-center gap-2",children:[r.portfolio_url,e.jsx(y,{className:"h-4 w-4"})]})]}),m&&Object.keys(m).length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Social Media"}),e.jsx("div",{className:"space-y-2",children:Object.entries(m).map(([t,a])=>a&&e.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-foreground hover:text-electric-blue transition-colors",children:[e.jsxs("span",{className:"capitalize",children:[t,":"]}),e.jsx("span",{className:"text-muted-foreground",children:a}),e.jsx(y,{className:"h-4 w-4"})]},t))})]})]})}),j&&e.jsx(l,{className:"bg-card/5 backdrop-blur-sm border border-border",children:e.jsxs(i,{className:"p-6",children:[e.jsxs("h3",{className:"text-lg font-semibold text-foreground mb-4 flex items-center gap-2",children:[e.jsx(le,{className:"h-5 w-5 text-electric-blue"}),"Additional Information"]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Timezone"}),e.jsx("p",{className:"text-foreground font-medium",children:j})]})]})}),e.jsx("div",{className:"flex justify-center pt-6",children:e.jsx(d,{onClick:()=>window.location.href="/creator",className:"bg-electric-blue hover:bg-electric-blue/90 text-white rounded-full px-6",children:"Browse All Contests"})})]})]}),e.jsx(G,{})]})};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.