cortex-react-components 2.22.4 → 2.23.1

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 (134) hide show
  1. package/dist/{chunk-KBEXWUKI.mjs → chunk-5NIEZE7A.mjs} +1 -1
  2. package/dist/{chunk-SCBDVNHG.mjs → chunk-AF3FLXBA.mjs} +1 -1
  3. package/dist/{chunk-CGR5NBBF.mjs → chunk-AHMDJQZI.mjs} +1 -1
  4. package/dist/{chunk-XX4GSGRP.mjs → chunk-AQQCH7Z2.mjs} +1 -1
  5. package/dist/{chunk-TL2RQFU5.mjs → chunk-B7AXSCTN.mjs} +1 -1
  6. package/dist/{chunk-RIZ2ODJL.mjs → chunk-GZ7FGBTR.mjs} +1 -1
  7. package/dist/{chunk-CSZCPO6D.mjs → chunk-IAFKJKBN.mjs} +1 -1
  8. package/dist/{chunk-GPFPTU7U.mjs → chunk-INBT5E6T.mjs} +1 -1
  9. package/dist/{chunk-2W4GQ3FI.mjs → chunk-JCWFPKF3.mjs} +1 -1
  10. package/dist/chunk-JTMIQ7MK.mjs +4 -0
  11. package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
  12. package/dist/{chunk-75WE6ZXB.mjs → chunk-LAQ3QAUW.mjs} +1 -1
  13. package/dist/chunk-LEUI66J6.mjs +1 -0
  14. package/dist/{chunk-5FWH5YVM.mjs → chunk-LHO4WFYP.mjs} +1 -1
  15. package/dist/{chunk-S7MFNEEY.mjs → chunk-OWC4BAX6.mjs} +1 -1
  16. package/dist/{chunk-MX3JKY3V.mjs → chunk-P7S6XFU4.mjs} +1 -1
  17. package/dist/{chunk-D7VHHXGM.mjs → chunk-PZFYJ5FS.mjs} +1 -1
  18. package/dist/{chunk-F2MJXGRT.mjs → chunk-RS4VD3ML.mjs} +1 -1
  19. package/dist/chunk-TSFX33PR.mjs +4 -0
  20. package/dist/{chunk-UTJZH3X5.mjs → chunk-W4OD5UUE.mjs} +1 -1
  21. package/dist/chunk-WLI2YTOQ.mjs +1 -0
  22. package/dist/chunk-XJKRA2AE.mjs +4 -0
  23. package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  24. package/dist/components/Blocks/Banner.mjs +1 -1
  25. package/dist/components/Blocks/CallToAction.mjs +1 -1
  26. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  27. package/dist/components/Blocks/Content.mjs +1 -1
  28. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  29. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  30. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  31. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  32. package/dist/components/Blocks/index.mjs +1 -1
  33. package/dist/components/CRM/index.mjs +1 -1
  34. package/dist/components/Cards/ContentCard.mjs +1 -1
  35. package/dist/components/Cards/FeatureCard.mjs +1 -1
  36. package/dist/components/Cards/index.mjs +1 -1
  37. package/dist/components/Chat/ChatInterface.mjs +1 -1
  38. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  39. package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
  40. package/dist/components/Chat/PartTypes/index.mjs +1 -1
  41. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  42. package/dist/components/Chat/demo-tests.mjs +1 -1
  43. package/dist/components/Chat/demo.mjs +1 -1
  44. package/dist/components/Chat/example-usage.mjs +1 -1
  45. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  46. package/dist/components/Chat/index.mjs +1 -1
  47. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  48. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  49. package/dist/components/DigitalColleagues/index.mjs +1 -1
  50. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  51. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  52. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  53. package/dist/components/Foundary/Knowledge/manage-team-context.css +1 -0
  54. package/dist/components/Foundary/Knowledge/manage-team-context.d.ts +11 -0
  55. package/dist/components/Foundary/Knowledge/manage-team-context.js +4 -0
  56. package/dist/components/Foundary/Knowledge/manage-team-context.mjs +1 -0
  57. package/dist/components/Foundary/MainPage.mjs +1 -1
  58. package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
  59. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  60. package/dist/components/Foundary/RichText/index.js +1 -1
  61. package/dist/components/Foundary/RichText/index.mjs +1 -1
  62. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.js +1 -1
  63. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  64. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  65. package/dist/components/Foundary/Views/KnowledgeView.d.ts +4 -2
  66. package/dist/components/Foundary/Views/KnowledgeView.js +1 -1
  67. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  68. package/dist/components/Foundary/Views/index.js +1 -1
  69. package/dist/components/Foundary/Views/index.mjs +1 -1
  70. package/dist/components/Foundary/document-edit.d.ts +1 -1
  71. package/dist/components/Foundary/document-edit.js +1 -1
  72. package/dist/components/Foundary/document-edit.mjs +1 -1
  73. package/dist/components/Foundary/document-preview-examples.js +4 -4
  74. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  75. package/dist/components/Foundary/document-preview.js +1 -1
  76. package/dist/components/Foundary/document-preview.mjs +1 -1
  77. package/dist/components/Foundary/index.js +1 -1
  78. package/dist/components/Foundary/index.mjs +1 -1
  79. package/dist/components/Foundary/knowledge-browser.js +1 -1
  80. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  81. package/dist/components/HeaderFooter/Header.mjs +1 -1
  82. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  83. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  84. package/dist/components/HeaderFooter/index.mjs +1 -1
  85. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  86. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  87. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  88. package/dist/components/Heros/PostHero/index.mjs +1 -1
  89. package/dist/components/Heros/RenderHero.mjs +1 -1
  90. package/dist/components/Heros/index.mjs +1 -1
  91. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  92. package/dist/components/Layouts/Print.mjs +1 -1
  93. package/dist/components/Layouts/SlideShow.mjs +1 -1
  94. package/dist/components/Layouts/index.mjs +1 -1
  95. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  96. package/dist/components/Menus/SidebarRight.mjs +1 -1
  97. package/dist/components/Menus/index.mjs +1 -1
  98. package/dist/components/Payload/RichText/index.mjs +1 -1
  99. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  100. package/dist/components/Payload/index.mjs +1 -1
  101. package/dist/components/index.js +20 -20
  102. package/dist/components/index.mjs +1 -1
  103. package/dist/components/ui/index.mjs +1 -1
  104. package/dist/components/ui/sidebar.mjs +1 -1
  105. package/dist/globals.css +1 -1
  106. package/dist/index.js +30 -30
  107. package/dist/index.mjs +1 -1
  108. package/dist/metafile-cjs.json +1 -1
  109. package/dist/metafile-esm.json +1 -1
  110. package/dist/pages/Blog.mjs +1 -1
  111. package/dist/pages/Documentation.mjs +1 -1
  112. package/dist/pages/IndexPage.mjs +1 -1
  113. package/dist/pages/Intranet.mjs +1 -1
  114. package/dist/pages/LandingPage.mjs +1 -1
  115. package/dist/pages/Page.mjs +1 -1
  116. package/dist/pages/Publish.mjs +1 -1
  117. package/dist/pages/Website.mjs +1 -1
  118. package/dist/sections/AboutSection.mjs +1 -1
  119. package/dist/sections/BlogDetail.mjs +1 -1
  120. package/dist/sections/BlogList.mjs +1 -1
  121. package/dist/sections/BlogListSection.mjs +1 -1
  122. package/dist/sections/ContactSection.mjs +1 -1
  123. package/dist/sections/PageSections.mjs +1 -1
  124. package/dist/sections/PricingSection.mjs +1 -1
  125. package/dist/sections/ServiceDetail.mjs +1 -1
  126. package/dist/sections/ServiceDetailSection.mjs +1 -1
  127. package/dist/sections/ServiceSection.mjs +1 -1
  128. package/dist/sections/index.mjs +1 -1
  129. package/package.json +1 -1
  130. package/dist/chunk-HMZKODQJ.mjs +0 -4
  131. package/dist/chunk-NIGA3VKZ.mjs +0 -4
  132. package/dist/chunk-U2OXF7PJ.mjs +0 -1
  133. package/dist/chunk-UOA5RYVR.mjs +0 -1
  134. package/dist/chunk-YLEBXRJS.mjs +0 -4
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../../chunk-CSZCPO6D.mjs";import"../../../chunk-GPFPTU7U.mjs";import"../../../chunk-YLEBXRJS.mjs";import"../../../chunk-I6XKBCH4.mjs";import"../../../chunk-U2OXF7PJ.mjs";import"../../../chunk-GAU24H4A.mjs";import"../../../chunk-NDZ26EG6.mjs";import"../../../chunk-CRAFZGCI.mjs";import"../../../chunk-M2REXGQW.mjs";import"../../../chunk-RIZ2ODJL.mjs";import"../../../chunk-I4GYQZGM.mjs";import"../../../chunk-HB57GPGK.mjs";import"../../../chunk-KKW3FINI.mjs";import"../../../chunk-5HT2KC5I.mjs";import"../../../chunk-FSCDCSVK.mjs";import"../../../chunk-NIGA3VKZ.mjs";import"../../../chunk-HMZKODQJ.mjs";import"../../../chunk-D7VHHXGM.mjs";import"../../../chunk-UOA5RYVR.mjs";import"../../../chunk-L2UJOICL.mjs";import"../../../chunk-T3F3RQIC.mjs";import"../../../chunk-UP67R64J.mjs";import"../../../chunk-6QERRKM4.mjs";import"../../../chunk-VSU7LYXZ.mjs";import"../../../chunk-RKS7CWAP.mjs";import"../../../chunk-BZEGLKRZ.mjs";import"../../../chunk-K7N3FRGH.mjs";import"../../../chunk-IPRG56MW.mjs";import"../../../chunk-HFEN3KJC.mjs";import"../../../chunk-R4SE63GR.mjs";import"../../../chunk-KPTGYVDM.mjs";import"../../../chunk-5RTGHMF3.mjs";import"../../../chunk-JXQRVEQB.mjs";import"../../../chunk-DXRAJQMA.mjs";import"../../../chunk-Z22NSJMF.mjs";import"../../../chunk-Y7H3EUBR.mjs";import"../../../chunk-4WA47ZQA.mjs";import"../../../chunk-NPVUICIF.mjs";import"../../../chunk-DFIXTV2M.mjs";import"../../../chunk-VDN4LQSS.mjs";import"../../../chunk-FGEFYI5E.mjs";import"../../../chunk-MU5WPW4N.mjs";import"../../../chunk-AZKOVKSK.mjs";import"../../../chunk-U5PBLRRV.mjs";import"../../../chunk-Q5Q3DJWU.mjs";import"../../../chunk-4QRKVSTE.mjs";import"../../../chunk-E4TE4NV6.mjs";import"../../../chunk-JFFTEK6Z.mjs";import"../../../chunk-JHNVX4UB.mjs";import"../../../chunk-7BXIU4ZM.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-INCYANPB.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-76M7JE4D.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-OYZDAMCS.mjs";import"../../../chunk-5NRGSTPV.mjs";import"../../../chunk-O5P35LEY.mjs";import"../../../chunk-7GSXNSLD.mjs";import"../../../chunk-4UIARERB.mjs";import"../../../chunk-D4IMQTVU.mjs";import"../../../chunk-YNCJATT7.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-KY7WQYN4.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-QTW33JYG.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-FLHDNCNY.mjs";import"../../../chunk-FRWX5YES.mjs";import"../../../chunk-CV7PH2KH.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as default};
2
+ "use strict";import{a}from"../../../chunk-IAFKJKBN.mjs";import"../../../chunk-TSFX33PR.mjs";import"../../../chunk-INBT5E6T.mjs";import"../../../chunk-I6XKBCH4.mjs";import"../../../chunk-WLI2YTOQ.mjs";import"../../../chunk-GAU24H4A.mjs";import"../../../chunk-M2REXGQW.mjs";import"../../../chunk-GZ7FGBTR.mjs";import"../../../chunk-I4GYQZGM.mjs";import"../../../chunk-HB57GPGK.mjs";import"../../../chunk-KKW3FINI.mjs";import"../../../chunk-5HT2KC5I.mjs";import"../../../chunk-FSCDCSVK.mjs";import"../../../chunk-XJKRA2AE.mjs";import"../../../chunk-JTMIQ7MK.mjs";import"../../../chunk-PZFYJ5FS.mjs";import"../../../chunk-LEUI66J6.mjs";import"../../../chunk-HFEN3KJC.mjs";import"../../../chunk-L2UJOICL.mjs";import"../../../chunk-T3F3RQIC.mjs";import"../../../chunk-UP67R64J.mjs";import"../../../chunk-6QERRKM4.mjs";import"../../../chunk-VSU7LYXZ.mjs";import"../../../chunk-RKS7CWAP.mjs";import"../../../chunk-BZEGLKRZ.mjs";import"../../../chunk-K7N3FRGH.mjs";import"../../../chunk-IPRG56MW.mjs";import"../../../chunk-NDZ26EG6.mjs";import"../../../chunk-CRAFZGCI.mjs";import"../../../chunk-R4SE63GR.mjs";import"../../../chunk-KPTGYVDM.mjs";import"../../../chunk-5RTGHMF3.mjs";import"../../../chunk-JXQRVEQB.mjs";import"../../../chunk-DXRAJQMA.mjs";import"../../../chunk-Z22NSJMF.mjs";import"../../../chunk-Y7H3EUBR.mjs";import"../../../chunk-4WA47ZQA.mjs";import"../../../chunk-NPVUICIF.mjs";import"../../../chunk-DFIXTV2M.mjs";import"../../../chunk-VDN4LQSS.mjs";import"../../../chunk-FGEFYI5E.mjs";import"../../../chunk-MU5WPW4N.mjs";import"../../../chunk-AZKOVKSK.mjs";import"../../../chunk-Q5Q3DJWU.mjs";import"../../../chunk-U5PBLRRV.mjs";import"../../../chunk-4QRKVSTE.mjs";import"../../../chunk-E4TE4NV6.mjs";import"../../../chunk-JFFTEK6Z.mjs";import"../../../chunk-JHNVX4UB.mjs";import"../../../chunk-7BXIU4ZM.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-INCYANPB.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-76M7JE4D.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-OYZDAMCS.mjs";import"../../../chunk-5NRGSTPV.mjs";import"../../../chunk-ZFUP5NVF.mjs";import"../../../chunk-4UIARERB.mjs";import"../../../chunk-D4IMQTVU.mjs";import"../../../chunk-7GSXNSLD.mjs";import"../../../chunk-YNCJATT7.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-KY7WQYN4.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-QTW33JYG.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-FLHDNCNY.mjs";import"../../../chunk-FRWX5YES.mjs";import"../../../chunk-CV7PH2KH.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as default};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- "use strict";"use client";var Qt=Object.create;var ye=Object.defineProperty;var eo=Object.getOwnPropertyDescriptor;var to=Object.getOwnPropertyNames;var oo=Object.getPrototypeOf,ro=Object.prototype.hasOwnProperty;var no=(e,t)=>{for(var o in t)ye(e,o,{get:t[o],enumerable:!0})},Ye=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of to(t))!ro.call(e,n)&&n!==o&&ye(e,n,{get:()=>t[n],enumerable:!(r=eo(t,n))||r.enumerable});return e};var K=(e,t,o)=>(o=e!=null?Qt(oo(e)):{},Ye(t||!e||!e.__esModule?ye(o,"default",{value:e,enumerable:!0}):o,e)),io=e=>Ye(ye({},"__esModule",{value:!0}),e);var mr={};no(mr,{default:()=>ur});module.exports=io(mr);var Ft=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),Gt=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Wt=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),Zt=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),jt=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),Kt=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),Xt=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Ie=require("@payloadcms/richtext-lexical/lexical/list"),Jt=require("@payloadcms/richtext-lexical/lexical/rich-text"),qt=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin"),Je=require("react");var Bt=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),we=require("@payloadcms/richtext-lexical/lexical/utils"),p=require("@payloadcms/richtext-lexical/lexical"),Ke=require("@payloadcms/richtext-lexical/lexical/selection"),w=require("lucide-react");var lt=K(require("react"));var st=require("clsx");var Ee="-",ao=e=>{let t=lo(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{let s=c.split(Ee);return s[0]===""&&s.length!==1&&s.shift(),tt(s,t)||so(c)},getConflictingClassGroupIds:(c,s)=>{let g=o[c]||[];return s&&r[c]?[...g,...r[c]]:g}}},tt=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),n=r?tt(e.slice(1),r):void 0;if(n)return n;if(t.validators.length===0)return;let i=e.join(Ee);return t.validators.find(({validator:c})=>c(i))?.classGroupId},Qe=/^\[(.+)\]$/,so=e=>{if(Qe.test(e)){let t=Qe.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},lo=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return po(Object.entries(e.classGroups),o).forEach(([i,c])=>{He(c,r,i,t)}),r},He=(e,t,o,r)=>{e.forEach(n=>{if(typeof n=="string"){let i=n===""?t:et(t,n);i.classGroupId=o;return}if(typeof n=="function"){if(co(n)){He(n(r),t,o,r);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([i,c])=>{He(c,et(t,i),o,r)})})},et=(e,t)=>{let o=e;return t.split(Ee).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},co=e=>e.isThemeGetter,po=(e,t)=>t?e.map(([o,r])=>{let n=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([c,s])=>[t+c,s])):i);return[o,n]}):e,uo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,n=(i,c)=>{o.set(i,c),t++,t>e&&(t=0,r=o,o=new Map)};return{get(i){let c=o.get(i);if(c!==void 0)return c;if((c=r.get(i))!==void 0)return n(i,c),c},set(i,c){o.has(i)?o.set(i,c):n(i,c)}}},ot="!",mo=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,n=t[0],i=t.length,c=s=>{let g=[],M=0,R=0,E;for(let u=0;u<s.length;u++){let C=s[u];if(M===0){if(C===n&&(r||s.slice(u,u+i)===t)){g.push(s.slice(R,u)),R=u+i;continue}if(C==="/"){E=u;continue}}C==="["?M++:C==="]"&&M--}let L=g.length===0?s:s.substring(R),V=L.startsWith(ot),A=V?L.substring(1):L,y=E&&E>R?E-R:void 0;return{modifiers:g,hasImportantModifier:V,baseClassName:A,maybePostfixModifierPosition:y}};return o?s=>o({className:s,parseClassName:c}):c},fo=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},go=e=>({cache:uo(e.cacheSize),parseClassName:mo(e),...ao(e)}),bo=/\s+/,ho=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n}=t,i=[],c=e.trim().split(bo),s="";for(let g=c.length-1;g>=0;g-=1){let M=c[g],{modifiers:R,hasImportantModifier:E,baseClassName:L,maybePostfixModifierPosition:V}=o(M),A=!!V,y=r(A?L.substring(0,V):L);if(!y){if(!A){s=M+(s.length>0?" "+s:s);continue}if(y=r(L),!y){s=M+(s.length>0?" "+s:s);continue}A=!1}let u=fo(R).join(":"),C=E?u+ot:u,N=C+y;if(i.includes(N))continue;i.push(N);let $=n(y,A);for(let f=0;f<$.length;++f){let O=$[f];i.push(C+O)}s=M+(s.length>0?" "+s:s)}return s};function vo(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=rt(t))&&(r&&(r+=" "),r+=o);return r}var rt=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=rt(e[r]))&&(o&&(o+=" "),o+=t);return o};function xo(e,...t){let o,r,n,i=c;function c(g){let M=t.reduce((R,E)=>E(R),e());return o=go(M),r=o.cache.get,n=o.cache.set,i=s,s(g)}function s(g){let M=r(g);if(M)return M;let R=ho(g,o);return n(g,R),R}return function(){return i(vo.apply(null,arguments))}}var v=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},nt=/^\[(?:([ct-ct-]+):)?(.+)\]$/i,wo=/^\d+\/\d+$/,yo=new Set(["px","full","screen"]),Co=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Do=/\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$/,Mo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ro=/^(inset_)?-?((\d+)?\.?(\d+)[ct-ct]+|0)_-?((\d+)?\.?(\d+)[ct-ct]+|0)/,No=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,X=e=>ae(e)||yo.has(e)||wo.test(e),Y=e=>se(e,"length",Lo),ae=e=>!!e&&!Number.isNaN(Number(e)),Se=e=>se(e,"number",ae),pe=e=>!!e&&Number.isInteger(Number(e)),Po=e=>e.endsWith("%")&&ae(e.slice(0,-1)),d=e=>nt.test(e),Q=e=>Co.test(e),To=new Set(["length","size","percentage"]),ko=e=>se(e,To,it),Io=e=>se(e,"position",it),So=new Set(["image","url"]),Ho=e=>se(e,So,Vo),Eo=e=>se(e,"",Ao),ue=()=>!0,se=(e,t,o)=>{let r=nt.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},Lo=e=>Do.test(e)&&!Mo.test(e),it=()=>!1,Ao=e=>Ro.test(e),Vo=e=>No.test(e);var Oo=()=>{let e=v("colors"),t=v("spacing"),o=v("blur"),r=v("brightness"),n=v("borderColor"),i=v("borderRadius"),c=v("borderSpacing"),s=v("borderWidth"),g=v("contrast"),M=v("grayscale"),R=v("hueRotate"),E=v("invert"),L=v("gap"),V=v("gradientColorStops"),A=v("gradientColorStopPositions"),y=v("inset"),u=v("margin"),C=v("opacity"),N=v("padding"),$=v("saturate"),f=v("scale"),O=v("sepia"),q=v("skew"),te=v("space"),F=v("translate"),oe=()=>["auto","contain","none"],de=()=>["auto","hidden","clip","visible","scroll"],re=()=>["auto",d,t],h=()=>[d,t],ne=()=>["",X,Y],ie=()=>["auto",ae,d],l=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],T=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",d],qe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[ae,d];return{cacheSize:500,separator:":",theme:{colors:[ue],spacing:[X,Y],blur:["none","",Q,d],brightness:j(),borderColor:[e],borderRadius:["none","","full",Q,d],borderSpacing:h(),borderWidth:ne(),contrast:j(),grayscale:_(),hueRotate:j(),invert:_(),gap:h(),gradientColorStops:[e],gradientColorStopPositions:[Po,Y],inset:re(),margin:re(),opacity:j(),padding:h(),saturate:j(),scale:j(),sepia:_(),skew:j(),space:h(),translate:h()},classGroups:{aspect:[{aspect:["auto","square","video",d]}],container:["container"],columns:[{columns:[Q]}],"break-after":[{"break-after":qe()}],"break-before":[{"break-before":qe()}],"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:[...l(),d]}],overflow:[{overflow:de()}],"overflow-p":[{"overflow-p":de()}],"overflow-y":[{"overflow-y":de()}],overscroll:[{overscroll:oe()}],"overscroll-p":[{"overscroll-p":oe()}],"overscroll-y":[{"overscroll-y":oe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-p":[{"inset-p":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],ct:[{ct:["auto",pe,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:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",pe,d]}],"grid-cols":[{"grid-cols":[ue]}],"col-start-end":[{col:["auto",{span:["full",pe,d]},d]}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":[ue]}],"row-start-end":[{row:["auto",{span:[pe,d]},d]}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"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:[L]}],"gap-p":[{"gap-p":[L]}],"gap-y":[{"gap-y":[L]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[N]}],px:[{px:[N]}],py:[{py:[N]}],ps:[{ps:[N]}],pe:[{pe:[N]}],pt:[{pt:[N]}],pr:[{pr:[N]}],pb:[{pb:[N]}],pl:[{pl:[N]}],m:[{m:[u]}],mx:[{mx:[u]}],my:[{my:[u]}],ms:[{ms:[u]}],me:[{me:[u]}],ct:[{ct:[u]}],mr:[{mr:[u]}],mb:[{mb:[u]}],ml:[{ml:[u]}],"space-p":[{"space-p":[te]}],"space-p-reverse":["space-p-reverse"],"space-y":[{"space-y":[te]}],"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:[Q]},Q]}],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",Q,Y]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Se]}],"font-family":[{font:[ue]}],"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",ae,Se]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",X,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":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",X,Y]}],"underline-offset":[{"underline-offset":["auto",X,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:h()}],"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":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...l(),Io]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","p","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ko]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ho]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[V]}],"gradient-via":[{via:[V]}],"gradient-to":[{to:[V]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-Je":[{"rounded-Je":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-p":[{"border-p":[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":[C]}],"border-style":[{border:[...D(),"hidden"]}],"divide-p":[{"divide-p":[s]}],"divide-p-reverse":["divide-p-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:D()}],"border-color":[{border:[n]}],"border-color-p":[{"border-p":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[X,d]}],"outline-w":[{outline:[X,Y]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[X,Y]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Q,Eo]}],"shadow-color":[{shadow:[ue]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...T(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":T()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",Q,d]}],grayscale:[{grayscale:[M]}],"hue-rotate":[{"hue-rotate":[R]}],invert:[{invert:[E]}],saturate:[{saturate:[$]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[M]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[R]}],"backdrop-invert":[{"backdrop-invert":[E]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[$]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-p":[{"border-spacing-p":[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:j()}],ease:[{ease:["linear","in","out","in-out",d]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",d]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[f]}],"scale-p":[{"scale-p":[f]}],"scale-y":[{"scale-y":[f]}],rotate:[{rotate:[pe,d]}],"translate-p":[{"translate-p":[F]}],"translate-y":[{"translate-y":[F]}],"skew-p":[{"skew-p":[q]}],"skew-y":[{"skew-y":[q]}],"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","p",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-me":[{"scroll-me":h()}],"scroll-ct":[{"scroll-ct":h()}],"scroll-mr":[{"scroll-mr":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-pe":[{"scroll-pe":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-pr":[{"scroll-pr":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","p","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-p":[{"touch-pan":["p","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:[X,Y,Se]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-p","overflow-y"],overscroll:["overscroll-p","overscroll-y"],inset:["inset-p","inset-y","start","end","top","right","bottom","left"],"inset-p":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-p","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","ct","mr","mb","ml"],mx:["mr","ml"],my:["ct","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-Je","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-Je"],"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-p","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-p":["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-p":["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-ct","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-ct","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-p","touch-y","touch-pz"],"touch-p":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var at=xo(Oo);function b(...e){return at((0,st.clsx)(e))}var ct=require("react/jsx-runtime"),Ce=lt.forwardRef(({className:e,type:t,...o},r)=>(0,ct.jsx)("input",{type:t,className:b("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...o}));Ce.displayName="Input";var dt=require("@radix-ui/react-slot"),pt=require("class-variance-authority"),ut=K(require("react")),_o=(0,pt.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"}}}),Le=ut.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...n},i)=>(0,ct.jsx)(e?dt.Slot:"button",{className:b(_o({className:t,size:o,variant:r})),ref:i,...n}));Le.displayName="Button";var me=K(require("react")),k=K(require("@radix-ui/react-dialog"));var gt=k.Root;var zo=k.Portal;var bt=me.forwardRef(({className:e,...t},o)=>(0,ct.jsx)(k.Overlay,{ref:o,className:b("fixed inset-0 ct-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));bt.displayName=k.Overlay.displayName;var Ae=me.forwardRef(({className:e,children:t,...o},r)=>(0,ct.jsxs)(zo,{children:[(0,ct.jsx)(bt,{}),(0,ct.jsxs)(k.Content,{ref:r,className:b("fixed left-[50%] top-[50%] ct-50 grid w-full max-w-lg translate-p-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,ct.jsxs)(k.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,ct.jsx)(w.X,{className:"h-4 w-4"}),(0,ct.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ae.displayName=k.Content.displayName;var Ve=({className:e,...t})=>(0,ct.jsx)("div",{className:b("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ve.displayName="DialogHeader";var Uo=({className:e,...t})=>(0,ct.jsx)("div",{className:b("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-p-2",e),...t});Uo.displayName="DialogFooter";var Oe=me.forwardRef(({className:e,...t},o)=>(0,ct.jsx)(k.Title,{ref:o,className:b("text-lg font-semibold leading-none tracking-tight",e),...t}));Oe.displayName=k.Title.displayName;var Bo=me.forwardRef(({className:e,...t},o)=>(0,ct.jsx)(k.Description,{ref:o,className:b("text-sm text-muted-foreground",e),...t}));Bo.displayName=k.Description.displayName;var Pt=require("@radix-ui/react-dialog"),Ne=require("@payloadcms/richtext-lexical/client");var ze=K(require("bson-objectid"));var vt=require("@payloadcms/ui");var ht=K(require("react")),G=K(require("@radix-ui/react-tooltip"));var De=G.Provider,Me=G.Root,Re=G.Trigger,fe=ht.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,ct.jsx)(G.Portal,{children:(0,ct.jsx)(G.Content,{ref:r,sideOffset:t,className:b("ct-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));fe.displayName=G.Content.displayName;var $o=e=>{let{data:{relationTo:t,value:o},nodeKey:r}=e,[n]=(0,Bt.useLexicalComposerContext)(),[i,c]=(0,Je.useState)(""),[s,g]=(0,Je.useState)(""),[M,R]=(0,Je.useState)(""),E=async u=>{console.log("fetchMedia",u)};(0,Je.useEffect)(()=>{typeof o=="string"?o.length===24?E(o):(c(o||""),R(y(A())),g(V()||"")):typeof o=="object"&&(c(`${process.env.NEXT_PUBLIC_API_URL}${o.url}`||""),R(y(o.filesize)),g(o.mimeType?.split("/")[1]||""))},[]);let L=(0,Je.useCallback)(()=>{n.update(()=>{(0,p.$getNodeByKey)(r)?.remove()})},[n,r]),V=()=>{let u=e.data.value;return typeof u=="string"?u.split(";base64")[0]?.split("image/")[1]:""},A=()=>{let u=e.data.value;if(typeof u=="string"){let C=u.split(",")[1]?.length||0;return 4*Math.ceil(C/3)*.5624896334383812/1e3}return 0};function y(u){if(u>=1e6){let N=u/1e6;return`${N>=10?Math.round(N).toString():N.toFixed(1)} MB`}return`${Math.floor(u/1e3)} KB`}return(0,ct.jsx)("div",{className:"my-2",contentEditable:!1,children:(0,ct.jsxs)("div",{className:"border border-slate-800 rounded-xl overflow-clip w-60 flex flex-col gap-2 bg-[#222222]",children:[(0,ct.jsxs)("div",{className:"flex gap-2 border-b border-b-slate-100/10",children:[(0,ct.jsx)("div",{className:"flex-1",children:e.data.value?(0,ct.jsx)("img",{className:"object-cover m-0 w-full min-w-[115px] min-h-[105px]","data-lexical-upload-id":o,"data-lexical-upload-relation-to":t,src:i}):(0,ct.jsx)(vt.File,{})}),(0,ct.jsx)(De,{children:(0,ct.jsxs)(Me,{children:[(0,ct.jsxs)(Re,{className:"flex-1 flex justify-center items-center text-[#b5b5b5]",children:[(0,ct.jsx)("span",{className:"font-medium text-sm",children:"Media"}),(0,ct.jsx)("button",{onClick:u=>{u.preventDefault(),L()},className:"flex-1 flex justify-center items-center",children:(0,ct.jsx)(w.X,{width:24,height:24,strokeWidth:1})})]}),(0,ct.jsx)(fe,{children:(0,ct.jsx)("span",{children:"Remove image"})})]})})]}),(0,ct.jsxs)("div",{className:"flex items-center justify-center gap-4 py-3 flex-1 text-xs font-bold",children:[(0,ct.jsx)("span",{className:"",children:s?.toLocaleUpperCase()}),(0,ct.jsx)("span",{children:M})]})]})})},Ct=$o;function Fo(e){if(e.hasAttribute("data-lexical-upload-relation-to")&&e.hasAttribute("data-lexical-upload-id")){let o=e.getAttribute("data-lexical-upload-id");if(o)return{node:le({fields:{},relationTo:"media",value:o})}}return e.src.startsWith("file:///"),null}var ge=class extends Ne.UploadNode{static importDOM(){return{img:()=>({conversion:Fo,priority:0})}}static importJSON(t){t.version===1&&t?.value?.id&&(t.value=t.value.id),t.version===2&&!t?.id&&(t.id=new ze.default().toHexString(),t.version=3);let o={id:t.id??new ze.default().toHexString(),fields:t.fields,relationTo:"media",value:t.value},r=le(o);return r.setFormat?.(t.format),r}decorate(){return(0,ct.jsx)(Ct,{data:this.__data,nodeKey:this.getKey()})}};function le(e){return new ge({data:e})}var Go=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Wo=e=>Go?(e||window).getSelection():null,Gr=(0,p.createCommand)("INSERT_UPLOAD_WITH_DRAWER_COMMAND"),Ue=(0,p.createCommand)("INSERT_UPLOAD_COMMAND");function Tt({activeEditor:e,onClose:t,isOpen:o=!1}){let r=(0,Je.useRef)(!1),[n,i]=(0,Je.useState)(!0),[c,s]=(0,Je.useState)(""),[g,M]=(0,Je.useState)(""),[R,E]=(0,Je.useState)(!1),[L,V]=(0,Je.useState)("left"),A=c==="",y=f=>{E(f.target.checked)},u=f=>{V(f.target.value)},C=f=>{let O=new FileReader;O.onload=function(){return typeof O.result=="string"&&s(O.result),""},f!==null&&f[0]&&O.readAsDataURL(f[0])};(0,Je.useEffect)(()=>{r.current=!1;let f=O=>{r.current=O.altKey};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[e]),(0,Je.useEffect)(()=>{n||t()},[n]),(0,Je.useEffect)(()=>{i(o)},[o]);let N=({editor:f,relationTo:O,replaceNodeKey:q,value:te})=>{if(q)f.update(()=>{let F=(0,p.$getNodeByKey)(q);F&&F.replace(le({id:"",fields:{},relationTo:"media",value:te}))});else{let F=f.dispatchCommand(Ue,{fields:null,relationTo:"media",value:te})}},$=()=>{N({editor:e,relationTo:"media",replaceNodeKey:null,value:{altText:g,src:c,showCaption:R,position:L}.src}),i(!1),t()};return(0,ct.jsx)(gt,{open:n,onOpenChange:f=>i(f),children:(0,ct.jsxs)(Ae,{children:[(0,ct.jsxs)(Ve,{children:[(0,ct.jsx)(Oe,{children:"Upload Image"}),(0,ct.jsx)(Pt.DialogDescription,{children:"Description"})]}),(0,ct.jsxs)("div",{className:"",children:[(0,ct.jsx)("div",{style:{marginBottom:"1em"},children:(0,ct.jsx)(Ce,{type:"file",onChange:f=>C(f.target.files),accept:"image/*","data-test-id":"image-modal-file-upload"})}),(0,ct.jsx)("div",{style:{marginBottom:"1em"},children:(0,ct.jsx)(Ce,{"aria-label":"Alt Text",placeholder:"Descriptive alternative text",onChange:f=>M(f.currentTarget.value),value:g,"data-test-id":"image-modal-alt-text-input"})}),(0,ct.jsx)(Le,{"data-test-id":"image-modal-file-upload-btn",disabled:A,onClick:()=>$(),children:"Confirm"})]})]})})}function Be({captionsEnabled:e}){let[t]=(0,Bt.useLexicalComposerContext)();return(0,Je.useEffect)(()=>{if(!t.hasNodes([Ne.UploadNode]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return(0,we.mergeRegister)(t.registerCommand(p.DRAGSTART_COMMAND,o=>Zo(o),p.COMMAND_PRIORITY_HIGH),t.registerCommand(p.DRAGOVER_COMMAND,o=>jo(o),p.COMMAND_PRIORITY_LOW),t.registerCommand(p.DROP_COMMAND,o=>Ko(o,t),p.COMMAND_PRIORITY_HIGH))},[e,t]),null}function Zo(e){if(!$e())return!1;let o=e.dataTransfer;return o?(o.setData("text/plain","_"),!0):!1}function jo(e){return $e()?(kt(e)||e.preventDefault(),!0):!1}function Ko(e,t){let o=$e();if(!o)return!1;if(e.preventDefault(),kt(e)){let r=Xo(e);o.remove();let n=(0,p.$createRangeSelection)();r!=null&&n.applyDOMRange(r),(0,p.$setSelection)(n)}return!0}function $e(){let e=(0,p.$getSelection)();if(!(0,p.$isNodeSelection)(e))return null;let o=e.getNodes()[0];return(0,Ne.$isUploadNode)(o)?o:null}function kt(e){let t=e.target;return!!(t&&t instanceof HTMLElement&&!t.closest("code, span.editor-image")&&t.parentElement&&t.parentElement.closest("div.ContentEditable__root"))}function Xo(e){let t,o=e.target,r=o==null?null:o.nodeType===9?o.defaultView:o.ownerDocument.defaultView,n=Wo(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&n!==null)n.collapse(e.rangeParent,e.rangeOffset||0),t=n.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}var Jo=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z",fill:"currentColor"})}),It=Jo;var qo=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z",fill:"currentColor"})}),St=qo;var Yo=()=>(0,ct.jsxs)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("path",{d:"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",fill:"currentColor"}),(0,ct.jsx)("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),Ht=Yo;var Qo=()=>(0,ct.jsxs)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("path",{d:"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z",fill:"currentColor"}),(0,ct.jsx)("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),Et=Qo;var er=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z",fill:"currentColor"})}),Lt=er;var tr=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z",fill:"currentColor"})}),At=tr;var Vt=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",fill:"currentColor"})}),Ot=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z",fill:"currentColor"})}),_t=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z",fill:"currentColor"})}),zt=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z",fill:"currentColor"})}),Ut=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z",fill:"currentColor"})});var J=K(require("react")),m=K(require("@radix-ui/react-dropdown-menu")),ce=require("@radix-ui/react-icons");var Pe=m.Root,Te=m.Trigger;var or=J.forwardRef(({className:e,inset:t,children:o,...r},n)=>(0,ct.jsxs)(m.SubTrigger,{ref:n,className:b("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[o,(0,ct.jsx)(ce.ChevronRightIcon,{className:"ml-auto"})]}));or.displayName=m.SubTrigger.displayName;var rr=J.forwardRef(({className:e,...t},o)=>(0,ct.jsx)(m.SubContent,{ref:o,className:b("ct-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));rr.displayName=m.SubContent.displayName;var ve=J.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,ct.jsx)(m.Portal,{children:(0,ct.jsx)(m.Content,{ref:r,sideOffset:t,className:b("ct-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));ve.displayName=m.Content.displayName;var xe=J.forwardRef(({className:e,inset:t,...o},r)=>(0,ct.jsx)(m.Item,{ref:r,className:b("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));xe.displayName=m.Item.displayName;var nr=J.forwardRef(({className:e,children:t,checked:o,...r},n)=>(0,ct.jsxs)(m.CheckboxItem,{ref:n,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r,children:[(0,ct.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ct.jsx)(m.ItemIndicator,{children:(0,ct.jsx)(ce.CheckIcon,{className:"h-4 w-4"})})}),t]}));nr.displayName=m.CheckboxItem.displayName;var ir=J.forwardRef(({className:e,children:t,...o},r)=>(0,ct.jsxs)(m.RadioItem,{ref:r,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,ct.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ct.jsx)(m.ItemIndicator,{children:(0,ct.jsx)(ce.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));ir.displayName=m.RadioItem.displayName;var ar=J.forwardRef(({className:e,inset:t,...o},r)=>(0,ct.jsx)(m.Label,{ref:r,className:b("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));ar.displayName=m.Label.displayName;var sr=J.forwardRef(({className:e,...t},o)=>(0,ct.jsx)(m.Separator,{ref:o,className:b("-mx-1 my-1 h-px bg-muted",e),...t}));sr.displayName=m.Separator.displayName;var lr=({className:e,...t})=>(0,ct.jsx)("span",{className:b("ml-auto text-xs tracking-widest opacity-60",e),...t});lr.displayName="DropdownMenuShortcut";var je=1;function cr(){return(0,ct.jsx)("span",{className:"border border-[#222222]"})}function Xe(){let[e]=(0,Bt.useLexicalComposerContext)(),t=(0,Je.useRef)(null),[o,r]=(0,Je.useState)(!1),[n,i]=(0,Je.useState)(!1),[c,s]=(0,Je.useState)(!1),[g,M]=(0,Je.useState)(!1),[R,E]=(0,Je.useState)(!1),[L,V]=(0,Je.useState)(!1),[A,y]=(0,Je.useState)(!1),[u,C]=(0,Je.useState)(!1),[N,$]=(0,Je.useState)(!1),[f,O]=(0,Je.useState)("left"),[q,te]=(0,Je.useState)("p"),F=l=>{e.update(()=>{let D=(0,p.$getSelection)();(0,p.$isRangeSelection)(D)&&(l==="p"?(0,Ke.$setBlocksType)(D,()=>(0,p.$createParagraphNode)()):(0,Ke.$setBlocksType)(D,()=>(0,$t.$createHeadingNode)(l)))})},oe=(0,Je.useCallback)(()=>{let l=(0,p.$getSelection)();if((0,p.$isRangeSelection)(l)){s(l.hasFormat("bold")),M(l.hasFormat("italic")),E(l.hasFormat("underline")),V(l.hasFormat("strikethrough")),y(l.hasFormat("subscript")),C(l.hasFormat("superscript"));let D=l.anchor.getNode(),T=D;for(;T&&!(0,p.$isParagraphNode)(T)&&T!==(0,p.$getRoot)();){let _=T.getParent();_&&(T=_)}if(T){let _=T.getFormatType();O(_||"left")}let Z=D.getTopLevelElement()?.__tag;te(Z||"p")}},[]);(0,Je.useEffect)(()=>(0,we.mergeRegister)(e.registerUpdateListener(({editorState:l})=>{l.read(()=>{oe()})}),e.registerCommand(p.SELECTION_CHANGE_COMMAND,(l,D)=>(oe(),!1),je),e.registerCommand(p.CAN_UNDO_COMMAND,l=>(r(l),!1),je),e.registerCommand(p.CAN_REDO_COMMAND,l=>(i(l),!1),je),(0,we.mergeRegister)(e.registerCommand(Ue,l=>(e.update(()=>{let D=(0,p.$getSelection)()||(0,p.$getPreviousSelection)();if((0,p.$isRangeSelection)(D)){let T=le({id:l.id,fields:l.fields,relationTo:l.relationTo,value:l.value}),{focus:Z}=D,_=Z.getNode();(0,we.$insertNodeToNearestRoot)(T),(0,p.$isParagraphNode)(_)&&!_.__first&&_.remove()}}),!0),p.COMMAND_PRIORITY_EDITOR))),[e,oe]);let de=[[{label:"Undo",icon:(0,ct.jsx)(w.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(p.UNDO_COMMAND,void 0)},disabled:!o},{label:"Redo",icon:(0,ct.jsx)(w.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(p.UNDO_COMMAND,void 0)},disabled:!n}],[{label:"Bold",icon:(0,ct.jsx)(It,{}),onClick:()=>{e.dispatchCommand(p.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:c},{label:"Italic",icon:(0,ct.jsx)(St,{}),onClick:()=>{e.dispatchCommand(p.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:g},{label:"Underline",icon:(0,ct.jsx)(Ht,{}),onClick:()=>{e.dispatchCommand(p.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:R},{label:"Strikethrough",icon:(0,ct.jsx)(Et,{}),onClick:()=>{e.dispatchCommand(p.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:L},{label:"Subscript",icon:(0,ct.jsx)(Lt,{}),onClick:()=>{e.dispatchCommand(p.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:A},{label:"Superscript",icon:(0,ct.jsx)(At,{}),onClick:()=>{e.dispatchCommand(p.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:u}]],re=[{label:"Left Align",direction:"left",icon:(0,ct.jsx)(w.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(p.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,ct.jsx)(w.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(p.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,ct.jsx)(w.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(p.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,ct.jsx)(w.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(p.FORMAT_ELEMENT_COMMAND,"justify")}}],ne=[{label:"Normal Text",value:"p",icon:(0,ct.jsx)(Vt,{}),onClick:()=>F("p")},{label:"Heading 1",value:"h1",icon:(0,ct.jsx)(Ot,{}),onClick:()=>F("h1")},{label:"Heading 2",value:"h2",icon:(0,ct.jsx)(_t,{}),onClick:()=>F("h2")},{label:"Heading 3",value:"h3",icon:(0,ct.jsx)(zt,{}),onClick:()=>F("h3")},{label:"Heading 4",value:"h4",icon:(0,ct.jsx)(Ut,{}),onClick:()=>F("h4")},...[{label:"Unordered List",value:"ul",icon:(0,ct.jsx)(w.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ie.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,ct.jsx)(w.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ie.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],ie=[{label:"Insert Image",icon:(0,ct.jsx)(w.ImageUp,{width:15,height:15}),onClick:()=>{$(!0)},disabled:!1}];return(0,ct.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2",children:(0,ct.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[de.map((l,D)=>(0,ct.jsxs)(Je.Fragment,{children:[(0,ct.jsx)("div",{className:"flex items-center gap-2",children:l.map((T,Z)=>(0,ct.jsx)("div",{role:"button","aria-disabled":T.disabled||!1,onClick:T.onClick,className:b("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",T.active&&"bg-[#3c3c3c]"),"aria-label":T.label,children:(0,ct.jsx)(De,{children:(0,ct.jsxs)(Me,{children:[(0,ct.jsx)(Re,{className:"text-[#b5b5b5]",children:T.icon}),(0,ct.jsx)(fe,{children:(0,ct.jsx)("p",{children:T.label})})]})})},Z))}),(0,ct.jsx)(cr,{})]},`toolbar-option-${l.length}-${D}`)),(0,ct.jsxs)(Pe,{children:[(0,ct.jsxs)(Te,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[re.find(l=>l.direction===f)?.icon,re.find(l=>l.direction===f)?.label,(0,ct.jsx)(w.ChevronDown,{width:15,height:15})]}),(0,ct.jsx)(ve,{className:"bg-black hover:bg-black",children:re.map((l,D)=>(0,ct.jsxs)(xe,{onClick:l.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,ct.jsx)("span",{children:l.icon}),(0,ct.jsx)("span",{children:l.label})]},`${l.label}-${D}`))})]}),(0,ct.jsxs)(Pe,{children:[(0,ct.jsxs)(Te,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[ne.find(l=>l.value===q)?.icon,ne.find(l=>l.value===q)?.label,(0,ct.jsx)(w.ChevronDown,{width:15,height:15})]}),(0,ct.jsx)(ve,{className:"bg-black hover:bg-black",children:ne.map((l,D)=>(0,ct.jsxs)(xe,{onClick:l.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,ct.jsx)("span",{children:l.icon}),(0,ct.jsx)("span",{children:l.label})]},`heading-option-${l.label}-${D}`))})]}),(0,ct.jsxs)(Pe,{children:[(0,ct.jsxs)(Te,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[(0,ct.jsx)(w.Plus,{width:15,height:15}),(0,ct.jsx)(w.ChevronDown,{width:15,height:15})]}),(0,ct.jsx)(ve,{className:"bg-black hover:bg-black",children:ie.map((l,D)=>(0,ct.jsxs)(xe,{onClick:l.onClick,disabled:l.disabled,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,ct.jsx)("span",{children:l.icon}),(0,ct.jsx)("span",{children:l.label})]},D))})]}),N&&(0,ct.jsx)(Tt,{activeEditor:e,onClose:()=>{$(!1)},isOpen:N})]})})}var dr=({setValue:e,value:t,name:o,editable:r=!0})=>{let[n]=(0,Bt.useLexicalComposerContext)(),i=c=>{c.read(()=>{let s=c.toJSON();e?.(()=>s)})};return(0,Je.useEffect)(()=>{n.setEditable(r)},[r]),(0,Je.useEffect)(()=>{t&&n.update(()=>{n.setEditorState(n.parseEditorState(t))})},[]),(0,ct.jsx)("div",{className:"w-full",children:(0,ct.jsxs)("div",{className:" ",children:[r&&(0,ct.jsx)(Xe,{}),(0,ct.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,ct.jsx)(Kt.RichTextPlugin,{contentEditable:(0,ct.jsx)(Wt.ContentEditable,{name:o,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:Zt.LexicalErrorBoundary}),r&&(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(jt.HistoryPlugin,{}),(0,ct.jsx)(Ft.AutoFocusPlugin,{}),(0,ct.jsx)(Xt.ListPlugin,{}),(0,ct.jsx)(qt.OnChangePlugin,{onChange:i}),(0,ct.jsx)(Be,{})]})]})]})})},pr=({setValue:e,value:t,name:o,editable:r=!0})=>(0,ct.jsx)(Gt.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Ie.ListNode,Ie.ListItemNode,Jt.HeadingNode,ge],onError(i){throw console.error("Lexical error:",i),i},theme:{code:"editor-code",heading:{h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:(0,ct.jsx)(dr,{value:t,setValue:e,name:o,editable:r})}),ur=pr;
4
+ "use strict";"use client";var Qt=Object.create;var ye=Object.defineProperty;var eo=Object.getOwnPropertyDescriptor;var to=Object.getOwnPropertyNames;var oo=Object.getPrototypeOf,ro=Object.prototype.hasOwnProperty;var no=(e,t)=>{for(var o in t)ye(e,o,{get:t[o],enumerable:!0})},Ye=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of to(t))!ro.call(e,n)&&n!==o&&ye(e,n,{get:()=>t[n],enumerable:!(r=eo(t,n))||r.enumerable});return e};var K=(e,t,o)=>(o=e!=null?Qt(oo(e)):{},Ye(t||!e||!e.__esModule?ye(o,"default",{value:e,enumerable:!0}):o,e)),io=e=>Ye(ye({},"__esModule",{value:!0}),e);var mr={};no(mr,{default:()=>ur});module.exports=io(mr);var Ft=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),Gt=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Wt=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),Zt=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),jt=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),Kt=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),Xt=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Ie=require("@payloadcms/richtext-lexical/lexical/list"),Jt=require("@payloadcms/richtext-lexical/lexical/rich-text"),qt=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin"),Je=require("react");var Bt=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),we=require("@payloadcms/richtext-lexical/lexical/utils"),p=require("@payloadcms/richtext-lexical/lexical"),Ke=require("@payloadcms/richtext-lexical/lexical/selection"),w=require("lucide-react");var lt=K(require("react"));var st=require("clsx");var Ee="-",ao=e=>{let t=lo(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{let s=c.split(Ee);return s[0]===""&&s.length!==1&&s.shift(),tt(s,t)||so(c)},getConflictingClassGroupIds:(c,s)=>{let g=o[c]||[];return s&&r[c]?[...g,...r[c]]:g}}},tt=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),n=r?tt(e.slice(1),r):void 0;if(n)return n;if(t.validators.length===0)return;let i=e.join(Ee);return t.validators.find(({validator:c})=>c(i))?.classGroupId},Qe=/^\[(.+)\]$/,so=e=>{if(Qe.test(e)){let t=Qe.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},lo=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return po(Object.entries(e.classGroups),o).forEach(([i,c])=>{He(c,r,i,t)}),r},He=(e,t,o,r)=>{e.forEach(n=>{if(typeof n=="string"){let i=n===""?t:et(t,n);i.classGroupId=o;return}if(typeof n=="function"){if(co(n)){He(n(r),t,o,r);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([i,c])=>{He(c,et(t,i),o,r)})})},et=(e,t)=>{let o=e;return t.split(Ee).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},co=e=>e.isThemeGetter,po=(e,t)=>t?e.map(([o,r])=>{let n=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([c,s])=>[t+c,s])):i);return[o,n]}):e,uo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,n=(i,c)=>{o.set(i,c),t++,t>e&&(t=0,r=o,o=new Map)};return{get(i){let c=o.get(i);if(c!==void 0)return c;if((c=r.get(i))!==void 0)return n(i,c),c},set(i,c){o.has(i)?o.set(i,c):n(i,c)}}},ot="!",mo=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,n=t[0],i=t.length,c=s=>{let g=[],M=0,R=0,E;for(let u=0;u<s.length;u++){let C=s[u];if(M===0){if(C===n&&(r||s.slice(u,u+i)===t)){g.push(s.slice(R,u)),R=u+i;continue}if(C==="/"){E=u;continue}}C==="["?M++:C==="]"&&M--}let L=g.length===0?s:s.substring(R),V=L.startsWith(ot),A=V?L.substring(1):L,y=E&&E>R?E-R:void 0;return{modifiers:g,hasImportantModifier:V,baseClassName:A,maybePostfixModifierPosition:y}};return o?s=>o({className:s,parseClassName:c}):c},fo=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},go=e=>({cache:uo(e.cacheSize),parseClassName:mo(e),...ao(e)}),bo=/\s+/,ho=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n}=t,i=[],c=e.trim().split(bo),s="";for(let g=c.length-1;g>=0;g-=1){let M=c[g],{modifiers:R,hasImportantModifier:E,baseClassName:L,maybePostfixModifierPosition:V}=o(M),A=!!V,y=r(A?L.substring(0,V):L);if(!y){if(!A){s=M+(s.length>0?" "+s:s);continue}if(y=r(L),!y){s=M+(s.length>0?" "+s:s);continue}A=!1}let u=fo(R).join(":"),C=E?u+ot:u,N=C+y;if(i.includes(N))continue;i.push(N);let $=n(y,A);for(let f=0;f<$.length;++f){let O=$[f];i.push(C+O)}s=M+(s.length>0?" "+s:s)}return s};function vo(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=rt(t))&&(r&&(r+=" "),r+=o);return r}var rt=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=rt(e[r]))&&(o&&(o+=" "),o+=t);return o};function xo(e,...t){let o,r,n,i=c;function c(g){let M=t.reduce((R,E)=>E(R),e());return o=go(M),r=o.cache.get,n=o.cache.set,i=s,s(g)}function s(g){let M=r(g);if(M)return M;let R=ho(g,o);return n(g,R),R}return function(){return i(vo.apply(null,arguments))}}var v=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},nt=/^\[(?:([ct-ct-]+):)?(.+)\]$/i,wo=/^\d+\/\d+$/,yo=new Set(["px","full","screen"]),Co=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Do=/\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$/,Mo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ro=/^(inset_)?-?((\d+)?\.?(\d+)[ct-ct]+|0)_-?((\d+)?\.?(\d+)[ct-ct]+|0)/,No=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,X=e=>ae(e)||yo.has(e)||wo.test(e),Y=e=>se(e,"length",Lo),ae=e=>!!e&&!Number.isNaN(Number(e)),Se=e=>se(e,"number",ae),pe=e=>!!e&&Number.isInteger(Number(e)),Po=e=>e.endsWith("%")&&ae(e.slice(0,-1)),d=e=>nt.test(e),Q=e=>Co.test(e),To=new Set(["length","size","percentage"]),ko=e=>se(e,To,it),Io=e=>se(e,"position",it),So=new Set(["image","url"]),Ho=e=>se(e,So,Vo),Eo=e=>se(e,"",Ao),ue=()=>!0,se=(e,t,o)=>{let r=nt.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},Lo=e=>Do.test(e)&&!Mo.test(e),it=()=>!1,Ao=e=>Ro.test(e),Vo=e=>No.test(e);var Oo=()=>{let e=v("colors"),t=v("spacing"),o=v("blur"),r=v("brightness"),n=v("borderColor"),i=v("borderRadius"),c=v("borderSpacing"),s=v("borderWidth"),g=v("contrast"),M=v("grayscale"),R=v("hueRotate"),E=v("invert"),L=v("gap"),V=v("gradientColorStops"),A=v("gradientColorStopPositions"),y=v("inset"),u=v("margin"),C=v("opacity"),N=v("padding"),$=v("saturate"),f=v("scale"),O=v("sepia"),q=v("skew"),te=v("space"),F=v("translate"),oe=()=>["auto","contain","none"],de=()=>["auto","hidden","clip","visible","scroll"],re=()=>["auto",d,t],h=()=>[d,t],ne=()=>["",X,Y],ie=()=>["auto",ae,d],l=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],T=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",d],qe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[ae,d];return{cacheSize:500,separator:":",theme:{colors:[ue],spacing:[X,Y],blur:["none","",Q,d],brightness:j(),borderColor:[e],borderRadius:["none","","full",Q,d],borderSpacing:h(),borderWidth:ne(),contrast:j(),grayscale:_(),hueRotate:j(),invert:_(),gap:h(),gradientColorStops:[e],gradientColorStopPositions:[Po,Y],inset:re(),margin:re(),opacity:j(),padding:h(),saturate:j(),scale:j(),sepia:_(),skew:j(),space:h(),translate:h()},classGroups:{aspect:[{aspect:["auto","square","video",d]}],container:["container"],columns:[{columns:[Q]}],"break-after":[{"break-after":qe()}],"break-before":[{"break-before":qe()}],"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:[...l(),d]}],overflow:[{overflow:de()}],"overflow-p":[{"overflow-p":de()}],"overflow-y":[{"overflow-y":de()}],overscroll:[{overscroll:oe()}],"overscroll-p":[{"overscroll-p":oe()}],"overscroll-y":[{"overscroll-y":oe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-p":[{"inset-p":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],ct:[{ct:["auto",pe,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:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",pe,d]}],"grid-cols":[{"grid-cols":[ue]}],"col-start-end":[{col:["auto",{span:["full",pe,d]},d]}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":[ue]}],"row-start-end":[{row:["auto",{span:[pe,d]},d]}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"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:[L]}],"gap-p":[{"gap-p":[L]}],"gap-y":[{"gap-y":[L]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[N]}],px:[{px:[N]}],py:[{py:[N]}],ps:[{ps:[N]}],pe:[{pe:[N]}],pt:[{pt:[N]}],pr:[{pr:[N]}],pb:[{pb:[N]}],pl:[{pl:[N]}],m:[{m:[u]}],mx:[{mx:[u]}],my:[{my:[u]}],ms:[{ms:[u]}],me:[{me:[u]}],ct:[{ct:[u]}],mr:[{mr:[u]}],mb:[{mb:[u]}],ml:[{ml:[u]}],"space-p":[{"space-p":[te]}],"space-p-reverse":["space-p-reverse"],"space-y":[{"space-y":[te]}],"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:[Q]},Q]}],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",Q,Y]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Se]}],"font-family":[{font:[ue]}],"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",ae,Se]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",X,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":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",X,Y]}],"underline-offset":[{"underline-offset":["auto",X,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:h()}],"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":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...l(),Io]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","p","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ko]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ho]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[V]}],"gradient-via":[{via:[V]}],"gradient-to":[{to:[V]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-Je":[{"rounded-Je":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-p":[{"border-p":[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":[C]}],"border-style":[{border:[...D(),"hidden"]}],"divide-p":[{"divide-p":[s]}],"divide-p-reverse":["divide-p-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:D()}],"border-color":[{border:[n]}],"border-color-p":[{"border-p":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[X,d]}],"outline-w":[{outline:[X,Y]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[X,Y]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Q,Eo]}],"shadow-color":[{shadow:[ue]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...T(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":T()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",Q,d]}],grayscale:[{grayscale:[M]}],"hue-rotate":[{"hue-rotate":[R]}],invert:[{invert:[E]}],saturate:[{saturate:[$]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[M]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[R]}],"backdrop-invert":[{"backdrop-invert":[E]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[$]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-p":[{"border-spacing-p":[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:j()}],ease:[{ease:["linear","in","out","in-out",d]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",d]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[f]}],"scale-p":[{"scale-p":[f]}],"scale-y":[{"scale-y":[f]}],rotate:[{rotate:[pe,d]}],"translate-p":[{"translate-p":[F]}],"translate-y":[{"translate-y":[F]}],"skew-p":[{"skew-p":[q]}],"skew-y":[{"skew-y":[q]}],"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","p",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-me":[{"scroll-me":h()}],"scroll-ct":[{"scroll-ct":h()}],"scroll-mr":[{"scroll-mr":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-pe":[{"scroll-pe":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-pr":[{"scroll-pr":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","p","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-p":[{"touch-pan":["p","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:[X,Y,Se]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-p","overflow-y"],overscroll:["overscroll-p","overscroll-y"],inset:["inset-p","inset-y","start","end","top","right","bottom","left"],"inset-p":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-p","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","ct","mr","mb","ml"],mx:["mr","ml"],my:["ct","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-Je","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-Je"],"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-p","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-p":["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-p":["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-ct","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-ct","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-p","touch-y","touch-pz"],"touch-p":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var at=xo(Oo);function b(...e){return at((0,st.clsx)(e))}var ct=require("react/jsx-runtime"),Ce=lt.forwardRef(({className:e,type:t,...o},r)=>(0,ct.jsx)("input",{type:t,className:b("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...o}));Ce.displayName="Input";var dt=require("@radix-ui/react-slot"),pt=require("class-variance-authority"),ut=K(require("react")),_o=(0,pt.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"}}}),Le=ut.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...n},i)=>(0,ct.jsx)(e?dt.Slot:"button",{className:b(_o({className:t,size:o,variant:r})),ref:i,...n}));Le.displayName="Button";var me=K(require("react")),k=K(require("@radix-ui/react-dialog"));var gt=k.Root;var zo=k.Portal;var bt=me.forwardRef(({className:e,...t},o)=>(0,ct.jsx)(k.Overlay,{ref:o,className:b("fixed inset-0 ct-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));bt.displayName=k.Overlay.displayName;var Ae=me.forwardRef(({className:e,children:t,...o},r)=>(0,ct.jsxs)(zo,{children:[(0,ct.jsx)(bt,{}),(0,ct.jsxs)(k.Content,{ref:r,className:b("fixed left-[50%] top-[50%] ct-50 grid w-full max-w-lg translate-p-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,ct.jsxs)(k.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,ct.jsx)(w.X,{className:"h-4 w-4"}),(0,ct.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ae.displayName=k.Content.displayName;var Ve=({className:e,...t})=>(0,ct.jsx)("div",{className:b("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ve.displayName="DialogHeader";var Uo=({className:e,...t})=>(0,ct.jsx)("div",{className:b("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-p-2",e),...t});Uo.displayName="DialogFooter";var Oe=me.forwardRef(({className:e,...t},o)=>(0,ct.jsx)(k.Title,{ref:o,className:b("text-lg font-semibold leading-none tracking-tight",e),...t}));Oe.displayName=k.Title.displayName;var Bo=me.forwardRef(({className:e,...t},o)=>(0,ct.jsx)(k.Description,{ref:o,className:b("text-sm text-muted-foreground",e),...t}));Bo.displayName=k.Description.displayName;var Pt=require("@radix-ui/react-dialog"),Ne=require("@payloadcms/richtext-lexical/client");var ze=K(require("bson-objectid"));var vt=require("@payloadcms/ui");var ht=K(require("react")),G=K(require("@radix-ui/react-tooltip"));var De=G.Provider,Me=G.Root,Re=G.Trigger,fe=ht.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,ct.jsx)(G.Portal,{children:(0,ct.jsx)(G.Content,{ref:r,sideOffset:t,className:b("ct-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));fe.displayName=G.Content.displayName;var $o=e=>{let{data:{relationTo:t,value:o},nodeKey:r}=e,[n]=(0,Bt.useLexicalComposerContext)(),[i,c]=(0,Je.useState)(""),[s,g]=(0,Je.useState)(""),[M,R]=(0,Je.useState)(""),E=async u=>{console.log("fetchMedia",u)};(0,Je.useEffect)(()=>{typeof o=="string"?o.length===24?E(o):(c(o||""),R(y(A())),g(V()||"")):typeof o=="object"&&(c(`${process.env.NEXT_PUBLIC_API_URL}${o.url}`||""),R(y(o.filesize)),g(o.mimeType?.split("/")[1]||""))},[]);let L=(0,Je.useCallback)(()=>{n.update(()=>{(0,p.$getNodeByKey)(r)?.remove()})},[n,r]),V=()=>{let u=e.data.value;return typeof u=="string"?u.split(";base64")[0]?.split("image/")[1]:""},A=()=>{let u=e.data.value;if(typeof u=="string"){let C=u.split(",")[1]?.length||0;return 4*Math.ceil(C/3)*.5624896334383812/1e3}return 0};function y(u){if(u>=1e6){let N=u/1e6;return`${N>=10?Math.round(N).toString():N.toFixed(1)} MB`}return`${Math.floor(u/1e3)} KB`}return(0,ct.jsx)("div",{className:"my-2",contentEditable:!1,children:(0,ct.jsxs)("div",{className:"border border-slate-800 rounded-xl overflow-clip w-60 flex flex-col gap-2 bg-[#222222]",children:[(0,ct.jsxs)("div",{className:"flex gap-2 border-b border-b-slate-100/10",children:[(0,ct.jsx)("div",{className:"flex-1",children:e.data.value?(0,ct.jsx)("img",{className:"object-cover m-0 w-full min-w-[115px] min-h-[105px]","data-lexical-upload-id":o,"data-lexical-upload-relation-to":t,src:i}):(0,ct.jsx)(vt.File,{})}),(0,ct.jsx)(De,{children:(0,ct.jsxs)(Me,{children:[(0,ct.jsxs)(Re,{className:"flex-1 flex justify-center items-center text-[#b5b5b5]",children:[(0,ct.jsx)("span",{className:"font-medium text-sm",children:"Media"}),(0,ct.jsx)("button",{onClick:u=>{u.preventDefault(),L()},className:"flex-1 flex justify-center items-center",children:(0,ct.jsx)(w.X,{width:24,height:24,strokeWidth:1})})]}),(0,ct.jsx)(fe,{children:(0,ct.jsx)("span",{children:"Remove image"})})]})})]}),(0,ct.jsxs)("div",{className:"flex items-center justify-center gap-4 py-3 flex-1 text-xs font-bold",children:[(0,ct.jsx)("span",{className:"",children:s?.toLocaleUpperCase()}),(0,ct.jsx)("span",{children:M})]})]})})},Ct=$o;function Fo(e){if(e.hasAttribute("data-lexical-upload-relation-to")&&e.hasAttribute("data-lexical-upload-id")){let o=e.getAttribute("data-lexical-upload-id");if(o)return{node:le({fields:{},relationTo:"media",value:o})}}return e.src.startsWith("file:///"),null}var ge=class extends Ne.UploadNode{static importDOM(){return{img:()=>({conversion:Fo,priority:0})}}static importJSON(t){t.version===1&&t?.value?.id&&(t.value=t.value.id),t.version===2&&!t?.id&&(t.id=new ze.default().toHexString(),t.version=3);let o={id:t.id??new ze.default().toHexString(),fields:t.fields,relationTo:"media",value:t.value},r=le(o);return r.setFormat?.(t.format),r}decorate(){return(0,ct.jsx)(Ct,{data:this.__data,nodeKey:this.getKey()})}};function le(e){return new ge({data:e})}var Go=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Wo=e=>Go?(e||window).getSelection():null,Gr=(0,p.createCommand)("INSERT_UPLOAD_WITH_DRAWER_COMMAND"),Ue=(0,p.createCommand)("INSERT_UPLOAD_COMMAND");function Tt({activeEditor:e,onClose:t,isOpen:o=!1}){let r=(0,Je.useRef)(!1),[n,i]=(0,Je.useState)(!0),[c,s]=(0,Je.useState)(""),[g,M]=(0,Je.useState)(""),[R,E]=(0,Je.useState)(!1),[L,V]=(0,Je.useState)("left"),A=c==="",y=f=>{E(f.target.checked)},u=f=>{V(f.target.value)},C=f=>{let O=new FileReader;O.onload=function(){return typeof O.result=="string"&&s(O.result),""},f!==null&&f[0]&&O.readAsDataURL(f[0])};(0,Je.useEffect)(()=>{r.current=!1;let f=O=>{r.current=O.altKey};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[e]),(0,Je.useEffect)(()=>{n||t()},[n]),(0,Je.useEffect)(()=>{i(o)},[o]);let N=({editor:f,relationTo:O,replaceNodeKey:q,value:te})=>{if(q)f.update(()=>{let F=(0,p.$getNodeByKey)(q);F&&F.replace(le({id:"",fields:{},relationTo:"media",value:te}))});else{let F=f.dispatchCommand(Ue,{fields:null,relationTo:"media",value:te})}},$=()=>{N({editor:e,relationTo:"media",replaceNodeKey:null,value:{altText:g,src:c,showCaption:R,position:L}.src}),i(!1),t()};return(0,ct.jsx)(gt,{open:n,onOpenChange:f=>i(f),children:(0,ct.jsxs)(Ae,{children:[(0,ct.jsxs)(Ve,{children:[(0,ct.jsx)(Oe,{children:"Upload Image"}),(0,ct.jsx)(Pt.DialogDescription,{children:"Description"})]}),(0,ct.jsxs)("div",{className:"",children:[(0,ct.jsx)("div",{style:{marginBottom:"1em"},children:(0,ct.jsx)(Ce,{type:"file",onChange:f=>C(f.target.files),accept:"image/*","data-test-id":"image-modal-file-upload"})}),(0,ct.jsx)("div",{style:{marginBottom:"1em"},children:(0,ct.jsx)(Ce,{"aria-label":"Alt Text",placeholder:"Descriptive alternative text",onChange:f=>M(f.currentTarget.value),value:g,"data-test-id":"image-modal-alt-text-input"})}),(0,ct.jsx)(Le,{"data-test-id":"image-modal-file-upload-btn",disabled:A,onClick:()=>$(),children:"Confirm"})]})]})})}function Be({captionsEnabled:e}){let[t]=(0,Bt.useLexicalComposerContext)();return(0,Je.useEffect)(()=>{if(!t.hasNodes([Ne.UploadNode]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return(0,we.mergeRegister)(t.registerCommand(p.DRAGSTART_COMMAND,o=>Zo(o),p.COMMAND_PRIORITY_HIGH),t.registerCommand(p.DRAGOVER_COMMAND,o=>jo(o),p.COMMAND_PRIORITY_LOW),t.registerCommand(p.DROP_COMMAND,o=>Ko(o,t),p.COMMAND_PRIORITY_HIGH))},[e,t]),null}function Zo(e){if(!$e())return!1;let o=e.dataTransfer;return o?(o.setData("text/plain","_"),!0):!1}function jo(e){return $e()?(kt(e)||e.preventDefault(),!0):!1}function Ko(e,t){let o=$e();if(!o)return!1;if(e.preventDefault(),kt(e)){let r=Xo(e);o.remove();let n=(0,p.$createRangeSelection)();r!=null&&n.applyDOMRange(r),(0,p.$setSelection)(n)}return!0}function $e(){let e=(0,p.$getSelection)();if(!(0,p.$isNodeSelection)(e))return null;let o=e.getNodes()[0];return(0,Ne.$isUploadNode)(o)?o:null}function kt(e){let t=e.target;return!!(t&&t instanceof HTMLElement&&!t.closest("code, span.editor-image")&&t.parentElement&&t.parentElement.closest("div.ContentEditable__root"))}function Xo(e){let t,o=e.target,r=o==null?null:o.nodeType===9?o.defaultView:o.ownerDocument.defaultView,n=Wo(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&n!==null)n.collapse(e.rangeParent,e.rangeOffset||0),t=n.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}var Jo=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z",fill:"currentColor"})}),It=Jo;var qo=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z",fill:"currentColor"})}),St=qo;var Yo=()=>(0,ct.jsxs)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("path",{d:"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",fill:"currentColor"}),(0,ct.jsx)("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),Ht=Yo;var Qo=()=>(0,ct.jsxs)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("path",{d:"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z",fill:"currentColor"}),(0,ct.jsx)("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),Et=Qo;var er=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z",fill:"currentColor"})}),Lt=er;var tr=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z",fill:"currentColor"})}),At=tr;var Vt=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",fill:"currentColor"})}),Ot=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z",fill:"currentColor"})}),_t=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z",fill:"currentColor"})}),zt=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z",fill:"currentColor"})}),Ut=()=>(0,ct.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z",fill:"currentColor"})});var J=K(require("react")),m=K(require("@radix-ui/react-dropdown-menu")),ce=require("@radix-ui/react-icons");var Pe=m.Root,Te=m.Trigger;var or=J.forwardRef(({className:e,inset:t,children:o,...r},n)=>(0,ct.jsxs)(m.SubTrigger,{ref:n,className:b("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[o,(0,ct.jsx)(ce.ChevronRightIcon,{className:"ml-auto"})]}));or.displayName=m.SubTrigger.displayName;var rr=J.forwardRef(({className:e,...t},o)=>(0,ct.jsx)(m.SubContent,{ref:o,className:b("ct-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));rr.displayName=m.SubContent.displayName;var ve=J.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,ct.jsx)(m.Portal,{children:(0,ct.jsx)(m.Content,{ref:r,sideOffset:t,className:b("ct-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));ve.displayName=m.Content.displayName;var xe=J.forwardRef(({className:e,inset:t,...o},r)=>(0,ct.jsx)(m.Item,{ref:r,className:b("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));xe.displayName=m.Item.displayName;var nr=J.forwardRef(({className:e,children:t,checked:o,...r},n)=>(0,ct.jsxs)(m.CheckboxItem,{ref:n,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r,children:[(0,ct.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ct.jsx)(m.ItemIndicator,{children:(0,ct.jsx)(ce.CheckIcon,{className:"h-4 w-4"})})}),t]}));nr.displayName=m.CheckboxItem.displayName;var ir=J.forwardRef(({className:e,children:t,...o},r)=>(0,ct.jsxs)(m.RadioItem,{ref:r,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,ct.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ct.jsx)(m.ItemIndicator,{children:(0,ct.jsx)(ce.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));ir.displayName=m.RadioItem.displayName;var ar=J.forwardRef(({className:e,inset:t,...o},r)=>(0,ct.jsx)(m.Label,{ref:r,className:b("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));ar.displayName=m.Label.displayName;var sr=J.forwardRef(({className:e,...t},o)=>(0,ct.jsx)(m.Separator,{ref:o,className:b("-mx-1 my-1 h-px bg-muted",e),...t}));sr.displayName=m.Separator.displayName;var lr=({className:e,...t})=>(0,ct.jsx)("span",{className:b("ml-auto text-xs tracking-widest opacity-60",e),...t});lr.displayName="DropdownMenuShortcut";var je=1;function cr(){return(0,ct.jsx)("span",{className:"border border-[#222222]"})}function Xe(){let[e]=(0,Bt.useLexicalComposerContext)(),t=(0,Je.useRef)(null),[o,r]=(0,Je.useState)(!1),[n,i]=(0,Je.useState)(!1),[c,s]=(0,Je.useState)(!1),[g,M]=(0,Je.useState)(!1),[R,E]=(0,Je.useState)(!1),[L,V]=(0,Je.useState)(!1),[A,y]=(0,Je.useState)(!1),[u,C]=(0,Je.useState)(!1),[N,$]=(0,Je.useState)(!1),[f,O]=(0,Je.useState)("left"),[q,te]=(0,Je.useState)("p"),F=l=>{e.update(()=>{let D=(0,p.$getSelection)();(0,p.$isRangeSelection)(D)&&(l==="p"?(0,Ke.$setBlocksType)(D,()=>(0,p.$createParagraphNode)()):(0,Ke.$setBlocksType)(D,()=>(0,$t.$createHeadingNode)(l)))})},oe=(0,Je.useCallback)(()=>{let l=(0,p.$getSelection)();if((0,p.$isRangeSelection)(l)){s(l.hasFormat("bold")),M(l.hasFormat("italic")),E(l.hasFormat("underline")),V(l.hasFormat("strikethrough")),y(l.hasFormat("subscript")),C(l.hasFormat("superscript"));let D=l.anchor.getNode(),T=D;for(;T&&!(0,p.$isParagraphNode)(T)&&T!==(0,p.$getRoot)();){let _=T.getParent();_&&(T=_)}if(T){let _=T.getFormatType();O(_||"left")}let Z=D.getTopLevelElement()?.__tag;te(Z||"p")}},[]);(0,Je.useEffect)(()=>(0,we.mergeRegister)(e.registerUpdateListener(({editorState:l})=>{l.read(()=>{oe()})}),e.registerCommand(p.SELECTION_CHANGE_COMMAND,(l,D)=>(oe(),!1),je),e.registerCommand(p.CAN_UNDO_COMMAND,l=>(r(l),!1),je),e.registerCommand(p.CAN_REDO_COMMAND,l=>(i(l),!1),je),(0,we.mergeRegister)(e.registerCommand(Ue,l=>(e.update(()=>{let D=(0,p.$getSelection)()||(0,p.$getPreviousSelection)();if((0,p.$isRangeSelection)(D)){let T=le({id:l.id,fields:l.fields,relationTo:l.relationTo,value:l.value}),{focus:Z}=D,_=Z.getNode();(0,we.$insertNodeToNearestRoot)(T),(0,p.$isParagraphNode)(_)&&!_.__first&&_.remove()}}),!0),p.COMMAND_PRIORITY_EDITOR))),[e,oe]);let de=[[{label:"Undo",icon:(0,ct.jsx)(w.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(p.UNDO_COMMAND,void 0)},disabled:!o},{label:"Redo",icon:(0,ct.jsx)(w.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(p.UNDO_COMMAND,void 0)},disabled:!n}],[{label:"Bold",icon:(0,ct.jsx)(It,{}),onClick:()=>{e.dispatchCommand(p.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:c},{label:"Italic",icon:(0,ct.jsx)(St,{}),onClick:()=>{e.dispatchCommand(p.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:g},{label:"Underline",icon:(0,ct.jsx)(Ht,{}),onClick:()=>{e.dispatchCommand(p.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:R},{label:"Strikethrough",icon:(0,ct.jsx)(Et,{}),onClick:()=>{e.dispatchCommand(p.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:L},{label:"Subscript",icon:(0,ct.jsx)(Lt,{}),onClick:()=>{e.dispatchCommand(p.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:A},{label:"Superscript",icon:(0,ct.jsx)(At,{}),onClick:()=>{e.dispatchCommand(p.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:u}]],re=[{label:"Left Align",direction:"left",icon:(0,ct.jsx)(w.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(p.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,ct.jsx)(w.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(p.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,ct.jsx)(w.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(p.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,ct.jsx)(w.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(p.FORMAT_ELEMENT_COMMAND,"justify")}}],ne=[{label:"Normal Text",value:"p",icon:(0,ct.jsx)(Vt,{}),onClick:()=>F("p")},{label:"Heading 1",value:"h1",icon:(0,ct.jsx)(Ot,{}),onClick:()=>F("h1")},{label:"Heading 2",value:"h2",icon:(0,ct.jsx)(_t,{}),onClick:()=>F("h2")},{label:"Heading 3",value:"h3",icon:(0,ct.jsx)(zt,{}),onClick:()=>F("h3")},{label:"Heading 4",value:"h4",icon:(0,ct.jsx)(Ut,{}),onClick:()=>F("h4")},...[{label:"Unordered List",value:"ul",icon:(0,ct.jsx)(w.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ie.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,ct.jsx)(w.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ie.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],ie=[{label:"Insert Image",icon:(0,ct.jsx)(w.ImageUp,{width:15,height:15}),onClick:()=>{$(!0)},disabled:!1}];return(0,ct.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2 sticky top-0 bg-black ct-50",children:(0,ct.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[de.map((l,D)=>(0,ct.jsxs)(Je.Fragment,{children:[(0,ct.jsx)("div",{className:"flex items-center gap-2",children:l.map((T,Z)=>(0,ct.jsx)("div",{role:"button","aria-disabled":T.disabled||!1,onClick:T.onClick,className:b("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",T.active&&"bg-[#3c3c3c]"),"aria-label":T.label,children:(0,ct.jsx)(De,{children:(0,ct.jsxs)(Me,{children:[(0,ct.jsx)(Re,{className:"text-[#b5b5b5]",children:T.icon}),(0,ct.jsx)(fe,{children:(0,ct.jsx)("p",{children:T.label})})]})})},Z))}),(0,ct.jsx)(cr,{})]},`toolbar-option-${l.length}-${D}`)),(0,ct.jsxs)(Pe,{children:[(0,ct.jsxs)(Te,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[re.find(l=>l.direction===f)?.icon,re.find(l=>l.direction===f)?.label,(0,ct.jsx)(w.ChevronDown,{width:15,height:15})]}),(0,ct.jsx)(ve,{className:"bg-black hover:bg-black",children:re.map((l,D)=>(0,ct.jsxs)(xe,{onClick:l.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,ct.jsx)("span",{children:l.icon}),(0,ct.jsx)("span",{children:l.label})]},`${l.label}-${D}`))})]}),(0,ct.jsxs)(Pe,{children:[(0,ct.jsxs)(Te,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[ne.find(l=>l.value===q)?.icon,ne.find(l=>l.value===q)?.label,(0,ct.jsx)(w.ChevronDown,{width:15,height:15})]}),(0,ct.jsx)(ve,{className:"bg-black hover:bg-black",children:ne.map((l,D)=>(0,ct.jsxs)(xe,{onClick:l.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,ct.jsx)("span",{children:l.icon}),(0,ct.jsx)("span",{children:l.label})]},`heading-option-${l.label}-${D}`))})]}),(0,ct.jsxs)(Pe,{children:[(0,ct.jsxs)(Te,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[(0,ct.jsx)(w.Plus,{width:15,height:15}),(0,ct.jsx)(w.ChevronDown,{width:15,height:15})]}),(0,ct.jsx)(ve,{className:"bg-black hover:bg-black",children:ie.map((l,D)=>(0,ct.jsxs)(xe,{onClick:l.onClick,disabled:l.disabled,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,ct.jsx)("span",{children:l.icon}),(0,ct.jsx)("span",{children:l.label})]},D))})]}),N&&(0,ct.jsx)(Tt,{activeEditor:e,onClose:()=>{$(!1)},isOpen:N})]})})}var dr=({setValue:e,value:t,name:o,editable:r=!0})=>{let[n]=(0,Bt.useLexicalComposerContext)(),i=c=>{c.read(()=>{let s=c.toJSON();e?.(()=>s)})};return(0,Je.useEffect)(()=>{n.setEditable(r)},[r]),(0,Je.useEffect)(()=>{t&&n.update(()=>{n.setEditorState(n.parseEditorState(t))})},[]),(0,ct.jsx)("div",{className:"w-full",children:(0,ct.jsxs)("div",{className:" ",children:[r&&(0,ct.jsx)(Xe,{}),(0,ct.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,ct.jsx)(Kt.RichTextPlugin,{contentEditable:(0,ct.jsx)(Wt.ContentEditable,{name:o,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:Zt.LexicalErrorBoundary}),r&&(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(jt.HistoryPlugin,{}),(0,ct.jsx)(Ft.AutoFocusPlugin,{}),(0,ct.jsx)(Xt.ListPlugin,{}),(0,ct.jsx)(qt.OnChangePlugin,{onChange:i}),(0,ct.jsx)(Be,{})]})]})]})})},pr=({setValue:e,value:t,name:o,editable:r=!0})=>(0,ct.jsx)(Gt.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Ie.ListNode,Ie.ListItemNode,Jt.HeadingNode,ge],onError(i){throw console.error("Lexical error:",i),i},theme:{code:"editor-code",heading:{h1:"text-4xl text-primary",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:(0,ct.jsx)(dr,{value:t,setValue:e,name:o,editable:r})}),ur=pr;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../../chunk-D7VHHXGM.mjs";import"../../../chunk-UOA5RYVR.mjs";import"../../../chunk-L2UJOICL.mjs";import"../../../chunk-T3F3RQIC.mjs";import"../../../chunk-UP67R64J.mjs";import"../../../chunk-6QERRKM4.mjs";import"../../../chunk-VSU7LYXZ.mjs";import"../../../chunk-RKS7CWAP.mjs";import"../../../chunk-BZEGLKRZ.mjs";import"../../../chunk-K7N3FRGH.mjs";import"../../../chunk-IPRG56MW.mjs";import"../../../chunk-HFEN3KJC.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-KY7WQYN4.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-QTW33JYG.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as default};
2
+ "use strict";import{a}from"../../../chunk-PZFYJ5FS.mjs";import"../../../chunk-LEUI66J6.mjs";import"../../../chunk-HFEN3KJC.mjs";import"../../../chunk-L2UJOICL.mjs";import"../../../chunk-T3F3RQIC.mjs";import"../../../chunk-UP67R64J.mjs";import"../../../chunk-6QERRKM4.mjs";import"../../../chunk-VSU7LYXZ.mjs";import"../../../chunk-RKS7CWAP.mjs";import"../../../chunk-BZEGLKRZ.mjs";import"../../../chunk-K7N3FRGH.mjs";import"../../../chunk-IPRG56MW.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-KY7WQYN4.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-QTW33JYG.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as default};