cortex-react-components 2.23.2 → 2.25.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 (181) hide show
  1. package/dist/chunk-2HKAJ4TZ.mjs +4 -0
  2. package/dist/{chunk-IF3425JX.mjs → chunk-2VOOH4YJ.mjs} +1 -1
  3. package/dist/{chunk-LBUC4M6L.mjs → chunk-3MCZBHGA.mjs} +1 -1
  4. package/dist/{chunk-UECG3SCG.mjs → chunk-3Y4EXCL7.mjs} +1 -1
  5. package/dist/{chunk-CBIULUZQ.mjs → chunk-4IVQWIYV.mjs} +1 -1
  6. package/dist/{chunk-67QPOSVV.mjs → chunk-57PJ7CHJ.mjs} +1 -1
  7. package/dist/{chunk-GZ7FGBTR.mjs → chunk-5EM6P7SU.mjs} +1 -1
  8. package/dist/{chunk-5WVFEIMC.mjs → chunk-6DQ7FEQQ.mjs} +1 -1
  9. package/dist/chunk-6UDBIRMT.mjs +1 -0
  10. package/dist/{chunk-HKGW6JI2.mjs → chunk-75XBZHOC.mjs} +1 -1
  11. package/dist/{chunk-M7NV6EFH.mjs → chunk-B2TBKNIJ.mjs} +1 -1
  12. package/dist/{chunk-TSFX33PR.mjs → chunk-BGQC6IQK.mjs} +1 -1
  13. package/dist/{chunk-GSSW663E.mjs → chunk-BZOG5JBW.mjs} +1 -1
  14. package/dist/{chunk-XJKRA2AE.mjs → chunk-CMU5JFUC.mjs} +1 -1
  15. package/dist/{chunk-N3B3XNV3.mjs → chunk-FRXZ2OKW.mjs} +1 -1
  16. package/dist/{chunk-MXCW6SOT.mjs → chunk-FX6IXEMQ.mjs} +1 -1
  17. package/dist/{chunk-LEUI66J6.mjs → chunk-GULRIPMU.mjs} +1 -1
  18. package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
  19. package/dist/{chunk-NWISIJFD.mjs → chunk-K4MFTVNB.mjs} +1 -1
  20. package/dist/{chunk-5SHZBJ5R.mjs → chunk-KY3ELFX5.mjs} +1 -1
  21. package/dist/{chunk-LJOWXPWW.mjs → chunk-MUHR5KA5.mjs} +1 -1
  22. package/dist/{chunk-YKG4FNS4.mjs → chunk-N52FSTLG.mjs} +1 -1
  23. package/dist/{chunk-ERJXTG6X.mjs → chunk-NPGGDQ6F.mjs} +1 -1
  24. package/dist/{chunk-JTMIQ7MK.mjs → chunk-NXAQ6ESJ.mjs} +1 -1
  25. package/dist/chunk-P5LSKHQC.mjs +9 -0
  26. package/dist/{chunk-CQAMS7RZ.mjs → chunk-PDAMYUP7.mjs} +1 -1
  27. package/dist/{chunk-JPLBPV7J.mjs → chunk-PYFPL7A5.mjs} +1 -1
  28. package/dist/{chunk-2RQDJ5XT.mjs → chunk-Q7KKN6MH.mjs} +1 -1
  29. package/dist/{chunk-H3CJOE6S.mjs → chunk-QWFFSMKK.mjs} +1 -1
  30. package/dist/{chunk-P55W6AFU.mjs → chunk-RIRZRO6U.mjs} +1 -1
  31. package/dist/{chunk-PK3OBSCB.mjs → chunk-RUZVSK25.mjs} +1 -1
  32. package/dist/{chunk-FKU4VQR6.mjs → chunk-S4ES6P3Y.mjs} +1 -1
  33. package/dist/chunk-SEITRCGW.mjs +1 -0
  34. package/dist/{chunk-7GMAMIHM.mjs → chunk-SPAOEUCG.mjs} +1 -1
  35. package/dist/{chunk-B7AXSCTN.mjs → chunk-STX6KQP5.mjs} +1 -1
  36. package/dist/{chunk-RSDUFAIB.mjs → chunk-T5HJS6OF.mjs} +1 -1
  37. package/dist/{chunk-LJQPLE4S.mjs → chunk-TUACRDU3.mjs} +1 -1
  38. package/dist/{chunk-SRUG246N.mjs → chunk-TXVA6XJT.mjs} +1 -1
  39. package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
  40. package/dist/{chunk-SCBDVNHG.mjs → chunk-VATGKKXW.mjs} +1 -1
  41. package/dist/{chunk-255P6K5W.mjs → chunk-VBSFVJM5.mjs} +1 -1
  42. package/dist/{chunk-6PS55VJZ.mjs → chunk-VDFRWGXR.mjs} +1 -1
  43. package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
  44. package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
  45. package/dist/chunk-VTFO5GXK.mjs +4 -0
  46. package/dist/chunk-XDELWNND.mjs +4 -0
  47. package/dist/{chunk-S7MFNEEY.mjs → chunk-YJ7XPZWV.mjs} +1 -1
  48. package/dist/components/Blocks/Banner.mjs +1 -1
  49. package/dist/components/Blocks/CallToAction.mjs +1 -1
  50. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  51. package/dist/components/Blocks/Content.mjs +1 -1
  52. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  53. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  54. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  55. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  56. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  57. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  58. package/dist/components/Blocks/index.mjs +1 -1
  59. package/dist/components/Cards/ContentCard.mjs +1 -1
  60. package/dist/components/Cards/FeatureCard.mjs +1 -1
  61. package/dist/components/Cards/index.mjs +1 -1
  62. package/dist/components/Chat/ChatInterface.mjs +1 -1
  63. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  64. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  65. package/dist/components/Chat/demo-tests.mjs +1 -1
  66. package/dist/components/Chat/demo.mjs +1 -1
  67. package/dist/components/Chat/example-usage.mjs +1 -1
  68. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  69. package/dist/components/Chat/index.mjs +1 -1
  70. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  71. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +6 -1
  72. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  73. package/dist/components/DigitalColleagues/Views/index.js +6 -1
  74. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  75. package/dist/components/DigitalColleagues/index.js +6 -1
  76. package/dist/components/DigitalColleagues/index.mjs +1 -1
  77. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  78. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  79. package/dist/components/Foundary/MainPage.mjs +1 -1
  80. package/dist/components/Foundary/Pages/dashboardpage.js +6 -1
  81. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  82. package/dist/components/Foundary/RichText/index.js +1 -1
  83. package/dist/components/Foundary/RichText/index.mjs +1 -1
  84. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  85. package/dist/components/Foundary/Views/KnowledgeView.js +1 -1
  86. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  87. package/dist/components/Foundary/Views/index.js +6 -1
  88. package/dist/components/Foundary/Views/index.mjs +1 -1
  89. package/dist/components/Foundary/document-edit.js +1 -1
  90. package/dist/components/Foundary/document-edit.mjs +1 -1
  91. package/dist/components/Foundary/document-preview-examples.js +3 -3
  92. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  93. package/dist/components/Foundary/document-preview.js +1 -1
  94. package/dist/components/Foundary/document-preview.mjs +1 -1
  95. package/dist/components/Foundary/file-edit.css +1 -0
  96. package/dist/components/Foundary/file-edit.d.ts +9 -0
  97. package/dist/components/Foundary/file-edit.js +9 -0
  98. package/dist/components/Foundary/file-edit.mjs +2 -0
  99. package/dist/components/Foundary/index.js +6 -1
  100. package/dist/components/Foundary/index.mjs +1 -1
  101. package/dist/components/Foundary/knowledge-browser.js +1 -1
  102. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  103. package/dist/components/Foundary/types.d.ts +1 -0
  104. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  105. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  106. package/dist/components/HeaderFooter/index.mjs +1 -1
  107. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  108. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  109. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  110. package/dist/components/Heros/PostHero/index.mjs +1 -1
  111. package/dist/components/Heros/RenderHero.mjs +1 -1
  112. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  113. package/dist/components/Heros/index.mjs +1 -1
  114. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  115. package/dist/components/Layouts/Print.mjs +1 -1
  116. package/dist/components/Layouts/SlideShow.mjs +1 -1
  117. package/dist/components/Layouts/index.mjs +1 -1
  118. package/dist/components/Menus/index.mjs +1 -1
  119. package/dist/components/Other/index.mjs +1 -1
  120. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  121. package/dist/components/Payload/Media/index.mjs +1 -1
  122. package/dist/components/Payload/PayloadCard/index.mjs +1 -1
  123. package/dist/components/Payload/RichText/index.mjs +1 -1
  124. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  125. package/dist/components/Payload/index.mjs +1 -1
  126. package/dist/components/Projects/EpicsView.mjs +1 -1
  127. package/dist/components/Projects/FileView.d.ts +2 -1
  128. package/dist/components/Projects/FileView.js +6 -1
  129. package/dist/components/Projects/FileView.mjs +1 -1
  130. package/dist/components/Projects/KanbanBoardView.d.ts +3 -0
  131. package/dist/components/Projects/KanbanBoardView.js +6 -1
  132. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  133. package/dist/components/Projects/ProjectPage.js +6 -1
  134. package/dist/components/Projects/ProjectPage.mjs +1 -1
  135. package/dist/components/Projects/ProjectView.js +6 -1
  136. package/dist/components/Projects/ProjectView.mjs +1 -1
  137. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  138. package/dist/components/Projects/TaskDetailsModal.d.ts +3 -0
  139. package/dist/components/Projects/TaskDetailsModal.js +6 -1
  140. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  141. package/dist/components/Projects/file-list.d.ts +4 -2
  142. package/dist/components/Projects/file-list.js +6 -1
  143. package/dist/components/Projects/file-list.mjs +1 -1
  144. package/dist/components/Projects/index.js +6 -1
  145. package/dist/components/Projects/index.mjs +1 -1
  146. package/dist/components/dc-temp/index.js +6 -1
  147. package/dist/components/dc-temp/index.mjs +1 -1
  148. package/dist/components/index.js +31 -26
  149. package/dist/components/index.mjs +1 -1
  150. package/dist/components/ui/index.mjs +1 -1
  151. package/dist/globals.css +1 -1
  152. package/dist/index.js +36 -31
  153. package/dist/index.mjs +1 -1
  154. package/dist/metafile-cjs.json +1 -1
  155. package/dist/metafile-esm.json +1 -1
  156. package/dist/pages/Blog.mjs +1 -1
  157. package/dist/pages/Documentation.mjs +1 -1
  158. package/dist/pages/IndexPage.mjs +1 -1
  159. package/dist/pages/Intranet.mjs +1 -1
  160. package/dist/pages/LandingPage.mjs +1 -1
  161. package/dist/pages/Page.mjs +1 -1
  162. package/dist/pages/Publish.mjs +1 -1
  163. package/dist/pages/Website.mjs +1 -1
  164. package/dist/sections/AboutSection.mjs +1 -1
  165. package/dist/sections/BlogDetail.mjs +1 -1
  166. package/dist/sections/BlogList.mjs +1 -1
  167. package/dist/sections/BlogListSection.mjs +1 -1
  168. package/dist/sections/ContactSection.mjs +1 -1
  169. package/dist/sections/PageSections.mjs +1 -1
  170. package/dist/sections/PricingSection.mjs +1 -1
  171. package/dist/sections/ServiceDetail.mjs +1 -1
  172. package/dist/sections/ServiceDetailSection.mjs +1 -1
  173. package/dist/sections/ServiceSection.mjs +1 -1
  174. package/dist/sections/form/index.mjs +1 -1
  175. package/dist/sections/index.mjs +1 -1
  176. package/package.json +1 -1
  177. package/dist/chunk-JXQRVEQB.mjs +0 -4
  178. package/dist/chunk-L5NPH5RX.mjs +0 -1
  179. package/dist/chunk-NAGBKKTZ.mjs +0 -4
  180. package/dist/chunk-PZFYJ5FS.mjs +0 -4
  181. package/dist/chunk-UM57PWI7.mjs +0 -1
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-UECG3SCG.mjs";import"../../chunk-QOZ2O3FG.mjs";import"../../chunk-L5NPH5RX.mjs";import"../../chunk-KZCIHFTM.mjs";import"../../chunk-2R3MJSQ7.mjs";import"../../chunk-UM57PWI7.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-NGX2VCHS.mjs";import"../../chunk-6PS55VJZ.mjs";import"../../chunk-KG7HG2VO.mjs";import"../../chunk-L3V5YDPH.mjs";import"../../chunk-QC2UWZWL.mjs";import"../../chunk-NAGBKKTZ.mjs";import"../../chunk-JXQRVEQB.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-EZC3YWSQ.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-EOR2BAI2.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as default};
2
+ "use strict";import{a}from"../../chunk-3Y4EXCL7.mjs";import"../../chunk-QOZ2O3FG.mjs";import"../../chunk-2R3MJSQ7.mjs";import"../../chunk-NGX2VCHS.mjs";import"../../chunk-VDFRWGXR.mjs";import"../../chunk-SEITRCGW.mjs";import"../../chunk-6UDBIRMT.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-KG7HG2VO.mjs";import"../../chunk-QC2UWZWL.mjs";import"../../chunk-KZCIHFTM.mjs";import"../../chunk-L3V5YDPH.mjs";import"../../chunk-XDELWNND.mjs";import"../../chunk-2HKAJ4TZ.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-P5LSKHQC.mjs";import"../../chunk-EZC3YWSQ.mjs";import"../../chunk-VTFO5GXK.mjs";import"../../chunk-GULRIPMU.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-EOR2BAI2.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as default};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-TKCFCYEQ.mjs";import"../../chunk-CDVRH3MC.mjs";import"../../chunk-KPTGYVDM.mjs";import"../../chunk-5RTGHMF3.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as default};
2
+ "use strict";import{a}from"../../chunk-HSQAHQNP.mjs";import"../../chunk-KPTGYVDM.mjs";import"../../chunk-CDVRH3MC.mjs";import"../../chunk-5RTGHMF3.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as default};
@@ -13,6 +13,9 @@ interface TaskDetailsModalProps {
13
13
  content: string;
14
14
  }) => void;
15
15
  colleagues: Colleague[];
16
+ onUploadFile?: (taskId: string, file: FormData) => Promise<void>;
17
+ onDeleteFile?: (taskId: string, fileId: string) => Promise<void>;
18
+ onFileUpdate?: (fileId: string, content: string) => void;
16
19
  }
17
20
  export declare const TaskDetailsModal: React.FC<TaskDetailsModalProps>;
18
21
  export {};
@@ -1,4 +1,9 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- "use strict";var At=Object.create;var ye=Object.defineProperty;var Lt=Object.getOwnPropertyDescriptor;var zt=Object.getOwnPropertyNames;var Et=Object.getPrototypeOf,Mt=Object.prototype.hasOwnProperty;var Vt=(e,t)=>{for(var o in t)ye(e,o,{get:t[o],enumerable:!0})},Je=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of zt(t))!Mt.call(e,s)&&s!==o&&ye(e,s,{get:()=>t[s],enumerable:!(r=Lt(t,s))||r.enumerable});return e};var z=(e,t,o)=>(o=e!=null?At(Et(e)):{},Je(t||!e||!e.__esModule?ye(o,"default",{value:e,enumerable:!0}):o,e)),Bt=e=>Je(ye({},"__esModule",{value:!0}),e);var Do={};Vt(Do,{TaskDetailsModal:()=>ko});module.exports=Bt(Do);var $=require("react");var de=z(require("react")),k=z(require("@radix-ui/react-dialog")),rt=require("lucide-react");var ot=require("clsx");var Ae="-",Gt=e=>{let t=Wt(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:n=>{let i=n.split(Ae);return i[0]===""&&i.length!==1&&i.shift(),Xe(i,t)||Ft(n)},getConflictingClassGroupIds:(n,i)=>{let g=o[n]||[];return i&&r[n]?[...g,...r[n]]:g}}},Xe=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),s=r?Xe(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;let a=e.join(Ae);return t.validators.find(({validator:n})=>n(a))?.classGroupId},Ke=/^\[(.+)\]$/,Ft=e=>{if(Ke.test(e)){let t=Ke.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Wt=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return Ut(Object.entries(e.classGroups),o).forEach(([a,n])=>{Ie(n,r,a,t)}),r},Ie=(e,t,o,r)=>{e.forEach(s=>{if(typeof s=="string"){let a=s===""?t:qe(t,s);a.classGroupId=o;return}if(typeof s=="function"){if(Ot(s)){Ie(s(r),t,o,r);return}t.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([a,n])=>{Ie(n,qe(t,a),o,r)})})},qe=(e,t)=>{let o=e;return t.split(Ae).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},Ot=e=>e.isThemeGetter,Ut=(e,t)=>t?e.map(([o,r])=>{let s=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([n,i])=>[t+n,i])):a);return[o,s]}):e,Ht=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,s=(a,n)=>{o.set(a,n),t++,t>e&&(t=0,r=o,o=new Map)};return{get(a){let n=o.get(a);if(n!==void 0)return n;if((n=r.get(a))!==void 0)return s(a,n),n},set(a,n){o.has(a)?o.set(a,n):s(a,n)}}},Ze="!",$t=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,s=t[0],a=t.length,n=i=>{let g=[],d=0,p=0,R;for(let c=0;c<i.length;c++){let D=i[c];if(d===0){if(D===s&&(r||i.slice(c,c+a)===t)){g.push(i.slice(p,c)),p=c+a;continue}if(D==="/"){R=c;continue}}D==="["?d++:D==="]"&&d--}let y=g.length===0?i:i.substring(p),x=y.startsWith(Ze),f=x?y.substring(1):y,S=R&&R>p?R-p:void 0;return{modifiers:g,hasImportantModifier:x,baseClassName:f,maybePostfixModifierPosition:S}};return o?i=>o({className:i,parseClassName:n}):n},_t=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},jt=e=>({cache:Ht(e.cacheSize),parseClassName:$t(e),...Gt(e)}),Jt=/\s+/,Kt=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:s}=t,a=[],n=e.trim().split(Jt),i="";for(let g=n.length-1;g>=0;g-=1){let d=n[g],{modifiers:p,hasImportantModifier:R,baseClassName:y,maybePostfixModifierPosition:x}=o(d),f=!!x,S=r(f?y.substring(0,x):y);if(!S){if(!f){i=d+(i.length>0?" "+i:i);continue}if(S=r(y),!S){i=d+(i.length>0?" "+i:i);continue}f=!1}let c=_t(p).join(":"),D=R?c+Ze:c,L=D+S;if(a.includes(L))continue;a.push(L);let m=s(S,f);for(let I=0;I<m.length;++I){let q=m[I];a.push(D+q)}i=d+(i.length>0?" "+i:i)}return i};function qt(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Qe(t))&&(r&&(r+=" "),r+=o);return r}var Qe=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Qe(e[r]))&&(o&&(o+=" "),o+=t);return o};function Xt(e,...t){let o,r,s,a=n;function n(g){let d=t.reduce((p,R)=>R(p),e());return o=jt(d),r=o.cache.get,s=o.cache.set,a=i,i(g)}function i(g){let d=r(g);if(d)return d;let p=Kt(g,o);return s(g,p),p}return function(){return a(qt.apply(null,arguments))}}var w=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Ye=/^\[(?:([a-z-]+):)?(.+)\]$/i,Zt=/^\d+\/\d+$/,Qt=new Set(["px","full","screen"]),Yt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|E|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,to=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,oo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ro=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,W=e=>ee(e)||Qt.has(e)||Zt.test(e),j=e=>te(e,"length",po),ee=e=>!!e&&!Number.isNaN(Number(e)),De=e=>te(e,"number",ee),le=e=>!!e&&Number.isInteger(Number(e)),ao=e=>e.endsWith("%")&&ee(e.slice(0,-1)),u=e=>Ye.test(e),J=e=>Yt.test(e),so=new Set(["length","size","percentage"]),io=e=>te(e,so,et),no=e=>te(e,"position",et),lo=new Set(["image","url"]),co=e=>te(e,lo,fo),mo=e=>te(e,"",uo),ce=()=>!0,te=(e,t,o)=>{let r=Ye.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},po=e=>eo.test(e)&&!to.test(e),et=()=>!1,uo=e=>oo.test(e),fo=e=>ro.test(e);var go=()=>{let e=w("colors"),t=w("spacing"),o=w("blur"),r=w("brightness"),s=w("borderColor"),a=w("borderRadius"),n=w("borderSpacing"),i=w("borderWidth"),g=w("contrast"),d=w("grayscale"),p=w("hueRotate"),R=w("invert"),y=w("gap"),x=w("gradientColorStops"),f=w("gradientColorStopPositions"),S=w("inset"),c=w("margin"),D=w("opacity"),L=w("padding"),m=w("saturate"),I=w("scale"),q=w("sepia"),ge=w("skew"),be=w("space"),ve=w("translate"),Q=()=>["auto","contain","none"],Y=()=>["auto","hidden","clip","visible","scroll"],ie=()=>["auto",u,t],b=()=>[u,t],G=()=>["",W,j],_=()=>["auto",ee,u],$e=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],he=()=>["solid","dashed","dotted","double","none"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ke=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",u],je=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[ee,u];return{cacheSize:500,separator:":",theme:{colors:[ce],spacing:[W,j],blur:["none","",J,u],brightness:F(),borderColor:[e],borderRadius:["none","","full",J,u],borderSpacing:b(),borderWidth:G(),contrast:F(),grayscale:ne(),hueRotate:F(),invert:ne(),gap:b(),gradientColorStops:[e],gradientColorStopPositions:[ao,j],inset:ie(),margin:ie(),opacity:F(),padding:b(),saturate:F(),scale:F(),sepia:ne(),skew:F(),space:b(),translate:b()},classGroups:{aspect:[{aspect:["auto","square","video",u]}],container:["container"],columns:[{columns:[J]}],"break-after":[{"break-after":je()}],"break-before":[{"break-before":je()}],"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:[...$e(),u]}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-y":[{"overflow-y":Y()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",le,u]}],basis:[{basis:ie()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",u]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",le,u]}],"grid-cols":[{"grid-cols":[ce]}],"col-start-end":[{col:["auto",{span:["full",le,u]},u]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[ce]}],"row-start-end":[{row:["auto",{span:[le,u]},u]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",u]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",u]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...ke()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ke(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ke(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[L]}],px:[{px:[L]}],py:[{py:[L]}],ps:[{ps:[L]}],pe:[{pe:[L]}],E:[{E:[L]}],pr:[{pr:[L]}],pb:[{pb:[L]}],pl:[{pl:[L]}],m:[{m:[c]}],mx:[{mx:[c]}],my:[{my:[c]}],ms:[{ms:[c]}],me:[{me:[c]}],mt:[{mt:[c]}],mr:[{mr:[c]}],mb:[{mb:[c]}],ml:[{ml:[c]}],"space-x":[{"space-x":[be]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[be]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",u,t]}],"min-w":[{"min-w":[u,t,"min","max","fit"]}],"max-w":[{"max-w":[u,t,"none","full","min","max","fit","prose",{screen:[J]},J]}],h:[{h:[u,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[u,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[u,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[u,t,"auto","min","max","fit"]}],"font-size":[{text:["base",J,j]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",De]}],"font-family":[{font:[ce]}],"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",u]}],"line-clamp":[{"line-clamp":["none",ee,De]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",W,u]}],"list-image":[{"list-image":["none",u]}],"list-style-type":[{list:["none","disc","decimal",u]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[D]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[D]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",W,j]}],"underline-offset":[{"underline-offset":["auto",W,u]}],"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:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",u]}],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",u]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[D]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$e(),no]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",io]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","E","tl"]},co]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[f]}],"gradient-via-pos":[{via:[f]}],"gradient-to-pos":[{to:[f]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],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-E":[{"rounded-E":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-rt":[{"rounded-rt":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-E":[{"border-E":[i]}],"border-opacity":[{"border-opacity":[D]}],"border-style":[{border:[...he(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[D]}],"divide-style":[{divide:he()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-E":[{"border-E":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...he()]}],"outline-offset":[{"outline-offset":[W,u]}],"outline-w":[{outline:[W,j]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[D]}],"ring-offset-w":[{"ring-offset":[W,j]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",J,mo]}],"shadow-color":[{shadow:[ce]}],opacity:[{opacity:[D]}],"mix-blend":[{"mix-blend":[..._e(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_e()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",J,u]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[R]}],saturate:[{saturate:[m]}],sepia:[{sepia:[q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[R]}],"backdrop-opacity":[{"backdrop-opacity":[D]}],"backdrop-saturate":[{"backdrop-saturate":[m]}],"backdrop-sepia":[{"backdrop-sepia":[q]}],"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",u]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",u]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",u]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[le,u]}],"translate-x":[{"translate-x":[ve]}],"translate-y":[{"translate-y":[ve]}],"skew-x":[{"skew-x":[ge]}],"skew-y":[{"skew-y":[ge]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",u]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","rt-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",u]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-E":[{"scroll-E":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"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",u]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[W,j,De]}],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","pe","E","pr","pb","pl"],px:["pr","pl"],py:["E","pb"],m:["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-E","rounded-ss","rounded-rt","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-rt","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-E":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-E"],"border-w-x":["border-w-r","border-w-E"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-E"],"border-color-x":["border-color-r","border-color-E"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-E","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-E","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var tt=Xt(go);function v(...e){return tt((0,ot.clsx)(e))}var E=require("react/jsx-runtime"),at=k.Root;var bo=k.Portal;var st=de.forwardRef(({className:e,...t},o)=>(0,E.jsx)(k.Overlay,{ref:o,className:v("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}));st.displayName=k.Overlay.displayName;var Le=de.forwardRef(({className:e,children:t,...o},r)=>(0,E.jsxs)(bo,{children:[(0,E.jsx)(st,{}),(0,E.jsxs)(k.Content,{ref:r,className:v("fixed left-[50%] top-[50%] z-50 grid w-full max-w-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-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,E.jsxs)(k.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,E.jsx)(rt.X,{className:"h-4 w-4"}),(0,E.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Le.displayName=k.Content.displayName;var ze=({className:e,...t})=>(0,E.jsx)("div",{className:v("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ze.displayName="DialogHeader";var vo=({className:e,...t})=>(0,E.jsx)("div",{className:v("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});vo.displayName="DialogFooter";var Ee=de.forwardRef(({className:e,...t},o)=>(0,E.jsx)(k.Title,{ref:o,className:v("text-lg font-semibold leading-none tracking-tight",e),...t}));Ee.displayName=k.Title.displayName;var ho=de.forwardRef(({className:e,...t},o)=>(0,E.jsx)(k.Description,{ref:o,className:v("text-sm text-muted-foreground",e),...t}));ho.displayName=k.Description.displayName;var it=z(require("react"));var me=it.forwardRef(({className:e,type:t,...o},r)=>(0,E.jsx)("input",{type:t,className:v("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:r,...o}));me.displayName="Input";var lt=z(require("react")),pe=lt.forwardRef(({className:e,...t},o)=>(0,E.jsx)("textarea",{className:v("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}));pe.displayName="Textarea";var dt=z(require("react")),Me=z(require("@radix-ui/react-label")),mt=require("class-variance-authority");var yo=(0,mt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),A=dt.forwardRef(({className:e,...t},o)=>(0,E.jsx)(Me.Root,{ref:o,className:v(yo(),e),...t}));A.displayName=Me.Root.displayName;var Be=({fieldName:e,value:t,label:o,multiline:r=!1,onSave:s,className:a="",disabled:n=!1})=>{let[i,g]=(0,$.useState)(!1),[d,p]=(0,$.useState)(""),R=()=>{n||(g(!0),p(t))},y=async()=>{d!==t&&await s(e,d),g(!1)},x=f=>{f.key==="Enter"&&!r||f.key==="Enter"&&f.ctrlKey&&r?y():f.key==="Escape"&&(g(!1),p(""))};return(0,E.jsxs)("div",{className:`space-y-2 ${a}`,children:[(0,E.jsx)(A,{children:o}),i?r?(0,E.jsx)(pe,{value:d,onChange:f=>p(f.target.value),onBlur:y,onKeyDown:x,autoFocus:!0,rows:4,className:"resize-none"}):(0,E.jsx)(me,{value:d,onChange:f=>p(f.target.value),onBlur:y,onKeyPress:x,autoFocus:!0,className:"text-lg font-medium"}):(0,E.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 ${r?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,E.jsx)("span",{className:r?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!n&&(0,E.jsx)(rt.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var xo=(0,mt.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 oe({className:e,variant:t,...o}){return(0,E.jsx)("div",{className:v(xo({variant:t}),e),...o})}var xe=z(require("react")),U=z(require("@radix-ui/react-avatar"));var Ge=xe.forwardRef(({className:e,...t},o)=>(0,E.jsx)(U.Root,{ref:o,className:v("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ge.displayName=U.Root.displayName;var wo=xe.forwardRef(({className:e,...t},o)=>(0,E.jsx)(U.Image,{ref:o,className:v("aspect-square h-full w-full",e),...t}));wo.displayName=U.Image.displayName;var Fe=xe.forwardRef(({className:e,...t},o)=>(0,E.jsx)(U.Fallback,{ref:o,className:v("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Fe.displayName=U.Fallback.displayName;var bt=require("@radix-ui/react-slot"),ht=z(require("react")),So=(0,mt.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"}}}),H=ht.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...s},a)=>(0,E.jsx)(e?bt.Slot:"button",{className:v(So({className:t,size:o,variant:r})),ref:a,...s}));H.displayName="Button";var wt=({comments:e,onAddComment:t})=>{let[o,r]=(0,$.useState)(""),s=n=>n.split(" ").map(i=>i[0]).join("").toUpperCase(),a=()=>{o.trim()&&(t(o),r(""))};return(0,E.jsxs)("div",{className:"space-y-4",children:[(0,E.jsxs)("div",{className:"flex items-center gap-2",children:[(0,E.jsx)(rt.MessageSquare,{className:"h-5 w-5"}),(0,E.jsx)(A,{className:"text-lg font-medium",children:"Comments"}),(0,E.jsx)(oe,{variant:"secondary",children:e.length})]}),(0,E.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(n=>(0,E.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,E.jsx)(Ge,{className:"h-8 w-8 mt-1",children:(0,E.jsx)(Fe,{className:"text-xs bg-muted text-muted-foreground",children:s(n.author)})}),(0,E.jsxs)("div",{className:"flex-1",children:[(0,E.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,E.jsx)("span",{className:"font-medium text-sm",children:n.author}),(0,E.jsxs)("span",{className:"text-xs text-muted-foreground",children:[n.createdAt.toLocaleDateString()," at ",n.createdAt.toLocaleTimeString()]})]}),(0,E.jsx)("p",{className:"text-sm text-muted-foreground",children:n.text})]})]},n.id))}),(0,E.jsxs)("div",{className:"flex gap-2",children:[(0,E.jsx)(pe,{value:o,onChange:n=>r(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,E.jsx)(H,{onClick:a,disabled:!o.trim(),size:"sm",className:"self-end",children:(0,E.jsx)(rt.Send,{className:"h-4 w-4"})})]})]})};var X=z(require("react")),re=z(require("@radix-ui/react-toggle-group"));var St=z(require("react")),We=z(require("@radix-ui/react-toggle"));var Oe=(0,mt.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Po=St.forwardRef(({className:e,variant:t,size:o,...r},s)=>(0,E.jsx)(We.Root,{ref:s,className:v(Oe({variant:t,size:o,className:e})),...r}));Po.displayName=We.Root.displayName;var Rt=X.createContext({size:"default",variant:"default"}),Ne=X.forwardRef(({className:e,variant:t,size:o,children:r,...s},a)=>(0,E.jsx)(re.Root,{ref:a,className:v("flex items-center justify-center gap-1",e),...s,children:(0,E.jsx)(Rt.Provider,{value:{variant:t,size:o},children:r})}));Ne.displayName=re.Root.displayName;var Re=X.forwardRef(({className:e,children:t,variant:o,size:r,...s},a)=>{let n=X.useContext(Rt);return(0,E.jsx)(re.Item,{ref:a,className:v(Oe({variant:n.variant||o,size:n.size||r}),e),...s,children:t})});Re.displayName=re.Item.displayName;var h=z(require("@radix-ui/react-select")),K=z(require("react")),Ce=h.Root;var ue=K.forwardRef(({children:e,className:t,...o},r)=>(0,E.jsxs)(h.Trigger,{className:v("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:r,...o,children:[e,(0,E.jsx)(h.Icon,{asChild:!0,children:(0,E.jsx)(rt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ue.displayName=h.Trigger.displayName;var Ct=K.forwardRef(({className:e,...t},o)=>(0,E.jsx)(h.ScrollUpButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,E.jsx)(rt.ChevronUp,{className:"h-4 w-4"})}));Ct.displayName=h.ScrollUpButton.displayName;var Tt=K.forwardRef(({className:e,...t},o)=>(0,E.jsx)(h.ScrollDownButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,E.jsx)(rt.ChevronDown,{className:"h-4 w-4"})}));Tt.displayName=h.ScrollDownButton.displayName;var fe=K.forwardRef(({children:e,className:t,position:o="popper",...r},s)=>(0,E.jsx)(h.Portal,{children:(0,E.jsxs)(h.Content,{className:v("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-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,ref:s,...r,children:[(0,E.jsx)(Ct,{}),(0,E.jsx)(h.Viewport,{className:v("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,E.jsx)(Tt,{})]})}));fe.displayName=h.Content.displayName;var No=K.forwardRef(({className:e,...t},o)=>(0,E.jsx)(h.Label,{className:v("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));No.displayName=h.Label.displayName;var ae=K.forwardRef(({children:e,className:t,...o},r)=>(0,E.jsxs)(h.Item,{className:v("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:r,...o,children:[(0,E.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,E.jsx)(h.ItemIndicator,{children:(0,E.jsx)(rt.Check,{className:"h-4 w-4"})})}),(0,E.jsx)(h.ItemText,{children:e})]}));ae.displayName=h.Item.displayName;var Ro=K.forwardRef(({className:e,...t},o)=>(0,E.jsx)(h.Separator,{className:v("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Ro.displayName=h.Separator.displayName;var Te=({label:e,value:t,onValueChange:o,options:r,showColor:s=!1,disabled:a=!1})=>{let[n,i]=(0,$.useState)(!1),g=r.find(p=>p.value===t);return(0,E.jsxs)("div",{className:"space-y-1",children:[(0,E.jsx)(A,{className:"text-xs text-muted-foreground",children:e}),(0,E.jsxs)(Ce,{value:t,onValueChange:o,open:n,onOpenChange:p=>{a||i(p)},disabled:a,children:[(0,E.jsx)(ue,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,E.jsxs)(oe,{variant:"secondary",className:`${a?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!a&&i(!n),children:[s&&g?.color&&(0,E.jsx)("div",{className:`w-2 h-2 rounded-full ${g.color} mr-1`}),g?.label||"Select..."]})}),(0,E.jsx)(fe,{children:r.map(p=>(0,E.jsx)(ae,{value:p.value,children:s&&p.color?(0,E.jsxs)("div",{className:"flex items-center gap-2",children:[(0,E.jsx)("div",{className:`w-3 h-3 rounded-full ${p.color}`}),p.label]}):p.label},p.value))})]})]})};var Dt=({label:e,value:t,onValueChange:o,options:r,placeholder:s="Search...",allowCustomValue:a=!1,disabled:n=!1})=>{let[i,g]=(0,$.useState)(!1),[d,p]=(0,$.useState)(""),R=r.find(c=>c.value===t),y=r.filter(c=>c.label.toLowerCase().includes(d.toLowerCase())),x=c=>{o(c),g(!1),p("")},f=()=>{a&&d.trim()&&!r.find(c=>c.value===d.trim())&&(o(d.trim()),g(!1),p(""))};return(0,E.jsxs)("div",{className:"space-y-1",children:[(0,E.jsx)(A,{className:"text-xs text-muted-foreground",children:e}),(0,E.jsxs)(Ce,{value:t,onValueChange:x,open:i,onOpenChange:c=>{n||g(c)},disabled:n,children:[(0,E.jsx)(ue,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,E.jsx)(oe,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&g(!i),children:R?.label||t||"Select..."})}),(0,E.jsxs)(fe,{children:[(0,E.jsx)("div",{className:"p-2",children:(0,E.jsx)(me,{placeholder:s,value:d,onChange:c=>p(c.target.value),onKeyDown:c=>{c.key==="Enter"&&a&&f()},className:"mb-2"})}),y.map(c=>(0,E.jsx)(ae,{value:c.value,children:c.label},c.value)),a&&d.trim()&&!y.find(c=>c.value===d.trim())&&(0,E.jsxs)(ae,{value:d.trim(),children:['Add "',d.trim(),'"']})]})]})]})};var He=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var Co=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:rt.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:rt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:rt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:rt.Zap}],To=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var It=({task:e,epics:t,sprints:o,lastUpdated:r,onUpdateTask:s,onClose:a,onDelete:n,isUpdating:i=!1,isDeleting:g=!1,deleteState:d="idle",teamMembers:p})=>{let[R,y]=(0,$.useState)(e.storyPoints),x=(0,$.useRef)(null),[f,S]=(0,$.useState)(p);(0,$.useEffect)(()=>{S(p)},[p]);let c=(0,$.useCallback)((m,I)=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{s(m,I)},500)},[s]);(0,$.useEffect)(()=>{c("storyPoints",R?.toString()||"1")},[R]);let D=m=>m.split(" ").map(I=>I[0]).join("").toUpperCase(),L=()=>d==="loading"?(0,E.jsxs)(H,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,E.jsx)(rt.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):d==="success"?(0,E.jsxs)(H,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,E.jsx)(rt.Check,{className:"h-3 w-3"}),"Deleted"]}):d==="error"?(0,E.jsxs)(H,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,E.jsx)(rt.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,E.jsxs)(H,{onClick:n,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:i||g,children:[(0,E.jsx)(rt.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,E.jsxs)("div",{className:"flex flex-col h-full",children:[(0,E.jsxs)("div",{className:"space-y-4",style:{opacity:i?.6:1},children:[(0,E.jsxs)("div",{className:"space-y-2",children:[(0,E.jsx)(A,{className:"text-xs text-muted-foreground",children:"Status"}),(0,E.jsx)(Te,{label:"",value:e.status,onValueChange:m=>s("status",m),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:i})]}),(0,E.jsxs)("div",{className:"space-y-2",children:[(0,E.jsx)(A,{className:"text-xs text-muted-foreground",children:"Type"}),(0,E.jsx)(Ne,{type:"single",value:e.type||"",onValueChange:m=>m&&s("type",m),className:"grid grid-cols-2 gap-1",disabled:i,children:Co.map(m=>{let I=m.icon;return(0,E.jsxs)(Re,{value:m.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:i,children:[(0,E.jsx)(I,{className:"h-3 w-3"}),m.label]},m.value)})})]}),(0,E.jsxs)("div",{className:"space-y-2",children:[(0,E.jsx)(A,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,E.jsx)(Ne,{type:"single",value:e.priority||"",onValueChange:m=>m&&s("priority",m),className:"grid grid-cols-3 gap-1",disabled:i,children:To.map(m=>(0,E.jsx)(Re,{value:m.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:i,children:m.label},m.value))})]}),(0,E.jsxs)("div",{className:"space-y-2",children:[(0,E.jsx)(A,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,E.jsx)("input",{type:"number",min:"1",max:"100",value:R||1,onChange:m=>{let I=Number(m.target.value);I<1?y(1):I>100?y(100):y(I)},className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:i})]}),(0,E.jsxs)("div",{className:"space-y-2",children:[(0,E.jsx)(A,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,E.jsx)(Te,{label:"",value:He(e.epic).toString(),onValueChange:m=>s("epic",m),options:(t||[]).map(m=>({value:m.id.toString(),label:m?.name,color:m.color})),showColor:!0,disabled:i})]}),(0,E.jsxs)("div",{className:"space-y-2",children:[(0,E.jsx)(A,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,E.jsx)(Te,{label:"",value:He(e.sprint).toString()||"none",onValueChange:m=>s("sprint",m==="none"?"":m),options:[{value:"none",label:"No Sprint"},...(o||[]).map(m=>({value:m.id.toString(),label:`${m?.name}`}))],disabled:i})]}),(0,E.jsxs)("div",{className:"space-y-2",children:[(0,E.jsx)(A,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,E.jsx)(Dt,{label:"",value:e.assignee?.value?.name,onValueChange:m=>s("assignee",m),options:f.map(m=>({value:`${typeof m.email=="string"?"users":"digital-colleagues"}:${m.id}`,label:m?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:i})]})]}),(0,E.jsxs)("div",{className:"mt-auto E-4 space-y-4",children:[(0,E.jsxs)("div",{className:"space-y-2",children:[(0,E.jsx)(H,{onClick:a,variant:"outline",className:"w-full h-8 text-xs",disabled:i||g,children:"Close"}),L()]}),(0,E.jsxs)("div",{className:"E-4 border-t border-border space-y-2",children:[(0,E.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,E.jsxs)("div",{className:"flex items-center justify-between",children:[(0,E.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,E.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,E.jsx)(rt.User,{className:"h-3 w-3"}),(0,E.jsx)("span",{children:"System"})]})]}),(0,E.jsxs)("div",{className:"flex items-center justify-between",children:[(0,E.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,E.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,E.jsx)(rt.Calendar,{className:"h-3 w-3"}),(0,E.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,E.jsxs)("div",{className:"flex items-center justify-between",children:[(0,E.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,E.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,E.jsx)(rt.Clock,{className:"h-3 w-3"}),(0,E.jsxs)("span",{children:[new Date(r).toLocaleDateString()," at"," ",new Date(r).toLocaleTimeString()]})]})]})]})]})]})};var ko=({isOpen:e,onClose:t,initialTask:o,epics:r,sprints:s,onUpdateTask:a,onDeleteTask:n,onAddComment:i,colleagues:g})=>{let[d,p]=(0,$.useState)(o),[R,y]=(0,$.useState)(new Date),[x,f]=(0,$.useState)("idle"),[S,c]=(0,$.useState)("idle"),[D,L]=(0,$.useState)([]),[m,I]=(0,$.useState)(g);(0,$.useEffect)(()=>{p(o)},[o]);let q=async(b,G)=>{if(G!==d[b]){f("loading");try{await a(d.id.toString(),{[b]:G}),y(new Date),f("success"),setTimeout(()=>f("idle"),1500)}catch(_){console.log("error",_),f("error"),setTimeout(()=>f("idle"),3e3)}}},ge=async(b,G)=>{if(G!==d[b]){f("loading");try{await a(d.id.toString(),{[b]:G}),y(new Date),f("success"),setTimeout(()=>f("idle"),1500)}catch(_){console.log("error",_),f("error"),setTimeout(()=>f("idle"),3e3)}}},be=async b=>{if(i){f("loading");try{await i?.({content:b,taskId:d.id.toString()}),y(new Date),f("success"),setTimeout(()=>f("idle"),1500)}catch{f("error"),setTimeout(()=>f("idle"),3e3)}}},ve=async()=>{c("loading");try{await n(d.id.toString()),c("success"),setTimeout(()=>{t(),c("idle")},1e3)}catch{c("error"),setTimeout(()=>c("idle"),3e3)}},Q=x!=="loading"&&S!=="loading",Y=()=>{Q&&t()},ie=()=>x==="loading"?(0,E.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,E.jsx)(rt.Loader2,{className:"h-4 w-4 animate-spin"}),(0,E.jsx)("span",{children:"Updating..."})]}):x==="success"?(0,E.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,E.jsx)(rt.Check,{className:"h-4 w-4"}),(0,E.jsx)("span",{children:"Updated successfully"})]}):x==="error"?(0,E.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,E.jsx)(rt.X,{className:"h-4 w-4"}),(0,E.jsx)("span",{children:"Update failed"})]}):null;return(0,E.jsx)(at,{open:e,onOpenChange:Y,children:(0,E.jsxs)(Le,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,E.jsxs)(ze,{children:[(0,E.jsx)(Ee,{className:"sr-only",children:d?.name}),(0,E.jsxs)("div",{className:"flex items-center justify-between",children:[(0,E.jsx)("div",{className:"flex-1",children:ie()}),!Q&&(0,E.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,E.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,E.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,E.jsx)(Be,{fieldName:"name",value:d.name||"",label:"",onSave:q,className:"border-b border-border pb-3",disabled:x==="loading"}),(0,E.jsx)(Be,{fieldName:"description",value:d.description||"",label:"Description",multiline:!0,onSave:q,disabled:x==="loading"}),(0,E.jsx)(wt,{comments:(d?.comments||[]).map(b=>({author:b.author.value.name||"",createdAt:new Date(b.timestamp),text:b.text,id:b.id||""})),onAddComment:be})]}),(0,E.jsx)(It,{task:d,epics:r,sprints:s,lastUpdated:R,onUpdateTask:ge,onClose:Y,onDelete:ve,isUpdating:x==="loading",isDeleting:S==="loading",deleteState:S,teamMembers:m})]})]})})};0&&(module.exports={TaskDetailsModal});
4
+ "use strict";var Dr=Object.create;var lt=Object.defineProperty;var Rr=Object.getOwnPropertyDescriptor;var kr=Object.getOwnPropertyNames;var Mr=Object.getPrototypeOf,Ir=Object.prototype.hasOwnProperty;var Er=(e,t)=>{for(var o in t)lt(e,o,{get:t[o],enumerable:!0})},Qt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of kr(t))!Ir.call(e,a)&&a!==o&&lt(e,a,{get:()=>t[a],enumerable:!(r=Rr(t,a))||r.enumerable});return e};var _=(e,t,o)=>(o=e!=null?Dr(Mr(e)):{},Qt(t||!e||!e.__esModule?lt(o,"default",{value:e,enumerable:!0}):o,e)),Lr=e=>Qt(lt({},"__esModule",{value:!0}),e);var Xa={};Er(Xa,{TaskDetailsModal:()=>Ja});module.exports=Lr(Xa);var me=require("react");var Ze=_(require("react")),j=_(require("@radix-ui/react-dialog")),co=require("lucide-react");var lo=require("clsx");var Mt="-",Ar=e=>{let t=Fr(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:n=>{let s=n.split(Mt);return s[0]===""&&s.length!==1&&s.shift(),oo(s,t)||Hr(n)},getConflictingClassGroupIds:(n,s)=>{let c=o[n]||[];return s&&r[n]?[...c,...r[n]]:c}}},oo=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?oo(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let i=e.join(Mt);return t.validators.find(({validator:n})=>n(i))?.classGroupId},eo=/^\[(.+)\]$/,Hr=e=>{if(eo.test(e)){let t=eo.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Fr=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return Br(Object.entries(e.classGroups),o).forEach(([i,n])=>{kt(n,r,i,t)}),r},kt=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let i=a===""?t:to(t,a);i.classGroupId=o;return}if(typeof a=="function"){if(Vr(a)){kt(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([i,n])=>{kt(n,to(t,i),o,r)})})},to=(e,t)=>{let o=e;return t.split(Mt).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},Vr=e=>e.isThemeGetter,Br=(e,t)=>t?e.map(([o,r])=>{let a=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([n,s])=>[t+n,s])):i);return[o,a]}):e,Or=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,a=(i,n)=>{o.set(i,n),t++,t>e&&(t=0,r=o,o=new Map)};return{get(i){let n=o.get(i);if(n!==void 0)return n;if((n=r.get(i))!==void 0)return a(i,n),n},set(i,n){o.has(i)?o.set(i,n):a(i,n)}}},ro="!",zr=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,a=t[0],i=t.length,n=s=>{let c=[],m=0,p=0,C;for(let l=0;l<s.length;l++){let u=s[l];if(m===0){if(u===a&&(r||s.slice(l,l+i)===t)){c.push(s.slice(p,l)),p=l+i;continue}if(u==="/"){C=l;continue}}u==="["?m++:u==="]"&&m--}let d=c.length===0?s:s.substring(p),h=d.startsWith(ro),g=h?d.substring(1):d,P=C&&C>p?C-p:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:P}};return o?s=>o({className:s,parseClassName:n}):n},Ur=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},_r=e=>({cache:Or(e.cacheSize),parseClassName:zr(e),...Ar(e)}),Gr=/\s+/,$r=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a}=t,i=[],n=e.trim().split(Gr),s="";for(let c=n.length-1;c>=0;c-=1){let m=n[c],{modifiers:p,hasImportantModifier:C,baseClassName:d,maybePostfixModifierPosition:h}=o(m),g=!!h,P=r(g?d.substring(0,h):d);if(!P){if(!g){s=m+(s.length>0?" "+s:s);continue}if(P=r(d),!P){s=m+(s.length>0?" "+s:s);continue}g=!1}let l=Ur(p).join(":"),u=C?l+ro:l,M=u+P;if(i.includes(M))continue;i.push(M);let f=a(P,g);for(let N=0;N<f.length;++N){let X=f[N];i.push(u+X)}s=m+(s.length>0?" "+s:s)}return s};function Wr(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=ao(t))&&(r&&(r+=" "),r+=o);return r}var ao=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=ao(e[r]))&&(o&&(o+=" "),o+=t);return o};function Kr(e,...t){let o,r,a,i=n;function n(c){let m=t.reduce((p,C)=>C(p),e());return o=_r(m),r=o.cache.get,a=o.cache.set,i=s,s(c)}function s(c){let m=r(c);if(m)return m;let p=$r(c,o);return a(c,p),p}return function(){return i(Wr.apply(null,arguments))}}var H=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},io=/^\[(?:([a-z-]+):)?(.+)\]$/i,jr=/^\d+\/\d+$/,Zr=new Set(["px","full","screen"]),Jr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xr=/\d+(%|px|r?em|[sdl]?oe([hwib]|min|max)|co|pc|in|cm|mm|cap|ch|ex|r?lh|cq(oe|h|i|oe|min|max))|\oe(calc|min|max|clamp)\(.+\)|^0$/,qr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Yr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ge=e=>Be(e)||Zr.has(e)||jr.test(e),Pe=e=>Oe(e,"length",sa),Be=e=>!!e&&!Number.isNaN(Number(e)),Rt=e=>Oe(e,"number",Be),Ke=e=>!!e&&Number.isInteger(Number(e)),ea=e=>e.endsWith("%")&&Be(e.slice(0,-1)),S=e=>io.test(e),De=e=>Jr.test(e),ta=new Set(["length","size","percentage"]),oa=e=>Oe(e,ta,no),ra=e=>Oe(e,"position",no),aa=new Set(["image","url"]),ia=e=>Oe(e,aa,ca),na=e=>Oe(e,"",la),je=()=>!0,Oe=(e,t,o)=>{let r=io.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},sa=e=>Xr.test(e)&&!qr.test(e),no=()=>!1,la=e=>Yr.test(e),ca=e=>Qr.test(e);var da=()=>{let e=H("colors"),t=H("spacing"),o=H("blur"),r=H("brightness"),a=H("borderColor"),i=H("borderRadius"),n=H("borderSpacing"),s=H("borderWidth"),c=H("contrast"),m=H("grayscale"),p=H("hueRotate"),C=H("invert"),d=H("gap"),h=H("gradientColorStops"),g=H("gradientColorStopPositions"),P=H("inset"),l=H("margin"),u=H("opacity"),M=H("padding"),f=H("saturate"),N=H("scale"),X=H("sepia"),ue=H("skew"),we=H("space"),ee=H("translate"),Ce=()=>["auto","contain","none"],Ne=()=>["auto","hidden","clip","visible","scroll"],fe=()=>["auto",S,t],E=()=>[S,t],Se=()=>["",ge,Pe],Te=()=>["auto",Be,S],x=()=>["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"],ie=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",S],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Be,S];return{cacheSize:500,separator:":",theme:{colors:[je],spacing:[ge,Pe],blur:["none","",De,S],brightness:$(),borderColor:[e],borderRadius:["none","","full",De,S],borderSpacing:E(),borderWidth:Se(),contrast:$(),grayscale:Q(),hueRotate:$(),invert:Q(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[ea,Pe],inset:fe(),margin:fe(),opacity:$(),padding:E(),saturate:$(),scale:$(),sepia:Q(),skew:$(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",S]}],container:["container"],columns:[{columns:[De]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:[...x(),S]}],overflow:[{overflow:Ne()}],"overflow-x":[{"overflow-x":Ne()}],"overflow-y":[{"overflow-y":Ne()}],overscroll:[{overscroll:Ce()}],"overscroll-x":[{"overscroll-x":Ce()}],"overscroll-y":[{"overscroll-y":Ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[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",Ke,S]}],basis:[{basis:fe()}],"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:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",Ke,S]}],"grid-cols":[{"grid-cols":[je]}],"col-start-end":[{col:["auto",{span:["full",Ke,S]},S]}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":[je]}],"row-start-end":[{row:["auto",{span:[Ke,S]},S]}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"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:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...ie()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ie(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ie(),"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]}],co:[{co:[M]}],co:[{co:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[l]}],mx:[{mx:[l]}],my:[{my:[l]}],ms:[{ms:[l]}],me:[{me:[l]}],oe:[{oe:[l]}],mr:[{mr:[l]}],mb:[{mb:[l]}],ml:[{ml:[l]}],"space-x":[{"space-x":[we]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[we]}],"space-y-reverse":["space-y-reverse"],oe:[{oe:["auto","min","max","fit","svw","lvw","dvw",S,t]}],"min-oe":[{"min-oe":[S,t,"min","max","fit"]}],"max-oe":[{"max-oe":[S,t,"none","full","min","max","fit","prose",{screen:[De]},De]}],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",De,Pe]}],"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:[je]}],"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",Be,Rt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ge,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":[u]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[u]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ge,Pe]}],"underline-offset":[{"underline-offset":["auto",ge,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:E()}],"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":[u]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),ra]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",oa]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","oe","bl","l","tl"]},ia]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-oe":[{"rounded-oe":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-oe":[{"rounded-oe":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-oe":[{border:[s]}],"border-oe-x":[{"border-x":[s]}],"border-oe-y":[{"border-y":[s]}],"border-oe-s":[{"border-s":[s]}],"border-oe-e":[{"border-e":[s]}],"border-oe-t":[{"border-t":[s]}],"border-oe-r":[{"border-r":[s]}],"border-oe-oe":[{"border-oe":[s]}],"border-oe-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[u]}],"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":[u]}],"divide-style":[{divide:L()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-oe":[{"border-oe":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[ge,S]}],"outline-oe":[{outline:[ge,Pe]}],"outline-color":[{outline:[e]}],"ring-oe":[{ring:Se()}],"ring-oe-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[u]}],"ring-offset-oe":[{"ring-offset":[ge,Pe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",De,na]}],"shadow-color":[{shadow:[je]}],opacity:[{opacity:[u]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",De,S]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[C]}],saturate:[{saturate:[f]}],sepia:[{sepia:[X]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[C]}],"backdrop-opacity":[{"backdrop-opacity":[u]}],"backdrop-saturate":[{"backdrop-saturate":[f]}],"backdrop-sepia":[{"backdrop-sepia":[X]}],"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",S]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",S]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",S]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[Ke,S]}],"translate-x":[{"translate-x":[ee]}],"translate-y":[{"translate-y":[ee]}],"skew-x":[{"skew-x":[ue]}],"skew-y":[{"skew-y":[ue]}],"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","oe-resize","oe-resize","nw-resize","oe-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","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-oe":[{"scroll-oe":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-co":[{"scroll-co":E()}],"scroll-co":[{"scroll-co":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",S]}],fill:[{fill:[e,"none"]}],"stroke-oe":[{stroke:[ge,Pe,Rt]}],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","co","co","pr","pb","pl"],px:["pr","pl"],py:["co","pb"],m:["mx","my","ms","me","oe","mr","mb","ml"],mx:["mr","ml"],my:["oe","mb"],size:["oe","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-oe","rounded-l","rounded-ss","rounded-oe","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-oe","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-oe":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-oe":["border-oe-s","border-oe-e","border-oe-t","border-oe-r","border-oe-oe","border-oe-l"],"border-oe-x":["border-oe-r","border-oe-l"],"border-oe-y":["border-oe-t","border-oe-oe"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-oe","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-oe"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-oe","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-oe","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-co","scroll-co","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-co","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var so=Kr(da);function y(...e){return so((0,lo.clsx)(e))}var oe=require("react/jsx-runtime"),Re=j.Root;var It=j.Portal;var ct=Ze.forwardRef(({className:e,...t},o)=>(0,oe.jsx)(j.Overlay,{ref:o,className:y("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}));ct.displayName=j.Overlay.displayName;var Ee=Ze.forwardRef(({className:e,children:t,...o},r)=>(0,oe.jsxs)(It,{children:[(0,oe.jsx)(ct,{}),(0,oe.jsxs)(j.Content,{ref:r,className:y("fixed left-[50%] top-[50%] z-50 grid oe-full max-oe-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-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,oe.jsxs)(j.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,oe.jsx)(co.X,{className:"h-4 oe-4"}),(0,oe.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ee.displayName=j.Content.displayName;var Le=({className:e,...t})=>(0,oe.jsx)("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Le.displayName="DialogHeader";var ma=({className:e,...t})=>(0,oe.jsx)("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ma.displayName="DialogFooter";var ve=Ze.forwardRef(({className:e,...t},o)=>(0,oe.jsx)(j.Title,{ref:o,className:y("text-lg font-semibold leading-none tracking-tight",e),...t}));ve.displayName=j.Title.displayName;var pa=Ze.forwardRef(({className:e,...t},o)=>(0,oe.jsx)(j.Description,{ref:o,className:y("text-sm text-muted-foreground",e),...t}));pa.displayName=j.Description.displayName;var mo=_(require("react"));var ke=mo.forwardRef(({className:e,type:t,...o},r)=>(0,oe.jsx)("input",{type:t,className:y("flex h-9 oe-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:r,...o}));ke.displayName="Input";var uo=_(require("react")),Ae=uo.forwardRef(({className:e,...t},o)=>(0,oe.jsx)("textarea",{className:y("flex min-h-[80px] oe-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}));Ae.displayName="Textarea";var go=_(require("react")),Et=_(require("@radix-ui/react-label")),vo=require("class-variance-authority");var ua=(0,vo.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Y=go.forwardRef(({className:e,...t},o)=>(0,oe.jsx)(Et.Root,{ref:o,className:y(ua(),e),...t}));Y.displayName=Et.Root.displayName;var Je=({fieldName:e,value:t,label:o,multiline:r=!1,onSave:a,className:i="",disabled:n=!1})=>{let[s,c]=(0,me.useState)(!1),[m,p]=(0,me.useState)(""),C=()=>{n||(c(!0),p(t))},d=async()=>{m!==t&&await a(e,m),c(!1)},h=g=>{g.key==="Enter"&&!r||g.key==="Enter"&&g.ctrlKey&&r?d():g.key==="Escape"&&(c(!1),p(""))};return(0,oe.jsxs)("div",{className:`space-y-2 ${i}`,children:[(0,oe.jsx)(Y,{children:o}),s?r?(0,oe.jsx)(Ae,{value:m,onChange:g=>p(g.target.value),onBlur:d,onKeyDown:h,autoFocus:!0,rows:4,className:"resize-none"}):(0,oe.jsx)(ke,{value:m,onChange:g=>p(g.target.value),onBlur:d,onKeyPress:h,autoFocus:!0,className:"text-lg font-medium"}):(0,oe.jsxs)("div",{onClick:C,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 ${r?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,oe.jsx)("span",{className:r?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!n&&(0,oe.jsx)(co.Edit,{className:"h-4 oe-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var fa=(0,vo.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 ze({className:e,variant:t,...o}){return(0,oe.jsx)("div",{className:y(fa({variant:t}),e),...o})}var dt=_(require("react")),he=_(require("@radix-ui/react-avatar"));var At=dt.forwardRef(({className:e,...t},o)=>(0,oe.jsx)(he.Root,{ref:o,className:y("relative flex h-10 oe-10 shrink-0 overflow-hidden rounded-full",e),...t}));At.displayName=he.Root.displayName;var ga=dt.forwardRef(({className:e,...t},o)=>(0,oe.jsx)(he.Image,{ref:o,className:y("aspect-square h-full oe-full",e),...t}));ga.displayName=he.Image.displayName;var Ht=dt.forwardRef(({className:e,...t},o)=>(0,oe.jsx)(he.Fallback,{ref:o,className:y("flex h-full oe-full items-center justify-center rounded-full bg-muted",e),...t}));Ht.displayName=he.Fallback.displayName;var wo=require("@radix-ui/react-slot"),No=_(require("react")),So=(0,vo.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 oe-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"}}}),F=No.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...a},i)=>(0,oe.jsx)(e?wo.Slot:"button",{className:y(So({className:t,size:o,variant:r})),ref:i,...a}));F.displayName="Button";var Do=({comments:e,onAddComment:t})=>{let[o,r]=(0,me.useState)(""),a=n=>n.split(" ").map(s=>s[0]).join("").toUpperCase(),i=()=>{o.trim()&&(t(o),r(""))};return(0,oe.jsxs)("div",{className:"space-y-4",children:[(0,oe.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oe.jsx)(co.MessageSquare,{className:"h-5 oe-5"}),(0,oe.jsx)(Y,{className:"text-lg font-medium",children:"Comments"}),(0,oe.jsx)(ze,{variant:"secondary",children:e.length})]}),(0,oe.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(n=>(0,oe.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,oe.jsx)(At,{className:"h-8 oe-8 oe-1",children:(0,oe.jsx)(Ht,{className:"text-xs bg-muted text-muted-foreground",children:a(n.author)})}),(0,oe.jsxs)("div",{className:"flex-1",children:[(0,oe.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,oe.jsx)("span",{className:"font-medium text-sm",children:n.author}),(0,oe.jsxs)("span",{className:"text-xs text-muted-foreground",children:[n.createdAt.toLocaleDateString()," at ",n.createdAt.toLocaleTimeString()]})]}),(0,oe.jsx)("p",{className:"text-sm text-muted-foreground",children:n.text})]})]},n.id))}),(0,oe.jsxs)("div",{className:"flex gap-2",children:[(0,oe.jsx)(Ae,{value:o,onChange:n=>r(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,oe.jsx)(F,{onClick:i,disabled:!o.trim(),size:"sm",className:"self-end",children:(0,oe.jsx)(co.Send,{className:"h-4 oe-4"})})]})]})};var He=_(require("react")),Ue=_(require("@radix-ui/react-toggle-group"));var Ro=_(require("react")),Ft=_(require("@radix-ui/react-toggle"));var Vt=(0,vo.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-oe-9",sm:"h-8 px-1.5 min-oe-8",lg:"h-10 px-2.5 min-oe-10"}},defaultVariants:{variant:"default",size:"default"}}),va=Ro.forwardRef(({className:e,variant:t,size:o,...r},a)=>(0,oe.jsx)(Ft.Root,{ref:a,className:y(Vt({variant:t,size:o,className:e})),...r}));va.displayName=Ft.Root.displayName;var Io=He.createContext({size:"default",variant:"default"}),ft=He.forwardRef(({className:e,variant:t,size:o,children:r,...a},i)=>(0,oe.jsx)(Ue.Root,{ref:i,className:y("flex items-center justify-center gap-1",e),...a,children:(0,oe.jsx)(Io.Provider,{value:{variant:t,size:o},children:r})}));ft.displayName=Ue.Root.displayName;var gt=He.forwardRef(({className:e,children:t,variant:o,size:r,...a},i)=>{let n=He.useContext(Io);return(0,oe.jsx)(Ue.Item,{ref:i,className:y(Vt({variant:n.variant||o,size:n.size||r}),e),...a,children:t})});gt.displayName=Ue.Item.displayName;var R=_(require("@radix-ui/react-select")),Me=_(require("react")),vt=R.Root;var Xe=Me.forwardRef(({children:e,className:t,...o},r)=>(0,oe.jsxs)(R.Trigger,{className:y("flex h-10 oe-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:r,...o,children:[e,(0,oe.jsx)(R.Icon,{asChild:!0,children:(0,oe.jsx)(co.ChevronDown,{className:"h-4 oe-4 opacity-50"})})]}));Xe.displayName=R.Trigger.displayName;var Eo=Me.forwardRef(({className:e,...t},o)=>(0,oe.jsx)(R.ScrollUpButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,oe.jsx)(co.ChevronUp,{className:"h-4 oe-4"})}));Eo.displayName=R.ScrollUpButton.displayName;var Lo=Me.forwardRef(({className:e,...t},o)=>(0,oe.jsx)(R.ScrollDownButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,oe.jsx)(co.ChevronDown,{className:"h-4 oe-4"})}));Lo.displayName=R.ScrollDownButton.displayName;var qe=Me.forwardRef(({children:e,className:t,position:o="popper",...r},a)=>(0,oe.jsx)(R.Portal,{children:(0,oe.jsxs)(R.Content,{className:y("relative z-50 max-h-96 min-oe-[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:a,...r,children:[(0,oe.jsx)(Eo,{}),(0,oe.jsx)(R.Viewport,{className:y("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] oe-full min-oe-[var(--radix-select-trigger-width)]"),children:e}),(0,oe.jsx)(Lo,{})]})}));qe.displayName=R.Content.displayName;var ba=Me.forwardRef(({className:e,...t},o)=>(0,oe.jsx)(R.Label,{className:y("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));ba.displayName=R.Label.displayName;var _e=Me.forwardRef(({children:e,className:t,...o},r)=>(0,oe.jsxs)(R.Item,{className:y("relative flex oe-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:r,...o,children:[(0,oe.jsx)("span",{className:"absolute left-2 flex h-3.5 oe-3.5 items-center justify-center",children:(0,oe.jsx)(R.ItemIndicator,{children:(0,oe.jsx)(co.Check,{className:"h-4 oe-4"})})}),(0,oe.jsx)(R.ItemText,{children:e})]}));_e.displayName=R.Item.displayName;var ha=Me.forwardRef(({className:e,...t},o)=>(0,oe.jsx)(R.Separator,{className:y("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));ha.displayName=R.Separator.displayName;var bt=({label:e,value:t,onValueChange:o,options:r,showColor:a=!1,disabled:i=!1})=>{let[n,s]=(0,me.useState)(!1),c=r.find(p=>p.value===t);return(0,oe.jsxs)("div",{className:"space-y-1",children:[(0,oe.jsx)(Y,{className:"text-xs text-muted-foreground",children:e}),(0,oe.jsxs)(vt,{value:t,onValueChange:o,open:n,onOpenChange:p=>{i||s(p)},disabled:i,children:[(0,oe.jsx)(Xe,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,oe.jsxs)(ze,{variant:"secondary",className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!i&&s(!n),children:[a&&c?.color&&(0,oe.jsx)("div",{className:`oe-2 h-2 rounded-full ${c.color} mr-1`}),c?.label||"Select..."]})}),(0,oe.jsx)(qe,{children:r.map(p=>(0,oe.jsx)(_e,{value:p.value,children:a&&p.color?(0,oe.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oe.jsx)("div",{className:`oe-3 h-3 rounded-full ${p.color}`}),p.label]}):p.label},p.value))})]})]})};var Ho=({label:e,value:t,onValueChange:o,options:r,placeholder:a="Search...",allowCustomValue:i=!1,disabled:n=!1})=>{let[s,c]=(0,me.useState)(!1),[m,p]=(0,me.useState)(""),C=r.find(l=>l.value===t),d=r.filter(l=>l.label.toLowerCase().includes(m.toLowerCase())),h=l=>{o(l),c(!1),p("")},g=()=>{i&&m.trim()&&!r.find(l=>l.value===m.trim())&&(o(m.trim()),c(!1),p(""))};return(0,oe.jsxs)("div",{className:"space-y-1",children:[(0,oe.jsx)(Y,{className:"text-xs text-muted-foreground",children:e}),(0,oe.jsxs)(vt,{value:t,onValueChange:h,open:s,onOpenChange:l=>{n||c(l)},disabled:n,children:[(0,oe.jsx)(Xe,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,oe.jsx)(ze,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&c(!s),children:C?.label||t||"Select..."})}),(0,oe.jsxs)(qe,{children:[(0,oe.jsx)("div",{className:"p-2",children:(0,oe.jsx)(ke,{placeholder:a,value:m,onChange:l=>p(l.target.value),onKeyDown:l=>{l.key==="Enter"&&i&&g()},className:"mb-2"})}),d.map(l=>(0,oe.jsx)(_e,{value:l.value,children:l.label},l.value)),i&&m.trim()&&!d.find(l=>l.value===m.trim())&&(0,oe.jsxs)(_e,{value:m.trim(),children:['Add "',m.trim(),'"']})]})]})]})};var Ot=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var xa=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:co.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:co.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:co.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:co.Zap}],ya=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var Fo=({task:e,epics:t,sprints:o,lastUpdated:r,onUpdateTask:a,onClose:i,onDelete:n,isUpdating:s=!1,isDeleting:c=!1,deleteState:m="idle",teamMembers:p})=>{let[C,d]=(0,me.useState)(e.storyPoints),h=(0,me.useRef)(null),[g,P]=(0,me.useState)(p);(0,me.useEffect)(()=>{P(p)},[p]);let l=(0,me.useCallback)((f,N)=>{h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{a(f,N)},500)},[a]);(0,me.useEffect)(()=>{l("storyPoints",C?.toString()||"1")},[C]);let u=f=>f.split(" ").map(N=>N[0]).join("").toUpperCase(),M=()=>m==="loading"?(0,oe.jsxs)(F,{disabled:!0,variant:"destructive",className:"oe-full h-8 text-xs gap-1",children:[(0,oe.jsx)(co.Loader2,{className:"h-3 oe-3 animate-spin"}),"Deleting..."]}):m==="success"?(0,oe.jsxs)(F,{disabled:!0,variant:"destructive",className:"oe-full h-8 text-xs gap-1",children:[(0,oe.jsx)(co.Check,{className:"h-3 oe-3"}),"Deleted"]}):m==="error"?(0,oe.jsxs)(F,{disabled:!0,variant:"destructive",className:"oe-full h-8 text-xs gap-1",children:[(0,oe.jsx)(co.X,{className:"h-3 oe-3"}),"Delete failed"]}):(0,oe.jsxs)(F,{onClick:n,variant:"destructive",className:"oe-full h-8 text-xs gap-1",disabled:s||c,children:[(0,oe.jsx)(co.Trash2,{className:"h-3 oe-3"}),"Delete Task"]});return(0,oe.jsxs)("div",{className:"flex flex-col h-full",children:[(0,oe.jsxs)("div",{className:"space-y-4",style:{opacity:s?.6:1},children:[(0,oe.jsxs)("div",{className:"space-y-2",children:[(0,oe.jsx)(Y,{className:"text-xs text-muted-foreground",children:"Status"}),(0,oe.jsx)(bt,{label:"",value:e.status,onValueChange:f=>a("status",f),options:[{value:"todo",label:"oe Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:s})]}),(0,oe.jsxs)("div",{className:"space-y-2",children:[(0,oe.jsx)(Y,{className:"text-xs text-muted-foreground",children:"Type"}),(0,oe.jsx)(ft,{type:"single",value:e.type||"",onValueChange:f=>f&&a("type",f),className:"grid grid-cols-2 gap-1",disabled:s,children:xa.map(f=>{let N=f.icon;return(0,oe.jsxs)(gt,{value:f.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:s,children:[(0,oe.jsx)(N,{className:"h-3 oe-3"}),f.label]},f.value)})})]}),(0,oe.jsxs)("div",{className:"space-y-2",children:[(0,oe.jsx)(Y,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,oe.jsx)(ft,{type:"single",value:e.priority||"",onValueChange:f=>f&&a("priority",f),className:"grid grid-cols-3 gap-1",disabled:s,children:ya.map(f=>(0,oe.jsx)(gt,{value:f.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:s,children:f.label},f.value))})]}),(0,oe.jsxs)("div",{className:"space-y-2",children:[(0,oe.jsx)(Y,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,oe.jsx)("input",{type:"number",min:"1",max:"100",value:C||1,onChange:f=>{let N=Number(f.target.value);N<1?d(1):N>100?d(100):d(N)},className:"oe-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:s})]}),(0,oe.jsxs)("div",{className:"space-y-2",children:[(0,oe.jsx)(Y,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,oe.jsx)(bt,{label:"",value:Ot(e.epic).toString(),onValueChange:f=>a("epic",f),options:(t||[]).map(f=>({value:f.id.toString(),label:f?.name,color:f.color})),showColor:!0,disabled:s})]}),(0,oe.jsxs)("div",{className:"space-y-2",children:[(0,oe.jsx)(Y,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,oe.jsx)(bt,{label:"",value:Ot(e.sprint).toString()||"none",onValueChange:f=>a("sprint",f==="none"?"":f),options:[{value:"none",label:"No Sprint"},...(o||[]).map(f=>({value:f.id.toString(),label:`${f?.name}`}))],disabled:s})]}),(0,oe.jsxs)("div",{className:"space-y-2",children:[(0,oe.jsx)(Y,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,oe.jsx)(Ho,{label:"",value:e.assignee?.value?.name,onValueChange:f=>a("assignee",f),options:g.map(f=>({value:`${typeof f.email=="string"?"users":"digital-colleagues"}:${f.id}`,label:f?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:s})]})]}),(0,oe.jsxs)("div",{className:"oe-auto co-4 space-y-4",children:[(0,oe.jsxs)("div",{className:"space-y-2",children:[(0,oe.jsx)(F,{onClick:i,variant:"outline",className:"oe-full h-8 text-xs",disabled:s||c,children:"Close"}),M()]}),(0,oe.jsxs)("div",{className:"co-4 border-t border-border space-y-2",children:[(0,oe.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,oe.jsxs)("div",{className:"flex items-center justify-between",children:[(0,oe.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,oe.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,oe.jsx)(co.User,{className:"h-3 oe-3"}),(0,oe.jsx)("span",{children:"System"})]})]}),(0,oe.jsxs)("div",{className:"flex items-center justify-between",children:[(0,oe.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,oe.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,oe.jsx)(co.Calendar,{className:"h-3 oe-3"}),(0,oe.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,oe.jsxs)("div",{className:"flex items-center justify-between",children:[(0,oe.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,oe.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,oe.jsx)(co.Clock,{className:"h-3 oe-3"}),(0,oe.jsxs)("span",{children:[new Date(r).toLocaleDateString()," at"," ",new Date(r).toLocaleTimeString()]})]})]})]})]})]})};var Yt=require("motion/react");var Nr=_(require("@radix-ui/react-dialog"));var cr=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),dr=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),mr=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),pr=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),ur=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),fr=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),gr=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Tt=require("@payloadcms/richtext-lexical/lexical/list"),vr=require("@payloadcms/richtext-lexical/lexical/rich-text"),br=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var sr=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),at=require("@payloadcms/richtext-lexical/lexical/utils"),T=require("@payloadcms/richtext-lexical/lexical"),Xt=require("@payloadcms/richtext-lexical/lexical/selection");var jo=require("@radix-ui/react-dialog"),wt=require("@payloadcms/richtext-lexical/client");var Ut=_(require("bson-objectid"));var Bo=require("@payloadcms/ui");var Vo=_(require("react")),le=_(require("@radix-ui/react-tooltip"));var ht=le.Provider,xt=le.Root,yt=le.Trigger,Ye=Vo.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,oe.jsx)(le.Portal,{children:(0,oe.jsx)(le.Content,{ref:r,sideOffset:t,className:y("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})}));Ye.displayName=le.Content.displayName;var wa=e=>{let{data:{relationTo:t,value:o},nodeKey:r}=e,[a]=(0,sr.useLexicalComposerContext)(),[i,n]=(0,me.useState)(""),[s,c]=(0,me.useState)(""),[m,p]=(0,me.useState)(""),C=async l=>{console.log("fetchMedia",l)};(0,me.useEffect)(()=>{typeof o=="string"?o.length===24?C(o):(n(o||""),p(P(g())),c(h()||"")):typeof o=="object"&&(n(`${process.env.NEXT_PUBLIC_API_URL}${o.url}`||""),p(P(o.filesize)),c(o.mimeType?.split("/")[1]||""))},[]);let d=(0,me.useCallback)(()=>{a.update(()=>{(0,T.$getNodeByKey)(r)?.remove()})},[a,r]),h=()=>{let l=e.data.value;return typeof l=="string"?l.split(";base64")[0]?.split("image/")[1]:""},g=()=>{let l=e.data.value;if(typeof l=="string"){let u=l.split(",")[1]?.length||0;return 4*Math.ceil(u/3)*.5624896334383812/1e3}return 0};function P(l){if(l>=1e6){let M=l/1e6;return`${M>=10?Math.round(M).toString():M.toFixed(1)} MB`}return`${Math.floor(l/1e3)} KB`}return(0,oe.jsx)("div",{className:"my-2",contentEditable:!1,children:(0,oe.jsxs)("div",{className:"border border-slate-800 rounded-xl overflow-clip oe-60 flex flex-col gap-2 bg-[#222222]",children:[(0,oe.jsxs)("div",{className:"flex gap-2 border-oe border-oe-slate-100/10",children:[(0,oe.jsx)("div",{className:"flex-1",children:e.data.value?(0,oe.jsx)("img",{className:"object-cover m-0 oe-full min-oe-[115px] min-h-[105px]","data-lexical-upload-id":o,"data-lexical-upload-relation-to":t,src:i}):(0,oe.jsx)(Bo.File,{})}),(0,oe.jsx)(ht,{children:(0,oe.jsxs)(xt,{children:[(0,oe.jsxs)(yt,{className:"flex-1 flex justify-center items-center text-[#b5b5b5]",children:[(0,oe.jsx)("span",{className:"font-medium text-sm",children:"Media"}),(0,oe.jsx)("button",{onClick:l=>{l.preventDefault(),d()},className:"flex-1 flex justify-center items-center",children:(0,oe.jsx)(co.X,{width:24,height:24,strokeWidth:1})})]}),(0,oe.jsx)(Ye,{children:(0,oe.jsx)("span",{children:"Remove image"})})]})})]}),(0,oe.jsxs)("div",{className:"flex items-center justify-center gap-4 py-3 flex-1 text-xs font-bold",children:[(0,oe.jsx)("span",{className:"",children:s?.toLocaleUpperCase()}),(0,oe.jsx)("span",{children:m})]})]})})},_o=wa;function Ca(e){if(e.hasAttribute("data-lexical-upload-relation-to")&&e.hasAttribute("data-lexical-upload-id")){let o=e.getAttribute("data-lexical-upload-id");if(o)return{node:Ge({fields:{},relationTo:"media",value:o})}}return e.src.startsWith("file:///"),null}var Qe=class extends wt.UploadNode{static importDOM(){return{img:()=>({conversion:Ca,priority:0})}}static importJSON(t){t.version===1&&t?.value?.id&&(t.value=t.value.id),t.version===2&&!t?.id&&(t.id=new Ut.default().toHexString(),t.version=3);let o={id:t.id??new Ut.default().toHexString(),fields:t.fields,relationTo:"media",value:t.value},r=Ge(o);return r.setFormat?.(t.format),r}decorate(){return(0,$o.jsx)(_o,{data:this.__data,nodeKey:this.getKey()})}};function Ge(e){return new Qe({data:e})}var Na=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Sa=e=>Na?(e||window).getSelection():null,Nn=(0,T.createCommand)("INSERT_UPLOAD_WITH_DRAWER_COMMAND"),_t=(0,T.createCommand)("INSERT_UPLOAD_COMMAND");function Zo({activeEditor:e,onClose:t,isOpen:o=!1}){let r=(0,me.useRef)(!1),[a,i]=(0,me.useState)(!0),[n,s]=(0,me.useState)(""),[c,m]=(0,me.useState)(""),[p,C]=(0,me.useState)(!1),[d,h]=(0,me.useState)("left"),g=n==="",P=N=>{C(N.target.checked)},l=N=>{h(N.target.value)},u=N=>{let X=new FileReader;X.onload=function(){return typeof X.result=="string"&&s(X.result),""},N!==null&&N[0]&&X.readAsDataURL(N[0])};(0,me.useEffect)(()=>{r.current=!1;let N=X=>{r.current=X.altKey};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[e]),(0,me.useEffect)(()=>{a||t()},[a]),(0,me.useEffect)(()=>{i(o)},[o]);let M=({editor:N,relationTo:X,replaceNodeKey:ue,value:we})=>{if(ue)N.update(()=>{let ee=(0,T.$getNodeByKey)(ue);ee&&ee.replace(Ge({id:"",fields:{},relationTo:"media",value:we}))});else{let ee=N.dispatchCommand(_t,{fields:null,relationTo:"media",value:we})}},f=()=>{M({editor:e,relationTo:"media",replaceNodeKey:null,value:{altText:c,src:n,showCaption:p,position:d}.src}),i(!1),t()};return(0,oe.jsx)(Re,{open:a,onOpenChange:N=>i(N),children:(0,oe.jsxs)(Ee,{children:[(0,oe.jsxs)(Le,{children:[(0,oe.jsx)(ve,{children:"Upload Image"}),(0,oe.jsx)(jo.DialogDescription,{children:"Description"})]}),(0,oe.jsxs)("div",{className:"",children:[(0,oe.jsx)("div",{style:{marginBottom:"1em"},children:(0,oe.jsx)(ke,{type:"file",onChange:N=>u(N.target.files),accept:"image/*","data-test-id":"image-modal-file-upload"})}),(0,oe.jsx)("div",{style:{marginBottom:"1em"},children:(0,oe.jsx)(ke,{"aria-label":"Alt Text",placeholder:"Descriptive alternative text",onChange:N=>m(N.currentTarget.value),value:c,"data-test-id":"image-modal-alt-text-input"})}),(0,oe.jsx)(F,{"data-test-id":"image-modal-file-upload-btn",disabled:g,onClick:()=>f(),children:"Confirm"})]})]})})}function Gt({captionsEnabled:e}){let[t]=(0,sr.useLexicalComposerContext)();return(0,me.useEffect)(()=>{if(!t.hasNodes([wt.UploadNode]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return(0,at.mergeRegister)(t.registerCommand(T.DRAGSTART_COMMAND,o=>Ta(o),T.COMMAND_PRIORITY_HIGH),t.registerCommand(T.DRAGOVER_COMMAND,o=>Pa(o),T.COMMAND_PRIORITY_LOW),t.registerCommand(T.DROP_COMMAND,o=>Da(o,t),T.COMMAND_PRIORITY_HIGH))},[e,t]),null}function Ta(e){if(!$t())return!1;let o=e.dataTransfer;return o?(o.setData("text/plain","_"),!0):!1}function Pa(e){return $t()?(Jo(e)||e.preventDefault(),!0):!1}function Da(e,t){let o=$t();if(!o)return!1;if(e.preventDefault(),Jo(e)){let r=Ra(e);o.remove();let a=(0,T.$createRangeSelection)();r!=null&&a.applyDOMRange(r),(0,T.$setSelection)(a)}return!0}function $t(){let e=(0,T.$getSelection)();if(!(0,T.$isNodeSelection)(e))return null;let o=e.getNodes()[0];return(0,wt.$isUploadNode)(o)?o:null}function Jo(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 Ra(e){let t,o=e.target,r=o==null?null:o.nodeType===9?o.defaultView:o.ownerDocument.defaultView,a=Sa(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&a!==null)a.collapse(e.rangeParent,e.rangeOffset||0),t=a.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}var ka=()=>(0,oe.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,oe.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"})}),Xo=ka;var Ma=()=>(0,oe.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,oe.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"})}),qo=Ma;var Ia=()=>(0,oe.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,oe.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,oe.jsx)("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),Yo=Ia;var Ea=()=>(0,oe.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,oe.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,oe.jsx)("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),Qo=Ea;var La=()=>(0,oe.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,oe.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"})}),er=La;var Aa=()=>(0,oe.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,oe.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"})}),tr=Aa;var or=()=>(0,oe.jsx)("svg",{"aria-hidden":"true",className:"oe-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,oe.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"})}),rr=()=>(0,oe.jsx)("svg",{"aria-hidden":"true",className:"oe-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,oe.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"})}),ar=()=>(0,oe.jsx)("svg",{"aria-hidden":"true",className:"oe-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,oe.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"})}),ir=()=>(0,oe.jsx)("svg",{"aria-hidden":"true",className:"oe-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,oe.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"})}),nr=()=>(0,oe.jsx)("svg",{"aria-hidden":"true",className:"oe-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,oe.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 xe=_(require("react")),D=_(require("@radix-ui/react-dropdown-menu")),$e=require("@radix-ui/react-icons");var Ct=D.Root,Nt=D.Trigger;var Ha=xe.forwardRef(({className:e,inset:t,children:o,...r},a)=>(0,oe.jsxs)(D.SubTrigger,{ref:a,className:y("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),...r,children:[o,(0,oe.jsx)($e.ChevronRightIcon,{className:"ml-auto"})]}));Ha.displayName=D.SubTrigger.displayName;var Fa=xe.forwardRef(({className:e,...t},o)=>(0,oe.jsx)(D.SubContent,{ref:o,className:y("z-50 min-oe-[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}));Fa.displayName=D.SubContent.displayName;var ot=xe.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,oe.jsx)(D.Portal,{children:(0,oe.jsx)(D.Content,{ref:r,sideOffset:t,className:y("z-50 min-oe-[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})}));ot.displayName=D.Content.displayName;var rt=xe.forwardRef(({className:e,inset:t,...o},r)=>(0,oe.jsx)(D.Item,{ref:r,className:y("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}));rt.displayName=D.Item.displayName;var Va=xe.forwardRef(({className:e,children:t,checked:o,...r},a)=>(0,oe.jsxs)(D.CheckboxItem,{ref:a,className:y("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,...r,children:[(0,oe.jsx)("span",{className:"absolute left-2 flex h-3.5 oe-3.5 items-center justify-center",children:(0,oe.jsx)(D.ItemIndicator,{children:(0,oe.jsx)($e.CheckIcon,{className:"h-4 oe-4"})})}),t]}));Va.displayName=D.CheckboxItem.displayName;var Ba=xe.forwardRef(({className:e,children:t,...o},r)=>(0,oe.jsxs)(D.RadioItem,{ref:r,className:y("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,oe.jsx)("span",{className:"absolute left-2 flex h-3.5 oe-3.5 items-center justify-center",children:(0,oe.jsx)(D.ItemIndicator,{children:(0,oe.jsx)($e.DotFilledIcon,{className:"h-4 oe-4 fill-current"})})}),t]}));Ba.displayName=D.RadioItem.displayName;var Oa=xe.forwardRef(({className:e,inset:t,...o},r)=>(0,oe.jsx)(D.Label,{ref:r,className:y("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));Oa.displayName=D.Label.displayName;var za=xe.forwardRef(({className:e,...t},o)=>(0,oe.jsx)(D.Separator,{ref:o,className:y("-mx-1 my-1 h-px bg-muted",e),...t}));za.displayName=D.Separator.displayName;var Ua=({className:e,...t})=>(0,oe.jsx)("span",{className:y("ml-auto text-xs tracking-widest opacity-60",e),...t});Ua.displayName="DropdownMenuShortcut";var Jt=1;function _a(){return(0,oe.jsx)("span",{className:"border border-[#222222]"})}function qt(){let[e]=(0,sr.useLexicalComposerContext)(),t=(0,me.useRef)(null),[o,r]=(0,me.useState)(!1),[a,i]=(0,me.useState)(!1),[n,s]=(0,me.useState)(!1),[c,m]=(0,me.useState)(!1),[p,C]=(0,me.useState)(!1),[d,h]=(0,me.useState)(!1),[g,P]=(0,me.useState)(!1),[l,u]=(0,me.useState)(!1),[M,f]=(0,me.useState)(!1),[N,X]=(0,me.useState)("left"),[ue,we]=(0,me.useState)("p"),ee=x=>{e.update(()=>{let L=(0,T.$getSelection)();(0,T.$isRangeSelection)(L)&&(x==="p"?(0,Xt.$setBlocksType)(L,()=>(0,T.$createParagraphNode)()):(0,Xt.$setBlocksType)(L,()=>(0,vr.$createHeadingNode)(x)))})},Ce=(0,me.useCallback)(()=>{let x=(0,T.$getSelection)();if((0,T.$isRangeSelection)(x)){s(x.hasFormat("bold")),m(x.hasFormat("italic")),C(x.hasFormat("underline")),h(x.hasFormat("strikethrough")),P(x.hasFormat("subscript")),u(x.hasFormat("superscript"));let L=x.anchor.getNode(),z=L;for(;z&&!(0,T.$isParagraphNode)(z)&&z!==(0,T.$getRoot)();){let Q=z.getParent();Q&&(z=Q)}if(z){let Q=z.getFormatType();X(Q||"left")}let ie=L.getTopLevelElement()?.__tag;we(ie||"p")}},[]);(0,me.useEffect)(()=>(0,at.mergeRegister)(e.registerUpdateListener(({editorState:x})=>{x.read(()=>{Ce()})}),e.registerCommand(T.SELECTION_CHANGE_COMMAND,(x,L)=>(Ce(),!1),Jt),e.registerCommand(T.CAN_UNDO_COMMAND,x=>(r(x),!1),Jt),e.registerCommand(T.CAN_REDO_COMMAND,x=>(i(x),!1),Jt),(0,at.mergeRegister)(e.registerCommand(_t,x=>(e.update(()=>{let L=(0,T.$getSelection)()||(0,T.$getPreviousSelection)();if((0,T.$isRangeSelection)(L)){let z=Ge({id:x.id,fields:x.fields,relationTo:x.relationTo,value:x.value}),{focus:ie}=L,Q=ie.getNode();(0,at.$insertNodeToNearestRoot)(z),(0,T.$isParagraphNode)(Q)&&!Q.__first&&Q.remove()}}),!0),T.COMMAND_PRIORITY_EDITOR))),[e,Ce]);let Ne=[[{label:"Undo",icon:(0,oe.jsx)(co.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(T.UNDO_COMMAND,void 0)},disabled:!o},{label:"Redo",icon:(0,oe.jsx)(co.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(T.UNDO_COMMAND,void 0)},disabled:!a}],[{label:"Bold",icon:(0,oe.jsx)(Xo,{}),onClick:()=>{e.dispatchCommand(T.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:n},{label:"Italic",icon:(0,oe.jsx)(qo,{}),onClick:()=>{e.dispatchCommand(T.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:c},{label:"Underline",icon:(0,oe.jsx)(Yo,{}),onClick:()=>{e.dispatchCommand(T.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:p},{label:"Strikethrough",icon:(0,oe.jsx)(Qo,{}),onClick:()=>{e.dispatchCommand(T.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:d},{label:"Subscript",icon:(0,oe.jsx)(er,{}),onClick:()=>{e.dispatchCommand(T.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:g},{label:"Superscript",icon:(0,oe.jsx)(tr,{}),onClick:()=>{e.dispatchCommand(T.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:l}]],fe=[{label:"Left Align",direction:"left",icon:(0,oe.jsx)(co.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(T.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,oe.jsx)(co.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(T.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,oe.jsx)(co.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(T.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,oe.jsx)(co.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(T.FORMAT_ELEMENT_COMMAND,"justify")}}],Se=[{label:"Normal Text",value:"p",icon:(0,oe.jsx)(or,{}),onClick:()=>ee("p")},{label:"Heading 1",value:"h1",icon:(0,oe.jsx)(rr,{}),onClick:()=>ee("h1")},{label:"Heading 2",value:"h2",icon:(0,oe.jsx)(ar,{}),onClick:()=>ee("h2")},{label:"Heading 3",value:"h3",icon:(0,oe.jsx)(ir,{}),onClick:()=>ee("h3")},{label:"Heading 4",value:"h4",icon:(0,oe.jsx)(nr,{}),onClick:()=>ee("h4")},...[{label:"Unordered List",value:"ul",icon:(0,oe.jsx)(co.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Tt.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,oe.jsx)(co.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Tt.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],Te=[{label:"Insert Image",icon:(0,oe.jsx)(co.ImageUp,{width:15,height:15}),onClick:()=>{f(!0)},disabled:!1}];return(0,oe.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2 sticky top-0 bg-black z-50",children:(0,oe.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[Ne.map((x,L)=>(0,oe.jsxs)(me.Fragment,{children:[(0,oe.jsx)("div",{className:"flex items-center gap-2",children:x.map((z,ie)=>(0,oe.jsx)("div",{role:"button","aria-disabled":z.disabled||!1,onClick:z.onClick,className:y("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,oe.jsx)(ht,{children:(0,oe.jsxs)(xt,{children:[(0,oe.jsx)(yt,{className:"text-[#b5b5b5]",children:z.icon}),(0,oe.jsx)(Ye,{children:(0,oe.jsx)("p",{children:z.label})})]})})},ie))}),(0,oe.jsx)(_a,{})]},`toolbar-option-${x.length}-${L}`)),(0,oe.jsxs)(Ct,{children:[(0,oe.jsxs)(Nt,{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:[fe.find(x=>x.direction===N)?.icon,fe.find(x=>x.direction===N)?.label,(0,oe.jsx)(co.ChevronDown,{width:15,height:15})]}),(0,oe.jsx)(ot,{className:"bg-black hover:bg-black",children:fe.map((x,L)=>(0,oe.jsxs)(rt,{onClick:x.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,oe.jsx)("span",{children:x.icon}),(0,oe.jsx)("span",{children:x.label})]},`${x.label}-${L}`))})]}),(0,oe.jsxs)(Ct,{children:[(0,oe.jsxs)(Nt,{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:[Se.find(x=>x.value===ue)?.icon,Se.find(x=>x.value===ue)?.label,(0,oe.jsx)(co.ChevronDown,{width:15,height:15})]}),(0,oe.jsx)(ot,{className:"bg-black hover:bg-black",children:Se.map((x,L)=>(0,oe.jsxs)(rt,{onClick:x.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,oe.jsx)("span",{children:x.icon}),(0,oe.jsx)("span",{children:x.label})]},`heading-option-${x.label}-${L}`))})]}),(0,oe.jsxs)(Ct,{children:[(0,oe.jsxs)(Nt,{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,oe.jsx)(co.Plus,{width:15,height:15}),(0,oe.jsx)(co.ChevronDown,{width:15,height:15})]}),(0,oe.jsx)(ot,{className:"bg-black hover:bg-black",children:Te.map((x,L)=>(0,oe.jsxs)(rt,{onClick:x.onClick,disabled:x.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,oe.jsx)("span",{children:x.icon}),(0,oe.jsx)("span",{children:x.label})]},L))})]}),M&&(0,oe.jsx)(Zo,{activeEditor:e,onClose:()=>{f(!1)},isOpen:M})]})})}var Ga=({setValue:e,value:t,name:o,editable:r=!0})=>{let[a]=(0,sr.useLexicalComposerContext)(),i=(0,me.useRef)(null),n=s=>{s.read(()=>{let c=s.toJSON();JSON.stringify(c)!==JSON.stringify(i.current)&&(i.current=c,e?.(()=>c))})};return(0,me.useEffect)(()=>{a.setEditable(r)},[r,a]),(0,me.useEffect)(()=>{t&&JSON.stringify(t)!==JSON.stringify(i.current)&&a.update(()=>{try{let s=a.parseEditorState(t);a.setEditorState(s),i.current=t}catch(s){console.error("Error parsing editor state:",s)}},{discrete:!0})},[t,a]),(0,oe.jsx)("div",{className:"oe-full",children:(0,oe.jsxs)("div",{className:" ",children:[r&&(0,oe.jsx)(qt,{}),(0,oe.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,oe.jsx)(fr.RichTextPlugin,{contentEditable:(0,oe.jsx)(mr.ContentEditable,{name:o,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:pr.LexicalErrorBoundary}),r&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(ur.HistoryPlugin,{}),(0,oe.jsx)(cr.AutoFocusPlugin,{}),(0,oe.jsx)(gr.ListPlugin,{}),(0,oe.jsx)(br.OnChangePlugin,{onChange:n}),(0,oe.jsx)(Gt,{})]})]})]})})},$a=({setValue:e,value:t,name:o,editable:r=!0})=>(0,oe.jsx)(dr.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Tt.ListNode,Tt.ListItemNode,vr.HeadingNode,Qe],onError(i){throw console.error("Lexical error:",i),i},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,oe.jsx)(Ga,{value:t,setValue:e,name:o,editable:r})}),xr=$a;var nt=e=>"mimeType"in e&&"url"in e&&!("format"in e),Wa=e=>{if(!e?.root?.children)return"";let t=[],o=a=>{if(!a)return"";switch(a.type){case"heading":{let i=a.tag?parseInt(a.tag.replace("h","")):1,n=r(a.children||[]);return"#".repeat(i)+" "+n}case"paragraph":return r(a.children||[]);case"list":{let i=[],n=a.listType==="number"?"1.":"-";return a.children?.forEach((s,c)=>{if(s.type==="listitem"){let m=r(s.children||[]),p=a.listType==="number"?`${c+1}.`:n;i.push(`${p} ${m}`)}}),i.join(`
5
+ `)}case"listitem":return r(a.children||[]);case"text":{let i=a.text||"";if(a.format){let n=(a.format&1)!==0,s=(a.format&2)!==0,c=(a.format&4)!==0,m=(a.format&8)!==0;(a.format&16)!==0?i=`\`${i}\``:(n&&(i=`**${i}**`),s&&(i=`*${i}*`),c&&(i=`~~${i}~~`),m&&(i=`<u>${i}</u>`))}return i}default:return a.children?r(a.children):""}},r=a=>a.map(i=>{if(i.type==="text"){let n=i.text||"";if(i.format){let s=(i.format&1)!==0,c=(i.format&2)!==0,m=(i.format&4)!==0,p=(i.format&8)!==0;(i.format&16)!==0?n=`\`${n}\``:(s&&(n=`**${n}**`),c&&(n=`*${n}*`),m&&(n=`~~${n}~~`),p&&(n=`<u>${n}</u>`))}return n}else{if(i.type==="paragraph")return r(i.children||[]);if(i.type==="listitem")return r(i.children||[]);if(i.type==="linebreak")return`
6
+ `}return o(i)}).filter(Boolean).join("");return e.root.children.forEach(a=>{let i=o(a);i&&t.push(i)}),t.join(`
7
+
8
+ `)},Ve=e=>{let t=[],o=0;for(;o<e.length;){let a=e.slice(o).match(/^<u\s*[^>]*>([\s\S]*?)<\/u>/i);if(a&&a[0]){let d=a[1]||"",h=d?Ve(d):[];h.length>0?(h.forEach(g=>{g.type==="text"&&(g.format=(g.format||0)|8)}),t.push(...h)):d===""&&t.push({type:"text",text:"",format:8}),o+=a[0].length;continue}if(e.slice(o).startsWith("</u>")){o+=4;continue}let i=e.slice(o).match(/^(`+)([^`]+)\1/);if(i){let d=i[2];d&&t.push({type:"text",text:d,format:16}),o+=i[0].length;continue}let n=e.slice(o).match(/^(~~)(.+?)\1/);if(n){let d=n[2],h=Ve(d);h.forEach(g=>{g.type==="text"&&(g.format=(g.format||0)|4)}),t.push(...h),o+=n[0].length;continue}let s=e.slice(o).match(/^(\*\*|__)(.+?)\1/);if(s){let d=s[2],h=Ve(d);h.forEach(g=>{g.type==="text"&&(g.format=(g.format||0)|1)}),t.push(...h),o+=s[0].length;continue}let c=e.slice(o).match(/^(\*|_)([^*_\n]+?)\1(?!\*|_)/);if(c&&c[0].length>2){let d=c[2],h=Ve(d);h.forEach(g=>{g.type==="text"&&(g.format=(g.format||0)|2)}),t.push(...h),o+=c[0].length;continue}let m=e.length,p=[{pattern:/<u>/i,offset:0},{pattern:/\*\*/,offset:0},{pattern:/__/,offset:0},{pattern:/~~/,offset:0},{pattern:/`+/,offset:0},{pattern:/\*[^*\n]/,offset:0},{pattern:/_[^_\n]/,offset:0}];for(let{pattern:d}of p){let h=e.slice(o+1).search(d);h!==-1&&h+1<m-o&&(m=o+h+1)}let C=e.slice(o,m);C&&t.push({type:"text",text:C,format:0}),o=m}let r=[];for(let a of t)r.length>0&&r[r.length-1].type==="text"&&r[r.length-1].format===a.format?r[r.length-1].text+=a.text:r.push(a);return r.length>0?r:[{type:"text",text:"",format:0}]},Ka=e=>{let t=e.split(`
9
+ `),o=[],r=[],a=[],i=()=>{if(r.length>0){let s=r.join(" "),c=Ve(s);o.push({type:"paragraph",children:c.length>0?c:[{type:"text",text:"",format:0}]}),r=[]}},n=()=>{a.length>0&&(o.push({type:"list",listType:"bullet",children:a}),a=[])};for(let s of t){let c=s.trim();if(!c){i(),n();continue}let m=c.match(/^(#{1,6})\s+(.+)$/);if(m){i(),n();let C=m[1].length,d=m[2],h=Ve(d);o.push({type:"heading",tag:`h${C}`,children:h.length>0?h:[{type:"text",text:"",format:0}]});continue}let p=c.match(/^[-*+]\s+(.+)$/);if(p){i();let C=p[1],d=Ve(C);a.push({type:"listitem",children:[{type:"paragraph",children:d.length>0?d:[{type:"text",text:"",format:0}]}]});continue}a.length>0&&n(),r.push(c)}return i(),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}}},ja=async e=>{let t="",o,r="text";if(e.url)try{let a=e.url;!a.startsWith("http://")&&!a.startsWith("https://")&&!a.startsWith("/")&&(a="/"+a);let i=await fetch(a);i.ok?(t=await i.text(),console.log("Successfully loaded content, length:",t.length)):console.error("Failed to fetch file content:",i.status,i.statusText)}catch(a){console.error("Failed to fetch file content:",a)}else console.warn("No URL provided for file:",e.name);return e.mimeType==="text/markdown"?(r="richText",o=Ka(t)):e.mimeType?.startsWith("text/")&&(r="text"),{id:e.id.toString(),title:e.name,description:void 0,content:r==="richText"?void 0:t,richTextContent:r==="richText"?o:void 0,format:r,metadata:{},createdAt:typeof e.createdAt=="string"?new Date(e.createdAt):e.createdAt,updatedAt:new Date}};function wr({document:e,onCancel:t,onSave:o,onFileUpdate:r}){let[a,i]=(0,me.useState)(nt(e)),[n,s]=(0,me.useState)(nt(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}),[c,m]=(0,me.useState)(nt(e)?void 0:n.richTextContent),[p,C]=(0,me.useState)(!1),d=(0,me.useRef)(nt(e)?e:null);(0,me.useEffect)(()=>{nt(e)?(i(!0),ja(e).then(l=>{s(l),m(l.richTextContent),i(!1)}).catch(l=>{l instanceof Error&&l.name!=="AbortError"&&(console.error("Failed to convert file:",l),i(!1))})):(s({...e,updatedAt:new Date}),m(e.richTextContent))},[e]);let h=l=>{switch(l){case"markdown":case"mdx":return(0,oe.jsx)(co.FileText,{className:"h-6 oe-6 text-primary"});case"richText":return(0,oe.jsx)(co.File,{className:"h-6 oe-6 text-success"});case"text":return(0,oe.jsx)(co.Type,{className:"h-6 oe-6 text-muted-foreground"});default:return(0,oe.jsx)(co.File,{className:"h-6 oe-6 text-muted-foreground"})}},g=l=>{switch(l){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=async()=>{C(!0);try{let l,u;if(d.current&&d.current.mimeType==="text/markdown"){let f=c?Wa(c):"";l={...n,format:"markdown",content:f,richTextContent:void 0},u=f}else l={...n,richTextContent:c},u=n.content||"";let M=d.current?d.current.id.toString():n.id;await Promise.resolve(o()),r?.(M,u)}finally{C(!1)}};return(0,oe.jsxs)(Yt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[(0,oe.jsx)("div",{className:"border-oe border-border bg-card p-8 pb-6",children:(0,oe.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,oe.jsx)("div",{className:"flex items-start gap-4 flex-1 min-oe-0",children:(0,oe.jsx)("div",{className:"flex-1 min-oe-0",children:(0,oe.jsxs)("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[(0,oe.jsx)("div",{className:"flex-1 min-oe-0",children:(0,oe.jsx)(Je,{fieldName:"title",value:n.title,label:"",onSave:(l,u)=>s(M=>({...M,title:u})),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,oe.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${g(n.format)} flex-shrink-0 oe-1`,children:n.format.toUpperCase()})]})})}),(0,oe.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,oe.jsxs)(F,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,oe.jsx)(co.X,{className:"h-4 oe-4"}),"Close"]}),(0,oe.jsxs)(F,{size:"sm",onClick:P,className:"gap-2",disabled:p,children:[p?(0,oe.jsx)(co.Loader2,{className:"h-4 oe-4 animate-spin"}):(0,oe.jsx)(co.Save,{className:"h-4 oe-4"}),p?"Saving...":"Save"]})]})]})}),(0,oe.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,oe.jsx)("div",{className:"p-8 co-0 h-full max-h-full overflow-auto",children:a?(0,oe.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,oe.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,oe.jsx)(co.Loader2,{className:"h-8 oe-8 animate-spin text-primary"}),(0,oe.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading file content..."})]})}):(0,oe.jsx)(oe.Fragment,{children:n.format==="richText"?(0,oe.jsx)(xr,{setValue:m,value:c,name:"richTextContent"},`richtext-${n.id}-${a?"loading":"loaded"}`):(0,oe.jsx)(Ae,{value:n.content||"",onChange:l=>s(u=>({...u,content:l.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})})]})}var Cr=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 Tr({files:e,onFileClick:t,onFileDelete:o,onFileUpdate:r,showHeader:a=!0,className:i,viewMode:n="list"}){let[s,c]=(0,me.useState)(!1),[m,p]=(0,me.useState)(!1),[C,d]=(0,me.useState)(null),h=()=>{c(!1),d(null)},g=()=>{p(!0),setTimeout(()=>{p(!1),c(!1),d(null)},500)},P=l=>{d(l),c(!0)};return(0,oe.jsxs)("div",{className:y("rounded-3xl border overflow-hidden",i),children:[(0,oe.jsxs)("div",{className:"bg-muted/50 p-3 flex items-center justify-between",children:[a&&n==="list"&&(0,oe.jsxs)("div",{className:"hidden md:grid md:grid-cols-10 text-sm font-medium flex-1",children:[(0,oe.jsx)("div",{className:"col-span-6",children:"Name"}),(0,oe.jsx)("div",{className:"col-span-2",children:"Size"}),(0,oe.jsx)("div",{className:"col-span-2",children:"Modified"})]}),n==="card"&&(0,oe.jsx)("div",{className:"text-sm font-medium",children:"Files"})]}),n==="list"&&(0,oe.jsx)("div",{className:"divide-y",children:e.map(l=>(0,oe.jsxs)(Yt.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?.(l),children:[(0,oe.jsxs)("div",{className:"col-span-6 flex items-center gap-3 oe-full md:oe-auto",children:[(0,oe.jsx)("div",{className:"flex h-10 oe-10 items-center justify-center rounded-2xl bg-muted"}),(0,oe.jsx)("div",{children:(0,oe.jsx)("p",{className:"font-medium",children:l.name})})]}),(0,oe.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:Cr(l.filesize)}),(0,oe.jsxs)("div",{className:"col-span-2 flex items-center justify-between oe-full md:oe-auto",children:[(0,oe.jsx)("span",{className:"text-sm md:text-base",children:new Date(l.createdAt).toLocaleDateString()}),(0,oe.jsxs)("div",{className:"flex gap-1",children:[l.mimeType==="text/markdown"&&(0,oe.jsx)(F,{variant:"ghost",size:"icon",className:"h-8 oe-8 rounded-xl",onClick:u=>{u.stopPropagation(),P(l)},children:(0,oe.jsx)(co.Edit,{className:"h-4 oe-4"})}),(0,oe.jsx)(F,{variant:"ghost",size:"icon",className:"h-8 oe-8 rounded-xl text-red-500 hover:text-red-600",onClick:u=>{u.stopPropagation(),o?.(l)},children:(0,oe.jsx)(co.Trash2,{className:"h-4 oe-4"})})]})]})]},l.name))}),n==="card"&&(0,oe.jsx)("div",{className:"p-4 grid grid-cols-1 gap-4",children:e.map(l=>(0,oe.jsx)(Yt.motion.div,{whileHover:{scale:1.02},className:"border rounded-lg p-4 bg-card hover:bg-muted/50 transition-colors cursor-pointer",onClick:()=>t?.(l),children:(0,oe.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,oe.jsxs)("div",{className:"flex-1 min-oe-0 space-y-2",children:[(0,oe.jsxs)("div",{className:"flex items-center gap-3",children:[(0,oe.jsx)("div",{className:"flex h-10 oe-10 items-center justify-center rounded-2xl bg-muted flex-shrink-0"}),(0,oe.jsx)("div",{className:"min-oe-0 flex-1",children:(0,oe.jsx)("p",{className:"font-medium truncate",children:l.name})})]}),(0,oe.jsxs)("div",{className:"space-y-1 text-sm text-muted-foreground pl-[52px]",children:[(0,oe.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oe.jsx)("span",{className:"font-medium",children:"Size:"}),(0,oe.jsx)("span",{children:Cr(l.filesize)})]}),(0,oe.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oe.jsx)("span",{className:"font-medium",children:"Modified:"}),(0,oe.jsx)("span",{children:new Date(l.createdAt).toLocaleDateString()})]})]})]}),(0,oe.jsxs)("div",{className:"flex flex-col gap-2 flex-shrink-0",children:[l.mimeType==="text/markdown"&&(0,oe.jsx)(F,{variant:"ghost",size:"icon",className:"h-8 oe-8 rounded-xl",onClick:u=>{u.stopPropagation(),P(l)},title:"Edit",children:(0,oe.jsx)(co.Edit,{className:"h-4 oe-4"})}),(0,oe.jsx)(F,{variant:"ghost",size:"icon",className:"h-8 oe-8 rounded-xl text-red-500 hover:text-red-600",onClick:u=>{u.stopPropagation(),o?.(l)},title:"Delete",children:(0,oe.jsx)(co.Trash2,{className:"h-4 oe-4"})})]})]})},l.name))}),(0,oe.jsx)(Re,{open:s,onOpenChange:l=>!l&&h(),children:(0,oe.jsxs)(It,{children:[(0,oe.jsx)(ct,{}),(0,oe.jsxs)(Nr.Content,{className:y("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:[(0,oe.jsx)(ve,{className:"sr-only",children:C?`Edit ${C.name}`:"Edit File"}),m&&(0,oe.jsx)("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center z-50",children:(0,oe.jsx)(co.Loader2,{className:"h-8 oe-8 animate-spin text-primary"})}),C&&(0,oe.jsx)(wr,{document:C,onSave:g,onFileUpdate:r,onCancel:h})]})]})})]})}var Pr=({isOpen:e,onClose:t,onAddFile:o})=>{let[r,a]=(0,me.useState)(null),[i,n]=(0,me.useState)(""),[s,c]=(0,me.useState)(""),[m,p]=(0,me.useState)(""),C=h=>{let g=h.target.files?.[0];g&&(a(g),i||n(g.name))},d=async h=>{if(h.preventDefault(),!r)return;let g=new FormData;g.append("file",r),g.append("name",i),s&&g.append("description",s),m&&g.append("tags",m),o?.(g),t(),a(null),n(""),c(""),p("")};return(0,oe.jsx)(Re,{open:e,onOpenChange:t,children:(0,oe.jsxs)(Ee,{className:"sm:max-oe-md",children:[(0,oe.jsx)(Le,{children:(0,oe.jsx)(ve,{children:"Add New File"})}),(0,oe.jsxs)("form",{onSubmit:d,className:"grid gap-4",children:[(0,oe.jsx)("div",{className:"flex items-center justify-center oe-full",children:(0,oe.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center oe-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,oe.jsxs)("div",{className:"flex flex-col items-center justify-center co-5 pb-6",children:[(0,oe.jsx)(Za,{className:"oe-10 h-10 text-gray-400"}),(0,oe.jsxs)("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,oe.jsx)("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop"]}),(0,oe.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG or GIF (MAX. 800x400px)"})]}),(0,oe.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:C})]})}),r&&(0,oe.jsxs)("div",{className:"flex items-center justify-between",children:[(0,oe.jsxs)("div",{children:[(0,oe.jsx)("p",{className:"font-medium",children:r.name}),(0,oe.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((r.size||0)/1024).toFixed(2)," KB"]})]}),(0,oe.jsx)(F,{type:"submit",onClick:d,children:"Upload"})]})]})]})})};function Za(e){return(0,oe.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,oe.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,oe.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,oe.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}var Ja=({isOpen:e,onClose:t,initialTask:o,epics:r,sprints:a,onUpdateTask:i,onDeleteTask:n,onAddComment:s,colleagues:c,onUploadFile:m,onDeleteFile:p,onFileUpdate:C})=>{let[d,h]=(0,me.useState)(o),[g,P]=(0,me.useState)(new Date),[l,u]=(0,me.useState)("idle"),[M,f]=(0,me.useState)("idle"),[N,X]=(0,me.useState)(!1),[ue,we]=(0,me.useState)([]),[ee,Ce]=(0,me.useState)(c);(0,me.useEffect)(()=>{h(o)},[o]);let Ne=async(A,$)=>{if($!==d[A]){u("loading");try{await i(d.id.toString(),{[A]:$}),P(new Date),u("success"),setTimeout(()=>u("idle"),1500)}catch(Dt){console.log("error",Dt),u("error"),setTimeout(()=>u("idle"),3e3)}}},fe=async(A,$)=>{if($!==d[A]){u("loading");try{await i(d.id.toString(),{[A]:$}),P(new Date),u("success"),setTimeout(()=>u("idle"),1500)}catch(Dt){console.log("error",Dt),u("error"),setTimeout(()=>u("idle"),3e3)}}},E=async A=>{if(s){u("loading");try{await s?.({content:A,taskId:d.id.toString()}),P(new Date),u("success"),setTimeout(()=>u("idle"),1500)}catch{u("error"),setTimeout(()=>u("idle"),3e3)}}},Se=async()=>{f("loading");try{await n(d.id.toString()),f("success"),setTimeout(()=>{t(),f("idle")},1e3)}catch{f("error"),setTimeout(()=>f("idle"),3e3)}},Te=async A=>{if(m){u("loading");try{await m(d.id.toString(),A),P(new Date),u("success"),X(!1),setTimeout(()=>u("idle"),1500)}catch($){console.error("Error uploading file:",$),u("error"),setTimeout(()=>u("idle"),3e3)}}},x=async A=>{if(p){u("loading");try{await p(d.id.toString(),A.id.toString()),P(new Date),u("success"),setTimeout(()=>u("idle"),1500)}catch($){console.error("Error deleting file:",$),u("error"),setTimeout(()=>u("idle"),3e3)}}},L=(d.files||[]).map(A=>typeof A=="number"?null:A).filter(A=>A!==null),z=l!=="loading"&&M!=="loading",ie=()=>{z&&t()},Q=()=>l==="loading"?(0,oe.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,oe.jsx)(co.Loader2,{className:"h-4 oe-4 animate-spin"}),(0,oe.jsx)("span",{children:"Updating..."})]}):l==="success"?(0,oe.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,oe.jsx)(co.Check,{className:"h-4 oe-4"}),(0,oe.jsx)("span",{children:"Updated successfully"})]}):l==="error"?(0,oe.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,oe.jsx)(co.X,{className:"h-4 oe-4"}),(0,oe.jsx)("span",{children:"Update failed"})]}):null;return(0,oe.jsxs)(Re,{open:e,onOpenChange:ie,children:[(0,oe.jsxs)(Ee,{className:"max-oe-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,oe.jsxs)(Le,{children:[(0,oe.jsx)(ve,{className:"sr-only",children:d?.name}),(0,oe.jsxs)("div",{className:"flex items-center justify-between",children:[(0,oe.jsx)("div",{className:"flex-1",children:Q()}),!z&&(0,oe.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,oe.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,oe.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,oe.jsx)(Je,{fieldName:"name",value:d.name||"",label:"",onSave:Ne,className:"border-oe border-border pb-3",disabled:l==="loading"}),(0,oe.jsx)(Je,{fieldName:"description",value:d.description||"",label:"Description",multiline:!0,onSave:Ne,disabled:l==="loading"}),(0,oe.jsxs)("div",{className:"space-y-2",children:[(0,oe.jsxs)("div",{className:"flex items-center justify-between",children:[(0,oe.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oe.jsx)(co.File,{className:"h-4 oe-4 text-muted-foreground"}),(0,oe.jsx)("h3",{className:"text-sm font-medium",children:"Files"})]}),m&&(0,oe.jsxs)(F,{variant:"outline",size:"sm",onClick:()=>X(!0),disabled:l==="loading",className:"gap-2",children:[(0,oe.jsx)(co.Upload,{className:"h-4 oe-4"}),"Upload"]})]}),L.length>0?(0,oe.jsx)(Tr,{files:L,onFileDelete:p?x:void 0,onFileUpdate:C,showHeader:!1,className:"border rounded-lg",viewMode:"card"}):(0,oe.jsx)("div",{className:"text-sm text-muted-foreground py-4 text-center border border-dashed rounded-lg",children:"No files attached"})]}),(0,oe.jsx)(Do,{comments:(d?.comments||[]).map(A=>({author:A.author?.value.name||"",createdAt:new Date(A.timestamp),text:A.text,id:A.id||""})),onAddComment:E})]}),(0,oe.jsx)(Fo,{task:d,epics:r,sprints:a,lastUpdated:g,onUpdateTask:fe,onClose:ie,onDelete:Se,isUpdating:l==="loading",isDeleting:M==="loading",deleteState:M,teamMembers:ee})]})]}),m&&(0,oe.jsx)(Pr,{isOpen:N,onClose:()=>X(!1),onAddFile:Te})]})};0&&(module.exports={TaskDetailsModal});
@@ -1 +1 @@
1
- import{a}from"../../chunk-UM57PWI7.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-EZC3YWSQ.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as TaskDetailsModal};
1
+ import{a}from"../../chunk-6UDBIRMT.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-2HKAJ4TZ.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-P5LSKHQC.mjs";import"../../chunk-EZC3YWSQ.mjs";import"../../chunk-VTFO5GXK.mjs";import"../../chunk-GULRIPMU.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as TaskDetailsModal};
@@ -1,11 +1,13 @@
1
1
  import { File as FileType } from '../Foundary/types';
2
+ type ViewMode = 'list' | 'card';
2
3
  interface FileListProps {
3
4
  files: FileType[];
4
5
  onFileClick?: (file: FileType) => void;
5
- onFileEdit?: (file: FileType) => void;
6
+ onFileUpdate?: (fileId: string, content: string) => void;
6
7
  onFileDelete?: (file: FileType) => void;
7
8
  showHeader?: boolean;
8
9
  className?: string;
10
+ viewMode?: ViewMode;
9
11
  }
10
- export declare function FileList({ files, onFileClick, onFileEdit, onFileDelete, showHeader, className, }: FileListProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function FileList({ files, onFileClick, onFileDelete, onFileUpdate, showHeader, className, viewMode, }: FileListProps): import("react/jsx-runtime").JSX.Element;
11
13
  export {};