cortex-react-components 2.26.3 → 2.26.5

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 (200) hide show
  1. package/dist/{chunk-BDNY6OKE.mjs → chunk-2GM2LPLB.mjs} +1 -1
  2. package/dist/{chunk-2GZQYAN3.mjs → chunk-2OOJ4ZFB.mjs} +1 -1
  3. package/dist/{chunk-UX5OJ3WS.mjs → chunk-3ANJOET7.mjs} +1 -1
  4. package/dist/{chunk-HB57GPGK.mjs → chunk-3M5KHST3.mjs} +1 -1
  5. package/dist/{chunk-NXG2Y4N4.mjs → chunk-4SRUEQTP.mjs} +1 -1
  6. package/dist/{chunk-AGWQ5S2Z.mjs → chunk-5NIEZE7A.mjs} +1 -1
  7. package/dist/chunk-6YHCNPFB.mjs +4 -0
  8. package/dist/{chunk-PRK2XFAZ.mjs → chunk-7OMPPFGG.mjs} +1 -1
  9. package/dist/{chunk-CNCT3JZV.mjs → chunk-AQQCH7Z2.mjs} +1 -1
  10. package/dist/{chunk-WDZOGIT2.mjs → chunk-BQQ4V4PX.mjs} +1 -1
  11. package/dist/{chunk-R3SDBXF2.mjs → chunk-CKU2T3AN.mjs} +1 -1
  12. package/dist/{chunk-RIFUOB7A.mjs → chunk-EFNFK7TR.mjs} +1 -1
  13. package/dist/{chunk-T36QUKC6.mjs → chunk-F64CA5CH.mjs} +1 -1
  14. package/dist/{chunk-VDN4LQSS.mjs → chunk-F6DMXMR4.mjs} +1 -1
  15. package/dist/{chunk-KRLNPNMZ.mjs → chunk-FEWOSBUJ.mjs} +1 -1
  16. package/dist/{chunk-CJ2ZX7QN.mjs → chunk-FMXCT6LU.mjs} +1 -1
  17. package/dist/{chunk-BGADMIWV.mjs → chunk-FYQBRCQM.mjs} +1 -1
  18. package/dist/{chunk-JLUX7EHB.mjs → chunk-GAZHKHGB.mjs} +1 -1
  19. package/dist/{chunk-5KS3DITB.mjs → chunk-GETYSIZV.mjs} +1 -1
  20. package/dist/chunk-GLZEHRPY.mjs +4 -0
  21. package/dist/chunk-HD6E7KI2.mjs +4 -0
  22. package/dist/{chunk-M74BIPBM.mjs → chunk-HDKHF3EA.mjs} +1 -1
  23. package/dist/{chunk-BN747TQM.mjs → chunk-HKMNAXLM.mjs} +1 -1
  24. package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
  25. package/dist/{chunk-6LY5CH7J.mjs → chunk-JCWFPKF3.mjs} +1 -1
  26. package/dist/{chunk-OP6ZWZIM.mjs → chunk-JVTCOOUV.mjs} +1 -1
  27. package/dist/{chunk-DJ2KA3MS.mjs → chunk-KBLVWXLK.mjs} +1 -1
  28. package/dist/{chunk-S3P6OGB7.mjs → chunk-KVLUT4U2.mjs} +1 -1
  29. package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
  30. package/dist/{chunk-CLGBBNRB.mjs → chunk-LAQ3QAUW.mjs} +1 -1
  31. package/dist/chunk-LCEEFZH7.mjs +4 -0
  32. package/dist/chunk-LEF6M5ZD.mjs +4 -0
  33. package/dist/{chunk-ERHNVIOZ.mjs → chunk-LHO4WFYP.mjs} +1 -1
  34. package/dist/{chunk-JT65KF7C.mjs → chunk-MO4HRQEL.mjs} +1 -1
  35. package/dist/{chunk-DKRRVTCV.mjs → chunk-MS7YIAWP.mjs} +1 -1
  36. package/dist/chunk-MXMW65GM.mjs +4 -0
  37. package/dist/{chunk-GIL2SMPM.mjs → chunk-O24GFE6Q.mjs} +1 -1
  38. package/dist/chunk-P2B3OITE.mjs +4 -0
  39. package/dist/{chunk-PZZTGPEO.mjs → chunk-P6OSMPUQ.mjs} +1 -1
  40. package/dist/{chunk-23XORW7A.mjs → chunk-P7S6XFU4.mjs} +1 -1
  41. package/dist/{chunk-4NHQXOKZ.mjs → chunk-PNUBVBSR.mjs} +1 -1
  42. package/dist/{chunk-66ODXUVL.mjs → chunk-PTZT4QJW.mjs} +1 -1
  43. package/dist/{chunk-YJ7XPZWV.mjs → chunk-QUMUO63J.mjs} +1 -1
  44. package/dist/{chunk-JUFFNFV6.mjs → chunk-R6AYIVIR.mjs} +1 -1
  45. package/dist/{chunk-67PJ7D4O.mjs → chunk-RS4VD3ML.mjs} +1 -1
  46. package/dist/{chunk-CTTBF7F4.mjs → chunk-RS4WAAGI.mjs} +1 -1
  47. package/dist/{chunk-Y62OBV2E.mjs → chunk-U3FYDDE2.mjs} +1 -1
  48. package/dist/chunk-U3PUWUVM.mjs +4 -0
  49. package/dist/{chunk-DVE2KPLR.mjs → chunk-WH6JZSIA.mjs} +1 -1
  50. package/dist/{chunk-PXLSH6S2.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  51. package/dist/{chunk-I6OBIS4J.mjs → chunk-ZG5N4C4S.mjs} +1 -1
  52. package/dist/components/AdvancedComponents/AppSidebar.d.ts +3 -2
  53. package/dist/components/AdvancedComponents/AppSidebar.js +1 -2
  54. package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
  55. package/dist/components/AdvancedComponents/app-header.js +1 -1
  56. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  57. package/dist/components/AdvancedComponents/index.js +1 -1
  58. package/dist/components/AdvancedComponents/index.mjs +1 -1
  59. package/dist/components/AdvancedComponents/navigation-tabs.js +1 -1
  60. package/dist/components/AdvancedComponents/navigation-tabs.mjs +1 -1
  61. package/dist/components/AdvancedComponents/user-selection.js +1 -1
  62. package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
  63. package/dist/components/Blocks/Banner.mjs +1 -1
  64. package/dist/components/Blocks/CallToAction.mjs +1 -1
  65. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  66. package/dist/components/Blocks/Content.mjs +1 -1
  67. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  68. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  69. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  70. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  71. package/dist/components/Blocks/index.mjs +1 -1
  72. package/dist/components/Cards/ContentCard.mjs +1 -1
  73. package/dist/components/Cards/FeatureCard.mjs +1 -1
  74. package/dist/components/Cards/index.mjs +1 -1
  75. package/dist/components/Chat/CopilotInterface.js +3 -3
  76. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  77. package/dist/components/Chat/demo-long-messages.js +5 -5
  78. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  79. package/dist/components/Chat/demo-tests.js +5 -5
  80. package/dist/components/Chat/demo-tests.mjs +1 -1
  81. package/dist/components/Chat/demo.js +3 -3
  82. package/dist/components/Chat/demo.mjs +1 -1
  83. package/dist/components/Chat/example-usage.js +3 -3
  84. package/dist/components/Chat/example-usage.mjs +1 -1
  85. package/dist/components/Chat/example-with-vercel-ai.js +3 -3
  86. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  87. package/dist/components/Chat/index.js +3 -3
  88. package/dist/components/Chat/index.mjs +1 -1
  89. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  90. package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
  91. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  92. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  93. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +5 -5
  94. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  95. package/dist/components/DigitalColleagues/Views/ColleaguesView.js +1 -1
  96. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  97. package/dist/components/DigitalColleagues/Views/index.js +5 -5
  98. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  99. package/dist/components/DigitalColleagues/index.js +5 -5
  100. package/dist/components/DigitalColleagues/index.mjs +1 -1
  101. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  102. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  103. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  104. package/dist/components/Foundary/MainPage.mjs +1 -1
  105. package/dist/components/Foundary/Pages/dashboardpage.js +6 -6
  106. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  107. package/dist/components/Foundary/Views/ColleaguesView.d.ts +12 -1
  108. package/dist/components/Foundary/Views/ColleaguesView.js +1 -1
  109. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  110. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  111. package/dist/components/Foundary/Views/index.js +5 -5
  112. package/dist/components/Foundary/Views/index.mjs +1 -1
  113. package/dist/components/Foundary/colleague-card.js +1 -1
  114. package/dist/components/Foundary/colleague-card.mjs +1 -1
  115. package/dist/components/Foundary/colleague-form.d.ts +12 -1
  116. package/dist/components/Foundary/colleague-form.js +1 -1
  117. package/dist/components/Foundary/colleague-form.mjs +1 -1
  118. package/dist/components/Foundary/file-edit.mjs +1 -1
  119. package/dist/components/Foundary/foundary-clone.js +1 -1
  120. package/dist/components/Foundary/foundary-clone.mjs +1 -1
  121. package/dist/components/Foundary/foundary-layout.d.ts +2 -1
  122. package/dist/components/Foundary/foundary-layout.js +1 -1
  123. package/dist/components/Foundary/foundary-layout.mjs +1 -1
  124. package/dist/components/Foundary/index.js +5 -5
  125. package/dist/components/Foundary/index.mjs +1 -1
  126. package/dist/components/Foundary/knowledge-search.js +1 -1
  127. package/dist/components/Foundary/knowledge-search.mjs +1 -1
  128. package/dist/components/Foundary/types.d.ts +32 -9
  129. package/dist/components/HeaderFooter/Header.mjs +1 -1
  130. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  131. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  132. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  133. package/dist/components/HeaderFooter/index.mjs +1 -1
  134. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  135. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  136. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  137. package/dist/components/Heros/PostHero/index.mjs +1 -1
  138. package/dist/components/Heros/RenderHero.mjs +1 -1
  139. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  140. package/dist/components/Heros/index.mjs +1 -1
  141. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  142. package/dist/components/Layouts/Print.mjs +1 -1
  143. package/dist/components/Layouts/SlideShow.mjs +1 -1
  144. package/dist/components/Layouts/index.mjs +1 -1
  145. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  146. package/dist/components/Menus/SidebarRight.mjs +1 -1
  147. package/dist/components/Menus/index.mjs +1 -1
  148. package/dist/components/Other/index.mjs +1 -1
  149. package/dist/components/Payload/RichText/index.mjs +1 -1
  150. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  151. package/dist/components/Payload/index.mjs +1 -1
  152. package/dist/components/Projects/FileView.js +1 -1
  153. package/dist/components/Projects/FileView.mjs +1 -1
  154. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  155. package/dist/components/Projects/ProjectPage.js +5 -5
  156. package/dist/components/Projects/ProjectPage.mjs +1 -1
  157. package/dist/components/Projects/ProjectView.js +1 -1
  158. package/dist/components/Projects/ProjectView.mjs +1 -1
  159. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  160. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  161. package/dist/components/Projects/file-list.mjs +1 -1
  162. package/dist/components/Projects/index.mjs +1 -1
  163. package/dist/components/dc-temp/index.js +1 -1
  164. package/dist/components/dc-temp/index.mjs +1 -1
  165. package/dist/components/index.js +20 -20
  166. package/dist/components/index.mjs +1 -1
  167. package/dist/components/ui/index.mjs +1 -1
  168. package/dist/components/ui/sidebar.mjs +1 -1
  169. package/dist/index.js +27 -27
  170. package/dist/index.mjs +1 -1
  171. package/dist/metafile-cjs.json +1 -1
  172. package/dist/metafile-esm.json +1 -1
  173. package/dist/pages/Blog.mjs +1 -1
  174. package/dist/pages/Documentation.mjs +1 -1
  175. package/dist/pages/IndexPage.mjs +1 -1
  176. package/dist/pages/Intranet.mjs +1 -1
  177. package/dist/pages/LandingPage.mjs +1 -1
  178. package/dist/pages/Page.mjs +1 -1
  179. package/dist/pages/Publish.mjs +1 -1
  180. package/dist/pages/Website.mjs +1 -1
  181. package/dist/sections/AboutSection.mjs +1 -1
  182. package/dist/sections/BlogDetail.mjs +1 -1
  183. package/dist/sections/BlogList.mjs +1 -1
  184. package/dist/sections/BlogListSection.mjs +1 -1
  185. package/dist/sections/ContactSection.mjs +1 -1
  186. package/dist/sections/PageSections.mjs +1 -1
  187. package/dist/sections/PricingSection.mjs +1 -1
  188. package/dist/sections/ServiceDetail.mjs +1 -1
  189. package/dist/sections/ServiceDetailSection.mjs +1 -1
  190. package/dist/sections/ServiceSection.mjs +1 -1
  191. package/dist/sections/index.mjs +1 -1
  192. package/package.json +1 -1
  193. package/dist/chunk-4WA47ZQA.mjs +0 -4
  194. package/dist/chunk-5HT2KC5I.mjs +0 -4
  195. package/dist/chunk-CRAFZGCI.mjs +0 -4
  196. package/dist/chunk-FGEFYI5E.mjs +0 -4
  197. package/dist/chunk-GPFPTU7U.mjs +0 -4
  198. package/dist/chunk-KKW3FINI.mjs +0 -4
  199. package/dist/chunk-NDZ26EG6.mjs +0 -4
  200. package/dist/chunk-Y7H3EUBR.mjs +0 -4
@@ -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-HTS3KCJL.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 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-HTS3KCJL.mjs";import{a}from"./chunk-Z22NSJMF.mjs";import{a as b}from"./chunk-RS4WAAGI.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};
@@ -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-BGADMIWV.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,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as i}from"./chunk-WISC5QJV.mjs";import{a as c}from"./chunk-Q5XT55O3.mjs";import{a as l}from"./chunk-MDJREBVI.mjs";import{useState as m,useEffect as d}from"react";import{useTheme as S}from"next-themes";import{Moon as N,Sun as y}from"lucide-react";import{PopoverGroup as D}from"@headlessui/react";import{Fragment as H,jsx as e,jsxs as p}from"react/jsx-runtime";function z({isMenuOpen:u,logoLight:h,logoDark:f,menuItems:o,themeControl:g=!1,wide:b=!1}){let[v,a]=m(!1),[k,n]=m(""),r=["light","dark"],{theme:s,setTheme:w}=S();d(()=>{n(s||"dark")},[s]);let x=()=>{let t=r[(r.indexOf(k)+1)%r.length];n(t),w(t)};return d(()=>{let t=()=>{window.scrollY>100?a(!0):a(!1)};return window.addEventListener("scroll",t,{passive:!0}),()=>window.removeEventListener("scroll",t)},[]),e(H,{children:e("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${v||u?"translate-y-0":"-translate-y-full bg-transparent"}`,children:e("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:p("div",{className:l("flex items-center justify-between px-9 py-0",!b&&"container"),children:[e(c,{logoDark:f,logoLight:h}),e(D,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(t=>e(i,{...t},t.name))}),g&&e("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:x,children:p("div",{className:"relative",children:[e(y,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),e(N,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}export{z as a};
4
+ import{a as c}from"./chunk-Q5XT55O3.mjs";import{a as i}from"./chunk-WISC5QJV.mjs";import{a as l}from"./chunk-MDJREBVI.mjs";import{useState as m,useEffect as d}from"react";import{useTheme as S}from"next-themes";import{Moon as N,Sun as y}from"lucide-react";import{PopoverGroup as D}from"@headlessui/react";import{Fragment as H,jsx as e,jsxs as p}from"react/jsx-runtime";function z({isMenuOpen:u,logoLight:h,logoDark:f,menuItems:o,themeControl:g=!1,wide:b=!1}){let[v,a]=m(!1),[k,n]=m(""),r=["light","dark"],{theme:s,setTheme:w}=S();d(()=>{n(s||"dark")},[s]);let x=()=>{let t=r[(r.indexOf(k)+1)%r.length];n(t),w(t)};return d(()=>{let t=()=>{window.scrollY>100?a(!0):a(!1)};return window.addEventListener("scroll",t,{passive:!0}),()=>window.removeEventListener("scroll",t)},[]),e(H,{children:e("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${v||u?"translate-y-0":"-translate-y-full bg-transparent"}`,children:e("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:p("div",{className:l("flex items-center justify-between px-9 py-0",!b&&"container"),children:[e(c,{logoDark:f,logoLight:h}),e(D,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(t=>e(i,{...t},t.name))}),g&&e("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:x,children:p("div",{className:"relative",children:[e(y,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),e(N,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}export{z as a};
@@ -1 +1 @@
1
- import{a as i}from"./chunk-WUA65ZZB.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};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as p}from"./chunk-L5JPAKPM.mjs";import{b as r}from"./chunk-ZUA4KNIR.mjs";import{a as v,c as C}from"./chunk-SOLZ4VQH.mjs";import{b as f}from"./chunk-CSBGSBEU.mjs";import{a as s,b as u,c as g,e as l}from"./chunk-YO3GQYRJ.mjs";import{useState as x,useMemo as S}from"react";import{Search as A,Bot as N,ChevronLeft as I,Copy as B}from"lucide-react";import{motion as h,AnimatePresence as L}from"motion/react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function K({digitalColleagues:n,onColleagueClone:b,onCancel:y,selectedColleagueId:w}){let[i,D]=x(""),[m,k]=x("all"),d=S(()=>n.filter(t=>t?.name.toLowerCase().includes(i.toLowerCase())||t.jobDescription?.toLowerCase().includes(i.toLowerCase())||t.workInstructions?.toLowerCase().includes(i.toLowerCase())),[n,i,m]),c=t=>{let o={...t,name:`${t?.name} (Copy)`};b(o)},T=t=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(t);return e("div",{className:"px-2 md:px-4 py-4 space-y-6",children:e(L,{mode:"wait",children:a(h.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[a("div",{className:"flex items-center gap-4 mb-6",children:[a(r,{variant:"ghost",onClick:y,className:"gap-2",children:[e(I,{className:"h-4 w-4"}),"Back"]}),a("div",{children:[e("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),e("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),e(s,{children:e(l,{className:"pt-6",children:a("div",{className:"flex flex-col md:flex-row gap-4",children:[e("div",{className:"flex-1",children:a("div",{className:"relative",children:[e(A,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(p,{placeholder:"Search by name, job description, or capabilities...",value:i,onChange:t=>D(t.target.value),className:"pl-9"})]})}),a("select",{value:m,onChange:t=>k(t.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[e("option",{value:"all",children:"All Status"}),e("option",{value:"active",children:"Active"}),e("option",{value:"inactive",children:"Inactive"})]})]})})}),e("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:d.map(t=>e(h.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:a(s,{className:`cursor-pointer transition-all hover:shadow-lg ${w?.toString()===t.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(t),children:[e(u,{className:"pb-3",children:a("div",{className:"flex items-start justify-between",children:[a("div",{className:"flex items-center gap-3",children:[e(v,{children:e(C,{className:"bg-blue-100",children:e(N,{className:"h-4 w-4 text-blue-600"})})}),e("div",{children:e(g,{className:"text-lg flex items-center gap-2",children:t?.name})})]}),a(r,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:o=>{o.stopPropagation(),c(t)},children:[e(B,{className:"h-3 w-3"}),"Clone"]})]})}),e(l,{className:"pt-0",children:a("div",{className:"space-y-3",children:[a("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),e("p",{className:"text-sm line-clamp-2",children:t.jobDescription})]}),t.capabilities&&t.capabilities.length>0&&a("div",{children:[e("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),e("div",{className:"flex flex-wrap gap-1",children:t.capabilities.length>3&&a(f,{variant:"outline",className:"text-xs",children:["+",t.capabilities.length-3]})})]}),e("div",{className:"flex items-center justify-between text-xs text-muted-foreground"}),t.workInstructions&&a("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),e("p",{className:"text-xs line-clamp-2",children:t.workInstructions})]})]})})]})},t.id))}),d.length===0&&e(s,{children:e(l,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[e(N,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),e("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}export{K as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as O}from"./chunk-GAU24H4A.mjs";import{a as le}from"./chunk-LCEEFZH7.mjs";import{a as ae}from"./chunk-M2REXGQW.mjs";import{a as w}from"./chunk-3M5KHST3.mjs";import{a as I}from"./chunk-MXMW65GM.mjs";import{a as ee}from"./chunk-FSCDCSVK.mjs";import{a as Z}from"./chunk-Z22NSJMF.mjs";import{a as te}from"./chunk-P2B3OITE.mjs";import{a as _}from"./chunk-GLZEHRPY.mjs";import{a as E,c as H,d as $,g as F,i as u}from"./chunk-YFAZQYK4.mjs";import{a as Y}from"./chunk-L5JPAKPM.mjs";import{b as k}from"./chunk-ZUA4KNIR.mjs";import{a as g,b as h,c as b,e as c}from"./chunk-YO3GQYRJ.mjs";import{useEffect as ve,useState as o}from"react";import{Plus as ye,Search as he,Users as ie,Bot as be,User as we,Filter as xe}from"lucide-react";import{motion as Se,AnimatePresence as Ne}from"motion/react";import{jsx as l,jsxs as a}from"react/jsx-runtime";function De({initialColleagues:x,onColleagueAdd:S,onColleagueEdit:K,onColleagueDelete:oe,compactView:n=!1,departments:ne=["Design","Engineering","Marketing","Product","Sales","Operations"],className:re,availableUsers:L=[],existingDigitalColleagues:P=[],availableKnowledgeDocuments:j=[],availableCapabilities:M=[],availableModels:B=[]}){let[p,r]=o(x||[]),[s,G]=o(""),[N,W]=o("all"),[D,q]=o("all"),[v,se]=o("all"),[z,C]=o(null),[T,y]=o(null);ve(()=>{r(x||[])},[x]);let de=Array.isArray(L)?L:[],me=Array.isArray(P)?P:[],[d,t]=o("main"),f=p.filter(e=>!e||!e?.name?!1:e?.name.toLowerCase().includes(s.toLowerCase())||e.type==="human"&&e.email?.toLowerCase().includes(s.toLowerCase())||e.type==="digital"&&e.jobDescription?.toLowerCase().includes(s.toLowerCase())),J=f.filter(e=>e.type==="human"),Q=f.filter(e=>e.type==="digital"),R=()=>{t("typeSelection")},A=e=>{e.type==="digital"&&(C(e),t("form")),K?.(e)},U=e=>{e.type==="digital"&&(y(e),t("view"))},ge=e=>{if(!e||!e.id){console.error("Invalid user provided to handleUserSelect:",e);return}let i={id:`human-${Date.now()}`,type:"human",name:e?.name||"Unknown User",email:e?.email||"",updatedAt:e.updatedAt,createdAt:e.createdAt,accounts:e.accounts};r(m=>[...m,i]),S?.(i),t("main")},ce=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"}),t("main")},ue=()=>{C(null),t("form")},X=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}z?(r(i=>i.map(m=>m.id===e.id?{...e,type:"digital"}:m)),K?.({...e,type:"digital"})):(r(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"})),t("main"),C(null)},pe=()=>{t("main"),C(null),y(null)},Ce=()=>{t("main"),y(null)},Te=()=>{T&&(C(T),y(null),t("form"))},V=e=>{oe?.(e,p.find(i=>i.id.toString()===e.toString())?.type),r(i=>i.filter(m=>m.id!==e))},fe=()=>{G(""),W("all"),q("all")};return d==="typeSelection"?l(ee,{onSelectHuman:()=>t("userSelection"),onSelectDigital:()=>t("digitalOptions"),onCancel:()=>t("main")}):d==="userSelection"?l(te,{users:de,onUserSelect:ge,onCancel:()=>t("typeSelection")}):d==="digitalOptions"?l(ae,{onCloneExisting:()=>t("digitalClone"),onCreateNew:ue,onCancel:()=>t("typeSelection")}):d==="digitalClone"?l(le,{digitalColleagues:me,onColleagueClone:ce,onCancel:()=>t("digitalOptions")}):d==="form"?l(I,{colleague:z||void 0,onSave:X,onCancel:pe,availableKnowledgeDocuments:j,availableCapabilities:M,availableModels:B}):d==="view"?l(I,{colleague:T||void 0,onSave:X,onCancel:Ce,readOnly:!0,availableKnowledgeDocuments:j,availableCapabilities:M,availableModels:B}):l("div",{className:"px-2 md:px-4 py-4 space-y-8",children:l(Ne,{mode:"wait",children:l(Se.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:a("div",{className:`space-y-6 ${re||""}`,children:[l(Z,{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:R}}),a("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a(g,{children:[a(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(b,{className:"text-sm font-medium",children:"Total Colleagues"}),l(ie,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[l("div",{className:"text-2xl font-bold",children:p.length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),a(g,{children:[a(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(b,{className:"text-sm font-medium",children:"Human Members"}),l(we,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[l("div",{className:"text-2xl font-bold",children:p.filter(e=>e.type==="human").length}),l("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),a(g,{children:[a(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(b,{className:"text-sm font-medium",children:"Digital Colleagues"}),l(be,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[l("div",{className:"text-2xl font-bold",children:p.filter(e=>e.type==="digital").length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),l(g,{children:l(c,{className:"pt-6",children:a("div",{className:"flex flex-col md:flex-row gap-4",children:[l("div",{className:"flex-1",children:a("div",{className:"relative",children:[l(he,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),l(Y,{placeholder:"Search colleagues...",value:s,onChange:e=>G(e.target.value),className:"pl-9"})]})}),a(E,{value:N,onValueChange:W,children:[l($,{className:"w-full md:w-[180px]",children:l(H,{placeholder:"Department"})}),a(F,{children:[l(u,{value:"all",children:"All Departments"}),ne.map(e=>l(u,{value:e,children:e},e))]})]}),a(E,{value:D,onValueChange:q,children:[l($,{className:"w-full md:w-[140px]",children:l(H,{placeholder:"Status"})}),a(F,{children:[l(u,{value:"all",children:"All Status"}),l(u,{value:"active",children:"Active"}),l(u,{value:"inactive",children:"Inactive"})]})]}),(s||N!=="all"||D!=="all")&&a(k,{variant:"outline",onClick:fe,className:"gap-2",children:[l(xe,{className:"h-4 w-4"}),"Clear"]})]})})}),a("div",{className:"space-y-4",children:[l(_,{activeTab:v,onTabChange:se,tabOptions:[{value:"all",label:`All (${f.length})`},{value:"human",label:`Human (${J.length})`},{value:"digital",label:`Digital (${Q.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(w,{colleague:e,onEdit:A,onDelete:V,onViewDetails:U,compact:n,className:O([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:J.map(e=>l(w,{colleague:e,onEdit:A,onDelete:V,onViewDetails:U,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:Q.map(e=>l(w,{colleague:e,onEdit:A,onDelete:V,onViewDetails:U,compact:n,className:O([e.type==="digital"&&"border-teal-400"])},e.id))})]}),f.length===0&&l(g,{children:l(c,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[l(ie,{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:s||N!=="all"||D!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),a(k,{onClick:R,className:"gap-2",children:[l(ye,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{De as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{c as k,h as R,i as v,k as S,l as f,o as x,p as u,q as c,r as y,s as w,v as P,w as B,x as L}from"./chunk-PXLSH6S2.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as g,b as N,c as M}from"./chunk-YNCJATT7.mjs";import{ChevronRight as A}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:l,secondaryNav:s,title:o,subTitle:a,pathName:b,menuHeading:i,onNavClick:d,loading:p=!1,LinkComponent:h,...F}){let C=h?t=>e(h,{...t}):d?({href:t,children:m,...I})=>e("button",{onClick:()=>d&&d(t),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:m}):t=>e("a",{...t});return r(k,{...F,variant:"inset",children:[e(R,{children:e(u,{children:e(c,{children:p?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:o}),a&&e("span",{className:"truncate text-sm",children:a})]})})})}),p&&r(S,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(S,{children:[l&&!p&&l.map((t,m)=>e(G,{subNav:t,pathName:b,Link:C},m)),e(f,{className:"mt-auto",children:e(x,{children:e(u,{children:s&&!p&&s.map(t=>e(c,{children:e(y,{asChild:!0,size:"sm",children:r(C,{href:t.url||"",children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})})},t.label))})})})]}),e(v,{})]})}function G({subNav:l,pathName:s,Link:o}){let a=l,b=!1;return a.links&&a.links.map(i=>{i.url===s&&(b=!0)}),e(g,{defaultOpen:!0,className:"group/collapsible",children:e(f,{className:"py-0",children:e(u,{children:e(g,{asChild:!0,defaultOpen:a.isActive,children:r(c,{children:[e(y,{asChild:!0,tooltip:a.label,className:T(b&&"font-bold text-accent"),children:r(o,{href:a.url,children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})}),a.links?.length?r(H,{children:[e(N,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(A,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(P,{children:a.links?.map(i=>e(B,{children:e(L,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(o,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},a.label)})})})}export{J as a};
4
+ import{c as k,h as R,i as v,k as S,l as f,o as x,p as u,q as c,r as y,s as w,v as P,w as B,x as L}from"./chunk-ZFUP5NVF.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as g,b as N,c as M}from"./chunk-YNCJATT7.mjs";import{ChevronRight as A}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:l,secondaryNav:s,title:o,subTitle:a,pathName:b,menuHeading:i,onNavClick:d,loading:p=!1,LinkComponent:h,...F}){let C=h?t=>e(h,{...t}):d?({href:t,children:m,...I})=>e("button",{onClick:()=>d&&d(t),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:m}):t=>e("a",{...t});return r(k,{...F,variant:"inset",children:[e(R,{children:e(u,{children:e(c,{children:p?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:o}),a&&e("span",{className:"truncate text-sm",children:a})]})})})}),p&&r(S,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(S,{children:[l&&!p&&l.map((t,m)=>e(G,{subNav:t,pathName:b,Link:C},m)),e(f,{className:"mt-auto",children:e(x,{children:e(u,{children:s&&!p&&s.map(t=>e(c,{children:e(y,{asChild:!0,size:"sm",children:r(C,{href:t.url||"",children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})})},t.label))})})})]}),e(v,{})]})}function G({subNav:l,pathName:s,Link:o}){let a=l,b=!1;return a.links&&a.links.map(i=>{i.url===s&&(b=!0)}),e(g,{defaultOpen:!0,className:"group/collapsible",children:e(f,{className:"py-0",children:e(u,{children:e(g,{asChild:!0,defaultOpen:a.isActive,children:r(c,{children:[e(y,{asChild:!0,tooltip:a.label,className:T(b&&"font-bold text-accent"),children:r(o,{href:a.url,children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})}),a.links?.length?r(H,{children:[e(N,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(A,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(P,{children:a.links?.map(i=>e(B,{children:e(L,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(o,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},a.label)})})})}export{J as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{f as t}from"./chunk-BGADMIWV.mjs";import{a}from"./chunk-MDJREBVI.mjs";import n from"react";import*as l from"@radix-ui/react-collapsible";import{ChevronDownIcon as c,ChevronUpIcon as m}from"@radix-ui/react-icons";import{jsx as e,jsxs as s}from"react/jsx-runtime";var h=({title:p,richText:r})=>{let[o,i]=n.useState(!1);return e("div",{className:"border rounded-lg overflow-hidden",children:s(l.Root,{className:a("w-full"),open:o,onOpenChange:i,children:[s(l.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[e("h2",{className:"text-lg font-medium",children:p}),o?e(m,{className:"h-6 w-6"}):e(c,{className:"h-6 w-6"})]}),e(l.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:e("div",{className:"px-4 py-3 bg-white",children:e(t,{content:r||{},enableGutter:!1})})})]})})};export{h as a};
4
+ import{f as t}from"./chunk-FYQBRCQM.mjs";import{a}from"./chunk-MDJREBVI.mjs";import n from"react";import*as l from"@radix-ui/react-collapsible";import{ChevronDownIcon as c,ChevronUpIcon as m}from"@radix-ui/react-icons";import{jsx as e,jsxs as s}from"react/jsx-runtime";var h=({title:p,richText:r})=>{let[o,i]=n.useState(!1);return e("div",{className:"border rounded-lg overflow-hidden",children:s(l.Root,{className:a("w-full"),open:o,onOpenChange:i,children:[s(l.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[e("h2",{className:"text-lg font-medium",children:p}),o?e(m,{className:"h-6 w-6"}):e(c,{className:"h-6 w-6"})]}),e(l.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:e("div",{className:"px-4 py-3 bg-white",children:e(t,{content:r||{},enableGutter:!1})})})]})})};export{h as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as M}from"./chunk-6XUIHSKG.mjs";import{a as q}from"./chunk-CO6AQNZ5.mjs";import{a as P}from"./chunk-Z22NSJMF.mjs";import{a as B}from"./chunk-Y7H3EUBR.mjs";import{a as j}from"./chunk-FGEFYI5E.mjs";import{a as A,c as T,d as k,g as I,i as g}from"./chunk-YFAZQYK4.mjs";import{a as L}from"./chunk-L5JPAKPM.mjs";import{b}from"./chunk-ZUA4KNIR.mjs";import{a as m,b as v,c as y,e as c}from"./chunk-YO3GQYRJ.mjs";import{useEffect as re,useState as r}from"react";import{Plus as ne,Search as se,Users as G,Bot as de,User as me,Filter as ce}from"lucide-react";import{motion as ge,AnimatePresence as ue}from"motion/react";import{jsx as t,jsxs as a}from"react/jsx-runtime";function pe({initialColleagues:h,onColleagueAdd:w,onColleagueEdit:V,onColleagueDelete:W,compactView:x=!1,departments:z=["Design","Engineering","Marketing","Product","Sales","Operations"],className:J,availableUsers:E=[],existingDigitalColleagues:H=[]}){let[n,s]=r(h||[]),[d,K]=r(""),[S,U]=r("all"),[N,F]=r("all"),[p,Q]=r("all"),[R,u]=r(null),[O,C]=r(null);re(()=>{s(h||[])},[h]);let X=Array.isArray(E)?E:[],Y=Array.isArray(H)?H:[],[D,i]=r("main"),f=n.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())),Z=f.filter(e=>e.type==="human"),_=f.filter(e=>e.type==="digital"),$=()=>{i("typeSelection")},Ce=e=>{e.type==="digital"&&(u(e),i("form")),console.log("Editing colleague:",e),V?.(e)},fe=e=>{e.type==="digital"&&(C(e),i("view"))},ee=e=>{let o={id:`human-${Date.now()}`,type:"human",name:e.name||"",email:e.email,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};s(l=>[...l,o]),w?.(o),i("main")},ve=e=>{if(!e||!e.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",e);return}s(o=>[...o,e]),w?.(e),i("main")},te=()=>{u(null),i("form")},ye=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}R?(s(o=>o.map(l=>l.id===e.id?e:l)),V?.(e)):(s(o=>[...o,e]),w?.(e)),i("main"),u(null)},he=()=>{i("main"),u(null),C(null)},we=()=>{i("main"),C(null)},xe=()=>{O&&(u(O),C(null),i("form"))},Se=e=>{W?.(e,n.find(o=>o.id===e).type),s(o=>o.filter(l=>l.id!==e))},le=()=>{K(""),U("all"),F("all")},Ne=()=>{let e=[];return Y.forEach(l=>{l.knowledge&&Array.isArray(l.knowledge)&&e.push(...l.knowledge),l.coreKnowledge&&Array.isArray(l.coreKnowledge)&&e.push(...l.coreKnowledge)}),n.forEach(l=>{l.type==="digital"&&(l.knowledge&&Array.isArray(l.knowledge)&&e.push(...l.knowledge),l.coreKnowledge&&Array.isArray(l.coreKnowledge)&&e.push(...l.coreKnowledge))}),e.filter((l,ae,ie)=>ae===ie.findIndex(oe=>oe.id===l.id))};return D==="typeSelection"?t(M,{onSelectHuman:()=>i("userSelection"),onSelectDigital:()=>i("digitalOptions"),onCancel:()=>i("main")}):D==="userSelection"?t(B,{users:X,onUserSelect:ee,onCancel:()=>i("typeSelection")}):D==="digitalOptions"?t(q,{onCloneExisting:()=>i("digitalClone"),onCreateNew:te,onCancel:()=>i("typeSelection")}):t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:t(ue,{mode:"wait",children:t(ge.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:a("div",{className:`space-y-6 ${J||""}`,children:[t(P,{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:$}}),a("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a(m,{children:[a(v,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(y,{className:"text-sm font-medium",children:"Total Colleagues"}),t(G,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[t("div",{className:"text-2xl font-bold",children:n.length}),t("p",{className:"text-xs text-muted-foreground"})]})]}),a(m,{children:[a(v,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(y,{className:"text-sm font-medium",children:"Human Members"}),t(me,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[t("div",{className:"text-2xl font-bold",children:n.filter(e=>e.type==="human").length}),t("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),a(m,{children:[a(v,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(y,{className:"text-sm font-medium",children:"Digital Colleagues"}),t(de,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[t("div",{className:"text-2xl font-bold",children:n.filter(e=>e.type==="digital").length}),t("p",{className:"text-xs text-muted-foreground",children:"active"})]})]})]}),t(m,{children:t(c,{className:"pt-6",children:a("div",{className:"flex flex-col md:flex-row gap-4",children:[t("div",{className:"flex-1",children:a("div",{className:"relative",children:[t(se,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),t(L,{placeholder:"Search colleagues...",value:d,onChange:e=>K(e.target.value),className:"pl-9"})]})}),a(A,{value:S,onValueChange:U,children:[t(k,{className:"w-full md:w-[180px]",children:t(T,{placeholder:"Department"})}),a(I,{children:[t(g,{value:"all",children:"All Departments"}),z.map(e=>t(g,{value:e,children:e},e))]})]}),a(A,{value:N,onValueChange:F,children:[t(k,{className:"w-full md:w-[140px]",children:t(T,{placeholder:"Status"})}),a(I,{children:[t(g,{value:"all",children:"All Status"}),t(g,{value:"active",children:"Active"}),t(g,{value:"inactive",children:"Inactive"})]})]}),(d||S!=="all"||N!=="all")&&a(b,{variant:"outline",onClick:le,className:"gap-2",children:[t(ce,{className:"h-4 w-4"}),"Clear"]})]})})}),a("div",{className:"space-y-4",children:[t(j,{activeTab:p,onTabChange:Q,tabOptions:[{value:"all",label:`All (${f.length})`},{value:"human",label:`Human (${Z.length})`},{value:"digital",label:`Digital (${_.length})`}],maxWidth:"400px",gridCols:3}),p==="all"&&t("div",{className:`grid gap-4 ${x?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`}),p==="human"&&t("div",{className:`grid gap-4 ${x?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`}),p==="digital"&&t("div",{className:`grid gap-4 ${x?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`})]}),f.length===0&&t(m,{children:t(c,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[t(G,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),t("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),t("p",{className:"text-muted-foreground mb-4",children:d||S!=="all"||N!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),a(b,{onClick:$,className:"gap-2",children:[t(ne,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{pe as a};
4
+ import{a as M}from"./chunk-6XUIHSKG.mjs";import{a as q}from"./chunk-CO6AQNZ5.mjs";import{a as P}from"./chunk-Z22NSJMF.mjs";import{a as B}from"./chunk-P2B3OITE.mjs";import{a as j}from"./chunk-GLZEHRPY.mjs";import{a as A,c as T,d as k,g as I,i as g}from"./chunk-YFAZQYK4.mjs";import{a as L}from"./chunk-L5JPAKPM.mjs";import{b}from"./chunk-ZUA4KNIR.mjs";import{a as m,b as v,c as y,e as c}from"./chunk-YO3GQYRJ.mjs";import{useEffect as re,useState as r}from"react";import{Plus as ne,Search as se,Users as G,Bot as de,User as me,Filter as ce}from"lucide-react";import{motion as ge,AnimatePresence as ue}from"motion/react";import{jsx as t,jsxs as a}from"react/jsx-runtime";function pe({initialColleagues:h,onColleagueAdd:w,onColleagueEdit:V,onColleagueDelete:W,compactView:x=!1,departments:z=["Design","Engineering","Marketing","Product","Sales","Operations"],className:J,availableUsers:E=[],existingDigitalColleagues:H=[]}){let[n,s]=r(h||[]),[d,K]=r(""),[S,U]=r("all"),[N,F]=r("all"),[p,Q]=r("all"),[R,u]=r(null),[O,C]=r(null);re(()=>{s(h||[])},[h]);let X=Array.isArray(E)?E:[],Y=Array.isArray(H)?H:[],[D,i]=r("main"),f=n.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())),Z=f.filter(e=>e.type==="human"),_=f.filter(e=>e.type==="digital"),$=()=>{i("typeSelection")},Ce=e=>{e.type==="digital"&&(u(e),i("form")),console.log("Editing colleague:",e),V?.(e)},fe=e=>{e.type==="digital"&&(C(e),i("view"))},ee=e=>{let o={id:`human-${Date.now()}`,type:"human",name:e.name||"",email:e.email,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};s(l=>[...l,o]),w?.(o),i("main")},ve=e=>{if(!e||!e.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",e);return}s(o=>[...o,e]),w?.(e),i("main")},te=()=>{u(null),i("form")},ye=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}R?(s(o=>o.map(l=>l.id===e.id?e:l)),V?.(e)):(s(o=>[...o,e]),w?.(e)),i("main"),u(null)},he=()=>{i("main"),u(null),C(null)},we=()=>{i("main"),C(null)},xe=()=>{O&&(u(O),C(null),i("form"))},Se=e=>{W?.(e,n.find(o=>o.id===e).type),s(o=>o.filter(l=>l.id!==e))},le=()=>{K(""),U("all"),F("all")},Ne=()=>{let e=[];return Y.forEach(l=>{l.knowledge&&Array.isArray(l.knowledge)&&e.push(...l.knowledge),l.coreKnowledge&&Array.isArray(l.coreKnowledge)&&e.push(...l.coreKnowledge)}),n.forEach(l=>{l.type==="digital"&&(l.knowledge&&Array.isArray(l.knowledge)&&e.push(...l.knowledge),l.coreKnowledge&&Array.isArray(l.coreKnowledge)&&e.push(...l.coreKnowledge))}),e.filter((l,ae,ie)=>ae===ie.findIndex(oe=>oe.id===l.id))};return D==="typeSelection"?t(M,{onSelectHuman:()=>i("userSelection"),onSelectDigital:()=>i("digitalOptions"),onCancel:()=>i("main")}):D==="userSelection"?t(B,{users:X,onUserSelect:ee,onCancel:()=>i("typeSelection")}):D==="digitalOptions"?t(q,{onCloneExisting:()=>i("digitalClone"),onCreateNew:te,onCancel:()=>i("typeSelection")}):t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:t(ue,{mode:"wait",children:t(ge.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:a("div",{className:`space-y-6 ${J||""}`,children:[t(P,{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:$}}),a("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a(m,{children:[a(v,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(y,{className:"text-sm font-medium",children:"Total Colleagues"}),t(G,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[t("div",{className:"text-2xl font-bold",children:n.length}),t("p",{className:"text-xs text-muted-foreground"})]})]}),a(m,{children:[a(v,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(y,{className:"text-sm font-medium",children:"Human Members"}),t(me,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[t("div",{className:"text-2xl font-bold",children:n.filter(e=>e.type==="human").length}),t("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),a(m,{children:[a(v,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(y,{className:"text-sm font-medium",children:"Digital Colleagues"}),t(de,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[t("div",{className:"text-2xl font-bold",children:n.filter(e=>e.type==="digital").length}),t("p",{className:"text-xs text-muted-foreground",children:"active"})]})]})]}),t(m,{children:t(c,{className:"pt-6",children:a("div",{className:"flex flex-col md:flex-row gap-4",children:[t("div",{className:"flex-1",children:a("div",{className:"relative",children:[t(se,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),t(L,{placeholder:"Search colleagues...",value:d,onChange:e=>K(e.target.value),className:"pl-9"})]})}),a(A,{value:S,onValueChange:U,children:[t(k,{className:"w-full md:w-[180px]",children:t(T,{placeholder:"Department"})}),a(I,{children:[t(g,{value:"all",children:"All Departments"}),z.map(e=>t(g,{value:e,children:e},e))]})]}),a(A,{value:N,onValueChange:F,children:[t(k,{className:"w-full md:w-[140px]",children:t(T,{placeholder:"Status"})}),a(I,{children:[t(g,{value:"all",children:"All Status"}),t(g,{value:"active",children:"Active"}),t(g,{value:"inactive",children:"Inactive"})]})]}),(d||S!=="all"||N!=="all")&&a(b,{variant:"outline",onClick:le,className:"gap-2",children:[t(ce,{className:"h-4 w-4"}),"Clear"]})]})})}),a("div",{className:"space-y-4",children:[t(j,{activeTab:p,onTabChange:Q,tabOptions:[{value:"all",label:`All (${f.length})`},{value:"human",label:`Human (${Z.length})`},{value:"digital",label:`Digital (${_.length})`}],maxWidth:"400px",gridCols:3}),p==="all"&&t("div",{className:`grid gap-4 ${x?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`}),p==="human"&&t("div",{className:`grid gap-4 ${x?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`}),p==="digital"&&t("div",{className:`grid gap-4 ${x?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`})]}),f.length===0&&t(m,{children:t(c,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[t(G,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),t("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),t("p",{className:"text-muted-foreground mb-4",children:d||S!=="all"||N!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),a(b,{onClick:$,className:"gap-2",children:[t(ne,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{pe as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as E}from"./chunk-U3PUWUVM.mjs";import{a as K,c as k,d as $,g as I,i as N}from"./chunk-YFAZQYK4.mjs";import{a as D}from"./chunk-B4H6T2GP.mjs";import{a as g}from"./chunk-TVZOULLL.mjs";import{a as S}from"./chunk-L5JPAKPM.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{b as T}from"./chunk-CSBGSBEU.mjs";import{a as j,b as _,c as B,e as F}from"./chunk-YO3GQYRJ.mjs";import{useState as y,useEffect as le}from"react";import{Bot as oe,Plus as M,X as P,Edit as ne}from"lucide-react";import{jsx as a,jsxs as i}from"react/jsx-runtime";function he({colleague:u,onSave:V,onCancel:z,isLoading:d=!1,title:O,submitLabel:R,cancelLabel:q="Cancel",readOnly:H=!1,availableKnowledgeDocuments:J=[],availableCapabilities:f=[],availableModels:w=[]}){let[t,m]=y(()=>{let e=u?.model||u?.metadata?.model||null;return{type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,coreKnowledge:null,...u,model:e}}),[ie,re]=y(""),[se,de]=y(""),[b,x]=y(""),[c,L]=y(!H),v=t.model,U=v?typeof v=="number"?`${v}`:typeof v=="object"&&v!==null&&"id"in v?`${v.id}`:"":"";le(()=>{if(u){let e=u?.model||u?.metadata?.model||null;m({...u,model:e})}},[u]);let W=e=>{e.preventDefault();let l={id:t.id||parseInt(Date.now().toString()),name:t?.name,type:"digital",description:t.description,jobDescription:t.jobDescription||"",workInstructions:t.workInstructions||"",capabilities:t.capabilities||[],capabilityLevel:t.capabilityLevel||0,coreKnowledge:t.coreKnowledge||null,model:t.model||null,metadata:t.metadata||{}};V(l)},A=(e,l,o)=>{if(!l.trim())return;let n=t[e]||[];m({...t,[e]:[...n,l.trim()]}),o("")},X=(e,l)=>{let o=t[e]||[];m({...t,[e]:o.filter((n,r)=>r!==l)})},G=()=>{if(!b)return;let[e,l]=b.split(":");if(!e)return;let o=f.find(s=>`${s.relationTo}:${typeof s.value=="number"?s.value:s.value.id}`===b);if(!o)return;let n=t.capabilities||[],r={relationTo:e,value:o.value};n.some(s=>{let h=typeof s.value=="object"?s.value.id:s.value,ae=typeof r.value=="object"?r.value.id:r.value;return s.relationTo===r.relationTo&&h===ae})||(m({...t,capabilities:[...n,r]}),x(""))},Q=e=>{let l=t.capabilities||[];m({...t,capabilities:l.filter((o,n)=>n!==e)})},Y=e=>{if(!e||e==="__none__"){m({...t,model:null});return}let l=w.find(o=>`${o.id}`===e);if(l){let o=typeof l.id=="string"?parseInt(l.id,10):l.id;m({...t,model:isNaN(o)?null:o})}},Z=e=>{e.preventDefault(),L(!c)},ce=(e,l,o,n,r)=>{let C=t[e]||[];return i("div",{className:"space-y-2",children:[a(g,{children:l}),c&&i("div",{className:"flex gap-2",children:[a(S,{value:o,onChange:s=>n(s.target.value),placeholder:r,onKeyPress:s=>{s.key==="Enter"&&(s.preventDefault(),A(e,o,n))},disabled:d}),a(p,{type:"button",variant:"outline",size:"icon",onClick:()=>A(e,o,n),disabled:d,children:a(M,{className:"h-4 w-4"})})]}),a("div",{className:"flex flex-wrap gap-2",children:C.map((s,h)=>i(T,{className:"gap-1",children:[s,c&&a(p,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>X(e,h),disabled:d,children:a(P,{className:"h-3 w-3"})})]},`${e}-${h}-${s}`))})]})},ee=O||(c?u?"Edit Colleague":"Add New Colleague":"View Colleague"),te=R||(u?"Update Colleague":"Add Colleague");return i(j,{className:"m-8 w-full max-w-4xl mx-auto overflow-y-scroll no-scrollbar",children:[a(_,{children:i(B,{className:"flex items-center gap-2",children:[a(oe,{className:"h-5 w-5"}),ee]})}),a(F,{className:"overflow-y-scroll no-scrollbar",children:i("form",{onSubmit:W,className:"space-y-6",children:[i("div",{className:"space-y-4",children:[i("div",{className:"space-y-2",children:[a(g,{htmlFor:"name",children:"Name *"}),a(S,{id:"name",value:t?.name||"",onChange:e=>m({...t,name:e.target.value}),required:!0,disabled:d||!c})]}),i("div",{className:"space-y-2",children:[a(g,{htmlFor:"description",children:"Description"}),a(D,{id:"description",value:t.description||"",onChange:e=>m({...t,description:e.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:d||!c})]})]}),i("div",{className:"space-y-4",children:[a("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),i("div",{className:"space-y-2",children:[a(g,{htmlFor:"jobDescription",children:"Job Description *"}),a(D,{id:"jobDescription",value:t.jobDescription||"",onChange:e=>m({...t,jobDescription:e.target.value}),rows:4,required:t.type==="digital",disabled:d||!c})]}),i("div",{className:"space-y-2",children:[a(g,{htmlFor:"workInstructions",children:"Work Instructions"}),a(D,{id:"workInstructions",value:t.workInstructions||"",onChange:e=>m({...t,workInstructions:e.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:d||!c})]}),i("div",{className:"space-y-2",children:[a(g,{children:"Capabilities"}),c&&f.length>0&&i("div",{className:"flex gap-2",children:[i(K,{value:b,onValueChange:x,disabled:d,children:[a($,{className:"flex-1",children:a(k,{placeholder:"Select a capability"})}),a(I,{children:f.filter(e=>{let l=t.capabilities||[],o=typeof e.value=="object"?e.value.id:e.value;return!l.some(n=>{let r=typeof n.value=="object"?n.value.id:n.value;return n.relationTo===e.relationTo&&r===o})}).map((e,l)=>{let o=typeof e.value=="object"?e.value.id:e.value,n=typeof e.value=="object"?e.value.name:void 0,r=`${e.relationTo}:${o}`,C=n?`${e.relationTo}: ${n}`:`${e.relationTo} (ID: ${o})`;return a(N,{value:r,children:C},r)})})]}),a(p,{type:"button",variant:"outline",size:"icon",onClick:G,disabled:d||!b,children:a(M,{className:"h-4 w-4"})})]}),c&&f.length===0&&a("div",{className:"text-sm text-muted-foreground",children:"No capabilities available. Please provide availableCapabilities prop."}),a("div",{className:"flex flex-wrap gap-2",children:t.capabilities?.map((e,l)=>{let o;if(typeof e=="string")o=e;else{let n=typeof e.value=="object"?e.value.id:e.value,r=typeof e.value=="object"?e.value.name:void 0;o=r?`${e.relationTo}: ${r}`:`${e.relationTo} (ID: ${n})`}return i(T,{className:"gap-1",children:[o,c&&a(p,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>Q(l),disabled:d,children:a(P,{className:"h-3 w-3"})})]},`capability-${l}`)})})]}),i("div",{className:"space-y-2",children:[a(g,{children:"Model"}),c&&w.length>0?i(K,{value:U||"__none__",onValueChange:Y,disabled:d,children:[a($,{children:a(k,{placeholder:"Select a model"})}),i(I,{children:[a(N,{value:"__none__",children:"None"}),w.map(e=>{let l=`${e.id}`;return a(N,{value:l,children:e.name},l)})]})]}):c&&w.length===0?a("div",{className:"text-sm text-muted-foreground",children:"No models available. Please provide availableModels prop."}):a("div",{className:"text-sm",children:t.model?typeof t.model=="number"?`Model ${t.model}`:typeof t.model=="object"&&t.model!==null&&"name"in t.model?t.model.name||`Model ${t.model.id}`:`Model ${t.model}`:"No model selected"})]}),a(E,{selectedDocuments:t.coreKnowledge?[{id:t.coreKnowledge?.id?.toString(),title:t.coreKnowledge?.name,format:"markdown",content:t.coreKnowledge?.content||"",createdAt:new Date(t.coreKnowledge?.createdAt),description:t.coreKnowledge?.description||"",metadata:t.coreKnowledge?.metadata||{},updatedAt:new Date(t.coreKnowledge?.updatedAt)}]:[],onDocumentsChange:e=>{let l={createdAt:e[0]?.createdAt.toISOString(),id:parseInt(e[0]?.id),name:e[0]?.title,source:"payload",updatedAt:(e[0]?.updatedAt||new Date).toISOString()};m({...t,coreKnowledge:e&&e.length>0?l:void 0})},label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:1,disabled:d||!c,availableDocuments:J.map(e=>({id:e.id.toString(),title:e?.name,name:e?.name,format:"markdown",content:e.content||"",createdAt:new Date(e.createdAt),source:e.source,description:e.description||"",metadata:e.metadata||{},updatedAt:new Date(e.updatedAt)}))})]}),i("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[a(p,{type:"button",variant:"outline",onClick:z,disabled:d,children:c?q:"Close"}),c?a(p,{type:"submit",disabled:d,children:d?"Saving...":te}):i(p,{type:"button",onClick:Z,disabled:d,className:"gap-2",children:[a(ne,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}export{he as a};
@@ -1,4 +1,4 @@
1
- import{a as c}from"./chunk-SV7NMNDI.mjs";import{a as d}from"./chunk-2GZQYAN3.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
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as d}from"./chunk-L5JPAKPM.mjs";import{b as c}from"./chunk-ZUA4KNIR.mjs";import{a as u,c as f}from"./chunk-SOLZ4VQH.mjs";import{a as r,b as p,c as v,e as i}from"./chunk-YO3GQYRJ.mjs";import{useState as U,useMemo as w}from"react";import{Search as S,User as N,Check as b,ChevronLeft as k}from"lucide-react";import{motion as g,AnimatePresence as T}from"motion/react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function E({users:o,onUserSelect:y,onCancel:h,selectedUserId:l}){let[s,C]=U(""),m=Array.isArray(o)?o:[],n=w(()=>m.filter(a=>a!=null&&a!==void 0).filter(a=>a?.name?.toLowerCase().includes(s.toLowerCase())||a?.email?.toLowerCase().includes(s.toLowerCase())),[m,s]),x=a=>{y(a)};return e("div",{className:"px-2 md:px-4 py-4 space-y-6",children:e(T,{mode:"wait",children:t(g.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[t("div",{className:"flex items-center gap-4 mb-6",children:[t(c,{variant:"ghost",onClick:h,className:"gap-2",children:[e(k,{className:"h-4 w-4"}),"Back"]}),t("div",{children:[e("h1",{className:"text-3xl font-bold",children:"Select User"}),e("p",{className:"text-muted-foreground",children:"Choose a user to add as a colleague"})]})]}),e(r,{className:"container",children:e(i,{className:"pt-6",children:e("div",{className:"flex flex-col md:flex-row gap-4",children:e("div",{className:"flex-1",children:t("div",{className:"relative",children:[e(S,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(d,{placeholder:"Search users by name, email, role, or skills...",value:s,onChange:a=>C(a.target.value),className:"pl-9"})]})})})})}),e("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(a=>!a||!a.id?null:e(g.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:t(r,{className:`cursor-pointer transition-all hover:shadow-lg ${l===a.id?"ring-2 ring-primary":""}`,onClick:()=>x(a),children:[e(p,{className:"pb-3",children:t("div",{className:"flex items-start justify-between",children:[t("div",{className:"flex items-center gap-3",children:[e(u,{children:e(f,{children:e(N,{className:"h-4 w-4"})})}),e("div",{children:e(v,{className:"text-lg",children:a?.name||"Unknown User"})})]}),l===a.id&&e(b,{className:"h-5 w-5 text-primary"})]})}),e(i,{className:"pt-0",children:t("div",{className:"space-y-3",children:[t("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Email"}),e("p",{className:"text-sm font-medium",children:a?.email||"No email"})]}),e("div",{children:e("p",{className:"text-sm text-muted-foreground",children:"Department"})})]})})]})},a.id))}),n.length===0&&e(r,{className:"container mt-4",children:e(i,{className:"pt-6",children:t("div",{className:"text-center py-8",children:[e(N,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),e("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}export{E as a};
@@ -1 +1 @@
1
- import{a as v}from"./chunk-66ODXUVL.mjs";import{a as p}from"./chunk-JT65KF7C.mjs";import{c as b,d as h}from"./chunk-BGADMIWV.mjs";import{a as k}from"./chunk-UZSBX5GO.mjs";import{a}from"./chunk-MDJREBVI.mjs";import{Fragment as x}from"react";import R from"next/image";import{jsx as t,jsxs as g}from"react/jsx-runtime";var y={content:v,cta:b,mediaBlock:k,collapsibleArea:p,imageBlock:k,features:h,reusableContentBlock:C},P=e=>{let{blocks:n}=e;return n&&Array.isArray(n)&&n.length>0?t("section",{id:"render-blocks",className:a(e.fill?"h-full w-full":""),children:n.map((i,s)=>{let{blockType:r}=i,m=i?.theme;if(r&&r in y){let o=y[r];if(r==="reusableContentBlock")return t(x,{children:t(P,{blocks:i.reusableContent.layout})},s);if(o)return g("div",{className:a("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[t(B,{block:i,index:s}),t("div",{className:a("container h-full relative",m?.settings?.theme||"dark"),children:t(o,{...i})})]},s)}return null})}):null},B=e=>{if(!("theme"in e.block))return t("div",{className:a("absolute inset-0 w-screen h-full dark bg-background")});let n=e.block?.theme;if(n.settings.background==="image"){let u={imagePosition:n.settings.imagePosition||"left",overlay:n.settings.overlay!==void 0?n.settings.overlay:!0};return g("div",{className:a("absolute inset-0 w-full h-full bg-background",n.settings.theme||"dark"),children:[t(R,{src:n.settings?.image?.url||"/placeholder.svg",alt:n.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),n.settings.overlay&&t("div",{className:"absolute inset-0",style:{background:u.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return t("div",{className:a("absolute inset-0 w-screen h-full bg-background",n.settings.theme||"dark")})},E=e=>{let{blocks:n}=e;return n&&Array.isArray(n)&&n.length>0?t("main",{id:"content-blocks",className:a(e.fill?"h-full w-full":""),children:n.map((i,s)=>{let{blockType:r}=i,m=i?.theme;if(r&&r in y){let o=y[r];if(r==="reusableContentBlock")return t(x,{children:t(P,{blocks:i.reusableContent.layout})},s);if(o)return t(A,{block:i,allBlocks:n,index:s,children:t(o,{...i})})}return null})}):null},A=e=>{if(e.index===0)return g("section",{className:"relative flex w-full",children:[t("div",{className:a("absolute inset-0 w-screen h-full light bg-background")}),t("div",{className:a("container h-full relative pt-6 pb-12 min-h-[22em] content-center light bg-background"),children:e.children})]});let n=l=>l%2===0?"light":"dark",u=({index:l,allBlocks:c})=>l===1?t(N,{position:"left"}):s(l,c)==="dark"&&m(l,c)==="light"?t(w,{position:"left"}):s(l,c)==="light"&&m(l,c)==="dark"?t(N,{position:"left"}):null,i=({index:l,allBlocks:c})=>r(l,c)==="light"&&m(l,c)==="dark"?t(w,{position:"left"}):null,s=(l,c)=>{if(l===1)return"light";let d=c[l-1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},r=(l,c)=>{if(l===c.length-1)return"dark";if(l===0)return"light";let d=c[l+1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},m=(l,c)=>{if(l===c.length-1)return"dark";let d=c[l];return d.theme&&d.theme?.settings?.theme==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return s(e.index,e.allBlocks)==="dark"?g("section",{id:e.block.name||"content-block",className:"relative flex flex-col w-full pt-12",children:[t("div",{className:a("absolute inset-0 w-screen dark bg-background")}),t("div",{className:a("container relative","dark bg-background py-1"),children:e.children})]}):g("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[t(u,{index:e.index,allBlocks:e.allBlocks}),t("div",{className:a("absolute inset-0 w-screen")}),t("div",{className:"bg-black",children:t("div",{className:a("container relative","dark bg-background py-1"),children:e.children})})]});if(!("theme"in e.block)||s(e.index,e.allBlocks)===m(e.index,e.allBlocks)){let l=m(e.index,e.allBlocks);return g("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col w-full pt-20",children:[t("div",{className:a("absolute inset-0 w-screen bg-background",l)}),t("div",{className:a("container relative bg-background py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(s(e.index,e.allBlocks)!==m(e.index,e.allBlocks)){let l=m(e.index,e.allBlocks);return g("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[t(u,{index:e.index,allBlocks:e.allBlocks}),t("div",{className:a("absolute inset-0 w-screen bg-background",l)}),t("div",{className:a("container relative bg-background min-h-[22em] content-center py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return g("div",{className:a("container h-full relative","dark"),children:[t("div",{className:a("absolute inset-0 w-screen h-full dark bg-background py-1")}),e.children]});let o=e.block?.theme;if(o.settings.background==="image"){let l={imagePosition:o.settings.imagePosition||"left",overlay:o.settings.overlay!==void 0?o.settings.overlay:!0};return g("div",{className:a("absolute inset-0 w-full h-full bg-background",o.settings.theme||"dark"),children:[t(R,{src:o.settings?.image?.url||"/placeholder.svg",alt:o.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),o.settings.overlay&&t("div",{className:"absolute inset-0",style:{background:l.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return t("div",{className:a("absolute inset-0 w-screen h-full bg-background",o.settings.theme||"dark")})},N=({position:e})=>t("div",{className:"w-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 1920 360",preserveAspectRatio:"none",style:{transform:"rotateX(180deg)",position:"absolute",bottom:"-2px"},className:a("w-full block overflow-hidden"),children:t("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),w=({position:e})=>t("div",{className:"w-full relative z-20 aspect-[1920/332] overflow-hidden ",children:g("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:a("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[t("defs",{children:g("mask",{id:"mask",children:[t("rect",{width:"100%",height:"100%",fill:"white"}),t("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),t("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});import{Fragment as F,jsx as f,jsxs as I}from"react/jsx-runtime";var C=e=>{let{customId:n,reusableContent:u}=e;return typeof u=="object"&&u!==null?f(S,{blocks:u.layout}):f(F,{})},T={content:v,cta:b,mediaBlock:k,imageBlock:k,features:h},S=e=>{let{blocks:n}=e;return n&&Array.isArray(n)&&n.length>0?f(F,{children:n.map((i,s)=>{let{blockType:r}=i,m=i?.theme;if(r&&r in T){let o=T[r];if(o)return I("div",{className:"py-6 relative",children:[f(B,{block:i,index:s}),f("div",{className:a(m?.settings?.theme==="dark"?"dark":m?.settings?.theme==="green"?"green":""),children:f(o,{...i})})]},s)}return null})}):null};export{C as a,P as b,B as c,E as d,A as e,N as f,w as g};
1
+ import{a as p}from"./chunk-MO4HRQEL.mjs";import{a as v}from"./chunk-PTZT4QJW.mjs";import{c as b,d as h}from"./chunk-FYQBRCQM.mjs";import{a as k}from"./chunk-UZSBX5GO.mjs";import{a}from"./chunk-MDJREBVI.mjs";import{Fragment as x}from"react";import R from"next/image";import{jsx as t,jsxs as g}from"react/jsx-runtime";var y={content:v,cta:b,mediaBlock:k,collapsibleArea:p,imageBlock:k,features:h,reusableContentBlock:C},P=e=>{let{blocks:n}=e;return n&&Array.isArray(n)&&n.length>0?t("section",{id:"render-blocks",className:a(e.fill?"h-full w-full":""),children:n.map((i,s)=>{let{blockType:r}=i,m=i?.theme;if(r&&r in y){let o=y[r];if(r==="reusableContentBlock")return t(x,{children:t(P,{blocks:i.reusableContent.layout})},s);if(o)return g("div",{className:a("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[t(B,{block:i,index:s}),t("div",{className:a("container h-full relative",m?.settings?.theme||"dark"),children:t(o,{...i})})]},s)}return null})}):null},B=e=>{if(!("theme"in e.block))return t("div",{className:a("absolute inset-0 w-screen h-full dark bg-background")});let n=e.block?.theme;if(n.settings.background==="image"){let u={imagePosition:n.settings.imagePosition||"left",overlay:n.settings.overlay!==void 0?n.settings.overlay:!0};return g("div",{className:a("absolute inset-0 w-full h-full bg-background",n.settings.theme||"dark"),children:[t(R,{src:n.settings?.image?.url||"/placeholder.svg",alt:n.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),n.settings.overlay&&t("div",{className:"absolute inset-0",style:{background:u.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return t("div",{className:a("absolute inset-0 w-screen h-full bg-background",n.settings.theme||"dark")})},E=e=>{let{blocks:n}=e;return n&&Array.isArray(n)&&n.length>0?t("main",{id:"content-blocks",className:a(e.fill?"h-full w-full":""),children:n.map((i,s)=>{let{blockType:r}=i,m=i?.theme;if(r&&r in y){let o=y[r];if(r==="reusableContentBlock")return t(x,{children:t(P,{blocks:i.reusableContent.layout})},s);if(o)return t(A,{block:i,allBlocks:n,index:s,children:t(o,{...i})})}return null})}):null},A=e=>{if(e.index===0)return g("section",{className:"relative flex w-full",children:[t("div",{className:a("absolute inset-0 w-screen h-full light bg-background")}),t("div",{className:a("container h-full relative pt-6 pb-12 min-h-[22em] content-center light bg-background"),children:e.children})]});let n=l=>l%2===0?"light":"dark",u=({index:l,allBlocks:c})=>l===1?t(N,{position:"left"}):s(l,c)==="dark"&&m(l,c)==="light"?t(w,{position:"left"}):s(l,c)==="light"&&m(l,c)==="dark"?t(N,{position:"left"}):null,i=({index:l,allBlocks:c})=>r(l,c)==="light"&&m(l,c)==="dark"?t(w,{position:"left"}):null,s=(l,c)=>{if(l===1)return"light";let d=c[l-1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},r=(l,c)=>{if(l===c.length-1)return"dark";if(l===0)return"light";let d=c[l+1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},m=(l,c)=>{if(l===c.length-1)return"dark";let d=c[l];return d.theme&&d.theme?.settings?.theme==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return s(e.index,e.allBlocks)==="dark"?g("section",{id:e.block.name||"content-block",className:"relative flex flex-col w-full pt-12",children:[t("div",{className:a("absolute inset-0 w-screen dark bg-background")}),t("div",{className:a("container relative","dark bg-background py-1"),children:e.children})]}):g("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[t(u,{index:e.index,allBlocks:e.allBlocks}),t("div",{className:a("absolute inset-0 w-screen")}),t("div",{className:"bg-black",children:t("div",{className:a("container relative","dark bg-background py-1"),children:e.children})})]});if(!("theme"in e.block)||s(e.index,e.allBlocks)===m(e.index,e.allBlocks)){let l=m(e.index,e.allBlocks);return g("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col w-full pt-20",children:[t("div",{className:a("absolute inset-0 w-screen bg-background",l)}),t("div",{className:a("container relative bg-background py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(s(e.index,e.allBlocks)!==m(e.index,e.allBlocks)){let l=m(e.index,e.allBlocks);return g("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[t(u,{index:e.index,allBlocks:e.allBlocks}),t("div",{className:a("absolute inset-0 w-screen bg-background",l)}),t("div",{className:a("container relative bg-background min-h-[22em] content-center py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return g("div",{className:a("container h-full relative","dark"),children:[t("div",{className:a("absolute inset-0 w-screen h-full dark bg-background py-1")}),e.children]});let o=e.block?.theme;if(o.settings.background==="image"){let l={imagePosition:o.settings.imagePosition||"left",overlay:o.settings.overlay!==void 0?o.settings.overlay:!0};return g("div",{className:a("absolute inset-0 w-full h-full bg-background",o.settings.theme||"dark"),children:[t(R,{src:o.settings?.image?.url||"/placeholder.svg",alt:o.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),o.settings.overlay&&t("div",{className:"absolute inset-0",style:{background:l.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return t("div",{className:a("absolute inset-0 w-screen h-full bg-background",o.settings.theme||"dark")})},N=({position:e})=>t("div",{className:"w-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 1920 360",preserveAspectRatio:"none",style:{transform:"rotateX(180deg)",position:"absolute",bottom:"-2px"},className:a("w-full block overflow-hidden"),children:t("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),w=({position:e})=>t("div",{className:"w-full relative z-20 aspect-[1920/332] overflow-hidden ",children:g("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:a("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[t("defs",{children:g("mask",{id:"mask",children:[t("rect",{width:"100%",height:"100%",fill:"white"}),t("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),t("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});import{Fragment as F,jsx as f,jsxs as I}from"react/jsx-runtime";var C=e=>{let{customId:n,reusableContent:u}=e;return typeof u=="object"&&u!==null?f(S,{blocks:u.layout}):f(F,{})},T={content:v,cta:b,mediaBlock:k,imageBlock:k,features:h},S=e=>{let{blocks:n}=e;return n&&Array.isArray(n)&&n.length>0?f(F,{children:n.map((i,s)=>{let{blockType:r}=i,m=i?.theme;if(r&&r in T){let o=T[r];if(o)return I("div",{className:"py-6 relative",children:[f(B,{block:i,index:s}),f("div",{className:a(m?.settings?.theme==="dark"?"dark":m?.settings?.theme==="green"?"green":""),children:f(o,{...i})})]},s)}return null})}):null};export{C as a,P as b,B as c,E as d,A as e,N as f,w as g};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{c as R,h as v,i as w,j as B,k as P,l,m as s,o as b,p as o,q as n,r as u,v as C,w as g,x as y}from"./chunk-PXLSH6S2.mjs";import{a as f}from"./chunk-7GSXNSLD.mjs";import{a as p,b as d,c}from"./chunk-YNCJATT7.mjs";import{a as M}from"./chunk-FVM5SQT2.mjs";import{PencilLine as z,ChevronDown as h,FilePlus as E,Edit as H,Printer as _}from"lucide-react";import $ from"clsx";import{Fragment as T,jsx as e,jsxs as a}from"react/jsx-runtime";var q=()=>e(M,{iconName:"github",size:"10x"});function Z({relatedContent:i,tableOfContents:x,editorComponent:N,loading:m=!1,editMode:k=!1,onAddDocument:A,onEditDocument:L,onPrintDocument:O,onGithubClick:G,onNavClick:S,LinkComponent:I,...D}){let F=I?t=>e(I,{...t}):S?({item:t,children:r,...j})=>e("button",{onClick:()=>S&&S(t),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...j,children:r}):t=>e("a",{href:t.href,...t});return a(R,{side:"right",variant:"inset",...D,children:[a(v,{className:"border-b border-sidebar-border",children:[a(o,{className:"flex-row space-x-1",children:[e(n,{children:a(u,{onClick:A,children:[e(E,{})," ",e("span",{children:"Add Document"})]})}),G&&e(n,{children:e(u,{onClick:G,tooltip:"Open in GitHub",children:e(q,{})})})]}),a(o,{className:"flex-row space-x-1",children:[e(n,{className:"w-5/12",children:a(u,{onClick:()=>L(),variant:k?"outline":"default",className:$(k&&"text-accent"),children:[e(H,{})," ",e("span",{children:"Edit"})]})}),e(n,{className:"w-5/12",children:a(u,{onClick:O,children:[e(_,{})," ",e("span",{children:"Print"})]})})]})]}),N&&a(T,{children:[e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Editor Controls",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:N})})]})}),e(B,{className:"mx-0"})]}),a(P,{className:"overflow-auto",children:[m&&a(T,{children:[a(l,{children:[e(s,{children:"Related Content"}),e(b,{children:e(o,{children:Array.from({length:3}).map((t,r)=>e(n,{children:e(f,{className:"bg-gray-200 w-full h-10"})},r))})})]}),a(l,{children:[e(s,{children:"Table of Contents"}),e(b,{children:e(o,{children:Array.from({length:3}).map((t,r)=>e(n,{children:e(f,{className:"bg-gray-200 w-full h-10"})},r))})})]})]}),i&&!m&&Object.keys(i).length>0&&e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Related Content",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:e(o,{children:i&&Object.keys(i).map(t=>a(n,{children:[a("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",t.charAt(0).toUpperCase()+t.slice(1)]}),t&&i[t]&&e(C,{children:i[t].map(r=>e(g,{children:e(y,{asChild:!0,isActive:!1,size:"sm",children:a(F,{href:r.url,item:r,className:"flex justify-between items-center w-full text-xs",children:[e("span",{children:r.label}),r.type==="note"&&e(z,{className:"ml-2 text-gray-400 !important",size:16}),r.type==="draft"&&e(M,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},r.label))})]},t))})})})]})}),x&&!m&&e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Table of Contents",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:e(o,{children:x.map(t=>a(n,{children:[e(u,{asChild:!0,children:e("a",{href:`#${t.url}`,className:"text-xs",children:t.title})}),t.items?.length?e(C,{children:t.items.map(r=>e(g,{children:e(y,{asChild:!0,isActive:r.isActive,size:"sm",children:e("a",{href:`#${r.url}`,className:"flex justify-between items-center w-full text-xs",children:e("span",{children:r.title})})})},r.title))}):null]},t.title))})})})]})})]}),e(w,{})]})}export{Z as a};
4
+ import{c as R,h as v,i as w,j as B,k as P,l,m as s,o as b,p as o,q as n,r as u,v as C,w as g,x as y}from"./chunk-ZFUP5NVF.mjs";import{a as f}from"./chunk-7GSXNSLD.mjs";import{a as p,b as d,c}from"./chunk-YNCJATT7.mjs";import{a as M}from"./chunk-FVM5SQT2.mjs";import{PencilLine as z,ChevronDown as h,FilePlus as E,Edit as H,Printer as _}from"lucide-react";import $ from"clsx";import{Fragment as T,jsx as e,jsxs as a}from"react/jsx-runtime";var q=()=>e(M,{iconName:"github",size:"10x"});function Z({relatedContent:i,tableOfContents:x,editorComponent:N,loading:m=!1,editMode:k=!1,onAddDocument:A,onEditDocument:L,onPrintDocument:O,onGithubClick:G,onNavClick:S,LinkComponent:I,...D}){let F=I?t=>e(I,{...t}):S?({item:t,children:r,...j})=>e("button",{onClick:()=>S&&S(t),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...j,children:r}):t=>e("a",{href:t.href,...t});return a(R,{side:"right",variant:"inset",...D,children:[a(v,{className:"border-b border-sidebar-border",children:[a(o,{className:"flex-row space-x-1",children:[e(n,{children:a(u,{onClick:A,children:[e(E,{})," ",e("span",{children:"Add Document"})]})}),G&&e(n,{children:e(u,{onClick:G,tooltip:"Open in GitHub",children:e(q,{})})})]}),a(o,{className:"flex-row space-x-1",children:[e(n,{className:"w-5/12",children:a(u,{onClick:()=>L(),variant:k?"outline":"default",className:$(k&&"text-accent"),children:[e(H,{})," ",e("span",{children:"Edit"})]})}),e(n,{className:"w-5/12",children:a(u,{onClick:O,children:[e(_,{})," ",e("span",{children:"Print"})]})})]})]}),N&&a(T,{children:[e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Editor Controls",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:N})})]})}),e(B,{className:"mx-0"})]}),a(P,{className:"overflow-auto",children:[m&&a(T,{children:[a(l,{children:[e(s,{children:"Related Content"}),e(b,{children:e(o,{children:Array.from({length:3}).map((t,r)=>e(n,{children:e(f,{className:"bg-gray-200 w-full h-10"})},r))})})]}),a(l,{children:[e(s,{children:"Table of Contents"}),e(b,{children:e(o,{children:Array.from({length:3}).map((t,r)=>e(n,{children:e(f,{className:"bg-gray-200 w-full h-10"})},r))})})]})]}),i&&!m&&Object.keys(i).length>0&&e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Related Content",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:e(o,{children:i&&Object.keys(i).map(t=>a(n,{children:[a("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",t.charAt(0).toUpperCase()+t.slice(1)]}),t&&i[t]&&e(C,{children:i[t].map(r=>e(g,{children:e(y,{asChild:!0,isActive:!1,size:"sm",children:a(F,{href:r.url,item:r,className:"flex justify-between items-center w-full text-xs",children:[e("span",{children:r.label}),r.type==="note"&&e(z,{className:"ml-2 text-gray-400 !important",size:16}),r.type==="draft"&&e(M,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},r.label))})]},t))})})})]})}),x&&!m&&e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Table of Contents",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:e(o,{children:x.map(t=>a(n,{children:[e(u,{asChild:!0,children:e("a",{href:`#${t.url}`,className:"text-xs",children:t.title})}),t.items?.length?e(C,{children:t.items.map(r=>e(g,{children:e(y,{asChild:!0,isActive:r.isActive,size:"sm",children:e("a",{href:`#${r.url}`,className:"flex justify-between items-center w-full text-xs",children:e("span",{children:r.title})})})},r.title))}):null]},t.title))})})})]})})]}),e(w,{})]})}export{Z as a};
@@ -1,5 +1,5 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{b as w,c as C}from"./chunk-PRK2XFAZ.mjs";import{b as y}from"./chunk-PZZTGPEO.mjs";import{a as P}from"./chunk-MDJREBVI.mjs";import{a as b}from"./chunk-Q3G5UAAD.mjs";import{useEffect as d,useRef as s,useState as H,useCallback as x}from"react";import{Previewer as p}from"pagedjs";import{Fragment as N,jsx as n,jsxs as l}from"react/jsx-runtime";function T(r){var e=document.createElement("div");e.style.display="block",e.style.height=r,document.body.appendChild(e);var i=parseFloat(window.getComputedStyle(e,null).height);return e.parentNode&&e.parentNode.removeChild(e),Math.floor(i)}var m=r=>{let e=document.createElement("div");e.style.height="1mm",document.body.appendChild(e);let i=parseFloat(window.getComputedStyle(e).height);return document.body.removeChild(e),Math.floor(r/i)},F=({page:r,layout:e="portrait",logoImage:i})=>e==="flow"?n(E,{page:r,layout:e,logoImage:i}):n(B,{page:r,layout:e,logoImage:i}),E=({page:r,layout:e="portrait",logoImage:i})=>{let{contentWithIds:c}=b(r),u=s(null),a=s(null),h=s(new p),f={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};d(()=>{let o=document.getElementById("printable-content");if(o){let t=document.createElement("style");return t.textContent=`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; width: ${m(o.offsetWidth)}mm }; .container : { max-width: ${m(o.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(t),()=>{document.head.removeChild(t)}}},[e]);let k=x(()=>{if(!a.current)return;a.current&&(a.current.innerHTML="");let o=document.getElementById("printable-content");o&&h.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],a.current).catch(t=>console.error("Paged.js error:",t))},[e]);d(()=>{h.current=new p},[k,e]);let g=[f,...c];return l("div",{children:[n("div",{className:"w-[1123px] print:w-[1123px]",children:l("div",{id:"printable-content",ref:u,children:[g.map((o,t)=>n(N,{children:t===0?n("section",{className:"title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},t):l("section",{className:"normal-page overflow-hidden",children:[o.blockName&&n(w,{title:o.blockName}),n(y,{blocks:[o],fill:!0})]},t)})),n("section",{className:"normal-page",children:l("div",{className:`w-full py-2 px-8 flex justify-between items-center
4
+ import{b as w,c as C}from"./chunk-7OMPPFGG.mjs";import{b as y}from"./chunk-P6OSMPUQ.mjs";import{a as P}from"./chunk-MDJREBVI.mjs";import{a as b}from"./chunk-Q3G5UAAD.mjs";import{useEffect as d,useRef as s,useState as H,useCallback as x}from"react";import{Previewer as p}from"pagedjs";import{Fragment as N,jsx as n,jsxs as l}from"react/jsx-runtime";function T(r){var e=document.createElement("div");e.style.display="block",e.style.height=r,document.body.appendChild(e);var i=parseFloat(window.getComputedStyle(e,null).height);return e.parentNode&&e.parentNode.removeChild(e),Math.floor(i)}var m=r=>{let e=document.createElement("div");e.style.height="1mm",document.body.appendChild(e);let i=parseFloat(window.getComputedStyle(e).height);return document.body.removeChild(e),Math.floor(r/i)},F=({page:r,layout:e="portrait",logoImage:i})=>e==="flow"?n(E,{page:r,layout:e,logoImage:i}):n(B,{page:r,layout:e,logoImage:i}),E=({page:r,layout:e="portrait",logoImage:i})=>{let{contentWithIds:c}=b(r),u=s(null),a=s(null),h=s(new p),f={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};d(()=>{let o=document.getElementById("printable-content");if(o){let t=document.createElement("style");return t.textContent=`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; width: ${m(o.offsetWidth)}mm }; .container : { max-width: ${m(o.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(t),()=>{document.head.removeChild(t)}}},[e]);let k=x(()=>{if(!a.current)return;a.current&&(a.current.innerHTML="");let o=document.getElementById("printable-content");o&&h.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],a.current).catch(t=>console.error("Paged.js error:",t))},[e]);d(()=>{h.current=new p},[k,e]);let g=[f,...c];return l("div",{children:[n("div",{className:"w-[1123px] print:w-[1123px]",children:l("div",{id:"printable-content",ref:u,children:[g.map((o,t)=>n(N,{children:t===0?n("section",{className:"title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},t):l("section",{className:"normal-page overflow-hidden",children:[o.blockName&&n(w,{title:o.blockName}),n(y,{blocks:[o],fill:!0})]},t)})),n("section",{className:"normal-page",children:l("div",{className:`w-full py-2 px-8 flex justify-between items-center
5
5
  dark bg-background text-primary`,children:[l("div",{className:"flex px-6 items-center space-x-2",children:[i&&n("img",{src:i.src,alt:"Cortex Reply Logo",className:"h-8"}),n("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),n("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),n("div",{ref:a,className:"preview-container"})]})},B=({page:r,layout:e="portrait"})=>{let{contentWithIds:i}=b(r),c=s(null),u=s(null),a=s(new p),[h,f]=H(0),g=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...i],o=x(()=>{c.current&&(c.current&&(c.current.innerHTML=""),a.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",e==="landscape"?"./landscape.css":"./portrait.css"],c.current).then(t=>f(t.pageCount)).catch(t=>console.error("Paged.js error:",t)))},[e]);return d(()=>{a.current=new p,o()},[o,e]),d(()=>{let t=document.createElement("style");return t.textContent=`@page { size: A4 ${e} ; margin: 0mm; };`,document.head.appendChild(t),()=>{document.head.removeChild(t)}},[]),l("div",{className:"pagedjs-container",children:[n("div",{id:"printable-content",ref:u,style:{display:"none"},className:"pagedjs-content",children:g.map((t,v)=>n(N,{children:v===0?n("section",{className:"pagedjs-section title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},v):l("section",{className:P("pagedjs-section normal-page h-[699px]",`h-[${T("185mm")}px]`,t.theme?.settings?.theme==="dark"?"dark":"light"),children:[t.blockName&&n(w,{title:t.blockName}),n(y,{blocks:[t],fill:!0})]},v)}))}),n("div",{ref:c,className:"preview-container"})]})};export{F as a,E as b,B as c};
@@ -1 +1 @@
1
- import{f as u}from"./chunk-BGADMIWV.mjs";import{a as m}from"./chunk-2QZUKVBA.mjs";import{a as d}from"./chunk-MDJREBVI.mjs";import{jsx as r,jsxs as h}from"react/jsx-runtime";var B=g=>{let{columns:a,theme:i}=g,y={full:"12",half:"6",oneThird:"4",twoThirds:"8"},b={none:"",line:"border border-primary p-4 rounded-lg"},c=e=>{if(e.type&&e.type==="block"&&e.fields&&(e.fields.blockType==="imageBlock"||e.fields.blockType==="mediaBlock"))return!0;if(e.root&&e.root.children){for(let o of e.root.children)if(c(o))return!0}if(e.children){for(let o of e.children)if(c(o))return!0}return!1},k=(e,o,n)=>{if(o==="none"||n==="full")return{processedRichText:e,heading:null};let l=e,t=null;return e&&e.root&&e.root.children&&e.root.children[0].tag==="h2"&&(l={...e,root:{...e.root,children:e.root.children.slice(1)}},t=e.root.children[0]),{processedRichText:l,heading:t}};return r("div",{className:"my-6",children:r("div",{className:d("grid grid-cols-4 lg:grid-cols-12 gap-y-8",i?.settings?.box?"gap-x-8":"gap-x-16"),children:a&&a.length>0&&a.map((e,o)=>{let{enableLink:n,link:l,richText:t,size:s}=e,{processedRichText:p,heading:f}=k(t,i?.settings?.box||"none",s||"full");return h("div",{className:d(`col-span-4 lg:col-span-${y[s]}`,{"md:col-span-2":s!=="full"},b[s!=="full"&&!c(t)&&i?.settings?.box||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${o+1}00`),children:[f&&r("div",{className:"bg-primary text-primary-foreground mb-4 -mt-4 -mx-4 px-4 py-2 text-xl",children:f.children[0].text}),p&&r(u,{content:p,enableGutter:!1,className:"rich-text"}),n&&r(m,{...l})]},o)})})})};export{B as a};
1
+ import{f as u}from"./chunk-FYQBRCQM.mjs";import{a as m}from"./chunk-2QZUKVBA.mjs";import{a as d}from"./chunk-MDJREBVI.mjs";import{jsx as r,jsxs as h}from"react/jsx-runtime";var B=g=>{let{columns:a,theme:i}=g,y={full:"12",half:"6",oneThird:"4",twoThirds:"8"},b={none:"",line:"border border-primary p-4 rounded-lg"},c=e=>{if(e.type&&e.type==="block"&&e.fields&&(e.fields.blockType==="imageBlock"||e.fields.blockType==="mediaBlock"))return!0;if(e.root&&e.root.children){for(let o of e.root.children)if(c(o))return!0}if(e.children){for(let o of e.children)if(c(o))return!0}return!1},k=(e,o,n)=>{if(o==="none"||n==="full")return{processedRichText:e,heading:null};let l=e,t=null;return e&&e.root&&e.root.children&&e.root.children[0].tag==="h2"&&(l={...e,root:{...e.root,children:e.root.children.slice(1)}},t=e.root.children[0]),{processedRichText:l,heading:t}};return r("div",{className:"my-6",children:r("div",{className:d("grid grid-cols-4 lg:grid-cols-12 gap-y-8",i?.settings?.box?"gap-x-8":"gap-x-16"),children:a&&a.length>0&&a.map((e,o)=>{let{enableLink:n,link:l,richText:t,size:s}=e,{processedRichText:p,heading:f}=k(t,i?.settings?.box||"none",s||"full");return h("div",{className:d(`col-span-4 lg:col-span-${y[s]}`,{"md:col-span-2":s!=="full"},b[s!=="full"&&!c(t)&&i?.settings?.box||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${o+1}00`),children:[f&&r("div",{className:"bg-primary text-primary-foreground mb-4 -mt-4 -mx-4 px-4 py-2 text-xl",children:f.children[0].text}),p&&r(u,{content:p,enableGutter:!1,className:"rich-text"}),n&&r(m,{...l})]},o)})})})};export{B as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as b}from"./chunk-CTTBF7F4.mjs";import{a as I}from"./chunk-56X4PU43.mjs";import{a as S}from"./chunk-VATGKKXW.mjs";import{useChat as me}from"@ai-sdk/react";import{useState as l}from"react";import{motion as fe,AnimatePresence as he}from"motion/react";import{Users as ye}from"lucide-react";import{jsx as n,jsxs as Ce}from"react/jsx-runtime";function Le({aiConfig:w,useCustomChat:F,enableAI:T=!0,messages:D=[],businessUnits:R=[],capabilities:B=[],sidebarItems:x=[],notifications:N=[],sessions:M=[],onNewChat:A,onSessionSelect:L,onSessionDelete:P,onSessionEdit:k=()=>{},onBusinessUnitChange:E=()=>{},onNotificationRemove:K=()=>{},onRemoveAll:O=()=>{},onActionClick:$=()=>{},onSearch:q=p=>console.log("Search query:",p),initialTeam:z="design",currentSession:m=null,showCapabilities:ve=!0,title:W="Digital Colleagues",enableFileUpload:f=!0,maxFileSize:h=10,allowedFileTypes:y=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:H="/headerlogo.png",appName:X="Nuvia",tagline:G="AI-Powered Workspace",actionIcon:J=n(ye,{className:"mr-2 h-4 w-4"}),actionText:Q="Collaborate",sidebarInitiallyClosed:V=!1}){let p={...w,onError:e=>{i?.setMessages(t=>[...t,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:e.message}]}]),console.error("Error in CopilotInterface:",e)}},Y=me(p||{}),i=T?F||Y:null,[Z,u]=l(""),[_,C]=l(!1),j=i?.messages||D,r=Z,ee=i?.status==="submitted"||_,se=i?.addToolResult?(e,t,s)=>{i.addToolResult({tool:t,toolCallId:e,output:s}),console.log("Tool result added:",{toolCallId:e,tool:t,output:s}),i.sendMessage()}:()=>{console.log("addToolResult not available")},o=R||[],te={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[ie,ne]=l(()=>o.length===0?te:o.find(e=>e.id===z)||o[0]),[a,c]=l([]),[oe,ae]=l(!1),le=e=>{if(!e||!f)return;let t=[];Array.from(e).forEach(s=>{if(s.size>h*1024*1024){alert(`File ${s.name} is too large. Maximum size is ${h}MB.`);return}if(y.length>0&&!y.some(d=>s.type.match(d))){alert(`File type ${s.type} is not allowed.`);return}let U={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:s,status:"pending",progress:0};if(s.type.startsWith("image/")){let d=new FileReader;d.onload=ue=>{c(ge=>ge.map(g=>g.id===U.id?{...g,preview:ue.target?.result}:g))},d.readAsDataURL(s)}t.push(U)}),c(s=>[...s,...t])},re=e=>{c(t=>t.filter(s=>s.id!==e))},v=()=>{if(!(!r.trim()&&a.length===0)){if(i){let e=a.length>0?ce(a.map(t=>t.file)):void 0;i.sendMessage({text:r,files:e},{body:{timestamp:Date.now()}}),u("")}else console.log("Message to send:",r),console.log("Files to upload:",a),u(""),C(!0),setTimeout(()=>{C(!1)},1500);c([])}},ce=e=>{let t=new DataTransfer;return e.forEach(s=>t.items.add(s)),t.files},de=e=>{e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),v())},pe=e=>{u(e)};return n(b,{sidebarItems:x||[],title:W,notifications:N||[],businessUnits:o,currentBusinessUnit:ie,onBusinessUnitChange:e=>{e&&(ne(e),E?.(e))},onSearch:q,showTabs:!1,onActionClick:$,actionIcon:J,actionText:Q,onNotificationRemove:K,onRemoveAll:O,logo:H,appName:X,tagline:G,sidebarInitiallyClosed:V,children:n(he,{mode:"wait",children:n(fe.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:Ce("div",{className:"h-full flex",children:[n("div",{className:"w-80 flex-shrink-0 h-full p-2",children:n(I,{sessions:M||[],currentSession:m,teams:o,onNewChat:A,onSessionSelect:L,onSessionEdit:k,onSessionDelete:P})}),n("div",{className:"flex-1 h-full p-2",children:n(S,{messages:j||[],input:r,isTyping:ee,currentSessionTitle:m?.title,capabilities:B||[],onInputChange:pe,addToolResult:se,onSendMessage:v,onKeyPress:de,fileUploads:a,isDragOver:oe,enableFileUpload:f,onFileUpload:le,onRemoveFile:re,onDragOver:ae})})]})},"chat-interface")})})}export{Le as a};
4
+ import{a as b}from"./chunk-RS4WAAGI.mjs";import{a as I}from"./chunk-56X4PU43.mjs";import{a as S}from"./chunk-VATGKKXW.mjs";import{useChat as me}from"@ai-sdk/react";import{useState as l}from"react";import{motion as fe,AnimatePresence as he}from"motion/react";import{Users as ye}from"lucide-react";import{jsx as n,jsxs as Ce}from"react/jsx-runtime";function Le({aiConfig:w,useCustomChat:F,enableAI:T=!0,messages:D=[],businessUnits:R=[],capabilities:B=[],sidebarItems:x=[],notifications:N=[],sessions:M=[],onNewChat:A,onSessionSelect:L,onSessionDelete:P,onSessionEdit:k=()=>{},onBusinessUnitChange:E=()=>{},onNotificationRemove:K=()=>{},onRemoveAll:O=()=>{},onActionClick:$=()=>{},onSearch:q=p=>console.log("Search query:",p),initialTeam:z="design",currentSession:m=null,showCapabilities:ve=!0,title:W="Digital Colleagues",enableFileUpload:f=!0,maxFileSize:h=10,allowedFileTypes:y=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:H="/headerlogo.png",appName:X="Nuvia",tagline:G="AI-Powered Workspace",actionIcon:J=n(ye,{className:"mr-2 h-4 w-4"}),actionText:Q="Collaborate",sidebarInitiallyClosed:V=!1}){let p={...w,onError:e=>{i?.setMessages(t=>[...t,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:e.message}]}]),console.error("Error in CopilotInterface:",e)}},Y=me(p||{}),i=T?F||Y:null,[Z,u]=l(""),[_,C]=l(!1),j=i?.messages||D,r=Z,ee=i?.status==="submitted"||_,se=i?.addToolResult?(e,t,s)=>{i.addToolResult({tool:t,toolCallId:e,output:s}),console.log("Tool result added:",{toolCallId:e,tool:t,output:s}),i.sendMessage()}:()=>{console.log("addToolResult not available")},o=R||[],te={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[ie,ne]=l(()=>o.length===0?te:o.find(e=>e.id===z)||o[0]),[a,c]=l([]),[oe,ae]=l(!1),le=e=>{if(!e||!f)return;let t=[];Array.from(e).forEach(s=>{if(s.size>h*1024*1024){alert(`File ${s.name} is too large. Maximum size is ${h}MB.`);return}if(y.length>0&&!y.some(d=>s.type.match(d))){alert(`File type ${s.type} is not allowed.`);return}let U={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:s,status:"pending",progress:0};if(s.type.startsWith("image/")){let d=new FileReader;d.onload=ue=>{c(ge=>ge.map(g=>g.id===U.id?{...g,preview:ue.target?.result}:g))},d.readAsDataURL(s)}t.push(U)}),c(s=>[...s,...t])},re=e=>{c(t=>t.filter(s=>s.id!==e))},v=()=>{if(!(!r.trim()&&a.length===0)){if(i){let e=a.length>0?ce(a.map(t=>t.file)):void 0;i.sendMessage({text:r,files:e},{body:{timestamp:Date.now()}}),u("")}else console.log("Message to send:",r),console.log("Files to upload:",a),u(""),C(!0),setTimeout(()=>{C(!1)},1500);c([])}},ce=e=>{let t=new DataTransfer;return e.forEach(s=>t.items.add(s)),t.files},de=e=>{e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),v())},pe=e=>{u(e)};return n(b,{sidebarItems:x||[],title:W,notifications:N||[],businessUnits:o,currentBusinessUnit:ie,onBusinessUnitChange:e=>{e&&(ne(e),E?.(e))},onSearch:q,showTabs:!1,onActionClick:$,actionIcon:J,actionText:Q,onNotificationRemove:K,onRemoveAll:O,logo:H,appName:X,tagline:G,sidebarInitiallyClosed:V,children:n(he,{mode:"wait",children:n(fe.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:Ce("div",{className:"h-full flex",children:[n("div",{className:"w-80 flex-shrink-0 h-full p-2",children:n(I,{sessions:M||[],currentSession:m,teams:o,onNewChat:A,onSessionSelect:L,onSessionEdit:k,onSessionDelete:P})}),n("div",{className:"flex-1 h-full p-2",children:n(S,{messages:j||[],input:r,isTyping:ee,currentSessionTitle:m?.title,capabilities:B||[],onInputChange:pe,addToolResult:se,onSendMessage:v,onKeyPress:de,fileUploads:a,isDragOver:oe,enableFileUpload:f,onFileUpload:le,onRemoveFile:re,onDragOver:ae})})]})},"chat-interface")})})}export{Le as a};
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as g,b as h,c as b}from"./chunk-PRK2XFAZ.mjs";import{b as y}from"./chunk-PZZTGPEO.mjs";import{a as l}from"./chunk-MDJREBVI.mjs";import{useState as C,useEffect as D,useCallback as A}from"react";import{AnimatePresence as k,motion as v}from"motion/react";import"pagedjs";import{Fragment as I,jsx as t,jsxs as w}from"react/jsx-runtime";var K=c=>{let[s,i]=C(0),{blocks:a,hero:x,logoImage:m}=c,N=a&&Array.isArray(a)&&a.length>0,n=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],S=e=>{i(e)},r=()=>{i(e=>(e+1)%n.length)},d=()=>{i(e=>(e-1+n.length)%n.length)},u=A(((e,o)=>{let f;return(...T)=>{clearTimeout(f),f=setTimeout(()=>e(...T),o)}})(e=>{e.deltaY>0?r():d()},300),[]),p=e=>{e.key==="ArrowDown"?r():e.key==="ArrowUp"&&d()};return D(()=>(window.addEventListener("wheel",u),window.addEventListener("keydown",p),()=>{window.removeEventListener("wheel",u),window.removeEventListener("keydown",p)}),[]),w("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[t("div",{className:"fixed left-0 top-0 flex h-screen w-9 z-10 flex-col items-center justify-center bg-gray-900",children:N&&n.map((e,o)=>t("button",{className:`group relative flex items-center justify-center my-2 h-16 w-4 rounded-full transition-all hover:bg-accent duration-300 ${s===o?"bg-accent":"bg-gray-600"}`,onClick:()=>S(o),children:t("span",{className:"absolute ml-7 left-full text-left transform -translate-y-1/2 translate-x-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-x-2 transition-all duration-300",children:e.blockName})},e.id))}),t(k,{children:n.map((e,o)=>t("div",{id:`slide-${o}`,className:"print-section",children:t("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
4
+ import{a as g,b as h,c as b}from"./chunk-7OMPPFGG.mjs";import{b as y}from"./chunk-P6OSMPUQ.mjs";import{a as l}from"./chunk-MDJREBVI.mjs";import{useState as C,useEffect as D,useCallback as A}from"react";import{AnimatePresence as k,motion as v}from"motion/react";import"pagedjs";import{Fragment as I,jsx as t,jsxs as w}from"react/jsx-runtime";var K=c=>{let[s,i]=C(0),{blocks:a,hero:x,logoImage:m}=c,N=a&&Array.isArray(a)&&a.length>0,n=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],S=e=>{i(e)},r=()=>{i(e=>(e+1)%n.length)},d=()=>{i(e=>(e-1+n.length)%n.length)},u=A(((e,o)=>{let f;return(...T)=>{clearTimeout(f),f=setTimeout(()=>e(...T),o)}})(e=>{e.deltaY>0?r():d()},300),[]),p=e=>{e.key==="ArrowDown"?r():e.key==="ArrowUp"&&d()};return D(()=>(window.addEventListener("wheel",u),window.addEventListener("keydown",p),()=>{window.removeEventListener("wheel",u),window.removeEventListener("keydown",p)}),[]),w("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[t("div",{className:"fixed left-0 top-0 flex h-screen w-9 z-10 flex-col items-center justify-center bg-gray-900",children:N&&n.map((e,o)=>t("button",{className:`group relative flex items-center justify-center my-2 h-16 w-4 rounded-full transition-all hover:bg-accent duration-300 ${s===o?"bg-accent":"bg-gray-600"}`,onClick:()=>S(o),children:t("span",{className:"absolute ml-7 left-full text-left transform -translate-y-1/2 translate-x-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-x-2 transition-all duration-300",children:e.blockName})},e.id))}),t(k,{children:n.map((e,o)=>t("div",{id:`slide-${o}`,className:"print-section",children:t("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
5
5
  ${o===s?"opacity-100":"opacity-0"}
6
6
  w-full h-full bg-cover bg-center`,children:o===0?t(b,{hero:x,title:c.title,logoImage:m}):w(I,{children:[e.blockName&&t(h,{title:e.blockName}),t(y,{blocks:[e],fill:!0}),t(g,{logoImage:m})]})})},o))}),t("button",{className:"absolute bottom-4 left-1 z-20 text-3xl text-primary transition-all duration-300 hover:scale-110",onClick:r,children:t(E,{})})]})},E=()=>t(k,{children:t(v.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.7,ease:[.76,0,.24,1]},className:l("w-fit min-h-[50px] min-w-[20px] p-1 border-2 rounded-full","border-accent"),children:t(v.div,{initial:{y:0},animate:{y:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:l("w-[12px] h-[12px] rounded-full","bg-accent")})})});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-AGWQ5S2Z.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-PXLSH6S2.mjs";import{a as s}from"./chunk-4UIARERB.mjs";import{a as p}from"./chunk-CLGBBNRB.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}from"./chunk-4WA47ZQA.mjs";import{a as f}from"./chunk-VDN4LQSS.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as e,jsxs as v}from"react/jsx-runtime";var b=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:e(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:h,title:U="Digital Colleagues",notifications:C=[],currentBusinessUnit:N=b[0],onBusinessUnitChange:B,onSearch:c,businessUnits:D=b,activeTab:x,onTabChange:T,showTabs:y=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:k,onRemoveAll:w,logo:n="/headerlogo.png",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:M=!1}){let[i,O]=l(!M),[d,t]=l(!1),[u,I]=l(N),m=p=>{I(p),B?.(p)};return v("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[d&&e("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),e("div",{className:"md:hidden",children:e(a,{items:r,isOpen:d,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),e("div",{className:"hidden md:block",children:e(a,{items:r,isOpen:i,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),v("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",i?"md:pl-64":"md:pl-0"),children:[e(f,{title:U,notifications:C,onToggleSidebar:()=>O(!i),onToggleMobileMenu:()=>t(!0),sidebarOpen:i,activeTab:x,onTabChange:T,showTabs:y,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:k,onRemoveAll:w,logo:n,appName:o,tagline:s}),e("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:h})]})]})}export{E as a};
4
+ import{a}from"./chunk-6YHCNPFB.mjs";import{a as f}from"./chunk-F6DMXMR4.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as e,jsxs as v}from"react/jsx-runtime";var b=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:e(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:h,title:U="Digital Colleagues",notifications:C=[],currentBusinessUnit:N=b[0],onBusinessUnitChange:B,onSearch:c,businessUnits:D=b,activeTab:x,onTabChange:T,showTabs:y=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:k,onRemoveAll:w,logo:n="/headerlogo.png",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:M=!1}){let[i,O]=l(!M),[d,t]=l(!1),[u,I]=l(N),m=p=>{I(p),B?.(p)};return v("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[d&&e("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),e("div",{className:"md:hidden",children:e(a,{items:r,isOpen:d,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),e("div",{className:"hidden md:block",children:e(a,{items:r,isOpen:i,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),v("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",i?"md:pl-64":"md:pl-0"),children:[e(f,{title:U,notifications:C,onToggleSidebar:()=>O(!i),onToggleMobileMenu:()=>t(!0),sidebarOpen:i,activeTab:x,onTabChange:T,showTabs:y,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:k,onRemoveAll:w,logo:n,appName:o,tagline:s}),e("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:h})]})]})}export{E as a};
@@ -1 +1 @@
1
- import{f as r}from"./chunk-BGADMIWV.mjs";import{jsx as e}from"react/jsx-runtime";var c=({children:o,richText:t})=>e("div",{className:"min-w-full py-10 bg-muted mt-24",children:e("div",{className:"container",children:o||t&&e(r,{content:t,enableGutter:!1})})});export{c as a};
1
+ import{f as r}from"./chunk-FYQBRCQM.mjs";import{jsx as e}from"react/jsx-runtime";var c=({children:o,richText:t})=>e("div",{className:"min-w-full py-10 bg-muted mt-24",children:e("div",{className:"container",children:o||t&&e(r,{content:t,enableGutter:!1})})});export{c as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as K}from"./chunk-TVZOULLL.mjs";import{a as y}from"./chunk-FT3AE7L2.mjs";import{a as k}from"./chunk-L5JPAKPM.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{b as u}from"./chunk-CSBGSBEU.mjs";import{a as d,e as v}from"./chunk-YO3GQYRJ.mjs";import{useState as h,useEffect as A}from"react";import{Search as D,X as F,FileText as S,Tag as I}from"lucide-react";import{jsx as t,jsxs as s}from"react/jsx-runtime";function J({selectedDocuments:l,onDocumentsChange:N,availableDocuments:x,label:L,placeholder:B="Search knowledge documents...",maxSelections:i,disabled:c=!1}){let[r,w]=h(""),[f,C]=h([]),[g,o]=h(!1);A(()=>{if(!r.trim()){C([]),o(!1);return}let e=x.filter(a=>{if(l.map(n=>n.id).includes(a.id))return!1;let m=r.toLowerCase();return a.title.toLowerCase().includes(m)||a.description?.toLowerCase().includes(m)||a.tags?.some(n=>n.toLowerCase().includes(m))||Object.values(a.metadata||{}).some(n=>String(n).toLowerCase().includes(m))});C(e),o(!0)},[r,l,x]);let z=e=>{i&&l.length>=i&&l.pop(),N([...l,e]),w(""),o(!1)},T=e=>{N(l.filter(a=>a.id!==e))},b=!i||l.length<i;return s("div",{className:"space-y-2",children:[t(K,{children:L}),s("div",{className:"relative",children:[s("div",{className:"relative",children:[t(D,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),t(k,{value:r,onChange:e=>w(e.target.value),placeholder:b?B:`Maximum ${i} documents selected`,className:"pl-9",disabled:c||!b,onFocus:()=>r&&o(!0)})]}),g&&f.length>0&&t(d,{className:"absolute top-full left-0 right-0 z-10 mt-1 max-h-60 overflow-y-scroll no-scrollbar",children:t(y,{className:"h-full",children:t(v,{className:"p-2",children:f.map(e=>t(p,{variant:"ghost",className:"w-full justify-start h-auto p-3 mb-1",onClick:()=>z(e),disabled:c,children:s("div",{className:"flex items-start gap-3 w-full",children:[t(S,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),s("div",{className:"text-left flex-1 min-w-0",children:[t("div",{className:"font-medium text-sm truncate",children:e.title}),e.description&&t("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description}),e.tags&&e.tags.length>0&&s("div",{className:"flex flex-wrap gap-1 mt-2",children:[e.tags.slice(0,3).map(a=>t(u,{variant:"outline",className:"text-xs",children:a},a)),e.tags.length>3&&s(u,{variant:"outline",className:"text-xs",children:["+",e.tags.length-3," more"]})]})]})]})},e.id))})})}),g&&r&&f.length===0&&t(d,{className:"absolute top-full left-0 right-0 z-10 mt-1",children:s(v,{className:"p-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',r,'"']})})]}),l.length>0&&t("div",{className:"space-y-2",children:t("div",{className:"space-y-2",children:l.map(e=>t(d,{className:"p-3",children:s("div",{className:"flex items-start gap-3",children:[t(S,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),s("div",{className:"flex-1 min-w-0",children:[t("div",{className:"font-medium text-sm",children:e.title}),e.description&&t("div",{className:"text-xs text-muted-foreground mt-1",children:e.description}),e.tags&&e.tags.length>0&&t("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map(a=>s(u,{variant:"outline",className:"text-xs",children:[t(I,{className:"h-3 w-3 mr-1"}),a]},a))})]}),t(p,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>T(e.id),disabled:c,children:t(F,{className:"h-3 w-3"})})]})},e.id))})}),g&&t("div",{className:"fixed inset-0 z-0",onClick:()=>o(!1)})]})}export{J as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as x}from"./chunk-BGQC6IQK.mjs";import{a as N}from"./chunk-GPFPTU7U.mjs";import{a as f,b as y}from"./chunk-QY3UXH77.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-HTS3KCJL.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 x}from"./chunk-BGQC6IQK.mjs";import{a as N}from"./chunk-LEF6M5ZD.mjs";import{a as f,b as y}from"./chunk-QY3UXH77.mjs";import{a as g}from"./chunk-HD6E7KI2.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-HTS3KCJL.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};