cortex-react-components 2.10.0 → 2.12.0

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 (191) hide show
  1. package/dist/{chunk-VBSFVJM5.mjs → chunk-255P6K5W.mjs} +1 -1
  2. package/dist/{chunk-VRE6VCHX.mjs → chunk-2BR55L74.mjs} +1 -1
  3. package/dist/{chunk-Q7KKN6MH.mjs → chunk-2RQDJ5XT.mjs} +1 -1
  4. package/dist/{chunk-UN57ZYKQ.mjs → chunk-52GADV2R.mjs} +1 -1
  5. package/dist/{chunk-KY3ELFX5.mjs → chunk-5SHZBJ5R.mjs} +1 -1
  6. package/dist/{chunk-6DQ7FEQQ.mjs → chunk-5WVFEIMC.mjs} +1 -1
  7. package/dist/{chunk-57PJ7CHJ.mjs → chunk-67QPOSVV.mjs} +1 -1
  8. package/dist/{chunk-ORNGKQM7.mjs → chunk-74JNWOJQ.mjs} +1 -1
  9. package/dist/{chunk-U67OTPTT.mjs → chunk-74U3NYS2.mjs} +1 -1
  10. package/dist/{chunk-CLGBBNRB.mjs → chunk-75WE6ZXB.mjs} +1 -1
  11. package/dist/{chunk-SPAOEUCG.mjs → chunk-7GMAMIHM.mjs} +1 -1
  12. package/dist/{chunk-BE5B22X7.mjs → chunk-7YQNB57R.mjs} +1 -1
  13. package/dist/{chunk-LUM6KEWN.mjs → chunk-AQ6RGBGI.mjs} +1 -1
  14. package/dist/{chunk-PFDPO3UX.mjs → chunk-BA3I4XZE.mjs} +1 -1
  15. package/dist/chunk-CTAIR3TE.mjs +4 -0
  16. package/dist/{chunk-P3NMFRBH.mjs → chunk-CTAQQFEO.mjs} +1 -1
  17. package/dist/{chunk-FRN4LROV.mjs → chunk-D275F3RT.mjs} +1 -1
  18. package/dist/{chunk-NPGGDQ6F.mjs → chunk-ERJXTG6X.mjs} +1 -1
  19. package/dist/{chunk-ATDQQSX5.mjs → chunk-FA7PGHVM.mjs} +1 -1
  20. package/dist/{chunk-BHWGOTCJ.mjs → chunk-FGEFYI5E.mjs} +1 -1
  21. package/dist/{chunk-S4ES6P3Y.mjs → chunk-FKU4VQR6.mjs} +1 -1
  22. package/dist/{chunk-XW52WZ2B.mjs → chunk-FOEPKY7T.mjs} +1 -1
  23. package/dist/{chunk-RY4C3J33.mjs → chunk-FTZRG54P.mjs} +1 -1
  24. package/dist/{chunk-QWFFSMKK.mjs → chunk-H3CJOE6S.mjs} +1 -1
  25. package/dist/{chunk-75XBZHOC.mjs → chunk-HKGW6JI2.mjs} +1 -1
  26. package/dist/{chunk-2VOOH4YJ.mjs → chunk-IF3425JX.mjs} +1 -1
  27. package/dist/{chunk-IDG2O4B7.mjs → chunk-ISBVFNWD.mjs} +1 -1
  28. package/dist/{chunk-IQQ7ZWCP.mjs → chunk-JVG4XS2E.mjs} +1 -1
  29. package/dist/{chunk-MFCVMJBO.mjs → chunk-JVN7KTZV.mjs} +1 -1
  30. package/dist/{chunk-LQASBVUG.mjs → chunk-LBUC4M6L.mjs} +1 -1
  31. package/dist/{chunk-U6BCTHV7.mjs → chunk-LJLV5GUS.mjs} +1 -1
  32. package/dist/{chunk-AEFWTCCE.mjs → chunk-LJOWXPWW.mjs} +1 -1
  33. package/dist/{chunk-TUACRDU3.mjs → chunk-LJQPLE4S.mjs} +1 -1
  34. package/dist/{chunk-B2TBKNIJ.mjs → chunk-M7NV6EFH.mjs} +1 -1
  35. package/dist/{chunk-BY5TSHJ5.mjs → chunk-M7ZG6HLI.mjs} +1 -1
  36. package/dist/{chunk-FX6IXEMQ.mjs → chunk-MXCW6SOT.mjs} +1 -1
  37. package/dist/{chunk-FRXZ2OKW.mjs → chunk-N3B3XNV3.mjs} +1 -1
  38. package/dist/chunk-OPLUKFRN.mjs +4 -0
  39. package/dist/{chunk-RUZVSK25.mjs → chunk-PK3OBSCB.mjs} +1 -1
  40. package/dist/{chunk-ZMB6R6JX.mjs → chunk-Q3EVV5MV.mjs} +1 -1
  41. package/dist/{chunk-NVHQBM66.mjs → chunk-Q67RF7VO.mjs} +1 -1
  42. package/dist/{chunk-SJQY7JRS.mjs → chunk-Q6VAKKW3.mjs} +1 -1
  43. package/dist/{chunk-U7KI2WJW.mjs → chunk-QG5P52CK.mjs} +1 -1
  44. package/dist/{chunk-4RYG24IZ.mjs → chunk-QTILVWJA.mjs} +1 -1
  45. package/dist/{chunk-6DEY5ZDD.mjs → chunk-R7ILTSZR.mjs} +1 -1
  46. package/dist/{chunk-XIGBDWYI.mjs → chunk-RAGDUV7M.mjs} +1 -1
  47. package/dist/{chunk-AFQBDAWS.mjs → chunk-RNMPX2AU.mjs} +1 -1
  48. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  49. package/dist/{chunk-E64KWNOT.mjs → chunk-TK4JC5PG.mjs} +1 -1
  50. package/dist/{chunk-AMVJPDM3.mjs → chunk-TKSXXSHY.mjs} +1 -1
  51. package/dist/{chunk-PH67DP3M.mjs → chunk-WI2RL3XQ.mjs} +1 -1
  52. package/dist/{chunk-2AWS5Z43.mjs → chunk-WUOWA2IX.mjs} +1 -1
  53. package/dist/{chunk-UZSBX5GO.mjs → chunk-X3JZSN3W.mjs} +1 -1
  54. package/dist/{chunk-GTK2SGS5.mjs → chunk-XBCYPOFD.mjs} +1 -1
  55. package/dist/{chunk-LLED3RQS.mjs → chunk-XFPTR527.mjs} +1 -1
  56. package/dist/{chunk-VNYUNZ3M.mjs → chunk-XGIYNUGC.mjs} +1 -1
  57. package/dist/{chunk-N52FSTLG.mjs → chunk-YKG4FNS4.mjs} +1 -1
  58. package/dist/chunk-YRMNCHFO.mjs +4 -0
  59. package/dist/{chunk-PXLSH6S2.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  60. package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
  61. package/dist/components/AdvancedComponents/app-header.js +1 -1
  62. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  63. package/dist/components/AdvancedComponents/index.js +1 -1
  64. package/dist/components/AdvancedComponents/index.mjs +1 -1
  65. package/dist/components/AdvancedComponents/navigation-tabs.js +1 -1
  66. package/dist/components/AdvancedComponents/navigation-tabs.mjs +1 -1
  67. package/dist/components/Blocks/Banner.mjs +1 -1
  68. package/dist/components/Blocks/CallToAction.mjs +1 -1
  69. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  70. package/dist/components/Blocks/Content.mjs +1 -1
  71. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  72. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  73. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  74. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  75. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  76. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  77. package/dist/components/Blocks/index.mjs +1 -1
  78. package/dist/components/CRM/CogeBoard.mjs +1 -1
  79. package/dist/components/CRM/DealDetails.mjs +1 -1
  80. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  81. package/dist/components/CRM/NewDealForm.mjs +1 -1
  82. package/dist/components/CRM/index.mjs +1 -1
  83. package/dist/components/Cards/ContentCard.mjs +1 -1
  84. package/dist/components/Cards/FeatureCard.mjs +1 -1
  85. package/dist/components/Cards/index.mjs +1 -1
  86. package/dist/components/Chat/CopilotInterface.js +1 -1
  87. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  88. package/dist/components/Chat/demo-long-messages.js +1 -1
  89. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  90. package/dist/components/Chat/demo-tests.js +1 -1
  91. package/dist/components/Chat/demo-tests.mjs +1 -1
  92. package/dist/components/Chat/demo.js +1 -1
  93. package/dist/components/Chat/demo.mjs +1 -1
  94. package/dist/components/Chat/example-usage.js +1 -1
  95. package/dist/components/Chat/example-usage.mjs +1 -1
  96. package/dist/components/Chat/example-with-vercel-ai.js +1 -1
  97. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  98. package/dist/components/Chat/index.js +1 -1
  99. package/dist/components/Chat/index.mjs +1 -1
  100. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  101. package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
  102. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  103. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  104. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  105. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  106. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  107. package/dist/components/DigitalColleagues/Views/ColleaguesView.js +1 -1
  108. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  109. package/dist/components/DigitalColleagues/Views/TeamsIndexView.d.ts +2 -1
  110. package/dist/components/DigitalColleagues/Views/TeamsIndexView.js +1 -1
  111. package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +1 -1
  112. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  113. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  114. package/dist/components/DigitalColleagues/index.d.ts +1 -0
  115. package/dist/components/DigitalColleagues/index.js +1 -1
  116. package/dist/components/DigitalColleagues/index.mjs +1 -1
  117. package/dist/components/DigitalColleagues/team-form.css +1 -0
  118. package/dist/components/DigitalColleagues/team-form.d.ts +24 -0
  119. package/dist/components/DigitalColleagues/team-form.js +5 -0
  120. package/dist/components/DigitalColleagues/team-form.mjs +2 -0
  121. package/dist/components/HeaderFooter/Header.mjs +1 -1
  122. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  123. package/dist/components/HeaderFooter/index.mjs +1 -1
  124. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  125. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  126. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  127. package/dist/components/Heros/PostHero/index.mjs +1 -1
  128. package/dist/components/Heros/RenderHero.mjs +1 -1
  129. package/dist/components/Heros/index.mjs +1 -1
  130. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  131. package/dist/components/Layouts/Print.mjs +1 -1
  132. package/dist/components/Layouts/SlideShow.mjs +1 -1
  133. package/dist/components/Layouts/index.mjs +1 -1
  134. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  135. package/dist/components/Menus/SidebarRight.mjs +1 -1
  136. package/dist/components/Menus/index.mjs +1 -1
  137. package/dist/components/Payload/Card/index.mjs +1 -1
  138. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  139. package/dist/components/Payload/Media/index.mjs +1 -1
  140. package/dist/components/Payload/RichText/index.mjs +1 -1
  141. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  142. package/dist/components/Payload/index.mjs +1 -1
  143. package/dist/components/Projects/AddEpicModal.mjs +1 -1
  144. package/dist/components/Projects/AddSprintModal.mjs +1 -1
  145. package/dist/components/Projects/AddTaskModal.mjs +1 -1
  146. package/dist/components/Projects/FileView.js +1 -1
  147. package/dist/components/Projects/FileView.mjs +1 -1
  148. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  149. package/dist/components/Projects/PlanningView.mjs +1 -1
  150. package/dist/components/Projects/ProjectPage.js +1 -1
  151. package/dist/components/Projects/ProjectPage.mjs +1 -1
  152. package/dist/components/Projects/ProjectView.js +1 -1
  153. package/dist/components/Projects/ProjectView.mjs +1 -1
  154. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  155. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  156. package/dist/components/Projects/TasksView.mjs +1 -1
  157. package/dist/components/dc-temp/dashboard-integration-example.js +1 -1
  158. package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
  159. package/dist/components/dc-temp/index.js +1 -1
  160. package/dist/components/dc-temp/index.mjs +1 -1
  161. package/dist/components/index.js +13 -13
  162. package/dist/components/index.mjs +1 -1
  163. package/dist/components/ui/index.mjs +1 -1
  164. package/dist/components/ui/sidebar.mjs +1 -1
  165. package/dist/components/ui/switch.mjs +1 -3
  166. package/dist/index.js +17 -17
  167. package/dist/index.mjs +1 -1
  168. package/dist/metafile-cjs.json +1 -1
  169. package/dist/metafile-esm.json +1 -1
  170. package/dist/pages/Blog.mjs +1 -1
  171. package/dist/pages/Documentation.mjs +1 -1
  172. package/dist/pages/IndexPage.mjs +1 -1
  173. package/dist/pages/Intranet.mjs +1 -1
  174. package/dist/pages/LandingPage.mjs +1 -1
  175. package/dist/pages/Page.mjs +1 -1
  176. package/dist/pages/Publish.mjs +1 -1
  177. package/dist/pages/Website.mjs +1 -1
  178. package/dist/sections/AboutSection.mjs +1 -1
  179. package/dist/sections/BlogDetail.mjs +1 -1
  180. package/dist/sections/BlogList.mjs +1 -1
  181. package/dist/sections/BlogListSection.mjs +1 -1
  182. package/dist/sections/ContactSection.mjs +1 -1
  183. package/dist/sections/PageSections.mjs +1 -1
  184. package/dist/sections/PricingSection.mjs +1 -1
  185. package/dist/sections/ServiceDetail.mjs +1 -1
  186. package/dist/sections/ServiceDetailSection.mjs +1 -1
  187. package/dist/sections/ServiceSection.mjs +1 -1
  188. package/dist/sections/form/index.mjs +1 -1
  189. package/dist/sections/index.mjs +1 -1
  190. package/package.json +1 -1
  191. package/dist/chunk-3R75NUYA.mjs +0 -4
@@ -1 +1 @@
1
- import{f as t}from"./chunk-FRXZ2OKW.mjs";import{b as o}from"./chunk-ZUA4KNIR.mjs";import{a as r}from"./chunk-MDJREBVI.mjs";import s from"next/link";import{jsx as i,jsxs as n}from"react/jsx-runtime";var p=({dynamicServiceDetail:c,style:a})=>{let e=c;return i("div",{className:"container",children:n("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[n("div",{className:r("w-full text-left prose"),children:[i("h2",{className:"text-primary",children:e.title}),i("div",{className:"",children:i(t,{enableGutter:!1,content:e.description,enableProse:!1,className:r("prose prose-headings:text-foreground prose-p:text-foreground")})}),i(o,{asChild:!0,className:"mt-6 px-6 py-3 border border-accent text-foreground bg-background rounded-full hover:bg-accent hover:text-accent-foreground transition no-underline",children:i(s,{href:`/${e.slug}`,children:"Learn more"})})]}),e.icon&&typeof e.icon=="object"&&"type"in e.icon&&"iconName"in e.icon&&i("div",{className:r("w-full h-full min-h-96 py-6 p-0 md:p-16 flex justify-center"),children:i("i",{className:`${e.icon.type} fa-${e.icon.iconName} fa-10x w-3/4 h-full text-foreground fill-gradient-linear`,style:{width:"90%"}})})]})})};export{p as a};
1
+ import{f as t}from"./chunk-N3B3XNV3.mjs";import{b as o}from"./chunk-ZUA4KNIR.mjs";import{a as r}from"./chunk-MDJREBVI.mjs";import s from"next/link";import{jsx as i,jsxs as n}from"react/jsx-runtime";var p=({dynamicServiceDetail:c,style:a})=>{let e=c;return i("div",{className:"container",children:n("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[n("div",{className:r("w-full text-left prose"),children:[i("h2",{className:"text-primary",children:e.title}),i("div",{className:"",children:i(t,{enableGutter:!1,content:e.description,enableProse:!1,className:r("prose prose-headings:text-foreground prose-p:text-foreground")})}),i(o,{asChild:!0,className:"mt-6 px-6 py-3 border border-accent text-foreground bg-background rounded-full hover:bg-accent hover:text-accent-foreground transition no-underline",children:i(s,{href:`/${e.slug}`,children:"Learn more"})})]}),e.icon&&typeof e.icon=="object"&&"type"in e.icon&&"iconName"in e.icon&&i("div",{className:r("w-full h-full min-h-96 py-6 p-0 md:p-16 flex justify-center"),children:i("i",{className:`${e.icon.type} fa-${e.icon.iconName} fa-10x w-3/4 h-full text-foreground fill-gradient-linear`,style:{width:"90%"}})})]})})};export{p as a};
@@ -1 +1 @@
1
- import{f as r}from"./chunk-FRXZ2OKW.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-N3B3XNV3.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,5 +1,5 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{b as w,c as C}from"./chunk-SPAOEUCG.mjs";import{b as y}from"./chunk-Q7KKN6MH.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-7GMAMIHM.mjs";import{b as y}from"./chunk-2RQDJ5XT.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,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as p}from"./chunk-RYZTCMVC.mjs";import{a as d}from"./chunk-VRE6VCHX.mjs";import{a as m}from"./chunk-MDJREBVI.mjs";import A from"next/link";import{Fragment as g}from"react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var j=v=>{let{card:f,link:h}=p({}),{className:u,doc:N,relationTo:y,showCategories:i,title:b}=v,{slug:C,categories:t,meta:F,title:k}=N||{},{description:s,image:r}=F||{},a=t&&Array.isArray(t)&&t.length>0,c=b||k,w=s?.replace(/\s/g," "),T=`/${y}/${C}`;return o("article",{className:m("border border-border rounded-lg overflow-hidden bg-card hover:cursor-pointer",u),ref:f.ref,children:[o("div",{className:"relative w-full ",children:[!r&&e("div",{className:"",children:"No image"}),r&&typeof r!="string"&&e(d,{resource:r,size:"33vw"})]}),o("div",{className:"p-4",children:[i&&a&&e("div",{className:"uppercase text-sm mb-4",children:i&&a&&e("div",{children:t?.map((l,n)=>{if(typeof l=="object"){let{title:L}=l,P=L||"Untitled category",z=n===t.length-1;return o(g,{children:[P,!z&&e(g,{children:", \xA0"})]},n)}return null})})}),c&&e("div",{className:"prose",children:e("h3",{children:e(A,{className:"not-prose",href:T,ref:h.ref,children:c})})}),s&&e("div",{className:"mt-2",children:s&&e("p",{children:w})})]})]})};export{j as a};
4
+ import{a as p}from"./chunk-RYZTCMVC.mjs";import{a as d}from"./chunk-2BR55L74.mjs";import{a as m}from"./chunk-MDJREBVI.mjs";import A from"next/link";import{Fragment as g}from"react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var j=v=>{let{card:f,link:h}=p({}),{className:u,doc:N,relationTo:y,showCategories:i,title:b}=v,{slug:C,categories:t,meta:F,title:k}=N||{},{description:s,image:r}=F||{},a=t&&Array.isArray(t)&&t.length>0,c=b||k,w=s?.replace(/\s/g," "),T=`/${y}/${C}`;return o("article",{className:m("border border-border rounded-lg overflow-hidden bg-card hover:cursor-pointer",u),ref:f.ref,children:[o("div",{className:"relative w-full ",children:[!r&&e("div",{className:"",children:"No image"}),r&&typeof r!="string"&&e(d,{resource:r,size:"33vw"})]}),o("div",{className:"p-4",children:[i&&a&&e("div",{className:"uppercase text-sm mb-4",children:i&&a&&e("div",{children:t?.map((l,n)=>{if(typeof l=="object"){let{title:L}=l,P=L||"Untitled category",z=n===t.length-1;return o(g,{children:[P,!z&&e(g,{children:", \xA0"})]},n)}return null})})}),c&&e("div",{className:"prose",children:e("h3",{children:e(A,{className:"not-prose",href:T,ref:h.ref,children:c})})}),s&&e("div",{className:"mt-2",children:s&&e("p",{children:w})})]})]})};export{j as a};
@@ -1 +1 @@
1
- import{a as A}from"./chunk-RR4QSUV2.mjs";import{a as g,c as v,d as f,g as C,i as h}from"./chunk-YFAZQYK4.mjs";import{a as F}from"./chunk-INCYANPB.mjs";import{a as k}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as N}from"./chunk-FT3AE7L2.mjs";import{a as S,f as y,g as x,i as w}from"./chunk-3UMMMQEH.mjs";import{a as u}from"./chunk-L5JPAKPM.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{useState as D,useEffect as M}from"react";import{PlusIcon as z}from"lucide-react";import{Fragment as j,jsx as t,jsxs as r}from"react/jsx-runtime";function se({customers:b,users:d,categories:I,onSubmit:E,initialDeal:n,onAddCustomer:P,onClose:L}){let[a,o]=D(n||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[T,m]=D(!1),[i,c]=D({});M(()=>{n&&o(n)},[n]);let U=()=>{let e={};return a.customer||(e.customer="Customer is required"),a.value||(e.value="Value is required"),a.assignee||(e.assignee="Assignee is required"),a.closureDate||(e.closureDate="Closure Date is required"),c(e),Object.keys(e).length===0},B=async e=>{e.preventDefault(),c({});try{if(U()){let s=await E({...a});s.success?(o({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),L?.()):c(s.errors||{})}}catch{c({submit:"An error occurred while submitting the form."})}},O=e=>{o(s=>({...s,categories:(s.categories||[]).includes(e.id)?(s.categories||[]).filter(H=>H!==e.id):[...s.categories||[],e.id]}))},V=async e=>{o({...a,customer:e});try{let s=await P(e);s.success?m(!1):c(s.errors||{})}catch{c({submit:"An error occurred while submitting the form."})}},q=e=>d?.find(s=>s.id===Number(e)),R=e=>b?.find(s=>s.id===Number(e));return r(j,{children:[r("form",{onSubmit:B,className:"space-y-6",children:[t(N,{className:"h-[60vh] pr-4",children:r("div",{className:"space-y-6 px-4",children:[r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"customer",children:"Customer"}),r("div",{className:"flex items-center space-x-2",children:[r(g,{value:a.customer?.id?.toString(),onValueChange:e=>o({...a,customer:R(e)}),children:[t(f,{children:t(v,{placeholder:"Select customer"})}),t(C,{children:b.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),t(p,{variant:"outline",size:"icon",onClick:()=>m(!0),children:t(z,{className:"w-5 h-5"})})]}),i.customerId&&t("p",{className:"text-red-500 text-sm",children:i.customerId})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"value",children:"Value"}),t(u,{id:"value",type:"number",value:a.value||"",onChange:e=>o({...a,value:Number.parseFloat(e.target.value)}),placeholder:"Enter deal value"}),i.value&&t("p",{className:"text-red-500 text-sm",children:i.value})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"assignee",children:"Assignee"}),r(g,{value:a.assignee?.id?.toString(),onValueChange:e=>o({...a,assignee:q(e)}),children:[t(f,{children:t(v,{placeholder:"Select assignee"})}),t(C,{children:d&&d.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),i.assignee&&t("p",{className:"text-red-500 text-sm",children:i.assignee})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"description",children:"Description"}),t(k,{id:"description",value:a.description||"",onChange:e=>o({...a,description:e.target.value}),placeholder:"Enter deal description"})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{children:"Categories"}),t("div",{className:"space-y-4",children:["proposition","source","sector"].map(e=>r("div",{className:"space-y-2",children:[t("h4",{className:"text-sm font-medium",children:e.charAt(0).toUpperCase()+e.slice(1)}),t("div",{className:"grid grid-cols-2 gap-2",children:I.filter(s=>s.type===e).map(s=>r("div",{className:"flex items-center space-x-2",children:[t(F,{id:s.id.toString(),checked:a.categories?.includes(s.id),onCheckedChange:()=>O(s)}),t("label",{htmlFor:s.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:s.name})]},s.id))})]},e))})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"closureDate",children:"Closure Date"}),t(u,{id:"closureDate",type:"date",value:a.closureDate||"",onChange:e=>o({...a,closureDate:e.target.value})}),i.closureDate&&t("p",{className:"text-red-500 text-sm",children:i.closureDate})]})]})}),t(p,{type:"submit",className:"w-full",children:n?"Update Deal":"Add Deal"})]}),t(S,{open:T,onOpenChange:m,children:r(y,{children:[t(x,{children:t(w,{children:"Add New Customer"})}),t(A,{onSubmit:V})]})})]})}export{se as a};
1
+ import{a as A}from"./chunk-RR4QSUV2.mjs";import{a as g,c as v,d as f,g as C,i as h}from"./chunk-YFAZQYK4.mjs";import{a as F}from"./chunk-INCYANPB.mjs";import{a as k}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as N}from"./chunk-FT3AE7L2.mjs";import{a as u}from"./chunk-L5JPAKPM.mjs";import{a as S,f as y,g as x,i as w}from"./chunk-3UMMMQEH.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{useState as D,useEffect as M}from"react";import{PlusIcon as z}from"lucide-react";import{Fragment as j,jsx as t,jsxs as r}from"react/jsx-runtime";function se({customers:b,users:d,categories:I,onSubmit:E,initialDeal:n,onAddCustomer:P,onClose:L}){let[a,o]=D(n||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[T,m]=D(!1),[i,c]=D({});M(()=>{n&&o(n)},[n]);let U=()=>{let e={};return a.customer||(e.customer="Customer is required"),a.value||(e.value="Value is required"),a.assignee||(e.assignee="Assignee is required"),a.closureDate||(e.closureDate="Closure Date is required"),c(e),Object.keys(e).length===0},B=async e=>{e.preventDefault(),c({});try{if(U()){let s=await E({...a});s.success?(o({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),L?.()):c(s.errors||{})}}catch{c({submit:"An error occurred while submitting the form."})}},O=e=>{o(s=>({...s,categories:(s.categories||[]).includes(e.id)?(s.categories||[]).filter(H=>H!==e.id):[...s.categories||[],e.id]}))},V=async e=>{o({...a,customer:e});try{let s=await P(e);s.success?m(!1):c(s.errors||{})}catch{c({submit:"An error occurred while submitting the form."})}},q=e=>d?.find(s=>s.id===Number(e)),R=e=>b?.find(s=>s.id===Number(e));return r(j,{children:[r("form",{onSubmit:B,className:"space-y-6",children:[t(N,{className:"h-[60vh] pr-4",children:r("div",{className:"space-y-6 px-4",children:[r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"customer",children:"Customer"}),r("div",{className:"flex items-center space-x-2",children:[r(g,{value:a.customer?.id?.toString(),onValueChange:e=>o({...a,customer:R(e)}),children:[t(f,{children:t(v,{placeholder:"Select customer"})}),t(C,{children:b.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),t(p,{variant:"outline",size:"icon",onClick:()=>m(!0),children:t(z,{className:"w-5 h-5"})})]}),i.customerId&&t("p",{className:"text-red-500 text-sm",children:i.customerId})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"value",children:"Value"}),t(u,{id:"value",type:"number",value:a.value||"",onChange:e=>o({...a,value:Number.parseFloat(e.target.value)}),placeholder:"Enter deal value"}),i.value&&t("p",{className:"text-red-500 text-sm",children:i.value})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"assignee",children:"Assignee"}),r(g,{value:a.assignee?.id?.toString(),onValueChange:e=>o({...a,assignee:q(e)}),children:[t(f,{children:t(v,{placeholder:"Select assignee"})}),t(C,{children:d&&d.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),i.assignee&&t("p",{className:"text-red-500 text-sm",children:i.assignee})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"description",children:"Description"}),t(k,{id:"description",value:a.description||"",onChange:e=>o({...a,description:e.target.value}),placeholder:"Enter deal description"})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{children:"Categories"}),t("div",{className:"space-y-4",children:["proposition","source","sector"].map(e=>r("div",{className:"space-y-2",children:[t("h4",{className:"text-sm font-medium",children:e.charAt(0).toUpperCase()+e.slice(1)}),t("div",{className:"grid grid-cols-2 gap-2",children:I.filter(s=>s.type===e).map(s=>r("div",{className:"flex items-center space-x-2",children:[t(F,{id:s.id.toString(),checked:a.categories?.includes(s.id),onCheckedChange:()=>O(s)}),t("label",{htmlFor:s.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:s.name})]},s.id))})]},e))})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"closureDate",children:"Closure Date"}),t(u,{id:"closureDate",type:"date",value:a.closureDate||"",onChange:e=>o({...a,closureDate:e.target.value})}),i.closureDate&&t("p",{className:"text-red-500 text-sm",children:i.closureDate})]})]})}),t(p,{type:"submit",className:"w-full",children:n?"Update Deal":"Add Deal"})]}),t(S,{open:T,onOpenChange:m,children:r(y,{children:[t(x,{children:t(w,{children:"Add New Customer"})}),t(A,{onSubmit:V})]})})]})}export{se as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as i}from"./chunk-V6GC3UGV.mjs";import{a as m}from"./chunk-LLED3RQS.mjs";import{useState as f,useCallback as R}from"react";import{DragDropContext as P}from"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration";import{jsx as r,jsxs as M}from"react/jsx-runtime";var w=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function h({initialData:s,addNewDeal:v,updateDeal:l,addComment:p,addNewCustomer:N}){let[a,u]=f(null),C=e=>(s.deals??[]).filter(t=>t.status===e),D=e=>e.reduce((t,o)=>t+(o.value||0),0),g=(e,t)=>{let o={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return e.reduce((c,d)=>c+(d.value||0)*o[t],0)},b=R(e=>{let{source:t,destination:o}=e;if(!o||t.droppableId===o.droppableId&&t.index===o.index)return;let c=t.droppableId,d=o.droppableId,n=s.deals?.filter(S=>S.id===t.index)[0],x=[...s.deals??[]];n&&(n.status=d,l(n))},[l]);return r(P,{onDragEnd:b,children:M("div",{className:"p-4 h-full overflow-auto",children:[r("div",{className:"flex space-x-4 pb-4",children:w.filter(e=>e!=="Lost").map(e=>{let t=C(e);return r(i,{status:e,deals:t,customers:s.customers??[],users:s.users,categories:s.categories??[],onDealClick:u,calculateColumnValue:D,calculateWeightedValue:g},e)})}),a&&r(m,{deal:a,users:s.users,customer:a.customer,categories:s.categories??[],onClose:()=>u(null),onSave:l,onAddComment:e=>p(a.id.toString(),e)})]})})}export{h as a};
4
+ import{a as i}from"./chunk-V6GC3UGV.mjs";import{a as m}from"./chunk-XFPTR527.mjs";import{useState as f,useCallback as R}from"react";import{DragDropContext as P}from"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration";import{jsx as r,jsxs as M}from"react/jsx-runtime";var w=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function h({initialData:s,addNewDeal:v,updateDeal:l,addComment:p,addNewCustomer:N}){let[a,u]=f(null),C=e=>(s.deals??[]).filter(t=>t.status===e),D=e=>e.reduce((t,o)=>t+(o.value||0),0),g=(e,t)=>{let o={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return e.reduce((c,d)=>c+(d.value||0)*o[t],0)},b=R(e=>{let{source:t,destination:o}=e;if(!o||t.droppableId===o.droppableId&&t.index===o.index)return;let c=t.droppableId,d=o.droppableId,n=s.deals?.filter(S=>S.id===t.index)[0],x=[...s.deals??[]];n&&(n.status=d,l(n))},[l]);return r(P,{onDragEnd:b,children:M("div",{className:"p-4 h-full overflow-auto",children:[r("div",{className:"flex space-x-4 pb-4",children:w.filter(e=>e!=="Lost").map(e=>{let t=C(e);return r(i,{status:e,deals:t,customers:s.customers??[],users:s.users,categories:s.categories??[],onDealClick:u,calculateColumnValue:D,calculateWeightedValue:g},e)})}),a&&r(m,{deal:a,users:s.users,customer:a.customer,categories:s.categories??[],onClose:()=>u(null),onSave:l,onAddComment:e=>p(a.id.toString(),e)})]})})}export{h as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as T}from"./chunk-6DQ7FEQQ.mjs";import{a as F}from"./chunk-2VOOH4YJ.mjs";import{a as v}from"./chunk-MDJREBVI.mjs";import{a as R}from"./chunk-Q3G5UAAD.mjs";import{useState as A}from"react";import G from"html2canvas";import{jsPDF as W}from"jspdf";import{Fragment as J,jsx as e,jsxs as g}from"react/jsx-runtime";function ae({type:p="slideshow",orientation:d="landscape",...c}){let h=c.page,[C,n]=A(d),{contentWithIds:a,tableOfContents:i}=R(h);if(p==="slideshow")return e("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:e(T,{blocks:a,hero:c.hero,title:c.page.title,logoImage:c.logoImage})});if(p==="print")return g(J,{children:[e(U,{layout:C,changeLayout:n}),e(F,{page:c.page,layout:C,logoImage:c.logoImage})]})}var U=({changeLayout:p,layout:d="landscape"})=>{let c=async()=>{if(d==="flow"){let a=document.getElementById("printable-content")?.innerHTML;if(a){var n=window.document.body.innerHTML;window.document.body.innerHTML=a,window.print(),window.document.body.innerHTML=n}}else await new Promise(a=>setTimeout(a,300)),window.print()},h=n=>{p&&p(n)},C=async n=>{let a=document.getElementById(n);if(!a)throw new Error(`Element with id ${n} not found`);let i=document.createElement("canvas"),P=window.devicePixelRatio;i.width=Math.max(a.clientWidth||0)*P,i.height=Math.max(a.clientHeight||0)*P+100;let u=i.getContext("2d");if(!u)throw new Error("Failed to get 2D context");let q=u.drawImage,z=Array.from(a.getElementsByTagName("img")).reduce((y,s)=>(y[s.src]=s,y),{});u.drawImage=function(...y){let[s,S,j,l,r,D,B,m,w]=y;if(s instanceof HTMLImageElement){let Y=z[s.src].style.objectFit||"fill",$=z[s.src].style.objectPosition||"center center";r=s.height,l=s.width;let L=l/r,b=m/w,[x,f]=$.split(" ");switch(f||(f=x),Y){case"cover":if(L>b){let t=r*b,o=(l-t)/2;x==="left"&&(o=0),x==="right"&&(o=l-t),S+=o,l=t}else{let t=l/b,o=(r-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=r-t),j+=o,r=t}break;case"contain":if(L>b){let t=m/L,o=(w-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=w-t),B+=o,w=t}else{let t=w*L,o=(m-t)/2;x==="left"&&(o=0),x==="right"&&(o=m-t),D+=o,m=t}break;case"fill":break}}return q.call(u,s,S,j,l,r,D,B,m,w)};let k=document.getElementById(n);if(!k)throw new Error(`Element with id ${n} not found`);var O=i.width,X=i.height;let I=(await G(k,{canvas:i,windowHeight:X,windowWidth:O,scale:window.devicePixelRatio})).toDataURL("image/png"),N=new W({}).getImageProperties(I),M=297,E=M*(N.height/N.width),H=new W({unit:"mm",format:[M,E]});H.addImage(I,"PNG",0,0,M,E),H.save("print.pdf")};return e("div",{className:v("fixed right-2 z-20 top-20 space-y-6 print:hidden"),children:e("div",{className:"flex flex-row-reverse z-20 min-w-70 gap-4",children:g("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[g("a",{onClick:c,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:e("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),e("small",{className:"text-xs font-medium",children:"Print"})]}),e("div",{className:"flex-grow border-t border-gray-200 dark:border-slate-600/60"}),g("a",{onClick:()=>h("portrait"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="portrait"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",children:e("path",{d:"M352 448c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 384zM384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384z"})}),e("small",{className:"text-xs",children:"Portrait"})]}),g("a",{onClick:()=>h("landscape"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="landscape"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:e("path",{d:"M576 96c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32L64 416c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l512 0zM64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64z"})}),e("small",{className:"text-xs",children:"Landscape"})]}),g("a",{onClick:()=>h("flow"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="flow"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:e("path",{d:"M266.2 4.7C273 1.6 280.5 0 288 0s15 1.6 21.8 4.7l217.4 97.5c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 251.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 153.9C38.6 149.3 32 139.2 32 128s6.6-21.3 16.8-25.9L266.2 4.7zM288 32c-3 0-6 .6-8.8 1.9L69.3 128l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-210-94.1C294 32.6 291 32 288 32zM48.8 358.1l45.9-20.6 39.1 17.5L69.3 384l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 507.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 409.9C38.6 405.3 32 395.2 32 384s6.6-21.3 16.8-25.9zM94.7 209.5l39.1 17.5L69.3 256l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 379.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 281.9C38.6 277.3 32 267.2 32 256s6.6-21.3 16.8-25.9l45.9-20.6z"})}),e("small",{className:"text-xs",children:"Continuous"})]})]})})})};export{ae as a};
4
+ import{a as F}from"./chunk-IF3425JX.mjs";import{a as T}from"./chunk-5WVFEIMC.mjs";import{a as v}from"./chunk-MDJREBVI.mjs";import{a as R}from"./chunk-Q3G5UAAD.mjs";import{useState as A}from"react";import G from"html2canvas";import{jsPDF as W}from"jspdf";import{Fragment as J,jsx as e,jsxs as g}from"react/jsx-runtime";function ae({type:p="slideshow",orientation:d="landscape",...c}){let h=c.page,[C,n]=A(d),{contentWithIds:a,tableOfContents:i}=R(h);if(p==="slideshow")return e("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:e(T,{blocks:a,hero:c.hero,title:c.page.title,logoImage:c.logoImage})});if(p==="print")return g(J,{children:[e(U,{layout:C,changeLayout:n}),e(F,{page:c.page,layout:C,logoImage:c.logoImage})]})}var U=({changeLayout:p,layout:d="landscape"})=>{let c=async()=>{if(d==="flow"){let a=document.getElementById("printable-content")?.innerHTML;if(a){var n=window.document.body.innerHTML;window.document.body.innerHTML=a,window.print(),window.document.body.innerHTML=n}}else await new Promise(a=>setTimeout(a,300)),window.print()},h=n=>{p&&p(n)},C=async n=>{let a=document.getElementById(n);if(!a)throw new Error(`Element with id ${n} not found`);let i=document.createElement("canvas"),P=window.devicePixelRatio;i.width=Math.max(a.clientWidth||0)*P,i.height=Math.max(a.clientHeight||0)*P+100;let u=i.getContext("2d");if(!u)throw new Error("Failed to get 2D context");let q=u.drawImage,z=Array.from(a.getElementsByTagName("img")).reduce((y,s)=>(y[s.src]=s,y),{});u.drawImage=function(...y){let[s,S,j,l,r,D,B,m,w]=y;if(s instanceof HTMLImageElement){let Y=z[s.src].style.objectFit||"fill",$=z[s.src].style.objectPosition||"center center";r=s.height,l=s.width;let L=l/r,b=m/w,[x,f]=$.split(" ");switch(f||(f=x),Y){case"cover":if(L>b){let t=r*b,o=(l-t)/2;x==="left"&&(o=0),x==="right"&&(o=l-t),S+=o,l=t}else{let t=l/b,o=(r-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=r-t),j+=o,r=t}break;case"contain":if(L>b){let t=m/L,o=(w-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=w-t),B+=o,w=t}else{let t=w*L,o=(m-t)/2;x==="left"&&(o=0),x==="right"&&(o=m-t),D+=o,m=t}break;case"fill":break}}return q.call(u,s,S,j,l,r,D,B,m,w)};let k=document.getElementById(n);if(!k)throw new Error(`Element with id ${n} not found`);var O=i.width,X=i.height;let I=(await G(k,{canvas:i,windowHeight:X,windowWidth:O,scale:window.devicePixelRatio})).toDataURL("image/png"),N=new W({}).getImageProperties(I),M=297,E=M*(N.height/N.width),H=new W({unit:"mm",format:[M,E]});H.addImage(I,"PNG",0,0,M,E),H.save("print.pdf")};return e("div",{className:v("fixed right-2 z-20 top-20 space-y-6 print:hidden"),children:e("div",{className:"flex flex-row-reverse z-20 min-w-70 gap-4",children:g("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[g("a",{onClick:c,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:e("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),e("small",{className:"text-xs font-medium",children:"Print"})]}),e("div",{className:"flex-grow border-t border-gray-200 dark:border-slate-600/60"}),g("a",{onClick:()=>h("portrait"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="portrait"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",children:e("path",{d:"M352 448c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 384zM384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384z"})}),e("small",{className:"text-xs",children:"Portrait"})]}),g("a",{onClick:()=>h("landscape"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="landscape"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:e("path",{d:"M576 96c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32L64 416c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l512 0zM64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64z"})}),e("small",{className:"text-xs",children:"Landscape"})]}),g("a",{onClick:()=>h("flow"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="flow"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:e("path",{d:"M266.2 4.7C273 1.6 280.5 0 288 0s15 1.6 21.8 4.7l217.4 97.5c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 251.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 153.9C38.6 149.3 32 139.2 32 128s6.6-21.3 16.8-25.9L266.2 4.7zM288 32c-3 0-6 .6-8.8 1.9L69.3 128l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-210-94.1C294 32.6 291 32 288 32zM48.8 358.1l45.9-20.6 39.1 17.5L69.3 384l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 507.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 409.9C38.6 405.3 32 395.2 32 384s6.6-21.3 16.8-25.9zM94.7 209.5l39.1 17.5L69.3 256l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 379.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 281.9C38.6 277.3 32 267.2 32 256s6.6-21.3 16.8-25.9l45.9-20.6z"})}),e("small",{className:"text-xs",children:"Continuous"})]})]})})})};export{ae as a};
@@ -1 +1 @@
1
- import{a as O}from"./chunk-AMV3MECK.mjs";import{a as M}from"./chunk-HHYHENVF.mjs";import{a as I}from"./chunk-ORNGKQM7.mjs";import{a as x}from"./chunk-PFDPO3UX.mjs";import{a as B}from"./chunk-AM2SRWFU.mjs";import{a as N}from"./chunk-Z22NSJMF.mjs";import{b as w}from"./chunk-CSBGSBEU.mjs";import{useEffect as D,useState as o}from"react";import{Fragment as ts,jsx as i,jsxs as r}from"react/jsx-runtime";var fs=({initialTasks:m=[],initialEpics:u=[],initialSprints:k=[],initialUsers:U=[],initialColleagues:j=[],initialProjects:is=[],onAddTask:K,onUpdateTask:g,onDeleteTask:y,onTaskClick:R,onAddEpic:F})=>{let[H,n]=o(m),[d,h]=o(u),[f,V]=o(k),[$,S]=o(!1),[q,b]=o(!1),[c,T]=o(null),[v,P]=o(null),[z,as]=o(U),[G,os]=o(j),C=d.filter(s=>!0).map(s=>s.id),l=f.find(s=>s.isSelected);C.push("no-epic"),D(()=>{n(m)},[m]),D(()=>{h(u)},[u]),D(()=>{V(k)},[k]);let J=H.filter(s=>{let e=C.includes(s.epicId)||!s.epicId;return!l||l.id==="all-tasks"?e:l.id==="backlog"?e&&!s.sprintId:e&&s.sprintId===l.id}),L=s=>J.filter(e=>e.status===s),Q=s=>{let e={};return d.forEach(t=>{e[t.id]=s.filter(a=>a.epicId===t.id)}),e["no-epic"]=s.filter(t=>!t.epicId),e},W=s=>{P(s)},X=s=>{v&&(n(e=>e.map(t=>t.id===v.id?{...t,status:s}:t)),g?.(v.id,{status:s}),P(null))},Y=s=>{let e={...s,id:Date.now().toString(),createdAt:new Date};n(t=>[...t,e]),K?.(s)},Z=async(s,e)=>{n(t=>t.map(a=>a.id===s?{...a,...e}:a)),g&&await g(s,e)},_=async s=>{n(e=>e.filter(t=>t.id!==s)),c?.id===s&&T(null),y&&await y(s)},ss=s=>{let e={...s,id:Date.now().toString(),isSelected:!0};h(t=>[...t,e]),F?.(s)},es=s=>{T(s),R?.(s)};return r("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[i(N,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>S(!0)},secondaryAction:{label:"Add epic",onClick:()=>b(!0)}}),i("div",{className:"flex-1",children:r("div",{className:"w-full",children:[i("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}].map(s=>{let e=L(s.status),t=Q(e);return i(O,{title:s.title,status:s.status,taskCount:e.length,onDrop:X,isCompact:s.status==="done",children:C.map(a=>{let E=d.find(p=>p.id===a),A=t[a]||[];return A.length===0?null:r("div",{className:"mb-6",children:[r("div",{className:"flex items-center gap-2 mb-3",children:[i("div",{className:`w-3 h-3 rounded-full ${E?.color}`}),i("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:E?.name||"No Epic"}),i(w,{variant:"secondary",className:"text-xs",children:A.length})]})," ",i("div",{className:"space-y-3",children:A.map(p=>i(B,{task:p,epic:E,onDragStart:W,onTaskClick:es,isCompact:s.status==="done"},p.id))})]},a)})},s.id)})}),r(ts,{children:[i(x,{isOpen:$,onClose:()=>S(!1),onAddTask:Y,assignees:[...G,...z],epics:d,sprints:f}),i(I,{isOpen:q,onClose:()=>b(!1),onAddEpic:ss}),c&&i(M,{isOpen:!!c,onClose:()=>T(null),task:c,epics:d,sprints:f,onUpdateTask:Z,onDeleteTask:_})]})]})})]})};export{fs as a};
1
+ import{a as M}from"./chunk-HHYHENVF.mjs";import{a as B}from"./chunk-AM2SRWFU.mjs";import{a as O}from"./chunk-AMV3MECK.mjs";import{a as I}from"./chunk-74JNWOJQ.mjs";import{a as x}from"./chunk-BA3I4XZE.mjs";import{a as N}from"./chunk-Z22NSJMF.mjs";import{b as w}from"./chunk-CSBGSBEU.mjs";import{useEffect as D,useState as o}from"react";import{Fragment as ts,jsx as i,jsxs as r}from"react/jsx-runtime";var fs=({initialTasks:m=[],initialEpics:u=[],initialSprints:k=[],initialUsers:U=[],initialColleagues:j=[],initialProjects:is=[],onAddTask:K,onUpdateTask:g,onDeleteTask:y,onTaskClick:R,onAddEpic:F})=>{let[H,n]=o(m),[d,h]=o(u),[f,V]=o(k),[$,S]=o(!1),[q,b]=o(!1),[c,T]=o(null),[v,P]=o(null),[z,as]=o(U),[G,os]=o(j),C=d.filter(s=>!0).map(s=>s.id),l=f.find(s=>s.isSelected);C.push("no-epic"),D(()=>{n(m)},[m]),D(()=>{h(u)},[u]),D(()=>{V(k)},[k]);let J=H.filter(s=>{let e=C.includes(s.epicId)||!s.epicId;return!l||l.id==="all-tasks"?e:l.id==="backlog"?e&&!s.sprintId:e&&s.sprintId===l.id}),L=s=>J.filter(e=>e.status===s),Q=s=>{let e={};return d.forEach(t=>{e[t.id]=s.filter(a=>a.epicId===t.id)}),e["no-epic"]=s.filter(t=>!t.epicId),e},W=s=>{P(s)},X=s=>{v&&(n(e=>e.map(t=>t.id===v.id?{...t,status:s}:t)),g?.(v.id,{status:s}),P(null))},Y=s=>{let e={...s,id:Date.now().toString(),createdAt:new Date};n(t=>[...t,e]),K?.(s)},Z=async(s,e)=>{n(t=>t.map(a=>a.id===s?{...a,...e}:a)),g&&await g(s,e)},_=async s=>{n(e=>e.filter(t=>t.id!==s)),c?.id===s&&T(null),y&&await y(s)},ss=s=>{let e={...s,id:Date.now().toString(),isSelected:!0};h(t=>[...t,e]),F?.(s)},es=s=>{T(s),R?.(s)};return r("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[i(N,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>S(!0)},secondaryAction:{label:"Add epic",onClick:()=>b(!0)}}),i("div",{className:"flex-1",children:r("div",{className:"w-full",children:[i("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}].map(s=>{let e=L(s.status),t=Q(e);return i(O,{title:s.title,status:s.status,taskCount:e.length,onDrop:X,isCompact:s.status==="done",children:C.map(a=>{let E=d.find(p=>p.id===a),A=t[a]||[];return A.length===0?null:r("div",{className:"mb-6",children:[r("div",{className:"flex items-center gap-2 mb-3",children:[i("div",{className:`w-3 h-3 rounded-full ${E?.color}`}),i("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:E?.name||"No Epic"}),i(w,{variant:"secondary",className:"text-xs",children:A.length})]})," ",i("div",{className:"space-y-3",children:A.map(p=>i(B,{task:p,epic:E,onDragStart:W,onTaskClick:es,isCompact:s.status==="done"},p.id))})]},a)})},s.id)})}),r(ts,{children:[i(x,{isOpen:$,onClose:()=>S(!1),onAddTask:Y,assignees:[...G,...z],epics:d,sprints:f}),i(I,{isOpen:q,onClose:()=>b(!1),onAddEpic:ss}),c&&i(M,{isOpen:!!c,onClose:()=>T(null),task:c,epics:d,sprints:f,onUpdateTask:Z,onDeleteTask:_})]})]})})]})};export{fs as a};
@@ -1,4 +1,4 @@
1
- import{a as c}from"./chunk-SV7NMNDI.mjs";import{a as d}from"./chunk-B2TBKNIJ.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-M7NV6EFH.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:`
2
2
  (min-width:768px) 50vw,
3
3
  (min-width:1024px) 33vw,
4
4
  100vw
@@ -1 +1 @@
1
- import{f as u}from"./chunk-FRXZ2OKW.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-N3B3XNV3.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 +1 @@
1
- import{f as r}from"./chunk-FRXZ2OKW.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{jsx as t,jsxs as c}from"react/jsx-runtime";function f({subtitle:s,title:o,description:e,alignment:a="start",hasBottomSpacing:i=!1,className:m,invert:l=!1}){let p=n(a==="start"&&"text-left",a==="center"&&"text-center",a==="end"&&"text-right",{"mb-10 md:mb-[3.75rem]":i},"prose",m);return c("div",{className:p,children:[s&&t("span",{className:"mb-[.625rem] block font-semibold uppercase text-accent md:text-md",children:s}),t("h2",{className:n("text-primary mt-0"),children:o}),typeof e=="string"?e&&t("p",{className:"mt-5 whitespace-pre-line text-foreground",children:e}):e&&t(r,{content:e,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}export{f as a};
1
+ import{f as r}from"./chunk-N3B3XNV3.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{jsx as t,jsxs as c}from"react/jsx-runtime";function f({subtitle:s,title:o,description:e,alignment:a="start",hasBottomSpacing:i=!1,className:m,invert:l=!1}){let p=n(a==="start"&&"text-left",a==="center"&&"text-center",a==="end"&&"text-right",{"mb-10 md:mb-[3.75rem]":i},"prose",m);return c("div",{className:p,children:[s&&t("span",{className:"mb-[.625rem] block font-semibold uppercase text-accent md:text-md",children:s}),t("h2",{className:n("text-primary mt-0"),children:o}),typeof e=="string"?e&&t("p",{className:"mt-5 whitespace-pre-line text-foreground",children:e}):e&&t(r,{content:e,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}export{f as a};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-MZP7RIQZ.mjs";import{a as i}from"./chunk-VBSFVJM5.mjs";import{a as l}from"./chunk-75XBZHOC.mjs";import{a as m}from"./chunk-N52FSTLG.mjs";import{ChevronRightIcon as c,HomeIcon as f}from"@heroicons/react/20/solid";import{Fragment as h,jsx as e,jsxs as a}from"react/jsx-runtime";var d={highImpact:i,lowImpact:l,mediumImpact:m,sectionHero:n},H=t=>{let{type:o}=t||{};if(!o||o==="none")return null;let r=d[o];return r?e(r,{...t}):null};function N({breadcrumbItems:t}){if(t&&t.length>0){let o=t.filter(r=>r.label.toLowerCase()!=="home");return e("nav",{"aria-label":"Breadcrumb",className:"flex",children:a("ol",{role:"list",className:"flex items-center space-x-4",children:[e("li",{children:e("div",{children:a("a",{href:"/",className:"text-foreground hover:text-accent",children:[e(f,{"aria-hidden":"true",className:"size-5 shrink-0"}),e("span",{className:"sr-only",children:"Home"})]})})}),o.map((r,s)=>e("li",{children:a("div",{className:"flex items-center",children:[e(c,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),r.href?e("a",{href:r.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label}):e("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label})]})},s))]})})}return e(h,{})}export{H as a,N as b};
1
+ import{a as n}from"./chunk-MZP7RIQZ.mjs";import{a as m}from"./chunk-YKG4FNS4.mjs";import{a as i}from"./chunk-255P6K5W.mjs";import{a as l}from"./chunk-HKGW6JI2.mjs";import{ChevronRightIcon as c,HomeIcon as f}from"@heroicons/react/20/solid";import{Fragment as h,jsx as e,jsxs as a}from"react/jsx-runtime";var d={highImpact:i,lowImpact:l,mediumImpact:m,sectionHero:n},H=t=>{let{type:o}=t||{};if(!o||o==="none")return null;let r=d[o];return r?e(r,{...t}):null};function N({breadcrumbItems:t}){if(t&&t.length>0){let o=t.filter(r=>r.label.toLowerCase()!=="home");return e("nav",{"aria-label":"Breadcrumb",className:"flex",children:a("ol",{role:"list",className:"flex items-center space-x-4",children:[e("li",{children:e("div",{children:a("a",{href:"/",className:"text-foreground hover:text-accent",children:[e(f,{"aria-hidden":"true",className:"size-5 shrink-0"}),e("span",{className:"sr-only",children:"Home"})]})})}),o.map((r,s)=>e("li",{children:a("div",{className:"flex items-center",children:[e(c,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),r.href?e("a",{href:r.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label}):e("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label})]})},s))]})})}return e(h,{})}export{H as a,N as b};
@@ -1 +1 @@
1
- import{a as l}from"./chunk-B2TBKNIJ.mjs";import{a as r}from"./chunk-KML6U7IE.mjs";import{a as o}from"./chunk-TXVA6XJT.mjs";import p from"next/image";import{FaEnvelope as c,FaPhoneFlip as d}from"react-icons/fa6";import{jsx as e,jsxs as t}from"react/jsx-runtime";function f(s){let{sectionHeading:i,image:a}=s;return e("div",{className:"relative w-full light py-[60px]",children:t("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[e("div",{className:"relative h-full w-full",children:e(p,{src:a.src,alt:a.alt,fill:!0,objectFit:"contain",sizes:"(min-width: 768px) 30vw, 50vw",placeholder:"blur",blurDataURL:r})}),e("div",{className:"w-full h-full",children:t("div",{className:"bg-white p-10",children:[e("div",{className:"mb-30px",children:e(l,{...i,invert:!0})}),e(o,{})]})})]})})}function y(s){return e("div",{className:"",children:e("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:e("div",{className:"mx-auto max-w-2xl space-y-16 divide-y divide-gray-100 lg:mx-0 lg:max-w-none",children:t("div",{className:"grid grid-cols-1 gap-10 pt-16 lg:grid-cols-3",children:[t("div",{children:[e("h2",{className:"text-pretty text-4xl text-primary",children:"Locations"}),e("p",{className:"mt-4 text-base/7 text-foreground",children:"We have multiple locations across the UK."})]}),e("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:col-span-2 lg:gap-8",children:s.locations&&s.locations.map((i,a)=>t("div",{className:"rounded-2xl p-10 border",children:[e("h3",{className:"text-base/7 text-primary",children:i.title}),t("address",{className:"mt-3 space-y-1 text-sm/6 not-italic text-foreground",children:[i.location.split(",")?.map((m,n)=>e("p",{children:m},n))," ",i.mails&&t("p",{className:"flex items-center space-x-2",children:[e(c,{className:"pr-2 text-primary size-auto"}),e("span",{children:i.mails[0]})]}),i.phoneNumbers&&i.phoneNumbers.length>0&&t("p",{className:"flex items-center space-x-2",children:[e(d,{className:"pr-2 text-primary size-auto"}),i.phoneNumbers[0]]})]})]},a))})]})})})})}export{f as a,y as b};
1
+ import{a as l}from"./chunk-M7NV6EFH.mjs";import{a as r}from"./chunk-KML6U7IE.mjs";import{a as o}from"./chunk-SRUG246N.mjs";import p from"next/image";import{FaEnvelope as c,FaPhoneFlip as d}from"react-icons/fa6";import{jsx as e,jsxs as t}from"react/jsx-runtime";function f(s){let{sectionHeading:i,image:a}=s;return e("div",{className:"relative w-full light py-[60px]",children:t("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[e("div",{className:"relative h-full w-full",children:e(p,{src:a.src,alt:a.alt,fill:!0,objectFit:"contain",sizes:"(min-width: 768px) 30vw, 50vw",placeholder:"blur",blurDataURL:r})}),e("div",{className:"w-full h-full",children:t("div",{className:"bg-white p-10",children:[e("div",{className:"mb-30px",children:e(l,{...i,invert:!0})}),e(o,{})]})})]})})}function y(s){return e("div",{className:"",children:e("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:e("div",{className:"mx-auto max-w-2xl space-y-16 divide-y divide-gray-100 lg:mx-0 lg:max-w-none",children:t("div",{className:"grid grid-cols-1 gap-10 pt-16 lg:grid-cols-3",children:[t("div",{children:[e("h2",{className:"text-pretty text-4xl text-primary",children:"Locations"}),e("p",{className:"mt-4 text-base/7 text-foreground",children:"We have multiple locations across the UK."})]}),e("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:col-span-2 lg:gap-8",children:s.locations&&s.locations.map((i,a)=>t("div",{className:"rounded-2xl p-10 border",children:[e("h3",{className:"text-base/7 text-primary",children:i.title}),t("address",{className:"mt-3 space-y-1 text-sm/6 not-italic text-foreground",children:[i.location.split(",")?.map((m,n)=>e("p",{children:m},n))," ",i.mails&&t("p",{className:"flex items-center space-x-2",children:[e(c,{className:"pr-2 text-primary size-auto"}),e("span",{children:i.mails[0]})]}),i.phoneNumbers&&i.phoneNumbers.length>0&&t("p",{className:"flex items-center space-x-2",children:[e(d,{className:"pr-2 text-primary size-auto"}),i.phoneNumbers[0]]})]})]},a))})]})})})})}export{f as a,y as b};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{i as G,j as _,k as O,l as $,m as J,n as U,o as X}from"./chunk-O5BAW5XQ.mjs";import{a as y}from"./chunk-2QZUKVBA.mjs";import{a as T}from"./chunk-TXVA6XJT.mjs";import{a as R}from"./chunk-VNYUNZ3M.mjs";import{a as S}from"./chunk-UZSBX5GO.mjs";import{a as I}from"./chunk-LXZAOORS.mjs";import{b as P}from"./chunk-ZUA4KNIR.mjs";import{a as b}from"./chunk-FVM5SQT2.mjs";import{a as l}from"./chunk-MDJREBVI.mjs";import{useState as q}from"react";import{jsx as p,jsxs as v}from"react/jsx-runtime";var se=({links:r,richText:t})=>p("div",{className:"container",children:v("div",{className:"bg-card rounded border-border border p-4 flex flex-col gap-8 md:flex-row md:justify-between md:items-center",children:[p("div",{className:"max-w-[48rem] flex items-center",children:t&&p(f,{className:"mb-0",content:t,enableGutter:!1})}),p("div",{className:"flex flex-col gap-8",children:(r||[]).map(({link:e},n)=>p(y,{size:"lg",...e},n))})]})}),F=({links:r,richText:t})=>{let[e,n]=q(!1),i="accent",a=()=>n(!0),o=()=>n(!1),u=m=>{m.target===m.currentTarget&&o()};return v("div",{className:l("relative isolate overflow-hidden",i==="accent"?"bg-accent":"bg-black"),children:[p("div",{className:"px-6 py-24 sm:px-6 sm:py-32 lg:px-8",children:v("div",{className:"mx-auto max-w-2xl text-center prose",children:[t&&p(f,{className:"mb-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),p("div",{className:"mt-10 flex items-center justify-center gap-x-6",children:p("div",{className:"flex flex-col gap-8 text-white",children:(r||[]).map(({link:m},g)=>m?.url==="/contact"?p("div",{onClick:a,className:l("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white no-underline cursor-pointer",i==="accent"?"border-white bg-accent":"border-accent bg-black"),children:m.label},g):p(y,{size:"lg",className:l("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white no-underline cursor-pointer",i==="accent"?"border-white bg-accent":"border-accent bg-black"),...m},g))})})]})}),e&&p("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:u,children:v("div",{className:"bg-white p-6 pt-10 rounded-lg shadow-lg w-full max-w-lg light relative",children:[p("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:o,children:"\u2715"}),p(T,{})," "]})})]})};import K from"next/image";import{jsx as d,jsxs as k}from"react/jsx-runtime";function D(r){return r&&typeof r=="object"&&"type"in r&&"iconName"in r}function w({image:r,icon:t,title:e,subtitle:n,content:i,statistic:a,settings:o,link:u,className:m}){let g={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-br from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-br from-[#4A1030] to-[#2D0A1D] relative overflow-hidden",light:"bg-background"},N={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return k("a",{href:u?.url||"#",className:l("min-w-56 max-w-xl h-full flex flex-col group bg-background",r?"p-0":"p-6 md:p-8",o&&!r&&g[o?.card==="default"?"solid":o?.card],r&&"bg-foreground",o&&o?.card==="outline"?"text-gray-900":"text-white",N[o?.width??"auto"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",o&&`intersect:animate-delay-${o.order||1}00`,m),children:[r&&d("div",{className:"relative aspect-[16/9] w-full",children:d(K,{src:r.url||"/placeholder.svg",alt:r.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),k("div",{className:l(r?"p-6 md:p-8":"p-0","flex flex-col flex-grow"),children:[k("div",{className:"flex flex-col flex-grow",children:[n&&d("div",{className:"text-primary uppercase text-sm font-light mb-4",children:n}),d("div",{className:"flex items-start gap-4 mb-4",children:d(Q,{icon:{type:t?.type||"fa-light",iconName:t?.icon||"no-icon-error"},heading:e??"",variant:o?.card==="default"?"solid":o?.card??"solid",iconSize:o?.iconSize||"large"})}),i&&typeof i=="object"&&d(f,{enableGutter:!1,content:i,enableProse:!1,className:l("prose-sm prose-p:text-lg prose-headings:text-xl","space-y-3",o?.card==="outline"||o?.card==="light"?"prose-headings:text-foreground prose-p:text-foreground prose-a:text-foreground":"prose-headings:text-white prose-p:text-gray-100 prose-a:text-gray-100",r&&"prose-headings:text-background prose-p:text-background")}),i&&typeof i=="string"&&d("div",{className:l("prose-sm prose-p:text-lg prose-headings:text-xl","space-y-3",o?.card==="outline"||o?.card==="light"?"prose text-foreground":"prose text-gray-100",r&&"prose text-background"),children:i})]}),u&&u.url&&d("div",{className:"mt-6",children:d("span",{className:"text-accent font-semibold uppercase text-sm block hover:text-accent/80 transition-colors",children:u?.label||"Find out more"})})]})]})}var Q=({icon:r,heading:t,variant:e,iconSize:n,subtitle:i})=>r&&n==="small"&&r.iconName!="no-icon-error"?k("div",{className:"flex items-start justify-between w-full mb-2",children:[d("div",{className:l(e==="outline"||e==="light"?"text-primary":"text-white",n==="small"?"text-2xl":"text-3xl"),children:t}),D(r)&&d("div",{className:l("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",e==="outline"||e==="light"?"text-primary":"text-white",n==="small"?"-mr-2 ml-1 mt-1":""),children:d(b,{type:r.type,iconName:r.iconName,size:"2x"})})]}):r&&r.iconName!="no-icon-error"?k("div",{className:"flex flex-col gap-4",children:[D(r)&&d("div",{className:l("h-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",e==="outline"||e==="light"?"text-accent":""),children:d(b,{type:r.type,iconName:r.iconName,size:"4x"})}),d("h3",{className:l("font-normal",e==="outline"||e==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):d("div",{className:"flex items-center gap-4 mb-2",children:d("div",{className:l("font-regular",e==="outline"||e==="light"?"text-2xl text-primary":"text-3xl"),children:t})});import{jsx as c,jsxs as B}from"react/jsx-runtime";function z(r){return r&&typeof r=="object"&&"type"in r&&"iconName"in r}function ke({variant:r="outline",className:t,icon:e,iconSize:n="large",width:i="auto",order:a=0,heading:o,subheading:u,content:m,statistic:g,buttonText:N,buttonHref:E}){let H={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-br from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-br from-[#4A1030] to-[#2D0A1D] relative overflow-hidden",light:""},j={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return B("div",{className:l("rounded-3xl p-8 md:p-8 min-w-56 flex flex-col group",H[r],r==="outline"?"text-gray-900":"text-white",t,j[i],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${a+1}00`),children:[c("div",{className:"flex items-center gap-4 mb-2",children:c(V,{icon:e,heading:o,variant:r,iconSize:n})}),g&&c("div",{className:"mb-6",children:c("div",{className:l("text-4xl text-wrap font-bold leading-none overflow-hidden",r==="outline"||r==="light"?"text-primary":"text-white"),children:g})}),u&&c("div",{className:"mb-4 text-xl md:text-2xl font-light",children:u}),m&&typeof m=="object"&&c("div",{className:l("space-y-6"),children:c(f,{enableGutter:!1,content:m,enableProse:!1,className:l(r==="outline"||r==="light"?"prose prose-headings:text-foreground prose-p:text-foreground":"prose prose-headings:text-white prose-p:text-gray-100")})}),m&&typeof m=="string"&&c("div",{className:l("space-y-6",r==="outline"||r==="light"?"text-gray-900":"text-gray-100"),children:m}),N&&c("div",{className:"mt-auto pt-6 flex items-center justify-center",children:c(P,{size:"lg",className:"text-white text-lg rounded-xl w-full mt-auto items-center justify-center",asChild:!0,children:c("a",{href:E,children:N})})}),r==="radial"&&c("div",{className:"absolute bottom-0 right-0 w-2/3 h-2/3 blur-3xl rounded-full",style:{background:"radial-gradient(circle, rgba(164,35,104,0.3) 0%, rgba(74,16,48,0) 70%)"}})]})}var V=({icon:r,heading:t,variant:e,iconSize:n})=>r&&n==="small"?B("div",{className:"flex items-start gap-4 mb-2",children:[z(r)&&c("div",{className:l("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",e==="outline"||e==="light"?"text-primary":"text-white",n==="small"?"mt-2":""),children:c(b,{type:r.type,iconName:r.iconName,size:"2x"})}),c("div",{className:l("font-semibold",e==="outline"||e==="light"?"text-primary":"text-white",n==="small"?"text-2xl":"text-3xl"),children:t})]}):r?B("div",{className:"flex flex-col gap-4",children:[z(r)&&c("div",{className:l("h-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",e==="outline"||e==="light"?"text-accent":""),children:c(b,{type:r.type,iconName:r.iconName,size:"4x"})}),c("h3",{className:l("font-semibold",e==="outline"||e==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):c("div",{className:"flex items-center gap-4 mb-2",children:c("div",{className:l("font-semibold",e==="outline"||e==="light"?"text-2xl text-primary":"text-3xl"),children:t})});import{jsx as x,jsxs as A}from"react/jsx-runtime";var M=({title:r,description:t,features:e,id:n,nested:i=!1})=>A("section",{className:l(i?"w-full":"",""),children:[A("div",{className:"prose prose:max-w-none",children:[r&&x("h2",{className:"mb-6 mt-0 text-primary",id:n||"",children:r}),t&&typeof t=="string"&&x("p",{className:"mb-5 text-foreground",children:t}),t&&typeof t=="object"&&x("div",{className:"mb-5 text-foreground",children:x(f,{content:t,enableGutter:!1})})]}),x("div",{className:`grid gap-6 mt-6 md:grid-cols-${e?e.length>2?2:e.length:1} lg:grid-cols-${e?e.length>3?3:e.length:1}`,children:e&&e.map((a,o)=>{let u=()=>{if(a.icon&&"type"in a.icon&&a.icon.type!=="none")return{type:a.icon.type,icon:a.icon.icon}};return x(w,{title:a.title||"",content:a.content||void 0,statistic:a.statistic||void 0,settings:{...a.settings,width:"auto",order:o},link:a.link?{...a.link,label:"Learn more"}:void 0,icon:u()??{type:"none",icon:null}},o)})})]});import W,{Fragment as Y}from"react";import{jsx as s}from"react/jsx-runtime";function h({nodes:r}){return s(Y,{children:r?.map((t,e)=>{if(t==null)return null;if(t.type==="text"&&t.text){let a=s(W.Fragment,{children:t.text},e);return t.format&1&&(a=s("strong",{children:a},e)),t.format&2&&(a=s("em",{children:a},e)),t.format&4&&(a=s("span",{style:{textDecoration:"line-through"},children:a},e)),t.format&8&&(a=s("span",{style:{textDecoration:"underline"},children:a},e)),t.format&16&&(a=s("code",{children:t.text},e)),t.format&32&&(a=s("sub",{children:a},e)),t.format&64&&(a=s("sup",{children:a},e)),a}if(t.type==="table")return s("table",{children:s("tbody",{children:t.children.map((a,o)=>s("tr",{children:a.children.map((u,m)=>s("td",{children:h({nodes:u.children})},m))},o))})},e);let n=a=>{if(a.children==null)return null;if(a?.type==="list"&&a?.listType==="check")for(let o of a.children)"checked"in o&&(o?.checked||(o.checked=!1));return h({nodes:a.children})},i="children"in t?n(t):"";if(t.type==="block"){let a=t.fields,o=a?.blockType;if(!a||!o)return null;switch(o){case"cta":return s(F,{...a},e);case"mediaBlock":return s(S,{className:"col-start-1 col-span-3",imgClassName:"m-0",...a,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},e);case"imageBlock":return s(R,{className:"col-start-1 col-span-3",imgClassName:"m-0",...a,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},e);case"banner":return s(L,{className:"col-start-2 mb-4",...a},e);case"code":return s(I,{className:"col-start-2",...a},e);case"features":return s(M,{...a,nested:!0},e);case"reusableContentBlock":h({nodes:a.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return s("br",{className:"col-start-2"},e);case"paragraph":return s("p",{className:"col-start-2",children:i},e);case"heading":{let a=t?.tag;return s(a,{className:"col-start-2",id:t?.id||"",children:i},e)}case"list":{let a=t?.tag;return s(a,{className:"list col-start-2",children:i},e)}case"listitem":return t?.checked!=null?s("li",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:i},e):s("li",{value:t?.value,children:i},e);case"quote":return s("blockquote",{className:"col-start-2",children:i},e);case"link":{let a=t.fields;return s(y,{newTab:!!a?.newTab,reference:a.doc,type:a.linkType==="internal"?"reference":"custom",url:a.url,children:i},e)}case"autolink":{let a=t.fields;return s(y,{newTab:!!a?.newTab,reference:a.doc,type:a.linkType==="internal"?"reference":"custom",url:a.url,children:i},e)}default:return null}})})}import{jsx as Z}from"react/jsx-runtime";var f=({className:r,content:t,enableGutter:e=!0,enableProse:n=!0})=>t?Z("div",{className:l({"container ":e,"max-w-none":!e,"mx-auto prose":n},r),children:t&&!Array.isArray(t)&&typeof t=="object"&&"root"in t&&h({nodes:t?.root?.children})}):null;import{jsx as C}from"react/jsx-runtime";var L=({className:r,content:t,style:e})=>C("div",{className:l("mx-auto my-8 w-full",r),children:C("div",{className:l("border py-3 px-6 flex items-center rounded",{"border-border bg-card":e==="info","border-error bg-error/30":e==="error","border-success bg-success/30":e==="success","border-warning bg-warning/30":e==="warning"}),children:C(f,{content:t,enableGutter:!1,enableProse:!1})})});export{L as a,se as b,F as c,M as d,h as e,f,w as g,ke as h};
4
+ import{i as G,j as _,k as O,l as $,m as J,n as U,o as X}from"./chunk-O5BAW5XQ.mjs";import{a as y}from"./chunk-2QZUKVBA.mjs";import{a as T}from"./chunk-SRUG246N.mjs";import{a as R}from"./chunk-XGIYNUGC.mjs";import{a as S}from"./chunk-X3JZSN3W.mjs";import{a as I}from"./chunk-LXZAOORS.mjs";import{b as P}from"./chunk-ZUA4KNIR.mjs";import{a as b}from"./chunk-FVM5SQT2.mjs";import{a as l}from"./chunk-MDJREBVI.mjs";import{useState as q}from"react";import{jsx as p,jsxs as v}from"react/jsx-runtime";var se=({links:r,richText:t})=>p("div",{className:"container",children:v("div",{className:"bg-card rounded border-border border p-4 flex flex-col gap-8 md:flex-row md:justify-between md:items-center",children:[p("div",{className:"max-w-[48rem] flex items-center",children:t&&p(f,{className:"mb-0",content:t,enableGutter:!1})}),p("div",{className:"flex flex-col gap-8",children:(r||[]).map(({link:e},n)=>p(y,{size:"lg",...e},n))})]})}),F=({links:r,richText:t})=>{let[e,n]=q(!1),i="accent",a=()=>n(!0),o=()=>n(!1),u=m=>{m.target===m.currentTarget&&o()};return v("div",{className:l("relative isolate overflow-hidden",i==="accent"?"bg-accent":"bg-black"),children:[p("div",{className:"px-6 py-24 sm:px-6 sm:py-32 lg:px-8",children:v("div",{className:"mx-auto max-w-2xl text-center prose",children:[t&&p(f,{className:"mb-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),p("div",{className:"mt-10 flex items-center justify-center gap-x-6",children:p("div",{className:"flex flex-col gap-8 text-white",children:(r||[]).map(({link:m},g)=>m?.url==="/contact"?p("div",{onClick:a,className:l("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white no-underline cursor-pointer",i==="accent"?"border-white bg-accent":"border-accent bg-black"),children:m.label},g):p(y,{size:"lg",className:l("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white no-underline cursor-pointer",i==="accent"?"border-white bg-accent":"border-accent bg-black"),...m},g))})})]})}),e&&p("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:u,children:v("div",{className:"bg-white p-6 pt-10 rounded-lg shadow-lg w-full max-w-lg light relative",children:[p("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:o,children:"\u2715"}),p(T,{})," "]})})]})};import K from"next/image";import{jsx as d,jsxs as k}from"react/jsx-runtime";function D(r){return r&&typeof r=="object"&&"type"in r&&"iconName"in r}function w({image:r,icon:t,title:e,subtitle:n,content:i,statistic:a,settings:o,link:u,className:m}){let g={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-br from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-br from-[#4A1030] to-[#2D0A1D] relative overflow-hidden",light:"bg-background"},N={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return k("a",{href:u?.url||"#",className:l("min-w-56 max-w-xl h-full flex flex-col group bg-background",r?"p-0":"p-6 md:p-8",o&&!r&&g[o?.card==="default"?"solid":o?.card],r&&"bg-foreground",o&&o?.card==="outline"?"text-gray-900":"text-white",N[o?.width??"auto"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",o&&`intersect:animate-delay-${o.order||1}00`,m),children:[r&&d("div",{className:"relative aspect-[16/9] w-full",children:d(K,{src:r.url||"/placeholder.svg",alt:r.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),k("div",{className:l(r?"p-6 md:p-8":"p-0","flex flex-col flex-grow"),children:[k("div",{className:"flex flex-col flex-grow",children:[n&&d("div",{className:"text-primary uppercase text-sm font-light mb-4",children:n}),d("div",{className:"flex items-start gap-4 mb-4",children:d(Q,{icon:{type:t?.type||"fa-light",iconName:t?.icon||"no-icon-error"},heading:e??"",variant:o?.card==="default"?"solid":o?.card??"solid",iconSize:o?.iconSize||"large"})}),i&&typeof i=="object"&&d(f,{enableGutter:!1,content:i,enableProse:!1,className:l("prose-sm prose-p:text-lg prose-headings:text-xl","space-y-3",o?.card==="outline"||o?.card==="light"?"prose-headings:text-foreground prose-p:text-foreground prose-a:text-foreground":"prose-headings:text-white prose-p:text-gray-100 prose-a:text-gray-100",r&&"prose-headings:text-background prose-p:text-background")}),i&&typeof i=="string"&&d("div",{className:l("prose-sm prose-p:text-lg prose-headings:text-xl","space-y-3",o?.card==="outline"||o?.card==="light"?"prose text-foreground":"prose text-gray-100",r&&"prose text-background"),children:i})]}),u&&u.url&&d("div",{className:"mt-6",children:d("span",{className:"text-accent font-semibold uppercase text-sm block hover:text-accent/80 transition-colors",children:u?.label||"Find out more"})})]})]})}var Q=({icon:r,heading:t,variant:e,iconSize:n,subtitle:i})=>r&&n==="small"&&r.iconName!="no-icon-error"?k("div",{className:"flex items-start justify-between w-full mb-2",children:[d("div",{className:l(e==="outline"||e==="light"?"text-primary":"text-white",n==="small"?"text-2xl":"text-3xl"),children:t}),D(r)&&d("div",{className:l("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",e==="outline"||e==="light"?"text-primary":"text-white",n==="small"?"-mr-2 ml-1 mt-1":""),children:d(b,{type:r.type,iconName:r.iconName,size:"2x"})})]}):r&&r.iconName!="no-icon-error"?k("div",{className:"flex flex-col gap-4",children:[D(r)&&d("div",{className:l("h-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",e==="outline"||e==="light"?"text-accent":""),children:d(b,{type:r.type,iconName:r.iconName,size:"4x"})}),d("h3",{className:l("font-normal",e==="outline"||e==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):d("div",{className:"flex items-center gap-4 mb-2",children:d("div",{className:l("font-regular",e==="outline"||e==="light"?"text-2xl text-primary":"text-3xl"),children:t})});import{jsx as c,jsxs as B}from"react/jsx-runtime";function z(r){return r&&typeof r=="object"&&"type"in r&&"iconName"in r}function ke({variant:r="outline",className:t,icon:e,iconSize:n="large",width:i="auto",order:a=0,heading:o,subheading:u,content:m,statistic:g,buttonText:N,buttonHref:E}){let H={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-br from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-br from-[#4A1030] to-[#2D0A1D] relative overflow-hidden",light:""},j={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return B("div",{className:l("rounded-3xl p-8 md:p-8 min-w-56 flex flex-col group",H[r],r==="outline"?"text-gray-900":"text-white",t,j[i],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${a+1}00`),children:[c("div",{className:"flex items-center gap-4 mb-2",children:c(V,{icon:e,heading:o,variant:r,iconSize:n})}),g&&c("div",{className:"mb-6",children:c("div",{className:l("text-4xl text-wrap font-bold leading-none overflow-hidden",r==="outline"||r==="light"?"text-primary":"text-white"),children:g})}),u&&c("div",{className:"mb-4 text-xl md:text-2xl font-light",children:u}),m&&typeof m=="object"&&c("div",{className:l("space-y-6"),children:c(f,{enableGutter:!1,content:m,enableProse:!1,className:l(r==="outline"||r==="light"?"prose prose-headings:text-foreground prose-p:text-foreground":"prose prose-headings:text-white prose-p:text-gray-100")})}),m&&typeof m=="string"&&c("div",{className:l("space-y-6",r==="outline"||r==="light"?"text-gray-900":"text-gray-100"),children:m}),N&&c("div",{className:"mt-auto pt-6 flex items-center justify-center",children:c(P,{size:"lg",className:"text-white text-lg rounded-xl w-full mt-auto items-center justify-center",asChild:!0,children:c("a",{href:E,children:N})})}),r==="radial"&&c("div",{className:"absolute bottom-0 right-0 w-2/3 h-2/3 blur-3xl rounded-full",style:{background:"radial-gradient(circle, rgba(164,35,104,0.3) 0%, rgba(74,16,48,0) 70%)"}})]})}var V=({icon:r,heading:t,variant:e,iconSize:n})=>r&&n==="small"?B("div",{className:"flex items-start gap-4 mb-2",children:[z(r)&&c("div",{className:l("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",e==="outline"||e==="light"?"text-primary":"text-white",n==="small"?"mt-2":""),children:c(b,{type:r.type,iconName:r.iconName,size:"2x"})}),c("div",{className:l("font-semibold",e==="outline"||e==="light"?"text-primary":"text-white",n==="small"?"text-2xl":"text-3xl"),children:t})]}):r?B("div",{className:"flex flex-col gap-4",children:[z(r)&&c("div",{className:l("h-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",e==="outline"||e==="light"?"text-accent":""),children:c(b,{type:r.type,iconName:r.iconName,size:"4x"})}),c("h3",{className:l("font-semibold",e==="outline"||e==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):c("div",{className:"flex items-center gap-4 mb-2",children:c("div",{className:l("font-semibold",e==="outline"||e==="light"?"text-2xl text-primary":"text-3xl"),children:t})});import{jsx as x,jsxs as A}from"react/jsx-runtime";var M=({title:r,description:t,features:e,id:n,nested:i=!1})=>A("section",{className:l(i?"w-full":"",""),children:[A("div",{className:"prose prose:max-w-none",children:[r&&x("h2",{className:"mb-6 mt-0 text-primary",id:n||"",children:r}),t&&typeof t=="string"&&x("p",{className:"mb-5 text-foreground",children:t}),t&&typeof t=="object"&&x("div",{className:"mb-5 text-foreground",children:x(f,{content:t,enableGutter:!1})})]}),x("div",{className:`grid gap-6 mt-6 md:grid-cols-${e?e.length>2?2:e.length:1} lg:grid-cols-${e?e.length>3?3:e.length:1}`,children:e&&e.map((a,o)=>{let u=()=>{if(a.icon&&"type"in a.icon&&a.icon.type!=="none")return{type:a.icon.type,icon:a.icon.icon}};return x(w,{title:a.title||"",content:a.content||void 0,statistic:a.statistic||void 0,settings:{...a.settings,width:"auto",order:o},link:a.link?{...a.link,label:"Learn more"}:void 0,icon:u()??{type:"none",icon:null}},o)})})]});import W,{Fragment as Y}from"react";import{jsx as s}from"react/jsx-runtime";function h({nodes:r}){return s(Y,{children:r?.map((t,e)=>{if(t==null)return null;if(t.type==="text"&&t.text){let a=s(W.Fragment,{children:t.text},e);return t.format&1&&(a=s("strong",{children:a},e)),t.format&2&&(a=s("em",{children:a},e)),t.format&4&&(a=s("span",{style:{textDecoration:"line-through"},children:a},e)),t.format&8&&(a=s("span",{style:{textDecoration:"underline"},children:a},e)),t.format&16&&(a=s("code",{children:t.text},e)),t.format&32&&(a=s("sub",{children:a},e)),t.format&64&&(a=s("sup",{children:a},e)),a}if(t.type==="table")return s("table",{children:s("tbody",{children:t.children.map((a,o)=>s("tr",{children:a.children.map((u,m)=>s("td",{children:h({nodes:u.children})},m))},o))})},e);let n=a=>{if(a.children==null)return null;if(a?.type==="list"&&a?.listType==="check")for(let o of a.children)"checked"in o&&(o?.checked||(o.checked=!1));return h({nodes:a.children})},i="children"in t?n(t):"";if(t.type==="block"){let a=t.fields,o=a?.blockType;if(!a||!o)return null;switch(o){case"cta":return s(F,{...a},e);case"mediaBlock":return s(S,{className:"col-start-1 col-span-3",imgClassName:"m-0",...a,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},e);case"imageBlock":return s(R,{className:"col-start-1 col-span-3",imgClassName:"m-0",...a,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},e);case"banner":return s(L,{className:"col-start-2 mb-4",...a},e);case"code":return s(I,{className:"col-start-2",...a},e);case"features":return s(M,{...a,nested:!0},e);case"reusableContentBlock":h({nodes:a.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return s("br",{className:"col-start-2"},e);case"paragraph":return s("p",{className:"col-start-2",children:i},e);case"heading":{let a=t?.tag;return s(a,{className:"col-start-2",id:t?.id||"",children:i},e)}case"list":{let a=t?.tag;return s(a,{className:"list col-start-2",children:i},e)}case"listitem":return t?.checked!=null?s("li",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:i},e):s("li",{value:t?.value,children:i},e);case"quote":return s("blockquote",{className:"col-start-2",children:i},e);case"link":{let a=t.fields;return s(y,{newTab:!!a?.newTab,reference:a.doc,type:a.linkType==="internal"?"reference":"custom",url:a.url,children:i},e)}case"autolink":{let a=t.fields;return s(y,{newTab:!!a?.newTab,reference:a.doc,type:a.linkType==="internal"?"reference":"custom",url:a.url,children:i},e)}default:return null}})})}import{jsx as Z}from"react/jsx-runtime";var f=({className:r,content:t,enableGutter:e=!0,enableProse:n=!0})=>t?Z("div",{className:l({"container ":e,"max-w-none":!e,"mx-auto prose":n},r),children:t&&!Array.isArray(t)&&typeof t=="object"&&"root"in t&&h({nodes:t?.root?.children})}):null;import{jsx as C}from"react/jsx-runtime";var L=({className:r,content:t,style:e})=>C("div",{className:l("mx-auto my-8 w-full",r),children:C("div",{className:l("border py-3 px-6 flex items-center rounded",{"border-border bg-card":e==="info","border-error bg-error/30":e==="error","border-success bg-success/30":e==="success","border-warning bg-warning/30":e==="warning"}),children:C(f,{content:t,enableGutter:!1,enableProse:!1})})});export{L as a,se as b,F as c,M as d,h as e,f,w as g,ke as h};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as p}from"./chunk-VGWDYD6Z.mjs";import{a as d}from"./chunk-Z22NSJMF.mjs";import{a as c}from"./chunk-CTAIR3TE.mjs";import{a as m,f as n,g as r,i as s,j as l}from"./chunk-3UMMMQEH.mjs";import{useState as w}from"react";import{motion as C,AnimatePresence as D}from"motion/react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function h({teams:i=[],onCreateTeam:g,onTeamOpen:T}){let[y,o]=w(!1),u=()=>{o(!0)},f=a=>{g?.(a),o(!1)},v=()=>{o(!1)},x=a=>{T?.(a)};return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(D,{mode:"wait",children:t(C.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e(d,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600",primaryAction:{label:"Create Team",onClick:u}}),t("section",{className:"space-y-4 mt-8",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),i.length===0?t("div",{className:"text-center py-12",children:[e("p",{className:"text-muted-foreground text-lg",children:"You're not part of any teams yet."}),e("p",{className:"text-muted-foreground text-sm mt-2",children:"Create a new team or ask to be added to an existing one."})]}):e("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:i.map(a=>e(p,{team:a,onOpen:x},a.id))})]})]},"teams-index-view")}),e(m,{open:y,onOpenChange:o,children:t(n,{className:"max-w-4xl max-h-[90vh] overflow-y-auto p-0",children:[e("div",{className:"sr-only",children:t(r,{children:[e(s,{children:"Create New Team"}),e(l,{children:"Set up a new team to collaborate with colleagues on projects."})]})}),e(c,{title:"Create New Team",submitLabel:"Create Team",onSave:f,onCancel:v})]})})]})}export{h as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{f as t}from"./chunk-FRXZ2OKW.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-N3B3XNV3.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 +1 @@
1
- import{a as q}from"./chunk-Z22NSJMF.mjs";import{a as S,c as w,d as R,g as I,i as o}from"./chunk-YFAZQYK4.mjs";import{a as M}from"./chunk-B4H6T2GP.mjs";import{a as c}from"./chunk-TVZOULLL.mjs";import{a as F,f as L,g as P,i as A}from"./chunk-3UMMMQEH.mjs";import{a as f}from"./chunk-L5JPAKPM.mjs";import{b as N}from"./chunk-ZUA4KNIR.mjs";import{b as U}from"./chunk-CSBGSBEU.mjs";import{a as T,e as H}from"./chunk-YO3GQYRJ.mjs";import{useEffect as W,useState as D}from"react";import{Plus as Y,Clock as K,Calendar as G,User as J,Repeat as Q,Edit2 as X,Trash2 as Z,CheckCircle as _,Circle as ee,Bell as te}from"lucide-react";import{Fragment as ce,jsx as e,jsxs as t}from"react/jsx-runtime";var ae=i=>{switch(i){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},ie=i=>i.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),re=i=>{let[u,v]=i.split(":"),g=new Date;return g.setHours(parseInt(u),parseInt(v)),g.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},B=(i,u)=>{let v=new Date,g=new Date(i);if(u){let[l,a]=u.split(":");g.setHours(parseInt(l),parseInt(a))}return g<v},O=i=>{let u=new Date;return i.toDateString()===u.toDateString()},le=i=>{let u=new Date;return u.setDate(u.getDate()+1),i.toDateString()===u.toDateString()},ne=({colleagues:i,onAddReminder:u,open:v,setOpen:g})=>{let[l,a]=D({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[s,p]=D(!1),h=d=>{d.preventDefault();let y=i.find(k=>k?.id.toString()===l.colleagueId.toString());if(!y){console.error("No valid colleague selected"),p(!0);return}p(!1);let E={title:l.title,description:l.description,dueDate:new Date(l.dueDate),dueTime:l.dueTime||void 0,colleague:y,isCompleted:!1,isRecurring:l.isRecurring,recurrencePattern:l.isRecurring?l.recurrencePattern:void 0,recurrenceInterval:l.isRecurring?l.recurrenceInterval:void 0,priority:l.priority,reminderEnabled:l.reminderEnabled,reminderMinutes:l.reminderEnabled?l.reminderMinutes:void 0,tags:l.tags?l.tags.split(",").map(k=>k.trim()):void 0};u(E),g(!1),a({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};W(()=>{l.colleagueId&&p(!1)},[l.colleagueId]);let n=i.filter(Boolean);return e(F,{open:v,onOpenChange:g,children:t(L,{className:"max-w-2xl",children:[e(P,{children:e(A,{children:"Add New Reminder"})}),t("form",{onSubmit:h,className:"space-y-4",children:[e("div",{className:"grid grid-cols-2 gap-4",children:t("div",{children:[e(c,{htmlFor:"title",children:"Title"}),e(f,{id:"title",value:l.title,onChange:d=>a({...l,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),t("div",{children:[e(c,{htmlFor:"description",children:"Description"}),e(M,{id:"description",value:l.description,onChange:d=>a({...l,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"dueDate",children:"Due Date"}),e(f,{id:"dueDate",type:"date",value:l.dueDate,onChange:d=>a({...l,dueDate:d.target.value}),required:!0})]}),t("div",{children:[e(c,{htmlFor:"dueTime",children:"Due Time (optional)"}),e(f,{id:"dueTime",type:"time",value:l.dueTime,onChange:d=>a({...l,dueTime:d.target.value})})]})]}),t("div",{children:[e(c,{className:`${s?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),t(S,{value:l.colleagueId,onValueChange:d=>{a({...l,colleagueId:d})},required:!0,children:[e(R,{className:`${s?"text-destructive border-red-500":""}`,children:e(w,{className:`${s?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:i.find(d=>d?.id.toString()===l.colleagueId.toString())?.name||"Select a digital colleague"})}),e(I,{children:n.map(d=>e(o,{value:d.id,children:d.name},d.id))})]}),s&&e("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"isRecurring",checked:l.isRecurring,onChange:d=>a({...l,isRecurring:d.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),l.isRecurring&&t("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[t("div",{children:[e(c,{htmlFor:"recurrencePattern",children:"Frequency"}),t(S,{value:l.recurrencePattern,onValueChange:d=>a({...l,recurrencePattern:d}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"daily",children:"Daily"}),e(o,{value:"weekly",children:"Weekly"}),e(o,{value:"monthly",children:"Monthly"}),e(o,{value:"yearly",children:"Yearly"})]})]})]}),t("div",{children:[e(c,{htmlFor:"recurrenceInterval",children:"Every"}),e(f,{id:"recurrenceInterval",type:"number",min:"1",value:l.recurrenceInterval,onChange:d=>a({...l,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),t("div",{className:"flex justify-end space-x-2",children:[e(N,{type:"button",variant:"outline",onClick:()=>g(!1),children:"Cancel"}),e(N,{type:"submit",children:"Add Reminder"})]})]})]})})},de=({reminder:i,colleagues:u,onUpdateReminder:v,open:g,onClose:l})=>{let[a,s]=D({title:i.title,description:i.description,dueDate:i.dueDate.toISOString().split("T")[0],dueTime:i.dueTime||"",colleagueId:i.colleague?.id||"",priority:i.priority,isRecurring:i.isRecurring,recurrencePattern:i.recurrencePattern||"weekly",recurrenceInterval:i.recurrenceInterval||1,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderMinutes||15,tags:i.tags?.join(", ")||""}),p=n=>{n.preventDefault();let d=u.find(y=>y?.id===a.colleagueId);if(!d){console.error("No valid colleague selected");return}v(i.id,{title:a.title,description:a.description,dueDate:new Date(a.dueDate),dueTime:a.dueTime||void 0,colleague:d,priority:a.priority,isRecurring:a.isRecurring,recurrencePattern:a.isRecurring?a.recurrencePattern:void 0,recurrenceInterval:a.isRecurring?a.recurrenceInterval:void 0,reminderEnabled:a.reminderEnabled,reminderMinutes:a.reminderEnabled?a.reminderMinutes:void 0,tags:a.tags?a.tags.split(",").map(y=>y.trim()):void 0}),l()},h=u.filter(Boolean);return e(F,{open:g,onOpenChange:l,children:t(L,{className:"max-w-2xl",children:[e(P,{children:e(A,{children:"Edit Reminder"})}),t("form",{onSubmit:p,className:"space-y-4",children:[t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"edit-title",children:"Title"}),e(f,{id:"edit-title",value:a.title,onChange:n=>s({...a,title:n.target.value}),placeholder:"Enter reminder title",required:!0})]}),t("div",{children:[e(c,{htmlFor:"edit-priority",children:"Priority"}),t(S,{value:a.priority,onValueChange:n=>s({...a,priority:n}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"low",children:"\u{1F7E2} Low"}),e(o,{value:"medium",children:"\u{1F7E1} Medium"}),e(o,{value:"high",children:"\u{1F534} High"})]})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-description",children:"Description"}),e(M,{id:"edit-description",value:a.description,onChange:n=>s({...a,description:n.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"edit-dueDate",children:"Due Date"}),e(f,{id:"edit-dueDate",type:"date",value:a.dueDate,onChange:n=>s({...a,dueDate:n.target.value}),required:!0})]}),t("div",{children:[e(c,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),e(f,{id:"edit-dueTime",type:"time",value:a.dueTime,onChange:n=>s({...a,dueTime:n.target.value})})]})]}),t("div",{children:[e(c,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),t(S,{value:a.colleagueId,onValueChange:n=>s({...a,colleagueId:n}),required:!0,children:[e(R,{children:e(w,{placeholder:"Select a digital colleague"})}),e(I,{children:h.map(n=>e(o,{value:n.id,children:n.name},n.id))})]})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-isRecurring",checked:a.isRecurring,onChange:n=>s({...a,isRecurring:n.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),a.isRecurring&&t("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[t("div",{children:[e(c,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),t(S,{value:a.recurrencePattern,onValueChange:n=>s({...a,recurrencePattern:n}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"daily",children:"Daily"}),e(o,{value:"weekly",children:"Weekly"}),e(o,{value:"monthly",children:"Monthly"}),e(o,{value:"yearly",children:"Yearly"})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-recurrenceInterval",children:"Every"}),e(f,{id:"edit-recurrenceInterval",type:"number",min:"1",value:a.recurrenceInterval,onChange:n=>s({...a,recurrenceInterval:parseInt(n.target.value)})})]})]})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-reminderEnabled",checked:a.reminderEnabled,onChange:n=>s({...a,reminderEnabled:n.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),a.reminderEnabled&&t("div",{className:"pl-6",children:[e(c,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),t(S,{value:a.reminderMinutes.toString(),onValueChange:n=>s({...a,reminderMinutes:parseInt(n)}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"5",children:"5 minutes before"}),e(o,{value:"15",children:"15 minutes before"}),e(o,{value:"30",children:"30 minutes before"}),e(o,{value:"60",children:"1 hour before"}),e(o,{value:"1440",children:"1 day before"})]})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),e(f,{id:"edit-tags",value:a.tags,onChange:n=>s({...a,tags:n.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),t("div",{className:"flex justify-end space-x-2",children:[e(N,{type:"button",variant:"outline",onClick:l,children:"Cancel"}),e(N,{type:"submit",children:"Save Changes"})]})]})]})})},se=({reminder:i,colleagues:u,onUpdateReminder:v,onDeleteReminder:g})=>{let[l,a]=D(!1);if(!i||!i.id)return null;let s=B(i.dueDate,i.dueTime),p=O(i.dueDate),h=le(i.dueDate),n=()=>{v(i.id,{isCompleted:!i.isCompleted,completedAt:i.isCompleted?void 0:new Date})},d=()=>p?"Today":h?"Tomorrow":s&&!i.isCompleted?"Overdue":ie(i.dueDate);return t(ce,{children:[e(de,{reminder:i,colleagues:u,onUpdateReminder:v,open:l,onClose:()=>a(!1)}),e(T,{className:`transition-all duration-200 ${i.isCompleted?"opacity-60":""} ${s&&!i.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:e(H,{className:"p-4",children:t("div",{className:"flex items-start justify-between",children:[t("div",{className:"flex items-start space-x-3 flex-1",children:[e("button",{onClick:n,className:"mt-1 text-primary hover:text-primary/80",children:i.isCompleted?e(_,{className:"h-5 w-5"}):e(ee,{className:"h-5 w-5"})}),t("div",{className:"flex-1",children:[t("div",{className:"flex items-center space-x-2 mb-1",children:[e("h3",{className:`font-semibold ${i.isCompleted?"line-through text-muted-foreground":""}`,children:i.title}),e("span",{className:"text-sm",children:ae(i.priority)}),i.isRecurring&&e(Q,{className:"h-4 w-4 text-primary"}),i.reminderEnabled&&e(te,{className:"h-4 w-4 text-success"})]}),e("p",{className:"text-sm text-muted-foreground mb-2",children:i.description}),t("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[t("div",{className:"flex items-center space-x-1",children:[e(G,{className:"h-4 w-4"}),e("span",{className:s&&!i.isCompleted?"text-destructive font-medium":"",children:d()})]}),i.dueTime&&t("div",{className:"flex items-center space-x-1",children:[e(K,{className:"h-4 w-4"}),e("span",{children:re(i.dueTime)})]}),t("div",{className:"flex items-center space-x-1",children:[e(J,{className:"h-4 w-4"}),e("span",{children:i.colleague?.name||"Unknown Colleague"})]})]}),i.tags&&i.tags.length>0&&e("div",{className:"flex flex-wrap gap-1 mt-2",children:i.tags.map((y,E)=>e(U,{variant:"secondary",className:"text-xs",children:y},E))})]})]}),t("div",{className:"flex items-center space-x-1",children:[e(N,{variant:"ghost",size:"sm",onClick:()=>a(!0),className:"h-8 w-8 p-0",children:e(X,{className:"h-4 w-4"})}),e(N,{variant:"ghost",size:"sm",onClick:()=>g(i.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:e(Z,{className:"h-4 w-4"})})]})]})})})]})},oe=({initialReminders:i=[],initialColleagues:u=[],onAddReminder:v,onUpdateReminder:g,onDeleteReminder:l})=>{let[a,s]=D(i.filter(Boolean)),[p]=D(u.filter(Boolean)),[h,n]=D("all"),[d,y]=D(""),[E,k]=D(!1),j=r=>{if(!r.title||!r.colleague?.id){console.error("Invalid reminder data:",r);return}let m={...r,id:Date.now().toString(),createdAt:new Date};s(x=>[...x,m]),v?.(r)},$=(r,m)=>{if(!r){console.error("No reminder ID provided for update");return}s(x=>x.map(b=>b?.id===r?{...b,...m}:b)),g?.(r,m)},z=r=>{if(!r){console.error("No reminder ID provided for deletion");return}s(m=>m.filter(x=>x?.id!==r)),l?.(r)},V=a.filter(r=>{if(!r)return!1;if(d){let m=d.toLowerCase();if(!(r.title.toLowerCase().includes(m)||r.description.toLowerCase().includes(m)||r.colleague?.name?.toLowerCase().includes(m)||r.tags?.some(b=>b.toLowerCase().includes(m))))return!1}switch(h){case"pending":return!r.isCompleted;case"completed":return r.isCompleted;case"overdue":return!r.isCompleted&&B(r.dueDate,r.dueTime);case"today":return O(new Date(r.dueDate));default:return!0}}).sort((r,m)=>{if(!r||!m)return 0;if(r.isCompleted&&!m.isCompleted)return 1;if(!r.isCompleted&&m.isCompleted)return-1;let x={high:3,medium:2,low:1},b=x[m.priority]-x[r.priority];return b!==0?b:r.dueDate.getTime()-m.dueDate.getTime()}),C={total:a.filter(Boolean).length,pending:a.filter(r=>r&&!r.isCompleted).length,completed:a.filter(r=>r&&r.isCompleted).length,overdue:a.filter(r=>r&&!r.isCompleted&&B(r.dueDate,r.dueTime)).length,today:a.filter(r=>r&&O(new Date(r.dueDate))).length},me=p.find(Boolean)||{id:"1",name:"Default Colleague",status:"active",joinedDate:new Date,lastActive:new Date,type:"digital",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[],version:"1.0.0",lastUpdated:new Date,isActive:!0};return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(q,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{k(!0)}}}),t("div",{className:"h-full bg-background",children:[e(ne,{colleagues:p,onAddReminder:j,open:E,setOpen:k}),t("div",{className:"p-6",children:[t("div",{className:"flex items-center justify-between mb-6",children:[t("div",{children:[e("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),e("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),t(N,{className:"flex items-center space-x-2",onClick:()=>k(!0),children:[e(Y,{className:"h-4 w-4"}),e("span",{children:"Add Reminder"})]})]}),t("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-foreground",children:C.total}),e("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-primary",children:C.pending}),e("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-success",children:C.completed}),e("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-destructive",children:C.overdue}),e("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-warning",children:C.today}),e("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),t("div",{className:"flex items-center space-x-4 mb-6",children:[e("div",{className:"flex-1",children:e(f,{placeholder:"Search reminders...",value:d,onChange:r=>y(r.target.value),className:"max-w-md"})}),t(S,{value:h,onValueChange:r=>n(r),children:[e(R,{className:"w-40",children:e(w,{})}),t(I,{children:[t(o,{value:"all",children:["All (",C.total,")"]}),t(o,{value:"pending",children:["Pending (",C.pending,")"]}),t(o,{value:"completed",children:["Completed (",C.completed,")"]}),t(o,{value:"overdue",children:["Overdue (",C.overdue,")"]}),t(o,{value:"today",children:["Today (",C.today,")"]})]})]})]}),e("div",{className:"space-y-4",children:V.length===0?t(T,{className:"p-8 text-center",children:[e("div",{className:"text-muted-foreground",children:d||h!=="all"?"No reminders match your filters":"No reminders yet"}),!d&&h==="all"&&e("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):V.map(r=>r&&e(se,{reminder:r,colleagues:p,onUpdateReminder:$,onDeleteReminder:z},r.id))})]})]})]})},ke=oe;export{oe as a,ke as b};
1
+ import{a as q}from"./chunk-Z22NSJMF.mjs";import{a as S,c as w,d as R,g as I,i as o}from"./chunk-YFAZQYK4.mjs";import{a as M}from"./chunk-B4H6T2GP.mjs";import{a as c}from"./chunk-TVZOULLL.mjs";import{a as f}from"./chunk-L5JPAKPM.mjs";import{a as F,f as L,g as P,i as A}from"./chunk-3UMMMQEH.mjs";import{b as N}from"./chunk-ZUA4KNIR.mjs";import{b as U}from"./chunk-CSBGSBEU.mjs";import{a as T,e as H}from"./chunk-YO3GQYRJ.mjs";import{useEffect as W,useState as D}from"react";import{Plus as Y,Clock as K,Calendar as G,User as J,Repeat as Q,Edit2 as X,Trash2 as Z,CheckCircle as _,Circle as ee,Bell as te}from"lucide-react";import{Fragment as ce,jsx as e,jsxs as t}from"react/jsx-runtime";var ae=i=>{switch(i){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},ie=i=>i.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),re=i=>{let[u,v]=i.split(":"),g=new Date;return g.setHours(parseInt(u),parseInt(v)),g.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},B=(i,u)=>{let v=new Date,g=new Date(i);if(u){let[l,a]=u.split(":");g.setHours(parseInt(l),parseInt(a))}return g<v},O=i=>{let u=new Date;return i.toDateString()===u.toDateString()},le=i=>{let u=new Date;return u.setDate(u.getDate()+1),i.toDateString()===u.toDateString()},ne=({colleagues:i,onAddReminder:u,open:v,setOpen:g})=>{let[l,a]=D({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[s,p]=D(!1),h=d=>{d.preventDefault();let y=i.find(k=>k?.id.toString()===l.colleagueId.toString());if(!y){console.error("No valid colleague selected"),p(!0);return}p(!1);let E={title:l.title,description:l.description,dueDate:new Date(l.dueDate),dueTime:l.dueTime||void 0,colleague:y,isCompleted:!1,isRecurring:l.isRecurring,recurrencePattern:l.isRecurring?l.recurrencePattern:void 0,recurrenceInterval:l.isRecurring?l.recurrenceInterval:void 0,priority:l.priority,reminderEnabled:l.reminderEnabled,reminderMinutes:l.reminderEnabled?l.reminderMinutes:void 0,tags:l.tags?l.tags.split(",").map(k=>k.trim()):void 0};u(E),g(!1),a({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};W(()=>{l.colleagueId&&p(!1)},[l.colleagueId]);let n=i.filter(Boolean);return e(F,{open:v,onOpenChange:g,children:t(L,{className:"max-w-2xl",children:[e(P,{children:e(A,{children:"Add New Reminder"})}),t("form",{onSubmit:h,className:"space-y-4",children:[e("div",{className:"grid grid-cols-2 gap-4",children:t("div",{children:[e(c,{htmlFor:"title",children:"Title"}),e(f,{id:"title",value:l.title,onChange:d=>a({...l,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),t("div",{children:[e(c,{htmlFor:"description",children:"Description"}),e(M,{id:"description",value:l.description,onChange:d=>a({...l,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"dueDate",children:"Due Date"}),e(f,{id:"dueDate",type:"date",value:l.dueDate,onChange:d=>a({...l,dueDate:d.target.value}),required:!0})]}),t("div",{children:[e(c,{htmlFor:"dueTime",children:"Due Time (optional)"}),e(f,{id:"dueTime",type:"time",value:l.dueTime,onChange:d=>a({...l,dueTime:d.target.value})})]})]}),t("div",{children:[e(c,{className:`${s?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),t(S,{value:l.colleagueId,onValueChange:d=>{a({...l,colleagueId:d})},required:!0,children:[e(R,{className:`${s?"text-destructive border-red-500":""}`,children:e(w,{className:`${s?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:i.find(d=>d?.id.toString()===l.colleagueId.toString())?.name||"Select a digital colleague"})}),e(I,{children:n.map(d=>e(o,{value:d.id,children:d.name},d.id))})]}),s&&e("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"isRecurring",checked:l.isRecurring,onChange:d=>a({...l,isRecurring:d.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),l.isRecurring&&t("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[t("div",{children:[e(c,{htmlFor:"recurrencePattern",children:"Frequency"}),t(S,{value:l.recurrencePattern,onValueChange:d=>a({...l,recurrencePattern:d}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"daily",children:"Daily"}),e(o,{value:"weekly",children:"Weekly"}),e(o,{value:"monthly",children:"Monthly"}),e(o,{value:"yearly",children:"Yearly"})]})]})]}),t("div",{children:[e(c,{htmlFor:"recurrenceInterval",children:"Every"}),e(f,{id:"recurrenceInterval",type:"number",min:"1",value:l.recurrenceInterval,onChange:d=>a({...l,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),t("div",{className:"flex justify-end space-x-2",children:[e(N,{type:"button",variant:"outline",onClick:()=>g(!1),children:"Cancel"}),e(N,{type:"submit",children:"Add Reminder"})]})]})]})})},de=({reminder:i,colleagues:u,onUpdateReminder:v,open:g,onClose:l})=>{let[a,s]=D({title:i.title,description:i.description,dueDate:i.dueDate.toISOString().split("T")[0],dueTime:i.dueTime||"",colleagueId:i.colleague?.id||"",priority:i.priority,isRecurring:i.isRecurring,recurrencePattern:i.recurrencePattern||"weekly",recurrenceInterval:i.recurrenceInterval||1,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderMinutes||15,tags:i.tags?.join(", ")||""}),p=n=>{n.preventDefault();let d=u.find(y=>y?.id===a.colleagueId);if(!d){console.error("No valid colleague selected");return}v(i.id,{title:a.title,description:a.description,dueDate:new Date(a.dueDate),dueTime:a.dueTime||void 0,colleague:d,priority:a.priority,isRecurring:a.isRecurring,recurrencePattern:a.isRecurring?a.recurrencePattern:void 0,recurrenceInterval:a.isRecurring?a.recurrenceInterval:void 0,reminderEnabled:a.reminderEnabled,reminderMinutes:a.reminderEnabled?a.reminderMinutes:void 0,tags:a.tags?a.tags.split(",").map(y=>y.trim()):void 0}),l()},h=u.filter(Boolean);return e(F,{open:g,onOpenChange:l,children:t(L,{className:"max-w-2xl",children:[e(P,{children:e(A,{children:"Edit Reminder"})}),t("form",{onSubmit:p,className:"space-y-4",children:[t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"edit-title",children:"Title"}),e(f,{id:"edit-title",value:a.title,onChange:n=>s({...a,title:n.target.value}),placeholder:"Enter reminder title",required:!0})]}),t("div",{children:[e(c,{htmlFor:"edit-priority",children:"Priority"}),t(S,{value:a.priority,onValueChange:n=>s({...a,priority:n}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"low",children:"\u{1F7E2} Low"}),e(o,{value:"medium",children:"\u{1F7E1} Medium"}),e(o,{value:"high",children:"\u{1F534} High"})]})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-description",children:"Description"}),e(M,{id:"edit-description",value:a.description,onChange:n=>s({...a,description:n.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"edit-dueDate",children:"Due Date"}),e(f,{id:"edit-dueDate",type:"date",value:a.dueDate,onChange:n=>s({...a,dueDate:n.target.value}),required:!0})]}),t("div",{children:[e(c,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),e(f,{id:"edit-dueTime",type:"time",value:a.dueTime,onChange:n=>s({...a,dueTime:n.target.value})})]})]}),t("div",{children:[e(c,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),t(S,{value:a.colleagueId,onValueChange:n=>s({...a,colleagueId:n}),required:!0,children:[e(R,{children:e(w,{placeholder:"Select a digital colleague"})}),e(I,{children:h.map(n=>e(o,{value:n.id,children:n.name},n.id))})]})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-isRecurring",checked:a.isRecurring,onChange:n=>s({...a,isRecurring:n.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),a.isRecurring&&t("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[t("div",{children:[e(c,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),t(S,{value:a.recurrencePattern,onValueChange:n=>s({...a,recurrencePattern:n}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"daily",children:"Daily"}),e(o,{value:"weekly",children:"Weekly"}),e(o,{value:"monthly",children:"Monthly"}),e(o,{value:"yearly",children:"Yearly"})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-recurrenceInterval",children:"Every"}),e(f,{id:"edit-recurrenceInterval",type:"number",min:"1",value:a.recurrenceInterval,onChange:n=>s({...a,recurrenceInterval:parseInt(n.target.value)})})]})]})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-reminderEnabled",checked:a.reminderEnabled,onChange:n=>s({...a,reminderEnabled:n.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),a.reminderEnabled&&t("div",{className:"pl-6",children:[e(c,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),t(S,{value:a.reminderMinutes.toString(),onValueChange:n=>s({...a,reminderMinutes:parseInt(n)}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"5",children:"5 minutes before"}),e(o,{value:"15",children:"15 minutes before"}),e(o,{value:"30",children:"30 minutes before"}),e(o,{value:"60",children:"1 hour before"}),e(o,{value:"1440",children:"1 day before"})]})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),e(f,{id:"edit-tags",value:a.tags,onChange:n=>s({...a,tags:n.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),t("div",{className:"flex justify-end space-x-2",children:[e(N,{type:"button",variant:"outline",onClick:l,children:"Cancel"}),e(N,{type:"submit",children:"Save Changes"})]})]})]})})},se=({reminder:i,colleagues:u,onUpdateReminder:v,onDeleteReminder:g})=>{let[l,a]=D(!1);if(!i||!i.id)return null;let s=B(i.dueDate,i.dueTime),p=O(i.dueDate),h=le(i.dueDate),n=()=>{v(i.id,{isCompleted:!i.isCompleted,completedAt:i.isCompleted?void 0:new Date})},d=()=>p?"Today":h?"Tomorrow":s&&!i.isCompleted?"Overdue":ie(i.dueDate);return t(ce,{children:[e(de,{reminder:i,colleagues:u,onUpdateReminder:v,open:l,onClose:()=>a(!1)}),e(T,{className:`transition-all duration-200 ${i.isCompleted?"opacity-60":""} ${s&&!i.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:e(H,{className:"p-4",children:t("div",{className:"flex items-start justify-between",children:[t("div",{className:"flex items-start space-x-3 flex-1",children:[e("button",{onClick:n,className:"mt-1 text-primary hover:text-primary/80",children:i.isCompleted?e(_,{className:"h-5 w-5"}):e(ee,{className:"h-5 w-5"})}),t("div",{className:"flex-1",children:[t("div",{className:"flex items-center space-x-2 mb-1",children:[e("h3",{className:`font-semibold ${i.isCompleted?"line-through text-muted-foreground":""}`,children:i.title}),e("span",{className:"text-sm",children:ae(i.priority)}),i.isRecurring&&e(Q,{className:"h-4 w-4 text-primary"}),i.reminderEnabled&&e(te,{className:"h-4 w-4 text-success"})]}),e("p",{className:"text-sm text-muted-foreground mb-2",children:i.description}),t("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[t("div",{className:"flex items-center space-x-1",children:[e(G,{className:"h-4 w-4"}),e("span",{className:s&&!i.isCompleted?"text-destructive font-medium":"",children:d()})]}),i.dueTime&&t("div",{className:"flex items-center space-x-1",children:[e(K,{className:"h-4 w-4"}),e("span",{children:re(i.dueTime)})]}),t("div",{className:"flex items-center space-x-1",children:[e(J,{className:"h-4 w-4"}),e("span",{children:i.colleague?.name||"Unknown Colleague"})]})]}),i.tags&&i.tags.length>0&&e("div",{className:"flex flex-wrap gap-1 mt-2",children:i.tags.map((y,E)=>e(U,{variant:"secondary",className:"text-xs",children:y},E))})]})]}),t("div",{className:"flex items-center space-x-1",children:[e(N,{variant:"ghost",size:"sm",onClick:()=>a(!0),className:"h-8 w-8 p-0",children:e(X,{className:"h-4 w-4"})}),e(N,{variant:"ghost",size:"sm",onClick:()=>g(i.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:e(Z,{className:"h-4 w-4"})})]})]})})})]})},oe=({initialReminders:i=[],initialColleagues:u=[],onAddReminder:v,onUpdateReminder:g,onDeleteReminder:l})=>{let[a,s]=D(i.filter(Boolean)),[p]=D(u.filter(Boolean)),[h,n]=D("all"),[d,y]=D(""),[E,k]=D(!1),j=r=>{if(!r.title||!r.colleague?.id){console.error("Invalid reminder data:",r);return}let m={...r,id:Date.now().toString(),createdAt:new Date};s(x=>[...x,m]),v?.(r)},$=(r,m)=>{if(!r){console.error("No reminder ID provided for update");return}s(x=>x.map(b=>b?.id===r?{...b,...m}:b)),g?.(r,m)},z=r=>{if(!r){console.error("No reminder ID provided for deletion");return}s(m=>m.filter(x=>x?.id!==r)),l?.(r)},V=a.filter(r=>{if(!r)return!1;if(d){let m=d.toLowerCase();if(!(r.title.toLowerCase().includes(m)||r.description.toLowerCase().includes(m)||r.colleague?.name?.toLowerCase().includes(m)||r.tags?.some(b=>b.toLowerCase().includes(m))))return!1}switch(h){case"pending":return!r.isCompleted;case"completed":return r.isCompleted;case"overdue":return!r.isCompleted&&B(r.dueDate,r.dueTime);case"today":return O(new Date(r.dueDate));default:return!0}}).sort((r,m)=>{if(!r||!m)return 0;if(r.isCompleted&&!m.isCompleted)return 1;if(!r.isCompleted&&m.isCompleted)return-1;let x={high:3,medium:2,low:1},b=x[m.priority]-x[r.priority];return b!==0?b:r.dueDate.getTime()-m.dueDate.getTime()}),C={total:a.filter(Boolean).length,pending:a.filter(r=>r&&!r.isCompleted).length,completed:a.filter(r=>r&&r.isCompleted).length,overdue:a.filter(r=>r&&!r.isCompleted&&B(r.dueDate,r.dueTime)).length,today:a.filter(r=>r&&O(new Date(r.dueDate))).length},me=p.find(Boolean)||{id:"1",name:"Default Colleague",status:"active",joinedDate:new Date,lastActive:new Date,type:"digital",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[],version:"1.0.0",lastUpdated:new Date,isActive:!0};return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(q,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{k(!0)}}}),t("div",{className:"h-full bg-background",children:[e(ne,{colleagues:p,onAddReminder:j,open:E,setOpen:k}),t("div",{className:"p-6",children:[t("div",{className:"flex items-center justify-between mb-6",children:[t("div",{children:[e("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),e("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),t(N,{className:"flex items-center space-x-2",onClick:()=>k(!0),children:[e(Y,{className:"h-4 w-4"}),e("span",{children:"Add Reminder"})]})]}),t("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-foreground",children:C.total}),e("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-primary",children:C.pending}),e("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-success",children:C.completed}),e("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-destructive",children:C.overdue}),e("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-warning",children:C.today}),e("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),t("div",{className:"flex items-center space-x-4 mb-6",children:[e("div",{className:"flex-1",children:e(f,{placeholder:"Search reminders...",value:d,onChange:r=>y(r.target.value),className:"max-w-md"})}),t(S,{value:h,onValueChange:r=>n(r),children:[e(R,{className:"w-40",children:e(w,{})}),t(I,{children:[t(o,{value:"all",children:["All (",C.total,")"]}),t(o,{value:"pending",children:["Pending (",C.pending,")"]}),t(o,{value:"completed",children:["Completed (",C.completed,")"]}),t(o,{value:"overdue",children:["Overdue (",C.overdue,")"]}),t(o,{value:"today",children:["Today (",C.today,")"]})]})]})]}),e("div",{className:"space-y-4",children:V.length===0?t(T,{className:"p-8 text-center",children:[e("div",{className:"text-muted-foreground",children:d||h!=="all"?"No reminders match your filters":"No reminders yet"}),!d&&h==="all"&&e("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):V.map(r=>r&&e(se,{reminder:r,colleagues:p,onUpdateReminder:$,onDeleteReminder:z},r.id))})]})]})]})},ke=oe;export{oe as a,ke as b};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as u}from"./chunk-AZKOVKSK.mjs";import{a as b}from"./chunk-BHWGOTCJ.mjs";import{a as N}from"./chunk-MU5WPW4N.mjs";import{a as m,b as d,c as p,d as f}from"./chunk-KY7WQYN4.mjs";import{b as a}from"./chunk-ZUA4KNIR.mjs";import{a as v,b as g,c as h}from"./chunk-SOLZ4VQH.mjs";import{useState as T}from"react";import{motion as e}from"motion/react";import{Bell as $,Menu as q,PanelLeft as E,Bot as G}from"lucide-react";import{Fragment as J,jsx as t,jsxs as i}from"react/jsx-runtime";function at({title:Q,notifications:x=[],onToggleSidebar:w,onToggleMobileMenu:y,sidebarOpen:C=!0,className:A,activeTab:k="assistant",onTabChange:P,showTabs:O=!0,tabOptions:R=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:B,actionIcon:H=t(G,{className:"mr-2 h-4 w-4"}),actionText:j="Action",onNotificationRemove:z,onRemoveAll:D,logo:I="/headerlogo.png",appName:L="Nuvia",tagline:M="Collaboration Platform"}){let[F,l]=T(!1),[r,c]=T(x),n=r.filter(o=>!o.read).length,S=o=>{c(s=>s.filter(U=>U.id!==o)),z?.(o)},K=()=>{c(o=>o.filter(s=>s.read)),D?.()};return i(J,{children:[i("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${A||""}`,children:[t(a,{variant:"ghost",size:"icon",className:"md:hidden",onClick:y,children:t(q,{className:"h-5 w-5"})}),t(a,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:w,children:t(E,{className:"h-5 w-5"})}),!C&&i(e.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[t("div",{className:"flex h-10 w-10 items-center justify-center",children:t("img",{src:I,alt:"Logo",className:"h-10 w-10 object-contain"})}),i("div",{children:[t("h2",{className:"font-semibold text-sm",children:L}),t("p",{className:"text-xs text-muted-foreground",children:M})]})]}),i("div",{className:"flex flex-1 items-center",children:[O&&t(b,{activeTab:k,onTabChange:P,tabOptions:R}),i("div",{className:"flex items-center gap-3 ml-auto",children:[t(e.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:B,children:[H,j]})})}),t(u,{}),t(m,{children:i(d,{children:[t(p,{asChild:!0,children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>l(!0),children:[t(e.div,{animate:n>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:n>0?1/0:0,repeatDelay:3},children:t($,{className:"h-5 w-5"})}),n>0&&t(e.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:n})]})})}),t(f,{children:"Notifications"})]})}),t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(v,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[t(g,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),t(h,{})]})})]})]})]}),t(N,{notifications:r,open:F,onClose:()=>l(!1),onNotificationRemove:S,onRemoveAll:K})]})}export{at as a};
4
+ import{a as u}from"./chunk-AZKOVKSK.mjs";import{a as b}from"./chunk-FGEFYI5E.mjs";import{a as N}from"./chunk-MU5WPW4N.mjs";import{a as m,b as d,c as p,d as f}from"./chunk-KY7WQYN4.mjs";import{b as a}from"./chunk-ZUA4KNIR.mjs";import{a as v,b as g,c as h}from"./chunk-SOLZ4VQH.mjs";import{useState as T}from"react";import{motion as e}from"motion/react";import{Bell as $,Menu as q,PanelLeft as E,Bot as G}from"lucide-react";import{Fragment as J,jsx as t,jsxs as i}from"react/jsx-runtime";function at({title:Q,notifications:x=[],onToggleSidebar:w,onToggleMobileMenu:y,sidebarOpen:C=!0,className:A,activeTab:k="assistant",onTabChange:P,showTabs:O=!0,tabOptions:R=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:B,actionIcon:H=t(G,{className:"mr-2 h-4 w-4"}),actionText:j="Action",onNotificationRemove:z,onRemoveAll:D,logo:I="/headerlogo.png",appName:L="Nuvia",tagline:M="Collaboration Platform"}){let[F,l]=T(!1),[r,c]=T(x),n=r.filter(o=>!o.read).length,S=o=>{c(s=>s.filter(U=>U.id!==o)),z?.(o)},K=()=>{c(o=>o.filter(s=>s.read)),D?.()};return i(J,{children:[i("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${A||""}`,children:[t(a,{variant:"ghost",size:"icon",className:"md:hidden",onClick:y,children:t(q,{className:"h-5 w-5"})}),t(a,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:w,children:t(E,{className:"h-5 w-5"})}),!C&&i(e.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[t("div",{className:"flex h-10 w-10 items-center justify-center",children:t("img",{src:I,alt:"Logo",className:"h-10 w-10 object-contain"})}),i("div",{children:[t("h2",{className:"font-semibold text-sm",children:L}),t("p",{className:"text-xs text-muted-foreground",children:M})]})]}),i("div",{className:"flex flex-1 items-center",children:[O&&t(b,{activeTab:k,onTabChange:P,tabOptions:R}),i("div",{className:"flex items-center gap-3 ml-auto",children:[t(e.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:B,children:[H,j]})})}),t(u,{}),t(m,{children:i(d,{children:[t(p,{asChild:!0,children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>l(!0),children:[t(e.div,{animate:n>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:n>0?1/0:0,repeatDelay:3},children:t($,{className:"h-5 w-5"})}),n>0&&t(e.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:n})]})})}),t(f,{children:"Notifications"})]})}),t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(v,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[t(g,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),t(h,{})]})})]})]})]}),t(N,{notifications:r,open:F,onClose:()=>l(!1),onNotificationRemove:S,onRemoveAll:K})]})}export{at as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as Y}from"./chunk-Z22NSJMF.mjs";import{a as N}from"./chunk-TUI4S4GI.mjs";import{a as F}from"./chunk-EAFH3DTH.mjs";import{a as _}from"./chunk-6XUIHSKG.mjs";import{a as ee}from"./chunk-6WQXZ6IE.mjs";import{a as te}from"./chunk-CO6AQNZ5.mjs";import{a as le}from"./chunk-PWXCBW2H.mjs";import{a as Z}from"./chunk-BHWGOTCJ.mjs";import{a as H,c as I,d as U,g as $,i as g}from"./chunk-YFAZQYK4.mjs";import{a as X}from"./chunk-L5JPAKPM.mjs";import{b as V}from"./chunk-ZUA4KNIR.mjs";import{a as u,b as x,c as D,e as p}from"./chunk-YO3GQYRJ.mjs";import{useEffect as ve,useState as s}from"react";import{Plus as he,Search as ye,Users as ae,Bot as we,User as xe,Filter as De}from"lucide-react";import{motion as Ne,AnimatePresence as Se}from"motion/react";import{jsx as t,jsxs as a}from"react/jsx-runtime";function be({initialColleagues:S,onColleagueAdd:b,onColleagueEdit:O,onColleagueDelete:ie,compactView:d=!1,departments:oe=["Design","Engineering","Marketing","Product","Sales","Operations"],className:ne,availableUsers:L=[],existingDigitalColleagues:j=[]}){let[n,m]=s(S||[]),[r,P]=s(""),[C,B]=s("all"),[f,M]=s("all"),[y,se]=s("all"),[q,v]=s(null),[A,w]=s(null);ve(()=>{m(S||[])},[S]);let re=Array.isArray(L)?L:[],z=Array.isArray(j)?j:[],[c,i]=s("main"),h=n.filter(e=>{if(!e||!e.name)return!1;let o=e.name.toLowerCase().includes(r.toLowerCase())||e.type==="human"&&(e.email?.toLowerCase().includes(r.toLowerCase())||e.role?.toLowerCase().includes(r.toLowerCase()))||e.type==="digital"&&e.jobDescription?.toLowerCase().includes(r.toLowerCase()),l=C==="all"||e.type==="human"&&e.department===C,K=f==="all"||e.status===f;return o&&l&&K}),G=h.filter(e=>e.type==="human"),W=h.filter(e=>e.type==="digital"),J=()=>{i("typeSelection")},T=e=>{e.type==="digital"&&(v(e),i("form")),console.log("Editing colleague:",e),O?.(e)},k=e=>{e.type==="digital"&&(w(e),i("view"))},de=e=>{let o={id:`human-${Date.now()}`,type:"human",name:e.name,email:e.email,role:e.role,department:e.department,phone:e.phone,location:e.location,timezone:e.timezone,skills:e.skills||[],bio:e.bio,status:"active",joinedDate:new Date,lastActive:new Date};m(l=>[...l,o]),b?.(o),i("main")},me=e=>{if(!e||!e.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",e);return}m(o=>[...o,e]),b?.(e),i("main")},ce=()=>{v(null),i("form")},Q=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}q?(m(o=>o.map(l=>l.id===e.id?e:l)),O?.(e)):(m(o=>[...o,e]),b?.(e)),i("main"),v(null)},ge=()=>{i("main"),v(null),w(null)},ue=()=>{i("main"),w(null)},Ae=()=>{A&&(v(A),w(null),i("form"))},E=e=>{console.log("handling delete colleague",e),m(o=>o.filter(l=>l.id!==e)),ie?.(e)},pe=()=>{P(""),B("all"),M("all")},R=()=>{let e=[];return z.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,K,Ce)=>K===Ce.findIndex(fe=>fe.id===l.id))};return c==="typeSelection"?t(_,{onSelectHuman:()=>i("userSelection"),onSelectDigital:()=>i("digitalOptions"),onCancel:()=>i("main")}):c==="userSelection"?t(le,{users:re,onUserSelect:de,onCancel:()=>i("typeSelection")}):c==="digitalOptions"?t(te,{onCloneExisting:()=>i("digitalClone"),onCreateNew:ce,onCancel:()=>i("typeSelection")}):c==="digitalClone"?t(ee,{digitalColleagues:z,onColleagueClone:me,onCancel:()=>i("digitalOptions")}):c==="form"?t(F,{colleague:q||void 0,onSave:Q,onCancel:ge,availableKnowledgeDocuments:R()}):c==="view"?t(F,{colleague:A||void 0,onSave:Q,onCancel:ue,readOnly:!0,availableKnowledgeDocuments:R()}):t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:t(Se,{mode:"wait",children:t(Ne.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 ${ne||""}`,children:[t(Y,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:J}}),a("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a(u,{children:[a(x,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(D,{className:"text-sm font-medium",children:"Total Colleagues"}),t(ae,{className:"h-4 w-4 text-muted-foreground"})]}),a(p,{children:[t("div",{className:"text-2xl font-bold",children:n.length}),a("p",{className:"text-xs text-muted-foreground",children:[n.filter(e=>e.status==="active").length," active"]})]})]}),a(u,{children:[a(x,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(D,{className:"text-sm font-medium",children:"Human Members"}),t(xe,{className:"h-4 w-4 text-muted-foreground"})]}),a(p,{children:[t("div",{className:"text-2xl font-bold",children:n.filter(e=>e.type==="human").length}),a("p",{className:"text-xs text-muted-foreground",children:[n.filter(e=>e.type==="human"&&e.status==="active").length," ","active"]})]})]}),a(u,{children:[a(x,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(D,{className:"text-sm font-medium",children:"Digital Colleagues"}),t(we,{className:"h-4 w-4 text-muted-foreground"})]}),a(p,{children:[t("div",{className:"text-2xl font-bold",children:n.filter(e=>e.type==="digital").length}),a("p",{className:"text-xs text-muted-foreground",children:[n.filter(e=>e.type==="digital"&&e.status==="active").length," ","active"]})]})]})]}),t(u,{children:t(p,{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(ye,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),t(X,{placeholder:"Search colleagues...",value:r,onChange:e=>P(e.target.value),className:"pl-9"})]})}),a(H,{value:C,onValueChange:B,children:[t(U,{className:"w-full md:w-[180px]",children:t(I,{placeholder:"Department"})}),a($,{children:[t(g,{value:"all",children:"All Departments"}),oe.map(e=>t(g,{value:e,children:e},e))]})]}),a(H,{value:f,onValueChange:M,children:[t(U,{className:"w-full md:w-[140px]",children:t(I,{placeholder:"Status"})}),a($,{children:[t(g,{value:"all",children:"All Status"}),t(g,{value:"active",children:"Active"}),t(g,{value:"inactive",children:"Inactive"})]})]}),(r||C!=="all"||f!=="all")&&a(V,{variant:"outline",onClick:pe,className:"gap-2",children:[t(De,{className:"h-4 w-4"}),"Clear"]})]})})}),a("div",{className:"space-y-4",children:[t(Z,{activeTab:y,onTabChange:se,tabOptions:[{value:"all",label:`All (${h.length})`},{value:"human",label:`Human (${G.length})`},{value:"digital",label:`Digital (${W.length})`}],maxWidth:"400px",gridCols:3}),y==="all"&&t("div",{className:`grid gap-4 ${d?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:h.map(e=>t(N,{colleague:e,onEdit:T,onDelete:E,onViewDetails:k,compact:d},`${e}-${e.id}`))}),y==="human"&&t("div",{className:`grid gap-4 ${d?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:G.map(e=>t(N,{colleague:e,onEdit:T,onDelete:E,onViewDetails:k,compact:d},e.id))}),y==="digital"&&t("div",{className:`grid gap-4 ${d?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:W.map(e=>t(N,{colleague:e,onEdit:T,onDelete:E,onViewDetails:k,compact:d},e.id))})]}),h.length===0&&t(u,{children:t(p,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[t(ae,{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:r||C!=="all"||f!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),a(V,{onClick:J,className:"gap-2",children:[t(he,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{be as a};
4
+ import{a as Y}from"./chunk-Z22NSJMF.mjs";import{a as N}from"./chunk-TUI4S4GI.mjs";import{a as F}from"./chunk-EAFH3DTH.mjs";import{a as _}from"./chunk-6XUIHSKG.mjs";import{a as ee}from"./chunk-6WQXZ6IE.mjs";import{a as te}from"./chunk-CO6AQNZ5.mjs";import{a as le}from"./chunk-PWXCBW2H.mjs";import{a as Z}from"./chunk-FGEFYI5E.mjs";import{a as H,c as I,d as U,g as $,i as g}from"./chunk-YFAZQYK4.mjs";import{a as X}from"./chunk-L5JPAKPM.mjs";import{b as V}from"./chunk-ZUA4KNIR.mjs";import{a as u,b as x,c as D,e as p}from"./chunk-YO3GQYRJ.mjs";import{useEffect as ve,useState as s}from"react";import{Plus as he,Search as ye,Users as ae,Bot as we,User as xe,Filter as De}from"lucide-react";import{motion as Ne,AnimatePresence as Se}from"motion/react";import{jsx as t,jsxs as a}from"react/jsx-runtime";function be({initialColleagues:S,onColleagueAdd:b,onColleagueEdit:O,onColleagueDelete:ie,compactView:d=!1,departments:oe=["Design","Engineering","Marketing","Product","Sales","Operations"],className:ne,availableUsers:L=[],existingDigitalColleagues:j=[]}){let[n,m]=s(S||[]),[r,P]=s(""),[C,B]=s("all"),[f,M]=s("all"),[y,se]=s("all"),[q,v]=s(null),[A,w]=s(null);ve(()=>{m(S||[])},[S]);let re=Array.isArray(L)?L:[],z=Array.isArray(j)?j:[],[c,i]=s("main"),h=n.filter(e=>{if(!e||!e.name)return!1;let o=e.name.toLowerCase().includes(r.toLowerCase())||e.type==="human"&&(e.email?.toLowerCase().includes(r.toLowerCase())||e.role?.toLowerCase().includes(r.toLowerCase()))||e.type==="digital"&&e.jobDescription?.toLowerCase().includes(r.toLowerCase()),l=C==="all"||e.type==="human"&&e.department===C,K=f==="all"||e.status===f;return o&&l&&K}),G=h.filter(e=>e.type==="human"),W=h.filter(e=>e.type==="digital"),J=()=>{i("typeSelection")},T=e=>{e.type==="digital"&&(v(e),i("form")),console.log("Editing colleague:",e),O?.(e)},k=e=>{e.type==="digital"&&(w(e),i("view"))},de=e=>{let o={id:`human-${Date.now()}`,type:"human",name:e.name,email:e.email,role:e.role,department:e.department,phone:e.phone,location:e.location,timezone:e.timezone,skills:e.skills||[],bio:e.bio,status:"active",joinedDate:new Date,lastActive:new Date};m(l=>[...l,o]),b?.(o),i("main")},me=e=>{if(!e||!e.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",e);return}m(o=>[...o,e]),b?.(e),i("main")},ce=()=>{v(null),i("form")},Q=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}q?(m(o=>o.map(l=>l.id===e.id?e:l)),O?.(e)):(m(o=>[...o,e]),b?.(e)),i("main"),v(null)},ge=()=>{i("main"),v(null),w(null)},ue=()=>{i("main"),w(null)},Ae=()=>{A&&(v(A),w(null),i("form"))},E=e=>{console.log("handling delete colleague",e),m(o=>o.filter(l=>l.id!==e)),ie?.(e)},pe=()=>{P(""),B("all"),M("all")},R=()=>{let e=[];return z.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,K,Ce)=>K===Ce.findIndex(fe=>fe.id===l.id))};return c==="typeSelection"?t(_,{onSelectHuman:()=>i("userSelection"),onSelectDigital:()=>i("digitalOptions"),onCancel:()=>i("main")}):c==="userSelection"?t(le,{users:re,onUserSelect:de,onCancel:()=>i("typeSelection")}):c==="digitalOptions"?t(te,{onCloneExisting:()=>i("digitalClone"),onCreateNew:ce,onCancel:()=>i("typeSelection")}):c==="digitalClone"?t(ee,{digitalColleagues:z,onColleagueClone:me,onCancel:()=>i("digitalOptions")}):c==="form"?t(F,{colleague:q||void 0,onSave:Q,onCancel:ge,availableKnowledgeDocuments:R()}):c==="view"?t(F,{colleague:A||void 0,onSave:Q,onCancel:ue,readOnly:!0,availableKnowledgeDocuments:R()}):t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:t(Se,{mode:"wait",children:t(Ne.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 ${ne||""}`,children:[t(Y,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:J}}),a("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a(u,{children:[a(x,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(D,{className:"text-sm font-medium",children:"Total Colleagues"}),t(ae,{className:"h-4 w-4 text-muted-foreground"})]}),a(p,{children:[t("div",{className:"text-2xl font-bold",children:n.length}),a("p",{className:"text-xs text-muted-foreground",children:[n.filter(e=>e.status==="active").length," active"]})]})]}),a(u,{children:[a(x,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(D,{className:"text-sm font-medium",children:"Human Members"}),t(xe,{className:"h-4 w-4 text-muted-foreground"})]}),a(p,{children:[t("div",{className:"text-2xl font-bold",children:n.filter(e=>e.type==="human").length}),a("p",{className:"text-xs text-muted-foreground",children:[n.filter(e=>e.type==="human"&&e.status==="active").length," ","active"]})]})]}),a(u,{children:[a(x,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(D,{className:"text-sm font-medium",children:"Digital Colleagues"}),t(we,{className:"h-4 w-4 text-muted-foreground"})]}),a(p,{children:[t("div",{className:"text-2xl font-bold",children:n.filter(e=>e.type==="digital").length}),a("p",{className:"text-xs text-muted-foreground",children:[n.filter(e=>e.type==="digital"&&e.status==="active").length," ","active"]})]})]})]}),t(u,{children:t(p,{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(ye,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),t(X,{placeholder:"Search colleagues...",value:r,onChange:e=>P(e.target.value),className:"pl-9"})]})}),a(H,{value:C,onValueChange:B,children:[t(U,{className:"w-full md:w-[180px]",children:t(I,{placeholder:"Department"})}),a($,{children:[t(g,{value:"all",children:"All Departments"}),oe.map(e=>t(g,{value:e,children:e},e))]})]}),a(H,{value:f,onValueChange:M,children:[t(U,{className:"w-full md:w-[140px]",children:t(I,{placeholder:"Status"})}),a($,{children:[t(g,{value:"all",children:"All Status"}),t(g,{value:"active",children:"Active"}),t(g,{value:"inactive",children:"Inactive"})]})]}),(r||C!=="all"||f!=="all")&&a(V,{variant:"outline",onClick:pe,className:"gap-2",children:[t(De,{className:"h-4 w-4"}),"Clear"]})]})})}),a("div",{className:"space-y-4",children:[t(Z,{activeTab:y,onTabChange:se,tabOptions:[{value:"all",label:`All (${h.length})`},{value:"human",label:`Human (${G.length})`},{value:"digital",label:`Digital (${W.length})`}],maxWidth:"400px",gridCols:3}),y==="all"&&t("div",{className:`grid gap-4 ${d?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:h.map(e=>t(N,{colleague:e,onEdit:T,onDelete:E,onViewDetails:k,compact:d},`${e}-${e.id}`))}),y==="human"&&t("div",{className:`grid gap-4 ${d?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:G.map(e=>t(N,{colleague:e,onEdit:T,onDelete:E,onViewDetails:k,compact:d},e.id))}),y==="digital"&&t("div",{className:`grid gap-4 ${d?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:W.map(e=>t(N,{colleague:e,onEdit:T,onDelete:E,onViewDetails:k,compact:d},e.id))})]}),h.length===0&&t(u,{children:t(p,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[t(ae,{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:r||C!=="all"||f!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),a(V,{onClick:J,className:"gap-2",children:[t(he,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{be as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as te}from"./chunk-ZMB6R6JX.mjs";import{a as Z}from"./chunk-U6BCTHV7.mjs";import{a as ee}from"./chunk-LUM6KEWN.mjs";import{a as Y}from"./chunk-ORNGKQM7.mjs";import{a as X}from"./chunk-PFDPO3UX.mjs";import{a as _}from"./chunk-I2ZLKSWR.mjs";import{a as Q}from"./chunk-PH67DP3M.mjs";import{a as L}from"./chunk-P3NMFRBH.mjs";import{useEffect as o,useState as s}from"react";import{useRouter as Ye}from"next/navigation";import{jsx as a,jsxs as _e}from"react/jsx-runtime";function Ze({title:et="",initialTasks:h=[],initialEpics:D=[],initialSprints:S=[],initialProjects:E=[],initialReminders:v=[],initialColleagues:A=[],initialUsers:w=[],initialFiles:P=[],initialView:C="kanban",onAddTask:ie,onUpdateTask:ne,onDeleteTask:se,onTaskClick:tt,onAddEpic:ae,onUpdateEpic:oe,onDeleteEpic:de,onAddTaskToEpic:it,onAddSprint:re,onUpdateSprint:le,onDeleteSprint:ce,onAddProject:pe,onUpdateProject:ge,onDeleteProject:me,onFileAdd:ke,onFileEdit:Te,onFileDelete:ue,onFileClick:fe,onAddReminder:he,onUpdateReminder:De,onDeleteReminder:Se,onViewChange:Ee,onToggleMobileMenu:ve,onTeamClick:nt,onTeamChange:st,onCopilotClick:at}){let[p,d]=s(h),[r,g]=s(D),[c,m]=s(S),[F,k]=s(E),[Ae,T]=s(v),[U,we]=s(A),[M,Pe]=s(w),[Ce,O]=s(P),[Ue,R]=s(!1),[be,V]=s(!1),[ye,j]=s(null),[Fe,I]=s(null),[B,N]=s(null),[l,x]=s(C||"kanban"),[Me,Oe]=s(!1),G=Ye();o(()=>{d(h)},[h]),o(()=>{m(S)},[S]),o(()=>{g(D)},[D]),o(()=>{k(E)},[E]),o(()=>{O(P)},[P]),o(()=>{Pe(w)},[w]),o(()=>{we(A)},[A]),o(()=>{T(v)},[v]),o(()=>{x(C)},[C]);let Re=r.filter(e=>e.isSelected).map(e=>e.id),u=c.find(e=>e.isSelected),Ve=p.filter(e=>{let t=Re.includes(e.epicId);return!u||u.id==="all-tasks"?t:u.id==="backlog"?t&&!e.sprintId:t&&e.sprintId===u.id}),ot=e=>Ve.filter(t=>t.status===e),dt=e=>{let t={};return r.forEach(i=>{t[i.id]=e.filter(n=>n.epicId===i.id)}),t},rt=e=>{N(e)},lt=e=>{B&&(d(t=>t.map(i=>i.id===B.id?{...i,status:e}:i)),N(null))},H=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};d(i=>[...i,t]),ie?.(t)},f=(e,t)=>{d(i=>i.map(n=>n.id===e?{...n,...t}:n)),ne?.(e,t)},ct=async(e,t)=>{f(e,t)},K=e=>{d(t=>t.filter(i=>i.id!==e)),ye?.id===e&&j(null),se?.(e)},pt=async e=>{K(e)},je=e=>{let t={...e,id:Date.now().toString(),isSelected:!1};k(i=>[...i,t]),pe?.(e)},Ie=(e,t)=>{k(i=>i.map(n=>n.id===e?t.isSelected?(G.push(`/project/${e}`),{...n,...t}):{...n,...t}:t.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),ge?.(e,t)},Be=e=>{k(t=>t.filter(i=>i.id!==e)),me?.(e)},W=e=>{let t={...e,id:Date.now().toString(),isSelected:!0};g(i=>[...i,t]),ae?.({...t})},$=()=>{V(!0)},q=(e,t)=>{g(i=>i.map(n=>n.id===e?{...n,...t}:n)),oe?.(e,t)},z=e=>{g(t=>t.filter(i=>i.id!==e)),d(t=>t.filter(i=>i.epicId!==e)),de?.(e)},J=e=>{let t={...e,id:Date.now().toString(),isSelected:!1};m(i=>[...i,t]),re?.(e)},Ne=(e,t)=>{m(i=>i.map(n=>n.id===e?t.isSelected?{...n,...t}:{...n,...t}:t.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),le?.(e,t)},xe=e=>{e==="backlog"||e==="all-tasks"||(m(t=>t.filter(i=>i.id!==e)),d(t=>t.map(i=>i.sprintId===e?{...i,sprintId:void 0}:i)),ce?.(e))},b=e=>{j(e)},Ge=e=>{e==="planning"&&window.innerWidth<768||(x(e),Ee?.(e))},He=()=>{Oe(e=>!e),ve?.()},gt=()=>{G.push("/")},mt=e=>{console.log("Switching to team:",e)},kt=e=>{console.log("Switching to team:",e)},Ke=e=>{I(e),R(!0)},We=()=>{R(!1),I(null)},$e=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};T(i=>[...i,t]),he?.(e)},qe=(e,t)=>{T(i=>i.map(n=>n.id===e?{...n,...t}:n)),De?.(e,t)},ze=e=>{T(t=>t.filter(i=>i.id!==e)),Se?.(e)},Je=()=>{ke?.()},Le=e=>{Te?.(e)},Qe=e=>{O(t=>t.filter(i=>i.name!==e)),ue?.(e)},Xe=e=>{fe?.(e)},Tt=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],ut=()=>{switch(l){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},y=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],ft=y.sort((e,t)=>t.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),ht=y.length>3,Dt=y.slice(3);return _e(L,{projects:F,epics:r,sprints:c,currentView:l,onUpdateProject:Ie,onDeleteProject:Be,onAddProject:je,onUpdateEpic:q,onDeleteEpic:z,onAddEpic:$,onAddSprint:J,onUpdateSprint:Ne,onDeleteSprint:xe,onViewChange:Ge,mobileMenuOpen:Me,onToggleMobileMenu:He,children:[l==="kanban"&&a("div",{className:"h-full",children:a(Z,{initialProjects:F,initialEpics:r,initialSprints:c,initialTasks:p,initialColleagues:U,initialUsers:M,onAddTask:H,onUpdateTask:f,onDeleteTask:K,onTaskClick:b,onAddEpic:W})}),l==="planning"&&a("div",{className:"hidden md:block h-full",children:a(ee,{tasks:p,epics:r,sprints:c,onUpdateTask:f,onTaskClick:b,onAddSprint:J})}),l==="tasks"&&a("div",{className:"h-full",children:a(te,{initialReminders:Ae,initialColleagues:U,onAddReminder:$e,onUpdateReminder:qe,onDeleteReminder:ze})}),l==="files"&&a("div",{className:"h-full",children:a(Q,{initialFiles:Ce,onFileAdd:Je,onFileEdit:Le,onFileDelete:Qe,onFileClick:Xe,compactView:!1})}),l==="epics"&&a("div",{className:"h-full",children:a(_,{tasks:p,epics:r,sprints:c,onUpdateTask:f,onTaskClick:b,onAddTaskToEpic:Ke,onAddEpic:$,onUpdateEpic:q,onDeleteEpic:z})}),a(X,{isOpen:Ue,onClose:We,onAddTask:H,epics:r,sprints:c,assignees:[...U,...M],defaultEpicId:Fe||void 0}),a(Y,{isOpen:be,onClose:()=>V(!1),onAddEpic:W})]})}export{Ze as a};
4
+ import{a as te}from"./chunk-Q3EVV5MV.mjs";import{a as _}from"./chunk-I2ZLKSWR.mjs";import{a as Q}from"./chunk-WI2RL3XQ.mjs";import{a as Z}from"./chunk-LJLV5GUS.mjs";import{a as ee}from"./chunk-AQ6RGBGI.mjs";import{a as Y}from"./chunk-74JNWOJQ.mjs";import{a as X}from"./chunk-BA3I4XZE.mjs";import{a as L}from"./chunk-CTAQQFEO.mjs";import{useEffect as o,useState as s}from"react";import{useRouter as Ye}from"next/navigation";import{jsx as a,jsxs as _e}from"react/jsx-runtime";function Ze({title:et="",initialTasks:h=[],initialEpics:D=[],initialSprints:S=[],initialProjects:E=[],initialReminders:v=[],initialColleagues:A=[],initialUsers:w=[],initialFiles:P=[],initialView:C="kanban",onAddTask:ie,onUpdateTask:ne,onDeleteTask:se,onTaskClick:tt,onAddEpic:ae,onUpdateEpic:oe,onDeleteEpic:de,onAddTaskToEpic:it,onAddSprint:re,onUpdateSprint:le,onDeleteSprint:ce,onAddProject:pe,onUpdateProject:ge,onDeleteProject:me,onFileAdd:ke,onFileEdit:Te,onFileDelete:ue,onFileClick:fe,onAddReminder:he,onUpdateReminder:De,onDeleteReminder:Se,onViewChange:Ee,onToggleMobileMenu:ve,onTeamClick:nt,onTeamChange:st,onCopilotClick:at}){let[p,d]=s(h),[r,g]=s(D),[c,m]=s(S),[F,k]=s(E),[Ae,T]=s(v),[U,we]=s(A),[M,Pe]=s(w),[Ce,O]=s(P),[Ue,R]=s(!1),[be,V]=s(!1),[ye,j]=s(null),[Fe,I]=s(null),[B,N]=s(null),[l,x]=s(C||"kanban"),[Me,Oe]=s(!1),G=Ye();o(()=>{d(h)},[h]),o(()=>{m(S)},[S]),o(()=>{g(D)},[D]),o(()=>{k(E)},[E]),o(()=>{O(P)},[P]),o(()=>{Pe(w)},[w]),o(()=>{we(A)},[A]),o(()=>{T(v)},[v]),o(()=>{x(C)},[C]);let Re=r.filter(e=>e.isSelected).map(e=>e.id),u=c.find(e=>e.isSelected),Ve=p.filter(e=>{let t=Re.includes(e.epicId);return!u||u.id==="all-tasks"?t:u.id==="backlog"?t&&!e.sprintId:t&&e.sprintId===u.id}),ot=e=>Ve.filter(t=>t.status===e),dt=e=>{let t={};return r.forEach(i=>{t[i.id]=e.filter(n=>n.epicId===i.id)}),t},rt=e=>{N(e)},lt=e=>{B&&(d(t=>t.map(i=>i.id===B.id?{...i,status:e}:i)),N(null))},H=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};d(i=>[...i,t]),ie?.(t)},f=(e,t)=>{d(i=>i.map(n=>n.id===e?{...n,...t}:n)),ne?.(e,t)},ct=async(e,t)=>{f(e,t)},K=e=>{d(t=>t.filter(i=>i.id!==e)),ye?.id===e&&j(null),se?.(e)},pt=async e=>{K(e)},je=e=>{let t={...e,id:Date.now().toString(),isSelected:!1};k(i=>[...i,t]),pe?.(e)},Ie=(e,t)=>{k(i=>i.map(n=>n.id===e?t.isSelected?(G.push(`/project/${e}`),{...n,...t}):{...n,...t}:t.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),ge?.(e,t)},Be=e=>{k(t=>t.filter(i=>i.id!==e)),me?.(e)},W=e=>{let t={...e,id:Date.now().toString(),isSelected:!0};g(i=>[...i,t]),ae?.({...t})},$=()=>{V(!0)},q=(e,t)=>{g(i=>i.map(n=>n.id===e?{...n,...t}:n)),oe?.(e,t)},z=e=>{g(t=>t.filter(i=>i.id!==e)),d(t=>t.filter(i=>i.epicId!==e)),de?.(e)},J=e=>{let t={...e,id:Date.now().toString(),isSelected:!1};m(i=>[...i,t]),re?.(e)},Ne=(e,t)=>{m(i=>i.map(n=>n.id===e?t.isSelected?{...n,...t}:{...n,...t}:t.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),le?.(e,t)},xe=e=>{e==="backlog"||e==="all-tasks"||(m(t=>t.filter(i=>i.id!==e)),d(t=>t.map(i=>i.sprintId===e?{...i,sprintId:void 0}:i)),ce?.(e))},b=e=>{j(e)},Ge=e=>{e==="planning"&&window.innerWidth<768||(x(e),Ee?.(e))},He=()=>{Oe(e=>!e),ve?.()},gt=()=>{G.push("/")},mt=e=>{console.log("Switching to team:",e)},kt=e=>{console.log("Switching to team:",e)},Ke=e=>{I(e),R(!0)},We=()=>{R(!1),I(null)},$e=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};T(i=>[...i,t]),he?.(e)},qe=(e,t)=>{T(i=>i.map(n=>n.id===e?{...n,...t}:n)),De?.(e,t)},ze=e=>{T(t=>t.filter(i=>i.id!==e)),Se?.(e)},Je=()=>{ke?.()},Le=e=>{Te?.(e)},Qe=e=>{O(t=>t.filter(i=>i.name!==e)),ue?.(e)},Xe=e=>{fe?.(e)},Tt=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],ut=()=>{switch(l){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},y=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],ft=y.sort((e,t)=>t.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),ht=y.length>3,Dt=y.slice(3);return _e(L,{projects:F,epics:r,sprints:c,currentView:l,onUpdateProject:Ie,onDeleteProject:Be,onAddProject:je,onUpdateEpic:q,onDeleteEpic:z,onAddEpic:$,onAddSprint:J,onUpdateSprint:Ne,onDeleteSprint:xe,onViewChange:Ge,mobileMenuOpen:Me,onToggleMobileMenu:He,children:[l==="kanban"&&a("div",{className:"h-full",children:a(Z,{initialProjects:F,initialEpics:r,initialSprints:c,initialTasks:p,initialColleagues:U,initialUsers:M,onAddTask:H,onUpdateTask:f,onDeleteTask:K,onTaskClick:b,onAddEpic:W})}),l==="planning"&&a("div",{className:"hidden md:block h-full",children:a(ee,{tasks:p,epics:r,sprints:c,onUpdateTask:f,onTaskClick:b,onAddSprint:J})}),l==="tasks"&&a("div",{className:"h-full",children:a(te,{initialReminders:Ae,initialColleagues:U,onAddReminder:$e,onUpdateReminder:qe,onDeleteReminder:ze})}),l==="files"&&a("div",{className:"h-full",children:a(Q,{initialFiles:Ce,onFileAdd:Je,onFileEdit:Le,onFileDelete:Qe,onFileClick:Xe,compactView:!1})}),l==="epics"&&a("div",{className:"h-full",children:a(_,{tasks:p,epics:r,sprints:c,onUpdateTask:f,onTaskClick:b,onAddTaskToEpic:Ke,onAddEpic:$,onUpdateEpic:q,onDeleteEpic:z})}),a(X,{isOpen:Ue,onClose:We,onAddTask:H,epics:r,sprints:c,assignees:[...U,...M],defaultEpicId:Fe||void 0}),a(Y,{isOpen:be,onClose:()=>V(!1),onAddEpic:W})]})}export{Ze as a};