PageSourceSearch

https://socialselling.ai/_next/static/chunks/10368.07a69f7d3ef256dd.js

js socialselling.ai collected 2026-10-05 14:50:55 UTC 33,178 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[10368],{31047:function(e,s,t){t.d(s,{Z:function(){return a}});let a=(0,t(39763).Z)("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]])},10368:function(e,s,t){t.r(s),t.d(s,{default:function(){return W}});var a=t(57437),l=t(2265),n=t(79820),i=t(12381),r=t(69174),c=t(17168),d=t(74291),o=t(89345),m=t(13041),x=t(37760),p=t(79219),u=t(58896),g=t(82023),h=t(89291),f=t(53417),v=t(95805),b=t(99397),j=t(32795),N=t(5187),y=t(70525),w=t(46221),k=t(15863),C=t(22135),R=t(40875),Z=t(25846),A=t(11239),S=t(66901),D=t(31047),z=t(44743),I=t(93448);let T=[{id:"1",name:"Summer Sale 2024",status:"active",channels:["email","whatsapp"],sent:5e3,opens:1600,clicks:350,revenue:18e3,openRate:32,clickRate:7,health:"excellent"},{id:"2",name:"Diwali Offers",status:"active",channels:["email","whatsapp","instagram_post"],sent:3e3,opens:360,clicks:45,revenue:4e3,openRate:12,clickRate:1.5,health:"warning"},{id:"3",name:"Product Launch",status:"active",channels:["email","instagram_post"],sent:8e3,opens:2240,clicks:480,revenue:12e3,openRate:28,clickRate:6,health:"good"},{id:"4",name:"Flash Friday",status:"completed",channels:["email"],sent:2500,opens:625,clicks:125,revenue:8e3,openRate:25,clickRate:5,health:"good"},{id:"5",name:"New Year Promo",status:"draft",channels:["whatsapp","instagram_post"],sent:0,opens:0,clicks:0,revenue:0,openRate:0,clickRate:0,health:"pending"}],_={1:{summary:"\uD83C\uDFC6 TOP performer! 32% open rate is 52% above industry average.",metrics:[{label:"Open",value:"32%",status:"good"},{label:"Click",value:"7%",status:"good"},{label:"Delivery",value:"97%",status:"good"},{label:"ROI",value:"620%",status:"good"}],tips:["Extend by 1 week","Add Instagram +35% reach","A/B test subject line"],fixes:[{action:"Extend campaign by 7 days",impact:"+₹5,000 estimated revenue",status:"pending"},{action:"Add Instagram channel",impact:"+35% audience reach",status:"pending"},{action:"Schedule best time (Tue 10 AM)",impact:"+15% open rate",status:"pending"}],details:{timeline:[{date:"Mon",sent:800,opens:256,clicks:56},{date:"Tue",sent:1200,opens:432,clicks:96},{date:"Wed",sent:1e3,opens:340,clicks:75},{date:"Thu",sent:1100,opens:352,clicks:77},{date:"Fri",sent:900,opens:220,clicks:46}],channels:[{name:"Email",sent:3500,delivered:3395,opened:1120,clicked:245,rate:32},{name:"WhatsApp",sent:1500,delivered:1425,opened:480,clicked:105,rate:34}],audience:[{segment:"High-value customers",count:1200,openRate:45},{segment:"Recent purchasers",count:1800,openRate:38},{segment:"Newsletter subscribers",count:2e3,openRate:22}]}},2:{summary:"⚠️ Needs attention! WhatsApp delivery only 67%, template may be flagged.",metrics:[{label:"Open",value:"12%",status:"bad"},{label:"Click",value:"1.5%",status:"warning"},{label:"Delivery",value:"67%",status:"bad"},{label:"ROI",value:"25%",status:"warning"}],tips:["Use backup WA template","Change subject line","Send at 7 PM"],fixes:[{action:"Switch to backup WhatsApp template",impact:"+23% delivery rate",status:"pending"},{action:'Update email subject to "\uD83E\uDE94 Your Diwali Gift"',impact:"+40% open rate",status:"pending"},{action:"Reschedule sends to 7 PM",impact:"+25% engagement",status:"pending"}],details:{timeline:[{date:"Mon",sent:600,opens:72,clicks:9},{date:"Tue",sent:800,opens:96,clicks:12},{date:"Wed",sent:700,opens:84,clicks:10},{date:"Thu",sent:500,opens:60,clicks:8},{date:"Fri",sent:400,opens:48,clicks:6}],channels:[{name:"Email",sent:1500,delivered:1470,opened:180,clicked:22,rate:12},{name:"WhatsApp",sent:1200,delivered:804,opened:150,clicked:18,rate:19},{name:"Instagram",sent:300,delivered:300,opened:30,clicked:5,rate:10}],audience:[{segment:"Diwali shoppers 2023",count:1500,openRate:15},{segment:"All contacts",count:1500,openRate:9}]}},3:{summary:"✅ Good performance with steady +8% week-over-week growth.",metrics:[{label:"Open",value:"28%",status:"good"},{label:"Click",value:"6%",status:"good"},{label:"Delivery",value:"97.5%",status:"good"},{label:"ROI",value:"567%",status:"good"}],tips:["Add WhatsApp +35%","Retarget IG engagers","Create lookalike"],fixes:[{action:"Add WhatsApp channel",impact:"+35% reach",status:"pending"},{action:"Create retargeting for Instagram engagers",impact:"+20% conversions",status:"pending"},{action:"Build lookalike audience",impact:"+500 new leads",status:"pending"}],details:{timeline:[{date:"Mon",sent:1600,opens:448,clicks:96},{date:"Tue",sent:1800,opens:540,clicks:115},{date:"Wed",sent:1600,opens:464,clicks:99},{date:"Thu",sent:1500,opens:420,clicks:90},{date:"Fri",sent:1500,opens:368,clicks:80}],channels:[{name:"Email",sent:6e3,delivered:5880,opened:1680,clicked:360,rate:29},{name:"Instagram",sent:2e3,delivered:2e3,opened:560,clicked:120,rate:28}],audience:[{segment:"Product interest",count:4e3,openRate:35},{segment:"Website visitors",count:2500,openRate:28},{segment:"Social followers",count:1500,openRate:18}]}}
1,4:{summary:"✅ Completed successfully! Friday 6 PM was best send time.",metrics:[{label:"Open",value:"25%",status:"good"},{label:"Click",value:"5%",status:"good"},{label:"Delivery",value:"98%",status:"good"},{label:"ROI",value:"1500%",status:"good"}],tips:["Replicate for future","Urgency worked well","Single CTA best"],fixes:[{action:"Save as template for future flash sales",impact:"Reusable strategy",status:"pending"},{action:"Document best practices",impact:"Team learning",status:"pending"}],details:{timeline:[{date:"Fri 4PM",sent:500,opens:100,clicks:20},{date:"Fri 6PM",sent:800,opens:240,clicks:48},{date:"Fri 8PM",sent:600,opens:150,clicks:30},{date:"Sat",sent:400,opens:100,clicks:20},{date:"Sun",sent:200,opens:35,clicks:7}],channels:[{name:"Email",sent:2500,delivered:2450,opened:625,clicked:125,rate:26}],audience:[{segment:"VIP customers",count:800,openRate:42},{segment:"Active buyers",count:1200,openRate:28},{segment:"Others",count:500,openRate:12}]}},5:{summary:"\uD83D\uDCDD Draft ready - launch when you want!",metrics:[{label:"Status",value:"Draft",status:"warning"},{label:"Channels",value:"2",status:"good"},{label:"Ready",value:"No",status:"warning"},{label:"Est. Reach",value:"5K",status:"good"}],tips:["Add Email channel","Schedule Dec 28-31","Use countdown timer"],fixes:[{action:"Add Email channel for wider reach",impact:"+60% audience",status:"pending"},{action:"Schedule for Dec 28-31",impact:"Optimal timing",status:"pending"},{action:"Add countdown timer to creatives",impact:"+30% urgency",status:"pending"}],details:{timeline:[],channels:[{name:"WhatsApp",sent:0,delivered:0,opened:0,clicked:0,rate:0},{name:"Instagram",sent:0,delivered:0,opened:0,clicked:0,rate:0}],audience:[{segment:"Last year converters",count:2500,openRate:0},{segment:"High-intent leads",count:2500,openRate:0}]}}},O=[{icon:"\uD83C\uDFC6",title:"Summer Sale is top performer",message:"32% opens, ₹18K revenue",color:"green"},{icon:"⚠️",title:"Diwali needs attention",message:"WhatsApp at 67% delivery",color:"amber"},{icon:"\uD83D\uDCA1",title:"Email has 3x better ROI",message:"Consider shifting budget",color:"blue"}
1],P={email:o.Z,whatsapp:m.Z,instagram_post:x.Z,facebook_post:p.Z,meta_ads:u.Z,Email:o.Z,WhatsApp:m.Z,Instagram:x.Z},E={email:"bg-blue-500",whatsapp:"bg-green-500",instagram_post:"bg-pink-500",Email:"bg-blue-500",WhatsApp:"bg-green-500",Instagram:"bg-pink-500"};function W(){var e,s,t,p,u,W,F;let[L,V]=(0,l.useState)("all"),[M,Y]=(0,l.useState)(null),[H,K]=(0,l.useState)(null),[U,B]=(0,l.useState)(!1),[q,G]=(0,l.useState)(!1),[$,Q]=(0,l.useState)(null),[J,X]=(0,l.useState)({}),[ee,es]=(0,l.useState)({}),et={total:T.length,active:T.filter(e=>"active"===e.status).length,draft:T.filter(e=>"draft"===e.status).length,completed:T.filter(e=>"completed"===e.status).length},ea=T.filter(e=>"all"===L||e.status===L),el=e=>{M===e?Y(null):(K(e),setTimeout(()=>{Y(e),K(null)},600))},en=e=>{Q(e),B(!0),X({}),es({})},ei=e=>{Q(e),G(!0)},er=e=>{X(s=>({...s,[e]:!0})),setTimeout(()=>{X(s=>({...s,[e]:!1})),es(s=>({...s,[e]:!0}))},1500)},ec=$?T.find(e=>e.id===$):null,ed=$?_[$]:null,eo=e=>"good"===e?"bg-green-100 text-green-700":"warning"===e?"bg-amber-100 text-amber-700":"bg-red-100 text-red-700",em=e=>({green:"bg-green-50 border-green-200",amber:"bg-amber-50 border-amber-200",blue:"bg-blue-50 border-blue-200"})[e]||"bg-slate-50";return(0,a.jsxs)("div",{className:"min-h-full bg-slate-50",children:[(0,a.jsx)("div",{className:"bg-white border-b px-3 sm:px-6 py-2.5",children:(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-lg sm:text-xl font-bold text-slate-900 flex items-center gap-2",children:["Campaign Hub",(0,a.jsxs)(r.C,{className:"bg-purple-100 text-purple-700 border-purple-200",children:[(0,a.jsx)(g.Z,{className:"h-3 w-3 mr-1"}),"AI-Powered"]}),(0,a.jsx)(r.C,{variant:"outline",className:"text-xs",children:"MOCKUP"})]}),(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Click any campaign row to expand AI analysis"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsxs)(i.z,{variant:"outline",size:"sm",className:"gap-1.5 h-7 text-[10px]",children:[(0,a.jsx)(h.Z,{className:"h-3 w-3"}),"Pages"]}),(0,a.jsxs)(i.z,{variant:"outline",size:"sm",className:"gap-1.5 h-7 text-[10px]",children:[(0,a.jsx)(f.Z,{className:"h-3 w-3"}),"WA"]}),(0,a.jsxs)(i.z,{variant:"outline",size:"sm",className:"gap-1.5 h-7 text-[10px]",children:[(0,a.jsx)(v.Z,{className:"h-3 w-3"}),"Contacts"]}),(0,a.jsxs)(i.z,{size:"sm",className:"gap-1.5 h-7 text-[10px] bg-emerald-600 hover:bg-emerald-700",children:[(0,a.jsx)(b.Z,{className:"h-3 w-3"}),"New"]})]})]})}),(0,a.jsxs)("div",{className:"p-3 sm:p-4 space-y-4",children:[(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[{label:"Total Revenue",value:"₹".concat(42e3.toLocaleString()),icon:j.Z,gradient:"from-emerald-500 to-emerald-600"},{label:"Ad Spend",value:"₹".concat(8e3.toLocaleString()),icon:N.Z,gradient:"from-orange-500 to-orange-600"},{label:"ROI",value:"+".concat(425,"%"),icon:y.Z,gradient:"from-purple-500 to-purple-600"},{label:"Conversion",value:"".concat(4.8,"%"),icon:v.Z,gradient:"from-blue-500 to-blue-600"}].map(e=>(0,a.jsx)("div",{className:"relative overflow-hidden rounded-2xl p-4 bg-gradient-to-br ".concat(e.gradient," text-white"),children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[10px] font-semibold uppercase opacity-80",children:e.label}),(0,a.jsx)("p",{className:"text-xl font-bold",children:e.value})]}),(0,a.jsx)("div",{className:"w-10 h-10 rounded-xl bg-white/20 flex items-center justify-center",children:(0,a.jsx)(e.icon,{className:"w-5 h-5"})})]})},e.label))}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-3",children:[(0,a.jsxs)(n.Zb,{className:"lg:col-span-2 bg-white border shadow-sm",children:[(0,a.jsx)(n.Ol,{className:"py-3 px-4 border-b bg-gradient-to-r from-purple-50 to-pink-50",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 flex items-center justify-center shadow",children:(0,a.jsx)(g.Z,{className:"h-4 w-4 text-white"})}),(0,a.jsxs)(n.ll,{className:"text-sm flex items-center gap-2",children:["Live AI Insights",(0,a.jsxs)(r.C,{className:"text-[9px] bg-green-100 text-green-700 gap-1",children:[(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),"LIVE"]})]})]})}),(0,a.jsx)(n.aY,{className:"p-3",children:(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:O.map((e,s)=>(0,a.jsx)("div",{className:(0,I.cn)("rounded-lg border p-3",em(e.color)),children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("span",{className:"text-lg",children:e.icon}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-slate-800",children:e.title}),(0,a.jsx)("p",{className:"text-[10px] text-slate-600",children:e.message})]})]})},s))})})]}),(0,a.jsxs)(n.Zb,{className:"bg-white shadow-sm",children:[(0,a.jsx)(n.Ol,{className:"py-2 px-4 border-b",children:(0,a.jsxs)(n.ll,{className:"text-sm font-semibold flex items-center gap-2",children:[(0,a.jsx)(w.Z,{className:"h-4 w-4 text-emerald-600"}),"Quick Stats"]})}),(0,a.jsxs)(n.aY,{className:"p-3 space-y-3",children:[(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-center",children:[(0,a.jsxs)("div",{className:"bg-slate-50 rounded-lg p-2",children:[(0,a.jsx)("p",{className:"text-lg font-bold",children:et.total}),(0,a.jsx)("p",{className:"text-[9px] text-slate-500",children:"Campaigns"})]}),(0,a.jsxs)("div",{className:"bg-emerald-50 rounded-lg p-2",children:[(0,a.jsx)("p",{className:"text-lg font-bold text-emerald-600",children:et.active}),(0,a.jsx)("p",{className:"text-[9px] text-slate-500",children:"Active"})]}),(0,a.jsxs)("div",{className:"bg-blue-50 rounded-lg p-2",children:[(0,a.jsx)("p",{className:"text-lg font-bold text-blue-600",children:245}),(0,a.jsx)("p",{className:"text-[9px] text-slate-500",children:"Leads"})]})]}),(0,a.jsx)("div",{className:"pt-2 border-t space-y-1.5",children:[{ch:"email",rate:26,Icon:o.Z,color:"blue"}
1,{ch:"whatsapp",rate:70,Icon:m.Z,color:"green"},{ch:"instagram",rate:6.8,Icon:x.Z,color:"pink"}].map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between bg-slate-50 rounded px-2 py-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-".concat(e.color,"-500 flex items-center justify-center"),children:(0,a.jsx)(e.Icon,{className:"h-2.5 w-2.5 text-white"})}),(0,a.jsx)("span",{className:"text-xs capitalize",children:e.ch})]}),(0,a.jsxs)("span",{className:"text-xs font-bold text-emerald-600",children:[e.rate,"%"]})]},e.ch))})]})]})]}),(0,a.jsxs)(n.Zb,{className:"bg-white overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between py-2 px-3 border-b",children:[(0,a.jsxs)("h3",{className:"text-xs font-semibold flex items-center gap-2",children:["Your Campaigns",(0,a.jsx)("span",{className:"text-[10px] text-slate-400 font-normal",children:"← Click to expand AI analysis"})]}),(0,a.jsx)(c.Tabs,{value:L,onValueChange:V,children:(0,a.jsx)(c.TabsList,{className:"bg-emerald-50 h-7",children:["all","active","draft","completed"].map(e=>(0,a.jsxs)(c.TabsTrigger,{value:e,className:"text-[10px] px-3 h-6 data-[state=active]:bg-emerald-600 data-[state=active]:text-white capitalize",children:[e," ",(0,a.jsx)("span",{className:"ml-1 opacity-60",children:"all"===e?et.total:et[e]})]},e))})})]}),(0,a.jsxs)(n.aY,{className:"p-0",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_80px_80px_80px_80px_40px] gap-2 px-3 py-2 bg-slate-50 border-b text-[10px] font-medium text-slate-500 uppercase",children:[(0,a.jsx)("div",{children:"Campaign"}),(0,a.jsx)("div",{children:"Channels"}),(0,a.jsx)("div",{className:"text-right",children:"Sent"}),(0,a.jsx)("div",{className:"text-right",children:"Opens"}),(0,a.jsx)("div",{className:"text-right",children:"Revenue"}),(0,a.jsx)("div",{})]}),(0,a.jsx)("div",{className:"divide-y",children:ea.map(e=>{let s=_[e.id],t=M===e.id,l=H===e.id;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{onClick:()=>el(e.id),className:(0,I.cn)("grid grid-cols-[1fr_80px_80px_80px_80px_40px] gap-2 px-3 py-3 hover:bg-slate-50 cursor-pointer items-center transition-colors",t&&"bg-purple-50 border-l-4 border-l-purple-500"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:(0,I.cn)("w-2 h-2 rounded-full","active"===e.status?"bg-emerald-500":"draft"===e.status?"bg-amber-500":"bg-slate-400")}),(0,a.jsx)("span",{className:"text-xs font-medium truncate",children:e.name}),"excellent"===e.health&&(0,a.jsx)(r.C,{className:"bg-green-100 text-green-700 text-[8px] px-1 py-0",children:"\uD83C\uDFC6"}),"warning"===e.health&&(0,a.jsx)(r.C,{className:"bg-amber-100 text-amber-700 text-[8px] px-1 py-0",children:"⚠️"})]}),(0,a.jsx)("div",{className:"flex gap-1",children:e.channels.slice(0,3).map(e=>{let s=P[e]||o.Z;return(0,a.jsx)("div",{className:(0,I.cn)("w-5 h-5 rounded flex items-center justify-center",E[e]||"bg-slate-500"),children:(0,a.jsx)(s,{className:"h-2.5 w-2.5 text-white"})},e)})}),(0,a.jsx)("div",{className:"text-right text-xs font-medium",children:e.sent.toLocaleString()}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("span",{className:"text-xs font-medium",children:e.opens.toLocaleString()}),(0,a.jsxs)("span",{className:"text-[10px] text-slate-400 ml-1",children:["(",e.openRate,"%)"]})]}),(0,a.jsx)("div",{className:"text-right text-xs font-medium text-emerald-600",children:e.revenue>0?"₹".concat(e.revenue.toLocaleString()):"-"}),(0,a.jsx)("div",{className:"flex items-center justify-center",children:l?(0,a.jsx)(k.Z,{className:"h-4 w-4 animate-spin text-purple-500"}):t?(0,a.jsx)(C.Z,{className:"h-4 w-4 text-purple-500"}):(0,a.jsx)(R.Z,{className:"h-4 w-4 text-slate-400"})})]}),t&&s&&(0,a.jsx)("div",{className:"bg-gradient-to-r from-purple-50 via-white to-pink-50 border-l-4 border-l-purple-500 px-4 py-3",children:(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 flex items-center justify-center shadow shrink-0",children:(0,a.jsx)(g.Z,{className:"h-5 w-5 text-white"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-slate-800 mb-3",children:s.summary}),(0,a.jsx)("div",{className:"flex gap-2 mb-3",children:s.metrics.map(e=>(0,a.jsxs)("div",{className:(0,I.cn)("rounded-lg px-3 py-1.5 text-center",eo(e.status)),children:[(0,a.jsx)("p",{className:"text-sm font-bold",children:e.value}),(0,a.jsx)("p",{className:"text-[9px] uppercase",children:e.label})]},e.label))}),(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)(Z.Z,{className:"h-4 w-4 text-amber-500 shrink-0 mt-0.5"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.tips.map((e,s)=>(0,a.jsx)("span",{className:"text-xs bg-white border border-slate-200 rounded-full px-2.5 py-1 text-slate-700",children:e},s))})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5 shrink-0",children:[(0,a.jsxs)(i.z,{size:"sm",className:"bg-purple-600 hover:bg-purple-700 h-
17 text-[10px] gap-1",onClick:s=>{s.stopPropagation(),en(e.id)},children:[(0,a.jsx)(A.Z,{className:"h-3 w-3"}),"Apply Fix"]}),(0,a.jsxs)(i.z,{size:"sm",variant:"outline",className:"h-7 text-[10px] gap-1",onClick:s=>{s.stopPropagation(),ei(e.id)},children:[(0,a.jsx)(w.Z,{className:"h-3 w-3"}),"Details"]})]})]})})]},e.id)})})]})]})]}),(0,a.jsx)(d.Vq,{open:U,onOpenChange:B,children:(0,a.jsxs)(d.cZ,{className:"max-w-lg",children:[(0,a.jsx)(d.fK,{children:(0,a.jsxs)(d.$N,{className:"flex items-center gap-2",children:[(0,a.jsx)(A.Z,{className:"h-5 w-5 text-purple-600"}),"Apply AI Fixes - ",null==ec?void 0:ec.name]})}),(0,a.jsxs)("div",{className:"space-y-3 py-2",children:[(0,a.jsx)("p",{className:"text-sm text-slate-600",children:"AI has identified the following optimizations:"}),(0,a.jsx)("div",{className:"space-y-2",children:null==ed?void 0:ed.fixes.map((e,s)=>(0,a.jsx)("div",{className:(0,I.cn)("rounded-lg border p-3 transition-all",ee[s]?"bg-green-50 border-green-200":"bg-white border-slate-200"),children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[ee[s]?(0,a.jsx)(S.Z,{className:"h-4 w-4 text-green-600"}):J[s]?(0,a.jsx)(k.Z,{className:"h-4 w-4 text-purple-600 animate-spin"}):(0,a.jsx)("div",{className:"w-4 h-4 rounded-full border-2 border-slate-300"}),(0,a.jsx)("p",{className:"text-sm font-medium text-slate-800",children:e.action})]}),(0,a.jsxs)("p",{className:"text-xs text-emerald-600 ml-6",children:["↑ ",e.impact]})]}),!ee[s]&&!J[s]&&(0,a.jsx)(i.z,{size:"sm",variant:"outline",className:"h-7 text-xs",onClick:()=>er(s),children:"Apply"}),J[s]&&(0,a.jsx)("span",{className:"text-xs text-purple-600",children:"Applying..."}),ee[s]&&(0,a.jsx)(r.C,{className:"bg-green-100 text-green-700 text-xs",children:"Done"})]})},s))}),(0,a.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,a.jsxs)(i.z,{className:"flex-1 bg-purple-600 hover:bg-purple-700 gap-2",onClick:()=>{var e;($&&(null===(e=_[$])||void 0===e?void 0:e.fixes)||[]).forEach((e,s)=>{setTimeout(()=>er(s),800*s)})},disabled:Object.keys(ee).length===(null==ed?void 0:ed.fixes.length),children:[(0,a.jsx)(A.Z,{className:"h-4 w-4"}),"Apply All Fixes"]}),(0,a.jsx)(i.z,{variant:"outline",onClick:()=>B(!1),children:"Close"})]})]})]})}),(0,a.jsx)(d.Vq,{open:q,onOpenChange:G,children:(0,a.jsxs)(d.cZ,{className:"max-w-2xl max-h-[80vh] overflow-auto",children:[(0,a.jsx)(d.fK,{children:(0,a.jsxs)(d.$N,{className:"flex items-center gap-2",children:[(0,a.jsx)(w.Z,{className:"h-5 w-5 text-blue-600"}),"Campaign Details - ",null==ec?void 0:ec.name]})}),(0,a.jsxs)("div",{className:"space-y-4 py-2",children:[(0,a.jsx)("div",{className:"grid grid-cols-4 gap-3",children:null==ed?void 0:ed.metrics.map(e=>(0,a.jsxs)("div",{className:(0,I.cn)("rounded-lg p-3 text-center",eo(e.status)),children:[(0,a.jsx)("p",{className:"text-lg font-bold",children:e.value}),(0,a.jsx)("p",{className:"text-[10px] uppercase",children:e.label})]},e.label))}),(null!==(F=null==ed?void 0:null===(s=ed.details)||void 0===s?void 0:null===(e=s.timeline)||void 0===e?void 0:e.length)&&void 0!==F?F:0)>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("h4",{className:"text-sm font-semibold mb-2 flex items-center gap-2",children:[(0,a.jsx)(D.Z,{className:"h-4 w-4 text-slate-500"}),"Performance Timeline"]}),(0,a.jsx)("div",{className:"bg-slate-50 rounded-lg p-3",children:(0,a.jsx)("div",{className:"flex justify-between items-end h-24 gap-2",children:ed.details.timeline.map((e,s)=>{let t=Math.max(...ed.details.timeline.map(e=>e.opens)),l=t>0?e.opens/t*100:0;return(0,a.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-1",children:[(0,a.jsx)("div",{className:"w-full bg-purple-500 rounded-t transition-all",style:{height:"".concat(l,"%"),minHeight:"4px"}}),(0,a.jsx)("span",{className:"text-[9px] text-slate-500",children:e.date}),(0,a.jsx)("span",{className:"text-[10px] font-medium",children:e.opens})]},s)})})})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("h4",{className:"text-sm font-semibold mb-2 flex items-center gap-2",children:[(0,a.jsx)(z.Z,{className:"h-4 w-4 text-slate-500"}),"Channel Performance"]}),(0,a.jsx)("div",{className:"space-y-2",children:null==ed?void 0:null===(p=ed.details)||void 0===p?void 0:null===(t=p.channels)||void 0===t?void 0:t.map((e,s)=>{let t=P[e.name]||o.Z;return(0,a.jsxs)("div",{className:"bg-slate-50 rounded-lg p-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:(0,I.cn)("w-6 h-6 rounded flex items-center justify-center",E[e.name]||"bg-slate-500"),children:(0,a.jsx)(t,{className:"h-3 w-3 text-white"})}),(0,a.jsx)("span",{className:"text-sm font-medium",children:e.name})]}),(0,a.jsxs)(r.C,{variant:"outline",className:"text-xs",children:[e.rate,"% open rate"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-4 gap-2 text-center",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-bold",children:e.sent.toLocaleStr
1ing()}),(0,a.jsx)("p",{className:"text-[9px] text-slate-500",children:"Sent"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-bold",children:e.delivered.toLocaleString()}),(0,a.jsx)("p",{className:"text-[9px] text-slate-500",children:"Delivered"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-bold",children:e.opened.toLocaleString()}),(0,a.jsx)("p",{className:"text-[9px] text-slate-500",children:"Opened"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-bold",children:e.clicked.toLocaleString()}),(0,a.jsx)("p",{className:"text-[9px] text-slate-500",children:"Clicked"})]})]})]},s)})})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("h4",{className:"text-sm font-semibold mb-2 flex items-center gap-2",children:[(0,a.jsx)(v.Z,{className:"h-4 w-4 text-slate-500"}),"Audience Segments"]}),(0,a.jsx)("div",{className:"space-y-2",children:null==ed?void 0:null===(W=ed.details)||void 0===W?void 0:null===(u=W.audience)||void 0===u?void 0:u.map((e,s)=>(0,a.jsxs)("div",{className:"flex items-center justify-between bg-slate-50 rounded-lg p-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-purple-500"}),(0,a.jsx)("span",{className:"text-sm",children:e.segment})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsxs)("span",{className:"text-xs text-slate-500",children:[e.count.toLocaleString()," contacts"]}),(0,a.jsxs)(r.C,{className:(0,I.cn)(e.openRate>=30?"bg-green-100 text-green-700":e.openRate>=20?"bg-blue-100 text-blue-700":"bg-slate-100 text-slate-700"),children:[e.openRate,"% opens"]})]})]},s))})]})]})]})})]})}},69174:function(e,s,t){t.d(s,{C:function(){return r}});var a=t(57437);t(2265);var l=t(90535),n=t(93448);let i=(0,l.j)("inline-flex items-center rounded-[4px] border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function r(e){let{className:s,variant:t,...l}=e;return(0,a.jsx)("div",{className:(0,n.cn)(i({variant:t}),s),...l})}},12381:function(e,s,t){t.d(s,{d:function(){return c},z:function(){return d}});var a=t(57437),l=t(2265),n=t(37053),i=t(90535),r=t(93448);let c=(0,i.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[4px] text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-[4px] px-3 text-xs",lg:"h-10 rounded-[4px] px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),d=l.forwardRef((e,s)=>{let{className:t,variant:l,size:i,asChild:d=!1,...o}=e,m=d?n.g7:"button";return(0,a.jsx)(m,{className:(0,r.cn)(c({variant:l,size:i,className:t})),ref:s,...o})});d.displayName="Button"},79820:function(e,s,t){t.d(s,{Ol:function(){return r},SZ:function(){return d},Zb:function(){return i},aY:function(){return o},eW:function(){return m},ll:function(){return c}});var a=t(57437),l=t(2265),n=t(93448);let i=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("rounded-[4px] border bg-card text-card-foreground shadow",t),...l})});
1i.displayName="Card";let r=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("flex flex-col space-y-1.5 p-6",t),...l})});r.displayName="CardHeader";let c=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("font-display font-semibold leading-none tracking-tight",t),...l})});c.displayName="CardTitle";let d=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("text-sm text-muted-foreground",t),...l})});d.displayName="CardDescription";let o=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("p-6 pt-0",t),...l})});o.displayName="CardContent";let m=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("flex items-center p-6 pt-0",t),...l})});m.displayName="CardFooter"},74291:function(e,s,t){t.d(s,{$N:function(){return g},Be:function(){return h},Vq:function(){return c},cN:function(){return u},cZ:function(){return x},fK:function(){return p},hg:function(){return d}});var a=t(57437),l=t(2265),n=t(49027),i=t(93448),r=t(20653);let c=n.fC,d=n.xz,o=n.h_;n.x8;let m=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)(n.aV,{ref:s,className:(0,i.cn)("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...l})});m.displayName=n.aV.displayName;let x=l.forwardRef((e,s)=>{let{className:t,children:l,overlayClassName:c,...d}=e;return(0,a.jsxs)(o,{children:[(0,a.jsx)(m,{className:c}),(0,a.jsxs)(n.VY,{ref:s,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%] border bg-background shadow-lg duration-200","w-[calc(100%-1rem)] xs:w-[calc(100%-2rem)] sm:w-full max-w-lg","p-4 sm:p-6","max-h-[90vh] sm:max-h-[85vh]","rounded-lg sm:rounded-lg","flex flex-col","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",t),...d,children:[l,(0,a.jsxs)(n.x8,{className:"absolute right-3 top-3 sm:right-4 sm:top-4 z-50 rounded-full opacity-70 ring-offset-background transition-all hover:opacity-100 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground bg-white dark:bg-gray-900 shadow-md border border-gray-200 dark:border-gray-700 p-1.5",children:[(0,a.jsx)(r.Pxu,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});x.displayName=n.VY.displayName;let p=e=>{let{className:s,...t}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left flex-shrink-0",s),...t})};p.displayName="DialogHeader";let u=e=>{let{className:s,...t}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 flex-shrink-0 mt-4",s),...t})};u.displayName="DialogFooter";let g=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)(n.Dx,{ref:s,className:(0,i.cn)("font-display text-lg font-semibold leading-none tracking-tight",t),...l})});g.displayName=n.Dx.displayName;let h=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)(n.dk,{ref:s,className:(0,i.cn)("text-sm text-muted-foreground",t),...l})});h.displayName=n.dk.displayName},17168:function(e,s,t){t.d(s,{Tabs:function(){return r},TabsContent:function(){return o},TabsList:function(){return c},TabsTrigger:function(){return d}});var a=t(57437),l=t(2265),n=t(20271),i=t(93448);let r=n.fC,c=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)(n.aV,{ref:s,className:(0,i.cn)("inline-flex h-10 items-center justify-center rounded-[4px] bg-gray-100 dark:bg-gray-800 p-1 text-gray-500 dark:text-gray-400",t),...l})});c.displayName=n.aV.displayName;let d=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)(n.xz,{ref:s,className:(0,i.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white dark:ring-offset-gray-950 transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 dark:focus-visible:ring-gray-300 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white dark:data-[state=active]:bg-gray-900 data-[state=active]:text-gray-950 dark:data-[state=active]:text-gray-100 data-[state=active]:shadow-sm",t),...l})});d.displayName=n.xz.displayName;let o=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)(n.VY,{ref:s,className:(0,i.cn)("mt-2 ring-offset-white dark:ring-offset-gray-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 dark:focus-visible:ring-gray-300 focus-visible:ring-offset-2",t),...l})});o.displayName=n.VY.displayName},93448:function(e,s,t){t.d(s,{cn:function(){return n}});var a=t(61994),l=t(53335);function n(){for(var e=arguments.length,s=Array(e),t=0;t<e;t++)s[t]=arguments[t];return(0,l.m6)((0,a.W)(s))}}}]);

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.