cortex-react-components 2.17.2 → 2.17.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/{chunk-JCWFPKF3.mjs → chunk-2W4GQ3FI.mjs} +1 -1
  2. package/dist/{chunk-7R47MHQE.mjs → chunk-33CHGT4N.mjs} +1 -1
  3. package/dist/{chunk-CXOVEABI.mjs → chunk-3EGSOIRH.mjs} +1 -1
  4. package/dist/{chunk-LHO4WFYP.mjs → chunk-5FWH5YVM.mjs} +1 -1
  5. package/dist/{chunk-NINFDOV5.mjs → chunk-6EKGV4I2.mjs} +1 -1
  6. package/dist/{chunk-LAQ3QAUW.mjs → chunk-75WE6ZXB.mjs} +1 -1
  7. package/dist/{chunk-Q4SENBJV.mjs → chunk-7AWSJZMD.mjs} +1 -1
  8. package/dist/{chunk-WIRQ5IRT.mjs → chunk-ANCSWAD7.mjs} +1 -1
  9. package/dist/{chunk-EM3T2XYC.mjs → chunk-CCJJAUGB.mjs} +1 -1
  10. package/dist/{chunk-3GROWGZ5.mjs → chunk-CQAMS7RZ.mjs} +1 -1
  11. package/dist/{chunk-75F3LJMX.mjs → chunk-CTC6WSB6.mjs} +1 -1
  12. package/dist/{chunk-TKXBSTKU.mjs → chunk-DY2XW3LC.mjs} +1 -1
  13. package/dist/{chunk-IBUT2LYD.mjs → chunk-EUMMM454.mjs} +1 -1
  14. package/dist/{chunk-RS4VD3ML.mjs → chunk-F2MJXGRT.mjs} +1 -1
  15. package/dist/{chunk-3NRXQBBS.mjs → chunk-GO42W2BM.mjs} +1 -1
  16. package/dist/{chunk-KWYJ3XZI.mjs → chunk-H5VFV6Q4.mjs} +1 -1
  17. package/dist/{chunk-RJGYVDOU.mjs → chunk-HLTP3ZQN.mjs} +1 -1
  18. package/dist/{chunk-FE7ZGUPU.mjs → chunk-JNJJAJPI.mjs} +1 -1
  19. package/dist/{chunk-5NIEZE7A.mjs → chunk-KBEXWUKI.mjs} +1 -1
  20. package/dist/{chunk-RQLUMNJE.mjs → chunk-L5NPH5RX.mjs} +1 -1
  21. package/dist/{chunk-Z6HIWYMX.mjs → chunk-M5QUXKCF.mjs} +1 -1
  22. package/dist/{chunk-3Y7QG6VP.mjs → chunk-MEVSHOG4.mjs} +1 -1
  23. package/dist/{chunk-2BRDNDUB.mjs → chunk-MFUZNS7C.mjs} +1 -1
  24. package/dist/{chunk-RGOKBIQ5.mjs → chunk-MGSTQLZC.mjs} +1 -1
  25. package/dist/{chunk-P7S6XFU4.mjs → chunk-MX3JKY3V.mjs} +1 -1
  26. package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
  27. package/dist/chunk-ONNK2NEI.mjs +4 -0
  28. package/dist/{chunk-3HNU2NYP.mjs → chunk-QILFMWE5.mjs} +1 -1
  29. package/dist/{chunk-ZEALRBXW.mjs → chunk-QZIJTAPO.mjs} +1 -1
  30. package/dist/{chunk-GTZJWMZR.mjs → chunk-R33MOMFK.mjs} +1 -1
  31. package/dist/{chunk-OYE7B4PN.mjs → chunk-R5P4ZICA.mjs} +1 -1
  32. package/dist/{chunk-Z2SJVYUM.mjs → chunk-RFRNTKO7.mjs} +1 -1
  33. package/dist/{chunk-AJQHGVZ5.mjs → chunk-RMZLEIRP.mjs} +1 -1
  34. package/dist/chunk-RZELSUQT.mjs +4 -0
  35. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  36. package/dist/{chunk-GCRVTTBJ.mjs → chunk-SX456QYL.mjs} +1 -1
  37. package/dist/{chunk-HSQAHQNP.mjs → chunk-TKCFCYEQ.mjs} +1 -1
  38. package/dist/{chunk-723U74ZC.mjs → chunk-TNQS3NVB.mjs} +1 -1
  39. package/dist/{chunk-SH2SBOG7.mjs → chunk-UCPJ4KXN.mjs} +1 -1
  40. package/dist/{chunk-AGDKFAMN.mjs → chunk-UECG3SCG.mjs} +1 -1
  41. package/dist/{chunk-KG3MNGT6.mjs → chunk-UENQZNU3.mjs} +1 -1
  42. package/dist/{chunk-6OJBBMB5.mjs → chunk-UK7PR73C.mjs} +1 -1
  43. package/dist/{chunk-PWFVXG44.mjs → chunk-UTRR5NUU.mjs} +1 -1
  44. package/dist/{chunk-C4RWEPVF.mjs → chunk-VQBOJHZF.mjs} +1 -1
  45. package/dist/chunk-VZBIMHCR.mjs +4 -0
  46. package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
  47. package/dist/{chunk-AQQCH7Z2.mjs → chunk-XX4GSGRP.mjs} +1 -1
  48. package/dist/{chunk-GHOL5L32.mjs → chunk-YPSUDHCJ.mjs} +1 -1
  49. package/dist/{chunk-5MWZTJYP.mjs → chunk-YWRU7OE3.mjs} +1 -1
  50. package/dist/chunk-ZNSW443Y.mjs +4 -0
  51. package/dist/components/Blocks/Banner.mjs +1 -1
  52. package/dist/components/Blocks/CallToAction.mjs +1 -1
  53. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  54. package/dist/components/Blocks/Content.mjs +1 -1
  55. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  56. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  57. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  58. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  59. package/dist/components/Blocks/index.mjs +1 -1
  60. package/dist/components/Cards/ContentCard.mjs +1 -1
  61. package/dist/components/Cards/FeatureCard.mjs +1 -1
  62. package/dist/components/Cards/index.mjs +1 -1
  63. package/dist/components/Chat/example-usage.mjs +1 -1
  64. package/dist/components/Chat/index.mjs +1 -1
  65. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  66. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  67. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  68. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  69. package/dist/components/DigitalColleagues/Views/KnowledgeView.js +1 -1
  70. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  71. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  72. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  73. package/dist/components/DigitalColleagues/document-edit.js +1 -1
  74. package/dist/components/DigitalColleagues/document-edit.mjs +1 -1
  75. package/dist/components/DigitalColleagues/document-preview-examples.js +5 -5
  76. package/dist/components/DigitalColleagues/document-preview-examples.mjs +1 -1
  77. package/dist/components/DigitalColleagues/document-preview.js +1 -1
  78. package/dist/components/DigitalColleagues/document-preview.mjs +1 -1
  79. package/dist/components/DigitalColleagues/index.js +1 -1
  80. package/dist/components/DigitalColleagues/index.mjs +1 -1
  81. package/dist/components/DigitalColleagues/knowledge-browser.js +1 -1
  82. package/dist/components/DigitalColleagues/knowledge-browser.mjs +1 -1
  83. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  84. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  85. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  86. package/dist/components/Foundary/MainPage.mjs +1 -1
  87. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  88. package/dist/components/Foundary/RichText/index.mjs +1 -1
  89. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  90. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  91. package/dist/components/Foundary/Views/index.mjs +1 -1
  92. package/dist/components/Foundary/document-edit.mjs +1 -1
  93. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  94. package/dist/components/Foundary/document-preview.mjs +1 -1
  95. package/dist/components/Foundary/index.mjs +1 -1
  96. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  97. package/dist/components/HeaderFooter/Header.mjs +1 -1
  98. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  99. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  100. package/dist/components/HeaderFooter/index.mjs +1 -1
  101. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  102. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  103. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  104. package/dist/components/Heros/PostHero/index.mjs +1 -1
  105. package/dist/components/Heros/RenderHero.mjs +1 -1
  106. package/dist/components/Heros/index.mjs +1 -1
  107. package/dist/components/Holidays/CalendarView.js +1 -1
  108. package/dist/components/Holidays/CalendarView.mjs +1 -1
  109. package/dist/components/Holidays/HolidayTracker.js +1 -1
  110. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  111. package/dist/components/Holidays/index.js +1 -1
  112. package/dist/components/Holidays/index.mjs +1 -1
  113. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  114. package/dist/components/Layouts/Print.mjs +1 -1
  115. package/dist/components/Layouts/SlideShow.mjs +1 -1
  116. package/dist/components/Layouts/index.mjs +1 -1
  117. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  118. package/dist/components/Menus/SidebarRight.mjs +1 -1
  119. package/dist/components/Menus/index.mjs +1 -1
  120. package/dist/components/Payload/RichText/index.mjs +1 -1
  121. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  122. package/dist/components/Payload/index.mjs +1 -1
  123. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  124. package/dist/components/Projects/ProjectPage.mjs +1 -1
  125. package/dist/components/Projects/ProjectView.mjs +1 -1
  126. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  127. package/dist/components/Projects/index.mjs +1 -1
  128. package/dist/components/dc-temp/index.js +1 -1
  129. package/dist/components/dc-temp/index.mjs +1 -1
  130. package/dist/components/index.js +7 -7
  131. package/dist/components/index.mjs +1 -1
  132. package/dist/components/ui/index.mjs +1 -1
  133. package/dist/components/ui/sidebar.mjs +1 -1
  134. package/dist/globals.css +1 -1
  135. package/dist/index.js +7 -7
  136. package/dist/index.mjs +1 -1
  137. package/dist/metafile-cjs.json +1 -1
  138. package/dist/metafile-esm.json +1 -1
  139. package/dist/pages/Blog.mjs +1 -1
  140. package/dist/pages/Documentation.mjs +1 -1
  141. package/dist/pages/IndexPage.mjs +1 -1
  142. package/dist/pages/Intranet.mjs +1 -1
  143. package/dist/pages/LandingPage.mjs +1 -1
  144. package/dist/pages/Page.mjs +1 -1
  145. package/dist/pages/Publish.mjs +1 -1
  146. package/dist/pages/Website.mjs +1 -1
  147. package/dist/sections/AboutSection.mjs +1 -1
  148. package/dist/sections/BlogDetail.mjs +1 -1
  149. package/dist/sections/BlogList.mjs +1 -1
  150. package/dist/sections/BlogListSection.mjs +1 -1
  151. package/dist/sections/ContactSection.mjs +1 -1
  152. package/dist/sections/PageSections.mjs +1 -1
  153. package/dist/sections/PricingSection.mjs +1 -1
  154. package/dist/sections/ServiceDetail.mjs +1 -1
  155. package/dist/sections/ServiceDetailSection.mjs +1 -1
  156. package/dist/sections/ServiceSection.mjs +1 -1
  157. package/dist/sections/form/index.mjs +1 -1
  158. package/dist/sections/index.mjs +1 -1
  159. package/package.json +1 -1
  160. package/dist/chunk-AREQGH47.mjs +0 -4
  161. package/dist/chunk-RGZHZIKQ.mjs +0 -4
  162. package/dist/chunk-RHR3YOLG.mjs +0 -4
  163. package/dist/chunk-ZXPDSSCF.mjs +0 -4
@@ -1 +1 @@
1
- import{a as f}from"../../../chunk-CJDUN6R4.mjs";import{a as e}from"../../../chunk-KG3MNGT6.mjs";import{a as g}from"../../../chunk-SNTLCFXF.mjs";import"../../../chunk-CTAIR3TE.mjs";import"../../../chunk-CO6AQNZ5.mjs";import"../../../chunk-ZXPDSSCF.mjs";import"../../../chunk-RHR3YOLG.mjs";import"../../../chunk-AREQGH47.mjs";import"../../../chunk-6XUIHSKG.mjs";import"../../../chunk-VGWDYD6Z.mjs";import{a as c}from"../../../chunk-AGDKFAMN.mjs";import"../../../chunk-QOZ2O3FG.mjs";import"../../../chunk-6PS55VJZ.mjs";import{a}from"../../../chunk-NAGBKKTZ.mjs";import"../../../chunk-JXQRVEQB.mjs";import"../../../chunk-RQLUMNJE.mjs";import"../../../chunk-UM57PWI7.mjs";import"../../../chunk-ZHBYZ4HE.mjs";import"../../../chunk-AB43AQKL.mjs";import"../../../chunk-KG7HG2VO.mjs";import"../../../chunk-KZCIHFTM.mjs";import{a as b}from"../../../chunk-2R3MJSQ7.mjs";import{a as d}from"../../../chunk-HSQAHQNP.mjs";import"../../../chunk-KPTGYVDM.mjs";import"../../../chunk-5RTGHMF3.mjs";import"../../../chunk-CDVRH3MC.mjs";import"../../../chunk-L3V5YDPH.mjs";import"../../../chunk-DCOFQFVJ.mjs";import"../../../chunk-NGX2VCHS.mjs";import"../../../chunk-QC2UWZWL.mjs";import"../../../chunk-Z22NSJMF.mjs";import"../../../chunk-EZC3YWSQ.mjs";import"../../../chunk-YRMNCHFO.mjs";import"../../../chunk-EOR2BAI2.mjs";import"../../../chunk-Y7H3EUBR.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-INCYANPB.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.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-EGEO3FNE.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{f as ColleaguesView,a as FileView,e as KnowledgeView,b as PlanningView,c as ProjectView,d as ProjectsIndexView,g as TeamsIndexView};
1
+ import{a as f}from"../../../chunk-CJDUN6R4.mjs";import{a as e}from"../../../chunk-UENQZNU3.mjs";import{a as g}from"../../../chunk-SNTLCFXF.mjs";import"../../../chunk-CTAIR3TE.mjs";import"../../../chunk-CO6AQNZ5.mjs";import"../../../chunk-ZNSW443Y.mjs";import"../../../chunk-RZELSUQT.mjs";import"../../../chunk-ONNK2NEI.mjs";import"../../../chunk-6XUIHSKG.mjs";import{a as c}from"../../../chunk-UECG3SCG.mjs";import"../../../chunk-QOZ2O3FG.mjs";import"../../../chunk-L5NPH5RX.mjs";import"../../../chunk-KZCIHFTM.mjs";import{a as b}from"../../../chunk-2R3MJSQ7.mjs";import{a as d}from"../../../chunk-TKCFCYEQ.mjs";import"../../../chunk-CDVRH3MC.mjs";import"../../../chunk-KPTGYVDM.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-5RTGHMF3.mjs";import{a}from"../../../chunk-NAGBKKTZ.mjs";import"../../../chunk-JXQRVEQB.mjs";import"../../../chunk-DCOFQFVJ.mjs";import"../../../chunk-VGWDYD6Z.mjs";import"../../../chunk-Z22NSJMF.mjs";import"../../../chunk-EZC3YWSQ.mjs";import"../../../chunk-YRMNCHFO.mjs";import"../../../chunk-EOR2BAI2.mjs";import"../../../chunk-Y7H3EUBR.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-INCYANPB.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.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-EGEO3FNE.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{f as ColleaguesView,a as FileView,e as KnowledgeView,b as PlanningView,c as ProjectView,d as ProjectsIndexView,g as TeamsIndexView};
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  'use client'
4
4
 
5
- "use strict";"use client";var Ke=Object.create;var O=Object.defineProperty;var _e=Object.getOwnPropertyDescriptor;var je=Object.getOwnPropertyNames;var De=Object.getPrototypeOf,We=Object.prototype.hasOwnProperty;var Ue=(e,t)=>{for(var r in t)O(e,r,{get:t[r],enumerable:!0})},pe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of je(t))!We.call(e,i)&&i!==r&&O(e,i,{get:()=>t[i],enumerable:!(o=_e(t,i))||o.enumerable});return e};var D=(e,t,r)=>(r=e!=null?Ke(De(e)):{},pe(t||!e||!e.__esModule?O(r,"default",{value:e,enumerable:!0}):r,e)),He=e=>pe(O({},"__esModule",{value:!0}),e);var kt={};Ue(kt,{DocumentEdit:()=>Rt});module.exports=He(kt);var Ge=require("motion/react"),M=require("lucide-react"),Le=require("react");var ye=require("clsx");var re="-",$e=e=>{let t=Oe(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let l=c.split(re);return l[0]===""&&l.length!==1&&l.shift(),fe(l,t)||Fe(c)},getConflictingClassGroupIds:(c,l)=>{let h=r[c]||[];return l&&o[c]?[...h,...o[c]]:h}}},fe=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),i=o?fe(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;let n=e.join(re);return t.validators.find(({validator:c})=>c(n))?.classGroupId},ue=/^\[(.+)\]$/,Fe=e=>{if(ue.test(e)){let t=ue.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Oe=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Xe(Object.entries(e.classGroups),r).forEach(([n,c])=>{te(c,o,n,t)}),o},te=(e,t,r,o)=>{e.forEach(i=>{if(typeof i=="string"){let n=i===""?t:me(t,i);n.classGroupId=r;return}if(typeof i=="function"){if(qe(i)){te(i(o),t,r,o);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([n,c])=>{te(c,me(t,n),r,o)})})},me=(e,t)=>{let r=e;return t.split(re).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},qe=e=>e.isThemeGetter,Xe=(e,t)=>t?e.map(([r,o])=>{let i=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([c,l])=>[t+c,l])):n);return[r,i]}):e,Je=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,i=(n,c)=>{r.set(n,c),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let c=r.get(n);if(c!==void 0)return c;if((c=o.get(n))!==void 0)return i(n,c),c},set(n,c){r.has(n)?r.set(n,c):i(n,c)}}},ge="!",Ze=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,i=t[0],n=t.length,c=l=>{let h=[],x=0,w=0,S;for(let d=0;d<l.length;d++){let m=l[d];if(x===0){if(m===i&&(o||l.slice(d,d+n)===t)){h.push(l.slice(w,d)),w=d+n;continue}if(m==="/"){S=d;continue}}m==="["?x++:m==="]"&&x--}let P=h.length===0?l:l.substring(w),N=P.startsWith(ge),C=N?P.substring(1):P,s=S&&S>w?S-w:void 0;return{modifiers:h,hasImportantModifier:N,baseClassName:C,maybePostfixModifierPosition:s}};return r?l=>r({className:l,parseClassName:c}):c},Qe=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Ye=e=>({cache:Je(e.cacheSize),parseClassName:Ze(e),...$e(e)}),et=/\s+/,tt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:i}=t,n=[],c=e.trim().split(et),l="";for(let h=c.length-1;h>=0;h-=1){let x=c[h],{modifiers:w,hasImportantModifier:S,baseClassName:P,maybePostfixModifierPosition:N}=r(x),C=!!N,s=o(C?P.substring(0,N):P);if(!s){if(!C){l=x+(l.length>0?" "+l:l);continue}if(s=o(P),!s){l=x+(l.length>0?" "+l:l);continue}C=!1}let d=Qe(w).join(":"),m=S?d+ge:d,f=m+s;if(n.includes(f))continue;n.push(f);let T=i(s,C);for(let R=0;R<T.length;++R){let B=T[R];n.push(m+B)}l=x+(l.length>0?" "+l:l)}return l};function rt(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=be(t))&&(o&&(o+=" "),o+=r);return o}var be=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=be(e[o]))&&(r&&(r+=" "),r+=t);return r};function ot(e,...t){let r,o,i,n=c;function c(h){let x=t.reduce((w,S)=>S(w),e());return r=Ye(x),o=r.cache.get,i=r.cache.set,n=l,l(h)}function l(h){let x=o(h);if(x)return x;let w=tt(h,r);return i(h,w),w}return function(){return n(rt.apply(null,arguments))}}var g=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},he=/^\[(?:([Ce-z-]+):)?(.+)\]$/i,nt=/^\d+\/\d+$/,at=new Set(["px","full","screen"]),st=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,it=/\d+(%|px|r?em|[sdl]?Ce([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,lt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ct=/^(inset_)?-?((\d+)?\.?(\d+)[Ce-z]+|0)_-?((\d+)?\.?(\d+)[Ce-z]+|0)/,dt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,z=e=>L(e)||at.has(e)||nt.test(e),I=e=>K(e,"length",xt),L=e=>!!e&&!Number.isNaN(Number(e)),ee=e=>K(e,"number",L),W=e=>!!e&&Number.isInteger(Number(e)),pt=e=>e.endsWith("%")&&L(e.slice(0,-1)),p=e=>he.test(e),A=e=>st.test(e),ut=new Set(["length","size","percentage"]),mt=e=>K(e,ut,xe),ft=e=>K(e,"position",xe),gt=new Set(["image","url"]),bt=e=>K(e,gt,yt),ht=e=>K(e,"",vt),U=()=>!0,K=(e,t,r)=>{let o=he.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},xt=e=>it.test(e)&&!lt.test(e),xe=()=>!1,vt=e=>ct.test(e),yt=e=>dt.test(e);var wt=()=>{let e=g("colors"),t=g("spacing"),r=g("blur"),o=g("brightness"),i=g("borderColor"),n=g("borderRadius"),c=g("borderSpacing"),l=g("borderWidth"),h=g("contrast"),x=g("grayscale"),w=g("hueRotate"),S=g("invert"),P=g("gap"),N=g("gradientColorStops"),C=g("gradientColorStopPositions"),s=g("inset"),d=g("margin"),m=g("opacity"),f=g("padding"),T=g("saturate"),R=g("scale"),B=g("sepia"),G=g("skew"),ae=g("space"),se=g("translate"),J=()=>["auto","contain","none"],Z=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",p,t],b=()=>[p,t],ie=()=>["",z,I],$=()=>["auto",L,p],le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",p],de=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>[L,p];return{cacheSize:500,separator:":",theme:{colors:[U],spacing:[z,I],blur:["none","",A,p],brightness:k(),borderColor:[e],borderRadius:["none","","full",A,p],borderSpacing:b(),borderWidth:ie(),contrast:k(),grayscale:j(),hueRotate:k(),invert:j(),gap:b(),gradientColorStops:[e],gradientColorStopPositions:[pt,I],inset:Q(),margin:Q(),opacity:k(),padding:b(),saturate:k(),scale:k(),sepia:j(),skew:k(),space:b(),translate:b()},classGroups:{aspect:[{aspect:["auto","square","video",p]}],container:["container"],columns:[{columns:[A]}],"break-after":[{"break-after":de()}],"break-before":[{"break-before":de()}],"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:[...le(),p]}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],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",W,p]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",p]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",W,p]}],"grid-cols":[{"grid-cols":[U]}],"col-start-end":[{col:["auto",{span:["full",W,p]},p]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[U]}],"row-start-end":[{row:["auto",{span:[W,p]},p]}],"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",p]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",p]}],gap:[{gap:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[f]}],px:[{px:[f]}],py:[{py:[f]}],ps:[{ps:[f]}],pe:[{pe:[f]}],pt:[{pt:[f]}],pr:[{pr:[f]}],pb:[{pb:[f]}],pl:[{pl:[f]}],m:[{m:[d]}],mx:[{mx:[d]}],my:[{my:[d]}],ms:[{ms:[d]}],me:[{me:[d]}],mt:[{mt:[d]}],mr:[{mr:[d]}],mb:[{mb:[d]}],ml:[{ml:[d]}],"space-x":[{"space-x":[ae]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ae]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",p,t]}],"min-w":[{"min-w":[p,t,"min","max","fit"]}],"max-w":[{"max-w":[p,t,"none","full","min","max","fit","prose",{screen:[A]},A]}],h:[{h:[p,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[p,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[p,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[p,t,"auto","min","max","fit"]}],"font-size":[{text:["base",A,I]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ee]}],"font-family":[{font:[U]}],"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",p]}],"line-clamp":[{"line-clamp":["none",L,ee]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",z,p]}],"list-image":[{"list-image":["none",p]}],"list-style-type":[{list:["none","disc","decimal",p]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",z,I]}],"underline-offset":[{"underline-offset":["auto",z,p]}],"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",p]}],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",p]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...le(),ft]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},bt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[N]}],"gradient-via":[{via:[N]}],"gradient-to":[{to:[N]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:F()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[z,p]}],"outline-w":[{outline:[z,I]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[z,I]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",A,ht]}],"shadow-color":[{shadow:[U]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...ce(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ce()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",A,p]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[S]}],saturate:[{saturate:[T]}],sepia:[{sepia:[B]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[S]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",p]}],duration:[{duration:k()}],ease:[{ease:["linear","in","out","in-out",p]}],delay:[{delay:k()}],animate:[{animate:["none","spin","ping","pulse","bounce",p]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[W,p]}],"translate-x":[{"translate-x":[se]}],"translate-y":[{"translate-y":[se]}],"skew-x":[{"skew-x":[G]}],"skew-y":[{"skew-y":[G]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",p]}],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","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",p]}],"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-pt":[{"scroll-pt":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",p]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[z,I,ee]}],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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","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-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"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-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-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-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ve=ot(wt);function y(...e){return ve((0,ye.clsx)(e))}var we=require("@radix-ui/react-slot"),Se=require("class-variance-authority"),Pe=D(require("react")),Ce=require("react/jsx-runtime"),St=(0,Se.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"}}}),_=Pe.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...i},n)=>(0,Ce.jsx)(e?we.Slot:"button",{className:y(St({className:t,size:r,variant:o})),ref:n,...i}));_.displayName="Button";var Ne=D(require("react")),q=Ne.forwardRef(({className:e,...t},r)=>(0,Ce.jsx)("textarea",{className:y("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:r,...t}));q.displayName="Textarea";var ke=D(require("react"));var H=ke.forwardRef(({className:e,type:t,...r},o)=>(0,Ce.jsx)("input",{type:t,className:y("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:o,...r}));H.displayName="Input";var Pt=(0,Se.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 Te({className:e,variant:t,...r}){return(0,Ce.jsx)("div",{className:y(Pt({variant:t}),e),...r})}var u=D(require("@radix-ui/react-select")),E=D(require("react")),Ae=u.Root;var Ee=u.Value,oe=E.forwardRef(({children:e,className:t,...r},o)=>(0,Ce.jsxs)(u.Trigger,{className:y("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:o,...r,children:[e,(0,Ce.jsx)(u.Icon,{asChild:!0,children:(0,Ce.jsx)(M.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));oe.displayName=u.Trigger.displayName;var Be=E.forwardRef(({className:e,...t},r)=>(0,Ce.jsx)(u.ScrollUpButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ce.jsx)(M.ChevronUp,{className:"h-4 w-4"})}));Be.displayName=u.ScrollUpButton.displayName;var Ve=E.forwardRef(({className:e,...t},r)=>(0,Ce.jsx)(u.ScrollDownButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ce.jsx)(M.ChevronDown,{className:"h-4 w-4"})}));Ve.displayName=u.ScrollDownButton.displayName;var ne=E.forwardRef(({children:e,className:t,position:r="popper",...o},i)=>(0,Ce.jsx)(u.Portal,{children:(0,Ce.jsxs)(u.Content,{className:y("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",r==="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:r,ref:i,...o,children:[(0,Ce.jsx)(Be,{}),(0,Ce.jsx)(u.Viewport,{className:y("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Ce.jsx)(Ve,{})]})}));ne.displayName=u.Content.displayName;var Ct=E.forwardRef(({className:e,...t},r)=>(0,Ce.jsx)(u.Label,{className:y("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));Ct.displayName=u.Label.displayName;var X=E.forwardRef(({children:e,className:t,...r},o)=>(0,Ce.jsxs)(u.Item,{className:y("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:o,...r,children:[(0,Ce.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ce.jsx)(u.ItemIndicator,{children:(0,Ce.jsx)(M.Check,{className:"h-4 w-4"})})}),(0,Ce.jsx)(u.ItemText,{children:e})]}));X.displayName=u.Item.displayName;var Nt=E.forwardRef(({className:e,...t},r)=>(0,Ce.jsx)(u.Separator,{className:y("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));Nt.displayName=u.Separator.displayName;function Rt({document:e,onSave:t,onCancel:r,availableDocuments:o=[],knowledgeContexts:i=[]}){let[n,c]=(0,Le.useState)({...e,updatedAt:new Date}),l=()=>{let s=new Set,d=new Set;return i.forEach(m=>{m.menuConfig.groupBy.forEach(f=>s.add(f))}),o.forEach(m=>{m.metadata&&Object.keys(m.metadata).forEach(f=>d.add(f))}),{contextKeys:Array.from(s).sort(),documentKeys:Array.from(d).sort(),allKeys:Array.from(new Set([...s,...d])).sort()}},h=s=>{let d=new Set;return o.forEach(m=>{m.metadata?.[s]&&d.add(String(m.metadata[s]))}),Array.from(d).sort()},x=l(),w=()=>{t(n)},S=(s,d)=>{c(m=>({...m,metadata:{...m.metadata,[s]:d}}))},P=(s,d)=>{d==="__custom__"?S(s,""):S(s,d)},N=()=>{let s=`field_${Date.now()}`;S(s,"")},C=s=>{c(d=>{let m={...d.metadata};return delete m[s],{...d,metadata:m}})};return(0,Ce.jsxs)(Ge.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Ce.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Ce.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Ce.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ce.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,Ce.jsx)(M.Edit3,{className:"h-6 w-6 text-primary"})}),(0,Ce.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,Ce.jsxs)("div",{className:"flex gap-2",children:[(0,Ce.jsxs)(_,{variant:"outline",size:"sm",onClick:r,className:"gap-2",children:[(0,Ce.jsx)(M.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Ce.jsxs)(_,{size:"sm",onClick:w,className:"gap-2",children:[(0,Ce.jsx)(M.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,Ce.jsxs)("div",{className:"space-y-4",children:[(0,Ce.jsxs)("div",{children:[(0,Ce.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,Ce.jsx)(H,{value:n.title,onChange:s=>c(d=>({...d,title:s.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,Ce.jsxs)("div",{children:[(0,Ce.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,Ce.jsx)(q,{value:n.description||"",onChange:s=>c(d=>({...d,description:s.target.value})),placeholder:"Document description...",rows:2})]}),(0,Ce.jsxs)("div",{children:[(0,Ce.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ce.jsxs)("div",{children:[(0,Ce.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),x.contextKeys.length>0&&(0,Ce.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Suggested: ",x.contextKeys.slice(0,4).join(", "),x.contextKeys.length>4&&` +${x.contextKeys.length-4}`]})]}),(0,Ce.jsxs)(_,{type:"button",variant:"outline",size:"sm",onClick:N,className:"gap-1 h-8",children:[(0,Ce.jsx)(M.Plus,{className:"h-3 w-3"}),"Add"]})]}),n.metadata&&Object.keys(n.metadata).length>0?(0,Ce.jsx)("div",{className:"space-y-2",children:Object.entries(n.metadata).map(([s,d])=>{let m=h(s);return(0,Ce.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Ce.jsx)(H,{value:s,onChange:f=>{let T=f.target.value,R=n.metadata?.[s];c(B=>{let G={...B.metadata};return delete G[s],T&&(G[T]=R||""),{...B,metadata:G}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${s}`}),(0,Ce.jsx)("datalist",{id:`metadata-keys-${s}`,children:x.allKeys.map(f=>(0,Ce.jsx)("option",{value:f},f))}),(0,Ce.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),m.length>0?(0,Ce.jsxs)(Ae,{value:String(d||""),onValueChange:f=>P(s,f),children:[(0,Ce.jsx)(oe,{className:"flex-1 h-8 text-sm",children:(0,Ce.jsx)(Ee,{placeholder:"Value"})}),(0,Ce.jsxs)(ne,{children:[m.map(f=>(0,Ce.jsx)(X,{value:f,children:f},f)),(0,Ce.jsx)(X,{value:"__custom__",children:(0,Ce.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Ce.jsx)(H,{value:String(d||""),onChange:f=>S(s,f.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Ce.jsx)(_,{type:"button",variant:"ghost",size:"sm",onClick:()=>C(s),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Ce.jsx)(M.X,{className:"h-3 w-3"})})]},s)})}):(0,Ce.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,Ce.jsx)("p",{className:"text-xs text-muted-foreground",children:'No metadata \u2022 Click "Add" to create fields'})})]}),(0,Ce.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ce.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Ce.jsx)(Te,{variant:"secondary",className:"font-mono",children:n.format.toUpperCase()})]})]})]}),(0,Ce.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Ce.jsxs)("div",{className:"p-8",children:[(0,Ce.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Ce.jsx)(q,{value:n.content||"",onChange:s=>c(d=>({...d,content:s.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}0&&(module.exports={DocumentEdit});
5
+ "use strict";"use client";var De=Object.create;var ee=Object.defineProperty;var Ue=Object.getOwnPropertyDescriptor;var He=Object.getOwnPropertyNames;var Oe=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty;var Xe=(e,t)=>{for(var r in t)ee(e,r,{get:t[r],enumerable:!0})},ve=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of He(t))!qe.call(e,l)&&l!==r&&ee(e,l,{get:()=>t[l],enumerable:!(o=Ue(t,l))||o.enumerable});return e};var F=(e,t,r)=>(r=e!=null?De(Oe(e)):{},ve(t||!e||!e.__esModule?ee(r,"default",{value:e,enumerable:!0}):r,e)),Je=e=>ve(ee({},"__esModule",{value:!0}),e);var At={};Xe(At,{DocumentEdit:()=>Tt});module.exports=Je(At);var ue=require("motion/react"),N=require("lucide-react"),O=require("react");var Re=require("clsx");var se="-",Ze=e=>{let t=Ye(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let i=c.split(se);return i[0]===""&&i.length!==1&&i.shift(),we(i,t)||Qe(c)},getConflictingClassGroupIds:(c,i)=>{let g=r[c]||[];return i&&o[c]?[...g,...o[c]]:g}}},we=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),l=o?we(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let n=e.join(se);return t.validators.find(({validator:c})=>c(n))?.classGroupId},xe=/^\[(.+)\]$/,Qe=e=>{if(xe.test(e)){let t=xe.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ye=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return tt(Object.entries(e.classGroups),r).forEach(([n,c])=>{ae(c,o,n,t)}),o},ae=(e,t,r,o)=>{e.forEach(l=>{if(typeof l=="string"){let n=l===""?t:ye(t,l);n.classGroupId=r;return}if(typeof l=="function"){if(et(l)){ae(l(o),t,r,o);return}t.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([n,c])=>{ae(c,ye(t,n),r,o)})})},ye=(e,t)=>{let r=e;return t.split(se).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},et=e=>e.isThemeGetter,tt=(e,t)=>t?e.map(([r,o])=>{let l=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([c,i])=>[t+c,i])):n);return[r,l]}):e,rt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,l=(n,c)=>{r.set(n,c),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let c=r.get(n);if(c!==void 0)return c;if((c=o.get(n))!==void 0)return l(n,c),c},set(n,c){r.has(n)?r.set(n,c):l(n,c)}}},Se="!",ot=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,l=t[0],n=t.length,c=i=>{let g=[],f=0,b=0,E;for(let y=0;y<i.length;y++){let k=i[y];if(f===0){if(k===l&&(o||i.slice(y,y+n)===t)){g.push(i.slice(b,y)),b=y+n;continue}if(k==="/"){E=y;continue}}k==="["?f++:k==="]"&&f--}let P=g.length===0?i:i.substring(b),M=P.startsWith(Se),w=M?P.substring(1):P,x=E&&E>b?E-b:void 0;return{modifiers:g,hasImportantModifier:M,baseClassName:w,maybePostfixModifierPosition:x}};return r?i=>r({className:i,parseClassName:c}):c},nt=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},at=e=>({cache:rt(e.cacheSize),parseClassName:ot(e),...Ze(e)}),st=/\s+/,it=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l}=t,n=[],c=e.trim().split(st),i="";for(let g=c.length-1;g>=0;g-=1){let f=c[g],{modifiers:b,hasImportantModifier:E,baseClassName:P,maybePostfixModifierPosition:M}=r(f),w=!!M,x=o(w?P.substring(0,M):P);if(!x){if(!w){i=f+(i.length>0?" "+i:i);continue}if(x=o(P),!x){i=f+(i.length>0?" "+i:i);continue}w=!1}let y=nt(b).join(":"),k=E?y+Se:y,z=k+x;if(n.includes(z))continue;n.push(z);let G=l(x,w);for(let I=0;I<G.length;++I){let $=G[I];n.push(k+$)}i=f+(i.length>0?" "+i:i)}return i};function lt(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ne(t))&&(o&&(o+=" "),o+=r);return o}var Ne=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Ne(e[o]))&&(r&&(r+=" "),r+=t);return r};function ct(e,...t){let r,o,l,n=c;function c(g){let f=t.reduce((b,E)=>E(b),e());return r=at(f),o=r.cache.get,l=r.cache.set,n=i,i(g)}function i(g){let f=o(g);if(f)return f;let b=it(g,r);return l(g,b),b}return function(){return n(lt.apply(null,arguments))}}var h=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ce=/^\[(?:([Ie-z-]+):)?(.+)\]$/i,dt=/^\d+\/\d+$/,mt=new Set(["px","full","screen"]),pt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ut=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ft=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,gt=/^(inset_)?-?((\d+)?\.?(\d+)[Ie-z]+|0)_-?((\d+)?\.?(\d+)[Ie-z]+|0)/,bt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,A=e=>D(e)||mt.has(e)||dt.test(e),L=e=>U(e,"length",Ct),D=e=>!!e&&!Number.isNaN(Number(e)),ne=e=>U(e,"number",D),X=e=>!!e&&Number.isInteger(Number(e)),ht=e=>e.endsWith("%")&&D(e.slice(0,-1)),d=e=>Ce.test(e),V=e=>pt.test(e),vt=new Set(["length","size","percentage"]),xt=e=>U(e,vt,Pe),yt=e=>U(e,"position",Pe),wt=new Set(["image","url"]),St=e=>U(e,wt,kt),Nt=e=>U(e,"",Pt),J=()=>!0,U=(e,t,r)=>{let o=Ce.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},Ct=e=>ut.test(e)&&!ft.test(e),Pe=()=>!1,Pt=e=>gt.test(e),kt=e=>bt.test(e);var Rt=()=>{let e=h("colors"),t=h("spacing"),r=h("blur"),o=h("brightness"),l=h("borderColor"),n=h("borderRadius"),c=h("borderSpacing"),i=h("borderWidth"),g=h("contrast"),f=h("grayscale"),b=h("hueRotate"),E=h("invert"),P=h("gap"),M=h("gradientColorStops"),w=h("gradientColorStopPositions"),x=h("inset"),y=h("margin"),k=h("opacity"),z=h("padding"),G=h("saturate"),I=h("scale"),$=h("sepia"),s=h("skew"),m=h("space"),p=h("translate"),C=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],re=()=>["auto",d,t],v=()=>[d,t],fe=()=>["",A,L],Q=()=>["auto",D,d],ge=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",d],he=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>[D,d];return{cacheSize:500,separator:":",theme:{colors:[J],spacing:[A,L],blur:["none","",V,d],brightness:T(),borderColor:[e],borderRadius:["none","","full",V,d],borderSpacing:v(),borderWidth:fe(),contrast:T(),grayscale:q(),hueRotate:T(),invert:q(),gap:v(),gradientColorStops:[e],gradientColorStopPositions:[ht,L],inset:re(),margin:re(),opacity:T(),padding:v(),saturate:T(),scale:T(),sepia:q(),skew:T(),space:v(),translate:v()},classGroups:{aspect:[{aspect:["auto","square","video",d]}],container:["container"],columns:[{columns:[V]}],"break-after":[{"break-after":he()}],"break-before":[{"break-before":he()}],"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:[...ge(),d]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",X,d]}],basis:[{basis:re()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",d]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",X,d]}],"grid-cols":[{"grid-cols":[J]}],"col-start-end":[{col:["auto",{span:["full",X,d]},d]}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":[J]}],"row-start-end":[{row:["auto",{span:[X,d]},d]}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",d]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",d]}],gap:[{gap:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...oe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...oe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...oe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[z]}],px:[{px:[z]}],py:[{py:[z]}],ps:[{ps:[z]}],pe:[{pe:[z]}],pt:[{pt:[z]}],pr:[{pr:[z]}],pb:[{pb:[z]}],pl:[{pl:[z]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],O:[{O:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[m]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[m]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",d,t]}],"min-w":[{"min-w":[d,t,"min","max","fit"]}],"max-w":[{"max-w":[d,t,"none","full","min","max","fit","prose",{screen:[V]},V]}],h:[{h:[d,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[d,t,"auto","min","max","fit"]}],"font-size":[{text:["base",V,L]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ne]}],"font-family":[{font:[J]}],"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",d]}],"line-clamp":[{"line-clamp":["none",D,ne]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",A,d]}],"list-image":[{"list-image":["none",d]}],"list-style-type":[{list:["none","disc","decimal",d]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",A,L]}],"underline-offset":[{"underline-offset":["auto",A,d]}],"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:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d]}],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",d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ge(),yt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",xt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},St]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[M]}],"gradient-via":[{via:[M]}],"gradient-to":[{to:[M]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"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-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...Y(),"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":[k]}],"divide-style":[{divide:Y()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...Y()]}],"outline-offset":[{"outline-offset":[A,d]}],"outline-w":[{outline:[A,L]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[A,L]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",V,Nt]}],"shadow-color":[{shadow:[J]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...be(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":be()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",V,d]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[E]}],saturate:[{saturate:[G]}],sepia:[{sepia:[$]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[E]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[G]}],"backdrop-sepia":[{"backdrop-sepia":[$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",d]}],duration:[{duration:T()}],ease:[{ease:["linear","in","out","in-out",d]}],delay:[{delay:T()}],animate:[{animate:["none","spin","ping","pulse","bounce",d]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[X,d]}],"translate-x":[{"translate-x":[p]}],"translate-y":[{"translate-y":[p]}],"skew-x":[{"skew-x":[s]}],"skew-y":[{"skew-y":[s]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",d]}],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","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",d]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-O":[{"scroll-O":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"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",d]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[A,L,ne]}],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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","O","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"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-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-O","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-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ke=ct(Rt);function R(...e){return ke((0,Re.clsx)(e))}var ze=require("@radix-ui/react-slot"),Ee=require("class-variance-authority"),Me=F(require("react")),Ie=require("react/jsx-runtime"),zt=(0,Ee.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"}}}),j=Me.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...l},n)=>(0,Ie.jsx)(e?ze.Slot:"button",{className:R(zt({className:t,size:r,variant:o})),ref:n,...l}));j.displayName="Button";var Te=F(require("react")),Z=Te.forwardRef(({className:e,...t},r)=>(0,Ie.jsx)("textarea",{className:R("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:r,...t}));Z.displayName="Textarea";var Be=F(require("react"));var H=Be.forwardRef(({className:e,type:t,...r},o)=>(0,Ie.jsx)("input",{type:t,className:R("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:o,...r}));H.displayName="Input";var u=F(require("@radix-ui/react-select")),K=F(require("react")),Ve=u.Root;var Ke=u.Value,ie=K.forwardRef(({children:e,className:t,...r},o)=>(0,Ie.jsxs)(u.Trigger,{className:R("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:o,...r,children:[e,(0,Ie.jsx)(u.Icon,{asChild:!0,children:(0,Ie.jsx)(N.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ie.displayName=u.Trigger.displayName;var Ge=K.forwardRef(({className:e,...t},r)=>(0,Ie.jsx)(u.ScrollUpButton,{className:R("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ie.jsx)(N.ChevronUp,{className:"h-4 w-4"})}));Ge.displayName=u.ScrollUpButton.displayName;var _e=K.forwardRef(({className:e,...t},r)=>(0,Ie.jsx)(u.ScrollDownButton,{className:R("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ie.jsx)(N.ChevronDown,{className:"h-4 w-4"})}));_e.displayName=u.ScrollDownButton.displayName;var le=K.forwardRef(({children:e,className:t,position:r="popper",...o},l)=>(0,Ie.jsx)(u.Portal,{children:(0,Ie.jsxs)(u.Content,{className:R("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",r==="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:r,ref:l,...o,children:[(0,Ie.jsx)(Ge,{}),(0,Ie.jsx)(u.Viewport,{className:R("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Ie.jsx)(_e,{})]})}));le.displayName=u.Content.displayName;var Et=K.forwardRef(({className:e,...t},r)=>(0,Ie.jsx)(u.Label,{className:R("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));Et.displayName=u.Label.displayName;var te=K.forwardRef(({children:e,className:t,...r},o)=>(0,Ie.jsxs)(u.Item,{className:R("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:o,...r,children:[(0,Ie.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ie.jsx)(u.ItemIndicator,{children:(0,Ie.jsx)(N.Check,{className:"h-4 w-4"})})}),(0,Ie.jsx)(u.ItemText,{children:e})]}));te.displayName=u.Item.displayName;var Mt=K.forwardRef(({className:e,...t},r)=>(0,Ie.jsx)(u.Separator,{className:R("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));Mt.displayName=u.Separator.displayName;var Fe=F(require("react")),ce=F(require("@radix-ui/react-label"));var It=(0,Ee.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),de=Fe.forwardRef(({className:e,...t},r)=>(0,Ie.jsx)(ce.Root,{ref:r,className:R(It(),e),...t}));de.displayName=ce.Root.displayName;var pe=({fieldName:e,value:t,label:r,multiline:o=!1,onSave:l,className:n="",disabled:c=!1})=>{let[i,g]=(0,O.useState)(!1),[f,b]=(0,O.useState)(""),E=()=>{c||(g(!0),b(t))},P=async()=>{f!==t&&await l(e,f),g(!1)},M=w=>{w.key==="Enter"&&!o||w.key==="Enter"&&w.ctrlKey&&o?P():w.key==="Escape"&&(g(!1),b(""))};return(0,Ie.jsxs)("div",{className:`space-y-2 ${n}`,children:[(0,Ie.jsx)(de,{children:r}),i?o?(0,Ie.jsx)(Z,{value:f,onChange:w=>b(w.target.value),onBlur:P,onKeyDown:M,autoFocus:!0,rows:4,className:"resize-none"}):(0,Ie.jsx)(H,{value:f,onChange:w=>b(w.target.value),onBlur:P,onKeyPress:M,autoFocus:!0,className:"text-lg font-medium"}):(0,Ie.jsxs)("div",{onClick:E,className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Ie.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!c&&(0,Ie.jsx)($e.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};function Tt({document:e,onSave:t,onCancel:r,availableDocuments:o=[],knowledgeContexts:l=[]}){let[n,c]=(0,O.useState)({...e,updatedAt:new Date}),[i,g]=(0,O.useState)(!1),[f,b]=(0,O.useState)(()=>{let s=[],m=0,p=new Set;return l.forEach(C=>{C.menuConfig.groupBy.forEach(_=>p.add(_))}),p.forEach(C=>{s.push({id:`context_field_${m++}`,key:C,value:e.metadata?.[C]?String(e.metadata[C]):"",isContextKey:!0})}),e.metadata&&Object.entries(e.metadata).forEach(([C,_])=>{p.has(C)||s.push({id:`existing_field_${m++}`,key:C,value:String(_),isContextKey:!1})}),s}),E=s=>{switch(s){case"markdown":case"mdx":return(0,Ie.jsx)(N.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,Ie.jsx)(N.File,{className:"h-6 w-6 text-success"});case"text":return(0,Ie.jsx)(N.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Ie.jsx)(N.File,{className:"h-6 w-6 text-muted-foreground"})}},P=s=>{switch(s){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},M=()=>{let s=new Set;return o.forEach(m=>{m.metadata&&Object.keys(m.metadata).forEach(p=>s.add(p))}),{documentKeys:Array.from(s).sort()}},w=s=>{let m=new Set;return o.forEach(p=>{p.metadata?.[s]&&m.add(String(p.metadata[s]))}),Array.from(m).sort()},x=M(),y=()=>{t(n)};(0,O.useEffect)(()=>{let s=f.filter(m=>m.key.trim()!==""&&m.value.trim()!=="").reduce((m,p)=>({...m,[p.key]:p.value}),{});c(m=>({...m,metadata:Object.keys(s).length>0?s:void 0}))},[f]);let k=(s,m)=>{b(p=>p.map(C=>C.id===s?{...C,key:m}:C))},z=(s,m)=>{b(p=>p.map(C=>C.id===s?{...C,value:m}:C))},G=(s,m)=>{m==="__custom__"?z(s,""):z(s,m)},I=()=>{let s={id:`field_${Date.now()}`,key:"",value:"",isContextKey:!1};b(m=>[...m,s])},$=s=>{b(m=>m.filter(p=>p.id!==s))};return(0,Ie.jsxs)(ue.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Ie.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,Ie.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Ie.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,Ie.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:E(n.format)}),(0,Ie.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ie.jsxs)("div",{className:"flex items-start gap-4 mb-2 leading-tight",children:[(0,Ie.jsx)("div",{className:"flex-1 min-w-0",children:(0,Ie.jsx)(pe,{fieldName:"title",value:n.title,label:"",onSave:(s,m)=>c(p=>({...p,title:m})),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,Ie.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${P(n.format)} flex-shrink-0 mt-1`,children:n.format.toUpperCase()})]}),(0,Ie.jsx)("div",{className:"mt-2",children:(0,Ie.jsx)(pe,{fieldName:"description",value:n.description||"Click to add description...",label:"",multiline:!0,onSave:(s,m)=>c(p=>({...p,description:m})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})]}),(0,Ie.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,Ie.jsxs)(j,{variant:"ghost",size:"sm",onClick:()=>g(!i),className:"gap-2",children:[(0,Ie.jsx)(N.Info,{className:"h-4 w-4"}),"Metadata",f.filter(s=>s.key.trim()!==""&&s.value.trim()!=="").length>0&&(0,Ie.jsx)("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:f.filter(s=>s.key.trim()!==""&&s.value.trim()!=="").length}),i?(0,Ie.jsx)(N.ChevronDown,{className:"h-4 w-4"}):(0,Ie.jsx)(N.ChevronRight,{className:"h-4 w-4"})]}),(0,Ie.jsxs)(j,{variant:"outline",size:"sm",onClick:r,className:"gap-2",children:[(0,Ie.jsx)(N.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Ie.jsxs)(j,{size:"sm",onClick:y,className:"gap-2",children:[(0,Ie.jsx)(N.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,Ie.jsx)(ue.motion.div,{initial:!1,animate:{height:i?"auto":0,opacity:i?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Ie.jsxs)("div",{className:"pt-4 border-t border-border mt-4",children:[(0,Ie.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ie.jsxs)("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,Ie.jsx)(N.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,Ie.jsxs)(j,{type:"button",variant:"outline",size:"sm",onClick:I,className:"gap-1 h-8",children:[(0,Ie.jsx)(N.Plus,{className:"h-3 w-3"}),"Add Field"]})]}),x.documentKeys.length>0&&(0,Ie.jsxs)("p",{className:"text-xs text-muted-foreground mb-3",children:["Additional from documents: ",x.documentKeys.slice(0,4).join(", "),x.documentKeys.length>4&&` +${x.documentKeys.length-4} more`]}),(0,Ie.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:f.length>0?(0,Ie.jsx)("div",{className:"space-y-2",children:f.map(s=>{let m=w(s.key);return(0,Ie.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Ie.jsx)(H,{value:s.key,onChange:p=>k(s.id,p.target.value),placeholder:"Key",className:`w-32 h-8 text-sm ${s.isContextKey?"bg-primary/5 border-primary/30":""}`,list:`metadata-keys-${s.id}`,disabled:s.isContextKey}),(0,Ie.jsx)("datalist",{id:`metadata-keys-${s.id}`,children:x.documentKeys.map(p=>(0,Ie.jsx)("option",{value:p},p))}),(0,Ie.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),m.length>0?(0,Ie.jsxs)(Ve,{value:s.value||"",onValueChange:p=>G(s.id,p),children:[(0,Ie.jsx)(ie,{className:"flex-1 h-8 text-sm",children:(0,Ie.jsx)(Ke,{placeholder:"Value"})}),(0,Ie.jsxs)(le,{children:[m.map(p=>(0,Ie.jsx)(te,{value:p,children:p},p)),(0,Ie.jsx)(te,{value:"__custom__",children:(0,Ie.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Ie.jsx)(H,{value:s.value||"",onChange:p=>z(s.id,p.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Ie.jsx)(j,{type:"button",variant:"ghost",size:"sm",onClick:()=>$(s.id),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Ie.jsx)(N.X,{className:"h-3 w-3"})})]},s.id)})}):(0,Ie.jsxs)("div",{className:"text-center py-4",children:[(0,Ie.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"No metadata fields"}),(0,Ie.jsx)("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" to create metadata'})]})})]})})]}),(0,Ie.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Ie.jsxs)("div",{className:"p-8",children:[(0,Ie.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Ie.jsx)(Z,{value:n.content||"",onChange:s=>c(m=>({...m,content:s.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}0&&(module.exports={DocumentEdit});
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-AREQGH47.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as DocumentEdit};
2
+ "use strict";import{a}from"../../chunk-ONNK2NEI.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as DocumentEdit};
@@ -2,13 +2,13 @@
2
2
  "use strict";
3
3
  'use client'
4
4
 
5
- "use strict";var Je=Object.create;var q=Object.defineProperty;var qe=Object.getOwnPropertyDescriptor;var Ze=Object.getOwnPropertyNames;var Qe=Object.getPrototypeOf,Ye=Object.prototype.hasOwnProperty;var et=(e,t)=>{for(var r in t)q(e,r,{get:t[r],enumerable:!0})},fe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Ze(t))!Ye.call(e,l)&&l!==r&&q(e,l,{get:()=>t[l],enumerable:!(o=qe(t,l))||o.enumerable});return e};var H=(e,t,r)=>(r=e!=null?Je(Qe(e)):{},fe(t||!e||!e.__esModule?q(r,"default",{value:e,enumerable:!0}):r,e)),tt=e=>fe(q({},"__esModule",{value:!0}),e);var jt={};et(jt,{DocumentPreviewExample:()=>Kt,DocumentPreviewWithPayloadRichText:()=>_t,DocumentPreviewWithReactMarkdown:()=>Gt,customRenderers:()=>Oe,sampleDocuments:()=>Y});module.exports=tt(jt);var He=require("motion/react"),M=require("lucide-react"),Ue=require("react");var ke=require("clsx");var se="-",rt=e=>{let t=nt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:m=>{let s=m.split(se);return s[0]===""&&s.length!==1&&s.shift(),he(s,t)||ot(m)},getConflictingClassGroupIds:(m,s)=>{let h=r[m]||[];return s&&o[m]?[...h,...o[m]]:h}}},he=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),l=o?he(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let n=e.join(se);return t.validators.find(({validator:m})=>m(n))?.classGroupId},be=/^\[(.+)\]$/,ot=e=>{if(be.test(e)){let t=be.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},nt=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return st(Object.entries(e.classGroups),r).forEach(([n,m])=>{ae(m,o,n,t)}),o},ae=(e,t,r,o)=>{e.forEach(l=>{if(typeof l=="string"){let n=l===""?t:xe(t,l);n.classGroupId=r;return}if(typeof l=="function"){if(at(l)){ae(l(o),t,r,o);return}t.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([n,m])=>{ae(m,xe(t,n),r,o)})})},xe=(e,t)=>{let r=e;return t.split(se).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},at=e=>e.isThemeGetter,st=(e,t)=>t?e.map(([r,o])=>{let l=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([m,s])=>[t+m,s])):n);return[r,l]}):e,it=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,l=(n,m)=>{r.set(n,m),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let m=r.get(n);if(m!==void 0)return m;if((m=o.get(n))!==void 0)return l(n,m),m},set(n,m){r.has(n)?r.set(n,m):l(n,m)}}},ve="!",lt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,l=t[0],n=t.length,m=s=>{let h=[],v=0,S=0,k;for(let c=0;c<s.length;c++){let g=s[c];if(v===0){if(g===l&&(o||s.slice(c,c+n)===t)){h.push(s.slice(S,c)),S=c+n;continue}if(g==="/"){k=c;continue}}g==="["?v++:g==="]"&&v--}let P=h.length===0?s:s.substring(S),b=P.startsWith(ve),C=b?P.substring(1):P,i=k&&k>S?k-S:void 0;return{modifiers:h,hasImportantModifier:b,baseClassName:C,maybePostfixModifierPosition:i}};return r?s=>r({className:s,parseClassName:m}):m},dt=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},ct=e=>({cache:it(e.cacheSize),parseClassName:lt(e),...rt(e)}),mt=/\s+/,pt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l}=t,n=[],m=e.trim().split(mt),s="";for(let h=m.length-1;h>=0;h-=1){let v=m[h],{modifiers:S,hasImportantModifier:k,baseClassName:P,maybePostfixModifierPosition:b}=r(v),C=!!b,i=o(C?P.substring(0,b):P);if(!i){if(!C){s=v+(s.length>0?" "+s:s);continue}if(i=o(P),!i){s=v+(s.length>0?" "+s:s);continue}C=!1}let c=dt(S).join(":"),g=k?c+ve:c,f=g+i;if(n.includes(f))continue;n.push(f);let A=l(i,C);for(let T=0;T<A.length;++T){let V=A[T];n.push(g+V)}s=v+(s.length>0?" "+s:s)}return s};function ut(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ye(t))&&(o&&(o+=" "),o+=r);return o}var ye=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=ye(e[o]))&&(r&&(r+=" "),r+=t);return r};function gt(e,...t){let r,o,l,n=m;function m(h){let v=t.reduce((S,k)=>k(S),e());return r=ct(v),o=r.cache.get,l=r.cache.set,n=s,s(h)}function s(h){let v=o(h);if(v)return v;let S=pt(h,r);return l(h,S),S}return function(){return n(ut.apply(null,arguments))}}var x=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},we=/^\[(?:([Me-M-]+):)?(.+)\]$/i,ft=/^\Me+\/\Me+$/,bt=new Set(["px","full","screen"]),xt=/^(\Me+(\.\Me+)?)?(xs|sm|md|lg|xl)$/,ht=/\Me+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(Me|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,vt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,yt=/^(inset_)?-?((\Me+)?\.?(\Me+)[Me-M]+|0)_-?((\Me+)?\.?(\Me+)[Me-M]+|0)/,wt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,D=e=>_(e)||bt.has(e)||ft.test(e),E=e=>j(e,"length",Tt),_=e=>!!e&&!Number.isNaN(Number(e)),ne=e=>j(e,"number",_),U=e=>!!e&&Number.isInteger(Number(e)),Nt=e=>e.endsWith("%")&&_(e.slice(0,-1)),p=e=>we.test(e),B=e=>xt.test(e),St=new Set(["length","size","percentage"]),kt=e=>j(e,St,Ne),Rt=e=>j(e,"position",Ne),Ct=new Set(["image","url"]),Pt=e=>j(e,Ct,Dt),Mt=e=>j(e,"",It),F=()=>!0,j=(e,t,r)=>{let o=we.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},Tt=e=>ht.test(e)&&!vt.test(e),Ne=()=>!1,It=e=>yt.test(e),Dt=e=>wt.test(e);var zt=()=>{let e=x("colors"),t=x("spacing"),r=x("blur"),o=x("brightness"),l=x("borderColor"),n=x("borderRadius"),m=x("borderSpacing"),s=x("borderWidth"),h=x("contrast"),v=x("grayscale"),S=x("hueRotate"),k=x("invert"),P=x("gap"),b=x("gradientColorStops"),C=x("gradientColorStopPositions"),i=x("inset"),c=x("margin"),g=x("opacity"),f=x("padding"),A=x("saturate"),T=x("scale"),V=x("sepia"),G=x("skew"),de=x("space"),ce=x("translate"),ee=()=>["auto","contain","none"],te=()=>["auto","hidden","clip","visible","scroll"],re=()=>["auto",p,t],y=()=>[p,t],me=()=>["",D,E],O=()=>["auto",_,p],pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",p],ge=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[_,p];return{cacheSize:500,separator:":",theme:{colors:[F],spacing:[D,E],blur:["none","",B,p],brightness:I(),borderColor:[e],borderRadius:["none","","full",B,p],borderSpacing:y(),borderWidth:me(),contrast:I(),grayscale:W(),hueRotate:I(),invert:W(),gap:y(),gradientColorStops:[e],gradientColorStopPositions:[Nt,E],inset:re(),margin:re(),opacity:I(),padding:y(),saturate:I(),scale:I(),sepia:W(),skew:I(),space:y(),translate:y()},classGroups:{aspect:[{aspect:["auto","square","video",p]}],container:["container"],columns:[{columns:[B]}],"break-after":[{"break-after":ge()}],"break-before":[{"break-before":ge()}],"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:[...pe(),p]}],overflow:[{overflow:te()}],"overflow-x":[{"overflow-x":te()}],"overflow-y":[{"overflow-y":te()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[i]}],"inset-x":[{"inset-x":[i]}],"inset-y":[{"inset-y":[i]}],start:[{start:[i]}],end:[{end:[i]}],top:[{top:[i]}],right:[{right:[i]}],bottom:[{bottom:[i]}],left:[{left:[i]}],visibility:["visible","invisible","collapse"],M:[{M:["auto",U,p]}],basis:[{basis:re()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",p]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",U,p]}],"grid-cols":[{"grid-cols":[F]}],"col-start-end":[{col:["auto",{span:["full",U,p]},p]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[F]}],"row-start-end":[{row:["auto",{span:[U,p]},p]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",p]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",p]}],gap:[{gap:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...oe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...oe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...oe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[f]}],px:[{px:[f]}],py:[{py:[f]}],ps:[{ps:[f]}],pe:[{pe:[f]}],pt:[{pt:[f]}],pr:[{pr:[f]}],pb:[{pb:[f]}],pl:[{pl:[f]}],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":[de]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[de]}],"space-y-reverse":["space-y-reverse"],Me:[{Me:["auto","min","max","fit","svw","lvw","dvw",p,t]}],"min-Me":[{"min-Me":[p,t,"min","max","fit"]}],"max-Me":[{"max-Me":[p,t,"none","full","min","max","fit","prose",{screen:[B]},B]}],h:[{h:[p,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[p,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[p,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[p,t,"auto","min","max","fit"]}],"font-size":[{text:["base",B,E]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ne]}],"font-family":[{font:[F]}],"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",p]}],"line-clamp":[{"line-clamp":["none",_,ne]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",D,p]}],"list-image":[{"list-image":["none",p]}],"list-style-type":[{list:["none","disc","decimal",p]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",D,E]}],"underline-offset":[{"underline-offset":["auto",D,p]}],"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:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",p]}],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",p]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...pe(),Rt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Pt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-Me":[{border:[s]}],"border-Me-x":[{"border-x":[s]}],"border-Me-y":[{"border-y":[s]}],"border-Me-s":[{"border-s":[s]}],"border-Me-e":[{"border-e":[s]}],"border-Me-t":[{"border-t":[s]}],"border-Me-r":[{"border-r":[s]}],"border-Me-b":[{"border-b":[s]}],"border-Me-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...J(),"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":[g]}],"divide-style":[{divide:J()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...J()]}],"outline-offset":[{"outline-offset":[D,p]}],"outline-Me":[{outline:[D,E]}],"outline-color":[{outline:[e]}],"ring-Me":[{ring:me()}],"ring-Me-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-Me":[{"ring-offset":[D,E]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",B,Mt]}],"shadow-color":[{shadow:[F]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...ue(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ue()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",B,p]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[S]}],invert:[{invert:[k]}],saturate:[{saturate:[A]}],sepia:[{sepia:[V]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[S]}],"backdrop-invert":[{"backdrop-invert":[k]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[V]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[m]}],"border-spacing-x":[{"border-spacing-x":[m]}],"border-spacing-y":[{"border-spacing-y":[m]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",p]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",p]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",p]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[U,p]}],"translate-x":[{"translate-x":[ce]}],"translate-y":[{"translate-y":[ce]}],"skew-x":[{"skew-x":[G]}],"skew-y":[{"skew-y":[G]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",p]}],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","Me-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",p]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"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",p]}],fill:[{fill:[e,"none"]}],"stroke-Me":[{stroke:[D,E,ne]}],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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["Me","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-Me":["border-Me-s","border-Me-e","border-Me-t","border-Me-r","border-Me-b","border-Me-l"],"border-Me-x":["border-Me-r","border-Me-l"],"border-Me-y":["border-Me-t","border-Me-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-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-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Se=gt(zt);function R(...e){return Se((0,ke.clsx)(e))}var Re=require("@radix-ui/react-slot"),Ce=require("class-variance-authority"),Pe=H(require("react")),Me=require("react/jsx-runtime"),At=(0,Ce.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 Me-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"}}}),$=Pe.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...l},n)=>(0,Me.jsx)(e?Re.Slot:"button",{className:R(At({className:t,size:r,variant:o})),ref:n,...l}));$.displayName="Button";var Te=H(require("react")),Z=Te.forwardRef(({className:e,...t},r)=>(0,Me.jsx)("textarea",{className:R("flex min-h-[80px] Me-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:r,...t}));Z.displayName="Textarea";var De=H(require("react"));var X=De.forwardRef(({className:e,type:t,...r},o)=>(0,Me.jsx)("input",{type:t,className:R("flex h-9 Me-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:o,...r}));X.displayName="Input";var Et=(0,Ce.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 Ee({className:e,variant:t,...r}){return(0,Me.jsx)("div",{className:R(Et({variant:t}),e),...r})}var u=H(require("@radix-ui/react-select")),L=H(require("react")),$e=u.Root;var Le=u.Value,ie=L.forwardRef(({children:e,className:t,...r},o)=>(0,Me.jsxs)(u.Trigger,{className:R("flex h-10 Me-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:o,...r,children:[e,(0,Me.jsx)(u.Icon,{asChild:!0,children:(0,Me.jsx)(M.ChevronDown,{className:"h-4 Me-4 opacity-50"})})]}));ie.displayName=u.Trigger.displayName;var Ve=L.forwardRef(({className:e,...t},r)=>(0,Me.jsx)(u.ScrollUpButton,{className:R("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Me.jsx)(M.ChevronUp,{className:"h-4 Me-4"})}));Ve.displayName=u.ScrollUpButton.displayName;var Ke=L.forwardRef(({className:e,...t},r)=>(0,Me.jsx)(u.ScrollDownButton,{className:R("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Me.jsx)(M.ChevronDown,{className:"h-4 Me-4"})}));Ke.displayName=u.ScrollDownButton.displayName;var le=L.forwardRef(({children:e,className:t,position:r="popper",...o},l)=>(0,Me.jsx)(u.Portal,{children:(0,Me.jsxs)(u.Content,{className:R("relative M-50 max-h-96 min-Me-[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",r==="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:r,ref:l,...o,children:[(0,Me.jsx)(Ve,{}),(0,Me.jsx)(u.Viewport,{className:R("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] Me-full min-Me-[var(--radix-select-trigger-width)]"),children:e}),(0,Me.jsx)(Ke,{})]})}));le.displayName=u.Content.displayName;var Bt=L.forwardRef(({className:e,...t},r)=>(0,Me.jsx)(u.Label,{className:R("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));Bt.displayName=u.Label.displayName;var Q=L.forwardRef(({children:e,className:t,...r},o)=>(0,Me.jsxs)(u.Item,{className:R("relative flex Me-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:o,...r,children:[(0,Me.jsx)("span",{className:"absolute left-2 flex h-3.5 Me-3.5 items-center justify-center",children:(0,Me.jsx)(u.ItemIndicator,{children:(0,Me.jsx)(M.Check,{className:"h-4 Me-4"})})}),(0,Me.jsx)(u.ItemText,{children:e})]}));Q.displayName=u.Item.displayName;var $t=L.forwardRef(({className:e,...t},r)=>(0,Me.jsx)(u.Separator,{className:R("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));$t.displayName=u.Separator.displayName;function je({document:e,onSave:t,onCancel:r,availableDocuments:o=[],knowledgeContexts:l=[]}){let[n,m]=(0,Ue.useState)({...e,updatedAt:new Date}),s=()=>{let i=new Set,c=new Set;return l.forEach(g=>{g.menuConfig.groupBy.forEach(f=>i.add(f))}),o.forEach(g=>{g.metadata&&Object.keys(g.metadata).forEach(f=>c.add(f))}),{contextKeys:Array.from(i).sort(),documentKeys:Array.from(c).sort(),allKeys:Array.from(new Set([...i,...c])).sort()}},h=i=>{let c=new Set;return o.forEach(g=>{g.metadata?.[i]&&c.add(String(g.metadata[i]))}),Array.from(c).sort()},v=s(),S=()=>{t(n)},k=(i,c)=>{m(g=>({...g,metadata:{...g.metadata,[i]:c}}))},P=(i,c)=>{c==="__custom__"?k(i,""):k(i,c)},b=()=>{let i=`field_${Date.now()}`;k(i,"")},C=i=>{m(c=>{let g={...c.metadata};return delete g[i],{...c,metadata:g}})};return(0,Me.jsxs)(He.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Me.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Me.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Me.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Me.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,Me.jsx)(M.Edit3,{className:"h-6 Me-6 text-primary"})}),(0,Me.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,Me.jsxs)("div",{className:"flex gap-2",children:[(0,Me.jsxs)($,{variant:"outline",size:"sm",onClick:r,className:"gap-2",children:[(0,Me.jsx)(M.X,{className:"h-4 Me-4"}),"Cancel"]}),(0,Me.jsxs)($,{size:"sm",onClick:S,className:"gap-2",children:[(0,Me.jsx)(M.Save,{className:"h-4 Me-4"}),"Save Changes"]})]})]}),(0,Me.jsxs)("div",{className:"space-y-4",children:[(0,Me.jsxs)("div",{children:[(0,Me.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,Me.jsx)(X,{value:n.title,onChange:i=>m(c=>({...c,title:i.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,Me.jsxs)("div",{children:[(0,Me.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,Me.jsx)(Z,{value:n.description||"",onChange:i=>m(c=>({...c,description:i.target.value})),placeholder:"Document description...",rows:2})]}),(0,Me.jsxs)("div",{children:[(0,Me.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Me.jsxs)("div",{children:[(0,Me.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),v.contextKeys.length>0&&(0,Me.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Suggested: ",v.contextKeys.slice(0,4).join(", "),v.contextKeys.length>4&&` +${v.contextKeys.length-4}`]})]}),(0,Me.jsxs)($,{type:"button",variant:"outline",size:"sm",onClick:b,className:"gap-1 h-8",children:[(0,Me.jsx)(M.Plus,{className:"h-3 Me-3"}),"Add"]})]}),n.metadata&&Object.keys(n.metadata).length>0?(0,Me.jsx)("div",{className:"space-y-2",children:Object.entries(n.metadata).map(([i,c])=>{let g=h(i);return(0,Me.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Me.jsx)(X,{value:i,onChange:f=>{let A=f.target.value,T=n.metadata?.[i];m(V=>{let G={...V.metadata};return delete G[i],A&&(G[A]=T||""),{...V,metadata:G}})},placeholder:"Key",className:"Me-32 h-8 text-sm",list:`metadata-keys-${i}`}),(0,Me.jsx)("datalist",{id:`metadata-keys-${i}`,children:v.allKeys.map(f=>(0,Me.jsx)("option",{value:f},f))}),(0,Me.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),g.length>0?(0,Me.jsxs)($e,{value:String(c||""),onValueChange:f=>P(i,f),children:[(0,Me.jsx)(ie,{className:"flex-1 h-8 text-sm",children:(0,Me.jsx)(Le,{placeholder:"Value"})}),(0,Me.jsxs)(le,{children:[g.map(f=>(0,Me.jsx)(Q,{value:f,children:f},f)),(0,Me.jsx)(Q,{value:"__custom__",children:(0,Me.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Me.jsx)(X,{value:String(c||""),onChange:f=>k(i,f.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Me.jsx)($,{type:"button",variant:"ghost",size:"sm",onClick:()=>C(i),className:"h-8 Me-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Me.jsx)(M.X,{className:"h-3 Me-3"})})]},i)})}):(0,Me.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,Me.jsx)("p",{className:"text-xs text-muted-foreground",children:'No metadata \u2022 Click "Add" to create fields'})})]}),(0,Me.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Me.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Me.jsx)(Ee,{variant:"secondary",className:"font-mono",children:n.format.toUpperCase()})]})]})]}),(0,Me.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Me.jsxs)("div",{className:"p-8",children:[(0,Me.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Me.jsx)(Z,{value:n.content||"",onChange:i=>m(c=>({...c,content:i.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var Fe=e=>(0,Me.jsx)("div",{className:"prose prose-slate dark:prose-invert max-Me-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),We=e=>(0,Me.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),Lt=e=>(0,Me.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-Me-none",children:[(0,Me.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,Me.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Me.jsx)("strong",{children:"RichText Renderer:"})," This is Me placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,Me.jsx)("pre",{className:"text-sm",children:e})]}),Vt=e=>(0,Me.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-Me-none",children:[(0,Me.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,Me.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Me.jsx)("strong",{children:"MDX Renderer:"})," This is Me placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Fe(e)]});function Xe({document:e,onDocumentUpdate:t,editable:r=!0,renderers:o,availableDocuments:l=[],knowledgeContexts:n=[]}){let[m,s]=(0,Ue.useState)(!1),h=b=>{switch(b){case"markdown":case"mdx":return(0,Me.jsx)(M.FileText,{className:"h-6 Me-6 text-primary"});case"richtext":return(0,Me.jsx)(M.File,{className:"h-6 Me-6 text-success"});case"text":return(0,Me.jsx)(M.Type,{className:"h-6 Me-6 text-muted-foreground"});default:return(0,Me.jsx)(M.File,{className:"h-6 Me-6 text-muted-foreground"})}},v=b=>{switch(b){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"}},S=(b,C)=>{let i={markdown:Fe,mdx:Vt,richtext:Lt,text:We},c=o?.[C]||i[C];return c?c(b):We(b)},k=b=>{s(!1),t?.(b)},P=()=>{s(!1)};return m?(0,Me.jsx)(je,{document:e,onSave:k,onCancel:P,availableDocuments:l,knowledgeContexts:n}):(0,Me.jsxs)(He.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Me.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Me.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Me.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-Me-0",children:[(0,Me.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:h(e.format)}),(0,Me.jsxs)("div",{className:"flex-1 min-Me-0",children:[(0,Me.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Me.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),r&&(0,Me.jsx)("div",{className:"flex-shrink-0",children:(0,Me.jsxs)($,{variant:"outline",size:"sm",onClick:()=>s(!0),className:"gap-2",children:[(0,Me.jsx)(M.Edit3,{className:"h-4 Me-4"}),"Edit"]})})]}),(0,Me.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Me.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${v(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(b=>(0,Me.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",b]},b))]})]}),(0,Me.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Me.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Me.jsxs)("div",{className:"mb-6",children:[(0,Me.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Me.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,Me.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-xs",children:Object.entries(e.metadata).map(([b,C])=>(0,Me.jsxs)("div",{className:"flex gap-1",children:[(0,Me.jsxs)("span",{className:"text-muted-foreground font-medium",children:[b.replace(/([A-Z])/g," $1").trim(),":"]}),(0,Me.jsx)("span",{className:"text-foreground truncate",children:String(C)})]},b))})})]}),(0,Me.jsx)("div",{className:"space-y-4",children:e.content?(0,Me.jsx)("div",{className:"relative",children:(0,Me.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:S(e.content,e.format)})}):(0,Me.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,Me.jsx)("div",{className:"Me-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Me.jsx)(M.FileText,{className:"h-8 Me-8 text-muted-foreground"})}),(0,Me.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Me.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}var Oe={markdown:e=>(0,Me.jsx)("div",{className:"prose prose-slate dark:prose-invert max-Me-none",children:(0,Me.jsx)("div",{dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}})}),text:e=>(0,Me.jsx)("pre",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed bg-slate-50 dark:bg-slate-900 p-4 rounded-lg",children:e}),richtext:e=>(0,Me.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-Me-none",children:[(0,Me.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,Me.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Me.jsx)("strong",{children:"Custom RichText Renderer:"})," Implement PayloadCMS integration here"]})}),(0,Me.jsx)("pre",{className:"text-sm bg-slate-50 dark:bg-slate-900 p-4 rounded",children:e})]}),mdx:e=>(0,Me.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-Me-none",children:[(0,Me.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,Me.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Me.jsx)("strong",{children:"Custom MDX Renderer:"})," Implement @mdx-js/react integration here"]})}),(0,Me.jsx)("div",{dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>")}})]})},Y=[{id:"1",title:"Markdown Documentation",description:"A sample markdown document with formatting",format:"markdown",content:`# Welcome to Markdown
5
+ "use strict";var tt=Object.create;var oe=Object.defineProperty;var rt=Object.getOwnPropertyDescriptor;var ot=Object.getOwnPropertyNames;var at=Object.getPrototypeOf,nt=Object.prototype.hasOwnProperty;var st=(e,t)=>{for(var r in t)oe(e,r,{get:t[r],enumerable:!0})},Se=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of ot(t))!nt.call(e,l)&&l!==r&&oe(e,l,{get:()=>t[l],enumerable:!(o=rt(t,l))||o.enumerable});return e};var W=(e,t,r)=>(r=e!=null?tt(at(e)):{},Se(t||!e||!e.__esModule?oe(r,"default",{value:e,enumerable:!0}):r,e)),it=e=>Se(oe({},"__esModule",{value:!0}),e);var Xt={};st(Xt,{DocumentPreviewExample:()=>Ut,DocumentPreviewWithPayloadRichText:()=>Ot,DocumentPreviewWithReactMarkdown:()=>Ht,customRenderers:()=>et,sampleDocuments:()=>ne});module.exports=it(Xt);var xe=require("motion/react"),z=require("lucide-react"),ve=require("react");var De=require("clsx");var ce="-",lt=e=>{let t=ct(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let s=c.split(ce);return s[0]===""&&s.length!==1&&s.shift(),Pe(s,t)||dt(c)},getConflictingClassGroupIds:(c,s)=>{let b=r[c]||[];return s&&o[c]?[...b,...o[c]]:b}}},Pe=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),l=o?Pe(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let a=e.join(ce);return t.validators.find(({validator:c})=>c(a))?.classGroupId},Ce=/^\[(.+)\]$/,dt=e=>{if(Ce.test(e)){let t=Ce.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},ct=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return pt(Object.entries(e.classGroups),r).forEach(([a,c])=>{de(c,o,a,t)}),o},de=(e,t,r,o)=>{e.forEach(l=>{if(typeof l=="string"){let a=l===""?t:Re(t,l);a.classGroupId=r;return}if(typeof l=="function"){if(mt(l)){de(l(o),t,r,o);return}t.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([a,c])=>{de(c,Re(t,a),r,o)})})},Re=(e,t)=>{let r=e;return t.split(ce).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},mt=e=>e.isThemeGetter,pt=(e,t)=>t?e.map(([r,o])=>{let l=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([c,s])=>[t+c,s])):a);return[r,l]}):e,ut=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,l=(a,c)=>{r.set(a,c),t++,t>e&&(t=0,o=r,r=new Map)};return{get(a){let c=r.get(a);if(c!==void 0)return c;if((c=o.get(a))!==void 0)return l(a,c),c},set(a,c){r.has(a)?r.set(a,c):l(a,c)}}},Me="!",gt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,l=t[0],a=t.length,c=s=>{let b=[],h=0,v=0,E;for(let x=0;x<s.length;x++){let P=s[x];if(h===0){if(P===l&&(o||s.slice(x,x+a)===t)){b.push(s.slice(v,x)),v=x+a;continue}if(P==="/"){E=x;continue}}P==="["?h++:P==="]"&&h--}let R=b.length===0?s:s.substring(v),D=R.startsWith(Me),N=D?R.substring(1):R,f=E&&E>v?E-v:void 0;return{modifiers:b,hasImportantModifier:D,baseClassName:N,maybePostfixModifierPosition:f}};return r?s=>r({className:s,parseClassName:c}):c},ft=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},bt=e=>({cache:ut(e.cacheSize),parseClassName:gt(e),...lt(e)}),ht=/\s+/,xt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l}=t,a=[],c=e.trim().split(ht),s="";for(let b=c.length-1;b>=0;b-=1){let h=c[b],{modifiers:v,hasImportantModifier:E,baseClassName:R,maybePostfixModifierPosition:D}=r(h),N=!!D,f=o(N?R.substring(0,D):R);if(!f){if(!N){s=h+(s.length>0?" "+s:s);continue}if(f=o(R),!f){s=h+(s.length>0?" "+s:s);continue}N=!1}let x=ft(v).join(":"),P=E?x+Me:x,T=P+f;if(a.includes(T))continue;a.push(T);let F=l(f,N);for(let B=0;B<F.length;++B){let H=F[B];a.push(P+H)}s=h+(s.length>0?" "+s:s)}return s};function vt(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Te(t))&&(o&&(o+=" "),o+=r);return o}var Te=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Te(e[o]))&&(r&&(r+=" "),r+=t);return r};function yt(e,...t){let r,o,l,a=c;function c(b){let h=t.reduce((v,E)=>E(v),e());return r=bt(h),o=r.cache.get,l=r.cache.set,a=s,s(b)}function s(b){let h=o(b);if(h)return h;let v=xt(b,r);return l(b,v),v}return function(){return a(vt.apply(null,arguments))}}var y=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ie=/^\[(?:([a-z-]+):)?(.+)\]$/i,wt=/^\Ke+\/\Ke+$/,Nt=new Set(["px","full","screen"]),kt=/^(\Ke+(\.\Ke+)?)?(xs|sm|md|lg|xl)$/,St=/\Ke+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ct=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Rt=/^(inset_)?-?((\Ke+)?\.?(\Ke+)[a-z]+|0)_-?((\Ke+)?\.?(\Ke+)[a-z]+|0)/,Pt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,K=e=>O(e)||Nt.has(e)||wt.test(e),V=e=>X(e,"length",Bt),O=e=>!!e&&!Number.isNaN(Number(e)),le=e=>X(e,"number",O),Q=e=>!!e&&Number.isInteger(Number(e)),Mt=e=>e.endsWith("%")&&O(e.slice(0,-1)),m=e=>Ie.test(e),_=e=>kt.test(e),Tt=new Set(["length","size","percentage"]),It=e=>X(e,Tt,Ee),Et=e=>X(e,"position",Ee),zt=new Set(["image","url"]),Dt=e=>X(e,zt,Kt),At=e=>X(e,"",$t),Y=()=>!0,X=(e,t,r)=>{let o=Ie.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},Bt=e=>St.test(e)&&!Ct.test(e),Ee=()=>!1,$t=e=>Rt.test(e),Kt=e=>Pt.test(e);var Lt=()=>{let e=y("colors"),t=y("spacing"),r=y("blur"),o=y("brightness"),l=y("borderColor"),a=y("borderRadius"),c=y("borderSpacing"),s=y("borderWidth"),b=y("contrast"),h=y("grayscale"),v=y("hueRotate"),E=y("invert"),R=y("gap"),D=y("gradientColorStops"),N=y("gradientColorStopPositions"),f=y("inset"),x=y("margin"),P=y("opacity"),T=y("padding"),F=y("saturate"),B=y("scale"),H=y("sepia"),i=y("skew"),p=y("space"),u=y("translate"),M=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],se=()=>["auto",m,t],w=()=>[m,t],ye=()=>["",K,V],te=()=>["auto",O,m],we=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],re=()=>["solid","dashed","dotted","double","none"],Ne=()=>["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"],Z=()=>["","0",m],ke=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[O,m];return{cacheSize:500,separator:":",theme:{colors:[Y],spacing:[K,V],blur:["none","",_,m],brightness:$(),borderColor:[e],borderRadius:["none","","full",_,m],borderSpacing:w(),borderWidth:ye(),contrast:$(),grayscale:Z(),hueRotate:$(),invert:Z(),gap:w(),gradientColorStops:[e],gradientColorStopPositions:[Mt,V],inset:se(),margin:se(),opacity:$(),padding:w(),saturate:$(),scale:$(),sepia:Z(),skew:$(),space:w(),translate:w()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[_]}],"break-after":[{"break-after":ke()}],"break-before":[{"break-before":ke()}],"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:[...we(),m]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Q,m]}],basis:[{basis:se()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",m]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Q,m]}],"grid-cols":[{"grid-cols":[Y]}],"col-start-end":[{col:["auto",{span:["full",Q,m]},m]}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":[Y]}],"row-start-end":[{row:["auto",{span:[Q,m]},m]}],"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",m]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",m]}],gap:[{gap:[R]}],"gap-x":[{"gap-x":[R]}],"gap-y":[{"gap-y":[R]}],"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:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[p]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[p]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",m,t]}],"min-w":[{"min-w":[m,t,"min","max","fit"]}],"max-w":[{"max-w":[m,t,"none","full","min","max","fit","prose",{screen:[_]},_]}],h:[{h:[m,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[m,t,"auto","min","max","fit"]}],"font-size":[{text:["base",_,V]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",le]}],"font-family":[{font:[Y]}],"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",m]}],"line-clamp":[{"line-clamp":["none",O,le]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",K,m]}],"list-image":[{"list-image":["none",m]}],"list-style-type":[{list:["none","disc","decimal",m]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",K,V]}],"underline-offset":[{"underline-offset":["auto",K,m]}],"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:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m]}],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",m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...we(),Et]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",It]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Dt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[D]}],"gradient-via":[{via:[D]}],"gradient-to":[{to:[D]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[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:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...re(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:re()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...re()]}],"outline-offset":[{"outline-offset":[K,m]}],"outline-w":[{outline:[K,V]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ye()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-w":[{"ring-offset":[K,V]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",_,At]}],"shadow-color":[{shadow:[Y]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...Ne(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ne()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[b]}],"drop-shadow":[{"drop-shadow":["","none",_,m]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[E]}],saturate:[{saturate:[F]}],sepia:[{sepia:[H]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[b]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[E]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[F]}],"backdrop-sepia":[{"backdrop-sepia":[H]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",m]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[B]}],"scale-x":[{"scale-x":[B]}],"scale-y":[{"scale-y":[B]}],rotate:[{rotate:[Q,m]}],"translate-x":[{"translate-x":[u]}],"translate-y":[{"translate-y":[u]}],"skew-x":[{"skew-x":[i]}],"skew-y":[{"skew-y":[i]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",m]}],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","Ke-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",m]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",m]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[K,V,le]}],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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","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-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"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-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-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-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ze=yt(Lt);function I(...e){return ze((0,De.clsx)(e))}var Ae=require("@radix-ui/react-slot"),Be=require("class-variance-authority"),$e=W(require("react")),Ke=require("react/jsx-runtime"),Vt=(0,Be.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"}}}),A=$e.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...l},a)=>(0,Ke.jsx)(e?Ae.Slot:"button",{className:I(Vt({className:t,size:r,variant:o})),ref:a,...l}));A.displayName="Button";var Le=W(require("react")),ee=Le.forwardRef(({className:e,...t},r)=>(0,Ke.jsx)("textarea",{className:I("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:r,...t}));ee.displayName="Textarea";var _e=W(require("react"));var J=_e.forwardRef(({className:e,type:t,...r},o)=>(0,Ke.jsx)("input",{type:t,className:I("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:o,...r}));J.displayName="Input";var g=W(require("@radix-ui/react-select")),G=W(require("react")),Fe=g.Root;var je=g.Value,me=G.forwardRef(({children:e,className:t,...r},o)=>(0,Ke.jsxs)(g.Trigger,{className:I("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:o,...r,children:[e,(0,Ke.jsx)(g.Icon,{asChild:!0,children:(0,Ke.jsx)(z.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));me.displayName=g.Trigger.displayName;var We=G.forwardRef(({className:e,...t},r)=>(0,Ke.jsx)(g.ScrollUpButton,{className:I("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ke.jsx)(z.ChevronUp,{className:"h-4 w-4"})}));We.displayName=g.ScrollUpButton.displayName;var Ue=G.forwardRef(({className:e,...t},r)=>(0,Ke.jsx)(g.ScrollDownButton,{className:I("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ke.jsx)(z.ChevronDown,{className:"h-4 w-4"})}));Ue.displayName=g.ScrollDownButton.displayName;var pe=G.forwardRef(({children:e,className:t,position:r="popper",...o},l)=>(0,Ke.jsx)(g.Portal,{children:(0,Ke.jsxs)(g.Content,{className:I("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",r==="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:r,ref:l,...o,children:[(0,Ke.jsx)(We,{}),(0,Ke.jsx)(g.Viewport,{className:I("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Ke.jsx)(Ue,{})]})}));pe.displayName=g.Content.displayName;var _t=G.forwardRef(({className:e,...t},r)=>(0,Ke.jsx)(g.Label,{className:I("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));_t.displayName=g.Label.displayName;var ae=G.forwardRef(({children:e,className:t,...r},o)=>(0,Ke.jsxs)(g.Item,{className:I("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:o,...r,children:[(0,Ke.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ke.jsx)(g.ItemIndicator,{children:(0,Ke.jsx)(z.Check,{className:"h-4 w-4"})})}),(0,Ke.jsx)(g.ItemText,{children:e})]}));ae.displayName=g.Item.displayName;var Gt=G.forwardRef(({className:e,...t},r)=>(0,Ke.jsx)(g.Separator,{className:I("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));Gt.displayName=g.Separator.displayName;var He=W(require("react")),ue=W(require("@radix-ui/react-label"));var Ft=(0,Be.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ge=He.forwardRef(({className:e,...t},r)=>(0,Ke.jsx)(ue.Root,{ref:r,className:I(Ft(),e),...t}));ge.displayName=ue.Root.displayName;var be=({fieldName:e,value:t,label:r,multiline:o=!1,onSave:l,className:a="",disabled:c=!1})=>{let[s,b]=(0,ve.useState)(!1),[h,v]=(0,ve.useState)(""),E=()=>{c||(b(!0),v(t))},R=async()=>{h!==t&&await l(e,h),b(!1)},D=N=>{N.key==="Enter"&&!o||N.key==="Enter"&&N.ctrlKey&&o?R():N.key==="Escape"&&(b(!1),v(""))};return(0,Ke.jsxs)("div",{className:`space-y-2 ${a}`,children:[(0,Ke.jsx)(ge,{children:r}),s?o?(0,Ke.jsx)(ee,{value:h,onChange:N=>v(N.target.value),onBlur:R,onKeyDown:D,autoFocus:!0,rows:4,className:"resize-none"}):(0,Ke.jsx)(J,{value:h,onChange:N=>v(N.target.value),onBlur:R,onKeyPress:D,autoFocus:!0,className:"text-lg font-medium"}):(0,Ke.jsxs)("div",{onClick:E,className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Ke.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!c&&(0,Ke.jsx)(z.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};function qe({document:e,onSave:t,onCancel:r,availableDocuments:o=[],knowledgeContexts:l=[]}){let[a,c]=(0,ve.useState)({...e,updatedAt:new Date}),[s,b]=(0,ve.useState)(!1),[h,v]=(0,ve.useState)(()=>{let i=[],p=0,u=new Set;return l.forEach(M=>{M.menuConfig.groupBy.forEach(j=>u.add(j))}),u.forEach(M=>{i.push({id:`context_field_${p++}`,key:M,value:e.metadata?.[M]?String(e.metadata[M]):"",isContextKey:!0})}),e.metadata&&Object.entries(e.metadata).forEach(([M,j])=>{u.has(M)||i.push({id:`existing_field_${p++}`,key:M,value:String(j),isContextKey:!1})}),i}),E=i=>{switch(i){case"markdown":case"mdx":return(0,Ke.jsx)(z.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,Ke.jsx)(z.File,{className:"h-6 w-6 text-success"});case"text":return(0,Ke.jsx)(z.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Ke.jsx)(z.File,{className:"h-6 w-6 text-muted-foreground"})}},R=i=>{switch(i){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"}},D=()=>{let i=new Set;return o.forEach(p=>{p.metadata&&Object.keys(p.metadata).forEach(u=>i.add(u))}),{documentKeys:Array.from(i).sort()}},N=i=>{let p=new Set;return o.forEach(u=>{u.metadata?.[i]&&p.add(String(u.metadata[i]))}),Array.from(p).sort()},f=D(),x=()=>{t(a)};(0,ve.useEffect)(()=>{let i=h.filter(p=>p.key.trim()!==""&&p.value.trim()!=="").reduce((p,u)=>({...p,[u.key]:u.value}),{});c(p=>({...p,metadata:Object.keys(i).length>0?i:void 0}))},[h]);let P=(i,p)=>{v(u=>u.map(M=>M.id===i?{...M,key:p}:M))},T=(i,p)=>{v(u=>u.map(M=>M.id===i?{...M,value:p}:M))},F=(i,p)=>{p==="__custom__"?T(i,""):T(i,p)},B=()=>{let i={id:`field_${Date.now()}`,key:"",value:"",isContextKey:!1};v(p=>[...p,i])},H=i=>{v(p=>p.filter(u=>u.id!==i))};return(0,Ke.jsxs)(xe.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Ke.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,Ke.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Ke.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,Ke.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:E(a.format)}),(0,Ke.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ke.jsxs)("div",{className:"flex items-start gap-4 mb-2 leading-tight",children:[(0,Ke.jsx)("div",{className:"flex-1 min-w-0",children:(0,Ke.jsx)(be,{fieldName:"title",value:a.title,label:"",onSave:(i,p)=>c(u=>({...u,title:p})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,Ke.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${R(a.format)} flex-shrink-0 mt-1`,children:a.format.toUpperCase()})]}),(0,Ke.jsx)("div",{className:"mt-2",children:(0,Ke.jsx)(be,{fieldName:"description",value:a.description||"Click to add description...",label:"",multiline:!0,onSave:(i,p)=>c(u=>({...u,description:p})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})]}),(0,Ke.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,Ke.jsxs)(A,{variant:"ghost",size:"sm",onClick:()=>b(!s),className:"gap-2",children:[(0,Ke.jsx)(z.Info,{className:"h-4 w-4"}),"Metadata",h.filter(i=>i.key.trim()!==""&&i.value.trim()!=="").length>0&&(0,Ke.jsx)("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:h.filter(i=>i.key.trim()!==""&&i.value.trim()!=="").length}),s?(0,Ke.jsx)(z.ChevronDown,{className:"h-4 w-4"}):(0,Ke.jsx)(z.ChevronRight,{className:"h-4 w-4"})]}),(0,Ke.jsxs)(A,{variant:"outline",size:"sm",onClick:r,className:"gap-2",children:[(0,Ke.jsx)(z.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Ke.jsxs)(A,{size:"sm",onClick:x,className:"gap-2",children:[(0,Ke.jsx)(z.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,Ke.jsx)(xe.motion.div,{initial:!1,animate:{height:s?"auto":0,opacity:s?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Ke.jsxs)("div",{className:"pt-4 border-t border-border mt-4",children:[(0,Ke.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ke.jsxs)("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,Ke.jsx)(z.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,Ke.jsxs)(A,{type:"button",variant:"outline",size:"sm",onClick:B,className:"gap-1 h-8",children:[(0,Ke.jsx)(z.Plus,{className:"h-3 w-3"}),"Add Field"]})]}),f.documentKeys.length>0&&(0,Ke.jsxs)("p",{className:"text-xs text-muted-foreground mb-3",children:["Additional from documents: ",f.documentKeys.slice(0,4).join(", "),f.documentKeys.length>4&&` +${f.documentKeys.length-4} more`]}),(0,Ke.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:h.length>0?(0,Ke.jsx)("div",{className:"space-y-2",children:h.map(i=>{let p=N(i.key);return(0,Ke.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Ke.jsx)(J,{value:i.key,onChange:u=>P(i.id,u.target.value),placeholder:"Key",className:`w-32 h-8 text-sm ${i.isContextKey?"bg-primary/5 border-primary/30":""}`,list:`metadata-keys-${i.id}`,disabled:i.isContextKey}),(0,Ke.jsx)("datalist",{id:`metadata-keys-${i.id}`,children:f.documentKeys.map(u=>(0,Ke.jsx)("option",{value:u},u))}),(0,Ke.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),p.length>0?(0,Ke.jsxs)(Fe,{value:i.value||"",onValueChange:u=>F(i.id,u),children:[(0,Ke.jsx)(me,{className:"flex-1 h-8 text-sm",children:(0,Ke.jsx)(je,{placeholder:"Value"})}),(0,Ke.jsxs)(pe,{children:[p.map(u=>(0,Ke.jsx)(ae,{value:u,children:u},u)),(0,Ke.jsx)(ae,{value:"__custom__",children:(0,Ke.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Ke.jsx)(J,{value:i.value||"",onChange:u=>T(i.id,u.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Ke.jsx)(A,{type:"button",variant:"ghost",size:"sm",onClick:()=>H(i.id),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Ke.jsx)(z.X,{className:"h-3 w-3"})})]},i.id)})}):(0,Ke.jsxs)("div",{className:"text-center py-4",children:[(0,Ke.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"No metadata fields"}),(0,Ke.jsx)("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" to create metadata'})]})})]})})]}),(0,Ke.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Ke.jsxs)("div",{className:"p-8",children:[(0,Ke.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Ke.jsx)(ee,{value:a.content||"",onChange:i=>c(p=>({...p,content:i.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var Qe=e=>(0,Ke.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:e.replace(/\Ke/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),Ze=e=>(0,Ke.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),jt=e=>(0,Ke.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Ke.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,Ke.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Ke.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,Ke.jsx)("pre",{className:"text-sm",children:e})]}),Wt=e=>(0,Ke.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Ke.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,Ke.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Ke.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Qe(e)]});function Ye({document:e,onDocumentUpdate:t,editable:r=!0,renderers:o,availableDocuments:l=[],knowledgeContexts:a=[]}){let[c,s]=(0,ve.useState)(!1),[b,h]=(0,ve.useState)(!1),v=f=>{switch(f){case"markdown":case"mdx":return(0,Ke.jsx)(z.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,Ke.jsx)(z.File,{className:"h-6 w-6 text-success"});case"text":return(0,Ke.jsx)(z.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Ke.jsx)(z.File,{className:"h-6 w-6 text-muted-foreground"})}},E=f=>{switch(f){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"}},R=(f,x)=>{let P={markdown:Qe,mdx:Wt,richtext:jt,text:Ze},T=o?.[x]||P[x];return T?T(f):Ze(f)},D=f=>{s(!1),t?.(f)},N=()=>{s(!1)};return c?(0,Ke.jsx)(qe,{document:e,onSave:D,onCancel:N,availableDocuments:l,knowledgeContexts:a}):(0,Ke.jsxs)(xe.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Ke.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,Ke.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Ke.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,Ke.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:v(e.format)}),(0,Ke.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ke.jsxs)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:[e.title,(0,Ke.jsx)("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${E(e.format)}`,children:e.format.toUpperCase()})]}),e.description&&(0,Ke.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed",children:e.description})]})]}),(0,Ke.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Ke.jsxs)(A,{variant:"ghost",size:"sm",onClick:()=>h(!b),className:"gap-2",children:[(0,Ke.jsx)(z.Info,{className:"h-4 w-4"}),"Metadata",b?(0,Ke.jsx)(z.ChevronDown,{className:"h-4 w-4"}):(0,Ke.jsx)(z.ChevronRight,{className:"h-4 w-4"})]}),r&&(0,Ke.jsxs)(A,{variant:"outline",size:"sm",onClick:()=>s(!0),className:"gap-2",children:[(0,Ke.jsx)(z.Edit3,{className:"h-4 w-4"}),"Edit"]})]})]}),e.metadata&&Object.keys(e.metadata).length>0&&(0,Ke.jsx)(xe.motion.div,{initial:!1,animate:{height:b?"auto":0,opacity:b?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Ke.jsxs)("div",{className:"pt-4 border-t border-border mt-4",children:[(0,Ke.jsxs)("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[(0,Ke.jsx)(z.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,Ke.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:(0,Ke.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm",children:Object.entries(e.metadata).map(([f,x])=>(0,Ke.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Ke.jsx)("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:f.replace(/([A-Z])/g," $1").trim()}),(0,Ke.jsx)("span",{className:"text-foreground font-medium",children:String(x)})]},f))})})]})})]}),(0,Ke.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Ke.jsx)("div",{className:"p-8",children:(0,Ke.jsx)("div",{className:"space-y-4",children:e.content?(0,Ke.jsx)("div",{className:"relative",children:(0,Ke.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:R(e.content,e.format)})}):(0,Ke.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,Ke.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Ke.jsx)(z.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Ke.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Ke.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})}var et={markdown:e=>(0,Ke.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:(0,Ke.jsx)("div",{dangerouslySetInnerHTML:{__html:e.replace(/\Ke/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}})}),text:e=>(0,Ke.jsx)("pre",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed bg-slate-50 dark:bg-slate-900 p-4 rounded-lg",children:e}),richtext:e=>(0,Ke.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Ke.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,Ke.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Ke.jsx)("strong",{children:"Custom RichText Renderer:"})," Implement PayloadCMS integration here"]})}),(0,Ke.jsx)("pre",{className:"text-sm bg-slate-50 dark:bg-slate-900 p-4 rounded",children:e})]}),mdx:e=>(0,Ke.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Ke.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,Ke.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Ke.jsx)("strong",{children:"Custom MDX Renderer:"})," Implement @mdx-js/react integration here"]})}),(0,Ke.jsx)("div",{dangerouslySetInnerHTML:{__html:e.replace(/\Ke/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>")}})]})},ne=[{id:"1",title:"Markdown Documentation",description:"A sample markdown document with formatting",format:"markdown",content:`# Welcome to Markdown
6
6
 
7
- This is Me **bold** statement and this is *italic*.
7
+ This is a **bold** statement and this is *italic*.
8
8
 
9
9
  ## Code Example
10
10
 
11
- Here's some \`inline code\` and Me code block:
11
+ Here's some \`inline code\` and a code block:
12
12
 
13
13
  \`\`\`javascript
14
14
  function hello() {
@@ -20,7 +20,7 @@ function hello() {
20
20
 
21
21
  - Item 1
22
22
  - Item 2
23
- - Item 3`,tags:["documentation","markdown"],createdAt:new Date,metadata:{author:"John Doe",version:"1.0"}},{id:"2",title:"Plain Text File",description:"A simple text document",format:"text",content:`This is Me plain text document.
23
+ - Item 3`,tags:["documentation","markdown"],createdAt:new Date,metadata:{author:"John Doe",version:"1.0"}},{id:"2",title:"Plain Text File",description:"A simple text document",format:"text",content:`This is a plain text document.
24
24
  It preserves line breaks and spacing.
25
25
 
26
26
  No special formatting is applied.
@@ -32,4 +32,4 @@ This is **MDX** content that can include React components.
32
32
 
33
33
  ## Interactive Elements
34
34
 
35
- MDX allows you to embed interactive React components directly in markdown.`,tags:["mdx","react"],createdAt:new Date}];function Kt(){return(0,Me.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:Y.map(e=>(0,Me.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,Me.jsx)(Xe,{document:e,renderers:Oe,editable:!1})},e.id))})}function Gt(){let e=Y[0];return(0,Me.jsx)("div",{className:"bg-yellow-50 dark:bg-yellow-950/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:(0,Me.jsxs)("p",{className:"text-yellow-800 dark:text-yellow-200 text-sm",children:["Install react-markdown to see this example: ",(0,Me.jsx)("code",{children:"npm install react-markdown remark-gfm rehype-highlight"})]})})}function _t(){let e=Y[2];return(0,Me.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4",children:(0,Me.jsx)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:"PayloadCMS RichText renderer is already available via @payloadcms/richtext-lexical dependency"})})}0&&(module.exports={DocumentPreviewExample,DocumentPreviewWithPayloadRichText,DocumentPreviewWithReactMarkdown,customRenderers,sampleDocuments});
35
+ MDX allows you to embed interactive React components directly in markdown.`,tags:["mdx","react"],createdAt:new Date}];function Ut(){return(0,Ke.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:ne.map(e=>(0,Ke.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,Ke.jsx)(Ye,{document:e,renderers:et,editable:!1})},e.id))})}function Ht(){let e=ne[0];return(0,Ke.jsx)("div",{className:"bg-yellow-50 dark:bg-yellow-950/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:(0,Ke.jsxs)("p",{className:"text-yellow-800 dark:text-yellow-200 text-sm",children:["Install react-markdown to see this example: ",(0,Ke.jsx)("code",{children:"npm install react-markdown remark-gfm rehype-highlight"})]})})}function Ot(){let e=ne[2];return(0,Ke.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4",children:(0,Ke.jsx)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:"PayloadCMS RichText renderer is already available via @payloadcms/richtext-lexical dependency"})})}0&&(module.exports={DocumentPreviewExample,DocumentPreviewWithPayloadRichText,DocumentPreviewWithReactMarkdown,customRenderers,sampleDocuments});
@@ -1,4 +1,4 @@
1
- import{a as o}from"../../chunk-RHR3YOLG.mjs";import"../../chunk-AREQGH47.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";var n={markdown:t=>e("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:e("div",{dangerouslySetInnerHTML:{__html:t.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}})}),text:t=>e("pre",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed bg-slate-50 dark:bg-slate-900 p-4 rounded-lg",children:t}),richtext:t=>r("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[e("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:r("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[e("strong",{children:"Custom RichText Renderer:"})," Implement PayloadCMS integration here"]})}),e("pre",{className:"text-sm bg-slate-50 dark:bg-slate-900 p-4 rounded",children:t})]}),mdx:t=>r("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[e("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:r("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[e("strong",{children:"Custom MDX Renderer:"})," Implement @mdx-js/react integration here"]})}),e("div",{dangerouslySetInnerHTML:{__html:t.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>")}})]})},a=[{id:"1",title:"Markdown Documentation",description:"A sample markdown document with formatting",format:"markdown",content:`# Welcome to Markdown
1
+ import{a as o}from"../../chunk-RZELSUQT.mjs";import"../../chunk-ONNK2NEI.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";var n={markdown:t=>e("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:e("div",{dangerouslySetInnerHTML:{__html:t.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}})}),text:t=>e("pre",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed bg-slate-50 dark:bg-slate-900 p-4 rounded-lg",children:t}),richtext:t=>r("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[e("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:r("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[e("strong",{children:"Custom RichText Renderer:"})," Implement PayloadCMS integration here"]})}),e("pre",{className:"text-sm bg-slate-50 dark:bg-slate-900 p-4 rounded",children:t})]}),mdx:t=>r("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[e("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:r("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[e("strong",{children:"Custom MDX Renderer:"})," Implement @mdx-js/react integration here"]})}),e("div",{dangerouslySetInnerHTML:{__html:t.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>")}})]})},a=[{id:"1",title:"Markdown Documentation",description:"A sample markdown document with formatting",format:"markdown",content:`# Welcome to Markdown
2
2
 
3
3
  This is a **bold** statement and this is *italic*.
4
4