PageSourceSearch

https://lecollectif-tv.lovable.app/assets/amplify.briefs.index-Bkwyo1as.js

js lecollectif-tv.lovable.app collected 2026-10-03 03:36:42 UTC 6,477 bytes, 1 lines download raw bytes

1import{r as x,s as m,j as e,n as u,o as p,L as b,e as g}from"./index-r9cUOzRa.js";import{i as j}from"./amplify-terms-cC4A7vHk.js";const c="#C9A96E",w=[{id:"fallback-meals",slug:"meals-that-matter-vietnam-e01",title:"The Meals That Matter: Vietnam — E01",brief_headline:"Every meal has a story. Clip ours.",brief_description:"Every meal has a story. Clip ours. Earn $1.25 per 1,000 views — up to $600 per creator.",pool_usd:5e3,slot_limit:20,status:"published",thumbnail_url:null}],N=[{key:"vietnam",label:"The Meals That Matter: Vietnam",match:t=>t.startsWith("meals-that-matter-vietnam-")},{key:"indonesia",label:"The Meals That Matter: Indonesia",match:t=>t.startsWith("meals-that-matter-indonesia-")},{key:"calmparent",label:"CalmParent",match:t=>t==="calmparent-creator-campaign"}];function v(t){const a=[],i=new Set;for(const s of N){const l=t.filter(n=>s.match(n.slug));l.length&&(l.forEach(n=>i.add(n.id)),a.push({label:s.label,rows:l}))}const r=t.filter(s=>!i.has(s.id));return r.length&&a.push({label:"More Campaigns",rows:r}),a}function C(){const[t,a]=x.useState(null),[i,r]=x.useState({});return x.useEffect(()=>{(async()=>{const{data:s}=await m.from("campaigns").select("id, slug, title, brief_headline, brief_description, pool_usd, slot_limit, status, thumbnail_url").in("status",["published","closed"]).order("slug",{ascending:!0}),l=s??[],n=l.length>0?l:w;a(n);const h=await Promise.all(n.map(async d=>{if(d.id.startsWith("fallback"))return[d.id,0];const{data:f}=await m.rpc("get_campaign_slots_taken",{_campaign_id:d.id});return[d.id,Number(f)||0]}));r(Object.fromEntries(h))})()},[]),e.jsxs("div",{className:"min-h-screen bg-[#0D0D0D] text-white",children:[e.jsx(u,{}),e.jsx("section",{className:"border-b border-white/10",children:e.jsxs("div",{className:"mx-auto w-full max-w-[1400px] px-6 py-20 lg:px-10",children:[e.jsx("div",{className:"text-xs uppercase tracking-[0.3em]",style:{color:c},children:"Amplify"}),e.jsx("h1",{className:"mt-4 font-display text-5xl font-bold tracking-tight sm:text-6xl",children:"Active Briefs"}),e.jsx("p",{className:"mt-5 max-w-2xl text-lg text-white/60",children:"Choose a campaign, claim your slot, and start creating."})]})}),e.jsx("section",{children:e.jsx("div",{className:"mx-auto w-full max-w-[1400px] px-6 py-16 lg:px-10",children:t===null?e.jsx("div",{className:"text-sm text-white/40",children:"Loading briefs…"}):e.jsx("div",{className:"space-y-16",children:v(t).map(s=>e.jsxs("div",{children:[e.jsxs("div",{className:"mb-6 flex items-center gap-4",children:[e.jsx("h2",{className:"font-display text-xl font-bold tracking-tight sm:text-2xl",children:s.label}),e.jsx("div",{className:"h-px flex-1 bg-white/10"}),e.jsxs("span",{className:"text-xs uppercase tracking-[0.2em] text-white/40",children:[s.rows.length," ",s.rows.length===1?"brief":"briefs"]})]}),e.jsx("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",children:s.rows.map(l=>e.jsx(y,{campaign:l,taken:i[l.id]??0},l.id))})]},s.label))})})}),e.jsx(p,{})]})}function y({campaign:t,taken:a}){const i=t.status==="closed",r=j(t.slug),s=t.brief_description||t.brief_headline||"Earn $1.25 per 1,000 views — up to $600 per creator.",l=e.jsxs("div",{className:"relative aspect-[16/9] w-full overflow-hidden",style:{background:"radial-gradient(circle at 30% 30%, rgba(201,169,110,0.35), transparent 60%), linear-gradient(135deg, #1a1613 0%, #0D0D0D 100%)"},children:[t.thumbnail_url?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:t.thumbnail_url,alt:t.title,loading:"lazy",className:"absolute inset-0 size-full object-cover transition-transform duration-500 group-hover:scale-105"}),e.jsx("div",{className:"absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-black/60 to-transparent"})]}):e.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-6 text-center",children:e.jsx("span",{className:"font-display text-2xl font-bold tracking-tight sm:text-3xl",style:{color:c},children:t.title.split("—")[0].trim()})}),r?e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/55",children:e.jsx("span",{className:"rounded-full border border-white/30 bg-black/60 px-4 py-1.5 text-[10px] font-bold uppercase tracking-[0.25em] text-white",children:"Coming Soon"})}):null]});return r?e.jsxs("div",{"aria-disabled":"true",className:"flex flex-col overflow-hidden rounded-2xl border border-white/10 bg-white/[0.02] opacity-50",children:[l,e.jsxs("div",{className:"flex flex-1 flex-col p-6",children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(o,{children:"Coming Soon"}
1),e.jsxs(o,{children:["$",Number(t.pool_usd).toLocaleString()," Pool"]})]}),e.jsx("h2",{className:"mt-5 font-display text-2xl font-bold tracking-tight",children:t.title}),e.jsx("p",{className:"mt-3 flex-1 text-sm text-white/60",children:s}),e.jsx("div",{className:"mt-6 inline-flex items-center gap-2 self-start rounded-full border border-white/15 px-5 py-2.5 text-sm font-semibold text-white/40",children:"Not open yet"})]})]}):e.jsxs(b,{to:"/amplify/briefs/$briefSlug",params:{briefSlug:t.slug},className:"group flex flex-col overflow-hidden rounded-2xl border border-white/10 bg-white/[0.02] transition-all hover:-translate-y-0.5 hover:border-white/25",children:[l,e.jsxs("div",{className:"flex flex-1 flex-col p-6",children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[i?e.jsx(o,{children:"Full"}):e.jsx(o,{accent:!0,children:"Active"}),e.jsxs(o,{children:["$",Number(t.pool_usd).toLocaleString()," Pool"]}),e.jsxs(o,{children:[i?"FULL":`${a}/${t.slot_limit}`," Slots"]})]}),e.jsx("h2",{className:"mt-5 font-display text-2xl font-bold tracking-tight",children:t.title}),e.jsx("p",{className:"mt-3 flex-1 text-sm text-white/60",children:s}),e.jsxs("div",{className:"mt-6 inline-flex items-center gap-2 self-start rounded-full px-5 py-2.5 text-sm font-semibold text-black transition-transform group-hover:translate-x-0.5",style:{backgroundColor:c},children:["View Brief ",e.jsx(g,{className:"size-4"})]})]})]})}function o({children:t,accent:a}){return a?e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-[10px] font-bold uppercase tracking-[0.2em]",style:{backgroundColor:`${c}22`,color:c},children:[e.jsx("span",{className:"size-1.5 rounded-full",style:{backgroundColor:c}}),t]}):e.jsx("span",{className:"inline-flex items-center rounded-full bg-white/10 px-3 py-1 text-[10px] font-bold uppercase tracking-[0.2em] text-white/70",children:t})}export{C as component};

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.