cortex-react-components 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-553B5H2H.mjs +4 -0
- package/dist/{chunk-CAKJOTEE.mjs → chunk-5B6FLVPH.mjs} +1 -1
- package/dist/{chunk-LHEZJYVN.mjs → chunk-5MU4KV3B.mjs} +1 -1
- package/dist/{chunk-67VXPDWA.mjs → chunk-5SIP7DC5.mjs} +1 -1
- package/dist/{chunk-RAGDUV7M.mjs → chunk-7VDNUJZC.mjs} +1 -1
- package/dist/{chunk-P2MTGU2L.mjs → chunk-A3SDGX4K.mjs} +1 -1
- package/dist/{chunk-QUXHULLX.mjs → chunk-ATIEKI6M.mjs} +1 -1
- package/dist/{chunk-QTILVWJA.mjs → chunk-B2EJGXDG.mjs} +1 -1
- package/dist/{chunk-ABGNIQRP.mjs → chunk-ECXVQZBN.mjs} +1 -1
- package/dist/{chunk-N7BHIWS5.mjs → chunk-FO3BUEXC.mjs} +1 -1
- package/dist/{chunk-LJOWXPWW.mjs → chunk-I2GNNRFH.mjs} +1 -1
- package/dist/{chunk-TK4JC5PG.mjs → chunk-INPV5MBU.mjs} +1 -1
- package/dist/{chunk-CLGBBNRB.mjs → chunk-ITJH72Z2.mjs} +1 -1
- package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
- package/dist/chunk-LW4QFIFR.mjs +4 -0
- package/dist/{chunk-YNTAZCKJ.mjs → chunk-O4NH5Z6F.mjs} +1 -1
- package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
- package/dist/{chunk-S4A4VHOI.mjs → chunk-OTFILQXI.mjs} +1 -1
- package/dist/{chunk-RNMPX2AU.mjs → chunk-YOETYY5S.mjs} +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/README-document-edit.js +238 -0
- package/dist/components/DigitalColleagues/README-document-edit.mjs +238 -0
- package/dist/components/DigitalColleagues/README-document-preview.js +210 -0
- package/dist/components/DigitalColleagues/README-document-preview.mjs +210 -0
- package/dist/components/DigitalColleagues/Views/KnowledgeView.js +1 -1
- package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.js +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/document-edit.d.ts +4 -2
- package/dist/components/DigitalColleagues/document-edit.js +2 -1
- package/dist/components/DigitalColleagues/document-edit.mjs +1 -1
- package/dist/components/DigitalColleagues/document-preview-examples.css +1 -0
- package/dist/components/DigitalColleagues/document-preview-examples.d.ts +12 -0
- package/dist/components/DigitalColleagues/document-preview-examples.js +35 -0
- package/dist/components/DigitalColleagues/document-preview-examples.mjs +31 -0
- package/dist/components/DigitalColleagues/document-preview.d.ts +12 -2
- package/dist/components/DigitalColleagues/document-preview.js +2 -1
- package/dist/components/DigitalColleagues/document-preview.mjs +1 -1
- package/dist/components/DigitalColleagues/index.js +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/DigitalColleagues/knowledge-browser.js +1 -1
- package/dist/components/DigitalColleagues/knowledge-browser.mjs +1 -1
- package/dist/components/DigitalColleagues/types.d.ts +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.mjs +1 -1
- package/dist/components/Holidays/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/dc-temp/index.js +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +11 -11
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +15 -15
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-BDFHWLTS.mjs +0 -4
- package/dist/chunk-GILMVRED.mjs +0 -4
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import"../../chunk-YEKQJ4YC.mjs";var r=`# Document Preview Component
|
|
2
|
+
|
|
3
|
+
The \`DocumentPreview\` component displays knowledge documents with support for multiple file formats and custom renderers.
|
|
4
|
+
|
|
5
|
+
## Supported Formats
|
|
6
|
+
|
|
7
|
+
- **Markdown** (\`.md\`) - Standard markdown with basic formatting
|
|
8
|
+
- **MDX** (\`.mdx\`) - Markdown with embedded React components
|
|
9
|
+
- **RichText** - PayloadCMS rich text content
|
|
10
|
+
- **Text** (\`.txt\`) - Plain text with preserved formatting
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
### Basic Usage
|
|
15
|
+
|
|
16
|
+
\`\`\`tsx
|
|
17
|
+
import { DocumentPreview } from './document-preview'
|
|
18
|
+
|
|
19
|
+
const document = {
|
|
20
|
+
id: '1',
|
|
21
|
+
title: 'My Document',
|
|
22
|
+
format: 'markdown',
|
|
23
|
+
content: '# Hello World\\n\\nThis is **bold** text.',
|
|
24
|
+
createdAt: new Date()
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
<DocumentPreview document={document} />
|
|
28
|
+
\`\`\`
|
|
29
|
+
|
|
30
|
+
### With Custom Renderers
|
|
31
|
+
|
|
32
|
+
\`\`\`tsx
|
|
33
|
+
import { DocumentPreview } from './document-preview'
|
|
34
|
+
import ReactMarkdown from 'react-markdown'
|
|
35
|
+
import { RichText } from '@payloadcms/richtext-lexical/react'
|
|
36
|
+
|
|
37
|
+
const customRenderers = {
|
|
38
|
+
markdown: (content: string) => (
|
|
39
|
+
<div className="prose prose-slate dark:prose-invert max-w-none">
|
|
40
|
+
<ReactMarkdown>{content}</ReactMarkdown>
|
|
41
|
+
</div>
|
|
42
|
+
),
|
|
43
|
+
|
|
44
|
+
richtext: (content: string) => {
|
|
45
|
+
const richTextData = JSON.parse(content)
|
|
46
|
+
return (
|
|
47
|
+
<div className="prose prose-slate dark:prose-invert max-w-none">
|
|
48
|
+
<RichText data={richTextData} />
|
|
49
|
+
</div>
|
|
50
|
+
)
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
text: (content: string) => (
|
|
54
|
+
<pre className="whitespace-pre-wrap font-mono text-sm">
|
|
55
|
+
{content}
|
|
56
|
+
</pre>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
<DocumentPreview
|
|
61
|
+
document={document}
|
|
62
|
+
renderers={customRenderers}
|
|
63
|
+
editable={true}
|
|
64
|
+
onDocumentUpdate={(updatedDoc) => console.log('Updated:', updatedDoc)}
|
|
65
|
+
/>
|
|
66
|
+
\`\`\`
|
|
67
|
+
|
|
68
|
+
## Available Dependencies
|
|
69
|
+
|
|
70
|
+
The project already includes these useful dependencies for rendering:
|
|
71
|
+
|
|
72
|
+
- \`@mdx-js/react\` - For MDX rendering
|
|
73
|
+
- \`@payloadcms/richtext-lexical\` - For PayloadCMS RichText
|
|
74
|
+
- \`@tailwindcss/typography\` - For typography styling
|
|
75
|
+
|
|
76
|
+
## Custom Renderer Examples
|
|
77
|
+
|
|
78
|
+
### React Markdown
|
|
79
|
+
|
|
80
|
+
\`\`\`bash
|
|
81
|
+
npm install react-markdown remark-gfm rehype-highlight
|
|
82
|
+
\`\`\`
|
|
83
|
+
|
|
84
|
+
\`\`\`tsx
|
|
85
|
+
import ReactMarkdown from 'react-markdown'
|
|
86
|
+
import remarkGfm from 'remark-gfm'
|
|
87
|
+
import rehypeHighlight from 'rehype-highlight'
|
|
88
|
+
|
|
89
|
+
const markdownRenderer = (content: string) => (
|
|
90
|
+
<div className="prose prose-slate dark:prose-invert max-w-none">
|
|
91
|
+
<ReactMarkdown
|
|
92
|
+
remarkPlugins={[remarkGfm]}
|
|
93
|
+
rehypePlugins={[rehypeHighlight]}
|
|
94
|
+
>
|
|
95
|
+
{content}
|
|
96
|
+
</ReactMarkdown>
|
|
97
|
+
</div>
|
|
98
|
+
)
|
|
99
|
+
\`\`\`
|
|
100
|
+
|
|
101
|
+
### MDX with next-mdx-remote
|
|
102
|
+
|
|
103
|
+
\`\`\`bash
|
|
104
|
+
npm install next-mdx-remote
|
|
105
|
+
\`\`\`
|
|
106
|
+
|
|
107
|
+
\`\`\`tsx
|
|
108
|
+
import { MDXRemote } from 'next-mdx-remote'
|
|
109
|
+
import { serialize } from 'next-mdx-remote/serialize'
|
|
110
|
+
|
|
111
|
+
const mdxRenderer = async (content: string) => {
|
|
112
|
+
const mdxSource = await serialize(content)
|
|
113
|
+
return (
|
|
114
|
+
<div className="prose prose-slate dark:prose-invert max-w-none">
|
|
115
|
+
<MDXRemote {...mdxSource} />
|
|
116
|
+
</div>
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
\`\`\`
|
|
120
|
+
|
|
121
|
+
### PayloadCMS RichText
|
|
122
|
+
|
|
123
|
+
\`\`\`tsx
|
|
124
|
+
import { RichText } from '@payloadcms/richtext-lexical/react'
|
|
125
|
+
|
|
126
|
+
const richTextRenderer = (content: string) => {
|
|
127
|
+
try {
|
|
128
|
+
const richTextData = JSON.parse(content)
|
|
129
|
+
return (
|
|
130
|
+
<div className="prose prose-slate dark:prose-invert max-w-none">
|
|
131
|
+
<RichText data={richTextData} />
|
|
132
|
+
</div>
|
|
133
|
+
)
|
|
134
|
+
} catch (error) {
|
|
135
|
+
return (
|
|
136
|
+
<div className="text-red-500 text-sm">
|
|
137
|
+
Error parsing RichText content: {error.message}
|
|
138
|
+
</div>
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
\`\`\`
|
|
143
|
+
|
|
144
|
+
## Props
|
|
145
|
+
|
|
146
|
+
### DocumentPreview Props
|
|
147
|
+
|
|
148
|
+
| Prop | Type | Default | Description |
|
|
149
|
+
|------|------|---------|-------------|
|
|
150
|
+
| \`document\` | \`KnowledgeDocument\` | - | The document to display |
|
|
151
|
+
| \`editable\` | \`boolean\` | \`true\` | Whether the document can be edited |
|
|
152
|
+
| \`renderers\` | \`DocumentRenderers\` | - | Custom renderers for different formats |
|
|
153
|
+
| \`onDocumentUpdate\` | \`(doc: KnowledgeDocument) => void\` | - | Callback when document is updated |
|
|
154
|
+
|
|
155
|
+
### DocumentRenderers Type
|
|
156
|
+
|
|
157
|
+
\`\`\`tsx
|
|
158
|
+
interface DocumentRenderers {
|
|
159
|
+
markdown?: (content: string) => ReactNode
|
|
160
|
+
mdx?: (content: string) => ReactNode
|
|
161
|
+
richtext?: (content: string) => ReactNode
|
|
162
|
+
text?: (content: string) => ReactNode
|
|
163
|
+
}
|
|
164
|
+
\`\`\`
|
|
165
|
+
|
|
166
|
+
### KnowledgeDocument Type
|
|
167
|
+
|
|
168
|
+
\`\`\`tsx
|
|
169
|
+
interface KnowledgeDocument {
|
|
170
|
+
id: string
|
|
171
|
+
title: string
|
|
172
|
+
description?: string
|
|
173
|
+
metadata?: Record<string, any>
|
|
174
|
+
content?: string
|
|
175
|
+
format: 'markdown' | 'mdx' | 'richtext' | 'text'
|
|
176
|
+
tags?: string[]
|
|
177
|
+
createdAt: Date
|
|
178
|
+
updatedAt?: Date
|
|
179
|
+
}
|
|
180
|
+
\`\`\`
|
|
181
|
+
|
|
182
|
+
## Default Renderers
|
|
183
|
+
|
|
184
|
+
If no custom renderers are provided, the component uses built-in default renderers:
|
|
185
|
+
|
|
186
|
+
- **Markdown**: Basic HTML conversion with support for headings, bold, italic, and code
|
|
187
|
+
- **Text**: Monospace font with preserved whitespace
|
|
188
|
+
- **RichText**: Placeholder with raw content display
|
|
189
|
+
- **MDX**: Placeholder with basic markdown rendering
|
|
190
|
+
|
|
191
|
+
## Styling
|
|
192
|
+
|
|
193
|
+
The component uses Tailwind CSS classes and supports dark mode through CSS variables. Key styling features:
|
|
194
|
+
|
|
195
|
+
- Responsive design
|
|
196
|
+
- Typography classes from \`@tailwindcms/typography\`
|
|
197
|
+
- Dark mode support
|
|
198
|
+
- Smooth animations with Framer Motion
|
|
199
|
+
- Consistent spacing and borders
|
|
200
|
+
|
|
201
|
+
## Examples
|
|
202
|
+
|
|
203
|
+
Check out the Storybook stories for interactive examples:
|
|
204
|
+
|
|
205
|
+
- \`MarkdownWithCustomRenderer\` - Markdown with enhanced rendering
|
|
206
|
+
- \`TextFormat\` - Plain text documents
|
|
207
|
+
- \`RichTextFormat\` - PayloadCMS rich content
|
|
208
|
+
- \`MDXFormat\` - MDX with React components
|
|
209
|
+
- \`AllFormatsComparison\` - Side-by-side format comparison
|
|
210
|
+
`;export{r as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
'use client'
|
|
4
4
|
|
|
5
|
-
"use strict";var Ye=Object.create;var oe=Object.defineProperty;var et=Object.getOwnPropertyDescriptor;var tt=Object.getOwnPropertyNames;var rt=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var nt=(e,t)=>{for(var r in t)oe(e,r,{get:t[r],enumerable:!0})},ye=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of tt(t))!ot.call(e,s)&&s!==r&&oe(e,s,{get:()=>t[s],enumerable:!(o=et(t,s))||o.enumerable});return e};var X=(e,t,r)=>(r=e!=null?Ye(rt(e)):{},ye(t||!e||!e.__esModule?oe(r,"default",{value:e,enumerable:!0}):r,e)),st=e=>ye(oe({},"__esModule",{value:!0}),e);var Gt={};nt(Gt,{default:()=>Ze});module.exports=st(Gt);var Xe=require("react");var Le=require("framer-motion");var Re=require("class-variance-authority");var Ae=require("clsx");var ue="-",at=e=>{let t=lt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let a=i.split(ue);return a[0]===""&&a.length!==1&&a.shift(),Ce(a,t)||it(i)},getConflictingClassGroupIds:(i,a)=>{let l=r[i]||[];return a&&o[i]?[...l,...o[i]]:l}}},Ce=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?Ce(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(ue);return t.validators.find(({validator:i})=>i(n))?.classGroupId},we=/^\[(.+)\]$/,it=e=>{if(we.test(e)){let t=we.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},lt=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return ct(Object.entries(e.classGroups),r).forEach(([n,i])=>{me(i,o,n,t)}),o},me=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:Ne(t,s);n.classGroupId=r;return}if(typeof s=="function"){if(dt(s)){me(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([n,i])=>{me(i,Ne(t,n),r,o)})})},Ne=(e,t)=>{let r=e;return t.split(ue).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},dt=e=>e.isThemeGetter,ct=(e,t)=>t?e.map(([r,o])=>{let s=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,a])=>[t+i,a])):n);return[r,s]}):e,mt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(n,i)=>{r.set(n,i),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let i=r.get(n);if(i!==void 0)return i;if((i=o.get(n))!==void 0)return s(n,i),i},set(n,i){r.has(n)?r.set(n,i):s(n,i)}}},ke="!",ut=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],n=t.length,i=a=>{let l=[],m=0,h=0,S;for(let b=0;b<a.length;b++){let w=a[b];if(m===0){if(w===s&&(o||a.slice(b,b+n)===t)){l.push(a.slice(h,b)),h=b+n;continue}if(w==="/"){S=b;continue}}w==="["?m++:w==="]"&&m--}let k=l.length===0?a:a.substring(h),p=k.startsWith(ke),y=p?k.substring(1):k,f=S&&S>h?S-h:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:y,maybePostfixModifierPosition:f}};return r?a=>r({className:a,parseClassName:i}):i},pt=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},ft=e=>({cache:mt(e.cacheSize),parseClassName:ut(e),...at(e)}),gt=/\s+/,bt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,n=[],i=e.trim().split(gt),a="";for(let l=i.length-1;l>=0;l-=1){let m=i[l],{modifiers:h,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:p}=r(m),y=!!p,f=o(y?k.substring(0,p):k);if(!f){if(!y){a=m+(a.length>0?" "+a:a);continue}if(f=o(k),!f){a=m+(a.length>0?" "+a:a);continue}y=!1}let b=pt(h).join(":"),w=S?b+ke:b,P=w+f;if(n.includes(P))continue;n.push(P);let E=s(f,y);for(let L=0;L<E.length;++L){let D=E[L];n.push(w+D)}a=m+(a.length>0?" "+a:a)}return a};function ht(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Se(t))&&(o&&(o+=" "),o+=r);return o}var Se=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Se(e[o]))&&(r&&(r+=" "),r+=t);return r};function xt(e,...t){let r,o,s,n=i;function i(l){let m=t.reduce((h,S)=>S(h),e());return r=ft(m),o=r.cache.get,s=r.cache.set,n=a,a(l)}function a(l){let m=o(l);if(m)return m;let h=bt(l,r);return s(l,h),h}return function(){return n(ht.apply(null,arguments))}}var x=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Pe=/^\[(?:([a-z-]+):)?(.+)\]$/i,vt=/^\Me+\/\Me+$/,yt=new Set(["px","full","screen"]),wt=/^(\Me+(\.\Me+)?)?(xs|sm|md|lg|xl)$/,Nt=/\Me+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ct=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kt=/^(inset_)?-?((\Me+)?\.?(\Me+)[a-z]+|0)_-?((\Me+)?\.?(\Me+)[a-z]+|0)/,St=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=e=>W(e)||yt.has(e)||vt.test(e),j=e=>_(e,"length",It),W=e=>!!e&&!Number.isNaN(Number(e)),ce=e=>_(e,"number",W),Z=e=>!!e&&Number.isInteger(Number(e)),Pt=e=>e.endsWith("%")&&W(e.slice(0,-1)),c=e=>Pe.test(e),G=e=>wt.test(e),Dt=new Set(["length","size","percentage"]),zt=e=>_(e,Dt,De),At=e=>_(e,"position",De),Rt=new Set(["image","url"]),Mt=e=>_(e,Rt,Bt),Tt=e=>_(e,"",Kt),Y=()=>!0,_=(e,t,r)=>{let o=Pe.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},It=e=>Nt.test(e)&&!Ct.test(e),De=()=>!1,Kt=e=>kt.test(e),Bt=e=>St.test(e);var Et=()=>{let e=x("colors"),t=x("spacing"),r=x("blur"),o=x("brightness"),s=x("borderColor"),n=x("borderRadius"),i=x("borderSpacing"),a=x("borderWidth"),l=x("contrast"),m=x("grayscale"),h=x("hueRotate"),S=x("invert"),k=x("gap"),p=x("gradientColorStops"),y=x("gradientColorStopPositions"),f=x("inset"),b=x("margin"),w=x("opacity"),P=x("padding"),E=x("saturate"),L=x("scale"),D=x("sepia"),U=x("skew"),ee=x("space"),R=x("translate"),$=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],le=()=>["auto",c,t],v=()=>[c,t],be=()=>["",B,j],te=()=>["auto",W,c],he=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],re=()=>["solid","dashed","dotted","double","none"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",c],ve=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[W,c];return{cacheSize:500,separator:":",theme:{colors:[Y],spacing:[B,j],blur:["none","",G,c],brightness:K(),borderColor:[e],borderRadius:["none","","full",G,c],borderSpacing:v(),borderWidth:be(),contrast:K(),grayscale:Q(),hueRotate:K(),invert:Q(),gap:v(),gradientColorStops:[e],gradientColorStopPositions:[Pt,j],inset:le(),margin:le(),opacity:K(),padding:v(),saturate:K(),scale:K(),sepia:Q(),skew:K(),space:v(),translate:v()},classGroups:{aspect:[{aspect:["auto","square","video",c]}],container:["container"],columns:[{columns:[G]}],"break-after":[{"break-after":ve()}],"break-before":[{"break-before":ve()}],"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:[...he(),c]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Z,c]}],basis:[{basis:le()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",c]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",Z,c]}],"grid-cols":[{"grid-cols":[Y]}],"col-start-end":[{col:["auto",{span:["full",Z,c]},c]}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":[Y]}],"row-start-end":[{row:["auto",{span:[Z,c]},c]}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",c]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",c]}],gap:[{gap:[k]}],"gap-x":[{"gap-x":[k]}],"gap-y":[{"gap-y":[k]}],"justify-content":[{justify:["normal",...de()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...de(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...de(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[P]}],px:[{px:[P]}],py:[{py:[P]}],ps:[{ps:[P]}],pe:[{pe:[P]}],pt:[{pt:[P]}],pr:[{pr:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[ee]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ee]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",c,t]}],"min-w":[{"min-w":[c,t,"min","max","fit"]}],"max-w":[{"max-w":[c,t,"none","full","min","max","fit","prose",{screen:[G]},G]}],h:[{h:[c,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[c,t,"auto","min","max","fit"]}],"font-size":[{text:["base",G,j]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ce]}],"font-family":[{font:[Y]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",c]}],"line-clamp":[{"line-clamp":["none",W,ce]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",B,c]}],"list-image":[{"list-image":["none",c]}],"list-style-type":[{list:["none","disc","decimal",c]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",B,j]}],"underline-offset":[{"underline-offset":["auto",B,c]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",c]}],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",c]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...he(),At]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Mt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-Xe":[{"rounded-Xe":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...re(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:re()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...re()]}],"outline-offset":[{"outline-offset":[B,c]}],"outline-w":[{outline:[B,j]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[B,j]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",G,Tt]}],"shadow-color":[{shadow:[Y]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...xe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":xe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",G,c]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[S]}],saturate:[{saturate:[E]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[S]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",c]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",c]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",c]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[Z,c]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[U]}],"skew-y":[{"skew-y":[U]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",c]}],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","Xe-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",c]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",c]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[B,j,ce]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-Xe","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Xe","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ze=xt(Et);function z(...e){return ze((0,Ae.clsx)(e))}var Me=require("react/jsx-runtime"),Lt=(0,Re.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ne({className:e,variant:t,...r}){return(0,Me.jsx)("div",{className:z(Lt({variant:t}),e),...r})}var Te=require("@radix-ui/react-slot"),Ke=X(require("react")),jt=(0,Re.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"}}}),I=Ke.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...s},n)=>(0,Me.jsx)(e?Te.Slot:"button",{className:z(jt({className:t,size:r,variant:o})),ref:n,...s}));I.displayName="Button";function Ee(e,t){let[r,o]=(0,Xe.useState)(()=>{if(typeof window>"Me")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}),s=n=>{try{o(n),typeof window<"Me"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,Xe.useEffect)(()=>{s(r)},[]),[r,s]}var ae=require("react-icons/fa");function pe({title:e,description:t,badge:r,primaryAction:o,secondaryAction:s,gradient:n,children:i,className:a}){let[l,m]=Ee(`hero-section-minimized-${e.replace(/\s+/Me,"-").toLowerCase()}`,!s&&!t),h=!s&&!t||l;return(0,Me.jsxs)(Le.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${n} p-8 text-white ${a||""}`,children:[(0,Me.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Me.jsxs)("div",{className:"flex items-center gap-3",children:[r&&(0,Me.jsx)(ne,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:r}),(0,Me.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Me.jsxs)("div",{className:"flex items-center gap-3",children:[h&&o&&(0,Me.jsx)(I,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(s||t)&&(0,Me.jsx)("button",{"aria-label":l?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>m(!l),style:{lineHeight:0},children:l?(0,Me.jsx)(ae.FaChevronDown,{size:22}):(0,Me.jsx)(ae.FaChevronUp,{size:22})})]})]}),!h&&(0,Me.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Me.jsxs)("div",{className:"space-y-4",children:[(0,Me.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Me.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Me.jsx)(I,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),s&&(0,Me.jsx)(I,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:s.onClick,children:s.label})]})]}),i&&(0,Me.jsx)("div",{className:"hidden lg:block",children:i})]})]})}var M=require("lucide-react");var je=X(require("react"));var J=je.forwardRef(({className:e,type:t,...r},o)=>(0,Me.jsx)("input",{type:t,className:z("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));J.displayName="Input";var fe=X(require("react")),A=X(require("@radix-ui/react-scroll-area"));var ge=fe.forwardRef(({className:e,children:t,...r},o)=>(0,Me.jsxs)(A.Root,{ref:o,className:z("relative overflow-hidden",e),...r,children:[(0,Me.jsx)(A.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Me.jsx)(Ve,{}),(0,Me.jsx)(A.Corner,{})]}));ge.displayName=A.Root.displayName;var Ve=fe.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,Me.jsx)(A.ScrollAreaScrollbar,{ref:o,orientation:t,className:z("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,Me.jsx)(A.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Ve.displayName=A.ScrollAreaScrollbar.displayName;var He=X(require("react")),ie=He.forwardRef(({className:e,...t},r)=>(0,$e.jsx)("textarea",{className:z("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));ie.displayName="Textarea";function Ue({document:e,onSave:t,onCancel:r}){let[o,s]=(0,Xe.useState)({...e,updatedAt:new Date}),n=()=>{t(o)},i=a=>{let l=a.split(",").map(m=>m.trim()).filter(m=>m.length>0);s(m=>({...m,tags:l}))};return(0,Me.jsxs)(Le.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Me.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Me.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Me.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Me.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,Me.jsx)(M.Edit3,{className:"h-6 w-6 text-primary"})}),(0,Me.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,Me.jsxs)("div",{className:"flex gap-2",children:[(0,Me.jsxs)(I,{variant:"outline",size:"sm",onClick:r,className:"gap-2",children:[(0,Me.jsx)(M.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Me.jsxs)(I,{size:"sm",onClick:n,className:"gap-2",children:[(0,Me.jsx)(M.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,Me.jsxs)("div",{className:"space-y-4",children:[(0,Me.jsxs)("div",{children:[(0,Me.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,Me.jsx)(J,{value:o.title,onChange:a=>s(l=>({...l,title:a.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,Me.jsxs)("div",{children:[(0,Me.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,Me.jsx)(ie,{value:o.description||"",onChange:a=>s(l=>({...l,description:a.target.value})),placeholder:"Document description...",rows:2})]}),(0,Me.jsxs)("div",{children:[(0,Me.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Tags (comma-separated)"}),(0,Me.jsx)(J,{value:o.tags?.join(", ")||"",onChange:a=>i(a.target.value),placeholder:"tag1, tag2, tag3..."})]}),(0,Me.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Me.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Me.jsx)(ne,{variant:"secondary",className:"font-mono",children:o.format.toUpperCase()})]})]})]}),(0,Me.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Me.jsxs)("div",{className:"p-8",children:[(0,Me.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Me.jsx)(ie,{value:o.content||"",onChange:a=>s(l=>({...l,content:a.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}function Je({document:e,onDocumentUpdate:t,editable:r=!0}){let[o,s]=(0,Xe.useState)(!1),n=m=>{switch(m){case"markdown":case"mdx":return(0,Me.jsx)(M.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,Me.jsx)(M.File,{className:"h-6 w-6 text-success"});default:return(0,Me.jsx)(M.File,{className:"h-6 w-6 text-muted-foreground"})}},i=m=>{switch(m){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},a=m=>{s(!1),t?.(m)},l=()=>{s(!1)};return o?(0,Me.jsx)(Ue,{document:e,onSave:a,onCancel:l}):(0,Me.jsxs)(Le.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Me.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Me.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Me.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,Me.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:n(e.format)}),(0,Me.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Me.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Me.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),r&&(0,Me.jsx)("div",{className:"flex-shrink-0",children:(0,Me.jsxs)(I,{variant:"outline",size:"sm",onClick:()=>s(!0),className:"gap-2",children:[(0,Me.jsx)(M.Edit3,{className:"h-4 w-4"}),"Edit"]})})]}),(0,Me.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Me.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${i(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(m=>(0,Me.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",m]},m))]})]}),(0,Me.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Me.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Me.jsxs)("div",{className:"mb-6",children:[(0,Me.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Me.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,Me.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-xs",children:Object.entries(e.metadata).map(([m,h])=>(0,Me.jsxs)("div",{className:"flex gap-1",children:[(0,Me.jsxs)("span",{className:"text-muted-foreground font-medium",children:[m.replace(/([A-Z])/Me," $1").trim(),":"]}),(0,Me.jsx)("span",{className:"text-foreground truncate",children:String(h)})]},m))})})]}),(0,Me.jsx)("div",{className:"space-y-4",children:e.content?(0,Me.jsxs)("div",{className:"relative",children:[(0,Me.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:(0,Me.jsxs)("pre",{className:"text-card-foreground text-sm leading-relaxed whitespace-pre-wrap font-mono",children:[e.content.substring(0,1500),e.content.length>1500&&"..."]})}),e.content.length>1500&&(0,Me.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-16 bg-gradient-to-t from-card to-transparent rounded-b-xl flex items-end justify-center pb-2",children:(0,Me.jsx)("span",{className:"text-muted-foreground text-xs",children:"Content truncated"})})]}):(0,Me.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,Me.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Me.jsx)(M.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Me.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Me.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function qe({label:e,documents:t,children:r,level:o,onDocumentClick:s,selectedDocumentId:n,showDocumentCount:i=!0}){let[a,l]=(0,Xe.useState)(o===0),m=r&&Object.keys(r).length>0,h=t.length+(r?Object.values(r).reduce((p,y)=>p+y.documents.length,0):0),S=p=>{switch(p){case"markdown":case"mdx":return(0,Me.jsx)(M.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,Me.jsx)(M.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,Me.jsx)(M.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},k=p=>{let y=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return y[p%y.length]};return(0,Me.jsxs)("div",{className:"space-y-1",children:[(m||t.length>0)&&(0,Me.jsxs)(Le.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${a?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>l(!a),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Me.jsx)("div",{className:`w-1 h-6 rounded-full ${k(o)}`}),(0,Me.jsx)(Le.motion.div,{animate:{rotate:a?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Me.jsx)(M.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,Me.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,Me.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,Me.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),i&&h>0&&(0,Me.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Me.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:h})})]})]}),(0,Me.jsx)(Le.motion.div,{initial:!1,animate:{height:a?"auto":0,opacity:a?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Me.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((p,y)=>(0,Me.jsxs)(Le.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:y*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${n===p.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>s?.(p),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Me.jsx)("div",{className:"flex-shrink-0",children:S(p.format)}),(0,Me.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Me.jsx)("p",{className:`text-sm truncate transition-colors ${n===p.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:p.title}),p.description&&(0,Me.jsx)("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:p.description})]}),p.tags&&p.tags.length>0&&(0,Me.jsx)("div",{className:"flex-shrink-0",children:(0,Me.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:p.tags[0]})})]},p.id)),r&&Object.entries(r).map(([p,y])=>(0,Me.jsx)(qe,{label:p,documents:y.documents,children:y.children,level:o+1,onDocumentClick:s,selectedDocumentId:n,showDocumentCount:i},p))]})})]})}function Qe({documents:e,menuConfig:t,onDocumentClick:r,onDocumentShare:o,onDocumentUpdate:s,selectedDocumentId:n,className:i,editable:a=!0}){let[l,m]=(0,Xe.useState)(""),[h,S]=(0,Xe.useState)(null),k=(0,Xe.useMemo)(()=>l?e.filter(f=>f.title.toLowerCase().includes(l.toLowerCase())||f.description?.toLowerCase().includes(l.toLowerCase())||f.tags?.some(b=>b.toLowerCase().includes(l.toLowerCase()))||Object.values(f.metadata||{}).some(b=>String(b).toLowerCase().includes(l.toLowerCase()))):e,[e,l]),p=(0,Xe.useMemo)(()=>{let f=(b,w)=>{if(w.length===0)return{};let[P,...E]=w;return b.reduce((D,U)=>{let ee=U.metadata?.[P]||"Uncategorized",R=String(ee);if(D[R]||(D[R]={documents:[],children:{}}),E.length===0)D[R].documents.push(U);else{let $=f([U],E),T=Object.keys($)[0];T&&(D[R].children||(D[R].children={}),D[R].children[T]?D[R].children[T].documents.push(...$[T].documents):D[R].children[T]=$[T])}return D},{})};return f(k,t.groupBy)},[k,t.groupBy]),y=f=>{S(f),r?.(f)};return(0,Me.jsxs)("div",{className:`flex h-full ${i||""}`,children:[(0,Me.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,Me.jsx)("div",{className:"p-6 border-b border-border",children:(0,Me.jsxs)("div",{className:"relative",children:[(0,Me.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Me.jsx)(M.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,Me.jsx)(J,{placeholder:"Search knowledge base...",value:l,onChange:f=>m(f.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Me.jsx)(ge,{className:"h-[calc(100%-100px)]",children:(0,Me.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(p).map(([f,b])=>(0,Me.jsx)(qe,{label:f,documents:b.documents,children:b.children,level:0,onDocumentClick:y,selectedDocumentId:n,showDocumentCount:t.showDocumentCount},f)),Object.keys(p).length===0&&(0,Me.jsxs)(Le.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Me.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Me.jsx)(M.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Me.jsx)("p",{className:"text-sm font-medium",children:"No documents found"}),(0,Me.jsx)("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,Me.jsx)("div",{className:"flex-1 bg-background",children:h?(0,Me.jsx)(Je,{document:h,onDocumentUpdate:s,editable:a}):(0,Me.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,Me.jsxs)(Le.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,Me.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Me.jsx)(M.FileText,{className:"h-10 w-10 text-primary"})}),(0,Me.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,Me.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function Ze({documents:e=[],contexts:t=[],onDocumentClick:r=i=>console.log("Document clicked:",i),onDocumentShare:o=i=>console.log("Share document:",i),onLoadDocumentContent:s,selectedDocumentId:n}){let[i,a]=(0,Xe.useState)(t[0]);return!t||t.length===0?(0,Me.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Me.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,Me.jsx)(pe,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,Me.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,Me.jsx)("p",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,Me.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Me.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,Me.jsx)(pe,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,Me.jsxs)("div",{className:"mt-6",children:[(0,Me.jsx)("div",{className:"border-b border-border",children:(0,Me.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(l=>(0,Me.jsxs)("button",{onClick:()=>a(l),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${i.id===l.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[l.icon,l.label]},l.id))})}),i.description&&(0,Me.jsx)("div",{className:"mt-3 px-1",children:(0,Me.jsx)("p",{className:"text-sm text-muted-foreground",children:i.description})})]})]}),(0,Me.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,Me.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,Me.jsx)(Qe,{documents:e,menuConfig:i.menuConfig,onDocumentClick:r,onDocumentShare:o,selectedDocumentId:n})})})]})}
|
|
5
|
+
"use strict";var ut=Object.create;var ie=Object.defineProperty;var pt=Object.getOwnPropertyDescriptor;var ft=Object.getOwnPropertyNames;var gt=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty;var ht=(e,t)=>{for(var r in t)ie(e,r,{get:t[r],enumerable:!0})},De=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ft(t))!bt.call(e,a)&&a!==r&&ie(e,a,{get:()=>t[a],enumerable:!(o=pt(t,a))||o.enumerable});return e};var q=(e,t,r)=>(r=e!=null?ut(gt(e)):{},De(t||!e||!e.__esModule?ie(r,"default",{value:e,enumerable:!0}):r,e)),xt=e=>De(ie({},"__esModule",{value:!0}),e);var rr={};ht(rr,{default:()=>mt});module.exports=xt(rr);var ct=require("react");var Ue=require("framer-motion");var je=require("class-variance-authority");var Le=require("clsx");var he="-",vt=e=>{let t=wt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let s=i.split(he);return s[0]===""&&s.length!==1&&s.shift(),ze(s,t)||yt(i)},getConflictingClassGroupIds:(i,s)=>{let u=r[i]||[];return s&&o[i]?[...u,...o[i]]:u}}},ze=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),a=o?ze(e.slice(1),o):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(he);return t.validators.find(({validator:i})=>i(n))?.classGroupId},Te=/^\[(.+)\]$/,yt=e=>{if(Te.test(e)){let t=Te.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},wt=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return St(Object.entries(e.classGroups),r).forEach(([n,i])=>{be(i,o,n,t)}),o},be=(e,t,r,o)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:Me(t,a);n.classGroupId=r;return}if(typeof a=="function"){if(Nt(a)){be(a(o),t,r,o);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([n,i])=>{be(i,Me(t,n),r,o)})})},Me=(e,t)=>{let r=e;return t.split(he).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Nt=e=>e.isThemeGetter,St=(e,t)=>t?e.map(([r,o])=>{let a=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,s])=>[t+i,s])):n);return[r,a]}):e,Ct=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,a=(n,i)=>{r.set(n,i),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let i=r.get(n);if(i!==void 0)return i;if((i=o.get(n))!==void 0)return a(n,i),i},set(n,i){r.has(n)?r.set(n,i):a(n,i)}}},Ie="!",kt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,a=t[0],n=t.length,i=s=>{let u=[],N=0,v=0,M;for(let h=0;h<s.length;h++){let P=s[h];if(N===0){if(P===a&&(o||s.slice(h,h+n)===t)){u.push(s.slice(v,h)),v=h+n;continue}if(P==="/"){M=h;continue}}P==="["?N++:P==="]"&&N--}let T=u.length===0?s:s.substring(v),d=T.startsWith(Ie),w=d?T.substring(1):T,g=M&&M>v?M-v:void 0;return{modifiers:u,hasImportantModifier:d,baseClassName:w,maybePostfixModifierPosition:g}};return r?s=>r({className:s,parseClassName:i}):i},Pt=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Rt=e=>({cache:Ct(e.cacheSize),parseClassName:kt(e),...vt(e)}),Dt=/\s+/,Tt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:a}=t,n=[],i=e.trim().split(Dt),s="";for(let u=i.length-1;u>=0;u-=1){let N=i[u],{modifiers:v,hasImportantModifier:M,baseClassName:T,maybePostfixModifierPosition:d}=r(N),w=!!d,g=o(w?T.substring(0,d):T);if(!g){if(!w){s=N+(s.length>0?" "+s:s);continue}if(g=o(T),!g){s=N+(s.length>0?" "+s:s);continue}w=!1}let h=Pt(v).join(":"),P=M?h+Ie:h,A=P+g;if(n.includes(A))continue;n.push(A);let p=a(g,w);for(let x=0;x<p.length;++x){let y=p[x];n.push(P+y)}s=N+(s.length>0?" "+s:s)}return s};function Mt(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ae(t))&&(o&&(o+=" "),o+=r);return o}var Ae=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Ae(e[o]))&&(r&&(r+=" "),r+=t);return r};function zt(e,...t){let r,o,a,n=i;function i(u){let N=t.reduce((v,M)=>M(v),e());return r=Rt(N),o=r.cache.get,a=r.cache.set,n=s,s(u)}function s(u){let N=o(u);if(N)return N;let v=Tt(u,r);return a(u,v),v}return function(){return n(Mt.apply(null,arguments))}}var S=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ke=/^\[(?:([a-Ve-]+):)?(.+)\]$/i,It=/^\d+\/\d+$/,At=new Set(["px","full","screen"]),Kt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bt=/\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$/,Et=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Lt=/^(inset_)?-?((\d+)?\.?(\d+)[a-Ve]+|0)_-?((\d+)?\.?(\d+)[a-Ve]+|0)/,jt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_=e=>ee(e)||At.has(e)||It.test(e),O=e=>te(e,"length",Wt),ee=e=>!!e&&!Number.isNaN(Number(e)),ge=e=>te(e,"number",ee),oe=e=>!!e&&Number.isInteger(Number(e)),Vt=e=>e.endsWith("%")&&ee(e.slice(0,-1)),f=e=>Ke.test(e),U=e=>Kt.test(e),$t=new Set(["length","size","percentage"]),Gt=e=>te(e,$t,Be),Ht=e=>te(e,"position",Be),_t=new Set(["image","url"]),Ot=e=>te(e,_t,Xt),Ut=e=>te(e,"",Ft),ne=()=>!0,te=(e,t,r)=>{let o=Ke.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},Wt=e=>Bt.test(e)&&!Et.test(e),Be=()=>!1,Ft=e=>Lt.test(e),Xt=e=>jt.test(e);var Jt=()=>{let e=S("colors"),t=S("spacing"),r=S("blur"),o=S("brightness"),a=S("borderColor"),n=S("borderRadius"),i=S("borderSpacing"),s=S("borderWidth"),u=S("contrast"),N=S("grayscale"),v=S("hueRotate"),M=S("invert"),T=S("gap"),d=S("gradientColorStops"),w=S("gradientColorStopPositions"),g=S("inset"),h=S("margin"),P=S("opacity"),A=S("padding"),p=S("saturate"),x=S("scale"),y=S("sepia"),k=S("skew"),J=S("space"),E=S("translate"),$=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],pe=()=>["auto",f,t],C=()=>[f,t],Ce=()=>["",_,O],ae=()=>["auto",ee,f],ke=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",f],Re=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[ee,f];return{cacheSize:500,separator:":",theme:{colors:[ne],spacing:[_,O],blur:["none","",U,f],brightness:H(),borderColor:[e],borderRadius:["none","","full",U,f],borderSpacing:C(),borderWidth:Ce(),contrast:H(),grayscale:re(),hueRotate:H(),invert:re(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[Vt,O],inset:pe(),margin:pe(),opacity:H(),padding:C(),saturate:H(),scale:H(),sepia:re(),skew:H(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",f]}],container:["container"],columns:[{columns:[U]}],"break-after":[{"break-after":Re()}],"break-before":[{"break-before":Re()}],"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:[...ke(),f]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],Ve:[{Ve:["auto",oe,f]}],basis:[{basis:pe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",f]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",oe,f]}],"grid-cols":[{"grid-cols":[ne]}],"col-start-end":[{col:["auto",{span:["full",oe,f]},f]}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":[ne]}],"row-start-end":[{row:["auto",{span:[oe,f]},f]}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",f]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",f]}],gap:[{gap:[T]}],"gap-x":[{"gap-x":[T]}],"gap-y":[{"gap-y":[T]}],"justify-content":[{justify:["normal",...fe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...fe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...fe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[A]}],px:[{px:[A]}],py:[{py:[A]}],ps:[{ps:[A]}],pe:[{pe:[A]}],pt:[{pt:[A]}],pr:[{pr:[A]}],pb:[{pb:[A]}],pl:[{pl:[A]}],Ve:[{Ve:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[J]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[J]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",f,t]}],"min-w":[{"min-w":[f,t,"min","max","fit"]}],"max-w":[{"max-w":[f,t,"none","full","min","max","fit","prose",{screen:[U]},U]}],h:[{h:[f,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[f,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[f,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[f,t,"auto","min","max","fit"]}],"font-size":[{text:["base",U,O]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ge]}],"font-family":[{font:[ne]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",f]}],"line-clamp":[{"line-clamp":["none",ee,ge]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_,f]}],"list-image":[{"list-image":["none",f]}],"list-style-type":[{list:["none","disc","decimal",f]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_,O]}],"underline-offset":[{"underline-offset":["auto",_,f]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",f]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",f]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ke(),Ht]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Gt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","Ve","tl"]},Ot]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-Ve":[{"rounded-Ve":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-Ve":[{"border-Ve":[s]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:se()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-Ve":[{"border-Ve":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...se()]}],"outline-offset":[{"outline-offset":[_,f]}],"outline-w":[{outline:[_,O]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-w":[{"ring-offset":[_,O]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",U,Ut]}],"shadow-color":[{shadow:[ne]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Pe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",U,f]}],grayscale:[{grayscale:[N]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[M]}],saturate:[{saturate:[p]}],sepia:[{sepia:[y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[M]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[p]}],"backdrop-sepia":[{"backdrop-sepia":[y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",f]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",f]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",f]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[oe,f]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",f]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",f]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-Ve":[{"scroll-Ve":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",f]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_,O,ge]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],Ve:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-Ve","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-Ve":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-Ve"],"border-w-x":["border-w-r","border-w-Ve"],"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-Ve"],"border-color-x":["border-color-r","border-color-Ve"],"border-color-y":["border-color-t","border-color-b"],"scroll-Ve":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ee=zt(Jt);function R(...e){return Ee((0,Le.clsx)(e))}var Ve=require("react/jsx-runtime"),qt=(0,je.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function le({className:e,variant:t,...r}){return(0,Ve.jsx)("div",{className:R(qt({variant:t}),e),...r})}var $e=require("@radix-ui/react-slot"),He=q(require("react")),Qt=(0,je.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"}}}),L=He.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...a},n)=>(0,Ve.jsx)(e?$e.Slot:"button",{className:R(Qt({className:t,size:r,variant:o})),ref:n,...a}));L.displayName="Button";function Oe(e,t){let[r,o]=(0,ct.useState)(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}),a=n=>{try{o(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,ct.useEffect)(()=>{a(r)},[]),[r,a]}var ce=require("react-icons/fa");function xe({title:e,description:t,badge:r,primaryAction:o,secondaryAction:a,gradient:n,children:i,className:s}){let[u,N]=Oe(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!a&&!t),v=!a&&!t||u;return(0,Ve.jsxs)(Ue.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${n} p-8 text-white ${s||""}`,children:[(0,Ve.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Ve.jsxs)("div",{className:"flex items-center gap-3",children:[r&&(0,Ve.jsx)(le,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:r}),(0,Ve.jsx)("h2",{className:"text-3xl font-bold Ve-0",children:e})]}),(0,Ve.jsxs)("div",{className:"flex items-center gap-3",children:[v&&o&&(0,Ve.jsx)(L,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(a||t)&&(0,Ve.jsx)("button",{"aria-label":u?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>N(!u),style:{lineHeight:0},children:u?(0,Ve.jsx)(ce.FaChevronDown,{size:22}):(0,Ve.jsx)(ce.FaChevronUp,{size:22})})]})]}),!v&&(0,Ve.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Ve.jsxs)("div",{className:"space-y-4",children:[(0,Ve.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Ve.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Ve.jsx)(L,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),a&&(0,Ve.jsx)(L,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:a.onClick,children:a.label})]})]}),i&&(0,Ve.jsx)("div",{className:"hidden lg:block",children:i})]})]})}var V=require("lucide-react");var We=q(require("react"));var W=We.forwardRef(({className:e,type:t,...r},o)=>(0,Ve.jsx)("input",{type:t,className:R("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));W.displayName="Input";var ve=q(require("react")),j=q(require("@radix-ui/react-scroll-area"));var ye=ve.forwardRef(({className:e,children:t,...r},o)=>(0,Ve.jsxs)(j.Root,{ref:o,className:R("relative overflow-hidden",e),...r,children:[(0,Ve.jsx)(j.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Ve.jsx)(Xe,{}),(0,Ve.jsx)(j.Corner,{})]}));ye.displayName=j.Root.displayName;var Xe=ve.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,Ve.jsx)(j.ScrollAreaScrollbar,{ref:o,orientation:t,className:R("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-Ve border-Ve-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,Ve.jsx)(j.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Xe.displayName=j.ScrollAreaScrollbar.displayName;var Je=q(require("react")),we=Je.forwardRef(({className:e,...t},r)=>(0,Ve.jsx)("textarea",{className:R("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));we.displayName="Textarea";var b=q(require("@radix-ui/react-select")),X=q(require("react")),Qe=b.Root;var Ze=b.Value,Ne=X.forwardRef(({children:e,className:t,...r},o)=>(0,Ve.jsxs)(b.Trigger,{className:R("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...r,children:[e,(0,Ve.jsx)(b.Icon,{asChild:!0,children:(0,Ve.jsx)(V.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ne.displayName=b.Trigger.displayName;var Ye=X.forwardRef(({className:e,...t},r)=>(0,Ve.jsx)(b.ScrollUpButton,{className:R("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ve.jsx)(V.ChevronUp,{className:"h-4 w-4"})}));Ye.displayName=b.ScrollUpButton.displayName;var et=X.forwardRef(({className:e,...t},r)=>(0,Ve.jsx)(b.ScrollDownButton,{className:R("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ve.jsx)(V.ChevronDown,{className:"h-4 w-4"})}));et.displayName=b.ScrollDownButton.displayName;var Se=X.forwardRef(({children:e,className:t,position:r="popper",...o},a)=>(0,Ve.jsx)(b.Portal,{children:(0,Ve.jsxs)(b.Content,{className:R("relative Ve-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,ref:a,...o,children:[(0,Ve.jsx)(Ye,{}),(0,Ve.jsx)(b.Viewport,{className:R("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Ve.jsx)(et,{})]})}));Se.displayName=b.Content.displayName;var Zt=X.forwardRef(({className:e,...t},r)=>(0,Ve.jsx)(b.Label,{className:R("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));Zt.displayName=b.Label.displayName;var me=X.forwardRef(({children:e,className:t,...r},o)=>(0,Ve.jsxs)(b.Item,{className:R("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...r,children:[(0,Ve.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ve.jsx)(b.ItemIndicator,{children:(0,Ve.jsx)(V.Check,{className:"h-4 w-4"})})}),(0,Ve.jsx)(b.ItemText,{children:e})]}));me.displayName=b.Item.displayName;var Yt=X.forwardRef(({className:e,...t},r)=>(0,Ve.jsx)(b.Separator,{className:R("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));Yt.displayName=b.Separator.displayName;function rt({document:e,onSave:t,onCancel:r,availableDocuments:o=[],knowledgeContexts:a=[]}){let[n,i]=(0,ct.useState)({...e,updatedAt:new Date}),[s,u]=(0,ct.useState)(!1),[N,v]=(0,ct.useState)(!1),M=()=>{let p=new Set,x=new Set;return a.forEach(y=>{y.menuConfig.groupBy.forEach(k=>p.add(k))}),o.forEach(y=>{y.metadata&&Object.keys(y.metadata).forEach(k=>x.add(k))}),{contextKeys:Array.from(p).sort(),documentKeys:Array.from(x).sort(),allKeys:Array.from(new Set([...p,...x])).sort()}},T=p=>{let x=new Set;return o.forEach(y=>{y.metadata?.[p]&&x.add(String(y.metadata[p]))}),Array.from(x).sort()},d=M(),w=()=>{t(n)},g=(p,x)=>{i(y=>({...y,metadata:{...y.metadata,[p]:x}}))},h=(p,x)=>{x==="__custom__"?g(p,""):g(p,x)},P=()=>{let p=`field_${Date.now()}`;g(p,"")},A=p=>{i(x=>{let y={...x.metadata};return delete y[p],{...x,metadata:y}})};return(0,Ve.jsxs)(Ue.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Ve.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Ve.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Ve.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,Ve.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,Ve.jsx)(V.Edit3,{className:"h-6 w-6 text-primary"})}),(0,Ve.jsx)("div",{className:"flex-1 min-w-0",children:N?(0,Ve.jsx)(W,{value:n.title,onChange:p=>i(x=>({...x,title:p.target.value})),onBlur:()=>v(!1),onKeyDown:p=>{p.key==="Enter"&&v(!1),p.key==="Escape"&&(i(x=>({...x,title:e.title})),v(!1))},autoFocus:!0,className:"text-xl font-bold border-none p-0 h-auto bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0",placeholder:"Document title..."}):(0,Ve.jsxs)("div",{className:"flex items-center gap-2 group",children:[(0,Ve.jsx)("h1",{className:"text-xl font-bold text-foreground cursor-pointer hover:text-primary transition-colors py-1",onClick:()=>v(!0),title:"Click to edit title",children:n.title||"Untitled Document"}),(0,Ve.jsx)(L,{variant:"ghost",size:"sm",onClick:()=>v(!0),className:"opacity-0 group-hover:opacity-100 transition-opacity h-6 w-6 p-0",children:(0,Ve.jsx)(V.Edit3,{className:"h-3 w-3"})})]})})]}),(0,Ve.jsxs)("div",{className:"flex gap-2",children:[(0,Ve.jsxs)(L,{variant:"outline",size:"sm",onClick:r,className:"gap-2",children:[(0,Ve.jsx)(V.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Ve.jsxs)(L,{size:"sm",onClick:w,className:"gap-2",children:[(0,Ve.jsx)(V.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,Ve.jsxs)("div",{className:"space-y-4",children:[(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Description"}),(0,Ve.jsx)(W,{value:n.description||"",onChange:p=>i(x=>({...x,description:p.target.value})),placeholder:"Brief description...",className:"text-sm"})]}),(0,Ve.jsxs)("div",{children:[(0,Ve.jsxs)("button",{type:"button",onClick:()=>u(!s),className:"flex items-center justify-between w-full p-3 bg-muted/20 hover:bg-muted/30 rounded-lg border border-border transition-colors",children:[(0,Ve.jsxs)("div",{className:"flex items-center gap-2",children:[s?(0,Ve.jsx)(V.ChevronDown,{className:"h-4 w-4 text-muted-foreground"}):(0,Ve.jsx)(V.ChevronRight,{className:"h-4 w-4 text-muted-foreground"}),(0,Ve.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Metadata"}),n.metadata&&Object.keys(n.metadata).length>0&&(0,Ve.jsxs)("span",{className:"text-xs bg-primary/10 text-primary px-2 py-1 rounded-full",children:[Object.keys(n.metadata).length," field",Object.keys(n.metadata).length!==1?"s":""]})]}),(0,Ve.jsxs)("div",{className:"flex items-center gap-2",children:[d.contextKeys.length>0&&!s&&(0,Ve.jsxs)("span",{className:"text-xs text-muted-foreground",children:[d.contextKeys.slice(0,2).join(", "),d.contextKeys.length>2&&"..."]}),(0,Ve.jsxs)(L,{type:"button",variant:"ghost",size:"sm",onClick:p=>{p.stopPropagation(),P(),u(!0)},className:"gap-1 h-6 px-2",children:[(0,Ve.jsx)(V.Plus,{className:"h-3 w-3"}),"Add"]})]})]}),s&&(0,Ve.jsx)("div",{className:"mt-3 space-y-2 pl-6",children:n.metadata&&Object.keys(n.metadata).length>0?Object.entries(n.metadata).map(([p,x])=>{let y=T(p);return(0,Ve.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Ve.jsx)(W,{value:p,onChange:k=>{let J=k.target.value,E=n.metadata?.[p];i($=>{let K={...$.metadata};return delete K[p],J&&(K[J]=E||""),{...$,metadata:K}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${p}`}),(0,Ve.jsx)("datalist",{id:`metadata-keys-${p}`,children:d.allKeys.map(k=>(0,Ve.jsx)("option",{value:k},k))}),(0,Ve.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),y.length>0?(0,Ve.jsxs)(Qe,{value:String(x||""),onValueChange:k=>h(p,k),children:[(0,Ve.jsx)(Ne,{className:"flex-1 h-8 text-sm",children:(0,Ve.jsx)(Ze,{placeholder:"Value"})}),(0,Ve.jsxs)(Se,{children:[y.map(k=>(0,Ve.jsx)(me,{value:k,children:k},k)),(0,Ve.jsx)(me,{value:"__custom__",children:(0,Ve.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Ve.jsx)(W,{value:String(x||""),onChange:k=>g(p,k.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Ve.jsx)(L,{type:"button",variant:"ghost",size:"sm",onClick:()=>A(p),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Ve.jsx)(V.X,{className:"h-3 w-3"})})]},p)}):(0,Ve.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/10",children:(0,Ve.jsx)("p",{className:"text-xs text-muted-foreground",children:"No metadata fields yet"})})})]}),(0,Ve.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ve.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Ve.jsx)(le,{variant:"secondary",className:"font-mono",children:n.format.toUpperCase()})]})]})]}),(0,Ve.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Ve.jsxs)("div",{className:"p-8",children:[(0,Ve.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Ve.jsx)(we,{value:n.content||"",onChange:p=>i(x=>({...x,content:p.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var st=e=>(0,Ve.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),ot=e=>(0,Ve.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),er=e=>(0,Ve.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Ve.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,Ve.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Ve.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,Ve.jsx)("pre",{className:"text-sm",children:e})]}),tr=e=>(0,Ve.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Ve.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,Ve.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Ve.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),st(e)]});function it({document:e,onDocumentUpdate:t,editable:r=!0,renderers:o,availableDocuments:a=[],knowledgeContexts:n=[]}){let[i,s]=(0,ct.useState)(!1),u=d=>{switch(d){case"markdown":case"mdx":return(0,Ve.jsx)(V.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,Ve.jsx)(V.File,{className:"h-6 w-6 text-success"});case"text":return(0,Ve.jsx)(V.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Ve.jsx)(V.File,{className:"h-6 w-6 text-muted-foreground"})}},N=d=>{switch(d){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},v=(d,w)=>{let g={markdown:st,mdx:tr,richtext:er,text:ot},h=o?.[w]||g[w];return h?h(d):ot(d)},M=d=>{s(!1),t?.(d)},T=()=>{s(!1)};return i?(0,Ve.jsx)(rt,{document:e,onSave:M,onCancel:T,availableDocuments:a,knowledgeContexts:n}):(0,Ve.jsxs)(Ue.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Ve.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Ve.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Ve.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,Ve.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:u(e.format)}),(0,Ve.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ve.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Ve.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),r&&(0,Ve.jsx)("div",{className:"flex-shrink-0",children:(0,Ve.jsxs)(L,{variant:"outline",size:"sm",onClick:()=>s(!0),className:"gap-2",children:[(0,Ve.jsx)(V.Edit3,{className:"h-4 w-4"}),"Edit"]})})]}),(0,Ve.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Ve.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${N(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(d=>(0,Ve.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",d]},d))]})]}),(0,Ve.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Ve.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Ve.jsxs)("div",{className:"mb-6",children:[(0,Ve.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Ve.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,Ve.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-xs",children:Object.entries(e.metadata).map(([d,w])=>(0,Ve.jsxs)("div",{className:"flex gap-1",children:[(0,Ve.jsxs)("span",{className:"text-muted-foreground font-medium",children:[d.replace(/([A-Ue])/g," $1").trim(),":"]}),(0,Ve.jsx)("span",{className:"text-foreground truncate",children:String(w)})]},d))})})]}),(0,Ve.jsx)("div",{className:"space-y-4",children:e.content?(0,Ve.jsx)("div",{className:"relative",children:(0,Ve.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:v(e.content,e.format)})}):(0,Ve.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,Ve.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Ve.jsx)(V.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Ve.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Ve.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function lt({label:e,documents:t,children:r,level:o,onDocumentClick:a,selectedDocumentId:n,showDocumentCount:i=!0}){let[s,u]=(0,ct.useState)(o===0),N=r&&Object.keys(r).length>0,v=t.length+(r?Object.values(r).reduce((d,w)=>d+w.documents.length,0):0),M=d=>{switch(d){case"markdown":case"mdx":return(0,Ve.jsx)(V.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,Ve.jsx)(V.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,Ve.jsx)(V.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},T=d=>{let w=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return w[d%w.length]};return(0,Ve.jsxs)("div",{className:"space-y-1",children:[(N||t.length>0)&&(0,Ve.jsxs)(Ue.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${s?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>u(!s),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Ve.jsx)("div",{className:`w-1 h-6 rounded-full ${T(o)}`}),(0,Ve.jsx)(Ue.motion.div,{animate:{rotate:s?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Ve.jsx)(V.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,Ve.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,Ve.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,Ve.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),i&&v>0&&(0,Ve.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Ve.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:v})})]})]}),(0,Ve.jsx)(Ue.motion.div,{initial:!1,animate:{height:s?"auto":0,opacity:s?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Ve.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((d,w)=>(0,Ve.jsxs)(Ue.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:w*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${n===d.id?"bg-primary/10 border-Ve-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>a?.(d),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Ve.jsx)("div",{className:"flex-shrink-0",children:M(d.format)}),(0,Ve.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ve.jsx)("p",{className:`text-sm truncate transition-colors ${n===d.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:d.title}),d.description&&(0,Ve.jsx)("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:d.description})]}),d.tags&&d.tags.length>0&&(0,Ve.jsx)("div",{className:"flex-shrink-0",children:(0,Ve.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:d.tags[0]})})]},d.id)),r&&Object.entries(r).map(([d,w])=>(0,Ve.jsx)(lt,{label:d,documents:w.documents,children:w.children,level:o+1,onDocumentClick:a,selectedDocumentId:n,showDocumentCount:i},d))]})})]})}function dt({documents:e,menuConfig:t,onDocumentClick:r,onDocumentShare:o,onDocumentUpdate:a,selectedDocumentId:n,className:i,editable:s=!0}){let[u,N]=(0,ct.useState)(""),[v,M]=(0,ct.useState)(null),T=(0,ct.useMemo)(()=>u?e.filter(g=>g.title.toLowerCase().includes(u.toLowerCase())||g.description?.toLowerCase().includes(u.toLowerCase())||g.tags?.some(h=>h.toLowerCase().includes(u.toLowerCase()))||Object.values(g.metadata||{}).some(h=>String(h).toLowerCase().includes(u.toLowerCase()))):e,[e,u]),d=(0,ct.useMemo)(()=>{let g=(h,P)=>{if(P.length===0)return{};let[A,...p]=P;return h.reduce((y,k)=>{let J=k.metadata?.[A]||"Uncategorized",E=String(J);if(y[E]||(y[E]={documents:[],children:{}}),p.length===0)y[E].documents.push(k);else{let $=g([k],p),K=Object.keys($)[0];K&&(y[E].children||(y[E].children={}),y[E].children[K]?y[E].children[K].documents.push(...$[K].documents):y[E].children[K]=$[K])}return y},{})};return g(T,t.groupBy)},[T,t.groupBy]),w=g=>{M(g),r?.(g)};return(0,Ve.jsxs)("div",{className:`flex h-full ${i||""}`,children:[(0,Ve.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,Ve.jsx)("div",{className:"p-6 border-b border-border",children:(0,Ve.jsxs)("div",{className:"relative",children:[(0,Ve.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Ve.jsx)(V.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,Ve.jsx)(W,{placeholder:"Search knowledge base...",value:u,onChange:g=>N(g.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Ve.jsx)(ye,{className:"h-[calc(100%-100px)]",children:(0,Ve.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(d).map(([g,h])=>(0,Ve.jsx)(lt,{label:g,documents:h.documents,children:h.children,level:0,onDocumentClick:w,selectedDocumentId:n,showDocumentCount:t.showDocumentCount},g)),Object.keys(d).length===0&&(0,Ve.jsxs)(Ue.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Ve.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Ve.jsx)(V.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Ve.jsx)("p",{className:"text-sm font-medium",children:"No documents found"}),(0,Ve.jsx)("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,Ve.jsx)("div",{className:"flex-1 bg-background",children:v?(0,Ve.jsx)(it,{document:v,onDocumentUpdate:a,editable:s}):(0,Ve.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,Ve.jsxs)(Ue.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,Ve.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Ve.jsx)(V.FileText,{className:"h-10 w-10 text-primary"})}),(0,Ve.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,Ve.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function mt({documents:e=[],contexts:t=[],onDocumentClick:r=i=>console.log("Document clicked:",i),onDocumentShare:o=i=>console.log("Share document:",i),onLoadDocumentContent:a,selectedDocumentId:n}){let[i,s]=(0,ct.useState)(t[0]);return!t||t.length===0?(0,Ve.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Ve.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,Ve.jsx)(xe,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,Ve.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,Ve.jsx)("p",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,Ve.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Ve.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,Ve.jsx)(xe,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,Ve.jsxs)("div",{className:"mt-6",children:[(0,Ve.jsx)("div",{className:"border-b border-border",children:(0,Ve.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(u=>(0,Ve.jsxs)("button",{onClick:()=>s(u),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${i.id===u.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[u.icon,u.label]},u.id))})}),i.description&&(0,Ve.jsx)("div",{className:"mt-3 px-1",children:(0,Ve.jsx)("p",{className:"text-sm text-muted-foreground",children:i.description})})]})]}),(0,Ve.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,Ve.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,Ve.jsx)(dt,{documents:e,menuConfig:i.menuConfig,onDocumentClick:r,onDocumentShare:o,selectedDocumentId:n})})})]})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-5SIP7DC5.mjs";import"../../../chunk-2NMVE5M4.mjs";import"../../../chunk-ATIEKI6M.mjs";import"../../../chunk-LW4QFIFR.mjs";import"../../../chunk-553B5H2H.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-FLHDNCNY.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as default};
|