@sudobility/components 3.0.57 → 3.1.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/index.esm.js +0 -48
- package/dist/index.umd.js +1 -1
- package/dist/seo/index.d.ts +1 -1
- package/dist/seo/index.d.ts.map +1 -1
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/ui/section.d.ts +0 -16
- package/dist/ui/section.d.ts.map +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -9716,54 +9716,6 @@ q("min-h-screen flex flex-col", {
|
|
|
9716
9716
|
overflow: "visible"
|
|
9717
9717
|
}
|
|
9718
9718
|
});
|
|
9719
|
-
q("", {
|
|
9720
|
-
variants: {
|
|
9721
|
-
variant: {
|
|
9722
|
-
default: "",
|
|
9723
|
-
hero: "relative overflow-hidden",
|
|
9724
|
-
feature: "bg-white dark:bg-gray-800",
|
|
9725
|
-
cta: "relative overflow-hidden",
|
|
9726
|
-
testimonial: "bg-gray-50 dark:bg-gray-900",
|
|
9727
|
-
footer: "bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border-t"
|
|
9728
|
-
},
|
|
9729
|
-
spacing: {
|
|
9730
|
-
none: "",
|
|
9731
|
-
xs: "py-2",
|
|
9732
|
-
// 8px
|
|
9733
|
-
sm: "py-3",
|
|
9734
|
-
// 12px
|
|
9735
|
-
md: "py-4",
|
|
9736
|
-
// 16px
|
|
9737
|
-
lg: "py-6",
|
|
9738
|
-
// 24px
|
|
9739
|
-
xl: "py-8",
|
|
9740
|
-
// 32px
|
|
9741
|
-
"2xl": "py-12",
|
|
9742
|
-
// 48px
|
|
9743
|
-
"3xl": "py-16",
|
|
9744
|
-
// 64px
|
|
9745
|
-
"4xl": "py-20",
|
|
9746
|
-
// 80px
|
|
9747
|
-
"5xl": "py-24"
|
|
9748
|
-
// 96px
|
|
9749
|
-
},
|
|
9750
|
-
background: {
|
|
9751
|
-
none: "bg-transparent",
|
|
9752
|
-
default: "bg-gray-50 dark:bg-gray-900",
|
|
9753
|
-
surface: "bg-white dark:bg-gray-800",
|
|
9754
|
-
gradient: "bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/50 dark:to-purple-900/50",
|
|
9755
|
-
"gradient-primary": "bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-blue-900/50 dark:to-indigo-900/50",
|
|
9756
|
-
"gradient-secondary": "bg-gradient-to-br from-green-50 to-blue-100 dark:from-green-900/50 dark:to-blue-900/50",
|
|
9757
|
-
"gradient-tertiary": "bg-gradient-to-r from-emerald-50 to-teal-50 dark:from-gray-800 dark:to-gray-900",
|
|
9758
|
-
"gradient-vibrant": "bg-gradient-to-br from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"
|
|
9759
|
-
}
|
|
9760
|
-
},
|
|
9761
|
-
defaultVariants: {
|
|
9762
|
-
variant: "default",
|
|
9763
|
-
spacing: "3xl",
|
|
9764
|
-
background: "none"
|
|
9765
|
-
}
|
|
9766
|
-
});
|
|
9767
9719
|
const mt = W.Root, Da = W.Value, Oe = V.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__ */ m(
|
|
9768
9720
|
W.Trigger,
|
|
9769
9721
|
{
|
package/dist/index.umd.js
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
.animate-bounce-slow {
|
|
43
43
|
animation: bounce-slow 4s ease-in-out infinite;
|
|
44
44
|
}
|
|
45
|
-
`,Yo(y))}}},[t]),e.jsx("div",{ref:b,className:`${v()} ${s}`,children:n})},Qo=({children:t,delay:r=0,className:a=""})=>e.jsx(Se,{animation:"fade-in-up",delay:r,className:a,children:t}),Zo=({children:t,delay:r=0,className:a=""})=>e.jsx(Se,{animation:"fade-in-scale",delay:r,className:a,children:t}),Xo=({children:t,className:r=""})=>e.jsx(Se,{animation:"float",className:r,children:t}),Jo=({isOpen:t,onClick:r,opacity:a="medium",blur:o=!1,zIndex:n=50,className:s,children:l})=>{const c={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/80"};return t?e.jsx("div",{onClick:r,className:u("fixed inset-0","transition-all duration-200",c[a],o&&"backdrop-blur-sm",s),style:{zIndex:n},role:"presentation","aria-hidden":"true",children:l}):null},Ur=({children:t,container:r})=>{const[a,o]=m.useState(!1);if(m.useEffect(()=>(o(!0),()=>o(!1)),[]),!a)return null;const n=r||document.body;return Ae.createPortal(t,n)},Ro=({isOpen:t,onClose:r,children:a,blur:o=!1,opacity:n="medium",zIndex:s=40,lockScroll:l=!0,className:c})=>{if(m.useEffect(()=>{if(l){if(t){const g=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${g}px`}else document.body.style.overflow="",document.body.style.paddingRight="";return()=>{document.body.style.overflow="",document.body.style.paddingRight=""}}},[t,l]),!t)return null;const d={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/85"};return e.jsx(Ur,{children:e.jsx("div",{className:u("fixed inset-0","transition-opacity duration-300",o&&"backdrop-blur-sm",d[n],c),style:{zIndex:s},onClick:r,"aria-hidden":"true",children:a&&e.jsx("div",{className:"relative h-full w-full",onClick:g=>g.stopPropagation(),children:a})})})},en=({isOpen:t,onClose:r,children:a,size:o="md",showCloseButton:n=!0,closeOnOutsideClick:s=!0,closeOnEscape:l=!0,className:c})=>{if(m.useEffect(()=>{if(!l||!t||!r)return;const h=b=>{b.key==="Escape"&&r()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,r,l]),!t)return null;const d={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-full mx-4"},g=()=>{s&&r&&r()};return e.jsxs(Ur,{children:[e.jsx(Ro,{isOpen:t,onClose:g,opacity:"dark",blur:!0}),e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:u("relative w-full",d[o],"bg-white dark:bg-gray-900","rounded-lg shadow-xl","animate-in fade-in zoom-in-95 duration-200",c),onClick:h=>h.stopPropagation(),children:[n&&r&&e.jsx("button",{onClick:r,className:"absolute top-4 right-4 z-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close dialog",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a]})})]})},rn=({isOpen:t,onClose:r,items:a,placeholder:o="Type a command or search...",emptyMessage:n="No results found.",className:s})=>{const[l,c]=m.useState(""),[d,g]=m.useState(0),h=m.useRef(null),b=a.filter(f=>{const w=l.toLowerCase();return f.label.toLowerCase().includes(w)||f.keywords?.some(N=>N.toLowerCase().includes(w))||f.group?.toLowerCase().includes(w)}),v=b.reduce((f,w)=>{const N=w.group||"Commands";return f[N]||(f[N]=[]),f[N].push(w),f},{});m.useEffect(()=>{t||(c(""),g(0))},[t]),m.useEffect(()=>{t&&h.current&&h.current.focus()},[t]),m.useEffect(()=>{g(0)},[l]);const p=f=>{switch(f.key){case"ArrowDown":f.preventDefault(),g(w=>w<b.length-1?w+1:w);break;case"ArrowUp":f.preventDefault(),g(w=>w>0?w-1:w);break;case"Enter":f.preventDefault(),b[d]&&(b[d].onSelect(),r());break;case"Escape":f.preventDefault(),r();break}},y=f=>{f.onSelect(),r()};return e.jsxs(en,{isOpen:t,onClose:r,size:"lg",showCloseButton:!1,className:u("overflow-hidden p-0",s),children:[e.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),e.jsx("input",{ref:h,type:"text",value:l,onChange:f=>c(f.target.value),onKeyDown:p,placeholder:o,className:"flex-1 bg-transparent border-none outline-none text-gray-900 dark:text-white placeholder-gray-500"})]})}),e.jsx("div",{className:"max-h-96 overflow-y-auto p-2",children:Object.keys(v).length===0?e.jsx("div",{className:"px-4 py-8 text-sm text-gray-500 dark:text-gray-400 text-center",children:n}):Object.entries(v).map(([f,w])=>e.jsxs("div",{className:"mb-4 last:mb-0",children:[e.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:f}),e.jsx("div",{className:"space-y-1",children:w.map(N=>{const S=b.indexOf(N)===d;return e.jsxs("button",{onClick:()=>y(N),className:u("w-full flex items-center gap-3 px-3 py-2 rounded-md","text-sm text-left transition-colors",S?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-900 dark:text-white"),children:[N.icon&&e.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:N.icon}),e.jsx("span",{className:"flex-1 truncate",children:N.label}),N.shortcut&&e.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500 dark:text-gray-400 font-mono",children:N.shortcut})]},N.id)})})]},f))}),e.jsxs("div",{className:"border-t border-gray-200 dark:border-gray-700 px-4 py-2 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↑"}),e.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↓"}),"to navigate"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↵"}),"to select"]})]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"esc"}),"to close"]})]})]})},tn=V.cva("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 transition-all duration-200",{variants:{variant:{default:"border-gray-200 dark:border-gray-700 border hover:shadow-lg",elevated:"shadow-lg hover:shadow-xl",minimal:"bg-transparent shadow-none border-none p-4"},trend:{none:"",up:"border-l-4 border-green-500",down:"border-l-4 border-red-500",neutral:"border-l-4 border-gray-400"}},defaultVariants:{variant:"default",trend:"none"}}),an=({label:t,value:r,change:a,trend:o="none",icon:n,variant:s="default",className:l})=>{const c={up:"text-green-600 dark:text-green-400",down:"text-red-600 dark:text-red-400",neutral:"text-gray-600 dark:text-gray-400",none:"text-gray-600 dark:text-gray-400"},d={up:"↗",down:"↘",neutral:"→",none:""};return e.jsx("div",{className:u(tn({variant:s,trend:o}),l),children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:t}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:r}),a&&e.jsxs("p",{className:u("text-sm font-medium flex items-center gap-1 mt-1",c[o||"none"]),children:[e.jsx("span",{children:d[o||"none"]}),a]})]}),n&&e.jsx("div",{className:"text-3xl opacity-80",children:n})]})})},on=V.cva("space-y-6",{variants:{variant:{default:"",card:"bg-white dark:bg-gray-800 rounded-lg border-gray-200 dark:border-gray-700 border p-6",minimal:"space-y-4"},spacing:{tight:"space-y-3",normal:"space-y-4",relaxed:"space-y-6",loose:"space-y-8"}},defaultVariants:{variant:"default",spacing:"normal"}}),nn=({title:t,description:r,children:a,variant:o="default",spacing:n="normal",className:s})=>e.jsxs("div",{className:u(on({variant:o,spacing:n}),s),children:[(t||r)&&e.jsxs("div",{className:"space-y-1",children:[t&&e.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:t}),r&&e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r})]}),a]}),sn=V.cva("flex flex-col items-center text-center space-y-4",{variants:{layout:{vertical:"flex-col items-center text-center",horizontal:"flex-row items-start text-left space-y-0 space-x-4",minimal:"flex-col space-y-2"},spacing:{tight:"space-y-2",normal:"space-y-4",relaxed:"space-y-6"},interactive:{true:"transition-all duration-200 hover:transform hover:scale-105 cursor-pointer",false:""}},defaultVariants:{layout:"vertical",spacing:"normal",interactive:!1}}),ln=({icon:t,title:r,description:a,layout:o="vertical",spacing:n="normal",interactive:s=!1,className:l,onClick:c})=>e.jsxs("div",{className:u(sn({layout:o,spacing:n,interactive:s}),l),onClick:c,children:[e.jsx("div",{className:"text-4xl mb-4 flex-shrink-0",children:t}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white",children:r}),e.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:a})]})]}),dn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfocusUindicator",children:r||"UfocusUindicator Component"}),cn=({icon:t,size:r="md",shape:a="rounded",variant:o="blue-purple",gradientClasses:n,className:s,iconClassName:l})=>{const c={sm:{container:"w-10 h-10",icon:"h-5 w-5"},md:{container:"w-12 h-12",icon:"h-6 w-6"},lg:{container:"w-16 h-16",icon:"h-8 w-8"},xl:{container:"w-20 h-20",icon:"h-10 w-10"}},d={square:"rounded-lg",rounded:"rounded-xl",circle:"rounded-full"},g={"blue-purple":"bg-gradient-to-r from-blue-600 to-purple-600","green-blue":"bg-gradient-to-r from-green-600 to-blue-600","orange-red":"bg-gradient-to-r from-orange-600 to-red-600",gray:"bg-gradient-to-r from-gray-600 to-gray-800 dark:from-gray-700 dark:to-gray-900",custom:n||"bg-gradient-to-r from-blue-600 to-purple-600"},h=c[r];return e.jsx("div",{className:u("flex items-center justify-center flex-shrink-0",h.container,d[a],g[o],s),children:e.jsx(t,{className:u("text-white",h.icon,l)})})},gn={sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 h-24"},un={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},hn={primary:"bg-gradient-to-br from-blue-100 to-blue-200 text-blue-600 shadow-lg hover:shadow-blue-200",secondary:"bg-gradient-to-br from-purple-100 to-purple-200 text-purple-600 shadow-lg hover:shadow-purple-200",success:"bg-gradient-to-br from-green-100 to-green-200 text-green-600 shadow-lg hover:shadow-green-200",warning:"bg-gradient-to-br from-yellow-100 to-yellow-200 text-yellow-600 shadow-lg hover:shadow-yellow-200",error:"bg-gradient-to-br from-red-100 to-red-200 text-red-600 shadow-lg hover:shadow-red-200",neutral:"bg-gradient-to-br from-gray-100 to-gray-200 text-gray-600 shadow-lg hover:shadow-gray-200"},bn={square:"rounded-none",rounded:"rounded-2xl",circle:"rounded-full"},yn={none:"",float:"animate-float",pulse:"animate-pulse",bounce:"animate-bounce-slow"},fn=({children:t,size:r="lg",variant:a="primary",shape:o="rounded",animation:n="float",className:s})=>e.jsx("div",{className:u("flex items-center justify-center mx-auto mb-6 transition-all duration-300 group-hover:scale-105",gn[r],hn[a],bn[o],yn[n],s),children:e.jsx("div",{className:u(un[r]),children:t})}),pn=({icon:t,children:r,iconPosition:a="left",gap:o="md",iconSize:n="md",align:s="left",variant:l="default",className:c,iconClassName:d,textClassName:g})=>{const h={xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4"},b={xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-8 w-8"},v={left:"text-left",center:"text-center items-center",right:"text-right items-end"},p={default:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400",muted:"text-gray-500 dark:text-gray-400"},y={left:"flex items-center",right:"flex flex-row-reverse items-center",top:"flex flex-col"};return e.jsxs("div",{className:u(y[a],h[o],a==="top"&&v[s],p[l],c),children:[e.jsx(t,{className:u(b[n],"flex-shrink-0",d)}),e.jsx("span",{className:u(g),children:r})]})},mn=({children:t,title:r,variant:a="info",size:o="md",icon:n,bordered:s=!0,className:l})=>{const c={info:{bg:"bg-blue-50 dark:bg-blue-900/20",border:"border-blue-200 dark:border-blue-800",title:"text-blue-900 dark:text-blue-300",text:"text-blue-800 dark:text-blue-400",icon:"text-blue-600 dark:text-blue-400"},success:{bg:"bg-green-50 dark:bg-green-900/20",border:"border-green-200 dark:border-green-800",title:"text-green-900 dark:text-green-300",text:"text-green-800 dark:text-green-400",icon:"text-green-600 dark:text-green-400"},warning:{bg:"bg-yellow-50 dark:bg-yellow-900/20",border:"border-yellow-200 dark:border-yellow-800",title:"text-yellow-900 dark:text-yellow-300",text:"text-yellow-800 dark:text-yellow-400",icon:"text-yellow-600 dark:text-yellow-400"},danger:{bg:"bg-red-50 dark:bg-red-900/20",border:"border-red-200 dark:border-red-800",title:"text-red-900 dark:text-red-300",text:"text-red-800 dark:text-red-400",icon:"text-red-600 dark:text-red-400"},neutral:{bg:"bg-gray-50 dark:bg-gray-800",border:"border-gray-200 dark:border-gray-700",title:"text-gray-900 dark:text-gray-100",text:"text-gray-700 dark:text-gray-300",icon:"text-gray-600 dark:text-gray-400"}},d={sm:"p-3",md:"p-4",lg:"p-6"},g=c[a];return e.jsxs("div",{className:u("rounded-lg",g.bg,s&&`border ${g.border}`,d[o],l),children:[(r||n)&&e.jsxs("div",{className:"flex items-start gap-3 mb-2",children:[n&&e.jsx(n,{className:u("h-5 w-5 flex-shrink-0 mt-0.5",g.icon)}),r&&e.jsx("h3",{className:u(T.body.strong.md(),g.title),children:r})]}),e.jsx("div",{className:u(!r&&!n&&g.text),children:t})]})},xn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UkeyboardUshortcut",children:r||"UkeyboardUshortcut Component"}),vn=({size:t="md",className:r="",showText:a=!0,onClick:o,logoSrc:n="/logo.png",logoAlt:s="Logo",logoText:l,fontFamily:c="Dancing Script, cursive"})=>{const g=(()=>{switch(t){case"sm":return{container:"space-x-2",image:"h-6 w-6",text:"text-lg"};case"md":return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"};case"lg":return{container:"space-x-3",image:"h-10 w-10",text:"text-3xl"};case"xl":return{container:"space-x-4",image:"h-12 w-12",text:"text-4xl"};default:return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"}}})(),h=e.jsxs(e.Fragment,{children:[e.jsx("img",{src:n,alt:s,className:g.image}),a&&e.jsx("div",{className:`${g.text} font-bold text-gray-900 dark:text-gray-100`,style:{fontFamily:c,fontWeight:"700"},children:l})]});return o?e.jsx("button",{onClick:o,className:`flex items-center ${g.container} ${r} hover:opacity-80 transition-opacity`,children:h}):e.jsx("div",{className:`flex items-center ${g.container} ${r}`,children:h})},kn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmorphUtransition",children:r||"UmorphUtransition Component"}),wn=({title:t,description:r,count:a,countLabel:o,action:n,loading:s=!1,loadingText:l="Loading...",size:c="md",className:d})=>{const h={sm:{title:T.heading.h4(),description:T.body.sm(),count:T.caption.default()},md:{title:T.heading.h3(),description:T.body.md(),count:T.body.sm()},lg:{title:T.heading.h2(),description:T.body.lg(),count:T.body.md()}}[c];return e.jsxs("div",{className:u("flex items-start justify-between gap-4",d),children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx("h2",{className:u(h.title,"text-gray-900 dark:text-gray-100"),children:t}),a!==void 0&&e.jsxs("span",{className:u(h.count,"text-gray-500 dark:text-gray-400"),children:["(",a,o&&` ${o}`,")"]}),s&&e.jsxs("span",{className:u(h.count,"text-gray-500 dark:text-gray-400 flex items-center gap-2"),children:[e.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"}),l]})]}),r&&e.jsx("p",{className:u(h.description,"mt-1 text-gray-600 dark:text-gray-400"),children:r})]}),n&&e.jsx("div",{className:"flex-shrink-0",children:n})]})},Cn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UparallaxUscroll",children:r||"UparallaxUscroll Component"}),Nn=({actions:t,orientation:r="horizontal",columns:a=3,className:o})=>{const n={default:"bg-white dark:bg-gray-900 hover:bg-gray-50 dark:hover:bg-gray-800 text-gray-900 dark:text-white border-gray-200 dark:border-gray-700",primary:"bg-blue-500 hover:bg-blue-600 text-white border-blue-500",success:"bg-green-500 hover:bg-green-600 text-white border-green-500",warning:"bg-yellow-500 hover:bg-yellow-600 text-white border-yellow-500",danger:"bg-red-500 hover:bg-red-600 text-white border-red-500"},s={horizontal:"flex flex-wrap gap-2",vertical:"flex flex-col gap-2",grid:"grid gap-2"};return e.jsx("div",{className:u(s[r],r==="grid"&&`grid-cols-${a}`,o),style:r==="grid"?{gridTemplateColumns:`repeat(${a}, 1fr)`}:void 0,children:t.map(l=>e.jsxs("button",{onClick:l.onClick,disabled:l.disabled,className:u("flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors font-medium",n[l.variant||"default"],l.disabled&&"opacity-50 cursor-not-allowed"),children:[l.icon&&e.jsx("span",{className:"w-5 h-5",children:l.icon}),e.jsx("span",{children:l.label})]},l.id))})},Sn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UrevealUonUscroll",children:r||"UrevealUonUscroll Component"}),En={sm:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},md:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},lg:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"}},Ln=({icon:t,text:r,variant:a="default",size:o="md",className:n})=>{const{container:s,icon:l}=_t(a),c=En[o];return e.jsxs("div",{className:u("inline-flex items-center rounded-full mb-6",s,c.container,n),children:[e.jsx("div",{className:u("animate-float-icon",l,c.icon),children:t}),e.jsx("span",{className:c.text,children:r})]})},$n=({title:t,onAdd:r,addButtonTooltip:a,loading:o,className:n=""})=>e.jsx("div",{className:`p-4 border-b border-gray-200 dark:border-gray-700 ${n}`,children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:t}),e.jsxs("div",{className:"flex items-center space-x-2",children:[o&&e.jsx("div",{className:"w-5 h-5 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}),r&&e.jsx("button",{onClick:r,className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors",title:a,"aria-label":a||"Add",children:e.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})})]})]})}),In=t=>{switch(t){case"cog":return M.Cog6ToothIcon;case"arrow-right":return M.ArrowRightIcon;case"shield":return M.ShieldCheckIcon;case"reply":case"chat":return M.ChatBubbleLeftRightIcon;case"filter":return M.FunnelIcon;case"plug":return M.LinkIcon;case"adjustments":return M.AdjustmentsHorizontalIcon;case"currency-dollar":return M.CurrencyDollarIcon;default:return M.Cog6ToothIcon}},Un=({settings:t,selectedSetting:r,onSettingSelect:a,className:o=""})=>e.jsx("nav",{className:u("space-y-1",o),"aria-label":"Settings navigation",children:e.jsx("ul",{className:"space-y-1",role:"list",children:t.map(n=>{const s=In(n.icon),l=r===n.id;return e.jsx("li",{children:e.jsx("button",{onClick:()=>a(n.id),className:u("w-full flex items-center text-left px-3 py-2 rounded-lg transition-colors h-[44px]",T.body.sm(),l?"bg-orange-100 dark:bg-orange-900/30 text-orange-700 dark:text-orange-300":"hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300"),"aria-current":l?"page":void 0,title:n.description,children:e.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[e.jsx(s,{className:"h-5 w-5 mr-3 flex-shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:n.title})]})})},n.id)})})}),Mn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UskipUnavigation",children:r||"UskipUnavigation Component"}),Tn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsortUdropdown",children:r||"UsortUdropdown Component"}),An=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UversionUbadge",children:r||"UversionUbadge Component"}),Pn=({children:t,as:r="span"})=>e.jsx(r,{className:"sr-only",children:t}),Ee=V.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:T.link.subtle(),default:T.link.default(),muted:T.link.muted(),external:T.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),Fe=O.forwardRef(({className:t,variant:r,size:a,to:o,href:n,external:s,children:l,...c},d)=>{const g=o||n;return g?s||g.startsWith("http")||g.startsWith("mailto:")?e.jsx("a",{className:u(Ee({variant:r==="subtle"?"external":r,size:a,className:t})),href:g,target:"_blank",rel:"noopener noreferrer",ref:d,...c,children:l}):e.jsx(ve.Link,{className:u(Ee({variant:r,size:a,className:t})),to:g,ref:d,...c,children:l}):e.jsx("span",{className:u(Ee({variant:r,size:a,className:t})),...c,children:l})});Fe.displayName="SmartLink";const zn=(t,r)=>O.useMemo(()=>{let a=t;return Object.entries(r).forEach(([o,n])=>{const s=new RegExp(`\\b${o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");a=a.replace(s,l=>`<SmartLink to="${n}" variant="subtle">${l}</SmartLink>`)}),a},[t,r]),Dn={documentation:"/document",settings:"/settings",about:"/about",contact:"/contact","privacy policy":"/privacy",privacy:"/privacy","terms of service":"/terms",terms:"/terms","cookie policy":"/cookies",cookies:"/cookies",points:"/points","earn points":"/how-to-earn-points","how to earn points":"/how-to-earn-points","connect wallet":"/connect","connect your wallet":"/connect","wallet connection":"/connect",wallet:"/connect",compose:"/compose","compose email":"/compose","send email":"/compose",mail:"/mail",email:"/mail",inbox:"/mail",dashboard:"/mail",delegate:"/delegate",delegation:"/delegate",manage:"/manage","manage preferences":"/preferences",profile:"/settings",account:"/settings",preferences:"/preferences",token:"/token","web3 users":"/web3-users","web3 projects":"/web3-projects","get started":"/connect","start here":"/connect","learn more":"/document","read more":"/document","our features":"/document",support:"/contact",help:"/document","contact us":"/contact"},jn=({children:t,mappings:r=Dn,className:a,variant:o="subtle"})=>{const n=O.useMemo(()=>{if(!t||typeof t!="string")return t||"";let l=t;return Object.entries(r).sort(([d],[g])=>g.length-d.length).forEach(([d,g])=>{if(d&&g){const h=new RegExp(`\\b${d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");l=l.replace(h,b=>`__LINK_START__${g}__LINK_MID__${b}__LINK_END__`)}}),l},[t,r]);if(!n||typeof n!="string")return e.jsx("span",{className:a,children:t});const s=n.split(/(__LINK_START__.*?__LINK_END__)/);return e.jsx("span",{className:a,children:s.map((l,c)=>{const d=l.match(/__LINK_START__(.*?)__LINK_MID__(.*?)__LINK_END__/);if(d){const[,g,h]=d;return e.jsx(Fe,{to:g,variant:o,children:h},c)}return l})})},Bn=({href:t,children:r,variant:a="default",external:o=!1,showExternalIcon:n=!1,disabled:s=!1,className:l,...c})=>{const d=o||t.startsWith("http://")||t.startsWith("https://"),g={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium",secondary:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100",muted:"text-gray-500 dark:text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",underline:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 underline"},h=d?{target:"_blank",rel:"noopener noreferrer"}:{};return s?e.jsxs("span",{className:u("cursor-not-allowed opacity-50",g[a],l),children:[r,n&&d&&e.jsx(M.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1"})]}):e.jsxs("a",{href:t,className:u("inline-flex items-center transition-colors",g[a],l),...h,...c,children:[r,n&&d&&e.jsx(M.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1 flex-shrink-0"})]})},Wn=({href:t,children:r,showIcon:a=!0,iconPosition:o="right",size:n="md",variant:s="default",className:l,onClick:c})=>{const d={sm:{text:T.body.sm(),icon:"h-3 w-3",gap:"gap-1"},md:{text:T.body.md(),icon:"h-4 w-4",gap:"gap-1.5"},lg:{text:T.body.lg(),icon:"h-5 w-5",gap:"gap-2"}},g={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-700 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-200 font-semibold",muted:"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"},h=d[n];return e.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",onClick:c,className:u("inline-flex items-center",h.gap,h.text,g[s],"underline decoration-1 underline-offset-2","hover:decoration-2","transition-all duration-200",l),children:[a&&o==="left"&&e.jsx(M.ArrowTopRightOnSquareIcon,{className:u(h.icon,"flex-shrink-0")}),e.jsx("span",{children:r}),a&&o==="right"&&e.jsx(M.ArrowTopRightOnSquareIcon,{className:u(h.icon,"flex-shrink-0")})]})},Fn=({items:t,separator:r="/",className:a})=>e.jsx("nav",{className:u("flex items-center gap-2 text-sm",a),children:t.map((o,n)=>e.jsxs(m.Fragment,{children:[n>0&&e.jsx("span",{className:"text-gray-400 dark:text-gray-600",children:r}),n===t.length-1?e.jsx("span",{className:"text-gray-900 dark:text-white font-medium",children:o.label}):e.jsx("button",{onClick:o.onClick,className:"text-blue-600 dark:text-blue-400 hover:underline",children:o.label})]},n))}),On=H.Root,Mr=O.forwardRef(({className:t,...r},a)=>e.jsx(H.List,{ref:a,className:u(D.navigation.tabs.list(),t),...r}));Mr.displayName=H.List.displayName;const Tr=O.forwardRef(({className:t,...r},a)=>e.jsx(H.Trigger,{ref:a,className:u(D.navigation.tabs.trigger(),t),...r}));Tr.displayName=H.Trigger.displayName;const Ar=O.forwardRef(({className:t,...r},a)=>e.jsx(H.Content,{ref:a,className:u(D.navigation.tabs.content(),t),...r}));Ar.displayName=H.Content.displayName;const Vn=({items:t,orientation:r="horizontal",className:a})=>{const[o,n]=m.useState(new Set),s=c=>{n(d=>{const g=new Set(d);return g.has(c)?g.delete(c):g.add(c),g})},l=(c,d)=>{const g=c.children&&c.children.length>0,h=o.has(d),b=e.jsxs(e.Fragment,{children:[c.icon&&e.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:c.icon}),e.jsx("span",{className:"flex-1",children:c.label}),g&&e.jsx("svg",{className:u("w-4 h-4 transition-transform",r==="horizontal"&&!h&&"-rotate-90",h&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),v=u("flex items-center gap-2 px-4 py-2 text-sm font-medium","transition-colors",c.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800");return e.jsxs("div",{children:[g?e.jsx("button",{onClick:()=>s(d),className:u(v,"w-full"),children:b}):c.href?e.jsx("a",{href:c.href,className:v,onClick:c.onClick,children:b}):e.jsx("button",{onClick:c.onClick,className:u(v,"w-full"),children:b}),g&&h&&e.jsx("div",{className:u("bg-gray-50 dark:bg-gray-800/50",r==="horizontal"?"pl-4":"border-l-2 border-gray-200 dark:border-gray-700 ml-4"),children:c.children.map((p,y)=>e.jsx("div",{children:p.href?e.jsxs("a",{href:p.href,onClick:p.onClick,className:u("flex items-center gap-2 px-4 py-2 text-sm","transition-colors",p.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[p.icon&&e.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:p.icon}),p.label]}):e.jsxs("button",{onClick:p.onClick,className:u("w-full flex items-center gap-2 px-4 py-2 text-sm","transition-colors",p.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[p.icon&&e.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:p.icon}),p.label]})},y))})]},d)};return e.jsx("nav",{className:u("bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg",r==="horizontal"?"flex flex-wrap":"flex flex-col",a),children:t.map((c,d)=>l(c,d))})},Hn=({items:t,selectedPath:r,onSelect:a,variant:o="default",className:n})=>{const s=o==="compact"?"space-y-1":"space-y-0";return e.jsx("div",{className:u(s,n),children:t.map(l=>{const c=l.icon,d=r===l.path,g=l.disabled,h=u("flex items-start cursor-pointer transition-colors",o==="compact"?"p-3 rounded-lg":"p-4 border-b border-gray-200 dark:border-gray-700 last:border-b-0",g&&"opacity-50 cursor-not-allowed"),b=d?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300";return e.jsxs("div",{onClick:()=>!g&&a(l.path),className:u(h,!g&&b),role:"button",tabIndex:g?-1:0,"aria-current":d?"page":void 0,"aria-disabled":g,onKeyDown:v=>{!g&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),a(l.path))},children:[e.jsx(c,{className:"h-5 w-5 mt-0.5 mr-3 flex-shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:u("font-medium",T.body.md()),children:[l.label,l.badge!==void 0&&l.badge>0&&e.jsx("span",{className:"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:l.badge})]}),l.description&&e.jsx("div",{className:u("text-xs text-gray-500 dark:text-gray-400 mt-0.5"),children:l.description})]})]},l.id)})})},qn=({items:t,className:r})=>e.jsx("nav",{className:u("flex flex-col gap-1",r),children:t.map(a=>e.jsxs("button",{onClick:a.onClick,className:u("flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",a.active?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"),children:[a.icon&&e.jsx("span",{className:"w-5 h-5",children:a.icon}),e.jsx("span",{className:"flex-1 text-left font-medium",children:a.label}),a.badge&&e.jsx("span",{className:"px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs",children:a.badge})]},a.id))}),_n=({currentPage:t,totalPages:r,onPageChange:a,siblingCount:o=1,showFirstLast:n=!1,size:s="md",className:l})=>{const d={sm:{button:"h-8 w-8 text-xs",icon:"h-3 w-3",text:T.body.sm()},md:{button:"h-10 w-10 text-sm",icon:"h-4 w-4",text:T.body.md()},lg:{button:"h-12 w-12 text-base",icon:"h-5 w-5",text:T.body.lg()}}[s],h=(()=>{const C=[];C.push(1);const S=Math.max(t-o,2),x=Math.min(t+o,r-1);S>2&&C.push("ellipsis");for(let k=S;k<=x;k++)C.push(k);return x<r-1&&C.push("ellipsis"),r>1&&C.push(r),C})(),b=()=>{t>1&&a(t-1)},v=()=>{t<r&&a(t+1)},p=()=>{a(1)},y=()=>{a(r)},f=u("inline-flex items-center justify-center","rounded-md border border-gray-300 dark:border-gray-600","transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500","disabled:opacity-50 disabled:cursor-not-allowed"),w=C=>u(f,d.button,d.text,C?"bg-blue-600 text-white border-blue-600 dark:bg-blue-500 dark:border-blue-500":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"),N=u(f,d.button,"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700");return e.jsxs("nav",{className:u("flex items-center gap-1",l),"aria-label":"Pagination",children:[n&&e.jsx("button",{onClick:p,disabled:t===1,className:N,"aria-label":"Go to first page",children:e.jsx("span",{className:d.text,children:"First"})}),e.jsx("button",{onClick:b,disabled:t===1,className:N,"aria-label":"Go to previous page",children:e.jsx(M.ChevronLeftIcon,{className:d.icon})}),h.map((C,S)=>C==="ellipsis"?e.jsx("span",{className:u("inline-flex items-center justify-center",d.button,"text-gray-400 dark:text-gray-500"),children:"..."},`ellipsis-${S}`):e.jsx("button",{onClick:()=>a(C),className:w(C===t),"aria-label":`Go to page ${C}`,"aria-current":C===t?"page":void 0,children:C},C)),e.jsx("button",{onClick:v,disabled:t===r,className:N,"aria-label":"Go to next page",children:e.jsx(M.ChevronRightIcon,{className:d.icon})}),n&&e.jsx("button",{onClick:y,disabled:t===r,className:N,"aria-label":"Go to last page",children:e.jsx("span",{className:d.text,children:"Last"})})]})},Gn=({currentPage:t,totalPages:r,onPageChange:a,maxVisible:o=7,className:n})=>{const s=[];if(r<=o)for(let l=1;l<=r;l++)s.push(l);else{s.push(1),t>3&&s.push("...");const l=Math.max(2,t-1),c=Math.min(r-1,t+1);for(let d=l;d<=c;d++)s.push(d);t<r-2&&s.push("..."),s.push(r)}return e.jsxs("nav",{className:u("flex items-center gap-1",n),children:[e.jsx("button",{onClick:()=>a(t-1),disabled:t===1,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),s.map((l,c)=>l==="..."?e.jsx("span",{className:"px-3 py-2",children:"..."},`ellipsis-${c}`):e.jsx("button",{onClick:()=>a(l),className:u("px-3 py-2 rounded",l===t?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-gray-800"),children:l},l)),e.jsx("button",{onClick:()=>a(t+1),disabled:t===r,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})},Kn=({steps:t,currentStep:r,orientation:a="horizontal",clickable:o=!1,onStepClick:n,className:s})=>{const l=d=>{o&&n&&n(d)},c=d=>d<r?"completed":d===r?"active":"upcoming";return a==="horizontal"?e.jsx("div",{className:u("w-full",s),children:e.jsx("div",{className:"flex items-center justify-between",children:t.map((d,g)=>{const h=c(g),b=g===t.length-1;return e.jsxs(m.Fragment,{children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("button",{onClick:()=>l(g),disabled:!o,className:u("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default",o&&"hover:scale-110",h==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",h==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",h==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:h==="completed"?e.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):d.icon?e.jsx("span",{className:u("w-5 h-5",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:d.icon}):e.jsx("span",{className:u("text-sm font-semibold",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:g+1})}),e.jsxs("div",{className:"mt-2 text-center",children:[e.jsx("p",{className:u("text-sm font-medium",h==="active"?"text-blue-600 dark:text-blue-500":h==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:d.label}),d.description&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:d.description})]})]}),!b&&e.jsx("div",{className:"flex-1 h-0.5 mx-2 bg-gray-300 dark:bg-gray-700 relative",children:e.jsx("div",{className:u("absolute left-0 top-0 h-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",g<r?"w-full":"w-0")})})]},d.id)})})}):e.jsx("div",{className:u("w-full",s),children:e.jsx("div",{className:"space-y-4",children:t.map((d,g)=>{const h=c(g),b=g===t.length-1;return e.jsxs("div",{className:"flex gap-4",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("button",{onClick:()=>l(g),disabled:!o,className:u("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default flex-shrink-0",o&&"hover:scale-110",h==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",h==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",h==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:h==="completed"?e.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):d.icon?e.jsx("span",{className:u("w-5 h-5",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:d.icon}):e.jsx("span",{className:u("text-sm font-semibold",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:g+1})}),!b&&e.jsx("div",{className:"w-0.5 flex-1 min-h-[32px] bg-gray-300 dark:bg-gray-700 relative mt-2",children:e.jsx("div",{className:u("absolute top-0 left-0 w-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",g<r?"h-full":"h-0")})})]}),e.jsxs("div",{className:"flex-1 pb-4",children:[e.jsx("p",{className:u("text-sm font-medium",h==="active"?"text-blue-600 dark:text-blue-500":h==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:d.label}),d.description&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:d.description})]})]},d.id)})})})},Yn=({steps:t,currentStep:r,onStepClick:a,orientation:o="horizontal",className:n})=>e.jsx("nav",{className:u(o==="horizontal"?"flex items-center":"flex flex-col",n),children:t.map((s,l)=>e.jsxs("div",{className:u("flex items-center",o==="vertical"&&"flex-col items-start"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>a?.(l),disabled:l>r,className:u("w-10 h-10 rounded-full flex items-center justify-center font-semibold transition-colors",l<r&&"bg-green-500 text-white",l===r&&"bg-blue-500 text-white",l>r&&"bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400"),children:l<r?"✓":l+1}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:s.label}),s.description&&e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.description})]})]}),l<t.length-1&&e.jsx("div",{className:u(o==="horizontal"?"w-full h-0.5 mx-4":"h-8 w-0.5 ml-5 my-2","bg-gray-300 dark:bg-gray-700")})]},s.id))}),Qn=({subsections:t,isExpanded:r,selectedSubsection:a,parentSectionId:o,onSubsectionSelect:n})=>{const s=m.useRef(null),[l,c]=m.useState(void 0);return m.useEffect(()=>{if(s.current){const d=s.current.scrollHeight;c(r?d+8:0)}},[r,t]),e.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:l!==void 0?`${l}px`:"auto"},children:e.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:t.map(d=>e.jsx("button",{onClick:()=>n?.(d.id,o),className:`block w-full text-left px-3 py-2 rounded-md text-sm transition-all duration-200 hover:scale-[1.02] ${a===d.id?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-800 dark:hover:text-gray-200"}`,children:d.title},d.id))})})},Zn=({sections:t,selectedSection:r,selectedSubsection:a,expandedSections:o,onSectionSelect:n,onSubsectionSelect:s,onToggleSection:l,className:c=""})=>e.jsx("nav",{className:`space-y-2 ${c}`,children:t.map(d=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("button",{onClick:()=>n(d.id),className:`flex-1 text-left px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 hover:scale-[1.02] ${r===d.id&&!a?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-gray-100"}`,children:d.title}),d.subsections&&d.subsections.length>0&&e.jsx("button",{onClick:()=>l(d.id),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200",children:e.jsx(M.ChevronRightIcon,{className:`h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out ${o.includes(d.id)?"rotate-90":"rotate-0"}`})})]}),d.subsections&&e.jsx(Qn,{subsections:d.subsections,isExpanded:o.includes(d.id),selectedSubsection:a,parentSectionId:d.id,onSubsectionSelect:s})]},d.id))});function Xn({columns:t,data:r,keyExtractor:a,sort:o,onSort:n,onRowClick:s,striped:l=!1,hoverable:c=!1,compact:d=!1,bordered:g=!1,emptyMessage:h="No data available",className:b}){const v=y=>{y.sortable&&n&&n(y.key)},p={left:"text-left",center:"text-center",right:"text-right"};return e.jsx("div",{className:u("w-full overflow-x-auto",b),children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:e.jsx("tr",{children:t.map(y=>e.jsx("th",{className:u(d?"px-3 py-2":"px-6 py-3","text-xs font-medium text-gray-700 dark:text-gray-300 uppercase tracking-wider",p[y.align||"left"],y.sortable&&"cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-700",g&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),style:{width:y.width},onClick:()=>y.sortable&&v(y),children:e.jsxs("div",{className:"flex items-center gap-2",children:[y.label,y.sortable&&e.jsx("span",{className:"flex flex-col",children:o?.column===y.key?o.direction==="asc"?e.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M5 10l5-5 5 5H5z"})}):e.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M15 10l-5 5-5-5h10z"})}):e.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M5 10l5-5 5 5H5z"})})})]})},y.key))})}),e.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:r.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length,className:"px-6 py-8 text-center text-sm text-gray-500 dark:text-gray-400",children:h})}):r.map((y,f)=>e.jsx("tr",{className:u(l&&f%2===1&&"bg-gray-50 dark:bg-gray-800/50",c&&"hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",s&&"cursor-pointer"),onClick:()=>s?.(y,f),children:t.map(w=>e.jsx("td",{className:u(d?"px-3 py-2":"px-6 py-4","text-sm text-gray-900 dark:text-white",p[w.align||"left"],g&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),children:w.render?w.render(y,f):y[w.key]},w.key))},a(y,f)))})]})})}const Jn=({data:t,columns:r,hasActions:a=!1,renderCell:o,renderAction:n,emptyMessage:s="No data available",getRowKey:l=(d,g)=>String(g),className:c=""})=>!t||t.length===0?e.jsx("div",{className:`text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg ${c}`,children:e.jsx("p",{className:`${T.body.sm()} text-gray-500 dark:text-gray-400`,children:s})}):e.jsx("div",{className:`relative ${c}`,children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[r.map((d,g)=>e.jsx("th",{className:`${T.label.default()} text-left py-3 px-4 whitespace-nowrap`,children:d},g)),a&&e.jsx("th",{className:`${T.label.default()} text-right py-3 px-4 sticky right-0 bg-white dark:bg-gray-900 whitespace-nowrap`})]})}),e.jsx("tbody",{children:t.map((d,g)=>e.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[r.map((h,b)=>{const v=o(d,b);return e.jsx("td",{className:"py-3 px-4",children:typeof v=="string"?e.jsx("span",{className:T.body.sm(),children:v}):v},b)}),a&&e.jsx("td",{className:"py-3 px-4 text-right sticky right-0 bg-white dark:bg-gray-900",children:n?.(d)})]},l(d,g)))})]})})}),Rn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdataUgrid",children:r||"UdataUgrid Component"}),es=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UpivotUtable",children:r||"UpivotUtable Component"}),rs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UspreadsheetUgrid",children:r||"UspreadsheetUgrid Component"}),ts=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcolumnUresize",children:r||"UcolumnUresize Component"}),as=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcellUeditor",children:r||"UcellUeditor Component"}),os=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtableUreservation",children:r||"UtableUreservation Component"}),ns=({children:t,type:r="unordered",spacing:a="sm",marker:o,size:n="md",className:s})=>{const l=r==="ordered"?"ol":"ul",c={none:"space-y-0",sm:"space-y-1",md:"space-y-2",lg:"space-y-4"},d={sm:"text-sm",md:"text-base",lg:"text-lg"},g=()=>o==="none"?"list-none":r==="unordered"?{disc:"list-disc",circle:"list-circle",square:"list-square",decimal:"list-disc",alpha:"list-disc",roman:"list-disc",none:"list-none"}[o||"disc"]:{decimal:"list-decimal",alpha:"list-alpha",roman:"list-roman",disc:"list-decimal",circle:"list-decimal",square:"list-decimal",none:"list-none"}[o||"decimal"];return e.jsx(l,{className:u("ml-6",g(),c[a],d[n],"text-gray-900 dark:text-gray-100",s),children:t})},ss=({children:t,className:r})=>e.jsx("li",{className:u("leading-relaxed",r),children:t}),ls=O.forwardRef(({className:t,type:r,...a},o)=>e.jsx("input",{type:r,className:u(D.input.default(),t),ref:o,...a}));ls.displayName="Input",V.cva("min-h-screen flex flex-col",{variants:{background:{default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",transparent:"bg-transparent",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20"},overflow:{visible:"overflow-visible",hidden:"overflow-hidden",scroll:"overflow-auto"}},defaultVariants:{background:"default",overflow:"visible"}}),V.cva("",{variants:{variant:{default:"",hero:"relative overflow-hidden",feature:"bg-white dark:bg-gray-800",cta:"relative overflow-hidden",testimonial:"bg-gray-50 dark:bg-gray-900",footer:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border-t"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16","4xl":"py-20","5xl":"py-24"},background:{none:"bg-transparent",default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/50 dark:to-purple-900/50","gradient-primary":"bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-blue-900/50 dark:to-indigo-900/50","gradient-secondary":"bg-gradient-to-br from-green-50 to-blue-100 dark:from-green-900/50 dark:to-blue-900/50","gradient-tertiary":"bg-gradient-to-r from-emerald-50 to-teal-50 dark:from-gray-800 dark:to-gray-900","gradient-vibrant":"bg-gradient-to-br from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"}},defaultVariants:{variant:"default",spacing:"3xl",background:"none"}});const Pr=B.Root,is=B.Value,Oe=O.forwardRef(({className:t,children:r,...a},o)=>e.jsxs(B.Trigger,{ref:o,className:u("flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[r,e.jsx(B.Icon,{asChild:!0,children:e.jsx(J.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));Oe.displayName=B.Trigger.displayName;const zr=O.forwardRef(({className:t,...r},a)=>e.jsx(B.ScrollUpButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...r,children:e.jsx(J.ChevronUp,{className:"h-4 w-4"})}));zr.displayName=B.ScrollUpButton.displayName;const Dr=O.forwardRef(({className:t,...r},a)=>e.jsx(B.ScrollDownButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...r,children:e.jsx(J.ChevronDown,{className:"h-4 w-4"})}));Dr.displayName=B.ScrollDownButton.displayName;const Ve=O.forwardRef(({className:t,children:r,position:a="popper",...o},n)=>e.jsx(B.Portal,{children:e.jsxs(B.Content,{ref:n,className:u(D.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden 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",a==="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:a,...o,children:[e.jsx(zr,{}),e.jsx(B.Viewport,{className:u(D.overlays.dropdown.itemContainer(),a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),e.jsx(Dr,{})]})}));Ve.displayName=B.Content.displayName;const ds=O.forwardRef(({className:t,...r},a)=>e.jsx(B.Label,{ref:a,className:u(D.overlays.dropdown.header(),"py-1.5",t),...r}));ds.displayName=B.Label.displayName;const He=O.forwardRef(({className:t,children:r,...a},o)=>e.jsxs(B.Item,{ref:o,className:u(D.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[e.jsx(B.ItemText,{children:r}),e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(B.ItemIndicator,{children:e.jsx(J.Check,{className:"h-4 w-4"})})})]}));He.displayName=B.Item.displayName;const cs=O.forwardRef(({className:t,...r},a)=>e.jsx(B.Separator,{ref:a,className:u("my-1 h-px bg-gray-200 dark:bg-gray-700",t),...r}));cs.displayName=B.Separator.displayName;const qe=V.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:T.link.subtle(),default:T.link.default(),muted:T.link.muted(),external:T.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),gs=O.forwardRef(({className:t,variant:r,size:a,to:o,href:n,external:s,children:l,...c},d)=>{const g=o||n;return g?s||g.startsWith("http")||g.startsWith("mailto:")?e.jsx("a",{className:u(qe({variant:r==="subtle"?"external":r,size:a,className:t})),href:g,target:"_blank",rel:"noopener noreferrer",ref:d,...c,children:l}):e.jsx(ve.Link,{className:u(qe({variant:r,size:a,className:t})),to:g,ref:d,...c,children:l}):e.jsx("span",{className:u(qe({variant:r,size:a,className:t})),...c,children:l})});gs.displayName="SmartLink";const us=O.forwardRef(({className:t,...r},a)=>e.jsx(oe.Root,{className:u("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-700",t),...r,ref:a,children:e.jsx(oe.Thumb,{className:u("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));us.displayName=oe.Root.displayName;const hs=O.forwardRef(({className:t,...r},a)=>e.jsx(H.List,{ref:a,className:u(D.navigation.tabs.list(),t),...r}));hs.displayName=H.List.displayName;const bs=O.forwardRef(({className:t,...r},a)=>e.jsx(H.Trigger,{ref:a,className:u(D.navigation.tabs.trigger(),t),...r}));bs.displayName=H.Trigger.displayName;const ys=O.forwardRef(({className:t,...r},a)=>e.jsx(H.Content,{ref:a,className:u(D.navigation.tabs.content(),t),...r}));ys.displayName=H.Content.displayName,m.createContext(void 0);const fs=({children:t,onAction:r,actionText:a="Remove",actionIcon:o=M.TrashIcon,destructive:n=!0,isProcessing:s=!1,variant:l="default",className:c})=>{const d="flex items-center justify-between p-4 rounded-lg transition-colors",g={default:"bg-gray-50 dark:bg-gray-700",compact:"bg-gray-50 dark:bg-gray-700 py-2 px-3",elevated:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-sm hover:shadow-md"};return e.jsxs("div",{className:u(d,g[l],c),children:[e.jsx("div",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:t}),e.jsxs(_,{variant:n?"ghost":"outline",size:"sm",onClick:r,disabled:s,className:u("ml-4",n&&"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 hover:bg-red-50 dark:hover:bg-red-900/20"),children:[e.jsx(o,{className:"h-4 w-4 mr-1"}),a]})]})},ps=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UuserUtable",children:r||"UuserUtable Component"}),ms=({source:t,target:r,onChange:a,sourceTitle:o="Available",targetTitle:n="Selected",searchable:s=!0,sourceSearchPlaceholder:l="Search available...",targetSearchPlaceholder:c="Search selected...",height:d=300,disabled:g=!1,className:h})=>{const[b,v]=m.useState(""),[p,y]=m.useState(""),[f,w]=m.useState(new Set),[N,C]=m.useState(new Set),S=s?t.filter(P=>P.label.toLowerCase().includes(b.toLowerCase())):t,x=s?r.filter(P=>P.label.toLowerCase().includes(p.toLowerCase())):r,k=P=>{const W=new Set(f);W.has(P)?W.delete(P):W.add(P),w(W)},L=P=>{const W=new Set(N);W.has(P)?W.delete(P):W.add(P),C(W)},I=()=>{const P=t.filter(F=>f.has(F.id)),W=t.filter(F=>!f.has(F.id)),j=[...r,...P];a(W,j),w(new Set)},$=()=>{const P=r.filter(F=>N.has(F.id)),W=r.filter(F=>!N.has(F.id)),j=[...t,...P];a(j,W),C(new Set)},U=()=>{const P=[...r,...t];a([],P),w(new Set)},A=()=>{const P=[...t,...r];a(P,[]),C(new Set)},z=(P,W,j,F,q,dr,y0)=>e.jsxs("div",{className:"flex flex-col flex-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-900",children:[e.jsxs("div",{className:"px-3 py-2 border-b border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:W}),e.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:[P.length," item",P.length!==1?"s":""]})]}),s&&e.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:e.jsx("input",{type:"text",value:q,onChange:Y=>dr(Y.target.value),placeholder:y0,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"})}),e.jsx("div",{className:"overflow-y-auto p-2 space-y-1",style:{height:s?d-120:d-60},children:P.length===0?e.jsx("div",{className:"flex items-center justify-center h-full text-sm text-gray-500 dark:text-gray-400",children:"No items"}):P.map(Y=>{const cr=j.has(Y.id);return e.jsx("button",{onClick:()=>!Y.disabled&&F(Y.id),disabled:Y.disabled||g,className:u("w-full px-3 py-2 text-left rounded-md transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-50 disabled:cursor-not-allowed",cr&&"bg-blue-50 dark:bg-blue-900/30 border border-blue-200 dark:border-blue-700"),children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("div",{className:u("w-4 h-4 border-2 rounded flex items-center justify-center flex-shrink-0 mt-0.5",cr?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:cr&&e.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:Y.label}),Y.description&&e.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:Y.description})]})]})},Y.id)})})]});return e.jsxs("div",{className:u("flex gap-4",h),children:[z(S,o,f,k,b,v,l),e.jsxs("div",{className:"flex flex-col justify-center gap-2",children:[e.jsx("button",{onClick:U,disabled:g||t.length===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to selected",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 5l7 7-7 7M5 5l7 7-7 7"})})}),e.jsx("button",{onClick:I,disabled:g||f.size===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to target",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),e.jsx("button",{onClick:$,disabled:g||N.size===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to source",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),e.jsx("button",{onClick:A,disabled:g||r.length===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to available",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 19l-7-7 7-7M19 19l-7-7 7-7"})})})]}),z(x,n,N,L,p,y,c)]})};function xs({items:t,itemHeight:r,height:a,renderItem:o,keyExtractor:n,overscan:s=3,className:l}){const[c,d]=m.useState(0),g=m.useRef(null),h=f=>{d(f.currentTarget.scrollTop)},b=t.length*r,v=Math.max(0,Math.floor(c/r)-s),p=Math.min(t.length-1,Math.ceil((c+a)/r)+s),y=t.slice(v,p+1);return e.jsx("div",{ref:g,className:u("overflow-auto",l),style:{height:a},onScroll:h,children:e.jsx("div",{style:{height:b,position:"relative"},children:y.map((f,w)=>{const N=v+w;return e.jsx("div",{style:{position:"absolute",top:N*r,height:r,width:"100%"},children:o(f,N)},n(f,N))})})})}const vs=({data:t,selectedId:r,onSelect:a,expandedIds:o,onExpand:n,defaultExpanded:s=!1,showLines:l=!1,className:c})=>{const[d,g]=m.useState(new Set(s?t.map(y=>y.id):[])),h=o!==void 0?new Set(o):d,b=y=>{o!==void 0&&n?n(y):g(f=>{const w=new Set(f);return w.has(y)?w.delete(y):w.add(y),w})},v=y=>{!y.disabled&&a&&a(y)},p=(y,f=0)=>{const w=y.children&&y.children.length>0,N=h.has(y.id),C=r===y.id;return e.jsxs("div",{children:[e.jsxs("div",{className:u("flex items-center gap-2 px-2 py-1.5 rounded-md transition-colors",!y.disabled&&"hover:bg-gray-100 dark:hover:bg-gray-800",C&&"bg-blue-50 dark:bg-blue-900/30",y.disabled&&"opacity-50 cursor-not-allowed",!y.disabled&&"cursor-pointer"),style:{paddingLeft:`${f*1.5+.5}rem`},onClick:()=>v(y),children:[w?e.jsx("button",{onClick:S=>{S.stopPropagation(),b(y.id)},className:"flex-shrink-0 w-4 h-4 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",children:e.jsx("svg",{className:u("w-3 h-3 transition-transform",N&&"rotate-90"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}):e.jsx("div",{className:"w-4 h-4 flex-shrink-0"}),y.icon&&e.jsx("span",{className:"flex-shrink-0 w-4 h-4 text-gray-600 dark:text-gray-400",children:y.icon}),e.jsx("span",{className:u("flex-1 text-sm",C?"text-blue-700 dark:text-blue-300 font-medium":"text-gray-900 dark:text-white"),children:y.label})]}),w&&N&&e.jsx("div",{className:u(l&&"border-l-2 border-gray-200 dark:border-gray-700 ml-2"),children:y.children.map(S=>p(S,f+1))})]},y.id)};return e.jsx("div",{className:u("w-full",c),children:t.map(y=>p(y,0))})},ks=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UlistingUform",children:r||"UlistingUform Component"}),ws="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border border-blue-200 dark:border-blue-800",Cs={none:"",sm:"p-3",md:"p-6",lg:"p-8"},_e=({variant:t="elevated",padding:r="md",icon:a,onClose:o,className:n,children:s,...l})=>{const d=["info","success","warning","error"].includes(t)&&(a||o),g=t==="callout"?ws:Ht(t);return e.jsx("div",{className:u("rounded-lg",g,Cs[r],n),...l,children:d?e.jsxs("div",{className:"flex items-start gap-3",children:[a&&e.jsx("div",{className:"flex-shrink-0 text-lg",children:a}),e.jsx("div",{className:"flex-1 min-w-0",children:s}),o&&e.jsx("button",{onClick:o,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity","aria-label":"Close",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):s})},Ns=({title:t,description:r,className:a,children:o,...n})=>e.jsxs("div",{className:u("space-y-1.5",a),...n,children:[t&&e.jsx("h3",{className:T.heading.h4(),children:t}),r&&e.jsx("p",{className:T.body.sm(),children:r}),o]}),Ss=({className:t,children:r,...a})=>e.jsx("div",{className:u("",t),...a,children:r}),Es=({className:t,children:r,...a})=>e.jsx("div",{className:u("flex items-center pt-4",t),...a,children:r}),Ls=({title:t,children:r,variant:a="info",size:o="default",className:n})=>{const s={sm:"sm",default:"md",lg:"lg"},l=a==="neutral"?"bordered":a;return e.jsxs(_e,{variant:l,padding:s[o],className:n,children:[t&&e.jsx("h3",{className:u("font-semibold mb-2",o==="sm"?"text-base":o==="lg"?"text-xl":"text-lg"),children:t}),r]})},$s=({title:t,icon:r,children:a,variant:o="gradient",size:n="default",centered:s=!1,className:l})=>{const c={sm:"sm",default:"md",lg:"lg"},d=o==="gradient"||o==="neutral"?"callout":o;return e.jsx(_e,{variant:d,padding:c[n],className:l,children:e.jsxs("div",{className:u("space-y-4",s&&"text-center"),children:[r&&e.jsx("div",{className:u("font-bold",n==="sm"?"text-2xl":n==="lg"?"text-5xl":"text-4xl",s?"text-center":"text-left"),children:r}),t&&e.jsx("h3",{className:u("font-bold mb-4",n==="sm"?"text-lg":n==="lg"?"text-3xl":"text-2xl"),children:t}),e.jsx("div",{className:u("text-gray-600 dark:text-gray-400",n==="sm"?"text-sm":n==="lg"?"text-lg":"text-base"),children:a})]})})},Is=({title:t,value:r,change:a,changePeriod:o="vs last period",icon:n,variant:s="default",className:l})=>{const c={default:"bg-white dark:bg-gray-900",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"};return e.jsxs("div",{className:u("rounded-lg border border-gray-200 dark:border-gray-700 p-6",c[s],l),children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsx("h3",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:t}),n&&e.jsx("div",{className:"text-gray-400 dark:text-gray-600",children:n})]}),e.jsx("div",{className:"flex items-end justify-between",children:e.jsxs("div",{children:[e.jsx("p",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:r}),a!==void 0&&e.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[e.jsxs("span",{className:u("text-sm font-medium",a>=0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:[a>=0?"↑":"↓"," ",Math.abs(a),"%"]}),e.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:o})]})]})})]})},Us=({src:t,alt:r="Avatar",fallback:a,name:o,size:n="md",status:s,className:l,onClick:c})=>{const[d,g]=m.useState(!1),h={sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"},b={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},v={online:"bg-green-500",offline:"bg-gray-400",away:"bg-yellow-500",busy:"bg-red-500"},y=a||(o?(N=>{const C=N.trim().split(/\s+/);return C.length===1?C[0].charAt(0).toUpperCase():C[0].charAt(0).toUpperCase()+C[C.length-1].charAt(0).toUpperCase()})(o):""),f=t&&!d,w=()=>{g(!0)};return e.jsxs("div",{className:"relative inline-block flex-shrink-0",children:[e.jsx("div",{className:u("flex items-center justify-center overflow-hidden rounded-full",h[n],!f&&"bg-gray-300 dark:bg-gray-600 text-gray-700 dark:text-gray-200",c&&"cursor-pointer hover:opacity-80 transition-opacity",l),onClick:c,role:c?"button":void 0,tabIndex:c?0:void 0,children:f?e.jsx("img",{src:t,alt:r,className:"w-full h-full object-cover",onError:w}):e.jsx("span",{className:"font-semibold",children:y})}),s&&e.jsx("span",{className:u("absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-gray-800",v[s],b[n]),"aria-label":s})]})},Ms=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UavatarUgroup",children:r||"UavatarUgroup Component"}),Ts=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UprofileUheader",children:r||"UprofileUheader Component"}),As=({label:t,value:r,orientation:a="vertical",align:o="start",labelWidth:n="auto",size:s="md",separator:l=!1,labelVariant:c="muted",valueVariant:d="default",className:g,labelClassName:h,valueClassName:b})=>{const v={sm:{label:T.body.sm(),value:T.body.sm(),gap:"gap-1"},md:{label:T.body.md(),value:T.body.md(),gap:"gap-2"},lg:{label:T.body.lg(),value:T.body.lg(),gap:"gap-3"}},p={auto:"",sm:"w-24",md:"w-32",lg:"w-40"},y={start:"justify-start",center:"justify-center",between:"justify-between"},f={default:"text-gray-700 dark:text-gray-300",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold"},w={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold",primary:"text-blue-600 dark:text-blue-400"},N=v[s];return e.jsxs("div",{className:u(a==="horizontal"?"flex items-center":"flex flex-col",a==="horizontal"&&y[o],N.gap,l&&"pb-3 mb-3 border-b border-gray-200 dark:border-gray-700",g),children:[e.jsx("dt",{className:u(N.label,f[c],a==="horizontal"&&p[n],a==="horizontal"&&"flex-shrink-0",h),children:t}),e.jsx("dd",{className:u(N.value,w[d],a==="horizontal"&&"flex-1",b),children:r})]})},Ps=({value:t,label:r,variant:a="neutral",size:o="md",align:n="center",icon:s,iconPosition:l="top",className:c,valueClassName:d,labelClassName:g})=>{const h={primary:{value:"text-blue-600 dark:text-blue-400",label:"text-blue-600/70 dark:text-blue-400/70",icon:"text-blue-600 dark:text-blue-400"},success:{value:"text-green-600 dark:text-green-400",label:"text-green-600/70 dark:text-green-400/70",icon:"text-green-600 dark:text-green-400"},warning:{value:"text-yellow-600 dark:text-yellow-400",label:"text-yellow-600/70 dark:text-yellow-400/70",icon:"text-yellow-600 dark:text-yellow-400"},danger:{value:"text-red-600 dark:text-red-400",label:"text-red-600/70 dark:text-red-400/70",icon:"text-red-600 dark:text-red-400"},neutral:{value:"text-gray-900 dark:text-gray-100",label:"text-gray-600 dark:text-gray-400",icon:"text-gray-600 dark:text-gray-400"},white:{value:"text-white",label:"text-white/70",icon:"text-white"}},b={sm:{value:T.heading.h5(),label:T.caption.default(),icon:"h-4 w-4"},md:{value:T.heading.h4(),label:T.body.sm(),icon:"h-5 w-5"},lg:{value:T.heading.h3(),label:T.body.md(),icon:"h-6 w-6"},xl:{value:T.heading.h2(),label:T.body.lg(),icon:"h-8 w-8"}},v={left:"text-left",center:"text-center",right:"text-right"},p=h[a],y=b[o];return e.jsxs("div",{className:u(v[n],c),children:[s&&l==="top"&&e.jsx(s,{className:u(y.icon,p.icon,"mb-2",n==="center"&&"mx-auto")}),e.jsxs("div",{className:u(l==="left"&&s&&"flex items-center gap-3",n==="center"&&l==="left"&&"justify-center"),children:[s&&l==="left"&&e.jsx(s,{className:u(y.icon,p.icon)}),e.jsxs("div",{children:[e.jsx("div",{className:u("font-bold",y.value,p.value,d),children:t}),e.jsx("div",{className:u(y.label,p.label,g),children:r})]})]})]})},jr=({icon:t,title:r="No data",description:a,action:o,className:n})=>e.jsxs("div",{className:u("flex flex-col items-center justify-center py-12 px-4 text-center",n),children:[t&&e.jsx("div",{className:"mb-4 text-gray-400 dark:text-gray-600",children:t}),e.jsx("h3",{className:u(T.heading.h3(),"mb-2"),children:r}),a&&e.jsx("p",{className:u(T.body.sm(),"text-gray-600 dark:text-gray-400 max-w-sm mb-6"),children:a}),o&&e.jsx("div",{className:"mt-4",children:o})]}),zs=({title:t,subtext:r,className:a})=>e.jsx(jr,{title:t,description:r,className:a}),Ds=({data:t,orientation:r="vertical",showValues:a=!1,showGrid:o=!0,barWidth:n=40,height:s=300,className:l})=>{const c=Math.max(...t.map(g=>g.value)),d="#3b82f6";return e.jsx("div",{className:u("w-full",l),children:e.jsxs("div",{className:"relative bg-white dark:bg-gray-900 rounded-lg p-6",style:{height:`${s}px`},children:[o&&e.jsx("div",{className:"absolute inset-6 flex flex-col justify-between",children:[...Array(5)].map((g,h)=>e.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700"},h))}),r==="vertical"?e.jsx("div",{className:"relative h-full flex items-end justify-around gap-2",children:t.map((g,h)=>{const b=g.value/c*100;return e.jsxs("div",{className:"flex flex-col items-center gap-2",style:{width:`${n}px`},children:[a&&e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:g.value}),e.jsx("div",{className:"w-full rounded-t transition-all hover:opacity-80",style:{height:`${b}%`,backgroundColor:g.color||d}}),e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:g.label})]},h)})}):e.jsx("div",{className:"relative h-full flex flex-col justify-around gap-2",children:t.map((g,h)=>{const b=g.value/c*100;return e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 w-16 text-right",children:g.label}),e.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-8 rounded transition-all hover:opacity-80",style:{width:`${b}%`,backgroundColor:g.color||d}}),a&&e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:g.value})]})]},h)})})]})})},js=({series:t,showLegend:r=!0,showGrid:a=!0,showPoints:o=!0,height:n=300,xLabels:s,className:l})=>{const c=t.flatMap(p=>p.data),d=Math.max(...c.map(p=>p.y)),g=Math.min(...c.map(p=>p.y)),h=Math.max(...c.map(p=>p.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],v=p=>p.length===0?"":`M ${p.map(f=>{const w=f.x/h*100,N=100-(f.y-g)/(d-g)*100;return`${w},${N}`}).join(" L ")}`;return e.jsxs("div",{className:u("w-full",l),children:[r&&e.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:t.map((p,y)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:p.color||b[y%b.length]}}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:p.name})]},y))}),e.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[e.jsxs("div",{className:"relative",style:{height:`${n}px`},children:[a&&e.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((p,y)=>e.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${y*25}%`}},y))}),e.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:t.map((p,y)=>{const f=p.color||b[y%b.length];return e.jsxs("g",{children:[e.jsx("path",{d:v(p.data),fill:"none",stroke:f,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),o&&p.data.map((w,N)=>{const C=w.x/h*100,S=100-(w.y-g)/(d-g)*100;return e.jsx("circle",{cx:C,cy:S,r:"1",fill:f,vectorEffect:"non-scaling-stroke"},N)})]},y)})})]}),s&&e.jsx("div",{className:"flex justify-between mt-2",children:s.map((p,y)=>e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:p},y))})]})]})},Bs=({data:t,variant:r="pie",showLegend:a=!0,showPercentages:o=!1,size:n=200,donutHoleSize:s=40,className:l})=>{const c=t.reduce((y,f)=>y+f.value,0),d=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"],g=t.reduce((y,f,w)=>{const N=f.value/c*100,C=N/100*360,S=y.length>0?y[y.length-1].endAngle:-90,x=S+C;return y.push({...f,percentage:N,startAngle:S,endAngle:x,color:f.color||d[w%d.length]}),y},[]),h=(y,f,w,N)=>{const C=(N-90)*Math.PI/180;return{x:y+w*Math.cos(C),y:f+w*Math.sin(C)}},b=(y,f,w,N,C)=>{const S=h(y,f,w,C),x=h(y,f,w,N),k=C-N<=180?"0":"1";if(r==="donut"){const L=w*s/100,I=h(y,f,L,C),$=h(y,f,L,N);return["M",S.x,S.y,"A",w,w,0,k,0,x.x,x.y,"L",$.x,$.y,"A",L,L,0,k,1,I.x,I.y,"Z"].join(" ")}return["M",y,f,"L",S.x,S.y,"A",w,w,0,k,0,x.x,x.y,"Z"].join(" ")},v=n/2,p=n/2-10;return e.jsxs("div",{className:u("flex flex-col items-center gap-4",l),children:[e.jsx("svg",{width:n,height:n,className:"transform rotate-0",children:g.map((y,f)=>e.jsx("path",{d:b(v,v,p,y.startAngle,y.endAngle),fill:y.color,className:"transition-opacity hover:opacity-80"},f))}),a&&e.jsx("div",{className:"flex flex-col gap-2",children:g.map((y,f)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:y.color}}),e.jsxs("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:[y.label,o&&e.jsxs("span",{className:"text-gray-500 dark:text-gray-400 ml-1",children:["(",Math.round(y.percentage),"%)"]})]})]},f))})]})},Ws=({series:t,showLegend:r=!0,showGrid:a=!0,fillOpacity:o=.2,height:n=300,xLabels:s,className:l})=>{const c=t.flatMap(y=>y.data),d=Math.max(...c.map(y=>y.y)),g=Math.min(...c.map(y=>y.y)),h=Math.max(...c.map(y=>y.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],v=y=>{if(y.length===0)return"";const f=y.map(C=>{const S=C.x/h*100,x=100-(C.y-g)/(d-g)*100;return`${S},${x}`}),w=y[0].x/h*100,N=y[y.length-1].x/h*100;return`M ${w},100 L ${f.join(" L ")} L ${N},100 Z`},p=y=>y.length===0?"":`M ${y.map(w=>{const N=w.x/h*100,C=100-(w.y-g)/(d-g)*100;return`${N},${C}`}).join(" L ")}`;return e.jsxs("div",{className:u("w-full",l),children:[r&&e.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:t.map((y,f)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:y.color||b[f%b.length]}}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:y.name})]},f))}),e.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[e.jsxs("div",{className:"relative",style:{height:`${n}px`},children:[a&&e.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((y,f)=>e.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${f*25}%`}},f))}),e.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:t.map((y,f)=>{const w=y.color||b[f%b.length];return e.jsxs("g",{children:[e.jsx("path",{d:v(y.data),fill:w,fillOpacity:o}),e.jsx("path",{d:p(y.data),fill:"none",stroke:w,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"})]},f)})})]}),s&&e.jsx("div",{className:"flex justify-between mt-2",children:s.map((y,f)=>e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:y},f))})]})]})},Fs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UradarUchart",children:r||"UradarUchart Component"}),Os=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UbubbleUchart",children:r||"UbubbleUchart Component"}),Vs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UscatterUplot",children:r||"UscatterUplot Component"}),Hs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtreeUmap",children:r||"UtreeUmap Component"}),qs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsankeyUdiagram",children:r||"UsankeyUdiagram Component"}),_s=({data:t,width:r=100,height:a=30,color:o="#3b82f6",fill:n=!1,className:s})=>{if(t.length===0)return null;const l=Math.max(...t),c=Math.min(...t),d=l-c||1,g=t.map((h,b)=>{const v=b/(t.length-1)*r,p=a-(h-c)/d*a;return`${v},${p}`}).join(" ");return e.jsxs("svg",{width:r,height:a,className:u("inline-block",s),children:[n&&e.jsx("polygon",{points:`0,${a} ${g} ${r},${a}`,fill:o,opacity:"0.2"}),e.jsx("polyline",{points:g,fill:"none",stroke:o,strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round"})]})},Gs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"Uheatmap",children:r||"Uheatmap Component"}),Ks=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfunnelUchart",children:r||"UfunnelUchart Component"}),Ys=({className:t,children:r,disabled:a})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"BurndownChart",children:r||"BurndownChart Component"}),Qs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UperformanceUchart",children:r||"UperformanceUchart Component"}),Zs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmetricUcomparison",children:r||"UmetricUcomparison Component"}),Xs=({value:t,min:r=0,max:a=100,size:o=120,strokeWidth:n=10,showValue:s=!0,label:l,variant:c="primary",className:d})=>{const g=Math.min(a,Math.max(r,t)),h=(g-r)/(a-r)*100,b=o/2,v=(o-n)/2,p=Math.PI*v,y=p-h/100*p,f={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"};return e.jsxs("div",{className:u("inline-flex flex-col items-center gap-2",d),children:[e.jsxs("svg",{width:o,height:o*.65,className:"transform rotate-180",children:[e.jsx("path",{d:`M ${n/2} ${b} A ${v} ${v} 0 0 1 ${o-n/2} ${b}`,fill:"none",className:"stroke-gray-200 dark:stroke-gray-700",strokeWidth:n,strokeLinecap:"round"}),e.jsx("path",{d:`M ${n/2} ${b} A ${v} ${v} 0 0 1 ${o-n/2} ${b}`,fill:"none",className:u(f[c],"transition-all duration-500"),strokeWidth:n,strokeDasharray:p,strokeDashoffset:y,strokeLinecap:"round"})]}),s&&e.jsxs("div",{className:"text-center -mt-8",children:[e.jsx("div",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:Math.round(g)}),l&&e.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:l})]})]})},Js=({value:t,max:r=100,variant:a="primary",size:o="md",showLabel:n=!1,labelPosition:s="outside",label:l,className:c,barClassName:d,animated:g=!0,striped:h=!1})=>{const b=Math.min(Math.max(t/r*100,0),100),v=l||`${Math.round(b)}%`,p={primary:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500",purple:"bg-purple-600 dark:bg-purple-500",gray:"bg-gray-600 dark:bg-gray-500"},y={sm:"h-1",md:"h-2",lg:"h-3"};return e.jsx("div",{className:u("w-full",c),children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:u("flex-1 bg-gray-200 dark:bg-gray-600 rounded-full overflow-hidden",y[o]),children:e.jsx("div",{className:u("rounded-full",y[o],p[a],g&&"transition-all duration-300 ease-in-out",h&&"bg-gradient-to-r from-transparent via-white/20 to-transparent bg-[length:20px_100%]",d),style:{width:`${b}%`},role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":r,children:n&&s==="inside"&&o==="lg"&&e.jsx("span",{className:"flex items-center justify-center h-full text-xs font-medium text-white px-2",children:v})})}),n&&s==="outside"&&e.jsx("span",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 whitespace-nowrap",children:v})]})})},Rs=({value:t=0,max:r=100,variant:a="default",size:o="md",showLabel:n=!1,label:s,indeterminate:l=!1,striped:c=!1,animated:d=!1,className:g})=>{const h=Math.min(Math.max(t/r*100,0),100),b={default:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500"},v={sm:"h-1",md:"h-2",lg:"h-4"};return e.jsxs("div",{className:u("w-full",g),children:[e.jsx("div",{className:u("w-full bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden",v[o]),role:"progressbar","aria-valuenow":l?void 0:h,"aria-valuemin":0,"aria-valuemax":100,children:l?e.jsx("div",{className:u("h-full rounded-full animate-pulse",b[a]),style:{width:"100%"}}):e.jsx("div",{className:u("h-full rounded-full transition-all duration-300",b[a],c&&"bg-stripe",c&&d&&"animate-stripe"),style:{width:`${h}%`}})}),(n||s)&&e.jsx("div",{className:"mt-1 text-xs text-gray-600 dark:text-gray-400 text-right",children:s||`${Math.round(h)}%`})]})},el=({value:t,size:r=100,strokeWidth:a=8,showValue:o=!0,label:n,variant:s="primary",color:l,trackColor:c,className:d})=>{const g=Math.min(100,Math.max(0,t)),h=r/2,b=(r-a)/2,v=2*Math.PI*b,p=v-g/100*v,y={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"},f=c||"stroke-gray-200 dark:stroke-gray-700";return e.jsx("div",{className:u("inline-flex items-center justify-center",d),children:e.jsxs("div",{className:"relative",style:{width:r,height:r},children:[e.jsxs("svg",{width:r,height:r,className:"transform -rotate-90",children:[e.jsx("circle",{cx:h,cy:h,r:b,className:f,strokeWidth:a,fill:"none"}),e.jsx("circle",{cx:h,cy:h,r:b,className:u(l?"":y[s],"transition-all duration-300 ease-in-out"),stroke:l,strokeWidth:a,strokeDasharray:v,strokeDashoffset:p,strokeLinecap:"round",fill:"none"})]}),(o||n)&&e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[o&&!n&&e.jsxs("span",{className:"text-gray-900 dark:text-white font-bold",style:{fontSize:r*.2},children:[Math.round(g),"%"]}),n&&e.jsx("span",{className:"text-gray-900 dark:text-white font-medium text-center px-2",style:{fontSize:r*.15},children:n})]})]})})},rl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UprogressUtracker",children:r||"UprogressUtracker Component"}),tl=({src:t,alt:r,fallback:a,width:o,height:n,objectFit:s="cover",loading:l="lazy",showLoader:c=!0,rounded:d="none",border:g=!1,className:h,onLoad:b,onError:v})=>{const[p,y]=m.useState(!0),[f,w]=m.useState(!1),[N,C]=m.useState(t);m.useEffect(()=>{y(!0),w(!1),C(t)},[t]);const S=()=>{y(!1),b?.()},x=()=>{y(!1),w(!0),a&&N!==a&&(C(a),w(!1),y(!0)),v?.()},k={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},L={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},I={width:typeof o=="number"?`${o}px`:o,height:typeof n=="number"?`${n}px`:n};return e.jsxs("div",{className:u("relative inline-block overflow-hidden bg-gray-100 dark:bg-gray-800",k[d],g&&"border border-gray-200 dark:border-gray-700",h),style:I,children:[c&&p&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:e.jsx(M.PhotoIcon,{className:"h-8 w-8 text-gray-400"})})}),f&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx(M.PhotoIcon,{className:"h-8 w-8 text-gray-400"})}),!f&&e.jsx("img",{src:N,alt:r,loading:l,onLoad:S,onError:x,className:u("w-full h-full",L[s],p&&c&&"opacity-0")})]})},al=({images:t,columns:r=3,gap:a=16,lightbox:o=!0,className:n})=>{const[s,l]=m.useState(null),c=b=>{o&&l(b)},d=()=>{l(null)},g=()=>{if(!s)return;const b=t.findIndex(p=>p.id===s.id),v=b>0?b-1:t.length-1;l(t[v])},h=()=>{if(!s)return;const b=t.findIndex(p=>p.id===s.id),v=b<t.length-1?b+1:0;l(t[v])};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:u("grid",n),style:{gridTemplateColumns:`repeat(${r}, 1fr)`,gap:`${a}px`},children:t.map(b=>e.jsxs("div",{className:u("relative aspect-square overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-700",o&&"cursor-pointer hover:opacity-90 transition-opacity"),onClick:()=>c(b),children:[e.jsx("img",{src:b.thumbnail||b.src,alt:b.alt||"",className:"w-full h-full object-cover"}),b.caption&&e.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 text-white text-sm p-2",children:b.caption})]},b.id))}),o&&s&&e.jsxs("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",onClick:d,children:[e.jsx("button",{onClick:d,className:"absolute top-4 right-4 text-white hover:text-gray-300 transition-colors",children:e.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),e.jsx("button",{onClick:b=>{b.stopPropagation(),g()},className:"absolute left-4 text-white hover:text-gray-300 transition-colors",children:e.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),e.jsx("button",{onClick:b=>{b.stopPropagation(),h()},className:"absolute right-4 text-white hover:text-gray-300 transition-colors",children:e.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),e.jsxs("div",{className:"max-w-4xl max-h-full",onClick:b=>b.stopPropagation(),children:[e.jsx("img",{src:s.src,alt:s.alt||"",className:"max-w-full max-h-[80vh] object-contain"}),s.caption&&e.jsx("p",{className:"text-white text-center mt-4",children:s.caption})]})]})]})},ol=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UimageUcomparison",children:r||"UimageUcomparison Component"}),nl=({src:t,onCropComplete:r,initialCrop:a,className:o})=>{const[n,s]=m.useState(a||{x:50,y:50,width:200,height:200}),l=m.useRef(null),c=async()=>{if(!l.current||!r)return;const d=document.createElement("canvas"),g=d.getContext("2d");if(!g)return;const h=l.current,b=h.naturalWidth/h.width,v=h.naturalHeight/h.height;d.width=n.width*b,d.height=n.height*v,g.drawImage(h,n.x*b,n.y*v,n.width*b,n.height*v,0,0,d.width,d.height);const p=d.toDataURL("image/png");r(p,n)};return e.jsxs("div",{className:u("inline-flex flex-col gap-4",o),children:[e.jsxs("div",{className:"relative inline-block",children:[e.jsx("img",{ref:l,src:t,alt:"Crop preview",className:"max-w-full h-auto",crossOrigin:"anonymous"}),e.jsxs("div",{className:"absolute border-2 border-blue-500 bg-blue-500/20",style:{left:`${n.x}px`,top:`${n.y}px`,width:`${n.width}px`,height:`${n.height}px`,cursor:"move"},children:[e.jsx("div",{className:"absolute -top-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-nw-resize"}),e.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-ne-resize"}),e.jsx("div",{className:"absolute -bottom-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-sw-resize"}),e.jsx("div",{className:"absolute -bottom-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-se-resize"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:c,className:u("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Crop Image"}),e.jsx("button",{onClick:()=>s(a||{x:50,y:50,width:200,height:200}),className:u("px-4 py-2 text-sm font-medium","bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white","rounded-md","hover:bg-gray-300 dark:hover:bg-gray-600","transition-colors"),children:"Reset"})]}),e.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:'Drag to adjust crop area. Click "Crop Image" to export.'})]})},sl=({images:t,index:r,isOpen:a,onClose:o,onIndexChange:n,showThumbnails:s=!1,showDownload:l=!1,showZoom:c=!0,className:d})=>{const[g,h]=m.useState(1),b=t[r],v=r>0,p=r<t.length-1,y=m.useCallback(()=>{if(v){const x=r-1;n?.(x),h(1)}},[v,r,n]),f=m.useCallback(()=>{if(p){const x=r+1;n?.(x),h(1)}},[p,r,n]),w=()=>{h(x=>Math.min(x+.5,3))},N=()=>{h(x=>Math.max(x-.5,.5))},C=()=>{h(1)},S=()=>{const x=document.createElement("a");x.href=b.src,x.download=b.alt||"image",x.click()};return m.useEffect(()=>{if(!a)return;const x=k=>{switch(k.key){case"Escape":o();break;case"ArrowLeft":y();break;case"ArrowRight":f();break;case"+":case"=":w();break;case"-":case"_":N();break;case"0":C();break}};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[a,r,t.length,o,y,f]),m.useEffect(()=>(a?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[a]),m.useEffect(()=>{h(1)},[r]),!a||!b?null:e.jsx(ee,{children:e.jsxs("div",{className:u("fixed inset-0 z-50 flex items-center justify-center","bg-black/95",d),children:[e.jsx("div",{className:"absolute inset-0",onClick:o,"aria-label":"Close lightbox"}),e.jsx("button",{onClick:o,className:"absolute top-4 right-4 z-10 p-2 text-white hover:text-gray-300 transition-colors","aria-label":"Close",children:e.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),v&&e.jsx("button",{onClick:y,className:"absolute left-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Previous image",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),p&&e.jsx("button",{onClick:f,className:"absolute right-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Next image",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),e.jsxs("div",{className:"absolute top-4 left-4 z-10 flex gap-2",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-black/50 text-white text-sm rounded-md",children:[r+1," / ",t.length]}),c&&e.jsxs("div",{className:"flex gap-1 bg-black/50 rounded-md p-1",children:[e.jsx("button",{onClick:N,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom out",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7"})})}),e.jsxs("button",{onClick:C,className:"px-2 text-white text-sm hover:text-gray-300 transition-colors","aria-label":"Reset zoom",children:[Math.round(g*100),"%"]}),e.jsx("button",{onClick:w,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom in",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7"})})})]}),l&&e.jsx("button",{onClick:S,className:"p-1.5 bg-black/50 text-white hover:text-gray-300 rounded-md transition-colors","aria-label":"Download image",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})})]}),e.jsx("div",{className:"relative z-0 flex items-center justify-center max-w-7xl max-h-screen p-20",children:e.jsx("img",{src:b.src,alt:b.alt||"",className:"max-w-full max-h-full object-contain transition-transform",style:{transform:`scale(${g})`}})}),b.caption&&e.jsx("div",{className:"absolute bottom-20 left-0 right-0 z-10 text-center",children:e.jsx("p",{className:"px-4 py-2 bg-black/50 text-white text-sm inline-block rounded-md max-w-2xl",children:b.caption})}),s&&t.length>1&&e.jsx("div",{className:"absolute bottom-4 left-0 right-0 z-10 flex justify-center gap-2 px-4 overflow-x-auto",children:t.map((x,k)=>e.jsx("button",{onClick:()=>{n?.(k),h(1)},className:u("flex-shrink-0 w-16 h-16 rounded-md overflow-hidden","border-2 transition-all",k===r?"border-white scale-110":"border-transparent opacity-60 hover:opacity-100 hover:border-gray-400"),children:e.jsx("img",{src:x.thumbnail||x.src,alt:x.alt||"",className:"w-full h-full object-cover"})},k))})]})})},ll=({src:t,poster:r,autoPlay:a=!1,loop:o=!1,muted:n=!1,controls:s=!0,className:l})=>{const c=m.useRef(null),[d,g]=m.useState(a),[h,b]=m.useState(1),[v,p]=m.useState(0),[y,f]=m.useState(0);m.useEffect(()=>{const k=c.current;if(!k)return;const L=()=>p(k.currentTime),I=()=>f(k.duration),$=()=>g(!0),U=()=>g(!1);return k.addEventListener("timeupdate",L),k.addEventListener("loadedmetadata",I),k.addEventListener("play",$),k.addEventListener("pause",U),()=>{k.removeEventListener("timeupdate",L),k.removeEventListener("loadedmetadata",I),k.removeEventListener("play",$),k.removeEventListener("pause",U)}},[]);const w=()=>{c.current&&(d?c.current.pause():c.current.play())},N=k=>{const L=parseFloat(k.target.value);b(L),c.current&&(c.current.volume=L)},C=k=>{const L=parseFloat(k.target.value);p(L),c.current&&(c.current.currentTime=L)},S=()=>{c.current&&(document.fullscreenElement?document.exitFullscreen():c.current.requestFullscreen())},x=k=>{const L=Math.floor(k/60),I=Math.floor(k%60);return`${L}:${I.toString().padStart(2,"0")}`};return e.jsxs("div",{className:u("relative group",l),children:[e.jsx("video",{ref:c,src:t,poster:r,autoPlay:a,loop:o,muted:n,className:"w-full rounded-lg",onClick:w}),s&&e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx("input",{type:"range",min:"0",max:y||0,value:v,onChange:C,className:"w-full mb-2 accent-white"}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:w,className:"text-white hover:text-gray-300 transition-colors",children:d?e.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):e.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M8 5v14l11-7z"})})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),e.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:h,onChange:N,className:"w-20 accent-white"})]}),e.jsxs("span",{className:"text-white text-sm",children:[x(v)," / ",x(y)]})]}),e.jsx("button",{onClick:S,className:"text-white hover:text-gray-300 transition-colors",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})})})]})]})]})},il=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvideoUthumbnail",children:r||"UvideoUthumbnail Component"}),dl=({className:t,children:r,disabled:a})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"VideoEditor",children:r||"VideoEditor Component"}),cl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvideoUcall",children:r||"UvideoUcall Component"}),gl=({className:t,children:r,disabled:a})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"LiveStream",children:r||"LiveStream Component"}),ul=({src:t,title:r,artist:a,artwork:o,autoPlay:n=!1,loop:s=!1,className:l})=>{const c=m.useRef(null),[d,g]=m.useState(n),[h,b]=m.useState(0),[v,p]=m.useState(0),[y,f]=m.useState(1);m.useEffect(()=>{const k=c.current;if(!k)return;const L=()=>b(k.currentTime),I=()=>p(k.duration),$=()=>g(!0),U=()=>g(!1),A=()=>g(!1);return k.addEventListener("timeupdate",L),k.addEventListener("loadedmetadata",I),k.addEventListener("play",$),k.addEventListener("pause",U),k.addEventListener("ended",A),()=>{k.removeEventListener("timeupdate",L),k.removeEventListener("loadedmetadata",I),k.removeEventListener("play",$),k.removeEventListener("pause",U),k.removeEventListener("ended",A)}},[]);const w=()=>{c.current&&(d?c.current.pause():c.current.play())},N=k=>{const L=parseFloat(k.target.value);b(L),c.current&&(c.current.currentTime=L)},C=k=>{const L=parseFloat(k.target.value);f(L),c.current&&(c.current.volume=L)},S=k=>{const L=Math.floor(k/60),I=Math.floor(k%60);return`${L}:${I.toString().padStart(2,"0")}`},x=v>0?h/v*100:0;return e.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-6 shadow-lg",l),children:[e.jsx("audio",{ref:c,src:t,autoPlay:n,loop:s}),e.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[o&&e.jsx("div",{className:"w-16 h-16 rounded-lg overflow-hidden flex-shrink-0 bg-gray-200 dark:bg-gray-700",children:e.jsx("img",{src:o,alt:r||"Album artwork",className:"w-full h-full object-cover"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[r&&e.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white truncate",children:r}),a&&e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:a})]})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("input",{type:"range",min:"0",max:v||0,value:h,onChange:N,className:"w-full accent-blue-500"}),e.jsxs("div",{className:"flex justify-between text-xs text-gray-600 dark:text-gray-400 mt-1",children:[e.jsx("span",{children:S(h)}),e.jsx("span",{children:S(v)})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:w,className:"w-10 h-10 rounded-full bg-blue-500 text-white flex items-center justify-center hover:bg-blue-600 transition-colors",children:d?e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):e.jsx("svg",{className:"w-5 h-5 ml-0.5",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M8 5v14l11-7z"})})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),e.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:y,onChange:C,className:"w-24 accent-blue-500"})]})]}),e.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[x.toFixed(0),"%"]})]})]})},hl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UaudioUwaveform",children:r||"UaudioUwaveform Component"}),bl=({data:t,width:r=200,height:a=40,color:o="#3b82f6",gap:n=2,className:s})=>{if(t.length===0)return null;const l=(r-(t.length-1)*n)/t.length;return e.jsx("svg",{width:r,height:a,className:u("inline-block",s),children:t.map((c,d)=>{const g=Math.max(2,c*a),h=d*(l+n),b=(a-g)/2;return e.jsx("rect",{x:h,y:b,width:l,height:g,fill:o,rx:l/2},d)})})},yl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvoiceUrecorder",children:r||"UvoiceUrecorder Component"}),fl=({className:t,children:r,disabled:a})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"PodcastPlayer",children:r||"PodcastPlayer Component"}),pl=({accept:t=["image/*","video/*","audio/*"],maxSize:r=50*1024*1024,maxFiles:a=10,multiple:o=!0,onUpload:n,onRemove:s,className:l})=>{const[c,d]=m.useState([]),[g,h]=m.useState(!1),b=m.useRef(null),v=S=>{S.preventDefault(),h(!0)},p=S=>{S.preventDefault(),h(!1)},y=S=>{S.preventDefault(),h(!1);const x=Array.from(S.dataTransfer.files);w(x)},f=S=>{if(S.target.files){const x=Array.from(S.target.files);w(x)}},w=S=>{const x=S.filter($=>{const U=t.some(z=>{if(z.endsWith("/*")){const P=z.split("/")[0];return $.type.startsWith(P)}return $.type===z}),A=$.size<=r;return U&&A}),k=a-c.length,L=x.slice(0,k),I=L.map($=>({id:`${Date.now()}-${Math.random()}`,file:$,preview:$.type.startsWith("image/")?URL.createObjectURL($):void 0,status:"pending"}));d($=>[...$,...I]),n&&n(L)},N=S=>{d(x=>x.filter(k=>k.id!==S)),s&&s(S)},C=S=>S<1024?`${S} B`:S<1024*1024?`${(S/1024).toFixed(1)} KB`:`${(S/(1024*1024)).toFixed(1)} MB`;return e.jsxs("div",{className:u("space-y-4",l),children:[e.jsxs("div",{onDragEnter:v,onDragOver:S=>S.preventDefault(),onDragLeave:p,onDrop:y,onClick:()=>b.current?.click(),className:u("border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors",g?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-700 hover:border-gray-400 dark:hover:border-gray-600"),children:[e.jsx("svg",{className:"w-12 h-12 mx-auto mb-4 text-gray-400 dark:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),e.jsx("p",{className:"text-gray-700 dark:text-gray-300 mb-2",children:"Drag and drop files here, or click to browse"}),e.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Max ",a," files, ",C(r)," each"]}),e.jsx("input",{ref:b,type:"file",multiple:o,accept:t.join(","),onChange:f,className:"hidden"})]}),c.length>0&&e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:c.map(S=>e.jsxs("div",{className:"relative aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800",children:[S.preview?e.jsx("img",{src:S.preview,alt:S.file.name,className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsx("svg",{className:"w-12 h-12 text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm4 18H6V4h7v5h5v11z"})})}),e.jsx("button",{onClick:()=>N(S.id),className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-red-500 text-white flex items-center justify-center hover:bg-red-600 transition-colors",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-black/70 text-white text-xs p-2",children:[e.jsx("p",{className:"truncate",children:S.file.name}),e.jsx("p",{className:"text-gray-300",children:C(S.file.size)})]})]},S.id))})]})},ml=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmediaUplaylist",children:r||"UmediaUplaylist Component"}),xl=({className:t,children:r,disabled:a})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"PlaylistManager",children:r||"PlaylistManager Component"}),vl=({value:t,size:r=200,fgColor:a="#000000",bgColor:o="#ffffff",showDownload:n=!1,className:s})=>{const l=m.useRef(null);m.useEffect(()=>{const d=l.current;if(!d)return;const g=d.getContext("2d");if(!g)return;g.fillStyle=o,g.fillRect(0,0,r,r),g.fillStyle=a;const h=8,b=r/h,v=t.split("").reduce((y,f)=>y+f.charCodeAt(0),0);for(let y=0;y<h;y++)for(let f=0;f<h;f++)(v+y*h+f)%3!==0&&g.fillRect(f*b,y*b,b,b);const p=b*3;[[0,0],[r-p,0],[0,r-p]].forEach(([y,f])=>{g.strokeStyle=a,g.lineWidth=b,g.strokeRect(y+b/2,f+b/2,p-b,p-b)})},[t,r,a,o]);const c=()=>{const d=l.current;if(!d)return;const g=d.toDataURL("image/png"),h=document.createElement("a");h.download="qrcode.png",h.href=g,h.click()};return e.jsxs("div",{className:u("inline-flex flex-col items-center gap-3",s),children:[e.jsx("canvas",{ref:l,width:r,height:r,className:"border-2 border-gray-200 dark:border-gray-700 rounded-lg"}),n&&e.jsx("button",{onClick:c,className:u("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Download QR Code"}),e.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 max-w-[200px] text-center break-all",children:t})]})},Ge=({isOpen:t,onClose:r,title:a,size:o="medium",variant:n="default",overlay:s="default",showCloseButton:l=!0,closeOnOverlayClick:c=!0,closeOnEscape:d=!0,children:g,className:h,"aria-labelledby":b,"aria-describedby":v,closeAriaLabel:p="Close modal"})=>{const y=m.useRef(null),f=m.useRef(null);if(m.useEffect(()=>{if(!t||!d)return;const S=x=>{x.key==="Escape"&&r()};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[t,d,r]),m.useEffect(()=>{if(t)return f.current=document.activeElement,y.current&&y.current.focus(),document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset",f.current&&f.current.focus()}},[t]),!t)return null;const w=()=>{const S=D.overlays.modal.content(),x=D.overlays.modal[o]();return u(S,x)},N=S=>{c&&S.target===S.currentTarget&&r()},C=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:D.overlays.modal.backdrop(),onClick:N}),e.jsx("div",{className:D.overlays.modal.container(),role:"dialog","aria-modal":"true","aria-labelledby":b,"aria-describedby":v,children:e.jsxs("div",{ref:y,"data-testid":"modal-content",className:u(w(),h),tabIndex:-1,onClick:S=>S.stopPropagation(),children:[a&&e.jsxs("div",{className:D.overlays.modal.header(),children:[e.jsx("h2",{id:b,className:D.overlays.modal.title(),children:a}),l&&e.jsx("button",{onClick:r,className:D.overlays.modal.closeButton(),"aria-label":p,children:e.jsx(M.XMarkIcon,{className:D.icon.variant.muted.md()})})]}),g]})})]});return Ae.createPortal(C,document.body)},kl=({children:t,variant:r="default",className:a})=>e.jsx("div",{"data-testid":"modal-header",className:u(D.overlays.modal.header(),a),children:t}),Ke=({children:t,variant:r="default",className:a})=>e.jsx("div",{"data-testid":"modal-body",className:u(D.overlays.modal.body(),a),children:t}),Ye=({children:t,variant:r="default",className:a})=>e.jsx("div",{"data-testid":"modal-footer",className:u(D.overlays.modal.footer(),a),children:t}),wl=({isOpen:t,onClose:r,children:a,size:o="md",showCloseButton:n=!0,closeOnOutsideClick:s=!0,closeOnEscape:l=!0,className:c})=>{if(m.useEffect(()=>{if(!l||!t||!r)return;const h=b=>{b.key==="Escape"&&r()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,r,l]),!t)return null;const d={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-full mx-4"},g=()=>{s&&r&&r()};return e.jsxs(ee,{children:[e.jsx(ke,{isOpen:t,onClose:g,opacity:"dark",blur:!0}),e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:u("relative w-full",d[o],"bg-white dark:bg-gray-900","rounded-lg shadow-xl","animate-in fade-in zoom-in-95 duration-200",c),onClick:h=>h.stopPropagation(),children:[n&&r&&e.jsx("button",{onClick:r,className:"absolute top-4 right-4 z-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close dialog",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a]})})]})},Cl={default:M.InformationCircleIcon,warning:M.ExclamationTriangleIcon,danger:M.XCircleIcon,success:M.CheckCircleIcon,info:M.InformationCircleIcon},Nl={default:()=>D.icon.variant.default.lg(),warning:()=>D.icon.variant.warning.lg(),danger:()=>D.icon.variant.error.lg(),success:()=>D.icon.variant.success.lg(),info:()=>D.icon.variant.default.lg()},Sl={default:"default",warning:"default",danger:"destructive",success:"default",info:"default"},El=({isOpen:t,onClose:r,onConfirm:a,title:o,message:n,confirmText:s="Confirm",cancelText:l="Cancel",loadingText:c="Processing...",variant:d="default",isLoading:g=!1})=>{const h=Cl[d],b=Nl[d],v=Sl[d];return e.jsxs(Ge,{isOpen:t,onClose:r,size:"small",variant:"web3confirmation","aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[e.jsxs(Ke,{variant:"padded",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx(h,{className:b()}),e.jsx("h3",{id:"confirmation-dialog-title",className:T.heading.h4(),children:o})]}),e.jsx("p",{id:"confirmation-dialog-description",className:T.body.md(),children:n})]}),e.jsxs(Ye,{children:[e.jsx(_,{variant:"outline",onClick:r,disabled:g,children:l}),e.jsx(_,{variant:v,onClick:a,disabled:g,children:g?c:s})]})]})},Ll=({isOpen:t,onClose:r,onSubmit:a,title:o,description:n,placeholder:s="",initialValue:l="",cancelText:c="Cancel",confirmText:d="Confirm",isLoading:g=!1,loadingText:h="Processing...",maxLength:b,required:v=!0,validate:p})=>{const[y,f]=m.useState(l),[w,N]=m.useState(null);m.useEffect(()=>{t&&(f(l),N(null))},[t,l]);const C=async k=>{if(k.preventDefault(),N(null),v&&!y.trim()){N("This field is required");return}if(p){const L=p(y);if(L){N(L);return}}try{await a(y.trim())}catch(L){N(L instanceof Error?L.message:"An error occurred")}},S=()=>{f(l),N(null),r()},x=v?y.trim().length>0:!0;return e.jsx(Ge,{isOpen:t,onClose:S,size:"small","aria-labelledby":"text-input-modal-title","aria-describedby":"text-input-modal-description",closeOnEscape:!g,closeOnOverlayClick:!g,children:e.jsxs("form",{onSubmit:C,children:[e.jsxs(Ke,{variant:"padded",children:[e.jsx("h3",{id:"text-input-modal-title",className:T.heading.h4(),children:o}),e.jsx("p",{id:"text-input-modal-description",className:`${T.body.md()} mt-2 mb-4`,children:n}),e.jsx(Ce,{type:"text",value:y,onChange:k=>f(k.target.value),placeholder:s,maxLength:b,disabled:g,autoFocus:!0,"aria-invalid":!!w,"aria-describedby":w?"text-input-error":void 0}),w&&e.jsx("p",{id:"text-input-error",className:`${T.body.sm()} text-red-600 dark:text-red-400 mt-2`,role:"alert",children:w})]}),e.jsxs(Ye,{children:[e.jsx(_,{type:"button",variant:"outline",onClick:S,disabled:g,children:c}),e.jsx(_,{type:"submit",variant:"default",disabled:!x||g,children:g?h:d})]})]})})},$l=({isOpen:t,onClose:r,children:a,side:o="right",size:n="md",showCloseButton:s=!0,title:l,footer:c,className:d})=>{if(m.useEffect(()=>{const v=p=>{p.key==="Escape"&&t&&r()};if(t)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[t,r]),!t)return null;const g={left:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},right:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},top:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"},bottom:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"}},h={left:"left-0 top-0 h-full",right:"right-0 top-0 h-full",top:"top-0 left-0 w-full",bottom:"bottom-0 left-0 w-full"},b={left:t?"translate-x-0":"-translate-x-full",right:t?"translate-x-0":"translate-x-full",top:t?"translate-y-0":"-translate-y-full",bottom:t?"translate-y-0":"translate-y-full"};return e.jsxs(ee,{children:[e.jsx(ke,{isOpen:t,onClose:r,opacity:"medium"}),e.jsxs("div",{className:u("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","transition-transform duration-300 ease-in-out",h[o],g[o][n],b[o],d),children:[(l||s)&&e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:[l&&e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:l}),s&&e.jsx("button",{onClick:r,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors","aria-label":"Close drawer",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:a}),c&&e.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:c})]})]})},Il=({isOpen:t,onClose:r,children:a,title:o,description:n,footer:s,side:l="bottom",size:c="md",showHandle:d=!0,showCloseButton:g=!0,className:h})=>{if(m.useEffect(()=>{if(!t)return;const y=f=>{f.key==="Escape"&&r()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[t,r]),!t)return null;const b={bottom:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},top:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},left:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"},right:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"}},v={bottom:"bottom-0 left-0 right-0 rounded-t-2xl",top:"top-0 left-0 right-0 rounded-b-2xl",left:"left-0 top-0 bottom-0 rounded-r-2xl",right:"right-0 top-0 bottom-0 rounded-l-2xl"},p={bottom:"animate-in slide-in-from-bottom duration-300",top:"animate-in slide-in-from-top duration-300",left:"animate-in slide-in-from-left duration-300",right:"animate-in slide-in-from-right duration-300"};return e.jsxs(ee,{children:[e.jsx(ke,{isOpen:t,onClose:r,opacity:"dark"}),e.jsxs("div",{className:u("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","flex flex-col",v[l],b[l][c],p[l],h),children:[d&&(l==="bottom"||l==="top")&&e.jsx("div",{className:u("flex items-center justify-center",l==="bottom"?"pt-3 pb-2":"pb-3 pt-2"),children:e.jsx("div",{className:"w-12 h-1.5 bg-gray-300 dark:bg-gray-700 rounded-full"})}),(o||n||g)&&e.jsx("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[o&&e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o}),n&&e.jsx("p",{className:"mt-1 text-sm text-gray-600 dark:text-gray-400",children:n})]}),g&&e.jsx("button",{onClick:r,className:"ml-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close sheet",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:a}),s&&e.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:s})]})]})},Ul=({trigger:t,children:r,placement:a="bottom",isOpen:o,onOpenChange:n,trigger_action:s="click",showArrow:l=!0,className:c})=>{const[d,g]=m.useState(!1),h=o!==void 0?o:d,b=m.useCallback(k=>{o===void 0&&g(k),n?.(k)},[o,n]),v=m.useRef(null),p=m.useRef(null),[y,f]=m.useState({top:0,left:0});m.useEffect(()=>{if(!h||!v.current)return;const k=()=>{const L=v.current.getBoundingClientRect(),I=8;let $=0,U=0;switch(a){case"top":$=L.top-I,U=L.left+L.width/2;break;case"top-start":$=L.top-I,U=L.left;break;case"top-end":$=L.top-I,U=L.right;break;case"bottom":$=L.bottom+I,U=L.left+L.width/2;break;case"bottom-start":$=L.bottom+I,U=L.left;break;case"bottom-end":$=L.bottom+I,U=L.right;break;case"left":$=L.top+L.height/2,U=L.left-I;break;case"right":$=L.top+L.height/2,U=L.right+I;break}f({top:$,left:U})};return k(),window.addEventListener("scroll",k),window.addEventListener("resize",k),()=>{window.removeEventListener("scroll",k),window.removeEventListener("resize",k)}},[h,a]),m.useEffect(()=>{if(!h)return;const k=L=>{v.current&&!v.current.contains(L.target)&&p.current&&!p.current.contains(L.target)&&b(!1)};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[h,b]),m.useEffect(()=>{if(!h)return;const k=L=>{L.key==="Escape"&&b(!1)};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[h,b]);const w=()=>{s==="click"&&b(!h)},N=()=>{s==="hover"&&b(!0)},C=()=>{s==="hover"&&b(!1)},S={top:"origin-bottom","top-start":"origin-bottom-left","top-end":"origin-bottom-right",bottom:"origin-top","bottom-start":"origin-top-left","bottom-end":"origin-top-right",left:"origin-right",right:"origin-left"},x={top:"-translate-x-1/2 -translate-y-full","top-start":"-translate-y-full","top-end":"-translate-x-full -translate-y-full",bottom:"-translate-x-1/2","bottom-start":"","bottom-end":"-translate-x-full",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return e.jsxs("div",{className:u("relative inline-block",c),children:[e.jsx("div",{ref:v,onClick:w,onMouseEnter:N,onMouseLeave:C,className:"inline-block",children:t}),h&&e.jsxs("div",{ref:p,className:u("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",S[a],x[a]),style:{position:"fixed",top:y.top+"px",left:y.left+"px"},onMouseEnter:s==="hover"?()=>b(!0):void 0,onMouseLeave:s==="hover"?()=>b(!1):void 0,children:[r,l&&e.jsx("div",{className:u("arrow absolute w-2 h-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 transform rotate-45",a.startsWith("top")&&"bottom-[-5px] border-t-0 border-l-0",a.startsWith("bottom")&&"top-[-5px] border-b-0 border-r-0",a==="left"&&"right-[-5px] border-l-0 border-b-0",a==="right"&&"left-[-5px] border-r-0 border-t-0",(a==="top"||a==="bottom")&&"left-1/2 -translate-x-1/2",(a==="left"||a==="right")&&"top-1/2 -translate-y-1/2")})]})]})},Ml=({trigger:t,children:r,placement:a="bottom",openDelay:o=200,closeDelay:n=300,className:s})=>{const[l,c]=m.useState(!1),[d,g]=m.useState({top:0,left:0}),h=m.useRef(null),b=m.useRef(null),v=m.useRef(void 0),p=m.useRef(void 0);m.useEffect(()=>{if(!l||!h.current)return;const C=()=>{const S=h.current.getBoundingClientRect(),x=8;let k=0,L=0;switch(a){case"top":k=S.top-x,L=S.left+S.width/2;break;case"bottom":k=S.bottom+x,L=S.left+S.width/2;break;case"left":k=S.top+S.height/2,L=S.left-x;break;case"right":k=S.top+S.height/2,L=S.right+x;break}g({top:k,left:L})};return C(),window.addEventListener("scroll",C),window.addEventListener("resize",C),()=>{window.removeEventListener("scroll",C),window.removeEventListener("resize",C)}},[l,a]);const y=()=>{p.current&&clearTimeout(p.current),v.current=setTimeout(()=>{c(!0)},o)},f=()=>{v.current&&clearTimeout(v.current),p.current=setTimeout(()=>{c(!1)},n)},w={top:"origin-bottom",bottom:"origin-top",left:"origin-right",right:"origin-left"},N={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:h,onMouseEnter:y,onMouseLeave:f,className:"inline-block",children:t}),l&&e.jsx(ee,{children:e.jsx("div",{ref:b,className:u("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",w[a],N[a],s),style:{top:d.top+"px",left:d.left+"px"},onMouseEnter:()=>{p.current&&clearTimeout(p.current)},onMouseLeave:f,children:r})})]})},Tl=({content:t,children:r,placement:a="top",delayShow:o=0,delayHide:n=0,className:s,disabled:l=!1,showArrow:c=!0,variant:d="default",trigger:g="hover",isOpen:h,onVisibilityChange:b})=>{const[v,p]=m.useState(!1),y=m.useRef(void 0),f=m.useRef(void 0),w=m.useRef(null),N=m.useRef(null),C=h!==void 0,S=C?h:v,x=m.useCallback(()=>{l||C||(f.current&&(clearTimeout(f.current),f.current=void 0),o>0?y.current=setTimeout(()=>{p(!0),b?.(!0)},o):(p(!0),b?.(!0)))},[l,C,o,b]),k=m.useCallback(()=>{C||(y.current&&(clearTimeout(y.current),y.current=void 0),n>0?f.current=setTimeout(()=>{p(!1),b?.(!1)},n):(p(!1),b?.(!1)))},[C,n,b]);m.useEffect(()=>()=>{y.current&&clearTimeout(y.current),f.current&&clearTimeout(f.current)},[]),m.useEffect(()=>{if(g!=="click"||!S)return;const F=q=>{w.current&&!w.current.contains(q.target)&&N.current&&!N.current.contains(q.target)&&k()};return document.addEventListener("mousedown",F),()=>{document.removeEventListener("mousedown",F)}},[g,S,k]);const L=()=>{g==="hover"&&x()},I=()=>{g==="hover"&&k()},$=()=>{g==="hover"&&x()},U=()=>{g==="hover"&&k()},A=()=>{g==="click"&&!C&&(S?(p(!1),b?.(!1)):(p(!0),b?.(!0)))},z={top:"bottom-full left-1/2 -translate-x-1/2 -translate-y-2",bottom:"top-full left-1/2 -translate-x-1/2 translate-y-2",left:"right-full top-1/2 -translate-x-2 -translate-y-1/2",right:"left-full top-1/2 translate-x-2 -translate-y-1/2"},P={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent"},W={default:"bg-gray-900 dark:bg-gray-700 text-white",info:"bg-blue-600 dark:bg-blue-500 text-white",success:"bg-green-600 dark:bg-green-500 text-white",warning:"bg-yellow-600 dark:bg-yellow-500 text-white",error:"bg-red-600 dark:bg-red-500 text-white"},j={default:{top:"border-t-gray-900 dark:border-t-gray-700",bottom:"border-b-gray-900 dark:border-b-gray-700",left:"border-l-gray-900 dark:border-l-gray-700",right:"border-r-gray-900 dark:border-r-gray-700"},info:{top:"border-t-blue-600 dark:border-t-blue-500",bottom:"border-b-blue-600 dark:border-b-blue-500",left:"border-l-blue-600 dark:border-l-blue-500",right:"border-r-blue-600 dark:border-r-blue-500"},success:{top:"border-t-green-600 dark:border-t-green-500",bottom:"border-b-green-600 dark:border-b-green-500",left:"border-l-green-600 dark:border-l-green-500",right:"border-r-green-600 dark:border-r-green-500"},warning:{top:"border-t-yellow-600 dark:border-t-yellow-500",bottom:"border-b-yellow-600 dark:border-b-yellow-500",left:"border-l-yellow-600 dark:border-l-yellow-500",right:"border-r-yellow-600 dark:border-r-yellow-500"},error:{top:"border-t-red-600 dark:border-t-red-500",bottom:"border-b-red-600 dark:border-b-red-500",left:"border-l-red-600 dark:border-l-red-500",right:"border-r-red-600 dark:border-r-red-500"}};return e.jsxs("div",{ref:N,className:"relative inline-block",onMouseEnter:L,onMouseLeave:I,onFocus:$,onBlur:U,onClick:A,children:[r,S&&!l&&e.jsxs("div",{ref:w,className:u("absolute z-50 px-2 py-1 text-xs font-medium rounded shadow-lg whitespace-nowrap pointer-events-none",z[a],W[d],s),role:"tooltip",children:[t,c&&e.jsx("div",{className:u("absolute w-0 h-0 border-4 arrow",P[a],j[d][a])})]})]})},Al=({children:t,onDrop:r,onDragOver:a,accept:o,showIndicator:n=!0,indicator:s,disabled:l=!1,className:c})=>{const[d,g]=m.useState(!1),[h,b]=m.useState(0),v=N=>{N.preventDefault(),N.stopPropagation(),!l&&(b(C=>C+1),N.dataTransfer.items&&N.dataTransfer.items.length>0&&g(!0))},p=N=>{N.preventDefault(),N.stopPropagation(),!l&&b(C=>{const S=C-1;return S===0&&g(!1),S})},y=N=>{N.preventDefault(),N.stopPropagation(),!l&&a&&a(N)},f=N=>{if(N.preventDefault(),N.stopPropagation(),l)return;if(g(!1),b(0),N.dataTransfer.files&&N.dataTransfer.files.length>0){const S=Array.from(N.dataTransfer.files);let x=S;o&&o.length>0&&(x=S.filter(k=>o.some(L=>{if(L.endsWith("/*")){const I=L.split("/")[0];return k.type.startsWith(I)}return k.type===L}))),r(x);return}const C=N.dataTransfer.getData("text/plain");if(C)try{const S=JSON.parse(C);r(S)}catch{r(C)}},w=e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-blue-50 dark:bg-blue-900/30 border-2 border-dashed border-blue-500 dark:border-blue-400 rounded-lg z-10",children:[e.jsx("svg",{className:"w-12 h-12 text-blue-600 dark:text-blue-400 mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),e.jsx("p",{className:"text-blue-700 dark:text-blue-300 font-medium",children:"Drop here"})]});return e.jsxs("div",{onDragEnter:v,onDragLeave:p,onDragOver:y,onDrop:f,className:u("relative",l&&"opacity-50 cursor-not-allowed",c),children:[t,n&&d&&!l&&(s||w)]})},Pl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdragUdropUlist",children:r||"UdragUdropUlist Component"}),zl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsortableUgrid",children:r||"UsortableUgrid Component"}),Dl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UnestedUdrag",children:r||"UnestedUdrag Component"}),jl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UgestureUdetector",children:r||"UgestureUdetector Component"}),Bl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UswipeUactions",children:r||"UswipeUactions Component"}),Wl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UpinchUzoom",children:r||"UpinchUzoom Component"}),Fl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdoubleUtap",children:r||"UdoubleUtap Component"}),Ol=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UlongUpress",children:r||"UlongUpress Component"}),Vl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UhoverUtooltip",children:r||"UhoverUtooltip Component"}),Hl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UradialUmenu",children:r||"UradialUmenu Component"}),ql=({children:t,active:r=!0,initialFocus:a,returnFocus:o=!0,className:n})=>{const s=m.useRef(null),l=m.useRef(null);return m.useEffect(()=>{if(!r)return;o&&(l.current=document.activeElement);const c=()=>{if(!s.current)return[];const b=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(s.current.querySelectorAll(b))},d=()=>{if(a){const v=s.current?.querySelector(a);if(v){v.focus();return}}const b=c();b.length>0&&b[0].focus()},g=b=>{if(b.key!=="Tab")return;const v=c();if(v.length===0){b.preventDefault();return}const p=v[0],y=v[v.length-1];b.shiftKey?document.activeElement===p&&(b.preventDefault(),y.focus()):document.activeElement===y&&(b.preventDefault(),p.focus())},h=setTimeout(d,0);return document.addEventListener("keydown",g),()=>{clearTimeout(h),document.removeEventListener("keydown",g),o&&l.current&&l.current.focus()}},[r,a,o]),r?e.jsx("div",{ref:s,className:u(n),children:t}):e.jsx(e.Fragment,{children:t})},_l=({sections:t,activeId:r,onActiveChange:a,offset:o=80,container:n,smoothScroll:s=!0,showSubsections:l=!0,className:c})=>{const[d,g]=m.useState(""),h=m.useRef(null),b=r!==void 0?r:d;m.useEffect(()=>{const y=n?document.querySelector(n):window;if(!y)return;const f=C=>C.flatMap(S=>[S.id,...S.subsections?f(S.subsections):[]]),N=f(t).map(C=>document.getElementById(C)).filter(Boolean);if(N.length!==0)return h.current=new IntersectionObserver(C=>{C.forEach(S=>{if(S.isIntersecting){const x=S.target.id;r!==void 0&&a?a(x):g(x)}})},{root:n?y:null,rootMargin:`-${o}px 0px -50% 0px`,threshold:0}),N.forEach(C=>{h.current?.observe(C)}),()=>{h.current?.disconnect()}},[t,n,o,r,a]);const v=y=>{const f=document.getElementById(y);if(!f)return;const w=n?document.querySelector(n):window;if(!w)return;const C=f.offsetTop-o;s?w===window?window.scrollTo({top:C,behavior:"smooth"}):w.scrollTo({top:C,behavior:"smooth"}):w===window?window.scrollTo(0,C):w.scrollTop=C},p=(y,f=0)=>{const w=b===y.id,N=y.subsections?.some(C=>b===C.id)||!1;return e.jsxs("div",{children:[e.jsx("button",{onClick:()=>v(y.id),className:u("w-full text-left px-3 py-1.5 text-sm rounded-md transition-colors",f===0?"font-medium":"pl-6 text-sm",w?"text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/30":N?"text-gray-700 dark:text-gray-300":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800"),style:{paddingLeft:`${f*.75+.75}rem`},children:y.label}),l&&y.subsections&&y.subsections.length>0&&e.jsx("div",{className:"ml-2 border-l-2 border-gray-200 dark:border-gray-700",children:y.subsections.map(C=>p(C,f+1))})]},y.id)};return e.jsx("nav",{className:u("space-y-1",c),children:t.map(y=>p(y,0))})},Gl=({children:t,onRefresh:r,disabled:a=!1,refreshingText:o="Refreshing...",pullDownText:n="Pull down to refresh",releaseText:s="Release to refresh",threshold:l=80,maxPullDistance:c=120,className:d=""})=>{const[g,h]=m.useState(0),[b,v]=m.useState(!1),[p,y]=m.useState(!1),f=m.useRef(0),w=m.useRef(null);m.useEffect(()=>{const k=w.current;if(!k)return;const L=U=>{if(a||b)return;k.scrollTop<=0&&(f.current=U.touches[0].clientY,y(!0))},I=U=>{if(!p)return;const z=U.touches[0].clientY-f.current;if(z>0&&k.scrollTop<=0){const P=Math.min(z/c,1),W=Math.min(z*(1-P*.5),c);h(W),z>10&&U.preventDefault()}},$=async()=>{if(p)if(y(!1),g>=l&&!b){v(!0);try{await r()}catch{}finally{v(!1),h(0)}}else h(0)};return k.addEventListener("touchstart",L,{passive:!0}),k.addEventListener("touchmove",I,{passive:!1}),k.addEventListener("touchend",$),()=>{k.removeEventListener("touchstart",L),k.removeEventListener("touchmove",I),k.removeEventListener("touchend",$)}},[a,b,p,g,l,c,r]);const N=Math.min(g/l,1),C=p||b,S=p?g:b?l:0,x=()=>b?o:g>=l?s:n;return e.jsxs("div",{ref:w,className:`relative ${d}`,style:{height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch"},children:[e.jsx("div",{className:"sticky top-0 left-0 right-0 flex items-center justify-center bg-gradient-to-b from-blue-50/90 to-transparent dark:from-blue-900/20 dark:to-transparent backdrop-blur-sm z-10 transition-all duration-300 ease-out",style:{height:`${S}px`,marginTop:p?0:`-${S}px`,opacity:C?1:0,pointerEvents:"none"},children:e.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[e.jsx(M.ArrowPathIcon,{className:`w-6 h-6 text-blue-600 dark:text-blue-400 transition-transform duration-200 ${b?"animate-spin":""}`,style:{transform:`rotate(${N*360}deg)`}}),g>20&&e.jsx("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:x()})]})}),e.jsx("div",{style:{paddingTop:p?`${g}px`:0,transition:p?"none":"padding-top 200ms ease-out"},children:t})]})},Kl=({children:t,onLoadMore:r,loading:a=!1,hasMore:o=!0,threshold:n=100,loader:s,endMessage:l,height:c,scrollDirection:d="vertical",reverse:g=!1,className:h})=>{const b=m.useRef(null),[v,p]=m.useState(!1);m.useEffect(()=>{const N=b.current;if(!N||a||!o)return;const C=()=>{const{scrollTop:S,scrollHeight:x,clientHeight:k,scrollLeft:L,scrollWidth:I,clientWidth:$}=N;d==="vertical"&&p(S>300);let U;d==="vertical"?g?U=S:U=x-S-k:g?U=L:U=I-L-$,U<n&&r()};return N.addEventListener("scroll",C),()=>N.removeEventListener("scroll",C)},[a,o,n,r,d,g]);const y=()=>{b.current?.scrollTo({top:0,behavior:"smooth"})},f=e.jsxs("div",{className:"flex justify-center items-center py-4",children:[e.jsx("div",{className:"w-6 h-6 border-2 border-blue-600 dark:border-blue-400 border-t-transparent rounded-full animate-spin"}),e.jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"Loading..."})]}),w=e.jsx("div",{className:"flex justify-center items-center py-4",children:e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"No more items to load"})});return e.jsxs("div",{className:u("relative",h),children:[e.jsxs("div",{ref:b,className:u(d==="vertical"?"overflow-y-auto":"overflow-x-auto","overflow-auto"),style:{height:d==="vertical"?c:void 0,width:d==="horizontal"?"100%":void 0,display:d==="horizontal"?"flex":void 0,flexDirection:g&&d==="vertical"?"column-reverse":void 0},children:[g&&a&&(s||f),g&&!a&&!o&&l,e.jsx("div",{className:u(d==="horizontal"&&"flex",d==="horizontal"&&g&&"flex-row-reverse"),children:t}),!g&&a&&(s||f),!g&&!a&&!o&&(l||w)]}),d==="vertical"&&!g&&v&&e.jsx("button",{onClick:y,className:u("absolute bottom-4 right-4","p-3 rounded-full","bg-blue-600 dark:bg-blue-500","text-white","shadow-lg","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"),"aria-label":"Scroll to top",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 10l7-7m0 0l7 7m-7-7v18"})})})]})},Q={twitter:(t,r,a)=>{const o=a.length>0?`&hashtags=${a.join(",")}`:"";return`https://twitter.com/intent/tweet?url=${encodeURIComponent(t)}&text=${encodeURIComponent(r)}${o}`},facebook:t=>`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(t)}`,linkedin:(t,r,a)=>`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(t)}`,reddit:(t,r)=>`https://reddit.com/submit?url=${encodeURIComponent(t)}&title=${encodeURIComponent(r)}`,telegram:(t,r)=>`https://t.me/share/url?url=${encodeURIComponent(t)}&text=${encodeURIComponent(r)}`,whatsapp:(t,r)=>`https://wa.me/?text=${encodeURIComponent(r+" "+t)}`,email:(t,r,a)=>`mailto:?subject=${encodeURIComponent(r)}&body=${encodeURIComponent(a+`
|
|
45
|
+
`,Yo(y))}}},[t]),e.jsx("div",{ref:b,className:`${v()} ${s}`,children:n})},Qo=({children:t,delay:r=0,className:a=""})=>e.jsx(Se,{animation:"fade-in-up",delay:r,className:a,children:t}),Zo=({children:t,delay:r=0,className:a=""})=>e.jsx(Se,{animation:"fade-in-scale",delay:r,className:a,children:t}),Xo=({children:t,className:r=""})=>e.jsx(Se,{animation:"float",className:r,children:t}),Jo=({isOpen:t,onClick:r,opacity:a="medium",blur:o=!1,zIndex:n=50,className:s,children:l})=>{const c={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/80"};return t?e.jsx("div",{onClick:r,className:u("fixed inset-0","transition-all duration-200",c[a],o&&"backdrop-blur-sm",s),style:{zIndex:n},role:"presentation","aria-hidden":"true",children:l}):null},Ur=({children:t,container:r})=>{const[a,o]=m.useState(!1);if(m.useEffect(()=>(o(!0),()=>o(!1)),[]),!a)return null;const n=r||document.body;return Ae.createPortal(t,n)},Ro=({isOpen:t,onClose:r,children:a,blur:o=!1,opacity:n="medium",zIndex:s=40,lockScroll:l=!0,className:c})=>{if(m.useEffect(()=>{if(l){if(t){const g=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${g}px`}else document.body.style.overflow="",document.body.style.paddingRight="";return()=>{document.body.style.overflow="",document.body.style.paddingRight=""}}},[t,l]),!t)return null;const d={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/85"};return e.jsx(Ur,{children:e.jsx("div",{className:u("fixed inset-0","transition-opacity duration-300",o&&"backdrop-blur-sm",d[n],c),style:{zIndex:s},onClick:r,"aria-hidden":"true",children:a&&e.jsx("div",{className:"relative h-full w-full",onClick:g=>g.stopPropagation(),children:a})})})},en=({isOpen:t,onClose:r,children:a,size:o="md",showCloseButton:n=!0,closeOnOutsideClick:s=!0,closeOnEscape:l=!0,className:c})=>{if(m.useEffect(()=>{if(!l||!t||!r)return;const h=b=>{b.key==="Escape"&&r()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,r,l]),!t)return null;const d={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-full mx-4"},g=()=>{s&&r&&r()};return e.jsxs(Ur,{children:[e.jsx(Ro,{isOpen:t,onClose:g,opacity:"dark",blur:!0}),e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:u("relative w-full",d[o],"bg-white dark:bg-gray-900","rounded-lg shadow-xl","animate-in fade-in zoom-in-95 duration-200",c),onClick:h=>h.stopPropagation(),children:[n&&r&&e.jsx("button",{onClick:r,className:"absolute top-4 right-4 z-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close dialog",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a]})})]})},rn=({isOpen:t,onClose:r,items:a,placeholder:o="Type a command or search...",emptyMessage:n="No results found.",className:s})=>{const[l,c]=m.useState(""),[d,g]=m.useState(0),h=m.useRef(null),b=a.filter(f=>{const w=l.toLowerCase();return f.label.toLowerCase().includes(w)||f.keywords?.some(N=>N.toLowerCase().includes(w))||f.group?.toLowerCase().includes(w)}),v=b.reduce((f,w)=>{const N=w.group||"Commands";return f[N]||(f[N]=[]),f[N].push(w),f},{});m.useEffect(()=>{t||(c(""),g(0))},[t]),m.useEffect(()=>{t&&h.current&&h.current.focus()},[t]),m.useEffect(()=>{g(0)},[l]);const p=f=>{switch(f.key){case"ArrowDown":f.preventDefault(),g(w=>w<b.length-1?w+1:w);break;case"ArrowUp":f.preventDefault(),g(w=>w>0?w-1:w);break;case"Enter":f.preventDefault(),b[d]&&(b[d].onSelect(),r());break;case"Escape":f.preventDefault(),r();break}},y=f=>{f.onSelect(),r()};return e.jsxs(en,{isOpen:t,onClose:r,size:"lg",showCloseButton:!1,className:u("overflow-hidden p-0",s),children:[e.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),e.jsx("input",{ref:h,type:"text",value:l,onChange:f=>c(f.target.value),onKeyDown:p,placeholder:o,className:"flex-1 bg-transparent border-none outline-none text-gray-900 dark:text-white placeholder-gray-500"})]})}),e.jsx("div",{className:"max-h-96 overflow-y-auto p-2",children:Object.keys(v).length===0?e.jsx("div",{className:"px-4 py-8 text-sm text-gray-500 dark:text-gray-400 text-center",children:n}):Object.entries(v).map(([f,w])=>e.jsxs("div",{className:"mb-4 last:mb-0",children:[e.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:f}),e.jsx("div",{className:"space-y-1",children:w.map(N=>{const S=b.indexOf(N)===d;return e.jsxs("button",{onClick:()=>y(N),className:u("w-full flex items-center gap-3 px-3 py-2 rounded-md","text-sm text-left transition-colors",S?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-900 dark:text-white"),children:[N.icon&&e.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:N.icon}),e.jsx("span",{className:"flex-1 truncate",children:N.label}),N.shortcut&&e.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500 dark:text-gray-400 font-mono",children:N.shortcut})]},N.id)})})]},f))}),e.jsxs("div",{className:"border-t border-gray-200 dark:border-gray-700 px-4 py-2 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↑"}),e.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↓"}),"to navigate"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↵"}),"to select"]})]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"esc"}),"to close"]})]})]})},tn=V.cva("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 transition-all duration-200",{variants:{variant:{default:"border-gray-200 dark:border-gray-700 border hover:shadow-lg",elevated:"shadow-lg hover:shadow-xl",minimal:"bg-transparent shadow-none border-none p-4"},trend:{none:"",up:"border-l-4 border-green-500",down:"border-l-4 border-red-500",neutral:"border-l-4 border-gray-400"}},defaultVariants:{variant:"default",trend:"none"}}),an=({label:t,value:r,change:a,trend:o="none",icon:n,variant:s="default",className:l})=>{const c={up:"text-green-600 dark:text-green-400",down:"text-red-600 dark:text-red-400",neutral:"text-gray-600 dark:text-gray-400",none:"text-gray-600 dark:text-gray-400"},d={up:"↗",down:"↘",neutral:"→",none:""};return e.jsx("div",{className:u(tn({variant:s,trend:o}),l),children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:t}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:r}),a&&e.jsxs("p",{className:u("text-sm font-medium flex items-center gap-1 mt-1",c[o||"none"]),children:[e.jsx("span",{children:d[o||"none"]}),a]})]}),n&&e.jsx("div",{className:"text-3xl opacity-80",children:n})]})})},on=V.cva("space-y-6",{variants:{variant:{default:"",card:"bg-white dark:bg-gray-800 rounded-lg border-gray-200 dark:border-gray-700 border p-6",minimal:"space-y-4"},spacing:{tight:"space-y-3",normal:"space-y-4",relaxed:"space-y-6",loose:"space-y-8"}},defaultVariants:{variant:"default",spacing:"normal"}}),nn=({title:t,description:r,children:a,variant:o="default",spacing:n="normal",className:s})=>e.jsxs("div",{className:u(on({variant:o,spacing:n}),s),children:[(t||r)&&e.jsxs("div",{className:"space-y-1",children:[t&&e.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:t}),r&&e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r})]}),a]}),sn=V.cva("flex flex-col items-center text-center space-y-4",{variants:{layout:{vertical:"flex-col items-center text-center",horizontal:"flex-row items-start text-left space-y-0 space-x-4",minimal:"flex-col space-y-2"},spacing:{tight:"space-y-2",normal:"space-y-4",relaxed:"space-y-6"},interactive:{true:"transition-all duration-200 hover:transform hover:scale-105 cursor-pointer",false:""}},defaultVariants:{layout:"vertical",spacing:"normal",interactive:!1}}),ln=({icon:t,title:r,description:a,layout:o="vertical",spacing:n="normal",interactive:s=!1,className:l,onClick:c})=>e.jsxs("div",{className:u(sn({layout:o,spacing:n,interactive:s}),l),onClick:c,children:[e.jsx("div",{className:"text-4xl mb-4 flex-shrink-0",children:t}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white",children:r}),e.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:a})]})]}),dn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfocusUindicator",children:r||"UfocusUindicator Component"}),cn=({icon:t,size:r="md",shape:a="rounded",variant:o="blue-purple",gradientClasses:n,className:s,iconClassName:l})=>{const c={sm:{container:"w-10 h-10",icon:"h-5 w-5"},md:{container:"w-12 h-12",icon:"h-6 w-6"},lg:{container:"w-16 h-16",icon:"h-8 w-8"},xl:{container:"w-20 h-20",icon:"h-10 w-10"}},d={square:"rounded-lg",rounded:"rounded-xl",circle:"rounded-full"},g={"blue-purple":"bg-gradient-to-r from-blue-600 to-purple-600","green-blue":"bg-gradient-to-r from-green-600 to-blue-600","orange-red":"bg-gradient-to-r from-orange-600 to-red-600",gray:"bg-gradient-to-r from-gray-600 to-gray-800 dark:from-gray-700 dark:to-gray-900",custom:n||"bg-gradient-to-r from-blue-600 to-purple-600"},h=c[r];return e.jsx("div",{className:u("flex items-center justify-center flex-shrink-0",h.container,d[a],g[o],s),children:e.jsx(t,{className:u("text-white",h.icon,l)})})},gn={sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 h-24"},un={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},hn={primary:"bg-gradient-to-br from-blue-100 to-blue-200 text-blue-600 shadow-lg hover:shadow-blue-200",secondary:"bg-gradient-to-br from-purple-100 to-purple-200 text-purple-600 shadow-lg hover:shadow-purple-200",success:"bg-gradient-to-br from-green-100 to-green-200 text-green-600 shadow-lg hover:shadow-green-200",warning:"bg-gradient-to-br from-yellow-100 to-yellow-200 text-yellow-600 shadow-lg hover:shadow-yellow-200",error:"bg-gradient-to-br from-red-100 to-red-200 text-red-600 shadow-lg hover:shadow-red-200",neutral:"bg-gradient-to-br from-gray-100 to-gray-200 text-gray-600 shadow-lg hover:shadow-gray-200"},bn={square:"rounded-none",rounded:"rounded-2xl",circle:"rounded-full"},yn={none:"",float:"animate-float",pulse:"animate-pulse",bounce:"animate-bounce-slow"},fn=({children:t,size:r="lg",variant:a="primary",shape:o="rounded",animation:n="float",className:s})=>e.jsx("div",{className:u("flex items-center justify-center mx-auto mb-6 transition-all duration-300 group-hover:scale-105",gn[r],hn[a],bn[o],yn[n],s),children:e.jsx("div",{className:u(un[r]),children:t})}),pn=({icon:t,children:r,iconPosition:a="left",gap:o="md",iconSize:n="md",align:s="left",variant:l="default",className:c,iconClassName:d,textClassName:g})=>{const h={xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4"},b={xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-8 w-8"},v={left:"text-left",center:"text-center items-center",right:"text-right items-end"},p={default:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400",muted:"text-gray-500 dark:text-gray-400"},y={left:"flex items-center",right:"flex flex-row-reverse items-center",top:"flex flex-col"};return e.jsxs("div",{className:u(y[a],h[o],a==="top"&&v[s],p[l],c),children:[e.jsx(t,{className:u(b[n],"flex-shrink-0",d)}),e.jsx("span",{className:u(g),children:r})]})},mn=({children:t,title:r,variant:a="info",size:o="md",icon:n,bordered:s=!0,className:l})=>{const c={info:{bg:"bg-blue-50 dark:bg-blue-900/20",border:"border-blue-200 dark:border-blue-800",title:"text-blue-900 dark:text-blue-300",text:"text-blue-800 dark:text-blue-400",icon:"text-blue-600 dark:text-blue-400"},success:{bg:"bg-green-50 dark:bg-green-900/20",border:"border-green-200 dark:border-green-800",title:"text-green-900 dark:text-green-300",text:"text-green-800 dark:text-green-400",icon:"text-green-600 dark:text-green-400"},warning:{bg:"bg-yellow-50 dark:bg-yellow-900/20",border:"border-yellow-200 dark:border-yellow-800",title:"text-yellow-900 dark:text-yellow-300",text:"text-yellow-800 dark:text-yellow-400",icon:"text-yellow-600 dark:text-yellow-400"},danger:{bg:"bg-red-50 dark:bg-red-900/20",border:"border-red-200 dark:border-red-800",title:"text-red-900 dark:text-red-300",text:"text-red-800 dark:text-red-400",icon:"text-red-600 dark:text-red-400"},neutral:{bg:"bg-gray-50 dark:bg-gray-800",border:"border-gray-200 dark:border-gray-700",title:"text-gray-900 dark:text-gray-100",text:"text-gray-700 dark:text-gray-300",icon:"text-gray-600 dark:text-gray-400"}},d={sm:"p-3",md:"p-4",lg:"p-6"},g=c[a];return e.jsxs("div",{className:u("rounded-lg",g.bg,s&&`border ${g.border}`,d[o],l),children:[(r||n)&&e.jsxs("div",{className:"flex items-start gap-3 mb-2",children:[n&&e.jsx(n,{className:u("h-5 w-5 flex-shrink-0 mt-0.5",g.icon)}),r&&e.jsx("h3",{className:u(T.body.strong.md(),g.title),children:r})]}),e.jsx("div",{className:u(!r&&!n&&g.text),children:t})]})},xn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UkeyboardUshortcut",children:r||"UkeyboardUshortcut Component"}),vn=({size:t="md",className:r="",showText:a=!0,onClick:o,logoSrc:n="/logo.png",logoAlt:s="Logo",logoText:l,fontFamily:c="Dancing Script, cursive"})=>{const g=(()=>{switch(t){case"sm":return{container:"space-x-2",image:"h-6 w-6",text:"text-lg"};case"md":return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"};case"lg":return{container:"space-x-3",image:"h-10 w-10",text:"text-3xl"};case"xl":return{container:"space-x-4",image:"h-12 w-12",text:"text-4xl"};default:return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"}}})(),h=e.jsxs(e.Fragment,{children:[e.jsx("img",{src:n,alt:s,className:g.image}),a&&e.jsx("div",{className:`${g.text} font-bold text-gray-900 dark:text-gray-100`,style:{fontFamily:c,fontWeight:"700"},children:l})]});return o?e.jsx("button",{onClick:o,className:`flex items-center ${g.container} ${r} hover:opacity-80 transition-opacity`,children:h}):e.jsx("div",{className:`flex items-center ${g.container} ${r}`,children:h})},kn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmorphUtransition",children:r||"UmorphUtransition Component"}),wn=({title:t,description:r,count:a,countLabel:o,action:n,loading:s=!1,loadingText:l="Loading...",size:c="md",className:d})=>{const h={sm:{title:T.heading.h4(),description:T.body.sm(),count:T.caption.default()},md:{title:T.heading.h3(),description:T.body.md(),count:T.body.sm()},lg:{title:T.heading.h2(),description:T.body.lg(),count:T.body.md()}}[c];return e.jsxs("div",{className:u("flex items-start justify-between gap-4",d),children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx("h2",{className:u(h.title,"text-gray-900 dark:text-gray-100"),children:t}),a!==void 0&&e.jsxs("span",{className:u(h.count,"text-gray-500 dark:text-gray-400"),children:["(",a,o&&` ${o}`,")"]}),s&&e.jsxs("span",{className:u(h.count,"text-gray-500 dark:text-gray-400 flex items-center gap-2"),children:[e.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"}),l]})]}),r&&e.jsx("p",{className:u(h.description,"mt-1 text-gray-600 dark:text-gray-400"),children:r})]}),n&&e.jsx("div",{className:"flex-shrink-0",children:n})]})},Cn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UparallaxUscroll",children:r||"UparallaxUscroll Component"}),Nn=({actions:t,orientation:r="horizontal",columns:a=3,className:o})=>{const n={default:"bg-white dark:bg-gray-900 hover:bg-gray-50 dark:hover:bg-gray-800 text-gray-900 dark:text-white border-gray-200 dark:border-gray-700",primary:"bg-blue-500 hover:bg-blue-600 text-white border-blue-500",success:"bg-green-500 hover:bg-green-600 text-white border-green-500",warning:"bg-yellow-500 hover:bg-yellow-600 text-white border-yellow-500",danger:"bg-red-500 hover:bg-red-600 text-white border-red-500"},s={horizontal:"flex flex-wrap gap-2",vertical:"flex flex-col gap-2",grid:"grid gap-2"};return e.jsx("div",{className:u(s[r],r==="grid"&&`grid-cols-${a}`,o),style:r==="grid"?{gridTemplateColumns:`repeat(${a}, 1fr)`}:void 0,children:t.map(l=>e.jsxs("button",{onClick:l.onClick,disabled:l.disabled,className:u("flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors font-medium",n[l.variant||"default"],l.disabled&&"opacity-50 cursor-not-allowed"),children:[l.icon&&e.jsx("span",{className:"w-5 h-5",children:l.icon}),e.jsx("span",{children:l.label})]},l.id))})},Sn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UrevealUonUscroll",children:r||"UrevealUonUscroll Component"}),En={sm:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},md:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},lg:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"}},Ln=({icon:t,text:r,variant:a="default",size:o="md",className:n})=>{const{container:s,icon:l}=_t(a),c=En[o];return e.jsxs("div",{className:u("inline-flex items-center rounded-full mb-6",s,c.container,n),children:[e.jsx("div",{className:u("animate-float-icon",l,c.icon),children:t}),e.jsx("span",{className:c.text,children:r})]})},$n=({title:t,onAdd:r,addButtonTooltip:a,loading:o,className:n=""})=>e.jsx("div",{className:`p-4 border-b border-gray-200 dark:border-gray-700 ${n}`,children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:t}),e.jsxs("div",{className:"flex items-center space-x-2",children:[o&&e.jsx("div",{className:"w-5 h-5 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}),r&&e.jsx("button",{onClick:r,className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors",title:a,"aria-label":a||"Add",children:e.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})})]})]})}),In=t=>{switch(t){case"cog":return M.Cog6ToothIcon;case"arrow-right":return M.ArrowRightIcon;case"shield":return M.ShieldCheckIcon;case"reply":case"chat":return M.ChatBubbleLeftRightIcon;case"filter":return M.FunnelIcon;case"plug":return M.LinkIcon;case"adjustments":return M.AdjustmentsHorizontalIcon;case"currency-dollar":return M.CurrencyDollarIcon;default:return M.Cog6ToothIcon}},Un=({settings:t,selectedSetting:r,onSettingSelect:a,className:o=""})=>e.jsx("nav",{className:u("space-y-1",o),"aria-label":"Settings navigation",children:e.jsx("ul",{className:"space-y-1",role:"list",children:t.map(n=>{const s=In(n.icon),l=r===n.id;return e.jsx("li",{children:e.jsx("button",{onClick:()=>a(n.id),className:u("w-full flex items-center text-left px-3 py-2 rounded-lg transition-colors h-[44px]",T.body.sm(),l?"bg-orange-100 dark:bg-orange-900/30 text-orange-700 dark:text-orange-300":"hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300"),"aria-current":l?"page":void 0,title:n.description,children:e.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[e.jsx(s,{className:"h-5 w-5 mr-3 flex-shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:n.title})]})})},n.id)})})}),Mn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UskipUnavigation",children:r||"UskipUnavigation Component"}),Tn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsortUdropdown",children:r||"UsortUdropdown Component"}),An=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UversionUbadge",children:r||"UversionUbadge Component"}),Pn=({children:t,as:r="span"})=>e.jsx(r,{className:"sr-only",children:t}),Ee=V.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:T.link.subtle(),default:T.link.default(),muted:T.link.muted(),external:T.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),Fe=O.forwardRef(({className:t,variant:r,size:a,to:o,href:n,external:s,children:l,...c},d)=>{const g=o||n;return g?s||g.startsWith("http")||g.startsWith("mailto:")?e.jsx("a",{className:u(Ee({variant:r==="subtle"?"external":r,size:a,className:t})),href:g,target:"_blank",rel:"noopener noreferrer",ref:d,...c,children:l}):e.jsx(ve.Link,{className:u(Ee({variant:r,size:a,className:t})),to:g,ref:d,...c,children:l}):e.jsx("span",{className:u(Ee({variant:r,size:a,className:t})),...c,children:l})});Fe.displayName="SmartLink";const zn=(t,r)=>O.useMemo(()=>{let a=t;return Object.entries(r).forEach(([o,n])=>{const s=new RegExp(`\\b${o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");a=a.replace(s,l=>`<SmartLink to="${n}" variant="subtle">${l}</SmartLink>`)}),a},[t,r]),Dn={documentation:"/document",settings:"/settings",about:"/about",contact:"/contact","privacy policy":"/privacy",privacy:"/privacy","terms of service":"/terms",terms:"/terms","cookie policy":"/cookies",cookies:"/cookies",points:"/points","earn points":"/how-to-earn-points","how to earn points":"/how-to-earn-points","connect wallet":"/connect","connect your wallet":"/connect","wallet connection":"/connect",wallet:"/connect",compose:"/compose","compose email":"/compose","send email":"/compose",mail:"/mail",email:"/mail",inbox:"/mail",dashboard:"/mail",delegate:"/delegate",delegation:"/delegate",manage:"/manage","manage preferences":"/preferences",profile:"/settings",account:"/settings",preferences:"/preferences",token:"/token","web3 users":"/web3-users","web3 projects":"/web3-projects","get started":"/connect","start here":"/connect","learn more":"/document","read more":"/document","our features":"/document",support:"/contact",help:"/document","contact us":"/contact"},jn=({children:t,mappings:r=Dn,className:a,variant:o="subtle"})=>{const n=O.useMemo(()=>{if(!t||typeof t!="string")return t||"";let l=t;return Object.entries(r).sort(([d],[g])=>g.length-d.length).forEach(([d,g])=>{if(d&&g){const h=new RegExp(`\\b${d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");l=l.replace(h,b=>`__LINK_START__${g}__LINK_MID__${b}__LINK_END__`)}}),l},[t,r]);if(!n||typeof n!="string")return e.jsx("span",{className:a,children:t});const s=n.split(/(__LINK_START__.*?__LINK_END__)/);return e.jsx("span",{className:a,children:s.map((l,c)=>{const d=l.match(/__LINK_START__(.*?)__LINK_MID__(.*?)__LINK_END__/);if(d){const[,g,h]=d;return e.jsx(Fe,{to:g,variant:o,children:h},c)}return l})})},Bn=({href:t,children:r,variant:a="default",external:o=!1,showExternalIcon:n=!1,disabled:s=!1,className:l,...c})=>{const d=o||t.startsWith("http://")||t.startsWith("https://"),g={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium",secondary:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100",muted:"text-gray-500 dark:text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",underline:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 underline"},h=d?{target:"_blank",rel:"noopener noreferrer"}:{};return s?e.jsxs("span",{className:u("cursor-not-allowed opacity-50",g[a],l),children:[r,n&&d&&e.jsx(M.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1"})]}):e.jsxs("a",{href:t,className:u("inline-flex items-center transition-colors",g[a],l),...h,...c,children:[r,n&&d&&e.jsx(M.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1 flex-shrink-0"})]})},Wn=({href:t,children:r,showIcon:a=!0,iconPosition:o="right",size:n="md",variant:s="default",className:l,onClick:c})=>{const d={sm:{text:T.body.sm(),icon:"h-3 w-3",gap:"gap-1"},md:{text:T.body.md(),icon:"h-4 w-4",gap:"gap-1.5"},lg:{text:T.body.lg(),icon:"h-5 w-5",gap:"gap-2"}},g={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-700 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-200 font-semibold",muted:"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"},h=d[n];return e.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",onClick:c,className:u("inline-flex items-center",h.gap,h.text,g[s],"underline decoration-1 underline-offset-2","hover:decoration-2","transition-all duration-200",l),children:[a&&o==="left"&&e.jsx(M.ArrowTopRightOnSquareIcon,{className:u(h.icon,"flex-shrink-0")}),e.jsx("span",{children:r}),a&&o==="right"&&e.jsx(M.ArrowTopRightOnSquareIcon,{className:u(h.icon,"flex-shrink-0")})]})},Fn=({items:t,separator:r="/",className:a})=>e.jsx("nav",{className:u("flex items-center gap-2 text-sm",a),children:t.map((o,n)=>e.jsxs(m.Fragment,{children:[n>0&&e.jsx("span",{className:"text-gray-400 dark:text-gray-600",children:r}),n===t.length-1?e.jsx("span",{className:"text-gray-900 dark:text-white font-medium",children:o.label}):e.jsx("button",{onClick:o.onClick,className:"text-blue-600 dark:text-blue-400 hover:underline",children:o.label})]},n))}),On=H.Root,Mr=O.forwardRef(({className:t,...r},a)=>e.jsx(H.List,{ref:a,className:u(D.navigation.tabs.list(),t),...r}));Mr.displayName=H.List.displayName;const Tr=O.forwardRef(({className:t,...r},a)=>e.jsx(H.Trigger,{ref:a,className:u(D.navigation.tabs.trigger(),t),...r}));Tr.displayName=H.Trigger.displayName;const Ar=O.forwardRef(({className:t,...r},a)=>e.jsx(H.Content,{ref:a,className:u(D.navigation.tabs.content(),t),...r}));Ar.displayName=H.Content.displayName;const Vn=({items:t,orientation:r="horizontal",className:a})=>{const[o,n]=m.useState(new Set),s=c=>{n(d=>{const g=new Set(d);return g.has(c)?g.delete(c):g.add(c),g})},l=(c,d)=>{const g=c.children&&c.children.length>0,h=o.has(d),b=e.jsxs(e.Fragment,{children:[c.icon&&e.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:c.icon}),e.jsx("span",{className:"flex-1",children:c.label}),g&&e.jsx("svg",{className:u("w-4 h-4 transition-transform",r==="horizontal"&&!h&&"-rotate-90",h&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),v=u("flex items-center gap-2 px-4 py-2 text-sm font-medium","transition-colors",c.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800");return e.jsxs("div",{children:[g?e.jsx("button",{onClick:()=>s(d),className:u(v,"w-full"),children:b}):c.href?e.jsx("a",{href:c.href,className:v,onClick:c.onClick,children:b}):e.jsx("button",{onClick:c.onClick,className:u(v,"w-full"),children:b}),g&&h&&e.jsx("div",{className:u("bg-gray-50 dark:bg-gray-800/50",r==="horizontal"?"pl-4":"border-l-2 border-gray-200 dark:border-gray-700 ml-4"),children:c.children.map((p,y)=>e.jsx("div",{children:p.href?e.jsxs("a",{href:p.href,onClick:p.onClick,className:u("flex items-center gap-2 px-4 py-2 text-sm","transition-colors",p.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[p.icon&&e.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:p.icon}),p.label]}):e.jsxs("button",{onClick:p.onClick,className:u("w-full flex items-center gap-2 px-4 py-2 text-sm","transition-colors",p.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[p.icon&&e.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:p.icon}),p.label]})},y))})]},d)};return e.jsx("nav",{className:u("bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg",r==="horizontal"?"flex flex-wrap":"flex flex-col",a),children:t.map((c,d)=>l(c,d))})},Hn=({items:t,selectedPath:r,onSelect:a,variant:o="default",className:n})=>{const s=o==="compact"?"space-y-1":"space-y-0";return e.jsx("div",{className:u(s,n),children:t.map(l=>{const c=l.icon,d=r===l.path,g=l.disabled,h=u("flex items-start cursor-pointer transition-colors",o==="compact"?"p-3 rounded-lg":"p-4 border-b border-gray-200 dark:border-gray-700 last:border-b-0",g&&"opacity-50 cursor-not-allowed"),b=d?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300";return e.jsxs("div",{onClick:()=>!g&&a(l.path),className:u(h,!g&&b),role:"button",tabIndex:g?-1:0,"aria-current":d?"page":void 0,"aria-disabled":g,onKeyDown:v=>{!g&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),a(l.path))},children:[e.jsx(c,{className:"h-5 w-5 mt-0.5 mr-3 flex-shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:u("font-medium",T.body.md()),children:[l.label,l.badge!==void 0&&l.badge>0&&e.jsx("span",{className:"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:l.badge})]}),l.description&&e.jsx("div",{className:u("text-xs text-gray-500 dark:text-gray-400 mt-0.5"),children:l.description})]})]},l.id)})})},qn=({items:t,className:r})=>e.jsx("nav",{className:u("flex flex-col gap-1",r),children:t.map(a=>e.jsxs("button",{onClick:a.onClick,className:u("flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",a.active?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"),children:[a.icon&&e.jsx("span",{className:"w-5 h-5",children:a.icon}),e.jsx("span",{className:"flex-1 text-left font-medium",children:a.label}),a.badge&&e.jsx("span",{className:"px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs",children:a.badge})]},a.id))}),_n=({currentPage:t,totalPages:r,onPageChange:a,siblingCount:o=1,showFirstLast:n=!1,size:s="md",className:l})=>{const d={sm:{button:"h-8 w-8 text-xs",icon:"h-3 w-3",text:T.body.sm()},md:{button:"h-10 w-10 text-sm",icon:"h-4 w-4",text:T.body.md()},lg:{button:"h-12 w-12 text-base",icon:"h-5 w-5",text:T.body.lg()}}[s],h=(()=>{const C=[];C.push(1);const S=Math.max(t-o,2),x=Math.min(t+o,r-1);S>2&&C.push("ellipsis");for(let k=S;k<=x;k++)C.push(k);return x<r-1&&C.push("ellipsis"),r>1&&C.push(r),C})(),b=()=>{t>1&&a(t-1)},v=()=>{t<r&&a(t+1)},p=()=>{a(1)},y=()=>{a(r)},f=u("inline-flex items-center justify-center","rounded-md border border-gray-300 dark:border-gray-600","transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500","disabled:opacity-50 disabled:cursor-not-allowed"),w=C=>u(f,d.button,d.text,C?"bg-blue-600 text-white border-blue-600 dark:bg-blue-500 dark:border-blue-500":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"),N=u(f,d.button,"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700");return e.jsxs("nav",{className:u("flex items-center gap-1",l),"aria-label":"Pagination",children:[n&&e.jsx("button",{onClick:p,disabled:t===1,className:N,"aria-label":"Go to first page",children:e.jsx("span",{className:d.text,children:"First"})}),e.jsx("button",{onClick:b,disabled:t===1,className:N,"aria-label":"Go to previous page",children:e.jsx(M.ChevronLeftIcon,{className:d.icon})}),h.map((C,S)=>C==="ellipsis"?e.jsx("span",{className:u("inline-flex items-center justify-center",d.button,"text-gray-400 dark:text-gray-500"),children:"..."},`ellipsis-${S}`):e.jsx("button",{onClick:()=>a(C),className:w(C===t),"aria-label":`Go to page ${C}`,"aria-current":C===t?"page":void 0,children:C},C)),e.jsx("button",{onClick:v,disabled:t===r,className:N,"aria-label":"Go to next page",children:e.jsx(M.ChevronRightIcon,{className:d.icon})}),n&&e.jsx("button",{onClick:y,disabled:t===r,className:N,"aria-label":"Go to last page",children:e.jsx("span",{className:d.text,children:"Last"})})]})},Gn=({currentPage:t,totalPages:r,onPageChange:a,maxVisible:o=7,className:n})=>{const s=[];if(r<=o)for(let l=1;l<=r;l++)s.push(l);else{s.push(1),t>3&&s.push("...");const l=Math.max(2,t-1),c=Math.min(r-1,t+1);for(let d=l;d<=c;d++)s.push(d);t<r-2&&s.push("..."),s.push(r)}return e.jsxs("nav",{className:u("flex items-center gap-1",n),children:[e.jsx("button",{onClick:()=>a(t-1),disabled:t===1,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),s.map((l,c)=>l==="..."?e.jsx("span",{className:"px-3 py-2",children:"..."},`ellipsis-${c}`):e.jsx("button",{onClick:()=>a(l),className:u("px-3 py-2 rounded",l===t?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-gray-800"),children:l},l)),e.jsx("button",{onClick:()=>a(t+1),disabled:t===r,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})},Kn=({steps:t,currentStep:r,orientation:a="horizontal",clickable:o=!1,onStepClick:n,className:s})=>{const l=d=>{o&&n&&n(d)},c=d=>d<r?"completed":d===r?"active":"upcoming";return a==="horizontal"?e.jsx("div",{className:u("w-full",s),children:e.jsx("div",{className:"flex items-center justify-between",children:t.map((d,g)=>{const h=c(g),b=g===t.length-1;return e.jsxs(m.Fragment,{children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("button",{onClick:()=>l(g),disabled:!o,className:u("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default",o&&"hover:scale-110",h==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",h==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",h==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:h==="completed"?e.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):d.icon?e.jsx("span",{className:u("w-5 h-5",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:d.icon}):e.jsx("span",{className:u("text-sm font-semibold",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:g+1})}),e.jsxs("div",{className:"mt-2 text-center",children:[e.jsx("p",{className:u("text-sm font-medium",h==="active"?"text-blue-600 dark:text-blue-500":h==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:d.label}),d.description&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:d.description})]})]}),!b&&e.jsx("div",{className:"flex-1 h-0.5 mx-2 bg-gray-300 dark:bg-gray-700 relative",children:e.jsx("div",{className:u("absolute left-0 top-0 h-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",g<r?"w-full":"w-0")})})]},d.id)})})}):e.jsx("div",{className:u("w-full",s),children:e.jsx("div",{className:"space-y-4",children:t.map((d,g)=>{const h=c(g),b=g===t.length-1;return e.jsxs("div",{className:"flex gap-4",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("button",{onClick:()=>l(g),disabled:!o,className:u("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default flex-shrink-0",o&&"hover:scale-110",h==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",h==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",h==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:h==="completed"?e.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):d.icon?e.jsx("span",{className:u("w-5 h-5",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:d.icon}):e.jsx("span",{className:u("text-sm font-semibold",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:g+1})}),!b&&e.jsx("div",{className:"w-0.5 flex-1 min-h-[32px] bg-gray-300 dark:bg-gray-700 relative mt-2",children:e.jsx("div",{className:u("absolute top-0 left-0 w-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",g<r?"h-full":"h-0")})})]}),e.jsxs("div",{className:"flex-1 pb-4",children:[e.jsx("p",{className:u("text-sm font-medium",h==="active"?"text-blue-600 dark:text-blue-500":h==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:d.label}),d.description&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:d.description})]})]},d.id)})})})},Yn=({steps:t,currentStep:r,onStepClick:a,orientation:o="horizontal",className:n})=>e.jsx("nav",{className:u(o==="horizontal"?"flex items-center":"flex flex-col",n),children:t.map((s,l)=>e.jsxs("div",{className:u("flex items-center",o==="vertical"&&"flex-col items-start"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>a?.(l),disabled:l>r,className:u("w-10 h-10 rounded-full flex items-center justify-center font-semibold transition-colors",l<r&&"bg-green-500 text-white",l===r&&"bg-blue-500 text-white",l>r&&"bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400"),children:l<r?"✓":l+1}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:s.label}),s.description&&e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.description})]})]}),l<t.length-1&&e.jsx("div",{className:u(o==="horizontal"?"w-full h-0.5 mx-4":"h-8 w-0.5 ml-5 my-2","bg-gray-300 dark:bg-gray-700")})]},s.id))}),Qn=({subsections:t,isExpanded:r,selectedSubsection:a,parentSectionId:o,onSubsectionSelect:n})=>{const s=m.useRef(null),[l,c]=m.useState(void 0);return m.useEffect(()=>{if(s.current){const d=s.current.scrollHeight;c(r?d+8:0)}},[r,t]),e.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:l!==void 0?`${l}px`:"auto"},children:e.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:t.map(d=>e.jsx("button",{onClick:()=>n?.(d.id,o),className:`block w-full text-left px-3 py-2 rounded-md text-sm transition-all duration-200 hover:scale-[1.02] ${a===d.id?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-800 dark:hover:text-gray-200"}`,children:d.title},d.id))})})},Zn=({sections:t,selectedSection:r,selectedSubsection:a,expandedSections:o,onSectionSelect:n,onSubsectionSelect:s,onToggleSection:l,className:c=""})=>e.jsx("nav",{className:`space-y-2 ${c}`,children:t.map(d=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("button",{onClick:()=>n(d.id),className:`flex-1 text-left px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 hover:scale-[1.02] ${r===d.id&&!a?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-gray-100"}`,children:d.title}),d.subsections&&d.subsections.length>0&&e.jsx("button",{onClick:()=>l(d.id),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200",children:e.jsx(M.ChevronRightIcon,{className:`h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out ${o.includes(d.id)?"rotate-90":"rotate-0"}`})})]}),d.subsections&&e.jsx(Qn,{subsections:d.subsections,isExpanded:o.includes(d.id),selectedSubsection:a,parentSectionId:d.id,onSubsectionSelect:s})]},d.id))});function Xn({columns:t,data:r,keyExtractor:a,sort:o,onSort:n,onRowClick:s,striped:l=!1,hoverable:c=!1,compact:d=!1,bordered:g=!1,emptyMessage:h="No data available",className:b}){const v=y=>{y.sortable&&n&&n(y.key)},p={left:"text-left",center:"text-center",right:"text-right"};return e.jsx("div",{className:u("w-full overflow-x-auto",b),children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:e.jsx("tr",{children:t.map(y=>e.jsx("th",{className:u(d?"px-3 py-2":"px-6 py-3","text-xs font-medium text-gray-700 dark:text-gray-300 uppercase tracking-wider",p[y.align||"left"],y.sortable&&"cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-700",g&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),style:{width:y.width},onClick:()=>y.sortable&&v(y),children:e.jsxs("div",{className:"flex items-center gap-2",children:[y.label,y.sortable&&e.jsx("span",{className:"flex flex-col",children:o?.column===y.key?o.direction==="asc"?e.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M5 10l5-5 5 5H5z"})}):e.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M15 10l-5 5-5-5h10z"})}):e.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M5 10l5-5 5 5H5z"})})})]})},y.key))})}),e.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:r.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length,className:"px-6 py-8 text-center text-sm text-gray-500 dark:text-gray-400",children:h})}):r.map((y,f)=>e.jsx("tr",{className:u(l&&f%2===1&&"bg-gray-50 dark:bg-gray-800/50",c&&"hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",s&&"cursor-pointer"),onClick:()=>s?.(y,f),children:t.map(w=>e.jsx("td",{className:u(d?"px-3 py-2":"px-6 py-4","text-sm text-gray-900 dark:text-white",p[w.align||"left"],g&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),children:w.render?w.render(y,f):y[w.key]},w.key))},a(y,f)))})]})})}const Jn=({data:t,columns:r,hasActions:a=!1,renderCell:o,renderAction:n,emptyMessage:s="No data available",getRowKey:l=(d,g)=>String(g),className:c=""})=>!t||t.length===0?e.jsx("div",{className:`text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg ${c}`,children:e.jsx("p",{className:`${T.body.sm()} text-gray-500 dark:text-gray-400`,children:s})}):e.jsx("div",{className:`relative ${c}`,children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[r.map((d,g)=>e.jsx("th",{className:`${T.label.default()} text-left py-3 px-4 whitespace-nowrap`,children:d},g)),a&&e.jsx("th",{className:`${T.label.default()} text-right py-3 px-4 sticky right-0 bg-white dark:bg-gray-900 whitespace-nowrap`})]})}),e.jsx("tbody",{children:t.map((d,g)=>e.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[r.map((h,b)=>{const v=o(d,b);return e.jsx("td",{className:"py-3 px-4",children:typeof v=="string"?e.jsx("span",{className:T.body.sm(),children:v}):v},b)}),a&&e.jsx("td",{className:"py-3 px-4 text-right sticky right-0 bg-white dark:bg-gray-900",children:n?.(d)})]},l(d,g)))})]})})}),Rn=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdataUgrid",children:r||"UdataUgrid Component"}),es=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UpivotUtable",children:r||"UpivotUtable Component"}),rs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UspreadsheetUgrid",children:r||"UspreadsheetUgrid Component"}),ts=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcolumnUresize",children:r||"UcolumnUresize Component"}),as=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcellUeditor",children:r||"UcellUeditor Component"}),os=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtableUreservation",children:r||"UtableUreservation Component"}),ns=({children:t,type:r="unordered",spacing:a="sm",marker:o,size:n="md",className:s})=>{const l=r==="ordered"?"ol":"ul",c={none:"space-y-0",sm:"space-y-1",md:"space-y-2",lg:"space-y-4"},d={sm:"text-sm",md:"text-base",lg:"text-lg"},g=()=>o==="none"?"list-none":r==="unordered"?{disc:"list-disc",circle:"list-circle",square:"list-square",decimal:"list-disc",alpha:"list-disc",roman:"list-disc",none:"list-none"}[o||"disc"]:{decimal:"list-decimal",alpha:"list-alpha",roman:"list-roman",disc:"list-decimal",circle:"list-decimal",square:"list-decimal",none:"list-none"}[o||"decimal"];return e.jsx(l,{className:u("ml-6",g(),c[a],d[n],"text-gray-900 dark:text-gray-100",s),children:t})},ss=({children:t,className:r})=>e.jsx("li",{className:u("leading-relaxed",r),children:t}),ls=O.forwardRef(({className:t,type:r,...a},o)=>e.jsx("input",{type:r,className:u(D.input.default(),t),ref:o,...a}));ls.displayName="Input",V.cva("min-h-screen flex flex-col",{variants:{background:{default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",transparent:"bg-transparent",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20"},overflow:{visible:"overflow-visible",hidden:"overflow-hidden",scroll:"overflow-auto"}},defaultVariants:{background:"default",overflow:"visible"}});const Pr=B.Root,is=B.Value,Oe=O.forwardRef(({className:t,children:r,...a},o)=>e.jsxs(B.Trigger,{ref:o,className:u("flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[r,e.jsx(B.Icon,{asChild:!0,children:e.jsx(J.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));Oe.displayName=B.Trigger.displayName;const zr=O.forwardRef(({className:t,...r},a)=>e.jsx(B.ScrollUpButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...r,children:e.jsx(J.ChevronUp,{className:"h-4 w-4"})}));zr.displayName=B.ScrollUpButton.displayName;const Dr=O.forwardRef(({className:t,...r},a)=>e.jsx(B.ScrollDownButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...r,children:e.jsx(J.ChevronDown,{className:"h-4 w-4"})}));Dr.displayName=B.ScrollDownButton.displayName;const Ve=O.forwardRef(({className:t,children:r,position:a="popper",...o},n)=>e.jsx(B.Portal,{children:e.jsxs(B.Content,{ref:n,className:u(D.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden 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",a==="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:a,...o,children:[e.jsx(zr,{}),e.jsx(B.Viewport,{className:u(D.overlays.dropdown.itemContainer(),a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),e.jsx(Dr,{})]})}));Ve.displayName=B.Content.displayName;const ds=O.forwardRef(({className:t,...r},a)=>e.jsx(B.Label,{ref:a,className:u(D.overlays.dropdown.header(),"py-1.5",t),...r}));ds.displayName=B.Label.displayName;const He=O.forwardRef(({className:t,children:r,...a},o)=>e.jsxs(B.Item,{ref:o,className:u(D.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[e.jsx(B.ItemText,{children:r}),e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(B.ItemIndicator,{children:e.jsx(J.Check,{className:"h-4 w-4"})})})]}));He.displayName=B.Item.displayName;const cs=O.forwardRef(({className:t,...r},a)=>e.jsx(B.Separator,{ref:a,className:u("my-1 h-px bg-gray-200 dark:bg-gray-700",t),...r}));cs.displayName=B.Separator.displayName;const qe=V.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:T.link.subtle(),default:T.link.default(),muted:T.link.muted(),external:T.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),gs=O.forwardRef(({className:t,variant:r,size:a,to:o,href:n,external:s,children:l,...c},d)=>{const g=o||n;return g?s||g.startsWith("http")||g.startsWith("mailto:")?e.jsx("a",{className:u(qe({variant:r==="subtle"?"external":r,size:a,className:t})),href:g,target:"_blank",rel:"noopener noreferrer",ref:d,...c,children:l}):e.jsx(ve.Link,{className:u(qe({variant:r,size:a,className:t})),to:g,ref:d,...c,children:l}):e.jsx("span",{className:u(qe({variant:r,size:a,className:t})),...c,children:l})});gs.displayName="SmartLink";const us=O.forwardRef(({className:t,...r},a)=>e.jsx(oe.Root,{className:u("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-700",t),...r,ref:a,children:e.jsx(oe.Thumb,{className:u("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));us.displayName=oe.Root.displayName;const hs=O.forwardRef(({className:t,...r},a)=>e.jsx(H.List,{ref:a,className:u(D.navigation.tabs.list(),t),...r}));hs.displayName=H.List.displayName;const bs=O.forwardRef(({className:t,...r},a)=>e.jsx(H.Trigger,{ref:a,className:u(D.navigation.tabs.trigger(),t),...r}));bs.displayName=H.Trigger.displayName;const ys=O.forwardRef(({className:t,...r},a)=>e.jsx(H.Content,{ref:a,className:u(D.navigation.tabs.content(),t),...r}));ys.displayName=H.Content.displayName,m.createContext(void 0);const fs=({children:t,onAction:r,actionText:a="Remove",actionIcon:o=M.TrashIcon,destructive:n=!0,isProcessing:s=!1,variant:l="default",className:c})=>{const d="flex items-center justify-between p-4 rounded-lg transition-colors",g={default:"bg-gray-50 dark:bg-gray-700",compact:"bg-gray-50 dark:bg-gray-700 py-2 px-3",elevated:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-sm hover:shadow-md"};return e.jsxs("div",{className:u(d,g[l],c),children:[e.jsx("div",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:t}),e.jsxs(_,{variant:n?"ghost":"outline",size:"sm",onClick:r,disabled:s,className:u("ml-4",n&&"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 hover:bg-red-50 dark:hover:bg-red-900/20"),children:[e.jsx(o,{className:"h-4 w-4 mr-1"}),a]})]})},ps=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UuserUtable",children:r||"UuserUtable Component"}),ms=({source:t,target:r,onChange:a,sourceTitle:o="Available",targetTitle:n="Selected",searchable:s=!0,sourceSearchPlaceholder:l="Search available...",targetSearchPlaceholder:c="Search selected...",height:d=300,disabled:g=!1,className:h})=>{const[b,v]=m.useState(""),[p,y]=m.useState(""),[f,w]=m.useState(new Set),[N,C]=m.useState(new Set),S=s?t.filter(P=>P.label.toLowerCase().includes(b.toLowerCase())):t,x=s?r.filter(P=>P.label.toLowerCase().includes(p.toLowerCase())):r,k=P=>{const W=new Set(f);W.has(P)?W.delete(P):W.add(P),w(W)},L=P=>{const W=new Set(N);W.has(P)?W.delete(P):W.add(P),C(W)},I=()=>{const P=t.filter(F=>f.has(F.id)),W=t.filter(F=>!f.has(F.id)),j=[...r,...P];a(W,j),w(new Set)},$=()=>{const P=r.filter(F=>N.has(F.id)),W=r.filter(F=>!N.has(F.id)),j=[...t,...P];a(j,W),C(new Set)},U=()=>{const P=[...r,...t];a([],P),w(new Set)},A=()=>{const P=[...t,...r];a(P,[]),C(new Set)},z=(P,W,j,F,q,dr,y0)=>e.jsxs("div",{className:"flex flex-col flex-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-900",children:[e.jsxs("div",{className:"px-3 py-2 border-b border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:W}),e.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:[P.length," item",P.length!==1?"s":""]})]}),s&&e.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:e.jsx("input",{type:"text",value:q,onChange:Y=>dr(Y.target.value),placeholder:y0,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"})}),e.jsx("div",{className:"overflow-y-auto p-2 space-y-1",style:{height:s?d-120:d-60},children:P.length===0?e.jsx("div",{className:"flex items-center justify-center h-full text-sm text-gray-500 dark:text-gray-400",children:"No items"}):P.map(Y=>{const cr=j.has(Y.id);return e.jsx("button",{onClick:()=>!Y.disabled&&F(Y.id),disabled:Y.disabled||g,className:u("w-full px-3 py-2 text-left rounded-md transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-50 disabled:cursor-not-allowed",cr&&"bg-blue-50 dark:bg-blue-900/30 border border-blue-200 dark:border-blue-700"),children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("div",{className:u("w-4 h-4 border-2 rounded flex items-center justify-center flex-shrink-0 mt-0.5",cr?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:cr&&e.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:Y.label}),Y.description&&e.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:Y.description})]})]})},Y.id)})})]});return e.jsxs("div",{className:u("flex gap-4",h),children:[z(S,o,f,k,b,v,l),e.jsxs("div",{className:"flex flex-col justify-center gap-2",children:[e.jsx("button",{onClick:U,disabled:g||t.length===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to selected",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 5l7 7-7 7M5 5l7 7-7 7"})})}),e.jsx("button",{onClick:I,disabled:g||f.size===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to target",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),e.jsx("button",{onClick:$,disabled:g||N.size===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to source",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),e.jsx("button",{onClick:A,disabled:g||r.length===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to available",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 19l-7-7 7-7M19 19l-7-7 7-7"})})})]}),z(x,n,N,L,p,y,c)]})};function xs({items:t,itemHeight:r,height:a,renderItem:o,keyExtractor:n,overscan:s=3,className:l}){const[c,d]=m.useState(0),g=m.useRef(null),h=f=>{d(f.currentTarget.scrollTop)},b=t.length*r,v=Math.max(0,Math.floor(c/r)-s),p=Math.min(t.length-1,Math.ceil((c+a)/r)+s),y=t.slice(v,p+1);return e.jsx("div",{ref:g,className:u("overflow-auto",l),style:{height:a},onScroll:h,children:e.jsx("div",{style:{height:b,position:"relative"},children:y.map((f,w)=>{const N=v+w;return e.jsx("div",{style:{position:"absolute",top:N*r,height:r,width:"100%"},children:o(f,N)},n(f,N))})})})}const vs=({data:t,selectedId:r,onSelect:a,expandedIds:o,onExpand:n,defaultExpanded:s=!1,showLines:l=!1,className:c})=>{const[d,g]=m.useState(new Set(s?t.map(y=>y.id):[])),h=o!==void 0?new Set(o):d,b=y=>{o!==void 0&&n?n(y):g(f=>{const w=new Set(f);return w.has(y)?w.delete(y):w.add(y),w})},v=y=>{!y.disabled&&a&&a(y)},p=(y,f=0)=>{const w=y.children&&y.children.length>0,N=h.has(y.id),C=r===y.id;return e.jsxs("div",{children:[e.jsxs("div",{className:u("flex items-center gap-2 px-2 py-1.5 rounded-md transition-colors",!y.disabled&&"hover:bg-gray-100 dark:hover:bg-gray-800",C&&"bg-blue-50 dark:bg-blue-900/30",y.disabled&&"opacity-50 cursor-not-allowed",!y.disabled&&"cursor-pointer"),style:{paddingLeft:`${f*1.5+.5}rem`},onClick:()=>v(y),children:[w?e.jsx("button",{onClick:S=>{S.stopPropagation(),b(y.id)},className:"flex-shrink-0 w-4 h-4 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",children:e.jsx("svg",{className:u("w-3 h-3 transition-transform",N&&"rotate-90"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}):e.jsx("div",{className:"w-4 h-4 flex-shrink-0"}),y.icon&&e.jsx("span",{className:"flex-shrink-0 w-4 h-4 text-gray-600 dark:text-gray-400",children:y.icon}),e.jsx("span",{className:u("flex-1 text-sm",C?"text-blue-700 dark:text-blue-300 font-medium":"text-gray-900 dark:text-white"),children:y.label})]}),w&&N&&e.jsx("div",{className:u(l&&"border-l-2 border-gray-200 dark:border-gray-700 ml-2"),children:y.children.map(S=>p(S,f+1))})]},y.id)};return e.jsx("div",{className:u("w-full",c),children:t.map(y=>p(y,0))})},ks=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UlistingUform",children:r||"UlistingUform Component"}),ws="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border border-blue-200 dark:border-blue-800",Cs={none:"",sm:"p-3",md:"p-6",lg:"p-8"},_e=({variant:t="elevated",padding:r="md",icon:a,onClose:o,className:n,children:s,...l})=>{const d=["info","success","warning","error"].includes(t)&&(a||o),g=t==="callout"?ws:Ht(t);return e.jsx("div",{className:u("rounded-lg",g,Cs[r],n),...l,children:d?e.jsxs("div",{className:"flex items-start gap-3",children:[a&&e.jsx("div",{className:"flex-shrink-0 text-lg",children:a}),e.jsx("div",{className:"flex-1 min-w-0",children:s}),o&&e.jsx("button",{onClick:o,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity","aria-label":"Close",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):s})},Ns=({title:t,description:r,className:a,children:o,...n})=>e.jsxs("div",{className:u("space-y-1.5",a),...n,children:[t&&e.jsx("h3",{className:T.heading.h4(),children:t}),r&&e.jsx("p",{className:T.body.sm(),children:r}),o]}),Ss=({className:t,children:r,...a})=>e.jsx("div",{className:u("",t),...a,children:r}),Es=({className:t,children:r,...a})=>e.jsx("div",{className:u("flex items-center pt-4",t),...a,children:r}),Ls=({title:t,children:r,variant:a="info",size:o="default",className:n})=>{const s={sm:"sm",default:"md",lg:"lg"},l=a==="neutral"?"bordered":a;return e.jsxs(_e,{variant:l,padding:s[o],className:n,children:[t&&e.jsx("h3",{className:u("font-semibold mb-2",o==="sm"?"text-base":o==="lg"?"text-xl":"text-lg"),children:t}),r]})},$s=({title:t,icon:r,children:a,variant:o="gradient",size:n="default",centered:s=!1,className:l})=>{const c={sm:"sm",default:"md",lg:"lg"},d=o==="gradient"||o==="neutral"?"callout":o;return e.jsx(_e,{variant:d,padding:c[n],className:l,children:e.jsxs("div",{className:u("space-y-4",s&&"text-center"),children:[r&&e.jsx("div",{className:u("font-bold",n==="sm"?"text-2xl":n==="lg"?"text-5xl":"text-4xl",s?"text-center":"text-left"),children:r}),t&&e.jsx("h3",{className:u("font-bold mb-4",n==="sm"?"text-lg":n==="lg"?"text-3xl":"text-2xl"),children:t}),e.jsx("div",{className:u("text-gray-600 dark:text-gray-400",n==="sm"?"text-sm":n==="lg"?"text-lg":"text-base"),children:a})]})})},Is=({title:t,value:r,change:a,changePeriod:o="vs last period",icon:n,variant:s="default",className:l})=>{const c={default:"bg-white dark:bg-gray-900",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"};return e.jsxs("div",{className:u("rounded-lg border border-gray-200 dark:border-gray-700 p-6",c[s],l),children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsx("h3",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:t}),n&&e.jsx("div",{className:"text-gray-400 dark:text-gray-600",children:n})]}),e.jsx("div",{className:"flex items-end justify-between",children:e.jsxs("div",{children:[e.jsx("p",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:r}),a!==void 0&&e.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[e.jsxs("span",{className:u("text-sm font-medium",a>=0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:[a>=0?"↑":"↓"," ",Math.abs(a),"%"]}),e.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:o})]})]})})]})},Us=({src:t,alt:r="Avatar",fallback:a,name:o,size:n="md",status:s,className:l,onClick:c})=>{const[d,g]=m.useState(!1),h={sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"},b={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},v={online:"bg-green-500",offline:"bg-gray-400",away:"bg-yellow-500",busy:"bg-red-500"},y=a||(o?(N=>{const C=N.trim().split(/\s+/);return C.length===1?C[0].charAt(0).toUpperCase():C[0].charAt(0).toUpperCase()+C[C.length-1].charAt(0).toUpperCase()})(o):""),f=t&&!d,w=()=>{g(!0)};return e.jsxs("div",{className:"relative inline-block flex-shrink-0",children:[e.jsx("div",{className:u("flex items-center justify-center overflow-hidden rounded-full",h[n],!f&&"bg-gray-300 dark:bg-gray-600 text-gray-700 dark:text-gray-200",c&&"cursor-pointer hover:opacity-80 transition-opacity",l),onClick:c,role:c?"button":void 0,tabIndex:c?0:void 0,children:f?e.jsx("img",{src:t,alt:r,className:"w-full h-full object-cover",onError:w}):e.jsx("span",{className:"font-semibold",children:y})}),s&&e.jsx("span",{className:u("absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-gray-800",v[s],b[n]),"aria-label":s})]})},Ms=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UavatarUgroup",children:r||"UavatarUgroup Component"}),Ts=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UprofileUheader",children:r||"UprofileUheader Component"}),As=({label:t,value:r,orientation:a="vertical",align:o="start",labelWidth:n="auto",size:s="md",separator:l=!1,labelVariant:c="muted",valueVariant:d="default",className:g,labelClassName:h,valueClassName:b})=>{const v={sm:{label:T.body.sm(),value:T.body.sm(),gap:"gap-1"},md:{label:T.body.md(),value:T.body.md(),gap:"gap-2"},lg:{label:T.body.lg(),value:T.body.lg(),gap:"gap-3"}},p={auto:"",sm:"w-24",md:"w-32",lg:"w-40"},y={start:"justify-start",center:"justify-center",between:"justify-between"},f={default:"text-gray-700 dark:text-gray-300",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold"},w={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold",primary:"text-blue-600 dark:text-blue-400"},N=v[s];return e.jsxs("div",{className:u(a==="horizontal"?"flex items-center":"flex flex-col",a==="horizontal"&&y[o],N.gap,l&&"pb-3 mb-3 border-b border-gray-200 dark:border-gray-700",g),children:[e.jsx("dt",{className:u(N.label,f[c],a==="horizontal"&&p[n],a==="horizontal"&&"flex-shrink-0",h),children:t}),e.jsx("dd",{className:u(N.value,w[d],a==="horizontal"&&"flex-1",b),children:r})]})},Ps=({value:t,label:r,variant:a="neutral",size:o="md",align:n="center",icon:s,iconPosition:l="top",className:c,valueClassName:d,labelClassName:g})=>{const h={primary:{value:"text-blue-600 dark:text-blue-400",label:"text-blue-600/70 dark:text-blue-400/70",icon:"text-blue-600 dark:text-blue-400"},success:{value:"text-green-600 dark:text-green-400",label:"text-green-600/70 dark:text-green-400/70",icon:"text-green-600 dark:text-green-400"},warning:{value:"text-yellow-600 dark:text-yellow-400",label:"text-yellow-600/70 dark:text-yellow-400/70",icon:"text-yellow-600 dark:text-yellow-400"},danger:{value:"text-red-600 dark:text-red-400",label:"text-red-600/70 dark:text-red-400/70",icon:"text-red-600 dark:text-red-400"},neutral:{value:"text-gray-900 dark:text-gray-100",label:"text-gray-600 dark:text-gray-400",icon:"text-gray-600 dark:text-gray-400"},white:{value:"text-white",label:"text-white/70",icon:"text-white"}},b={sm:{value:T.heading.h5(),label:T.caption.default(),icon:"h-4 w-4"},md:{value:T.heading.h4(),label:T.body.sm(),icon:"h-5 w-5"},lg:{value:T.heading.h3(),label:T.body.md(),icon:"h-6 w-6"},xl:{value:T.heading.h2(),label:T.body.lg(),icon:"h-8 w-8"}},v={left:"text-left",center:"text-center",right:"text-right"},p=h[a],y=b[o];return e.jsxs("div",{className:u(v[n],c),children:[s&&l==="top"&&e.jsx(s,{className:u(y.icon,p.icon,"mb-2",n==="center"&&"mx-auto")}),e.jsxs("div",{className:u(l==="left"&&s&&"flex items-center gap-3",n==="center"&&l==="left"&&"justify-center"),children:[s&&l==="left"&&e.jsx(s,{className:u(y.icon,p.icon)}),e.jsxs("div",{children:[e.jsx("div",{className:u("font-bold",y.value,p.value,d),children:t}),e.jsx("div",{className:u(y.label,p.label,g),children:r})]})]})]})},jr=({icon:t,title:r="No data",description:a,action:o,className:n})=>e.jsxs("div",{className:u("flex flex-col items-center justify-center py-12 px-4 text-center",n),children:[t&&e.jsx("div",{className:"mb-4 text-gray-400 dark:text-gray-600",children:t}),e.jsx("h3",{className:u(T.heading.h3(),"mb-2"),children:r}),a&&e.jsx("p",{className:u(T.body.sm(),"text-gray-600 dark:text-gray-400 max-w-sm mb-6"),children:a}),o&&e.jsx("div",{className:"mt-4",children:o})]}),zs=({title:t,subtext:r,className:a})=>e.jsx(jr,{title:t,description:r,className:a}),Ds=({data:t,orientation:r="vertical",showValues:a=!1,showGrid:o=!0,barWidth:n=40,height:s=300,className:l})=>{const c=Math.max(...t.map(g=>g.value)),d="#3b82f6";return e.jsx("div",{className:u("w-full",l),children:e.jsxs("div",{className:"relative bg-white dark:bg-gray-900 rounded-lg p-6",style:{height:`${s}px`},children:[o&&e.jsx("div",{className:"absolute inset-6 flex flex-col justify-between",children:[...Array(5)].map((g,h)=>e.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700"},h))}),r==="vertical"?e.jsx("div",{className:"relative h-full flex items-end justify-around gap-2",children:t.map((g,h)=>{const b=g.value/c*100;return e.jsxs("div",{className:"flex flex-col items-center gap-2",style:{width:`${n}px`},children:[a&&e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:g.value}),e.jsx("div",{className:"w-full rounded-t transition-all hover:opacity-80",style:{height:`${b}%`,backgroundColor:g.color||d}}),e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:g.label})]},h)})}):e.jsx("div",{className:"relative h-full flex flex-col justify-around gap-2",children:t.map((g,h)=>{const b=g.value/c*100;return e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 w-16 text-right",children:g.label}),e.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-8 rounded transition-all hover:opacity-80",style:{width:`${b}%`,backgroundColor:g.color||d}}),a&&e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:g.value})]})]},h)})})]})})},js=({series:t,showLegend:r=!0,showGrid:a=!0,showPoints:o=!0,height:n=300,xLabels:s,className:l})=>{const c=t.flatMap(p=>p.data),d=Math.max(...c.map(p=>p.y)),g=Math.min(...c.map(p=>p.y)),h=Math.max(...c.map(p=>p.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],v=p=>p.length===0?"":`M ${p.map(f=>{const w=f.x/h*100,N=100-(f.y-g)/(d-g)*100;return`${w},${N}`}).join(" L ")}`;return e.jsxs("div",{className:u("w-full",l),children:[r&&e.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:t.map((p,y)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:p.color||b[y%b.length]}}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:p.name})]},y))}),e.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[e.jsxs("div",{className:"relative",style:{height:`${n}px`},children:[a&&e.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((p,y)=>e.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${y*25}%`}},y))}),e.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:t.map((p,y)=>{const f=p.color||b[y%b.length];return e.jsxs("g",{children:[e.jsx("path",{d:v(p.data),fill:"none",stroke:f,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),o&&p.data.map((w,N)=>{const C=w.x/h*100,S=100-(w.y-g)/(d-g)*100;return e.jsx("circle",{cx:C,cy:S,r:"1",fill:f,vectorEffect:"non-scaling-stroke"},N)})]},y)})})]}),s&&e.jsx("div",{className:"flex justify-between mt-2",children:s.map((p,y)=>e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:p},y))})]})]})},Bs=({data:t,variant:r="pie",showLegend:a=!0,showPercentages:o=!1,size:n=200,donutHoleSize:s=40,className:l})=>{const c=t.reduce((y,f)=>y+f.value,0),d=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"],g=t.reduce((y,f,w)=>{const N=f.value/c*100,C=N/100*360,S=y.length>0?y[y.length-1].endAngle:-90,x=S+C;return y.push({...f,percentage:N,startAngle:S,endAngle:x,color:f.color||d[w%d.length]}),y},[]),h=(y,f,w,N)=>{const C=(N-90)*Math.PI/180;return{x:y+w*Math.cos(C),y:f+w*Math.sin(C)}},b=(y,f,w,N,C)=>{const S=h(y,f,w,C),x=h(y,f,w,N),k=C-N<=180?"0":"1";if(r==="donut"){const L=w*s/100,I=h(y,f,L,C),$=h(y,f,L,N);return["M",S.x,S.y,"A",w,w,0,k,0,x.x,x.y,"L",$.x,$.y,"A",L,L,0,k,1,I.x,I.y,"Z"].join(" ")}return["M",y,f,"L",S.x,S.y,"A",w,w,0,k,0,x.x,x.y,"Z"].join(" ")},v=n/2,p=n/2-10;return e.jsxs("div",{className:u("flex flex-col items-center gap-4",l),children:[e.jsx("svg",{width:n,height:n,className:"transform rotate-0",children:g.map((y,f)=>e.jsx("path",{d:b(v,v,p,y.startAngle,y.endAngle),fill:y.color,className:"transition-opacity hover:opacity-80"},f))}),a&&e.jsx("div",{className:"flex flex-col gap-2",children:g.map((y,f)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:y.color}}),e.jsxs("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:[y.label,o&&e.jsxs("span",{className:"text-gray-500 dark:text-gray-400 ml-1",children:["(",Math.round(y.percentage),"%)"]})]})]},f))})]})},Ws=({series:t,showLegend:r=!0,showGrid:a=!0,fillOpacity:o=.2,height:n=300,xLabels:s,className:l})=>{const c=t.flatMap(y=>y.data),d=Math.max(...c.map(y=>y.y)),g=Math.min(...c.map(y=>y.y)),h=Math.max(...c.map(y=>y.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],v=y=>{if(y.length===0)return"";const f=y.map(C=>{const S=C.x/h*100,x=100-(C.y-g)/(d-g)*100;return`${S},${x}`}),w=y[0].x/h*100,N=y[y.length-1].x/h*100;return`M ${w},100 L ${f.join(" L ")} L ${N},100 Z`},p=y=>y.length===0?"":`M ${y.map(w=>{const N=w.x/h*100,C=100-(w.y-g)/(d-g)*100;return`${N},${C}`}).join(" L ")}`;return e.jsxs("div",{className:u("w-full",l),children:[r&&e.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:t.map((y,f)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:y.color||b[f%b.length]}}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:y.name})]},f))}),e.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[e.jsxs("div",{className:"relative",style:{height:`${n}px`},children:[a&&e.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((y,f)=>e.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${f*25}%`}},f))}),e.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:t.map((y,f)=>{const w=y.color||b[f%b.length];return e.jsxs("g",{children:[e.jsx("path",{d:v(y.data),fill:w,fillOpacity:o}),e.jsx("path",{d:p(y.data),fill:"none",stroke:w,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"})]},f)})})]}),s&&e.jsx("div",{className:"flex justify-between mt-2",children:s.map((y,f)=>e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:y},f))})]})]})},Fs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UradarUchart",children:r||"UradarUchart Component"}),Os=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UbubbleUchart",children:r||"UbubbleUchart Component"}),Vs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UscatterUplot",children:r||"UscatterUplot Component"}),Hs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtreeUmap",children:r||"UtreeUmap Component"}),qs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsankeyUdiagram",children:r||"UsankeyUdiagram Component"}),_s=({data:t,width:r=100,height:a=30,color:o="#3b82f6",fill:n=!1,className:s})=>{if(t.length===0)return null;const l=Math.max(...t),c=Math.min(...t),d=l-c||1,g=t.map((h,b)=>{const v=b/(t.length-1)*r,p=a-(h-c)/d*a;return`${v},${p}`}).join(" ");return e.jsxs("svg",{width:r,height:a,className:u("inline-block",s),children:[n&&e.jsx("polygon",{points:`0,${a} ${g} ${r},${a}`,fill:o,opacity:"0.2"}),e.jsx("polyline",{points:g,fill:"none",stroke:o,strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round"})]})},Gs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"Uheatmap",children:r||"Uheatmap Component"}),Ks=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfunnelUchart",children:r||"UfunnelUchart Component"}),Ys=({className:t,children:r,disabled:a})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"BurndownChart",children:r||"BurndownChart Component"}),Qs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UperformanceUchart",children:r||"UperformanceUchart Component"}),Zs=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmetricUcomparison",children:r||"UmetricUcomparison Component"}),Xs=({value:t,min:r=0,max:a=100,size:o=120,strokeWidth:n=10,showValue:s=!0,label:l,variant:c="primary",className:d})=>{const g=Math.min(a,Math.max(r,t)),h=(g-r)/(a-r)*100,b=o/2,v=(o-n)/2,p=Math.PI*v,y=p-h/100*p,f={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"};return e.jsxs("div",{className:u("inline-flex flex-col items-center gap-2",d),children:[e.jsxs("svg",{width:o,height:o*.65,className:"transform rotate-180",children:[e.jsx("path",{d:`M ${n/2} ${b} A ${v} ${v} 0 0 1 ${o-n/2} ${b}`,fill:"none",className:"stroke-gray-200 dark:stroke-gray-700",strokeWidth:n,strokeLinecap:"round"}),e.jsx("path",{d:`M ${n/2} ${b} A ${v} ${v} 0 0 1 ${o-n/2} ${b}`,fill:"none",className:u(f[c],"transition-all duration-500"),strokeWidth:n,strokeDasharray:p,strokeDashoffset:y,strokeLinecap:"round"})]}),s&&e.jsxs("div",{className:"text-center -mt-8",children:[e.jsx("div",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:Math.round(g)}),l&&e.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:l})]})]})},Js=({value:t,max:r=100,variant:a="primary",size:o="md",showLabel:n=!1,labelPosition:s="outside",label:l,className:c,barClassName:d,animated:g=!0,striped:h=!1})=>{const b=Math.min(Math.max(t/r*100,0),100),v=l||`${Math.round(b)}%`,p={primary:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500",purple:"bg-purple-600 dark:bg-purple-500",gray:"bg-gray-600 dark:bg-gray-500"},y={sm:"h-1",md:"h-2",lg:"h-3"};return e.jsx("div",{className:u("w-full",c),children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:u("flex-1 bg-gray-200 dark:bg-gray-600 rounded-full overflow-hidden",y[o]),children:e.jsx("div",{className:u("rounded-full",y[o],p[a],g&&"transition-all duration-300 ease-in-out",h&&"bg-gradient-to-r from-transparent via-white/20 to-transparent bg-[length:20px_100%]",d),style:{width:`${b}%`},role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":r,children:n&&s==="inside"&&o==="lg"&&e.jsx("span",{className:"flex items-center justify-center h-full text-xs font-medium text-white px-2",children:v})})}),n&&s==="outside"&&e.jsx("span",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 whitespace-nowrap",children:v})]})})},Rs=({value:t=0,max:r=100,variant:a="default",size:o="md",showLabel:n=!1,label:s,indeterminate:l=!1,striped:c=!1,animated:d=!1,className:g})=>{const h=Math.min(Math.max(t/r*100,0),100),b={default:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500"},v={sm:"h-1",md:"h-2",lg:"h-4"};return e.jsxs("div",{className:u("w-full",g),children:[e.jsx("div",{className:u("w-full bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden",v[o]),role:"progressbar","aria-valuenow":l?void 0:h,"aria-valuemin":0,"aria-valuemax":100,children:l?e.jsx("div",{className:u("h-full rounded-full animate-pulse",b[a]),style:{width:"100%"}}):e.jsx("div",{className:u("h-full rounded-full transition-all duration-300",b[a],c&&"bg-stripe",c&&d&&"animate-stripe"),style:{width:`${h}%`}})}),(n||s)&&e.jsx("div",{className:"mt-1 text-xs text-gray-600 dark:text-gray-400 text-right",children:s||`${Math.round(h)}%`})]})},el=({value:t,size:r=100,strokeWidth:a=8,showValue:o=!0,label:n,variant:s="primary",color:l,trackColor:c,className:d})=>{const g=Math.min(100,Math.max(0,t)),h=r/2,b=(r-a)/2,v=2*Math.PI*b,p=v-g/100*v,y={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"},f=c||"stroke-gray-200 dark:stroke-gray-700";return e.jsx("div",{className:u("inline-flex items-center justify-center",d),children:e.jsxs("div",{className:"relative",style:{width:r,height:r},children:[e.jsxs("svg",{width:r,height:r,className:"transform -rotate-90",children:[e.jsx("circle",{cx:h,cy:h,r:b,className:f,strokeWidth:a,fill:"none"}),e.jsx("circle",{cx:h,cy:h,r:b,className:u(l?"":y[s],"transition-all duration-300 ease-in-out"),stroke:l,strokeWidth:a,strokeDasharray:v,strokeDashoffset:p,strokeLinecap:"round",fill:"none"})]}),(o||n)&&e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[o&&!n&&e.jsxs("span",{className:"text-gray-900 dark:text-white font-bold",style:{fontSize:r*.2},children:[Math.round(g),"%"]}),n&&e.jsx("span",{className:"text-gray-900 dark:text-white font-medium text-center px-2",style:{fontSize:r*.15},children:n})]})]})})},rl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UprogressUtracker",children:r||"UprogressUtracker Component"}),tl=({src:t,alt:r,fallback:a,width:o,height:n,objectFit:s="cover",loading:l="lazy",showLoader:c=!0,rounded:d="none",border:g=!1,className:h,onLoad:b,onError:v})=>{const[p,y]=m.useState(!0),[f,w]=m.useState(!1),[N,C]=m.useState(t);m.useEffect(()=>{y(!0),w(!1),C(t)},[t]);const S=()=>{y(!1),b?.()},x=()=>{y(!1),w(!0),a&&N!==a&&(C(a),w(!1),y(!0)),v?.()},k={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},L={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},I={width:typeof o=="number"?`${o}px`:o,height:typeof n=="number"?`${n}px`:n};return e.jsxs("div",{className:u("relative inline-block overflow-hidden bg-gray-100 dark:bg-gray-800",k[d],g&&"border border-gray-200 dark:border-gray-700",h),style:I,children:[c&&p&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:e.jsx(M.PhotoIcon,{className:"h-8 w-8 text-gray-400"})})}),f&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx(M.PhotoIcon,{className:"h-8 w-8 text-gray-400"})}),!f&&e.jsx("img",{src:N,alt:r,loading:l,onLoad:S,onError:x,className:u("w-full h-full",L[s],p&&c&&"opacity-0")})]})},al=({images:t,columns:r=3,gap:a=16,lightbox:o=!0,className:n})=>{const[s,l]=m.useState(null),c=b=>{o&&l(b)},d=()=>{l(null)},g=()=>{if(!s)return;const b=t.findIndex(p=>p.id===s.id),v=b>0?b-1:t.length-1;l(t[v])},h=()=>{if(!s)return;const b=t.findIndex(p=>p.id===s.id),v=b<t.length-1?b+1:0;l(t[v])};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:u("grid",n),style:{gridTemplateColumns:`repeat(${r}, 1fr)`,gap:`${a}px`},children:t.map(b=>e.jsxs("div",{className:u("relative aspect-square overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-700",o&&"cursor-pointer hover:opacity-90 transition-opacity"),onClick:()=>c(b),children:[e.jsx("img",{src:b.thumbnail||b.src,alt:b.alt||"",className:"w-full h-full object-cover"}),b.caption&&e.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 text-white text-sm p-2",children:b.caption})]},b.id))}),o&&s&&e.jsxs("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",onClick:d,children:[e.jsx("button",{onClick:d,className:"absolute top-4 right-4 text-white hover:text-gray-300 transition-colors",children:e.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),e.jsx("button",{onClick:b=>{b.stopPropagation(),g()},className:"absolute left-4 text-white hover:text-gray-300 transition-colors",children:e.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),e.jsx("button",{onClick:b=>{b.stopPropagation(),h()},className:"absolute right-4 text-white hover:text-gray-300 transition-colors",children:e.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),e.jsxs("div",{className:"max-w-4xl max-h-full",onClick:b=>b.stopPropagation(),children:[e.jsx("img",{src:s.src,alt:s.alt||"",className:"max-w-full max-h-[80vh] object-contain"}),s.caption&&e.jsx("p",{className:"text-white text-center mt-4",children:s.caption})]})]})]})},ol=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UimageUcomparison",children:r||"UimageUcomparison Component"}),nl=({src:t,onCropComplete:r,initialCrop:a,className:o})=>{const[n,s]=m.useState(a||{x:50,y:50,width:200,height:200}),l=m.useRef(null),c=async()=>{if(!l.current||!r)return;const d=document.createElement("canvas"),g=d.getContext("2d");if(!g)return;const h=l.current,b=h.naturalWidth/h.width,v=h.naturalHeight/h.height;d.width=n.width*b,d.height=n.height*v,g.drawImage(h,n.x*b,n.y*v,n.width*b,n.height*v,0,0,d.width,d.height);const p=d.toDataURL("image/png");r(p,n)};return e.jsxs("div",{className:u("inline-flex flex-col gap-4",o),children:[e.jsxs("div",{className:"relative inline-block",children:[e.jsx("img",{ref:l,src:t,alt:"Crop preview",className:"max-w-full h-auto",crossOrigin:"anonymous"}),e.jsxs("div",{className:"absolute border-2 border-blue-500 bg-blue-500/20",style:{left:`${n.x}px`,top:`${n.y}px`,width:`${n.width}px`,height:`${n.height}px`,cursor:"move"},children:[e.jsx("div",{className:"absolute -top-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-nw-resize"}),e.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-ne-resize"}),e.jsx("div",{className:"absolute -bottom-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-sw-resize"}),e.jsx("div",{className:"absolute -bottom-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-se-resize"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:c,className:u("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Crop Image"}),e.jsx("button",{onClick:()=>s(a||{x:50,y:50,width:200,height:200}),className:u("px-4 py-2 text-sm font-medium","bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white","rounded-md","hover:bg-gray-300 dark:hover:bg-gray-600","transition-colors"),children:"Reset"})]}),e.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:'Drag to adjust crop area. Click "Crop Image" to export.'})]})},sl=({images:t,index:r,isOpen:a,onClose:o,onIndexChange:n,showThumbnails:s=!1,showDownload:l=!1,showZoom:c=!0,className:d})=>{const[g,h]=m.useState(1),b=t[r],v=r>0,p=r<t.length-1,y=m.useCallback(()=>{if(v){const x=r-1;n?.(x),h(1)}},[v,r,n]),f=m.useCallback(()=>{if(p){const x=r+1;n?.(x),h(1)}},[p,r,n]),w=()=>{h(x=>Math.min(x+.5,3))},N=()=>{h(x=>Math.max(x-.5,.5))},C=()=>{h(1)},S=()=>{const x=document.createElement("a");x.href=b.src,x.download=b.alt||"image",x.click()};return m.useEffect(()=>{if(!a)return;const x=k=>{switch(k.key){case"Escape":o();break;case"ArrowLeft":y();break;case"ArrowRight":f();break;case"+":case"=":w();break;case"-":case"_":N();break;case"0":C();break}};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[a,r,t.length,o,y,f]),m.useEffect(()=>(a?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[a]),m.useEffect(()=>{h(1)},[r]),!a||!b?null:e.jsx(ee,{children:e.jsxs("div",{className:u("fixed inset-0 z-50 flex items-center justify-center","bg-black/95",d),children:[e.jsx("div",{className:"absolute inset-0",onClick:o,"aria-label":"Close lightbox"}),e.jsx("button",{onClick:o,className:"absolute top-4 right-4 z-10 p-2 text-white hover:text-gray-300 transition-colors","aria-label":"Close",children:e.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),v&&e.jsx("button",{onClick:y,className:"absolute left-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Previous image",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),p&&e.jsx("button",{onClick:f,className:"absolute right-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Next image",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),e.jsxs("div",{className:"absolute top-4 left-4 z-10 flex gap-2",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-black/50 text-white text-sm rounded-md",children:[r+1," / ",t.length]}),c&&e.jsxs("div",{className:"flex gap-1 bg-black/50 rounded-md p-1",children:[e.jsx("button",{onClick:N,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom out",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7"})})}),e.jsxs("button",{onClick:C,className:"px-2 text-white text-sm hover:text-gray-300 transition-colors","aria-label":"Reset zoom",children:[Math.round(g*100),"%"]}),e.jsx("button",{onClick:w,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom in",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7"})})})]}),l&&e.jsx("button",{onClick:S,className:"p-1.5 bg-black/50 text-white hover:text-gray-300 rounded-md transition-colors","aria-label":"Download image",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})})]}),e.jsx("div",{className:"relative z-0 flex items-center justify-center max-w-7xl max-h-screen p-20",children:e.jsx("img",{src:b.src,alt:b.alt||"",className:"max-w-full max-h-full object-contain transition-transform",style:{transform:`scale(${g})`}})}),b.caption&&e.jsx("div",{className:"absolute bottom-20 left-0 right-0 z-10 text-center",children:e.jsx("p",{className:"px-4 py-2 bg-black/50 text-white text-sm inline-block rounded-md max-w-2xl",children:b.caption})}),s&&t.length>1&&e.jsx("div",{className:"absolute bottom-4 left-0 right-0 z-10 flex justify-center gap-2 px-4 overflow-x-auto",children:t.map((x,k)=>e.jsx("button",{onClick:()=>{n?.(k),h(1)},className:u("flex-shrink-0 w-16 h-16 rounded-md overflow-hidden","border-2 transition-all",k===r?"border-white scale-110":"border-transparent opacity-60 hover:opacity-100 hover:border-gray-400"),children:e.jsx("img",{src:x.thumbnail||x.src,alt:x.alt||"",className:"w-full h-full object-cover"})},k))})]})})},ll=({src:t,poster:r,autoPlay:a=!1,loop:o=!1,muted:n=!1,controls:s=!0,className:l})=>{const c=m.useRef(null),[d,g]=m.useState(a),[h,b]=m.useState(1),[v,p]=m.useState(0),[y,f]=m.useState(0);m.useEffect(()=>{const k=c.current;if(!k)return;const L=()=>p(k.currentTime),I=()=>f(k.duration),$=()=>g(!0),U=()=>g(!1);return k.addEventListener("timeupdate",L),k.addEventListener("loadedmetadata",I),k.addEventListener("play",$),k.addEventListener("pause",U),()=>{k.removeEventListener("timeupdate",L),k.removeEventListener("loadedmetadata",I),k.removeEventListener("play",$),k.removeEventListener("pause",U)}},[]);const w=()=>{c.current&&(d?c.current.pause():c.current.play())},N=k=>{const L=parseFloat(k.target.value);b(L),c.current&&(c.current.volume=L)},C=k=>{const L=parseFloat(k.target.value);p(L),c.current&&(c.current.currentTime=L)},S=()=>{c.current&&(document.fullscreenElement?document.exitFullscreen():c.current.requestFullscreen())},x=k=>{const L=Math.floor(k/60),I=Math.floor(k%60);return`${L}:${I.toString().padStart(2,"0")}`};return e.jsxs("div",{className:u("relative group",l),children:[e.jsx("video",{ref:c,src:t,poster:r,autoPlay:a,loop:o,muted:n,className:"w-full rounded-lg",onClick:w}),s&&e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx("input",{type:"range",min:"0",max:y||0,value:v,onChange:C,className:"w-full mb-2 accent-white"}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:w,className:"text-white hover:text-gray-300 transition-colors",children:d?e.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):e.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M8 5v14l11-7z"})})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),e.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:h,onChange:N,className:"w-20 accent-white"})]}),e.jsxs("span",{className:"text-white text-sm",children:[x(v)," / ",x(y)]})]}),e.jsx("button",{onClick:S,className:"text-white hover:text-gray-300 transition-colors",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})})})]})]})]})},il=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvideoUthumbnail",children:r||"UvideoUthumbnail Component"}),dl=({className:t,children:r,disabled:a})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"VideoEditor",children:r||"VideoEditor Component"}),cl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvideoUcall",children:r||"UvideoUcall Component"}),gl=({className:t,children:r,disabled:a})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"LiveStream",children:r||"LiveStream Component"}),ul=({src:t,title:r,artist:a,artwork:o,autoPlay:n=!1,loop:s=!1,className:l})=>{const c=m.useRef(null),[d,g]=m.useState(n),[h,b]=m.useState(0),[v,p]=m.useState(0),[y,f]=m.useState(1);m.useEffect(()=>{const k=c.current;if(!k)return;const L=()=>b(k.currentTime),I=()=>p(k.duration),$=()=>g(!0),U=()=>g(!1),A=()=>g(!1);return k.addEventListener("timeupdate",L),k.addEventListener("loadedmetadata",I),k.addEventListener("play",$),k.addEventListener("pause",U),k.addEventListener("ended",A),()=>{k.removeEventListener("timeupdate",L),k.removeEventListener("loadedmetadata",I),k.removeEventListener("play",$),k.removeEventListener("pause",U),k.removeEventListener("ended",A)}},[]);const w=()=>{c.current&&(d?c.current.pause():c.current.play())},N=k=>{const L=parseFloat(k.target.value);b(L),c.current&&(c.current.currentTime=L)},C=k=>{const L=parseFloat(k.target.value);f(L),c.current&&(c.current.volume=L)},S=k=>{const L=Math.floor(k/60),I=Math.floor(k%60);return`${L}:${I.toString().padStart(2,"0")}`},x=v>0?h/v*100:0;return e.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-6 shadow-lg",l),children:[e.jsx("audio",{ref:c,src:t,autoPlay:n,loop:s}),e.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[o&&e.jsx("div",{className:"w-16 h-16 rounded-lg overflow-hidden flex-shrink-0 bg-gray-200 dark:bg-gray-700",children:e.jsx("img",{src:o,alt:r||"Album artwork",className:"w-full h-full object-cover"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[r&&e.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white truncate",children:r}),a&&e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:a})]})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("input",{type:"range",min:"0",max:v||0,value:h,onChange:N,className:"w-full accent-blue-500"}),e.jsxs("div",{className:"flex justify-between text-xs text-gray-600 dark:text-gray-400 mt-1",children:[e.jsx("span",{children:S(h)}),e.jsx("span",{children:S(v)})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:w,className:"w-10 h-10 rounded-full bg-blue-500 text-white flex items-center justify-center hover:bg-blue-600 transition-colors",children:d?e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):e.jsx("svg",{className:"w-5 h-5 ml-0.5",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M8 5v14l11-7z"})})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),e.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:y,onChange:C,className:"w-24 accent-blue-500"})]})]}),e.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[x.toFixed(0),"%"]})]})]})},hl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UaudioUwaveform",children:r||"UaudioUwaveform Component"}),bl=({data:t,width:r=200,height:a=40,color:o="#3b82f6",gap:n=2,className:s})=>{if(t.length===0)return null;const l=(r-(t.length-1)*n)/t.length;return e.jsx("svg",{width:r,height:a,className:u("inline-block",s),children:t.map((c,d)=>{const g=Math.max(2,c*a),h=d*(l+n),b=(a-g)/2;return e.jsx("rect",{x:h,y:b,width:l,height:g,fill:o,rx:l/2},d)})})},yl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvoiceUrecorder",children:r||"UvoiceUrecorder Component"}),fl=({className:t,children:r,disabled:a})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"PodcastPlayer",children:r||"PodcastPlayer Component"}),pl=({accept:t=["image/*","video/*","audio/*"],maxSize:r=50*1024*1024,maxFiles:a=10,multiple:o=!0,onUpload:n,onRemove:s,className:l})=>{const[c,d]=m.useState([]),[g,h]=m.useState(!1),b=m.useRef(null),v=S=>{S.preventDefault(),h(!0)},p=S=>{S.preventDefault(),h(!1)},y=S=>{S.preventDefault(),h(!1);const x=Array.from(S.dataTransfer.files);w(x)},f=S=>{if(S.target.files){const x=Array.from(S.target.files);w(x)}},w=S=>{const x=S.filter($=>{const U=t.some(z=>{if(z.endsWith("/*")){const P=z.split("/")[0];return $.type.startsWith(P)}return $.type===z}),A=$.size<=r;return U&&A}),k=a-c.length,L=x.slice(0,k),I=L.map($=>({id:`${Date.now()}-${Math.random()}`,file:$,preview:$.type.startsWith("image/")?URL.createObjectURL($):void 0,status:"pending"}));d($=>[...$,...I]),n&&n(L)},N=S=>{d(x=>x.filter(k=>k.id!==S)),s&&s(S)},C=S=>S<1024?`${S} B`:S<1024*1024?`${(S/1024).toFixed(1)} KB`:`${(S/(1024*1024)).toFixed(1)} MB`;return e.jsxs("div",{className:u("space-y-4",l),children:[e.jsxs("div",{onDragEnter:v,onDragOver:S=>S.preventDefault(),onDragLeave:p,onDrop:y,onClick:()=>b.current?.click(),className:u("border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors",g?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-700 hover:border-gray-400 dark:hover:border-gray-600"),children:[e.jsx("svg",{className:"w-12 h-12 mx-auto mb-4 text-gray-400 dark:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),e.jsx("p",{className:"text-gray-700 dark:text-gray-300 mb-2",children:"Drag and drop files here, or click to browse"}),e.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Max ",a," files, ",C(r)," each"]}),e.jsx("input",{ref:b,type:"file",multiple:o,accept:t.join(","),onChange:f,className:"hidden"})]}),c.length>0&&e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:c.map(S=>e.jsxs("div",{className:"relative aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800",children:[S.preview?e.jsx("img",{src:S.preview,alt:S.file.name,className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsx("svg",{className:"w-12 h-12 text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm4 18H6V4h7v5h5v11z"})})}),e.jsx("button",{onClick:()=>N(S.id),className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-red-500 text-white flex items-center justify-center hover:bg-red-600 transition-colors",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-black/70 text-white text-xs p-2",children:[e.jsx("p",{className:"truncate",children:S.file.name}),e.jsx("p",{className:"text-gray-300",children:C(S.file.size)})]})]},S.id))})]})},ml=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmediaUplaylist",children:r||"UmediaUplaylist Component"}),xl=({className:t,children:r,disabled:a})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"PlaylistManager",children:r||"PlaylistManager Component"}),vl=({value:t,size:r=200,fgColor:a="#000000",bgColor:o="#ffffff",showDownload:n=!1,className:s})=>{const l=m.useRef(null);m.useEffect(()=>{const d=l.current;if(!d)return;const g=d.getContext("2d");if(!g)return;g.fillStyle=o,g.fillRect(0,0,r,r),g.fillStyle=a;const h=8,b=r/h,v=t.split("").reduce((y,f)=>y+f.charCodeAt(0),0);for(let y=0;y<h;y++)for(let f=0;f<h;f++)(v+y*h+f)%3!==0&&g.fillRect(f*b,y*b,b,b);const p=b*3;[[0,0],[r-p,0],[0,r-p]].forEach(([y,f])=>{g.strokeStyle=a,g.lineWidth=b,g.strokeRect(y+b/2,f+b/2,p-b,p-b)})},[t,r,a,o]);const c=()=>{const d=l.current;if(!d)return;const g=d.toDataURL("image/png"),h=document.createElement("a");h.download="qrcode.png",h.href=g,h.click()};return e.jsxs("div",{className:u("inline-flex flex-col items-center gap-3",s),children:[e.jsx("canvas",{ref:l,width:r,height:r,className:"border-2 border-gray-200 dark:border-gray-700 rounded-lg"}),n&&e.jsx("button",{onClick:c,className:u("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Download QR Code"}),e.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 max-w-[200px] text-center break-all",children:t})]})},Ge=({isOpen:t,onClose:r,title:a,size:o="medium",variant:n="default",overlay:s="default",showCloseButton:l=!0,closeOnOverlayClick:c=!0,closeOnEscape:d=!0,children:g,className:h,"aria-labelledby":b,"aria-describedby":v,closeAriaLabel:p="Close modal"})=>{const y=m.useRef(null),f=m.useRef(null);if(m.useEffect(()=>{if(!t||!d)return;const S=x=>{x.key==="Escape"&&r()};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[t,d,r]),m.useEffect(()=>{if(t)return f.current=document.activeElement,y.current&&y.current.focus(),document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset",f.current&&f.current.focus()}},[t]),!t)return null;const w=()=>{const S=D.overlays.modal.content(),x=D.overlays.modal[o]();return u(S,x)},N=S=>{c&&S.target===S.currentTarget&&r()},C=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:D.overlays.modal.backdrop(),onClick:N}),e.jsx("div",{className:D.overlays.modal.container(),role:"dialog","aria-modal":"true","aria-labelledby":b,"aria-describedby":v,children:e.jsxs("div",{ref:y,"data-testid":"modal-content",className:u(w(),h),tabIndex:-1,onClick:S=>S.stopPropagation(),children:[a&&e.jsxs("div",{className:D.overlays.modal.header(),children:[e.jsx("h2",{id:b,className:D.overlays.modal.title(),children:a}),l&&e.jsx("button",{onClick:r,className:D.overlays.modal.closeButton(),"aria-label":p,children:e.jsx(M.XMarkIcon,{className:D.icon.variant.muted.md()})})]}),g]})})]});return Ae.createPortal(C,document.body)},kl=({children:t,variant:r="default",className:a})=>e.jsx("div",{"data-testid":"modal-header",className:u(D.overlays.modal.header(),a),children:t}),Ke=({children:t,variant:r="default",className:a})=>e.jsx("div",{"data-testid":"modal-body",className:u(D.overlays.modal.body(),a),children:t}),Ye=({children:t,variant:r="default",className:a})=>e.jsx("div",{"data-testid":"modal-footer",className:u(D.overlays.modal.footer(),a),children:t}),wl=({isOpen:t,onClose:r,children:a,size:o="md",showCloseButton:n=!0,closeOnOutsideClick:s=!0,closeOnEscape:l=!0,className:c})=>{if(m.useEffect(()=>{if(!l||!t||!r)return;const h=b=>{b.key==="Escape"&&r()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,r,l]),!t)return null;const d={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-full mx-4"},g=()=>{s&&r&&r()};return e.jsxs(ee,{children:[e.jsx(ke,{isOpen:t,onClose:g,opacity:"dark",blur:!0}),e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:u("relative w-full",d[o],"bg-white dark:bg-gray-900","rounded-lg shadow-xl","animate-in fade-in zoom-in-95 duration-200",c),onClick:h=>h.stopPropagation(),children:[n&&r&&e.jsx("button",{onClick:r,className:"absolute top-4 right-4 z-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close dialog",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a]})})]})},Cl={default:M.InformationCircleIcon,warning:M.ExclamationTriangleIcon,danger:M.XCircleIcon,success:M.CheckCircleIcon,info:M.InformationCircleIcon},Nl={default:()=>D.icon.variant.default.lg(),warning:()=>D.icon.variant.warning.lg(),danger:()=>D.icon.variant.error.lg(),success:()=>D.icon.variant.success.lg(),info:()=>D.icon.variant.default.lg()},Sl={default:"default",warning:"default",danger:"destructive",success:"default",info:"default"},El=({isOpen:t,onClose:r,onConfirm:a,title:o,message:n,confirmText:s="Confirm",cancelText:l="Cancel",loadingText:c="Processing...",variant:d="default",isLoading:g=!1})=>{const h=Cl[d],b=Nl[d],v=Sl[d];return e.jsxs(Ge,{isOpen:t,onClose:r,size:"small",variant:"web3confirmation","aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[e.jsxs(Ke,{variant:"padded",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx(h,{className:b()}),e.jsx("h3",{id:"confirmation-dialog-title",className:T.heading.h4(),children:o})]}),e.jsx("p",{id:"confirmation-dialog-description",className:T.body.md(),children:n})]}),e.jsxs(Ye,{children:[e.jsx(_,{variant:"outline",onClick:r,disabled:g,children:l}),e.jsx(_,{variant:v,onClick:a,disabled:g,children:g?c:s})]})]})},Ll=({isOpen:t,onClose:r,onSubmit:a,title:o,description:n,placeholder:s="",initialValue:l="",cancelText:c="Cancel",confirmText:d="Confirm",isLoading:g=!1,loadingText:h="Processing...",maxLength:b,required:v=!0,validate:p})=>{const[y,f]=m.useState(l),[w,N]=m.useState(null);m.useEffect(()=>{t&&(f(l),N(null))},[t,l]);const C=async k=>{if(k.preventDefault(),N(null),v&&!y.trim()){N("This field is required");return}if(p){const L=p(y);if(L){N(L);return}}try{await a(y.trim())}catch(L){N(L instanceof Error?L.message:"An error occurred")}},S=()=>{f(l),N(null),r()},x=v?y.trim().length>0:!0;return e.jsx(Ge,{isOpen:t,onClose:S,size:"small","aria-labelledby":"text-input-modal-title","aria-describedby":"text-input-modal-description",closeOnEscape:!g,closeOnOverlayClick:!g,children:e.jsxs("form",{onSubmit:C,children:[e.jsxs(Ke,{variant:"padded",children:[e.jsx("h3",{id:"text-input-modal-title",className:T.heading.h4(),children:o}),e.jsx("p",{id:"text-input-modal-description",className:`${T.body.md()} mt-2 mb-4`,children:n}),e.jsx(Ce,{type:"text",value:y,onChange:k=>f(k.target.value),placeholder:s,maxLength:b,disabled:g,autoFocus:!0,"aria-invalid":!!w,"aria-describedby":w?"text-input-error":void 0}),w&&e.jsx("p",{id:"text-input-error",className:`${T.body.sm()} text-red-600 dark:text-red-400 mt-2`,role:"alert",children:w})]}),e.jsxs(Ye,{children:[e.jsx(_,{type:"button",variant:"outline",onClick:S,disabled:g,children:c}),e.jsx(_,{type:"submit",variant:"default",disabled:!x||g,children:g?h:d})]})]})})},$l=({isOpen:t,onClose:r,children:a,side:o="right",size:n="md",showCloseButton:s=!0,title:l,footer:c,className:d})=>{if(m.useEffect(()=>{const v=p=>{p.key==="Escape"&&t&&r()};if(t)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[t,r]),!t)return null;const g={left:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},right:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},top:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"},bottom:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"}},h={left:"left-0 top-0 h-full",right:"right-0 top-0 h-full",top:"top-0 left-0 w-full",bottom:"bottom-0 left-0 w-full"},b={left:t?"translate-x-0":"-translate-x-full",right:t?"translate-x-0":"translate-x-full",top:t?"translate-y-0":"-translate-y-full",bottom:t?"translate-y-0":"translate-y-full"};return e.jsxs(ee,{children:[e.jsx(ke,{isOpen:t,onClose:r,opacity:"medium"}),e.jsxs("div",{className:u("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","transition-transform duration-300 ease-in-out",h[o],g[o][n],b[o],d),children:[(l||s)&&e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:[l&&e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:l}),s&&e.jsx("button",{onClick:r,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors","aria-label":"Close drawer",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:a}),c&&e.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:c})]})]})},Il=({isOpen:t,onClose:r,children:a,title:o,description:n,footer:s,side:l="bottom",size:c="md",showHandle:d=!0,showCloseButton:g=!0,className:h})=>{if(m.useEffect(()=>{if(!t)return;const y=f=>{f.key==="Escape"&&r()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[t,r]),!t)return null;const b={bottom:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},top:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},left:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"},right:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"}},v={bottom:"bottom-0 left-0 right-0 rounded-t-2xl",top:"top-0 left-0 right-0 rounded-b-2xl",left:"left-0 top-0 bottom-0 rounded-r-2xl",right:"right-0 top-0 bottom-0 rounded-l-2xl"},p={bottom:"animate-in slide-in-from-bottom duration-300",top:"animate-in slide-in-from-top duration-300",left:"animate-in slide-in-from-left duration-300",right:"animate-in slide-in-from-right duration-300"};return e.jsxs(ee,{children:[e.jsx(ke,{isOpen:t,onClose:r,opacity:"dark"}),e.jsxs("div",{className:u("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","flex flex-col",v[l],b[l][c],p[l],h),children:[d&&(l==="bottom"||l==="top")&&e.jsx("div",{className:u("flex items-center justify-center",l==="bottom"?"pt-3 pb-2":"pb-3 pt-2"),children:e.jsx("div",{className:"w-12 h-1.5 bg-gray-300 dark:bg-gray-700 rounded-full"})}),(o||n||g)&&e.jsx("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[o&&e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o}),n&&e.jsx("p",{className:"mt-1 text-sm text-gray-600 dark:text-gray-400",children:n})]}),g&&e.jsx("button",{onClick:r,className:"ml-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close sheet",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:a}),s&&e.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:s})]})]})},Ul=({trigger:t,children:r,placement:a="bottom",isOpen:o,onOpenChange:n,trigger_action:s="click",showArrow:l=!0,className:c})=>{const[d,g]=m.useState(!1),h=o!==void 0?o:d,b=m.useCallback(k=>{o===void 0&&g(k),n?.(k)},[o,n]),v=m.useRef(null),p=m.useRef(null),[y,f]=m.useState({top:0,left:0});m.useEffect(()=>{if(!h||!v.current)return;const k=()=>{const L=v.current.getBoundingClientRect(),I=8;let $=0,U=0;switch(a){case"top":$=L.top-I,U=L.left+L.width/2;break;case"top-start":$=L.top-I,U=L.left;break;case"top-end":$=L.top-I,U=L.right;break;case"bottom":$=L.bottom+I,U=L.left+L.width/2;break;case"bottom-start":$=L.bottom+I,U=L.left;break;case"bottom-end":$=L.bottom+I,U=L.right;break;case"left":$=L.top+L.height/2,U=L.left-I;break;case"right":$=L.top+L.height/2,U=L.right+I;break}f({top:$,left:U})};return k(),window.addEventListener("scroll",k),window.addEventListener("resize",k),()=>{window.removeEventListener("scroll",k),window.removeEventListener("resize",k)}},[h,a]),m.useEffect(()=>{if(!h)return;const k=L=>{v.current&&!v.current.contains(L.target)&&p.current&&!p.current.contains(L.target)&&b(!1)};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[h,b]),m.useEffect(()=>{if(!h)return;const k=L=>{L.key==="Escape"&&b(!1)};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[h,b]);const w=()=>{s==="click"&&b(!h)},N=()=>{s==="hover"&&b(!0)},C=()=>{s==="hover"&&b(!1)},S={top:"origin-bottom","top-start":"origin-bottom-left","top-end":"origin-bottom-right",bottom:"origin-top","bottom-start":"origin-top-left","bottom-end":"origin-top-right",left:"origin-right",right:"origin-left"},x={top:"-translate-x-1/2 -translate-y-full","top-start":"-translate-y-full","top-end":"-translate-x-full -translate-y-full",bottom:"-translate-x-1/2","bottom-start":"","bottom-end":"-translate-x-full",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return e.jsxs("div",{className:u("relative inline-block",c),children:[e.jsx("div",{ref:v,onClick:w,onMouseEnter:N,onMouseLeave:C,className:"inline-block",children:t}),h&&e.jsxs("div",{ref:p,className:u("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",S[a],x[a]),style:{position:"fixed",top:y.top+"px",left:y.left+"px"},onMouseEnter:s==="hover"?()=>b(!0):void 0,onMouseLeave:s==="hover"?()=>b(!1):void 0,children:[r,l&&e.jsx("div",{className:u("arrow absolute w-2 h-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 transform rotate-45",a.startsWith("top")&&"bottom-[-5px] border-t-0 border-l-0",a.startsWith("bottom")&&"top-[-5px] border-b-0 border-r-0",a==="left"&&"right-[-5px] border-l-0 border-b-0",a==="right"&&"left-[-5px] border-r-0 border-t-0",(a==="top"||a==="bottom")&&"left-1/2 -translate-x-1/2",(a==="left"||a==="right")&&"top-1/2 -translate-y-1/2")})]})]})},Ml=({trigger:t,children:r,placement:a="bottom",openDelay:o=200,closeDelay:n=300,className:s})=>{const[l,c]=m.useState(!1),[d,g]=m.useState({top:0,left:0}),h=m.useRef(null),b=m.useRef(null),v=m.useRef(void 0),p=m.useRef(void 0);m.useEffect(()=>{if(!l||!h.current)return;const C=()=>{const S=h.current.getBoundingClientRect(),x=8;let k=0,L=0;switch(a){case"top":k=S.top-x,L=S.left+S.width/2;break;case"bottom":k=S.bottom+x,L=S.left+S.width/2;break;case"left":k=S.top+S.height/2,L=S.left-x;break;case"right":k=S.top+S.height/2,L=S.right+x;break}g({top:k,left:L})};return C(),window.addEventListener("scroll",C),window.addEventListener("resize",C),()=>{window.removeEventListener("scroll",C),window.removeEventListener("resize",C)}},[l,a]);const y=()=>{p.current&&clearTimeout(p.current),v.current=setTimeout(()=>{c(!0)},o)},f=()=>{v.current&&clearTimeout(v.current),p.current=setTimeout(()=>{c(!1)},n)},w={top:"origin-bottom",bottom:"origin-top",left:"origin-right",right:"origin-left"},N={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:h,onMouseEnter:y,onMouseLeave:f,className:"inline-block",children:t}),l&&e.jsx(ee,{children:e.jsx("div",{ref:b,className:u("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",w[a],N[a],s),style:{top:d.top+"px",left:d.left+"px"},onMouseEnter:()=>{p.current&&clearTimeout(p.current)},onMouseLeave:f,children:r})})]})},Tl=({content:t,children:r,placement:a="top",delayShow:o=0,delayHide:n=0,className:s,disabled:l=!1,showArrow:c=!0,variant:d="default",trigger:g="hover",isOpen:h,onVisibilityChange:b})=>{const[v,p]=m.useState(!1),y=m.useRef(void 0),f=m.useRef(void 0),w=m.useRef(null),N=m.useRef(null),C=h!==void 0,S=C?h:v,x=m.useCallback(()=>{l||C||(f.current&&(clearTimeout(f.current),f.current=void 0),o>0?y.current=setTimeout(()=>{p(!0),b?.(!0)},o):(p(!0),b?.(!0)))},[l,C,o,b]),k=m.useCallback(()=>{C||(y.current&&(clearTimeout(y.current),y.current=void 0),n>0?f.current=setTimeout(()=>{p(!1),b?.(!1)},n):(p(!1),b?.(!1)))},[C,n,b]);m.useEffect(()=>()=>{y.current&&clearTimeout(y.current),f.current&&clearTimeout(f.current)},[]),m.useEffect(()=>{if(g!=="click"||!S)return;const F=q=>{w.current&&!w.current.contains(q.target)&&N.current&&!N.current.contains(q.target)&&k()};return document.addEventListener("mousedown",F),()=>{document.removeEventListener("mousedown",F)}},[g,S,k]);const L=()=>{g==="hover"&&x()},I=()=>{g==="hover"&&k()},$=()=>{g==="hover"&&x()},U=()=>{g==="hover"&&k()},A=()=>{g==="click"&&!C&&(S?(p(!1),b?.(!1)):(p(!0),b?.(!0)))},z={top:"bottom-full left-1/2 -translate-x-1/2 -translate-y-2",bottom:"top-full left-1/2 -translate-x-1/2 translate-y-2",left:"right-full top-1/2 -translate-x-2 -translate-y-1/2",right:"left-full top-1/2 translate-x-2 -translate-y-1/2"},P={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent"},W={default:"bg-gray-900 dark:bg-gray-700 text-white",info:"bg-blue-600 dark:bg-blue-500 text-white",success:"bg-green-600 dark:bg-green-500 text-white",warning:"bg-yellow-600 dark:bg-yellow-500 text-white",error:"bg-red-600 dark:bg-red-500 text-white"},j={default:{top:"border-t-gray-900 dark:border-t-gray-700",bottom:"border-b-gray-900 dark:border-b-gray-700",left:"border-l-gray-900 dark:border-l-gray-700",right:"border-r-gray-900 dark:border-r-gray-700"},info:{top:"border-t-blue-600 dark:border-t-blue-500",bottom:"border-b-blue-600 dark:border-b-blue-500",left:"border-l-blue-600 dark:border-l-blue-500",right:"border-r-blue-600 dark:border-r-blue-500"},success:{top:"border-t-green-600 dark:border-t-green-500",bottom:"border-b-green-600 dark:border-b-green-500",left:"border-l-green-600 dark:border-l-green-500",right:"border-r-green-600 dark:border-r-green-500"},warning:{top:"border-t-yellow-600 dark:border-t-yellow-500",bottom:"border-b-yellow-600 dark:border-b-yellow-500",left:"border-l-yellow-600 dark:border-l-yellow-500",right:"border-r-yellow-600 dark:border-r-yellow-500"},error:{top:"border-t-red-600 dark:border-t-red-500",bottom:"border-b-red-600 dark:border-b-red-500",left:"border-l-red-600 dark:border-l-red-500",right:"border-r-red-600 dark:border-r-red-500"}};return e.jsxs("div",{ref:N,className:"relative inline-block",onMouseEnter:L,onMouseLeave:I,onFocus:$,onBlur:U,onClick:A,children:[r,S&&!l&&e.jsxs("div",{ref:w,className:u("absolute z-50 px-2 py-1 text-xs font-medium rounded shadow-lg whitespace-nowrap pointer-events-none",z[a],W[d],s),role:"tooltip",children:[t,c&&e.jsx("div",{className:u("absolute w-0 h-0 border-4 arrow",P[a],j[d][a])})]})]})},Al=({children:t,onDrop:r,onDragOver:a,accept:o,showIndicator:n=!0,indicator:s,disabled:l=!1,className:c})=>{const[d,g]=m.useState(!1),[h,b]=m.useState(0),v=N=>{N.preventDefault(),N.stopPropagation(),!l&&(b(C=>C+1),N.dataTransfer.items&&N.dataTransfer.items.length>0&&g(!0))},p=N=>{N.preventDefault(),N.stopPropagation(),!l&&b(C=>{const S=C-1;return S===0&&g(!1),S})},y=N=>{N.preventDefault(),N.stopPropagation(),!l&&a&&a(N)},f=N=>{if(N.preventDefault(),N.stopPropagation(),l)return;if(g(!1),b(0),N.dataTransfer.files&&N.dataTransfer.files.length>0){const S=Array.from(N.dataTransfer.files);let x=S;o&&o.length>0&&(x=S.filter(k=>o.some(L=>{if(L.endsWith("/*")){const I=L.split("/")[0];return k.type.startsWith(I)}return k.type===L}))),r(x);return}const C=N.dataTransfer.getData("text/plain");if(C)try{const S=JSON.parse(C);r(S)}catch{r(C)}},w=e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-blue-50 dark:bg-blue-900/30 border-2 border-dashed border-blue-500 dark:border-blue-400 rounded-lg z-10",children:[e.jsx("svg",{className:"w-12 h-12 text-blue-600 dark:text-blue-400 mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),e.jsx("p",{className:"text-blue-700 dark:text-blue-300 font-medium",children:"Drop here"})]});return e.jsxs("div",{onDragEnter:v,onDragLeave:p,onDragOver:y,onDrop:f,className:u("relative",l&&"opacity-50 cursor-not-allowed",c),children:[t,n&&d&&!l&&(s||w)]})},Pl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdragUdropUlist",children:r||"UdragUdropUlist Component"}),zl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsortableUgrid",children:r||"UsortableUgrid Component"}),Dl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UnestedUdrag",children:r||"UnestedUdrag Component"}),jl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UgestureUdetector",children:r||"UgestureUdetector Component"}),Bl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UswipeUactions",children:r||"UswipeUactions Component"}),Wl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UpinchUzoom",children:r||"UpinchUzoom Component"}),Fl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdoubleUtap",children:r||"UdoubleUtap Component"}),Ol=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UlongUpress",children:r||"UlongUpress Component"}),Vl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UhoverUtooltip",children:r||"UhoverUtooltip Component"}),Hl=({className:t,children:r,disabled:a=!1,onClick:o})=>e.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UradialUmenu",children:r||"UradialUmenu Component"}),ql=({children:t,active:r=!0,initialFocus:a,returnFocus:o=!0,className:n})=>{const s=m.useRef(null),l=m.useRef(null);return m.useEffect(()=>{if(!r)return;o&&(l.current=document.activeElement);const c=()=>{if(!s.current)return[];const b=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(s.current.querySelectorAll(b))},d=()=>{if(a){const v=s.current?.querySelector(a);if(v){v.focus();return}}const b=c();b.length>0&&b[0].focus()},g=b=>{if(b.key!=="Tab")return;const v=c();if(v.length===0){b.preventDefault();return}const p=v[0],y=v[v.length-1];b.shiftKey?document.activeElement===p&&(b.preventDefault(),y.focus()):document.activeElement===y&&(b.preventDefault(),p.focus())},h=setTimeout(d,0);return document.addEventListener("keydown",g),()=>{clearTimeout(h),document.removeEventListener("keydown",g),o&&l.current&&l.current.focus()}},[r,a,o]),r?e.jsx("div",{ref:s,className:u(n),children:t}):e.jsx(e.Fragment,{children:t})},_l=({sections:t,activeId:r,onActiveChange:a,offset:o=80,container:n,smoothScroll:s=!0,showSubsections:l=!0,className:c})=>{const[d,g]=m.useState(""),h=m.useRef(null),b=r!==void 0?r:d;m.useEffect(()=>{const y=n?document.querySelector(n):window;if(!y)return;const f=C=>C.flatMap(S=>[S.id,...S.subsections?f(S.subsections):[]]),N=f(t).map(C=>document.getElementById(C)).filter(Boolean);if(N.length!==0)return h.current=new IntersectionObserver(C=>{C.forEach(S=>{if(S.isIntersecting){const x=S.target.id;r!==void 0&&a?a(x):g(x)}})},{root:n?y:null,rootMargin:`-${o}px 0px -50% 0px`,threshold:0}),N.forEach(C=>{h.current?.observe(C)}),()=>{h.current?.disconnect()}},[t,n,o,r,a]);const v=y=>{const f=document.getElementById(y);if(!f)return;const w=n?document.querySelector(n):window;if(!w)return;const C=f.offsetTop-o;s?w===window?window.scrollTo({top:C,behavior:"smooth"}):w.scrollTo({top:C,behavior:"smooth"}):w===window?window.scrollTo(0,C):w.scrollTop=C},p=(y,f=0)=>{const w=b===y.id,N=y.subsections?.some(C=>b===C.id)||!1;return e.jsxs("div",{children:[e.jsx("button",{onClick:()=>v(y.id),className:u("w-full text-left px-3 py-1.5 text-sm rounded-md transition-colors",f===0?"font-medium":"pl-6 text-sm",w?"text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/30":N?"text-gray-700 dark:text-gray-300":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800"),style:{paddingLeft:`${f*.75+.75}rem`},children:y.label}),l&&y.subsections&&y.subsections.length>0&&e.jsx("div",{className:"ml-2 border-l-2 border-gray-200 dark:border-gray-700",children:y.subsections.map(C=>p(C,f+1))})]},y.id)};return e.jsx("nav",{className:u("space-y-1",c),children:t.map(y=>p(y,0))})},Gl=({children:t,onRefresh:r,disabled:a=!1,refreshingText:o="Refreshing...",pullDownText:n="Pull down to refresh",releaseText:s="Release to refresh",threshold:l=80,maxPullDistance:c=120,className:d=""})=>{const[g,h]=m.useState(0),[b,v]=m.useState(!1),[p,y]=m.useState(!1),f=m.useRef(0),w=m.useRef(null);m.useEffect(()=>{const k=w.current;if(!k)return;const L=U=>{if(a||b)return;k.scrollTop<=0&&(f.current=U.touches[0].clientY,y(!0))},I=U=>{if(!p)return;const z=U.touches[0].clientY-f.current;if(z>0&&k.scrollTop<=0){const P=Math.min(z/c,1),W=Math.min(z*(1-P*.5),c);h(W),z>10&&U.preventDefault()}},$=async()=>{if(p)if(y(!1),g>=l&&!b){v(!0);try{await r()}catch{}finally{v(!1),h(0)}}else h(0)};return k.addEventListener("touchstart",L,{passive:!0}),k.addEventListener("touchmove",I,{passive:!1}),k.addEventListener("touchend",$),()=>{k.removeEventListener("touchstart",L),k.removeEventListener("touchmove",I),k.removeEventListener("touchend",$)}},[a,b,p,g,l,c,r]);const N=Math.min(g/l,1),C=p||b,S=p?g:b?l:0,x=()=>b?o:g>=l?s:n;return e.jsxs("div",{ref:w,className:`relative ${d}`,style:{height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch"},children:[e.jsx("div",{className:"sticky top-0 left-0 right-0 flex items-center justify-center bg-gradient-to-b from-blue-50/90 to-transparent dark:from-blue-900/20 dark:to-transparent backdrop-blur-sm z-10 transition-all duration-300 ease-out",style:{height:`${S}px`,marginTop:p?0:`-${S}px`,opacity:C?1:0,pointerEvents:"none"},children:e.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[e.jsx(M.ArrowPathIcon,{className:`w-6 h-6 text-blue-600 dark:text-blue-400 transition-transform duration-200 ${b?"animate-spin":""}`,style:{transform:`rotate(${N*360}deg)`}}),g>20&&e.jsx("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:x()})]})}),e.jsx("div",{style:{paddingTop:p?`${g}px`:0,transition:p?"none":"padding-top 200ms ease-out"},children:t})]})},Kl=({children:t,onLoadMore:r,loading:a=!1,hasMore:o=!0,threshold:n=100,loader:s,endMessage:l,height:c,scrollDirection:d="vertical",reverse:g=!1,className:h})=>{const b=m.useRef(null),[v,p]=m.useState(!1);m.useEffect(()=>{const N=b.current;if(!N||a||!o)return;const C=()=>{const{scrollTop:S,scrollHeight:x,clientHeight:k,scrollLeft:L,scrollWidth:I,clientWidth:$}=N;d==="vertical"&&p(S>300);let U;d==="vertical"?g?U=S:U=x-S-k:g?U=L:U=I-L-$,U<n&&r()};return N.addEventListener("scroll",C),()=>N.removeEventListener("scroll",C)},[a,o,n,r,d,g]);const y=()=>{b.current?.scrollTo({top:0,behavior:"smooth"})},f=e.jsxs("div",{className:"flex justify-center items-center py-4",children:[e.jsx("div",{className:"w-6 h-6 border-2 border-blue-600 dark:border-blue-400 border-t-transparent rounded-full animate-spin"}),e.jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"Loading..."})]}),w=e.jsx("div",{className:"flex justify-center items-center py-4",children:e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"No more items to load"})});return e.jsxs("div",{className:u("relative",h),children:[e.jsxs("div",{ref:b,className:u(d==="vertical"?"overflow-y-auto":"overflow-x-auto","overflow-auto"),style:{height:d==="vertical"?c:void 0,width:d==="horizontal"?"100%":void 0,display:d==="horizontal"?"flex":void 0,flexDirection:g&&d==="vertical"?"column-reverse":void 0},children:[g&&a&&(s||f),g&&!a&&!o&&l,e.jsx("div",{className:u(d==="horizontal"&&"flex",d==="horizontal"&&g&&"flex-row-reverse"),children:t}),!g&&a&&(s||f),!g&&!a&&!o&&(l||w)]}),d==="vertical"&&!g&&v&&e.jsx("button",{onClick:y,className:u("absolute bottom-4 right-4","p-3 rounded-full","bg-blue-600 dark:bg-blue-500","text-white","shadow-lg","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"),"aria-label":"Scroll to top",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 10l7-7m0 0l7 7m-7-7v18"})})})]})},Q={twitter:(t,r,a)=>{const o=a.length>0?`&hashtags=${a.join(",")}`:"";return`https://twitter.com/intent/tweet?url=${encodeURIComponent(t)}&text=${encodeURIComponent(r)}${o}`},facebook:t=>`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(t)}`,linkedin:(t,r,a)=>`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(t)}`,reddit:(t,r)=>`https://reddit.com/submit?url=${encodeURIComponent(t)}&title=${encodeURIComponent(r)}`,telegram:(t,r)=>`https://t.me/share/url?url=${encodeURIComponent(t)}&text=${encodeURIComponent(r)}`,whatsapp:(t,r)=>`https://wa.me/?text=${encodeURIComponent(r+" "+t)}`,email:(t,r,a)=>`mailto:?subject=${encodeURIComponent(r)}&body=${encodeURIComponent(a+`
|
|
46
46
|
|
|
47
47
|
`+t)}`,discord:(t,r)=>`https://discord.com/channels/@me?message=${encodeURIComponent(r+`
|
|
48
48
|
`+t)}`,messages:(t,r)=>`sms:?&body=${encodeURIComponent(r+" "+t)}`},Yl=({shareConfig:t})=>{const[r,a]=m.useState(!1),[o,n]=m.useState(""),[s,l]=m.useState(!1),[c,d]=m.useState(!1),[g,h]=m.useState(!1);m.useEffect(()=>{const C=t.onBeforeShare;C&&!o&&(async()=>{l(!0);try{const x=typeof window<"u"?window.location.href:"",k=await C(x);n(k)}catch{const x=typeof window<"u"?window.location.href:"";n(x)}finally{l(!1)}})()},[t,o]);const b=o||(typeof window<"u"?window.location.href:""),v=typeof navigator<"u"&&navigator.share!==void 0,p=async()=>{if(!(!v||g)){h(!0);try{await navigator.share({title:t.title,text:t.description,url:b}),a(!1)}catch(C){C instanceof Error&&C.name!=="AbortError"&&(console.error("Share failed:",C),C.name!=="InvalidStateError"&&a(!0))}finally{h(!1)}}},y=async()=>{try{await navigator.clipboard.writeText(b),d(!0),setTimeout(()=>{d(!1),a(!1)},1500)}catch{}},f=()=>{a(!r)},w=C=>{window.open(C,"_blank","noopener,noreferrer,width=600,height=400"),a(!1)},N=[{name:"Twitter",url:Q.twitter(b,t.title,t.hashtags),color:"text-blue-400",svg:e.jsx("path",{d:"M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"})},{name:"Facebook",url:Q.facebook(b),color:"text-blue-600",svg:e.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})},{name:"LinkedIn",url:Q.linkedin(b,t.title,t.description),color:"text-blue-700",svg:e.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})},{name:"Reddit",url:Q.reddit(b,t.title),color:"text-orange-600",svg:e.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"})},{name:"Telegram",url:Q.telegram(b,t.title),color:"text-blue-500",svg:e.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})},{name:"WhatsApp",url:Q.whatsapp(b,t.title),color:"text-green-600",svg:e.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"})},{name:"Discord",url:Q.discord(b,t.title),color:"text-indigo-500",svg:e.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})},{name:"Messages",url:Q.messages(b,t.title),color:"text-green-500",svg:e.jsx("path",{d:"M.05 3.555A3 3 0 013 0h18a3 3 0 012.95 3.555L22 11v8a3 3 0 01-3 3H5a3 3 0 01-3-3v-8l-1.95-7.445zM2 10.938V19a1 1 0 001 1h18a1 1 0 001-1v-8.062L20 19H4l-2-8.062zM3.38 2L5 8h14l1.62-6H3.38z"})},{name:"Email",url:Q.email(b,t.title,t.description),color:"text-gray-600",svg:e.jsx("path",{d:"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"})}];return e.jsxs("div",{className:"relative",children:[e.jsx("button",{onClick:f,disabled:s||g,className:"flex items-center justify-center w-8 h-8 bg-blue-50 hover:bg-blue-100 dark:bg-blue-900/30 dark:hover:bg-blue-900/50 text-blue-600 dark:text-blue-400 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Share this page",children:s||g?e.jsx("div",{className:"w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}):e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})})}),r&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-[999998]",onClick:()=>a(!1)}),e.jsxs("div",{className:"absolute right-0 top-10 z-[999999] w-40 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 py-1",children:[N.map(C=>e.jsxs("button",{onClick:()=>w(C.url),className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[e.jsx("svg",{className:`w-4 h-4 mr-2 ${C.color}`,fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:C.svg}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:C.name})]},C.name)),e.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),v&&e.jsxs("button",{onClick:()=>{a(!1),p()},disabled:g,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50",children:[e.jsx("svg",{className:"w-4 h-4 mr-2 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"More..."})]}),e.jsxs("button",{onClick:y,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[e.jsx("svg",{className:"w-4 h-4 mr-2 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:c?"Copied!":"Copy Link"})]})]})]})]})},Br=({items:t,shareConfig:r,className:a,showHome:o})=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("nav",{"aria-label":"Breadcrumb",children:e.jsx("ol",{className:"flex items-center text-sm space-x-2",children:t.map((n,s)=>e.jsxs(m.Fragment,{children:[e.jsx("li",{children:n.current?e.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:n.label}):e.jsx(ve.Link,{to:n.href||"#",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors",children:n.label})}),s<t.length-1&&e.jsx("li",{children:e.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"/"})})]},s))})}),r&&e.jsx(Yl,{shareConfig:r})]}),Ql=({items:t,shareConfig:r})=>e.jsx("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 relative z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3 relative",children:e.jsx(Br,{items:t,shareConfig:r})})}),Wr=t=>{const[r,a]=m.useState(""),[o,n]=m.useState(!0),[s,l]=m.useState(null);return m.useEffect(()=>{t&&(async()=>{try{n(!0),l(null);const d=await fetch(`/code/${t}`);if(!d.ok)throw new Error(`Failed to load code file: ${t}`);const g=await d.text();a(g)}catch(d){l(d instanceof Error?d.message:"Unknown error"),a("// Error loading code file")}finally{n(!1)}})()},[t]),{code:r,loading:o,error:s}},Zl=({filename:t,code:r,language:a,title:o,className:n="",showCopy:s=!0,showHeader:l=!0})=>{const{t:c}=ur.useTranslation("codeBlock"),{code:d,loading:g,error:h}=Wr(t||""),[b,v]=m.useState(!1),p=r||d,f=a||(t?(N=>{switch(N.split(".").pop()?.toLowerCase()){case"sol":return"solidity";case"js":case"mjs":return"javascript";case"ts":return"typescript";case"sh":return"bash";case"graphql":return"graphql";case"json":return"json";case"css":return"css";case"html":return"html";case"jsx":return"jsx";case"tsx":return"tsx";case"py":return"python";case"java":return"java";case"cpp":case"c":return"cpp";case"go":return"go";case"rs":return"rust";case"php":return"php";case"rb":return"ruby";default:return"text"}})(t):"text"),w=async()=>{if(p)try{await navigator.clipboard.writeText(p),v(!0),setTimeout(()=>v(!1),2e3)}catch{}};return t&&g?e.jsx("div",{className:`bg-gray-900 text-green-400 rounded-lg p-4 font-mono text-sm ${n}`,children:e.jsx("div",{className:"animate-pulse text-gray-500",children:c("loadingCode","Loading code...")})}):t&&h?e.jsxs("div",{className:`bg-gray-900 text-red-400 rounded-lg p-4 font-mono text-sm ${n}`,children:[c("error","Error"),": ",h]}):p?e.jsxs("div",{className:`bg-gray-900 rounded-lg border border-green-500/20 shadow-lg shadow-green-500/10 ${n}`,children:[l&&e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-green-500/20 bg-gray-800/50",children:[e.jsx("span",{className:"text-sm text-green-400 font-mono",children:o||t||`${f} code`}),s&&e.jsx("button",{onClick:w,className:"p-2 text-gray-400 hover:text-green-400 hover:bg-gray-800 rounded-lg transition-all duration-200 group",title:c("copyCode","Copy code"),children:b?e.jsx(M.CheckIcon,{className:"h-4 w-4 text-green-400"}):e.jsx(M.ClipboardDocumentIcon,{className:"h-4 w-4 group-hover:scale-110 transition-transform"})})]}),e.jsx("div",{className:"p-4 overflow-x-auto text-left",children:e.jsx("pre",{className:`text-sm language-${f}`,children:e.jsx("code",{className:"text-gray-100",children:p})})})]}):e.jsx("div",{className:`bg-gray-900 text-gray-400 rounded-lg p-4 font-mono text-sm ${n}`,children:c("noCode","No code to display")})},Xl=({subsections:t,isExpanded:r,selectedSubsection:a,parentSectionId:o,onSubsectionSelect:n})=>{const s=m.useRef(null),[l,c]=m.useState(void 0);return m.useLayoutEffect(()=>{if(s.current){const d=s.current.scrollHeight;c(r?d+16:0)}},[r,t]),e.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:l!==void 0?`${l}px`:"auto"},children:e.jsx("div",{ref:s,className:"ml-6 mt-1 mb-1 space-y-1",children:t.map(d=>e.jsxs("div",{className:"relative group",children:[a===d.id&&e.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),a!==d.id&&e.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),e.jsx("button",{onClick:()=>n?.(d.id,o),className:`relative z-10 block w-full text-left pl-4 pr-3 py-2 rounded-md text-sm transition-all duration-200 ${a===d.id?"text-blue-700 dark:text-blue-300":"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"}`,children:d.title})]},d.id))})})},Jl=({id:t,title:r,content:a,subsections:o,isSelected:n=!1,selectedSubsection:s=null,onSectionSelect:l,onSubsectionSelect:c,className:d=""})=>{const[g,h]=m.useState(!1),b=()=>{h(!g)},v=()=>{l?.(t)},p=o&&o.length>0;return e.jsxs("div",{className:d,children:[e.jsxs("div",{className:"relative flex items-center group",children:[n&&!s&&e.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),!(n&&!s)&&e.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),e.jsx("button",{onClick:v,className:`relative z-10 flex-1 text-left pl-5 pr-3 py-4 text-base font-medium transition-all duration-200 ${n&&!s?"text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100"}`,children:r}),p&&e.jsx("button",{onClick:b,className:"p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200","aria-label":g?"Collapse section":"Expand section",children:e.jsx(M.ChevronRightIcon,{className:`h-5 w-5 text-gray-500 transition-transform duration-300 ease-in-out ${g?"rotate-90":"rotate-0"}`})})]}),p&&e.jsx(Xl,{subsections:o,isExpanded:g,selectedSubsection:s,parentSectionId:t,onSubsectionSelect:c})]})},Rl=({title:t,subtitle:r,buttonText:a,buttonIcon:o="envelope",variant:n="default",badgeText:s="FREE",prominentBadgeText:l="100% Free",onButtonClick:c,className:d=""})=>{const g=()=>o==="envelope"||o==="both"?e.jsx(M.EnvelopeIcon,{className:n==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1"}):o==="none"?null:e.jsx("svg",{className:n==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})}),h=()=>o==="arrow"||o==="both"?e.jsx(M.ArrowRightIcon,{className:"h-4 w-4 ml-2"}):null,b=()=>n==="prominent"?"border-b-2 border-green-200 dark:border-green-700":"border-b border-green-200 dark:border-green-700",v=()=>{const f="bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white rounded-lg font-bold transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-green-500/25 inline-flex items-center whitespace-nowrap cursor-pointer";return n==="prominent"?`${f} px-8 py-3 text-base`:`${f} px-6 py-2 text-sm`},p=()=>n==="prominent"?"text-green-800 dark:text-green-200 font-semibold text-lg":"text-green-800 dark:text-green-200 font-semibold",y=n==="prominent"?l:s;return e.jsx("div",{className:`bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 ${b()} ${d}`,children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[e.jsxs("div",{className:`flex items-center ${n==="prominent"?"text-center sm:text-left":""}`,children:[e.jsx("div",{className:"bg-green-500 text-white text-xs font-bold px-3 py-1 rounded-full mr-3 animate-pulse",children:y}),e.jsxs("div",{children:[e.jsx("span",{className:p(),children:t}),r&&e.jsx("span",{className:"text-green-700 dark:text-green-300 text-sm block",children:r})]})]}),e.jsxs("button",{onClick:c,className:v(),children:[g(),a,h()]})]})})})},ei=({children:t,onClick:r,variant:a,size:o,disabled:n,className:s,type:l,trackingLabel:c,actionType:d,componentName:g,onTrack:h,trackingParams:b={},...v})=>{const p=y=>{if(h){const f=c||(typeof t=="string"?t:"")||"Unknown Button",N=a&&["default","primary","secondary","outline","ghost","destructive","link"].includes(a)?a:"default";h({button_text:f,button_type:N,component_name:g,action_type:d,...b})}r&&r(y)};return e.jsx(_,{...v,variant:a,size:o,disabled:n,className:s,type:l,onClick:p,children:t})},ri=({children:t,onClick:r,to:a,href:o,trackingLabel:n,componentName:s,onTrack:l,trackingParams:c={},LinkComponent:d,linkProps:g={},...h})=>{const b=p=>{if(l){const y=n||(typeof t=="string"?t:"")||"Unknown Link",f=a?typeof a=="string"?a:a.pathname||"":o||"";l({link_text:y,link_url:f,to_page:f,navigation_type:d?"router_link":"anchor_link",component_name:s,...c})}r&&r(p)};if(d&&a!==void 0)return e.jsx(d,{...g,to:a,onClick:b,...h,children:t});const v=a?typeof a=="string"?a:a.pathname||"#":o;return e.jsx("a",{...h,href:v,onClick:b,children:t})},Fr={en:{name:"English",flag:"🇺🇸"},ar:{name:"العربية",flag:"🇸🇦"},de:{name:"Deutsch",flag:"🇩🇪"},es:{name:"Español",flag:"🇪🇸"},fr:{name:"Français",flag:"🇫🇷"},it:{name:"Italiano",flag:"🇮🇹"},ja:{name:"日本語",flag:"🇯🇵"},ko:{name:"한국어",flag:"🇰🇷"},pt:{name:"Português",flag:"🇵🇹"},ru:{name:"Русский",flag:"🇷🇺"},sv:{name:"Svenska",flag:"🇸🇪"},th:{name:"ไทย",flag:"🇹🇭"},uk:{name:"Українська",flag:"🇺🇦"},vi:{name:"Tiếng Việt",flag:"🇻🇳"},zh:{name:"简体中文",flag:"🇨🇳"}},ti=({variant:t="compact",className:r=""})=>{const{i18n:a,t:o}=ur.useTranslation("languageSelector"),[n,s]=m.useState(a.language),l=m.useMemo(()=>a.options.supportedLngs?a.options.supportedLngs.filter(g=>g!=="cimode").map(g=>({code:g,name:Fr[g]?.name||g.toUpperCase(),flag:Fr[g]?.flag||"🌐"})).sort((g,h)=>g.name.localeCompare(h.name)):[],[a.options.supportedLngs]),c=l.find(g=>g.code===n||g.code.toLowerCase()===n.toLowerCase());m.useEffect(()=>{s(a.language)},[a.language]);const d=g=>{localStorage.setItem("language",g),a.changeLanguage(g).then(()=>{s(a.language),setTimeout(()=>{window.dispatchEvent(new Event("languagechange"))},100)}).catch(()=>{})};return t==="compact"?e.jsx("div",{className:`relative ${r}`,children:e.jsxs(Pr,{value:n,onValueChange:d,children:[e.jsx(Oe,{className:"h-10 w-auto px-3 border-0 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-0 focus:ring-offset-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-lg leading-none",children:c?.flag}),e.jsx("span",{className:"hidden sm:block text-sm font-medium text-gray-700 dark:text-gray-300",children:c?.name})]})}),e.jsx(Ve,{children:l.map(g=>e.jsx(He,{value:g.code,className:"cursor-pointer",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-lg leading-none",children:g.flag}),e.jsx("span",{className:"text-sm",children:g.name})]})},g.code))})]})}):e.jsxs("div",{className:`space-y-2 ${r}`,children:[e.jsxs("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 flex items-center space-x-2",children:[e.jsx(M.LanguageIcon,{className:"h-4 w-4 text-gray-500 dark:text-gray-400"}),e.jsx("span",{children:o("language","Language")})]}),e.jsxs(Pr,{value:n,onValueChange:d,children:[e.jsx(Oe,{children:e.jsx(is,{placeholder:o("selectLanguage","Select language")})}),e.jsx(Ve,{children:l.map(g=>e.jsx(He,{value:g.code,className:"cursor-pointer",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-lg leading-none",children:g.flag}),e.jsx("span",{children:g.name})]})},g.code))})]}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:o("selectPreferredLanguage","Select your preferred language")})]})},ai=({items:t,type:r="ordered",variant:a="default",className:o,itemClassName:n})=>{const s=()=>{const g="space-y-2",h={ordered:r==="ordered"?"list-decimal":"",unordered:r==="unordered"?"list-disc":""},b={default:"list-inside",enhanced:"list-inside space-y-3",minimal:"list-none space-y-1"};return u(g,h[r],b[a])},l=g=>{const h="text-gray-600 dark:text-gray-400";return a==="enhanced"?u(h,"relative pl-8 pb-2 border-l-2 border-gray-200 dark:border-gray-700",g===t.length-1&&"border-l-transparent"):a==="minimal"?u(h,"flex items-start"):h},c=g=>a==="enhanced"&&r==="ordered"?e.jsx("div",{className:"absolute -left-4 -top-1 w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-medium",children:g+1}):null,d=(g,h)=>{const b=typeof g=="object",v=b?g.content:g,p=b?g.subItems:void 0;return e.jsxs("li",{className:u(l(h),n),children:[c(h),a==="minimal"&&r==="ordered"&&e.jsx("span",{className:"inline-block w-6 h-6 bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 rounded-full text-sm font-medium text-center leading-6 mr-3 flex-shrink-0",children:h+1}),a==="minimal"&&r==="unordered"&&e.jsx("span",{className:"inline-block w-2 h-2 bg-blue-600 rounded-full mt-2 mr-3 flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{children:v}),p&&p.length>0&&e.jsx("ul",{className:"mt-2 ml-4 space-y-1 list-disc list-inside text-sm text-gray-500 dark:text-gray-500",children:p.map((y,f)=>e.jsx("li",{children:y},f))})]})]},h)};return e.jsx("ul",{className:u(s(),o),children:t.map(d)})};class oi extends m.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,a){console.error("ErrorBoundary caught an error:",r,a),this.props.onError?.(r,a)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:e.jsxs("div",{style:{padding:"20px",border:"1px solid red",margin:"10px"},children:[e.jsx("h2",{children:"Something went wrong"}),e.jsxs("p",{children:["Error: ",this.state.error?.message||"Unknown error"]}),e.jsx("button",{onClick:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}}class Le extends m.Component{constructor(r){super(r),this.retryTimer=null,this.sendErrorToMonitoring=(a,o)=>{try{typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(a,{contexts:{react:{componentStack:o.componentStack}},tags:{errorBoundary:!0,componentName:this.props.componentName||"unknown",lazyLoading:!0}}),typeof window<"u"&&window.gtag&&window.gtag?.("event","exception",{description:a.message,fatal:!1,custom_map:{component:this.props.componentName||"unknown"}})}catch{}},this.handleRetry=()=>{const{maxRetries:a=3,retryDelay:o=1e3}=this.props,{retryCount:n}=this.state;if(n>=a)return;this.setState({isRetrying:!0}),this.retryTimer&&clearTimeout(this.retryTimer);const s=o*Math.pow(2,n);this.retryTimer=setTimeout(()=>{this.setState({hasError:!1,error:null,errorInfo:null,retryCount:n+1,isRetrying:!1})},s)},this.handleReload=()=>{window.location.reload()},this.state={hasError:!1,error:null,errorInfo:null,retryCount:0,isRetrying:!1,lastErrorTime:0}}static getDerivedStateFromError(r){return{hasError:!0,error:r,lastErrorTime:Date.now()}}componentDidCatch(r,a){const{onError:o,componentName:n}=this.props;this.setState({error:r,errorInfo:a}),console.error(`LazyErrorBoundary caught an error in ${n||"Unknown Component"}:`,r,a),o?.(r,a),this.sendErrorToMonitoring(r,a)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{children:r,fallback:a,componentName:o,showRetryButton:n=!0,maxRetries:s=3}=this.props,{hasError:l,error:c,isRetrying:d,retryCount:g}=this.state;return l&&c?a||e.jsx("div",{className:"lazy-error-boundary error-boundary-container",children:e.jsxs("div",{className:"error-content",children:[e.jsx("div",{className:"error-icon",children:"⚠️"}),e.jsxs("h3",{className:"error-title",children:["Something went wrong loading ",o||"this component"]}),e.jsxs("div",{className:"error-details",children:[e.jsx("p",{className:"error-message",children:c.message}),process.env.NODE_ENV==="development"&&e.jsxs("details",{className:"error-stack",children:[e.jsx("summary",{children:"Error Details (Development)"}),e.jsx("pre",{children:c.stack})]})]}),e.jsxs("div",{className:"error-actions",children:[n&&g<s&&e.jsx("button",{onClick:this.handleRetry,disabled:d,className:"retry-button",children:d?"Retrying...":`Retry (${g}/${s})`}),g>=s&&e.jsx("button",{onClick:this.handleReload,className:"reload-button",children:"Reload Page"})]}),e.jsxs("div",{className:"error-help",children:[e.jsx("p",{children:"This might be a temporary issue. Try refreshing the page."}),navigator.onLine===!1&&e.jsx("p",{className:"offline-notice",children:"You appear to be offline. Check your connection and try again."})]})]})}):r}}function ni(t,r){const a=o=>e.jsx(Le,{...r,children:e.jsx(t,{...o})});return a.displayName=`withLazyErrorBoundary(${t.displayName||t.name})`,a}class si extends Le{static getDerivedStateFromError(r){return r.message.includes("Loading chunk")||r.message.includes("Loading CSS chunk")||r.message.includes("ChunkLoadError")||r.name==="ChunkLoadError"?{hasError:!0,error:new Error("Network error while loading component. Please check your connection and try again."),lastErrorTime:Date.now()}:super.getDerivedStateFromError(r)}}function li(){const[t,r]=m.useState(0),a=m.useCallback(()=>{r(o=>o+1)},[]);return{errorRecoveryCount:t,triggerErrorRecovery:a}}function ii({children:t}){const r=(a,o)=>{console.error("Global lazy loading error:",a,o),typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(a,{level:"error",tags:{globalErrorBoundary:!0,lazyLoading:!0}})};return e.jsx(Le,{onError:r,componentName:"Application",maxRetries:1,showRetryButton:!0,fallback:e.jsxs("div",{className:"global-error-fallback",children:[e.jsx("h1",{children:"Application Error"}),e.jsx("p",{children:"Something went wrong with the application. Please refresh the page."}),e.jsx("button",{onClick:()=>window.location.reload(),children:"Refresh Page"})]}),children:t})}const di=({children:t})=>e.jsx(e.Fragment,{children:t}),ci=({children:t})=>e.jsx(e.Fragment,{children:t}),gi=({src:t,alt:r,placeholder:a,lowQualitySrc:o,aspectRatio:n="16/9",eager:s=!1,className:l="",...c})=>{const[d,g]=m.useState(!1),[h,b]=m.useState(s),[v,p]=m.useState(!1),y=m.useRef(null),f=m.useRef(null);m.useEffect(()=>{if(s){b(!0);return}return f.current=new IntersectionObserver(C=>{C.forEach(S=>{S.isIntersecting&&(b(!0),f.current&&y.current&&f.current.unobserve(y.current))})},{rootMargin:"50px",threshold:.01}),y.current&&f.current.observe(y.current),()=>{f.current&&f.current.disconnect()}},[s]);const w=()=>{g(!0)},N=()=>{p(!0)};return e.jsxs("div",{className:`relative overflow-hidden ${l}`,style:{aspectRatio:n},children:[o&&!d&&e.jsx("img",{src:o,alt:"",className:"absolute inset-0 w-full h-full object-cover blur-sm","aria-hidden":"true"}),!o&&!d&&e.jsx("div",{className:"absolute inset-0 bg-gray-200 dark:bg-gray-700 animate-pulse","aria-hidden":"true"}),h&&!v&&e.jsx("img",{ref:y,src:t,alt:r,onLoad:w,onError:N,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-500 ${d?"opacity-100":"opacity-0"}`,loading:s?"eager":"lazy",...c}),v&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800",children:e.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[e.jsx("svg",{className:"mx-auto h-12 w-12 mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e.jsx("p",{className:"text-sm",children:"Failed to load image"})]})})]})},ui=(t,r,a)=>{const o=m.memo(t,r);return a&&(o.displayName=`Memo(${a})`),process.env.NODE_ENV==="development"?n=>(m.useMemo(()=>{let l=0;return()=>++l},[])(),e.jsx(o,{...n})):o},hi=(t,r)=>m.memo(t,(a,o)=>r.every(n=>a[n]===o[n])),bi=m.memo(({children:t,compute:r,deps:a})=>{const o=m.useRef(a),n=m.useRef(r),s=m.useRef(void 0),l=m.useMemo(()=>{const c=a.length!==o.current.length||a.some((g,h)=>g!==o.current[h]),d=r!==n.current;if(c||d||s.current===void 0){let g;return process.env.NODE_ENV==="development"?(performance.now(),g=r(),performance.now()):g=r(),o.current=a,n.current=r,s.current=g,g}return s.current},[r,a]);return e.jsx(e.Fragment,{children:t(l)})}),yi=m.memo(({item:t,index:r,style:a,renderItem:o})=>e.jsx("div",{style:a,children:o(t,r)}),(t,r)=>t.index===r.index&&t.item===r.item&&t.style.height===r.style.height&&t.style.top===r.style.top),fi=m.memo(({condition:t,children:r,fallback:a=null})=>t?e.jsx(e.Fragment,{children:r}):e.jsx(e.Fragment,{children:a})),pi=({children:t,threshold:r=.1,rootMargin:a="50px",fallback:o=null})=>{const[n,s]=m.useState(!1),l=m.useRef(null);return m.useEffect(()=>{const c=new IntersectionObserver(([d])=>{d.isIntersecting&&(s(!0),c.disconnect())},{threshold:r,rootMargin:a});return l.current&&c.observe(l.current),()=>c.disconnect()},[r,a]),e.jsx("div",{ref:l,children:n?t:o})},mi=({children:t,maxRenderTime:r=16,onSlowRender:a})=>{const o=m.useRef(0);return m.useLayoutEffect(()=>{o.current=performance.now()}),m.useEffect(()=>{const n=performance.now()-o.current;n>r&&a?.(n)}),e.jsx(e.Fragment,{children:t})},xi=({children:t,batchSize:r=5,delay:a=0})=>{const[o,n]=m.useState(r);return m.useEffect(()=>{if(o<t.length){const s=setTimeout(()=>{n(l=>Math.min(l+r,t.length))},a);return()=>clearTimeout(s)}},[o,t.length,r,a]),e.jsx(e.Fragment,{children:t.slice(0,o)})},Or=({icon:t,title:r,description:a,link:o,badge:n,variant:s="default",size:l="default"})=>{const c=()=>{const b="relative overflow-hidden transition-all duration-300",v={default:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg hover:shadow-lg hover:border-gray-300 dark:hover:border-gray-600",gradient:"bg-gradient-to-br from-white to-gray-50 dark:from-gray-800 dark:to-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg hover:shadow-lg hover:from-gray-50 hover:to-gray-100 dark:hover:from-gray-700 dark:hover:to-gray-800",outlined:"border-2 border-dashed border-gray-300 dark:border-gray-600 rounded-lg hover:border-gray-400 dark:hover:border-gray-500 hover:bg-gray-50 dark:hover:bg-gray-800/50",minimal:"hover:bg-gray-50 dark:hover:bg-gray-800/50 rounded-lg"},p={sm:"p-4",default:"p-6",lg:"p-8"};return`${b} ${v[s]} ${p[l]}`},d=(b="blue")=>{const v={blue:"bg-blue-100 text-blue-800 dark:bg-blue-900/20 dark:text-blue-300",green:"bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-300",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/20 dark:text-purple-300",yellow:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/20 dark:text-yellow-300",red:"bg-red-100 text-red-800 dark:bg-red-900/20 dark:text-red-300",gray:"bg-gray-100 text-gray-800 dark:bg-gray-900/20 dark:text-gray-300"};return v[b]||v.blue},g={sm:"h-6 w-6",default:"h-8 w-8",lg:"h-10 w-10"},h={sm:"text-lg",default:"text-xl",lg:"text-2xl"};return e.jsxs("div",{className:c(),children:[n&&e.jsx("div",{className:"absolute top-4 right-4",children:e.jsx("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${d(n.color)}`,children:n.label})}),t&&e.jsx("div",{className:"mb-4",children:e.jsx("div",{className:`text-blue-600 dark:text-blue-400 ${g[l]}`,children:t})}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:`font-bold text-gray-900 dark:text-white ${h[l]}`,children:r}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 leading-relaxed",children:a}),o&&e.jsx("div",{className:"pt-2",children:o.external?e.jsxs("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium text-sm transition-colors",children:[o.label,e.jsx("svg",{className:"ml-1 h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}):e.jsxs("a",{href:o.href,className:"inline-flex items-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium text-sm transition-colors",children:[o.label,e.jsx("svg",{className:"ml-1 h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})})]})]})},vi=({features:t,columns:r=3,cardVariant:a="default",cardSize:o="default",className:n="",title:s,description:l})=>{const c=()=>`grid ${{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}[r]} gap-6`;return e.jsxs("section",{className:`py-16 ${n}`,children:[(s||l)&&e.jsxs("div",{className:"text-center mb-12",children:[s&&e.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-4",children:s}),l&&e.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-400 max-w-3xl mx-auto",children:l})]}),e.jsx("div",{className:c(),children:t.map((d,g)=>e.jsx(Or,{...d,variant:a,size:o},g))})]})},ki=({title:t,description:r,primaryButton:a,secondaryButton:o,gradient:n={from:"blue-600",to:"purple-600"},textColor:s="light",className:l="",size:c="lg"})=>{const g=(()=>{const f=n.via?`${n.from}-${n.via}-${n.to}`:`${n.from}-${n.to}`;return{"blue-600-purple-600":"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700","orange-900-red-900":"bg-gradient-to-r from-orange-600 to-red-600 dark:from-orange-700 dark:to-red-700","green-600-blue-600":"bg-gradient-to-r from-green-600 to-blue-600 dark:from-green-700 dark:to-blue-700","purple-600-pink-600":"bg-gradient-to-r from-purple-600 to-pink-600 dark:from-purple-700 dark:to-pink-700"}[f]||"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"})(),h=s==="light"?"text-white":"text-gray-900 dark:text-gray-100",b={sm:"py-12",md:"py-16",lg:"py-20"},v={sm:"text-2xl md:text-3xl",md:"text-3xl md:text-4xl",lg:"text-4xl md:text-5xl"},p={sm:"text-base md:text-lg",md:"text-lg md:text-xl",lg:"text-xl md:text-2xl"},y=(f,w=!1)=>{const N=()=>f.variant==="primary"||w?"gradient":(f.variant==="secondary","outline"),C=e.jsx(_,{variant:N(),size:"lg",className:w?"":"bg-white/10 hover:bg-white/20 backdrop-blur-sm border-white/30",children:f.label});return f.external?e.jsx("a",{href:f.href,target:"_blank",rel:"noopener noreferrer",children:C}):e.jsx(ve.Link,{to:f.href,children:C})};return e.jsxs("section",{className:`${g} ${b[c]} relative overflow-hidden ${l}`,children:[e.jsx("div",{className:"absolute inset-0 bg-black/20"}),e.jsxs("div",{className:"absolute top-0 left-1/2 transform -translate-x-1/2 w-full h-full",children:[e.jsx("div",{className:"absolute top-10 left-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute bottom-10 right-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"})]}),e.jsxs("div",{className:"relative z-10 max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:`${v[c]} font-bold ${h} mb-6`,children:t}),e.jsx("p",{className:`${p[c]} ${h}/90 mb-8 max-w-2xl mx-auto`,children:r}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[y(a,!0),o&&y(o,!1)]})]})]})},wi={pending:{label:"Pending",color:"bg-gray-500",textColor:"text-white"},in_progress:{label:"In Progress",color:"bg-blue-500",textColor:"text-white"},verified:{label:"Verified",color:"bg-green-500",textColor:"text-white"},rejected:{label:"Rejected",color:"bg-red-500",textColor:"text-white"}},Ci={basic:"Basic KYC",enhanced:"Enhanced KYC",accredited:"Accredited Investor"},Ni=({status:t,level:r,className:a=""})=>{const o=wi[t],n=Ci[r];return e.jsx("div",{className:`inline-flex items-center gap-2 ${a}`,children:e.jsxs("span",{className:`px-3 py-1 rounded-full text-sm font-medium ${o.color} ${o.textColor}`,children:[n,": ",o.label]})})},Si=({accessToken:t,onComplete:r,onError:a,className:o=""})=>{const n=m.useRef(null),s=m.useRef(null);return m.useEffect(()=>{if(!t)return;const l=document.createElement("script");return l.src="https://static.sumsub.com/idensic/static/sns-websdk-builder.js",l.async=!0,l.onload=()=>{if(n.current&&window.snsWebSdk)try{const c=window.snsWebSdk.init(t,()=>t).withConf({lang:"en"}).withOptions({addViewportTag:!1,adaptIframeHeight:!0}).on("idCheck.onStepCompleted",d=>{}).on("idCheck.onApplicantSubmitted",d=>{r?.()}).on("idCheck.onError",d=>{console.error("SumsubWebSDK: Error",d),a?.(d)}).build();s.current=c,c.launch("#sumsub-websdk-container")}catch(c){console.error("Failed to initialize Sumsub SDK:",c),a?.(c)}else console.error("SumsubWebSDK: Missing requirements - containerRef:",!!n.current,"snsWebSdk:",!!window.snsWebSdk)},l.onerror=()=>{const c=new Error("Failed to load Sumsub Web SDK script");console.error(c),a?.(c)},document.body.appendChild(l),()=>{document.body.contains(l)&&document.body.removeChild(l),s.current&&typeof s.current.destroy=="function"&&s.current.destroy()}},[t,r,a]),e.jsx("div",{className:`sumsub-sdk-container ${o}`,children:e.jsx("div",{ref:n,id:"sumsub-websdk-container"})})},Ei={basic:{title:"Basic KYC",description:"Age & Identity Verification",color:"border-blue-200",activeColor:"border-blue-500 bg-blue-50"},enhanced:{title:"Enhanced KYC",description:"Basic + Country & Compliance",color:"border-purple-200",activeColor:"border-purple-500 bg-purple-50"},accredited:{title:"Accredited Investor",description:"Enhanced + Financial Verification",color:"border-gold-200",activeColor:"border-gold-500 bg-gold-50"}},Li=({level:t,price:r,features:a,isActive:o=!1,isVerified:n=!1,onSelect:s,className:l=""})=>{const c=Ei[t];return e.jsxs("div",{className:`
|
package/dist/seo/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SEO Components and Utilities - Search engine optimization and metadata
|
|
3
3
|
*/
|
|
4
|
-
export { AIMeta } from './AIMeta';
|
|
4
|
+
export { AIMeta, type AIMetaProps } from './AIMeta';
|
|
5
5
|
export * from './SemanticHTML';
|
|
6
6
|
export { AITrainingEnhancer } from './AITrainingEnhancer';
|
|
7
7
|
export * from './advancedSEO';
|
package/dist/seo/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/seo/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/seo/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC"}
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -99,7 +99,6 @@ export * from './screen-reader-text';
|
|
|
99
99
|
export * from './scroll-area';
|
|
100
100
|
export * from './scroll-spy';
|
|
101
101
|
export * from './search-input';
|
|
102
|
-
export * from './section';
|
|
103
102
|
export * from './section-badge';
|
|
104
103
|
export * from './section-header';
|
|
105
104
|
export * from './select';
|
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}
|
package/package.json
CHANGED
package/dist/ui/section.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
declare const sectionVariants: (props?: ({
|
|
4
|
-
variant?: "footer" | "default" | "hero" | "feature" | "cta" | "testimonial" | null | undefined;
|
|
5
|
-
spacing?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | null | undefined;
|
|
6
|
-
background?: "none" | "default" | "surface" | "gradient" | "gradient-primary" | "gradient-secondary" | "gradient-tertiary" | "gradient-vibrant" | null | undefined;
|
|
7
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
interface SectionProps extends VariantProps<typeof sectionVariants> {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
className?: string;
|
|
11
|
-
as?: keyof React.JSX.IntrinsicElements;
|
|
12
|
-
id?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare const Section: React.FC<SectionProps>;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=section.d.ts.map
|
package/dist/ui/section.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../src/ui/section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,eAAe;;;;8EA4CnB,CAAC;AAEH,UAAU,YAAa,SAAQ,YAAY,CAAC,OAAO,eAAe,CAAC;IACjE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAoB1C,CAAC"}
|