vibebusiness 1.2.39 → 1.2.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/.next/standalone/.env +7 -0
  2. package/.next/standalone/.next/BUILD_ID +1 -1
  3. package/.next/standalone/.next/app-build-manifest.json +68 -60
  4. package/.next/standalone/.next/app-path-routes-manifest.json +1 -1
  5. package/.next/standalone/.next/build-manifest.json +6 -6
  6. package/.next/standalone/.next/prerender-manifest.json +1 -1
  7. package/.next/standalone/.next/routes-manifest.json +1 -1
  8. package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
  9. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  12. package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
  13. package/.next/standalone/.next/server/app/api/analyze/route.js +1 -1
  14. package/.next/standalone/.next/server/app/api/analyze/route.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/api/checkout/route.js +1 -0
  16. package/.next/standalone/.next/server/app/api/checkout/route.js.nft.json +1 -0
  17. package/.next/standalone/.next/server/app/api/config/detect-repos/route.js +1 -1
  18. package/.next/standalone/.next/server/app/api/config/detect-repos/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/config/route.js +1 -1
  20. package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/epics/[id]/ideas/route.js +1 -1
  22. package/.next/standalone/.next/server/app/api/epics/[id]/ideas/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/epics/[id]/route.js +1 -1
  24. package/.next/standalone/.next/server/app/api/epics/[id]/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/epics/route.js +1 -1
  26. package/.next/standalone/.next/server/app/api/epics/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/goals/[id]/kpis/route.js +1 -1
  28. package/.next/standalone/.next/server/app/api/goals/[id]/kpis/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/goals/[id]/route.js +1 -1
  30. package/.next/standalone/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/goals/route.js +1 -1
  32. package/.next/standalone/.next/server/app/api/goals/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/health/route.js +1 -1
  34. package/.next/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/hypotheses/[id]/route.js +1 -1
  36. package/.next/standalone/.next/server/app/api/hypotheses/[id]/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/hypotheses/route.js +1 -1
  38. package/.next/standalone/.next/server/app/api/hypotheses/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/ideas/[id]/comments/route.js +1 -1
  40. package/.next/standalone/.next/server/app/api/ideas/[id]/comments/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/ideas/[id]/implement/route.js +1 -1
  42. package/.next/standalone/.next/server/app/api/ideas/[id]/implement/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/ideas/[id]/route.js +1 -1
  44. package/.next/standalone/.next/server/app/api/ideas/[id]/route.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/api/ideas/[id]/transition/route.js +1 -1
  46. package/.next/standalone/.next/server/app/api/ideas/[id]/transition/route.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/api/ideas/route.js +1 -1
  48. package/.next/standalone/.next/server/app/api/ideas/route.js.nft.json +1 -1
  49. package/.next/standalone/.next/server/app/api/implementations/route.js +1 -1
  50. package/.next/standalone/.next/server/app/api/implementations/route.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/api/kpis/refresh/route.js +1 -1
  52. package/.next/standalone/.next/server/app/api/kpis/refresh/route.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/api/license/route.js +1 -0
  54. package/.next/standalone/.next/server/app/api/license/route.js.nft.json +1 -0
  55. package/.next/standalone/.next/server/app/api/portal/route.js +1 -0
  56. package/.next/standalone/.next/server/app/api/portal/route.js.nft.json +1 -0
  57. package/.next/standalone/.next/server/app/api/social/[id]/publish/route.js +1 -0
  58. package/.next/standalone/.next/server/app/api/social/[id]/publish/route.js.nft.json +1 -0
  59. package/.next/standalone/.next/server/app/api/social/[id]/route.js +1 -0
  60. package/.next/standalone/.next/server/app/api/social/[id]/route.js.nft.json +1 -0
  61. package/.next/standalone/.next/server/app/api/social/route.js +1 -0
  62. package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -0
  63. package/.next/standalone/.next/server/app/api/webhook/route.js +1 -0
  64. package/.next/standalone/.next/server/app/api/webhook/route.js.nft.json +1 -0
  65. package/.next/standalone/.next/server/app/goals/[id]/page.js +1 -1
  66. package/.next/standalone/.next/server/app/goals/[id]/page.js.nft.json +1 -1
  67. package/.next/standalone/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/app/goals/page.js +1 -1
  69. package/.next/standalone/.next/server/app/goals/page.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/goals/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/hypotheses/[id]/page.js +1 -1
  72. package/.next/standalone/.next/server/app/hypotheses/[id]/page.js.nft.json +1 -1
  73. package/.next/standalone/.next/server/app/hypotheses/[id]/page_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/hypotheses/page.js +1 -1
  75. package/.next/standalone/.next/server/app/hypotheses/page.js.nft.json +1 -1
  76. package/.next/standalone/.next/server/app/hypotheses/page_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/ideas/[id]/page.js +1 -1
  78. package/.next/standalone/.next/server/app/ideas/[id]/page.js.nft.json +1 -1
  79. package/.next/standalone/.next/server/app/ideas/[id]/page_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/landing/page.js +1 -1
  81. package/.next/standalone/.next/server/app/landing/page.js.nft.json +1 -1
  82. package/.next/standalone/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/landing.html +1 -1
  84. package/.next/standalone/.next/server/app/landing.rsc +1 -1
  85. package/.next/standalone/.next/server/app/page.js +1 -1
  86. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  87. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/roadmap/[id]/page.js +1 -1
  89. package/.next/standalone/.next/server/app/roadmap/[id]/page.js.nft.json +1 -1
  90. package/.next/standalone/.next/server/app/roadmap/[id]/page_client-reference-manifest.js +1 -1
  91. package/.next/standalone/.next/server/app/roadmap/page.js +1 -1
  92. package/.next/standalone/.next/server/app/roadmap/page.js.nft.json +1 -1
  93. package/.next/standalone/.next/server/app/roadmap/page_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/sessions/page.js +1 -1
  95. package/.next/standalone/.next/server/app/sessions/page.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/settings/page.js +1 -1
  98. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  99. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/settings.html +1 -1
  101. package/.next/standalone/.next/server/app/settings.rsc +2 -2
  102. package/.next/standalone/.next/server/app/social/page.js +1 -0
  103. package/.next/standalone/.next/server/app/social/page.js.nft.json +1 -0
  104. package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -0
  105. package/.next/standalone/.next/server/app/social.html +1 -0
  106. package/.next/standalone/.next/server/app/social.meta +5 -0
  107. package/.next/standalone/.next/server/app/social.rsc +7 -0
  108. package/.next/standalone/.next/server/app-paths-manifest.json +15 -7
  109. package/.next/standalone/.next/server/chunks/{682.js → 1682.js} +1 -1
  110. package/.next/standalone/.next/server/chunks/3644.js +1 -0
  111. package/.next/standalone/.next/server/chunks/4376.js +1 -0
  112. package/.next/standalone/.next/server/chunks/4471.js +2 -0
  113. package/.next/standalone/.next/server/chunks/534.js +1 -0
  114. package/.next/standalone/.next/server/chunks/5972.js +12 -0
  115. package/.next/standalone/.next/server/chunks/7809.js +2 -0
  116. package/.next/standalone/.next/server/chunks/9276.js +2 -0
  117. package/.next/standalone/.next/server/chunks/9777.js +1 -0
  118. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  119. package/.next/standalone/.next/server/pages/404.html +1 -1
  120. package/.next/standalone/.next/server/pages/500.html +1 -1
  121. package/.next/standalone/.next/server/pages/_app.js +1 -1
  122. package/.next/standalone/.next/server/pages/_document.js +1 -1
  123. package/.next/standalone/.next/server/pages/_document.js.nft.json +1 -1
  124. package/.next/standalone/.next/server/pages/_error.js +1 -1
  125. package/.next/standalone/.next/server/pages/_error.js.nft.json +1 -1
  126. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  127. package/.next/standalone/.next/server/webpack-runtime.js +1 -1
  128. package/.next/standalone/data/email-campaigns/welcome-2026-02-20.md +13 -32
  129. package/.next/standalone/data/payments.json +33 -0
  130. package/.next/standalone/data/social.json +13 -0
  131. package/.next/standalone/package.json +5 -1
  132. package/.next/standalone/scripts/skills/social-media.ts +456 -0
  133. package/.next/static/chunks/444-125b7b0fa8cbdb81.js +1 -0
  134. package/.next/static/chunks/746-ea7c3e4e69c14385.js +1 -0
  135. package/.next/static/chunks/app/goals/[id]/{page-91b8382d44e93925.js → page-8dbeab5cc8cf0988.js} +1 -1
  136. package/.next/static/chunks/app/goals/{page-ecaa4a2761757014.js → page-794526d1e1a0856a.js} +1 -1
  137. package/.next/static/chunks/app/hypotheses/[id]/{page-894b08de47a73af9.js → page-65032da79ae146c5.js} +1 -1
  138. package/.next/static/chunks/app/hypotheses/page-8314da4be7c533bd.js +1 -0
  139. package/.next/static/chunks/app/ideas/[id]/page-dc9746061e58eea5.js +1 -0
  140. package/.next/static/chunks/app/layout-eeef7928298d2198.js +1 -0
  141. package/.next/static/chunks/app/page-fb66ff080390f20a.js +1 -0
  142. package/.next/static/chunks/app/roadmap/[id]/{page-3848fd96de497d11.js → page-c8c4baf233e0d480.js} +1 -1
  143. package/.next/static/chunks/app/roadmap/page-b15554a207ed2813.js +1 -0
  144. package/.next/static/chunks/app/sessions/page-42fb8edb15b9da1c.js +1 -0
  145. package/.next/static/chunks/app/settings/page-d2d630a799b6b495.js +1 -0
  146. package/.next/static/chunks/app/social/page-6c61fb0c2546313e.js +1 -0
  147. package/.next/static/chunks/{main-c0637f9544446589.js → main-98052d4291bccc96.js} +1 -1
  148. package/.next/static/css/02298496de89e16e.css +3 -0
  149. package/README.md +18 -0
  150. package/dist/bin/vibebusiness.js +307 -26
  151. package/dist/scripts/analyze.js +1 -0
  152. package/dist/scripts/chat.js +1 -0
  153. package/dist/scripts/generate-idea.js +1 -0
  154. package/dist/scripts/heartbeat.js +7343 -192
  155. package/dist/scripts/implement.js +1 -0
  156. package/dist/scripts/init.js +46 -6
  157. package/dist/scripts/scan.js +1 -0
  158. package/package.json +5 -1
  159. package/templates/commands/email-marketing.md +148 -10
  160. package/.next/standalone/.next/server/chunks/276.js +0 -2
  161. package/.next/standalone/.next/server/chunks/416.js +0 -1
  162. package/.next/standalone/.next/server/chunks/471.js +0 -2
  163. package/.next/standalone/.next/server/chunks/617.js +0 -1
  164. package/.next/standalone/.next/server/chunks/644.js +0 -1
  165. package/.next/standalone/.next/server/chunks/972.js +0 -12
  166. package/.next/static/chunks/444-6c0edb23956d018d.js +0 -1
  167. package/.next/static/chunks/783-3af6dbdb6afb55f4.js +0 -1
  168. package/.next/static/chunks/app/hypotheses/page-2cf90570526c76d3.js +0 -1
  169. package/.next/static/chunks/app/ideas/[id]/page-e0cca1557b59f7e0.js +0 -1
  170. package/.next/static/chunks/app/layout-ae8acf4955ee5472.js +0 -1
  171. package/.next/static/chunks/app/page-6a52a6950963129a.js +0 -1
  172. package/.next/static/chunks/app/roadmap/page-94d002cf0e37260f.js +0 -1
  173. package/.next/static/chunks/app/sessions/page-8085e6da5e28c7e4.js +0 -1
  174. package/.next/static/chunks/app/settings/page-34f70eef4a23eb4c.js +0 -1
  175. package/.next/static/css/501d0ac30341ebbe.css +0 -3
  176. /package/.next/static/{k40DKimnEdAtBs_zywSQ4 → VNI-b7vAR8FWLaaVytLYx}/_buildManifest.js +0 -0
  177. /package/.next/static/{k40DKimnEdAtBs_zywSQ4 → VNI-b7vAR8FWLaaVytLYx}/_ssgManifest.js +0 -0
  178. /package/.next/static/chunks/{117-b74c3899e29d85d7.js → 117-23260fd0b5f0bd9a.js} +0 -0
  179. /package/.next/static/chunks/app/_not-found/{page-2573b25f318b094f.js → page-a7be1c556b396c8e.js} +0 -0
  180. /package/.next/static/chunks/{fd9d1056-2182e078483b259b.js → fd9d1056-8c714984d5b17b60.js} +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[943],{7670:function(e,t,s){Promise.resolve().then(s.bind(s,1259)),Promise.resolve().then(s.bind(s,3032))},6221:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]])},1259:function(e,t,s){"use strict";s.d(t,{default:function(){return f}});var a=s(7437),r=s(7648),l=s(9376),n=s(5466),i=s(2048),d=s(8896),o=s(8220),c=s(2718),x=s(5621),u=s(8728),m=s(2222),b=s(2023),p=s(1994),g=s(257);let h=[{href:"/",label:"Dashboard",icon:(0,a.jsx)(n.Z,{className:"w-5 h-5"})},{href:"/roadmap",label:"Roadmap",icon:(0,a.jsx)(i.Z,{className:"w-5 h-5"})},{href:"/goals",label:"Goals",icon:(0,a.jsx)(d.Z,{className:"w-5 h-5"})},{href:"/hypotheses",label:"Hypotheses",icon:(0,a.jsx)(o.Z,{className:"w-5 h-5"})},{href:"/social",label:"Social",icon:(0,a.jsx)(c.Z,{className:"w-5 h-5"})},{href:"/sessions",label:"Sessions",icon:(0,a.jsx)(x.Z,{className:"w-5 h-5"})},{href:"/settings",label:"Settings",icon:(0,a.jsx)(u.Z,{className:"w-5 h-5"})}];function f(e){let{children:t}=e,s=(0,l.usePathname)();return(0,a.jsxs)("div",{className:"min-h-screen flex",children:[(0,a.jsxs)("aside",{className:"w-64 bg-slate-900 text-white flex flex-col",children:[(0,a.jsx)("div",{className:"p-4 border-b border-slate-700",children:(0,a.jsxs)(r.default,{href:"/",className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-emerald-500 rounded-lg flex items-center justify-center",children:(0,a.jsx)(m.Z,{className:"w-6 h-6 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"font-bold text-lg leading-tight",children:"Analyst"}),(0,a.jsx)("p",{className:"text-xs text-slate-400",children:g.env.NEXT_PUBLIC_PRODUCT_NAME||"Business"})]})]})}),(0,a.jsx)("nav",{className:"flex-1 p-4",children:(0,a.jsx)("ul",{className:"space-y-1",children:h.map(e=>{let t="/"===e.href?"/"===s:s.startsWith(e.href);return(0,a.jsx)("li",{children:(0,a.jsxs)(r.default,{href:e.href,className:(0,p.Z)("flex items-center gap-3 px-3 py-2 rounded-lg transition-colors",t?"bg-slate-800 text-white":"text-slate-400 hover:text-white hover:bg-slate-800"),children:[e.icon,(0,a.jsx)("span",{children:e.label})]})},e.href)})})}),(0,a.jsx)("div",{className:"p-4 border-t border-slate-700",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[(0,a.jsx)(b.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Powered by Claude"})]})})]}),(0,a.jsx)("main",{className:"flex-1 overflow-auto",children:t})]})}},3032:function(e,t,s){"use strict";s.d(t,{default:function(){return f}});var a=s(7437),r=s(2265);let l=(0,s(9205).Z)("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);var n=s(6221),i=s(1994),d=s(7648),o=s(6153);function c(e){let{progress:t,status:s}=e,r=Math.round(t.progress_pct/100*8),l="█".repeat(r)+"░".repeat(8-r);return(0,a.jsx)("span",{className:(0,i.Z)("font-mono text-xs tracking-tight","completed"===s?"text-emerald-500":"active"===s?"text-blue-500":"text-slate-400"),children:l})}function x(e){let{epic:t,index:s,progress:r}=e,l=t.tags.includes("needs-review");return(0,a.jsx)(d.default,{href:"/roadmap/".concat(t.id),children:(0,a.jsxs)("div",{className:(0,i.Z)("flex items-center gap-4 px-4 py-3 hover:bg-slate-50 transition-colors rounded-lg group",l&&"border border-dashed border-slate-300"),children:[(0,a.jsxs)("span",{className:"text-sm font-bold text-slate-400 w-8 text-right flex-shrink-0",children:["#",s]}),(0,a.jsxs)("span",{className:"text-sm font-medium text-slate-900 flex-1 min-w-0 truncate group-hover:text-blue-600",children:[t.title,l&&(0,a.jsx)("span",{className:"ml-2 text-xs text-slate-400 font-normal italic",children:"draft"})]}),(0,a.jsx)(c,{progress:r,status:t.status}),(0,a.jsxs)("span",{className:"text-xs text-slate-500 w-12 text-center flex-shrink-0",children:[r.shipped_count,"/",r.total_ideas]}),(0,a.jsx)("span",{className:(0,i.Z)("text-xs px-2 py-0.5 rounded-full border flex-shrink-0 w-20 text-center",o.xP[t.status]),children:o.GK[t.status]}),(0,a.jsx)("span",{className:(0,i.Z)("text-xs px-2 py-0.5 rounded-full flex-shrink-0 hidden sm:inline-block",o.pG[t.category]),children:o.Hs[t.category]})]})})}function u(e){let{goalGroups:t,progressMap:s}=e;if(0===t.length)return(0,a.jsx)("div",{className:"bg-white rounded-lg border border-slate-200 p-12 text-center",children:(0,a.jsx)("p",{className:"text-slate-500",children:"No epics to display."})});let r={total_ideas:0,by_stage:{},shipped_count:0,progress_pct:0,effort_total:0,effort_completed:0},l=0;return(0,a.jsx)("div",{className:"space-y-6",children:t.map(e=>{var t;return(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-slate-700",children:e.goalId?"Goal: ".concat(e.goalTitle):e.goalTitle}),(0,a.jsxs)("span",{className:"text-xs text-slate-400",children:[e.epics.length," epic",1!==e.epics.length?"s":""," \xb7 ",e.totalIdeas," idea",1!==e.totalIdeas?"s":""]})]}),(0,a.jsx)("div",{className:"divide-y divide-slate-50",children:e.epics.map(e=>(l++,(0,a.jsx)(x,{epic:e,index:l,progress:s[e.id]||r},e.id)))})]},null!==(t=e.goalId)&&void 0!==t?t:"orphan")})})}function m(e){return new Date(e+"T00:00:00")}function b(e,t){return Math.round((t.getTime()-e.getTime())/864e5)}let p={planned:{bg:"bg-slate-200",fill:"bg-slate-400"},active:{bg:"bg-blue-100",fill:"bg-blue-500"},completed:{bg:"bg-emerald-100",fill:"bg-emerald-500"},paused:{bg:"bg-amber-100",fill:"bg-amber-500"}};function g(e){let{epic:t,progress:s,dates:r,rangeStart:l,totalDays:n}=e,o=m(r.start),c=m(r.end),x=b(l,o),u=Math.max(1,b(o,c)),g=Math.max(0,x/n*100),h=p[t.status],f=null!==t.target_start||null!==t.target_end;return(0,a.jsx)(d.default,{href:"/roadmap/".concat(t.id),className:"group",children:(0,a.jsxs)("div",{className:"flex items-center h-10 relative",children:[(0,a.jsx)("div",{className:"w-48 flex-shrink-0 pr-3 text-right",children:(0,a.jsx)("span",{className:"text-xs font-medium text-slate-700 truncate block group-hover:text-blue-600",children:t.title})}),(0,a.jsx)("div",{className:"flex-1 relative h-7",children:(0,a.jsxs)("div",{className:(0,i.Z)("absolute top-0 h-full rounded transition-colors",h.bg,"group-hover:ring-2 group-hover:ring-blue-300"),style:{left:"".concat(g,"%"),width:"".concat(Math.max(Math.min(100-g,u/n*100),1),"%")},children:[s.progress_pct>0&&(0,a.jsx)("div",{className:(0,i.Z)("absolute left-0 top-0 h-full rounded",h.fill),style:{width:"".concat(s.progress_pct,"%")}}),(0,a.jsxs)("div",{className:"absolute inset-0 flex items-center justify-between px-2 text-[10px] leading-none z-10",children:[(0,a.jsxs)("span",{className:"font-medium text-slate-700 truncate",children:[s.shipped_count,"/",s.total_ideas]}),f&&(0,a.jsx)("span",{className:"text-slate-400",title:"Manual dates",children:"M"})]})]})})]})})}function h(e){let{goalGroups:t,progressMap:s,dateEstimates:r}=e,l=[];for(let e of Object.values(r))l.push(m(e.start)),l.push(m(e.end));if(0===l.length)return(0,a.jsx)("div",{className:"bg-white rounded-lg border border-slate-200 p-12 text-center",children:(0,a.jsx)("p",{className:"text-slate-500",children:"No date estimates available for Gantt view."})});let n=new Date(Math.min(...l.map(e=>e.getTime()))),i=new Date(Math.max(...l.map(e=>e.getTime()))),d=function(e){let t=new Date(e),s=t.getDay();return t.setDate(t.getDate()+(0===s?-6:1-s)),t}(new Date(n.getTime()-6048e5)),o=new Date(i.getTime()+6048e5),c=Math.max(1,b(d,o)),x=[],u=new Date(d);for(;u<=o;)x.push(new Date(u)),u.setDate(u.getDate()+7);let p=new Date;p.setHours(0,0,0,0);let h=b(d,p)/c*100,f=h>=0&&h<=100,v={total_ideas:0,by_stage:{},shipped_count:0,progress_pct:0,effort_total:0,effort_completed:0};return(0,a.jsx)("div",{className:"bg-white rounded-lg border border-slate-200 overflow-x-auto",children:(0,a.jsxs)("div",{className:"min-w-[700px]",children:[(0,a.jsxs)("div",{className:"flex items-center border-b border-slate-100 sticky top-0 bg-white z-20",children:[(0,a.jsx)("div",{className:"w-48 flex-shrink-0 px-4 py-2",children:(0,a.jsx)("span",{className:"text-xs font-medium text-slate-400 uppercase",children:"Epic"})}),(0,a.jsx)("div",{className:"flex-1 relative h-8 flex",children:x.map((e,t)=>{let s=b(d,e)/c*100;return(0,a.jsx)("div",{className:"absolute top-0 h-full border-l border-slate-100 px-1 flex items-center",style:{left:"".concat(s,"%")},children:(0,a.jsx)("span",{className:"text-[10px] text-slate-400 whitespace-nowrap",children:e.toLocaleDateString("en-US",{month:"short",day:"numeric"})})},t)})})]}),t.map(e=>{var t;return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center border-b border-slate-100 bg-slate-50",children:(0,a.jsx)("div",{className:"px-4 py-2",children:(0,a.jsx)("span",{className:"text-xs font-semibold text-slate-600",children:e.goalId?"Goal: ".concat(e.goalTitle):e.goalTitle})})}),(0,a.jsxs)("div",{className:"relative",children:[x.map((e,t)=>{let s=b(d,e)/c*100;return(0,a.jsx)("div",{className:"absolute top-0 bottom-0 border-l border-slate-50",style:{left:"calc(".concat(s,"% + 192px)")}},t)}),f&&(0,a.jsx)("div",{className:"absolute top-0 bottom-0 border-l-2 border-dashed border-red-400 z-10",style:{left:"calc(".concat(h,"% + 192px)")},title:"Today"}),e.epics.map(e=>{let t=r[e.id];return t?(0,a.jsx)(g,{epic:e,progress:s[e.id]||v,dates:t,rangeStart:d,totalDays:c},e.id):null})]})]},null!==(t=e.goalId)&&void 0!==t?t:"orphan")}),(0,a.jsxs)("div",{className:"flex items-center gap-4 px-4 py-3 border-t border-slate-100 text-[10px] text-slate-500",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"w-3 h-2 bg-slate-200 rounded inline-block"})," Planned"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"w-3 h-2 bg-blue-100 rounded inline-block"})," Active"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"w-3 h-2 bg-emerald-100 rounded inline-block"})," Completed"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"w-3 h-2 bg-amber-100 rounded inline-block"})," Paused"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1 ml-2",children:[(0,a.jsx)("span",{className:"border-l-2 border-dashed border-red-400 h-3 inline-block"})," Today"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1 ml-2",children:[(0,a.jsx)("span",{className:"text-slate-400 font-medium",children:"M"})," = Manual dates"]})]})]})})}function f(e){let{goalGroups:t,progressMap:s,dateEstimates:d}=e,[o,c]=(0,r.useState)("list");return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-1 mb-4 bg-slate-100 rounded-lg p-1 w-fit",children:[(0,a.jsxs)("button",{onClick:()=>c("list"),className:(0,i.Z)("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors","list"===o?"bg-white text-slate-900 shadow-sm":"text-slate-500 hover:text-slate-700"),children:[(0,a.jsx)(l,{className:"w-4 h-4"}),"List"]}),(0,a.jsxs)("button",{onClick:()=>c("gantt"),className:(0,i.Z)("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors","gantt"===o?"bg-white text-slate-900 shadow-sm":"text-slate-500 hover:text-slate-700"),children:[(0,a.jsx)(n.Z,{className:"w-4 h-4"}),"Gantt"]})]}),"list"===o?(0,a.jsx)(u,{goalGroups:t,progressMap:s}):(0,a.jsx)(h,{goalGroups:t,progressMap:s,dateEstimates:d})]})}},6153:function(e,t,s){"use strict";s.d(t,{G:function(){return i},GK:function(){return k},Gs:function(){return c},Hs:function(){return a},PN:function(){return b},PW:function(){return w},Q_:function(){return p},R$:function(){return N},Vr:function(){return x},Wb:function(){return m},aR:function(){return u},bi:function(){return d},en:function(){return j},i2:function(){return v},kT:function(){return g},l5:function(){return h},lE:function(){return y},lv:function(){return n},pG:function(){return r},rF:function(){return o},tV:function(){return f},tl:function(){return _},xP:function(){return M},yb:function(){return l}});let a={product:"Product",ux_design:"UX/Design",growth:"Growth",performance:"Performance",tech_debt:"Tech Debt",security:"Security",infrastructure:"Infrastructure",content:"Content",analytics:"Analytics",integration:"Integration"},r={product:"bg-blue-100 text-blue-800",ux_design:"bg-purple-100 text-purple-800",growth:"bg-green-100 text-green-800",performance:"bg-orange-100 text-orange-800",tech_debt:"bg-yellow-100 text-yellow-800",security:"bg-red-100 text-red-800",infrastructure:"bg-gray-100 text-gray-800",content:"bg-pink-100 text-pink-800",analytics:"bg-cyan-100 text-cyan-800",integration:"bg-indigo-100 text-indigo-800"},l={inbox:"Inbox",under_review:"Under Review",approved:"Approved",in_progress:"In Progress",testing:"Testing",shipped:"Shipped",deferred:"Deferred",rejected:"Rejected",rolled_back:"Rolled Back"},n={inbox:"bg-amber-500",under_review:"bg-blue-500",approved:"bg-emerald-500",in_progress:"bg-violet-500",testing:"bg-cyan-500",shipped:"bg-green-500",deferred:"bg-gray-500",rejected:"bg-red-500",rolled_back:"bg-orange-500"},i=["inbox","under_review","approved","in_progress","testing","shipped"],d={xs:"XS",s:"S",m:"M",l:"L",xl:"XL"},o={critical:"Critical",high:"High",medium:"Medium",low:"Low"},c={critical:"bg-red-100 text-red-800 border-red-300",high:"bg-orange-100 text-orange-800 border-orange-300",medium:"bg-yellow-100 text-yellow-800 border-yellow-300",low:"bg-gray-100 text-gray-800 border-gray-300"},x={codebase_analysis:"Codebase Analysis",metrics_review:"Metrics Review",market_research:"Market Research",seo_audit:"SEO Audit",manual:"Manual"},u={pending:"bg-slate-100 text-slate-700",validated:"bg-emerald-100 text-emerald-800",needs_investigation:"bg-amber-100 text-amber-800",inconclusive:"bg-slate-100 text-slate-600",invalidated:"bg-red-100 text-red-800"},m={pending:"Pending",validated:"Validated",needs_investigation:"Needs Investigation",inconclusive:"Inconclusive",invalidated:"Invalidated"},b={ship:"Ship",update:"Update",milestone:"Milestone",digest:"Digest",manual:"Manual"},p={ship:"bg-green-100 text-green-800",update:"bg-blue-100 text-blue-800",milestone:"bg-amber-100 text-amber-800",digest:"bg-purple-100 text-purple-800",manual:"bg-slate-100 text-slate-800"},g={acquisition:"Acquisition",activation:"Activation",retention:"Retention",revenue:"Revenue",referral:"Referral"},h={acquisition:"bg-blue-100 text-blue-800",activation:"bg-emerald-100 text-emerald-800",retention:"bg-purple-100 text-purple-800",revenue:"bg-amber-100 text-amber-800",referral:"bg-pink-100 text-pink-800"},f={on_track:"On Track",at_risk:"At Risk",behind:"Behind",achieved:"Achieved"},v={on_track:"bg-emerald-100 text-emerald-800 border-emerald-300",at_risk:"bg-amber-100 text-amber-800 border-amber-300",behind:"bg-red-100 text-red-800 border-red-300",achieved:"bg-blue-100 text-blue-800 border-blue-300"},j={manual:"Manual",rest_api:"REST API",posthog:"PostHog",firestore:"Firestore",stripe:"Stripe",whatsapp:"WhatsApp"},N={stated:"Stated",testing:"Testing",validated:"Validated",invalidated:"Invalidated",deferred:"Deferred"},y={stated:"bg-slate-100 text-slate-800 border-slate-300",testing:"bg-amber-100 text-amber-800 border-amber-300",validated:"bg-emerald-100 text-emerald-800 border-emerald-300",invalidated:"bg-red-100 text-red-800 border-red-300",deferred:"bg-slate-100 text-slate-500 border-slate-200"},w={acquisition:"Acquisition",engagement:"Engagement",conversion:"Conversion",monetization:"Monetization"},_={acquisition:"bg-blue-100 text-blue-800",engagement:"bg-purple-100 text-purple-800",conversion:"bg-amber-100 text-amber-800",monetization:"bg-emerald-100 text-emerald-800"},k={planned:"Planned",active:"Active",completed:"Completed",paused:"Paused"},M={planned:"bg-slate-100 text-slate-700 border-slate-300",active:"bg-blue-100 text-blue-800 border-blue-300",completed:"bg-emerald-100 text-emerald-800 border-emerald-300",paused:"bg-amber-100 text-amber-800 border-amber-300"}}},function(e){e.O(0,[746,971,117,744],function(){return e(e.s=7670)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[496],{3991:function(e,s,l){Promise.resolve().then(l.bind(l,1259))},1259:function(e,s,l){"use strict";l.d(s,{default:function(){return b}});var a=l(7437),t=l(7648),n=l(9376),r=l(5466),c=l(2048),i=l(8896),h=l(8220),x=l(2718),d=l(5621),o=l(8728),f=l(2222),m=l(2023),j=l(1994),N=l(257);let u=[{href:"/",label:"Dashboard",icon:(0,a.jsx)(r.Z,{className:"w-5 h-5"})},{href:"/roadmap",label:"Roadmap",icon:(0,a.jsx)(c.Z,{className:"w-5 h-5"})},{href:"/goals",label:"Goals",icon:(0,a.jsx)(i.Z,{className:"w-5 h-5"})},{href:"/hypotheses",label:"Hypotheses",icon:(0,a.jsx)(h.Z,{className:"w-5 h-5"})},{href:"/social",label:"Social",icon:(0,a.jsx)(x.Z,{className:"w-5 h-5"})},{href:"/sessions",label:"Sessions",icon:(0,a.jsx)(d.Z,{className:"w-5 h-5"})},{href:"/settings",label:"Settings",icon:(0,a.jsx)(o.Z,{className:"w-5 h-5"})}];function b(e){let{children:s}=e,l=(0,n.usePathname)();return(0,a.jsxs)("div",{className:"min-h-screen flex",children:[(0,a.jsxs)("aside",{className:"w-64 bg-slate-900 text-white flex flex-col",children:[(0,a.jsx)("div",{className:"p-4 border-b border-slate-700",children:(0,a.jsxs)(t.default,{href:"/",className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-emerald-500 rounded-lg flex items-center justify-center",children:(0,a.jsx)(f.Z,{className:"w-6 h-6 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"font-bold text-lg leading-tight",children:"Analyst"}),(0,a.jsx)("p",{className:"text-xs text-slate-400",children:N.env.NEXT_PUBLIC_PRODUCT_NAME||"Business"})]})]})}),(0,a.jsx)("nav",{className:"flex-1 p-4",children:(0,a.jsx)("ul",{className:"space-y-1",children:u.map(e=>{let s="/"===e.href?"/"===l:l.startsWith(e.href);return(0,a.jsx)("li",{children:(0,a.jsxs)(t.default,{href:e.href,className:(0,j.Z)("flex items-center gap-3 px-3 py-2 rounded-lg transition-colors",s?"bg-slate-800 text-white":"text-slate-400 hover:text-white hover:bg-slate-800"),children:[e.icon,(0,a.jsx)("span",{children:e.label})]})},e.href)})})}),(0,a.jsx)("div",{className:"p-4 border-t border-slate-700",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[(0,a.jsx)(m.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Powered by Claude"})]})})]}),(0,a.jsx)("main",{className:"flex-1 overflow-auto",children:s})]})}}},function(e){e.O(0,[746,971,117,744],function(){return e(e.s=3991)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[938],{8645:function(e,s,t){Promise.resolve().then(t.bind(t,8619))},1723:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},6362:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},1817:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},9397:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},7168:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},3247:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},8930:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},8619:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return y}});var a=t(7437),l=t(2265),n=t(1817),r=t(7168),i=t(9205);let c=(0,i.Z)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),d=(0,i.Z)("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);var o=t(9397),m=t(8930),x=t(3247),h=t(1723);let u=(0,i.Z)("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);var p=t(6362);let b=(0,i.Z)("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);var f=t(1259),j=t(1994);function y(){let[e,s]=(0,l.useState)(null),[t,i]=(0,l.useState)(!0),[y,g]=(0,l.useState)(!1),[N,v]=(0,l.useState)(null),[k,w]=(0,l.useState)(""),[Z,C]=(0,l.useState)(!1),[S,_]=(0,l.useState)(null),[M,A]=(0,l.useState)(null),[P,T]=(0,l.useState)(null),[E,L]=(0,l.useState)(null),[O,R]=(0,l.useState)(""),[H,D]=(0,l.useState)(!1),[F,q]=(0,l.useState)(null);(0,l.useEffect)(()=>{U(),V()},[]);let U=async()=>{try{let e=await fetch("/api/config"),t=await e.json();t.success&&s(t.data)}catch(e){console.error("Failed to load config:",e)}finally{i(!1)}},V=async()=>{try{let e=await fetch("/api/license"),s=await e.json();s.success&&L(s.data)}catch(e){}},z=async()=>{if(O.trim()){D(!0),q(null);try{let e=await fetch("/api/license",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:O.trim()})}),s=await e.json();s.success?(q({type:"success",text:s.data.message}),L(s.data),R("")):q({type:"error",text:s.error||"Activation failed"})}catch(e){q({type:"error",text:"Failed to activate license"})}finally{D(!1),setTimeout(()=>q(null),5e3)}}},K=async()=>{if(e){g(!0),v(null);try{(await fetch("/api/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok?v({type:"success",text:"Settings saved successfully"}):v({type:"error",text:"Failed to save settings"})}catch(e){v({type:"error",text:"Failed to save settings"})}finally{g(!1),setTimeout(()=>v(null),3e3)}}},B=(t,a,l)=>{if(!e)return;let n=[...e.repos];n[t]={...n[t],[a]:l},s({...e,repos:n})},I=t=>{if(!e)return;let a=e.repos.filter((e,s)=>s!==t);s({...e,repos:a})},J=async()=>{if(k.trim()){C(!0),_(null),A(null),T(null);try{let e=await fetch("/api/config/detect-repos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rootDir:k.trim()})}),s=await e.json();if(!s.success){T(s.error||"Scan failed");return}_(s.data.repos),s.data.warning&&A(s.data.warning)}catch(e){T("Failed to scan directory")}finally{C(!1)}}},G=t=>{if(!e)return;let a=new Set(e.repos.map(e=>e.path)),l=t.filter(e=>!a.has(e.path)).map(e=>({name:e.name,path:e.path,type:e.type,default_branch:"main"}));s({...e,repos:[...e.repos,...l]}),_(null),A(null)},W=t=>{e&&(s({...e,repos:t.map(e=>({name:e.name,path:e.path,type:e.type,default_branch:"main"}))}),_(null),A(null))},X=(t,a,l)=>{if(!e)return;let n={...e.schedules};"focus"===a?n[t]={...n[t],focus:l.split(",").map(e=>e.trim())}:"max_ideas"===a&&(n[t]={...n[t],max_ideas:l}),s({...e,schedules:n})};return t?(0,a.jsx)(f.default,{children:(0,a.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,a.jsx)(n.Z,{className:"w-8 h-8 text-slate-400 animate-spin"})})}):e?(0,a.jsx)(f.default,{children:(0,a.jsxs)("div",{className:"p-6 max-w-4xl",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between mb-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-slate-900",children:"Settings"}),(0,a.jsx)("p",{className:"text-slate-500 mt-1",children:"Configure analysis settings and repositories"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("button",{onClick:U,className:"btn btn-secondary gap-2",disabled:t,children:[(0,a.jsx)(r.Z,{className:(0,j.Z)("w-4 h-4",t&&"animate-spin")}),"Reload"]}),(0,a.jsxs)("button",{onClick:K,className:"btn btn-primary gap-2",disabled:y,children:[y?(0,a.jsx)(n.Z,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(c,{className:"w-4 h-4"}),"Save Changes"]})]})]}),N&&(0,a.jsx)("div",{className:(0,j.Z)("mb-6 p-4 rounded-lg border animate-slide-in","success"===N.type?"bg-emerald-50 border-emerald-200 text-emerald-700":"bg-red-50 border-red-200 text-red-700"),children:N.text}),(0,a.jsxs)("section",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6 mb-6",children:[(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-lg font-semibold text-slate-900 mb-4",children:[(0,a.jsx)(d,{className:"w-5 h-5"}),"Implementation Workspace"]}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mb-4",children:"Directory where the analyst clones repositories for implementation work (separate from your working copies)."}),(0,a.jsx)("input",{type:"text",value:e.workspace_dir||"",onChange:t=>s({...e,workspace_dir:t.target.value}),className:"input font-mono text-sm",placeholder:"/Users/you/Code/analyst-workspaces"})]}),(0,a.jsxs)("section",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6 mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-lg font-semibold text-slate-900",children:[(0,a.jsx)(d,{className:"w-5 h-5"}),"Repositories"]}),(0,a.jsxs)("button",{onClick:()=>{e&&s({...e,repos:[...e.repos,{name:"",path:"",type:"nodejs",default_branch:"main"}]})},className:"btn btn-secondary gap-2 text-sm",children:[(0,a.jsx)(o.Z,{className:"w-4 h-4"}),"Add Repository"]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[e.repos.map((e,s)=>(0,a.jsxs)("div",{className:"p-4 bg-slate-50 rounded-lg space-y-3 relative group",children:[(0,a.jsx)("button",{onClick:()=>I(s),className:"absolute top-3 right-3 p-1.5 text-slate-400 hover:text-red-500 hover:bg-red-50 rounded transition-colors",title:"Remove repository",children:(0,a.jsx)(m.Z,{className:"w-4 h-4"})}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-4 pr-10",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Name"}),(0,a.jsx)("input",{type:"text",value:e.name,onChange:e=>B(s,"name",e.target.value),className:"input",placeholder:"my-repo"})]}),(0,a.jsxs)("div",{className:"col-span-2",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Local Path (for analysis)"}),(0,a.jsx)("input",{type:"text",value:e.path,onChange:e=>B(s,"path",e.target.value),className:"input font-mono text-sm",placeholder:"/Users/you/Code/my-repo"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-4 gap-4 pr-10",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Type"}),(0,a.jsx)("input",{type:"text",value:e.type||"",onChange:e=>B(s,"type",e.target.value),className:"input text-sm",placeholder:"nextjs"})]}),(0,a.jsxs)("div",{className:"col-span-2",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"GitHub URL (for cloning to workspace)"}),(0,a.jsx)("input",{type:"text",value:e.github_url||"",onChange:e=>B(s,"github_url",e.target.value),className:"input font-mono text-sm",placeholder:"git@github.com:user/repo.git"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Default Branch"}),(0,a.jsx)("input",{type:"text",value:e.default_branch||"main",onChange:e=>B(s,"default_branch",e.target.value),className:"input",placeholder:"main"})]})]})]},s)),0===e.repos.length&&(0,a.jsx)("div",{className:"text-center py-8 text-slate-400",children:"No repositories configured. Add one manually or scan a directory below."})]}),(0,a.jsxs)("div",{className:"mt-6 pt-6 border-t border-slate-200",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-slate-700 mb-2",children:"Scan Directory"}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mb-3",children:"Auto-detect repositories in a directory."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:k,onChange:e=>w(e.target.value),className:"input font-mono text-sm flex-1",placeholder:"/Users/you/Code/my-project",onKeyDown:e=>"Enter"===e.key&&J()}),(0,a.jsxs)("button",{onClick:J,className:"btn btn-secondary gap-2 text-sm whitespace-nowrap",disabled:Z||!k.trim(),children:[Z?(0,a.jsx)(n.Z,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(x.Z,{className:"w-4 h-4"}),"Scan"]})]}),P&&(0,a.jsx)("div",{className:"mt-3 p-3 bg-red-50 border border-red-200 rounded-lg text-sm text-red-700",children:P}),M&&(0,a.jsx)("div",{className:"mt-3 p-3 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-700",children:M}),S&&(0,a.jsx)("div",{className:"mt-3",children:0===S.length?(0,a.jsx)("div",{className:"p-3 bg-slate-50 rounded-lg text-sm text-slate-500",children:"No repositories detected in that directory."}):(0,a.jsxs)("div",{className:"p-4 bg-slate-50 rounded-lg space-y-3",children:[(0,a.jsxs)("div",{className:"text-sm font-medium text-slate-700",children:["Found ",S.length," repo",1!==S.length?"s":"",":"]}),(0,a.jsx)("div",{className:"space-y-1",children:S.map((e,s)=>(0,a.jsxs)("div",{className:"flex items-center gap-3 text-sm",children:[(0,a.jsx)("span",{className:(0,j.Z)("inline-block w-2 h-2 rounded-full","high"===e.confidence?"bg-emerald-500":"bg-amber-500")}),(0,a.jsx)("span",{className:"font-medium text-slate-900",children:e.name}),(0,a.jsxs)("span",{className:"text-slate-500",children:["(",e.type,")"]}),(0,a.jsx)("span",{className:"text-slate-400 font-mono text-xs truncate",children:e.path})]},s))}),(0,a.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,a.jsx)("button",{onClick:()=>G(S),className:"btn btn-secondary text-sm",children:"Add to existing"}),(0,a.jsx)("button",{onClick:()=>W(S),className:"btn btn-secondary text-sm text-red-600 hover:text-red-700",children:"Replace all"}),(0,a.jsx)("button",{onClick:()=>{_(null),A(null)},className:"btn btn-secondary text-sm",children:"Dismiss"})]})]})})]})]}),(0,a.jsxs)("section",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:[(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-lg font-semibold text-slate-900 mb-4",children:[(0,a.jsx)(h.Z,{className:"w-5 h-5"}),"Analysis Schedules"]}),(0,a.jsx)("div",{className:"space-y-6",children:Object.keys(e.schedules).map(s=>(0,a.jsxs)("div",{className:"p-4 bg-slate-50 rounded-lg",children:[(0,a.jsxs)("h3",{className:"font-medium text-slate-900 mb-3 capitalize",children:[s," Analysis"]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Focus Areas (comma-separated)"}),(0,a.jsx)("input",{type:"text",value:e.schedules[s].focus.join(", "),onChange:e=>X(s,"focus",e.target.value),className:"input"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Max Ideas"}),(0,a.jsx)("input",{type:"number",value:e.schedules[s].max_ideas,onChange:e=>X(s,"max_ideas",parseInt(e.target.value,10)),className:"input",min:1,max:50})]})]})]},s))})]}),(0,a.jsxs)("section",{className:"mt-6 p-4 bg-slate-100 rounded-lg",children:[(0,a.jsx)("h3",{className:"font-medium text-slate-700 mb-2",children:"Cron Setup"}),(0,a.jsx)("p",{className:"text-sm text-slate-600 mb-2",children:"To enable automated analysis, run the setup script:"}),(0,a.jsx)("pre",{className:"bg-slate-800 text-slate-100 p-3 rounded text-sm font-mono overflow-x-auto",children:"./scripts/setup-cron.sh"})]}),(0,a.jsxs)("section",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6 mt-6",children:[(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-lg font-semibold text-slate-900 mb-4",children:[(0,a.jsx)(u,{className:"w-5 h-5"}),"Subscription & Billing"]}),E?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"p-4 bg-slate-50 rounded-lg",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-500 mb-1",children:"Plan"}),(0,a.jsx)("p",{className:"text-sm font-semibold text-slate-900 capitalize",children:E.tier})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-500 mb-1",children:"Status"}),(0,a.jsx)("span",{className:(0,j.Z)("inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium","valid"===E.status&&"bg-emerald-100 text-emerald-700","trial"===E.status&&"bg-blue-100 text-blue-700","expired"===E.status&&"bg-red-100 text-red-700",(!E.status||"unknown"===E.status)&&"bg-slate-100 text-slate-600"),children:E.status})]}),E.keyMasked&&"(trial)"!==E.keyMasked&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-500 mb-1",children:"License Key"}),(0,a.jsx)("p",{className:"text-sm font-mono text-slate-700",children:E.keyMasked})]}),E.email&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-500 mb-1",children:"Email"}),(0,a.jsx)("p",{className:"text-sm text-slate-700",children:E.email})]})]}),(0,a.jsx)("p",{className:"text-xs text-slate-500 mt-3",children:E.message})]}),(0,a.jsxs)("a",{href:"https://vibebusiness.com/pricing",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm text-emerald-600 hover:text-emerald-700 font-medium",children:[(0,a.jsx)(p.Z,{className:"w-3.5 h-3.5"}),"Manage Subscription"]})]}):(0,a.jsxs)("p",{className:"text-sm text-slate-500",children:["License information unavailable. Run ",(0,a.jsx)("code",{className:"text-xs bg-slate-100 px-1.5 py-0.5 rounded",children:"vibebusiness init"})," to set up."]}),(0,a.jsxs)("div",{className:"mt-6 pt-6 border-t border-slate-200",children:[(0,a.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-slate-700 mb-2",children:[(0,a.jsx)(b,{className:"w-4 h-4"}),"Enter License Key"]}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mb-3",children:"Activate a license key purchased from vibebusiness.com."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:O,onChange:e=>R(e.target.value),className:"input font-mono text-sm flex-1",placeholder:"PRO-xxxxxxxxxxxx",onKeyDown:e=>"Enter"===e.key&&z()}),(0,a.jsxs)("button",{onClick:z,className:"btn btn-primary gap-2 text-sm whitespace-nowrap",disabled:H||!O.trim(),children:[H?(0,a.jsx)(n.Z,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(b,{className:"w-4 h-4"}),"Activate"]})]}),F&&(0,a.jsx)("div",{className:(0,j.Z)("mt-3 p-3 rounded-lg text-sm","success"===F.type?"bg-emerald-50 border border-emerald-200 text-emerald-700":"bg-red-50 border border-red-200 text-red-700"),children:F.text})]})]})]})}):(0,a.jsx)(f.default,{children:(0,a.jsx)("div",{className:"p-6",children:(0,a.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-red-700",children:"Failed to load configuration. Please check that data/config.json exists."})})})}},1259:function(e,s,t){"use strict";t.d(s,{default:function(){return j}});var a=t(7437),l=t(7648),n=t(9376),r=t(5466),i=t(2048),c=t(8896),d=t(8220),o=t(2718),m=t(5621),x=t(8728),h=t(2222),u=t(2023),p=t(1994),b=t(257);let f=[{href:"/",label:"Dashboard",icon:(0,a.jsx)(r.Z,{className:"w-5 h-5"})},{href:"/roadmap",label:"Roadmap",icon:(0,a.jsx)(i.Z,{className:"w-5 h-5"})},{href:"/goals",label:"Goals",icon:(0,a.jsx)(c.Z,{className:"w-5 h-5"})},{href:"/hypotheses",label:"Hypotheses",icon:(0,a.jsx)(d.Z,{className:"w-5 h-5"})},{href:"/social",label:"Social",icon:(0,a.jsx)(o.Z,{className:"w-5 h-5"})},{href:"/sessions",label:"Sessions",icon:(0,a.jsx)(m.Z,{className:"w-5 h-5"})},{href:"/settings",label:"Settings",icon:(0,a.jsx)(x.Z,{className:"w-5 h-5"})}];function j(e){let{children:s}=e,t=(0,n.usePathname)();return(0,a.jsxs)("div",{className:"min-h-screen flex",children:[(0,a.jsxs)("aside",{className:"w-64 bg-slate-900 text-white flex flex-col",children:[(0,a.jsx)("div",{className:"p-4 border-b border-slate-700",children:(0,a.jsxs)(l.default,{href:"/",className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-emerald-500 rounded-lg flex items-center justify-center",children:(0,a.jsx)(h.Z,{className:"w-6 h-6 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"font-bold text-lg leading-tight",children:"Analyst"}),(0,a.jsx)("p",{className:"text-xs text-slate-400",children:b.env.NEXT_PUBLIC_PRODUCT_NAME||"Business"})]})]})}),(0,a.jsx)("nav",{className:"flex-1 p-4",children:(0,a.jsx)("ul",{className:"space-y-1",children:f.map(e=>{let s="/"===e.href?"/"===t:t.startsWith(e.href);return(0,a.jsx)("li",{children:(0,a.jsxs)(l.default,{href:e.href,className:(0,p.Z)("flex items-center gap-3 px-3 py-2 rounded-lg transition-colors",s?"bg-slate-800 text-white":"text-slate-400 hover:text-white hover:bg-slate-800"),children:[e.icon,(0,a.jsx)("span",{children:e.label})]})},e.href)})})}),(0,a.jsx)("div",{className:"p-4 border-t border-slate-700",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[(0,a.jsx)(u.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Powered by Claude"})]})})]}),(0,a.jsx)("main",{className:"flex-1 overflow-auto",children:s})]})}}},function(e){e.O(0,[746,971,117,744],function(){return e(e.s=8645)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[674],{337:function(e,t,s){Promise.resolve().then(s.bind(s,2612))},401:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},9322:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},6362:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},9397:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},7168:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},4743:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]])},8930:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},2489:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},2612:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return v}});var a=s(7437),r=s(2265),n=s(9397),l=s(7168),i=s(9322),d=s(9205);let c=(0,d.Z)("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);var o=s(4743),x=s(1259),u=s(2489),m=s(401),h=s(6362);let b=(0,d.Z)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);var p=s(8930),g=s(1994),f=s(6153);function j(e){let{draft:t,onPublish:s,onEdit:n,onDiscard:l}=e,[i,d]=(0,r.useState)(!1),[c,x]=(0,r.useState)(t.text),[j,v]=(0,r.useState)(!1),y=i?c.length:t.text.length,N=y>280,w="draft"===t.status;async function k(){v(!0);try{await s(t.id)}finally{v(!1)}}async function _(){if(!N&&c.trim()){v(!0);try{await n(t.id,c),d(!1)}finally{v(!1)}}}async function Z(){v(!0);try{await l(t.id)}finally{v(!1)}}return(0,a.jsxs)("div",{className:(0,g.Z)("border rounded-lg p-4 transition-colors",w?"bg-white border-slate-200":"bg-slate-50 border-slate-100"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("span",{className:(0,g.Z)("text-xs px-2 py-0.5 rounded-full font-medium",f.Q_[t.source]),children:f.PN[t.source]}),(0,a.jsx)("span",{className:"text-xs text-slate-400",children:new Date(t.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]}),i?(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("textarea",{value:c,onChange:e=>x(e.target.value),className:"w-full border border-slate-300 rounded-md p-3 text-sm resize-none focus:outline-none focus:ring-2 focus:ring-blue-500",rows:4,maxLength:300}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-1",children:[(0,a.jsxs)("span",{className:(0,g.Z)("text-xs",N?"text-red-500 font-medium":"text-slate-400"),children:[y,"/280"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{onClick:()=>{d(!1),x(t.text)},className:"text-xs text-slate-500 hover:text-slate-700 flex items-center gap-1",disabled:j,children:[(0,a.jsx)(u.Z,{className:"w-3 h-3"})," Cancel"]}),(0,a.jsxs)("button",{onClick:_,className:"text-xs text-blue-600 hover:text-blue-800 flex items-center gap-1 disabled:opacity-50",disabled:j||N||!c.trim(),children:[(0,a.jsx)(m.Z,{className:"w-3 h-3"})," Save"]})]})]})]}):(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("p",{className:"text-sm text-slate-800 whitespace-pre-wrap leading-relaxed",children:t.text}),w&&(0,a.jsx)("div",{className:"mt-1",children:(0,a.jsxs)("span",{className:(0,g.Z)("text-xs",y>260?"text-amber-500":"text-slate-400"),children:[y,"/280"]})})]}),"published"===t.status&&t.tweet_url&&(0,a.jsxs)("a",{href:t.tweet_url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-500 hover:text-blue-700 flex items-center gap-1 mb-3",children:[(0,a.jsx)(h.Z,{className:"w-3 h-3"}),"View on X"]}),w&&!i&&(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-3 border-t border-slate-100",children:[(0,a.jsxs)("button",{onClick:k,className:"flex items-center gap-1.5 px-3 py-1.5 bg-slate-900 text-white text-xs rounded-md hover:bg-slate-800 disabled:opacity-50 transition-colors",disabled:j,children:[(0,a.jsx)(o.Z,{className:"w-3 h-3"}),j?"Publishing...":"Publish"]}),(0,a.jsxs)("button",{onClick:()=>d(!0),className:"flex items-center gap-1.5 px-3 py-1.5 border border-slate-200 text-slate-600 text-xs rounded-md hover:bg-slate-50 disabled:opacity-50 transition-colors",disabled:j,children:[(0,a.jsx)(b,{className:"w-3 h-3"}),"Edit"]}),(0,a.jsxs)("button",{onClick:Z,className:"flex items-center gap-1.5 px-3 py-1.5 text-red-500 text-xs rounded-md hover:bg-red-50 disabled:opacity-50 transition-colors ml-auto",disabled:j,children:[(0,a.jsx)(p.Z,{className:"w-3 h-3"}),"Discard"]})]})]})}function v(){var e;let[t,s]=(0,r.useState)(null),[d,u]=(0,r.useState)(!0),[m,h]=(0,r.useState)(null),[b,p]=(0,r.useState)(!1),[g,f]=(0,r.useState)(""),[v,y]=(0,r.useState)(!1),N=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/social"),t=await e.json();t.success?(s(t.data),h(null)):h(t.error||"Failed to load social data")}catch(e){h("Failed to connect to server")}finally{u(!1)}},[]);async function w(e){let t=await fetch("/api/social/".concat(e,"/publish"),{method:"POST"}),s=await t.json();if(!s.success){alert(s.error||"Failed to publish");return}await N()}async function k(e,t){let s=await fetch("/api/social/".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:t})}),a=await s.json();if(!a.success){alert(a.error||"Failed to update");return}await N()}async function _(e){let t=await fetch("/api/social/".concat(e),{method:"DELETE"}),s=await t.json();if(!s.success){alert(s.error||"Failed to discard");return}await N()}async function Z(){if(g.trim()&&!(g.length>280)){y(!0);try{let e=await fetch("/api/social",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:g})}),t=await e.json();t.success?(f(""),p(!1),await N()):alert(t.error||"Failed to create draft")}finally{y(!1)}}}(0,r.useEffect)(()=>{N()},[N]);let C=(null==t?void 0:t.drafts.filter(e=>"draft"===e.status))||[],S=(null==t?void 0:t.drafts.filter(e=>"published"===e.status).sort((e,t)=>(t.published_at||"").localeCompare(e.published_at||"")))||[];return(0,a.jsx)(x.default,{children:(0,a.jsxs)("div",{className:"p-6 max-w-3xl mx-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-slate-900",children:"Social Media"}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-1",children:"Review and publish tweet drafts for your build-in-public journey."})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("button",{onClick:()=>p(!0),className:"flex items-center gap-1.5 px-3 py-2 bg-slate-900 text-white text-sm rounded-lg hover:bg-slate-800 transition-colors",children:[(0,a.jsx)(n.Z,{className:"w-4 h-4"}),"New Draft"]}),(0,a.jsx)("button",{onClick:()=>{u(!0),N()},className:"p-2 text-slate-400 hover:text-slate-600 transition-colors",title:"Refresh",children:(0,a.jsx)(l.Z,{className:"w-4 h-4 ".concat(d?"animate-spin":"")})})]})]}),t&&!t.metrics.credentials_valid&&(0,a.jsxs)("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg flex items-start gap-3",children:[(0,a.jsx)(i.Z,{className:"w-5 h-5 text-amber-500 mt-0.5 flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-amber-800",children:"X/Twitter not connected"}),(0,a.jsxs)("p",{className:"text-xs text-amber-600 mt-1",children:["Add X_API_KEY, X_API_SECRET, X_ACCESS_TOKEN, and X_ACCESS_SECRET to your .env file, then run the ",(0,a.jsx)("code",{className:"bg-amber-100 px-1 rounded",children:"social-setup-x"})," task."]})]})]}),t&&t.metrics.credentials_valid&&(0,a.jsxs)("div",{className:"mb-6 grid grid-cols-4 gap-4",children:[(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Account"}),(0,a.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:t.metrics.username||"—"})]}),(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Followers"}),(0,a.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:null!==(e=t.metrics.followers_count)&&void 0!==e?e:"—"})]}),(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsxs)("p",{className:"text-xs text-slate-500 flex items-center justify-center gap-1",children:[(0,a.jsx)(c,{className:"w-3 h-3"})," Streak"]}),(0,a.jsxs)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:[t.metrics.post_streak_days," day",1!==t.metrics.post_streak_days?"s":""]})]}),(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Total Posts"}),(0,a.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:t.metrics.total_posts})]})]}),b&&(0,a.jsxs)("div",{className:"mb-6 bg-white border border-slate-200 rounded-lg p-4",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-slate-900 mb-2",children:"Compose Tweet"}),(0,a.jsx)("textarea",{value:g,onChange:e=>f(e.target.value),className:"w-full border border-slate-300 rounded-md p-3 text-sm resize-none focus:outline-none focus:ring-2 focus:ring-blue-500",rows:4,placeholder:"What's happening with your product?",maxLength:300,autoFocus:!0}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,a.jsxs)("span",{className:"text-xs ".concat(g.length>280?"text-red-500 font-medium":"text-slate-400"),children:[g.length,"/280"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:()=>{p(!1),f("")},className:"px-3 py-1.5 text-sm text-slate-500 hover:text-slate-700",children:"Cancel"}),(0,a.jsxs)("button",{onClick:Z,className:"flex items-center gap-1.5 px-3 py-1.5 bg-slate-900 text-white text-sm rounded-md hover:bg-slate-800 disabled:opacity-50 transition-colors",disabled:v||!g.trim()||g.length>280,children:[(0,a.jsx)(o.Z,{className:"w-3 h-3"}),"Save Draft"]})]})]})]}),d&&!t&&(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)(l.Z,{className:"w-6 h-6 animate-spin text-slate-400 mx-auto"}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-2",children:"Loading drafts..."})]}),m&&(0,a.jsx)("div",{className:"text-center py-12",children:(0,a.jsx)("p",{className:"text-sm text-red-500",children:m})}),t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold text-slate-900",children:["Drafts (",C.length,")"]})}),0===C.length?(0,a.jsx)("div",{className:"text-center py-8 bg-slate-50 rounded-lg border border-dashed border-slate-200",children:(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"No pending drafts. The heartbeat will generate drafts as you ship features and hit milestones."})}):(0,a.jsx)("div",{className:"space-y-3 mb-8",children:C.map(e=>(0,a.jsx)(j,{draft:e,onPublish:w,onEdit:k,onDiscard:_},e.id))}),S.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4 mt-8",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold text-slate-900",children:["Published (",S.length,")"]})}),(0,a.jsx)("div",{className:"space-y-3",children:S.map(e=>(0,a.jsx)(j,{draft:e,onPublish:w,onEdit:k,onDiscard:_},e.id))})]})]})]})})}},1259:function(e,t,s){"use strict";s.d(t,{default:function(){return f}});var a=s(7437),r=s(7648),n=s(9376),l=s(5466),i=s(2048),d=s(8896),c=s(8220),o=s(2718),x=s(5621),u=s(8728),m=s(2222),h=s(2023),b=s(1994),p=s(257);let g=[{href:"/",label:"Dashboard",icon:(0,a.jsx)(l.Z,{className:"w-5 h-5"})},{href:"/roadmap",label:"Roadmap",icon:(0,a.jsx)(i.Z,{className:"w-5 h-5"})},{href:"/goals",label:"Goals",icon:(0,a.jsx)(d.Z,{className:"w-5 h-5"})},{href:"/hypotheses",label:"Hypotheses",icon:(0,a.jsx)(c.Z,{className:"w-5 h-5"})},{href:"/social",label:"Social",icon:(0,a.jsx)(o.Z,{className:"w-5 h-5"})},{href:"/sessions",label:"Sessions",icon:(0,a.jsx)(x.Z,{className:"w-5 h-5"})},{href:"/settings",label:"Settings",icon:(0,a.jsx)(u.Z,{className:"w-5 h-5"})}];function f(e){let{children:t}=e,s=(0,n.usePathname)();return(0,a.jsxs)("div",{className:"min-h-screen flex",children:[(0,a.jsxs)("aside",{className:"w-64 bg-slate-900 text-white flex flex-col",children:[(0,a.jsx)("div",{className:"p-4 border-b border-slate-700",children:(0,a.jsxs)(r.default,{href:"/",className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-emerald-500 rounded-lg flex items-center justify-center",children:(0,a.jsx)(m.Z,{className:"w-6 h-6 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"font-bold text-lg leading-tight",children:"Analyst"}),(0,a.jsx)("p",{className:"text-xs text-slate-400",children:p.env.NEXT_PUBLIC_PRODUCT_NAME||"Business"})]})]})}),(0,a.jsx)("nav",{className:"flex-1 p-4",children:(0,a.jsx)("ul",{className:"space-y-1",children:g.map(e=>{let t="/"===e.href?"/"===s:s.startsWith(e.href);return(0,a.jsx)("li",{children:(0,a.jsxs)(r.default,{href:e.href,className:(0,b.Z)("flex items-center gap-3 px-3 py-2 rounded-lg transition-colors",t?"bg-slate-800 text-white":"text-slate-400 hover:text-white hover:bg-slate-800"),children:[e.icon,(0,a.jsx)("span",{children:e.label})]})},e.href)})})}),(0,a.jsx)("div",{className:"p-4 border-t border-slate-700",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[(0,a.jsx)(h.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Powered by Claude"})]})})]}),(0,a.jsx)("main",{className:"flex-1 overflow-auto",children:t})]})}},6153:function(e,t,s){"use strict";s.d(t,{G:function(){return i},GK:function(){return _},Gs:function(){return o},Hs:function(){return a},PN:function(){return h},PW:function(){return w},Q_:function(){return b},R$:function(){return y},Vr:function(){return x},Wb:function(){return m},aR:function(){return u},bi:function(){return d},en:function(){return v},i2:function(){return j},kT:function(){return p},l5:function(){return g},lE:function(){return N},lv:function(){return l},pG:function(){return r},rF:function(){return c},tV:function(){return f},tl:function(){return k},xP:function(){return Z},yb:function(){return n}});let a={product:"Product",ux_design:"UX/Design",growth:"Growth",performance:"Performance",tech_debt:"Tech Debt",security:"Security",infrastructure:"Infrastructure",content:"Content",analytics:"Analytics",integration:"Integration"},r={product:"bg-blue-100 text-blue-800",ux_design:"bg-purple-100 text-purple-800",growth:"bg-green-100 text-green-800",performance:"bg-orange-100 text-orange-800",tech_debt:"bg-yellow-100 text-yellow-800",security:"bg-red-100 text-red-800",infrastructure:"bg-gray-100 text-gray-800",content:"bg-pink-100 text-pink-800",analytics:"bg-cyan-100 text-cyan-800",integration:"bg-indigo-100 text-indigo-800"},n={inbox:"Inbox",under_review:"Under Review",approved:"Approved",in_progress:"In Progress",testing:"Testing",shipped:"Shipped",deferred:"Deferred",rejected:"Rejected",rolled_back:"Rolled Back"},l={inbox:"bg-amber-500",under_review:"bg-blue-500",approved:"bg-emerald-500",in_progress:"bg-violet-500",testing:"bg-cyan-500",shipped:"bg-green-500",deferred:"bg-gray-500",rejected:"bg-red-500",rolled_back:"bg-orange-500"},i=["inbox","under_review","approved","in_progress","testing","shipped"],d={xs:"XS",s:"S",m:"M",l:"L",xl:"XL"},c={critical:"Critical",high:"High",medium:"Medium",low:"Low"},o={critical:"bg-red-100 text-red-800 border-red-300",high:"bg-orange-100 text-orange-800 border-orange-300",medium:"bg-yellow-100 text-yellow-800 border-yellow-300",low:"bg-gray-100 text-gray-800 border-gray-300"},x={codebase_analysis:"Codebase Analysis",metrics_review:"Metrics Review",market_research:"Market Research",seo_audit:"SEO Audit",manual:"Manual"},u={pending:"bg-slate-100 text-slate-700",validated:"bg-emerald-100 text-emerald-800",needs_investigation:"bg-amber-100 text-amber-800",inconclusive:"bg-slate-100 text-slate-600",invalidated:"bg-red-100 text-red-800"},m={pending:"Pending",validated:"Validated",needs_investigation:"Needs Investigation",inconclusive:"Inconclusive",invalidated:"Invalidated"},h={ship:"Ship",update:"Update",milestone:"Milestone",digest:"Digest",manual:"Manual"},b={ship:"bg-green-100 text-green-800",update:"bg-blue-100 text-blue-800",milestone:"bg-amber-100 text-amber-800",digest:"bg-purple-100 text-purple-800",manual:"bg-slate-100 text-slate-800"},p={acquisition:"Acquisition",activation:"Activation",retention:"Retention",revenue:"Revenue",referral:"Referral"},g={acquisition:"bg-blue-100 text-blue-800",activation:"bg-emerald-100 text-emerald-800",retention:"bg-purple-100 text-purple-800",revenue:"bg-amber-100 text-amber-800",referral:"bg-pink-100 text-pink-800"},f={on_track:"On Track",at_risk:"At Risk",behind:"Behind",achieved:"Achieved"},j={on_track:"bg-emerald-100 text-emerald-800 border-emerald-300",at_risk:"bg-amber-100 text-amber-800 border-amber-300",behind:"bg-red-100 text-red-800 border-red-300",achieved:"bg-blue-100 text-blue-800 border-blue-300"},v={manual:"Manual",rest_api:"REST API",posthog:"PostHog",firestore:"Firestore",stripe:"Stripe",whatsapp:"WhatsApp"},y={stated:"Stated",testing:"Testing",validated:"Validated",invalidated:"Invalidated",deferred:"Deferred"},N={stated:"bg-slate-100 text-slate-800 border-slate-300",testing:"bg-amber-100 text-amber-800 border-amber-300",validated:"bg-emerald-100 text-emerald-800 border-emerald-300",invalidated:"bg-red-100 text-red-800 border-red-300",deferred:"bg-slate-100 text-slate-500 border-slate-200"},w={acquisition:"Acquisition",engagement:"Engagement",conversion:"Conversion",monetization:"Monetization"},k={acquisition:"bg-blue-100 text-blue-800",engagement:"bg-purple-100 text-purple-800",conversion:"bg-amber-100 text-amber-800",monetization:"bg-emerald-100 text-emerald-800"},_={planned:"Planned",active:"Active",completed:"Completed",paused:"Paused"},Z={planned:"bg-slate-100 text-slate-700 border-slate-300",active:"bg-blue-100 text-blue-800 border-blue-300",completed:"bg-emerald-100 text-emerald-800 border-emerald-300",paused:"bg-amber-100 text-amber-800 border-amber-300"}}},function(e){e.O(0,[746,971,117,744],function(){return e(e.s=337)}),_N_E=e.O()}]);