PageSourceSearch

https://app.genmark.ai/static/js/GenerativeAdsMainDashboard.CVWp6ct8.js

js genmark.ai collected 2026-10-05 12:01:41 UTC 13,161 bytes, 1 lines download raw bytes

1import{j as e}from"./index.DpMbmDRM.js";import{r as m}from"./vendor.DRWrrDqG.js";import u from"./CampaignCreationWizard.WNQooNPD.js";import{G as b,m as v}from"./GenerativeAdsAnalyticsDashboard.B4sKBWnr.js";import"./antd.qZt8WDgQ.js";import"./SponsoredLabel.CCG780rz.js";import"./subDays.Z--qSrPu.js";const S=({businessId:o,className:h=""})=>{const[i,a]=m.useState("dashboard"),[r,y]=m.useState([{id:"1",name:"Q4 Marketing Software Promotion",status:"active",objective:"conversion",platforms:["ChatGPT","Claude","Perplexity"],budget:{amount:500,type:"daily",spent:2450},performance:{impressions:125e3,clicks:3750,conversions:94,ctr:3,cpc:2.45,roas:4.2},createdAt:"2024-12-01",startDate:"2024-12-15",endDate:"2024-12-31"},{id:"2",name:"Brand Awareness - AI Tools",status:"active",objective:"awareness",platforms:["ChatGPT","Gemini","Copilot"],budget:{amount:300,type:"daily",spent:1200},performance:{impressions:85e3,clicks:1700,conversions:28,ctr:2,cpc:1.85,roas:2.8},createdAt:"2024-11-28",startDate:"2024-12-10"},{id:"3",name:"Retargeting - Free Trial Users",status:"paused",objective:"retention",platforms:["Claude","Perplexity"],budget:{amount:150,type:"daily",spent:450},performance:{impressions:32e3,clicks:960,conversions:48,ctr:3,cpc:1.95,roas:5.1},createdAt:"2024-11-25",startDate:"2024-12-05",endDate:"2024-12-20"}]),l=s=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0}).format(s),d=s=>new Intl.NumberFormat("en-US").format(s),c={ChatGPT:"🤖",Claude:"🎯",Perplexity:"🔍",Copilot:"⚡",Gemini:"✨",Brave:"🦁","You.com":"🔎","Meta AI":"🤳"},x={active:"bg-green-100 text-green-800",paused:"bg-yellow-100 text-yellow-800",completed:"bg-gray-100 text-gray-800",draft:"bg-blue-100 text-blue-800"},p=()=>e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:"Quick Actions"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("button",{onClick:()=>a("create-campaign"),className:"p-4 border-2 border-dashed border-blue-300 rounded-lg text-center hover:border-blue-400 hover:bg-blue-50 transition-colors",children:[e.jsx("div",{className:"text-3xl text-blue-600 mb-2",children:"➕"}),e.jsx("div",{className:"font-medium text-blue-900",children:"Create Campaign"}),e.jsx("div",{className:"text-sm text-blue-600",children:"Launch new AI ads"})]}),e.jsxs("button",{onClick:()=>a("analytics"),className:"p-4 border border-gray-200 rounded-lg text-center hover:border-gray-300 hover:bg-gray-50 transition-colors",children:[e.jsx("div",{className:"text-3xl text-gray-600 mb-2",children:"📊"}),e.jsx("div",{className:"font-medium text-gray-900",children:"View Analytics"}),e.jsx("div",{className:"text-sm text-gray-600",children:"Detailed insights"})]}),e.jsxs("button",{onClick:()=>a("campaigns"),className:"p-4 border border-gray-200 rounded-lg text-center hover:border-gray-300 hover:bg-gray-50 transition-colors",children:[e.jsx("div",{className:"text-3xl text-gray-600 mb-2",children:"📋"}),e.jsx("div",{className:"font-medium text-gray-900",children:"Manage Campaigns"}),e.jsx("div",{className:"text-sm text-gray-600",children:"Edit & optimize"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Active Campaigns"}),e.jsx("p",{className:"text-2xl font-bold text-gray-900",children:r.filter(s=>s.status==="active").length})]}),e.jsx("div",{className:"p-3 bg-blue-100 rounded-full",children:e.jsx("span",{className:"text-blue-600 text-xl",children:"🚀"})})]})}),e.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Spend (7d)"}),e.jsx("p",{className:"text-2xl font-bold text-gray-900",children:l(r.reduce((s,t)=>s+t.budget.spent,0))})]}),e.jsx("div",{className:"p-3 bg-green-100 rounded-full",children:e.jsx("span",{className:"text-green-600 text-xl",children:"💰"})})]})}),e.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Avg. ROAS"}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900",children:[(r.reduce((s,t)=>s+t.performance.roas,0)/r.length).toFixed(1),"x"]})]}),e.jsx("div",{className:"p-3 bg-purple-100 rounded-full",children:e.jsx("span",{className:"text-purple-600 text-xl",children:"📈"})})]})}),e.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Platforms"}),e.jsx("p",{className:"text-2xl font-bold text-gray-900",children:"5"})]}),e.jsx("div",{className:"p-3 bg-yellow-100 rounded-full",children:e.jsx("span",{className:"text-yellow-600 text-xl",children:"🤖"})})]})})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200",children:[e.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Recent 
1Campaigns"}),e.jsx("button",{onClick:()=>a("campaigns"),className:"text-blue-600 hover:text-blue-800 text-sm font-medium",children:"View All"})]})}),e.jsx("div",{className:"divide-y divide-gray-200",children:r.slice(0,3).map(s=>e.jsx("div",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("h3",{className:"font-medium text-gray-900",children:s.name}),e.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${x[s.status]}`,children:s.status})]}),e.jsxs("div",{className:"flex items-center space-x-4 mt-2",children:[e.jsx("div",{className:"flex items-center space-x-1",children:s.platforms.map((t,n)=>e.jsx("span",{className:"text-lg",title:t,children:c[t]},n))}),e.jsxs("span",{className:"text-sm text-gray-600",children:[l(s.budget.amount),"/",s.budget.type]}),e.jsxs("span",{className:"text-sm text-gray-600",children:["ROAS: ",s.performance.roas.toFixed(1),"x"]})]})]}),e.jsxs("div",{className:"flex items-center space-x-4 text-sm",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"font-medium text-gray-900",children:d(s.performance.impressions)}),e.jsx("div",{className:"text-gray-600",children:"Impressions"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"font-medium text-gray-900",children:d(s.performance.clicks)}),e.jsx("div",{className:"text-gray-600",children:"Clicks"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"font-medium text-gray-900",children:d(s.performance.conversions)}),e.jsx("div",{className:"text-gray-600",children:"Conversions"})]})]})]})},s.id))})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:"Platform Performance"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:v.conversationMetrics.platformPerformance.map((s,t)=>e.jsxs("div",{className:"text-center p-4 bg-gray-50 rounded-lg",children:[e.jsx("div",{className:"text-2xl mb-2",children:c[s.platform]}),e.jsx("div",{className:"font-medium text-gray-900",children:s.platform}),e.jsxs("div",{className:"text-sm text-gray-600 mt-1",children:[s.ctr.toFixed(1),"% CTR"]}),e.jsxs("div",{className:"text-sm font-medium text-green-600",children:[s.roas.toFixed(1),"x ROAS"]})]},t))})]})]}),g=()=>e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Campaigns"}),e.jsx("button",{onClick:()=>a("create-campaign"),className:"bg-blue-600 text-white px-4 py-2 rounded-lg font-medium hover:bg-blue-700 transition-colors",children:"Create Campaign"})]}),e.jsx("div",{className:"bg-white rounded-lg border border-gray-200",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-gray-50",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Campaign"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Platforms"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Budget"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Performance"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),e.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium text-gray-900",children:s.name}),e.jsx("div",{className:"text-sm text-gray-500 capitalize",children:s.objective})]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${x[s.status]}`,children:s.status})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("div",{className:"flex items-center space-x-1",children:s.platforms.map((t,n)=>e.jsx("span",{className:"text-lg",title:t,children:c[t]},n))})}),e.jsxs("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:[e.jsxs("div",{children:[l(s.budget.amount),"/",s.budget.type]}),e.jsxs("div",{className:"text-gray-500",children:["Spent: ",l(s.budget.spent)]})]}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:d(s.performance.clicks)}),e.jsx("div",{className:"text-gray-500",children:"Clicks"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"font-medium",children:[s.performance.roas.toFixed(1),"x"]}),e.jsx("div",{className:"text-gray-500",children:"ROAS"})]})]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("button",{className:"text-blue-600 hover:text-blue-800",children:"Edit"}),e.jsx("button",{className:"text-green-600 hover:text-green-800",children:s.status==="active"?"Pause":"Resume"}),e.jsx("button",{className:"text-gray-600 hover:text-gray-800",children:"Report"})]})})]},s.id))})]})})})]}),j=()=>e.jsx("div",{className:"bg-white border-b border-gray-200 mb-8",children:e.jsx("div",{className:"px-6",children:e.jsx("nav",{className:"-mb-px flex space-x-8",children:[{id:"dashboard",label:"Overview",icon:"🏠"},{id:"campaigns",label:"Campaigns",icon:"📋"},{id:"analytics",label:"Analytics",icon:"📊"}].map(s=>e.jsxs("button",{onClick:()=>
1a(s.id),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center space-x-2 ${i===s.id?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[e.jsx("span",{children:s.icon}),e.jsx("span",{children:s.label})]},s.id))})})});return e.jsx("div",{className:`min-h-screen bg-gray-50 ${h}`,children:i==="create-campaign"?e.jsx("div",{className:"p-6",children:e.jsx(u,{onComplete:s=>{a("campaigns")},onCancel:()=>a("dashboard")})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-white shadow-sm",children:[e.jsx("div",{className:"px-6 py-8",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Generative AI Ads"}),e.jsx("p",{className:"text-gray-600 mt-1",children:"Manage conversational AI advertising across ChatGPT, Claude, Perplexity, Copilot & Gemini"})]}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsxs("div",{className:"text-sm text-gray-600",children:["Last updated: ",new Date().toLocaleTimeString()]}),e.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full animate-pulse"})]})]})}),j()]}),e.jsxs("div",{className:"px-6 py-8",children:[i==="dashboard"&&p(),i==="campaigns"&&g(),i==="analytics"&&e.jsx(b,{businessId:o})]})]})})};export{S 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.