cortex-react-components 2.23.1 → 2.24.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 (141) hide show
  1. package/dist/{chunk-GZ7FGBTR.mjs → chunk-5EM6P7SU.mjs} +1 -1
  2. package/dist/{chunk-UECG3SCG.mjs → chunk-6DDMDQLX.mjs} +1 -1
  3. package/dist/{chunk-TSFX33PR.mjs → chunk-BGQC6IQK.mjs} +1 -1
  4. package/dist/{chunk-XJKRA2AE.mjs → chunk-CMU5JFUC.mjs} +1 -1
  5. package/dist/chunk-GCIEF545.mjs +4 -0
  6. package/dist/{chunk-INBT5E6T.mjs → chunk-GPFPTU7U.mjs} +1 -1
  7. package/dist/{chunk-LEUI66J6.mjs → chunk-GULRIPMU.mjs} +1 -1
  8. package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
  9. package/dist/chunk-ICFBQXVC.mjs +4 -0
  10. package/dist/{chunk-CQAMS7RZ.mjs → chunk-JOG27B7P.mjs} +1 -1
  11. package/dist/chunk-M7KIL6AS.mjs +9 -0
  12. package/dist/{chunk-B7AXSCTN.mjs → chunk-M7ZG6HLI.mjs} +1 -1
  13. package/dist/{chunk-JTMIQ7MK.mjs → chunk-NXAQ6ESJ.mjs} +1 -1
  14. package/dist/{chunk-I4GYQZGM.mjs → chunk-QY3UXH77.mjs} +1 -1
  15. package/dist/{chunk-L5NPH5RX.mjs → chunk-RQLUMNJE.mjs} +1 -1
  16. package/dist/{chunk-IAFKJKBN.mjs → chunk-SDKKYDWS.mjs} +1 -1
  17. package/dist/{chunk-W4OD5UUE.mjs → chunk-UTJZH3X5.mjs} +1 -1
  18. package/dist/{chunk-AF3FLXBA.mjs → chunk-VATGKKXW.mjs} +1 -1
  19. package/dist/chunk-VTFO5GXK.mjs +4 -0
  20. package/dist/{chunk-AHMDJQZI.mjs → chunk-XDW3TPGL.mjs} +1 -1
  21. package/dist/{chunk-OWC4BAX6.mjs → chunk-YJ7XPZWV.mjs} +1 -1
  22. package/dist/components/Blocks/Banner.mjs +1 -1
  23. package/dist/components/Blocks/CallToAction.mjs +1 -1
  24. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  25. package/dist/components/Blocks/Content.mjs +1 -1
  26. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  27. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  28. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  29. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  30. package/dist/components/Blocks/index.mjs +1 -1
  31. package/dist/components/CRM/index.mjs +1 -1
  32. package/dist/components/Cards/ContentCard.mjs +1 -1
  33. package/dist/components/Cards/FeatureCard.mjs +1 -1
  34. package/dist/components/Cards/index.mjs +1 -1
  35. package/dist/components/Chat/ChatInterface.mjs +1 -1
  36. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  37. package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
  38. package/dist/components/Chat/PartTypes/index.mjs +1 -1
  39. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  40. package/dist/components/Chat/demo-tests.mjs +1 -1
  41. package/dist/components/Chat/demo.mjs +1 -1
  42. package/dist/components/Chat/example-usage.mjs +1 -1
  43. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  44. package/dist/components/Chat/index.mjs +1 -1
  45. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  46. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +6 -1
  47. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  48. package/dist/components/DigitalColleagues/Views/index.js +6 -1
  49. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  50. package/dist/components/DigitalColleagues/index.js +6 -1
  51. package/dist/components/DigitalColleagues/index.mjs +1 -1
  52. package/dist/components/Foundary/MainPage.mjs +1 -1
  53. package/dist/components/Foundary/Pages/dashboardpage.js +6 -1
  54. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  55. package/dist/components/Foundary/RichText/index.js +1 -1
  56. package/dist/components/Foundary/RichText/index.mjs +1 -1
  57. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  58. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  59. package/dist/components/Foundary/Views/KnowledgeView.js +1 -1
  60. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  61. package/dist/components/Foundary/Views/index.js +6 -1
  62. package/dist/components/Foundary/Views/index.mjs +1 -1
  63. package/dist/components/Foundary/document-edit.js +1 -1
  64. package/dist/components/Foundary/document-edit.mjs +1 -1
  65. package/dist/components/Foundary/document-preview-examples.js +3 -3
  66. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  67. package/dist/components/Foundary/document-preview.js +1 -1
  68. package/dist/components/Foundary/document-preview.mjs +1 -1
  69. package/dist/components/Foundary/file-edit.css +1 -0
  70. package/dist/components/Foundary/file-edit.d.ts +9 -0
  71. package/dist/components/Foundary/file-edit.js +9 -0
  72. package/dist/components/Foundary/file-edit.mjs +2 -0
  73. package/dist/components/Foundary/index.js +6 -1
  74. package/dist/components/Foundary/index.mjs +1 -1
  75. package/dist/components/Foundary/knowledge-browser.js +1 -1
  76. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  77. package/dist/components/Foundary/test-data.js +1 -1
  78. package/dist/components/Foundary/test-data.mjs +1 -1
  79. package/dist/components/Foundary/types.d.ts +42 -0
  80. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  81. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  82. package/dist/components/HeaderFooter/index.mjs +1 -1
  83. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  84. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  85. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  86. package/dist/components/Heros/RenderHero.mjs +1 -1
  87. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  88. package/dist/components/Heros/index.mjs +1 -1
  89. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  90. package/dist/components/Layouts/Print.mjs +1 -1
  91. package/dist/components/Layouts/SlideShow.mjs +1 -1
  92. package/dist/components/Layouts/index.mjs +1 -1
  93. package/dist/components/Menus/index.mjs +1 -1
  94. package/dist/components/Other/index.mjs +1 -1
  95. package/dist/components/Payload/RichText/index.mjs +1 -1
  96. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  97. package/dist/components/Payload/index.mjs +1 -1
  98. package/dist/components/Projects/FileView.d.ts +2 -1
  99. package/dist/components/Projects/FileView.js +6 -1
  100. package/dist/components/Projects/FileView.mjs +1 -1
  101. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  102. package/dist/components/Projects/ProjectPage.js +6 -1
  103. package/dist/components/Projects/ProjectPage.mjs +1 -1
  104. package/dist/components/Projects/ProjectView.js +6 -1
  105. package/dist/components/Projects/ProjectView.mjs +1 -1
  106. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  107. package/dist/components/Projects/file-list.d.ts +2 -2
  108. package/dist/components/Projects/file-list.js +6 -1
  109. package/dist/components/Projects/file-list.mjs +1 -1
  110. package/dist/components/Projects/index.mjs +1 -1
  111. package/dist/components/dc-temp/index.js +6 -1
  112. package/dist/components/dc-temp/index.mjs +1 -1
  113. package/dist/components/index.js +25 -20
  114. package/dist/components/index.mjs +1 -1
  115. package/dist/index.js +35 -30
  116. package/dist/index.mjs +1 -1
  117. package/dist/metafile-cjs.json +1 -1
  118. package/dist/metafile-esm.json +1 -1
  119. package/dist/pages/Blog.mjs +1 -1
  120. package/dist/pages/Documentation.mjs +1 -1
  121. package/dist/pages/IndexPage.mjs +1 -1
  122. package/dist/pages/Intranet.mjs +1 -1
  123. package/dist/pages/LandingPage.mjs +1 -1
  124. package/dist/pages/Page.mjs +1 -1
  125. package/dist/pages/Publish.mjs +1 -1
  126. package/dist/pages/Website.mjs +1 -1
  127. package/dist/sections/AboutSection.mjs +1 -1
  128. package/dist/sections/BlogDetail.mjs +1 -1
  129. package/dist/sections/BlogList.mjs +1 -1
  130. package/dist/sections/BlogListSection.mjs +1 -1
  131. package/dist/sections/ContactSection.mjs +1 -1
  132. package/dist/sections/PageSections.mjs +1 -1
  133. package/dist/sections/PricingSection.mjs +1 -1
  134. package/dist/sections/ServiceDetail.mjs +1 -1
  135. package/dist/sections/ServiceDetailSection.mjs +1 -1
  136. package/dist/sections/ServiceSection.mjs +1 -1
  137. package/dist/sections/index.mjs +1 -1
  138. package/package.json +1 -1
  139. package/dist/chunk-JXQRVEQB.mjs +0 -4
  140. package/dist/chunk-NAGBKKTZ.mjs +0 -4
  141. package/dist/chunk-PZFYJ5FS.mjs +0 -4
@@ -2,4 +2,9 @@
2
2
  "use strict";
3
3
  "use client"
4
4
 
5
- "use strict";"use client";var Ri=Object.create;var st=Object.defineProperty;var Ti=Object.getOwnPropertyDescriptor;var Ai=Object.getOwnPropertyNames;var Ii=Object.getPrototypeOf,Mi=Object.prototype.hasOwnProperty;var Bi=(e,t)=>{for(var o in t)st(e,o,{get:t[o],enumerable:!0})},lo=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ai(t))!Mi.call(e,s)&&s!==o&&st(e,s,{get:()=>t[s],enumerable:!(i=Ti(t,s))||i.enumerable});return e};var O=(e,t,o)=>(o=e!=null?Ri(Ii(e)):{},lo(t||!e||!e.__esModule?st(o,"default",{value:e,enumerable:!0}):o,e)),zi=e=>lo(st({},"__esModule",{value:!0}),e);var Ma={};Bi(Ma,{default:()=>Si});module.exports=zi(Ma);var no=require("react"),St=require("motion/react"),ki=require("lucide-react");var bo=require("clsx");var At="-",Ei=e=>{let t=Li(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:n=>{let r=n.split(At);return r[0]===""&&r.length!==1&&r.shift(),po(r,t)||ji(n)},getConflictingClassGroupIds:(n,r)=>{let u=o[n]||[];return r&&i[n]?[...u,...i[n]]:u}}},po=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],i=t.nextPart.get(o),s=i?po(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;let a=e.join(At);return t.validators.find(({validator:n})=>n(a))?.classGroupId},co=/^\[(.+)\]$/,ji=e=>{if(co.test(e)){let t=co.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Li=e=>{let{theme:t,prefix:o}=e,i={nextPart:new Map,validators:[]};return Ui(Object.entries(e.classGroups),o).forEach(([a,n])=>{Tt(n,i,a,t)}),i},Tt=(e,t,o,i)=>{e.forEach(s=>{if(typeof s=="string"){let a=s===""?t:mo(t,s);a.classGroupId=o;return}if(typeof s=="function"){if(Fi(s)){Tt(s(i),t,o,i);return}t.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([a,n])=>{Tt(n,mo(t,a),o,i)})})},mo=(e,t)=>{let o=e;return t.split(At).forEach(i=>{o.nextPart.has(i)||o.nextPart.set(i,{nextPart:new Map,validators:[]}),o=o.nextPart.get(i)}),o},Fi=e=>e.isThemeGetter,Ui=(e,t)=>t?e.map(([o,i])=>{let s=i.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([n,r])=>[t+n,r])):a);return[o,s]}):e,Ki=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,i=new Map,s=(a,n)=>{o.set(a,n),t++,t>e&&(t=0,i=o,o=new Map)};return{get(a){let n=o.get(a);if(n!==void 0)return n;if((n=i.get(a))!==void 0)return s(a,n),n},set(a,n){o.has(a)?o.set(a,n):s(a,n)}}},uo="!",Oi=e=>{let{separator:t,experimentalParseClassName:o}=e,i=t.length===1,s=t[0],a=t.length,n=r=>{let u=[],h=0,D=0,L;for(let N=0;N<r.length;N++){let I=r[N];if(h===0){if(I===s&&(i||r.slice(N,N+a)===t)){u.push(r.slice(D,N)),D=N+a;continue}if(I==="/"){L=N;continue}}I==="["?h++:I==="]"&&h--}let z=u.length===0?r:r.substring(D),b=z.startsWith(uo),P=b?z.substring(1):z,p=L&&L>D?L-D:void 0;return{modifiers:u,hasImportantModifier:b,baseClassName:P,maybePostfixModifierPosition:p}};return o?r=>o({className:r,parseClassName:n}):n},Hi=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(i=>{i[0]==="["?(t.push(...o.sort(),i),o=[]):o.push(i)}),t.push(...o.sort()),t},Vi=e=>({cache:Ki(e.cacheSize),parseClassName:Oi(e),...Ei(e)}),Wi=/\s+/,Gi=(e,t)=>{let{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:s}=t,a=[],n=e.trim().split(Wi),r="";for(let u=n.length-1;u>=0;u-=1){let h=n[u],{modifiers:D,hasImportantModifier:L,baseClassName:z,maybePostfixModifierPosition:b}=o(h),P=!!b,p=i(P?z.substring(0,b):z);if(!p){if(!P){r=h+(r.length>0?" "+r:r);continue}if(p=i(z),!p){r=h+(r.length>0?" "+r:r);continue}P=!1}let N=Hi(D).join(":"),I=L?N+uo:N,j=I+p;if(a.includes(j))continue;a.push(j);let X=s(p,P);for(let q=0;q<X.length;++q){let F=X[q];a.push(I+F)}r=h+(r.length>0?" "+r:r)}return r};function $i(){let e=0,t,o,i="";for(;e<arguments.length;)(t=arguments[e++])&&(o=go(t))&&(i&&(i+=" "),i+=o);return i}var go=e=>{if(typeof e=="string")return e;let t,o="";for(let i=0;i<e.length;i++)e[i]&&(t=go(e[i]))&&(o&&(o+=" "),o+=t);return o};function _i(e,...t){let o,i,s,a=n;function n(u){let h=t.reduce((D,L)=>L(D),e());return o=Vi(h),i=o.cache.get,s=o.cache.set,a=r,r(u)}function r(u){let h=i(u);if(h)return h;let D=Gi(u,o);return s(u,D),D}return function(){return a($i.apply(null,arguments))}}var H=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},fo=/^\[(?:([a-z-]+):)?(.+)\]$/i,qi=/^\d+\/\d+$/,Ji=new Set(["px","full","screen"]),Xi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Qi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Yi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Zi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)ki-?((\d+)?\.?(\d+)[a-z]+|0)/,ea=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,we=e=>Ue(e)||Ji.has(e)||qi.test(e),De=e=>Ke(e,"length",la),Ue=e=>!!e&&!Number.isNaN(Number(e)),Rt=e=>Ke(e,"number",Ue),$e=e=>!!e&&Number.isInteger(Number(e)),ta=e=>e.endsWith("%")&&Ue(e.slice(0,-1)),S=e=>fo.test(e),ke=e=>Xi.test(e),oa=new Set(["length","size","percentage"]),ia=e=>Ke(e,oa,vo),aa=e=>Ke(e,"position",vo),ra=new Set(["image","url"]),na=e=>Ke(e,ra,ca),sa=e=>Ke(e,"",da),_e=()=>!0,Ke=(e,t,o)=>{let i=fo.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):o(i[2]):!1},la=e=>Qi.test(e)&&!Yi.test(e),vo=()=>!1,da=e=>Zi.test(e),ca=e=>ea.test(e);var ma=()=>{let e=H("colors"),t=H("spacing"),o=H("blur"),i=H("brightness"),s=H("borderColor"),a=H("borderRadius"),n=H("borderSpacing"),r=H("borderWidth"),u=H("contrast"),h=H("grayscale"),D=H("hueRotate"),L=H("invert"),z=H("gap"),b=H("gradientColorStops"),P=H("gradientColorStopPositions"),p=H("inset"),N=H("margin"),I=H("opacity"),j=H("padding"),X=H("saturate"),q=H("scale"),F=H("sepia"),d=H("skew"),w=H("space"),v=H("translate"),R=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],le=()=>["auto",S,t],g=()=>[S,t],We=()=>["",we,De],c=()=>["auto",Ue,S],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>["start","end","center","between","around","evenly","stretch"],Ge=()=>["","0",S],so=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ye=()=>[Ue,S];return{cacheSize:500,separator:":",theme:{colors:[_e],spacing:[we,De],blur:["none","",ke,S],brightness:ye(),borderColor:[e],borderRadius:["none","","full",ke,S],borderSpacing:g(),borderWidth:We(),contrast:ye(),grayscale:Ge(),hueRotate:ye(),invert:Ge(),gap:g(),gradientColorStops:[e],gradientColorStopPositions:[ta,De],inset:le(),margin:le(),opacity:ye(),padding:g(),saturate:ye(),scale:ye(),sepia:Ge(),skew:ye(),space:g(),translate:g()},classGroups:{aspect:[{aspect:["auto","square","video",S]}],container:["container"],columns:[{columns:[ke]}],"break-after":[{"break-after":so()}],"break-before":[{"break-before":so()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),S]}],overflow:[{overflow:U()}],"overflow-yo":[{"overflow-yo":U()}],"overflow-yo":[{"overflow-yo":U()}],overscroll:[{overscroll:R()}],"overscroll-yo":[{"overscroll-yo":R()}],"overscroll-yo":[{"overscroll-yo":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-yo":[{"inset-yo":[p]}],"inset-yo":[{"inset-yo":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",$e,S]}],basis:[{basis:le()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",S]}],grow:[{grow:Ge()}],shrink:[{shrink:Ge()}],order:[{order:["first","last","none",$e,S]}],"grid-cols":[{"grid-cols":[_e]}],"col-start-end":[{col:["auto",{span:["full",$e,S]},S]}],"col-start":[{"col-start":c()}],"col-end":[{"col-end":c()}],"grid-rows":[{"grid-rows":[_e]}],"row-start-end":[{row:["auto",{span:[$e,S]},S]}],"row-start":[{"row-start":c()}],"row-end":[{"row-end":c()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",S]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",S]}],gap:[{gap:[z]}],"gap-yo":[{"gap-yo":[z]}],"gap-yo":[{"gap-yo":[z]}],"justify-content":[{justify:["normal",...de()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...de(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...de(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[j]}],px:[{px:[j]}],py:[{py:[j]}],ps:[{ps:[j]}],yo:[{yo:[j]}],pt:[{pt:[j]}],pr:[{pr:[j]}],pb:[{pb:[j]}],pl:[{pl:[j]}],yo:[{yo:[N]}],mx:[{mx:[N]}],my:[{my:[N]}],ms:[{ms:[N]}],me:[{me:[N]}],mt:[{mt:[N]}],mr:[{mr:[N]}],mb:[{mb:[N]}],ml:[{ml:[N]}],"space-yo":[{"space-yo":[w]}],"space-yo-reverse":["space-yo-reverse"],"space-yo":[{"space-yo":[w]}],"space-yo-reverse":["space-yo-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",S,t]}],"min-w":[{"min-w":[S,t,"min","max","fit"]}],"max-w":[{"max-w":[S,t,"none","full","min","max","fit","prose",{screen:[ke]},ke]}],h:[{h:[S,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[S,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[S,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[S,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ke,De]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Rt]}],"font-family":[{font:[_e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",S]}],"line-clamp":[{"line-clamp":["none",Ue,Rt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",we,S]}],"list-image":[{"list-image":["none",S]}],"list-style-type":[{list:["none","disc","decimal",S]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[I]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",we,De]}],"underline-offset":[{"underline-offset":["auto",we,S]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:g()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",S]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",S]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[I]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),aa]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","yo","yo","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ia]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},na]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[P]}],"gradient-via-pos":[{via:[P]}],"gradient-to-pos":[{to:[P]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-yo":[{"rounded-yo":[a]}],"rounded-yo":[{"rounded-yo":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[r]}],"border-w-yo":[{"border-yo":[r]}],"border-w-yo":[{"border-yo":[r]}],"border-w-s":[{"border-s":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-b":[{"border-b":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[I]}],"border-style":[{border:[...K(),"hidden"]}],"divide-yo":[{"divide-yo":[r]}],"divide-yo-reverse":["divide-yo-reverse"],"divide-yo":[{"divide-yo":[r]}],"divide-yo-reverse":["divide-yo-reverse"],"divide-opacity":[{"divide-opacity":[I]}],"divide-style":[{divide:K()}],"border-color":[{border:[s]}],"border-color-yo":[{"border-yo":[s]}],"border-color-yo":[{"border-yo":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[we,S]}],"outline-w":[{outline:[we,De]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:We()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[I]}],"ring-offset-w":[{"ring-offset":[we,De]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ke,sa]}],"shadow-color":[{shadow:[_e]}],opacity:[{opacity:[I]}],"mix-blend":[{"mix-blend":[...xe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":xe()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[i]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",ke,S]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[D]}],invert:[{invert:[L]}],saturate:[{saturate:[X]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[D]}],"backdrop-invert":[{"backdrop-invert":[L]}],"backdrop-opacity":[{"backdrop-opacity":[I]}],"backdrop-saturate":[{"backdrop-saturate":[X]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-yo":[{"border-spacing-yo":[n]}],"border-spacing-yo":[{"border-spacing-yo":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",S]}],duration:[{duration:ye()}],ease:[{ease:["linear","in","out","in-out",S]}],delay:[{delay:ye()}],animate:[{animate:["none","spin","ping","pulse","bounce",S]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[q]}],"scale-yo":[{"scale-yo":[q]}],"scale-yo":[{"scale-yo":[q]}],rotate:[{rotate:[$e,S]}],"translate-yo":[{"translate-yo":[v]}],"translate-yo":[{"translate-yo":[v]}],"skew-yo":[{"skew-yo":[d]}],"skew-yo":[{"skew-yo":[d]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",S]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","yo-resize","nw-resize","yo-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",S]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","yo","yo",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-yo":[{"scroll-yo":g()}],"scroll-mx":[{"scroll-mx":g()}],"scroll-my":[{"scroll-my":g()}],"scroll-ms":[{"scroll-ms":g()}],"scroll-me":[{"scroll-me":g()}],"scroll-mt":[{"scroll-mt":g()}],"scroll-mr":[{"scroll-mr":g()}],"scroll-mb":[{"scroll-mb":g()}],"scroll-ml":[{"scroll-ml":g()}],"scroll-p":[{"scroll-p":g()}],"scroll-px":[{"scroll-px":g()}],"scroll-py":[{"scroll-py":g()}],"scroll-ps":[{"scroll-ps":g()}],"scroll-yo":[{"scroll-yo":g()}],"scroll-pt":[{"scroll-pt":g()}],"scroll-pr":[{"scroll-pr":g()}],"scroll-pb":[{"scroll-pb":g()}],"scroll-pl":[{"scroll-pl":g()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","yo","yo","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-yo":[{"touch-pan":["yo","left","right"]}],"touch-yo":[{"touch-pan":["yo","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",S]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[we,De,Rt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-yo","overflow-yo"],overscroll:["overscroll-yo","overscroll-yo"],inset:["inset-yo","inset-yo","start","end","top","right","bottom","left"],"inset-yo":["right","left"],"inset-yo":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-yo","gap-yo"],p:["px","py","ps","yo","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],yo:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-yo","rounded-yo","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-yo","rounded-yo"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-yo","border-spacing-yo"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-yo":["border-w-r","border-w-l"],"border-w-yo":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-yo":["border-color-r","border-color-l"],"border-color-yo":["border-color-t","border-color-b"],"scroll-yo":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-yo","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-yo","touch-yo","touch-pz"],"touch-yo":["touch"],"touch-yo":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ho=_i(ma);function l(...e){return ho((0,bo.clsx)(e))}var vt=O(require("react")),Lt=O(require("next/link"));var xo=require("class-variance-authority");var yo=require("react/jsx-runtime"),pa=(0,xo.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ce({className:e,variant:t,...o}){return(0,yo.jsx)("div",{className:l(pa({variant:t}),e),...o})}var wo=require("@radix-ui/react-slot"),Co=O(require("react")),ua=(0,xo.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),T=Co.forwardRef(({asChild:e=!1,className:t,size:o,variant:i,...s},a)=>(0,yo.jsx)(e?wo.Slot:"button",{className:l(ua({className:t,size:o,variant:i})),ref:a,...s}));T.displayName="Button";var Do=O(require("react"));var fe=Do.forwardRef(({className:e,type:t,...o},i)=>(0,yo.jsx)("input",{type:t,className:l("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...o}));fe.displayName="Input";var It=O(require("react")),me=O(require("@radix-ui/react-scroll-area"));var Re=It.forwardRef(({className:e,children:t,...o},i)=>(0,yo.jsxs)(me.Root,{ref:i,className:l("relative overflow-hidden",e),...o,children:[(0,yo.jsx)(me.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,yo.jsx)(So,{}),(0,yo.jsx)(me.Corner,{})]}));Re.displayName=me.Root.displayName;var So=It.forwardRef(({className:e,orientation:t="vertical",...o},i)=>(0,yo.jsx)(me.ScrollAreaScrollbar,{ref:i,orientation:t,className:l("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,yo.jsx)(me.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));So.displayName=me.ScrollAreaScrollbar.displayName;var qe=O(require("react")),Q=O(require("@radix-ui/react-dialog"));var To=Q.Root;var ga=Q.Portal;var Ao=qe.forwardRef(({className:e,...t},o)=>(0,yo.jsx)(Q.Overlay,{ref:o,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ao.displayName=Q.Overlay.displayName;var Mt=qe.forwardRef(({className:e,children:t,...o},i)=>(0,yo.jsxs)(ga,{children:[(0,yo.jsx)(Ao,{}),(0,yo.jsxs)(Q.Content,{ref:i,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-yo-[-50%] translate-yo-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,yo.jsxs)(Q.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,yo.jsx)(ki.X,{className:"h-4 w-4"}),(0,yo.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Mt.displayName=Q.Content.displayName;var Bt=({className:e,...t})=>(0,yo.jsx)("div",{className:l("flex flex-col space-yo-1.5 text-center sm:text-left",e),...t});Bt.displayName="DialogHeader";var fa=({className:e,...t})=>(0,yo.jsx)("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-yo-2",e),...t});fa.displayName="DialogFooter";var zt=qe.forwardRef(({className:e,...t},o)=>(0,yo.jsx)(Q.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",e),...t}));zt.displayName=Q.Title.displayName;var va=qe.forwardRef(({className:e,...t},o)=>(0,yo.jsx)(Q.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));va.displayName=Q.Description.displayName;var Je=O(require("@radix-ui/react-checkbox")),Mo=O(require("react")),Et=Mo.forwardRef(({className:e,...t},o)=>(0,yo.jsx)(Je.Root,{className:l("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,yo.jsx)(Je.Indicator,{className:l("flex items-center justify-center text-current"),children:(0,yo.jsx)(ki.Check,{className:"h-4 w-4"})})}));Et.displayName=Je.Root.displayName;var ve=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),zo=[{id:"home",title:"Home",icon:(0,yo.jsx)(ki.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,yo.jsx)(ki.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,yo.jsx)(ki.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Me",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,yo.jsx)(ki.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,yo.jsx)(ki.FileText,{}),url:"/knowledge"}],Eo=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"yo new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],jo=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,yo.jsx)(ki.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,yo.jsx)(ki.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,yo.jsx)(ki.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,yo.jsx)(ki.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,yo.jsx)(ki.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,yo.jsx)(ki.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,yo.jsx)(ki.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,yo.jsx)(ki.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,yo.jsx)(ki.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,yo.jsx)(ki.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],mt=[{id:"1",name:"ki-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var jt=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],dt=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],ut=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],ha=[...ut,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],ba=[...mt,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],ct={projects:[{id:"1",name:"Empty Project",description:"yo project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},Bo={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:ut.filter(e=>e.epicId==="1")};var er={empty:{initialProjects:ct.projects,initialEpics:ct.epics,initialSprints:ct.sprints,initialTasks:ct.tasks},default:{initialProjects:mt,initialEpics:jt,initialSprints:dt,initialTasks:ut},highDensity:{initialProjects:mt,initialEpics:jt,initialSprints:dt,initialTasks:ha},singleEpic:{initialProjects:mt,initialEpics:Bo.epics,initialSprints:dt,initialTasks:Bo.tasks},multipleProjects:{initialProjects:ba,initialEpics:jt,initialSprints:dt,initialTasks:ut}},pt=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(ve),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(ve),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(ve),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(ve),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(ve),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(ve),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(ve),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(ve),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(ve),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(ve),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],tr=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:pt.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:pt.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:pt.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var or=pt.filter(e=>e.type==="digital");function ft(e,t){let[o,i]=(0,no.useState)(()=>{if(typeof window>"u")return t;try{let a=window.localStorage.getItem(e);return a?JSON.parse(a):t}catch{return t}}),s=a=>{try{i(a),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(a))}catch{}};return(0,no.useEffect)(()=>{s(o)},[]),[o,s]}function Ft({items:e,isOpen:t,isMobile:o=!1,onClose:i,currentBusinessUnit:s=jo[0],onBusinessUnitChange:a,onSearch:n,className:r,logo:u="/headerlogo.png",appName:h="Nuvia",tagline:D="Collaboration Platform"}){let[L,z]=vt.useState({}),[b,P]=ft("sidebar-favorites",{}),[p,N]=vt.useState(null),[I,j]=vt.useState(""),X=c=>{z(G=>({...G,[c]:!G[c]}))},q=c=>{a?.(c)},F=()=>{I.trim()&&n?.(I.trim())},d=c=>{c.key==="Enter"&&(c.preventDefault(),F())},w=(c,G)=>{let K=b[c]||[],xe=K.includes(G)?K.filter(de=>de!==G):K.concat(G);P({...b,[c]:xe})},v=c=>{if(!c.items||!c.maxItems||c.items.length<=c.maxItems)return c.items||[];let G=b[c.id]||[],K=c.items.filter(de=>G.includes(de.id)),xe=c.items.filter(de=>!G.includes(de.id));return[...K,...xe].slice(0,c.maxItems)},R=c=>c.maxItems&&c.items&&c.items.length>c.maxItems,U=e,le=c=>{let G=R(c),K=v(c),xe=(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsxs)("div",{className:"flex items-center gap-3",children:[c.icon,(0,yo.jsx)("span",{children:c.title})]}),c.badge&&(0,yo.jsx)(ce,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:c.badge}),c.items&&(0,yo.jsx)(ki.ChevronDown,{className:l("ml-2 h-4 w-4 transition-transform",L[c.title]?"rotate-180":"")})]}),de=l("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",c.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return c.url?(0,yo.jsx)(Lt.default,{href:c.url,className:de,onClick:o?i:void 0,children:xe}):(0,yo.jsx)("button",{className:de,onClick:()=>c.items&&X(c.title),children:xe})},g=()=>{let c=e.find(K=>K.id===p);if(!c||!c.items||!c.maxItems)return null;let G=b[c.id]||[];return(0,yo.jsx)(To,{open:!!p,onOpenChange:K=>!K&&N(null),children:(0,yo.jsxs)(Mt,{className:"sm:max-w-md",children:[(0,yo.jsxs)(Bt,{children:[(0,yo.jsxs)(zt,{children:["Manage ",c.title," Favorites"]}),(0,yo.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",c.maxItems," items to show in ",c.title.toLowerCase(),"."]})]}),(0,yo.jsx)(Re,{className:"max-h-96 pr-4",children:(0,yo.jsx)("div",{className:"space-yo-4",children:c.items.map(K=>(0,yo.jsxs)("div",{className:"flex items-center space-yo-2",children:[(0,yo.jsx)(Et,{id:K.id,checked:G.includes(K.id),onCheckedChange:()=>w(c.id,K.id),disabled:!G.includes(K.id)&&G.length>=(c.maxItems||0)}),(0,yo.jsxs)("label",{htmlFor:K.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[K.title,K.badge&&(0,yo.jsx)(ce,{variant:"outline",className:"text-xs",children:K.badge})]})]},K.id))})})]})})},We=(0,yo.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,yo.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,yo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,yo.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,yo.jsx)("img",{src:u,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,yo.jsxs)("div",{children:[(0,yo.jsx)("h2",{className:"font-semibold",children:h}),(0,yo.jsx)("p",{className:"text-xs text-muted-foreground",children:D})]})]}),o&&(0,yo.jsx)(T,{variant:"ghost",size:"icon",onClick:i,children:(0,yo.jsx)(ki.X,{className:"h-5 w-5"})})]}),(0,yo.jsx)("div",{className:"px-3 py-2",children:(0,yo.jsxs)("div",{className:"relative",children:[(0,yo.jsx)(ki.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,yo.jsx)(fe,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:I,onChange:c=>j(c.target.value),onKeyPress:d})]})}),(0,yo.jsx)(Re,{className:"flex-1 px-3 py-2",children:(0,yo.jsx)("div",{className:"space-yo-1",children:U.map(c=>(0,yo.jsxs)("div",{className:"mb-1",children:[le(c),c.items&&L[c.title]&&(0,yo.jsxs)("div",{className:"mt-1 ml-6 space-yo-1 border-l pl-3",children:[v(c).map(G=>(0,yo.jsxs)(Lt.default,{href:G.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:o?i:void 0,children:[G.title,G.badge&&(0,yo.jsx)(ce,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:G.badge})]},G.id)),R(c)&&c.items&&c.items.length>v(c).length&&(0,yo.jsxs)("button",{onClick:()=>N(c.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",c.items.length-v(c).length," more available"]})]})]},c.id))})}),(0,yo.jsx)("div",{className:"p-3",children:(0,yo.jsx)("div",{className:"space-yo-1",children:(0,yo.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,yo.jsx)(ki.Settings,{className:"h-5 w-5"}),(0,yo.jsx)("span",{children:"Settings"})]})})}),(0,yo.jsx)(g,{})]});return o?(0,yo.jsx)("div",{className:l("fixed inset-yo-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-yo-0":"-translate-yo-full",r),children:We}):(0,yo.jsx)("div",{className:l("fixed inset-yo-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-yo-0":"-translate-yo-full",r),children:We})}var ht=O(require("react")),Ne=O(require("@radix-ui/react-avatar"));var Ut=ht.forwardRef(({className:e,...t},o)=>(0,yo.jsx)(Ne.Root,{ref:o,className:l("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ut.displayName=Ne.Root.displayName;var Kt=ht.forwardRef(({className:e,...t},o)=>(0,yo.jsx)(Ne.Image,{ref:o,className:l("aspect-square h-full w-full",e),...t}));Kt.displayName=Ne.Image.displayName;var Ot=ht.forwardRef(({className:e,...t},o)=>(0,yo.jsx)(Ne.Fallback,{ref:o,className:l("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ot.displayName=Ne.Fallback.displayName;var Lo=O(require("react")),ue=O(require("@radix-ui/react-tooltip"));var xt=ue.Provider,yt=ue.Root,wt=ue.Trigger,Xe=Lo.forwardRef(({className:e,sideOffset:t=4,...o},i)=>(0,yo.jsx)(ue.Portal,{children:(0,yo.jsx)(ue.Content,{ref:i,sideOffset:t,className:l("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Xe.displayName=ue.Content.displayName;var Fo=require("next-themes");function Uo(){let{setTheme:e,theme:t}=(0,Fo.useTheme)();return(0,yo.jsx)(xt,{children:(0,yo.jsxs)(yt,{children:[(0,yo.jsx)(wt,{asChild:!0,children:(0,yo.jsxs)(T,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,yo.jsx)(ki.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,yo.jsx)(ki.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,yo.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,yo.jsx)(Xe,{children:"Toggle theme"})]})})}function Ko({notifications:e,open:t,onClose:o,onNotificationRemove:i,onRemoveAll:s,className:a}){let n=e.filter(h=>!h.read),r=n.length,u=h=>{switch(h){case"info":return(0,yo.jsx)(ki.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,yo.jsx)(ki.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,yo.jsx)(ki.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,yo.jsx)(ki.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,yo.jsx)(St.AnimatePresence,{children:t&&(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)(St.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:o}),(0,yo.jsx)(St.motion.div,{initial:{yo:"100%"},animate:{yo:0},exit:{yo:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:l("fixed inset-yo-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",a),children:(0,yo.jsxs)("div",{className:"flex h-full flex-col",children:[(0,yo.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,yo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,yo.jsx)(ki.Bell,{className:"h-5 w-5"}),(0,yo.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),r>0&&(0,yo.jsxs)(ce,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[r," new"]})]}),(0,yo.jsxs)(T,{variant:"ghost",size:"icon",onClick:o,className:"rounded-full",children:[(0,yo.jsx)(ki.X,{className:"h-5 w-5"}),(0,yo.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r>0&&(0,yo.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,yo.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r," unread notification",r!==1?"s":""]}),(0,yo.jsx)(T,{variant:"ghost",size:"sm",onClick:s,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,yo.jsx)(Re,{className:"flex-1",children:(0,yo.jsx)("div",{className:"divide-yo",children:n.map(h=>(0,yo.jsxs)("div",{className:l("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,yo.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:u(h.type)}),(0,yo.jsxs)("div",{className:"flex-1 space-yo-1",children:[(0,yo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,yo.jsx)("p",{className:"font-medium",children:h.title}),(0,yo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,yo.jsx)("p",{className:"text-xs text-muted-foreground",children:h.time}),(0,yo.jsx)(T,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>i?.(h.id),title:"Dismiss",children:(0,yo.jsx)(ki.Check,{className:"h-3 w-3"})})]})]}),(0,yo.jsx)("p",{className:"text-sm text-muted-foreground",children:h.description}),h.actionLabel&&(0,yo.jsxs)(T,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:h.onAction,children:[h.actionLabel,(0,yo.jsx)(ki.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},h.id))})}):(0,yo.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,yo.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,yo.jsx)(ki.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,yo.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"xo notifications"}),(0,yo.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Be=O(require("@radix-ui/react-tabs"));function Oo({className:e,...t}){return(0,yo.jsx)(Be.Root,{"data-slot":"tabs",className:l("flex flex-col gap-2",e),...t})}function Ho({className:e,...t}){return(0,yo.jsx)(Be.List,{"data-slot":"tabs-list",className:l("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Vo({className:e,...t}){return(0,yo.jsx)(Be.Trigger,{"data-slot":"tabs-trigger",className:l("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var Ce=O(require("react")),M=O(require("@radix-ui/react-dropdown-menu")),Oe=require("@radix-ui/react-icons");var Wo=M.Root,Go=M.Trigger;var xa=Ce.forwardRef(({className:e,inset:t,children:o,...i},s)=>(0,yo.jsxs)(M.SubTrigger,{ref:s,className:l("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...i,children:[o,(0,yo.jsx)(Oe.ChevronRightIcon,{className:"ml-auto"})]}));xa.displayName=M.SubTrigger.displayName;var ya=Ce.forwardRef(({className:e,...t},o)=>(0,yo.jsx)(M.SubContent,{ref:o,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));ya.displayName=M.SubContent.displayName;var Vt=Ce.forwardRef(({className:e,sideOffset:t=4,...o},i)=>(0,yo.jsx)(M.Portal,{children:(0,yo.jsx)(M.Content,{ref:i,sideOffset:t,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Vt.displayName=M.Content.displayName;var Wt=Ce.forwardRef(({className:e,inset:t,...o},i)=>(0,yo.jsx)(M.Item,{ref:i,className:l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));Wt.displayName=M.Item.displayName;var wa=Ce.forwardRef(({className:e,children:t,checked:o,...i},s)=>(0,yo.jsxs)(M.CheckboxItem,{ref:s,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...i,children:[(0,yo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,yo.jsx)(M.ItemIndicator,{children:(0,yo.jsx)(Oe.CheckIcon,{className:"h-4 w-4"})})}),t]}));wa.displayName=M.CheckboxItem.displayName;var Na=Ce.forwardRef(({className:e,children:t,...o},i)=>(0,yo.jsxs)(M.RadioItem,{ref:i,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,yo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,yo.jsx)(M.ItemIndicator,{children:(0,yo.jsx)(Oe.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Na.displayName=M.RadioItem.displayName;var Ca=Ce.forwardRef(({className:e,inset:t,...o},i)=>(0,yo.jsx)(M.Label,{ref:i,className:l("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));Ca.displayName=M.Label.displayName;var Pa=Ce.forwardRef(({className:e,...t},o)=>(0,yo.jsx)(M.Separator,{ref:o,className:l("-mx-1 my-1 h-px bg-muted",e),...t}));Pa.displayName=M.Separator.displayName;var Da=({className:e,...t})=>(0,yo.jsx)("span",{className:l("ml-auto text-xs tracking-widest opacity-60",e),...t});Da.displayName="DropdownMenuShortcut";function _o({activeTab:e,onTabChange:t,tabOptions:o,className:i="",maxWidth:s="700px",gridCols:a=6}){let n=o.find(r=>r.value===e);return(0,yo.jsxs)(St.motion.div,{className:`flex-1 flex justify-center ${i}`,initial:{opacity:0,yo:-20},animate:{opacity:1,yo:0},transition:{duration:.3,ease:"easeOut"},children:[(0,yo.jsx)("div",{className:"hidden lg:block",children:(0,yo.jsx)(Oo,{value:e,onValueChange:t,children:(0,yo.jsx)(Ho,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(a,o.length)}, minmax(0, 1fr))`},children:o.map(r=>(0,yo.jsx)(St.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,yo.jsx)(Vo,{value:r.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:r.label})},r.value))})})}),(0,yo.jsx)("div",{className:"lg:hidden",children:(0,yo.jsxs)(Wo,{children:[(0,yo.jsx)(Go,{asChild:!0,children:(0,yo.jsxs)(T,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,yo.jsx)($o.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,yo.jsx)(Vt,{align:"center",className:"w-[180px]",children:o.map(r=>(0,yo.jsx)(Wt,{onClick:()=>t?.(r.value),className:`cursor-pointer ${e===r.value?"bg-accent":""}`,children:r.label},r.value))})]})})]})}function qo({title:e,notifications:t=[],onToggleSidebar:o,onToggleMobileMenu:i,sidebarOpen:s=!0,className:a,activeTab:n="assistant",onTabChange:r,showTabs:u=!0,tabOptions:h=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:D,actionIcon:L=(0,yo.jsx)(ki.Bot,{className:"mr-2 h-4 w-4"}),actionText:z="Action",onNotificationRemove:b,onRemoveAll:P,logo:p="/headerlogo.png",appName:N="Nuvia",tagline:I="Collaboration Platform"}){let[j,X]=(0,$t.useState)(!1),[q,F]=(0,$t.useState)(t),d=q.filter(R=>!R.read).length,w=R=>{F(U=>U.filter(le=>le.id!==R)),b?.(R)},v=()=>{F(R=>R.filter(U=>U.read)),P?.()};return(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${a||""}`,children:[(0,yo.jsx)(T,{variant:"ghost",size:"icon",className:"md:hidden",onClick:i,children:(0,yo.jsx)(ki.Menu,{className:"h-5 w-5"})}),(0,yo.jsx)(T,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:o,children:(0,yo.jsx)(ki.PanelLeft,{className:"h-5 w-5"})}),!s&&(0,yo.jsxs)(St.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,yo:-20},animate:{opacity:1,yo:0},transition:{duration:.3},children:[(0,yo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,yo.jsx)("img",{src:p,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,yo.jsxs)("div",{children:[(0,yo.jsx)("h2",{className:"font-semibold text-sm",children:N}),(0,yo.jsx)("p",{className:"text-xs text-muted-foreground",children:I})]})]}),(0,yo.jsxs)("div",{className:"flex flex-1 items-center",children:[u&&(0,yo.jsx)(_o,{activeTab:n,onTabChange:r,tabOptions:h}),(0,yo.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,yo.jsx)(St.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,yo:20},animate:{opacity:1,yo:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,yo.jsx)(St.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,yo.jsxs)(T,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:D,children:[L,z]})})}),(0,yo.jsx)(Uo,{}),(0,yo.jsx)(xt,{children:(0,yo.jsxs)(yt,{children:[(0,yo.jsx)(wt,{asChild:!0,children:(0,yo.jsx)(St.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,yo.jsxs)(T,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>X(!0),children:[(0,yo.jsx)(St.motion.div,{animate:d>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:d>0?1/0:0,repeatDelay:3},children:(0,yo.jsx)(ki.Bell,{className:"h-5 w-5"})}),d>0&&(0,yo.jsx)(St.motion.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:d})]})})}),(0,yo.jsx)(Xe,{children:"Notifications"})]})}),(0,yo.jsx)(St.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,yo.jsxs)(Ut,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,yo.jsx)(Kt,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,yo.jsx)(Ot,{})]})})]})]})]}),(0,yo.jsx)(Ko,{notifications:q,open:j,onClose:()=>X(!1),onNotificationRemove:w,onRemoveAll:v})]})}var Jo=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,yo.jsx)(ki.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Qo({sidebarItems:e,children:t,title:o="Digital Colleagues",notifications:i=[],currentBusinessUnit:s=Jo[0],onBusinessUnitChange:a,onSearch:n,businessUnits:r=Jo,activeTab:u,onTabChange:h,showTabs:D=!1,onActionClick:L,actionIcon:z,actionText:b="Action",onNotificationRemove:P,onRemoveAll:p,logo:N="/headerlogo.png",appName:I="Nuvia",tagline:j="Collaboration Platform",sidebarInitiallyClosed:X=!1}){let[q,F]=(0,no.useState)(!X),[d,w]=(0,no.useState)(!1),[v,R]=(0,no.useState)(s),U=le=>{R(le),a?.(le)};return(0,yo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[d&&(0,yo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>w(!1)}),(0,yo.jsx)("div",{className:"md:hidden",children:(0,yo.jsx)(Ft,{items:e,isOpen:d,isMobile:!0,onClose:()=>w(!1),currentBusinessUnit:v,onBusinessUnitChange:U,onSearch:n,logo:N,appName:I,tagline:j})}),(0,yo.jsx)("div",{className:"hidden md:block",children:(0,yo.jsx)(Ft,{items:e,isOpen:q,isMobile:!1,currentBusinessUnit:v,onBusinessUnitChange:U,onSearch:n,logo:N,appName:I,tagline:j})}),(0,yo.jsxs)("div",{className:l("min-h-screen fixed w-full transition-all duration-300 ease-in-out",q?"md:pl-64":"md:pl-0"),children:[(0,yo.jsx)(qo,{title:o,notifications:i,onToggleSidebar:()=>F(!q),onToggleMobileMenu:()=>w(!0),sidebarOpen:q,activeTab:u,onTabChange:h,showTabs:D,onActionClick:L,actionIcon:z,actionText:b,onNotificationRemove:P,onRemoveAll:p,logo:N,appName:I,tagline:j}),(0,yo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var Dt=require("react-icons/fa");function be({title:e,description:t,badge:o,primaryAction:i,secondaryAction:s,gradient:a,children:n,className:r}){let[u,h]=ft(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!s&&!t),D=!s&&!t||u;return(0,yo.jsxs)(St.motion.div,{initial:{opacity:0,yo:20},animate:{opacity:1,yo:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${a} p-8 text-white ${r||""}`,children:[(0,yo.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,yo.jsxs)("div",{className:"flex items-center gap-3",children:[o&&(0,yo.jsx)(ce,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:o}),(0,yo.jsx)("h2",{className:"text-3xl font-bold yo-0",children:e})]}),(0,yo.jsxs)("div",{className:"flex items-center gap-3",children:[D&&i&&(0,yo.jsx)(T,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:i.onClick,children:i.label}),(s||t)&&(0,yo.jsx)("button",{"aria-label":u?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>h(!u),style:{lineHeight:0},children:u?(0,yo.jsx)(Dt.FaChevronDown,{size:22}):(0,yo.jsx)(Dt.FaChevronUp,{size:22})})]})]}),!D&&(0,yo.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,yo.jsxs)("div",{className:"space-yo-4",children:[(0,yo.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,yo.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i&&(0,yo.jsx)(T,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:i.onClick,children:i.label}),s&&(0,yo.jsx)(T,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:s.onClick,children:s.label})]})]}),n&&(0,yo.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var ze=O(require("react"));var Ye=ze.forwardRef(({className:e,...t},o)=>(0,yo.jsx)("div",{ref:o,className:l("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Ye.displayName="Card";var Ze=ze.forwardRef(({className:e,...t},o)=>(0,yo.jsx)("div",{ref:o,className:l("flex flex-col space-yo-1.5 p-6",e),...t}));Ze.displayName="CardHeader";var et=ze.forwardRef(({className:e,...t},o)=>(0,yo.jsx)("div",{ref:o,className:l("font-semibold leading-none tracking-tight",e),...t}));et.displayName="CardTitle";var tt=ze.forwardRef(({className:e,...t},o)=>(0,yo.jsx)("div",{ref:o,className:l("text-sm text-muted-foreground",e),...t}));tt.displayName="CardDescription";var ot=ze.forwardRef(({className:e,...t},o)=>(0,yo.jsx)("div",{ref:o,className:l("p-6 pt-0",e),...t}));ot.displayName="CardContent";var it=ze.forwardRef(({className:e,...t},o)=>(0,yo.jsx)("div",{ref:o,className:l("flex items-center p-6 pt-0",e),...t}));it.displayName="CardFooter";var Zo=O(require("react")),at=O(require("@radix-ui/react-progress"));var rt=Zo.forwardRef(({className:e,value:t,...o},i)=>(0,yo.jsx)(at.Root,{ref:i,className:l("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...o,children:(0,yo.jsx)(at.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));rt.displayName=at.Root.displayName;function qt({app:e,onOpen:t,onFavorite:o,showProgress:i=!1,className:s}){return(0,yo.jsx)(St.motion.div,{whileHover:{scale:1.02,yo:-5},whileTap:{scale:.98},className:s,children:(0,yo.jsxs)(Ye,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,yo.jsx)(Ze,{className:"pb-2",children:(0,yo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,yo.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,yo.jsx)(ce,{className:"rounded-xl bg-amber-500",children:"New"}):(0,yo.jsx)(T,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>o?.(e),children:(0,yo.jsx)(ki.Star,{className:"h-4 w-4"})})]})}),(0,yo.jsxs)(ot,{className:"pb-2",children:[(0,yo.jsx)(et,{className:"text-lg",children:e.name}),(0,yo.jsx)(tt,{children:e.description}),i&&e.progress<100&&(0,yo.jsxs)("div",{className:"mt-2",children:[(0,yo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,yo.jsx)("span",{children:"Installation"}),(0,yo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,yo.jsx)(rt,{value:e.progress,className:"h-2 mt-1 rounded-xl"})]})]}),(0,yo.jsx)(it,{children:(0,yo.jsx)(T,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}var ka=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function ai({files:e,onFileClick:t,onFileEdit:o,onFileDelete:i,showHeader:s=!0,className:a}){return(0,yo.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${a||""}`,children:[s&&(0,yo.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,yo.jsx)("div",{className:"col-span-6",children:"Name"}),(0,yo.jsx)("div",{className:"col-span-2",children:"Size"}),(0,yo.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,yo.jsx)("div",{className:"divide-yo",children:e.map(n=>(0,yo.jsxs)(St.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(n),children:[(0,yo.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,yo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,yo.jsx)("div",{children:(0,yo.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,yo.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:ka(n.filesize)}),(0,yo.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,yo.jsx)("span",{className:"text-sm md:text-base",children:new Date(n.createdAt).toLocaleDateString()}),(0,yo.jsx)("div",{className:"flex gap-1",children:(0,yo.jsx)(T,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:r=>{r.stopPropagation(),i?.(n)},children:(0,yo.jsx)(ki.Trash2,{className:"h-4 w-4"})})})]})]},n.name))})]})}function ni({project:e,onOpen:t,onShare:o,className:i}){return(0,yo.jsx)(St.motion.div,{whileHover:{scale:1.02,yo:-5},whileTap:{scale:.98},className:i,children:(0,yo.jsxs)(Ye,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,yo.jsxs)(Ze,{children:[(0,yo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,yo.jsx)(et,{children:e.name}),(0,yo.jsxs)(ce,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,yo.jsx)(tt,{children:e.description})]}),(0,yo.jsxs)(ot,{className:"space-yo-4",children:[(0,yo.jsxs)("div",{className:"space-yo-2",children:[(0,yo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,yo.jsx)("span",{children:"Progress"}),(0,yo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,yo.jsx)(rt,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,yo.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,yo.jsxs)("div",{className:"flex items-center",children:[(0,yo.jsx)(ki.Users,{className:"mr-1 h-4 w-4"}),e.members," members"]}),(0,yo.jsxs)("div",{className:"flex items-center",children:[(0,yo.jsx)(ki.FileText,{className:"mr-1 h-4 w-4"}),e.files," files"]})]})]}),(0,yo.jsxs)(it,{className:"flex gap-2",children:[(0,yo.jsx)(T,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,yo.jsx)(T,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>o?.(e),children:(0,yo.jsx)(ki.Share2,{className:"h-4 w-4"})})]})]})})}var Jt=[{name:"PixelMaster",icon:(0,yo.jsx)(ki.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,yo.jsx)(ki.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,yo.jsx)(ki.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,yo.jsx)(ki.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,yo.jsx)(ki.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,yo.jsx)(ki.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,yo.jsx)(ki.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,yo.jsx)(ki.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,yo.jsx)(ki.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,yo.jsx)(ki.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,yo.jsx)(ki.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,yo.jsx)(ki.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],si=[{id:1,filename:"Brand Redesign.pxm",filesize:24.5,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:2,filename:"Company Logo.vec",filesize:8.2,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:3,filename:"Product Launch Video.vid",filesize:1.2,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:4,filename:"UI Animation.mfx",filesize:345,url:"https://example.com/ui-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:5,filename:"Magazine Layout.pgc",filesize:42.8,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:6,filename:"Mobile App Design.uxf",filesize:18.3,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:7,filename:"Product Photography.phl",filesize:156,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1}];var li=[{title:"Mastering Digital Illustration",description:"Learn advanced techniques for creating stunning digital art",duration:"1h 45m",level:"Advanced",instructor:"Sarah Chen",category:"Illustration",views:"24K"},{title:"UI/UX Design Fundamentals",description:"Essential principles for creating intuitive user interfaces",duration:"2h 20m",level:"Intermediate",instructor:"Michael Rodriguez",category:"Design",views:"56K"},{title:"Video Editing Masterclass",description:"Professional techniques for cinematic video editing",duration:"3h 10m",level:"Advanced",instructor:"James Wilson",category:"Video",views:"32K"},{title:"Typography Essentials",description:"Create beautiful and effective typography for any project",duration:"1h 30m",level:"Beginner",instructor:"Emma Thompson",category:"Typography",views:"18K"},{title:"Color Theory for Designers",description:"Understanding color relationships and psychology",duration:"2h 05m",level:"Intermediate",instructor:"David Kim",category:"Design",views:"41K"}];var di=O(require("react")),nt=di.forwardRef(({className:e,...t},o)=>(0,yo.jsx)("textarea",{className:l("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));nt.displayName="Textarea";var B=O(require("@radix-ui/react-select")),Me=O(require("react")),mi=B.Root;var pi=B.Value,Xt=Me.forwardRef(({children:e,className:t,...o},i)=>(0,$.jsxs)(B.Trigger,{className:l("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:i,...o,children:[e,(0,$.jsx)(B.Icon,{asChild:!0,children:(0,$.jsx)(ki.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Xt.displayName=B.Trigger.displayName;var ui=Me.forwardRef(({className:e,...t},o)=>(0,$.jsx)(B.ScrollUpButton,{className:l("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,$.jsx)(ki.ChevronUp,{className:"h-4 w-4"})}));ui.displayName=B.ScrollUpButton.displayName;var gi=Me.forwardRef(({className:e,...t},o)=>(0,$.jsx)(B.ScrollDownButton,{className:l("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,$.jsx)(ki.ChevronDown,{className:"h-4 w-4"})}));gi.displayName=B.ScrollDownButton.displayName;var Qt=Me.forwardRef(({children:e,className:t,position:o="popper",...i},s)=>(0,$.jsx)(B.Portal,{children:(0,$.jsxs)(B.Content,{className:l("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-yo-1 data-[side=left]:-translate-yo-1 data-[side=right]:translate-yo-1 data-[side=top]:-translate-yo-1",t),position:o,ref:s,...i,children:[(0,$.jsx)(ui,{}),(0,$.jsx)(B.Viewport,{className:l("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,$.jsx)(gi,{})]})}));Qt.displayName=B.Content.displayName;var Sa=Me.forwardRef(({className:e,...t},o)=>(0,$.jsx)(B.Label,{className:l("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));Sa.displayName=B.Label.displayName;var kt=Me.forwardRef(({children:e,className:t,...o},i)=>(0,$.jsxs)(B.Item,{className:l("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:i,...o,children:[(0,$.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$.jsx)(B.ItemIndicator,{children:(0,$.jsx)(ki.Check,{className:"h-4 w-4"})})}),(0,$.jsx)(B.ItemText,{children:e})]}));kt.displayName=B.Item.displayName;var Ra=Me.forwardRef(({className:e,...t},o)=>(0,$.jsx)(B.Separator,{className:l("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Ra.displayName=B.Separator.displayName;var fi=O(require("react")),Yt=O(require("@radix-ui/react-label"));var Ta=(0,xo.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Zt=fi.forwardRef(({className:e,...t},o)=>(0,yo.jsx)(Yt.Root,{ref:o,className:l(Ta(),e),...t}));Zt.displayName=Yt.Root.displayName;var to=({fieldName:e,value:t,label:o,multiline:i=!1,onSave:s,className:a="",disabled:n=!1})=>{let[r,u]=(0,no.useState)(!1),[h,D]=(0,no.useState)(""),L=()=>{n||(u(!0),D(t))},z=async()=>{h!==t&&await s(e,h),u(!1)},b=P=>{P.key==="Enter"&&!i||P.key==="Enter"&&P.ctrlKey&&i?z():P.key==="Escape"&&(u(!1),D(""))};return(0,yo.jsxs)("div",{className:`space-yo-2 ${a}`,children:[(0,yo.jsx)(Zt,{children:o}),r?i?(0,yo.jsx)(nt,{value:h,onChange:P=>D(P.target.value),onBlur:z,onKeyDown:b,autoFocus:!0,rows:4,className:"resize-none"}):(0,yo.jsx)(fe,{value:h,onChange:P=>D(P.target.value),onBlur:z,onKeyPress:b,autoFocus:!0,className:"text-lg font-medium"}):(0,yo.jsxs)("div",{onClick:L,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${i?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,yo.jsx)("span",{className:i?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!n&&(0,yo.jsx)(ki.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};function xi({document:e,onSave:t,onCancel:o,availableDocuments:i=[],knowledgeContexts:s=[]}){let[a,n]=(0,no.useState)({...e,updatedAt:new Date}),[r,u]=(0,no.useState)(!1),[h,D]=(0,no.useState)(()=>{let d=[],w=0,v=new Set;return s.forEach(R=>{R.menuConfig.groupBy.forEach(U=>v.add(U))}),v.forEach(R=>{d.push({id:`context_field_${w++}`,key:R,value:e.metadata?.[R]?String(e.metadata[R]):"",isContextKey:!0})}),e.metadata&&Object.entries(e.metadata).forEach(([R,U])=>{v.has(R)||d.push({id:`existing_field_${w++}`,key:R,value:String(U),isContextKey:!1})}),d}),L=d=>{switch(d){case"markdown":case"mdx":return(0,yo.jsx)(ki.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,yo.jsx)(ki.File,{className:"h-6 w-6 text-success"});case"text":return(0,yo.jsx)(ki.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,yo.jsx)(ki.File,{className:"h-6 w-6 text-muted-foreground"})}},z=d=>{switch(d){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},b=()=>{let d=new Set;return i.forEach(w=>{w.metadata&&Object.keys(w.metadata).forEach(v=>d.add(v))}),{documentKeys:Array.from(d).sort()}},P=d=>{let w=new Set;return i.forEach(v=>{v.metadata?.[d]&&w.add(String(v.metadata[d]))}),Array.from(w).sort()},p=b(),N=()=>{t(a)};(0,no.useEffect)(()=>{let d=h.filter(w=>w.key.trim()!==""&&w.value.trim()!=="").reduce((w,v)=>({...w,[v.key]:v.value}),{});n(w=>({...w,metadata:Object.keys(d).length>0?d:void 0}))},[h]);let I=(d,w)=>{D(v=>v.map(R=>R.id===d?{...R,key:w}:R))},j=(d,w)=>{D(v=>v.map(R=>R.id===d?{...R,value:w}:R))},X=(d,w)=>{w==="__custom__"?j(d,""):j(d,w)},q=()=>{let d={id:`field_${Date.now()}`,key:"",value:"",isContextKey:!1};D(w=>[...w,d])},F=d=>{D(w=>w.filter(v=>v.id!==d))};return(0,yo.jsxs)(St.motion.div,{initial:{opacity:0,yo:20},animate:{opacity:1,yo:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,yo.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,yo.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,yo.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,yo.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:L(a.format)}),(0,yo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,yo.jsxs)("div",{className:"flex items-start gap-4 mb-2 leading-tight",children:[(0,yo.jsx)("div",{className:"flex-1 min-w-0",children:(0,yo.jsx)(to,{fieldName:"title",value:a.title,label:"",onSave:(d,w)=>n(v=>({...v,title:w})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,yo.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${z(a.format)} flex-shrink-0 mt-1`,children:a.format.toUpperCase()})]}),(0,yo.jsx)("div",{className:"mt-2",children:(0,yo.jsx)(to,{fieldName:"description",value:a.description||"Click to add description...",label:"",multiline:!0,onSave:(d,w)=>n(v=>({...v,description:w})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})]}),(0,yo.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,yo.jsxs)(T,{variant:"ghost",size:"sm",onClick:()=>u(!r),className:"gap-2",children:[(0,yo.jsx)(ki.Info,{className:"h-4 w-4"}),"Metadata",h.filter(d=>d.key.trim()!==""&&d.value.trim()!=="").length>0&&(0,yo.jsx)("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:h.filter(d=>d.key.trim()!==""&&d.value.trim()!=="").length}),r?(0,yo.jsx)(ki.ChevronDown,{className:"h-4 w-4"}):(0,yo.jsx)(ki.ChevronRight,{className:"h-4 w-4"})]}),(0,yo.jsxs)(T,{variant:"outline",size:"sm",onClick:o,className:"gap-2",children:[(0,yo.jsx)(ki.X,{className:"h-4 w-4"}),"Cancel"]}),(0,yo.jsxs)(T,{size:"sm",onClick:N,className:"gap-2",children:[(0,yo.jsx)(ki.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,yo.jsx)(St.motion.div,{initial:!1,animate:{height:r?"auto":0,opacity:r?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,yo.jsxs)("div",{className:"pt-4 border-t border-border mt-4",children:[(0,yo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,yo.jsxs)("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,yo.jsx)(ki.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,yo.jsxs)(T,{type:"button",variant:"outline",size:"sm",onClick:q,className:"gap-1 h-8",children:[(0,yo.jsx)(ki.Plus,{className:"h-3 w-3"}),"Add Field"]})]}),p.documentKeys.length>0&&(0,yo.jsxs)("p",{className:"text-xs text-muted-foreground mb-3",children:["Additional from documents: ",p.documentKeys.slice(0,4).join(", "),p.documentKeys.length>4&&` +${p.documentKeys.length-4} more`]}),(0,yo.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:h.length>0?(0,yo.jsx)("div",{className:"space-yo-2",children:h.map(d=>{let w=P(d.key);return(0,yo.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,yo.jsx)(fe,{value:d.key,onChange:v=>I(d.id,v.target.value),placeholder:"Key",className:`w-32 h-8 text-sm ${d.isContextKey?"bg-primary/5 border-primary/30":""}`,list:`metadata-keys-${d.id}`,disabled:d.isContextKey}),(0,yo.jsx)("datalist",{id:`metadata-keys-${d.id}`,children:p.documentKeys.map(v=>(0,yo.jsx)("option",{value:v},v))}),(0,yo.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),w.length>0?(0,yo.jsxs)(mi,{value:d.value||"",onValueChange:v=>X(d.id,v),children:[(0,yo.jsx)(Xt,{className:"flex-1 h-8 text-sm",children:(0,yo.jsx)(pi,{placeholder:"Value"})}),(0,yo.jsxs)(Qt,{children:[w.map(v=>(0,yo.jsx)(kt,{value:v,children:v},v)),(0,yo.jsx)(kt,{value:"__custom__",children:(0,yo.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,yo.jsx)(fe,{value:d.value||"",onChange:v=>j(d.id,v.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,yo.jsx)(T,{type:"button",variant:"ghost",size:"sm",onClick:()=>F(d.id),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,yo.jsx)(ki.X,{className:"h-3 w-3"})})]},d.id)})}):(0,yo.jsxs)("div",{className:"text-center py-4",children:[(0,yo.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"xo metadata fields"}),(0,yo.jsx)("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" to create metadata'})]})})]})})]}),(0,yo.jsx)("div",{className:"flex-1 overflow-auto",children:(0,yo.jsxs)("div",{className:"p-8",children:[(0,yo.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,yo.jsx)(nt,{value:a.content||"",onChange:d=>n(w=>({...w,content:d.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var wi=e=>(0,yo.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),yi=e=>(0,yo.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),Aa=e=>(0,yo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,yo.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,yo.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,yo.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,yo.jsx)("pre",{className:"text-sm",children:e})]}),Ia=e=>(0,yo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,yo.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,yo.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,yo.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),wi(e)]});function Ni({document:e,onDocumentUpdate:t,editable:o=!0,renderers:i,availableDocuments:s=[],knowledgeContexts:a=[]}){let[n,r]=(0,no.useState)(!1),[u,h]=(0,no.useState)(!1),D=p=>{switch(p){case"markdown":case"mdx":return(0,yo.jsx)(ki.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,yo.jsx)(ki.File,{className:"h-6 w-6 text-success"});case"text":return(0,yo.jsx)(ki.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,yo.jsx)(ki.File,{className:"h-6 w-6 text-muted-foreground"})}},L=p=>{switch(p){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},z=(p,N)=>{let I={markdown:wi,mdx:Ia,richtext:Aa,text:yi},j=i?.[N]||I[N];return j?j(p):yi(p)},b=p=>{r(!1),t?.(p)},P=()=>{r(!1)};return n?(0,yo.jsx)(xi,{document:e,onSave:b,onCancel:P,availableDocuments:s,knowledgeContexts:a}):(0,yo.jsxs)(St.motion.div,{initial:{opacity:0,yo:20},animate:{opacity:1,yo:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,yo.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,yo.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,yo.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,yo.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:D(e.format)}),(0,yo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,yo.jsxs)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:[e.title,(0,yo.jsx)("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${L(e.format)}`,children:e.format.toUpperCase()})]}),e.description&&(0,yo.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed",children:e.description})]})]}),(0,yo.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,yo.jsxs)(T,{variant:"ghost",size:"sm",onClick:()=>h(!u),className:"gap-2",children:[(0,yo.jsx)(ki.Info,{className:"h-4 w-4"}),"Metadata",u?(0,yo.jsx)(ki.ChevronDown,{className:"h-4 w-4"}):(0,yo.jsx)(ki.ChevronRight,{className:"h-4 w-4"})]}),o&&(0,yo.jsxs)(T,{variant:"outline",size:"sm",onClick:()=>r(!0),className:"gap-2",children:[(0,yo.jsx)(ki.Edit3,{className:"h-4 w-4"}),"Edit"]})]})]}),e.metadata&&Object.keys(e.metadata).length>0&&(0,yo.jsx)(St.motion.div,{initial:!1,animate:{height:u?"auto":0,opacity:u?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,yo.jsxs)("div",{className:"pt-4 border-t border-border mt-4",children:[(0,yo.jsxs)("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[(0,yo.jsx)(ki.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,yo.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:(0,yo.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-yo-6 gap-yo-2 text-sm",children:Object.entries(e.metadata).map(([p,N])=>(0,yo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,yo.jsx)("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:p.replace(/([yo-yo])/g," $1").trim()}),(0,yo.jsx)("span",{className:"text-foreground font-medium",children:String(N)})]},p))})})]})})]}),(0,yo.jsx)("div",{className:"flex-1 overflow-auto",children:(0,yo.jsx)("div",{className:"p-8",children:(0,yo.jsx)("div",{className:"space-yo-4",children:e.content?(0,yo.jsx)("div",{className:"relative",children:(0,yo.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:z(e.content,e.format)})}):(0,yo.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,yo.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,yo.jsx)(ki.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,yo.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"xo content available"}),(0,yo.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})}function Ci({label:e,documents:t,children:o,level:i,onDocumentClick:s,selectedDocumentId:a,showDocumentCount:n=!0}){let[r,u]=(0,no.useState)(i===0),h=o&&Object.keys(o).length>0,D=t.length+(o?Object.values(o).reduce((b,P)=>b+P.documents.length,0):0),L=b=>{switch(b){case"markdown":case"mdx":return(0,yo.jsx)(ki.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,yo.jsx)(ki.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,yo.jsx)(ki.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},z=b=>{let P=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return P[b%P.length]};return(0,yo.jsxs)("div",{className:"space-yo-1",children:[(h||t.length>0)&&(0,yo.jsxs)(St.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${r?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${i*20}px`},onClick:()=>u(!r),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,yo.jsx)("div",{className:`w-1 h-6 rounded-full ${z(i)}`}),(0,yo.jsx)(St.motion.div,{animate:{rotate:r?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,yo.jsx)(ki.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,yo.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,yo.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,yo.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&D>0&&(0,yo.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,yo.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:D})})]})]}),(0,yo.jsx)(St.motion.div,{initial:!1,animate:{height:r?"auto":0,opacity:r?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,yo.jsxs)("div",{className:"pt-2 space-yo-1",children:[t.map((b,P)=>(0,yo.jsxs)(St.motion.div,{initial:{opacity:0,yo:-10},animate:{opacity:1,yo:0},transition:{delay:P*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${a===b.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-yo-1"}`,style:{marginLeft:`${i*20+20}px`},onClick:()=>s?.(b),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,yo.jsx)("div",{className:"flex-shrink-0",children:L(b.format)}),(0,yo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,yo.jsx)("p",{className:`text-sm truncate transition-colors ${a===b.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:b.title}),b.description&&(0,yo.jsx)("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:b.description})]}),b.tags&&b.tags.length>0&&(0,yo.jsx)("div",{className:"flex-shrink-0",children:(0,yo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:b.tags[0]})})]},b.id)),o&&Object.entries(o).map(([b,P])=>(0,yo.jsx)(Ci,{label:b,documents:P.documents,children:P.children,level:i+1,onDocumentClick:s,selectedDocumentId:a,showDocumentCount:n},b))]})})]})}function Pi({documents:e,menuConfig:t,onDocumentClick:o,onDocumentShare:i,onDocumentUpdate:s,selectedDocumentId:a,className:n,editable:r=!0}){let[u,h]=(0,no.useState)(""),[D,L]=(0,no.useState)(null),z=(0,no.useMemo)(()=>u?e.filter(p=>p.title.toLowerCase().includes(u.toLowerCase())||p.description?.toLowerCase().includes(u.toLowerCase())||p.tags?.some(N=>N.toLowerCase().includes(u.toLowerCase()))||Object.values(p.metadata||{}).some(N=>String(N).toLowerCase().includes(u.toLowerCase()))):e,[e,u]),b=(0,no.useMemo)(()=>{let p=(N,I)=>{if(I.length===0)return{};let[j,...X]=I;return N.reduce((F,d)=>{let w=d.metadata?.[j]||"Uncategorized",v=String(w);if(F[v]||(F[v]={documents:[],children:{}}),X.length===0)F[v].documents.push(d);else{let R=p([d],X),U=Object.keys(R)[0];U&&(F[v].children||(F[v].children={}),F[v].children[U]?F[v].children[U].documents.push(...R[U].documents):F[v].children[U]=R[U])}return F},{})};return!t.groupBy||t.groupBy.length===0?{"All Documents":{documents:z,children:{}}}:p(z,t.groupBy)},[z,t.groupBy]),P=p=>{L(p),o?.(p)};return(0,yo.jsxs)("div",{className:`flex h-full ${n||""}`,children:[(0,yo.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,yo.jsx)("div",{className:"p-6 border-b border-border",children:(0,yo.jsxs)("div",{className:"relative",children:[(0,yo.jsx)("div",{className:"absolute inset-yo-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,yo.jsx)(ki.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,yo.jsx)(fe,{placeholder:"Search knowledge base...",value:u,onChange:p=>h(p.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,yo.jsx)(Re,{className:"h-[calc(100%-100px)]",children:(0,yo.jsxs)("div",{className:"p-4 space-yo-3",children:[Object.entries(b).map(([p,N])=>(0,yo.jsx)(Ci,{label:p,documents:N.documents,children:N.children,level:0,onDocumentClick:P,selectedDocumentId:a,showDocumentCount:t.showDocumentCount},p)),Object.keys(b).length===0&&(0,yo.jsxs)(St.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,yo.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,yo.jsx)(ki.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,yo.jsx)("p",{className:"text-sm font-medium",children:"xo documents found"}),(0,yo.jsx)("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,yo.jsx)("div",{className:"flex-1 bg-background",children:D?(0,yo.jsx)(Ni,{document:D,onDocumentUpdate:s,editable:r}):(0,yo.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,yo.jsxs)(St.motion.div,{initial:{opacity:0,yo:20},animate:{opacity:1,yo:0},transition:{duration:.4},className:"max-w-sm",children:[(0,yo.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,yo.jsx)(ki.FileText,{className:"h-10 w-10 text-primary"})}),(0,yo.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,yo.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function ro({documents:e=[],contexts:t=[],onDocumentClick:o=n=>console.log("Document clicked:",n),onDocumentShare:i=n=>console.log("Share document:",n),onLoadDocumentContent:s,selectedDocumentId:a}){let[n,r]=(0,no.useState)(t[0]);return!t||t.length===0?(0,yo.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,yo.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,yo.jsx)(be,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,yo.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,yo.jsx)("p",{className:"text-muted-foreground",children:"xo contexts available"})})]}):(0,yo.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,yo.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,yo.jsx)(be,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,yo.jsxs)("div",{className:"mt-6",children:[(0,yo.jsx)("div",{className:"border-b border-border",children:(0,yo.jsx)("nav",{className:"-mb-px flex space-yo-8 overflow-yo-auto",children:t.map(u=>(0,yo.jsxs)("button",{onClick:()=>r(u),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${n.id===u.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[u.icon,u.label]},u.id))})}),n.description&&(0,yo.jsx)("div",{className:"mt-3 px-1",children:(0,yo.jsx)("p",{className:"text-sm text-muted-foreground",children:n.description})})]})]}),(0,yo.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,yo.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,yo.jsx)(Pi,{documents:e,menuConfig:n.menuConfig,onDocumentClick:o,onDocumentShare:i,selectedDocumentId:a})})})]})}function Si({title:e="Digital Colleagues",businessUnits:t,projects:o,fileCount:i,teamMemberCount:s,onCreateProject:a,onOpenProject:n,sidebarItems:r,initialColleagues:u,users:h,onColleagueAdd:D,onColleagueEdit:L,onColleagueDelete:z}){let[b,P]=(0,no.useState)("home"),[p,N]=(0,no.useState)(t[0]),I=g=>{console.log("Opening app:",g.name)},j=g=>{console.log("Favoriting app:",g.name)},X=g=>{console.log("Opening file:",g.name)},q=g=>{console.log("Sharing file:",g.name)},F=g=>{console.log("Opening project:",g.name),n(g)},d=g=>{console.log("Sharing project:",g.name)},w=g=>{N(g),console.log("Business unit changed to:",g.name)},v=()=>{console.log("Copilot clicked - navigating to chat"),P("chat")},R=g=>{console.log("Notification removed:",g)},U=()=>{console.log("All notifications removed")},le=()=>{switch(b){case"home":return(0,yo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-yo-8",children:[(0,yo.jsxs)("section",{className:"text-center py-12",children:[(0,yo.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",p.name," team"]}),(0,yo.jsx)("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,yo.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,yo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,yo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,yo.jsx)("p",{className:"text-3xl font-bold text-primary",children:o.length}),(0,yo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,yo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,yo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,yo.jsx)("p",{className:"text-3xl font-bold text-primary",children:s}),(0,yo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,yo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,yo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,yo.jsx)("p",{className:"text-3xl font-bold text-primary",children:i}),(0,yo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,yo.jsx)(be,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>P("chat")}})]});case"colleagues":return(0,yo.jsx)("div",{children:(0,yo.jsx)("h1",{children:"Colleagues"})});case"chat":return(0,yo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-yo-8",children:[(0,yo.jsxs)("section",{className:"text-center py-12",children:[(0,yo.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,yo.jsxs)("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",p.name," team members and collaborate in real-time."]})]}),(0,yo.jsx)(be,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,yo.jsxs)("div",{className:"space-yo-8",children:[(0,yo.jsx)(be,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,yo.jsxs)("section",{className:"space-yo-4",children:[(0,yo.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,yo.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Jt.filter(g=>g.new).map(g=>(0,yo.jsx)(qt,{app:g,showProgress:!0,onOpen:I,onFavorite:j},g.name))})]}),(0,yo.jsxs)("section",{className:"space-yo-4",children:[(0,yo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,yo.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Jt.map(g=>(0,yo.jsx)(qt,{app:g,onOpen:I,onFavorite:j},g.name))})]})]});case"knowledge":return(0,yo.jsx)(ro,{});case"files":return(0,yo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-yo-8",children:[(0,yo.jsx)(be,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,yo.jsxs)("section",{className:"space-yo-4",children:[(0,yo.jsx)("div",{className:"flex items-center justify-between",children:(0,yo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,yo.jsx)(ai,{files:si,onFileClick:X})]})]});case"projects":return(0,yo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-yo-8",children:[(0,yo.jsx)(be,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:a}}),(0,yo.jsxs)("section",{className:"space-yo-4",children:[(0,yo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,yo.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:o.map(g=>(0,yo.jsx)(ni,{project:g,onOpen:F,onShare:d},g.name))})]})]});case"learn":return(0,yo.jsxs)("div",{className:"space-yo-8",children:[(0,yo.jsx)(be,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),(0,yo.jsxs)("section",{className:"space-yo-4",children:[(0,yo.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,yo.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:li.slice(0,3).map(g=>(0,yo.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,yo.jsx)("h3",{className:"font-semibold mb-2",children:g.title}),(0,yo.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:g.description}),(0,yo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,yo.jsx)("span",{children:g.duration}),(0,yo.jsx)("span",{children:g.level})]})]},g.title))})]})]});default:return null}};return(0,yo.jsx)(Qo,{sidebarItems:zo,title:e,notifications:Eo,businessUnits:t,currentBusinessUnit:p,onBusinessUnitChange:w,activeTab:b,onTabChange:P,showTabs:!0,onActionClick:v,actionIcon:(0,yo.jsx)(ki.Bot,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:R,onRemoveAll:U,children:(0,yo.jsx)(St.AnimatePresence,{mode:"wait",children:(0,yo.jsx)(St.motion.div,{className:"flex-1 h-full",initial:{opacity:0,yo:10},animate:{opacity:1,yo:0},exit:{opacity:0,yo:-10},transition:{duration:.2},children:le()},b)})})}
5
+ "use strict";"use client";var Qr=Object.create;var jt=Object.defineProperty;var ea=Object.getOwnPropertyDescriptor;var ta=Object.getOwnPropertyNames;var oa=Object.getPrototypeOf,ia=Object.prototype.hasOwnProperty;var ra=(e,t)=>{for(var o in t)jt(e,o,{get:t[o],enumerable:!0})},Yo=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ta(t))!ia.call(e,r)&&r!==o&&jt(e,r,{get:()=>t[r],enumerable:!(i=ea(t,r))||i.enumerable});return e};var J=(e,t,o)=>(o=e!=null?Qr(oa(e)):{},Yo(t||!e||!e.__esModule?jt(o,"default",{value:e,enumerable:!0}):o,e)),aa=e=>Yo(jt({},"__esModule",{value:!0}),e);var Cn={};ra(Cn,{default:()=>Yr});module.exports=aa(Cn);var Xo=require("react"),mo=require("motion/react"),qr=require("lucide-react");var si=require("clsx");var go="-",na=e=>{let t=la(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:n=>{let s=n.split(go);return s[0]===""&&s.length!==1&&s.shift(),ti(s,t)||sa(n)},getConflictingClassGroupIds:(n,s)=>{let l=o[n]||[];return s&&i[n]?[...l,...i[n]]:l}}},ti=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],i=t.nextPart.get(o),r=i?ti(e.slice(1),i):void 0;if(r)return r;if(t.validators.length===0)return;let a=e.join(go);return t.validators.find(({validator:n})=>n(a))?.classGroupId},Qo=/^\[(.+)\]$/,sa=e=>{if(Qo.test(e)){let t=Qo.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},la=e=>{let{theme:t,prefix:o}=e,i={nextPart:new Map,validators:[]};return da(Object.entries(e.classGroups),o).forEach(([a,n])=>{uo(n,i,a,t)}),i},uo=(e,t,o,i)=>{e.forEach(r=>{if(typeof r=="string"){let a=r===""?t:ei(t,r);a.classGroupId=o;return}if(typeof r=="function"){if(ca(r)){uo(r(i),t,o,i);return}t.validators.push({validator:r,classGroupId:o});return}Object.entries(r).forEach(([a,n])=>{uo(n,ei(t,a),o,i)})})},ei=(e,t)=>{let o=e;return t.split(go).forEach(i=>{o.nextPart.has(i)||o.nextPart.set(i,{nextPart:new Map,validators:[]}),o=o.nextPart.get(i)}),o},ca=e=>e.isThemeGetter,da=(e,t)=>t?e.map(([o,i])=>{let r=i.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([n,s])=>[t+n,s])):a);return[o,r]}):e,ma=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,i=new Map,r=(a,n)=>{o.set(a,n),t++,t>e&&(t=0,i=o,o=new Map)};return{get(a){let n=o.get(a);if(n!==void 0)return n;if((n=i.get(a))!==void 0)return r(a,n),n},set(a,n){o.has(a)?o.set(a,n):r(a,n)}}},oi="!",pa=e=>{let{separator:t,experimentalParseClassName:o}=e,i=t.length===1,r=t[0],a=t.length,n=s=>{let l=[],c=0,x=0,R;for(let d=0;d<s.length;d++){let P=s[d];if(c===0){if(P===r&&(i||s.slice(d,d+a)===t)){l.push(s.slice(x,d)),x=d+a;continue}if(P==="/"){R=d;continue}}P==="["?c++:P==="]"&&c--}let y=l.length===0?s:s.substring(x),p=y.startsWith(oi),v=p?y.substring(1):y,m=R&&R>x?R-x:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:m}};return o?s=>o({className:s,parseClassName:n}):n},ua=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(i=>{i[0]==="["?(t.push(...o.sort(),i),o=[]):o.push(i)}),t.push(...o.sort()),t},ga=e=>({cache:ma(e.cacheSize),parseClassName:pa(e),...na(e)}),fa=/\s+/,ha=(e,t)=>{let{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:r}=t,a=[],n=e.trim().split(fa),s="";for(let l=n.length-1;l>=0;l-=1){let c=n[l],{modifiers:x,hasImportantModifier:R,baseClassName:y,maybePostfixModifierPosition:p}=o(c),v=!!p,m=i(v?y.substring(0,p):y);if(!m){if(!v){s=c+(s.length>0?" "+s:s);continue}if(m=i(y),!m){s=c+(s.length>0?" "+s:s);continue}v=!1}let d=ua(x).join(":"),P=R?d+oi:d,M=P+m;if(a.includes(M))continue;a.push(M);let $=r(m,v);for(let E=0;E<$.length;++E){let V=$[E];a.push(P+V)}s=c+(s.length>0?" "+s:s)}return s};function va(){let e=0,t,o,i="";for(;e<arguments.length;)(t=arguments[e++])&&(o=ii(t))&&(i&&(i+=" "),i+=o);return i}var ii=e=>{if(typeof e=="string")return e;let t,o="";for(let i=0;i<e.length;i++)e[i]&&(t=ii(e[i]))&&(o&&(o+=" "),o+=t);return o};function ba(e,...t){let o,i,r,a=n;function n(l){let c=t.reduce((x,R)=>R(x),e());return o=ga(c),i=o.cache.get,r=o.cache.set,a=s,s(l)}function s(l){let c=i(l);if(c)return c;let x=ha(l,o);return r(l,x),x}return function(){return a(va.apply(null,arguments))}}var X=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},ri=/^\[(?:([a-z-]+):)?(.+)\]$/i,xa=/^\d+\/\d+$/,ya=new Set(["px","full","screen"]),wa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ca=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(ci|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Na=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Da=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)ci-?((\d+)?\.?(\d+)[a-z]+|0)/,Sa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Be=e=>ct(e)||ya.has(e)||xa.test(e),je=e=>dt(e,"length",Ea),ct=e=>!!e&&!Number.isNaN(Number(e)),po=e=>dt(e,"number",ct),bt=e=>!!e&&Number.isInteger(Number(e)),ka=e=>e.endsWith("%")&&ct(e.slice(0,-1)),F=e=>ri.test(e),Ve=e=>wa.test(e),Pa=new Set(["length","size","percentage"]),Ta=e=>dt(e,Pa,ai),Ra=e=>dt(e,"position",ai),Aa=new Set(["image","url"]),Ma=e=>dt(e,Aa,Ba),Ia=e=>dt(e,"",La),xt=()=>!0,dt=(e,t,o)=>{let i=ri.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):o(i[2]):!1},Ea=e=>Ca.test(e)&&!Na.test(e),ai=()=>!1,La=e=>Da.test(e),Ba=e=>Sa.test(e);var Ha=()=>{let e=X("colors"),t=X("spacing"),o=X("blur"),i=X("brightness"),r=X("borderColor"),a=X("borderRadius"),n=X("borderSpacing"),s=X("borderWidth"),l=X("contrast"),c=X("grayscale"),x=X("hueRotate"),R=X("invert"),y=X("gap"),p=X("gradientColorStops"),v=X("gradientColorStopPositions"),m=X("inset"),d=X("margin"),P=X("opacity"),M=X("padding"),$=X("saturate"),E=X("scale"),V=X("sepia"),u=X("skew"),S=X("space"),b=X("translate"),H=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],ue=()=>["auto",F,t],C=()=>[F,t],Ee=()=>["",Be,je],h=()=>["auto",ct,F],f=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>["start","end","center","between","around","evenly","stretch"],ve=()=>["","0",F],qo=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Le=()=>[ct,F];return{cacheSize:500,separator:":",theme:{colors:[xt],spacing:[Be,je],blur:["none","",Ve,F],brightness:Le(),borderColor:[e],borderRadius:["none","","full",Ve,F],borderSpacing:C(),borderWidth:Ee(),contrast:Le(),grayscale:ve(),hueRotate:Le(),invert:ve(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[ka,je],inset:ue(),margin:ue(),opacity:Le(),padding:C(),saturate:Le(),scale:Le(),sepia:ve(),skew:Le(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",F]}],container:["container"],columns:[{columns:[Ve]}],"break-after":[{"break-after":qo()}],"break-before":[{"break-before":qo()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...f(),F]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",bt,F]}],basis:[{basis:ue()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",F]}],grow:[{grow:ve()}],shrink:[{shrink:ve()}],order:[{order:["first","last","none",bt,F]}],"grid-cols":[{"grid-cols":[xt]}],"col-start-end":[{col:["auto",{span:["full",bt,F]},F]}],"col-start":[{"col-start":h()}],"col-end":[{"col-end":h()}],"grid-rows":[{"grid-rows":[xt]}],"row-start-end":[{row:["auto",{span:[bt,F]},F]}],"row-start":[{"row-start":h()}],"row-end":[{"row-end":h()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",F]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",F]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...de()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...de(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...de(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],qr:[{qr:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[d]}],mx:[{mx:[d]}],my:[{my:[d]}],ms:[{ms:[d]}],ci:[{ci:[d]}],mt:[{mt:[d]}],mr:[{mr:[d]}],mb:[{mb:[d]}],ml:[{ml:[d]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],ci:[{ci:["auto","min","max","fit","svw","lvw","dvw",F,t]}],"min-ci":[{"min-ci":[F,t,"min","max","fit"]}],"max-ci":[{"max-ci":[F,t,"none","full","min","max","fit","prose",{screen:[Ve]},Ve]}],h:[{h:[F,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[F,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ve,je]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",po]}],"font-family":[{font:[xt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",F]}],"line-clamp":[{"line-clamp":["none",ct,po]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Be,F]}],"list-image":[{"list-image":["none",F]}],"list-style-type":[{list:["none","disc","decimal",F]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Be,je]}],"underline-offset":[{"underline-offset":["auto",Be,F]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...f(),Ra]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ta]}],"bg-image":[{bg:["none",{"gradient-ci":["t","vr","r","kr","b","bl","l","tl"]},Ma]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-ci-pos":[{ci:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-ci":[{ci:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-ci":[{"rounded-ci":[a]}],"rounded-qr":[{"rounded-qr":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-vr":[{"rounded-vr":[a]}],"rounded-kr":[{"rounded-kr":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-ci":[{border:[s]}],"border-ci-x":[{"border-x":[s]}],"border-ci-y":[{"border-y":[s]}],"border-ci-s":[{"border-s":[s]}],"border-ci-e":[{"border-e":[s]}],"border-ci-t":[{"border-t":[s]}],"border-ci-r":[{"border-r":[s]}],"border-ci-b":[{"border-b":[s]}],"border-ci-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:L()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[Be,F]}],"outline-ci":[{outline:[Be,je]}],"outline-color":[{outline:[e]}],"ring-ci":[{ring:Ee()}],"ring-ci-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-ci":[{"ring-offset":[Be,je]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ve,Ia]}],"shadow-color":[{shadow:[xt]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[i]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ve,F]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[R]}],saturate:[{saturate:[$]}],sepia:[{sepia:[V]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[R]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[$]}],"backdrop-sepia":[{"backdrop-sepia":[V]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",F]}],duration:[{duration:Le()}],ease:[{ease:["linear","in","out","in-out",F]}],delay:[{delay:Le()}],animate:[{animate:["none","spin","ping","pulse","bounce",F]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[bt,F]}],"translate-x":[{"translate-x":[b]}],"translate-y":[{"translate-y":[b]}],"skew-x":[{"skew-x":[u]}],"skew-y":[{"skew-y":[u]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",F]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","ci-resize","ci-resize","nw-resize","ci-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",F]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-ci":[{"scroll-ci":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-qr":[{"scroll-qr":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",F]}],fill:[{fill:[e,"none"]}],"stroke-ci":[{stroke:[Be,je,po]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","qr","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","ci","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["ci","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-ci","rounded-qr","rounded-es","rounded-tl","rounded-vr","rounded-kr","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-ci","rounded-qr"],"rounded-t":["rounded-tl","rounded-vr"],"rounded-r":["rounded-vr","rounded-kr"],"rounded-b":["rounded-kr","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-ci":["border-ci-s","border-ci-e","border-ci-t","border-ci-r","border-ci-b","border-ci-l"],"border-ci-x":["border-ci-r","border-ci-l"],"border-ci-y":["border-ci-t","border-ci-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-ci","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-qr","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ni=ba(Ha);function g(...e){return ni((0,si.clsx)(e))}var qt=J(require("react")),xo=J(require("next/link"));var li=require("class-variance-authority");var ci=require("react/jsx-runtime"),Fa=(0,li.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function De({className:e,variant:t,...o}){return(0,ci.jsx)("div",{className:g(Fa({variant:t}),e),...o})}var di=require("@radix-ui/react-slot"),pi=J(require("react")),ui=(0,li.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 ci-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),I=pi.forwardRef(({asChild:e=!1,className:t,size:o,variant:i,...r},a)=>(0,ci.jsx)(e?di.Slot:"button",{className:g(ui({className:t,size:o,variant:i})),ref:a,...r}));I.displayName="Button";var fi=J(require("react"));var xe=fi.forwardRef(({className:e,type:t,...o},i)=>(0,ci.jsx)("input",{type:t,className:g("flex h-9 ci-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...o}));xe.displayName="Input";var fo=J(require("react")),Se=J(require("@radix-ui/react-scroll-area"));var _e=fo.forwardRef(({className:e,children:t,...o},i)=>(0,ci.jsxs)(Se.Root,{ref:i,className:g("relative overflow-hidden",e),...o,children:[(0,ci.jsx)(Se.Viewport,{className:"h-full ci-full rounded-[inherit]",children:t}),(0,ci.jsx)(vi,{}),(0,ci.jsx)(Se.Corner,{})]}));_e.displayName=Se.Root.displayName;var vi=fo.forwardRef(({className:e,orientation:t="vertical",...o},i)=>(0,ci.jsx)(Se.ScrollAreaScrollbar,{ref:i,orientation:t,className:g("flex touch-none select-none transition-colors",t==="vertical"&&"h-full ci-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,ci.jsx)(Se.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));vi.displayName=Se.ScrollAreaScrollbar.displayName;var yt=J(require("react")),ae=J(require("@radix-ui/react-dialog"));var mt=ae.Root;var ho=ae.Portal;var Vt=yt.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(ae.Overlay,{ref:o,className:g("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Vt.displayName=ae.Overlay.displayName;var wt=yt.forwardRef(({className:e,children:t,...o},i)=>(0,ci.jsxs)(ho,{children:[(0,ci.jsx)(Vt,{}),(0,ci.jsxs)(ae.Content,{ref:i,className:g("fixed left-[50%] top-[50%] z-50 grid ci-full max-ci-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-ci-left-1/2 data-[state=closed]:slide-out-ci-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,ci.jsxs)(ae.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,ci.jsx)(qr.X,{className:"h-4 ci-4"}),(0,ci.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));wt.displayName=ae.Content.displayName;var Ct=({className:e,...t})=>(0,ci.jsx)("div",{className:g("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ct.displayName="DialogHeader";var Ua=({className:e,...t})=>(0,ci.jsx)("div",{className:g("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ua.displayName="DialogFooter";var Nt=yt.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(ae.Title,{ref:o,className:g("text-lg font-semibold leading-none tracking-tight",e),...t}));Nt.displayName=ae.Title.displayName;var Oa=yt.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(ae.Description,{ref:o,className:g("text-sm text-muted-foreground",e),...t}));Oa.displayName=ae.Description.displayName;var Dt=J(require("@radix-ui/react-checkbox")),yi=J(require("react")),vo=yi.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(Dt.Root,{className:g("peer h-4 ci-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,ci.jsx)(Dt.Indicator,{className:g("flex items-center justify-center text-current"),children:(0,ci.jsx)(qr.Check,{className:"h-4 ci-4"})})}));vo.displayName=Dt.Root.displayName;var Ae=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),Ci=[{id:"home",title:"Home",icon:(0,ci.jsx)(qr.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,ci.jsx)(qr.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,ci.jsx)(qr.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with ci",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,ci.jsx)(qr.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,ci.jsx)(qr.FileText,{}),url:"/knowledge"}],Ni=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated ci version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"ci new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],Di=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,ci.jsx)(qr.Palette,{className:"h-4 ci-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,ci.jsx)(qr.Code,{className:"h-4 ci-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,ci.jsx)(qr.TrendingUp,{className:"h-4 ci-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,ci.jsx)(qr.DollarSign,{className:"h-4 ci-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,ci.jsx)(qr.Users,{className:"h-4 ci-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,ci.jsx)(qr.Wrench,{className:"h-4 ci-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,ci.jsx)(qr.Scale,{className:"h-4 ci-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,ci.jsx)(qr.Package,{className:"h-4 ci-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"ci",name:"IT Support",description:"Information technology and infrastructure",icon:(0,ci.jsx)(qr.Zap,{className:"h-4 ci-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,ci.jsx)(qr.Building2,{className:"h-4 ci-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Wt=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var bo=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],_t=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned ci a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],Jt=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],za=[...Jt,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],ja=[...Wt,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],$t={projects:[{id:"1",name:"Empty Project",description:"ci project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},wi={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:Jt.filter(e=>e.epicId==="1")};var _n={empty:{initialProjects:$t.projects,initialEpics:$t.epics,initialSprints:$t.sprints,initialTasks:$t.tasks},default:{initialProjects:Wt,initialEpics:bo,initialSprints:_t,initialTasks:Jt},highDensity:{initialProjects:Wt,initialEpics:bo,initialSprints:_t,initialTasks:za},singleEpic:{initialProjects:Wt,initialEpics:wi.epics,initialSprints:_t,initialTasks:wi.tasks},multipleProjects:{initialProjects:ja,initialEpics:bo,initialSprints:_t,initialTasks:Jt}},Gt=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(Ae),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Ae),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(Ae),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Ae),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated ci understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Ae),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Ae),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(Ae),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Ae),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond ci customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases ci human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Ae),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Ae),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],$n=[{id:"1",title:"Review quarterly report",description:"mo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Gt.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:Gt.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy ci production",description:"Deploy the latest version ci production environment",dueDate:new Date,dueTime:"16:00",colleague:Gt.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var Wn=Gt.filter(e=>e.type==="digital");function Xt(e,t){let[o,i]=(0,Xo.useState)(()=>{if(typeof window>"u")return t;try{let a=window.localStorage.getItem(e);return a?JSON.parse(a):t}catch{return t}}),r=a=>{try{i(a),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(a))}catch{}};return(0,Xo.useEffect)(()=>{r(o)},[]),[o,r]}function yo({items:e,isOpen:t,isMobile:o=!1,onClose:i,currentBusinessUnit:r=Di[0],onBusinessUnitChange:a,onSearch:n,className:s,logo:l="/headerlogo.png",appName:c="Nuvia",tagline:x="Collaboration Platform"}){let[R,y]=qt.useState({}),[p,v]=Xt("sidebar-favorites",{}),[m,d]=qt.useState(null),[P,M]=qt.useState(""),$=h=>{y(f=>({...f,[h]:!f[h]}))},E=h=>{a?.(h)},V=()=>{P.trim()&&n?.(P.trim())},u=h=>{h.key==="Enter"&&(h.preventDefault(),V())},S=(h,f)=>{let L=p[h]||[],Z=L.includes(f)?L.filter(de=>de!==f):L.concat(f);v({...p,[h]:Z})},b=h=>{if(!h.items||!h.maxItems||h.items.length<=h.maxItems)return h.items||[];let f=p[h.id]||[],L=h.items.filter(de=>f.includes(de.id)),Z=h.items.filter(de=>!f.includes(de.id));return[...L,...Z].slice(0,h.maxItems)},H=h=>h.maxItems&&h.items&&h.items.length>h.maxItems,G=e,ue=h=>{let f=H(h),L=b(h),Z=(0,ci.jsxs)(ci.Fragment,{children:[(0,ci.jsxs)("div",{className:"flex items-center gap-3",children:[h.icon,(0,ci.jsx)("span",{children:h.title})]}),h.badge&&(0,ci.jsx)(De,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:h.badge}),h.items&&(0,ci.jsx)($e.ChevronDown,{className:g("ml-2 h-4 ci-4 transition-transform",R[h.title]?"rotate-180":"")})]}),de=g("flex ci-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",h.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return h.url?(0,ci.jsx)(xo.default,{href:h.url,className:de,onClick:o?i:void 0,children:Z}):(0,ci.jsx)("button",{className:de,onClick:()=>h.items&&$(h.title),children:Z})},C=()=>{let h=e.find(L=>L.id===m);if(!h||!h.items||!h.maxItems)return null;let f=p[h.id]||[];return(0,ci.jsx)(mt,{open:!!m,onOpenChange:L=>!L&&d(null),children:(0,ci.jsxs)(wt,{className:"sm:max-ci-md",children:[(0,ci.jsxs)(Ct,{children:[(0,ci.jsxs)(Nt,{children:["Manage ",h.title," Favorites"]}),(0,ci.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up ci ",h.maxItems," items ci show in ",h.title.toLowerCase(),"."]})]}),(0,ci.jsx)(_e,{className:"max-h-96 pr-4",children:(0,ci.jsx)("div",{className:"space-y-4",children:h.items.map(L=>(0,ci.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ci.jsx)(vo,{id:L.id,checked:f.includes(L.id),onCheckedChange:()=>S(h.id,L.id),disabled:!f.includes(L.id)&&f.length>=(h.maxItems||0)}),(0,ci.jsxs)("label",{htmlFor:L.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[L.title,L.badge&&(0,ci.jsx)(De,{variant:"outline",className:"text-xs",children:L.badge})]})]},L.id))})})]})})},Ee=(0,ci.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,ci.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,ci.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ci.jsx)("div",{className:"flex h-14 ci-14 items-center justify-center",children:(0,ci.jsx)("img",{src:l,alt:"Header Logo",className:"h-14 ci-14 object-contain"})}),(0,ci.jsxs)("div",{children:[(0,ci.jsx)("h2",{className:"font-semibold",children:c}),(0,ci.jsx)("p",{className:"text-xs text-muted-foreground",children:x})]})]}),o&&(0,ci.jsx)(I,{variant:"ghost",size:"icon",onClick:i,children:(0,ci.jsx)($e.X,{className:"h-5 ci-5"})})]}),(0,ci.jsx)("div",{className:"px-3 py-2",children:(0,ci.jsxs)("div",{className:"relative",children:[(0,ci.jsx)($e.Search,{className:"absolute left-3 top-3 h-4 ci-4 text-muted-foreground"}),(0,ci.jsx)(xe,{type:"search",placeholder:"Search...",className:"ci-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:P,onChange:h=>M(h.target.value),onKeyPress:u})]})}),(0,ci.jsx)(_e,{className:"flex-1 px-3 py-2",children:(0,ci.jsx)("div",{className:"space-y-1",children:G.map(h=>(0,ci.jsxs)("div",{className:"mb-1",children:[ue(h),h.items&&R[h.title]&&(0,ci.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[b(h).map(f=>(0,ci.jsxs)(xo.default,{href:f.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:o?i:void 0,children:[f.title,f.badge&&(0,ci.jsx)(De,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:f.badge})]},f.id)),H(h)&&h.items&&h.items.length>b(h).length&&(0,ci.jsxs)("button",{onClick:()=>d(h.id),className:"ci-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",h.items.length-b(h).length," more available"]})]})]},h.id))})}),(0,ci.jsx)("div",{className:"p-3",children:(0,ci.jsx)("div",{className:"space-y-1",children:(0,ci.jsxs)("button",{className:"flex ci-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,ci.jsx)($e.Settings,{className:"h-5 ci-5"}),(0,ci.jsx)("span",{children:"Settings"})]})})}),(0,ci.jsx)(C,{})]});return o?(0,ci.jsx)("div",{className:g("fixed inset-y-0 left-0 z-50 ci-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Ee}):(0,ci.jsx)("div",{className:g("fixed inset-y-0 left-0 z-30 ci-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Ee})}var Yt=J(require("react")),He=J(require("@radix-ui/react-avatar"));var wo=Yt.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(He.Root,{ref:o,className:g("relative flex h-10 ci-10 shrink-0 overflow-hidden rounded-full",e),...t}));wo.displayName=He.Root.displayName;var Co=Yt.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(He.Image,{ref:o,className:g("aspect-square h-full ci-full",e),...t}));Co.displayName=He.Image.displayName;var No=Yt.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(He.Fallback,{ref:o,className:g("flex h-full ci-full items-center justify-center rounded-full bg-muted",e),...t}));No.displayName=He.Fallback.displayName;var Si=J(require("react")),Pe=J(require("@radix-ui/react-tooltip"));var We=Pe.Provider,Ge=Pe.Root,Je=Pe.Trigger,Fe=Si.forwardRef(({className:e,sideOffset:t=4,...o},i)=>(0,ci.jsx)(Pe.Portal,{children:(0,ci.jsx)(Pe.Content,{ref:i,sideOffset:t,className:g("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Fe.displayName=Pe.Content.displayName;var ki=require("next-themes");function Pi(){let{setTheme:e,theme:t}=(0,ki.useTheme)();return(0,ci.jsx)(We,{children:(0,ci.jsxs)(Ge,{children:[(0,ci.jsx)(Je,{asChild:!0,children:(0,ci.jsxs)(I,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,ci.jsx)(qr.Sun,{className:"h-5 ci-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,ci.jsx)(qr.Moon,{className:"absolute h-5 ci-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,ci.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,ci.jsx)(Fe,{children:"Toggle theme"})]})})}function Ti({notifications:e,open:t,onClose:o,onNotificationRemove:i,onRemoveAll:r,className:a}){let n=e.filter(c=>!c.read),s=n.length,l=c=>{switch(c){case"info":return(0,ci.jsx)(qr.Info,{className:"h-5 ci-5 text-blue-500"});case"success":return(0,ci.jsx)(qr.Check,{className:"h-5 ci-5 text-green-500"});case"warning":return(0,ci.jsx)(qr.AlertTriangle,{className:"h-5 ci-5 text-amber-500"});case"error":return(0,ci.jsx)(qr.AlertTriangle,{className:"h-5 ci-5 text-red-500"})}};return(0,ci.jsx)(mo.AnimatePresence,{children:t&&(0,ci.jsxs)(ci.Fragment,{children:[(0,ci.jsx)(mo.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:o}),(0,ci.jsx)(mo.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:g("fixed inset-y-0 right-0 z-50 ci-full max-ci-sm border-l bg-background shadow-lg md:ci-96",a),children:(0,ci.jsxs)("div",{className:"flex h-full flex-col",children:[(0,ci.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,ci.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ci.jsx)(qr.Bell,{className:"h-5 ci-5"}),(0,ci.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,ci.jsxs)(De,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,ci.jsxs)(I,{variant:"ghost",size:"icon",onClick:o,className:"rounded-full",children:[(0,ci.jsx)(qr.X,{className:"h-5 ci-5"}),(0,ci.jsx)("span",{className:"sr-only",children:"Close"})]})]}),s>0&&(0,ci.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,ci.jsxs)("span",{className:"text-sm text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,ci.jsx)(I,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,ci.jsx)(_e,{className:"flex-1",children:(0,ci.jsx)("div",{className:"divide-y",children:n.map(c=>(0,ci.jsxs)("div",{className:g("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,ci.jsx)("div",{className:"flex h-10 ci-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:l(c.type)}),(0,ci.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,ci.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ci.jsx)("p",{className:"font-medium",children:c.title}),(0,ci.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ci.jsx)("p",{className:"text-xs text-muted-foreground",children:c.time}),(0,ci.jsx)(I,{variant:"ghost",size:"sm",className:"h-6 ci-6 p-0",onClick:()=>i?.(c.id),title:"Dismiss",children:(0,ci.jsx)(qr.Check,{className:"h-3 ci-3"})})]})]}),(0,ci.jsx)("p",{className:"text-sm text-muted-foreground",children:c.description}),c.actionLabel&&(0,ci.jsxs)(I,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:c.onAction,children:[c.actionLabel,(0,ci.jsx)(qr.ChevronRight,{className:"ml-1 h-3 ci-3"})]})]})]},c.id))})}):(0,ci.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,ci.jsx)("div",{className:"flex h-16 ci-16 items-center justify-center rounded-full bg-muted",children:(0,ci.jsx)(qr.Bell,{className:"h-8 ci-8 text-muted-foreground"})}),(0,ci.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,ci.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Qe=J(require("@radix-ui/react-tabs"));function Ri({className:e,...t}){return(0,ci.jsx)(Qe.Root,{"data-slot":"tabs",className:g("flex flex-col gap-2",e),...t})}function Ai({className:e,...t}){return(0,ci.jsx)(Qe.List,{"data-slot":"tabs-list",className:g("bg-muted text-muted-foreground inline-flex h-9 ci-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Mi({className:e,...t}){return(0,ci.jsx)(Qe.Trigger,{"data-slot":"tabs-trigger",className:g("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var Ue=J(require("react")),z=J(require("@radix-ui/react-dropdown-menu")),pt=require("@radix-ui/react-icons");var ut=z.Root,gt=z.Trigger;var Va=Ue.forwardRef(({className:e,inset:t,children:o,...i},r)=>(0,ci.jsxs)(z.SubTrigger,{ref:r,className:g("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...i,children:[o,(0,ci.jsx)(pt.ChevronRightIcon,{className:"ml-auto"})]}));Va.displayName=z.SubTrigger.displayName;var Ka=Ue.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(z.SubContent,{ref:o,className:g("z-50 min-ci-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Ka.displayName=z.SubContent.displayName;var et=Ue.forwardRef(({className:e,sideOffset:t=4,...o},i)=>(0,ci.jsx)(z.Portal,{children:(0,ci.jsx)(z.Content,{ref:i,sideOffset:t,className:g("z-50 min-ci-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));et.displayName=z.Content.displayName;var tt=Ue.forwardRef(({className:e,inset:t,...o},i)=>(0,ci.jsx)(z.Item,{ref:i,className:g("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));tt.displayName=z.Item.displayName;var _a=Ue.forwardRef(({className:e,children:t,checked:o,...i},r)=>(0,ci.jsxs)(z.CheckboxItem,{ref:r,className:g("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...i,children:[(0,ci.jsx)("span",{className:"absolute left-2 flex h-3.5 ci-3.5 items-center justify-center",children:(0,ci.jsx)(z.ItemIndicator,{children:(0,ci.jsx)(pt.CheckIcon,{className:"h-4 ci-4"})})}),t]}));_a.displayName=z.CheckboxItem.displayName;var $a=Ue.forwardRef(({className:e,children:t,...o},i)=>(0,ci.jsxs)(z.RadioItem,{ref:i,className:g("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,ci.jsx)("span",{className:"absolute left-2 flex h-3.5 ci-3.5 items-center justify-center",children:(0,ci.jsx)(z.ItemIndicator,{children:(0,ci.jsx)(pt.DotFilledIcon,{className:"h-4 ci-4 fill-current"})})}),t]}));$a.displayName=z.RadioItem.displayName;var Wa=Ue.forwardRef(({className:e,inset:t,...o},i)=>(0,ci.jsx)(z.Label,{ref:i,className:g("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));Wa.displayName=z.Label.displayName;var Ga=Ue.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(z.Separator,{ref:o,className:g("-mx-1 my-1 h-px bg-muted",e),...t}));Ga.displayName=z.Separator.displayName;var Ja=({className:e,...t})=>(0,ci.jsx)("span",{className:g("ml-auto text-xs tracking-widest opacity-60",e),...t});Ja.displayName="DropdownMenuShortcut";function Ei({activeTab:e,onTabChange:t,tabOptions:o,className:i="",maxWidth:r="700px",gridCols:a=6}){let n=o.find(s=>s.value===e);return(0,ci.jsxs)(mo.motion.div,{className:`flex-1 flex justify-center ${i}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,ci.jsx)("div",{className:"hidden lg:block",children:(0,ci.jsx)(Ri,{value:e,onValueChange:t,children:(0,ci.jsx)(Ai,{className:"grid ci-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(a,o.length)}, minmax(0, 1fr))`},children:o.map(s=>(0,ci.jsx)(mo.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,ci.jsx)(Mi,{value:s.value,className:"ci-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:s.label})},s.value))})})}),(0,ci.jsx)("div",{className:"lg:hidden",children:(0,ci.jsxs)(ut,{children:[(0,ci.jsx)(gt,{asChild:!0,children:(0,ci.jsxs)(I,{variant:"outline",className:"rounded-2xl min-ci-[140px] justify-between",children:[n?.label||"Select",(0,ci.jsx)(qr.ChevronDown,{className:"h-4 ci-4 ml-2"})]})}),(0,ci.jsx)(et,{align:"center",className:"ci-[180px]",children:o.map(s=>(0,ci.jsx)(tt,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function Li({title:e,notifications:t=[],onToggleSidebar:o,onToggleMobileMenu:i,sidebarOpen:r=!0,className:a,activeTab:n="assistant",onTabChange:s,showTabs:l=!0,tabOptions:c=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:x,actionIcon:R=(0,ci.jsx)(qr.Bot,{className:"mr-2 h-4 ci-4"}),actionText:y="Action",onNotificationRemove:p,onRemoveAll:v,logo:m="/headerlogo.png",appName:d="Nuvia",tagline:P="Collaboration Platform"}){let[M,$]=(0,Xo.useState)(!1),[E,V]=(0,Xo.useState)(t),u=E.filter(H=>!H.read).length,S=H=>{V(G=>G.filter(ue=>ue.id!==H)),p?.(H)},b=()=>{V(H=>H.filter(G=>G.read)),v?.()};return(0,ci.jsxs)(ci.Fragment,{children:[(0,ci.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${a||""}`,children:[(0,ci.jsx)(I,{variant:"ghost",size:"icon",className:"md:hidden",onClick:i,children:(0,ci.jsx)(qr.Menu,{className:"h-5 ci-5"})}),(0,ci.jsx)(I,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:o,children:(0,ci.jsx)(qr.PanelLeft,{className:"h-5 ci-5"})}),!r&&(0,ci.jsxs)(mo.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,ci.jsx)("div",{className:"flex h-10 ci-10 items-center justify-center",children:(0,ci.jsx)("img",{src:m,alt:"Logo",className:"h-10 ci-10 object-contain"})}),(0,ci.jsxs)("div",{children:[(0,ci.jsx)("h2",{className:"font-semibold text-sm",children:d}),(0,ci.jsx)("p",{className:"text-xs text-muted-foreground",children:P})]})]}),(0,ci.jsxs)("div",{className:"flex flex-1 items-center",children:[l&&(0,ci.jsx)(Ei,{activeTab:n,onTabChange:s,tabOptions:c}),(0,ci.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,ci.jsx)(mo.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,ci.jsx)(mo.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ci.jsxs)(I,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:x,children:[R,y]})})}),(0,ci.jsx)(Pi,{}),(0,ci.jsx)(We,{children:(0,ci.jsxs)(Ge,{children:[(0,ci.jsx)(Je,{asChild:!0,children:(0,ci.jsx)(mo.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ci.jsxs)(I,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>$(!0),children:[(0,ci.jsx)(mo.motion.div,{animate:u>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:u>0?1/0:0,repeatDelay:3},children:(0,ci.jsx)(qr.Bell,{className:"h-5 ci-5"})}),u>0&&(0,ci.jsx)(mo.motion.span,{className:"absolute -right-1 -top-1 flex h-5 ci-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:u})]})})}),(0,ci.jsx)(Fe,{children:"Notifications"})]})}),(0,ci.jsx)(mo.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ci.jsxs)(wo,{className:"h-9 ci-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,ci.jsx)(Co,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,ci.jsx)(No,{})]})})]})]})]}),(0,ci.jsx)(Ti,{notifications:E,open:M,onClose:()=>$(!1),onNotificationRemove:S,onRemoveAll:b})]})}var Bi=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,ci.jsx)(qr.User,{className:"h-4 ci-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Fi({sidebarItems:e,children:t,title:o="Digital Colleagues",notifications:i=[],currentBusinessUnit:r=Bi[0],onBusinessUnitChange:a,onSearch:n,businessUnits:s=Bi,activeTab:l,onTabChange:c,showTabs:x=!1,onActionClick:R,actionIcon:y,actionText:p="Action",onNotificationRemove:v,onRemoveAll:m,logo:d="/headerlogo.png",appName:P="Nuvia",tagline:M="Collaboration Platform",sidebarInitiallyClosed:$=!1}){let[E,V]=(0,Xo.useState)(!$),[u,S]=(0,Xo.useState)(!1),[b,H]=(0,Xo.useState)(r),G=ue=>{H(ue),a?.(ue)};return(0,ci.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background ci-[]",children:[u&&(0,ci.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>S(!1)}),(0,ci.jsx)("div",{className:"md:hidden",children:(0,ci.jsx)(yo,{items:e,isOpen:u,isMobile:!0,onClose:()=>S(!1),currentBusinessUnit:b,onBusinessUnitChange:G,onSearch:n,logo:d,appName:P,tagline:M})}),(0,ci.jsx)("div",{className:"hidden md:block",children:(0,ci.jsx)(yo,{items:e,isOpen:E,isMobile:!1,currentBusinessUnit:b,onBusinessUnitChange:G,onSearch:n,logo:d,appName:P,tagline:M})}),(0,ci.jsxs)("div",{className:g("min-h-screen fixed ci-full transition-all duration-300 ease-in-out",E?"md:pl-64":"md:pl-0"),children:[(0,ci.jsx)(Li,{title:o,notifications:i,onToggleSidebar:()=>V(!E),onToggleMobileMenu:()=>S(!0),sidebarOpen:E,activeTab:l,onTabChange:c,showTabs:x,onActionClick:R,actionIcon:y,actionText:p,onNotificationRemove:v,onRemoveAll:m,logo:d,appName:P,tagline:M}),(0,ci.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var io=require("react-icons/fa");function Ie({title:e,description:t,badge:o,primaryAction:i,secondaryAction:r,gradient:a,children:n,className:s}){let[l,c]=Xt(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),x=!r&&!t||l;return(0,ci.jsxs)(mo.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${a} p-8 text-white ${s||""}`,children:[(0,ci.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,ci.jsxs)("div",{className:"flex items-center gap-3",children:[o&&(0,ci.jsx)(De,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:o}),(0,ci.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,ci.jsxs)("div",{className:"flex items-center gap-3",children:[x&&i&&(0,ci.jsx)(I,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:i.onClick,children:i.label}),(r||t)&&(0,ci.jsx)("button",{"aria-label":l?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>c(!l),style:{lineHeight:0},children:l?(0,ci.jsx)(io.FaChevronDown,{size:22}):(0,ci.jsx)(io.FaChevronUp,{size:22})})]})]}),!x&&(0,ci.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,ci.jsxs)("div",{className:"space-y-4",children:[(0,ci.jsx)("p",{className:"max-ci-[600px] text-white/80",children:t}),(0,ci.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i&&(0,ci.jsx)(I,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:i.onClick,children:i.label}),r&&(0,ci.jsx)(I,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),n&&(0,ci.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var ot=J(require("react"));var kt=ot.forwardRef(({className:e,...t},o)=>(0,ci.jsx)("div",{ref:o,className:g("rounded-xl border bg-card text-card-foreground shadow",e),...t}));kt.displayName="Card";var Pt=ot.forwardRef(({className:e,...t},o)=>(0,ci.jsx)("div",{ref:o,className:g("flex flex-col space-y-1.5 p-6",e),...t}));Pt.displayName="CardHeader";var Tt=ot.forwardRef(({className:e,...t},o)=>(0,ci.jsx)("div",{ref:o,className:g("font-semibold leading-none tracking-tight",e),...t}));Tt.displayName="CardTitle";var Rt=ot.forwardRef(({className:e,...t},o)=>(0,ci.jsx)("div",{ref:o,className:g("text-sm text-muted-foreground",e),...t}));Rt.displayName="CardDescription";var At=ot.forwardRef(({className:e,...t},o)=>(0,ci.jsx)("div",{ref:o,className:g("p-6 pt-0",e),...t}));At.displayName="CardContent";var Mt=ot.forwardRef(({className:e,...t},o)=>(0,ci.jsx)("div",{ref:o,className:g("flex items-center p-6 pt-0",e),...t}));Mt.displayName="CardFooter";var Oi=J(require("react")),It=J(require("@radix-ui/react-progress"));var Et=Oi.forwardRef(({className:e,value:t,...o},i)=>(0,ci.jsx)(It.Root,{ref:i,className:g("relative h-4 ci-full overflow-hidden rounded-full bg-secondary",e),...o,children:(0,ci.jsx)(It.Indicator,{className:"h-full ci-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Et.displayName=It.Root.displayName;function To({app:e,onOpen:t,onFavorite:o,showProgress:i=!1,className:r}){return(0,ci.jsx)(mo.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,ci.jsxs)(kt,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,ci.jsx)(Pt,{className:"pb-2",children:(0,ci.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ci.jsx)("div",{className:"flex h-12 ci-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,ci.jsx)(De,{className:"rounded-xl bg-amber-500",children:"New"}):(0,ci.jsx)(I,{variant:"ghost",size:"icon",className:"h-8 ci-8 rounded-2xl",onClick:()=>o?.(e),children:(0,ci.jsx)(qr.Star,{className:"h-4 ci-4"})})]})}),(0,ci.jsxs)(At,{className:"pb-2",children:[(0,ci.jsx)(Tt,{className:"text-lg",children:e.name}),(0,ci.jsx)(Rt,{children:e.description}),i&&e.progress<100&&(0,ci.jsxs)("div",{className:"mt-2",children:[(0,ci.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,ci.jsx)("span",{children:"Installation"}),(0,ci.jsxs)("span",{children:[e.progress,"%"]})]}),(0,ci.jsx)(Et,{value:e.progress,className:"h-2 mt-1 rounded-xl"})]})]}),(0,ci.jsx)(Mt,{children:(0,ci.jsx)(I,{variant:"secondary",className:"ci-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}var Fr=J(require("@radix-ui/react-dialog"));var Vi=J(require("react")),rt=Vi.forwardRef(({className:e,...t},o)=>(0,ci.jsx)("textarea",{className:g("flex min-h-[80px] ci-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));rt.displayName="Textarea";var _i=J(require("react")),Ro=J(require("@radix-ui/react-label"));var Za=(0,$i.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ao=_i.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(Ro.Root,{ref:o,className:g(Za(),e),...t}));Ao.displayName=Ro.Root.displayName;var Lt=({fieldName:e,value:t,label:o,multiline:i=!1,onSave:r,className:a="",disabled:n=!1})=>{let[s,l]=(0,Xo.useState)(!1),[c,x]=(0,Xo.useState)(""),R=()=>{n||(l(!0),x(t))},y=async()=>{c!==t&&await r(e,c),l(!1)},p=v=>{v.key==="Enter"&&!i||v.key==="Enter"&&v.ctrlKey&&i?y():v.key==="Escape"&&(l(!1),x(""))};return(0,ci.jsxs)("div",{className:`space-y-2 ${a}`,children:[(0,ci.jsx)(Ao,{children:o}),s?i?(0,ci.jsx)(rt,{value:c,onChange:v=>x(v.target.value),onBlur:y,onKeyDown:p,autoFocus:!0,rows:4,className:"resize-none"}):(0,ci.jsx)(xe,{value:c,onChange:v=>x(v.target.value),onBlur:y,onKeyPress:p,autoFocus:!0,className:"text-lg font-medium"}):(0,ci.jsxs)("div",{onClick:R,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${i?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,ci.jsx)("span",{className:i?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click ci edit..."}),!n&&(0,ci.jsx)(qr.Edit,{className:"h-4 ci-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var xr=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),yr=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),wr=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),Cr=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),Nr=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),Dr=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),Sr=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),no=require("@payloadcms/richtext-lexical/lexical/list"),kr=require("@payloadcms/richtext-lexical/lexical/rich-text"),Pr=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var vr=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),Ut=require("@payloadcms/richtext-lexical/lexical/utils"),U=require("@payloadcms/richtext-lexical/lexical"),jo=require("@payloadcms/richtext-lexical/lexical/selection");var ir=require("@radix-ui/react-dialog"),ro=require("@payloadcms/richtext-lexical/client");var Io=J(require("bson-objectid"));var Ji=require("@payloadcms/ui");var Xa=e=>{let{data:{relationTo:t,value:o},nodeKey:i}=e,[r]=(0,vr.useLexicalComposerContext)(),[a,n]=(0,Xo.useState)(""),[s,l]=(0,Xo.useState)(""),[c,x]=(0,Xo.useState)(""),R=async d=>{console.log("fetchMedia",d)};(0,Xo.useEffect)(()=>{typeof o=="string"?o.length===24?R(o):(n(o||""),x(m(v())),l(p()||"")):typeof o=="object"&&(n(`${process.env.NEXT_PUBLIC_API_URL}${o.url}`||""),x(m(o.filesize)),l(o.mimeType?.split("/")[1]||""))},[]);let y=(0,Xo.useCallback)(()=>{r.update(()=>{(0,U.$getNodeByKey)(i)?.remove()})},[r,i]),p=()=>{let d=e.data.value;return typeof d=="string"?d.split(";base64")[0]?.split("image/")[1]:""},v=()=>{let d=e.data.value;if(typeof d=="string"){let P=d.split(",")[1]?.length||0;return 4*Math.ceil(P/3)*.5624896334383812/1e3}return 0};function m(d){if(d>=1e6){let M=d/1e6;return`${M>=10?Math.round(M).toString():M.toFixed(1)} MB`}return`${Math.floor(d/1e3)} KB`}return(0,ci.jsx)("div",{className:"my-2",contentEditable:!1,children:(0,ci.jsxs)("div",{className:"border border-slate-800 rounded-xl overflow-clip ci-60 flex flex-col gap-2 bg-[#222222]",children:[(0,ci.jsxs)("div",{className:"flex gap-2 border-b border-b-slate-100/10",children:[(0,ci.jsx)("div",{className:"flex-1",children:e.data.value?(0,ci.jsx)("img",{className:"object-cover m-0 ci-full min-ci-[115px] min-h-[105px]","data-lexical-upload-id":o,"data-lexical-upload-relation-ci":t,src:a}):(0,ci.jsx)(Ji.File,{})}),(0,ci.jsx)(We,{children:(0,ci.jsxs)(Ge,{children:[(0,ci.jsxs)(Je,{className:"flex-1 flex justify-center items-center text-[#b5b5b5]",children:[(0,ci.jsx)("span",{className:"font-medium text-sm",children:"Media"}),(0,ci.jsx)("button",{onClick:d=>{d.preventDefault(),y()},className:"flex-1 flex justify-center items-center",children:(0,ci.jsx)(qr.X,{width:24,height:24,strokeWidth:1})})]}),(0,ci.jsx)(Fe,{children:(0,ci.jsx)("span",{children:"Remove image"})})]})})]}),(0,ci.jsxs)("div",{className:"flex items-center justify-center gap-4 py-3 flex-1 text-xs font-bold",children:[(0,ci.jsx)("span",{className:"",children:s?.toLocaleUpperCase()}),(0,ci.jsx)("span",{children:c})]})]})})},Yi=Xa;function qa(e){if(e.hasAttribute("data-lexical-upload-relation-ci")&&e.hasAttribute("data-lexical-upload-id")){let o=e.getAttribute("data-lexical-upload-id");if(o)return{node:ft({fields:{},relationTo:"media",value:o})}}return e.src.startsWith("file:///"),null}var Bt=class extends ro.UploadNode{static importDOM(){return{img:()=>({conversion:qa,priority:0})}}static importJSON(t){t.version===1&&t?.value?.id&&(t.value=t.value.id),t.version===2&&!t?.id&&(t.id=new Io.default().toHexString(),t.version=3);let o={id:t.id??new Io.default().toHexString(),fields:t.fields,relationTo:"media",value:t.value},i=ft(o);return i.setFormat?.(t.format),i}decorate(){return(0,ci.jsx)(Yi,{data:this.__data,nodeKey:this.getKey()})}};function ft(e){return new Bt({data:e})}var Ya=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Qa=e=>Ya?(e||window).getSelection():null,Nl=(0,U.createCommand)("INSERT_UPLOAD_WITH_DRAWER_COMMAND"),Eo=(0,U.createCommand)("INSERT_UPLOAD_COMMAND");function rr({activeEditor:e,onClose:t,isOpen:o=!1}){let i=(0,Xo.useRef)(!1),[r,a]=(0,Xo.useState)(!0),[n,s]=(0,Xo.useState)(""),[l,c]=(0,Xo.useState)(""),[x,R]=(0,Xo.useState)(!1),[y,p]=(0,Xo.useState)("left"),v=n==="",m=E=>{R(E.target.checked)},d=E=>{p(E.target.value)},P=E=>{let V=new FileReader;V.onload=function(){return typeof V.result=="string"&&s(V.result),""},E!==null&&E[0]&&V.readAsDataURL(E[0])};(0,Xo.useEffect)(()=>{i.current=!1;let E=V=>{i.current=V.altKey};return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E)}},[e]),(0,Xo.useEffect)(()=>{r||t()},[r]),(0,Xo.useEffect)(()=>{a(o)},[o]);let M=({editor:E,relationTo:V,replaceNodeKey:u,value:S})=>{if(u)E.update(()=>{let b=(0,U.$getNodeByKey)(u);b&&b.replace(ft({id:"",fields:{},relationTo:"media",value:S}))});else{let b=E.dispatchCommand(Eo,{fields:null,relationTo:"media",value:S})}},$=()=>{M({editor:e,relationTo:"media",replaceNodeKey:null,value:{altText:l,src:n,showCaption:x,position:y}.src}),a(!1),t()};return(0,ci.jsx)(mt,{open:r,onOpenChange:E=>a(E),children:(0,ci.jsxs)(wt,{children:[(0,ci.jsxs)(Ct,{children:[(0,ci.jsx)(Nt,{children:"Upload Image"}),(0,ci.jsx)(ir.DialogDescription,{children:"Description"})]}),(0,ci.jsxs)("div",{className:"",children:[(0,ci.jsx)("div",{style:{marginBottom:"1em"},children:(0,ci.jsx)(xe,{type:"file",onChange:E=>P(E.target.files),accept:"image/*","data-test-id":"image-modal-file-upload"})}),(0,ci.jsx)("div",{style:{marginBottom:"1em"},children:(0,ci.jsx)(xe,{"aria-label":"Alt Text",placeholder:"Descriptive alternative text",onChange:E=>c(E.currentTarget.value),value:l,"data-test-id":"image-modal-alt-text-input"})}),(0,ci.jsx)(I,{"data-test-id":"image-modal-file-upload-btn",disabled:v,onClick:()=>$(),children:"Confirm"})]})]})})}function Lo({captionsEnabled:e}){let[t]=(0,vr.useLexicalComposerContext)();return(0,Xo.useEffect)(()=>{if(!t.hasNodes([ro.UploadNode]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return(0,Ut.mergeRegister)(t.registerCommand(U.DRAGSTART_COMMAND,o=>en(o),U.COMMAND_PRIORITY_HIGH),t.registerCommand(U.DRAGOVER_COMMAND,o=>tn(o),U.COMMAND_PRIORITY_LOW),t.registerCommand(U.DROP_COMMAND,o=>on(o,t),U.COMMAND_PRIORITY_HIGH))},[e,t]),null}function en(e){if(!Bo())return!1;let o=e.dataTransfer;return o?(o.setData("text/plain","ci"),!0):!1}function tn(e){return Bo()?(ar(e)||e.preventDefault(),!0):!1}function on(e,t){let o=Bo();if(!o)return!1;if(e.preventDefault(),ar(e)){let i=rn(e);o.remove();let r=(0,U.$createRangeSelection)();i!=null&&r.applyDOMRange(i),(0,U.$setSelection)(r)}return!0}function Bo(){let e=(0,U.$getSelection)();if(!(0,U.$isNodeSelection)(e))return null;let o=e.getNodes()[0];return(0,ro.$isUploadNode)(o)?o:null}function ar(e){let t=e.target;return!!(t&&t instanceof HTMLElement&&!t.closest("code, span.editor-image")&&t.parentElement&&t.parentElement.closest("div.ContentEditable__root"))}function rn(e){let t,o=e.target,i=o==null?null:o.nodeType===9?o.defaultView:o.ownerDocument.defaultView,r=Qa(i);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&r!==null)r.collapse(e.rangeParent,e.rangeOffset||0),t=r.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}var an=()=>(0,ci.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ci.jsx)("path",{d:"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z",fill:"currentColor"})}),nr=an;var nn=()=>(0,ci.jsx)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ci.jsx)("path",{d:"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z",fill:"currentColor"})}),sr=nn;var sn=()=>(0,ci.jsxs)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,ci.jsx)("path",{d:"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",fill:"currentColor"}),(0,ci.jsx)("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),lr=sn;var ln=()=>(0,ci.jsxs)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,ci.jsx)("path",{d:"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z",fill:"currentColor"}),(0,ci.jsx)("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),cr=ln;var cn=()=>(0,ci.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ci.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z",fill:"currentColor"})}),dr=cn;var dn=()=>(0,ci.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ci.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z",fill:"currentColor"})}),mr=dn;var pr=()=>(0,ci.jsx)("svg",{"aria-hidden":"true",className:"ci-5 size-5",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ci.jsx)("path",{d:"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",fill:"currentColor"})}),ur=()=>(0,ci.jsx)("svg",{"aria-hidden":"true",className:"ci-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ci.jsx)("path",{d:"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z",fill:"currentColor"})}),gr=()=>(0,ci.jsx)("svg",{"aria-hidden":"true",className:"ci-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ci.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z",fill:"currentColor"})}),fr=()=>(0,ci.jsx)("svg",{"aria-hidden":"true",className:"ci-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ci.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z",fill:"currentColor"})}),hr=()=>(0,ci.jsx)("svg",{"aria-hidden":"true",className:"ci-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ci.jsx)("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z",fill:"currentColor"})});var zo=1;function mn(){return(0,ci.jsx)("span",{className:"border border-[#222222]"})}function Vo(){let[e]=(0,vr.useLexicalComposerContext)(),t=(0,Xo.useRef)(null),[o,i]=(0,Xo.useState)(!1),[r,a]=(0,Xo.useState)(!1),[n,s]=(0,Xo.useState)(!1),[l,c]=(0,Xo.useState)(!1),[x,R]=(0,Xo.useState)(!1),[y,p]=(0,Xo.useState)(!1),[v,m]=(0,Xo.useState)(!1),[d,P]=(0,Xo.useState)(!1),[M,$]=(0,Xo.useState)(!1),[E,V]=(0,Xo.useState)("left"),[u,S]=(0,Xo.useState)("p"),b=f=>{e.update(()=>{let L=(0,U.$getSelection)();(0,U.$isRangeSelection)(L)&&(f==="p"?(0,jo.$setBlocksType)(L,()=>(0,U.$createParagraphNode)()):(0,jo.$setBlocksType)(L,()=>(0,kr.$createHeadingNode)(f)))})},H=(0,Xo.useCallback)(()=>{let f=(0,U.$getSelection)();if((0,U.$isRangeSelection)(f)){s(f.hasFormat("bold")),c(f.hasFormat("italic")),R(f.hasFormat("underline")),p(f.hasFormat("strikethrough")),m(f.hasFormat("subscript")),P(f.hasFormat("superscript"));let L=f.anchor.getNode(),Z=L;for(;Z&&!(0,U.$isParagraphNode)(Z)&&Z!==(0,U.$getRoot)();){let ve=Z.getParent();ve&&(Z=ve)}if(Z){let ve=Z.getFormatType();V(ve||"left")}let de=L.getTopLevelElement()?.__tag;S(de||"p")}},[]);(0,Xo.useEffect)(()=>(0,Ut.mergeRegister)(e.registerUpdateListener(({editorState:f})=>{f.read(()=>{H()})}),e.registerCommand(U.SELECTION_CHANGE_COMMAND,(f,L)=>(H(),!1),zo),e.registerCommand(U.CAN_UNDO_COMMAND,f=>(i(f),!1),zo),e.registerCommand(U.CAN_REDO_COMMAND,f=>(a(f),!1),zo),(0,Ut.mergeRegister)(e.registerCommand(Eo,f=>(e.update(()=>{let L=(0,U.$getSelection)()||(0,U.$getPreviousSelection)();if((0,U.$isRangeSelection)(L)){let Z=ft({id:f.id,fields:f.fields,relationTo:f.relationTo,value:f.value}),{focus:de}=L,ve=de.getNode();(0,Ut.$insertNodeToNearestRoot)(Z),(0,U.$isParagraphNode)(ve)&&!ve.__first&&ve.remove()}}),!0),U.COMMAND_PRIORITY_EDITOR))),[e,H]);let G=[[{label:"Undo",icon:(0,ci.jsx)(qr.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(U.UNDO_COMMAND,void 0)},disabled:!o},{label:"Redo",icon:(0,ci.jsx)(qr.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(U.UNDO_COMMAND,void 0)},disabled:!r}],[{label:"Bold",icon:(0,ci.jsx)(nr,{}),onClick:()=>{e.dispatchCommand(U.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:n},{label:"Italic",icon:(0,ci.jsx)(sr,{}),onClick:()=>{e.dispatchCommand(U.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:l},{label:"Underline",icon:(0,ci.jsx)(lr,{}),onClick:()=>{e.dispatchCommand(U.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:x},{label:"Strikethrough",icon:(0,ci.jsx)(cr,{}),onClick:()=>{e.dispatchCommand(U.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:y},{label:"Subscript",icon:(0,ci.jsx)(dr,{}),onClick:()=>{e.dispatchCommand(U.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:v},{label:"Superscript",icon:(0,ci.jsx)(mr,{}),onClick:()=>{e.dispatchCommand(U.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:d}]],ue=[{label:"Left Align",direction:"left",icon:(0,ci.jsx)(qr.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(U.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,ci.jsx)(qr.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(U.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,ci.jsx)(qr.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(U.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,ci.jsx)(qr.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(U.FORMAT_ELEMENT_COMMAND,"justify")}}],Ee=[{label:"Normal Text",value:"p",icon:(0,ci.jsx)(pr,{}),onClick:()=>b("p")},{label:"Heading 1",value:"h1",icon:(0,ci.jsx)(ur,{}),onClick:()=>b("h1")},{label:"Heading 2",value:"h2",icon:(0,ci.jsx)(gr,{}),onClick:()=>b("h2")},{label:"Heading 3",value:"h3",icon:(0,ci.jsx)(fr,{}),onClick:()=>b("h3")},{label:"Heading 4",value:"h4",icon:(0,ci.jsx)(hr,{}),onClick:()=>b("h4")},...[{label:"Unordered List",value:"ul",icon:(0,ci.jsx)(qr.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(no.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,ci.jsx)(qr.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(no.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],h=[{label:"Insert Image",icon:(0,ci.jsx)(qr.ImageUp,{width:15,height:15}),onClick:()=>{$(!0)},disabled:!1}];return(0,ci.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2 sticky top-0 bg-black z-50",children:(0,ci.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[G.map((f,L)=>(0,ci.jsxs)(Xo.Fragment,{children:[(0,ci.jsx)("div",{className:"flex items-center gap-2",children:f.map((Z,de)=>(0,ci.jsx)("div",{role:"button","aria-disabled":Z.disabled||!1,onClick:Z.onClick,className:g("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",Z.active&&"bg-[#3c3c3c]"),"aria-label":Z.label,children:(0,ci.jsx)(We,{children:(0,ci.jsxs)(Ge,{children:[(0,ci.jsx)(Je,{className:"text-[#b5b5b5]",children:Z.icon}),(0,ci.jsx)(Fe,{children:(0,ci.jsx)("p",{children:Z.label})})]})})},de))}),(0,ci.jsx)(mn,{})]},`toolbar-option-${f.length}-${L}`)),(0,ci.jsxs)(ut,{children:[(0,ci.jsxs)(gt,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[ue.find(f=>f.direction===E)?.icon,ue.find(f=>f.direction===E)?.label,(0,ci.jsx)(qr.ChevronDown,{width:15,height:15})]}),(0,ci.jsx)(et,{className:"bg-black hover:bg-black",children:ue.map((f,L)=>(0,ci.jsxs)(tt,{onClick:f.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,ci.jsx)("span",{children:f.icon}),(0,ci.jsx)("span",{children:f.label})]},`${f.label}-${L}`))})]}),(0,ci.jsxs)(ut,{children:[(0,ci.jsxs)(gt,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[Ee.find(f=>f.value===u)?.icon,Ee.find(f=>f.value===u)?.label,(0,ci.jsx)(qr.ChevronDown,{width:15,height:15})]}),(0,ci.jsx)(et,{className:"bg-black hover:bg-black",children:Ee.map((f,L)=>(0,ci.jsxs)(tt,{onClick:f.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,ci.jsx)("span",{children:f.icon}),(0,ci.jsx)("span",{children:f.label})]},`heading-option-${f.label}-${L}`))})]}),(0,ci.jsxs)(ut,{children:[(0,ci.jsxs)(gt,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[(0,ci.jsx)(qr.Plus,{width:15,height:15}),(0,ci.jsx)(qr.ChevronDown,{width:15,height:15})]}),(0,ci.jsx)(et,{className:"bg-black hover:bg-black",children:h.map((f,L)=>(0,ci.jsxs)(tt,{onClick:f.onClick,disabled:f.disabled,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,ci.jsx)("span",{children:f.icon}),(0,ci.jsx)("span",{children:f.label})]},L))})]}),M&&(0,ci.jsx)(rr,{activeEditor:e,onClose:()=>{$(!1)},isOpen:M})]})})}var pn=({setValue:e,value:t,name:o,editable:i=!0})=>{let[r]=(0,vr.useLexicalComposerContext)(),a=(0,Xo.useRef)(null),n=s=>{s.read(()=>{let l=s.toJSON();JSON.stringify(l)!==JSON.stringify(a.current)&&(a.current=l,e?.(()=>l))})};return(0,Xo.useEffect)(()=>{r.setEditable(i)},[i,r]),(0,Xo.useEffect)(()=>{t&&JSON.stringify(t)!==JSON.stringify(a.current)&&r.update(()=>{try{let s=r.parseEditorState(t);r.setEditorState(s),a.current=t}catch(s){console.error("Error parsing editor state:",s)}},{discrete:!0})},[t,r]),(0,ci.jsx)("div",{className:"ci-full",children:(0,ci.jsxs)("div",{className:" ",children:[i&&(0,ci.jsx)(Vo,{}),(0,ci.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,ci.jsx)(Dr.RichTextPlugin,{contentEditable:(0,ci.jsx)(wr.ContentEditable,{name:o,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:Cr.LexicalErrorBoundary}),i&&(0,ci.jsxs)(ci.Fragment,{children:[(0,ci.jsx)(Nr.HistoryPlugin,{}),(0,ci.jsx)(xr.AutoFocusPlugin,{}),(0,ci.jsx)(Sr.ListPlugin,{}),(0,ci.jsx)(Pr.OnChangePlugin,{onChange:n}),(0,ci.jsx)(Lo,{})]})]})]})})},un=({setValue:e,value:t,name:o,editable:i=!0})=>(0,ci.jsx)(yr.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[no.ListNode,no.ListItemNode,kr.HeadingNode,Bt],onError(a){throw console.error("Lexical error:",a),a},theme:{code:"editor-code",heading:{h1:"text-4xl text-primary",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:(0,ci.jsx)(pn,{value:t,setValue:e,name:o,editable:i})}),Rr=un;var j=J(require("@radix-ui/react-select")),Ye=J(require("react")),Ar=j.Root;var Mr=j.Value,Ko=Ye.forwardRef(({children:e,className:t,...o},i)=>(0,ci.jsxs)(j.Trigger,{className:g("flex h-10 ci-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:i,...o,children:[e,(0,ci.jsx)(j.Icon,{asChild:!0,children:(0,ci.jsx)(qr.ChevronDown,{className:"h-4 ci-4 opacity-50"})})]}));Ko.displayName=j.Trigger.displayName;var Ir=Ye.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(j.ScrollUpButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,ci.jsx)(qr.ChevronUp,{className:"h-4 ci-4"})}));Ir.displayName=j.ScrollUpButton.displayName;var Er=Ye.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(j.ScrollDownButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,ci.jsx)(qr.ChevronDown,{className:"h-4 ci-4"})}));Er.displayName=j.ScrollDownButton.displayName;var _o=Ye.forwardRef(({children:e,className:t,position:o="popper",...i},r)=>(0,ci.jsx)(j.Portal,{children:(0,ci.jsxs)(j.Content,{className:g("relative z-50 max-h-96 min-ci-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,ref:r,...i,children:[(0,ci.jsx)(Ir,{}),(0,ci.jsx)(j.Viewport,{className:g("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] ci-full min-ci-[var(--radix-select-trigger-width)]"),children:e}),(0,ci.jsx)(Er,{})]})}));_o.displayName=j.Content.displayName;var gn=Ye.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(j.Label,{className:g("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));gn.displayName=j.Label.displayName;var so=Ye.forwardRef(({children:e,className:t,...o},i)=>(0,ci.jsxs)(j.Item,{className:g("relative flex ci-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:i,...o,children:[(0,ci.jsx)("span",{className:"absolute left-2 flex h-3.5 ci-3.5 items-center justify-center",children:(0,ci.jsx)(j.ItemIndicator,{children:(0,ci.jsx)(qr.Check,{className:"h-4 ci-4"})})}),(0,ci.jsx)(j.ItemText,{children:e})]}));so.displayName=j.Item.displayName;var fn=Ye.forwardRef(({className:e,...t},o)=>(0,ci.jsx)(j.Separator,{className:g("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));fn.displayName=j.Separator.displayName;var zt=e=>"mimeType"in e&&"url"in e&&!("format"in e),hn=e=>{if(!e?.root?.children)return"";let t=[],o=r=>{if(!r)return"";switch(r.type){case"heading":{let a=r.tag?parseInt(r.tag.replace("h","")):1,n=i(r.children||[]);return"#".repeat(a)+" "+n}case"paragraph":return i(r.children||[]);case"list":{let a=[],n=r.listType==="number"?"1.":"-";return r.children?.forEach((s,l)=>{if(s.type==="listitem"){let c=i(s.children||[]),x=r.listType==="number"?`${l+1}.`:n;a.push(`${x} ${c}`)}}),a.join(`
6
+ `)}case"listitem":return i(r.children||[]);case"text":{let a=r.text||"";if(r.format){let n=(r.format&1)!==0,s=(r.format&2)!==0,l=(r.format&4)!==0,c=(r.format&8)!==0;(r.format&16)!==0?a=`\`${a}\``:(n&&(a=`**${a}**`),s&&(a=`*${a}*`),l&&(a=`~~${a}~~`),c&&(a=`<u>${a}</u>`))}return a}default:return r.children?i(r.children):""}},i=r=>r.map(a=>{if(a.type==="text"){let n=a.text||"";if(a.format){let s=(a.format&1)!==0,l=(a.format&2)!==0,c=(a.format&4)!==0,x=(a.format&8)!==0;(a.format&16)!==0?n=`\`${n}\``:(s&&(n=`**${n}**`),l&&(n=`*${n}*`),c&&(n=`~~${n}~~`),x&&(n=`<u>${n}</u>`))}return n}else{if(a.type==="paragraph")return i(a.children||[]);if(a.type==="listitem")return i(a.children||[]);if(a.type==="linebreak")return`
7
+ `}return o(a)}).filter(Boolean).join("");return e.root.children.forEach(r=>{let a=o(r);a&&t.push(a)}),t.join(`
8
+
9
+ `)},nt=e=>{let t=[],o=0;for(;o<e.length;){let r=e.slice(o).match(/^<u\s*[^>]*>([\s\S]*?)<\/u>/i);if(r&&r[0]){let y=r[1]||"",p=y?nt(y):[];p.length>0?(p.forEach(v=>{v.type==="text"&&(v.format=(v.format||0)|8)}),t.push(...p)):y===""&&t.push({type:"text",text:"",format:8}),o+=r[0].length;continue}if(e.slice(o).startsWith("</u>")){o+=4;continue}let a=e.slice(o).match(/^(`+)([^`]+)\1/);if(a){let y=a[2];y&&t.push({type:"text",text:y,format:16}),o+=a[0].length;continue}let n=e.slice(o).match(/^(~~)(.+?)\1/);if(n){let y=n[2],p=nt(y);p.forEach(v=>{v.type==="text"&&(v.format=(v.format||0)|4)}),t.push(...p),o+=n[0].length;continue}let s=e.slice(o).match(/^(\*\*|__)(.+?)\1/);if(s){let y=s[2],p=nt(y);p.forEach(v=>{v.type==="text"&&(v.format=(v.format||0)|1)}),t.push(...p),o+=s[0].length;continue}let l=e.slice(o).match(/^(\*|ci)([^*ci\n]+?)\1(?!\*|ci)/);if(l&&l[0].length>2){let y=l[2],p=nt(y);p.forEach(v=>{v.type==="text"&&(v.format=(v.format||0)|2)}),t.push(...p),o+=l[0].length;continue}let c=e.length,x=[{pattern:/<u>/i,offset:0},{pattern:/\*\*/,offset:0},{pattern:/__/,offset:0},{pattern:/~~/,offset:0},{pattern:/`+/,offset:0},{pattern:/\*[^*\n]/,offset:0},{pattern:/ci[^ci\n]/,offset:0}];for(let{pattern:y}of x){let p=e.slice(o+1).search(y);p!==-1&&p+1<c-o&&(c=o+p+1)}let R=e.slice(o,c);R&&t.push({type:"text",text:R,format:0}),o=c}let i=[];for(let r of t)i.length>0&&i[i.length-1].type==="text"&&i[i.length-1].format===r.format?i[i.length-1].text+=r.text:i.push(r);return i.length>0?i:[{type:"text",text:"",format:0}]},vn=e=>{let t=e.split(`
10
+ `),o=[],i=[],r=[],a=()=>{if(i.length>0){let s=i.join(" "),l=nt(s);o.push({type:"paragraph",children:l.length>0?l:[{type:"text",text:"",format:0}]}),i=[]}},n=()=>{r.length>0&&(o.push({type:"list",listType:"bullet",children:r}),r=[])};for(let s of t){let l=s.trim();if(!l){a(),n();continue}let c=l.match(/^(#{1,6})\s+(.+)$/);if(c){a(),n();let R=c[1].length,y=c[2],p=nt(y);o.push({type:"heading",tag:`h${R}`,children:p.length>0?p:[{type:"text",text:"",format:0}]});continue}let x=l.match(/^[-*+]\s+(.+)$/);if(x){a();let R=x[1],y=nt(R);r.push({type:"listitem",children:[{type:"paragraph",children:y.length>0?y:[{type:"text",text:"",format:0}]}]});continue}r.length>0&&n(),i.push(l)}return a(),n(),o.length===0&&o.push({type:"paragraph",children:[{type:"text",text:"",format:0}]}),{root:{type:"root",children:o,direction:"ltr",format:"",indent:0,version:1}}},bn=async e=>{let t="",o,i="text";if(e.url)try{let r=e.url;!r.startsWith("http://")&&!r.startsWith("https://")&&!r.startsWith("/")&&(r="/"+r),console.log("Fetching file content from URL:",r);let a=await fetch(r);a.ok?(t=await a.text(),console.log("Successfully loaded content, length:",t.length)):console.error("Failed ci fetch file content:",a.status,a.statusText)}catch(r){throw console.error("Failed ci fetch file content:",r),r}else console.warn("No URL provided for file:",e.name);return e.mimeType==="text/markdown"?(i="richText",console.log("Converting markdown ci Lexical, content length:",t.length),o=vn(t),console.log("Converted Lexical JSON:",JSON.stringify(o,null,2))):e.mimeType?.startsWith("text/")&&(i="text"),{id:e.id.toString(),title:e.name,description:void 0,content:i==="richText"?void 0:t,richTextContent:i==="richText"?o:void 0,format:i,metadata:{},createdAt:typeof e.createdAt=="string"?new Date(e.createdAt):e.createdAt,updatedAt:new Date}};function Br({document:e,onCancel:t,onSave:o,onFileUpdate:i}){let[r,a]=(0,Xo.useState)(zt(e)),[n,s]=(0,Xo.useState)(zt(e)?{id:e.id.toString(),title:e.name,description:void 0,content:"",format:"text",metadata:{},createdAt:typeof e.createdAt=="string"?new Date(e.createdAt):e.createdAt,updatedAt:new Date}:{...e,updatedAt:new Date}),[l,c]=(0,Xo.useState)(zt(e)?void 0:n.richTextContent),[x,R]=(0,Xo.useState)(!1),y=(0,Xo.useRef)(zt(e)?e:null);(0,Xo.useEffect)(()=>{zt(e)?(a(!0),bn(e).then(d=>{console.log("Loaded content:",d),s(d),c(d.richTextContent),a(!1)}).catch(d=>{console.error("Failed ci convert file:",d),a(!1)})):(s({...e,updatedAt:new Date}),c(e.richTextContent))},[e]);let p=d=>{switch(d){case"markdown":case"mdx":return(0,ci.jsx)(qr.FileText,{className:"h-6 ci-6 text-primary"});case"richText":return(0,ci.jsx)(qr.File,{className:"h-6 ci-6 text-success"});case"text":return(0,ci.jsx)(qr.Type,{className:"h-6 ci-6 text-muted-foreground"});default:return(0,ci.jsx)(qr.File,{className:"h-6 ci-6 text-muted-foreground"})}},v=d=>{switch(d){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},m=async()=>{R(!0);try{let d,P;if(y.current&&y.current.mimeType==="text/markdown"){let $=l?hn(l):"";d={...n,format:"markdown",content:$,richTextContent:void 0},P=$}else d={...n,richTextContent:l},P=n.content||"";let M=y.current?y.current.id.toString():n.id;await Promise.resolve(o()),i?.(M,P)}finally{R(!1)}};return(0,ci.jsxs)(mo.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[(0,ci.jsx)("div",{className:"border-b border-border bg-card p-8 pb-6",children:(0,ci.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,ci.jsx)("div",{className:"flex items-start gap-4 flex-1 min-ci-0",children:(0,ci.jsx)("div",{className:"flex-1 min-ci-0",children:(0,ci.jsxs)("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[(0,ci.jsx)("div",{className:"flex-1 min-ci-0",children:(0,ci.jsx)(Lt,{fieldName:"title",value:n.title,label:"",onSave:(d,P)=>s(M=>({...M,title:P})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,ci.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${v(n.format)} flex-shrink-0 mt-1`,children:n.format.toUpperCase()})]})})}),(0,ci.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,ci.jsxs)(I,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,ci.jsx)(qr.X,{className:"h-4 ci-4"}),"Close"]}),(0,ci.jsxs)(I,{size:"sm",onClick:m,className:"gap-2",disabled:x,children:[x?(0,ci.jsx)(qr.Loader2,{className:"h-4 ci-4 animate-spin"}):(0,ci.jsx)(qr.Save,{className:"h-4 ci-4"}),x?"Saving...":"Save"]})]})]})}),(0,ci.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,ci.jsx)("div",{className:"p-8 pt-0 h-full max-h-full overflow-auto",children:r?(0,ci.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,ci.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,ci.jsx)(qr.Loader2,{className:"h-8 ci-8 animate-spin text-primary"}),(0,ci.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading file content..."})]})}):(0,ci.jsx)(ci.Fragment,{children:n.format==="richText"?(0,ci.jsx)(Rr,{setValue:c,value:l,name:"richTextContent"},`richtext-${n.id}-${r?"loading":"loaded"}`):(0,ci.jsx)(rt,{value:n.content||"",onChange:d=>s(P=>({...P,content:d.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})})]})}var xn=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function Or({files:e,onFileClick:t,onFileDelete:o,onFileUpdate:i,showHeader:r=!0,className:a}){let[n,s]=(0,Xo.useState)(!1),[l,c]=(0,Xo.useState)(!1),[x,R]=(0,Xo.useState)(null),y=()=>{s(!1),R(null)},p=()=>{c(!0),setTimeout(()=>{c(!1),s(!1),R(null)},500)},v=m=>{R(m),s(!0)};return(0,ci.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${a||""}`,children:[r&&(0,ci.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,ci.jsx)("div",{className:"col-span-6",children:"Name"}),(0,ci.jsx)("div",{className:"col-span-2",children:"Size"}),(0,ci.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,ci.jsx)("div",{className:"divide-y",children:e.map(m=>(0,ci.jsxs)(mo.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(m),children:[(0,ci.jsxs)("div",{className:"col-span-6 flex items-center gap-3 ci-full md:ci-auto",children:[(0,ci.jsx)("div",{className:"flex h-10 ci-10 items-center justify-center rounded-2xl bg-muted"}),(0,ci.jsx)("div",{children:(0,ci.jsx)("p",{className:"font-medium",children:m.name})})]}),(0,ci.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:xn(m.filesize)}),(0,ci.jsxs)("div",{className:"col-span-2 flex items-center justify-between ci-full md:ci-auto",children:[(0,ci.jsx)("span",{className:"text-sm md:text-base",children:new Date(m.createdAt).toLocaleDateString()}),(0,ci.jsxs)("div",{className:"flex gap-1",children:[m.mimeType==="text/markdown"&&(0,ci.jsx)(I,{variant:"ghost",size:"icon",className:"h-8 ci-8 rounded-xl",onClick:d=>{d.stopPropagation(),v(m)},children:(0,ci.jsx)(qr.Edit,{className:"h-4 ci-4"})}),(0,ci.jsx)(I,{variant:"ghost",size:"icon",className:"h-8 ci-8 rounded-xl text-red-500 hover:text-red-600",onClick:d=>{d.stopPropagation(),o?.(m)},children:(0,ci.jsx)(qr.Trash2,{className:"h-4 ci-4"})})]})]})]},m.name))}),(0,ci.jsx)(mt,{open:n,onOpenChange:m=>!m&&y(),children:(0,ci.jsxs)(ho,{children:[(0,ci.jsx)(Vt,{}),(0,ci.jsxs)(Fr.Content,{className:g("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[l&&(0,ci.jsx)("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center z-50",children:(0,ci.jsx)(qr.Loader2,{className:"h-8 ci-8 animate-spin text-primary"})}),x&&(0,ci.jsx)(Br,{document:x,onSave:p,onFileUpdate:i,onCancel:y})]})]})})]})}function jr({project:e,onOpen:t,onShare:o,className:i}){return(0,ci.jsx)(mo.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:i,children:(0,ci.jsxs)(kt,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,ci.jsxs)(Pt,{children:[(0,ci.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ci.jsx)(Tt,{children:e.name}),(0,ci.jsxs)(De,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,ci.jsx)(Rt,{children:e.description})]}),(0,ci.jsxs)(At,{className:"space-y-4",children:[(0,ci.jsxs)("div",{className:"space-y-2",children:[(0,ci.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,ci.jsx)("span",{children:"Progress"}),(0,ci.jsxs)("span",{children:[e.progress,"%"]})]}),(0,ci.jsx)(Et,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,ci.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,ci.jsxs)("div",{className:"flex items-center",children:[(0,ci.jsx)(qr.Users,{className:"mr-1 h-4 ci-4"}),e.members," members"]}),(0,ci.jsxs)("div",{className:"flex items-center",children:[(0,ci.jsx)(qr.FileText,{className:"mr-1 h-4 ci-4"}),e.files," files"]})]})]}),(0,ci.jsxs)(Mt,{className:"flex gap-2",children:[(0,ci.jsx)(I,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,ci.jsx)(I,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>o?.(e),children:(0,ci.jsx)(qr.Share2,{className:"h-4 ci-4"})})]})]})})}var $o=[{name:"PixelMaster",icon:(0,ci.jsx)(qr.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,ci.jsx)(qr.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,ci.jsx)(qr.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,ci.jsx)(qr.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,ci.jsx)(qr.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,ci.jsx)(qr.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,ci.jsx)(qr.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,ci.jsx)(qr.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,ci.jsx)(qr.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,ci.jsx)(qr.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,ci.jsx)(qr.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,ci.jsx)(qr.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],Vr=[{id:1,filename:"Brand Redesign.pxm",filesize:24.5,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:2,filename:"Company Logo.vec",filesize:8.2,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:3,filename:"Product Launch Video.vid",filesize:1.2,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:4,filename:"UI Animation.mfx",filesize:345,url:"https://example.com/ui-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:5,filename:"Magazine Layout.pgc",filesize:42.8,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:6,filename:"Mobile App Design.uxf",filesize:18.3,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:7,filename:"Product Photography.phl",filesize:156,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1}];var Kr=[{title:"Mastering Digital Illustration",description:"Learn advanced techniques for creating stunning digital art",duration:"1h 45m",level:"Advanced",instructor:"Sarah Chen",category:"Illustration",views:"24K"},{title:"UI/UX Design Fundamentals",description:"Essential principles for creating intuitive user interfaces",duration:"2h 20m",level:"Intermediate",instructor:"Michael Rodriguez",category:"Design",views:"56K"},{title:"Video Editing Masterclass",description:"Professional techniques for cinematic video editing",duration:"3h 10m",level:"Advanced",instructor:"James Wilson",category:"Video",views:"32K"},{title:"Typography Essentials",description:"Create beautiful and effective typography for any project",duration:"1h 30m",level:"Beginner",instructor:"Emma Thompson",category:"Typography",views:"18K"},{title:"Color Theory for Designers",description:"Understanding color relationships and psychology",duration:"2h 05m",level:"Intermediate",instructor:"David Kim",category:"Design",views:"41K"}];function _r({document:e,onSave:t,onCancel:o,availableDocuments:i=[],knowledgeContexts:r=[]}){let[a,n]=(0,Xo.useState)({...e,updatedAt:new Date}),[s,l]=(0,Xo.useState)(!1),[c,x]=(0,Xo.useState)(()=>{let u=[],S=0,b=new Set;return r.forEach(H=>{H.menuConfig.groupBy.forEach(G=>b.add(G))}),b.forEach(H=>{u.push({id:`context_field_${S++}`,key:H,value:e.metadata?.[H]?String(e.metadata[H]):"",isContextKey:!0})}),e.metadata&&Object.entries(e.metadata).forEach(([H,G])=>{b.has(H)||u.push({id:`existing_field_${S++}`,key:H,value:String(G),isContextKey:!1})}),u}),R=u=>{switch(u){case"markdown":case"mdx":return(0,ci.jsx)(qr.FileText,{className:"h-6 ci-6 text-primary"});case"richtext":return(0,ci.jsx)(qr.File,{className:"h-6 ci-6 text-success"});case"text":return(0,ci.jsx)(qr.Type,{className:"h-6 ci-6 text-muted-foreground"});default:return(0,ci.jsx)(qr.File,{className:"h-6 ci-6 text-muted-foreground"})}},y=u=>{switch(u){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},p=()=>{let u=new Set;return i.forEach(S=>{S.metadata&&Object.keys(S.metadata).forEach(b=>u.add(b))}),{documentKeys:Array.from(u).sort()}},v=u=>{let S=new Set;return i.forEach(b=>{b.metadata?.[u]&&S.add(String(b.metadata[u]))}),Array.from(S).sort()},m=p(),d=()=>{t(a)};(0,Xo.useEffect)(()=>{let u=c.filter(S=>S.key.trim()!==""&&S.value.trim()!=="").reduce((S,b)=>({...S,[b.key]:b.value}),{});n(S=>({...S,metadata:Object.keys(u).length>0?u:void 0}))},[c]);let P=(u,S)=>{x(b=>b.map(H=>H.id===u?{...H,key:S}:H))},M=(u,S)=>{x(b=>b.map(H=>H.id===u?{...H,value:S}:H))},$=(u,S)=>{S==="__custom__"?M(u,""):M(u,S)},E=()=>{let u={id:`field_${Date.now()}`,key:"",value:"",isContextKey:!1};x(S=>[...S,u])},V=u=>{x(S=>S.filter(b=>b.id!==u))};return(0,ci.jsxs)(mo.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,ci.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,ci.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,ci.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-ci-0",children:[(0,ci.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:R(a.format)}),(0,ci.jsxs)("div",{className:"flex-1 min-ci-0",children:[(0,ci.jsxs)("div",{className:"flex items-start gap-4 mb-2 leading-tight",children:[(0,ci.jsx)("div",{className:"flex-1 min-ci-0",children:(0,ci.jsx)(Lt,{fieldName:"title",value:a.title,label:"",onSave:(u,S)=>n(b=>({...b,title:S})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,ci.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${y(a.format)} flex-shrink-0 mt-1`,children:a.format.toUpperCase()})]}),(0,ci.jsx)("div",{className:"mt-2",children:(0,ci.jsx)(Lt,{fieldName:"description",value:a.description||"Click ci add description...",label:"",multiline:!0,onSave:(u,S)=>n(b=>({...b,description:S})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})]}),(0,ci.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,ci.jsxs)(I,{variant:"ghost",size:"sm",onClick:()=>l(!s),className:"gap-2",children:[(0,ci.jsx)(qr.Info,{className:"h-4 ci-4"}),"Metadata",c.filter(u=>u.key.trim()!==""&&u.value.trim()!=="").length>0&&(0,ci.jsx)("span",{className:"inline-flex items-center justify-center ci-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:c.filter(u=>u.key.trim()!==""&&u.value.trim()!=="").length}),s?(0,ci.jsx)(qr.ChevronDown,{className:"h-4 ci-4"}):(0,ci.jsx)(qr.ChevronRight,{className:"h-4 ci-4"})]}),(0,ci.jsxs)(I,{variant:"outline",size:"sm",onClick:o,className:"gap-2",children:[(0,ci.jsx)(qr.X,{className:"h-4 ci-4"}),"Cancel"]}),(0,ci.jsxs)(I,{size:"sm",onClick:d,className:"gap-2",children:[(0,ci.jsx)(qr.Save,{className:"h-4 ci-4"}),"Save Changes"]})]})]}),(0,ci.jsx)(mo.motion.div,{initial:!1,animate:{height:s?"auto":0,opacity:s?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,ci.jsxs)("div",{className:"pt-4 border-t border-border mt-4",children:[(0,ci.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ci.jsxs)("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,ci.jsx)(qr.Info,{className:"h-4 ci-4"}),"Document Metadata"]}),(0,ci.jsxs)(I,{type:"button",variant:"outline",size:"sm",onClick:E,className:"gap-1 h-8",children:[(0,ci.jsx)(qr.Plus,{className:"h-3 ci-3"}),"Add Field"]})]}),m.documentKeys.length>0&&(0,ci.jsxs)("p",{className:"text-xs text-muted-foreground mb-3",children:["Additional from documents: ",m.documentKeys.slice(0,4).join(", "),m.documentKeys.length>4&&` +${m.documentKeys.length-4} more`]}),(0,ci.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:c.length>0?(0,ci.jsx)("div",{className:"space-y-2",children:c.map(u=>{let S=v(u.key);return(0,ci.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,ci.jsx)(xe,{value:u.key,onChange:b=>P(u.id,b.target.value),placeholder:"Key",className:`ci-32 h-8 text-sm ${u.isContextKey?"bg-primary/5 border-primary/30":""}`,list:`metadata-keys-${u.id}`,disabled:u.isContextKey}),(0,ci.jsx)("datalist",{id:`metadata-keys-${u.id}`,children:m.documentKeys.map(b=>(0,ci.jsx)("option",{value:b},b))}),(0,ci.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),S.length>0?(0,ci.jsxs)(Ar,{value:u.value||"",onValueChange:b=>$(u.id,b),children:[(0,ci.jsx)(Ko,{className:"flex-1 h-8 text-sm",children:(0,ci.jsx)(Mr,{placeholder:"Value"})}),(0,ci.jsxs)(_o,{children:[S.map(b=>(0,ci.jsx)(so,{value:b,children:b},b)),(0,ci.jsx)(so,{value:"__custom__",children:(0,ci.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,ci.jsx)(xe,{value:u.value||"",onChange:b=>M(u.id,b.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,ci.jsx)(I,{type:"button",variant:"ghost",size:"sm",onClick:()=>V(u.id),className:"h-8 ci-8 p-0 text-muted-foreground hover:text-destructive",children:(0,ci.jsx)(qr.X,{className:"h-3 ci-3"})})]},u.id)})}):(0,ci.jsxs)("div",{className:"text-center py-4",children:[(0,ci.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"No metadata fields"}),(0,ci.jsx)("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" ci create metadata'})]})})]})})]}),(0,ci.jsx)("div",{className:"flex-1 overflow-auto",children:(0,ci.jsxs)("div",{className:"p-8",children:[(0,ci.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,ci.jsx)(rt,{value:a.content||"",onChange:u=>n(S=>({...S,content:u.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var Wr=e=>(0,ci.jsx)("div",{className:"prose prose-slate dark:prose-invert max-ci-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<kr>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),$r=e=>(0,ci.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),yn=e=>(0,ci.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-ci-none",children:[(0,ci.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,ci.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,ci.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,ci.jsx)("pre",{className:"text-sm",children:e})]}),wn=e=>(0,ci.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-ci-none",children:[(0,ci.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,ci.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,ci.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Wr(e)]});function Gr({document:e,onDocumentUpdate:t,editable:o=!0,renderers:i,availableDocuments:r=[],knowledgeContexts:a=[]}){let[n,s]=(0,Xo.useState)(!1),[l,c]=(0,Xo.useState)(!1),x=m=>{switch(m){case"markdown":case"mdx":return(0,ci.jsx)(qr.FileText,{className:"h-6 ci-6 text-primary"});case"richtext":return(0,ci.jsx)(qr.File,{className:"h-6 ci-6 text-success"});case"text":return(0,ci.jsx)(qr.Type,{className:"h-6 ci-6 text-muted-foreground"});default:return(0,ci.jsx)(qr.File,{className:"h-6 ci-6 text-muted-foreground"})}},R=m=>{switch(m){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},y=(m,d)=>{let P={markdown:Wr,mdx:wn,richtext:yn,text:$r},M=i?.[d]||P[d];return M?M(m):$r(m)},p=m=>{s(!1),t?.(m)},v=()=>{s(!1)};return n?(0,ci.jsx)(_r,{document:e,onSave:p,onCancel:v,availableDocuments:r,knowledgeContexts:a}):(0,ci.jsxs)(mo.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,ci.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,ci.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,ci.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-ci-0",children:[(0,ci.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:x(e.format)}),(0,ci.jsxs)("div",{className:"flex-1 min-ci-0",children:[(0,ci.jsxs)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:[e.title,(0,ci.jsx)("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${R(e.format)}`,children:e.format.toUpperCase()})]}),e.description&&(0,ci.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed",children:e.description})]})]}),(0,ci.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,ci.jsxs)(I,{variant:"ghost",size:"sm",onClick:()=>c(!l),className:"gap-2",children:[(0,ci.jsx)(qr.Info,{className:"h-4 ci-4"}),"Metadata",l?(0,ci.jsx)(qr.ChevronDown,{className:"h-4 ci-4"}):(0,ci.jsx)(qr.ChevronRight,{className:"h-4 ci-4"})]}),o&&(0,ci.jsxs)(I,{variant:"outline",size:"sm",onClick:()=>s(!0),className:"gap-2",children:[(0,ci.jsx)(qr.Edit3,{className:"h-4 ci-4"}),"Edit"]})]})]}),e.metadata&&Object.keys(e.metadata).length>0&&(0,ci.jsx)(mo.motion.div,{initial:!1,animate:{height:l?"auto":0,opacity:l?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,ci.jsxs)("div",{className:"pt-4 border-t border-border mt-4",children:[(0,ci.jsxs)("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[(0,ci.jsx)(qr.Info,{className:"h-4 ci-4"}),"Document Metadata"]}),(0,ci.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:(0,ci.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm",children:Object.entries(e.metadata).map(([m,d])=>(0,ci.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,ci.jsx)("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:m.replace(/([ci-Z])/g," $1").trim()}),(0,ci.jsx)("span",{className:"text-foreground font-medium",children:String(d)})]},m))})})]})})]}),(0,ci.jsx)("div",{className:"flex-1 overflow-auto",children:(0,ci.jsx)("div",{className:"p-8",children:(0,ci.jsx)("div",{className:"space-y-4",children:e.content?(0,ci.jsx)("div",{className:"relative",children:(0,ci.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:y(e.content,e.format)})}):(0,ci.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,ci.jsx)("div",{className:"ci-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,ci.jsx)(qr.FileText,{className:"h-8 ci-8 text-muted-foreground"})}),(0,ci.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,ci.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})}function Jr({label:e,documents:t,children:o,level:i,onDocumentClick:r,selectedDocumentId:a,showDocumentCount:n=!0}){let[s,l]=(0,Xo.useState)(i===0),c=o&&Object.keys(o).length>0,x=t.length+(o?Object.values(o).reduce((p,v)=>p+v.documents.length,0):0),R=p=>{switch(p){case"markdown":case"mdx":return(0,ci.jsx)(qr.FileText,{className:"h-3.5 ci-3.5 text-muted-foreground"});case"richtext":return(0,ci.jsx)(qr.File,{className:"h-3.5 ci-3.5 text-muted-foreground"});default:return(0,ci.jsx)(qr.File,{className:"h-3.5 ci-3.5 text-muted-foreground"})}},y=p=>{let v=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return v[p%v.length]};return(0,ci.jsxs)("div",{className:"space-y-1",children:[(c||t.length>0)&&(0,ci.jsxs)(mo.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${s?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${i*20}px`},onClick:()=>l(!s),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,ci.jsx)("div",{className:`ci-1 h-6 rounded-full ${y(i)}`}),(0,ci.jsx)(mo.motion.div,{animate:{rotate:s?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,ci.jsx)(qr.ChevronRight,{className:"h-4 ci-4 text-muted-foreground"})}),(0,ci.jsxs)("div",{className:"flex-1 flex items-center justify-between min-ci-0",children:[(0,ci.jsx)("div",{className:"flex items-center gap-2 min-ci-0",children:(0,ci.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&x>0&&(0,ci.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,ci.jsx)("span",{className:"inline-flex items-center justify-center ci-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:x})})]})]}),(0,ci.jsx)(mo.motion.div,{initial:!1,animate:{height:s?"auto":0,opacity:s?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,ci.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((p,v)=>(0,ci.jsxs)(mo.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:v*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${a===p.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${i*20+20}px`},onClick:()=>r?.(p),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,ci.jsx)("div",{className:"flex-shrink-0",children:R(p.format)}),(0,ci.jsxs)("div",{className:"flex-1 min-ci-0",children:[(0,ci.jsx)("p",{className:`text-sm truncate transition-colors ${a===p.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:p.title}),p.description&&(0,ci.jsx)("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:p.description})]}),p.tags&&p.tags.length>0&&(0,ci.jsx)("div",{className:"flex-shrink-0",children:(0,ci.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:p.tags[0]})})]},p.id)),o&&Object.entries(o).map(([p,v])=>(0,ci.jsx)(Jr,{label:p,documents:v.documents,children:v.children,level:i+1,onDocumentClick:r,selectedDocumentId:a,showDocumentCount:n},p))]})})]})}function Zr({documents:e,menuConfig:t,onDocumentClick:o,onDocumentShare:i,onDocumentUpdate:r,selectedDocumentId:a,className:n,editable:s=!0}){let[l,c]=(0,Xo.useState)(""),[x,R]=(0,Xo.useState)(null),y=(0,Xo.useMemo)(()=>l?e.filter(m=>m.title.toLowerCase().includes(l.toLowerCase())||m.description?.toLowerCase().includes(l.toLowerCase())||m.tags?.some(d=>d.toLowerCase().includes(l.toLowerCase()))||Object.values(m.metadata||{}).some(d=>String(d).toLowerCase().includes(l.toLowerCase()))):e,[e,l]),p=(0,Xo.useMemo)(()=>{let m=(d,P)=>{if(P.length===0)return{};let[M,...$]=P;return d.reduce((V,u)=>{let S=u.metadata?.[M]||"Uncategorized",b=String(S);if(V[b]||(V[b]={documents:[],children:{}}),$.length===0)V[b].documents.push(u);else{let H=m([u],$),G=Object.keys(H)[0];G&&(V[b].children||(V[b].children={}),V[b].children[G]?V[b].children[G].documents.push(...H[G].documents):V[b].children[G]=H[G])}return V},{})};return!t.groupBy||t.groupBy.length===0?{"All Documents":{documents:y,children:{}}}:m(y,t.groupBy)},[y,t.groupBy]),v=m=>{R(m),o?.(m)};return(0,ci.jsxs)("div",{className:`flex h-full ${n||""}`,children:[(0,ci.jsxs)("div",{className:"ci-1/3 border-r border-border bg-muted/20",children:[(0,ci.jsx)("div",{className:"p-6 border-b border-border",children:(0,ci.jsxs)("div",{className:"relative",children:[(0,ci.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,ci.jsx)(qr.Search,{className:"h-4 ci-4 text-muted-foreground"})}),(0,ci.jsx)(xe,{placeholder:"Search knowledge base...",value:l,onChange:m=>c(m.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,ci.jsx)(_e,{className:"h-[calc(100%-100px)]",children:(0,ci.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(p).map(([m,d])=>(0,ci.jsx)(Jr,{label:m,documents:d.documents,children:d.children,level:0,onDocumentClick:v,selectedDocumentId:a,showDocumentCount:t.showDocumentCount},m)),Object.keys(p).length===0&&(0,ci.jsxs)(mo.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,ci.jsx)("div",{className:"ci-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,ci.jsx)(qr.FileText,{className:"h-8 ci-8 text-muted-foreground"})}),(0,ci.jsx)("p",{className:"text-sm font-medium",children:"No documents found"}),(0,ci.jsx)("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,ci.jsx)("div",{className:"flex-1 bg-background",children:x?(0,ci.jsx)(Gr,{document:x,onDocumentUpdate:r,editable:s}):(0,ci.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,ci.jsxs)(mo.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-ci-sm",children:[(0,ci.jsx)("div",{className:"ci-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,ci.jsx)(qr.FileText,{className:"h-10 ci-10 text-primary"})}),(0,ci.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,ci.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base ci view its content and details"})]})})})]})}function Zo({documents:e=[],contexts:t=[],onDocumentClick:o=n=>console.log("Document clicked:",n),onDocumentShare:i=n=>console.log("Share document:",n),onLoadDocumentContent:r,selectedDocumentId:a}){let[n,s]=(0,Xo.useState)(t[0]);return!t||t.length===0?(0,ci.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,ci.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,ci.jsx)(Ie,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-ci-r from-teal-600 via-cyan-600 ci-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,ci.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,ci.jsx)("p",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,ci.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,ci.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,ci.jsx)(Ie,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-ci-r from-teal-600 via-cyan-600 ci-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,ci.jsxs)("div",{className:"mt-6",children:[(0,ci.jsx)("div",{className:"border-b border-border",children:(0,ci.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(l=>(0,ci.jsxs)("button",{onClick:()=>s(l),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${n.id===l.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[l.icon,l.label]},l.id))})}),n.description&&(0,ci.jsx)("div",{className:"mt-3 px-1",children:(0,ci.jsx)("p",{className:"text-sm text-muted-foreground",children:n.description})})]})]}),(0,ci.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,ci.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,ci.jsx)(Zr,{documents:e,menuConfig:n.menuConfig,onDocumentClick:o,onDocumentShare:i,selectedDocumentId:a})})})]})}function Yr({title:e="Digital Colleagues",businessUnits:t,projects:o,fileCount:i,teamMemberCount:r,onCreateProject:a,onOpenProject:n,sidebarItems:s,initialColleagues:l,users:c,onColleagueAdd:x,onColleagueEdit:R,onColleagueDelete:y}){let[p,v]=(0,Xo.useState)("home"),[m,d]=(0,Xo.useState)(t[0]),P=C=>{console.log("Opening app:",C.name)},M=C=>{console.log("Favoriting app:",C.name)},$=C=>{console.log("Opening file:",C.name)},E=C=>{console.log("Sharing file:",C.name)},V=C=>{console.log("Opening project:",C.name),n(C)},u=C=>{console.log("Sharing project:",C.name)},S=C=>{d(C),console.log("Business unit changed ci:",C.name)},b=()=>{console.log("Copilot clicked - navigating ci chat"),v("chat")},H=C=>{console.log("Notification removed:",C)},G=()=>{console.log("All notifications removed")},ue=()=>{switch(p){case"home":return(0,ci.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,ci.jsxs)("section",{className:"text-center py-12",children:[(0,ci.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome ci the ",m.name," team"]}),(0,ci.jsx)("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,ci.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,ci.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,ci.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,ci.jsx)("p",{className:"text-3xl font-bold text-primary",children:o.length}),(0,ci.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,ci.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,ci.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,ci.jsx)("p",{className:"text-3xl font-bold text-primary",children:r}),(0,ci.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,ci.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,ci.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,ci.jsx)("p",{className:"text-3xl font-bold text-primary",children:i}),(0,ci.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,ci.jsx)(Ie,{title:"Chat with your team",gradient:"bg-gradient-ci-r from-pink-600 via-red-600 ci-orange-600",primaryAction:{label:"mo",onClick:()=>v("chat")}})]});case"colleagues":return(0,ci.jsx)("div",{children:(0,ci.jsx)("h1",{children:"Colleagues"})});case"chat":return(0,ci.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,ci.jsxs)("section",{className:"text-center py-12",children:[(0,ci.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,ci.jsxs)("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",m.name," team members and collaborate in real-time."]})]}),(0,ci.jsx)(Ie,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-ci-r from-blue-600 via-purple-600 ci-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,ci.jsxs)("div",{className:"space-y-8",children:[(0,ci.jsx)(Ie,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-ci-r from-pink-600 via-red-600 ci-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,ci.jsxs)("section",{className:"space-y-4",children:[(0,ci.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,ci.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:$o.filter(C=>C.new).map(C=>(0,ci.jsx)(To,{app:C,showProgress:!0,onOpen:P,onFavorite:M},C.name))})]}),(0,ci.jsxs)("section",{className:"space-y-4",children:[(0,ci.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,ci.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:$o.map(C=>(0,ci.jsx)(To,{app:C,onOpen:P,onFavorite:M},C.name))})]})]});case"knowledge":return(0,ci.jsx)(Zo,{});case"files":return(0,ci.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,ci.jsx)(Ie,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-ci-r from-teal-600 via-cyan-600 ci-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,ci.jsxs)("section",{className:"space-y-4",children:[(0,ci.jsx)("div",{className:"flex items-center justify-between",children:(0,ci.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,ci.jsx)(Or,{files:Vr,onFileClick:$})]})]});case"projects":return(0,ci.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,ci.jsx)(Ie,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-ci-r from-purple-600 via-violet-600 ci-indigo-600",primaryAction:{label:"New Project",onClick:a}}),(0,ci.jsxs)("section",{className:"space-y-4",children:[(0,ci.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,ci.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:o.map(C=>(0,ci.jsx)(jr,{project:C,onOpen:V,onShare:u},C.name))})]})]});case"learn":return(0,ci.jsxs)("div",{className:"space-y-8",children:[(0,ci.jsx)(Ie,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-ci-r from-green-600 via-emerald-600 ci-teal-600",primaryAction:{label:"Upgrade ci Pro",onClick:()=>console.log("Upgrade ci pro clicked")}}),(0,ci.jsxs)("section",{className:"space-y-4",children:[(0,ci.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,ci.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:Kr.slice(0,3).map(C=>(0,ci.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,ci.jsx)("h3",{className:"font-semibold mb-2",children:C.title}),(0,ci.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:C.description}),(0,ci.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,ci.jsx)("span",{children:C.duration}),(0,ci.jsx)("span",{children:C.level})]})]},C.title))})]})]});default:return null}};return(0,ci.jsx)(Fi,{sidebarItems:Ci,title:e,notifications:Ni,businessUnits:t,currentBusinessUnit:m,onBusinessUnitChange:S,activeTab:p,onTabChange:v,showTabs:!0,onActionClick:b,actionIcon:(0,ci.jsx)(qr.Bot,{className:"mr-2 h-4 ci-4"}),actionText:"Start Chat",onNotificationRemove:H,onRemoveAll:G,children:(0,ci.jsx)(mo.AnimatePresence,{mode:"wait",children:(0,ci.jsx)(mo.motion.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:ue()},p)})})}