PageSourceSearch

https://stairtup.ai/assets/ProductRoadmapPage-f9_QvQkE.js

js stairtup.ai collected 2026-10-05 12:42:35 UTC 26,684 bytes, 1 lines download raw bytes

1import{j as e}from"./tiptap-D3JjE7XX.js";import{r as x,L as Y}from"./react-D1ZyQ08J.js";import{I as h}from"./ui-e_-gXSnj.js";import{u as se}from"./useQuery-nKVtt0KF.js";import{I as re,T as ae,h as le,a as ie}from"./index-CLnvXRPC.js";import{u as oe,a as F,b as ne,D as de,c as ce,S as xe,h as he,d as ge,s as me,K as ue,P as pe,e as be,C as fe}from"./dnd-CHT5Lf11.js";import{B as P}from"./Button-CErQnTgt.js";import{g as ve,M as _,a as K,u as k,f as je}from"./store-B9YBaTMl.js";import{M as ye}from"./Modal-D1OCpIjI.js";import"./pdf-export-DhW6CfTA.js";import"./supabase-DhDedaeW.js";import"./moduleData-iEkvwnbW.js";function Ne({visionStatement:a,threeYearGoal:o,exitStrategy:b,onEdit:d,saving:f=!1}){const[u,s]=x.useState(null),[l,m]=x.useState(""),v=c=>{s(c),m(c==="visionStatement"?a||"":c==="threeYearGoal"?o||"":b||"")},y=async()=>{u&&(await d(u,l),s(null))},n=()=>{s(null),m("")},i=[{key:"visionStatement",title:"Vision Statement",subtitle:"What the world looks like if you succeed",icon:"ph:eye",color:"coral",value:a},{key:"threeYearGoal",title:"2-Year Goal",subtitle:"Specific, measurable target",icon:"ph:flag-checkered",color:"blue",value:o},{key:"exitStrategy",title:"Exit Strategy",subtitle:"Long-term outcome",icon:"ph:trend-up",color:"green",value:b}];return e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:i.map(c=>e.jsxs("div",{className:`relative p-5 rounded-2xl border transition-all ${c.value?"bg-white dark:bg-white/5 backdrop-blur-xl border-gray-200 dark:border-white/10":"bg-white/60 dark:bg-white/[0.02] border-dashed border-gray-300/50 dark:border-white/10"}`,children:[e.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center ${c.color==="coral"?"bg-coral-100 dark:bg-coral-900/30 text-coral-500":c.color==="blue"?"bg-blue-100 dark:bg-blue-900/30 text-blue-500":"bg-green-100 dark:bg-green-900/30 text-green-500"}`,children:e.jsx(h,{icon:c.icon,className:"text-lg"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:c.title}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:c.subtitle})]})]}),c.value&&u!==c.key&&e.jsx("button",{onClick:()=>v(c.key),className:"p-1.5 rounded-lg text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 hover:bg-white/60 dark:hover:bg-white/10 transition-colors",children:e.jsx(h,{icon:"ph:pencil",className:"text-sm"})})]}),u===c.key?e.jsxs("div",{className:"space-y-3",children:[e.jsx("textarea",{value:l,onChange:w=>m(w.target.value),rows:3,className:"w-full px-3 py-2 rounded-xl border border-gray-200 dark:border-white/10 bg-white/60 dark:bg-white/5 backdrop-blur-lg text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary/50 resize-none",placeholder:`Enter your ${c.title.toLowerCase()}...`,autoFocus:!0}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(P,{variant:"secondary",size:"sm",onClick:n,children:"Cancel"}),e.jsx(P,{size:"sm",onClick:y,loading:f,children:"Save"})]})]}):c.value?e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 leading-relaxed",children:c.value}):e.jsxs("button",{onClick:()=>v(c.key),className:"w-full py-4 flex flex-col items-center justify-center text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",children:[e.jsx(h,{icon:"ph:plus-circle",className:"text-2xl mb-1"}),e.jsxs("span",{className:"text-xs",children:["Add ",c.title]})]})]},c.key))})}function ke({open:a,onClose:o,onSave:b,milestone:d}){const f=ve(),u=!!d,[s,l]=x.useState({title:"",description:"",category:"product",status:"planned",period:f,goals:[""],metrics:[]}),[m,v]=x.useState(!1),[y,n]=x.useState(null);x.useEffect(()=>{a&&(l(d?{title:d.title,description:d.description,category:d.category,status:d.status,period:d.period,goals:d.goals.length>0?d.goals:[""],metrics:d.metrics||[]}:{title:"",description:"",category:"product",status:"planned",period:f,goals:[""],metrics:[]}),n(null))},[a,d]);const i=()=>
1{l({...s,goals:[...s.goals,""]})},c=r=>{l({...s,goals:s.goals.filter((g,p)=>p!==r)})},w=(r,g)=>{const p=[...s.goals];p[r]=g,l({...s,goals:p})},S=async()=>{if(!s.title.trim()){n("Title is required");return}if(!s.description.trim()){n("Description is required");return}if(s.goals.filter(r=>r.trim()).length===0){n("At least one goal is required");return}v(!0),n(null);try{await b({...s,goals:s.goals.filter(r=>r.trim())}),o()}catch{n("Failed to save milestone")}finally{v(!1)}},C=Array.from({length:5},(r,g)=>f.year+g);return e.jsx(ye,{open:a,onClose:o,maxWidth:"lg",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:u?"Edit Milestone":"Add Milestone"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:u?"Update this milestone":"Create a new milestone for your roadmap"})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsx(re,{label:"Milestone Title",value:s.title,onChange:r=>l({...s,title:r.target.value}),placeholder:"e.g., MVP Launch, Series A, 1000 Users",required:!0}),e.jsx(ae,{label:"Description",value:s.description,onChange:r=>l({...s,description:r.target.value}),placeholder:"Brief description of what this milestone achieves",rows:2,required:!0}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Category"}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:Object.entries(_).map(([r,g])=>e.jsxs("button",{type:"button",onClick:()=>l({...s,category:r}),className:`p-3 rounded-xl border-2 text-left transition-all ${s.category===r?`${g.bgColor} border-current ${g.color}`:"border-gray-200 dark:border-white/10 hover:border-gray-300"}`,children:[e.jsx(h,{icon:g.icon,className:"text-xl mb-1"}),e.jsx("span",{className:"text-xs font-medium block",children:g.label})]},r))})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Time Period"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("select",{value:s.period.quarter,onChange:r=>l({...s,period:{...s.period,quarter:parseInt(r.target.value)}}),className:"flex-1 px-3 py-2.5 rounded-xl border border-gray-200 dark:border-white/10 bg-white/60 dark:bg-white/5 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary/50",children:[e.jsx("option",{value:1,children:"Q1"}),e.jsx("option",{value:2,children:"Q2"}),e.jsx("option",{value:3,children:"Q3"}),e.jsx("option",{value:4,children:"Q4"})]}),e.jsx("select",{value:s.period.year,onChange:r=>l({...s,period:{...s.period,year:parseInt(r.target.value)}}),className:"flex-1 px-3 py-2.5 rounded-xl border border-gray-200 dark:border-white/10 bg-white/60 dark:bg-white/5 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary/50",children:C.map(r=>e.jsx("option",{value:r,children:r},r))})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Status"}),e.jsx("select",{value:s.status,onChange:r=>l({...s,status:r.target.value}),className:"w-full px-3 py-2.5 rounded-xl border border-gray-200 dark:border-white/10 bg-white/60 dark:bg-white/5 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary/50",children:Object.entries(K).map(([r,g])=>e.jsx("option",{value:r,children:g.label},r))})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Goals & Deliverables"}),e.jsxs("button",{type:"button",onClick:i,className:"text-xs text-coral-500 hover:text-coral-600 font-medium flex items-center gap-1",children:[e.jsx(h,{icon:"ph:plus"}),"Add Goal"]})]}),e.jsx("div",{className:"space-y-2",children:s.goals.map((r,g)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"text",value:r,onChange:p=>w(g,p.target.value),placeholder:`Goal ${g+1}`,className:"flex-1 px-3 py-2 rounded-xl border border-gray-200 dark:border-white/10 bg-white/60 dark:bg-white/5 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary/50"}),s.goals.length>1&&e.jsx("button",{type:"button",onClick:()=>
1c(g),className:"px-2 text-gray-400 hover:text-red-500 transition-colors",children:e.jsx(h,{icon:"ph:x"})})]},g))})]})]}),y&&e.jsx("div",{className:"mt-4 p-3 rounded-lg bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 text-sm",children:y}),e.jsxs("div",{className:"flex items-center justify-end gap-3 mt-6 pt-4 border-t border-gray-200 dark:border-white/10",children:[e.jsx(P,{variant:"secondary",onClick:o,children:"Cancel"}),e.jsx(P,{onClick:S,loading:m,children:u?"Save Changes":"Add Milestone"})]})]})})}function L({milestone:a,index:o,lockedCount:b,pickNumber:d,onTogglePick:f,onEdit:u,onDelete:s,isDragOverlay:l}){const{attributes:m,listeners:v,setNodeRef:y,transform:n,transition:i,isDragging:c}=be({id:a.id}),w=l?void 0:{transform:fe.Transform.toString(n),transition:i},S=_[a.category]||{label:a.category||"Other",icon:"ph:circle",color:"text-gray-600",bgColor:"bg-gray-100 dark:bg-white/10"},C=K[a.status]||{label:a.status||"Planned",icon:"ph:circle-dashed",color:"text-gray-500",bgColor:"bg-gray-100 dark:bg-white/10"},r=d!==null,g=r||b<6,p=o%2===0,I=a.status==="completed",$=a.status==="in-progress";return e.jsxs("div",{ref:y,style:w,className:`relative flex flex-col items-center flex-shrink-0 w-52 group ${c?"opacity-30":""} ${l?"scale-105 z-50":""}`,children:[p&&e.jsx(q,{m:a,cat:S,stat:C,isPicked:r,canPick:g,pickNumber:d,onTogglePick:f,onEdit:u,onDelete:s,attributes:m,listeners:v}),e.jsx("div",{className:`w-px bg-gradient-to-b ${p?"from-transparent to-blue-500/40":"from-blue-500/40 to-transparent"} h-8`}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("div",{className:`w-4 h-4 rounded-full transition-all duration-300 ${I?"bg-emerald-500 shadow-lg shadow-emerald-500/40":$?"bg-blue-500 shadow-lg shadow-blue-500/40":r?"bg-violet-500 shadow-lg shadow-violet-500/40":"bg-gray-400 dark:bg-gray-500"}`}),$&&e.jsx("div",{className:"absolute -inset-1.5 rounded-full border-2 border-blue-500 animate-ping opacity-20",style:{animationDuration:"2s"}})]}),e.jsx("div",{className:`w-px bg-gradient-to-b ${p?"from-blue-500/40 to-transparent":"from-transparent to-blue-500/40"} h-8`}),!p&&e.jsx(q,{m:a,cat:S,stat:C,isPicked:r,canPick:g,pickNumber:d,onTogglePick:f,onEdit:u,onDelete:s,attributes:m,listeners:v}),p&&e.jsx("div",{className:"h-[180px]"}),!p&&e.jsx("div",{className:"h-0"})]})}function q({m:a,cat:o,stat:b,isPicked:d,canPick:f,pickNumber:u,onTogglePick:s,onEdit:l,onDelete:m,attributes:v,listeners:y}){return e.jsxs("div",{className:"relative",children:[d&&u&&e.jsx("div",{className:"absolute -top-2.5 -right-2 z-20 w-6 h-6 rounded-full bg-gradient-to-br from-violet-500 to-purple-600 flex items-center justify-center shadow-lg shadow-violet-500/40",children:e.jsx("span",{className:"text-[10px] font-bold text-white",children:u})}),e.jsx("button",{onClick:()=>f&&s(a.id),disabled:!f,className:`relative w-48 text-left rounded-xl overflow-hidden transition-all duration-300 group/card ${d?"ring-2 ring-violet-500/50 shadow-lg shadow-violet-500/15 scale-[1.03]":f?"hover:shadow-md hover:scale-[1.02] hover:ring-1 hover:ring-blue-500/20":"opacity-50"}`,children:e.jsxs("div",{className:`p-3 backdrop-blur-sm border rounded-xl transition-colors ${d?"bg-violet-50/80 dark:bg-violet-500/[0.08] border-violet-300/40 dark:border-violet-500/20":"bg-white/80 dark:bg-white/[0.04] border-gray-200/60 dark:border-white/[0.08]"}`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{...v,...y,onClick:n=>n.stopPropagation(),className:"text-gray-300 dark:text-gray-600 hover:text-gray-500 cursor-grab active:cursor-grabbing",children:e.jsx(h,{icon:"ph:dots-six-bold",className:"text-xs"})}),e.jsx("span",{className:"text-[11px] font-bold text-blue-600 dark:text-blue-400",children:je(a.period)})]}),e.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/card:opacity-100 transition-opacity",children:[e.jsx("span",{role:"button",tabIndex:0,onClick:n=>{n.stopPropagation(),l(a.id)},onKeyDown:n=>{n.key==="Enter"&&(n.stopPropagation(),l(a.id))},className:"p-0.5 rounded text-gray-400 hover:text-blue-500 cursor-pointer",children:e.jsx(h,{icon:"ph:pencil-simple",className:"text-xs"})}),e.jsx("span",{role:"button",tabIndex:0,onClick:n=>
1{n.stopPropagation(),m(a.id)},onKeyDown:n=>{n.key==="Enter"&&(n.stopPropagation(),m(a.id))},className:"p-0.5 rounded text-gray-400 hover:text-red-500 cursor-pointer",children:e.jsx(h,{icon:"ph:trash",className:"text-xs"})})]})]}),e.jsx("h4",{className:"text-sm font-bold text-gray-900 dark:text-white leading-snug mb-1.5",children:a.title}),a.description&&e.jsx("p",{className:"text-[10px] text-gray-500 dark:text-gray-400 leading-relaxed line-clamp-2 mb-2",children:a.description}),a.goals.length>0&&e.jsxs("div",{className:"flex flex-col gap-1",children:[a.goals.slice(0,3).map((n,i)=>e.jsx("span",{className:"text-[11px] font-semibold text-gray-700 dark:text-gray-200 leading-tight",children:n},i)),a.goals.length>3&&e.jsxs("span",{className:"text-[10px] text-gray-400",children:["+",a.goals.length-3," more"]})]}),e.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[e.jsx("span",{className:`inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded-full text-[9px] font-medium ${o.bgColor} ${o.color}`,children:o.label}),e.jsx("span",{className:`inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded-full text-[9px] font-medium ${b.bgColor} ${b.color}`,children:b.label})]})]})})]})}function we({milestones:a,lockedCount:o}){const[b,d]=x.useState(!1),f=a.filter(l=>l.locked).sort((l,m)=>l.order-m.order),u=Array.from({length:6},(l,m)=>f[m]||null),s=x.useCallback(()=>{d(!0)},[]);return e.jsxs("div",{className:"space-y-0",children:[e.jsxs("div",{className:"p-4 rounded-2xl bg-gradient-to-r from-violet-500/[0.06] via-purple-500/[0.04] to-indigo-500/[0.06] dark:from-violet-500/[0.1] dark:via-purple-500/[0.06] dark:to-indigo-500/[0.1] border border-violet-500/10 dark:border-violet-500/15",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-violet-500/15 flex items-center justify-center",children:e.jsx(h,{icon:"ph:presentation-chart",className:"text-base text-violet-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-gray-800 dark:text-gray-200",children:"Pitch Deck Picks"}),e.jsxs("p",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:["Tap milestones below to fill ",6-o>0?`${6-o} remaining slot${6-o>1?"s":""}`:"all slots"]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-2xl font-bold bg-gradient-to-r from-violet-500 to-purple-500 bg-clip-text text-transparent",children:o}),e.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"/6"})]}),o>0&&!b&&e.jsxs("button",{onClick:s,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-gradient-to-r from-violet-500 to-purple-600 text-white text-xs font-semibold shadow-md shadow-violet-500/25 hover:shadow-lg hover:shadow-violet-500/35 hover:scale-[1.02] active:scale-[0.98] transition-all",children:[e.jsx(h,{icon:"ph:paper-plane-tilt-fill",className:"text-sm"}),"Send to Pitch Deck"]}),b&&e.jsxs("span",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-emerald-500/10 border border-emerald-500/20 text-emerald-600 dark:text-emerald-400 text-xs font-semibold",children:[e.jsx(h,{icon:"ph:check-circle-fill",className:"text-sm"}),"Saved to deck"]})]})]}),e.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1",children:u.map((l,m)=>e.jsx("div",{className:`flex items-center gap-2 px-3 py-2 rounded-xl flex-shrink-0 min-w-[120px] max-w-[180px] transition-all duration-300 ${l?"bg-violet-500/10 dark:bg-violet-500/15 border border-violet-500/20 shadow-sm":"bg-white/40 dark:bg-white/[0.02] border border-dashed border-gray-300/50 dark:border-white/[0.08]"}`,children:l?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-5 h-5 rounded-full bg-gradient-to-br from-violet-500 to-purple-600 flex items-center justify-center flex-shrink-0",children:e.jsx("span",{className:"text-[9px] font-bold text-white",children:m+1})}),e.jsx("span",{className:"text-xs font-medium text-gray-800 dark:text-gray-200 truncate",children:l.title})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-5 h-5 rounded-full border-2 border-dashed border-gray-300 dark:border-white/15 flex-shrink-0"}),e.jsx("span",{className:"text-[11px] text-gray-400 dark:text-gray-500",children:"Empty slot"})]})},m))})]}),b&&e.jsx("div",{className:"mt-3 p-4 rounded-2xl bg-gradient-to-r from-blue-500/[0.06] to-indigo-500/[0.04] dark:from-blue-500/[0.1] dark:to-indigo-500/[0.06] border border-blue-500/10 dark:border-blue-500/15",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-9 h-9 rounded-xl bg-emerald-500/15 flex items-center justify-center",children:e.jsx(h,{icon:"ph:check-circle-fill",className:"text-lg text-emerald-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-gray-800 dark:text-gray-200",children:"Roadmap saved to your pitch deck"}),e.jsxs("p",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:["Your ",o," milestones will appear on the Roadmap slide when you generate your deck."]})]})]}
1),e.jsxs(Y,{to:"/fundraise/pitch-deck/deck",className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-gradient-to-r from-blue-500 to-indigo-600 text-white text-xs font-semibold shadow-md shadow-blue-500/25 hover:shadow-lg hover:shadow-blue-500/35 hover:scale-[1.02] active:scale-[0.98] transition-all whitespace-nowrap",children:["Next: Build Pitch Deck",e.jsx(h,{icon:"ph:arrow-right-bold",className:"text-sm"})]})]})})]})}function Oe(){const a=le(t=>t.activeProject),o=k(t=>t.data),b=k(t=>t.loading),d=k(t=>t.milestoneGenerating),f=k(t=>t.loadData),u=k(t=>t.addMilestone),s=k(t=>t.updateMilestone),l=k(t=>t.deleteMilestone),m=k(t=>t.reorderMilestones),v=k(t=>t.toggleMilestoneLock),y=k(t=>t.updateVision),n=k(t=>t.generateRoadmap),i=a?.id,[c,w]=x.useState(!1),[S,C]=x.useState(null),[r,g]=x.useState(!1),[p,I]=x.useState(null),$=oe(F(pe,{activationConstraint:{distance:8}}),F(ue,{coordinateGetter:me}));se({queryKey:["gtm-roadmap",i],queryFn:()=>f(i),enabled:!!i});const N=o?.milestones||[],T=!!o?.strategy,M=x.useMemo(()=>[...N].sort((t,j)=>t.order-j.order),[N]),G=x.useMemo(()=>M.map(t=>t.id),[M]),A=x.useMemo(()=>N.filter(t=>t.locked).length,[N]),R=x.useMemo(()=>{const t=new Map;let j=1;for(const E of M)E.locked&&t.set(E.id,j++);return t},[M]),D=p?M.find(t=>t.id===p):null,Q=D?M.indexOf(D):0,B=x.useCallback(async t=>{i&&await u(i,t)},[i,u]),U=x.useCallback(async t=>{!i||!S||(await s(i,S.id,t),C(null))},[i,S,s]),W=x.useCallback(t=>{i&&l(i,t)},[i,l]),H=x.useCallback(t=>{const j=N.find(E=>E.id===t);j&&(C(j),w(!0))},[N]),J=x.useCallback(t=>{i&&v(i,t)},[i,v]),X=x.useCallback(async(t,j)=>{i&&(g(!0),await y(i,t,j),g(!1))},[i,y]),O=x.useCallback(async()=>{i&&await n(i)},[i,n]),Z=x.useCallback(t=>{I(t.active.id)},[]),ee=x.useCallback(t=>{I(null);const{active:j,over:E}=t;if(!E||j.id===E.id||!i)return;const V=G.indexOf(j.id),z=G.indexOf(E.id);V===-1||z===-1||m(i,ne(G,V,z))},[i,G,m]);if(!a)return e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No active project selected"})});if(b||!o)return e.jsx("div",{className:"flex items-center justify-center py-24",children:e.jsx(ie,{size:"lg"})});const te=o.setup?.context?.startupName||a.name||"Your Startup";return e.jsxs("div",{className:"relative min-h-full",children:[e.jsxs("div",{className:"fixed inset-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 left-1/4 w-[600px] h-[600px] bg-blue-500/[0.04] dark:bg-blue-500/[0.08] rounded-full blur-3xl"}),e.jsx("div",{className:"absolute bottom-1/3 right-0 w-[500px] h-[500px] bg-coral-500/[0.04] dark:bg-coral-500/[0.08] rounded-full blur-3xl"}),e.jsx("div",{className:"absolute top-1/2 left-0 w-[400px] h-[400px] bg-violet-500/[0.04] dark:bg-violet-500/[0.08] rounded-full blur-3xl"})]}),e.jsxs("div",{className:"relative max-w-6xl mx-auto px-4 py-8 space-y-6",children:[e.jsxs("div",{className:"relative overflow-hidden bg-gradient-to-br from-blue-600 via-indigo-600 to-violet-600 rounded-2xl p-6 shadow-xl shadow-blue-500/20",children:[e.jsx("div",{className:"absolute -top-10 -right-10 w-40 h-40 bg-white/10 rounded-full blur-2xl"}),e.jsx("div",{className:"absolute -bottom-10 -left-10 w-32 h-32 bg-white/10 rounded-full blur-2xl"}),e.jsxs("div",{className:"relative flex items-center justify-between flex-wrap gap-3",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-14 h-14 rounded-2xl bg-white/20 backdrop-blur-sm flex items-center justify-center",children:e.jsx(h,{icon:"ph:flag-checkered-bold",className:"text-2xl text-white"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-white",children:"Product Roadmap"}),e.jsx("p",{className:"text-white/70 text-sm",children:te})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs(P,{variant:"secondary",size:"sm",onClick:O,loading:d,className:"!bg-white/15 !text-white hover:!bg-white/25 !border-white/20",children:[e.jsx(h,{icon:"ph:sparkle",className:"mr-1.5"}),N.length>0?"Regenerate":"Generate"," with AI"]}),e.jsxs(P,{size:"sm",onClick:()=>{C(null),w(!0)},className:"!bg-white/20 !text-white hover:!bg-white/30 !border-white/20",children:[e.jsx(h,{icon:"ph:plus",className:"mr-1.5"}),"Add Milestone"]})]})]})]}),T&&e.jsxs(Y,{to:"/growth/gtm",className:"group flex items-center gap-3 p-3 rounded-xl bg-gradient-to-r from-coral-500/[0.08] to-orange-500/[0.05] dark:from-coral-500/[0.12] dark:to-orange-500/[0.06] border border-coral-500/10 dark:border-coral-500/15 hover:border-coral-500/25 transition-all",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-coral-500/15 flex items-center justify-center flex-shrink-0",children:e.jsx(h,{icon:"ph:compass",className:"text-base text-coral-500"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs font-medium text-gray-700 dark:text-gray-300",children:"Powered by your GTM Strategy"}),e.jsx("p",{className:"text-[11px] text-gray-500 truncate",children:"Milestones aligned with your go-to-market goals"})]}),e.jsx(h,{icon:"ph:arrow-right",className:"text-sm text-gray-400 group-hover:text-coral-500 transition-colors flex-shrink-0"})]}),N.length>0&&e.jsx(we,{milestones:M,lockedCount:A}),e.jsxs("div",{children:[e.jsxs("h2",{className:"text-lg font-bold text-gray-900 dark:text-white flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-coral-500/20 to-amber-500/10 flex items-center justify-center",children:e.jsx(h,{icon:"ph:eye",className:"text-coral-500"})}),"Vision & Goals"]}),e.jsx(Ne,{visionStatement:o.visionStatement,threeYearGoal:o.threeYearGoal,exitStrategy:o.exitStrategy,onEdit:X,saving:r})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h2",{className:"text-lg font-bold text-gray-900 dark:text-white flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-blue-500/20 to-cyan-500/10 flex items-center justify-center",children:e.jsx(h,{icon:"ph:path",className:"text-blue-500"})}),"Milestones",N.length>0&&e.jsxs("span",{className:"text-sm font-normal text-gray-400 dark:text-gray-500 ml-1",children:["(",N.length,")"]})]}),N.length>1&&e.jsxs("p",{className:"text-xs text-gray-400 dark:text-gray-500 flex items-center gap-1.5",children:[e.jsx(h,{icon:"ph:hand-grab",className:"text-sm"}),"Drag to reorder · Tap to pick"]})]}),M.length>0?e.jsxs(de,{sensors:$,collisionDetection:ce,onDragStart:Z,onDragEnd:ee,children:[e.jsx("div",{className:"relative -mx-4 px-4 overflow-x-auto pb-4 scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-white/10",children:e.jsxs("div",{className:"relative min-w-min",children:[e.jsx("div",{className:"absolute left-4 right-4 h-0.5 rounded-full bg-gradient-to-r from-blue-500/40 via-violet-500/30 to-blue-500/20 dark:from-blue-500/50 dark:via-violet-500/35 dar
1k:to-blue-500/15",style:{top:"calc(50% - 1px)"}}),e.jsx(xe,{items:G,strategy:he,children:e.jsx("div",{className:"flex items-center gap-2 py-4",children:M.map((t,j)=>e.jsx(L,{milestone:t,index:j,lockedCount:A,pickNumber:R.get(t.id)??null,onTogglePick:J,onEdit:H,onDelete:W},t.id))})})]})}),e.jsx(ge,{children:D?e.jsx(L,{milestone:D,index:Q,lockedCount:A,pickNumber:R.get(D.id)??null,onTogglePick:()=>{},onEdit:()=>{},onDelete:()=>{},isDragOverlay:!0}):null})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center bg-white/60 dark:bg-white/[0.02] rounded-2xl border border-dashed border-gray-300/50 dark:border-white/[0.06]",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center mb-3",children:e.jsx(h,{icon:"ph:path",className:"text-3xl text-blue-500"})}),e.jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-white mb-1",children:"No milestones yet"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 max-w-md mb-5",children:T?"Generate traction predictions from your GTM data — AI creates 8 investor-grade milestones for your pitch deck.":"Generate milestones with AI to build your roadmap timeline, or add them manually."}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs(P,{onClick:O,loading:d,children:[e.jsx(h,{icon:"ph:sparkle",className:"mr-2"}),"Generate with AI"]}),e.jsxs(P,{variant:"secondary",onClick:()=>{C(null),w(!0)},children:[e.jsx(h,{icon:"ph:plus",className:"mr-2"}),"Add Manually"]})]})]})]})]}),e.jsx(ke,{open:c,onClose:()=>{w(!1),C(null)},onSave:S?U:B,milestone:S})]})}export{Oe 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.