cortex-react-components 2.19.2 → 2.19.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 (96) hide show
  1. package/dist/chunk-2HZGIJKZ.mjs +4 -0
  2. package/dist/{chunk-UECG3SCG.mjs → chunk-5PJLI46T.mjs} +1 -1
  3. package/dist/{chunk-BHH5Q4FN.mjs → chunk-6KBZDPTR.mjs} +1 -1
  4. package/dist/{chunk-V6GK2FJG.mjs → chunk-CQAMS7RZ.mjs} +1 -1
  5. package/dist/chunk-DKGSNR4I.mjs +4 -0
  6. package/dist/{chunk-RRME4EHD.mjs → chunk-DPZHVBGG.mjs} +1 -1
  7. package/dist/{chunk-CRSGNLV4.mjs → chunk-FCZZXVGM.mjs} +1 -1
  8. package/dist/chunk-GAU24H4A.mjs +1 -0
  9. package/dist/chunk-HB57GPGK.mjs +4 -0
  10. package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
  11. package/dist/{chunk-5EQXJS23.mjs → chunk-JCWFPKF3.mjs} +1 -1
  12. package/dist/{chunk-OQCMTGML.mjs → chunk-KVLUT4U2.mjs} +1 -1
  13. package/dist/{chunk-ITJH72Z2.mjs → chunk-LAQ3QAUW.mjs} +1 -1
  14. package/dist/{chunk-L5NPH5RX.mjs → chunk-LLP4EFT4.mjs} +1 -1
  15. package/dist/{chunk-543D6MX5.mjs → chunk-NDRBWR7I.mjs} +1 -1
  16. package/dist/{chunk-VOOU7RBN.mjs → chunk-NH32U7JS.mjs} +1 -1
  17. package/dist/{chunk-KZAYLEFB.mjs → chunk-O24GFE6Q.mjs} +1 -1
  18. package/dist/{chunk-NN4QIXZ2.mjs → chunk-PTJVI53B.mjs} +1 -1
  19. package/dist/{chunk-HNHUOQGZ.mjs → chunk-QAJBJFRP.mjs} +1 -1
  20. package/dist/{chunk-D6K6RO5P.mjs → chunk-R5P4ZICA.mjs} +1 -1
  21. package/dist/{chunk-6R6NYDWN.mjs → chunk-RS4VD3ML.mjs} +1 -1
  22. package/dist/{chunk-2UNIT7NC.mjs → chunk-UPRS7OYQ.mjs} +1 -1
  23. package/dist/{chunk-6PS55VJZ.mjs → chunk-VDFRWGXR.mjs} +1 -1
  24. package/dist/{chunk-4NBXE4IK.mjs → chunk-ZXKQDAXG.mjs} +1 -1
  25. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  26. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  27. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  28. package/dist/components/DigitalColleagues/index.mjs +1 -1
  29. package/dist/components/Foundary/MainPage.mjs +1 -1
  30. package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
  31. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  32. package/dist/components/Foundary/RichText/index.mjs +1 -1
  33. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  34. package/dist/components/Foundary/Views/ColleaguesView.js +1 -1
  35. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  36. package/dist/components/Foundary/Views/KnowledgeView.js +1 -1
  37. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  38. package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
  39. package/dist/components/Foundary/Views/index.js +1 -1
  40. package/dist/components/Foundary/Views/index.mjs +1 -1
  41. package/dist/components/Foundary/colleague-card.js +1 -1
  42. package/dist/components/Foundary/colleague-card.mjs +1 -1
  43. package/dist/components/Foundary/document-edit.mjs +1 -1
  44. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  45. package/dist/components/Foundary/document-preview.mjs +1 -1
  46. package/dist/components/Foundary/index.js +1 -1
  47. package/dist/components/Foundary/index.mjs +1 -1
  48. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  49. package/dist/components/HeaderFooter/Header.mjs +1 -1
  50. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  51. package/dist/components/HeaderFooter/index.mjs +1 -1
  52. package/dist/components/Heros/RenderHero.mjs +1 -1
  53. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  54. package/dist/components/Heros/index.mjs +1 -1
  55. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  56. package/dist/components/Holidays/index.mjs +1 -1
  57. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  58. package/dist/components/Layouts/Print.mjs +1 -1
  59. package/dist/components/Layouts/SlideShow.mjs +1 -1
  60. package/dist/components/Layouts/index.mjs +1 -1
  61. package/dist/components/Other/index.mjs +1 -1
  62. package/dist/components/Payload/index.mjs +1 -1
  63. package/dist/components/Projects/EpicsView.mjs +1 -1
  64. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  65. package/dist/components/Projects/ProjectPage.mjs +1 -1
  66. package/dist/components/Projects/ProjectView.mjs +1 -1
  67. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  68. package/dist/components/Projects/index.mjs +1 -1
  69. package/dist/components/dc-temp/index.mjs +1 -1
  70. package/dist/components/dc-temp/utils.mjs +1 -1
  71. package/dist/components/index.js +11 -11
  72. package/dist/components/index.mjs +1 -1
  73. package/dist/globals.css +1 -1
  74. package/dist/index.js +21 -21
  75. package/dist/index.mjs +1 -1
  76. package/dist/metafile-cjs.json +1 -1
  77. package/dist/metafile-esm.json +1 -1
  78. package/dist/pages/Blog.mjs +1 -1
  79. package/dist/pages/Documentation.mjs +1 -1
  80. package/dist/pages/IndexPage.mjs +1 -1
  81. package/dist/pages/Intranet.mjs +1 -1
  82. package/dist/pages/LandingPage.mjs +1 -1
  83. package/dist/pages/Page.mjs +1 -1
  84. package/dist/pages/Publish.mjs +1 -1
  85. package/dist/pages/Website.mjs +1 -1
  86. package/dist/sections/AboutSection.mjs +1 -1
  87. package/dist/sections/BlogDetail.mjs +1 -1
  88. package/dist/sections/BlogList.mjs +1 -1
  89. package/dist/sections/PageSections.mjs +1 -1
  90. package/dist/sections/PricingSection.mjs +1 -1
  91. package/dist/sections/ServiceSection.mjs +1 -1
  92. package/dist/sections/index.mjs +1 -1
  93. package/package.json +1 -1
  94. package/dist/chunk-275W7H4O.mjs +0 -4
  95. package/dist/chunk-ATBKMJU6.mjs +0 -4
  96. package/dist/chunk-NZSQITPU.mjs +0 -4
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as p}from"./chunk-W2LPR7SX.mjs";import{a as u}from"./chunk-U2OXF7PJ.mjs";import{a as c}from"./chunk-FCZZXVGM.mjs";import{useEffect as D,useState as r}from"react";import{Fragment as N,jsx as e,jsxs as d}from"react/jsx-runtime";function y({documents:f=[],contexts:n=[],onDocumentClick:x=o=>console.log("Document clicked:",o),onDocumentShare:g=o=>console.log("Share document:",o),onLoadDocumentContent:A,selectedDocumentId:w,onAddKnowledge:m,onAddTeamContext:a,onDocumentUpdate:v}){let[o,s]=r(n[0]),[C,i]=r(!1),[K,l]=r(!1);D(()=>{!o&&n&&n.length>0&&s(n[0])},[n]);let b=t=>{m&&m(t),i(!1)},h=t=>{a&&a(t),l(!1)};return d("div",{className:"flex flex-col h-full",children:[e("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:n&&n.length>0&&d("div",{className:"",children:[e("div",{className:"",children:d("nav",{className:"-mb-px flex justify-between items-center",children:[e("div",{className:"flex space-x-8 overflow-x-auto",children:n.map(t=>d("button",{onClick:()=>s(t),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${o?.id===t.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[t.icon,t.label]},t.id))}),d("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e("button",{onClick:()=>i(!0),className:"inline-flex border border-primary rounded-xl items-center py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:"Add Knowledge"}),e("button",{onClick:()=>l(!0),className:"inline-flex border border-primary rounded-xl items-center gap-2 py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:"Add Context"})]})]})}),o?.description&&e("div",{className:"mt-3 px-1",children:e("p",{className:"text-sm text-primary",children:o?.description})})]})}),o?e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:e("div",{className:"h-full rounded-xl border overflow-hidden",children:e(c,{documents:f,menuConfig:o?.menuConfig,onDocumentClick:x,onDocumentShare:g,selectedDocumentId:w,onDocumentUpdate:v})})}):e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:e("p",{className:"text-muted-foreground",children:"No contexts available"})}),d(N,{children:[e(u,{isOpen:K,onClose:()=>l(!1),onAddTeamContext:h}),e(p,{isOpen:C,onClose:()=>i(!1),onAddKnowledge:b,knowledgeContexts:n})]})]})}export{y as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as Q}from"./chunk-QOZ2O3FG.mjs";import{a as z}from"./chunk-L5NPH5RX.mjs";import{a as L}from"./chunk-2R3MJSQ7.mjs";import{a as J}from"./chunk-6PS55VJZ.mjs";import{a as q}from"./chunk-L3V5YDPH.mjs";import{a as W}from"./chunk-QC2UWZWL.mjs";import{a as H}from"./chunk-NAGBKKTZ.mjs";import{a as K}from"./chunk-EOR2BAI2.mjs";import{a as O}from"./chunk-UVHMI3PU.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:f=[],initialEpics:h=[],initialSprints:A=[],initialProjects:D=[],initialReminders:v=[],initialColleagues:S=[],initialUsers:E=[],initialFiles:w=[],initialView:C="kanban",onAddTask:X,onUpdateTask:Y,onDeleteTask:Z,onTaskClick:Ye,onAddEpic:_,onUpdateEpic:$,onDeleteEpic:ee,onAddTaskToEpic:Ze,onAddSprint:te,onUpdateSprint:ne,onDeleteSprint:ie,onAddProject:se,onUpdateProject:ae,onDeleteProject:oe,onFileAdd:de,onFileEdit:re,onFileDelete:le,onFileClick:ce,onAddReminder:pe,onUpdateReminder:me,onDeleteReminder:ke,onViewChange:Te,onToggleMobileMenu:ue,onTeamClick:_e,onTeamChange:$e,onCopilotClick:et,handleAddComment:ge}){let[c,d]=s(f),[l,p]=s(h),[m,k]=s(A),[fe,T]=s(D),[he,u]=s(v),[P,Ae]=s(S),[F,De]=s(E),[ve,y]=s(w),[Se,R]=s(!1),[Ee,M]=s(!1),[we,N]=s(null),[Ce,Pe]=s(null),[V,j]=s(null),[r,I]=s(C||"kanban"),[tt,Ue]=s(!1),be=Je();o(()=>{d(f)},[f]),o(()=>{k(A)},[A]),o(()=>{p(h)},[h]),o(()=>{T(D)},[D]),o(()=>{y(w)},[w]),o(()=>{De(E)},[E]),o(()=>{Ae(S)},[S]),o(()=>{u(v)},[v]),o(()=>{I(C)},[C]);let Oe=c.filter(e=>{}),nt=e=>Oe.filter(t=>t.status===e),it=e=>{let t={};return l.forEach(n=>{}),t},st=e=>{j(e)},at=e=>{V&&(d(t=>t.map(n=>n.id===V.id?{...n,status:e}:n)),j(null))},B=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};d(n=>[...n,t]),X?.(t)},g=async(e,t)=>(d(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),await Y?.(e,t)),ot=async(e,t)=>{g(e,t)},x=e=>{d(t=>t.filter(n=>n.id!==Number(e))),we?.id===Number(e)&&N(null),Z?.(e)},dt=async e=>{x(e)},rt=e=>{let t={...e,id:Date.now()};T(n=>[...n,t]),se?.(e)},lt=(e,t)=>{T(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ae?.(e,t)},ct=e=>{T(t=>t.filter(n=>n.id!==Number(e))),oe?.(e)},G=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(n=>[...n,t]),_?.({...t})},Fe=()=>{M(!0)},ye=(e,t)=>{p(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),$?.(e,t)},Re=e=>{p(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.filter(n=>O(n.epic)!==Number(e))),ee?.(e)},Me=e=>{let t={...e,id:Date.now()};k(n=>[...n,t]),te?.(e)},Ne=(e,t)=>{k(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ne?.(e,t)},Ve=e=>{e==="backlog"||e==="all-tasks"||(k(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.map(n=>O(n.sprint)===Number(e)?{...n,sprint:void 0}:n)),ie?.(e))},U=e=>{N(e)},je=e=>{e==="planning"&&window.innerWidth<768||(I(e),Te?.(e))},pt=()=>{Ue(e=>!e),ue?.()},mt=()=>{be.push("/")},kt=e=>{console.log("Switching to team:",e)},Tt=e=>{console.log("Switching to team:",e)},Ie=e=>{R(!0)},Be=()=>{R(!1),Pe(null)},xe=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString()};u(n=>[...n,t]),pe?.(e)},Ge=(e,t)=>{u(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),me?.(e,t)},He=e=>{u(t=>t.filter(n=>n.id!==Number(e))),ke?.(e)},Ke=()=>{de?.()},We=e=>{re?.(e)},qe=e=>{y(t=>t.filter(n=>n.name!==e)),le?.(e)},ze=e=>{ce?.(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"}],gt=()=>{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"}},b=[{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")}],ft=b.sort((e,t)=>t.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),ht=b.length>3,At=b.slice(3);return Qe(K,{currentView:r,onViewChange:je,children:[r==="kanban"&&a("div",{className:"h-full overflow-hidden",children:a(z,{initialProjects:fe,initialEpics:l,initialSprints:m.map(e=>({...e,isSelected:!1})),initialTasks:c,initialColleagues:P,initialUsers:F,onAddTask:B,onUpdateTask:g,onDeleteTask:x,onTaskClick:U,onAddEpic:G,onAddComment:ge})}),r==="planning"&&a("div",{className:"hidden md:block h-full",children:a(L,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddSprint:Me,onUpdateSprint:Ne,onDeleteSprint:Ve})}),r==="tasks"&&a("div",{className:"h-full",children:a(Q,{initialReminders:he,initialColleagues:P,onAddReminder:xe,onUpdateReminder:Ge,onDeleteReminder:He})}),r==="files"&&a("div",{className:"h-full",children:a(H,{initialFiles:ve,onFileAdd:Ke,onFileEdit:We,onFileDelete:qe,onFileClick:ze,compactView:!1})}),r==="epics"&&a("div",{className:"h-full",children:a(J,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddTaskToEpic:Ie,onAddEpic:Fe,onUpdateEpic:ye,onDeleteEpic:Re})}),a(W,{isOpen:Se,onClose:Be,onAddTask:B,epics:l,sprints:m,assignees:[...P,...F],defaultEpicId:Ce||void 0}),a(q,{isOpen:Ee,onClose:()=>M(!1),onAddEpic:G})]})}export{Le as a};
4
+ import{a as Q}from"./chunk-QOZ2O3FG.mjs";import{a as L}from"./chunk-2R3MJSQ7.mjs";import{a as J}from"./chunk-VDFRWGXR.mjs";import{a as z}from"./chunk-LLP4EFT4.mjs";import{a as W}from"./chunk-QC2UWZWL.mjs";import{a as H}from"./chunk-NAGBKKTZ.mjs";import{a as q}from"./chunk-L3V5YDPH.mjs";import{a as K}from"./chunk-EOR2BAI2.mjs";import{a as O}from"./chunk-UVHMI3PU.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:f=[],initialEpics:h=[],initialSprints:A=[],initialProjects:D=[],initialReminders:v=[],initialColleagues:S=[],initialUsers:E=[],initialFiles:w=[],initialView:C="kanban",onAddTask:X,onUpdateTask:Y,onDeleteTask:Z,onTaskClick:Ye,onAddEpic:_,onUpdateEpic:$,onDeleteEpic:ee,onAddTaskToEpic:Ze,onAddSprint:te,onUpdateSprint:ne,onDeleteSprint:ie,onAddProject:se,onUpdateProject:ae,onDeleteProject:oe,onFileAdd:de,onFileEdit:re,onFileDelete:le,onFileClick:ce,onAddReminder:pe,onUpdateReminder:me,onDeleteReminder:ke,onViewChange:Te,onToggleMobileMenu:ue,onTeamClick:_e,onTeamChange:$e,onCopilotClick:et,handleAddComment:ge}){let[c,d]=s(f),[l,p]=s(h),[m,k]=s(A),[fe,T]=s(D),[he,u]=s(v),[P,Ae]=s(S),[F,De]=s(E),[ve,y]=s(w),[Se,R]=s(!1),[Ee,M]=s(!1),[we,N]=s(null),[Ce,Pe]=s(null),[V,j]=s(null),[r,I]=s(C||"kanban"),[tt,Ue]=s(!1),be=Je();o(()=>{d(f)},[f]),o(()=>{k(A)},[A]),o(()=>{p(h)},[h]),o(()=>{T(D)},[D]),o(()=>{y(w)},[w]),o(()=>{De(E)},[E]),o(()=>{Ae(S)},[S]),o(()=>{u(v)},[v]),o(()=>{I(C)},[C]);let Oe=c.filter(e=>{}),nt=e=>Oe.filter(t=>t.status===e),it=e=>{let t={};return l.forEach(n=>{}),t},st=e=>{j(e)},at=e=>{V&&(d(t=>t.map(n=>n.id===V.id?{...n,status:e}:n)),j(null))},B=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};d(n=>[...n,t]),X?.(t)},g=async(e,t)=>(d(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),await Y?.(e,t)),ot=async(e,t)=>{g(e,t)},x=e=>{d(t=>t.filter(n=>n.id!==Number(e))),we?.id===Number(e)&&N(null),Z?.(e)},dt=async e=>{x(e)},rt=e=>{let t={...e,id:Date.now()};T(n=>[...n,t]),se?.(e)},lt=(e,t)=>{T(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ae?.(e,t)},ct=e=>{T(t=>t.filter(n=>n.id!==Number(e))),oe?.(e)},G=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(n=>[...n,t]),_?.({...t})},Fe=()=>{M(!0)},ye=(e,t)=>{p(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),$?.(e,t)},Re=e=>{p(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.filter(n=>O(n.epic)!==Number(e))),ee?.(e)},Me=e=>{let t={...e,id:Date.now()};k(n=>[...n,t]),te?.(e)},Ne=(e,t)=>{k(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ne?.(e,t)},Ve=e=>{e==="backlog"||e==="all-tasks"||(k(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.map(n=>O(n.sprint)===Number(e)?{...n,sprint:void 0}:n)),ie?.(e))},U=e=>{N(e)},je=e=>{e==="planning"&&window.innerWidth<768||(I(e),Te?.(e))},pt=()=>{Ue(e=>!e),ue?.()},mt=()=>{be.push("/")},kt=e=>{console.log("Switching to team:",e)},Tt=e=>{console.log("Switching to team:",e)},Ie=e=>{R(!0)},Be=()=>{R(!1),Pe(null)},xe=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString()};u(n=>[...n,t]),pe?.(e)},Ge=(e,t)=>{u(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),me?.(e,t)},He=e=>{u(t=>t.filter(n=>n.id!==Number(e))),ke?.(e)},Ke=()=>{de?.()},We=e=>{re?.(e)},qe=e=>{y(t=>t.filter(n=>n.name!==e)),le?.(e)},ze=e=>{ce?.(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"}],gt=()=>{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"}},b=[{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")}],ft=b.sort((e,t)=>t.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),ht=b.length>3,At=b.slice(3);return Qe(K,{currentView:r,onViewChange:je,children:[r==="kanban"&&a("div",{className:"h-full overflow-hidden",children:a(z,{initialProjects:fe,initialEpics:l,initialSprints:m.map(e=>({...e,isSelected:!1})),initialTasks:c,initialColleagues:P,initialUsers:F,onAddTask:B,onUpdateTask:g,onDeleteTask:x,onTaskClick:U,onAddEpic:G,onAddComment:ge})}),r==="planning"&&a("div",{className:"hidden md:block h-full",children:a(L,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddSprint:Me,onUpdateSprint:Ne,onDeleteSprint:Ve})}),r==="tasks"&&a("div",{className:"h-full",children:a(Q,{initialReminders:he,initialColleagues:P,onAddReminder:xe,onUpdateReminder:Ge,onDeleteReminder:He})}),r==="files"&&a("div",{className:"h-full",children:a(H,{initialFiles:ve,onFileAdd:Ke,onFileEdit:We,onFileDelete:qe,onFileClick:ze,compactView:!1})}),r==="epics"&&a("div",{className:"h-full",children:a(J,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddTaskToEpic:Ie,onAddEpic:Fe,onUpdateEpic:ye,onDeleteEpic:Re})}),a(W,{isOpen:Se,onClose:Be,onAddTask:B,epics:l,sprints:m,assignees:[...P,...F],defaultEpicId:Ce||void 0}),a(q,{isOpen:Ee,onClose:()=>M(!1),onAddEpic:G})]})}export{Le as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as N}from"./chunk-275W7H4O.mjs";import{a as x}from"./chunk-NZSQITPU.mjs";import{a as f,b as y}from"./chunk-I4GYQZGM.mjs";import{a as g}from"./chunk-CRAFZGCI.mjs";import{a as n}from"./chunk-R4SE63GR.mjs";import{a as r,b as h,d as v}from"./chunk-DXRAJQMA.mjs";import{a as b}from"./chunk-KPTGYVDM.mjs";import{a as u}from"./chunk-JXQRVEQB.mjs";import{a}from"./chunk-Z22NSJMF.mjs";import{useState as C}from"react";import{motion as G,AnimatePresence as Y}from"motion/react";import{Bot as z}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function K({title:k="Digital Colleagues",businessUnits:c,projects:m,fileCount:A,teamMemberCount:w,onCreateProject:P,onOpenProject:j,sidebarItems:W,initialColleagues:F,users:T,onColleagueAdd:S,onColleagueEdit:U,onColleagueDelete:I}){let[i,s]=C("home"),[l,O]=C(c[0]),d=t=>{console.log("Opening app:",t.name)},p=t=>{console.log("Favoriting app:",t.name)},B=t=>{console.log("Opening file:",t.name)},_=t=>{console.log("Sharing file:",t.name)},D=t=>{console.log("Opening project:",t.name),j(t)},R=t=>{console.log("Sharing project:",t.name)},L=t=>{O(t),console.log("Business unit changed to:",t.name)},E=()=>{console.log("Copilot clicked - navigating to chat"),s("chat")},H=t=>{console.log("Notification removed:",t)},M=()=>{console.log("All notifications removed")},V=()=>{switch(i){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",l.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:m.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:w}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:A}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(a,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>s("chat")}})]});case"colleagues":return e(N,{initialColleagues:F,availableUsers:T,onColleagueAdd:S,onColleagueEdit:U,onColleagueDelete:I});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),e(a,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(a,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.filter(t=>t.new).map(t=>e(n,{app:t,showProgress:!0,onOpen:d,onFavorite:p},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.map(t=>e(n,{app:t,onOpen:d,onFavorite:p},t.name))})]})]});case"knowledge":return e(x,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(u,{files:h,onFileClick:B})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:P}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:m.map(t=>e(b,{project:t,onOpen:D,onShare:R},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(a,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:v.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(g,{sidebarItems:f,title:k,notifications:y,businessUnits:c,currentBusinessUnit:l,onBusinessUnitChange:L,activeTab:i,onTabChange:s,showTabs:!0,onActionClick:E,actionIcon:e(z,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:H,onRemoveAll:M,children:e(Y,{mode:"wait",children:e(G.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:V()},i)})})}export{K as a};
4
+ import{a as N}from"./chunk-DKGSNR4I.mjs";import{a as x}from"./chunk-2HZGIJKZ.mjs";import{a as n}from"./chunk-R4SE63GR.mjs";import{a as b}from"./chunk-KPTGYVDM.mjs";import{a as u}from"./chunk-JXQRVEQB.mjs";import{a as r,b as h,d as v}from"./chunk-DXRAJQMA.mjs";import{a}from"./chunk-Z22NSJMF.mjs";import{a as g}from"./chunk-CRAFZGCI.mjs";import{a as f,b as y}from"./chunk-I4GYQZGM.mjs";import{useState as C}from"react";import{motion as G,AnimatePresence as Y}from"motion/react";import{Bot as z}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function K({title:k="Digital Colleagues",businessUnits:c,projects:m,fileCount:A,teamMemberCount:w,onCreateProject:P,onOpenProject:j,sidebarItems:W,initialColleagues:F,users:T,onColleagueAdd:S,onColleagueEdit:U,onColleagueDelete:I}){let[i,s]=C("home"),[l,O]=C(c[0]),d=t=>{console.log("Opening app:",t.name)},p=t=>{console.log("Favoriting app:",t.name)},B=t=>{console.log("Opening file:",t.name)},_=t=>{console.log("Sharing file:",t.name)},D=t=>{console.log("Opening project:",t.name),j(t)},R=t=>{console.log("Sharing project:",t.name)},L=t=>{O(t),console.log("Business unit changed to:",t.name)},E=()=>{console.log("Copilot clicked - navigating to chat"),s("chat")},H=t=>{console.log("Notification removed:",t)},M=()=>{console.log("All notifications removed")},V=()=>{switch(i){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",l.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:m.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:w}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:A}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(a,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>s("chat")}})]});case"colleagues":return e(N,{initialColleagues:F,availableUsers:T,onColleagueAdd:S,onColleagueEdit:U,onColleagueDelete:I});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),e(a,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(a,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.filter(t=>t.new).map(t=>e(n,{app:t,showProgress:!0,onOpen:d,onFavorite:p},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.map(t=>e(n,{app:t,onOpen:d,onFavorite:p},t.name))})]})]});case"knowledge":return e(x,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(u,{files:h,onFileClick:B})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:P}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:m.map(t=>e(b,{project:t,onOpen:D,onShare:R},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(a,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:v.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(g,{sidebarItems:f,title:k,notifications:y,businessUnits:c,currentBusinessUnit:l,onBusinessUnitChange:L,activeTab:i,onTabChange:s,showTabs:!0,onActionClick:E,actionIcon:e(z,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:H,onRemoveAll:M,children:e(Y,{mode:"wait",children:e(G.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:V()},i)})})}export{K as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as N}from"./chunk-UENQZNU3.mjs";import{a as n}from"./chunk-R4SE63GR.mjs";import{a as r,b as f,d as y}from"./chunk-DXRAJQMA.mjs";import{a as v}from"./chunk-KPTGYVDM.mjs";import{a as h}from"./chunk-JXQRVEQB.mjs";import{a}from"./chunk-Z22NSJMF.mjs";import{a as b}from"./chunk-CTTBF7F4.mjs";import{a as g,b as u}from"./chunk-NPVUICIF.mjs";import{useState as x}from"react";import{motion as R,AnimatePresence as L}from"motion/react";import{Bot as E}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function H({title:C="Digital Colleagues",businessUnits:c,projects:m,fileCount:k,teamMemberCount:A,onCreateProject:w,onOpenProject:P,sidebarItems:M,initialColleagues:V,users:G,onColleagueAdd:Y,onColleagueEdit:z,onColleagueDelete:K}){let[i,s]=x("home"),[l,j]=x(c[0]),d=t=>{console.log("Opening app:",t.name)},p=t=>{console.log("Favoriting app:",t.name)},F=t=>{console.log("Opening file:",t.name)},W=t=>{console.log("Sharing file:",t.name)},S=t=>{console.log("Opening project:",t.name),P(t)},T=t=>{console.log("Sharing project:",t.name)},I=t=>{j(t),console.log("Business unit changed to:",t.name)},U=()=>{console.log("Copilot clicked - navigating to chat"),s("chat")},O=t=>{console.log("Notification removed:",t)},B=()=>{console.log("All notifications removed")},D=()=>{switch(i){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",l.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:m.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:A}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:k}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(a,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>s("chat")}})]});case"colleagues":return e("div",{children:e("h1",{children:"Colleagues"})});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),e(a,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(a,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.filter(t=>t.new).map(t=>e(n,{app:t,showProgress:!0,onOpen:d,onFavorite:p},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.map(t=>e(n,{app:t,onOpen:d,onFavorite:p},t.name))})]})]});case"knowledge":return e(N,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(h,{files:f,onFileClick:F})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:w}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:m.map(t=>e(v,{project:t,onOpen:S,onShare:T},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(a,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:y.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(b,{sidebarItems:g,title:C,notifications:u,businessUnits:c,currentBusinessUnit:l,onBusinessUnitChange:I,activeTab:i,onTabChange:s,showTabs:!0,onActionClick:U,actionIcon:e(E,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:O,onRemoveAll:B,children:e(L,{mode:"wait",children:e(R.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:D()},i)})})}export{H as a};
4
+ import{a as N}from"./chunk-UENQZNU3.mjs";import{a as n}from"./chunk-R4SE63GR.mjs";import{a as v}from"./chunk-KPTGYVDM.mjs";import{a as h}from"./chunk-JXQRVEQB.mjs";import{a as r,b as f,d as y}from"./chunk-DXRAJQMA.mjs";import{a}from"./chunk-Z22NSJMF.mjs";import{a as b}from"./chunk-CTTBF7F4.mjs";import{a as g,b as u}from"./chunk-NPVUICIF.mjs";import{useState as x}from"react";import{motion as R,AnimatePresence as L}from"motion/react";import{Bot as E}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function H({title:C="Digital Colleagues",businessUnits:c,projects:m,fileCount:k,teamMemberCount:A,onCreateProject:w,onOpenProject:P,sidebarItems:M,initialColleagues:V,users:G,onColleagueAdd:Y,onColleagueEdit:z,onColleagueDelete:K}){let[i,s]=x("home"),[l,j]=x(c[0]),d=t=>{console.log("Opening app:",t.name)},p=t=>{console.log("Favoriting app:",t.name)},F=t=>{console.log("Opening file:",t.name)},W=t=>{console.log("Sharing file:",t.name)},S=t=>{console.log("Opening project:",t.name),P(t)},T=t=>{console.log("Sharing project:",t.name)},I=t=>{j(t),console.log("Business unit changed to:",t.name)},U=()=>{console.log("Copilot clicked - navigating to chat"),s("chat")},O=t=>{console.log("Notification removed:",t)},B=()=>{console.log("All notifications removed")},D=()=>{switch(i){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",l.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:m.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:A}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:k}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(a,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>s("chat")}})]});case"colleagues":return e("div",{children:e("h1",{children:"Colleagues"})});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),e(a,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(a,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.filter(t=>t.new).map(t=>e(n,{app:t,showProgress:!0,onOpen:d,onFavorite:p},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.map(t=>e(n,{app:t,onOpen:d,onFavorite:p},t.name))})]})]});case"knowledge":return e(N,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(h,{files:f,onFileClick:F})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:w}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:m.map(t=>e(v,{project:t,onOpen:S,onShare:T},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(a,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:y.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(b,{sidebarItems:g,title:C,notifications:u,businessUnits:c,currentBusinessUnit:l,onBusinessUnitChange:I,activeTab:i,onTabChange:s,showTabs:!0,onActionClick:U,actionIcon:e(E,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:O,onRemoveAll:B,children:e(L,{mode:"wait",children:e(R.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:D()},i)})})}export{H as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as K}from"./chunk-GAU24H4A.mjs";import{a as X}from"./chunk-Z22NSJMF.mjs";import{a as _}from"./chunk-NDZ26EG6.mjs";import{a as ee}from"./chunk-M2REXGQW.mjs";import{a as x}from"./chunk-HB57GPGK.mjs";import{a as O}from"./chunk-H3RVI2OI.mjs";import{a as Z}from"./chunk-FSCDCSVK.mjs";import{a as le}from"./chunk-Y7H3EUBR.mjs";import{a as Y}from"./chunk-FGEFYI5E.mjs";import{a as U,c as $,d as k,g as F,i as p}from"./chunk-YFAZQYK4.mjs";import{a as R}from"./chunk-L5JPAKPM.mjs";import{b as H}from"./chunk-ZUA4KNIR.mjs";import{a as c,b as h,c as w,e as u}from"./chunk-YO3GQYRJ.mjs";import{useEffect as Ce,useState as o}from"react";import{Plus as fe,Search as ve,Users as te,Bot as ye,User as he,Filter as we}from"lucide-react";import{motion as xe,AnimatePresence as Ne}from"motion/react";import{jsx as l,jsxs as t}from"react/jsx-runtime";function Se({initialColleagues:N,onColleagueAdd:S,onColleagueEdit:I,onColleagueDelete:ae,compactView:n=!1,departments:ie=["Design","Engineering","Marketing","Product","Sales","Operations"],className:oe,availableUsers:L=[],existingDigitalColleagues:P=[],availableKnowledgeDocuments:j=[]}){let[s,r]=o(N||[]),[d,B]=o(""),[b,M]=o("all"),[D,G]=o("all"),[v,ne]=o("all"),[W,C]=o(null),[A,y]=o(null);Ce(()=>{r(N||[])},[N]);let se=Array.isArray(L)?L:[],re=Array.isArray(P)?P:[],[m,a]=o("main"),f=s.filter(e=>!e||!e.name?!1:e.name.toLowerCase().includes(d.toLowerCase())||e.type==="human"&&e.email?.toLowerCase().includes(d.toLowerCase())||e.type==="digital"&&e.jobDescription?.toLowerCase().includes(d.toLowerCase())),q=f.filter(e=>e.type==="human"),z=f.filter(e=>e.type==="digital"),J=()=>{a("typeSelection")},T=e=>{e.type==="digital"&&(C(e),a("form")),console.log("Editing colleague:",e),I?.(e)},E=e=>{e.type==="digital"&&(y(e),a("view"))},de=e=>{let i={id:`human-${Date.now()}`,type:"human",name:e.name,email:e.email,updatedAt:e.updatedAt,createdAt:e.createdAt,accounts:e.accounts};r(g=>[...g,i]),S?.(i),a("main")},me=e=>{if(!e||!e.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",e);return}r(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"}),a("main")},ge=()=>{C(null),a("form")},Q=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}W?(r(i=>i.map(g=>g.id===e.id?{...e,type:"digital"}:g)),I?.({...e,type:"digital"})):(r(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"})),a("main"),C(null)},ce=()=>{a("main"),C(null),y(null)},ue=()=>{a("main"),y(null)},be=()=>{A&&(C(A),y(null),a("form"))},V=e=>{console.log("deleting",e,s),ae?.(e,s.find(i=>i.id.toString()===e.toString())?.type),r(i=>i.filter(g=>g.id!==e))},pe=()=>{B(""),M("all"),G("all")};return m==="typeSelection"?l(Z,{onSelectHuman:()=>a("userSelection"),onSelectDigital:()=>a("digitalOptions"),onCancel:()=>a("main")}):m==="userSelection"?l(le,{users:se,onUserSelect:de,onCancel:()=>a("typeSelection")}):m==="digitalOptions"?l(ee,{onCloneExisting:()=>a("digitalClone"),onCreateNew:ge,onCancel:()=>a("typeSelection")}):m==="digitalClone"?l(_,{digitalColleagues:re,onColleagueClone:me,onCancel:()=>a("digitalOptions")}):m==="form"?l(O,{colleague:W||void 0,onSave:Q,onCancel:ce,availableKnowledgeDocuments:j}):m==="view"?l(O,{colleague:A||void 0,onSave:Q,onCancel:ue,readOnly:!0,availableKnowledgeDocuments:j}):l("div",{className:"px-2 md:px-4 py-4 space-y-8",children:l(Ne,{mode:"wait",children:l(xe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:t("div",{className:`space-y-6 ${oe||""}`,children:[l(X,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:J}}),t("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t(c,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(w,{className:"text-sm font-medium",children:"Total Colleagues"}),l(te,{className:"h-4 w-4 text-muted-foreground"})]}),t(u,{children:[l("div",{className:"text-2xl font-bold",children:s.length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),t(c,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(w,{className:"text-sm font-medium",children:"Human Members"}),l(he,{className:"h-4 w-4 text-muted-foreground"})]}),t(u,{children:[l("div",{className:"text-2xl font-bold",children:s.filter(e=>e.type==="human").length}),l("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),t(c,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(w,{className:"text-sm font-medium",children:"Digital Colleagues"}),l(ye,{className:"h-4 w-4 text-muted-foreground"})]}),t(u,{children:[l("div",{className:"text-2xl font-bold",children:s.filter(e=>e.type==="digital").length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),l(c,{children:l(u,{className:"pt-6",children:t("div",{className:"flex flex-col md:flex-row gap-4",children:[l("div",{className:"flex-1",children:t("div",{className:"relative",children:[l(ve,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),l(R,{placeholder:"Search colleagues...",value:d,onChange:e=>B(e.target.value),className:"pl-9"})]})}),t(U,{value:b,onValueChange:M,children:[l(k,{className:"w-full md:w-[180px]",children:l($,{placeholder:"Department"})}),t(F,{children:[l(p,{value:"all",children:"All Departments"}),ie.map(e=>l(p,{value:e,children:e},e))]})]}),t(U,{value:D,onValueChange:G,children:[l(k,{className:"w-full md:w-[140px]",children:l($,{placeholder:"Status"})}),t(F,{children:[l(p,{value:"all",children:"All Status"}),l(p,{value:"active",children:"Active"}),l(p,{value:"inactive",children:"Inactive"})]})]}),(d||b!=="all"||D!=="all")&&t(H,{variant:"outline",onClick:pe,className:"gap-2",children:[l(we,{className:"h-4 w-4"}),"Clear"]})]})})}),t("div",{className:"space-y-4",children:[l(Y,{activeTab:v,onTabChange:ne,tabOptions:[{value:"all",label:`All (${f.length})`},{value:"human",label:`Human (${q.length})`},{value:"digital",label:`Digital (${z.length})`}],maxWidth:"400px",gridCols:3}),v==="all"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:f.map(e=>l(x,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n,className:K([e.type==="digital"&&"border-teal-400"])},`${e}-${e.id}`))}),v==="human"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:q.map(e=>l(x,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n},e.id))}),v==="digital"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:z.map(e=>l(x,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n,className:K([e.type==="digital"&&"border-teal-400"])},e.id))})]}),f.length===0&&l(c,{children:l(u,{className:"pt-6",children:t("div",{className:"text-center py-8",children:[l(te,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),l("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),l("p",{className:"text-muted-foreground mb-4",children:d||b!=="all"||D!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),t(H,{onClick:J,className:"gap-2",children:[l(fe,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{Se as a};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-MZP7RIQZ.mjs";import{a as i}from"./chunk-GETYSIZV.mjs";import{a as m}from"./chunk-HKMNAXLM.mjs";import{a as l}from"./chunk-U3FYDDE2.mjs";import{ChevronRightIcon as c,HomeIcon as f}from"@heroicons/react/20/solid";import{Fragment as h,jsx as e,jsxs as a}from"react/jsx-runtime";var d={highImpact:i,lowImpact:l,mediumImpact:m,sectionHero:n},H=t=>{let{type:o}=t||{};if(!o||o==="none")return null;let r=d[o];return r?e(r,{...t}):null};function N({breadcrumbItems:t}){if(t&&t.length>0){let o=t.filter(r=>r.label.toLowerCase()!=="home");return e("nav",{"aria-label":"Breadcrumb",className:"flex",children:a("ol",{role:"list",className:"flex items-center space-x-4",children:[e("li",{children:e("div",{children:a("a",{href:"/",className:"text-foreground hover:text-accent",children:[e(f,{"aria-hidden":"true",className:"size-5 shrink-0"}),e("span",{className:"sr-only",children:"Home"})]})})}),o.map((r,s)=>e("li",{children:a("div",{className:"flex items-center",children:[e(c,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),r.href?e("a",{href:r.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label}):e("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label})]})},s))]})})}return e(h,{})}export{H as a,N as b};
1
+ import{a as n}from"./chunk-MZP7RIQZ.mjs";import{a as i}from"./chunk-GETYSIZV.mjs";import{a as l}from"./chunk-U3FYDDE2.mjs";import{a as m}from"./chunk-HKMNAXLM.mjs";import{ChevronRightIcon as c,HomeIcon as f}from"@heroicons/react/20/solid";import{Fragment as h,jsx as e,jsxs as a}from"react/jsx-runtime";var d={highImpact:i,lowImpact:l,mediumImpact:m,sectionHero:n},H=t=>{let{type:o}=t||{};if(!o||o==="none")return null;let r=d[o];return r?e(r,{...t}):null};function N({breadcrumbItems:t}){if(t&&t.length>0){let o=t.filter(r=>r.label.toLowerCase()!=="home");return e("nav",{"aria-label":"Breadcrumb",className:"flex",children:a("ol",{role:"list",className:"flex items-center space-x-4",children:[e("li",{children:e("div",{children:a("a",{href:"/",className:"text-foreground hover:text-accent",children:[e(f,{"aria-hidden":"true",className:"size-5 shrink-0"}),e("span",{className:"sr-only",children:"Home"})]})})}),o.map((r,s)=>e("li",{children:a("div",{className:"flex items-center",children:[e(c,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),r.href?e("a",{href:r.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label}):e("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label})]})},s))]})})}return e(h,{})}export{H as a,N as b};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as $}from"./chunk-4NBXE4IK.mjs";import{a as O}from"./chunk-FT3AE7L2.mjs";import{a as H}from"./chunk-L5JPAKPM.mjs";import{motion as h}from"motion/react";import{ChevronRight as U,File as M,FileText as K,Search as A}from"lucide-react";import{useState as b,useMemo as P,useEffect as Q}from"react";import{Fragment as T,jsx as e,jsxs as r}from"react/jsx-runtime";function j({label:f,documents:s,children:d,level:u,onDocumentClick:w,selectedDocumentId:g,showDocumentCount:y=!0}){let[c,a]=b(u===0),N=d&&Object.keys(d).length>0,v=s.length+(d?Object.values(d).reduce((t,n)=>t+n.documents.length,0):0),D=t=>{switch(t){case"markdown":case"mdx":return e(K,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"})}},x=t=>{let n=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return n[t%n.length]};return r("div",{className:"space-y-1",children:[(N||s.length>0)&&r(h.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${c?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${u*20}px`},onClick:()=>a(!c),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:`w-1 h-6 rounded-full ${x(u)}`}),e(h.div,{animate:{rotate:c?90:0},transition:{duration:.2},className:"flex-shrink-0",children:e(U,{className:"h-4 w-4 text-muted-foreground"})}),r("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[e("div",{className:"flex items-center gap-2 min-w-0",children:e("span",{className:"font-medium text-foreground truncate",children:f})}),y&&v>0&&e("div",{className:"flex-shrink-0 ml-2",children:e("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:v})})]})]}),e(h.div,{initial:!1,animate:{height:c?"auto":0,opacity:c?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:r("div",{className:"pt-2 space-y-1",children:[s.map((t,n)=>r(h.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:n*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${g===t.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${u*20+20}px`},onClick:()=>w?.(t),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:"flex-shrink-0",children:D(t.format)}),r("div",{className:"flex-1 min-w-0",children:[e("p",{className:`text-sm truncate transition-colors ${g===t.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:t.title}),t.description&&e("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:t.description})]}),t.tags&&t.tags.length>0&&e("div",{className:"flex-shrink-0",children:e("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:t.tags[0]})})]},t.id)),d&&Object.entries(d).map(([t,n])=>e(j,{label:t,documents:n.documents,children:n.children,level:u+1,onDocumentClick:w,selectedDocumentId:g,showDocumentCount:y},t))]})})]})}function Z({documents:f,menuConfig:s,onDocumentClick:d,onDocumentShare:u,onDocumentUpdate:w,selectedDocumentId:g,className:y,editable:c=!0}){let[a,N]=b(""),[v,D]=b(null),[x,t]=b(f);Q(()=>{t(f)},[f]);let n=P(()=>a?x.filter(o=>o.title.toLowerCase().includes(a.toLowerCase())||o.description?.toLowerCase().includes(a.toLowerCase())||o.tags?.some(l=>l.toLowerCase().includes(a.toLowerCase()))||Object.values(o.metadata||{}).some(l=>String(l).toLowerCase().includes(a.toLowerCase()))):x,[x,a]),S=P(()=>{let o=(l,L)=>{if(L.length===0)return{};let[E,...B]=L;return l.reduce((i,C)=>{let F=C.metadata?.[E]||"Uncategorized",m=String(F);if(i[m]||(i[m]={documents:[],children:{}}),B.length===0)i[m].documents.push(C);else{let k=o([C],B),p=Object.keys(k)[0];p&&(i[m].children||(i[m].children={}),i[m].children[p]?i[m].children[p].documents.push(...k[p].documents):i[m].children[p]=k[p])}return i},{})};return o(n,s.groupBy)},[n,s.groupBy]),I=o=>{D(o),d?.(o)};return r("div",{className:`flex h-full ${y||""}`,children:[r("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[e("div",{className:"p-6 border-b border-border",children:r("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e(A,{className:"h-4 w-4 text-muted-foreground"})}),e(H,{placeholder:"Search knowledge base...",value:a,onChange:o=>N(o.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),e(O,{className:"h-[calc(100%-100px)]",children:e("div",{className:"p-4 space-y-3",children:s.groupBy.length===0?e(T,{children:e(j,{label:"Document",documents:n,level:0,onDocumentClick:I,selectedDocumentId:g,showDocumentCount:s.showDocumentCount},"Document")}):r(T,{children:[Object.entries(S).map(([o,l])=>e(j,{label:o,documents:l.documents,children:l.children,level:0,onDocumentClick:I,selectedDocumentId:g,showDocumentCount:s.showDocumentCount},o)),Object.keys(S).length===0&&r(h.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[e("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:e(K,{className:"h-8 w-8 text-muted-foreground"})}),e("p",{className:"text-sm font-medium",children:"No documents found"}),e("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})})]}),e("div",{className:"flex-1 bg-background overflow-scroll",children:v?e($,{document:v,onDocumentUpdate:w,editable:c}):e("div",{className:"h-full flex items-center justify-center text-center",children:r(h.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[e("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:e(K,{className:"h-10 w-10 text-primary"})}),e("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),e("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}export{Z as a};
4
+ import{a as $}from"./chunk-ZXKQDAXG.mjs";import{a as O}from"./chunk-FT3AE7L2.mjs";import{a as H}from"./chunk-L5JPAKPM.mjs";import{motion as h}from"motion/react";import{ChevronRight as U,File as M,FileText as K,Search as A}from"lucide-react";import{useState as b,useMemo as P,useEffect as Q}from"react";import{Fragment as T,jsx as e,jsxs as r}from"react/jsx-runtime";function j({label:f,documents:s,children:d,level:u,onDocumentClick:w,selectedDocumentId:g,showDocumentCount:y=!0}){let[c,a]=b(u===0),N=d&&Object.keys(d).length>0,v=s.length+(d?Object.values(d).reduce((t,n)=>t+n.documents.length,0):0),D=t=>{switch(t){case"markdown":case"mdx":return e(K,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"})}},x=t=>{let n=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return n[t%n.length]};return r("div",{className:"space-y-1",children:[(N||s.length>0)&&r(h.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${c?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${u*20}px`},onClick:()=>a(!c),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:`w-1 h-6 rounded-full ${x(u)}`}),e(h.div,{animate:{rotate:c?90:0},transition:{duration:.2},className:"flex-shrink-0",children:e(U,{className:"h-4 w-4 text-muted-foreground"})}),r("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[e("div",{className:"flex items-center gap-2 min-w-0",children:e("span",{className:"font-medium text-foreground truncate",children:f})}),y&&v>0&&e("div",{className:"flex-shrink-0 ml-2",children:e("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:v})})]})]}),e(h.div,{initial:!1,animate:{height:c?"auto":0,opacity:c?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:r("div",{className:"pt-2 space-y-1",children:[s.map((t,n)=>r(h.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:n*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${g===t.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${u*20+20}px`},onClick:()=>w?.(t),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:"flex-shrink-0",children:D(t.format)}),r("div",{className:"flex-1 min-w-0",children:[e("p",{className:`text-sm truncate transition-colors ${g===t.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:t.title}),t.description&&e("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:t.description})]}),t.tags&&t.tags.length>0&&e("div",{className:"flex-shrink-0",children:e("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:t.tags[0]})})]},t.id)),d&&Object.entries(d).map(([t,n])=>e(j,{label:t,documents:n.documents,children:n.children,level:u+1,onDocumentClick:w,selectedDocumentId:g,showDocumentCount:y},t))]})})]})}function Z({documents:f,menuConfig:s,onDocumentClick:d,onDocumentShare:u,onDocumentUpdate:w,selectedDocumentId:g,className:y,editable:c=!0}){let[a,N]=b(""),[v,D]=b(null),[x,t]=b(f);Q(()=>{t(f)},[f]);let n=P(()=>a?x.filter(o=>o.title.toLowerCase().includes(a.toLowerCase())||o.description?.toLowerCase().includes(a.toLowerCase())||o.tags?.some(l=>l.toLowerCase().includes(a.toLowerCase()))||Object.values(o.metadata||{}).some(l=>String(l).toLowerCase().includes(a.toLowerCase()))):x,[x,a]),S=P(()=>{let o=(l,L)=>{if(L.length===0)return{};let[E,...B]=L;return l.reduce((i,C)=>{let F=C.metadata?.[E]||"Uncategorized",m=String(F);if(i[m]||(i[m]={documents:[],children:{}}),B.length===0)i[m].documents.push(C);else{let k=o([C],B),p=Object.keys(k)[0];p&&(i[m].children||(i[m].children={}),i[m].children[p]?i[m].children[p].documents.push(...k[p].documents):i[m].children[p]=k[p])}return i},{})};return o(n,s.groupBy)},[n,s.groupBy]),I=o=>{D(o),d?.(o)};return r("div",{className:`flex h-full ${y||""}`,children:[r("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[e("div",{className:"p-6 border-b border-border",children:r("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e(A,{className:"h-4 w-4 text-muted-foreground"})}),e(H,{placeholder:"Search knowledge base...",value:a,onChange:o=>N(o.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),e(O,{className:"h-[calc(100%-100px)]",children:e("div",{className:"p-4 space-y-3",children:s.groupBy.length===0?e(T,{children:e(j,{label:"Document",documents:n,level:0,onDocumentClick:I,selectedDocumentId:g,showDocumentCount:s.showDocumentCount},"Document")}):r(T,{children:[Object.entries(S).map(([o,l])=>e(j,{label:o,documents:l.documents,children:l.children,level:0,onDocumentClick:I,selectedDocumentId:g,showDocumentCount:s.showDocumentCount},o)),Object.keys(S).length===0&&r(h.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[e("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:e(K,{className:"h-8 w-8 text-muted-foreground"})}),e("p",{className:"text-sm font-medium",children:"No documents found"}),e("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})})]}),e("div",{className:"flex-1 bg-background overflow-scroll",children:v?e($,{document:v,onDocumentUpdate:w,editable:c}):e("div",{className:"h-full flex items-center justify-center text-center",children:r(h.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[e("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:e(K,{className:"h-10 w-10 text-primary"})}),e("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),e("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}export{Z as a};
@@ -0,0 +1 @@
1
+ import{a as r}from"./chunk-ZWHGOTSF.mjs";import{clsx as t}from"clsx";function s(...e){return r(t(e))}export{s as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as l,b as v,i as u,j as o}from"./chunk-OCPX4QPC.mjs";import{b as d}from"./chunk-ZUA4KNIR.mjs";import{a as g,b as w,c as h}from"./chunk-SOLZ4VQH.mjs";import{b as x}from"./chunk-CSBGSBEU.mjs";import{a as p,b as c,e as f}from"./chunk-YO3GQYRJ.mjs";import{a as r}from"./chunk-MDJREBVI.mjs";import{useState as k}from"react";import{MoreHorizontal as I,Mail as A,Settings as B,Trash2 as S,Edit as T,User as E,Bot as P}from"lucide-react";import{Fragment as $,jsx as e,jsxs as a}from"react/jsx-runtime";function X({colleague:t,onEdit:N,onDelete:C,onViewDetails:M,showActions:D=!0,compact:n=!1,className:b}){let[m,y]=k(!1),z=s=>{switch(s){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},H=s=>{switch(s){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},F=s=>{if(!s)return"Never";let i=Math.floor((new Date().getTime()-s.getTime())/(1e3*60));return i<1?"Just now":i<60?`${i}m ago`:i<1440?`${Math.floor(i/60)}h ago`:`${Math.floor(i/1440)}d ago`};return a(p,{className:r("hover:shadow-md transition-shadow",n&&"p-2",b),children:[e(c,{className:r("pb-3",n&&"pb-2"),children:a("div",{className:"flex items-start justify-between",children:[a("div",{className:"flex items-center gap-3",children:[e("div",{className:"relative",children:a(g,{className:r("h-12 w-12",n&&"h-8 w-8"),children:[e(w,{src:"/placeholder.svg",alt:t.name||"name"}),e(h,{children:t.name?.split(" ").map(s=>s[0]).join("")})]})}),a("div",{className:"flex-1 min-w-0",children:[a("div",{className:"flex items-center gap-2",children:[e("h3",{className:r("font-semibold text-sm truncate",n&&"text-xs"),children:t.name}),t.type==="digital"?e(P,{className:r("h-4 w-4 text-blue-500",n&&"h-3 w-3")}):e(E,{className:r("h-4 w-4 text-green-500",n&&"h-3 w-3")})]}),e("p",{className:r("text-sm text-muted-foreground truncate",n&&"text-xs")}),!n&&e("div",{className:"flex items-center gap-2 mt-1"})]})]}),D&&a(l,{children:[e(v,{asChild:!0,children:e(d,{variant:"ghost",size:"icon",className:r("h-8 w-8",n&&"h-6 w-6"),children:e(I,{className:r("h-4 w-4",n&&"h-3 w-3")})})}),a(u,{align:"end",children:[t.type==="digital"&&a($,{children:[a(o,{onClick:()=>M?.(t),children:[e(B,{className:"h-4 w-4 mr-2"}),"View Details"]}),a(o,{onClick:()=>N?.(t),children:[e(T,{className:"h-4 w-4 mr-2"}),"Edit"]})]}),a(o,{onClick:()=>C?.(t.id.toString()),className:"text-destructive focus:text-destructive",children:[e(S,{className:"h-4 w-4 mr-2"}),t.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!n&&a(f,{className:"pt-0",children:[a("div",{className:"space-y-2 text-sm",children:[t.type==="human"&&a("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e(A,{className:"h-3 w-3"}),e("span",{className:"truncate",children:t.email})]}),t.type==="digital"&&e("div",{className:"flex items-center gap-2 text-muted-foreground",children:e("span",{children:t.description})})]}),t.type==="digital"&&e("div",{className:"mt-3",children:a("div",{className:"flex flex-wrap gap-1",children:[t.capabilities?.slice(0,m?t.capabilities.length:2).map(s=>e(x,{variant:"outline",className:"text-xs",children:typeof s.value=="number"?s.value:s.value.name},typeof s.value=="number"?s.value:s.value.name)),(t.capabilities?.length||0)>2&&e(d,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>y(!m),children:m?"Show less":`+${(t.capabilities?.length||0)-2} more`})]})})]})]})}export{X as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as p}from"./chunk-CDVRH3MC.mjs";import{a as d}from"./chunk-KPTGYVDM.mjs";import{a as m}from"./chunk-Z22NSJMF.mjs";import{a as i,f as n,g as s,i as l,j as c}from"./chunk-3UMMMQEH.mjs";import{useState as u}from"react";import{motion as N,AnimatePresence as D}from"motion/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function C({projects:g=[],onAddProject:j,handleProjectOpen:P,handleProjectShare:y}){let[f,t]=u(!1),[b,r]=u(!1),v=async a=>{r(!0);try{await j(a),t(!1)}catch(w){console.error("Error creating project:",w)}finally{r(!1)}},h=()=>{t(!0)};return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(D,{mode:"wait",children:o(N.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e(m,{title:"Project Management",description:"Organize your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:h}}),o("section",{className:"space-y-4 mt-8",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:g.map(a=>e(d,{project:a,onOpen:P,onShare:y},a.id))})]})]},"projects-index-view")}),e(i,{open:f,onOpenChange:t,children:o(n,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[o(s,{className:"sr-only",children:[e(l,{children:"Create New Project"}),e(c,{children:"Fill out the form below to create a new project."})]}),e(p,{onSubmit:v,onCancel:()=>t(!1),isLoading:b,className:"border-0 shadow-none"})]})})]})}export{C as a};
4
+ import{a as d}from"./chunk-KPTGYVDM.mjs";import{a as p}from"./chunk-CDVRH3MC.mjs";import{a as m}from"./chunk-Z22NSJMF.mjs";import{a as i,f as n,g as s,i as l,j as c}from"./chunk-3UMMMQEH.mjs";import{useState as u}from"react";import{motion as N,AnimatePresence as D}from"motion/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function C({projects:g=[],onAddProject:j,handleProjectOpen:P,handleProjectShare:y}){let[f,t]=u(!1),[b,r]=u(!1),v=async a=>{r(!0);try{await j(a),t(!1)}catch(w){console.error("Error creating project:",w)}finally{r(!1)}},h=()=>{t(!0)};return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(D,{mode:"wait",children:o(N.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e(m,{title:"Project Management",description:"Organize your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:h}}),o("section",{className:"space-y-4 mt-8",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:g.map(a=>e(d,{project:a,onOpen:P,onShare:y},a.id))})]})]},"projects-index-view")}),e(i,{open:f,onOpenChange:t,children:o(n,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[o(s,{className:"sr-only",children:[e(l,{children:"Create New Project"}),e(c,{children:"Fill out the form below to create a new project."})]}),e(p,{onSubmit:v,onCancel:()=>t(!1),isLoading:b,className:"border-0 shadow-none"})]})})]})}export{C as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as g}from"./chunk-AQQCH7Z2.mjs";import{a as d,b as o,c as a,d as m,e as t,f as l}from"./chunk-76M7JE4D.mjs";import{a as u}from"./chunk-OYZDAMCS.mjs";import{b as n,d as b,f as c}from"./chunk-ZFUP5NVF.mjs";import{a as s}from"./chunk-4UIARERB.mjs";import{a as p}from"./chunk-ITJH72Z2.mjs";import{a as f}from"./chunk-WU3JMLSC.mjs";import{a as S}from"./chunk-BZAYEKYC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({...i}){return r("div",{className:"bg-sidebar",children:[e(p,{isMenuOpen:!0,logoLight:S,logoDark:f,...i.header,className:"bg-sidebar",wide:!0}),r(n,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(g,{...i.sidebarLeft,className:"flex-none top-24"}),r(c,{className:"grow overflow-hidden",children:[e("header",{className:"flex h-16 shrink-0 items-center gap-2",children:r("div",{className:"flex items-center gap-2 px-4",children:[e(b,{className:"-ml-1"}),e(s,{orientation:"vertical",className:"mr-2 h-4"}),e(d,{children:r(o,{children:[e(a,{className:"hidden md:block",children:e(m,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(a,{children:e(t,{children:"Data Fetching"})})]})})]})}),r("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[r("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),e("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),e(u,{})]})}export{h as a};
4
+ import{a as g}from"./chunk-AQQCH7Z2.mjs";import{a as d,b as o,c as a,d as m,e as t,f as l}from"./chunk-76M7JE4D.mjs";import{a as u}from"./chunk-OYZDAMCS.mjs";import{b as n,d as b,f as c}from"./chunk-ZFUP5NVF.mjs";import{a as s}from"./chunk-4UIARERB.mjs";import{a as p}from"./chunk-LAQ3QAUW.mjs";import{a as f}from"./chunk-WU3JMLSC.mjs";import{a as S}from"./chunk-BZAYEKYC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({...i}){return r("div",{className:"bg-sidebar",children:[e(p,{isMenuOpen:!0,logoLight:S,logoDark:f,...i.header,className:"bg-sidebar",wide:!0}),r(n,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(g,{...i.sidebarLeft,className:"flex-none top-24"}),r(c,{className:"grow overflow-hidden",children:[e("header",{className:"flex h-16 shrink-0 items-center gap-2",children:r("div",{className:"flex items-center gap-2 px-4",children:[e(b,{className:"-ml-1"}),e(s,{orientation:"vertical",className:"mr-2 h-4"}),e(d,{children:r(o,{children:[e(a,{className:"hidden md:block",children:e(m,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(a,{children:e(t,{children:"Data Fetching"})})]})})]})}),r("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[r("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),e("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),e(u,{})]})}export{h as a};
@@ -1 +1 @@
1
- import{a as u}from"./chunk-KML6U7IE.mjs";import{a as C}from"./chunk-KGEIN56Y.mjs";import{f as v}from"./chunk-FYQBRCQM.mjs";import{b as f}from"./chunk-ZUA4KNIR.mjs";import{a as c,b as g,c as x,e as p}from"./chunk-YO3GQYRJ.mjs";import{a as b}from"./chunk-FMJBJ3HN.mjs";import{a as h}from"./chunk-WISCWNL2.mjs";import U from"next/image";import{notFound as M}from"next/navigation";import w from"next/link";import{FaLinkedin as I}from"react-icons/fa6";import{jsx as e,jsxs as s}from"react/jsx-runtime";function L({image:t,name:i,about:l,socialLinks:o}){return!t||!t.src||t.src.length<3||!i?null:e("div",{className:"mt-1 z-10 px-0 pt-0 lg:px-10",children:e(c,{children:s(p,{className:"flex flex-col items-center",children:[t&&t.src&&e(U,{src:t.src,alt:t.alt||"",width:127,height:127,placeholder:"blur",blurDataURL:u,className:"mx-auto mt-6 rounded-full object-cover"}),s("h3",{className:"flex items-center ali font-secondary text-center py-2 text-lg leading-[1.25] text-accent md:text-xl",children:[i,o&&o.length>0&&e("nav",{"aria-label":"social links",children:e("ul",{className:"inline-flex items-center divide-x divide-accent/50 text-accent dark:divide-accent/50 dark:text-white",children:o.map((a,m)=>a.href&&e("li",{children:e(h,{href:a.href,openNewTab:!0,className:"block px-4 text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 hover:text-accents",children:e("span",{children:a.icon})})},m))})})]}),e("p",{children:l})]})})})}function j({page:t,categoryList:i,edit:l=!1,path:o="/admin/collections/posts/"}){if(!t)return M();let{meta:a,populatedAuthors:m,authors:P,categories:N,content:k,title:y}=t,A={image:{src:a&&a.image&&a.image.url||void 0,alt:a&&a.image&&a.image.alt||void 0},authorName:m?.[0]?.name||"",category:N,commentCount:0,title:y,description:a?.description||""},d=P?.map(r=>{let n=r.profilePicture&&r.profilePicture.sizes?.square?.url||r.profilePicture&&r.profilePicture.sizes?.thumbnail?.url||"";return console.log("val:",n),{name:r.name||"",about:r.about||"",image:{src:n,alt:r.name||"blog author"},socialLinks:[{icon:e(I,{}),href:r.linkedIn??""}]}});return console.log(d),e(b,{children:s("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[e("div",{children:s("div",{className:"[&_p+P]:mt-4",children:[e("div",{className:"my-4 h-px bg-body/30 lg:my-5"}),e(v,{content:k,enableGutter:!1,className:"prose-invert"})]})}),s("div",{className:"grid gap-30px self-baseline max-md:mx-auto max-md:max-w-[410px] lg:gap-10",children:[l&&e("div",{className:"mt-4 lg:-mt-10 z-10 px-0 pt-0 lg:px-10",children:s(c,{children:[e(g,{children:e(x,{className:"text-accent",children:"Content Actions"})}),s(p,{children:[e("p",{className:"mb-4 text-sm text-muted-foreground",children:"Edit this page in the CMS"}),e(w,{href:`${o}${t.id}`,children:e(f,{variant:"outline",className:"w-full text-accent hover:text-foreground",children:"Edit"})})]})]})}),d&&d.map((r,n)=>e(L,{...r},n)),i&&i.links&&e("div",{className:"mt-4 px-0 pt-0 lg:px-10",children:e(C,{links:i.links,title:i.title})})]})]})})}export{j as a};
1
+ import{a as u}from"./chunk-KML6U7IE.mjs";import{a as C}from"./chunk-KGEIN56Y.mjs";import{f as v}from"./chunk-FYQBRCQM.mjs";import{b as f}from"./chunk-ZUA4KNIR.mjs";import{a as c,b as g,c as x,e as p}from"./chunk-YO3GQYRJ.mjs";import{a as h}from"./chunk-WISCWNL2.mjs";import{a as b}from"./chunk-FMJBJ3HN.mjs";import U from"next/image";import{notFound as M}from"next/navigation";import w from"next/link";import{FaLinkedin as I}from"react-icons/fa6";import{jsx as e,jsxs as s}from"react/jsx-runtime";function L({image:t,name:i,about:l,socialLinks:o}){return!t||!t.src||t.src.length<3||!i?null:e("div",{className:"mt-1 z-10 px-0 pt-0 lg:px-10",children:e(c,{children:s(p,{className:"flex flex-col items-center",children:[t&&t.src&&e(U,{src:t.src,alt:t.alt||"",width:127,height:127,placeholder:"blur",blurDataURL:u,className:"mx-auto mt-6 rounded-full object-cover"}),s("h3",{className:"flex items-center ali font-secondary text-center py-2 text-lg leading-[1.25] text-accent md:text-xl",children:[i,o&&o.length>0&&e("nav",{"aria-label":"social links",children:e("ul",{className:"inline-flex items-center divide-x divide-accent/50 text-accent dark:divide-accent/50 dark:text-white",children:o.map((a,m)=>a.href&&e("li",{children:e(h,{href:a.href,openNewTab:!0,className:"block px-4 text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 hover:text-accents",children:e("span",{children:a.icon})})},m))})})]}),e("p",{children:l})]})})})}function j({page:t,categoryList:i,edit:l=!1,path:o="/admin/collections/posts/"}){if(!t)return M();let{meta:a,populatedAuthors:m,authors:P,categories:N,content:k,title:y}=t,A={image:{src:a&&a.image&&a.image.url||void 0,alt:a&&a.image&&a.image.alt||void 0},authorName:m?.[0]?.name||"",category:N,commentCount:0,title:y,description:a?.description||""},d=P?.map(r=>{let n=r.profilePicture&&r.profilePicture.sizes?.square?.url||r.profilePicture&&r.profilePicture.sizes?.thumbnail?.url||"";return console.log("val:",n),{name:r.name||"",about:r.about||"",image:{src:n,alt:r.name||"blog author"},socialLinks:[{icon:e(I,{}),href:r.linkedIn??""}]}});return console.log(d),e(b,{children:s("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[e("div",{children:s("div",{className:"[&_p+P]:mt-4",children:[e("div",{className:"my-4 h-px bg-body/30 lg:my-5"}),e(v,{content:k,enableGutter:!1,className:"prose-invert"})]})}),s("div",{className:"grid gap-30px self-baseline max-md:mx-auto max-md:max-w-[410px] lg:gap-10",children:[l&&e("div",{className:"mt-4 lg:-mt-10 z-10 px-0 pt-0 lg:px-10",children:s(c,{children:[e(g,{children:e(x,{className:"text-accent",children:"Content Actions"})}),s(p,{children:[e("p",{className:"mb-4 text-sm text-muted-foreground",children:"Edit this page in the CMS"}),e(w,{href:`${o}${t.id}`,children:e(f,{variant:"outline",className:"w-full text-accent hover:text-foreground",children:"Edit"})})]})]})}),d&&d.map((r,n)=>e(L,{...r},n)),i&&i.links&&e("div",{className:"mt-4 px-0 pt-0 lg:px-10",children:e(C,{links:i.links,title:i.title})})]})]})})}export{j as a};
@@ -1 +1 @@
1
- import{a as i}from"./chunk-L3BLBPSR.mjs";import{a as m}from"./chunk-PDY7JYY3.mjs";import{a as r}from"./chunk-MDJREBVI.mjs";import{jsx as n,jsxs as d}from"react/jsx-runtime";function u({isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a,className:p,wide:l,themeControl:s=!1}){return d("div",{className:r("fixed top-0 left-0 right-0 z-50",p),children:[n(i,{isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a,themeControl:s,wide:l}),n(m,{isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a})]})}export{u as a};
1
+ import{a as m}from"./chunk-PDY7JYY3.mjs";import{a as i}from"./chunk-L3BLBPSR.mjs";import{a as r}from"./chunk-MDJREBVI.mjs";import{jsx as n,jsxs as d}from"react/jsx-runtime";function u({isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a,className:p,wide:l,themeControl:s=!1}){return d("div",{className:r("fixed top-0 left-0 right-0 z-50",p),children:[n(i,{isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a,themeControl:s,wide:l}),n(m,{isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a})]})}export{u as a};
@@ -1 +1 @@
1
- import{a as q}from"./chunk-KZCIHFTM.mjs";import{a as J}from"./chunk-UM57PWI7.mjs";import{a as b}from"./chunk-KG7HG2VO.mjs";import{a as Q}from"./chunk-L3V5YDPH.mjs";import{a as G}from"./chunk-QC2UWZWL.mjs";import{a as V}from"./chunk-Z22NSJMF.mjs";import{a as w}from"./chunk-UVHMI3PU.mjs";import{b as F}from"./chunk-CSBGSBEU.mjs";import fe,{useEffect as c,useState as i,useRef as l}from"react";import{jsx as n,jsxs as T}from"react/jsx-runtime";var ye=({initialTasks:m=[],initialEpics:v=[],initialSprints:h=[],initialUsers:ke=[],initialColleagues:A=[],initialProjects:Te=[],onAddTask:W,onUpdateTask:C,onDeleteTask:x,onTaskClick:X,onAddEpic:Y,onAddComment:Z})=>{let[_,p]=i([]),[d,y]=i([]),[O,ee]=i([]),[H,N]=i(!1),[P,M]=i(!1),[r,u]=i(null),[E,B]=i(null),[te,ve]=i([]),[I,se]=i([]),[g,R]=i(0),o=l(null),ae=l(null),ne=fe.useMemo(()=>[...d.map(e=>e.id),0],[d]),U=l(""),j=l(""),$=l(""),K=l(""),f=e=>e.map(t=>`${t.id}-${new Date(t.createdAt).getTime()}-${new Date(t.updatedAt).getTime()}`).join("-");c(()=>{let e=f(m);e!==U.current&&(p(m),r&&u(m.find(t=>t.id===r.id)||null),U.current=e)},[m]),c(()=>{let e=f(v);e!==j.current&&(y(v),j.current=e)},[v]),c(()=>{let e=f(h);e!==$.current&&(ee(h),$.current=e)},[h]),c(()=>{let e=f(A.map(t=>({id:t.id,updatedAt:t.updatedAt,createdAt:t.createdAt})));e!==K.current&&(se(A),K.current=e)},[A]),c(()=>{let e=()=>{if(o.current){let a=o.current.offsetHeight;R(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)}},[]),c(()=>{let e=setTimeout(()=>{o.current&&R(o.current.offsetHeight)},300);return()=>clearTimeout(e)},[H,P]);let ie=_.filter(e=>!0),re=e=>ie.filter(t=>t.status===e),oe=e=>{let t={};return d.forEach(s=>{t[s.id]=e.filter(a=>w(a.epic)===s.id)}),t["no-epic"]=e.filter(s=>!w(s.epic)),t},L=e=>{B(e)},de=e=>{E&&(p(t=>t.map(s=>s.id===E.id?{...s,status:e}:s)),C?.(E.id.toString(),{status:e}),B(null))},ce=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(s=>[...s,t]),W?.(e)},le=async(e,t)=>{p(s=>s.map(a=>a.id===Number(e)?{...a,...t}:a)),C&&await C(e,t),r?.id===Number(e)&&u(s=>({...s,...t}))},pe=async e=>{p(t=>t.filter(s=>s.id!==Number(e))),r?.id===Number(e)&&u(null),x&&await x(e)},ue=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};y(s=>[...s,t]),Y?.(e)},z=e=>{u(e),X?.(e)},me=[{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"}],ge=g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)";return T("div",{ref:ae,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[n("div",{ref:o,className:"flex-shrink-0",children:n(V,{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:()=>N(!0)},secondaryAction:{label:"Add epic",onClick:()=>M(!0)}})}),n("div",{className:"flex-1 min-h-0 mt-8",children:n("div",{className:"h-full",style:{height:g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)"},children:n("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:me.map(e=>{let t=re(e.status),s=oe(t);return T(q,{title:e.title,status:e.status,taskCount:t.length,onDrop:de,isCompact:e.status==="done",height:ge,children:[s["no-epic"].map(a=>n(b,{epic:null,task:a,onDragStart:L,onTaskClick:z,isCompact:e.status==="done"},a.id)),ne.map(a=>{let D=d.find(k=>k.id===a),S=s[a]||[];return S.length===0?null:T("div",{className:"mb-6",children:[T("div",{className:"flex items-center gap-2 mb-3",children:[n("div",{className:`w-3 h-3 rounded-full ${D?.color}`}),n("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:D?.name||"No Epic"}),n(F,{variant:"secondary",className:"text-xs",children:S.length})]})," ",n("div",{className:"space-y-3",children:S.map(k=>n(b,{task:k,epic:D,onDragStart:L,onTaskClick:z,isCompact:e.status==="done"},k.id))})]},a)})]},e.id)})})})}),n(G,{isOpen:H,onClose:()=>N(!1),onAddTask:ce,assignees:[...I,...te],epics:d,sprints:O}),n(Q,{isOpen:P,onClose:()=>M(!1),onAddEpic:ue}),r&&n(J,{isOpen:!!r,onClose:()=>u(null),initialTask:r,epics:d,sprints:O,onUpdateTask:le,onDeleteTask:pe,colleagues:I,onAddComment:Z})]})};export{ye as a};
1
+ import{a as J}from"./chunk-UM57PWI7.mjs";import{a as b}from"./chunk-KG7HG2VO.mjs";import{a as G}from"./chunk-QC2UWZWL.mjs";import{a as q}from"./chunk-KZCIHFTM.mjs";import{a as Q}from"./chunk-L3V5YDPH.mjs";import{a as V}from"./chunk-Z22NSJMF.mjs";import{a as w}from"./chunk-UVHMI3PU.mjs";import{b as F}from"./chunk-CSBGSBEU.mjs";import fe,{useEffect as c,useState as i,useRef as l}from"react";import{jsx as n,jsxs as T}from"react/jsx-runtime";var ye=({initialTasks:m=[],initialEpics:v=[],initialSprints:h=[],initialUsers:ke=[],initialColleagues:A=[],initialProjects:Te=[],onAddTask:W,onUpdateTask:C,onDeleteTask:x,onTaskClick:X,onAddEpic:Y,onAddComment:Z})=>{let[_,p]=i([]),[d,y]=i([]),[O,ee]=i([]),[H,N]=i(!1),[P,M]=i(!1),[r,u]=i(null),[E,B]=i(null),[te,ve]=i([]),[I,se]=i([]),[g,R]=i(0),o=l(null),ae=l(null),ne=fe.useMemo(()=>[...d.map(e=>e.id),0],[d]),U=l(""),j=l(""),$=l(""),K=l(""),f=e=>e.map(t=>`${t.id}-${new Date(t.createdAt).getTime()}-${new Date(t.updatedAt).getTime()}`).join("-");c(()=>{let e=f(m);e!==U.current&&(p(m),r&&u(m.find(t=>t.id===r.id)||null),U.current=e)},[m]),c(()=>{let e=f(v);e!==j.current&&(y(v),j.current=e)},[v]),c(()=>{let e=f(h);e!==$.current&&(ee(h),$.current=e)},[h]),c(()=>{let e=f(A.map(t=>({id:t.id,updatedAt:t.updatedAt,createdAt:t.createdAt})));e!==K.current&&(se(A),K.current=e)},[A]),c(()=>{let e=()=>{if(o.current){let a=o.current.offsetHeight;R(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)}},[]),c(()=>{let e=setTimeout(()=>{o.current&&R(o.current.offsetHeight)},300);return()=>clearTimeout(e)},[H,P]);let ie=_.filter(e=>!0),re=e=>ie.filter(t=>t.status===e),oe=e=>{let t={};return d.forEach(s=>{t[s.id]=e.filter(a=>w(a.epic)===s.id)}),t["no-epic"]=e.filter(s=>!w(s.epic)),t},L=e=>{B(e)},de=e=>{E&&(p(t=>t.map(s=>s.id===E.id?{...s,status:e}:s)),C?.(E.id.toString(),{status:e}),B(null))},ce=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(s=>[...s,t]),W?.(e)},le=async(e,t)=>{p(s=>s.map(a=>a.id===Number(e)?{...a,...t}:a)),C&&await C(e,t),r?.id===Number(e)&&u(s=>({...s,...t}))},pe=async e=>{p(t=>t.filter(s=>s.id!==Number(e))),r?.id===Number(e)&&u(null),x&&await x(e)},ue=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};y(s=>[...s,t]),Y?.(e)},z=e=>{u(e),X?.(e)},me=[{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"}],ge=g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)";return T("div",{ref:ae,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[n("div",{ref:o,className:"flex-shrink-0",children:n(V,{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:()=>N(!0)},secondaryAction:{label:"Add epic",onClick:()=>M(!0)}})}),n("div",{className:"flex-1 min-h-0 mt-8",children:n("div",{className:"h-full",style:{height:g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)"},children:n("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:me.map(e=>{let t=re(e.status),s=oe(t);return T(q,{title:e.title,status:e.status,taskCount:t.length,onDrop:de,isCompact:e.status==="done",height:ge,children:[s["no-epic"].map(a=>n(b,{epic:null,task:a,onDragStart:L,onTaskClick:z,isCompact:e.status==="done"},a.id)),ne.map(a=>{let D=d.find(k=>k.id===a),S=s[a]||[];return S.length===0?null:T("div",{className:"mb-6",children:[T("div",{className:"flex items-center gap-2 mb-3",children:[n("div",{className:`w-3 h-3 rounded-full ${D?.color}`}),n("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:D?.name||"No Epic"}),n(F,{variant:"secondary",className:"text-xs",children:S.length})]})," ",n("div",{className:"space-y-3",children:S.map(k=>n(b,{task:k,epic:D,onDragStart:L,onTaskClick:z,isCompact:e.status==="done"},k.id))})]},a)})]},e.id)})})})}),n(G,{isOpen:H,onClose:()=>N(!1),onAddTask:ce,assignees:[...I,...te],epics:d,sprints:O}),n(Q,{isOpen:P,onClose:()=>M(!1),onAddEpic:ue}),r&&n(J,{isOpen:!!r,onClose:()=>u(null),initialTask:r,epics:d,sprints:O,onUpdateTask:le,onDeleteTask:pe,colleagues:I,onAddComment:Z})]})};export{ye as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as k}from"./chunk-BQQ4V4PX.mjs";import{a as C}from"./chunk-KZAYLEFB.mjs";import{a as S,b as w}from"./chunk-4SRUEQTP.mjs";import{a as g}from"./chunk-MZP7RIQZ.mjs";import{a as u}from"./chunk-GETYSIZV.mjs";import{a as f}from"./chunk-HKMNAXLM.mjs";import{a as v}from"./chunk-U3FYDDE2.mjs";import{c as m,f as p}from"./chunk-FYQBRCQM.mjs";import{a as d}from"./chunk-VRE6VCHX.mjs";import{a as s}from"./chunk-7WIO2CIC.mjs";import{a as x}from"./chunk-6C4WESLL.mjs";import{a as N}from"./chunk-ITJH72Z2.mjs";import{a as h}from"./chunk-FMJBJ3HN.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{a as b}from"./chunk-WU3JMLSC.mjs";import{a as y}from"./chunk-BZAYEKYC.mjs";import z from"next/image";import{jsx as e,jsxs as o}from"react/jsx-runtime";var H=t=>({root:{type:"root",format:"",indent:0,version:1,children:[{type:"paragraph",format:"",indent:0,version:1,children:[{mode:"normal",text:t,type:"text",style:"",detail:0,format:0,version:1}],direction:"ltr",textStyle:"",textFormat:0}],direction:"ltr"}}),T=({children:t})=>e("div",{children:o("div",{className:"sticky top-0 h-screen",children:[t,e(s,{className:"text-black z-10",position:"header"})]})}),R=()=>o(T,{children:[o("video",{className:"fixed inset-0 object-cover w-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[e("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),e("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:e(h,{children:o("div",{className:"flex flex-col items-start md:w-1/2 mb-10 z-0 md:mb-0",children:[e("h1",{className:"text-5xl md:text-7xl mb-6",children:"Lorum ipsum."}),e("div",{className:"text-lg md:text-2xl text-gray-300 mb-8 max-w-lg",children:"Lorum ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec dui ac odio."})]})})})]}),L={highImpact:u,lowImpact:v,mediumImpact:f,sectionHero:g,dummy:R};function P({...t}){let i=t.style;return o("div",{className:"relative overflow-y-none scroll-smooth snap-y snap-mandatory",children:[e(N,{isMenuOpen:!0,logoLight:y,logoDark:b,...t.header}),e(I,{...t.hero}),e(c,{theme:"light",style:i,children:e(k,{...t.service})}),e(c,{theme:"dark",style:i,image:t.service.services[0].image,children:e(j,{})}),e(c,{theme:"light",style:i,children:e(j,{})}),e(c,{theme:"dark",style:i,children:e(S,{...t.contact})}),e(c,{theme:"light",style:i,children:e(w,{...t.contact})}),e(c,{theme:"last",style:i,children:e(C,{...t.blog})}),e(m,{...t.cta}),e(x,{...t.footer})]})}var I=t=>{let{type:i}=t||{};if(!i||i==="none")return null;let l=L[i];return l?e(l,{...t}):null},j=()=>{let t={blurDataURL:"/assets/props/Cortex-Handshake-BG.jpg",height:1315,url:"/assets/props/Cortex-Handshake-BG.jpg",width:1920};return e("div",{className:"container",children:o("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[o("div",{className:n("w-full text-left"),children:[e("h2",{className:"text-3xl md:text-5xl text-primary",children:"Lorum ipsum..."}),e("p",{className:"mt-4 text-gray-700 text-lg",children:e(p,{enableGutter:!1,content:H("Lorum ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec dui ac odio. Nulla facilisi. Nullam nec nisi nec odio ultricies ultricies. Nullam nec nisi nec odio ultricies ultricies. Nullam nec nisi nec odio ultricies ultricies. Lorum ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec dui ac odio. Nulla facilisi. Nullam nec nisi nec odio ultricies ultricies. Nullam nec nisi nec odio ultricies ultricies. Nullam nec nisi nec odio ultricies ultricies."),enableProse:!1,className:n("prose prose-headings:text-foreground prose-p:text-foreground")})}),e("button",{className:"mt-6 px-6 py-3 border border-1 border-accent text-foreground rounded-full text-base hover:bg-accent hover:text-accent-foreground transition",children:"Click here"})]}),e("div",{className:"w-full h-full min-h-96 p-6 md:p-6 flex justify-center",children:e(z,{src:t.url,alt:"image",width:t.width,height:t.height,className:"max-w-full"})})]})})},c=({children:t,theme:i,style:l,neighbours:M,shape:D,image:B,id:r,continueTheme:F})=>{let G=a=>o("div",{className:"select-none",children:[a&&typeof a=="object"&&e(d,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:a}),a&&typeof a=="string"&&e("div",{children:e(z,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:a})})]});if(i==="dark"&&l==="slide")return e("section",{id:r||"next-section",className:"sticky md:top-0 h-screen",children:o("div",{className:"dark pt-0 min-h-[80vh]",children:[e(s,{className:"z-10",position:"dark-top"}),o("div",{className:"relative",children:[e("div",{className:"flex items-center bg-black justify-center pt-12",children:e("div",{className:"container",children:t})}),e(s,{className:"z-10",position:"dark-bottom"})]})]})});if(i==="light"&&l==="slide")return e("section",{id:r||"next-section",className:"sticky top-0 light pt-0 h-screen",children:o("div",{className:"sticky top-0 light pt-0 h-screen",children:[e(s,{className:"z-10",position:"light-top"}),o("div",{className:"relative bg-white",children:[e("div",{className:"flex items-center bg-white justify-center pt-12",children:e("div",{className:"container",children:t})}),e("div",{className:"h-[200px] bg-white"})]})]})});if(i==="first")return e("section",{id:r||"next-section",className:"",children:e("div",{className:"sticky top-0 light bg-background pt-6 min-h-[80vh]",children:o("div",{className:"relative",children:[e("div",{className:"flex items-center justify-center pt-12",children:e("div",{className:"container",children:t})}),e(s,{className:"text-black z-10",position:"bottom-right"})]})})});if(i==="light")return e("section",{id:r||"next-section",className:"",children:e("div",{className:n("sticky top-0 light bg-background min-h-[50vh]","pb-10"),children:e("div",{className:"flex items-center pt-8 justify-center",children:e("div",{className:"container",children:t})})})});if(i==="dark")return e("section",{id:r||"next-section",className:"",children:o("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[e(s,{className:"text-black z-10",position:"bottom-right"}),e("div",{className:"flex items-center justify-center pt-12 bg-black",children:e("div",{className:"container",children:t})}),e(s,{className:"text-accent z-10",position:"top"})]})});if(i==="last")return e("section",{id:r||"next-section",className:"",children:o("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[e(s,{className:"text-black z-10",position:"bottom-right"}),e("div",{className:"flex items-center justify-center pb-12 bg-black min-h-[80vh]",children:e("div",{className:"container",children:t})})]})})};export{P as a,c as b};
4
+ import{a as S,b as w}from"./chunk-4SRUEQTP.mjs";import{a as k}from"./chunk-BQQ4V4PX.mjs";import{a as C}from"./chunk-O24GFE6Q.mjs";import{a as g}from"./chunk-MZP7RIQZ.mjs";import{a as u}from"./chunk-GETYSIZV.mjs";import{a as v}from"./chunk-U3FYDDE2.mjs";import{a as f}from"./chunk-HKMNAXLM.mjs";import{c as m,f as p}from"./chunk-FYQBRCQM.mjs";import{a as d}from"./chunk-VRE6VCHX.mjs";import{a as x}from"./chunk-6C4WESLL.mjs";import{a as N}from"./chunk-LAQ3QAUW.mjs";import{a as s}from"./chunk-7WIO2CIC.mjs";import{a as h}from"./chunk-FMJBJ3HN.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{a as b}from"./chunk-WU3JMLSC.mjs";import{a as y}from"./chunk-BZAYEKYC.mjs";import z from"next/image";import{jsx as e,jsxs as o}from"react/jsx-runtime";var H=t=>({root:{type:"root",format:"",indent:0,version:1,children:[{type:"paragraph",format:"",indent:0,version:1,children:[{mode:"normal",text:t,type:"text",style:"",detail:0,format:0,version:1}],direction:"ltr",textStyle:"",textFormat:0}],direction:"ltr"}}),T=({children:t})=>e("div",{children:o("div",{className:"sticky top-0 h-screen",children:[t,e(s,{className:"text-black z-10",position:"header"})]})}),R=()=>o(T,{children:[o("video",{className:"fixed inset-0 object-cover w-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[e("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),e("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:e(h,{children:o("div",{className:"flex flex-col items-start md:w-1/2 mb-10 z-0 md:mb-0",children:[e("h1",{className:"text-5xl md:text-7xl mb-6",children:"Lorum ipsum."}),e("div",{className:"text-lg md:text-2xl text-gray-300 mb-8 max-w-lg",children:"Lorum ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec dui ac odio."})]})})})]}),L={highImpact:u,lowImpact:v,mediumImpact:f,sectionHero:g,dummy:R};function P({...t}){let i=t.style;return o("div",{className:"relative overflow-y-none scroll-smooth snap-y snap-mandatory",children:[e(N,{isMenuOpen:!0,logoLight:y,logoDark:b,...t.header}),e(I,{...t.hero}),e(c,{theme:"light",style:i,children:e(k,{...t.service})}),e(c,{theme:"dark",style:i,image:t.service.services[0].image,children:e(j,{})}),e(c,{theme:"light",style:i,children:e(j,{})}),e(c,{theme:"dark",style:i,children:e(S,{...t.contact})}),e(c,{theme:"light",style:i,children:e(w,{...t.contact})}),e(c,{theme:"last",style:i,children:e(C,{...t.blog})}),e(m,{...t.cta}),e(x,{...t.footer})]})}var I=t=>{let{type:i}=t||{};if(!i||i==="none")return null;let l=L[i];return l?e(l,{...t}):null},j=()=>{let t={blurDataURL:"/assets/props/Cortex-Handshake-BG.jpg",height:1315,url:"/assets/props/Cortex-Handshake-BG.jpg",width:1920};return e("div",{className:"container",children:o("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[o("div",{className:n("w-full text-left"),children:[e("h2",{className:"text-3xl md:text-5xl text-primary",children:"Lorum ipsum..."}),e("p",{className:"mt-4 text-gray-700 text-lg",children:e(p,{enableGutter:!1,content:H("Lorum ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec dui ac odio. Nulla facilisi. Nullam nec nisi nec odio ultricies ultricies. Nullam nec nisi nec odio ultricies ultricies. Nullam nec nisi nec odio ultricies ultricies. Lorum ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec dui ac odio. Nulla facilisi. Nullam nec nisi nec odio ultricies ultricies. Nullam nec nisi nec odio ultricies ultricies. Nullam nec nisi nec odio ultricies ultricies."),enableProse:!1,className:n("prose prose-headings:text-foreground prose-p:text-foreground")})}),e("button",{className:"mt-6 px-6 py-3 border border-1 border-accent text-foreground rounded-full text-base hover:bg-accent hover:text-accent-foreground transition",children:"Click here"})]}),e("div",{className:"w-full h-full min-h-96 p-6 md:p-6 flex justify-center",children:e(z,{src:t.url,alt:"image",width:t.width,height:t.height,className:"max-w-full"})})]})})},c=({children:t,theme:i,style:l,neighbours:M,shape:D,image:B,id:r,continueTheme:F})=>{let G=a=>o("div",{className:"select-none",children:[a&&typeof a=="object"&&e(d,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:a}),a&&typeof a=="string"&&e("div",{children:e(z,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:a})})]});if(i==="dark"&&l==="slide")return e("section",{id:r||"next-section",className:"sticky md:top-0 h-screen",children:o("div",{className:"dark pt-0 min-h-[80vh]",children:[e(s,{className:"z-10",position:"dark-top"}),o("div",{className:"relative",children:[e("div",{className:"flex items-center bg-black justify-center pt-12",children:e("div",{className:"container",children:t})}),e(s,{className:"z-10",position:"dark-bottom"})]})]})});if(i==="light"&&l==="slide")return e("section",{id:r||"next-section",className:"sticky top-0 light pt-0 h-screen",children:o("div",{className:"sticky top-0 light pt-0 h-screen",children:[e(s,{className:"z-10",position:"light-top"}),o("div",{className:"relative bg-white",children:[e("div",{className:"flex items-center bg-white justify-center pt-12",children:e("div",{className:"container",children:t})}),e("div",{className:"h-[200px] bg-white"})]})]})});if(i==="first")return e("section",{id:r||"next-section",className:"",children:e("div",{className:"sticky top-0 light bg-background pt-6 min-h-[80vh]",children:o("div",{className:"relative",children:[e("div",{className:"flex items-center justify-center pt-12",children:e("div",{className:"container",children:t})}),e(s,{className:"text-black z-10",position:"bottom-right"})]})})});if(i==="light")return e("section",{id:r||"next-section",className:"",children:e("div",{className:n("sticky top-0 light bg-background min-h-[50vh]","pb-10"),children:e("div",{className:"flex items-center pt-8 justify-center",children:e("div",{className:"container",children:t})})})});if(i==="dark")return e("section",{id:r||"next-section",className:"",children:o("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[e(s,{className:"text-black z-10",position:"bottom-right"}),e("div",{className:"flex items-center justify-center pt-12 bg-black",children:e("div",{className:"container",children:t})}),e(s,{className:"text-accent z-10",position:"top"})]})});if(i==="last")return e("section",{id:r||"next-section",className:"",children:o("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[e(s,{className:"text-black z-10",position:"bottom-right"}),e("div",{className:"flex items-center justify-center pb-12 bg-black min-h-[80vh]",children:e("div",{className:"container",children:t})})]})})};export{P as a,c as b};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as E}from"./chunk-HNHUOQGZ.mjs";import{a as x}from"./chunk-DFIXTV2M.mjs";import{a as y,c as C,d as S,g as D,i as g}from"./chunk-YFAZQYK4.mjs";import{a as k}from"./chunk-B4H6T2GP.mjs";import{a as h}from"./chunk-L5JPAKPM.mjs";import{b as i}from"./chunk-ZUA4KNIR.mjs";import{motion as K}from"motion/react";import{Save as G,X as T,Plus as H,ChevronDown as J,ChevronRight as L,Info as M,File as F,FileText as Q,Type as W}from"lucide-react";import{useEffect as Y,useState as v}from"react";import{jsx as e,jsxs as d}from"react/jsx-runtime";function ce({document:u,onSave:A,mode:Z="edit",onCancel:B,availableDocuments:p=[],knowledgeContexts:I=[]}){let[n,r]=v({...u,updatedAt:new Date}),[m,_]=v(!1),[N,j]=v(n.richTextContent);Y(()=>{r(u)},[u]);let ee=t=>{switch(t){case"markdown":case"mdx":return e(Q,{className:"h-6 w-6 text-primary"});case"richText":return e(F,{className:"h-6 w-6 text-success"});case"text":return e(W,{className:"h-6 w-6 text-muted-foreground"});default:return e(F,{className:"h-6 w-6 text-muted-foreground"})}},V=t=>{switch(t){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},z=()=>{let t=new Set,a=new Set;return I.forEach(s=>{s.menuConfig.groupBy.forEach(l=>t.add(l))}),p.forEach(s=>{s.metadata&&Object.keys(s.metadata).forEach(l=>a.add(l))}),{contextKeys:Array.from(t).sort(),documentKeys:Array.from(a).sort(),allKeys:Array.from(new Set([...t,...a])).sort()}},O=t=>{let a=new Set;return p.forEach(s=>{s.metadata?.[t]&&a.add(String(s.metadata[t]))}),Array.from(a).sort()},R=z(),$=()=>{A({...n,richTextContent:N})},c=(t,a)=>{r(s=>({...s,metadata:{...s.metadata,[t]:a}}))},P=(t,a)=>{a==="__custom__"?c(t,""):c(t,a)},U=()=>{c("","")},X=t=>{r(a=>{let s={...a.metadata};return delete s[t],{...a,metadata:s}})};return d(K.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[d("div",{className:"border-b border-border bg-card p-8 pb-6",children:[d("div",{className:"flex items-start justify-between gap-4 mb-4",children:[e("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:d("div",{className:"flex-1 min-w-0",children:[d("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[e("div",{className:"flex-1 min-w-0",children:e(x,{fieldName:"title",value:n.title,label:"",onSave:(t,a)=>r(s=>({...s,title:a})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),e("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${V(n.format)} flex-shrink-0 mt-1`,children:n.format.toUpperCase()})]}),e("div",{className:"mt-2",children:e(x,{fieldName:"description",value:n.description||"Click to add description...",label:"",multiline:!0,onSave:(t,a)=>r(s=>({...s,description:a})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})}),d("div",{className:"flex items-center gap-2 flex-shrink-0",children:[d(i,{variant:"ghost",size:"sm",onClick:()=>_(!m),className:"gap-2",children:[e(M,{className:"h-4 w-4"}),"Metadata",n.metadata&&Object.keys(n.metadata).length>0&&e("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:Object.keys(n.metadata).length}),m?e(J,{className:"h-4 w-4"}):e(L,{className:"h-4 w-4"})]}),d(i,{variant:"outline",size:"sm",onClick:B,className:"gap-2",children:[e(T,{className:"h-4 w-4"}),"Cancel"]}),d(i,{size:"sm",onClick:$,className:"gap-2",children:[e(G,{className:"h-4 w-4"}),"Save"]})]})]}),e(K.div,{initial:!1,animate:{height:m?"auto":0,opacity:m?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden h-full max-h-full",children:d("div",{className:"pt-4 border-t border-border mt-4 h-screen max-h-full flex",children:[d("div",{className:"flex items-center justify-between mb-3",children:[d("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[e(M,{className:"h-4 w-4"}),"Document Metadata"]}),d(i,{type:"button",variant:"outline",size:"sm",onClick:U,className:"gap-1 h-8",children:[e(H,{className:"h-3 w-3"}),"Add Field"]})]}),e("div",{className:"bg-muted rounded-lg p-4 border border-border",children:n.metadata&&Object.keys(n.metadata).length>0?e("div",{className:"space-y-2",children:Object.entries(n.metadata).map(([t,a],s)=>{let l=O(t);return d("div",{className:"flex gap-2 items-center",children:[e(h,{value:t,onChange:o=>{let b=o.target.value||"",q=n.metadata?.[t];r(w=>{let f={...w.metadata};return delete f[t],b&&(f[b]=q||""),{...w,metadata:f}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${t}`}),e("datalist",{id:`metadata-keys-${t}`,children:R.allKeys.map(o=>e("option",{value:o},o))}),e("span",{className:"text-muted-foreground text-sm",children:"="}),l.length>0?d(y,{value:String(a||""),onValueChange:o=>P(t,o),children:[e(S,{className:"flex-1 h-8 text-sm",children:e(C,{placeholder:"Value"})}),d(D,{children:[l.map(o=>e(g,{value:o,children:o},o)),e(g,{value:"__custom__",children:e("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):e(h,{value:String(a||""),onChange:o=>c(t,o.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),e(i,{type:"button",variant:"ghost",size:"sm",onClick:()=>X(t),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:e(T,{className:"h-3 w-3"})})]},`metadata-key-${s}`)})}):d("div",{className:"text-center py-4",children:[e("p",{className:"text-sm text-muted-foreground mb-2",children:"No metadata fields"}),e("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" to create metadata'})]})})]})})]}),e("div",{className:"flex-1 overflow-hidden",children:e("div",{className:"p-8 h-full max-h-full overflow-auto",children:n.format==="richText"?e(E,{setValue:j,value:N,name:"richTextContent"}):e(k,{value:n.content||"",onChange:t=>r(a=>({...a,content:t.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})]})}export{ce as a};
4
+ import{a as E}from"./chunk-QAJBJFRP.mjs";import{a as x}from"./chunk-DFIXTV2M.mjs";import{a as y,c as C,d as S,g as D,i as g}from"./chunk-YFAZQYK4.mjs";import{a as k}from"./chunk-B4H6T2GP.mjs";import{a as h}from"./chunk-L5JPAKPM.mjs";import{b as i}from"./chunk-ZUA4KNIR.mjs";import{motion as K}from"motion/react";import{Save as G,X as T,Plus as H,ChevronDown as J,ChevronRight as L,Info as M,File as F,FileText as Q,Type as W}from"lucide-react";import{useEffect as Y,useState as v}from"react";import{jsx as e,jsxs as d}from"react/jsx-runtime";function ce({document:u,onSave:A,mode:Z="edit",onCancel:B,availableDocuments:p=[],knowledgeContexts:I=[]}){let[n,r]=v({...u,updatedAt:new Date}),[m,_]=v(!1),[N,j]=v(n.richTextContent);Y(()=>{r(u)},[u]);let ee=t=>{switch(t){case"markdown":case"mdx":return e(Q,{className:"h-6 w-6 text-primary"});case"richText":return e(F,{className:"h-6 w-6 text-success"});case"text":return e(W,{className:"h-6 w-6 text-muted-foreground"});default:return e(F,{className:"h-6 w-6 text-muted-foreground"})}},V=t=>{switch(t){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},z=()=>{let t=new Set,a=new Set;return I.forEach(s=>{s.menuConfig.groupBy.forEach(l=>t.add(l))}),p.forEach(s=>{s.metadata&&Object.keys(s.metadata).forEach(l=>a.add(l))}),{contextKeys:Array.from(t).sort(),documentKeys:Array.from(a).sort(),allKeys:Array.from(new Set([...t,...a])).sort()}},O=t=>{let a=new Set;return p.forEach(s=>{s.metadata?.[t]&&a.add(String(s.metadata[t]))}),Array.from(a).sort()},R=z(),$=()=>{A({...n,richTextContent:N})},c=(t,a)=>{r(s=>({...s,metadata:{...s.metadata,[t]:a}}))},P=(t,a)=>{a==="__custom__"?c(t,""):c(t,a)},U=()=>{c("","")},X=t=>{r(a=>{let s={...a.metadata};return delete s[t],{...a,metadata:s}})};return d(K.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[d("div",{className:"border-b border-border bg-card p-8 pb-6",children:[d("div",{className:"flex items-start justify-between gap-4 mb-4",children:[e("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:d("div",{className:"flex-1 min-w-0",children:[d("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[e("div",{className:"flex-1 min-w-0",children:e(x,{fieldName:"title",value:n.title,label:"",onSave:(t,a)=>r(s=>({...s,title:a})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),e("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${V(n.format)} flex-shrink-0 mt-1`,children:n.format.toUpperCase()})]}),e("div",{className:"mt-2",children:e(x,{fieldName:"description",value:n.description||"Click to add description...",label:"",multiline:!0,onSave:(t,a)=>r(s=>({...s,description:a})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})}),d("div",{className:"flex items-center gap-2 flex-shrink-0",children:[d(i,{variant:"ghost",size:"sm",onClick:()=>_(!m),className:"gap-2",children:[e(M,{className:"h-4 w-4"}),"Metadata",n.metadata&&Object.keys(n.metadata).length>0&&e("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:Object.keys(n.metadata).length}),m?e(J,{className:"h-4 w-4"}):e(L,{className:"h-4 w-4"})]}),d(i,{variant:"outline",size:"sm",onClick:B,className:"gap-2",children:[e(T,{className:"h-4 w-4"}),"Cancel"]}),d(i,{size:"sm",onClick:$,className:"gap-2",children:[e(G,{className:"h-4 w-4"}),"Save"]})]})]}),e(K.div,{initial:!1,animate:{height:m?"auto":0,opacity:m?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden h-full max-h-full",children:d("div",{className:"pt-4 border-t border-border mt-4 h-screen max-h-full flex",children:[d("div",{className:"flex items-center justify-between mb-3",children:[d("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[e(M,{className:"h-4 w-4"}),"Document Metadata"]}),d(i,{type:"button",variant:"outline",size:"sm",onClick:U,className:"gap-1 h-8",children:[e(H,{className:"h-3 w-3"}),"Add Field"]})]}),e("div",{className:"bg-muted rounded-lg p-4 border border-border",children:n.metadata&&Object.keys(n.metadata).length>0?e("div",{className:"space-y-2",children:Object.entries(n.metadata).map(([t,a],s)=>{let l=O(t);return d("div",{className:"flex gap-2 items-center",children:[e(h,{value:t,onChange:o=>{let b=o.target.value||"",q=n.metadata?.[t];r(w=>{let f={...w.metadata};return delete f[t],b&&(f[b]=q||""),{...w,metadata:f}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${t}`}),e("datalist",{id:`metadata-keys-${t}`,children:R.allKeys.map(o=>e("option",{value:o},o))}),e("span",{className:"text-muted-foreground text-sm",children:"="}),l.length>0?d(y,{value:String(a||""),onValueChange:o=>P(t,o),children:[e(S,{className:"flex-1 h-8 text-sm",children:e(C,{placeholder:"Value"})}),d(D,{children:[l.map(o=>e(g,{value:o,children:o},o)),e(g,{value:"__custom__",children:e("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):e(h,{value:String(a||""),onChange:o=>c(t,o.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),e(i,{type:"button",variant:"ghost",size:"sm",onClick:()=>X(t),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:e(T,{className:"h-3 w-3"})})]},`metadata-key-${s}`)})}):d("div",{className:"text-center py-4",children:[e("p",{className:"text-sm text-muted-foreground mb-2",children:"No metadata fields"}),e("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" to create metadata'})]})})]})})]}),e("div",{className:"flex-1 overflow-hidden",children:e("div",{className:"p-8 h-full max-h-full overflow-auto",children:n.format==="richText"?e(E,{setValue:j,value:N,name:"richTextContent"}):e(k,{value:n.content||"",onChange:t=>r(a=>({...a,content:t.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})]})}export{ce as a};
@@ -1,4 +1,4 @@
1
- import{a as c}from"./chunk-SV7NMNDI.mjs";import{a as d}from"./chunk-2OOJ4ZFB.mjs";import{c as g}from"./chunk-YNNW2C2U.mjs";import{a as p}from"./chunk-FMJBJ3HN.mjs";import{a as l}from"./chunk-WISCWNL2.mjs";import{a as i}from"./chunk-MDJREBVI.mjs";import f from"next/image";import{FaArrowRight as x}from"react-icons/fa6";import{jsx as e,jsxs as r}from"react/jsx-runtime";function z({blogs:a,sectionHeading:t,base:n="insights"}){return r(p,{children:[e("div",{className:"",children:t&&e("div",{"data-aos":"fade-up","data-aos-delay":"100",children:e(d,{...t,alignment:"start",hasBottomSpacing:!0})})}),a&&a.length>0&&e("div",{className:"-mx-4 flex flex-wrap justify-start gap-y-4",children:a.map((s,o)=>e("div",{"data-aos":"fade-up","data-aos-delay":c([200,400,600],o),className:"w-full h-full md:w-1/2 md:px-4 lg:w-1/3",children:e(v,{...s,base:n})},o))})]})}var u=i("inline-flex items-center gap-2 text-white"),L=i("text-sm text-white");function v({slug:a,meta:t,authors:n,title:s,publishedAt:o,categories:h,base:m}){return r("article",{className:"group/blog relative z-1 flex h-full min-h-[452px] flex-col overflow-hidden rounded-5 p-0",children:[e("span",{className:"absolute inset-0 z-[2] "}),e(f,{src:t?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:t?.image?.alt||"Blog image",fill:!0,sizes:`
1
+ import{a as c}from"./chunk-SV7NMNDI.mjs";import{a as d}from"./chunk-2OOJ4ZFB.mjs";import{c as g}from"./chunk-YNNW2C2U.mjs";import{a as l}from"./chunk-WISCWNL2.mjs";import{a as p}from"./chunk-FMJBJ3HN.mjs";import{a as i}from"./chunk-MDJREBVI.mjs";import f from"next/image";import{FaArrowRight as x}from"react-icons/fa6";import{jsx as e,jsxs as r}from"react/jsx-runtime";function z({blogs:a,sectionHeading:t,base:n="insights"}){return r(p,{children:[e("div",{className:"",children:t&&e("div",{"data-aos":"fade-up","data-aos-delay":"100",children:e(d,{...t,alignment:"start",hasBottomSpacing:!0})})}),a&&a.length>0&&e("div",{className:"-mx-4 flex flex-wrap justify-start gap-y-4",children:a.map((s,o)=>e("div",{"data-aos":"fade-up","data-aos-delay":c([200,400,600],o),className:"w-full h-full md:w-1/2 md:px-4 lg:w-1/3",children:e(v,{...s,base:n})},o))})]})}var u=i("inline-flex items-center gap-2 text-white"),L=i("text-sm text-white");function v({slug:a,meta:t,authors:n,title:s,publishedAt:o,categories:h,base:m}){return r("article",{className:"group/blog relative z-1 flex h-full min-h-[452px] flex-col overflow-hidden rounded-5 p-0",children:[e("span",{className:"absolute inset-0 z-[2] "}),e(f,{src:t?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:t?.image?.alt||"Blog image",fill:!0,sizes:`
2
2
  (min-width:768px) 50vw,
3
3
  (min-width:1024px) 33vw,
4
4
  100vw
@@ -1 +1 @@
1
- import{a as O}from"./chunk-UP67R64J.mjs";import{a as S}from"./chunk-6QERRKM4.mjs";import{a as R}from"./chunk-VSU7LYXZ.mjs";import{a as y}from"./chunk-IPRG56MW.mjs";import{a as _,b as E,c as $,d as H,e as L}from"./chunk-HFEN3KJC.mjs";import{a as A}from"./chunk-L2UJOICL.mjs";import{a as I}from"./chunk-T3F3RQIC.mjs";import{a as m,b as h,i as b,j as C}from"./chunk-OCPX4QPC.mjs";import{a as D,b as M,c as w,d as x}from"./chunk-KY7WQYN4.mjs";import{a as N}from"./chunk-MDJREBVI.mjs";import{useLexicalComposerContext as de}from"@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext";import{mergeRegister as pe}from"@payloadcms/richtext-lexical/lexical/utils";import{$createParagraphNode as ge,$getRoot as fe,$getSelection as F,$isParagraphNode as ue,$isRangeSelection as U,CAN_REDO_COMMAND as me,CAN_UNDO_COMMAND as he,FORMAT_ELEMENT_COMMAND as d,FORMAT_TEXT_COMMAND as s,SELECTION_CHANGE_COMMAND as be,UNDO_COMMAND as P}from"@payloadcms/richtext-lexical/lexical";import{$setBlocksType as B}from"@payloadcms/richtext-lexical/lexical/selection";import{INSERT_ORDERED_LIST_COMMAND as Ce,INSERT_UNORDERED_LIST_COMMAND as ke}from"@payloadcms/richtext-lexical/lexical/list";import{AlignCenter as ve,AlignJustify as Te,AlignLeft as Ne,AlignRight as De,ChevronDown as j,ImageUp as Me,List as we,ListOrdered as xe,RotateCcw as ye,RotateCw as Ae}from"lucide-react";import{Fragment as Re,useCallback as Ie,useEffect as Oe,useRef as Se,useState as a}from"react";import{$createHeadingNode as _e}from"@payloadcms/richtext-lexical/lexical/rich-text";import{jsx as o,jsxs as l}from"react/jsx-runtime";var k=1;function Ee(){return o("span",{className:"border border-[#222222]"})}function $e(){let[t]=de(),J=Se(null),[G,X]=a(!1),[Y,q]=a(!1),[z,K]=a(!1),[Q,V]=a(!1),[W,Z]=a(!1),[ee,oe]=a(!1),[te,ie]=a(!1),[ne,ae]=a(!1),[He,le]=a(!1),[v,se]=a("left"),[T,ce]=a("p"),c=e=>{t.update(()=>{let n=F();U(n)&&(e==="p"?B(n,()=>ge()):B(n,()=>_e(e)))})},p=Ie(()=>{let e=F();if(U(e)){K(e.hasFormat("bold")),V(e.hasFormat("italic")),Z(e.hasFormat("underline")),oe(e.hasFormat("strikethrough")),ie(e.hasFormat("subscript")),ae(e.hasFormat("superscript"));let n=e.anchor.getNode(),i=n;for(;i&&!ue(i)&&i!==fe();){let r=i.getParent();r&&(i=r)}if(i){let r=i.getFormatType();se(r||"left")}let u=n.getTopLevelElement()?.__tag;ce(u||"p")}},[]);Oe(()=>pe(t.registerUpdateListener(({editorState:e})=>{e.read(()=>{p()})}),t.registerCommand(be,(e,n)=>(p(),!1),k),t.registerCommand(he,e=>(X(e),!1),k),t.registerCommand(me,e=>(q(e),!1),k)),[t,p]);let re=[[{label:"Undo",icon:o(ye,{width:15,height:15}),onClick:()=>{t.dispatchCommand(P,void 0)},disabled:!G},{label:"Redo",icon:o(Ae,{width:15,height:15}),onClick:()=>{t.dispatchCommand(P,void 0)},disabled:!Y}],[{label:"Bold",icon:o(y,{}),onClick:()=>{t.dispatchCommand(s,"bold")},value:"bold",active:z},{label:"Italic",icon:o(A,{}),onClick:()=>{t.dispatchCommand(s,"italic")},value:"italic",active:Q},{label:"Underline",icon:o(R,{}),onClick:()=>{t.dispatchCommand(s,"underline")},value:"underline",active:W},{label:"Strikethrough",icon:o(I,{}),onClick:()=>{t.dispatchCommand(s,"strikethrough")},value:"strikethrough",active:ee},{label:"Subscript",icon:o(O,{}),onClick:()=>{t.dispatchCommand(s,"subscript")},value:"subscript",active:te},{label:"Superscript",icon:o(S,{}),onClick:()=>{t.dispatchCommand(s,"superscript")},value:"superscript",active:ne}]],g=[{label:"Left Align",direction:"left",icon:o(Ne,{width:15,height:15}),onClick:()=>{t.dispatchCommand(d,"left")}},{label:"Center Align",direction:"center",icon:o(ve,{width:15,height:15}),onClick:()=>{t.dispatchCommand(d,"center")}},{label:"Right Align",direction:"right",icon:o(De,{width:15,height:15}),onClick:()=>{t.dispatchCommand(d,"right")}},{label:"Justify Align",direction:"justify",icon:o(Te,{width:15,height:15}),onClick:()=>{t.dispatchCommand(d,"justify")}}],f=[{label:"Normal Text",value:"p",icon:o(_,{}),onClick:()=>c("p")},{label:"Heading 1",value:"h1",icon:o(E,{}),onClick:()=>c("h1")},{label:"Heading 2",value:"h2",icon:o($,{}),onClick:()=>c("h2")},{label:"Heading 3",value:"h3",icon:o(H,{}),onClick:()=>c("h3")},{label:"Heading 4",value:"h4",icon:o(L,{}),onClick:()=>c("h4")},...[{label:"Unordered List",value:"ul",icon:o(we,{width:15,height:15}),onClick:()=>{t.dispatchCommand(ke,void 0)}},{label:"Ordered List",value:"ol",icon:o(xe,{width:15,height:15}),onClick:()=>{t.dispatchCommand(Ce,void 0)}}]],Fe=[{label:"Insert Image",icon:o(Me,{width:15,height:15}),onClick:()=>{le(!0)},disabled:!1}];return o("div",{className:"flex justify-between border border-[#222222] py-2 px-2",children:l("div",{className:"flex gap-2 ",ref:J,children:[re.map((e,n)=>l(Re,{children:[o("div",{className:"flex items-center gap-2",children:e.map((i,u)=>o("div",{role:"button","aria-disabled":i.disabled||!1,onClick:i.onClick,className:N("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",i.active&&"bg-[#3c3c3c]"),"aria-label":i.label,children:o(D,{children:l(M,{children:[o(w,{className:"text-[#b5b5b5]",children:i.icon}),o(x,{children:o("p",{children:i.label})})]})})},u))}),o(Ee,{})]},`toolbar-option-${e.length}-${n}`)),l(m,{children:[l(h,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[g.find(e=>e.direction===v)?.icon,g.find(e=>e.direction===v)?.label,o(j,{width:15,height:15})]}),o(b,{className:"bg-black hover:bg-black",children:g.map((e,n)=>l(C,{onClick:e.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[o("span",{children:e.icon}),o("span",{children:e.label})]},`${e.label}-${n}`))})]}),l(m,{children:[l(h,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[f.find(e=>e.value===T)?.icon,f.find(e=>e.value===T)?.label,o(j,{width:15,height:15})]}),o(b,{className:"bg-black hover:bg-black",children:f.map((e,n)=>l(C,{onClick:e.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[o("span",{children:e.icon}),o("span",{children:e.label})]},`heading-option-${e.label}-${n}`))})]})]})})}export{$e as a};
1
+ import{a as I}from"./chunk-T3F3RQIC.mjs";import{a as O}from"./chunk-UP67R64J.mjs";import{a as S}from"./chunk-6QERRKM4.mjs";import{a as R}from"./chunk-VSU7LYXZ.mjs";import{a as y}from"./chunk-IPRG56MW.mjs";import{a as _,b as E,c as $,d as H,e as L}from"./chunk-HFEN3KJC.mjs";import{a as A}from"./chunk-L2UJOICL.mjs";import{a as m,b as h,i as b,j as C}from"./chunk-OCPX4QPC.mjs";import{a as D,b as M,c as w,d as x}from"./chunk-KY7WQYN4.mjs";import{a as N}from"./chunk-MDJREBVI.mjs";import{useLexicalComposerContext as de}from"@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext";import{mergeRegister as pe}from"@payloadcms/richtext-lexical/lexical/utils";import{$createParagraphNode as ge,$getRoot as fe,$getSelection as F,$isParagraphNode as ue,$isRangeSelection as U,CAN_REDO_COMMAND as me,CAN_UNDO_COMMAND as he,FORMAT_ELEMENT_COMMAND as d,FORMAT_TEXT_COMMAND as s,SELECTION_CHANGE_COMMAND as be,UNDO_COMMAND as P}from"@payloadcms/richtext-lexical/lexical";import{$setBlocksType as B}from"@payloadcms/richtext-lexical/lexical/selection";import{INSERT_ORDERED_LIST_COMMAND as Ce,INSERT_UNORDERED_LIST_COMMAND as ke}from"@payloadcms/richtext-lexical/lexical/list";import{AlignCenter as ve,AlignJustify as Te,AlignLeft as Ne,AlignRight as De,ChevronDown as j,ImageUp as Me,List as we,ListOrdered as xe,RotateCcw as ye,RotateCw as Ae}from"lucide-react";import{Fragment as Re,useCallback as Ie,useEffect as Oe,useRef as Se,useState as a}from"react";import{$createHeadingNode as _e}from"@payloadcms/richtext-lexical/lexical/rich-text";import{jsx as o,jsxs as l}from"react/jsx-runtime";var k=1;function Ee(){return o("span",{className:"border border-[#222222]"})}function $e(){let[t]=de(),J=Se(null),[G,X]=a(!1),[Y,q]=a(!1),[z,K]=a(!1),[Q,V]=a(!1),[W,Z]=a(!1),[ee,oe]=a(!1),[te,ie]=a(!1),[ne,ae]=a(!1),[He,le]=a(!1),[v,se]=a("left"),[T,ce]=a("p"),c=e=>{t.update(()=>{let n=F();U(n)&&(e==="p"?B(n,()=>ge()):B(n,()=>_e(e)))})},p=Ie(()=>{let e=F();if(U(e)){K(e.hasFormat("bold")),V(e.hasFormat("italic")),Z(e.hasFormat("underline")),oe(e.hasFormat("strikethrough")),ie(e.hasFormat("subscript")),ae(e.hasFormat("superscript"));let n=e.anchor.getNode(),i=n;for(;i&&!ue(i)&&i!==fe();){let r=i.getParent();r&&(i=r)}if(i){let r=i.getFormatType();se(r||"left")}let u=n.getTopLevelElement()?.__tag;ce(u||"p")}},[]);Oe(()=>pe(t.registerUpdateListener(({editorState:e})=>{e.read(()=>{p()})}),t.registerCommand(be,(e,n)=>(p(),!1),k),t.registerCommand(he,e=>(X(e),!1),k),t.registerCommand(me,e=>(q(e),!1),k)),[t,p]);let re=[[{label:"Undo",icon:o(ye,{width:15,height:15}),onClick:()=>{t.dispatchCommand(P,void 0)},disabled:!G},{label:"Redo",icon:o(Ae,{width:15,height:15}),onClick:()=>{t.dispatchCommand(P,void 0)},disabled:!Y}],[{label:"Bold",icon:o(y,{}),onClick:()=>{t.dispatchCommand(s,"bold")},value:"bold",active:z},{label:"Italic",icon:o(A,{}),onClick:()=>{t.dispatchCommand(s,"italic")},value:"italic",active:Q},{label:"Underline",icon:o(R,{}),onClick:()=>{t.dispatchCommand(s,"underline")},value:"underline",active:W},{label:"Strikethrough",icon:o(I,{}),onClick:()=>{t.dispatchCommand(s,"strikethrough")},value:"strikethrough",active:ee},{label:"Subscript",icon:o(O,{}),onClick:()=>{t.dispatchCommand(s,"subscript")},value:"subscript",active:te},{label:"Superscript",icon:o(S,{}),onClick:()=>{t.dispatchCommand(s,"superscript")},value:"superscript",active:ne}]],g=[{label:"Left Align",direction:"left",icon:o(Ne,{width:15,height:15}),onClick:()=>{t.dispatchCommand(d,"left")}},{label:"Center Align",direction:"center",icon:o(ve,{width:15,height:15}),onClick:()=>{t.dispatchCommand(d,"center")}},{label:"Right Align",direction:"right",icon:o(De,{width:15,height:15}),onClick:()=>{t.dispatchCommand(d,"right")}},{label:"Justify Align",direction:"justify",icon:o(Te,{width:15,height:15}),onClick:()=>{t.dispatchCommand(d,"justify")}}],f=[{label:"Normal Text",value:"p",icon:o(_,{}),onClick:()=>c("p")},{label:"Heading 1",value:"h1",icon:o(E,{}),onClick:()=>c("h1")},{label:"Heading 2",value:"h2",icon:o($,{}),onClick:()=>c("h2")},{label:"Heading 3",value:"h3",icon:o(H,{}),onClick:()=>c("h3")},{label:"Heading 4",value:"h4",icon:o(L,{}),onClick:()=>c("h4")},...[{label:"Unordered List",value:"ul",icon:o(we,{width:15,height:15}),onClick:()=>{t.dispatchCommand(ke,void 0)}},{label:"Ordered List",value:"ol",icon:o(xe,{width:15,height:15}),onClick:()=>{t.dispatchCommand(Ce,void 0)}}]],Fe=[{label:"Insert Image",icon:o(Me,{width:15,height:15}),onClick:()=>{le(!0)},disabled:!1}];return o("div",{className:"flex justify-between border border-[#222222] py-2 px-2",children:l("div",{className:"flex gap-2 ",ref:J,children:[re.map((e,n)=>l(Re,{children:[o("div",{className:"flex items-center gap-2",children:e.map((i,u)=>o("div",{role:"button","aria-disabled":i.disabled||!1,onClick:i.onClick,className:N("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",i.active&&"bg-[#3c3c3c]"),"aria-label":i.label,children:o(D,{children:l(M,{children:[o(w,{className:"text-[#b5b5b5]",children:i.icon}),o(x,{children:o("p",{children:i.label})})]})})},u))}),o(Ee,{})]},`toolbar-option-${e.length}-${n}`)),l(m,{children:[l(h,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[g.find(e=>e.direction===v)?.icon,g.find(e=>e.direction===v)?.label,o(j,{width:15,height:15})]}),o(b,{className:"bg-black hover:bg-black",children:g.map((e,n)=>l(C,{onClick:e.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[o("span",{children:e.icon}),o("span",{children:e.label})]},`${e.label}-${n}`))})]}),l(m,{children:[l(h,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[f.find(e=>e.value===T)?.icon,f.find(e=>e.value===T)?.label,o(j,{width:15,height:15})]}),o(b,{className:"bg-black hover:bg-black",children:f.map((e,n)=>l(C,{onClick:e.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[o("span",{children:e.icon}),o("span",{children:e.label})]},`heading-option-${e.label}-${n}`))})]})]})})}export{$e as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as s}from"./chunk-NN4QIXZ2.mjs";import{AutoFocusPlugin as u}from"@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin";import{LexicalComposer as h}from"@payloadcms/richtext-lexical/lexical/react/LexicalComposer";import{ContentEditable as p}from"@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable";import{LexicalErrorBoundary as x}from"@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary";import{HistoryPlugin as g}from"@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin";import{RichTextPlugin as f}from"@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin";import{ListPlugin as C}from"@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin";import{ListItemNode as E,ListNode as b}from"@payloadcms/richtext-lexical/lexical/list";import{HeadingNode as v}from"@payloadcms/richtext-lexical/lexical/rich-text";import{OnChangePlugin as L}from"@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin";import{useEffect as c}from"react";import{useLexicalComposerContext as P}from"@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext";import{Fragment as y,jsx as t,jsxs as a}from"react/jsx-runtime";var R=({setValue:n,value:i,name:l,editable:e=!0})=>{let[o]=P(),r=d=>{d.read(()=>{let m=d.toJSON();n?.(()=>m)})};return c(()=>{o.setEditable(e)},[e]),c(()=>{i&&o.update(()=>{o.setEditorState(o.parseEditorState(i))})},[]),t("div",{className:"w-full",children:a("div",{className:" ",children:[e&&t(s,{}),a("div",{className:"px-4 my-4 border-l border-[#222222]",children:[t(f,{contentEditable:t(p,{name:l,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:x}),e&&a(y,{children:[t(g,{}),t(u,{}),t(C,{}),t(L,{onChange:r})]})]})]})})},N=({setValue:n,value:i,name:l,editable:e=!0})=>t(h,{initialConfig:{namespace:"Lexical editor",nodes:[b,E,v],onError(r){throw console.error("Lexical error:",r),r},theme:{code:"editor-code",heading:{h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:t(R,{value:i,setValue:n,name:l,editable:e})}),G=N;export{G as a};
4
+ import{a as s}from"./chunk-PTJVI53B.mjs";import{AutoFocusPlugin as u}from"@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin";import{LexicalComposer as h}from"@payloadcms/richtext-lexical/lexical/react/LexicalComposer";import{ContentEditable as p}from"@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable";import{LexicalErrorBoundary as x}from"@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary";import{HistoryPlugin as g}from"@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin";import{RichTextPlugin as f}from"@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin";import{ListPlugin as C}from"@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin";import{ListItemNode as E,ListNode as b}from"@payloadcms/richtext-lexical/lexical/list";import{HeadingNode as v}from"@payloadcms/richtext-lexical/lexical/rich-text";import{OnChangePlugin as L}from"@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin";import{useEffect as c}from"react";import{useLexicalComposerContext as P}from"@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext";import{Fragment as y,jsx as t,jsxs as a}from"react/jsx-runtime";var R=({setValue:n,value:i,name:l,editable:e=!0})=>{let[o]=P(),r=d=>{d.read(()=>{let m=d.toJSON();n?.(()=>m)})};return c(()=>{o.setEditable(e)},[e]),c(()=>{i&&o.update(()=>{o.setEditorState(o.parseEditorState(i))})},[]),t("div",{className:"w-full",children:a("div",{className:" ",children:[e&&t(s,{}),a("div",{className:"px-4 my-4 border-l border-[#222222]",children:[t(f,{contentEditable:t(p,{name:l,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:x}),e&&a(y,{children:[t(g,{}),t(u,{}),t(C,{}),t(L,{onChange:r})]})]})]})})},N=({setValue:n,value:i,name:l,editable:e=!0})=>t(h,{initialConfig:{namespace:"Lexical editor",nodes:[b,E,v],onError(r){throw console.error("Lexical error:",r),r},theme:{code:"editor-code",heading:{h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:t(R,{value:i,setValue:n,name:l,editable:e})}),G=N;export{G as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as b}from"./chunk-VZBIMHCR.mjs";import{a as y}from"./chunk-K3YZPHOE.mjs";import{a as f}from"./chunk-MAAKU7PN.mjs";import{a as g}from"./chunk-TZKQXT7Y.mjs";import{a as v}from"./chunk-EGEO3FNE.mjs";import{useState as q}from"react";import{ChevronDown as P}from"lucide-react";import{CalendarDays as R,Grid as k,PlusCircle as A,CheckSquare as V}from"lucide-react";import{useRouter as M}from"next/navigation";import{format as S,parseISO as T}from"date-fns";import{jsx as r,jsxs as s}from"react/jsx-runtime";function h(...t){return t.filter(Boolean).join(" ")}function K({holidays:t,currentUser:o,currentDate:w,leaveApprovals:x,employees:L,submitLeaveRequest:n,approveLeave:i,rejectLeave:m}){let[a,c]=q("Calendar View"),C=M(),D=!1,d=v.toUtcMidnight(T(w)),l=async e=>{let N=S(e,"dd-MM-yyyy"),p=new URL(window.location.href);return p.searchParams.set("date",N),C.push(p.toString()),{success:!0}};if(D)return r("div",{className:"flex justify-center items-center h-screen",children:r("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let u=[{name:"Grid View",icon:k,current:a==="Grid View"},{name:"Calendar View",icon:R,current:a==="Calendar View"},{name:"Request Leave",icon:A,current:a==="Request Leave"},{name:"Approve Leave",icon:V,current:a==="Approve Leave"}];return s("div",{className:"container mx-auto p-4 h-full",children:[s("div",{className:"mb-8",children:[s("div",{className:"sm:hidden",children:[r("select",{value:a,onChange:e=>c(e.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:u.map(e=>r("option",{children:e.name},e.name))}),r(P,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),r("div",{className:"hidden sm:block",children:r("div",{className:"border-b border-gray-200",children:r("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:u.map(e=>s("a",{onClick:()=>{(e.name!=="Approve Leave"||o.grade==="Manager"||o.grade==="Senior Manager"||o.grade==="Partner")&&c(e.name)},className:h(e.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",e.name==="Approve Leave"&&o.grade!=="Manager"&&o.grade!=="Senior Manager"&&o.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":e.current?"page":void 0,children:[r(e.icon,{className:h(e.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),r("span",{children:e.name})]},e.name))})})})]}),a==="Grid View"&&r(y,{currentDate:d,setCurrentDate:l,holidays:t,employees:L}),a==="Calendar View"&&r(b,{currentDate:d,setCurrentDate:l,holidays:t}),a==="Request Leave"&&r(f,{remainingDays:o.remainingLeaveDays,submitLeaveRequest:e=>n?n(e):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),a==="Approve Leave"&&r(g,{leaveRequests:x,onApprove:e=>i?i(e):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:e=>m?m(e):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}export{K as a};
4
+ import{a as g}from"./chunk-TZKQXT7Y.mjs";import{a as b}from"./chunk-VZBIMHCR.mjs";import{a as y}from"./chunk-K3YZPHOE.mjs";import{a as f}from"./chunk-MAAKU7PN.mjs";import{a as v}from"./chunk-EGEO3FNE.mjs";import{useState as q}from"react";import{ChevronDown as P}from"lucide-react";import{CalendarDays as R,Grid as k,PlusCircle as A,CheckSquare as V}from"lucide-react";import{useRouter as M}from"next/navigation";import{format as S,parseISO as T}from"date-fns";import{jsx as r,jsxs as s}from"react/jsx-runtime";function h(...t){return t.filter(Boolean).join(" ")}function K({holidays:t,currentUser:o,currentDate:w,leaveApprovals:x,employees:L,submitLeaveRequest:n,approveLeave:i,rejectLeave:m}){let[a,c]=q("Calendar View"),C=M(),D=!1,d=v.toUtcMidnight(T(w)),l=async e=>{let N=S(e,"dd-MM-yyyy"),p=new URL(window.location.href);return p.searchParams.set("date",N),C.push(p.toString()),{success:!0}};if(D)return r("div",{className:"flex justify-center items-center h-screen",children:r("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let u=[{name:"Grid View",icon:k,current:a==="Grid View"},{name:"Calendar View",icon:R,current:a==="Calendar View"},{name:"Request Leave",icon:A,current:a==="Request Leave"},{name:"Approve Leave",icon:V,current:a==="Approve Leave"}];return s("div",{className:"container mx-auto p-4 h-full",children:[s("div",{className:"mb-8",children:[s("div",{className:"sm:hidden",children:[r("select",{value:a,onChange:e=>c(e.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:u.map(e=>r("option",{children:e.name},e.name))}),r(P,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),r("div",{className:"hidden sm:block",children:r("div",{className:"border-b border-gray-200",children:r("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:u.map(e=>s("a",{onClick:()=>{(e.name!=="Approve Leave"||o.grade==="Manager"||o.grade==="Senior Manager"||o.grade==="Partner")&&c(e.name)},className:h(e.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",e.name==="Approve Leave"&&o.grade!=="Manager"&&o.grade!=="Senior Manager"&&o.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":e.current?"page":void 0,children:[r(e.icon,{className:h(e.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),r("span",{children:e.name})]},e.name))})})})]}),a==="Grid View"&&r(y,{currentDate:d,setCurrentDate:l,holidays:t,employees:L}),a==="Calendar View"&&r(b,{currentDate:d,setCurrentDate:l,holidays:t}),a==="Request Leave"&&r(f,{remainingDays:o.remainingLeaveDays,submitLeaveRequest:e=>n?n(e):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),a==="Approve Leave"&&r(g,{leaveRequests:x,onApprove:e=>i?i(e):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:e=>m?m(e):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}export{K as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as S}from"./chunk-5NIEZE7A.mjs";import{a as d,b as o,c as a,d as m,e as t,f as l}from"./chunk-76M7JE4D.mjs";import{a as u}from"./chunk-OYZDAMCS.mjs";import{b as n,d as b,f as c}from"./chunk-ZFUP5NVF.mjs";import{a as s}from"./chunk-4UIARERB.mjs";import{a as p}from"./chunk-ITJH72Z2.mjs";import{a as g}from"./chunk-WU3JMLSC.mjs";import{a as f}from"./chunk-BZAYEKYC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({...i}){return r("div",{className:"bg-sidebar",children:[e(p,{isMenuOpen:!0,logoLight:f,logoDark:g,...i.header,className:"bg-sidebar",wide:!0}),r(n,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(S,{...i.sidebarLeft,className:"flex-none top-24"}),r(c,{className:"grow overflow-hidden",children:[e("header",{className:"flex h-16 shrink-0 items-center gap-2",children:r("div",{className:"flex items-center gap-2 px-4",children:[e(b,{className:"-ml-1"}),e(s,{orientation:"vertical",className:"mr-2 h-4"}),e(d,{children:r(o,{children:[e(a,{className:"hidden md:block",children:e(m,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(a,{children:e(t,{children:"Data Fetching"})})]})})]})}),r("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[r("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),e("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),e(u,{})]})}export{h as a};
4
+ import{a as S}from"./chunk-5NIEZE7A.mjs";import{a as d,b as o,c as a,d as m,e as t,f as l}from"./chunk-76M7JE4D.mjs";import{a as u}from"./chunk-OYZDAMCS.mjs";import{b as n,d as b,f as c}from"./chunk-ZFUP5NVF.mjs";import{a as s}from"./chunk-4UIARERB.mjs";import{a as p}from"./chunk-LAQ3QAUW.mjs";import{a as g}from"./chunk-WU3JMLSC.mjs";import{a as f}from"./chunk-BZAYEKYC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({...i}){return r("div",{className:"bg-sidebar",children:[e(p,{isMenuOpen:!0,logoLight:f,logoDark:g,...i.header,className:"bg-sidebar",wide:!0}),r(n,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(S,{...i.sidebarLeft,className:"flex-none top-24"}),r(c,{className:"grow overflow-hidden",children:[e("header",{className:"flex h-16 shrink-0 items-center gap-2",children:r("div",{className:"flex items-center gap-2 px-4",children:[e(b,{className:"-ml-1"}),e(s,{orientation:"vertical",className:"mr-2 h-4"}),e(d,{children:r(o,{children:[e(a,{className:"hidden md:block",children:e(m,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(a,{children:e(t,{children:"Data Fetching"})})]})})]})}),r("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[r("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),e("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),e(u,{})]})}export{h as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as c}from"./chunk-CJ6APTVT.mjs";import{a as p}from"./chunk-VGWDYD6Z.mjs";import{a as d}from"./chunk-Z22NSJMF.mjs";import{a as m,f as n,g as r,i as s,j as l}from"./chunk-3UMMMQEH.mjs";import{useState as w}from"react";import{motion as C,AnimatePresence as D}from"motion/react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function h({teams:i=[],onCreateTeam:g,onTeamOpen:T}){let[y,o]=w(!1),u=()=>{o(!0)},f=async a=>{await g?.(a),o(!1)},v=()=>{o(!1)},x=a=>{T?.(a)};return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(D,{mode:"wait",children:t(C.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e(d,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600",primaryAction:{label:"Create Team",onClick:u}}),t("section",{className:"space-y-4 mt-8",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),i.length===0?t("div",{className:"text-center py-12",children:[e("p",{className:"text-muted-foreground text-lg",children:"You're not part of any teams yet."}),e("p",{className:"text-muted-foreground text-sm mt-2",children:"Create a new team or ask to be added to an existing one."})]}):e("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:i.map(a=>e(p,{team:a,onOpen:x},a.id))})]})]},"teams-index-view")}),e(m,{open:y,onOpenChange:o,children:t(n,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[e("div",{className:"sr-only",children:t(r,{children:[e(s,{children:"Create New Team"}),e(l,{children:"Set up a new team to collaborate with colleagues on projects."})]})}),e(c,{title:"Create New Team",submitLabel:"Create Team",onSave:f,onCancel:v})]})})]})}export{h as a};
4
+ import{a as p}from"./chunk-VGWDYD6Z.mjs";import{a as d}from"./chunk-Z22NSJMF.mjs";import{a as c}from"./chunk-CJ6APTVT.mjs";import{a as m,f as n,g as r,i as s,j as l}from"./chunk-3UMMMQEH.mjs";import{useState as w}from"react";import{motion as C,AnimatePresence as D}from"motion/react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function h({teams:i=[],onCreateTeam:g,onTeamOpen:T}){let[y,o]=w(!1),u=()=>{o(!0)},f=async a=>{await g?.(a),o(!1)},v=()=>{o(!1)},x=a=>{T?.(a)};return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(D,{mode:"wait",children:t(C.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e(d,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600",primaryAction:{label:"Create Team",onClick:u}}),t("section",{className:"space-y-4 mt-8",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),i.length===0?t("div",{className:"text-center py-12",children:[e("p",{className:"text-muted-foreground text-lg",children:"You're not part of any teams yet."}),e("p",{className:"text-muted-foreground text-sm mt-2",children:"Create a new team or ask to be added to an existing one."})]}):e("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:i.map(a=>e(p,{team:a,onOpen:x},a.id))})]})]},"teams-index-view")}),e(m,{open:y,onOpenChange:o,children:t(n,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[e("div",{className:"sr-only",children:t(r,{children:[e(s,{children:"Create New Team"}),e(l,{children:"Set up a new team to collaborate with colleagues on projects."})]})}),e(c,{title:"Create New Team",submitLabel:"Create Team",onSave:f,onCancel:v})]})})]})}export{h as a};