PageSourceSearch

https://social-post-woad.vercel.app/_next/static/chunks/00b.lhx56i3yl.js

js social-post-woad.vercel.app collected 2026-10-03 07:46:21 UTC 13,361 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96524,e=>{"use strict";var t=e.i(43476),s=e.i(17255),l=e.i(71645),a=e.i(11152);function i({status:e}){return"processing"===e?(0,t.jsx)("span",{className:"w-2 h-2 rounded-full bg-purple-400 animate-pulse-dot inline-block"}):"completed"===e?(0,t.jsx)("span",{className:"w-2 h-2 rounded-full bg-emerald-500 inline-block"}):(0,t.jsx)("span",{className:"w-2 h-2 rounded-full bg-red-500 inline-block"})}e.s(["default",0,function(){let{data:e,status:r}=(0,s.useSession)(),[n,c]=(0,l.useState)([]),[x,d]=(0,l.useState)(!0),[o,m]=(0,l.useState)(null),[p,h]=(0,l.useState)(null),u=async()=>{if(e?.user){try{let e=await fetch("/api/creations");e.ok&&c(await e.json())}catch{}d(!1)}};(0,l.useEffect)(()=>{if(!e?.user)return;u();let t=setInterval(u,5e3);return()=>clearInterval(t)},[e]);let f=(e,t)=>{navigator.clipboard.writeText(t),h(e),setTimeout(()=>h(null),2e3)};if("unauthenticated"===r)return(0,t.jsx)("div",{className:"min-h-screen bg-zinc-950 flex flex-col",children:(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center px-4 text-center gap-6",children:[(0,t.jsx)(a.FaImages,{className:"text-5xl text-zinc-700"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-zinc-300 mb-2",children:"Post Gallery"}),(0,t.jsx)("p",{className:"text-zinc-500 text-sm mb-6",children:"Sign in to see all your generated social media posts."})]}),(0,t.jsxs)("button",{onClick:()=>(0,s.signIn)("google"),className:"flex items-center gap-2 px-6 py-3 rounded-xl bg-gradient-to-r from-purple-500 to-indigo-600 text-white font-bold text-sm",children:[(0,t.jsx)(a.FaGoogle,{}),"Sign in with Google"]})]})});n.filter(e=>"completed"===e.status);let b=n.filter(e=>"processing"===e.status),j=e=>{if(!e||!e.resultText)return null;try{return JSON.parse(e.resultText)}catch{return{postText:e.resultText,headline:"AI Social Post",suggestedHashtags:[]}}};return(0,t.jsxs)("div",{className:"min-h-screen bg-zinc-950 flex flex-col",children:[(0,t.jsxs)("main",{className:"flex-1 max-w-7xl mx-auto w-full px-4 py-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{className:"text-2xl font-bold text-white flex items-center gap-2",children:[(0,t.jsx)(a.FaImages,{className:"text-purple-500"}),"Social Post Gallery"]}),(0,t.jsxs)("p",{className:"text-zinc-500 text-sm mt-1",children:[n.length," post",1!==n.length?"s":""," created"]})]}),(0,t.jsx)("div",{className:"hidden sm:flex items-center gap-3",children:b.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-purple-500/10 border border-purple-500/20 text-purple-400 text-xs font-medium",children:[(0,t.jsx)(a.FaSpinner,{className:"animate-spin text-[10px]"}),b.length," generating"]})})]}),x?(0,t.jsx)("div",{className:"flex items-center justify-center py-24",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,t.jsx)(a.FaSpinner,{className:"animate-spin text-purple-500 text-2xl"}),(0,t.jsx)("p",{className:"text-zinc-500 text-sm",children:"Loading your posts…"})]})}):0===n.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-24 text-center",children:[(0,t.jsx)("div",{className:"w-20 h-20 rounded-2xl bg-zinc-900 border border-zinc-800 flex items-center justify-center mb-4",children:(0,t.jsx)(a.FaMagic,{className:"text-3xl text-zinc-700 animate-float"})}),(0,t.jsx)("h2",{className:"text-lg font-semibold text-zinc-400 mb-2",children:"No posts yet"}),(0,t.jsx)("p",{className:"text-zinc-600 text-sm mb-6",children:"Create your first social media post in the Studio."}),(0,t.jsx)("a",{href:"/",className:"px-6 py-2.5 rounded-xl bg-gradient-to-r from-purple-500 to-indigo-600 text-white text-sm font-bold shadow-lg",children:"Go to Studio →"})]}):(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:n.map(e=>{let s=j(e),l=p===e.id;return(0,t.jsxs)("div",{className:"group relative rounded-xl border border-zinc-800 hover:border-purple-500/40 transition-all cursor-pointer bg-zinc-900 flex flex-col p-4",onClick:()=>"completed"===e.status&&s&&m(e),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2 shrink-0",children:[(0,t.jsxs)("span",{className:"text-xs font-bold text-zinc-300 flex items-center gap-1.5",children:[(e=>{switch(e){case"LinkedIn":return(0,t.jsx)(a.FaLinkedin,{className:"text-[#0a66c2]"});case"Twitter / X":return(0,t.jsx)(a.FaTwitter,{className:"text-zinc-300"});case"Facebook":return(0,t.jsx)(a.FaFacebook,{className:"text-[#1877f2]"});case"Instagram":return(0,t.jsx)(a.FaInstagram,{className:"text-[#e1306c]"});case"Reddit":return(0,t.jsx)(a.FaReddit,{className:"text-[#ff4500]"});case"Line":return(0,t.jsx)(a.FaLine,{className:"text-[#06c755]"});default:return(0,t.jsx)(a.FaGlobe,{className:"text-zinc-400"})}})(e.platform),e.platform]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(i,{status:e.status}),(0,t.jsx)("span",{className:"text-[9px] px-1.5 py-0.5 rounded bg-zinc-800 text-zinc-400 font-semibold",children:e.tone})]})]}),(0,t.jsx)("div",{className:"flex-1 flex flex-col justify-between min-h-[100px]",children:"processing"===e.status?(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-2",children:[(0,t.jsx)(a.FaSpinner,{className:"animate-spin text-purple-500 text-sm"}),(0,t.jsx)("span",{className:"text-[9px] text-zinc-500 font-medium",children:"Generating content..."})]}):"completed"===e.status&&s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-xs text-zinc-400 line-clamp-4 leading-normal mb-3 whitespace-pre-wrap",children:s.postText}),(0,t.jsx)("div",{className:"flex gap-1.5 justify-end mt-auto pt-3 border-t border-zinc-850 opacity-0 group-hover:opacity-100 transition-all shrink-0",children:(0,t.jsxs)("button",{onClick:t=>{t.stopPropagation(),f(e.id,s.postText)},className:"flex items-center gap-1 px-2.5 py-1 rounded bg-purple-500 text-white text-[9px] font-bold",children:[l?(0,t.jsx)(a.FaCheck,{className:"text-[8px]"}):(0,t.jsx)(a.FaCopy,{className:"text-[8px]"}),l?"Copied":"Copy"]})})]}):(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[(0,t.jsx)("span",{className:"text-red-500 text-xs",children:"⚠️ Generation failed"}),(0,t.jsx)("p",{className:"text-[8px] text-zinc-600 text-center leading-normal mt-1",children:e.error||"Model error"})]})}),(0,t.jsxs)("div",{className:"text-[9px] text-zinc-600 mt-2 shrink-0 border-t border-zinc-850 pt-2 flex justify-between",children:[(0,t.jsxs)("span",{children:["Topic: ",e.topic.substring(0,15),"..."]}),(0,t.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]},e.id)})})]}),o&&(0,t.jsx)("div",{className:"fixed inset-0 z-[300] bg-black/90 backdrop-blur-md flex items-center justify-center p-4",onClick:()=>m(null),children:(0,t.jsxs)("div",{className:"relative max-w-lg w-full rounded-2xl overflow-hidden border border-zinc-700 shadow-2xl bg-zinc-900 p-6",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("button",{onClick:()=>m(null),className:"absolute top-4 right-4 z-10 p-2 rounded-xl bg-black/70 hover:bg-red-600 text-white transition-all",children:(0,t.jsx)(a.FaTimes,{className:"text-xs"})}),(0,t.jsxs)("h3",{className:"text-sm font-bold text-white mb-4 flex items-center gap-2",children:[(0,t.jsx)(a.FaMagic,{className:"text-purple-500 text-xs"}),"AI Copy Showcase Details"]}
1),(s=>{let l=j(s);if(!l)return null;let i=e?.user?.image||"https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&q=80&w=200",r=e?.user?.name||"AI Copywriter";return"LinkedIn"===s.platform?(0,t.jsxs)("div",{className:"border border-zinc-800 bg-zinc-950 rounded-xl p-4 w-full text-zinc-100 text-left text-xs mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,t.jsx)("img",{src:i,alt:"avatar",className:"w-8 h-8 rounded-full object-cover border border-zinc-700 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"font-semibold text-white",children:r}),(0,t.jsx)("p",{className:"text-[9px] text-zinc-500",children:"Social Media Expert • 1st"})]})]}),(0,t.jsx)("div",{className:"whitespace-pre-wrap leading-relaxed text-zinc-200 mb-3",children:l.postText})]}):"Twitter / X"===s.platform?(0,t.jsxs)("div",{className:"border border-zinc-800 bg-black rounded-xl p-4 w-full text-zinc-100 text-left text-xs mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,t.jsx)("img",{src:i,alt:"avatar",className:"w-8 h-8 rounded-full object-cover border border-zinc-700 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("h4",{className:"font-semibold text-white flex items-center gap-1",children:[r,(0,t.jsx)("span",{className:"w-3 h-3 rounded-full bg-blue-500 text-white flex items-center justify-center text-[6px]",children:"✔"})]}),(0,t.jsxs)("p",{className:"text-[9px] text-zinc-500",children:["@",r.toLowerCase().replace(/\s+/g,"")]})]})]}),(0,t.jsx)("div",{className:"whitespace-pre-wrap leading-relaxed text-zinc-200 mb-3 font-sans",children:l.postText})]}):"Instagram"===s.platform?(0,t.jsxs)("div",{className:"border border-zinc-800 bg-zinc-950 rounded-xl w-full text-zinc-100 text-left text-xs overflow-hidden mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 p-2 border-b border-zinc-900",children:[(0,t.jsx)("img",{src:i,alt:"avatar",className:"w-6 h-6 rounded-full object-cover shrink-0"}),(0,t.jsx)("h4",{className:"font-semibold text-[10px] text-white",children:r})]}),(0,t.jsxs)("div",{className:"aspect-video bg-gradient-to-tr from-purple-900/60 to-indigo-900/60 flex flex-col items-center justify-center p-4 text-center",children:[(0,t.jsx)("h5",{className:"font-bold text-xs text-white",children:l.headline}),(0,t.jsx)("p",{className:"text-[8px] text-zinc-400 mt-1 max-w-xs",children:s.topic})]}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsxs)("div",{className:"whitespace-pre-wrap leading-relaxed text-zinc-250",children:[(0,t.jsx)("span",{className:"font-bold text-white mr-1",children:r.toLowerCase().replace(/\s+/g,"")}),l.postText]})})]}):"Reddit"===s.platform?(0,t.jsxs)("div",{className:"border border-zinc-800 bg-[#1a1a1b] rounded-xl p-4 w-full text-zinc-200 text-left text-xs mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)("div",{className:"w-5 h-5 rounded-full bg-[#ff4500] flex items-center justify-center text-white shrink-0",children:(0,t.jsx)(a.FaReddit,{className:"text-[10px]"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-semibold text-[10px] text-zinc-100 hover:underline cursor-pointer",children:"r/socialpost"}),(0,t.jsx)("span",{className:"text-[9px] text-zinc-500 ml-2",children:"Posted by u/copywriter 2h ago"})]})]}),l.headline&&(0,t.jsx)("h3",{className:"font-bold text-xs text-zinc-100 mb-2 leading-snug",children:l.headline}),(0,t.jsx)("div",{className:"whitespace-pre-wrap leading-relaxed text-zinc-300 mb-3 font-sans",children:l.postText})]}):"Line"===s.platform?(0,t.jsx)("div",{className:"border border-zinc-800 bg-[#8cabd9] rounded-xl p-4 w-full text-zinc-800 text-left text-xs relative overflow-hidden min-h-[180px] flex flex-col justify-between mb-4",children:(0,t.jsxs)("div",{className:"flex items-start gap-2 max-w-[90%] pt-2",children:[(0,t.jsx)("img",{src:i,alt:"avatar",className:"w-6 h-6 rounded-full object-cover shrink-0 border border-zinc-300"}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-[8px] font-semibold text-zinc-650 mb-0.5 ml-1",children:r}),(0,t.jsxs)("div",{className:"flex items-end gap-1",children:[(0,t.jsxs)("div",{className:"bg-white text-zinc-900 rounded-xl rounded-tl-none p-2.5 shadow-sm leading-normal whitespace-pre-wrap font-sans text-[10px]",children:[l.headline&&(0,t.jsx)("p",{className:"font-bold text-[10px] border-b border-zinc-100 pb-0.5 mb-0.5 text-zinc-950",children:l.headline}),l.postText]}),(0,t.jsx)("span",{className:"text-[7px] text-zinc-600 shrink-0 whitespace-nowrap mb-0.5",children:"5:24 PM"})]})]})]})}):(0,t.jsx)("div",{className:"border border-zinc-800 bg-zinc-950 rounded-xl p-4 w-full text-zinc-100 text-left text-xs mb-4",children:(0,t.jsx)("div",{className:"whitespace-pre-wrap leading-relaxed text-zinc-200 mb-3",children:l.postText})})})(o),(0,t.jsxs)("div",{className:"flex items-center justify-between border-t border-zinc-800 pt-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"text-xs font-semibold text-zinc-300",children:[o.platform," Feed Card"]}),(0,t.jsxs)("p",{className:"text-[10px] text-zinc-500 mt-0.5",children:["Generated ",new Date(o.createdAt).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})]})]}),(0,t.jsxs)("button",{onClick:()=>{let e=j(o);e&&f(o.id,e.postText)},className:"flex items-center gap-2 px-4 py-2 rounded-xl bg-gradient-to-r from-purple-500 to-indigo-600 text-white text-xs font-bold hover:from-purple-400 hover:to-indigo-500 transition-all shadow-lg hover:shadow-
1purple-500/20",children:[p===o.id?(0,t.jsx)(a.FaCheck,{className:"text-xs text-emerald-400"}):(0,t.jsx)(a.FaCopy,{className:"text-xs"}),p===o.id?"Copied Post!":"Copy Post"]})]})]})})]})}])}]);

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.