cortex-react-components 2.13.2 → 2.13.4

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 (205) hide show
  1. package/dist/{chunk-RGOKBIQ5.mjs → chunk-255P6K5W.mjs} +1 -1
  2. package/dist/{chunk-6R6NYDWN.mjs → chunk-2HWSTGAP.mjs} +1 -1
  3. package/dist/chunk-2IMVYO7X.mjs +1 -0
  4. package/dist/{chunk-GTZJWMZR.mjs → chunk-2RQDJ5XT.mjs} +1 -1
  5. package/dist/chunk-5N4WW7O2.mjs +1 -0
  6. package/dist/{chunk-75F3LJMX.mjs → chunk-5SHZBJ5R.mjs} +1 -1
  7. package/dist/{chunk-EM3T2XYC.mjs → chunk-5WVFEIMC.mjs} +1 -1
  8. package/dist/{chunk-ZEALRBXW.mjs → chunk-62A35O55.mjs} +1 -1
  9. package/dist/{chunk-RJGYVDOU.mjs → chunk-67QPOSVV.mjs} +1 -1
  10. package/dist/chunk-6BQNN2KT.mjs +1 -0
  11. package/dist/chunk-6NED7ZVK.mjs +1 -0
  12. package/dist/{chunk-CXOVEABI.mjs → chunk-7GMAMIHM.mjs} +1 -1
  13. package/dist/{chunk-E2OSUDXP.mjs → chunk-CBIULUZQ.mjs} +1 -1
  14. package/dist/{chunk-ITJH72Z2.mjs → chunk-CLGBBNRB.mjs} +1 -1
  15. package/dist/{chunk-5EQXJS23.mjs → chunk-DMCFEJ2C.mjs} +1 -1
  16. package/dist/chunk-DTIHVFME.mjs +4 -0
  17. package/dist/{chunk-POIHYOIP.mjs → chunk-E6UOMRHI.mjs} +1 -1
  18. package/dist/chunk-E6Y5COQK.mjs +1 -0
  19. package/dist/{chunk-WIRQ5IRT.mjs → chunk-ERJXTG6X.mjs} +1 -1
  20. package/dist/{chunk-3NRXQBBS.mjs → chunk-FKU4VQR6.mjs} +1 -1
  21. package/dist/{chunk-GHOL5L32.mjs → chunk-H3CJOE6S.mjs} +1 -1
  22. package/dist/{chunk-NINFDOV5.mjs → chunk-HKGW6JI2.mjs} +1 -1
  23. package/dist/{chunk-FE7ZGUPU.mjs → chunk-IF3425JX.mjs} +1 -1
  24. package/dist/chunk-KG7HG2VO.mjs +1 -0
  25. package/dist/{chunk-LJXTXROJ.mjs → chunk-LJOWXPWW.mjs} +1 -1
  26. package/dist/{chunk-AJQHGVZ5.mjs → chunk-LJQPLE4S.mjs} +1 -1
  27. package/dist/{chunk-3HNU2NYP.mjs → chunk-M7NV6EFH.mjs} +1 -1
  28. package/dist/{chunk-ZKSZJI4F.mjs → chunk-MLMDTZHL.mjs} +1 -1
  29. package/dist/{chunk-KIYBEYSU.mjs → chunk-MXCW6SOT.mjs} +1 -1
  30. package/dist/{chunk-2BRDNDUB.mjs → chunk-N3B3XNV3.mjs} +1 -1
  31. package/dist/chunk-NGX2VCHS.mjs +1 -0
  32. package/dist/{chunk-3Y7QG6VP.mjs → chunk-NWISIJFD.mjs} +1 -1
  33. package/dist/{chunk-5MWZTJYP.mjs → chunk-PK3OBSCB.mjs} +1 -1
  34. package/dist/{chunk-Q67RF7VO.mjs → chunk-QG4QCB5I.mjs} +1 -1
  35. package/dist/{chunk-A7SGFSI5.mjs → chunk-QSXEJ2NO.mjs} +1 -1
  36. package/dist/{chunk-KCEJXXM2.mjs → chunk-RVHCTANZ.mjs} +1 -1
  37. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  38. package/dist/{chunk-6MSM3CZ6.mjs → chunk-TL2RQFU5.mjs} +1 -1
  39. package/dist/{chunk-7FWAJQRH.mjs → chunk-TO7SVJIU.mjs} +1 -1
  40. package/dist/chunk-TOI73VEE.mjs +1 -0
  41. package/dist/{chunk-ZGQC6O62.mjs → chunk-UEBQJNVT.mjs} +1 -1
  42. package/dist/chunk-UVHMI3PU.mjs +1 -0
  43. package/dist/chunk-WSQHAE6Q.mjs +1 -0
  44. package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
  45. package/dist/{chunk-CR326IJ6.mjs → chunk-X3I4Y44O.mjs} +1 -1
  46. package/dist/{chunk-3AWUWWR4.mjs → chunk-XHXUT3LD.mjs} +1 -1
  47. package/dist/chunk-XNEPSYCO.mjs +1 -0
  48. package/dist/{chunk-C4RWEPVF.mjs → chunk-YKG4FNS4.mjs} +1 -1
  49. package/dist/{chunk-NSJPZJQF.mjs → chunk-YQW7SMYJ.mjs} +1 -1
  50. package/dist/{chunk-UXOUJ5YO.mjs → chunk-ZB7RDJRP.mjs} +1 -1
  51. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  52. package/dist/components/AdvancedComponents/index.mjs +1 -1
  53. package/dist/components/Blocks/Banner.mjs +1 -1
  54. package/dist/components/Blocks/CallToAction.mjs +1 -1
  55. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  56. package/dist/components/Blocks/Content.mjs +1 -1
  57. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  58. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  59. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  60. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  61. package/dist/components/Blocks/index.mjs +1 -1
  62. package/dist/components/CRM/index.mjs +1 -1
  63. package/dist/components/Cards/ContentCard.mjs +1 -1
  64. package/dist/components/Cards/FeatureCard.mjs +1 -1
  65. package/dist/components/Cards/index.mjs +1 -1
  66. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  67. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  68. package/dist/components/Chat/demo-tests.mjs +1 -1
  69. package/dist/components/Chat/demo.mjs +1 -1
  70. package/dist/components/Chat/example-usage.mjs +1 -1
  71. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  72. package/dist/components/Chat/index.mjs +1 -1
  73. package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
  74. package/dist/components/DeliveryLead/index.mjs +1 -1
  75. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  76. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  77. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  78. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  79. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  80. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  81. package/dist/components/DigitalColleagues/index.js +1 -1
  82. package/dist/components/DigitalColleagues/index.mjs +1 -1
  83. package/dist/components/Foundary/MainPage.mjs +1 -1
  84. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  85. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  86. package/dist/components/Foundary/Views/index.js +1 -1
  87. package/dist/components/Foundary/Views/index.mjs +1 -1
  88. package/dist/components/Foundary/{digital-colleague-clone.mjs → foundary-clone.mjs} +1 -1
  89. package/dist/components/Foundary/{DigitalColleageusLayout.d.ts → foundary-layout.d.ts} +3 -3
  90. package/dist/components/Foundary/foundary-layout.js +5 -0
  91. package/dist/components/Foundary/{DigitalColleageusLayout.mjs → foundary-layout.mjs} +1 -1
  92. package/dist/components/Foundary/{digital-colleague-options.mjs → foundary-options.mjs} +1 -1
  93. package/dist/components/Foundary/index.d.ts +3 -3
  94. package/dist/components/Foundary/index.js +1 -1
  95. package/dist/components/Foundary/index.mjs +1 -1
  96. package/dist/components/HeaderFooter/Header.mjs +1 -1
  97. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  98. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  99. package/dist/components/HeaderFooter/index.mjs +1 -1
  100. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  101. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  102. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  103. package/dist/components/Heros/PostHero/index.mjs +1 -1
  104. package/dist/components/Heros/RenderHero.mjs +1 -1
  105. package/dist/components/Heros/index.mjs +1 -1
  106. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  107. package/dist/components/Holidays/index.mjs +1 -1
  108. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  109. package/dist/components/Layouts/Print.mjs +1 -1
  110. package/dist/components/Layouts/SlideShow.mjs +1 -1
  111. package/dist/components/Layouts/index.mjs +1 -1
  112. package/dist/components/Payload/RichText/index.mjs +1 -1
  113. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  114. package/dist/components/Payload/index.mjs +1 -1
  115. package/dist/components/Projects/AddEpicModal.d.ts +1 -1
  116. package/dist/components/Projects/AddEpicModal.js +1 -1
  117. package/dist/components/Projects/AddEpicModal.mjs +1 -1
  118. package/dist/components/Projects/AddSprintModal.d.ts +1 -1
  119. package/dist/components/Projects/AddSprintModal.js +1 -1
  120. package/dist/components/Projects/AddSprintModal.mjs +1 -1
  121. package/dist/components/Projects/AddTaskModal.d.ts +2 -2
  122. package/dist/components/Projects/AddTaskModal.js +1 -1
  123. package/dist/components/Projects/AddTaskModal.mjs +1 -1
  124. package/dist/components/Projects/EpicsView.d.ts +1 -1
  125. package/dist/components/Projects/EpicsView.js +1 -1
  126. package/dist/components/Projects/EpicsView.mjs +1 -1
  127. package/dist/components/Projects/KanbanBoardView.d.ts +6 -4
  128. package/dist/components/Projects/KanbanBoardView.js +1 -1
  129. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  130. package/dist/components/Projects/PlanningView.d.ts +1 -1
  131. package/dist/components/Projects/PlanningView.js +1 -1
  132. package/dist/components/Projects/PlanningView.mjs +1 -1
  133. package/dist/components/Projects/ProjectPage.d.ts +1 -1
  134. package/dist/components/Projects/ProjectPage.js +1 -1
  135. package/dist/components/Projects/ProjectPage.mjs +1 -1
  136. package/dist/components/Projects/ProjectView.d.ts +1 -42
  137. package/dist/components/Projects/ProjectView.js +1 -1
  138. package/dist/components/Projects/ProjectView.mjs +1 -1
  139. package/dist/components/Projects/TaskCard.d.ts +2 -2
  140. package/dist/components/Projects/TaskCard.js +1 -1
  141. package/dist/components/Projects/TaskCard.mjs +1 -1
  142. package/dist/components/Projects/TaskDetailsModal.d.ts +1 -1
  143. package/dist/components/Projects/TaskDetailsModal.js +1 -1
  144. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  145. package/dist/components/Projects/TaskSidebar.d.ts +1 -1
  146. package/dist/components/Projects/TaskSidebar.js +1 -1
  147. package/dist/components/Projects/TaskSidebar.mjs +1 -1
  148. package/dist/components/Projects/TasksView.d.ts +1 -1
  149. package/dist/components/Projects/TasksView.js +1 -1
  150. package/dist/components/Projects/TasksView.mjs +1 -1
  151. package/dist/components/Projects/index.js +1 -1
  152. package/dist/components/Projects/index.mjs +1 -1
  153. package/dist/components/dc-temp/creative.mjs +1 -1
  154. package/dist/components/dc-temp/index.mjs +1 -1
  155. package/dist/components/index.js +12 -12
  156. package/dist/components/index.mjs +1 -1
  157. package/dist/components/ui/index.mjs +1 -1
  158. package/dist/index.js +17 -17
  159. package/dist/index.mjs +1 -1
  160. package/dist/metafile-cjs.json +1 -1
  161. package/dist/metafile-esm.json +1 -1
  162. package/dist/pages/Blog.mjs +1 -1
  163. package/dist/pages/Documentation.mjs +1 -1
  164. package/dist/pages/IndexPage.mjs +1 -1
  165. package/dist/pages/Intranet.mjs +1 -1
  166. package/dist/pages/LandingPage.mjs +1 -1
  167. package/dist/pages/Page.mjs +1 -1
  168. package/dist/pages/Publish.mjs +1 -1
  169. package/dist/pages/Website.mjs +1 -1
  170. package/dist/sections/AboutSection.mjs +1 -1
  171. package/dist/sections/BlogDetail.mjs +1 -1
  172. package/dist/sections/BlogList.mjs +1 -1
  173. package/dist/sections/ContactSection.mjs +1 -1
  174. package/dist/sections/PageSections.mjs +1 -1
  175. package/dist/sections/PricingSection.mjs +1 -1
  176. package/dist/sections/ServiceDetail.mjs +1 -1
  177. package/dist/sections/ServiceDetailSection.mjs +1 -1
  178. package/dist/sections/ServiceSection.mjs +1 -1
  179. package/dist/sections/form/index.mjs +1 -1
  180. package/dist/sections/index.mjs +1 -1
  181. package/dist/utils/extract-id.d.ts +1 -0
  182. package/dist/utils/extract-id.js +1 -0
  183. package/dist/utils/extract-id.mjs +1 -0
  184. package/package.json +1 -1
  185. package/dist/chunk-2C4UDLVF.mjs +0 -1
  186. package/dist/chunk-4A3MGS6I.mjs +0 -1
  187. package/dist/chunk-4HHGVL3E.mjs +0 -1
  188. package/dist/chunk-6DEY5ZDD.mjs +0 -1
  189. package/dist/chunk-6TUNKKV7.mjs +0 -1
  190. package/dist/chunk-GGJZVAC4.mjs +0 -4
  191. package/dist/chunk-KW6L6KBY.mjs +0 -1
  192. package/dist/chunk-MBPTBEOX.mjs +0 -1
  193. package/dist/chunk-NKDFAFWH.mjs +0 -1
  194. package/dist/chunk-O57JJTH5.mjs +0 -1
  195. package/dist/chunk-ORNGKQM7.mjs +0 -1
  196. package/dist/components/Foundary/DigitalColleageusLayout.js +0 -5
  197. /package/dist/{chunk-6LEH6XKI.mjs → chunk-M2REXGQW.mjs} +0 -0
  198. /package/dist/{chunk-SGK4ZXKR.mjs → chunk-NDZ26EG6.mjs} +0 -0
  199. /package/dist/components/Foundary/{DigitalColleageusLayout.css → foundary-clone.css} +0 -0
  200. /package/dist/components/Foundary/{digital-colleague-clone.d.ts → foundary-clone.d.ts} +0 -0
  201. /package/dist/components/Foundary/{digital-colleague-clone.js → foundary-clone.js} +0 -0
  202. /package/dist/components/Foundary/{digital-colleague-clone.css → foundary-layout.css} +0 -0
  203. /package/dist/components/Foundary/{digital-colleague-options.css → foundary-options.css} +0 -0
  204. /package/dist/components/Foundary/{digital-colleague-options.d.ts → foundary-options.d.ts} +0 -0
  205. /package/dist/components/Foundary/{digital-colleague-options.js → foundary-options.js} +0 -0
@@ -1 +0,0 @@
1
- import{a as q}from"./chunk-Z22NSJMF.mjs";import{a as w,c as R,d as I,g as T,i as o}from"./chunk-YFAZQYK4.mjs";import{a as M}from"./chunk-B4H6T2GP.mjs";import{a as c}from"./chunk-TVZOULLL.mjs";import{a as F,f as L,g as P,i as A}from"./chunk-3UMMMQEH.mjs";import{a as f}from"./chunk-L5JPAKPM.mjs";import{b as N}from"./chunk-ZUA4KNIR.mjs";import{b as H}from"./chunk-CSBGSBEU.mjs";import{a as S,e as U}from"./chunk-YO3GQYRJ.mjs";import{useEffect as W,useState as D}from"react";import{Plus as Y,Clock as K,Calendar as G,User as J,Repeat as Q,Edit2 as X,Trash2 as Z,CheckCircle as _,Circle as ee,Bell as te}from"lucide-react";import{Fragment as ce,jsx as e,jsxs as t}from"react/jsx-runtime";var ae=i=>{switch(i){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},ie=i=>i.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),re=i=>{let[u,v]=i.split(":"),g=new Date;return g.setHours(parseInt(u),parseInt(v)),g.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},B=(i,u)=>{let v=new Date,g=new Date(i);if(u){let[l,a]=u.split(":");g.setHours(parseInt(l),parseInt(a))}return g<v},O=i=>{let u=new Date;return i.toDateString()===u.toDateString()},le=i=>{let u=new Date;return u.setDate(u.getDate()+1),i.toDateString()===u.toDateString()},ne=({colleagues:i,onAddReminder:u,open:v,setOpen:g})=>{let[l,a]=D({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[s,p]=D(!1),h=d=>{d.preventDefault();let y=i.find(k=>k?.id.toString()===l.colleagueId.toString());if(!y){console.error("No valid colleague selected"),p(!0);return}p(!1);let E={title:l.title,description:l.description,dueDate:new Date(l.dueDate),dueTime:l.dueTime||void 0,colleague:y,isCompleted:!1,isRecurring:l.isRecurring,recurrencePattern:l.isRecurring?l.recurrencePattern:void 0,recurrenceInterval:l.isRecurring?l.recurrenceInterval:void 0,priority:l.priority,reminderEnabled:l.reminderEnabled,reminderMinutes:l.reminderEnabled?l.reminderMinutes:void 0,tags:l.tags?l.tags.split(",").map(k=>k.trim()):void 0};u(E),g(!1),a({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};W(()=>{l.colleagueId&&p(!1)},[l.colleagueId]);let n=i.filter(Boolean);return e(F,{open:v,onOpenChange:g,children:t(L,{className:"max-w-2xl",children:[e(P,{children:e(A,{children:"Add New Reminder"})}),t("form",{onSubmit:h,className:"space-y-4",children:[e("div",{className:"grid grid-cols-2 gap-4",children:t("div",{children:[e(c,{htmlFor:"title",children:"Title"}),e(f,{id:"title",value:l.title,onChange:d=>a({...l,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),t("div",{children:[e(c,{htmlFor:"description",children:"Description"}),e(M,{id:"description",value:l.description,onChange:d=>a({...l,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"dueDate",children:"Due Date"}),e(f,{id:"dueDate",type:"date",value:l.dueDate,onChange:d=>a({...l,dueDate:d.target.value}),required:!0})]}),t("div",{children:[e(c,{htmlFor:"dueTime",children:"Due Time (optional)"}),e(f,{id:"dueTime",type:"time",value:l.dueTime,onChange:d=>a({...l,dueTime:d.target.value})})]})]}),t("div",{children:[e(c,{className:`${s?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),t(w,{value:l.colleagueId,onValueChange:d=>{a({...l,colleagueId:d})},required:!0,children:[e(I,{className:`${s?"text-destructive border-red-500":""}`,children:e(R,{className:`${s?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:i.find(d=>d?.id.toString()===l.colleagueId.toString())?.name||"Select a digital colleague"})}),e(T,{children:n.map(d=>e(o,{value:d.id,children:d.name},d.id))})]}),s&&e("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"isRecurring",checked:l.isRecurring,onChange:d=>a({...l,isRecurring:d.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),l.isRecurring&&t("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[t("div",{children:[e(c,{htmlFor:"recurrencePattern",children:"Frequency"}),t(w,{value:l.recurrencePattern,onValueChange:d=>a({...l,recurrencePattern:d}),children:[e(I,{children:e(R,{})}),t(T,{children:[e(o,{value:"daily",children:"Daily"}),e(o,{value:"weekly",children:"Weekly"}),e(o,{value:"monthly",children:"Monthly"}),e(o,{value:"yearly",children:"Yearly"})]})]})]}),t("div",{children:[e(c,{htmlFor:"recurrenceInterval",children:"Every"}),e(f,{id:"recurrenceInterval",type:"number",min:"1",value:l.recurrenceInterval,onChange:d=>a({...l,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),t("div",{className:"flex justify-end space-x-2",children:[e(N,{type:"button",variant:"outline",onClick:()=>g(!1),children:"Cancel"}),e(N,{type:"submit",children:"Add Reminder"})]})]})]})})},de=({reminder:i,colleagues:u,onUpdateReminder:v,open:g,onClose:l})=>{let[a,s]=D({title:i.title,description:i.description,dueDate:i.dueDate.toISOString().split("T")[0],dueTime:i.dueTime||"",colleagueId:i.colleague?.id||"",priority:i.priority,isRecurring:i.isRecurring,recurrencePattern:i.recurrencePattern||"weekly",recurrenceInterval:i.recurrenceInterval||1,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderMinutes||15,tags:i.tags?.join(", ")||""}),p=n=>{n.preventDefault();let d=u.find(y=>y?.id===a.colleagueId);if(!d){console.error("No valid colleague selected");return}v(i.id,{title:a.title,description:a.description,dueDate:new Date(a.dueDate),dueTime:a.dueTime||void 0,colleague:d,priority:a.priority,isRecurring:a.isRecurring,recurrencePattern:a.isRecurring?a.recurrencePattern:void 0,recurrenceInterval:a.isRecurring?a.recurrenceInterval:void 0,reminderEnabled:a.reminderEnabled,reminderMinutes:a.reminderEnabled?a.reminderMinutes:void 0,tags:a.tags?a.tags.split(",").map(y=>y.trim()):void 0}),l()},h=u.filter(Boolean);return e(F,{open:g,onOpenChange:l,children:t(L,{className:"max-w-2xl",children:[e(P,{children:e(A,{children:"Edit Reminder"})}),t("form",{onSubmit:p,className:"space-y-4",children:[t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"edit-title",children:"Title"}),e(f,{id:"edit-title",value:a.title,onChange:n=>s({...a,title:n.target.value}),placeholder:"Enter reminder title",required:!0})]}),t("div",{children:[e(c,{htmlFor:"edit-priority",children:"Priority"}),t(w,{value:a.priority,onValueChange:n=>s({...a,priority:n}),children:[e(I,{children:e(R,{})}),t(T,{children:[e(o,{value:"low",children:"\u{1F7E2} Low"}),e(o,{value:"medium",children:"\u{1F7E1} Medium"}),e(o,{value:"high",children:"\u{1F534} High"})]})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-description",children:"Description"}),e(M,{id:"edit-description",value:a.description,onChange:n=>s({...a,description:n.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"edit-dueDate",children:"Due Date"}),e(f,{id:"edit-dueDate",type:"date",value:a.dueDate,onChange:n=>s({...a,dueDate:n.target.value}),required:!0})]}),t("div",{children:[e(c,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),e(f,{id:"edit-dueTime",type:"time",value:a.dueTime,onChange:n=>s({...a,dueTime:n.target.value})})]})]}),t("div",{children:[e(c,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),t(w,{value:a.colleagueId,onValueChange:n=>s({...a,colleagueId:n}),required:!0,children:[e(I,{children:e(R,{placeholder:"Select a digital colleague"})}),e(T,{children:h.map(n=>e(o,{value:n.id,children:n.name},n.id))})]})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-isRecurring",checked:a.isRecurring,onChange:n=>s({...a,isRecurring:n.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),a.isRecurring&&t("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[t("div",{children:[e(c,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),t(w,{value:a.recurrencePattern,onValueChange:n=>s({...a,recurrencePattern:n}),children:[e(I,{children:e(R,{})}),t(T,{children:[e(o,{value:"daily",children:"Daily"}),e(o,{value:"weekly",children:"Weekly"}),e(o,{value:"monthly",children:"Monthly"}),e(o,{value:"yearly",children:"Yearly"})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-recurrenceInterval",children:"Every"}),e(f,{id:"edit-recurrenceInterval",type:"number",min:"1",value:a.recurrenceInterval,onChange:n=>s({...a,recurrenceInterval:parseInt(n.target.value)})})]})]})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-reminderEnabled",checked:a.reminderEnabled,onChange:n=>s({...a,reminderEnabled:n.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),a.reminderEnabled&&t("div",{className:"pl-6",children:[e(c,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),t(w,{value:a.reminderMinutes.toString(),onValueChange:n=>s({...a,reminderMinutes:parseInt(n)}),children:[e(I,{children:e(R,{})}),t(T,{children:[e(o,{value:"5",children:"5 minutes before"}),e(o,{value:"15",children:"15 minutes before"}),e(o,{value:"30",children:"30 minutes before"}),e(o,{value:"60",children:"1 hour before"}),e(o,{value:"1440",children:"1 day before"})]})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),e(f,{id:"edit-tags",value:a.tags,onChange:n=>s({...a,tags:n.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),t("div",{className:"flex justify-end space-x-2",children:[e(N,{type:"button",variant:"outline",onClick:l,children:"Cancel"}),e(N,{type:"submit",children:"Save Changes"})]})]})]})})},se=({reminder:i,colleagues:u,onUpdateReminder:v,onDeleteReminder:g})=>{let[l,a]=D(!1);if(!i||!i.id)return null;let s=B(i.dueDate,i.dueTime),p=O(i.dueDate),h=le(i.dueDate),n=()=>{v(i.id,{isCompleted:!i.isCompleted,completedAt:i.isCompleted?void 0:new Date})},d=()=>p?"Today":h?"Tomorrow":s&&!i.isCompleted?"Overdue":ie(i.dueDate);return t(ce,{children:[e(de,{reminder:i,colleagues:u,onUpdateReminder:v,open:l,onClose:()=>a(!1)}),e(S,{className:`transition-all duration-200 ${i.isCompleted?"opacity-60":""} ${s&&!i.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:e(U,{className:"p-4",children:t("div",{className:"flex items-start justify-between",children:[t("div",{className:"flex items-start space-x-3 flex-1",children:[e("button",{onClick:n,className:"mt-1 text-primary hover:text-primary/80",children:i.isCompleted?e(_,{className:"h-5 w-5"}):e(ee,{className:"h-5 w-5"})}),t("div",{className:"flex-1",children:[t("div",{className:"flex items-center space-x-2 mb-1",children:[e("h3",{className:`font-semibold ${i.isCompleted?"line-through text-muted-foreground":""}`,children:i.title}),e("span",{className:"text-sm",children:ae(i.priority)}),i.isRecurring&&e(Q,{className:"h-4 w-4 text-primary"}),i.reminderEnabled&&e(te,{className:"h-4 w-4 text-success"})]}),e("p",{className:"text-sm text-muted-foreground mb-2",children:i.description}),t("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[t("div",{className:"flex items-center space-x-1",children:[e(G,{className:"h-4 w-4"}),e("span",{className:s&&!i.isCompleted?"text-destructive font-medium":"",children:d()})]}),i.dueTime&&t("div",{className:"flex items-center space-x-1",children:[e(K,{className:"h-4 w-4"}),e("span",{children:re(i.dueTime)})]}),t("div",{className:"flex items-center space-x-1",children:[e(J,{className:"h-4 w-4"}),e("span",{children:i.colleague?.name||"Unknown Colleague"})]})]}),i.tags&&i.tags.length>0&&e("div",{className:"flex flex-wrap gap-1 mt-2",children:i.tags.map((y,E)=>e(H,{variant:"secondary",className:"text-xs",children:y},E))})]})]}),t("div",{className:"flex items-center space-x-1",children:[e(N,{variant:"ghost",size:"sm",onClick:()=>a(!0),className:"h-8 w-8 p-0",children:e(X,{className:"h-4 w-4"})}),e(N,{variant:"ghost",size:"sm",onClick:()=>g(i.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:e(Z,{className:"h-4 w-4"})})]})]})})})]})},oe=({initialReminders:i=[],initialColleagues:u=[],onAddReminder:v,onUpdateReminder:g,onDeleteReminder:l})=>{let[a,s]=D(i.filter(Boolean)),[p]=D(u.filter(Boolean)),[h,n]=D("all"),[d,y]=D(""),[E,k]=D(!1),j=r=>{if(!r.title||!r.colleague?.id){console.error("Invalid reminder data:",r);return}let m={...r,id:Date.now().toString(),createdAt:new Date};s(x=>[...x,m]),v?.(r)},$=(r,m)=>{if(!r){console.error("No reminder ID provided for update");return}s(x=>x.map(b=>b?.id===r?{...b,...m}:b)),g?.(r,m)},z=r=>{if(!r){console.error("No reminder ID provided for deletion");return}s(m=>m.filter(x=>x?.id!==r)),l?.(r)},V=a.filter(r=>{if(!r)return!1;if(d){let m=d.toLowerCase();if(!(r.title.toLowerCase().includes(m)||r.description.toLowerCase().includes(m)||r.colleague?.name?.toLowerCase().includes(m)||r.tags?.some(b=>b.toLowerCase().includes(m))))return!1}switch(h){case"pending":return!r.isCompleted;case"completed":return r.isCompleted;case"overdue":return!r.isCompleted&&B(r.dueDate,r.dueTime);case"today":return O(new Date(r.dueDate));default:return!0}}).sort((r,m)=>{if(!r||!m)return 0;if(r.isCompleted&&!m.isCompleted)return 1;if(!r.isCompleted&&m.isCompleted)return-1;let x={high:3,medium:2,low:1},b=x[m.priority]-x[r.priority];return b!==0?b:r.dueDate.getTime()-m.dueDate.getTime()}),C={total:a.filter(Boolean).length,pending:a.filter(r=>r&&!r.isCompleted).length,completed:a.filter(r=>r&&r.isCompleted).length,overdue:a.filter(r=>r&&!r.isCompleted&&B(r.dueDate,r.dueTime)).length,today:a.filter(r=>r&&O(new Date(r.dueDate))).length},me=p.find(Boolean)||{id:"1",name:"Default Colleague",status:"active",joinedDate:new Date,lastActive:new Date,type:"digital",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[],version:"1.0.0",lastUpdated:new Date,isActive:!0};return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(q,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{k(!0)}}}),t("div",{className:"h-full bg-background",children:[e(ne,{colleagues:p,onAddReminder:j,open:E,setOpen:k}),t("div",{className:"p-6",children:[t("div",{className:"flex items-center justify-between mb-6",children:[t("div",{children:[e("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),e("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),t(N,{className:"flex items-center space-x-2",onClick:()=>k(!0),children:[e(Y,{className:"h-4 w-4"}),e("span",{children:"Add Reminder"})]})]}),t("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[t(S,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-foreground",children:C.total}),e("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),t(S,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-primary",children:C.pending}),e("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),t(S,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-success",children:C.completed}),e("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),t(S,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-destructive",children:C.overdue}),e("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),t(S,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-warning",children:C.today}),e("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),t("div",{className:"flex items-center space-x-4 mb-6",children:[e("div",{className:"flex-1",children:e(f,{placeholder:"Search reminders...",value:d,onChange:r=>y(r.target.value),className:"max-w-md"})}),t(w,{value:h,onValueChange:r=>n(r),children:[e(I,{className:"w-40",children:e(R,{})}),t(T,{children:[t(o,{value:"all",children:["All (",C.total,")"]}),t(o,{value:"pending",children:["Pending (",C.pending,")"]}),t(o,{value:"completed",children:["Completed (",C.completed,")"]}),t(o,{value:"overdue",children:["Overdue (",C.overdue,")"]}),t(o,{value:"today",children:["Today (",C.today,")"]})]})]})]}),e("div",{className:"space-y-4",children:V.length===0?t(S,{className:"p-8 text-center",children:[e("div",{className:"text-muted-foreground",children:d||h!=="all"?"No reminders match your filters":"No reminders yet"}),!d&&h==="all"&&e("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):V.map(r=>r&&e(se,{reminder:r,colleagues:p,onUpdateReminder:$,onDeleteReminder:z},r.id))})]})]})]})},ke=oe;export{oe as a,ke as b};
@@ -1 +0,0 @@
1
- import{a as S,b as T}from"./chunk-E4TE4NV6.mjs";import{a as p,c as d,d as m,g,i as n}from"./chunk-YFAZQYK4.mjs";import{a as N}from"./chunk-B4H6T2GP.mjs";import{a as o}from"./chunk-TVZOULLL.mjs";import{a as h,f as k,g as f,h as I,i as C}from"./chunk-3UMMMQEH.mjs";import{a as y}from"./chunk-L5JPAKPM.mjs";import{b}from"./chunk-ZUA4KNIR.mjs";import{useState as G,useEffect as x}from"react";import{BookOpen as V,Bug as E,Zap as M,AlertCircle as P}from"lucide-react";import{jsx as t,jsxs as a}from"react/jsx-runtime";var H=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:V},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:P},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:E},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:M}],R=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],X=({isOpen:l,onClose:u,onAddTask:D,epics:A,sprints:F,assignees:L,defaultEpicId:r})=>{let[i,c]=G({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});x(()=>{l&&r&&c(e=>({...e,epicId:r}))},[l,r]),x(()=>{l&&c({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:r||"",sprintId:"none",assignee:""})},[l]);let w=e=>{e.preventDefault(),i.name.trim()&&(D({name:i.name.trim(),description:i.description.trim(),status:"todo",priority:i.priority,type:i.type,points:i.points,epicId:i.epicId,sprintId:i.sprintId==="none"?void 0:i.sprintId,assignee:i.assignee.trim()||"Unassigned"}),c({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:r||"",sprintId:"none",assignee:""}),u())},s=(e,v)=>{c(B=>({...B,[e]:v}))};return t(h,{open:l,onOpenChange:u,children:a(k,{className:"sm:max-w-md",children:[t(f,{children:t(C,{children:"Add New Task"})}),a("form",{onSubmit:w,className:"space-y-4",children:[a("div",{className:"space-y-2",children:[t(o,{htmlFor:"name",children:"Task Title"}),t(y,{id:"name",value:i.name,onChange:e=>s("name",e.target.value),placeholder:"Enter task title",required:!0})]}),a("div",{className:"space-y-2",children:[t(o,{htmlFor:"description",children:"Description"}),t(N,{id:"description",value:i.description,onChange:e=>s("description",e.target.value),placeholder:"Enter task description",rows:3})]}),a("div",{className:"space-y-2",children:[t(o,{children:"Type"}),t(S,{type:"single",value:i.type,onValueChange:e=>e&&s("type",e),children:H.map(e=>{let v=e.icon;return a(T,{value:e.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[t(v,{className:"h-4 w-4"}),e.label]},e.value)})})]}),a("div",{className:"space-y-2",children:[t(o,{children:"Priority"}),t(S,{type:"single",value:i.priority,onValueChange:e=>e&&s("priority",e),children:R.map(e=>t(T,{value:e.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:e.label},e.value))})]}),a("div",{className:"space-y-2",children:[t(o,{htmlFor:"points",children:"Story Points"}),t(y,{id:"points",type:"number",min:"1",max:"100",value:i.points,onChange:e=>s("points",parseInt(e.target.value)||1),placeholder:"Enter story points",required:!0})]}),!r&&a("div",{className:"space-y-2",children:[t(o,{htmlFor:"epic",children:"Epic"}),a(p,{value:i.epicId,onValueChange:e=>s("epicId",e),children:[t(m,{children:t(d,{placeholder:"Select an epic"})}),t(g,{children:A.map(e=>t(n,{value:e.id,children:a("div",{className:"flex items-center gap-2",children:[t("div",{className:`w-3 h-3 rounded-full ${e.color}`}),e.name]})},e.id))})]})]}),a("div",{className:"space-y-2",children:[t(o,{htmlFor:"sprint",children:"Sprint (Optional)"}),a(p,{value:i.sprintId,onValueChange:e=>s("sprintId",e),children:[t(m,{children:t(d,{placeholder:"Select a sprint"})}),a(g,{children:[t(n,{value:"none",children:"No Sprint"}),F.map(e=>t(n,{value:e.id,children:a("div",{className:"flex items-center gap-2",children:[e.name,e.isActive&&t("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},e.id))]})]})]}),a("div",{className:"space-y-2",children:[t(o,{htmlFor:"sprint",children:"Assignee"}),a(p,{value:i.assignee,onValueChange:e=>s("assignee",e),children:[t(m,{children:t(d,{placeholder:"Select an Assignee"})}),a(g,{children:[t(n,{value:"none",children:"No Assignee"}),L.map(e=>t(n,{value:e.id,children:t("div",{className:"flex items-center gap-2",children:e.name})},e.id))]})]})]}),a(I,{children:[t(b,{type:"button",variant:"outline",onClick:u,children:"Cancel"}),t(b,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};export{X as a};
@@ -1 +0,0 @@
1
- import{a as E}from"./chunk-KW6L6KBY.mjs";import{a as k}from"./chunk-Z22NSJMF.mjs";import{a as w}from"./chunk-B4H6T2GP.mjs";import{a as h}from"./chunk-L5JPAKPM.mjs";import{b as d}from"./chunk-ZUA4KNIR.mjs";import{b as c}from"./chunk-CSBGSBEU.mjs";import{a as N}from"./chunk-YO3GQYRJ.mjs";import{useState as p,useRef as y,useEffect as T}from"react";import{Plus as q,Move as G,Edit2 as J,Trash2 as K,Check as Q,X as W}from"lucide-react";import{Fragment as Y,jsx as t,jsxs as s}from"react/jsx-runtime";var ce=({tasks:C,epics:D,sprints:Z,onUpdateTask:P,onTaskClick:H,onAddTaskToEpic:B,onAddEpic:S,onUpdateEpic:z,onDeleteEpic:R})=>{let[m,b]=p(null),[l,f]=p(null),[r,o]=p({}),[u,x]=p(0),n=y(null),I=y(null);T(()=>{let e=()=>{if(n.current){let v=n.current.offsetHeight;x(v)}};e();let i=new ResizeObserver(e);n.current&&i.observe(n.current);let g=()=>{setTimeout(e,100)};return window.addEventListener("storage",g),()=>{i.disconnect(),window.removeEventListener("storage",g)}},[]),T(()=>{let e=setTimeout(()=>{n.current&&x(n.current.offsetHeight)},300);return()=>clearTimeout(e)},[l]);let $=e=>{b(e)},A=e=>{e.preventDefault()},L=(e,i)=>{e.preventDefault(),m&&m.epicId!==i&&(P(m.id,{epicId:i}),b(null))},M=e=>C.filter(i=>i.epicId===e),O=e=>{f(e.id),o({name:e.name,description:e.description,confidence:e.confidence,phase:e.phase,progress:e.progress})},j=()=>{l&&r.name&&(z(l,r),f(null),o({}))},F=()=>{f(null),o({})},V=e=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&R(e)},_=e=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[e]||`Phase ${e}`,U=e=>{switch(e){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return s("div",{ref:I,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[t("div",{ref:n,className:"flex-shrink-0",children:t(k,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:S}})}),t("div",{className:"flex-1 min-h-0 mt-8",children:t("div",{className:"h-full overflow-y-auto",style:{height:u>0?`calc(100vh - ${u+120}px)`:"calc(100vh - 12rem)"},children:t("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:D.map(e=>{let i=M(e.id),g=i.reduce((a,X)=>a+X.points,0),v=u>0?`calc(100vh - ${u+200}px)`:"calc(100vh - 14rem)";return s(N,{className:`flex flex-col ${l===e.id?"h-auto":""} bg-card shadow-sm`,style:{height:l===e.id?"auto":v,minHeight:"400px"},onDragOver:A,onDrop:a=>L(a,e.id),children:[t("div",{className:"p-4 border-b border-border",children:l===e.id?s("div",{className:"space-y-4",children:[s("div",{className:"flex items-center justify-between",children:[t(h,{value:r.name||"",onChange:a=>o({...r,name:a.target.value}),placeholder:"Epic name",className:"font-semibold"}),s("div",{className:"flex gap-2 ml-2",children:[t(d,{size:"sm",variant:"ghost",onClick:j,className:"p-1 h-8 w-8",children:t(Q,{className:"h-4 w-4"})}),t(d,{size:"sm",variant:"ghost",onClick:F,className:"p-1 h-8 w-8",children:t(W,{className:"h-4 w-4"})})]})]}),t(w,{value:r.description||"",onChange:a=>o({...r,description:a.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),s("div",{className:"grid grid-cols-2 gap-2",children:[s("div",{children:[t("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),s("select",{value:r.confidence||e.confidence,onChange:a=>o({...r,confidence:a.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[t("option",{value:"low",children:"Low"}),t("option",{value:"medium",children:"Medium"}),t("option",{value:"high",children:"High"})]})]}),s("div",{children:[t("label",{className:"text-xs text-muted-foreground",children:"Phase"}),t("select",{value:r.phase?.toString()||e.phase.toString(),onChange:a=>o({...r,phase:parseInt(a.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(a=>s("option",{value:a.toString(),children:["Phase ",a]},a))})]})]}),s("div",{children:[t("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),t(h,{type:"number",min:"0",max:"100",value:r.progress||e.progress,onChange:a=>o({...r,progress:parseInt(a.target.value)||0}),className:"text-xs"})]})]}):s(Y,{children:[s("div",{className:"flex items-center gap-2 mb-2",children:[t("div",{className:`w-4 h-4 rounded-full ${e.color}`}),t("h3",{className:"font-semibold text-foreground select-none flex-1",children:e.name}),s("div",{className:"flex gap-1",children:[t(d,{size:"sm",variant:"ghost",onClick:()=>O(e),className:"p-1 h-8 w-8",children:t(J,{className:"h-3 w-3"})}),t(d,{size:"sm",variant:"ghost",onClick:()=>V(e.id),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:t(K,{className:"h-3 w-3"})})]})]}),s("div",{className:"flex flex-wrap gap-2 mb-3",children:[s(c,{className:`text-xs ${U(e.confidence)}`,children:[e.confidence," confidence"]}),s(c,{variant:"outline",className:"text-xs",children:["Phase ",e.phase]}),s(c,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[i.length," tasks"]}),s(c,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[g," pts"]})]}),e.description&&t("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:e.description}),s("div",{className:"mb-3",children:[s("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[t("span",{className:"select-none",children:"Progress"}),s("span",{className:"select-none",children:[e.progress,"%"]})]}),t("div",{className:"w-full bg-muted rounded-full h-2",children:t("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${e.progress}%`}})})]}),s(d,{onClick:()=>B(e.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[t(q,{className:"h-4 w-4"}),"Add Task"]})]})}),t("div",{className:"flex-1 p-4 overflow-y-auto",children:t("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${m?"border-primary bg-primary/10":"border-border"}`,children:i.length===0?s("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[t(G,{className:"h-8 w-8 mb-2"}),t("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):i.map(a=>t(E,{task:a,epic:e,onDragStart:$,onTaskClick:H,isCompact:!0},a.id))})})]},e.id)})})})})]})};export{ce as a};
@@ -1 +0,0 @@
1
- import{a as l,b as m,d as c}from"./chunk-JHNVX4UB.mjs";import{a as p}from"./chunk-7BXIU4ZM.mjs";import{a as N}from"./chunk-B4H6T2GP.mjs";import{a as r}from"./chunk-TVZOULLL.mjs";import{a as D,f as g,g as P,i as h}from"./chunk-3UMMMQEH.mjs";import{a as v}from"./chunk-L5JPAKPM.mjs";import{b as s}from"./chunk-ZUA4KNIR.mjs";import{a as d}from"./chunk-MDJREBVI.mjs";import{useState as x}from"react";import{CalendarIcon as S}from"lucide-react";import{format as C}from"date-fns";import{jsx as t,jsxs as i}from"react/jsx-runtime";var I=({isOpen:b,onClose:f,onAddSprint:A})=>{let[e,o]=x({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),y=a=>{a.preventDefault(),!(!e.name||!e.startDate||!e.endDate)&&(A({name:e.name,description:e.description,startDate:e.startDate,endDate:e.endDate,isActive:e.isActive,isSelected:!1}),o({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),f())},u=()=>{o({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),f()};return t(D,{open:b,onOpenChange:u,children:i(g,{className:"sm:max-w-md",children:[t(P,{children:t(h,{children:"Add New Sprint"})}),i("form",{onSubmit:y,className:"space-y-4",children:[i("div",{className:"space-y-2",children:[t(r,{htmlFor:"name",children:"Sprint Name *"}),t(v,{id:"name",value:e.name,onChange:a=>o(n=>({...n,name:a.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),i("div",{className:"space-y-2",children:[t(r,{htmlFor:"description",children:"Description"}),t(N,{id:"description",value:e.description,onChange:a=>o(n=>({...n,description:a.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),i("div",{className:"grid grid-cols-2 gap-4",children:[i("div",{className:"space-y-2",children:[t(r,{children:"Start Date *"}),i(l,{children:[t(m,{asChild:!0,children:i(s,{variant:"outline",className:d("w-full justify-start text-left font-normal",!e.startDate&&"text-muted-foreground"),children:[t(S,{className:"mr-2 h-4 w-4"}),e.startDate?C(e.startDate,"PPP"):"Pick a date"]})}),t(c,{className:"w-auto p-0",align:"start",children:t(p,{mode:"single",selected:e.startDate,onSelect:a=>o(n=>({...n,startDate:a})),initialFocus:!0})})]})]}),i("div",{className:"space-y-2",children:[t(r,{children:"End Date *"}),i(l,{children:[t(m,{asChild:!0,children:i(s,{variant:"outline",className:d("w-full justify-start text-left font-normal",!e.endDate&&"text-muted-foreground"),children:[t(S,{className:"mr-2 h-4 w-4"}),e.endDate?C(e.endDate,"PPP"):"Pick a date"]})}),t(c,{className:"w-auto p-0",align:"start",children:t(p,{mode:"single",selected:e.endDate,onSelect:a=>o(n=>({...n,endDate:a})),initialFocus:!0,disabled:a=>e.startDate?a<e.startDate:!1})})]})]})]}),i("div",{className:"flex items-center space-x-2",children:[t("input",{type:"checkbox",id:"isActive",checked:e.isActive,onChange:a=>o(n=>({...n,isActive:a.target.checked})),className:"rounded border-gray-300"}),t(r,{htmlFor:"isActive",children:"Set as active sprint"})]}),i("div",{className:"flex justify-end gap-3 pt-4",children:[t(s,{type:"button",variant:"outline",onClick:u,children:"Cancel"}),t(s,{type:"submit",disabled:!e.name||!e.startDate||!e.endDate,children:"Add Sprint"})]})]})]})})};export{I as a};
@@ -1 +0,0 @@
1
- import{a as ae}from"./chunk-6DEY5ZDD.mjs";import{a as te}from"./chunk-Z22NSJMF.mjs";import{a as ee}from"./chunk-B4H6T2GP.mjs";import{a as _}from"./chunk-L5JPAKPM.mjs";import{b as d}from"./chunk-ZUA4KNIR.mjs";import{b as p}from"./chunk-CSBGSBEU.mjs";import{a as f}from"./chunk-YO3GQYRJ.mjs";import{useState as c,useEffect as De,useRef as se}from"react";import{Calendar as D,User as Ee,Plus as Te,CalendarDays as Be,Edit2 as ne,Trash2 as re,Check as Ae,X as $,ChevronDown as E,ChevronUp as T}from"lucide-react";import{Fragment as ie,jsx as t,jsxs as a}from"react/jsx-runtime";var Ue=({tasks:B,epics:le,sprints:x,onUpdateTask:oe,onTaskClick:de,onAddSprint:ce,onUpdateSprint:me,onDeleteSprint:H})=>{let[m,ue]=c([]),[b,pe]=c(new Set),[y,F]=c(null),[ge,k]=c(!1),[ve,A]=c(null),[I,O]=c(null),[u,w]=c({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[z,L]=c("upcoming"),[S,R]=c(!1),[g,fe]=c(0),h=se(null),xe=se(null);De(()=>{let e=()=>{h.current&&fe(h.current.offsetHeight)};e();let s=new ResizeObserver(e);return h.current&&s.observe(h.current),()=>s.disconnect()},[]);let j=e=>le.find(s=>s.id===e),he=e=>x.find(s=>s.id===e),Ne=e=>{let s={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return s[e]||s.medium},be=e=>{let s=e.trim().split(" ");if(s.length===1)return s[0];let n=s[0],r=s[s.length-1][0].toUpperCase();return`${n} ${r}`},U=e=>{let s={},n=[];return e.forEach(r=>{r.epicId?(s[r.epicId]||(s[r.epicId]=[]),s[r.epicId].push(r)):n.push(r)}),{tasksByEpic:s,unassignedTasks:n}},M=x.filter(e=>e.id!=="backlog"&&e.id!=="all-tasks"),V=M.filter(e=>{switch(z){case"active":return e.isActive;case"upcoming":return!e.isActive;default:return!0}}),X=M.filter(e=>m.includes(e.id)),v=B.filter(e=>!e.sprintId||e.sprintId==="backlog"||e.sprintId==="Backlog"),ye=v.reduce((e,s)=>e+(s.points||0),0),q=e=>{ue(s=>s.includes(e)?s.filter(n=>n!==e):s.length<3?[...s,e]:s)},C=e=>{pe(s=>{let n=new Set(s);return n.has(e)?n.delete(e):n.add(e),n})},ke=e=>{ce(e),k(!1)},G=e=>{O(e.id),w({name:e.name,description:e.description||"",startDate:e.startDate instanceof Date?e.startDate.toISOString().split("T")[0]:e.startDate,endDate:e.endDate instanceof Date?e.endDate.toISOString().split("T")[0]:e.endDate,isActive:e.isActive})},we=()=>{I&&(me(I,{name:u.name,description:u.description,startDate:new Date(u.startDate),endDate:new Date(u.endDate),isActive:u.isActive}),O(null))},Se=()=>{O(null),w({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Ce=(e,s)=>{F(s),e.dataTransfer.effectAllowed="move"},J=e=>{e.preventDefault(),e.dataTransfer.dropEffect="move"},K=e=>{A(e)},Q=()=>{A(null)},W=(e,s)=>{if(e.preventDefault(),A(null),!y)return;let n=y.sprintId||void 0,r=s==="backlog"?void 0:s;n!==r&&oe(y.id,{sprintId:r}),F(null)},N=({task:e,showSprint:s=!1})=>{let n=e.epicId?j(e.epicId):null,r=e.sprintId?he(e.sprintId):null;return t(f,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:o=>{o.dataTransfer.effectAllowed="move",o.dataTransfer.setData("text/plain",e.id),Ce(o,e)},onClick:o=>{y===null&&de(e)},style:{userSelect:"none"},children:a("div",{className:"space-y-2 pointer-events-none",children:[a("div",{className:"flex items-start justify-between gap-2",children:[t("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:e.name}),t(p,{className:`text-xs ${Ne(e.priority)}`,children:e.priority[0].toUpperCase()})]}),a("div",{className:"flex items-center justify-between text-xs",children:[a("div",{className:"flex items-center gap-1",children:[n&&t("div",{className:`w-2 h-2 rounded-full ${n.color}`}),t("span",{className:"text-muted-foreground truncate",children:n?.name})]}),t("span",{className:"text-muted-foreground",children:be(e.assignee?.value?.name)})]}),s&&r&&a("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[t(D,{className:"h-3 w-3"}),t("span",{children:r.name})]})]})})};return a("div",{ref:xe,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[t("div",{ref:h,className:"flex-shrink-0",children:t(te,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>k(!0)}})}),t("div",{className:"flex-1 min-h-0 mt-8",children:a("div",{className:"h-full",style:{height:g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)"},children:[a("div",{className:"mb-4",children:[t(f,{className:"p-3 bg-card shadow-sm",children:a("div",{className:"flex items-center justify-between",children:[a("div",{className:"flex items-center gap-3",children:[t("div",{children:t("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"})}),m.length>0&&t("div",{className:"flex items-center gap-2",children:t("div",{className:"flex flex-wrap gap-1",children:X.map(e=>a("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[t("span",{className:"max-w-[80px] truncate",children:e.name}),e.isActive&&t("span",{className:"text-success text-[10px]",children:"\u25CF"}),t("button",{onClick:()=>q(e.id),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:t($,{className:"h-4 w-4"})})]},e.id))})})]}),a("div",{className:"flex items-center gap-2",children:[a(d,{onClick:()=>k(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[t(Te,{className:"h-3 w-3"}),"Add"]}),a(d,{onClick:()=>R(!S),variant:"outline",size:"sm",className:"gap-1",children:[t(D,{className:"h-3 w-3"}),S?"Close":"Select"]})]})]})}),S&&t("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>R(!1)}),t("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-xl z-10 transition-all duration-300 ease-in-out ${S?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:a(f,{className:"h-full rounded-none border-0 flex flex-col",children:[a("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[a("div",{className:"flex items-center justify-between",children:[t("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),t(d,{variant:"ghost",size:"sm",onClick:()=>R(!1),className:"h-8 w-8 p-0",children:t($,{className:"h-4 w-4"})})]}),t("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),a("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[t("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:x.length},{key:"active",label:"Active",count:x.filter(e=>e.isActive).length},{key:"upcoming",label:"Upcoming",count:x.filter(e=>!e.isActive).length}].map(e=>a(d,{variant:z===e.key?"default":"outline",size:"sm",onClick:()=>L(e.key),className:"text-xs h-8 px-3 flex-1",children:[e.label," (",e.count,")"]},e.key))}),t("div",{className:"space-y-2 flex-1 overflow-y-auto",children:V.length>0?V.map(e=>{let s=m.includes(e.id),n=B.filter(i=>i.sprintId===e.id).length,r=!s&&m.length<3;return t("div",{className:`p-3 rounded-lg border transition-all ${s?"bg-primary/10 border-primary/30":r?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:I===e.id?a("div",{className:"space-y-3",children:[t(_,{value:u.name,onChange:i=>w(l=>({...l,name:i.target.value})),className:"text-sm",placeholder:"Sprint name"}),t(ee,{value:u.description,onChange:i=>w(l=>({...l,description:i.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),a("div",{className:"flex gap-2",children:[a(d,{size:"sm",onClick:()=>we(),className:"flex-1",children:[t(Ae,{className:"h-3 w-3 mr-1"}),"Save"]}),a(d,{size:"sm",variant:"outline",onClick:Se,className:"flex-1",children:[t($,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):a("div",{children:[a("div",{className:"flex items-start justify-between",children:[a("div",{className:"flex-1 min-w-0",children:[a("div",{className:"flex items-center gap-2 mb-1",children:[t("h4",{className:"font-medium text-sm text-foreground truncate",children:e.name}),e.isActive&&t(p,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),t("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:e.description}),a("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[a("span",{className:"flex items-center gap-1",children:[t(Be,{className:"h-3 w-3"}),new Date(e.startDate).toLocaleDateString()]}),a("span",{className:"flex items-center gap-1",children:[t(Ee,{className:"h-3 w-3"}),n," tasks"]})]})]}),a("div",{className:"flex items-center gap-1 ml-2",children:[t(d,{size:"sm",variant:"ghost",onClick:()=>G(e),className:"h-6 w-6 p-0",children:t(ne,{className:"h-3 w-3"})}),e.id!=="backlog"&&e.id!=="all-tasks"&&t(d,{size:"sm",variant:"ghost",onClick:()=>H(e.id),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:t(re,{className:"h-3 w-3"})})]})]}),t("div",{className:"flex items-center justify-between mt-2",children:t(d,{variant:s?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>q(e.id),disabled:!s&&m.length>=3,children:t("span",{className:"pointer-events-none select-none",children:s?"Deselect":m.length>=3?"Limit Reached":"Select"})})})]})},e.id)}):a("div",{className:"text-center py-8 text-muted-foreground",children:[t(D,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),a("p",{className:"text-sm",children:['No sprints found for "',z,'" filter']}),t(d,{variant:"link",size:"sm",onClick:()=>L("all"),className:"text-xs",children:"Show all sprints"})]})}),m.length===0&&t("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:a("div",{className:"text-center",children:[t(D,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),t("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),t("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),a("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[t("div",{className:"lg:col-span-1",children:a(f,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:J,onDragEnter:()=>K("backlog"),onDragLeave:Q,onDrop:e=>W(e,"backlog"),style:{height:g>0?`calc(100vh - ${g+200}px)`:"calc(100vh - 16rem)"},children:[a("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[t("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),a("div",{className:"flex items-center gap-2",children:[a(p,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[v.length," tasks"]}),a(p,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[ye," pts"]})]})]}),t("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${ve==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:e,unassignedTasks:s}=U(v);return a(ie,{children:[Object.entries(e).map(([n,r])=>{let i=j(n);if(!i)return null;let l=b.has(n);return a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>C(n),children:[t("div",{className:`w-3 h-3 rounded-full ${i.color}`}),t("span",{className:"font-medium text-muted-foreground",children:i.name}),a("span",{className:"text-muted-foreground",children:["(",r.length,")"]}),t("div",{className:"ml-auto",children:l?t(E,{className:"h-3 w-3 text-muted-foreground"}):t(T,{className:"h-3 w-3 text-muted-foreground"})})]}),!l&&t("div",{className:"space-y-2 pl-2",children:r.map(o=>t(N,{task:o},o.id))})]},n)}),s.length>0&&(()=>{let n=b.has("no-epic");return a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>C("no-epic"),children:[t("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),t("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),a("span",{className:"text-muted-foreground",children:["(",s.length,")"]}),t("div",{className:"ml-auto",children:n?t(E,{className:"h-3 w-3 text-muted-foreground"}):t(T,{className:"h-3 w-3 text-muted-foreground"})})]}),!n&&t("div",{className:"space-y-2 pl-2",children:s.map(r=>t(N,{task:r},r.id))})]})})(),v.length===0&&t("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"}),v.length>0&&Object.keys(e).length===0&&s.length===0&&a("div",{className:"space-y-2",children:[t("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),v.map(n=>t(N,{task:n},n.id))]})]})})()})]})}),X.map(e=>{let s=B.filter(r=>r.sprintId===e.id),n=s.reduce((r,i)=>r+(i.points||0),0);return a(f,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:J,onDragEnter:()=>K(e.id),onDragLeave:Q,onDrop:r=>W(r,e.id),style:{height:g>0?`calc(100vh - ${g+200}px)`:"calc(100vh - 16rem)"},children:[a("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[a("div",{children:[t("h3",{className:"font-semibold text-foreground select-none text-lg",children:e.name}),e.isActive&&t("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),a("div",{className:"flex items-center gap-2",children:[a(p,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[s.length," tasks"]}),a(p,{variant:"outline",className:"bg-blue-50 text-blue-700 border-blue-200",children:[n," pts"]}),t(d,{size:"sm",variant:"ghost",onClick:()=>G(e),className:"h-6 px-2",children:t(ne,{className:"h-3 w-3"})}),e.id!=="backlog"&&e.id!=="all-tasks"&&t(d,{size:"sm",variant:"ghost",onClick:()=>H(e.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:t(re,{className:"h-3 w-3"})})]})]}),t("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:r,unassignedTasks:i}=U(s);return a(ie,{children:[Object.entries(r).map(([l,o])=>{let P=j(l);if(!P)return null;let Y=b.has(l);return a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>C(l),children:[t("div",{className:`w-3 h-3 rounded-full ${P.color}`}),t("span",{className:"font-medium text-muted-foreground",children:P.name}),a("span",{className:"text-muted-foreground",children:["(",o.length,")"]}),t("div",{className:"ml-auto",children:Y?t(E,{className:"h-3 w-3 text-muted-foreground"}):t(T,{className:"h-3 w-3 text-muted-foreground"})})]}),!Y&&t("div",{className:"space-y-2 pl-2",children:o.map(Z=>t(N,{task:Z},Z.id))})]},l)}),i.length>0&&(()=>{let l=b.has("no-epic");return a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>C("no-epic"),children:[t("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),t("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),a("span",{className:"text-muted-foreground",children:["(",i.length,")"]}),t("div",{className:"ml-auto",children:l?t(E,{className:"h-3 w-3 text-muted-foreground"}):t(T,{className:"h-3 w-3 text-muted-foreground"})})]}),!l&&t("div",{className:"space-y-2 pl-2",children:i.map(o=>t(N,{task:o},o.id))})]})})(),s.length===0&&t("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},e.id)})]}),t(ae,{isOpen:ge,onClose:()=>k(!1),onAddSprint:ke})]})})]})};export{Ue as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as X}from"./chunk-2C4UDLVF.mjs";import{a as Q}from"./chunk-6TUNKKV7.mjs";import{a as L}from"./chunk-4HHGVL3E.mjs";import{a as W}from"./chunk-QBUU2AQL.mjs";import{a as J}from"./chunk-O57JJTH5.mjs";import{a as z}from"./chunk-ORNGKQM7.mjs";import{a as q}from"./chunk-4A3MGS6I.mjs";import{a as $}from"./chunk-EOR2BAI2.mjs";import{useEffect as o,useState as s}from"react";import{useRouter as Je}from"next/navigation";import{jsx as a,jsxs as Qe}from"react/jsx-runtime";function Le({title:Xe="",initialTasks:h=[],initialEpics:D=[],initialSprints:S=[],initialProjects:v=[],initialReminders:E=[],initialColleagues:A=[],initialUsers:w=[],initialFiles:C=[],initialView:P="kanban",onAddTask:Y,onUpdateTask:Z,onDeleteTask:_,onTaskClick:Ye,onAddEpic:ee,onUpdateEpic:te,onDeleteEpic:ie,onAddTaskToEpic:Ze,onAddSprint:ne,onUpdateSprint:se,onDeleteSprint:ae,onAddProject:oe,onUpdateProject:de,onDeleteProject:re,onFileAdd:le,onFileEdit:ce,onFileDelete:pe,onFileClick:me,onAddReminder:ge,onUpdateReminder:ke,onDeleteReminder:Te,onViewChange:ue,onToggleMobileMenu:fe,onTeamClick:_e,onTeamChange:et,onCopilotClick:tt,handleAddComment:he}){let[p,d]=s(h),[l,m]=s(D),[c,g]=s(S),[De,k]=s(v),[Se,T]=s(E),[U,ve]=s(A),[F,Ee]=s(w),[Ae,R]=s(C),[we,M]=s(!1),[Ce,O]=s(!1),[Pe,V]=s(null),[Ue,j]=s(null),[I,B]=s(null),[r,N]=s(P||"kanban"),[it,be]=s(!1),x=Je();o(()=>{d(h)},[h]),o(()=>{g(S)},[S]),o(()=>{m(D)},[D]),o(()=>{k(v)},[v]),o(()=>{R(C)},[C]),o(()=>{Ee(w)},[w]),o(()=>{ve(A)},[A]),o(()=>{T(E)},[E]),o(()=>{N(P)},[P]);let ye=l.filter(e=>e.isSelected).map(e=>e.id),u=c.find(e=>e.isSelected),Fe=p.filter(e=>{let t=ye.includes(e.epicId);return!u||u.id==="all-tasks"?t:u.id==="backlog"?t&&!e.sprintId:t&&e.sprintId===u.id}),nt=e=>Fe.filter(t=>t.status===e),st=e=>{let t={};return l.forEach(i=>{t[i.id]=e.filter(n=>n.epicId===i.id)}),t},at=e=>{B(e)},ot=e=>{I&&(d(t=>t.map(i=>i.id===I.id?{...i,status:e}:i)),B(null))},G=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};d(i=>[...i,t]),Y?.(t)},f=async(e,t)=>(d(i=>i.map(n=>n.id===e?{...n,...t}:n)),await Z?.(e,t)),dt=async(e,t)=>{f(e,t)},H=e=>{d(t=>t.filter(i=>i.id!==e)),Pe?.id===e&&V(null),_?.(e)},rt=async e=>{H(e)},lt=e=>{let t={...e,id:Date.now().toString(),isSelected:!1};k(i=>[...i,t]),oe?.(e)},ct=(e,t)=>{k(i=>i.map(n=>n.id===e?t.isSelected?(x.push(`/project/${e}`),{...n,...t}):{...n,...t}:t.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),de?.(e,t)},pt=e=>{k(t=>t.filter(i=>i.id!==e)),re?.(e)},K=e=>{let t={...e,id:Date.now().toString(),isSelected:!0};m(i=>[...i,t]),ee?.({...t})},Re=()=>{O(!0)},Me=(e,t)=>{m(i=>i.map(n=>n.id===e?{...n,...t}:n)),te?.(e,t)},Oe=e=>{m(t=>t.filter(i=>i.id!==e)),d(t=>t.filter(i=>i.epicId!==e)),ie?.(e)},Ve=e=>{let t={...e,id:Date.now().toString(),isSelected:!1};g(i=>[...i,t]),ne?.(e)},je=(e,t)=>{g(i=>i.map(n=>n.id===e?t.isSelected?{...n,...t}:{...n,...t}:t.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),se?.(e,t)},Ie=e=>{e==="backlog"||e==="all-tasks"||(g(t=>t.filter(i=>i.id!==e)),d(t=>t.map(i=>i.sprintId===e?{...i,sprintId:void 0}:i)),ae?.(e))},b=e=>{V(e)},Be=e=>{e==="planning"&&window.innerWidth<768||(N(e),ue?.(e))},mt=()=>{be(e=>!e),fe?.()},gt=()=>{x.push("/")},kt=e=>{console.log("Switching to team:",e)},Tt=e=>{console.log("Switching to team:",e)},Ne=e=>{j(e),M(!0)},xe=()=>{M(!1),j(null)},Ge=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};T(i=>[...i,t]),ge?.(e)},He=(e,t)=>{T(i=>i.map(n=>n.id===e?{...n,...t}:n)),ke?.(e,t)},Ke=e=>{T(t=>t.filter(i=>i.id!==e)),Te?.(e)},We=()=>{le?.()},$e=e=>{ce?.(e)},qe=e=>{R(t=>t.filter(i=>i.name!==e)),pe?.(e)},ze=e=>{me?.(e)},ut=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],ft=()=>{switch(r){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},y=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],ht=y.sort((e,t)=>t.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),Dt=y.length>3,St=y.slice(3);return Qe($,{currentView:r,onViewChange:Be,children:[r==="kanban"&&a("div",{className:"h-full overflow-hidden",children:a(J,{initialProjects:De,initialEpics:l,initialSprints:c,initialTasks:p,initialColleagues:U,initialUsers:F,onAddTask:G,onUpdateTask:f,onDeleteTask:H,onTaskClick:b,onAddEpic:K,onAddComment:he})}),r==="planning"&&a("div",{className:"hidden md:block h-full",children:a(Q,{tasks:p,epics:l,sprints:c,onUpdateTask:f,onTaskClick:b,onAddSprint:Ve,onUpdateSprint:je,onDeleteSprint:Ie})}),r==="tasks"&&a("div",{className:"h-full",children:a(X,{initialReminders:Se,initialColleagues:U,onAddReminder:Ge,onUpdateReminder:He,onDeleteReminder:Ke})}),r==="files"&&a("div",{className:"h-full",children:a(W,{initialFiles:Ae,onFileAdd:We,onFileEdit:$e,onFileDelete:qe,onFileClick:ze,compactView:!1})}),r==="epics"&&a("div",{className:"h-full",children:a(L,{tasks:p,epics:l,sprints:c,onUpdateTask:f,onTaskClick:b,onAddTaskToEpic:Ne,onAddEpic:Re,onUpdateEpic:Me,onDeleteEpic:Oe})}),a(q,{isOpen:we,onClose:xe,onAddTask:G,epics:l,sprints:c,assignees:[...U,...F],defaultEpicId:Ue||void 0}),a(z,{isOpen:Ce,onClose:()=>O(!1),onAddEpic:K})]})}export{Le as a};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-YO3GQYRJ.mjs";import{User as u,AlertCircle as p,Bug as g,Zap as f,BookOpen as b}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var y=({task:r,epic:x,onDragStart:i,onTaskClick:d,isCompact:m=!1})=>{let s=v=>{i(r)},o=()=>{d(r)},l=()=>{switch(r.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},n=()=>{switch(r.type){case"story":return e(b,{className:"h-3 w-3"});case"bug":return e(g,{className:"h-3 w-3"});case"spike":return e(f,{className:"h-3 w-3"});case"task":default:return e(p,{className:"h-3 w-3"})}},c=()=>{switch(r.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return m?e(a,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:s,onClick:o,children:t("div",{className:"flex items-center gap-2",children:[e("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${c()}`,children:n()}),e("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:r.name})]})}):t(a,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:s,onClick:o,children:[t("div",{className:"flex items-center justify-between mb-3",children:[t("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${c()}`,children:[n(),e("span",{className:"capitalize",children:r.type})]}),t("div",{className:"flex gap-1",children:[e("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${l()}`,children:r.priority}),e("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:r.points})]})]}),e("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:r.name}),e("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:r.description}),e("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:t("div",{className:"flex items-center gap-1",children:[e(u,{className:"h-4 w-4"}),e("span",{children:r.assignee?.value?.name})]})})]})};export{y as a};
@@ -1 +0,0 @@
1
- import{a as n}from"./chunk-AB43AQKL.mjs";import{a as g}from"./chunk-EOXVYLPB.mjs";import{a as u,b as m}from"./chunk-E4TE4NV6.mjs";import{a as o}from"./chunk-TVZOULLL.mjs";import{b as i}from"./chunk-ZUA4KNIR.mjs";import{Calendar as w,Clock as C,User as D,Trash2 as S,BookOpen as T,Bug as L,Zap as B,AlertCircle as k,Loader2 as I,Check as A,X as G}from"lucide-react";import{jsx as a,jsxs as t}from"react/jsx-runtime";var P=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:T},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:k},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:L},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:B}],V=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var R=({task:s,epics:b,sprints:x,lastUpdated:v,onUpdateTask:r,onClose:f,onDelete:N,isUpdating:l=!1,isDeleting:p=!1,deleteState:d="idle",teamMembers:y})=>{let J=e=>e.split(" ").map(c=>c[0]).join("").toUpperCase(),h=()=>d==="loading"?t(i,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[a(I,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):d==="success"?t(i,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[a(A,{className:"h-3 w-3"}),"Deleted"]}):d==="error"?t(i,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[a(G,{className:"h-3 w-3"}),"Delete failed"]}):t(i,{onClick:N,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:l||p,children:[a(S,{className:"h-3 w-3"}),"Delete Task"]});return t("div",{className:"flex flex-col h-full",children:[t("div",{className:"space-y-4",style:{opacity:l?.6:1},children:[t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Status"}),a(n,{label:"",value:s.status,onValueChange:e=>r("status",e),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:l})]}),t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Type"}),a(u,{type:"single",value:s.type,onValueChange:e=>e&&r("type",e),className:"grid grid-cols-2 gap-1",disabled:l,children:P.map(e=>{let c=e.icon;return t(m,{value:e.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:[a(c,{className:"h-3 w-3"}),e.label]},e.value)})})]}),t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Priority"}),a(u,{type:"single",value:s.priority,onValueChange:e=>e&&r("priority",e),className:"grid grid-cols-3 gap-1",disabled:l,children:V.map(e=>a(m,{value:e.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:e.label},e.value))})]}),t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Story Points"}),a("input",{type:"number",min:"1",max:"100",value:s.points||1,onChange:e=>r("points",e.target.value),className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:l})]}),t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Epic"}),a(n,{label:"",value:s.epicId,onValueChange:e=>r("epicId",e),options:(b||[]).map(e=>({value:e.id,label:e?.name,color:e.color})),showColor:!0,disabled:l})]}),t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Sprint"}),a(n,{label:"",value:s.sprintId||"none",onValueChange:e=>r("sprintId",e==="none"?"":e),options:[{value:"none",label:"No Sprint"},...(x||[]).map(e=>({value:e.id,label:`${e?.name}${e.isActive?" (Active)":""}`}))],disabled:l})]}),t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Assignee"}),a(g,{label:"",value:s.assignee?.value?.name,onValueChange:e=>r("assignee",e),options:y.map(e=>({value:`${typeof e.email=="string"?"users":"digital-colleagues"}:${e.id}`,label:e?.name})),placeholder:"Search team members...",allowCustomValue:!0,disabled:l})]})]}),t("div",{className:"mt-auto pt-4 space-y-4",children:[t("div",{className:"space-y-2",children:[a(i,{onClick:f,variant:"outline",className:"w-full h-8 text-xs",disabled:l||p,children:"Close"}),h()]}),t("div",{className:"pt-4 border-t border-border space-y-2",children:[a("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),t("div",{className:"flex items-center justify-between",children:[a("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),t("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a(D,{className:"h-3 w-3"}),a("span",{children:"System"})]})]}),t("div",{className:"flex items-center justify-between",children:[a("span",{className:"text-xs text-muted-foreground",children:"Created"}),t("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a(w,{className:"h-3 w-3"}),a("span",{children:new Date(s.createdAt)?.toLocaleDateString()})]})]}),t("div",{className:"flex items-center justify-between",children:[a("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),t("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a(C,{className:"h-3 w-3"}),t("span",{children:[new Date(v).toLocaleDateString()," at"," ",new Date(v).toLocaleTimeString()]})]})]})]})]})]})};export{R as a};
@@ -1 +0,0 @@
1
- import{a as U}from"./chunk-MBPTBEOX.mjs";import{a as C}from"./chunk-6SWKEZN6.mjs";import{a as u}from"./chunk-DFIXTV2M.mjs";import{a as x,f as y,g as S,i as w}from"./chunk-3UMMMQEH.mjs";import{useEffect as O,useState as l}from"react";import{Loader2 as R,Check as X,X as j}from"lucide-react";import{jsx as t,jsxs as o}from"react/jsx-runtime";var Z=({isOpen:b,onClose:f,initialTask:m,epics:N,sprints:P,onUpdateTask:k,onDeleteTask:I,onAddComment:T,colleagues:A})=>{let[s,c]=l(m),[E,p]=l(new Date),[n,e]=l("idle"),[g,d]=l("idle"),[q,z]=l([]);O(()=>{c(m)},[m]);let D=async(a,i)=>{if(i!==s[a]){e("loading");try{let r=await k(s.id,{[a]:i});c(r),p(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch{e("error"),setTimeout(()=>e("idle"),3e3)}}},M=async(a,i)=>{if(i!==s[a]){e("loading");try{let r=await k(s.id,{[a]:i});c(r),p(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch{e("error"),setTimeout(()=>e("idle"),3e3)}}},F=async a=>{if(T){e("loading");try{let i=await T?.({content:a,taskId:s.id});c(i),p(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch{e("error"),setTimeout(()=>e("idle"),3e3)}}},H=async()=>{d("loading");try{await I(s.id),d("success"),setTimeout(()=>{f(),d("idle")},1e3)}catch{d("error"),setTimeout(()=>d("idle"),3e3)}},v=n!=="loading"&&g!=="loading",h=()=>{v&&f()},L=()=>n==="loading"?o("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t(R,{className:"h-4 w-4 animate-spin"}),t("span",{children:"Updating..."})]}):n==="success"?o("div",{className:"flex items-center gap-2 text-sm text-success",children:[t(X,{className:"h-4 w-4"}),t("span",{children:"Updated successfully"})]}):n==="error"?o("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[t(j,{className:"h-4 w-4"}),t("span",{children:"Update failed"})]}):null;return t(x,{open:b,onOpenChange:h,children:o(y,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[o(S,{children:[t(w,{className:"sr-only",children:s.name}),o("div",{className:"flex items-center justify-between",children:[t("div",{className:"flex-1",children:L()}),!v&&t("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),o("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[o("div",{className:"lg:col-span-2 space-y-4",children:[t(u,{fieldName:"name",value:s.name,label:"",onSave:D,className:"border-b border-border pb-3",disabled:n==="loading"}),t(u,{fieldName:"description",value:s.description,label:"Description",multiline:!0,onSave:D,disabled:n==="loading"}),t(C,{comments:(s?.comments||[]).map(a=>({author:a.author.value.name,createdAt:new Date(a.timestamp),text:a.content,id:a.id})),onAddComment:F})]}),t(U,{task:s,epics:N,sprints:P,lastUpdated:E,onUpdateTask:M,onClose:h,onDelete:H,isUpdating:n==="loading",isDeleting:g==="loading",deleteState:g,teamMembers:A})]})]})})};export{Z as a};
@@ -1 +0,0 @@
1
- import{a as j}from"./chunk-KZCIHFTM.mjs";import{a as $}from"./chunk-NKDFAFWH.mjs";import{a as z}from"./chunk-ORNGKQM7.mjs";import{a as L}from"./chunk-4A3MGS6I.mjs";import{a as K}from"./chunk-KW6L6KBY.mjs";import{a as U}from"./chunk-Z22NSJMF.mjs";import{b as R}from"./chunk-CSBGSBEU.mjs";import{useEffect as l,useState as n,useRef as F}from"react";import{jsx as i,jsxs as w}from"react/jsx-runtime";var Ae=({initialTasks:f=[],initialEpics:k=[],initialSprints:T=[],initialUsers:V=[],initialColleagues:q=[],initialProjects:le=[],onAddTask:G,onUpdateTask:v,onDeleteTask:y,onTaskClick:J,onAddEpic:Q,onAddComment:W})=>{let[b,d]=n(f),[c,S]=n(k),[h,X]=n(T),[x,O]=n(!1),[P,N]=n(!1),[p,E]=n(null),[C,H]=n(null),[B,pe]=n(V),[M,ue]=n(q),[u,I]=n(0),o=F(null),Y=F(null),A=c.filter(e=>!0).map(e=>e.id),m=h.find(e=>e.isSelected);A.push("no-epic"),l(()=>{d(f)},[f]),l(()=>{S(k)},[k]),l(()=>{X(T)},[T]),l(()=>{let e=()=>{if(o.current){let a=o.current.offsetHeight;I(a)}};e();let t=new ResizeObserver(e);o.current&&t.observe(o.current);let s=()=>{setTimeout(e,100)};return window.addEventListener("storage",s),()=>{t.disconnect(),window.removeEventListener("storage",s)}},[]),l(()=>{let e=setTimeout(()=>{o.current&&I(o.current.offsetHeight)},300);return()=>clearTimeout(e)},[x,P]);let Z=b.filter(e=>{let t=A.includes(e.epicId)||!e.epicId;return!m||m.id==="all-tasks"?t:m.id==="backlog"?t&&!e.sprintId:t&&e.sprintId===m.id}),_=e=>Z.filter(t=>t.status===e),ee=e=>{let t={};return c.forEach(s=>{t[s.id]=e.filter(a=>a.epicId===s.id)}),t["no-epic"]=e.filter(s=>!s.epicId),t},te=e=>{H(e)},se=e=>{C&&(d(t=>t.map(s=>s.id===C.id?{...s,status:e}:s)),v?.(C.id,{status:e}),H(null))},ie=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};d(s=>[...s,t]),G?.(e)},ae=async(e,t)=>{d(a=>a.map(r=>r.id===e?{...r,...t}:r)),v&&await v(e,t);let s=b.find(a=>a.id===e);if(!s)throw new Error("Task not found");return{...s,...t}},ne=async e=>{d(t=>t.filter(s=>s.id!==e)),p?.id===e&&E(null),y&&await y(e)},oe=e=>{let t={...e,id:Date.now().toString(),isSelected:!0};S(s=>[...s,t]),Q?.(e)},re=e=>{E(e),J?.(e)},de=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],ce=u>0?`calc(100vh - ${u+120}px)`:"calc(100vh - 12rem)";return w("div",{ref:Y,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[i("div",{ref:o,className:"flex-shrink-0",children:i(U,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>O(!0)},secondaryAction:{label:"Add epic",onClick:()=>N(!0)}})}),i("div",{className:"flex-1 min-h-0 mt-8",children:i("div",{className:"h-full",style:{height:u>0?`calc(100vh - ${u+120}px)`:"calc(100vh - 12rem)"},children:i("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:de.map(e=>{let t=_(e.status),s=ee(t);return i(j,{title:e.title,status:e.status,taskCount:t.length,onDrop:se,isCompact:e.status==="done",height:ce,children:A.map(a=>{let r=c.find(g=>g.id===a),D=s[a]||[];return D.length===0?null:w("div",{className:"mb-6",children:[w("div",{className:"flex items-center gap-2 mb-3",children:[i("div",{className:`w-3 h-3 rounded-full ${r?.color}`}),i("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:r?.name||"No Epic"}),i(R,{variant:"secondary",className:"text-xs",children:D.length})]})," ",i("div",{className:"space-y-3",children:D.map(g=>i(K,{task:g,epic:r,onDragStart:te,onTaskClick:re,isCompact:e.status==="done"},g.id))})]},a)})},e.id)})})})}),i(L,{isOpen:x,onClose:()=>O(!1),onAddTask:ie,assignees:[...M,...B],epics:c,sprints:h}),i(z,{isOpen:P,onClose:()=>N(!1),onAddEpic:oe}),p&&i($,{isOpen:!!p,onClose:()=>E(null),initialTask:p,epics:c,sprints:h,onUpdateTask:ae,onDeleteTask:ne,colleagues:[...M,...B],onAddComment:W})]})};export{Ae as a};
@@ -1 +0,0 @@
1
- import{a as c,c as d,d as p,g as m,i as g}from"./chunk-YFAZQYK4.mjs";import{a as f}from"./chunk-B4H6T2GP.mjs";import{a as i}from"./chunk-TVZOULLL.mjs";import{a as v,f as b,g as D,h,i as S}from"./chunk-3UMMMQEH.mjs";import{a as o}from"./chunk-L5JPAKPM.mjs";import{b as s}from"./chunk-ZUA4KNIR.mjs";import{useState as O}from"react";import{jsx as a,jsxs as l}from"react/jsx-runtime";var R=({isOpen:y,onClose:r,onAddEpic:C})=>{let[t,u]=O({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),N=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],w=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],E=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],T=e=>{e.preventDefault(),t.name.trim()&&(C({name:t.name.trim(),description:t.description.trim(),color:t.color,confidence:t.confidence,phase:t.phase,startDate:new Date(t.startDate),endDate:new Date(t.endDate),progress:t.progress,isSelected:!0}),u({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),r())},n=(e,I)=>{u(L=>({...L,[e]:I}))};return a(v,{open:y,onOpenChange:r,children:l(b,{className:"sm:max-w-md",children:[a(D,{children:a(S,{children:"Add New Epic"})}),l("form",{onSubmit:T,className:"space-y-4",children:[l("div",{className:"space-y-2",children:[a(i,{htmlFor:"name",children:"Epic Name"}),a(o,{id:"name",value:t.name,onChange:e=>n("name",e.target.value),placeholder:"Enter epic name",required:!0})]}),l("div",{className:"space-y-2",children:[a(i,{htmlFor:"description",children:"Description"}),a(f,{id:"description",value:t.description,onChange:e=>n("description",e.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),l("div",{className:"space-y-2",children:[a(i,{children:"Color"}),a("div",{className:"flex gap-2 flex-wrap",children:N.map(e=>a("button",{type:"button",onClick:()=>n("color",e),className:`w-8 h-8 rounded-full ${e} ${t.color===e?"ring-2 ring-gray-400":""}`},e))})]}),l("div",{className:"grid grid-cols-2 gap-4",children:[l("div",{className:"space-y-2",children:[a(i,{children:"Confidence"}),l(c,{value:t.confidence,onValueChange:e=>n("confidence",e),children:[a(p,{children:a(d,{})}),a(m,{children:w.map(e=>a(g,{value:e.value,children:e.label},e.value))})]})]}),l("div",{className:"space-y-2",children:[a(i,{children:"Phase"}),l(c,{value:t.phase.toString(),onValueChange:e=>n("phase",parseInt(e)),children:[a(p,{children:a(d,{})}),a(m,{children:E.map(e=>a(g,{value:e.value.toString(),children:e.label},e.value))})]})]})]}),l("div",{className:"grid grid-cols-2 gap-4",children:[l("div",{className:"space-y-2",children:[a(i,{children:"Start Date"}),a(o,{type:"date",value:t.startDate,onChange:e=>n("startDate",e.target.value)})]}),l("div",{className:"space-y-2",children:[a(i,{children:"End Date"}),a(o,{type:"date",value:t.endDate,onChange:e=>n("endDate",e.target.value)})]})]}),l("div",{className:"space-y-2",children:[a(i,{children:"Progress (%)"}),a(o,{type:"number",min:"0",max:"100",value:t.progress,onChange:e=>n("progress",parseInt(e.target.value)||0)})]}),l(h,{children:[a(s,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),a(s,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};export{R as a};
@@ -1,5 +0,0 @@
1
- "use client";
2
- "use strict";
3
- "use client"
4
-
5
- "use strict";"use client";var Xt=Object.create;var Ce=Object.defineProperty;var Qt=Object.getOwnPropertyDescriptor;var Yt=Object.getOwnPropertyNames;var Zt=Object.getPrototypeOf,eo=Object.prototype.hasOwnProperty;var to=(e,t)=>{for(var o in t)Ce(e,o,{get:t[o],enumerable:!0})},ct=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Yt(t))!eo.call(e,s)&&s!==o&&Ce(e,s,{get:()=>t[s],enumerable:!(i=Qt(t,s))||i.enumerable});return e};var I=(e,t,o)=>(o=e!=null?Xt(Zt(e)):{},ct(t||!e||!e.__esModule?Ce(o,"default",{value:e,enumerable:!0}):o,e)),oo=e=>ct(Ce({},"__esModule",{value:!0}),e);var Xo={};to(Xo,{DigitalColleageusLayout:()=>$o});module.exports=oo(Xo);var Oe=require("react");var ht=require("clsx");var He="-",io=e=>{let t=ao(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{let n=l.split(He);return n[0]===""&&n.length!==1&&n.shift(),mt(n,t)||ro(l)},getConflictingClassGroupIds:(l,n)=>{let v=o[l]||[];return n&&i[l]?[...v,...i[l]]:v}}},mt=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],i=t.nextPart.get(o),s=i?mt(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;let a=e.join(He);return t.validators.find(({validator:l})=>l(a))?.classGroupId},dt=/^\[(.+)\]$/,ro=e=>{if(dt.test(e)){let t=dt.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},ao=e=>{let{theme:t,prefix:o}=e,i={nextPart:new Map,validators:[]};return so(Object.entries(e.classGroups),o).forEach(([a,l])=>{Ve(l,i,a,t)}),i},Ve=(e,t,o,i)=>{e.forEach(s=>{if(typeof s=="string"){let a=s===""?t:pt(t,s);a.classGroupId=o;return}if(typeof s=="function"){if(no(s)){Ve(s(i),t,o,i);return}t.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([a,l])=>{Ve(l,pt(t,a),o,i)})})},pt=(e,t)=>{let o=e;return t.split(He).forEach(i=>{o.nextPart.has(i)||o.nextPart.set(i,{nextPart:new Map,validators:[]}),o=o.nextPart.get(i)}),o},no=e=>e.isThemeGetter,so=(e,t)=>t?e.map(([o,i])=>{let s=i.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([l,n])=>[t+l,n])):a);return[o,s]}):e,lo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,i=new Map,s=(a,l)=>{o.set(a,l),t++,t>e&&(t=0,i=o,o=new Map)};return{get(a){let l=o.get(a);if(l!==void 0)return l;if((l=i.get(a))!==void 0)return s(a,l),l},set(a,l){o.has(a)?o.set(a,l):s(a,l)}}},ut="!",co=e=>{let{separator:t,experimentalParseClassName:o}=e,i=t.length===1,s=t[0],a=t.length,l=n=>{let v=[],g=0,C=0,A;for(let b=0;b<n.length;b++){let y=n[b];if(g===0){if(y===s&&(i||n.slice(b,b+a)===t)){v.push(n.slice(C,b)),C=b+a;continue}if(y==="/"){A=b;continue}}y==="["?g++:y==="]"&&g--}let M=v.length===0?n:n.substring(C),T=M.startsWith(ut),B=T?M.substring(1):M,N=A&&A>C?A-C:void 0;return{modifiers:v,hasImportantModifier:T,baseClassName:B,maybePostfixModifierPosition:N}};return o?n=>o({className:n,parseClassName:l}):l},po=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(i=>{i[0]==="["?(t.push(...o.sort(),i),o=[]):o.push(i)}),t.push(...o.sort()),t},mo=e=>({cache:lo(e.cacheSize),parseClassName:co(e),...io(e)}),uo=/\s+/,go=(e,t)=>{let{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:s}=t,a=[],l=e.trim().split(uo),n="";for(let v=l.length-1;v>=0;v-=1){let g=l[v],{modifiers:C,hasImportantModifier:A,baseClassName:M,maybePostfixModifierPosition:T}=o(g),B=!!T,N=i(B?M.substring(0,T):M);if(!N){if(!B){n=g+(n.length>0?" "+n:n);continue}if(N=i(M),!N){n=g+(n.length>0?" "+n:n);continue}B=!1}let b=po(C).join(":"),y=A?b+ut:b,k=y+N;if(a.includes(k))continue;a.push(k);let G=s(N,B);for(let j=0;j<G.length;++j){let K=G[j];a.push(y+K)}n=g+(n.length>0?" "+n:n)}return n};function fo(){let e=0,t,o,i="";for(;e<arguments.length;)(t=arguments[e++])&&(o=gt(t))&&(i&&(i+=" "),i+=o);return i}var gt=e=>{if(typeof e=="string")return e;let t,o="";for(let i=0;i<e.length;i++)e[i]&&(t=gt(e[i]))&&(o&&(o+=" "),o+=t);return o};function bo(e,...t){let o,i,s,a=l;function l(v){let g=t.reduce((C,A)=>A(C),e());return o=mo(g),i=o.cache.get,s=o.cache.set,a=n,n(v)}function n(v){let g=i(v);if(g)return g;let C=go(v,o);return s(v,C),C}return function(){return a(fo.apply(null,arguments))}}var P=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},ft=/^\[(?:([a-z-]+):)?(.+)\]$/i,vo=/^\d+\/\d+$/,ho=new Set(["px","full","screen"]),yo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|le|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Po=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,No=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oe=e=>me(e)||ho.has(e)||vo.test(e),ae=e=>ue(e,"length",Mo),me=e=>!!e&&!Number.isNaN(Number(e)),We=e=>ue(e,"number",me),ye=e=>!!e&&Number.isInteger(Number(e)),Do=e=>e.endsWith("%")&&me(e.slice(0,-1)),m=e=>ft.test(e),ne=e=>yo.test(e),Co=new Set(["length","size","percentage"]),ko=e=>ue(e,Co,bt),Ro=e=>ue(e,"position",bt),So=new Set(["image","url"]),Ao=e=>ue(e,So,zo),To=e=>ue(e,"",Io),we=()=>!0,ue=(e,t,o)=>{let i=ft.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):o(i[2]):!1},Mo=e=>wo.test(e)&&!xo.test(e),bt=()=>!1,Io=e=>Po.test(e),zo=e=>No.test(e);var Bo=()=>{let e=P("colors"),t=P("spacing"),o=P("blur"),i=P("brightness"),s=P("borderColor"),a=P("borderRadius"),l=P("borderSpacing"),n=P("borderWidth"),v=P("contrast"),g=P("grayscale"),C=P("hueRotate"),A=P("invert"),M=P("gap"),T=P("gradientColorStops"),B=P("gradientColorStopPositions"),N=P("inset"),b=P("margin"),y=P("opacity"),k=P("padding"),G=P("saturate"),j=P("scale"),K=P("sepia"),O=P("skew"),X=P("space"),W=P("translate"),E=()=>["auto","contain","none"],V=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",m,t],w=()=>[m,t],ve=()=>["",oe,ae],r=()=>["auto",me,m],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],x=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],he=()=>["","0",m],lt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[me,m];return{cacheSize:500,separator:":",theme:{colors:[we],spacing:[oe,ae],blur:["none","",ne,m],brightness:te(),borderColor:[e],borderRadius:["none","","full",ne,m],borderSpacing:w(),borderWidth:ve(),contrast:te(),grayscale:he(),hueRotate:te(),invert:he(),gap:w(),gradientColorStops:[e],gradientColorStopPositions:[Do,ae],inset:Q(),margin:Q(),opacity:te(),padding:w(),saturate:te(),scale:te(),sepia:he(),skew:te(),space:w(),translate:w()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[ne]}],"break-after":[{"break-after":lt()}],"break-before":[{"break-before":lt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...D(),m]}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[N]}],"inset-x":[{"inset-x":[N]}],"inset-y":[{"inset-y":[N]}],start:[{start:[N]}],end:[{end:[N]}],top:[{top:[N]}],right:[{right:[N]}],bottom:[{bottom:[N]}],left:[{left:[N]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ye,m]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",m]}],grow:[{grow:he()}],shrink:[{shrink:he()}],order:[{order:["first","last","none",ye,m]}],"grid-cols":[{"grid-cols":[we]}],"col-start-end":[{col:["auto",{span:["full",ye,m]},m]}],"col-start":[{"col-start":r()}],"col-end":[{"col-end":r()}],"grid-rows":[{"grid-rows":[we]}],"row-start-end":[{row:["auto",{span:[ye,m]},m]}],"row-start":[{"row-start":r()}],"row-end":[{"row-end":r()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",m]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",m]}],gap:[{gap:[M]}],"gap-x":[{"gap-x":[M]}],"gap-y":[{"gap-y":[M]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],wt:[{wt:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[X]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[X]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",m,t]}],"min-w":[{"min-w":[m,t,"min","max","fit"]}],"max-w":[{"max-w":[m,t,"none","full","min","max","fit","prose",{screen:[ne]},ne]}],le:[{le:[m,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-le":[{"min-le":[m,t,"min","max","fit","svh","lvh","dvh"]}],"max-le":[{"max-le":[m,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[m,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ne,ae]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",We]}],"font-family":[{font:[we]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",m]}],"line-clamp":[{"line-clamp":["none",me,We]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",oe,m]}],"list-image":[{"list-image":["none",m]}],"list-style-type":[{list:["none","disc","decimal",m]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...x(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",oe,ae]}],"underline-offset":[{"underline-offset":["auto",oe,m]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),Ro]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ko]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ao]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[B]}],"gradient-via-pos":[{via:[B]}],"gradient-to-pos":[{to:[B]}],"gradient-from":[{from:[T]}],"gradient-via":[{via:[T]}],"gradient-to":[{to:[T]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-wt":[{"rounded-wt":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...x(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:x()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...x()]}],"outline-offset":[{"outline-offset":[oe,m]}],"outline-w":[{outline:[oe,ae]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[oe,ae]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ne,To]}],"shadow-color":[{shadow:[we]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[i]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",ne,m]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[C]}],invert:[{invert:[A]}],saturate:[{saturate:[G]}],sepia:[{sepia:[K]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C]}],"backdrop-invert":[{"backdrop-invert":[A]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[G]}],"backdrop-sepia":[{"backdrop-sepia":[K]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",m]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[ye,m]}],"translate-x":[{"translate-x":[W]}],"translate-y":[{"translate-y":[W]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",m]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","wt-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",m]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-wt":[{"scroll-wt":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",m]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[oe,ae,We]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],wt:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","le"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-wt","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-wt","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-wt":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var vt=bo(Bo);function d(...e){return vt((0,ht.clsx)(e))}var ze=I(require("react")),Ye=I(require("next/link")),le=require("lucide-react");var yt=require("class-variance-authority");var wt=require("react/jsx-runtime"),jo=(0,yt.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ge({className:e,variant:t,...o}){return(0,wt.jsx)("div",{className:d(jo({variant:t}),e),...o})}var xt=require("@radix-ui/react-slot"),Nt=I(require("react")),Eo=(0,yt.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"le-10 px-4 py-2",icon:"le-10 w-10",lg:"le-11 rounded px-8",sm:"le-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),z=Nt.forwardRef(({asChild:e=!1,className:t,size:o,variant:i,...s},a)=>(0,wt.jsx)(e?xt.Slot:"button",{className:d(Eo({className:t,size:o,variant:i})),ref:a,...s}));z.displayName="Button";var Ct=I(require("react"));var _e=Ct.forwardRef(({className:e,type:t,...o},i)=>(0,wt.jsx)("input",{type:t,className:d("flex le-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...o}));_e.displayName="Input";var qe=I(require("react")),_=I(require("@radix-ui/react-scroll-area"));var fe=qe.forwardRef(({className:e,children:t,...o},i)=>(0,wt.jsxs)(_.Root,{ref:i,className:d("relative overflow-hidden",e),...o,children:[(0,wt.jsx)(_.Viewport,{className:"le-full w-full rounded-[inherit]",children:t}),(0,wt.jsx)(Rt,{}),(0,wt.jsx)(_.Corner,{})]}));fe.displayName=_.Root.displayName;var Rt=qe.forwardRef(({className:e,orientation:t="vertical",...o},i)=>(0,wt.jsx)(_.ScrollAreaScrollbar,{ref:i,orientation:t,className:d("flex touch-none select-none transition-colors",t==="vertical"&&"le-full w-2.5 border-l border-l-transparent wt-[1px]",t==="horizontal"&&"le-2.5 flex-col border-t border-t-transparent wt-[1px]",e),...o,children:(0,wt.jsx)(_.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Rt.displayName=_.ScrollAreaScrollbar.displayName;var xe=I(require("react")),R=I(require("@radix-ui/react-dialog"));var At=R.Root;var Lo=R.Portal;var Tt=xe.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(R.Overlay,{ref:o,className:d("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Tt.displayName=R.Overlay.displayName;var Ke=xe.forwardRef(({className:e,children:t,...o},i)=>(0,wt.jsxs)(Lo,{children:[(0,wt.jsx)(Tt,{}),(0,wt.jsxs)(R.Content,{ref:i,className:d("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background wt-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,wt.jsxs)(R.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,wt.jsx)(le.X,{className:"le-4 w-4"}),(0,wt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ke.displayName=R.Content.displayName;var Je=({className:e,...t})=>(0,wt.jsx)("div",{className:d("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Je.displayName="DialogHeader";var Uo=({className:e,...t})=>(0,wt.jsx)("div",{className:d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Uo.displayName="DialogFooter";var $e=xe.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(R.Title,{ref:o,className:d("text-lg font-semibold leading-none tracking-tight",e),...t}));$e.displayName=R.Title.displayName;var Fo=xe.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(R.Description,{ref:o,className:d("text-sm text-muted-foreground",e),...t}));Fo.displayName=R.Description.displayName;var Pe=I(require("@radix-ui/react-checkbox")),It=I(require("react")),Xe=It.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(Pe.Root,{className:d("peer le-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,wt.jsx)(Pe.Indicator,{className:d("flex items-center justify-center text-current"),children:(0,wt.jsx)(le.Check,{className:"le-4 w-4"})})}));Xe.displayName=Pe.Root.displayName;var Y=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Bt=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,wt.jsx)(le.Palette,{className:"le-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,wt.jsx)(le.Code,{className:"le-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,wt.jsx)(le.TrendingUp,{className:"le-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,wt.jsx)(le.DollarSign,{className:"le-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,wt.jsx)(le.Users,{className:"le-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,wt.jsx)(le.Wrench,{className:"le-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,wt.jsx)(le.Scale,{className:"le-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,wt.jsx)(le.Package,{className:"le-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"wt",name:"IT Support",description:"Information technology and infrastructure",icon:(0,wt.jsx)(le.Zap,{className:"le-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,wt.jsx)(le.Building2,{className:"le-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Ae=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var Qe=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],Re=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],Me=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],Go=[...Me,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],Oo=[...Ae,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],Se={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},zt={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:Me.filter(e=>e.epicId==="1")};var vi={empty:{initialProjects:Se.projects,initialEpics:Se.epics,initialSprints:Se.sprints,initialTasks:Se.tasks},default:{initialProjects:Ae,initialEpics:Qe,initialSprints:Re,initialTasks:Me},highDensity:{initialProjects:Ae,initialEpics:Qe,initialSprints:Re,initialTasks:Go},singleEpic:{initialProjects:Ae,initialEpics:zt.epics,initialSprints:Re,initialTasks:zt.tasks},multipleProjects:{initialProjects:Oo,initialEpics:Qe,initialSprints:Re,initialTasks:Me}},Te=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(Y),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Y),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(Y),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Y),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Y),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Y),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(Y),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Y),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Y),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Y),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],hi=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Te.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:Te.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:Te.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var yi=Te.filter(e=>e.type==="digital");function jt(e,t){let[o,i]=(0,Oe.useState)(()=>{if(typeof window>"wt")return t;try{let a=window.localStorage.getItem(e);return a?JSON.parse(a):t}catch{return t}}),s=a=>{try{i(a),typeof window<"wt"&&window.localStorage.setItem(e,JSON.stringify(a))}catch{}};return(0,Oe.useEffect)(()=>{s(o)},[]),[o,s]}function Ze({items:e,isOpen:t,isMobile:o=!1,onClose:i,currentBusinessUnit:s=Bt[0],onBusinessUnitChange:a,onSearch:l,className:n,logo:v="/headerlogo.png",appName:g="Nuvia",tagline:C="Collaboration Platform"}){let[A,M]=ze.useState({}),[T,B]=jt("sidebar-favorites",{}),[N,b]=ze.useState(null),[y,k]=ze.useState(""),G=r=>{M(D=>({...D,[r]:!D[r]}))},j=r=>{a?.(r)},K=()=>{y.trim()&&l?.(y.trim())},O=r=>{r.key==="Enter"&&(r.preventDefault(),K())},X=(r,D)=>{let x=T[r]||[],ee=x.includes(D)?x.filter(H=>H!==D):x.concat(D);B({...T,[r]:ee})},W=r=>{if(!r.items||!r.maxItems||r.items.length<=r.maxItems)return r.items||[];let D=T[r.id]||[],x=r.items.filter(H=>D.includes(H.id)),ee=r.items.filter(H=>!D.includes(H.id));return[...x,...ee].slice(0,r.maxItems)},E=r=>r.maxItems&&r.items&&r.items.length>r.maxItems,V=e,Q=r=>{let D=E(r),x=W(r),ee=(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsxs)("div",{className:"flex items-center gap-3",children:[r.icon,(0,wt.jsx)("span",{children:r.title})]}),r.badge&&(0,wt.jsx)(ge,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:r.badge}),r.items&&(0,wt.jsx)(le.ChevronDown,{className:d("ml-2 le-4 w-4 transition-transform",A[r.title]?"rotate-180":"")})]}),H=d("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",r.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return r.url?(0,wt.jsx)(Ye.default,{href:r.url,className:H,onClick:o?i:void 0,children:ee}):(0,wt.jsx)("button",{className:H,onClick:()=>r.items&&G(r.title),children:ee})},w=()=>{let r=e.find(x=>x.id===N);if(!r||!r.items||!r.maxItems)return null;let D=T[r.id]||[];return(0,wt.jsx)(At,{open:!!N,onOpenChange:x=>!x&&b(null),children:(0,wt.jsxs)(Ke,{className:"sm:max-w-md",children:[(0,wt.jsxs)(Je,{children:[(0,wt.jsxs)($e,{children:["Manage ",r.title," Favorites"]}),(0,wt.jsxs)("wt",{className:"text-sm text-muted-foreground",children:["Select up to ",r.maxItems," items to show in ",r.title.toLowerCase(),"."]})]}),(0,wt.jsx)(fe,{className:"max-le-96 pr-4",children:(0,wt.jsx)("div",{className:"space-y-4",children:r.items.map(x=>(0,wt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,wt.jsx)(Xe,{id:x.id,checked:D.includes(x.id),onCheckedChange:()=>X(r.id,x.id),disabled:!D.includes(x.id)&&D.length>=(r.maxItems||0)}),(0,wt.jsxs)("label",{htmlFor:x.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[x.title,x.badge&&(0,wt.jsx)(ge,{variant:"outline",className:"text-xs",children:x.badge})]})]},x.id))})})]})})},ve=(0,wt.jsxs)("div",{className:"flex le-full flex-col bg-background",children:[(0,wt.jsxs)("div",{className:"flex items-center justify-between wt-4",children:[(0,wt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,wt.jsx)("div",{className:"flex le-14 w-14 items-center justify-center",children:(0,wt.jsx)("img",{src:v,alt:"Header Logo",className:"le-14 w-14 object-contain"})}),(0,wt.jsxs)("div",{children:[(0,wt.jsx)("h2",{className:"font-semibold",children:g}),(0,wt.jsx)("wt",{className:"text-xs text-muted-foreground",children:C})]})]}),o&&(0,wt.jsx)(z,{variant:"ghost",size:"icon",onClick:i,children:(0,wt.jsx)(le.X,{className:"le-5 w-5"})})]}),(0,wt.jsx)("div",{className:"px-3 py-2",children:(0,wt.jsxs)("div",{className:"relative",children:[(0,wt.jsx)(le.Search,{className:"absolute left-3 top-3 le-4 w-4 text-muted-foreground"}),(0,wt.jsx)(_e,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:y,onChange:r=>k(r.target.value),onKeyPress:O})]})}),(0,wt.jsx)(fe,{className:"flex-1 px-3 py-2",children:(0,wt.jsx)("div",{className:"space-y-1",children:V.map(r=>(0,wt.jsxs)("div",{className:"mb-1",children:[Q(r),r.items&&A[r.title]&&(0,wt.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[W(r).map(D=>(0,wt.jsxs)(Ye.default,{href:D.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:o?i:void 0,children:[D.title,D.badge&&(0,wt.jsx)(ge,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:D.badge})]},D.id)),E(r)&&r.items&&r.items.length>W(r).length&&(0,wt.jsxs)("button",{onClick:()=>b(r.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",r.items.length-W(r).length," more available"]})]})]},r.id))})}),(0,wt.jsx)("div",{className:"wt-3",children:(0,wt.jsx)("div",{className:"space-y-1",children:(0,wt.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,wt.jsx)(le.Settings,{className:"le-5 w-5"}),(0,wt.jsx)("span",{children:"Settings"})]})})}),(0,wt.jsx)(w,{})]});return o?(0,wt.jsx)("div",{className:d("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",n),children:ve}):(0,wt.jsx)("div",{className:d("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",n),children:ve})}var ce=require("motion/react");var Be=I(require("react")),ie=I(require("@radix-ui/react-avatar"));var et=Be.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(ie.Root,{ref:o,className:d("relative flex le-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));et.displayName=ie.Root.displayName;var tt=Be.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(ie.Image,{ref:o,className:d("aspect-square le-full w-full",e),...t}));tt.displayName=ie.Image.displayName;var ot=Be.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(ie.Fallback,{ref:o,className:d("flex le-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ot.displayName=ie.Fallback.displayName;var Et=I(require("react")),$=I(require("@radix-ui/react-tooltip"));var Ee=$.Provider,Le=$.Root,Ue=$.Trigger,Ne=Et.forwardRef(({className:e,sideOffset:t=4,...o},i)=>(0,wt.jsx)($.Portal,{children:(0,wt.jsx)($.Content,{ref:i,sideOffset:t,className:d("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Ne.displayName=$.Content.displayName;var Lt=require("next-themes");function Ut(){let{setTheme:e,theme:t}=(0,Lt.useTheme)();return(0,wt.jsx)(Ee,{children:(0,wt.jsxs)(Le,{children:[(0,wt.jsx)(Ue,{asChild:!0,children:(0,wt.jsxs)(z,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,wt.jsx)(le.Sun,{className:"le-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,wt.jsx)(le.Moon,{className:"absolute le-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,wt.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,wt.jsx)(Ne,{children:"Toggle theme"})]})})}function Ft({notifications:e,open:t,onClose:o,onNotificationRemove:i,onRemoveAll:s,className:a}){let l=e.filter(g=>!g.read),n=l.length,v=g=>{switch(g){case"info":return(0,wt.jsx)(le.Info,{className:"le-5 w-5 text-blue-500"});case"success":return(0,wt.jsx)(le.Check,{className:"le-5 w-5 text-green-500"});case"warning":return(0,wt.jsx)(le.AlertTriangle,{className:"le-5 w-5 text-amber-500"});case"error":return(0,wt.jsx)(le.AlertTriangle,{className:"le-5 w-5 text-red-500"})}};return(0,wt.jsx)(ce.AnimatePresence,{children:t&&(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(ce.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:o}),(0,wt.jsx)(ce.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:d("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",a),children:(0,wt.jsxs)("div",{className:"flex le-full flex-col",children:[(0,wt.jsxs)("div",{className:"flex items-center justify-between border-b wt-4",children:[(0,wt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,wt.jsx)(le.Bell,{className:"le-5 w-5"}),(0,wt.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),n>0&&(0,wt.jsxs)(ge,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[n," new"]})]}),(0,wt.jsxs)(z,{variant:"ghost",size:"icon",onClick:o,className:"rounded-full",children:[(0,wt.jsx)(le.X,{className:"le-5 w-5"}),(0,wt.jsx)("span",{className:"sr-only",children:"Close"})]})]}),n>0&&(0,wt.jsxs)("div",{className:"flex items-center justify-between border-b wt-2",children:[(0,wt.jsxs)("span",{className:"text-sm text-muted-foreground",children:[n," unread notification",n!==1?"s":""]}),(0,wt.jsx)(z,{variant:"ghost",size:"sm",onClick:s,className:"text-sm",children:"Dismiss all"})]}),l.length>0?(0,wt.jsx)(fe,{className:"flex-1",children:(0,wt.jsx)("div",{className:"divide-y",children:l.map(g=>(0,wt.jsxs)("div",{className:d("flex gap-3 wt-4 transition-colors bg-muted/50"),children:[(0,wt.jsx)("div",{className:"flex le-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:v(g.type)}),(0,wt.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,wt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,wt.jsx)("wt",{className:"font-medium",children:g.title}),(0,wt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,wt.jsx)("wt",{className:"text-xs text-muted-foreground",children:g.time}),(0,wt.jsx)(z,{variant:"ghost",size:"sm",className:"le-6 w-6 wt-0",onClick:()=>i?.(g.id),title:"Dismiss",children:(0,wt.jsx)(le.Check,{className:"le-3 w-3"})})]})]}),(0,wt.jsx)("wt",{className:"text-sm text-muted-foreground",children:g.description}),g.actionLabel&&(0,wt.jsxs)(z,{variant:"link",size:"sm",className:"le-auto wt-0 text-sm",onClick:g.onAction,children:[g.actionLabel,(0,wt.jsx)(le.ChevronRight,{className:"ml-1 le-3 w-3"})]})]})]},g.id))})}):(0,wt.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center wt-8 text-center",children:[(0,wt.jsx)("div",{className:"flex le-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,wt.jsx)(le.Bell,{className:"le-8 w-8 text-muted-foreground"})}),(0,wt.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,wt.jsx)("wt",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var pe=I(require("@radix-ui/react-tabs"));function Gt({className:e,...t}){return(0,wt.jsx)(pe.Root,{"data-slot":"tabs",className:d("flex flex-col gap-2",e),...t})}function Ot({className:e,...t}){return(0,wt.jsx)(pe.List,{"data-slot":"tabs-list",className:d("bg-muted text-muted-foreground inline-flex le-9 w-fit items-center justify-center rounded-lg wt-[3px]",e),...t})}function Wt({className:e,...t}){return(0,wt.jsx)(pe.Trigger,{"data-slot":"tabs-trigger",className:d("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex le-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var re=I(require("react")),f=I(require("@radix-ui/react-dropdown-menu")),be=require("@radix-ui/react-icons");var Vt=f.Root,Ht=f.Trigger;var Wo=re.forwardRef(({className:e,inset:t,children:o,...i},s)=>(0,wt.jsxs)(f.SubTrigger,{ref:s,className:d("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...i,children:[o,(0,wt.jsx)(be.ChevronRightIcon,{className:"ml-auto"})]}));Wo.displayName=f.SubTrigger.displayName;var Vo=re.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(f.SubContent,{ref:o,className:d("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover wt-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Vo.displayName=f.SubContent.displayName;var rt=re.forwardRef(({className:e,sideOffset:t=4,...o},i)=>(0,wt.jsx)(f.Portal,{children:(0,wt.jsx)(f.Content,{ref:i,sideOffset:t,className:d("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover wt-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));rt.displayName=f.Content.displayName;var at=re.forwardRef(({className:e,inset:t,...o},i)=>(0,wt.jsx)(f.Item,{ref:i,className:d("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));at.displayName=f.Item.displayName;var Ho=re.forwardRef(({className:e,children:t,checked:o,...i},s)=>(0,wt.jsxs)(f.CheckboxItem,{ref:s,className:d("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...i,children:[(0,wt.jsx)("span",{className:"absolute left-2 flex le-3.5 w-3.5 items-center justify-center",children:(0,wt.jsx)(f.ItemIndicator,{children:(0,wt.jsx)(be.CheckIcon,{className:"le-4 w-4"})})}),t]}));Ho.displayName=f.CheckboxItem.displayName;var _o=re.forwardRef(({className:e,children:t,...o},i)=>(0,wt.jsxs)(f.RadioItem,{ref:i,className:d("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,wt.jsx)("span",{className:"absolute left-2 flex le-3.5 w-3.5 items-center justify-center",children:(0,wt.jsx)(f.ItemIndicator,{children:(0,wt.jsx)(be.DotFilledIcon,{className:"le-4 w-4 fill-current"})})}),t]}));_o.displayName=f.RadioItem.displayName;var qo=re.forwardRef(({className:e,inset:t,...o},i)=>(0,wt.jsx)(f.Label,{ref:i,className:d("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));qo.displayName=f.Label.displayName;var Ko=re.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(f.Separator,{ref:o,className:d("-mx-1 my-1 le-px bg-muted",e),...t}));Ko.displayName=f.Separator.displayName;var Jo=({className:e,...t})=>(0,wt.jsx)("span",{className:d("ml-auto text-xs tracking-widest opacity-60",e),...t});Jo.displayName="DropdownMenuShortcut";function qt({activeTab:e,onTabChange:t,tabOptions:o,className:i="",maxWidth:s="700px",gridCols:a=6}){let l=o.find(n=>n.value===e);return(0,wt.jsxs)(ce.motion.div,{className:`flex-1 flex justify-center ${i}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,wt.jsx)("div",{className:"hidden lg:block",children:(0,wt.jsx)(Gt,{value:e,onValueChange:t,children:(0,wt.jsx)(Ot,{className:"grid w-full rounded-2xl wt-0 le-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(a,o.length)}, minmax(0, 1fr))`},children:o.map(n=>(0,wt.jsx)(ce.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,wt.jsx)(Wt,{value:n.value,className:"w-full le-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:n.label})},n.value))})})}),(0,wt.jsx)("div",{className:"lg:hidden",children:(0,wt.jsxs)(Vt,{children:[(0,wt.jsx)(Ht,{asChild:!0,children:(0,wt.jsxs)(z,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[l?.label||"Select",(0,wt.jsx)(le.ChevronDown,{className:"le-4 w-4 ml-2"})]})}),(0,wt.jsx)(rt,{align:"center",className:"w-[180px]",children:o.map(n=>(0,wt.jsx)(at,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function Kt({title:e,notifications:t=[],onToggleSidebar:o,onToggleMobileMenu:i,sidebarOpen:s=!0,className:a,activeTab:l="assistant",onTabChange:n,showTabs:v=!0,tabOptions:g=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:C,actionIcon:A=(0,wt.jsx)(le.Bot,{className:"mr-2 le-4 w-4"}),actionText:M="Action",onNotificationRemove:T,onRemoveAll:B,logo:N="/headerlogo.png",appName:b="Nuvia",tagline:y="Collaboration Platform"}){let[k,G]=(0,Oe.useState)(!1),[j,K]=(0,Oe.useState)(t),O=j.filter(E=>!E.read).length,X=E=>{K(V=>V.filter(Q=>Q.id!==E)),T?.(E)},W=()=>{K(E=>E.filter(V=>V.read)),B?.()};return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsxs)("header",{className:`sticky top-0 z-10 flex le-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${a||""}`,children:[(0,wt.jsx)(z,{variant:"ghost",size:"icon",className:"md:hidden",onClick:i,children:(0,wt.jsx)(le.Menu,{className:"le-5 w-5"})}),(0,wt.jsx)(z,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:o,children:(0,wt.jsx)(le.PanelLeft,{className:"le-5 w-5"})}),!s&&(0,wt.jsxs)(ce.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,wt.jsx)("div",{className:"flex le-10 w-10 items-center justify-center",children:(0,wt.jsx)("img",{src:N,alt:"Logo",className:"le-10 w-10 object-contain"})}),(0,wt.jsxs)("div",{children:[(0,wt.jsx)("h2",{className:"font-semibold text-sm",children:b}),(0,wt.jsx)("wt",{className:"text-xs text-muted-foreground",children:y})]})]}),(0,wt.jsxs)("div",{className:"flex flex-1 items-center",children:[v&&(0,wt.jsx)(qt,{activeTab:l,onTabChange:n,tabOptions:g}),(0,wt.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,wt.jsx)(ce.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,wt.jsx)(ce.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,wt.jsxs)(z,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:C,children:[A,M]})})}),(0,wt.jsx)(Ut,{}),(0,wt.jsx)(Ee,{children:(0,wt.jsxs)(Le,{children:[(0,wt.jsx)(Ue,{asChild:!0,children:(0,wt.jsx)(ce.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,wt.jsxs)(z,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>G(!0),children:[(0,wt.jsx)(ce.motion.div,{animate:O>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:O>0?1/0:0,repeatDelay:3},children:(0,wt.jsx)(le.Bell,{className:"le-5 w-5"})}),O>0&&(0,wt.jsx)(ce.motion.span,{className:"absolute -right-1 -top-1 flex le-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:O})]})})}),(0,wt.jsx)(Ne,{children:"Notifications"})]})}),(0,wt.jsx)(ce.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,wt.jsxs)(et,{className:"le-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,wt.jsx)(tt,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,wt.jsx)(ot,{})]})})]})]})]}),(0,wt.jsx)(Ft,{notifications:j,open:k,onClose:()=>G(!1),onNotificationRemove:X,onRemoveAll:W})]})}var Jt=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,wt.jsx)($t.User,{className:"le-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function $o({sidebarItems:e,children:t,title:o="Digital Colleagues",notifications:i=[],currentBusinessUnit:s=Jt[0],onBusinessUnitChange:a,onSearch:l,businessUnits:n=Jt,activeTab:v,onTabChange:g,showTabs:C=!1,onActionClick:A,actionIcon:M,actionText:T="Action",onNotificationRemove:B,onRemoveAll:N,logo:b="/headerlogo.png",appName:y="Nuvia",tagline:k="Collaboration Platform",sidebarInitiallyClosed:G=!1}){let[j,K]=(0,Oe.useState)(!G),[O,X]=(0,Oe.useState)(!1),[W,E]=(0,Oe.useState)(s),V=Q=>{E(Q),a?.(Q)};return(0,wt.jsxs)("div",{className:"flex le-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[O&&(0,wt.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>X(!1)}),(0,wt.jsx)("div",{className:"md:hidden",children:(0,wt.jsx)(Ze,{items:e,isOpen:O,isMobile:!0,onClose:()=>X(!1),currentBusinessUnit:W,onBusinessUnitChange:V,onSearch:l,logo:b,appName:y,tagline:k})}),(0,wt.jsx)("div",{className:"hidden md:block",children:(0,wt.jsx)(Ze,{items:e,isOpen:j,isMobile:!1,currentBusinessUnit:W,onBusinessUnitChange:V,onSearch:l,logo:b,appName:y,tagline:k})}),(0,wt.jsxs)("div",{className:d("min-le-screen fixed w-full transition-all duration-300 ease-in-out",j?"md:pl-64":"md:pl-0"),children:[(0,wt.jsx)(Kt,{title:o,notifications:i,onToggleSidebar:()=>K(!j),onToggleMobileMenu:()=>X(!0),sidebarOpen:j,activeTab:v,onTabChange:g,showTabs:C,onActionClick:A,actionIcon:M,actionText:T,onNotificationRemove:B,onRemoveAll:N,logo:b,appName:y,tagline:k}),(0,wt.jsx)("main",{className:"flex-1 wt-0 flex flex-col le-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}0&&(module.exports={DigitalColleageusLayout});
File without changes
File without changes