1import{aV as Pe,b7 as Re,r,j as e,aW as $e}from"./vendor-libs-DqTTukLt.js";import{ab as ze,a as Be,ap as Fe,u as Ge,G as We,B as Ue,f as Ve,ah as He,M as qe,H as Je,D as Ke,d as K,aa as Ye,a7 as pe,a2 as Qe,az as Xe,aq as P,ax as Ze,P as et,a6 as tt,b as rt}from"./index-DnZkLQpb.js";import{l as at,c as st}from"./competitorService-CchVSOd8.js";import{I as nt,V as it,G as lt,E as ot,A as dt}from"./EditCompetitorModal-6Czy1XW6.js";import{P as ct}from"./PageSkeleton-CMJ0Wc2K.js";import{A as ut}from"./ActionGuide-C18CM0sd.js";import{A as Y,m as R}from"./vendor-heavy-BYAivpjp.js";import"./contentPlannerService-Di18ZPK8.js";import"./backlinkService-BdhUJ9si.js";import"./useDemoRestriction-Bl2M6pz5.js";import"./ConfirmModal-CG1WZSBu.js";const be=[{value:"anytime",label:"All activities",description:"Full history of competitor activity."},{value:"unseen",label:"Unseen",description:"New activities you haven't read yet."},{value:"saved",label:"Saved Activities",description:"Bookmarked and starred activities."},{value:"last_7_days",label:"Last 7 days",description:"Activities from the last 7 days."},{value:"last_30_days",label:"Last 30 days",description:"Activities from the last 30 days."},{value:"custom",label:"Custom",description:"Select a custom calendar range."}],xt={website:{active:"bg-purple-50 dark:bg-purple-950/30 border-purple-500 text-purple-700 dark:text-purple-300 ring-purple-500/20",border:"hover:border-purple-300 dark:hover:border-purple-800",text:"text-purple-600 dark:text-purple-400",icon:"text-purple-500"},pricing:{active:"bg-amber-55/15 dark:bg-amber-950/30 border-amber-500 text-amber-700 dark:text-amber-300 ring-amber-500/20",border:"hover:border-amber-300 dark:hover:border-amber-800",text:"text-amber-600 dark:text-amber-400",icon:"text-amber-500"},seo:{active:"bg-emerald-50 dark:bg-emerald-950/30 border-emerald-500 text-emerald-700 dark:text-emerald-300 ring-emerald-500/20",border:"hover:border-emerald-300 dark:hover:border-emerald-800",text:"text-emerald-600 dark:text-emerald-400",icon:"text-emerald-500"},backlinks:{active:"bg-blue-50 dark:bg-blue-950/30 border-blue-500 text-blue-700 dark:text-blue-300 ring-blue-500/20",border:"hover:border-blue-300 dark:hover:border-blue-800",text:"text-blue-600 dark:text-blue-400",icon:"text-blue-500"},keywords:{active:"bg-teal-50 dark:bg-teal-950/30 border-teal-500 text-teal-700 dark:text-teal-300 ring-teal-500/20",border:"hover:border-teal-300 dark:hover:border-teal-800",text:"text-teal-600 dark:text-teal-400",icon:"text-teal-500"},social:{active:"bg-indigo-55/15 dark:bg-indigo-950/30 border-indigo-500 text-indigo-700 dark:text-indigo-300 ring-indigo-500/20",border:"hover:border-indigo-300 dark:hover:border-indigo-800",text:"text-indigo-600 dark:text-indigo-400",icon:"text-indigo-500"},blog:{active:"bg-rose-50 dark:bg-rose-950/30 border-rose-500 text-rose-700 dark:text-rose-300 ring-rose-500/20",border:"hover:border-rose-300 dark:hover:border-rose-800",text:"text-rose-600 dar
1k:text-rose-400",icon:"text-rose-500"},reviews:{active:"bg-sky-50 dark:bg-sky-950/30 border-sky-500 text-sky-700 dark:text-sky-300 ring-sky-500/20",border:"hover:border-sky-300 dark:hover:border-sky-800",text:"text-sky-600 dark:text-sky-400",icon:"text-sky-500"},ads:{active:"bg-orange-50 dark:bg-orange-950/30 border-orange-500 text-orange-700 dark:text-orange-300 ring-orange-500/20",border:"hover:border-orange-300 dark:hover:border-orange-800",text:"text-orange-600 dark:text-orange-400",icon:"text-orange-500"}},mt=50,he=({title:s})=>e.jsx("h3",{className:"text-[10px] font-black text-neutral-900 dark:text-neutral-100 uppercase tracking-[0.2em] mb-4",children:s}),pt=()=>e.jsxs("div",{className:"relative flex items-center justify-center w-8 h-8",children:[e.jsx("div",{className:"absolute inset-0 border-4 border-neutral-100 dark:border-neutral-700 rounded-full"}),e.jsx("div",{className:"absolute inset-0 border-4 border-brand-primary rounded-full border-t-transparent animate-spin"})]}),bt=({competitors:s,selectedIds:p,onChange:k,onEdit:j,isAllMode:u})=>{const b=p.length===0||p.length===s.length;return e.jsx("div",{className:"w-full overflow-x-auto no-scrollbar py-1",children:e.jsxs("div",{className:"flex items-center gap-3 pr-4 text-left flex-nowrap",children:[u&&e.jsxs("button",{type:"button",onClick:()=>k([]),className:`flex items-center gap-3 px-4 py-2.5 rounded-xl border transition-all text-xs font-bold shrink-0 shadow-sm active:scale-95 duration-200 whitespace-nowrap flex-nowrap ${b?"bg-brand-primary/10 border-brand-primary text-brand-primary":"bg-white dark:bg-neutral-800 border-neutral-200 dark:border-neutral-700 text-neutral-600 dar
1k:text-neutral-300 hover:border-brand-primary/40 hover:bg-neutral-50/50 dark:hover:bg-neutral-800/50"}`,children:[e.jsx(Ze,{className:"w-5 h-5"}),e.jsx("span",{className:"whitespace-nowrap",children:"All"}),e.jsx("span",{className:`px-2 py-0.5 rounded-lg text-[10px] font-bold ${b?"bg-brand-primary text-white":"bg-neutral-100 dark:bg-neutral-900 text-neutral-500"}`,children:s.reduce((d,h)=>d+(h.activities_count||0),0)})]}),s.map(d=>{const h=!b&&p.includes(d.id),y=d.activities_count||0,E=y>15?"bg-red-500":y>5?"bg-amber-500":"bg-green-500";return e.jsxs("div",{className:"relative group shrink-0",children:[e.jsxs("button",{type:"button",onClick:()=>k([d.id]),className:`flex items-center gap-3 px-4 py-2.5 rounded-xl border transition-all text-xs font-bold shadow-sm active:scale-95 duration-200 whitespace-nowrap flex-nowrap ${h?"bg-brand-primary/10 border-brand-primary text-brand-primary":"bg-white dark:bg-neutral-800 border-neutral-200 dark:border-neutral-700 text-neutral-600 dark:text-neutral-300 hover:border-brand-primary/40 hover:bg-neutral-50/50 dark:hover:bg-neutral-800/50"}`,children:[e.jsxs("div",{className:"w-5 h-5 rounded bg-white p-0.5 border border-neutral-100 flex-shrink-0 flex items-center justify-center relative",children:[e.jsx("img",{src:`https://www.google.com/s2/favicons?domain=${d.website}&sz=64`,className:"w-full h-full object-contain",alt:"",onError:x=>{x.target.src=`https://logo.clearbit.com/${d.website}`}}),e.jsx("span",{className:`absolute -top-1 -right-1 w-2.5 h-2.5 rounded-full border border-white dark:border-neutral-800 ${E}`})]}),e.jsx("span",{className:"whitespace-nowrap",children:d.name}),e.jsx("span",{className:`px-2 py-0.5 rounded-lg text-[10px] font-bold ${h?"bg-brand-primary text-white":"bg-neutral-100 dark:bg-neutral-900 text-neutral-500"}`,children:y})]}),e.jsx("button",{type:"button",onClick:x=>{x.stopPropagation(),j(d)},className:"absolute -top-1.5 -right-1.5 p-1 bg-white dark:bg-neutral-700 border border-neutral-200 dark:border-neutral-600 rounded-full text-neutral-450 hover:text-brand-primary hover:scale-105 transition-all opacity-0 group-hover:opacity-100 shadow-sm z-10",children:e.jsx(et,{className:"w-3.5 h-3.5"})})]},d.id)})]})})},ht=({selectedFilter:s,onFilterChange:p,customDates:k,onCustomDateChange:j})=>{var x;const[u,b]=r.useState(!1),[d,h]=r.useState(s==="custom"),y=r.useRef(null);r.useEffect(()=>{const i=$=>{y.current&&!y.current.contains($.target)&&b(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[]),r.useEffect(()=>{u&&h(s==="custom")},[s,u]);const E=((x=be.find(i=>i.value===s))==null?void 0:x.label)||"Date";return e.jsxs("div",{className:"relative",ref:y,children:[e.jsxs("button",{type:"button",onClick:()=>b(!u),className:`flex items-center gap-2 px-4 py-2.5 bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-xl text-[10px] font-black uppercase tracking-widest text-neutral-600 dar
1k:text-neutral-300 transition-all ${u?"ring-2 ring-brand-primary border-brand-primary":""}`,children:[e.jsx(tt,{className:"w-4 h-4 text-neutral-400"}),e.jsx("span",{children:E}),e.jsx(rt,{className:`w-3.5 h-3.5 text-neutral-400 ml-1 transition-transform ${u?"rotate-180":""}`})]}),e.jsx(Y,{children:u&&e.jsxs(R.div,{initial:{opacity:0,y:8,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.98},className:"absolute top-full right-0 mt-2 w-64 bg-white dark:bg-neutral-800 rounded-lg shadow-2xl border border-neutral-200 dark:border-neutral-700 z-[150] p-2 overflow-hidden",children:[e.jsx("div",{className:"space-y-1 text-left",children:be.map(i=>e.jsxs("button",{type:"button",onClick:()=>{i.value==="custom"?h(!0):(h(!1),p(i.value),b(!1))},className:`w-full text-left px-4 py-2 rounded-md transition-colors flex flex-col items-start ${(d?"custom":s)===i.value?"bg-brand-primary/10 text-brand-primary":"text-neutral-700 dark:text-neutral-200 hover:bg-neutral-50 dark:hover:bg-neutral-800"}`,children:[e.jsx("span",{className:"text-xs font-bold",children:i.label}),e.jsx("span",{className:`text-[10px] font-medium mt-0.5 ${(d?"custom":s)===i.value?"text-brand-primary/80":"text-neutral-400 dark:text-neutral-500"}`,children:i.description})]},i.value))}),d&&e.jsxs("div",{className:"mt-2 pt-2 border-t border-neutral-100 dark:border-neutral-800 p-3 space-y-3 text-left",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[9px] font-black uppercase text-neutral-400",children:"Start Date"}),e.jsx("input",{type:"date",value:k.startDate||"",onChange:i=>j({...k,startDate:i.target.value}),className:"w-full px-2 py-1.5 bg-neutral-50 dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-md text-xs font-bold focus:ring-1 focus:ring-brand-primary outline-none"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[9px] font-black uppercase text-neutral-400",children:"End Date"}),e.jsx("input",{type:"date",value:k.endDate||"",onChange:i=>j({...k,endDate:i.target.value}),className:"w-full px-2 py-1.5 bg-neutral-50 dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-md text-xs font-bold focus:ring-1 focus:ring-brand-primary outline-none"})]}),e.jsx("button",{type:"button",onClick:()=>{p("custom"),b(!1)},className:"w-full py-2 bg-brand-primary text-white text-[10px] font-black uppercase tracking-widest rounded-md active:scale-95 transition-transform",children:"Apply Range"})]})]})})]})},It=()=>{const{selectedProject:s,permissions:p,isPermissionsLoading:k,refreshPermissions:j}=ze();(s==null?void 0:s.is_demo)===1||window.location.pathname.includes("/demo/");const{addToast:u}=Be(),{openUpgradeModal:b,openDemoModal:d}=Fe(),h=Pe(),{user:y,isTrialGracePeriod:E}=Ge(),[x,i]=Re(),$=!1,[g,ge]=r.useState([]),[L,M]=r.useState([]),[z,fe]=r.useState({}),[Q,X]=r.useState(!0),[Z,B]=r.useState(!1),[F,G]=r.useState(!1),[D,ve]=r.useState(null),W=localStorage.getItem("growlytics:competitor_activities:filter")||"anytime",ke=(()=>{try{const t=localStorage.getItem("growlytics:competitor_activities:custom_dates");return t?JSON.parse(t):{startDate:"",endDate:""}}catch{return{startDate:"",endDate:""}}})(),[w,gt]=r.useState("activities"),[c,N]=r.useState([]),[m,U]=r.useState([]),[f,C]=r.useState(()=>W==="unseen"||W==="saved"?"anytime":W),[o,S]=r.useState(()=>{const t=x.get("status");if(t)return t;const a=localStorage.getItem("growlytics:competitor_activities:filter");return a==="unseen"||a==="saved"?a:"all"}),[A,ye]=r.useState(ke),[ee,we]=r.useState(0),te=r.useRef(A);r.useEffect(()=>{te.current=A},[A]),r.useEffect(()=>{const t=x.get("status")||"all";t!==o&&S(t)},[x]),r.useEffect(()=>{const t=x.get("status"),a=localStorage.getItem("growlytics:competitor_activities:filter");t&&(t==="unseen"||t==="saved")?(localStorage.setItem("growlytics:competitor_activities:filter",t),C("anytime"),S(t)):a==="unseen"||a==="saved"?(C("anytime"),S(a),T("status",a)):a&&(C(a),S("all"),T("status","all"))},[]);const[re,je]=r.useState(!1),V=!re,[ae,H]=r.useState(!1);r.useEffect(()=>{V||H(!1)},[V]);const Ne=r.useRef(null),Ce=t=>{je(t.currentTarget.scrollTop>10)},se=r.useRef(w),[ne,ie]=r.useState(null),[le,oe]=r.useState(null),[de,ce]=r.useState(null),[Se,ue]=r.useState(!1),[Ae,_e]=r.useState(null);r.useEffect(()=>{const t=a=>{const{title:n,item_id:l,item_type:v}=a.detail;ve({title:n,itemId:l,itemType:v}),G(!0)};return window.addEventListener("growlytics:open-ai-chat",t),()=>window.removeEventListener("growlytics:open-ai-chat",t)},[]),r.useEffect(()=>{window.dispatchEvent(new CustomEvent("growlytics:ai-chat-state",{detail:{isOpen:F}}))},[F]);const q=r.useMemo(()=>[{id:"website",label:"Website",types:["website","new_page"],icon:e.jsx(We,{})},{id:"pricing",label:"Pricing",types:["pricing"],icon:e.jsx(Ue,{})},{id:"seo",label:"SEO",types:["seo"],icon:e.jsx(Ve,{})},{id:"backlinks",label:"Backlinks",types:["backlinks"],icon:e.jsx(He,{})},{id:"keywords",label:"Keywords",types:["keywords"],icon:e.jsx(qe,{})},{id:"social",label:"Social",types:["social"],icon:e.jsx(Je,{})},{id:"blog",label:"Blog",types:["blog"],icon:e.jsx(Ke,{})},{id:"reviews",label:"Reviews",types:["reviews"],icon:e.jsx(K,{})},{id:"ads",label:"Ads",types:["google_ads","meta_ads"],icon:e.jsx(Ye,{})}],[]);r.useEffect(()=>{const t=se.current;t==="activities"&&w!=="activities"?c.length!==1&&(c.length>1?N([c[0]]):g.length>0&&N([g[0].id])):t!=="activities"&&w==="activities"&&c.length===0&&g.length>0&&N([]),se.current=w},[w,c,g]);const Ie=r.useMemo(()=>c.length>0||m.length>0||f!=="anytime"||o!=="all",[c,m,f,o]),Ee=r.useMemo(()=>{const t=c.length===1?g.find(n=>n.id===c[0]):null;if(!(t!=null&&t.targets))return q;let a=[];try{a=Array.isArray(t.targets)?t.targets:JSON.parse(t.targets)}catch{a=[]}return q.filter(n=>{if(n.id==="ads")return!0;const l={website:"website_changes",pricing:"pricing",seo:"seo",social:"social_activity",blog:"blog",backlinks:"backlinks",keywords:"keywords",reviews:"reviews"};return a.includes(l[n.id])})},[g,c,q]),_=r.useCallback(async()=>
1{if(s){X(!0);try{const t={date_filter:f,status:o!=="all"?o:void 0,saved_only:o==="saved"?!0:void 0,unseen:o==="unseen"?!0:void 0};if(f==="custom"){const{startDate:l,endDate:v}=A;l&&v&&(t.start_date=l,t.end_date=v)}const a=await at(s.id,t),n=Array.isArray(a.data)?a.data:a.data.data||[];ge(n)}catch{u("Failed to load competitors.","error")}finally{X(!1)}}},[s,u,f,o,A]),I=r.useCallback(async(t=!1)=>{if(!s){M([]);return}t||B(!0);try{const a={project_id:s.id,competitor_id:c.length>0?c.join(","):void 0,date_filter:f,status:o!=="all"?o:void 0,saved_only:o==="saved"?!0:void 0,unseen:o==="unseen"?!0:void 0,per_page:mt};if(f==="custom"){const{startDate:v,endDate:O}=te.current;if(!v||!O){B(!1);return}a.start_date=v,a.end_date=O}m.length>0&&(a.type=m.join(","));const l=(await st(a)).data;l.activities&&l.activities.data?M(l.activities.data):Array.isArray(l.data)?M(l.data):M([]),l.totals&&fe(l.totals)}catch{t||u("Failed to load activity feed.","error")}finally{t||B(!1)}},[s,c,f,o,m,ee,u]);r.useEffect(()=>{},[s==null?void 0:s.id]),r.useEffect(()=>{_()},[_]),r.useEffect(()=>{w==="activities"&&I()},[w,I,c,f,o,m,ee]),r.useEffect(()=>{const t=()=>{_(),I()};return window.addEventListener("growlytics:refresh-data",t),()=>window.removeEventListener("growlytics:refresh-data",t)},[_,I]);const T=(t,a)=>{const n=new URLSearchParams(x);a&&a!=="all"?n.set(t,a):n.delete(t),i(n,{replace:!0})},Le=t=>{localStorage.setItem("growlytics:competitor_activities:filter",t),t==="unseen"||t==="saved"?(C("anytime"),S(t),T("status",t)):(C(t),S("all"),T("status","all"),t==="custom"&&we(a=>a+1))},Me=t=>{ye(t),localStorage.setItem("growlytics:competitor_activities:custom_dates",JSON.stringify(t))},xe=()=>{if(localStorage.getItem("isGuestDemo")==="true"){d();return}if(p){const t=p.limits.competitor_monitor_limit,a=p.usage.competitors;if(t!==-1&&a>=t){b({title:"Competitor limit reached",description:`You've reached your limit of ${t} competitor monitors for this project. Upgrade to add more.`,featureName:"Competitor monitor"});return}}h("/add/competitor")},De=t=>{ce(t),ue(!0)},Te=()=>{N([]),_(),I(),j&&j()},J=t=>t.reduce((a,n)=>a+(z[n]||0),0),me=r.useMemo(()=>Object.values(z).reduce((t,a)=>t+a,0),[z]),Oe=()=>Q?null:e.jsx("div",{className:"w-full flex justify-start",children:e.jsxs("div",{className:"space-y-12 max-w-4xl py-2 text-left",children:[e.jsxs("div",{className:"text-left",children:[e.jsx(he,{title:"COMPETITIVE INTELLIGENCE ENGINE"}
1),e.jsxs("p",{className:"text-xl text-neutral-600 dark:text-neutral-300 font-medium leading-relaxed text-left",children:["We're monitoring strategic pivots for your ",e.jsxs("span",{className:"text-neutral-900 dark:text-neutral-100 font-black underline decoration-brand-primary/30 underline-offset-4",children:["â",g.length," added competitorsâ"]})," across their entire digital landscapeâincluding visual architecture, pricing structures, SEO metadata, and market visibility signals."]})]}),e.jsxs("div",{className:"p-8 bg-neutral-50 dark:bg-neutral-900/50 rounded-2xl border border-neutral-100 dark:border-neutral-800 shadow-sm text-left",children:[e.jsx("div",{className:"flex flex-col md:flex-row md:items-center justify-start gap-8",children:e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(pt,{}),e.jsxs("div",{className:"text-left",children:[e.jsx("h4",{className:"text-lg font-black text-neutral-900 dark:text-neutral-100 tracking-tight uppercase",children:"Scanning rival footprint"}),e.jsx("p",{className:"text-xs text-neutral-500 font-bold uppercase tracking-widest mt-1",children:"Extracting initial competitive intelligence"})]})]})}
1),e.jsx("p",{className:"text-base text-neutral-600 dark:text-neutral-400 font-medium leading-relaxed mt-6 text-left",children:"Our engine is currently mapping snapshots and indexing recent changes for your rivals. New activities and AI-generated counter-actions will fall into this feed automatically as our intelligence layer classifies every strategic movement."})]}),e.jsxs("div",{className:"text-left",children:[e.jsx(he,{title:"Activity Relevance Policy"}),e.jsxs("p",{className:"text-base text-neutral-600 dark:text-neutral-400 font-medium leading-relaxed text-left",children:["To maintain focus, we prioritize high-impact movements. Routine maintenance and minor updates are automatically filtered out so your team can focus on ",e.jsx("span",{className:"text-neutral-900 dark:text-neutral-100 font-black uppercase tracking-tight",children:"meaningful market shifts"}),"."]})]})]})});return Q?e.jsx(ct,{type:"table"}):g.length===0?e.jsx("div",{className:"bg-white dark:bg-neutral-900 min-h-full flex flex-col justify-center items-center p-6 md:p-12 overflow-y-auto",children:e.jsxs("div",{className:"max-w-6xl w-full grid grid-cols-1 lg:grid-cols-2 gap-12 items-center",children:[e.jsxs("div",{className:"text-left space-y-8",children:[e.jsxs("div",{children:[e.jsx("span",{className:"px-3.5 py-1 bg-brand-primary/10 text-brand-primary rounded-full text-[10px] font-black tracking-widest uppercase",children:"Competitor Intelligence"}),e.jsxs("h1",{className:"text-4xl md:text-5xl font-black text-neutral-900 dark:text-neutral-100 tracking-tight leading-none mt-4",children:["Keep a constant eye on ",e.jsx("span",{className:"text-brand-primary",children:"your competitors"}),"."]}),e.jsx("p",{className:"text-neutral-500 dark:text-neutral-450 text-sm md:text-base font-bold leading-relaxed mt-6",children:"Track strategic pivots across their digital footprint in real time. We monitor website changes, pricing revisions, SEO positioning shifts, blogs, ads, and reviews, then feed them into your dashboard with AI-generated counter-action plans."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-5 h-5 rounded-full bg-brand-primary/15 text-brand-primary flex items-center justify-center shrink-0 mt-0.5",children:e.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M5 13l4 4L19 7"})})}),e.jsxs("div",{className:"text-left",children:[e.jsx("h4",{className:"text-sm font-black text-neutral-900 dark:text-neutral-100 tracking-tight",children:"Website & pricing alerts"}),e.jsx("p",{className:"text-xs text-neutral-500 font-bold tracking-tight mt-1",children:"Detect homepage copy changes, pricing updates, and new feature launches."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-5 h-5 rounded-full bg-brand-primary/15 text-brand-primary flex items-center justify-center shrink-0 mt-0.5",children:e.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M5 13l4 4L19 7"})})}),e.jsxs("div",{className:"text-left",children:[e.jsx("h4",{className:"text-sm font-black text-neutral-900 dark:text-neutral-100 tracking-tight",children:"SEO & backlink monitoring"}),e.jsx("p",{className:"text-xs text-neutral-500 font-bold tracking-tight mt-1",children:"Track which keywords they rank for and when they acquire new backlinks."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-5 h-5 rounded-full bg-brand-primary/15 text-brand-primary flex items-center justify-center shrink-0 mt-0.5",children:e.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M5 13l4 4L19 7"})})}),e.jsxs("div",{className:"text-left",children:[e.jsx("h4",{className:"text-sm font-black text-neutral-900 dark:text-neutral-100 tracking-tight",children:"Ad campaigns & social posts"}),e.jsx("p",{className:"text-xs text-neutral-500 font-bold tracking-tight mt-1",children:"Discover the exact Google or Meta Ads and social posts they publish."})]})]})]}),e.jsxs("button",{type:"button",onClick:xe,className:"inline-flex bg-brand-primary text-white px-8 py-3.5 rounded-xl text-[10px] font-black uppercase tracking-widest hover:bg-brand-primary/90 transition-all shadow-lg shadow-brand-primary/25 items-center gap-2.5 active:scale-95 duration-200",children:[e.jsx(pe,{className:"w-4 h-4"}),e.jsx("span",{children:"Add Your First Competitor"})]})]}),e.jsxs("div",{className:"relative flex justify-center items-center w-full min-h-[400px] lg:min-h-[480px]",children:[e.jsx("div",{className:"absolute top-1/4 left-1/4 w-64 h-64 bg-brand-primary/10 rounded-full filter blur-[70px] animate-pulse"}),e.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-64 h-64 bg-purple-500/10 rounded-full filter blur-[70px] animate-pulse delay-1000"}),e.jsxs("div",{className:"relative w-full max-w-[420px] aspect-[4/3] rounded-2xl border border-neutral-200/60 dark:border-neutral-800/80 bg-neutral-50/50 dark:bg-neutral-900/40 p-6 shadow-inner flex flex-col justify-between overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,#8080800a_1px,transparent_1px),linear-gradient(to_bottom,#8080800a_1px,transparent_1px)] bg-[size:14px_24px] pointer-events-none"}),e.jsxs("div",{className:"flex items-center justify-between border-b border-neutral-200/50 dark:border-neutral-800/50 pb-4 relative z-10",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-neutral-900 dark:bg-neutral-100 flex items-center justify-center text-white dark:text-neutral-900 font-black shadow-md",children:"C"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"text-xs font-black text-neutral-950 dar
1k:text-neutral-50 uppercase tracking-tight",children:"Competitor Monitor"}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-ping"}),e.jsx("span",{className:"text-[9px] font-bold text-neutral-400 uppercase tracking-wider",children:"Active Monitoring"})]})]})]}),e.jsx("span",{className:"text-[9px] font-black tracking-widest text-brand-primary uppercase bg-brand-primary/10 px-2 py-1 rounded-md",children:"AI Intelligence"})]}),e.jsxs("div",{className:"flex-1 my-4 flex flex-col justify-center gap-3 relative z-10",children:[e.jsxs("div",{className:"bg-white/85 dark:bg-neutral-800/85 backdrop-blur-md p-3 rounded-xl border border-neutral-200/40 dark:border-neutral-700/40 shadow-sm flex items-center justify-between gap-4 animate-[bounce_5s_ease-in-out_infinite]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-amber-500/10 flex items-center justify-center text-amber-500 font-bold shrink-0",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),e.jsxs("div",{className:"text-left",children:[e.jsx("span",{className:"text-[9px] font-bold text-neutral-400 uppercase tracking-wider",children:"Pricing Update"}),e.jsx("p",{className:"text-xs font-black text-neutral-800 dark:text-neutral-200 leading-tight",children:"Pro Plan price changed (+15%)"})]})]}),e.jsx("span",{className:"text-[9px] font-black text-amber-600 bg-amber-500/10 px-2 py-0.5 rounded uppercase tracking-wider shrink-0",children:"Pricing"})]}),e.jsxs("div",{className:"bg-white/85 dark:bg-neutral-800/85 backdrop-blur-md p-3 rounded-xl border border-neutral-200/40 dark:border-neutral-700/40 shadow-sm flex items-center justify-between gap-4 animate-[bounce_5s_ease-in-out_infinite_1.5s]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-purple-500/10 flex items-center justify-center text-purple-500 font-bold shrink-0",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 113.536 0V21h2v-2.23"})})}),e.jsxs("div",{className:"text-left",children:[e.jsx("span",{className:"text-[9px] font-bold text-neutral-400 uppercase tracking-wider",children:"SEO Shift Detected"}),e.jsx("p",{className:"text-xs font-black text-neutral-800 dark:text-neutral-200 leading-tight",children:"Homepage title tag updated"})]})]}),e.jsx("span",{className:"text-[9px] font-black text-purple-600 bg-purple-500/10 px-2 py-0.5 rounded uppercase tracking-wider shrink-0",children:"SEO Change"})]}),e.jsxs("div",{className:"bg-white/85 dark:bg-neutral-800/85 backdrop-blur-md p-3 rounded-xl border border-neutral-200/40 dark:border-neutral-700/40 shadow-sm flex items-center justify-between gap-4 animate-[bounce_5s_ease-in-out_infinite_3s]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-emerald-500/10 flex items-center justify-center text-emerald-500 font-bold shrink-0",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",d:"M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 4a2 2 0 00-2-2m2 2a2 2 0 01-2 2m2-2h-2m-2 4h-2m2 4h-4"})})}),e.jsxs("div",{className:"text-left",children:[e.jsx("span",{className:"text-[9px] font-bold text-neutral-400 uppercase tracking-wider",children:"New Blog Post"}),e.jsx("p",{className:"text-xs font-black text-neutral-800 dark:text-neutral-200 leading-tight",children:'Published "Next-Gen SEO Guide"'})]})]}),e.jsx("span",{className:"text-[9px] font-black text-emerald-600 bg-emerald-500/10 px-2 py-0.5 rounded uppercase tracking-wider shrink-0",children:"Blog"})]})]}),e.jsxs("div",{className:"border-t border-neutral-200/50 dark:border-neutral-800/50 pt-4 flex items-center justify-between text-neutral-400 font-bold text-[9px] uppercase tracking-wider relative z-10",children:[e.jsx("span",{children:"Updates Today: 12"}),e.jsx("span",{children:"Reliability Rate: 99.9%"})]})]})]})]})}):e.jsxs("div",{className:"bg-white dark:bg-neutral-900 min-h-full flex flex-col h-full overflow-hidden endurance-scroll",children:[Z&&e.jsx(Qe,{}),e.jsx(nt,{imageUrl:Ae,onClose:()=>_e(null)}),e.jsx(it,{isOpen:!!ne,onClose:()=>ie(null),activity:ne,competitor:void 0}),e.jsx(lt,{isOpen:!!le,onClose:()=>oe(null),activity:le,competitor:void 0}),de&&e.jsx(ot,{isOpen:Se,onClose:()=>{ue(!1),ce(null)},competitor:de,onUpdate:_,onDelete:Te}),e.jsx(Y,{children:F&&e.jsxs(e.Fragment,{children:[e.jsx(R.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},onClick:()=>G(!1),className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-[200] no-print"}),e.jsx(R.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:28,stiffness:220},className:"fixed top-0 right-0 bottom-0 w-full sm:w-[500px] bg-white dark:bg-neutral-900 z-[201] shadow-2xl flex flex-col h-full border-l border-neutral-100 dark:border-neutral-800 no-print",children:s&&D&&e.jsx("div",{className:"flex-1 h-full min-h-0 flex flex-col",children:e.jsx(Xe,{title:D.title,projectId:s.id,itemId:D.itemId,itemType:D.itemType,onClose:()=>G(!1)})})})]})}),e.jsx(Y,{initial:!1,children:V&&e.jsx(R.div,{initial:{height:0,opacity:0,y:-10},animate:{height:"auto",opacity:1,y:0},exit:{height:0,opacity:0,y:-10},transition:{duration:.2,ease:"easeInOut"},onAnimationComplete:()=>H(!0),onUpdate:t=>{t.height!=="auto"&&ae&&H(!1)},className:`relative flex-shrink-0 px-4 sm:px-6 md:px-8 py-3 bg-white dark:bg-neutral-900 shadow-sm z-30 no-print border-b border-neutral-100 dark:border-neutral-800 ${ae?"overflow-visible":"overflow-hidden"}`,children:e.jsxs("div",{className:"flex items-center justify-between gap-3 w-full py-0.5 flex-wrap",children:[e.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",style:{minWidth:"0",maxWidth:"100%"},children:e.jsx(bt,{competitors:g,selectedIds:c,onChange:N,onEdit:De,isAllMode:w==="activities"})}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx(ht,{selectedFilter:o==="unseen"||o==="saved"?o:f,onFilterChange:Le,customDates:A,onCustomDateChange:Me}),e.jsxs("button",{type:"button",onClick:xe,className:"flex bg-brand-primary text-white px-3 sm:px-5 py-2 sm:py-2.5 rounded-xl text-[10px] font-black uppercase tracking-widest hover:bg-brand-primary/90 transition-all shadow-lg shadow-brand-primary/20 items-center gap-1.5 active:scale-95 shrink-0",children:[e.jsx(pe,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Add Competitor"}),e.jsx("span",{className:"sm:hidden",children:"Add"})]})]})]})})}),e.jsx("div",{className:"flex-1 flex flex-col min-h-0 bg-neutral-50/20 dark:bg-neutral-950/20",children:e.jsx("div",{ref:Ne,onScroll:Ce,className:"flex-1 px-6 pb-6 md:px-8 md:pb-8 pt-0 overflow-y-auto",children:e.jsx("div",{className:"w-full text-left",children:e.jsxs("div",{children:[e.jsx("div",{className:"h-2"}),e.jsxs("div",{className:`sticky top-0 z-20 overflow-x-auto no-scrollbar py-3.5 flex items-center gap-2 mb-2 border-b border-neutral-100 dark:border-neutral-800/60 pb-4 bg-white/95 dark:bg-neutral-900/95 backdrop-blur-md -mx-6 px-6 md:-mx-8 md:px-8 transition-shadow duration-300 ${re?"shadow-sm shadow-neutral-100/40 dark:shadow-none":""}`,children:[e.jsxs("button",{type:"button",onClick:()=>U([]),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl text-xs font-bold border transition-all shrink-0 active:scale-95 duration-200 whitespace-nowrap flex-nowrap ${m.length===0?"bg-neutral-900 text-white dark:bg-neutral-100 dark:text-neutral-900 border-neutral-900 dark:border-neutral-100 shadow-sm":"bg-white dark:bg-neutral-800 border-neutral-200 dark:border-neutral-700 text-neutral-550 hover:text-neutral-850 hover:border-neutral-350"}`,children:[e.jsx(K,{className:"w-5 h-5"}),e.jsx("span",{children:"All"}),me>0&&e.jsx("span",{className:`px-1.5 py-0.5 rounded-md text-[10px] font-bold ${m.length===0?"bg-white/20 text-white dark:bg-neutral-800 dark:text-neutral-200":"bg-neutral-100 dark:bg-neutral-900 text-neutral-500"}`,children:me})]}),[...Ee].sort((t,a)=>J(a.types)-J(t.types)).map(t=>{const a=J(t.types),n=m.includes(t.id),l=xt[t.id]||{active:"bg-neutral-900 text-white border-neutral-900",border:"hover:border-neutral-350",icon:"text-neutral-400"};return e.jsxs("button",{type:"button",onClick:()=>{const v=m.includes(t.id)?m.filter(O=>O!==t.id):[...m,t.id];U(v)},className:`flex items-center gap-2 px-4 py-2.5 rounded-xl border-2 transition-all shrink-0 active:scale-95 duration-200 whitespace-nowrap flex-nowrap ${n?`${l.active} shadow-sm`:`bg-white dark:bg-neutral-850 border-neutral-200 dark:border-neutral-700 text-neutral-550 hover:text-neutral-850 ${l.border}`}`,children:[$e.cloneElement(t.icon,{className:`w-5 h-5 ${n?"":l.icon}`}),e.jsx("span",{children:t.label}),e.jsx("span",{className:`px-1.5 py-0.5 rounded-md text-[10px] font-bold ${n?"bg-neutral-900/10 dark:bg-white/10":"bg-neutral-100 dar
1k:bg-neutral-900 text-neutral-550"}`,children:a})]},t.id)})]}),e.jsx(ut,{accentColor:"violet",context:"Review actionable insights detected from competitor movements so you can make informed strategic responses.",steps:[{number:1,title:"Review Insights",description:"Browse detected competitor changes to spot strategic shifts in positioning or pricing."},{number:2,title:"Analyze with AI",description:e.jsxs("span",{children:["Click ",e.jsx("strong",{className:"text-violet-700 font-bold",children:"Talk AI"})," on any event to get deep analysis and competitive counter-actions."]})},{number:3,title:"Take Action",description:"Create strategic responses or counter-actions based on what we detected."}]}),e.jsx("div",{className:"mt-6 space-y-6",children:Z?e.jsx("div",{className:"space-y-6",children:[...Array(3)].map((t,a)=>e.jsxs("div",{className:"bg-white dark:bg-neutral-800 p-8 rounded-xl border border-neutral-200 dark:border-neutral-700",children:[e.jsxs("div",{className:"flex gap-4 mb-4",children:[e.jsx(P,{className:"w-12 h-12 rounded-lg"}),e.jsx(P,{className:"w-48 h-8 rounded"})]}),e.jsx(P,{className:"h-4 w-full mb-2"}),e.jsx(P,{className:"h-4 w-3/4"})]},a))}):L.length>0?e.jsxs(e.Fragment,{children:[L.slice(0,L.length).map(t=>{const a=g.find(n=>n.id===t.competitor_id);return e.jsx(dt,{activity:t,competitor:a,viewMode:"grid",onViewChange:()=>ie(t),onCreateAction:()=>oe(t),className:"hover:border-brand-primary/50 transition-all duration-300 rounded-lg w-full text-left"},t.id)}),$]}):e.jsx("div",{className:"flex flex-col items-center justify-center",children:L.length===0&&!Ie?Oe():e.jsxs("div",{className:"text-center py-20 bg-white dark:bg-neutral-800 rounded-xl border border-neutral-100 dark:border-neutral-700 border-dashed w-full max-w-2xl mx-auto shadow-sm",children:[e.jsx("div",{className:"w-14 h-14 rounded-xl bg-neutral-50 dark:bg-neutral-900 flex items-center justify-center mx-auto mb-6 border border-neutral-100 dark:border-neutral-700 shadow-sm",children:e.jsx(K,{className:"w-6 h-6 text-neutral-200"})}),e.jsx("h3",{className:"text-lg font-black text-neutral-900 dark:text-neutral-100 tracking-tight uppercase",children:"No matching discoveries"}),e.jsx("p",{className:"text-neutral-450 text-xs font-bold uppercase tracking-widest mt-2 px-8",children:"Try broadening your filters or resetting to view the full feed."}),e.jsx("button",{onClick:()=>{N([]),C("anytime"),U([])},className:"mt-8 px-8 py-3 bg-brand-primary text-white rounded-lg text-[10px] font-black uppercase tracking-[0.2em] shadow-lg shadow-brand-primary/20 hover:scale-105 active:scale-95 transition-all",children:"Clear all filters"})]})})})]})})})})]})};export{It 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.