@pixonui/react 0.5.27 → 0.5.28

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.js CHANGED
@@ -1,4 +1,4 @@
1
- 'use strict';var Te=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),classVarianceAuthority=require('class-variance-authority'),reactDom=require('react-dom'),lucideReact=require('lucide-react'),socket_ioClient=require('socket.io-client');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var Te__namespace=/*#__PURE__*/_interopNamespace(Te);function l(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var pl=Te__namespace.default.forwardRef(({children:e,className:t,leftIcon:r,rightIcon:o,...a},n)=>jsxRuntime.jsxs("button",{ref:n,type:a.type??"button",className:l("group relative inline-flex items-center justify-center gap-2 rounded-2xl px-5 py-3","bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600","text-white font-semibold tracking-tight","shadow-[0_12px_40px_rgba(99,102,241,.45)]","transition-all duration-300","hover:scale-[1.03] hover:shadow-[0_18px_60px_rgba(99,102,241,.6)]","active:scale-[0.98]","disabled:opacity-50 disabled:cursor-not-allowed","focus:outline-none focus:ring-2 focus:ring-purple-400/40",t),...a,children:[jsxRuntime.jsx("span",{className:"pointer-events-none absolute inset-0 rounded-2xl bg-gradient-to-r from-white/18 via-white/5 to-white/18 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100"}),jsxRuntime.jsxs("span",{className:"relative inline-flex items-center gap-2",children:[r,e,o]})]}));pl.displayName="PrimaryButton";var Lt=Te__namespace.forwardRef(({children:e,...t},r)=>{if(!Te__namespace.isValidElement(e))return null;let o=e;return Te__namespace.cloneElement(o,{...t,...o.props,ref:a=>{typeof r=="function"?r(a):r&&(r.current=a);let{ref:n}=o;typeof n=="function"?n(a):n&&"current"in n&&(n.current=a);},className:l(t.className,o.props.className)})});Lt.displayName="Slot";var hl=classVarianceAuthority.cva("group relative inline-flex items-center justify-center font-semibold tracking-tight transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-purple-400/40 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 disabled:active:scale-100 hover:scale-[1.02] active:scale-[0.98]",{variants:{variant:{primary:"bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 text-white border-transparent",secondary:"bg-zinc-100 text-zinc-900 border border-zinc-200 hover:bg-zinc-200 dark:bg-white/[0.05] dark:text-white dark:border-white/10 dark:hover:bg-white/[0.10] dark:hover:border-white/20",outline:"bg-transparent text-zinc-900 border border-zinc-300 hover:bg-zinc-100 dark:text-white dark:border-white/20 dark:hover:bg-white/[0.05] dark:hover:border-white/30",ghost:"bg-transparent text-zinc-600 hover:text-zinc-900 hover:bg-zinc-100 dark:text-white/80 dark:hover:text-white dark:hover:bg-white/[0.05] border-transparent",danger:"bg-rose-500/10 text-rose-600 border border-rose-500/20 hover:bg-rose-500/20 hover:border-rose-500/30 hover:text-rose-700 dark:text-rose-400 dark:hover:text-rose-300",success:"bg-emerald-500/10 text-emerald-600 border border-emerald-500/20 hover:bg-emerald-500/20 hover:border-emerald-500/30 hover:text-emerald-700 dark:text-emerald-400 dark:hover:text-emerald-300",alert:"bg-amber-500/10 text-amber-600 border border-amber-500/20 hover:bg-amber-500/20 hover:border-amber-500/30 hover:text-amber-700 dark:text-amber-400 dark:hover:text-amber-300"},size:{sm:"h-9 px-3 text-xs gap-1.5",md:"h-11 px-5 text-sm gap-2",lg:"h-14 px-8 text-base gap-3",icon:"h-10 w-10 p-0 flex items-center justify-center"},shape:{default:"rounded-2xl",pill:"rounded-full",square:"rounded-lg"},shadow:{true:"",false:""}},compoundVariants:[{variant:"primary",shadow:true,class:"shadow-[0_12px_40px_rgba(99,102,241,.45)] hover:shadow-[0_18px_60px_rgba(99,102,241,.6)]"},{variant:"secondary",shadow:true,class:"shadow-sm"}],defaultVariants:{variant:"primary",size:"md",shape:"default",shadow:true}}),R=Te__namespace.default.forwardRef(({className:e,variant:t,size:r,shape:o,shadow:a,asChild:n=false,leftIcon:s,rightIcon:i,isLoading:d,children:c,disabled:m,...u},p)=>jsxRuntime.jsxs(n?Lt:"button",{ref:p,disabled:m||d,className:l(hl({variant:t,size:r,shape:o,shadow:a,className:e})),...u,children:[t==="primary"&&!n&&jsxRuntime.jsx("span",{className:"pointer-events-none absolute inset-0 rounded-[inherit] bg-gradient-to-r from-white/18 via-white/5 to-white/18 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100"}),jsxRuntime.jsxs("span",{className:"relative inline-flex items-center justify-center",children:[d&&jsxRuntime.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),!d&&s&&jsxRuntime.jsx("span",{className:l("mr-2",r==="sm"&&"mr-1.5"),children:s}),c,!d&&i&&jsxRuntime.jsx("span",{className:l("ml-2",r==="sm"&&"ml-1.5"),children:i})]})]}));R.displayName="Button";var vl=Te__namespace.default.forwardRef(({children:e,className:t,leftIcon:r,rightIcon:o,...a},n)=>{let s=Te.useRef(null),i=d=>{let c=s.current;if(!c)return;let m=c.getBoundingClientRect(),u=d.clientX-m.left,p=d.clientY-m.top;c.style.setProperty("--mouse-x",`${u}px`),c.style.setProperty("--mouse-y",`${p}px`);};return Te__namespace.default.useImperativeHandle(n,()=>s.current),jsxRuntime.jsxs("button",{ref:s,onMouseMove:i,type:a.type??"button",className:l("group relative inline-flex items-center justify-center gap-2 rounded-2xl px-6 py-3","bg-zinc-100 border border-zinc-200 text-zinc-900","dark:bg-white/[0.03] dark:border-white/10 dark:text-white","font-semibold tracking-tight overflow-hidden","transition-all duration-300","hover:bg-zinc-200 dark:hover:bg-white/[0.05] hover:scale-[1.02]","active:scale-[0.98]","focus:outline-none focus:ring-2 focus:ring-purple-400/40",t),...a,children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute -inset-px opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.4), transparent 40%)"}}),jsxRuntime.jsx("div",{className:"pointer-events-none absolute -inset-px rounded-2xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(300px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.6), transparent 40%)",maskImage:"linear-gradient(#fff, #fff), linear-gradient(#fff, #fff)",maskClip:"content-box, border-box",maskComposite:"exclude",WebkitMaskComposite:"xor",padding:"1px"}}),jsxRuntime.jsxs("span",{className:"relative inline-flex items-center gap-2 z-10",children:[r,e,o]})]})});vl.displayName="GlowButton";function kl({accent:e="teal",children:t}){let r={teal:"bg-teal-500/90",amber:"bg-amber-400/95",violet:"bg-violet-500/90",blue:"bg-blue-500/90",rose:"bg-rose-500/90",emerald:"bg-emerald-500/90",indigo:"bg-indigo-500/90"};return jsxRuntime.jsx("div",{className:l("flex h-11 w-11 items-center justify-center rounded-2xl",r[e]??r.teal),children:t})}function Nl({accent:e="teal"}){let t={teal:"from-teal-400/25 via-teal-400/10 to-transparent",amber:"from-amber-300/25 via-amber-300/10 to-transparent",violet:"from-violet-400/25 via-violet-400/10 to-transparent",blue:"from-blue-400/25 via-blue-400/10 to-transparent",rose:"from-rose-400/25 via-rose-400/10 to-transparent",emerald:"from-emerald-400/25 via-emerald-400/10 to-transparent",indigo:"from-indigo-400/25 via-indigo-400/10 to-transparent"};return jsxRuntime.jsx("div",{className:l("pointer-events-none absolute -right-12 top-1/2 h-40 w-48 -translate-y-1/2 rotate-12","bg-gradient-to-l blur-2xl",t[e]??t.teal)})}function Tl({color:e="currentColor"}){return jsxRuntime.jsx("svg",{viewBox:"0 0 120 40",className:"h-6 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M2 22c10 0 10-10 20-10s10 10 20 10 10-10 20-10 10 10 20 10 10-10 20-10",stroke:e,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.95"})})}var Cl=Te__namespace.default.forwardRef(({accent:e="teal",icon:t,title:r,value:o,subtext:a,showWave:n=false,onClick:s,className:i,...d},c)=>{let m=Te.useRef(null),u=()=>{let x=m.current;if(!x)return;let b=x.getBoundingClientRect();x.style.setProperty("--x",`${Math.round(b.width/2)}px`),x.style.setProperty("--y",`${Math.round(b.height/2)}px`);},p=x=>{let b=m.current;if(!b)return;let f=b.getBoundingClientRect();b.style.setProperty("--x",`${x.clientX-f.left}px`),b.style.setProperty("--y",`${x.clientY-f.top}px`);},g={teal:"rgba(45,212,191,.95)",amber:"rgba(251,191,36,.95)",violet:"rgba(167,139,250,.95)",blue:"rgba(96,165,250,.95)",rose:"rgba(251,113,133,.95)",emerald:"rgba(52,211,153,.95)",indigo:"rgba(129,140,248,.95)"},h=g[e]??g.teal;return jsxRuntime.jsxs("div",{ref:x=>{m.current=x,typeof c=="function"?c(x):c&&(c.current=x);},onMouseEnter:u,onMouseMove:p,onClick:s,className:l("group relative overflow-hidden rounded-2xl","bg-white border border-gray-200 shadow-sm","dark:bg-transparent dark:bg-gradient-to-b dark:from-white/[0.06] dark:to-white/[0.03]","dark:border-white/[0.10]","dark:shadow-[0_18px_55px_rgba(0,0,0,.55)]","transition-transform duration-300 hover:scale-[1.015]",s&&"cursor-pointer",i),...d,children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(180px at var(--x, 50%) var(--y, 50%), rgba(255,255,255,.16), transparent 60%)"}}),jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(220px_140px_at_18%_18%,rgba(255,255,255,.08),transparent_60%)]"}),jsxRuntime.jsx(Nl,{accent:e}),jsxRuntime.jsxs("div",{className:"relative p-5",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-4",children:[jsxRuntime.jsx(kl,{accent:e,children:t}),r&&jsxRuntime.jsx("div",{className:"text-xs font-bold uppercase tracking-widest text-gray-500 dark:text-white/40",children:r})]}),jsxRuntime.jsxs("div",{className:"mt-4 flex items-end justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate text-2xl font-semibold tracking-tight text-gray-900 dark:text-white",children:o}),a?jsxRuntime.jsx("div",{className:"mt-1 text-sm text-gray-500 dark:text-white/45",children:a}):null]}),n?jsxRuntime.jsx(Tl,{color:h}):null]})]})]})});Cl.displayName="MetricCard";var Ll=classVarianceAuthority.cva("rounded-2xl backdrop-blur-xl transition-all duration-300 bg-white/90 border border-zinc-200/80 shadow-sm text-zinc-900 dark:bg-white/[0.03] dark:border-white/10 dark:shadow-[0_18px_55px_rgba(0,0,0,.45)] dark:text-white",{variants:{variant:{default:"",ghost:"bg-transparent border-transparent shadow-none"}},defaultVariants:{variant:"default"}}),ce=Te__namespace.default.forwardRef(({className:e,variant:t,asChild:r=false,...o},a)=>jsxRuntime.jsx(r?Lt:"div",{ref:a,className:l(Ll({variant:t,className:e})),...o}));ce.displayName="Surface";var El=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(ce,{ref:r,className:e,...t}));El.displayName="Card";var Sl=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex flex-col space-y-1.5 p-6",e),...t}));Sl.displayName="CardHeader";var Dl=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("h3",{ref:r,className:l("text-2xl font-semibold leading-none tracking-tight",e),...t}));Dl.displayName="CardTitle";var Hl=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("p",{ref:r,className:l("text-sm text-gray-500 dark:text-white/50",e),...t}));Hl.displayName="CardDescription";var Il=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:l("p-6 pt-0",e),...t}));Il.displayName="CardContent";var Al=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex items-center p-6 pt-0",e),...t}));Al.displayName="CardFooter";var Ne=Te__namespace.default.forwardRef(({as:e="p",variant:t="default",size:r="base",weight:o="normal",code:a=false,className:n,children:s,...i},d)=>jsxRuntime.jsx(e,{ref:d,className:l("leading-relaxed transition-colors duration-200",a&&"font-mono bg-zinc-100 dark:bg-white/[0.03] px-1.5 py-0.5 rounded text-[0.9em]",{"text-zinc-900 dark:text-white":t==="default","text-zinc-500 dark:text-zinc-400":t==="muted","text-zinc-400 dark:text-zinc-500":t==="subtle","text-lg md:text-xl text-zinc-600 dark:text-zinc-300 font-light":t==="lead","text-rose-600 dark:text-rose-400":t==="error","text-emerald-600 dark:text-emerald-400":t==="success","text-amber-600 dark:text-amber-400":t==="warning","text-sky-600 dark:text-sky-400":t==="info","text-xs":r==="xs","text-sm":r==="sm","text-base":r==="base","text-lg":r==="lg","text-xl":r==="xl","text-2xl":r==="2xl","font-light":o==="light","font-normal":o==="normal","font-medium":o==="medium","font-semibold":o==="semibold","font-bold":o==="bold"},n),...i,children:s}));Ne.displayName="Text";var at=Te__namespace.default.forwardRef(({as:e="h2",weight:t="bold",className:r,children:o,...a},n)=>jsxRuntime.jsx(e,{ref:n,className:l("tracking-tight text-zinc-900 dark:text-white transition-colors duration-200",{"text-4xl md:text-5xl lg:text-6xl":e==="h1","text-3xl md:text-4xl":e==="h2","text-2xl md:text-3xl":e==="h3","text-xl md:text-2xl":e==="h4","text-lg md:text-xl":e==="h5","text-base md:text-lg":e==="h6"},{"font-normal":t==="normal","font-medium":t==="medium","font-semibold":t==="semibold","font-bold":t==="bold","font-extrabold":t==="extrabold","font-black":t==="black"},r),...a,children:o}));at.displayName="Heading";var $l=Te__namespace.default.forwardRef(({from:e="from-blue-500",to:t="to-purple-500",via:r,direction:o="r",animate:a=false,className:n,children:s,...i},d)=>jsxRuntime.jsx("span",{ref:d,className:l("bg-clip-text text-transparent bg-gradient-to-"+o,e,t,r,a&&"animate-gradient bg-[length:200%_auto]",n),...i,children:s}));$l.displayName="TextGradient";var Wl=Te__namespace.default.forwardRef(({shimmerColor:e="rgba(255,255,255,0.3)",duration:t="2s",baseColor:r="currentColor",className:o,children:a,...n},s)=>jsxRuntime.jsx("span",{ref:s,className:l("inline-block bg-clip-text text-transparent animate-shimmer will-change-[background-position]",o),style:{backgroundImage:`linear-gradient(90deg, ${r} 0%, ${r} 40%, ${e} 50%, ${r} 60%, ${r} 100%)`,backgroundSize:"200% 100%",animationDuration:t,animationIterationCount:"infinite",animationTimingFunction:"linear"},...n,children:a}));Wl.displayName="ShinyText";function Xe(e={threshold:.1,rootMargin:"0px",enabled:true}){let t=Te.useRef(null),[r,o]=Te.useState(false),[a,n]=Te.useState(false),{enabled:s=true}=e;return Te.useEffect(()=>{if(!s)return;let i=t.current;if(!i)return;let d=new IntersectionObserver(([c])=>{c&&c.isIntersecting?(o(true),n(true)):o(false);},e);return d.observe(i),()=>{d.disconnect();}},[e.threshold,e.rootMargin,e.root,s]),{ref:t,isInView:r,hasAnimated:a}}function Nn({children:e,direction:t="up",duration:r=.5,delay:o=0,boxColor:a="bg-blue-500",className:n,...s}){let{ref:i,hasAnimated:d}=Xe({threshold:.2}),c={up:"translate-y-full",down:"-translate-y-full",left:"translate-x-full",right:"-translate-x-full"};return jsxRuntime.jsxs("div",{ref:i,className:l("relative overflow-hidden inline-block",n),...s,children:[jsxRuntime.jsx("div",{className:l("transition-all ease-out",d?"translate-x-0 translate-y-0 opacity-100":l("opacity-0",c[t])),style:{transitionDuration:`${r}s`,transitionDelay:`${o}s`},children:e}),jsxRuntime.jsx("div",{className:l("absolute inset-0 z-10 transition-transform ease-in-out",a,d?t==="left"||t==="right"?"scale-x-0":"scale-y-0":"scale-100"),style:{transitionDuration:`${r}s`,transitionDelay:`${o}s`,transformOrigin:t==="up"?"top":t==="down"?"bottom":t==="left"?"left":"right"}})]})}var ql=({title:e,highlight:t,subtitle:r,gradient:o="from-blue-400 via-indigo-500 to-purple-600",animate:a=true,glow:n=true,className:s,...i})=>{let d=jsxRuntime.jsxs("div",{className:l("flex flex-col items-center text-center space-y-6",s),...i,children:[jsxRuntime.jsxs("h1",{className:"text-5xl md:text-7xl font-bold tracking-tight text-white leading-tight",children:[e," ",t&&jsxRuntime.jsxs("span",{className:"relative inline-block",children:[jsxRuntime.jsx("span",{className:l("bg-clip-text text-transparent bg-gradient-to-r",o),children:t}),n&&jsxRuntime.jsx("span",{className:l("absolute inset-0 blur-3xl opacity-40 -z-10 bg-gradient-to-r",o),"aria-hidden":"true",children:t})]})]}),r&&jsxRuntime.jsx("p",{className:"text-lg md:text-xl text-white/50 max-w-2xl mx-auto leading-relaxed",children:r})]});return a?jsxRuntime.jsx(Nn,{direction:"up",duration:1,children:d}):d};ql.displayName="HeroText";var Gl=({text:e,delay:t=.05,className:r,...o})=>{let a=e.split("");return jsxRuntime.jsxs("div",{className:l("flex flex-wrap justify-center overflow-hidden py-2",r),...o,children:[a.map((n,s)=>jsxRuntime.jsx("span",{className:"inline-block animate-pullup opacity-0",style:{animation:"pullup 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards",animationDelay:`${s*t}s`,whiteSpace:n===" "?"pre":"normal"},children:n},s)),jsxRuntime.jsx("style",{children:`
1
+ 'use strict';var Te=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),classVarianceAuthority=require('class-variance-authority'),reactDom=require('react-dom'),lucideReact=require('lucide-react'),socket_ioClient=require('socket.io-client');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var Te__namespace=/*#__PURE__*/_interopNamespace(Te);function l(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var fl=Te__namespace.default.forwardRef(({children:e,className:t,leftIcon:r,rightIcon:o,...a},n)=>jsxRuntime.jsxs("button",{ref:n,type:a.type??"button",className:l("group relative inline-flex items-center justify-center gap-2 rounded-2xl px-5 py-3","bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600","text-white font-semibold tracking-tight","shadow-[0_12px_40px_rgba(99,102,241,.45)]","transition-all duration-300","hover:scale-[1.03] hover:shadow-[0_18px_60px_rgba(99,102,241,.6)]","active:scale-[0.98]","disabled:opacity-50 disabled:cursor-not-allowed","focus:outline-none focus:ring-2 focus:ring-purple-400/40",t),...a,children:[jsxRuntime.jsx("span",{className:"pointer-events-none absolute inset-0 rounded-2xl bg-gradient-to-r from-white/18 via-white/5 to-white/18 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100"}),jsxRuntime.jsxs("span",{className:"relative inline-flex items-center gap-2",children:[r,e,o]})]}));fl.displayName="PrimaryButton";var Pt=Te__namespace.forwardRef(({children:e,...t},r)=>{if(!Te__namespace.isValidElement(e))return null;let o=e;return Te__namespace.cloneElement(o,{...t,...o.props,ref:a=>{typeof r=="function"?r(a):r&&(r.current=a);let{ref:n}=o;typeof n=="function"?n(a):n&&"current"in n&&(n.current=a);},className:l(t.className,o.props.className)})});Pt.displayName="Slot";var xl=classVarianceAuthority.cva("group relative inline-flex items-center justify-center font-semibold tracking-tight transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-purple-400/40 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 disabled:active:scale-100 hover:scale-[1.02] active:scale-[0.98]",{variants:{variant:{primary:"bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 text-white border-transparent",secondary:"bg-zinc-100 text-zinc-900 border border-zinc-200 hover:bg-zinc-200 dark:bg-white/[0.05] dark:text-white dark:border-white/10 dark:hover:bg-white/[0.10] dark:hover:border-white/20",outline:"bg-transparent text-zinc-900 border border-zinc-300 hover:bg-zinc-100 dark:text-white dark:border-white/20 dark:hover:bg-white/[0.05] dark:hover:border-white/30",ghost:"bg-transparent text-zinc-600 hover:text-zinc-900 hover:bg-zinc-100 dark:text-white/80 dark:hover:text-white dark:hover:bg-white/[0.05] border-transparent",danger:"bg-rose-500/10 text-rose-600 border border-rose-500/20 hover:bg-rose-500/20 hover:border-rose-500/30 hover:text-rose-700 dark:text-rose-400 dark:hover:text-rose-300",success:"bg-emerald-500/10 text-emerald-600 border border-emerald-500/20 hover:bg-emerald-500/20 hover:border-emerald-500/30 hover:text-emerald-700 dark:text-emerald-400 dark:hover:text-emerald-300",alert:"bg-amber-500/10 text-amber-600 border border-amber-500/20 hover:bg-amber-500/20 hover:border-amber-500/30 hover:text-amber-700 dark:text-amber-400 dark:hover:text-amber-300"},size:{sm:"h-9 px-3 text-xs gap-1.5",md:"h-11 px-5 text-sm gap-2",lg:"h-14 px-8 text-base gap-3",icon:"h-10 w-10 p-0 flex items-center justify-center"},shape:{default:"rounded-2xl",pill:"rounded-full",square:"rounded-lg"},shadow:{true:"",false:""}},compoundVariants:[{variant:"primary",shadow:true,class:"shadow-[0_12px_40px_rgba(99,102,241,.45)] hover:shadow-[0_18px_60px_rgba(99,102,241,.6)]"},{variant:"secondary",shadow:true,class:"shadow-sm"}],defaultVariants:{variant:"primary",size:"md",shape:"default",shadow:true}}),R=Te__namespace.default.forwardRef(({className:e,variant:t,size:r,shape:o,shadow:a,asChild:n=false,leftIcon:s,rightIcon:i,isLoading:d,children:c,disabled:m,...u},p)=>jsxRuntime.jsxs(n?Pt:"button",{ref:p,disabled:m||d,className:l(xl({variant:t,size:r,shape:o,shadow:a,className:e})),...u,children:[t==="primary"&&!n&&jsxRuntime.jsx("span",{className:"pointer-events-none absolute inset-0 rounded-[inherit] bg-gradient-to-r from-white/18 via-white/5 to-white/18 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100"}),jsxRuntime.jsxs("span",{className:"relative inline-flex items-center justify-center",children:[d&&jsxRuntime.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),!d&&s&&jsxRuntime.jsx("span",{className:l("mr-2",r==="sm"&&"mr-1.5"),children:s}),c,!d&&i&&jsxRuntime.jsx("span",{className:l("ml-2",r==="sm"&&"ml-1.5"),children:i})]})]}));R.displayName="Button";var wl=Te__namespace.default.forwardRef(({children:e,className:t,leftIcon:r,rightIcon:o,...a},n)=>{let s=Te.useRef(null),i=d=>{let c=s.current;if(!c)return;let m=c.getBoundingClientRect(),u=d.clientX-m.left,p=d.clientY-m.top;c.style.setProperty("--mouse-x",`${u}px`),c.style.setProperty("--mouse-y",`${p}px`);};return Te__namespace.default.useImperativeHandle(n,()=>s.current),jsxRuntime.jsxs("button",{ref:s,onMouseMove:i,type:a.type??"button",className:l("group relative inline-flex items-center justify-center gap-2 rounded-2xl px-6 py-3","bg-zinc-100 border border-zinc-200 text-zinc-900","dark:bg-white/[0.03] dark:border-white/10 dark:text-white","font-semibold tracking-tight overflow-hidden","transition-all duration-300","hover:bg-zinc-200 dark:hover:bg-white/[0.05] hover:scale-[1.02]","active:scale-[0.98]","focus:outline-none focus:ring-2 focus:ring-purple-400/40",t),...a,children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute -inset-px opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.4), transparent 40%)"}}),jsxRuntime.jsx("div",{className:"pointer-events-none absolute -inset-px rounded-2xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(300px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.6), transparent 40%)",maskImage:"linear-gradient(#fff, #fff), linear-gradient(#fff, #fff)",maskClip:"content-box, border-box",maskComposite:"exclude",WebkitMaskComposite:"xor",padding:"1px"}}),jsxRuntime.jsxs("span",{className:"relative inline-flex items-center gap-2 z-10",children:[r,e,o]})]})});wl.displayName="GlowButton";function Nl({accent:e="teal",children:t}){let r={teal:"bg-teal-500/90",amber:"bg-amber-400/95",violet:"bg-violet-500/90",blue:"bg-blue-500/90",rose:"bg-rose-500/90",emerald:"bg-emerald-500/90",indigo:"bg-indigo-500/90"};return jsxRuntime.jsx("div",{className:l("flex h-11 w-11 items-center justify-center rounded-2xl",r[e]??r.teal),children:t})}function Tl({accent:e="teal"}){let t={teal:"from-teal-400/25 via-teal-400/10 to-transparent",amber:"from-amber-300/25 via-amber-300/10 to-transparent",violet:"from-violet-400/25 via-violet-400/10 to-transparent",blue:"from-blue-400/25 via-blue-400/10 to-transparent",rose:"from-rose-400/25 via-rose-400/10 to-transparent",emerald:"from-emerald-400/25 via-emerald-400/10 to-transparent",indigo:"from-indigo-400/25 via-indigo-400/10 to-transparent"};return jsxRuntime.jsx("div",{className:l("pointer-events-none absolute -right-12 top-1/2 h-40 w-48 -translate-y-1/2 rotate-12","bg-gradient-to-l blur-2xl",t[e]??t.teal)})}function Cl({color:e="currentColor"}){return jsxRuntime.jsx("svg",{viewBox:"0 0 120 40",className:"h-6 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M2 22c10 0 10-10 20-10s10 10 20 10 10-10 20-10 10 10 20 10 10-10 20-10",stroke:e,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.95"})})}var Ml=Te__namespace.default.forwardRef(({accent:e="teal",icon:t,title:r,value:o,subtext:a,showWave:n=false,onClick:s,className:i,...d},c)=>{let m=Te.useRef(null),u=()=>{let x=m.current;if(!x)return;let b=x.getBoundingClientRect();x.style.setProperty("--x",`${Math.round(b.width/2)}px`),x.style.setProperty("--y",`${Math.round(b.height/2)}px`);},p=x=>{let b=m.current;if(!b)return;let f=b.getBoundingClientRect();b.style.setProperty("--x",`${x.clientX-f.left}px`),b.style.setProperty("--y",`${x.clientY-f.top}px`);},g={teal:"rgba(45,212,191,.95)",amber:"rgba(251,191,36,.95)",violet:"rgba(167,139,250,.95)",blue:"rgba(96,165,250,.95)",rose:"rgba(251,113,133,.95)",emerald:"rgba(52,211,153,.95)",indigo:"rgba(129,140,248,.95)"},h=g[e]??g.teal;return jsxRuntime.jsxs("div",{ref:x=>{m.current=x,typeof c=="function"?c(x):c&&(c.current=x);},onMouseEnter:u,onMouseMove:p,onClick:s,className:l("group relative overflow-hidden rounded-2xl","bg-white border border-gray-200 shadow-sm","dark:bg-transparent dark:bg-gradient-to-b dark:from-white/[0.06] dark:to-white/[0.03]","dark:border-white/[0.10]","dark:shadow-[0_18px_55px_rgba(0,0,0,.55)]","transition-transform duration-300 hover:scale-[1.015]",s&&"cursor-pointer",i),...d,children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(180px at var(--x, 50%) var(--y, 50%), rgba(255,255,255,.16), transparent 60%)"}}),jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(220px_140px_at_18%_18%,rgba(255,255,255,.08),transparent_60%)]"}),jsxRuntime.jsx(Tl,{accent:e}),jsxRuntime.jsxs("div",{className:"relative p-5",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-4",children:[jsxRuntime.jsx(Nl,{accent:e,children:t}),r&&jsxRuntime.jsx("div",{className:"text-xs font-bold uppercase tracking-widest text-gray-500 dark:text-white/40",children:r})]}),jsxRuntime.jsxs("div",{className:"mt-4 flex items-end justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate text-2xl font-semibold tracking-tight text-gray-900 dark:text-white",children:o}),a?jsxRuntime.jsx("div",{className:"mt-1 text-sm text-gray-500 dark:text-white/45",children:a}):null]}),n?jsxRuntime.jsx(Cl,{color:h}):null]})]})]})});Ml.displayName="MetricCard";var Pl=classVarianceAuthority.cva("rounded-2xl backdrop-blur-xl transition-all duration-300 bg-white/90 border border-zinc-200/80 shadow-sm text-zinc-900 dark:bg-white/[0.03] dark:border-white/10 dark:shadow-[0_18px_55px_rgba(0,0,0,.45)] dark:text-white",{variants:{variant:{default:"",ghost:"bg-transparent border-transparent shadow-none"}},defaultVariants:{variant:"default"}}),ce=Te__namespace.default.forwardRef(({className:e,variant:t,asChild:r=false,...o},a)=>jsxRuntime.jsx(r?Pt:"div",{ref:a,className:l(Pl({variant:t,className:e})),...o}));ce.displayName="Surface";var Sl=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(ce,{ref:r,className:e,...t}));Sl.displayName="Card";var Dl=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex flex-col space-y-1.5 p-6",e),...t}));Dl.displayName="CardHeader";var Hl=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("h3",{ref:r,className:l("text-2xl font-semibold leading-none tracking-tight",e),...t}));Hl.displayName="CardTitle";var Il=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("p",{ref:r,className:l("text-sm text-gray-500 dark:text-white/50",e),...t}));Il.displayName="CardDescription";var Al=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:l("p-6 pt-0",e),...t}));Al.displayName="CardContent";var Bl=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex items-center p-6 pt-0",e),...t}));Bl.displayName="CardFooter";var Ne=Te__namespace.default.forwardRef(({as:e="p",variant:t="default",size:r="base",weight:o="normal",code:a=false,className:n,children:s,...i},d)=>jsxRuntime.jsx(e,{ref:d,className:l("leading-relaxed transition-colors duration-200",a&&"font-mono bg-zinc-100 dark:bg-white/[0.03] px-1.5 py-0.5 rounded text-[0.9em]",{"text-zinc-900 dark:text-white":t==="default","text-zinc-500 dark:text-zinc-400":t==="muted","text-zinc-400 dark:text-zinc-500":t==="subtle","text-lg md:text-xl text-zinc-600 dark:text-zinc-300 font-light":t==="lead","text-rose-600 dark:text-rose-400":t==="error","text-emerald-600 dark:text-emerald-400":t==="success","text-amber-600 dark:text-amber-400":t==="warning","text-sky-600 dark:text-sky-400":t==="info","text-xs":r==="xs","text-sm":r==="sm","text-base":r==="base","text-lg":r==="lg","text-xl":r==="xl","text-2xl":r==="2xl","font-light":o==="light","font-normal":o==="normal","font-medium":o==="medium","font-semibold":o==="semibold","font-bold":o==="bold"},n),...i,children:s}));Ne.displayName="Text";var nt=Te__namespace.default.forwardRef(({as:e="h2",weight:t="bold",className:r,children:o,...a},n)=>jsxRuntime.jsx(e,{ref:n,className:l("tracking-tight text-zinc-900 dark:text-white transition-colors duration-200",{"text-4xl md:text-5xl lg:text-6xl":e==="h1","text-3xl md:text-4xl":e==="h2","text-2xl md:text-3xl":e==="h3","text-xl md:text-2xl":e==="h4","text-lg md:text-xl":e==="h5","text-base md:text-lg":e==="h6"},{"font-normal":t==="normal","font-medium":t==="medium","font-semibold":t==="semibold","font-bold":t==="bold","font-extrabold":t==="extrabold","font-black":t==="black"},r),...a,children:o}));nt.displayName="Heading";var Fl=Te__namespace.default.forwardRef(({from:e="from-blue-500",to:t="to-purple-500",via:r,direction:o="r",animate:a=false,className:n,children:s,...i},d)=>jsxRuntime.jsx("span",{ref:d,className:l("bg-clip-text text-transparent bg-gradient-to-"+o,e,t,r,a&&"animate-gradient bg-[length:200%_auto]",n),...i,children:s}));Fl.displayName="TextGradient";var _l=Te__namespace.default.forwardRef(({shimmerColor:e="rgba(255,255,255,0.3)",duration:t="2s",baseColor:r="currentColor",className:o,children:a,...n},s)=>jsxRuntime.jsx("span",{ref:s,className:l("inline-block bg-clip-text text-transparent animate-shimmer will-change-[background-position]",o),style:{backgroundImage:`linear-gradient(90deg, ${r} 0%, ${r} 40%, ${e} 50%, ${r} 60%, ${r} 100%)`,backgroundSize:"200% 100%",animationDuration:t,animationIterationCount:"infinite",animationTimingFunction:"linear"},...n,children:a}));_l.displayName="ShinyText";function je(e={threshold:.1,rootMargin:"0px",enabled:true}){let t=Te.useRef(null),[r,o]=Te.useState(false),[a,n]=Te.useState(false),{enabled:s=true}=e;return Te.useEffect(()=>{if(!s)return;let i=t.current;if(!i)return;let d=new IntersectionObserver(([c])=>{c&&c.isIntersecting?(o(true),n(true)):o(false);},e);return d.observe(i),()=>{d.disconnect();}},[e.threshold,e.rootMargin,e.root,s]),{ref:t,isInView:r,hasAnimated:a}}function Mn({children:e,direction:t="up",duration:r=.5,delay:o=0,boxColor:a="bg-blue-500",className:n,...s}){let{ref:i,hasAnimated:d}=je({threshold:.2}),c={up:"translate-y-full",down:"-translate-y-full",left:"translate-x-full",right:"-translate-x-full"};return jsxRuntime.jsxs("div",{ref:i,className:l("relative overflow-hidden inline-block",n),...s,children:[jsxRuntime.jsx("div",{className:l("transition-all ease-out",d?"translate-x-0 translate-y-0 opacity-100":l("opacity-0",c[t])),style:{transitionDuration:`${r}s`,transitionDelay:`${o}s`},children:e}),jsxRuntime.jsx("div",{className:l("absolute inset-0 z-10 transition-transform ease-in-out",a,d?t==="left"||t==="right"?"scale-x-0":"scale-y-0":"scale-100"),style:{transitionDuration:`${r}s`,transitionDelay:`${o}s`,transformOrigin:t==="up"?"top":t==="down"?"bottom":t==="left"?"left":"right"}})]})}var Gl=({title:e,highlight:t,subtitle:r,gradient:o="from-blue-400 via-indigo-500 to-purple-600",animate:a=true,glow:n=true,className:s,...i})=>{let d=jsxRuntime.jsxs("div",{className:l("flex flex-col items-center text-center space-y-6",s),...i,children:[jsxRuntime.jsxs("h1",{className:"text-5xl md:text-7xl font-bold tracking-tight text-white leading-tight",children:[e," ",t&&jsxRuntime.jsxs("span",{className:"relative inline-block",children:[jsxRuntime.jsx("span",{className:l("bg-clip-text text-transparent bg-gradient-to-r",o),children:t}),n&&jsxRuntime.jsx("span",{className:l("absolute inset-0 blur-3xl opacity-40 -z-10 bg-gradient-to-r",o),"aria-hidden":"true",children:t})]})]}),r&&jsxRuntime.jsx("p",{className:"text-lg md:text-xl text-white/50 max-w-2xl mx-auto leading-relaxed",children:r})]});return a?jsxRuntime.jsx(Mn,{direction:"up",duration:1,children:d}):d};Gl.displayName="HeroText";var Jl=({text:e,delay:t=.05,className:r,...o})=>{let a=e.split("");return jsxRuntime.jsxs("div",{className:l("flex flex-wrap justify-center overflow-hidden py-2",r),...o,children:[a.map((n,s)=>jsxRuntime.jsx("span",{className:"inline-block animate-pullup opacity-0",style:{animation:"pullup 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards",animationDelay:`${s*t}s`,whiteSpace:n===" "?"pre":"normal"},children:n},s)),jsxRuntime.jsx("style",{children:`
2
2
  @keyframes pullup {
3
3
  from {
4
4
  opacity: 0;
@@ -9,7 +9,7 @@
9
9
  transform: translateY(0);
10
10
  }
11
11
  }
12
- `})]})};Gl.displayName="LetterPullup";var X=Te__namespace.default.forwardRef(({className:e,children:t,required:r,...o},a)=>jsxRuntime.jsxs("label",{ref:a,className:l("text-sm font-medium leading-none text-gray-700 dark:text-white/80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...o,children:[t,r&&jsxRuntime.jsx("span",{className:"ml-1 text-rose-500",children:"*"})]}));X.displayName="Label";var rc=classVarianceAuthority.cva("w-full rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3 border border-gray-200 dark:border-white/[0.10] text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-white/30 focus:outline-none focus:ring-2 focus:ring-purple-400/30 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200",{variants:{hasError:{true:"border-rose-400/25 focus:ring-rose-300/25",false:""},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""}},defaultVariants:{hasError:false,hasLeftIcon:false,hasRightIcon:false}}),Pt=Te__namespace.default.forwardRef(({className:e,containerClassName:t,label:r,error:o,leftIcon:a,rightIcon:n,id:s,...i},d)=>{let c=s||Te__namespace.default.useId(),m=!!o;return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",t),children:[r&&jsxRuntime.jsx(X,{htmlFor:c,required:i.required,children:r}),jsxRuntime.jsxs("div",{className:"relative flex items-center",children:[a&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 dark:text-white/35",children:a}),jsxRuntime.jsx("input",{ref:d,id:c,className:l(rc({hasError:m,hasLeftIcon:!!a,hasRightIcon:!!n,className:e})),...i}),n&&jsxRuntime.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:n})]}),o&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:o})]})});Pt.displayName="TextInput";var Yo=Te__namespace.default.forwardRef(({className:e,label:t,error:r,id:o,disabled:a,checked:n,defaultChecked:s,onChange:i,...d},c)=>{let m=o||Te__namespace.default.useId(),[u,p]=Te__namespace.default.useState(s||n||false);Te__namespace.default.useEffect(()=>{n!==void 0&&p(n);},[n]);let g=()=>{if(a)return;let h=!u;p(h),i&&i({target:{checked:h}});};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",e),children:[jsxRuntime.jsxs("button",{ref:c,type:"button",id:m,role:"checkbox","aria-checked":u,"aria-label":t,onClick:g,disabled:a,className:l("flex items-center gap-3 rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-3","hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",a&&"opacity-50 cursor-not-allowed"),...d,children:[jsxRuntime.jsx("span",{"aria-hidden":"true",className:l("grid h-6 w-6 place-items-center rounded-lg border",u?"border-emerald-400/30 bg-emerald-400/15":"border-gray-300 dark:border-white/10 bg-white dark:bg-white/[0.02]"),children:u?jsxRuntime.jsx("svg",{className:"h-4 w-4 text-emerald-200",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):null}),t&&jsxRuntime.jsx("span",{className:"text-sm text-gray-700 dark:text-white/70",children:t})]}),r&&jsxRuntime.jsx("p",{className:"text-xs text-rose-500 mt-1 ml-1",children:r})]})});Yo.displayName="Checkbox";var Xo=Te__namespace.default.forwardRef(({className:e,label:t,error:r,id:o,disabled:a,checked:n,defaultChecked:s,onChange:i,...d},c)=>{let m=o||Te__namespace.default.useId(),[u,p]=Te__namespace.default.useState(s||n||false);Te__namespace.default.useEffect(()=>{n!==void 0&&p(n);},[n]);let g=()=>{if(a)return;let h=!u;p(h),i&&i({target:{checked:h}});};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",e),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("button",{type:"button",id:m,role:"switch","aria-checked":u,onClick:g,disabled:a,className:l("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 dark:focus-visible:ring-offset-black disabled:cursor-not-allowed disabled:opacity-50",u?"bg-emerald-500":"bg-gray-200 dark:bg-white/[0.06]"),...d,children:jsxRuntime.jsx("span",{className:l("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform",u?"translate-x-5":"translate-x-0")})}),t&&jsxRuntime.jsx(X,{htmlFor:m,className:"cursor-pointer select-none text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",onClick:g,children:t})]}),r&&jsxRuntime.jsx("p",{className:"text-xs text-rose-500 mt-1 ml-1",children:r})]})});Xo.displayName="Switch";var to=Te__namespace.default.forwardRef(({label:e,name:t,options:r,value:o,defaultValue:a,onChange:n,placeholder:s="Select an option",error:i,disabled:d,className:c},m)=>{let[u,p]=Te.useState(false),[g,h]=Te.useState(a),[x,b]=Te.useState(-1),f=Te.useRef(null),w=Te__namespace.default.useId(),v=o!==void 0,y=v?o:g,k=r.find(T=>T.value===y);Te.useEffect(()=>{if(u){let T=r.findIndex(E=>E.value===y);b(T!==-1?T:0);}else b(-1);},[u,y,r]),Te.useEffect(()=>{let T=E=>{f.current&&!f.current.contains(E.target)&&p(false);};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);let N=T=>{d||(v||h(T),n?.(T),p(false));},C=T=>{d||(T.key==="Enter"||T.key===" "?(T.preventDefault(),u&&x!==-1?N(r[x].value):p(true)):T.key==="Escape"?p(false):T.key==="ArrowDown"?(T.preventDefault(),u?b(E=>(E+1)%r.length):p(true)):T.key==="ArrowUp"?(T.preventDefault(),u?b(E=>(E-1+r.length)%r.length):p(true)):T.key==="Home"?(T.preventDefault(),u&&b(0)):T.key==="End"&&(T.preventDefault(),u&&b(r.length-1)));};return jsxRuntime.jsxs("div",{ref:f,className:l("flex flex-col gap-1.5 relative",c),children:[e&&jsxRuntime.jsx(X,{htmlFor:w,className:l(d&&"opacity-50 cursor-not-allowed"),children:e}),jsxRuntime.jsxs("div",{ref:m,id:w,role:"combobox","aria-expanded":u,"aria-haspopup":"listbox","aria-controls":`${w}-listbox`,"aria-disabled":d,tabIndex:d?-1:0,onClick:()=>!d&&p(!u),onKeyDown:C,className:l("w-full appearance-none rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3","border border-gray-200 dark:border-white/[0.10]","text-gray-900 dark:text-white flex items-center","focus:outline-none focus:ring-2 focus:ring-purple-400/30","hover:bg-gray-100 dark:hover:bg-white/[0.05] cursor-pointer",d&&"cursor-not-allowed opacity-50 hover:bg-gray-50 dark:hover:bg-white/[0.04]",u&&"border-gray-300 dark:border-white/20 ring-2 ring-purple-400/20",i&&"border-rose-400/25 focus:ring-rose-300/25"),children:[jsxRuntime.jsx("span",{className:l("block truncate",!k&&"text-gray-400 dark:text-white/20"),children:k?k.label:s}),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:l("absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 dark:text-white/40 transition-transform duration-200",u&&"rotate-180"),children:jsxRuntime.jsx("path",{d:"m6 9 6 6 6-6"})})]}),u&&jsxRuntime.jsx("div",{className:"absolute top-full left-0 z-[110] mt-1 w-full overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A] p-1 shadow-xl animate-in fade-in zoom-in-95 duration-100",children:jsxRuntime.jsx("ul",{id:`${w}-listbox`,role:"listbox","aria-activedescendant":x!==-1?`${w}-option-${x}`:void 0,className:"max-h-60 overflow-auto p-1 flex flex-col gap-2",children:r.map((T,E)=>jsxRuntime.jsx("li",{id:`${w}-option-${E}`,role:"option","aria-selected":y===T.value,onClick:()=>N(T.value),onMouseEnter:()=>b(E),className:l("w-full rounded-2xl px-3 py-2 text-left text-sm transition-colors cursor-pointer","hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white",y===T.value||x===E?"bg-gray-100 dark:bg-white/[0.06] text-gray-900 dark:text-white/90":"text-gray-700 dark:text-white/80"),children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsx("span",{className:"flex-1 truncate",children:T.label}),y===T.value&&jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})})]})},T.value))})}),i&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:i}),jsxRuntime.jsx("input",{type:"hidden",name:t,value:y||""})]})});to.displayName="Select";function qt(e,t,r={}){let{side:o="bottom",align:a="center",sideOffset:n=4,alignOffset:s=0,isOpen:i=false}=r,[d,c]=Te.useState({top:0,left:0}),[m,u]=Te.useState(false),p=Te.useCallback(()=>{if(!e.current||!t.current||!i)return;let g=e.current.getBoundingClientRect(),h=t.current.getBoundingClientRect(),x=0,b=0;switch(o){case "top":x=g.top-h.height-n;break;case "bottom":x=g.bottom+n;break;case "left":b=g.left-h.width-n;break;case "right":b=g.right+n;break}if(o==="top"||o==="bottom")switch(a){case "start":b=g.left+s;break;case "center":b=g.left+g.width/2-h.width/2+s;break;case "end":b=g.right-h.width+s;break}else switch(a){case "start":x=g.top+s;break;case "center":x=g.top+g.height/2-h.height/2+s;break;case "end":x=g.bottom-h.height+s;break}let f=8,w=window.innerWidth,v=window.innerHeight;b<f&&(b=f),b+h.width>w-f&&(b=w-h.width-f),x<f&&(x=f),x+h.height>v-f&&(x=v-h.height-f),c({top:x,left:b}),u(true);},[e,t,o,a,n,s,i]);return Te.useLayoutEffect(()=>{if(!i){m&&u(false);return}p();let g=new ResizeObserver(()=>p());return e.current&&g.observe(e.current),t.current&&g.observe(t.current),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{g.disconnect(),window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[i,p,e,t]),{position:d,isPositioned:m,updatePosition:p}}var Go=Te.createContext(void 0);function nt({children:e,open:t,onOpenChange:r}){let[o,a]=Te.useState(false),n=Te.useRef(null),s=t!==void 0,i=s?t:o,d=c=>{s||a(c),r?.(c);};return jsxRuntime.jsx(Go.Provider,{value:{isOpen:i,setIsOpen:d,triggerRef:n},children:jsxRuntime.jsx("div",{className:"relative inline-block",children:e})})}function st({className:e,children:t,...r}){let o=Te.useContext(Go);if(!o)throw new Error("PopoverTrigger must be used within Popover");let a=n=>{o.setIsOpen(!o.isOpen),r.onClick?.(n);};return jsxRuntime.jsx("button",{ref:o.triggerRef,type:"button","aria-haspopup":"dialog","aria-expanded":o.isOpen?"true":"false",onClick:a,className:l("inline-flex items-center justify-center",e),...r,children:t})}function it({className:e,children:t,align:r="center",sideOffset:o=4,...a}){let n=Te.useContext(Go);if(!n)throw new Error("PopoverContent must be used within Popover");let s=Te.useRef(null),{position:i,isPositioned:d}=qt(n.triggerRef,s,{side:"bottom",align:r,sideOffset:o,isOpen:n.isOpen});if(Te.useEffect(()=>{if(n.isOpen){let m=u=>{s.current&&!s.current.contains(u.target)&&n.triggerRef.current&&!n.triggerRef.current.contains(u.target)&&n.setIsOpen(false);};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m);}}},[n.isOpen,n.setIsOpen,n.triggerRef]),!n.isOpen)return null;let c=()=>{let m=i.top>(n.triggerRef.current?.getBoundingClientRect().top||0)?"bottom":"top";return m==="bottom"?r==="start"?"top left":r==="end"?"top right":"top center":m==="top"?r==="start"?"bottom left":r==="end"?"bottom right":"bottom center":"center center"};return reactDom.createPortal(jsxRuntime.jsx("div",{ref:s,style:{top:i.top,left:i.left,transformOrigin:c()},className:l("fixed z-[110] min-w-[12rem] rounded-2xl border border-gray-200 dark:border-white/10 bg-white/80 dark:bg-white/[0.03] backdrop-blur-xl p-4 shadow-xl outline-none duration-200",d?"animate-in fade-in zoom-in-95 opacity-100":"opacity-0",e),...a,children:t}),document.body)}var Tr=Te.createContext(void 0);function Jo({children:e,value:t,defaultValue:r="",onValueChange:o,filter:a=(s,i)=>s.toLowerCase().includes(i.toLowerCase()),usePopover:n=true}){let[s,i]=Te.useState(r),[d,c]=Te.useState(""),[m,u]=Te.useState(false),[p,g]=Te.useState(new Map),[h,x]=Te.useState(-1),b=t!==void 0,f=b?t:s,w=N=>{b||i(N),o?.(N),u(false),c("");},v=Te__namespace.default.useCallback((N,C,T)=>(g(E=>{let B=new Map(E);return B.set(N,{text:C,value:T}),B}),()=>{g(E=>{let B=new Map(E);return B.delete(N),B});}),[]),y=Te.useMemo(()=>Array.from(p.entries()).filter(([N,C])=>a(C.text,d)).map(([N,C])=>({id:N,value:C.value})),[p,d,a]),k=y.length>0;return Te.useEffect(()=>{x(m?0:-1);},[m]),jsxRuntime.jsx(Tr.Provider,{value:{value:f,onValueChange:w,searchTerm:d,setSearchTerm:c,isOpen:m,setIsOpen:u,registerItem:v,isItemVisible:(N,C)=>a(C,d),hasVisibleItems:k,activeIndex:h,setActiveIndex:x,visibleItems:y},children:n?jsxRuntime.jsx(nt,{open:m,onOpenChange:u,children:e}):e})}function Zv({className:e,children:t,...r}){let o=Te.useContext(Tr);return jsxRuntime.jsxs(st,{role:"combobox","aria-expanded":o?.isOpen,"aria-haspopup":"listbox",className:l("flex h-10 w-full items-center justify-between rounded-2xl border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-900 placeholder:text-gray-500 focus:border-purple-500 focus:outline-none focus:ring-2 focus:ring-purple-500/20 disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:bg-white/[0.03] dark:text-white dark:placeholder:text-white/40 dark:focus:border-white/20 dark:focus:ring-white/10",e),...r,children:[t,jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-2 opacity-50",children:jsxRuntime.jsx("path",{d:"m6 9 6 6 6-6"})})]})}function ew({className:e,children:t,...r}){return jsxRuntime.jsx(it,{className:l("p-0 w-[200px]",e),align:"start",...r,children:t})}function Bn({className:e,placeholder:t="Search...",...r}){let o=Te.useContext(Tr);if(!o)throw new Error("ComboboxInput must be used within Combobox");let a=n=>{n.key==="ArrowDown"?(n.preventDefault(),o.setActiveIndex(s=>(s+1)%o.visibleItems.length)):n.key==="ArrowUp"?(n.preventDefault(),o.setActiveIndex(s=>(s-1+o.visibleItems.length)%o.visibleItems.length)):n.key==="Enter"?(n.preventDefault(),o.activeIndex!==-1&&o.visibleItems[o.activeIndex]&&o.onValueChange(o.visibleItems[o.activeIndex].value)):n.key==="Escape"&&o.setIsOpen(false),r.onKeyDown?.(n);};return jsxRuntime.jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-white/10 px-3",children:[jsxRuntime.jsxs("svg",{className:"mr-2 h-4 w-4 shrink-0 opacity-50",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("circle",{cx:"11",cy:"11",r:"8"}),jsxRuntime.jsx("path",{d:"m21 21-4.3-4.3"})]}),jsxRuntime.jsx("input",{className:l("flex h-10 w-full rounded-md bg-transparent py-3 text-sm text-gray-900 dark:text-white outline-none placeholder:text-gray-400 dark:placeholder:text-white/40 disabled:cursor-not-allowed disabled:opacity-50",e),placeholder:t,value:o.searchTerm,onChange:n=>o.setSearchTerm(n.target.value),onKeyDown:a,"aria-autocomplete":"list","aria-activedescendant":o.activeIndex!==-1?o.visibleItems[o.activeIndex]?.id:void 0,...r})]})}function Vn({className:e,children:t,...r}){return jsxRuntime.jsx("div",{role:"listbox",className:l("max-h-[300px] overflow-y-auto overflow-x-hidden p-1",e),...r,children:t})}function On({className:e,children:t,...r}){let o=Te.useContext(Tr);if(!o)throw new Error("ComboboxEmpty must be used within Combobox");return o.hasVisibleItems?null:jsxRuntime.jsx("div",{className:l("py-6 text-center text-sm text-gray-500 dark:text-white/40",e),...r,children:t})}function zn({className:e,value:t,children:r,textValue:o,...a}){let n=Te.useContext(Tr);if(!n)throw new Error("ComboboxItem must be used within Combobox");let s=Te__namespace.default.useId(),i=o||(typeof r=="string"?r:t),d=n.isItemVisible(s,i),c=n.value===t,m=n.visibleItems.findIndex(p=>p.id===s),u=n.activeIndex===m;return Te.useEffect(()=>n.registerItem(s,i,t),[s,i,t,n.registerItem]),d?jsxRuntime.jsxs("div",{id:s,role:"option","aria-selected":c,onClick:()=>n.onValueChange(t),onMouseEnter:()=>n.setActiveIndex(m),className:l("relative flex cursor-default select-none items-center rounded-2xl px-3 py-2 text-sm outline-none transition-colors","text-gray-700 dark:text-white/80","aria-selected:bg-gray-100 aria-selected:text-gray-900 dark:aria-selected:bg-white/[0.06] dark:aria-selected:text-white","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.06] dark:hover:text-white",(c||u)&&"bg-gray-100 text-gray-900 dark:bg-white/[0.06] dark:text-white",e),...a,children:[jsxRuntime.jsx("svg",{className:l("mr-2 h-4 w-4",c?"opacity-100":"opacity-0"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})}),r]}):null}var sw=Te__namespace.default.forwardRef(({className:e,value:t,defaultValue:r=0,min:o=0,max:a=100,step:n=1,onChange:s,disabled:i,...d},c)=>{let[m,u]=Te.useState(r),p=t!==void 0,g=p?t:m,h=Te.useRef(null),x=(g-o)/(a-o)*100,b=Te.useCallback(y=>{if(i||!h.current)return;let k=h.current.getBoundingClientRect(),N=k.width,C=k.left,T=(y-C)/N*(a-o)+o;T=Math.min(Math.max(T,o),a);let E=Math.round((T-o)/n);T=o+E*n,T=Number(T.toFixed(10)),p||u(T),s?.(T);},[i,p,a,o,s,n]),f=y=>{if(i)return;b(y.clientX);let k=C=>{b(C.clientX);},N=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",N);};document.addEventListener("mousemove",k),document.addEventListener("mouseup",N);},w=y=>{if(i)return;let k=y.touches[0];k&&b(k.clientX);let N=T=>{let E=T.touches[0];E&&b(E.clientX);},C=()=>{document.removeEventListener("touchmove",N),document.removeEventListener("touchend",C);};document.addEventListener("touchmove",N,{passive:false}),document.addEventListener("touchend",C);};return jsxRuntime.jsxs("div",{ref:c,role:"slider","aria-valuemin":o,"aria-valuemax":a,"aria-valuenow":g,"aria-disabled":i,tabIndex:i?-1:0,onKeyDown:y=>{if(i)return;let k=g;if(y.key==="ArrowRight"||y.key==="ArrowUp")k=Math.min(g+n,a);else if(y.key==="ArrowLeft"||y.key==="ArrowDown")k=Math.max(g-n,o);else if(y.key==="Home")k=o;else if(y.key==="End")k=a;else return;y.preventDefault(),k!==g&&(p||u(k),s?.(k));},className:l("relative flex w-full touch-none select-none items-center py-4 group",i&&"opacity-50 cursor-not-allowed",e),onMouseDown:f,onTouchStart:w,...d,children:[jsxRuntime.jsx("div",{ref:h,className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.06] backdrop-blur-sm border border-gray-200 dark:border-white/5",children:jsxRuntime.jsx("div",{className:"absolute h-full bg-gray-900 dark:bg-white transition-none dark:shadow-[0_0_10px_rgba(255,255,255,0.5)]",style:{width:`${x}%`}})}),jsxRuntime.jsx("div",{className:"absolute h-5 w-5 rounded-full border-2 border-gray-900 dark:border-white bg-white dark:bg-black shadow-md dark:shadow-[0_0_15px_rgba(255,255,255,0.5)] transition-transform hover:scale-110 focus:scale-110",style:{left:`calc(${x}% - 10px)`}})]})});var vc=["Su","Mo","Tu","We","Th","Fr","Sa"],wc=["January","February","March","April","May","June","July","August","September","October","November","December"];function so({className:e,value:t,onChange:r,minDate:o,maxDate:a}){let[n,s]=Te.useState(t||new Date),[i,d]=Te.useState(t||new Date),c=(f,w)=>new Date(f,w+1,0).getDate(),m=(f,w)=>new Date(f,w,1).getDay(),u=()=>{d(new Date(i.getFullYear(),i.getMonth()-1,1));},p=()=>{d(new Date(i.getFullYear(),i.getMonth()+1,1));},g=f=>{let w=new Date(i.getFullYear(),i.getMonth(),f);r&&r(w),s(w);},h=f=>t&&t.getDate()===f&&t.getMonth()===i.getMonth()&&t.getFullYear()===i.getFullYear(),x=f=>{let w=new Date;return w.getDate()===f&&w.getMonth()===i.getMonth()&&w.getFullYear()===i.getFullYear()},b=()=>{let f=c(i.getFullYear(),i.getMonth()),w=m(i.getFullYear(),i.getMonth()),v=[];for(let y=0;y<w;y++)v.push(jsxRuntime.jsx("div",{className:"h-9 w-9"},`empty-${y}`));for(let y=1;y<=f;y++){let k=h(y),N=x(y);v.push(jsxRuntime.jsx("button",{onClick:()=>g(y),type:"button",className:l("h-9 w-9 rounded-2xl text-sm font-medium transition-all duration-200","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20",k&&"bg-gray-900 text-white dark:bg-white dark:text-black shadow-md dark:shadow-[0_0_15px_rgba(255,255,255,0.3)] hover:bg-gray-800 dark:hover:bg-white/90",!k&&N&&"bg-gray-100 dark:bg-white/[0.03] text-gray-900 dark:text-white border border-gray-200 dark:border-white/10",!k&&!N&&"text-gray-700 dark:text-white/70 hover:text-gray-900 dark:hover:text-white"),children:y},y));}return v};return jsxRuntime.jsxs("div",{className:l("p-4 bg-white dark:bg-black/40 backdrop-blur-xl border border-gray-200 dark:border-white/10 rounded-2xl w-fit",e),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[jsxRuntime.jsxs("div",{className:"font-semibold text-gray-900 dark:text-white",children:[wc[i.getMonth()]," ",jsxRuntime.jsx("span",{className:"text-gray-500 dark:text-white/50",children:i.getFullYear()})]}),jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx("button",{onClick:u,type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/70 hover:text-gray-900 dark:hover:text-white transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{onClick:p,type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/70 hover:text-gray-900 dark:hover:text-white transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2 text-center",children:vc.map(f=>jsxRuntime.jsx("div",{className:"h-9 w-9 flex items-center justify-center text-xs font-medium text-gray-400 dark:text-white/40",children:f},f))}),jsxRuntime.jsx("div",{className:"grid grid-cols-7 gap-1",children:b()})]})}function yw({value:e,onChange:t,placeholder:r="Pick a date",className:o}){let[a,n]=Te.useState(e),[s,i]=Te.useState(false),d=u=>{n(u),t?.(u),i(false);},c=u=>u.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});return jsxRuntime.jsxs(nt,{open:s,onOpenChange:i,children:[jsxRuntime.jsxs(st,{onMouseMove:u=>{let p=u.currentTarget.getBoundingClientRect(),g=u.clientX-p.left,h=u.clientY-p.top;u.currentTarget.style.setProperty("--x",`${g}px`),u.currentTarget.style.setProperty("--y",`${h}px`);},className:l("group relative flex h-11 w-full items-center justify-between rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-2 text-sm text-gray-900 dark:text-white transition-all duration-200 overflow-hidden","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/15",!a&&"text-gray-400 dark:text-white/40",o),children:[jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--x) var(--y), rgba(255,255,255,0.06), transparent 40%)"}}),jsxRuntime.jsx("span",{className:"relative z-10",children:a?c(a):r}),jsxRuntime.jsx(lucideReact.Calendar,{className:"relative z-10 h-4 w-4 text-white/40"})]}),jsxRuntime.jsx(it,{className:"w-auto p-0 border-none bg-transparent shadow-none",align:"start",children:jsxRuntime.jsx(so,{value:a,onChange:d,className:"shadow-2xl shadow-black/50"})})]})}var pt=Te__namespace.default.forwardRef(({className:e,children:t,orientation:r="vertical",scrollbarSize:o="sm",...a},n)=>jsxRuntime.jsx("div",{ref:n,className:l("overflow-auto","[&::-webkit-scrollbar]:bg-transparent","[&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-thumb]:bg-white/[0.06]","[&::-webkit-scrollbar-thumb]:rounded-full","hover:[&::-webkit-scrollbar-thumb]:bg-gray-400 dark:hover:[&::-webkit-scrollbar-thumb]:bg-white/20","[&::-webkit-scrollbar-track]:bg-transparent","[scrollbar-width:thin] [scrollbar-color:rgba(0,0,0,0.2)_transparent] dark:[scrollbar-color:rgba(255,255,255,0.1)_transparent]",r==="vertical"&&"overflow-y-auto overflow-x-hidden",r==="horizontal"&&"overflow-x-auto overflow-y-hidden",r==="both"&&"overflow-auto",o==="sm"&&"[&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar]:h-1.5",o==="md"&&"[&::-webkit-scrollbar]:w-2.5 [&::-webkit-scrollbar]:h-2.5",o==="lg"&&"[&::-webkit-scrollbar]:w-4 [&::-webkit-scrollbar]:h-4",e),...a,children:t}));pt.displayName="ScrollArea";function Aw({value:e,onChange:t,placeholder:r="Pick date & time",className:o}){let[a,n]=Te.useState(e),[s,i]=Te.useState(false),[d,c]=Te.useState(e?e.getHours():12),[m,u]=Te.useState(e?e.getMinutes():0);Te.useEffect(()=>{e&&(n(e),c(e.getHours()),u(e.getMinutes()));},[e]);let p=b=>{let f=new Date(b);f.setHours(d),f.setMinutes(m),n(f),t?.(f);},g=(b,f)=>{let w=parseInt(f,10);if(isNaN(w))return;let v=d,y=m;b==="hours"?(w=Math.max(0,Math.min(23,w)),c(w),v=w):(w=Math.max(0,Math.min(59,w)),u(w),y=w);let k=a||new Date,N=new Date(k);N.setHours(v),N.setMinutes(y),n(N),t?.(N);},h=b=>b.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"});return jsxRuntime.jsxs(nt,{open:s,onOpenChange:i,children:[jsxRuntime.jsxs(st,{onMouseMove:b=>{let f=b.currentTarget.getBoundingClientRect(),w=b.clientX-f.left,v=b.clientY-f.top;b.currentTarget.style.setProperty("--x",`${w}px`),b.currentTarget.style.setProperty("--y",`${v}px`);},className:l("group relative flex h-11 w-full items-center justify-between rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-2 text-sm text-gray-900 dark:text-white transition-all duration-200 overflow-hidden","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/15",!a&&"text-gray-400 dark:text-white/40",o),children:[jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--x) var(--y), rgba(0,0,0,0.06), transparent 40%)"}}),jsxRuntime.jsx("span",{className:"relative z-10",children:a?h(a):r}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-400 dark:text-white/40",children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"}),jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"})]})]}),jsxRuntime.jsx(it,{className:"w-auto p-0 border-none bg-transparent shadow-none",align:"start",children:jsxRuntime.jsx("div",{className:"flex flex-col rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/40 backdrop-blur-xl shadow-2xl dark:shadow-black/50",children:jsxRuntime.jsxs("div",{className:"flex",children:[jsxRuntime.jsx("div",{className:"p-4 border-r border-gray-200 dark:border-white/10",children:jsxRuntime.jsx(so,{value:a,onChange:p,className:"border-0 p-0 bg-transparent backdrop-blur-none shadow-none rounded-none"})}),jsxRuntime.jsxs("div",{className:"flex flex-col p-4 w-[160px] h-[340px]",children:[jsxRuntime.jsx("div",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-white/70",children:"Time"}),jsxRuntime.jsxs("div",{className:"flex flex-1 gap-2 min-h-0 overflow-hidden",children:[jsxRuntime.jsxs(pt,{className:"flex-1 flex flex-col gap-1",scrollbarSize:"sm",children:[jsxRuntime.jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 text-center mb-1 sticky top-0 bg-white dark:bg-[#0A0A0A] py-1 z-10",children:"Hr"}),jsxRuntime.jsx("div",{className:"flex flex-col gap-1",children:Array.from({length:24}).map((b,f)=>jsxRuntime.jsx("button",{onClick:()=>g("hours",f.toString()),className:l("w-full rounded-lg px-1 py-1.5 text-sm transition-colors text-center shrink-0",d===f?"bg-emerald-500 dark:bg-emerald-600/80 text-white font-medium":"text-gray-700 dark:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white"),children:f.toString().padStart(2,"0")},f))})]}),jsxRuntime.jsx("div",{className:"w-[1px] bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsxs(pt,{className:"flex-1 flex flex-col gap-1",scrollbarSize:"sm",children:[jsxRuntime.jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 text-center mb-1 sticky top-0 bg-white dark:bg-[#0A0A0A] py-1 z-10",children:"Min"}),jsxRuntime.jsx("div",{className:"flex flex-col gap-1",children:Array.from({length:60}).map((b,f)=>jsxRuntime.jsx("button",{onClick:()=>g("minutes",f.toString()),className:l("w-full rounded-lg px-1 py-1.5 text-sm transition-colors text-center shrink-0",m===f?"bg-emerald-500 dark:bg-emerald-600/80 text-white font-medium":"text-gray-700 dark:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white"),children:f.toString().padStart(2,"0")},f))})]})]})]})]})})})]})}var Mr=Te__namespace.default.forwardRef(({className:e,label:t,error:r,id:o,disabled:a,...n},s)=>{let i=Te__namespace.default.useId(),d=o||i;return jsxRuntime.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&jsxRuntime.jsx(X,{htmlFor:d,className:l(a&&"opacity-50 cursor-not-allowed"),children:t}),jsxRuntime.jsx("textarea",{ref:s,id:d,disabled:a,className:l("w-full rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3","border border-gray-200 dark:border-white/[0.10]","text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-white/30","focus:outline-none focus:ring-2 focus:ring-purple-400/30","resize-none","disabled:cursor-not-allowed disabled:opacity-50",r&&"border-rose-400/25 focus:ring-rose-300/25",e),...n}),r&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:r})]})});Mr.displayName="Textarea";var Dc=Te__namespace.default.forwardRef((e,t)=>{let[r,o]=Te.useState(false);return jsxRuntime.jsx(Pt,{...e,ref:t,type:r?"text":"password",rightIcon:jsxRuntime.jsx(R,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-white/10",onClick:()=>o(!r),"aria-label":r?"Hide password":"Show password",children:r?jsxRuntime.jsx(lucideReact.EyeOff,{className:"h-4 w-4 text-gray-400 dark:text-white/35"}):jsxRuntime.jsx(lucideReact.Eye,{className:"h-4 w-4 text-gray-400 dark:text-white/35"})})})});Dc.displayName="PasswordInput";var Ac=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-full border px-2.5 py-1 text-xs font-medium whitespace-nowrap transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-white/[0.06] dark:text-white/70 dark:border-white/10",neutral:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-white/[0.06] dark:text-white/70 dark:border-white/10",success:"bg-emerald-100 text-emerald-700 border-emerald-200 dark:bg-emerald-400/15 dark:text-emerald-200 dark:border-emerald-400/20",warning:"bg-amber-100 text-amber-700 border-amber-200 dark:bg-amber-400/15 dark:text-amber-200 dark:border-amber-400/20",danger:"bg-rose-100 text-rose-700 border-rose-200 dark:bg-rose-400/15 dark:text-rose-200 dark:border-rose-400/20",info:"bg-sky-100 text-sky-700 border-sky-200 dark:bg-sky-400/15 dark:text-sky-200 dark:border-sky-400/20",outline:"bg-transparent text-white/60 border-white/10 hover:bg-white/[0.06]"}},defaultVariants:{variant:"default"}}),Ue=Te__namespace.default.forwardRef(({className:e,variant:t,...r},o)=>jsxRuntime.jsx("span",{ref:o,className:l(Ac({variant:t}),e),...r}));Ue.displayName="Badge";function iy({label:e,placeholder:t="Add tag...",tags:r,onChange:o,error:a,className:n}){let[s,i]=Te.useState(""),d=m=>{m.key==="Enter"&&s.trim()?(m.preventDefault(),r.includes(s.trim())||o([...r,s.trim()]),i("")):m.key==="Backspace"&&!s&&r.length>0&&o(r.slice(0,-1));},c=m=>{o(r.filter(u=>u!==m));};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",n),children:[e&&jsxRuntime.jsx(X,{children:e}),jsxRuntime.jsxs("div",{className:l("flex flex-wrap gap-2 rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-3 py-2 border border-gray-200 dark:border-white/[0.10] focus-within:ring-2 focus-within:ring-purple-400/30 transition-all duration-200",a&&"border-rose-400/25"),children:[r.map(m=>jsxRuntime.jsxs(Ue,{variant:"default",className:"gap-1 pr-1",children:[m,jsxRuntime.jsx("button",{type:"button",onClick:()=>c(m),className:"rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10 transition-colors",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},m)),jsxRuntime.jsx("input",{type:"text",value:s,onChange:m=>i(m.target.value),onKeyDown:d,placeholder:r.length===0?t:"",className:"flex-1 bg-transparent py-1 text-sm outline-none placeholder:text-gray-400 dark:placeholder:text-white/30 min-w-[120px]"})]}),a&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:a})]})}function uy({label:e,value:t,onChange:r,error:o,className:a}){return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",a),children:[e&&jsxRuntime.jsx(X,{children:e}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"h-10 w-10 rounded-xl border border-gray-200 dark:border-white/10 overflow-hidden relative",style:{backgroundColor:t},children:jsxRuntime.jsx("input",{type:"color",value:t,onChange:n=>r(n.target.value),className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full"})}),jsxRuntime.jsx("input",{type:"text",value:t,onChange:n=>r(n.target.value),className:"flex-1 rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-2 border border-gray-200 dark:border-white/[0.10] text-sm focus:outline-none focus:ring-2 focus:ring-purple-400/30 transition-all"})]}),o&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400",children:o})]})}var _n=Te.createContext({}),$c=Te__namespace.default.forwardRef(({className:e,value:t,onChange:r,name:o,disabled:a,label:n,children:s,...i},d)=>{let c=Te__namespace.default.useId();return jsxRuntime.jsxs("div",{ref:d,className:l("flex flex-col gap-2",e),...i,children:[n&&jsxRuntime.jsx(X,{className:l(a&&"opacity-50 cursor-not-allowed"),children:n}),jsxRuntime.jsx("div",{className:"flex flex-col gap-2",role:"radiogroup",children:jsxRuntime.jsx(_n.Provider,{value:{value:t,onChange:r,name:o||c,disabled:a},children:s})})]})});$c.displayName="RadioGroup";var Fc=Te__namespace.default.forwardRef(({className:e,value:t,label:r,disabled:o,...a},n)=>{let s=Te.useContext(_n),i=s.value===t,d=s.disabled||o,c=Te__namespace.default.useId();return jsxRuntime.jsxs("label",{htmlFor:c,className:l("flex items-center gap-3 cursor-pointer group",d&&"cursor-not-allowed opacity-50",e),children:[jsxRuntime.jsxs("div",{className:"relative flex items-center justify-center",children:[jsxRuntime.jsx("input",{ref:n,id:c,type:"radio",name:s.name,value:t,checked:i,disabled:d,onChange:m=>{m.target.checked&&s.onChange?.(t);},className:"peer sr-only",...a}),jsxRuntime.jsx("div",{className:l("h-5 w-5 rounded-full border border-gray-300 dark:border-white/20 bg-gray-50 dark:bg-white/[0.03] transition-all duration-200","peer-focus-visible:ring-2 peer-focus-visible:ring-gray-400 dark:peer-focus-visible:ring-white/20 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-white dark:peer-focus-visible:ring-offset-[#0A0A0A]","group-hover:bg-gray-100 dark:group-hover:bg-white/[0.05]",i&&"border-gray-900 bg-gray-900 dark:border-white dark:bg-white"),children:i&&jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full bg-white dark:bg-black"})})})]}),r&&jsxRuntime.jsx("span",{className:"text-sm text-gray-900 dark:text-white/90 select-none font-medium",children:r})]})});Fc.displayName="RadioGroupItem";var Pr=Te__namespace.default.createContext({}),Uc=Te__namespace.default.forwardRef(({className:e,...t},r)=>{let o=Te__namespace.default.useId();return jsxRuntime.jsx(Pr.Provider,{value:{id:o},children:jsxRuntime.jsx("div",{ref:r,className:l("space-y-2",e),...t})})});Uc.displayName="FormItem";var Wc=Te__namespace.default.forwardRef(({className:e,...t},r)=>{let{id:o}=Te__namespace.default.useContext(Pr);return jsxRuntime.jsx(X,{ref:r,className:l("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),htmlFor:o,...t})});Wc.displayName="FormLabel";var _c=Te__namespace.default.forwardRef(({...e},t)=>{let{id:r}=Te__namespace.default.useContext(Pr),{children:o,...a}=e;return Te__namespace.default.isValidElement(o)?Te__namespace.default.cloneElement(o,{id:r,"aria-describedby":`${r}-description ${r}-message`,...a,...o.props}):jsxRuntime.jsx("div",{ref:t,...e})});_c.displayName="FormControl";var Yc=Te__namespace.default.forwardRef(({className:e,...t},r)=>{let{id:o}=Te__namespace.default.useContext(Pr);return jsxRuntime.jsx("p",{ref:r,id:`${o}-description`,className:l("text-xs text-white/50",e),...t})});Yc.displayName="FormDescription";var Xc=Te__namespace.default.forwardRef(({className:e,children:t,...r},o)=>{let{id:a}=Te__namespace.default.useContext(Pr);return t?jsxRuntime.jsx("p",{ref:o,id:`${a}-message`,className:l("text-xs font-medium text-rose-500",e),...r,children:t}):null});Xc.displayName="FormMessage";var Qc=classVarianceAuthority.cva("relative flex flex-col items-center justify-center rounded-2xl border-2 border-dashed transition-all duration-200 text-center",{variants:{isDragActive:{true:"border-blue-500 bg-blue-50 dark:bg-blue-500/10",false:"border-gray-200 bg-gray-50 hover:bg-gray-100 dark:border-white/10 dark:bg-white/[0.02] dark:hover:bg-white/[0.05]"},error:{true:"border-rose-500 bg-rose-50 dark:bg-rose-500/10",false:""}},defaultVariants:{isDragActive:false,error:false}}),Zc=Te__namespace.default.forwardRef(({className:e,onDrop:t,maxFiles:r=1,maxSize:o,label:a="Upload files",description:n="Drag & drop or click to upload",...s},i)=>{let[d,c]=Te.useState(false),[m,u]=Te.useState([]),[p,g]=Te.useState(null),h=Te__namespace.default.useRef(null),x=k=>{k.preventDefault(),c(true);},b=k=>{k.preventDefault(),c(false);},f=k=>r&&k.length>r?(g(`Max ${r} files allowed`),false):o&&k.some(C=>C.size>o)?(g(`File too large (max ${o/1024/1024}MB)`),false):(g(null),true),w=k=>{k.preventDefault(),c(false);let N=Array.from(k.dataTransfer.files);f(N)&&(u(N),t?.(N));},v=k=>{if(k.target.files){let N=Array.from(k.target.files);f(N)&&(u(N),t?.(N));}},y=(k,N)=>{N.stopPropagation();let C=m.filter((T,E)=>E!==k);u(C),t?.(C);};return jsxRuntime.jsxs("div",{className:"w-full space-y-4",children:[jsxRuntime.jsxs("div",{ref:i,className:l(Qc({isDragActive:d,error:!!p,className:e}),"p-8 cursor-pointer"),onDragOver:x,onDragLeave:b,onDrop:w,onClick:()=>h.current?.click(),...s,children:[jsxRuntime.jsx("input",{ref:h,type:"file",className:"hidden",multiple:r>1,onChange:v}),jsxRuntime.jsx("div",{className:"mb-4 rounded-full bg-gray-100 p-3 dark:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.Upload,{className:"h-6 w-6 text-gray-500 dark:text-white/70"})}),jsxRuntime.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-white",children:a}),jsxRuntime.jsx("div",{className:"mt-1 text-xs text-gray-500 dark:text-white/50",children:n}),p&&jsxRuntime.jsx("div",{className:"mt-2 text-xs font-medium text-rose-500",children:p})]}),m.length>0&&jsxRuntime.jsx("div",{className:"grid gap-2",children:m.map((k,N)=>jsxRuntime.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-gray-200 bg-white p-3 dark:border-white/10 dark:bg-white/[0.03]",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-gray-100 dark:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4 text-gray-500 dark:text-white/70"})}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white truncate max-w-[200px]",children:k.name}),jsxRuntime.jsxs("span",{className:"text-xs text-gray-500 dark:text-white/50",children:[(k.size/1024).toFixed(1)," KB"]})]})]}),jsxRuntime.jsx("button",{onClick:C=>y(N,C),className:"rounded-full p-1 hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]},N))})]})});Zc.displayName="FileDropzone";var nd=classVarianceAuthority.cva("flex items-center gap-2",{variants:{size:{sm:"[&>input]:h-8 [&>input]:w-8 [&>input]:text-sm",md:"[&>input]:h-10 [&>input]:w-10 [&>input]:text-base",lg:"[&>input]:h-12 [&>input]:w-12 [&>input]:text-lg"}},defaultVariants:{size:"md"}}),sd=Te__namespace.default.forwardRef(({className:e,size:t,length:r=6,value:o="",onChange:a,onComplete:n,disabled:s,error:i,...d},c)=>{let[m,u]=Te.useState(new Array(r).fill("")),p=Te.useRef([]);Te.useEffect(()=>{let b=o.split("").slice(0,r),f=[...b,...new Array(r-b.length).fill("")];u(f);},[o,r]);let g=(b,f)=>{let w=b.target.value;if(isNaN(Number(w)))return;let v=[...m];v[f]=w.substring(w.length-1),u(v);let y=v.join("");a?.(y),w&&f<r-1&&p.current[f+1]?.focus(),y.length===r&&n?.(y);},h=(b,f)=>{b.key==="Backspace"&&!m[f]&&f>0&&p.current[f-1]?.focus();},x=b=>{b.preventDefault();let f=b.clipboardData.getData("text/plain").slice(0,r);if(!/^\d+$/.test(f))return;let w=[...m];f.split("").forEach((y,k)=>{w[k]=y;}),u(w);let v=w.join("");a?.(v),v.length===r&&n?.(v),p.current[Math.min(f.length,r-1)]?.focus();};return jsxRuntime.jsx("div",{ref:c,className:l(nd({size:t,className:e})),...d,children:m.map((b,f)=>jsxRuntime.jsx("input",{ref:w=>p.current[f]=w,type:"text",inputMode:"numeric",maxLength:1,value:b,disabled:s,onChange:w=>g(w,f),onKeyDown:w=>h(w,f),onPaste:x,className:l("rounded-2xl border bg-gray-50 text-center font-semibold transition-all duration-200","focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed","dark:bg-white/[0.03] dark:text-white",i?"border-rose-500 text-rose-500 focus:border-rose-500 focus:ring-rose-500/20":"border-gray-200 dark:border-white/10")},f))})});sd.displayName="OTPInput";var md=classVarianceAuthority.cva("flex items-center rounded-2xl border bg-gray-50 dark:bg-white/[0.03] dark:border-white/10",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},error:{true:"border-rose-500",false:"border-gray-200"}},defaultVariants:{size:"md",error:false}}),ud=Te__namespace.default.forwardRef(({className:e,size:t,error:r,value:o=0,onChange:a,min:n=-1/0,max:s=1/0,step:i=1,disabled:d,...c},m)=>{let u=()=>{o-i>=n&&a?.(o-i);},p=()=>{o+i<=s&&a?.(o+i);},g=h=>{let x=parseFloat(h.target.value);isNaN(x)||a?.(x);};return jsxRuntime.jsxs("div",{className:l(md({size:t,error:r,className:e})),children:[jsxRuntime.jsx("button",{type:"button",onClick:u,disabled:d||o<=n,className:"flex h-full items-center justify-center px-3 text-gray-500 hover:text-gray-900 disabled:opacity-50 dark:text-white/50 dark:hover:text-white",children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx("div",{className:"h-full w-px bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsx("input",{ref:m,type:"number",value:o,onChange:g,disabled:d,className:"h-full w-full min-w-[3rem] bg-transparent text-center text-sm font-medium text-gray-900 focus:outline-none dark:text-white",...c}),jsxRuntime.jsx("div",{className:"h-full w-px bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsx("button",{type:"button",onClick:p,disabled:d||o>=s,className:"flex h-full items-center justify-center px-3 text-gray-500 hover:text-gray-900 disabled:opacity-50 dark:text-white/50 dark:hover:text-white",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-3.5 w-3.5"})})]})});ud.displayName="NumberInput";var gd=classVarianceAuthority.cva("inline-flex items-center rounded-2xl border border-gray-200 bg-gray-50 p-1 dark:border-white/10 dark:bg-white/[0.03]",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full flex",false:""}},defaultVariants:{size:"md",fullWidth:false}}),bd=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-2xl px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-gray-950 dark:focus-visible:ring-gray-300",{variants:{selected:{true:"bg-white text-gray-950 shadow-sm dark:bg-gray-800 dark:text-gray-50",false:"text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-50"},fullWidth:{true:"flex-1",false:""}},defaultVariants:{selected:false,fullWidth:false}}),hd=Te__namespace.default.forwardRef(({className:e,size:t,fullWidth:r,value:o,onChange:a,options:n,...s},i)=>jsxRuntime.jsx("div",{ref:i,className:l(gd({size:t,fullWidth:r,className:e})),...s,children:n.map(d=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>a?.(d.value),className:l(bd({selected:o===d.value,fullWidth:r})),children:[d.icon&&jsxRuntime.jsx("span",{className:"mr-2",children:d.icon}),d.label]},d.value))}));hd.displayName="ToggleGroup";var Gn={loading:jsxRuntime.jsx("svg",{className:"animate-spin text-blue-500",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),success:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-400",children:[jsxRuntime.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),jsxRuntime.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-rose-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),warning:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-400",children:[jsxRuntime.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),jsxRuntime.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),jsxRuntime.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},Jn=({id:e,title:t,description:r,variant:o="default",duration:a=5e3,onDismiss:n})=>(Te.useEffect(()=>{if(a===1/0)return;let s=setTimeout(()=>{n(e);},a);return ()=>clearTimeout(s)},[a,e,n]),jsxRuntime.jsxs("div",{role:"alert",className:l("pointer-events-auto relative flex w-full max-w-sm items-start gap-4 overflow-hidden rounded-2xl border p-4 shadow-lg transition-all","animate-in slide-in-from-right-full fade-in duration-300","bg-white dark:bg-[#0A0A0A]/90 backdrop-blur-md border-gray-200 dark:border-white/10",o==="error"&&"border-rose-200 dark:border-rose-500/30 bg-rose-50 dark:bg-rose-500/10",o==="success"&&"border-emerald-200 dark:border-emerald-500/20 bg-emerald-50 dark:bg-emerald-950/10",o==="warning"&&"border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-950/10",o==="info"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10",o==="loading"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10"),children:[o!=="default"&&Gn[o]&&jsxRuntime.jsx("div",{className:"shrink-0 pt-0.5",children:Gn[o]}),jsxRuntime.jsxs("div",{className:"flex-1 gap-1",children:[t&&jsxRuntime.jsx("div",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t}),r&&jsxRuntime.jsx("div",{className:"text-sm text-gray-600 dark:text-white/80",children:r})]}),jsxRuntime.jsx("button",{onClick:()=>n(e),className:"shrink-0 rounded-md p-1 text-gray-400 dark:text-white/50 opacity-0 transition-opacity hover:text-gray-900 dark:hover:text-white group-hover:opacity-100 focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20",children:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntime.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}));var oa=Te.createContext(void 0);function ok({children:e}){let[t,r]=Te.useState([]),o=Te.useCallback(i=>{r(d=>d.filter(c=>c.id!==i));},[]),a=Te.useCallback(i=>{let d=Math.random().toString(36).substring(2,9);return r(c=>[...c,{...i,id:d,onDismiss:o}]),d},[o]),n=Te.useCallback((i,d)=>{r(c=>c.map(m=>m.id===i?{...m,...d}:m));},[]),s=Te.useCallback(async(i,d)=>{let c=typeof d.loading=="string"?{title:d.loading,variant:"loading"}:{variant:"loading",...d.loading},m=a({...c,duration:1/0});try{let u=await i,p=typeof d.success=="function"?d.success(u):typeof d.success=="string"?{title:d.success,variant:"success"}:d.success;return n(m,{...p,duration:5e3}),u}catch(u){let p=typeof d.error=="function"?d.error(u):typeof d.error=="string"?{title:d.error,variant:"error"}:d.error;throw n(m,{...p,duration:5e3}),u}},[a,n]);return jsxRuntime.jsxs(oa.Provider,{value:{toast:a,dismiss:o,promise:s},children:[e,jsxRuntime.jsx("div",{className:"fixed bottom-0 right-0 z-[150] flex max-h-screen w-full flex-col-reverse gap-2 p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",children:t.map(i=>jsxRuntime.jsx(Jn,{...i},i.id))})]})}var Td={success:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-400",children:[jsxRuntime.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),jsxRuntime.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-rose-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),warning:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-400",children:[jsxRuntime.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),jsxRuntime.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),jsxRuntime.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},Cd=Te__namespace.default.forwardRef(({className:e,variant:t="default",icon:r,title:o,children:a,...n},s)=>{let i=r||(t!=="default"?Td[t]:null);return jsxRuntime.jsxs("div",{ref:s,role:"alert",className:l("relative w-full rounded-2xl border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-gray-900 dark:[&>svg]:text-white","bg-white dark:bg-[#0A0A0A]/50 backdrop-blur-md border-gray-200 dark:border-white/10 text-gray-900 dark:text-white",t==="error"&&"border-rose-200 dark:border-rose-500/20 bg-rose-50 dark:bg-rose-950/10 text-rose-900 dark:text-rose-50 [&>svg]:text-rose-600 dark:[&>svg]:text-rose-400",t==="success"&&"border-emerald-200 dark:border-emerald-500/20 bg-emerald-50 dark:bg-emerald-950/10 text-emerald-900 dark:text-emerald-50 [&>svg]:text-emerald-600 dark:[&>svg]:text-emerald-400",t==="warning"&&"border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-950/10 text-amber-900 dark:text-amber-50 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",t==="info"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10 text-blue-900 dark:text-blue-50 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",e),...n,children:[i,jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[o&&jsxRuntime.jsx("h5",{className:"mb-1 font-medium leading-none tracking-tight",children:o}),a&&jsxRuntime.jsx("div",{className:"text-sm opacity-90 [&_p]:leading-relaxed",children:a})]})]})});Cd.displayName="Alert";var Rd=Te__namespace.default.forwardRef(({className:e,value:t=0,max:r=100,variant:o="default",size:a="md",isIndeterminate:n=false,hasStripe:s=false,indicatorClassName:i,...d},c)=>{let m=n?0:Math.min(Math.max((t||0)/r,0),1)*100,u={default:"bg-gray-900 dark:bg-white dark:shadow-[0_0_10px_rgba(255,255,255,0.5)]",success:"bg-emerald-500 shadow-sm dark:shadow-[0_0_10px_rgba(16,185,129,0.5)]",warning:"bg-amber-500 shadow-sm dark:shadow-[0_0_10px_rgba(245,158,11,0.5)]",danger:"bg-rose-500 shadow-sm dark:shadow-[0_0_10px_rgba(244,63,94,0.5)]",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 shadow-sm dark:shadow-[0_0_15px_rgba(99,102,241,0.5)]"};return jsxRuntime.jsx("div",{ref:c,role:"progressbar","aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":n?void 0:t,className:l("relative w-full overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.03] border border-gray-200 dark:border-white/5 backdrop-blur-sm",{sm:"h-1",md:"h-2",lg:"h-4"}[a],e),...d,children:jsxRuntime.jsx("div",{className:l("h-full w-full flex-1 transition-all duration-500 ease-in-out relative overflow-hidden",u[o],n&&"absolute inset-0 w-full origin-left animate-indeterminate-progress",i),style:{transform:n?void 0:`translateX(-${100-m}%)`},children:s&&!n&&jsxRuntime.jsx("div",{className:"absolute inset-0 w-full h-full animate-progress-stripe",style:{backgroundImage:"linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)",backgroundSize:"1rem 1rem"}})})})});Rd.displayName="Progress";var Ed=Te__namespace.default.forwardRef(({icon:e,title:t,description:r,action:o,className:a,...n},s)=>jsxRuntime.jsx(ce,{ref:s,className:l("p-8 text-center",a),...n,children:jsxRuntime.jsxs("div",{className:"mx-auto w-full max-w-md space-y-3",children:[jsxRuntime.jsx("div",{className:"mx-auto grid h-12 w-12 place-items-center rounded-2xl border border-white/10 bg-white/[0.03] text-white/70",children:e??jsxRuntime.jsx(lucideReact.Info,{className:"h-5 w-5"})}),jsxRuntime.jsx("div",{className:"text-lg font-semibold text-white",children:t}),r?jsxRuntime.jsx("div",{className:"text-sm text-white/55",children:r}):null,o?jsxRuntime.jsx("div",{className:"pt-2 flex justify-center",children:o}):null]})}));Ed.displayName="EmptyState";function Zn({className:e,variant:t="default",...r}){return jsxRuntime.jsx("div",{className:l("animate-pulse bg-gray-200 dark:bg-white/[0.03]",t==="circle"&&"rounded-full",t==="default"&&"rounded-2xl",t==="text"&&"rounded h-4 w-full",e),...r})}var Bd=Te__namespace.default.forwardRef(({className:e,max:t=5,value:r=0,onChange:o,readOnly:a=false,size:n="md",...s},i)=>{let[d,c]=Te.useState(null),m={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};return jsxRuntime.jsx("div",{ref:i,className:l("flex items-center gap-1",e),...s,children:Array.from({length:t}).map((u,p)=>{let g=p+1,h=(d!==null?d:r)>=g;return jsxRuntime.jsx("button",{type:"button",disabled:a,onClick:()=>o?.(g),onMouseEnter:()=>!a&&c(g),onMouseLeave:()=>!a&&c(null),className:l("transition-transform hover:scale-110 focus:outline-none",a&&"cursor-default hover:scale-100"),children:jsxRuntime.jsx(lucideReact.Star,{className:l(m[n],"transition-colors duration-200",h?"fill-amber-400 text-amber-400":"fill-transparent text-gray-300 dark:text-white/20")})},p)})})});Bd.displayName="Rating";var es=classVarianceAuthority.cva("transition-all duration-700 ease-out",{variants:{preset:{fade:"opacity-0 translate-y-4",spring:"opacity-0 scale-95 translate-y-4","slide-right":"opacity-0 -translate-x-8","slide-left":"opacity-0 translate-x-8",blur:"opacity-0 blur-sm scale-105","3d-flip":"opacity-0 rotate-x-90"},visibleState:{fade:"opacity-100 translate-y-0",spring:"opacity-100 scale-100 translate-y-0 animate-enter-spring","slide-right":"opacity-100 translate-x-0","slide-left":"opacity-100 translate-x-0",blur:"opacity-100 blur-0 scale-100","3d-flip":"opacity-100 rotate-x-0"}},defaultVariants:{preset:"spring"}});function ts({className:e,preset:t="spring",viewport:r=true,visible:o,delay:a=0,once:n=true,asChild:s=false,children:i,style:d,...c}){let{ref:m,isInView:u,hasAnimated:p}=Xe({threshold:.1,enabled:r&&o===void 0}),h=o!==void 0?o:r?n?p:u:true,x=es({preset:t}),b=h?es({visibleState:t}):"";return jsxRuntime.jsx(s?Lt:"div",{ref:m,className:l(x,b,e),style:{transitionDelay:`${a}ms`,willChange:"transform, opacity",...d},...c,children:i})}function Vk({children:e,stagger:t=100,delay:r=0,className:o,...a}){let{ref:n,hasAnimated:s}=Xe({threshold:.1});return jsxRuntime.jsx("div",{ref:n,className:l("relative",o),...a,children:Te__namespace.default.Children.map(e,(i,d)=>Te__namespace.default.isValidElement(i)?Te__namespace.default.cloneElement(i,{visible:s,viewport:false,delay:r+d*t}):i)})}function Fk({text:e,type:t="char",stagger:r=30,delay:o=0,className:a,...n}){let{ref:s,hasAnimated:i}=Xe({threshold:.2}),d=t==="char"?e.split(""):e.split(" ");return jsxRuntime.jsx("div",{ref:s,className:l("flex flex-wrap",a),"aria-label":e,...n,children:d.map((c,m)=>jsxRuntime.jsxs("span",{className:l("inline-block whitespace-pre transition-all duration-500 ease-out will-change-transform",i?"opacity-100 translate-y-0 blur-0":"opacity-0 translate-y-4 blur-sm"),style:{transitionDelay:`${o+m*r}ms`},children:[c,t==="word"&&m!==d.length-1?" ":""]},m))})}function jk({children:e,speed:t=.1,direction:r="vertical",className:o,...a}){let n=Te.useRef(null);return Te.useEffect(()=>{let s=n.current;if(!s)return;let i=()=>{let d=s.getBoundingClientRect(),c=window.innerHeight;if(d.top>c||d.bottom<0)return;let u=(c/2-(d.top+d.height/2))*t;r==="vertical"?s.style.transform=`translate3d(0, ${u}px, 0)`:s.style.transform=`translate3d(${u}px, 0, 0)`;};return window.addEventListener("scroll",i,{passive:true}),i(),()=>window.removeEventListener("scroll",i)},[t,r]),jsxRuntime.jsx("div",{ref:n,className:l("will-change-transform",o),...a,children:e})}function t1({children:e,strength:t=.5,className:r}){let o=Te.useRef(null),a=s=>{let i=o.current;if(!i)return;let{clientX:d,clientY:c}=s,{left:m,top:u,width:p,height:g}=i.getBoundingClientRect(),h=m+p/2,x=u+g/2,b=d-h,f=c-x,w=Math.max(p,g)*1.5;Math.abs(b)<w&&Math.abs(f)<w?(i.style.setProperty("--mag-x",`${b*t}px`),i.style.setProperty("--mag-y",`${f*t}px`)):(i.style.setProperty("--mag-x","0px"),i.style.setProperty("--mag-y","0px"));},n=()=>{let s=o.current;s&&(s.style.setProperty("--mag-x","0px"),s.style.setProperty("--mag-y","0px"));};return Te.useEffect(()=>(window.addEventListener("mousemove",a),()=>window.removeEventListener("mousemove",a)),[t]),jsxRuntime.jsx("div",{ref:o,className:l("inline-block transition-transform duration-300 ease-out will-change-transform",r),onMouseLeave:n,style:{transform:"translate3d(var(--mag-x, 0px), var(--mag-y, 0px), 0)"},children:e})}function l1({value:e,duration:t=2e3,delay:r=0,decimalPlaces:o=0,className:a,...n}){let[s,i]=Te.useState(0),{ref:d,hasAnimated:c}=Xe({threshold:.1}),m=Te.useRef(null);return Te.useEffect(()=>{if(!c)return;let u=g=>{m.current||(m.current=g);let h=Math.min((g-m.current-r)/t,1);if(h>=0){let x=h*e;i(x);}h<1&&requestAnimationFrame(u);},p=setTimeout(()=>{requestAnimationFrame(u);},r);return ()=>clearTimeout(p)},[c,e,t,r]),jsxRuntime.jsx("span",{ref:d,className:l("tabular-nums tracking-tighter",a),...n,children:s.toFixed(o)})}function p1({variant:e="spinner",text:t,fullscreen:r=true,className:o,...a}){let n=r?"fixed inset-0 z-[200] flex items-center justify-center bg-white/80 dark:bg-black/80 backdrop-blur-sm":"flex items-center justify-center p-8 w-full h-full min-h-[200px]";return e==="bar"?jsxRuntime.jsx("div",{className:l("fixed top-0 left-0 right-0 z-[200] h-1 bg-transparent",o),...a,children:jsxRuntime.jsx("div",{className:"h-full bg-blue-500 animate-indeterminate-progress origin-left"})}):e==="dots"?jsxRuntime.jsxs("div",{className:l(n,o),...a,children:[jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce [animation-delay:-0.3s]"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce [animation-delay:-0.15s]"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce"})]}),t&&jsxRuntime.jsx("span",{className:"ml-4 text-sm font-medium text-gray-500 dark:text-white/70",children:t})]}):e==="logo"?jsxRuntime.jsx("div",{className:l(n,o),...a,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4",children:[jsxRuntime.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-full bg-white dark:bg-white/[0.06] shadow-lg ring-1 ring-black/5",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 rounded-full animate-ping bg-blue-500/20"}),jsxRuntime.jsx("div",{className:"h-8 w-8 rounded bg-blue-500"})]}),t&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-white/70 animate-pulse",children:t})]})}):e==="glass"?jsxRuntime.jsx("div",{className:l(n,"bg-white/30 dark:bg-black/30 backdrop-blur-md",o),...a,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"h-8 w-8 animate-spin text-white"}),t&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-white tracking-wider",children:t})]})}):jsxRuntime.jsx("div",{className:l(n,o),...a,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"h-8 w-8 animate-spin text-blue-500"}),t&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-white/70",children:t})]})})}function v1({preset:e="fade",duration:t=300,useViewTransition:r=false,className:o,children:a,...n}){let[s,i]=Te.useState(false);Te.useEffect(()=>{if(r&&document.startViewTransition)document.startViewTransition(()=>{i(true);});else {let m=requestAnimationFrame(()=>{i(true);});return ()=>cancelAnimationFrame(m)}},[r]);let c={fade:{initial:"opacity-0",animate:"opacity-100"},"slide-up":{initial:"opacity-0 translate-y-8",animate:"opacity-100 translate-y-0"},scale:{initial:"opacity-0 scale-95",animate:"opacity-100 scale-100"},blur:{initial:"opacity-0 blur-sm",animate:"opacity-100 blur-0"},none:{initial:"",animate:""}}[e];return jsxRuntime.jsx("div",{className:l("transition-all ease-out",s?c.animate:c.initial,o),style:{transitionDuration:`${t}ms`,viewTransitionName:r?"page-content":void 0},...n,children:a})}var am={sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-14 w-14 text-base",xl:"h-20 w-20 text-xl"},F=Te__namespace.default.forwardRef(({className:e,src:t,alt:r,fallback:o,size:a="md",...n},s)=>{let[i,d]=Te.useState(false);return Te.useEffect(()=>{d(false);},[t]),jsxRuntime.jsx("div",{ref:s,className:l("relative flex shrink-0 overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.06]",am[a],e),...n,children:t&&!i?jsxRuntime.jsx("img",{src:t,alt:r,className:"aspect-square h-full w-full object-cover",onError:()=>d(true)}):jsxRuntime.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-100 dark:bg-white/5 text-gray-600 dark:text-white/70 font-medium",children:o||(r?r.charAt(0).toUpperCase():"?")})})});F.displayName="Avatar";var la=Te.createContext(void 0);function E1({type:e="single",defaultValue:t,value:r,onValueChange:o,className:a,children:n,...s}){let[i,d]=Te.useState(t||(e==="multiple"?[]:"")),c=r!==void 0?r:i,m=u=>{let p;if(e==="multiple"){let g=Array.isArray(c)?c:[];g.includes(u)?p=g.filter(h=>h!==u):p=[...g,u];}else p=c===u?"":u;r===void 0&&d(p),o?.(p);};return jsxRuntime.jsx(la.Provider,{value:{value:c,onValueChange:m,type:e},children:jsxRuntime.jsx("div",{className:l("space-y-2",a),...s,children:n})})}var ca=Te.createContext({value:"",isOpen:false});function S1({className:e,value:t,children:r,...o}){let a=Te.useContext(la),n=Array.isArray(a?.value)?a?.value.includes(t):a?.value===t;return jsxRuntime.jsx(ca.Provider,{value:{value:t,isOpen:!!n},children:jsxRuntime.jsx("div",{className:l("overflow-hidden rounded-2xl border border-gray-200 dark:border-white/5 bg-gray-50 dark:bg-white/[0.03] transition-all duration-200",n&&"bg-white dark:bg-white/[0.04] border-gray-300 dark:border-white/10",e),...o,children:r})})}function D1({className:e,children:t,...r}){let o=Te.useContext(la),{value:a,isOpen:n}=Te.useContext(ca);return jsxRuntime.jsxs("button",{type:"button",onClick:()=>o?.onValueChange(a),"aria-expanded":n,"aria-controls":`accordion-content-${a}`,id:`accordion-trigger-${a}`,className:l("flex w-full items-center justify-between px-4 py-3 text-sm font-medium text-gray-900 dark:text-white transition-all hover:text-gray-700 dark:hover:text-white/90 focus:outline-none",e),...r,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{className:l("h-4 w-4 shrink-0 text-gray-400 dark:text-white/50 transition-transform duration-200",n&&"rotate-180 text-gray-900 dark:text-white")})]})}function H1({className:e,children:t,...r}){let{isOpen:o,value:a}=Te.useContext(ca);return o?jsxRuntime.jsx("div",{id:`accordion-content-${a}`,role:"region","aria-labelledby":`accordion-trigger-${a}`,className:l("px-4 pb-3 pt-0 text-sm text-gray-600 dark:text-white/70 animate-in slide-in-from-top-1 fade-in duration-200",e),...r,children:t}):null}Te__namespace.default.createContext(null);var Er=Te__namespace.default.forwardRef(({className:e,wrapperClassName:t,rounded:r=false,maxHeight:o,...a},n)=>jsxRuntime.jsx(pt,{className:l("w-full",r&&"rounded-2xl border border-white/10",t),style:{maxHeight:o},orientation:o?"both":"horizontal",scrollbarSize:"sm",children:jsxRuntime.jsx("table",{ref:n,className:l("w-full caption-bottom text-sm text-left",e),...a})}));Er.displayName="Table";var Sr=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("thead",{ref:r,className:l("bg-white/[0.02] text-white/55",e),...t}));Sr.displayName="TableHeader";var Dr=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("tbody",{ref:r,className:l("[&_tr:last-child]:border-0",e),...t}));Dr.displayName="TableBody";var bt=Te__namespace.default.forwardRef(({className:e,hoverable:t=true,optimized:r=false,...o},a)=>jsxRuntime.jsx("tr",{ref:a,className:l("border-t border-white/10 transition-colors data-[state=selected]:bg-white/[0.04]",t&&"hover:bg-white/[0.02]",e),style:r?{contentVisibility:"auto",containIntrinsicSize:"0 56px"}:void 0,...o}));bt.displayName="TableRow";var lt=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("th",{ref:r,className:l("h-10 px-5 py-3 text-left align-middle font-semibold text-white/55 [&:has([role=checkbox])]:pr-0 whitespace-nowrap",e),...t}));lt.displayName="TableHead";var qe=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("td",{ref:r,className:l("p-5 align-middle [&:has([role=checkbox])]:pr-0 text-white/85 whitespace-nowrap",e),...t}));qe.displayName="TableCell";function j1({data:e,columns:t,searchPlaceholder:r="Search...",searchKeys:o,onRowClick:a,className:n,maxHeight:s,rounded:i=true}){let[d,c]=Te.useState(""),[m,u]=Te.useState({key:"",direction:null}),p=Te.useMemo(()=>{let h=[...e];return d&&o&&(h=h.filter(x=>o.some(b=>String(x[b]??"").toLowerCase().includes(d.toLowerCase())))),m.key&&m.direction&&h.sort((x,b)=>{let f=x[m.key],w=b[m.key];return f==null||w===void 0||w===null?0:f<w?m.direction==="asc"?-1:1:f>w?m.direction==="asc"?1:-1:0}),h},[e,d,o,m]),g=h=>{u(x=>({key:h,direction:x.key===h&&x.direction==="asc"?"desc":"asc"}));};return jsxRuntime.jsxs("div",{className:l("space-y-4",n),children:[o&&jsxRuntime.jsx("div",{className:"relative max-w-sm",children:jsxRuntime.jsx(Pt,{placeholder:r,value:d,onChange:h=>c(h.target.value),leftIcon:jsxRuntime.jsx(lucideReact.Search,{className:"w-4 h-4 text-white/40"})})}),jsxRuntime.jsxs(Er,{rounded:i,maxHeight:s,children:[jsxRuntime.jsx(Sr,{children:jsxRuntime.jsx(bt,{children:t.map(h=>jsxRuntime.jsx(lt,{className:l(h.sortable&&"cursor-pointer select-none hover:text-cyan-500 transition-colors",h.className),onClick:()=>h.sortable&&g(h.key),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[h.header,h.sortable&&jsxRuntime.jsx("span",{className:"text-white/30",children:m.key===h.key?m.direction==="asc"?jsxRuntime.jsx(lucideReact.ArrowUp,{className:"w-3 h-3 text-cyan-500"}):jsxRuntime.jsx(lucideReact.ArrowDown,{className:"w-3 h-3 text-cyan-500"}):jsxRuntime.jsx(lucideReact.ArrowUpDown,{className:"w-3 h-3"})})]})},String(h.key)))})}),jsxRuntime.jsxs(Dr,{children:[p.map((h,x)=>jsxRuntime.jsx(bt,{onClick:()=>a?.(h),className:l(a&&"cursor-pointer hover:bg-white/[0.03] transition-colors group"),children:t.map(b=>jsxRuntime.jsx(qe,{className:b.className,children:b.render?b.render(h):h[b.key]},String(b.key)))},x)),p.length===0&&jsxRuntime.jsx(bt,{children:jsxRuntime.jsxs(qe,{colSpan:t.length,className:"h-32 text-center text-white/40",children:['No results found for "',d,'"']})})]})]})]})}var ma=Te__namespace.default.forwardRef(({className:e,containerClassName:t,alt:r,src:o,fallback:a,onLoad:n,onError:s,...i},d)=>{let[c,m]=Te.useState(true),[u,p]=Te.useState(false),g=x=>{m(false),n?.(x);},h=x=>{m(false),p(true),s?.(x);};return u&&a?jsxRuntime.jsx(jsxRuntime.Fragment,{children:a}):jsxRuntime.jsxs("div",{className:l("relative overflow-hidden rounded-2xl bg-gray-100 dark:bg-white/[0.02] border border-gray-200 dark:border-white/10",t),children:[c&&jsxRuntime.jsx(Zn,{className:"absolute inset-0 h-full w-full"}),jsxRuntime.jsx("img",{ref:d,src:o,alt:r,onLoad:g,onError:h,className:l("h-full w-full object-cover transition-opacity duration-300",c?"opacity-0":"opacity-100",e),...i})]})});ma.displayName="Image";var xm=classVarianceAuthority.cva("flex flex-col gap-4 rounded-2xl border p-4 transition-all duration-200",{variants:{variant:{default:"bg-white border-gray-200 dark:bg-white/[0.03] dark:border-white/10",glass:"backdrop-blur-md bg-white/80 border-white/20 dark:bg-black/40 dark:border-white/10"}},defaultVariants:{variant:"default"}}),vm=Te__namespace.default.forwardRef(({className:e,variant:t,user:r,onFollow:o,onMessage:a,...n},s)=>jsxRuntime.jsxs("div",{ref:s,className:l(xm({variant:t,className:e})),...n,children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between",children:[jsxRuntime.jsxs("div",{className:"flex gap-3",children:[jsxRuntime.jsx(F,{src:r.avatarSrc,alt:r.name,size:"lg"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:r.name}),r.role&&jsxRuntime.jsx("span",{className:"text-xs text-gray-500 dark:text-white/50",children:r.role}),r.email&&jsxRuntime.jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 mt-0.5",children:r.email})]})]}),o&&jsxRuntime.jsx(R,{size:"sm",variant:"outline",onClick:o,children:"Follow"})]}),r.bio&&jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 line-clamp-2",children:r.bio}),r.stats&&jsxRuntime.jsx("div",{className:"flex gap-4 border-t border-gray-100 pt-3 dark:border-white/5",children:r.stats.map((i,d)=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:i.value}),jsxRuntime.jsx("span",{className:"text-[10px] text-gray-500 dark:text-white/40",children:i.label})]},d))}),a&&jsxRuntime.jsx(R,{className:"w-full mt-2",onClick:a,children:"Message"})]}));vm.displayName="UserPreview";var km=classVarianceAuthority.cva("relative pl-8 pb-8 last:pb-0",{variants:{status:{default:"[&>div:first-child]:bg-gray-200 dark:[&>div:first-child]:bg-white/20",active:"[&>div:first-child]:bg-blue-500",success:"[&>div:first-child]:bg-emerald-500",error:"[&>div:first-child]:bg-rose-500"}},defaultVariants:{status:"default"}}),Nm=Te__namespace.default.forwardRef(({className:e,status:t,title:r,date:o,description:a,icon:n,isLast:s,...i},d)=>jsxRuntime.jsxs("div",{ref:d,className:l(km({status:t,className:e})),...i,children:[!s&&jsxRuntime.jsx("div",{className:"absolute left-[11px] top-[24px] bottom-0 w-px bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsx("div",{className:l("absolute left-0 top-1.5 flex h-6 w-6 items-center justify-center rounded-full border-2 border-white dark:border-black ring-1 ring-transparent transition-colors",t==="active"?"bg-blue-500 ring-blue-500/30":t==="success"?"bg-emerald-500 ring-emerald-500/30":t==="error"?"bg-rose-500 ring-rose-500/30":"bg-gray-200 dark:bg-white/20"),children:n&&jsxRuntime.jsx("span",{className:"text-white text-[10px]",children:n})}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:r}),o&&jsxRuntime.jsx("span",{className:"text-xs text-gray-500 dark:text-white/40",children:o})]}),a&&jsxRuntime.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:a})]})]}));Nm.displayName="TimelineItem";var uN=({children:e,className:t})=>jsxRuntime.jsx("div",{className:l("flex flex-col",t),children:e});var is=({node:e,depth:t=0,onSelect:r})=>{let[o,a]=Te.useState(false),n=e.children&&e.children.length>0,s=i=>{i.stopPropagation(),n&&a(!o),r?.(e);};return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 rounded-lg px-2 py-1.5 text-sm text-gray-700 transition-colors hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-white/[0.03] cursor-pointer"),style:{paddingLeft:`${t*12+8}px`},onClick:s,children:[n?jsxRuntime.jsx("span",{className:"text-gray-400 dark:text-white/40",children:o?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})}):jsxRuntime.jsx("span",{className:"w-4"}),e.icon?jsxRuntime.jsx("span",{className:"text-gray-500 dark:text-white/50",children:e.icon}):jsxRuntime.jsx("span",{className:"text-blue-500 dark:text-blue-400",children:n?o?jsxRuntime.jsx(lucideReact.FolderOpen,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"})}),jsxRuntime.jsx("span",{className:"truncate",children:e.label})]}),o&&n&&jsxRuntime.jsx("div",{className:"animate-in slide-in-from-top-1 fade-in duration-200",children:e.children.map(i=>jsxRuntime.jsx(is,{node:i,depth:t+1,onSelect:r},i.id))})]})},vN=({data:e,className:t,onSelect:r})=>jsxRuntime.jsx("div",{className:l("w-full select-none",t),children:e.map(o=>jsxRuntime.jsx(is,{node:o,onSelect:r},o.id))});function ls({title:e,view:t="board",onViewChange:r,onFilter:o,onSort:a,onAddColumn:n,canUndo:s,canRedo:i,onUndo:d,onRedo:c,className:m}){let u=[{id:"board",icon:lucideReact.Layout,label:"Board"},{id:"list",icon:lucideReact.List,label:"List"},{id:"calendar",icon:lucideReact.Calendar,label:"Calendar"},{id:"timeline",icon:lucideReact.Clock,label:"Timeline"}];return jsxRuntime.jsxs("div",{className:l("flex items-center justify-between mb-8",m),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-6",children:[jsxRuntime.jsx("h1",{className:"text-2xl font-bold text-white tracking-tight",children:e}),jsxRuntime.jsx("div",{className:"flex items-center bg-white/5 rounded-xl p-1",children:u.map(p=>jsxRuntime.jsxs("button",{onClick:()=>r?.(p.id),className:l("flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs font-medium transition-all",t===p.id?"bg-white/10 text-white shadow-lg":"text-white/40 hover:text-white/60"),children:[jsxRuntime.jsx(p.icon,{className:"h-3.5 w-3.5"}),p.label]},p.id))})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mr-2",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"icon",onClick:d,disabled:!s,className:"h-8 w-8 text-white/40 disabled:opacity-20",children:jsxRuntime.jsx(lucideReact.Undo2,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",onClick:c,disabled:!i,className:"h-8 w-8 text-white/40 disabled:opacity-20",children:jsxRuntime.jsx(lucideReact.Redo2,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",onClick:o,className:"gap-2 text-white/60",children:[jsxRuntime.jsx(lucideReact.Filter,{className:"h-4 w-4"}),"Filter"]}),jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",onClick:a,className:"gap-2 text-white/60",children:[jsxRuntime.jsx(lucideReact.SortAsc,{className:"h-4 w-4"}),"Sort"]}),jsxRuntime.jsx("div",{className:"w-px h-4 bg-white/10 mx-2"}),jsxRuntime.jsxs(R,{size:"sm",onClick:n,className:"gap-2",children:[jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"}),"Add Column"]}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-9 w-9 text-white/40",children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-4 w-4"})})]})]})}function ds({count:e,limit:t,className:r}){if(!t)return null;let o=e>t,a=Math.min(e/t*100,100);return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3",r),children:[jsxRuntime.jsx("div",{className:"flex-1 h-1 bg-white/5 rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:l("h-full transition-all duration-500",o?"bg-red-500":a>80?"bg-orange-500":"bg-blue-500"),style:{width:`${a}%`}})}),jsxRuntime.jsxs("div",{className:l("flex items-center gap-1.5 text-[10px] font-bold px-2 py-0.5 rounded-full",o?"bg-red-500/20 text-red-400":"bg-white/5 text-white/40"),children:[o&&jsxRuntime.jsx(lucideReact.AlertCircle,{className:"h-3 w-3"}),e,"/",t]})]})}var fa=Te__namespace.default.memo(({task:e,isSelected:t,showTimer:r,onEdit:o,onDelete:a,draggable:n=true,activeTimerTaskId:s,selectable:i,cardClassName:d,onTaskClick:c,onTaskSelectionChange:m,onTaskTimerToggle:u,onDragStart:p,onDragOver:g,onDrop:h,renderCard:x})=>{if(x)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:x(e)});let b=f=>{switch(f){case "urgent":return "danger";case "high":return "warning";case "medium":return "info";case "low":return "success";default:return "neutral"}};return jsxRuntime.jsx(ce,{onClick:f=>c?.(f,e),draggable:n,onDragStart:p,onDragOver:g,onDrop:h,className:l("p-6 border border-white/10 bg-white/[0.03] hover:bg-white/[0.06] transition-all duration-200 rounded-2xl group cursor-grab active:cursor-grabbing",e.blockedBy&&e.blockedBy.length>0&&"border-red-500/30 bg-red-500/[0.02]",t&&"ring-2 ring-cyan-500/50 bg-cyan-500/[0.02]",d),children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-3",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i&&jsxRuntime.jsx(Yo,{checked:t,onChange:f=>{m?.(t?[]:[e.id]);},onClick:f=>f.stopPropagation(),className:"mr-1"}),e.blockedBy&&e.blockedBy.length>0&&jsxRuntime.jsx(lucideReact.Lock,{className:"h-3.5 w-3.5 text-red-500 flex-shrink-0"}),jsxRuntime.jsx(Ne,{className:l("font-medium text-sm leading-tight group-hover:text-cyan-400 transition-colors truncate",e.blockedBy&&e.blockedBy.length>0&&"text-red-400/80"),children:e.title})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[a&&jsxRuntime.jsx("button",{onClick:f=>{f.stopPropagation(),a(e.id);},className:"p-1 rounded-md hover:bg-red-500/20 text-white/20 hover:text-red-400 transition-colors",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-3.5 w-3.5"})}),n&&jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-white/20 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]})]}),e.description&&jsxRuntime.jsx(Ne,{className:"text-xs text-white/50 line-clamp-2",children:e.description}),e.progress!==void 0&&jsxRuntime.jsxs("div",{className:"space-y-1.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[jsxRuntime.jsx("span",{className:"text-white/30 uppercase font-bold tracking-wider",children:"Progress"}),jsxRuntime.jsxs("span",{className:"text-white/50",children:[e.progress,"%"]})]}),jsxRuntime.jsx("div",{className:"h-1 w-full bg-white/[0.03] rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:"h-full bg-cyan-500 transition-all duration-500",style:{width:`${e.progress}%`}})})]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2 mt-1",children:[e.priority&&jsxRuntime.jsx(Ue,{variant:b(e.priority),className:"text-[10px] px-1.5 py-0 uppercase font-bold",children:e.priority}),e.tags?.map(f=>jsxRuntime.jsx(Ue,{variant:"neutral",className:"text-[10px] px-1.5 py-0 bg-white/[0.03] border-white/5",children:f},f))]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between mt-2 pt-3 border-t border-white/5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-white/30",children:[e.timeSpent!==void 0&&jsxRuntime.jsxs("div",{className:l("flex items-center gap-1 px-1.5 py-0.5 rounded-md transition-colors",s===e.id?"bg-cyan-500/20 text-cyan-400":"bg-white/[0.03]"),children:[s===e.id?jsxRuntime.jsx(lucideReact.Pause,{className:"h-2.5 w-2.5 cursor-pointer hover:scale-110 transition-transform",onClick:f=>{f.stopPropagation(),u?.(e.id);}}):jsxRuntime.jsx(lucideReact.Play,{className:"h-2.5 w-2.5 cursor-pointer hover:scale-110 transition-transform",onClick:f=>{f.stopPropagation(),u?.(e.id);}}),jsxRuntime.jsxs("span",{className:"font-mono",children:[Math.floor(e.timeSpent/3600),"h ",Math.floor(e.timeSpent%3600/60),"m"]})]}),e.comments!==void 0&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-3 w-3"}),e.comments]}),e.attachments!==void 0&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-3 w-3"}),e.attachments]}),e.dueDate&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Clock,{className:"h-3 w-3"}),e.dueDate]})]}),e.assignee&&jsxRuntime.jsx("div",{className:"flex -space-x-2",children:jsxRuntime.jsx("div",{className:"h-6 w-6 rounded-full border-2 border-[#0a0a0a] bg-white/[0.06] flex items-center justify-center text-[10px] font-bold overflow-hidden",children:e.assignee.avatar?jsxRuntime.jsx("img",{src:e.assignee.avatar,alt:e.assignee.name,className:"h-full w-full object-cover"}):e.assignee.name[0]})})]})]})})});fa.displayName="KanbanCard";function ga({column:e,tasks:t,onAddTask:r,onCollapse:o,onTaskClick:a,onAction:n,onDragStart:s,onDragOver:i,onDrop:d,isCollapsed:c,children:m,className:u}){return jsxRuntime.jsxs("div",{className:l("flex flex-col h-full transition-all duration-300",c?"w-12":"w-80",u),onDragOver:p=>i?.(p),onDrop:p=>d?.(p),onDragStart:p=>s?.(p,e.id,"column"),draggable:!c,children:[jsxRuntime.jsxs("div",{className:l("flex items-center justify-between mb-4 px-2",c&&"flex-col gap-4"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[jsxRuntime.jsx("button",{onClick:()=>o?.(e.id),className:"p-1 rounded hover:bg-white/5 text-white/40",children:c?jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"})}),!c&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:e.color||"#3b82f6"}}),jsxRuntime.jsx("h3",{className:"font-bold text-sm text-white truncate",children:e.title}),jsxRuntime.jsx("span",{className:"text-[10px] font-bold px-1.5 py-0.5 rounded-md bg-white/5 text-white/40",children:t.length})]})]}),!c&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>r?.(e.id),children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>n?.("more"),children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-4 w-4"})})]})]}),!c&&e.limit&&jsxRuntime.jsx("div",{className:"px-2 mb-4",children:jsxRuntime.jsx(ds,{count:t.length,limit:e.limit})}),jsxRuntime.jsx("div",{className:l("flex-1 overflow-y-auto min-h-0 px-2 space-y-3 custom-scrollbar",c&&"hidden"),children:m||t.map(p=>jsxRuntime.jsx(fa,{task:p,onTaskClick:(g,h)=>a?.(h),onDragStart:g=>s?.(g,p.id,"task"),onDragOver:g=>i?.(g,p.id),onDrop:g=>d?.(g,p.id)},p.id))}),c&&jsxRuntime.jsx("div",{className:"flex-1 flex items-center justify-center",children:jsxRuntime.jsx("span",{className:"rotate-90 whitespace-nowrap text-[10px] font-bold uppercase tracking-widest text-white/20",children:e.title})})]})}function po({tasks:e,columns:t,onTaskClick:r,className:o}){let a=n=>t.find(s=>s.id===n);return jsxRuntime.jsx("div",{className:l("bg-white/[0.02] border border-white/5 rounded-2xl overflow-hidden",o),children:jsxRuntime.jsxs(Er,{children:[jsxRuntime.jsx(Sr,{children:jsxRuntime.jsxs(bt,{className:"hover:bg-transparent border-white/5",children:[jsxRuntime.jsx(lt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Task"}),jsxRuntime.jsx(lt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Status"}),jsxRuntime.jsx(lt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Priority"}),jsxRuntime.jsx(lt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Assignee"}),jsxRuntime.jsx(lt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Due Date"})]})}),jsxRuntime.jsx(Dr,{children:e.map(n=>{let s=a(n.columnId);return jsxRuntime.jsxs(bt,{className:"border-white/5 hover:bg-white/[0.03] cursor-pointer transition-colors",onClick:()=>r?.(n),children:[jsxRuntime.jsx(qe,{className:"font-medium text-white",children:n.title}),jsxRuntime.jsx(qe,{children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:s?.color||"#3b82f6"}}),jsxRuntime.jsx("span",{className:"text-xs text-white/60",children:s?.title})]})}),jsxRuntime.jsx(qe,{children:jsxRuntime.jsx(Ue,{variant:n.priority==="urgent"?"danger":n.priority==="high"?"warning":"info",className:"text-[10px] uppercase",children:n.priority||"medium"})}),jsxRuntime.jsx(qe,{children:n.assignee&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(F,{src:n.assignee.avatar,alt:n.assignee.name,size:"sm"}),jsxRuntime.jsx("span",{className:"text-xs text-white/60",children:n.assignee.name})]})}),jsxRuntime.jsx(qe,{className:"text-xs text-white/40",children:n.dueDate?new Date(n.dueDate).toLocaleDateString():"-"})]},n.id)})})]})})}function us({tasks:e,className:t}){return jsxRuntime.jsxs("div",{className:l("p-8 bg-white/[0.02] border border-white/5 rounded-2xl flex flex-col items-center justify-center min-h-[400px]",t),children:[jsxRuntime.jsx("div",{className:"h-12 w-12 rounded-full bg-blue-500/10 flex items-center justify-center mb-4",children:jsxRuntime.jsx("div",{className:"h-6 w-6 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})}),jsxRuntime.jsx("h3",{className:"text-lg font-bold text-white mb-2",children:"Timeline View"}),jsxRuntime.jsxs("p",{className:"text-sm text-white/40 text-center max-w-xs",children:["The timeline view is currently being optimized for high-performance rendering of ",e.length," tasks."]})]})}function ps({tasks:e,columns:t,onTaskClick:r,className:o}){return jsxRuntime.jsx(po,{tasks:e,columns:t,onTaskClick:r,className:o})}function fs({tasks:e,onTaskClick:t,onAddTask:r,className:o}){let[a,n]=Te.useState(new Date),s=(f,w)=>new Date(f,w+1,0).getDate(),i=(f,w)=>new Date(f,w,1).getDay(),d=a.getFullYear(),c=a.getMonth(),m=s(d,c),u=i(d,c),p=()=>n(new Date(d,c-1,1)),g=()=>n(new Date(d,c+1,1)),h=["January","February","March","April","May","June","July","August","September","October","November","December"],x=[];for(let f=0;f<u;f++)x.push(null);for(let f=1;f<=m;f++)x.push(new Date(d,c,f));let b=f=>e.filter(w=>{if(!w.dueDate)return false;let v=new Date(w.dueDate);return v.getDate()===f.getDate()&&v.getMonth()===f.getMonth()&&v.getFullYear()===f.getFullYear()});return jsxRuntime.jsxs("div",{className:l("flex flex-col h-full",o),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-6",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsxs(iu,{level:3,className:"text-white",children:[h[c]," ",d]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"sm",onClick:p,children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"sm",onClick:g,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]}),jsxRuntime.jsx(R,{variant:"ghost",size:"sm",onClick:()=>n(new Date),children:"Today"})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-7 gap-px bg-white/5 border border-white/5 rounded-2xl overflow-hidden flex-1",children:[["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(f=>jsxRuntime.jsx("div",{className:"bg-white/[0.02] p-3 text-center",children:jsxRuntime.jsx(Ne,{size:"xs",className:"text-white/40 font-medium uppercase tracking-wider",children:f})},f)),x.map((f,w)=>jsxRuntime.jsx("div",{className:l("bg-gray-900/50 min-h-[120px] p-2 group transition-colors hover:bg-white/[0.02]",!f&&"bg-transparent"),children:f&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-2",children:[jsxRuntime.jsx("span",{className:l("text-xs font-medium w-6 h-6 flex items-center justify-center rounded-full",f.toDateString()===new Date().toDateString()?"bg-blue-500 text-white":"text-white/40"),children:f.getDate()}),jsxRuntime.jsx("button",{onClick:()=>r?.(f),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-white/10 rounded-lg transition-all",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-3 w-3 text-white/40"})})]}),jsxRuntime.jsx("div",{className:"space-y-1",children:b(f).map(v=>jsxRuntime.jsx("div",{onClick:()=>t?.(v),className:"px-2 py-1 rounded-lg bg-blue-500/10 border border-blue-500/20 cursor-pointer hover:bg-blue-500/20 transition-all",children:jsxRuntime.jsx(Ne,{size:"xs",className:"text-blue-400 truncate",children:v.title})},v.id))})]})},w))]})]})}function iu({children:e,level:t,className:r}){let o=`h${t}`;return jsxRuntime.jsx(o,{className:l("font-semibold",r),children:e})}function gs({children:e,...t}){return jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-2xl bg-white dark:bg-black/90 text-gray-900 dark:text-white",children:jsxRuntime.jsx(Jo,{usePopover:false,...t,children:e})})}function w2({children:e,open:t,onOpenChange:r,...o}){let a=Te.useRef(null);Te.useEffect(()=>{let s=i=>{i.key==="Escape"&&r(false);};return t&&(document.addEventListener("keydown",s),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",s),document.body.style.overflow="unset";}},[t,r]);let n=s=>{s.target===a.current&&r(false);};return t?reactDom.createPortal(jsxRuntime.jsx("div",{ref:a,onClick:n,className:"fixed inset-0 z-[100] flex items-start justify-center bg-black/60 backdrop-blur-sm animate-in fade-in duration-200 pt-[20vh]",children:jsxRuntime.jsx("div",{className:"relative w-full max-w-lg overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/90 shadow-2xl animate-in zoom-in-95 duration-200",children:jsxRuntime.jsx(Jo,{usePopover:false,...o,children:e})})}),document.body):null}function bs({className:e,...t}){return jsxRuntime.jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-white/10 px-3","cmdk-input-wrapper":"",children:[jsxRuntime.jsx(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsxRuntime.jsx(Bn,{className:l("flex h-12 w-full rounded-md bg-transparent py-3 text-sm text-gray-900 dark:text-white outline-none placeholder:text-gray-400 dark:placeholder:text-white/50 disabled:cursor-not-allowed disabled:opacity-50 border-none focus:ring-0 px-0",e),...t})]})}function hs({className:e,...t}){return jsxRuntime.jsx(Vn,{className:l("max-h-[300px] overflow-y-auto overflow-x-hidden p-2",e),...t})}function y2(e){return jsxRuntime.jsx(On,{className:"py-6 text-center text-sm",...e})}function xs({children:e,heading:t,className:r,...o}){return jsxRuntime.jsxs("div",{className:l("overflow-hidden p-1 text-gray-900 dark:text-white",r),...o,children:[t&&jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-gray-500 dark:text-white/50",children:t}),e]})}function vs({className:e,...t}){return jsxRuntime.jsx(zn,{className:l("relative flex cursor-default select-none items-center rounded-2xl px-2 py-1.5 text-sm outline-none text-gray-900 dark:text-white aria-selected:bg-gray-100 dark:aria-selected:bg-white/[0.06] aria-selected:text-gray-900 dark:aria-selected:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t})}function k2({className:e,...t}){return jsxRuntime.jsx("span",{className:l("ml-auto text-xs tracking-widest text-gray-400 dark:text-white/50",e),...t})}function ys({onSearchChange:e,onFilterChange:t,onSortChange:r,onViewChange:o,onGroupChange:a,priorityOptions:n=[],tagOptions:s=[],assigneeOptions:i=[],viewOptions:d=["board","list","calendar","timeline"],sortOptions:c=[],groupOptions:m=[],savedFilters:u=[],onSaveFilter:p,className:g}){let[h,x]=Te.useState(""),[b,f]=Te.useState({}),[w,v]=Te.useState("board"),y=(C,T)=>{let E=b[C]||[],B=E.includes(T)?E.filter(D=>D!==T):[...E,T],S={...b,[C]:B};B.length===0&&delete S[C],f(S),t?.(S);},k=()=>{f({}),t?.({}),x(""),e?.("");},N=Object.values(b).flat().length;return jsxRuntime.jsxs(ce,{className:l("p-2 flex flex-wrap items-center gap-3 bg-white/[0.02] border-white/5",g),children:[jsxRuntime.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-white/20"}),jsxRuntime.jsx("input",{type:"text",placeholder:"Search tasks...",className:"w-full pl-10 pr-4 py-2 text-sm rounded-2xl border border-white/10 bg-white/[0.03] focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all placeholder:text-white/20 text-white",value:h,onChange:C=>{x(C.target.value),e?.(C.target.value);}})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(xa,{label:"Priority",options:n,selected:b.priority||[],onSelect:C=>y("priority",C)}),jsxRuntime.jsx(xa,{label:"Tags",options:s,selected:b.tags||[],onSelect:C=>y("tags",C)}),jsxRuntime.jsx(xa,{label:"Assignee",options:i,selected:b.assignee||[],onSelect:C=>y("assignee",C)}),jsxRuntime.jsx("div",{className:"w-px h-4 bg-white/10 mx-1"}),jsxRuntime.jsxs(nt,{children:[jsxRuntime.jsx(st,{children:jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",className:"h-9 gap-2 text-white/60",children:[jsxRuntime.jsx(lucideReact.SortAsc,{className:"h-4 w-4"}),"Sort"]})}),jsxRuntime.jsx(it,{className:"w-48 p-1 bg-gray-900 border-white/10",children:c.map(C=>jsxRuntime.jsx("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-xs text-white/60 hover:text-white hover:bg-white/5 rounded-lg text-left",onClick:()=>r?.(C.value,"asc"),children:C.label},C.value))})]}),N>0&&jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",onClick:k,className:"h-9 px-3 text-xs text-white/40 hover:text-white gap-2",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-3.5 w-3.5"})," Clear",jsxRuntime.jsx(Ue,{variant:"neutral",className:"bg-white/[0.06] border-white/10 ml-1",children:N})]})]})]})}function xa({label:e,options:t,selected:r,onSelect:o}){return jsxRuntime.jsxs(nt,{children:[jsxRuntime.jsx(st,{children:jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",className:l("h-9 gap-2 text-xs transition-all",r.length>0?"bg-blue-500/10 text-blue-400":"text-white/60 hover:text-white"),children:[e,r.length>0?jsxRuntime.jsx(Ue,{variant:"info",className:"h-4 min-w-[16px] px-1 bg-blue-500 text-white border-none",children:r.length}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-3.5 w-3.5 opacity-40"})]})}),jsxRuntime.jsx(it,{className:"w-56 p-0 bg-gray-900 border-white/10 shadow-2xl",children:jsxRuntime.jsxs(gs,{children:[jsxRuntime.jsx(bs,{placeholder:`Search ${e.toLowerCase()}...`,className:"border-none"}),jsxRuntime.jsx(hs,{className:"max-h-[240px]",children:jsxRuntime.jsx(xs,{children:t.map(a=>jsxRuntime.jsxs(vs,{value:a.value,onClick:()=>o(a.value),className:"flex items-center justify-between py-2 px-3 cursor-pointer hover:bg-white/5",children:[jsxRuntime.jsx("span",{className:"text-xs text-white/80",children:a.label}),r.includes(a.value)&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3.5 w-3.5 text-blue-500"})]},a.value))})})]})})]})}function fo({isOpen:e,onClose:t,children:r,className:o}){let a=Te.useRef(null),[n,s]=Te__namespace.default.useState(false);Te.useEffect(()=>{s(true);},[]),Te.useEffect(()=>{let d=a.current;d&&(e?d.open||(d.showModal(),document.body.style.overflow="hidden"):d.open&&(d.close(),document.body.style.overflow="unset"));},[e,n]),Te.useEffect(()=>{let d=a.current;if(!d)return;let c=m=>{m.preventDefault(),t();};return d.addEventListener("cancel",c),()=>d.removeEventListener("cancel",c)},[t,n]);let i=d=>{d.target===a.current&&t();};return n?reactDom.createPortal(jsxRuntime.jsx("dialog",{ref:a,onClick:i,className:l("fixed inset-0 z-[100] m-auto bg-transparent p-0 backdrop:bg-black/60 backdrop:backdrop-blur-sm open:flex open:items-center open:justify-center","animate-in fade-in duration-200",o),children:jsxRuntime.jsxs("div",{className:l("relative w-full max-w-lg scale-100 gap-4 border border-zinc-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 p-6 shadow-2xl backdrop-blur-xl transition-all sm:rounded-2xl","animate-in fade-in zoom-in-95 duration-200 slide-in-from-bottom-2"),children:[r,jsxRuntime.jsxs("button",{onClick:t,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20 disabled:pointer-events-none",children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:[jsxRuntime.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntime.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})}),document.body):null}function go({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left mb-4",e),children:t})}function bo({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),children:t})}function ks({className:e,children:t}){return jsxRuntime.jsx(at,{as:"h2",className:l("text-lg font-semibold leading-none tracking-tight",e),children:t})}function Y2({className:e,children:t}){return jsxRuntime.jsx(Ne,{variant:"muted",className:l("text-sm",e),children:t})}function Ns({items:e,onToggle:t,className:r}){if(!e||e.length===0)return null;let o=e.filter(n=>n.completed).length,a=o/e.length*100;return jsxRuntime.jsxs("div",{className:l("space-y-3",r),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between text-[10px] text-white/40 uppercase tracking-wider font-bold",children:[jsxRuntime.jsx("span",{children:"Checklist"}),jsxRuntime.jsxs("span",{children:[o,"/",e.length]})]}),jsxRuntime.jsx("div",{className:"h-1 w-full bg-white/5 rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:"h-full bg-blue-500 transition-all duration-500",style:{width:`${a}%`}})}),jsxRuntime.jsx("div",{className:"space-y-2",children:e.map(n=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 group cursor-pointer",onClick:()=>t?.(n.id),children:[n.completed?jsxRuntime.jsx(lucideReact.CheckSquare,{className:"h-4 w-4 text-blue-500"}):jsxRuntime.jsx(lucideReact.Square,{className:"h-4 w-4 text-white/20 group-hover:text-white/40"}),jsxRuntime.jsx("span",{className:l("text-sm transition-colors",n.completed?"text-white/40 line-through":"text-white/80"),children:n.title})]},n.id))})]})}function Ts({comments:e,onAddComment:t,className:r}){let[o,a]=Te.useState(""),n=()=>{o.trim()&&(t?.(o),a(""));};return jsxRuntime.jsxs("div",{className:l("space-y-6",r),children:[jsxRuntime.jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Comments"}),jsxRuntime.jsx("div",{className:"flex gap-3",children:jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx(Mr,{placeholder:"Write a comment...",value:o,onChange:s=>a(s.target.value),className:"min-h-[80px] bg-white/[0.03] border-white/10 text-sm"}),jsxRuntime.jsx("div",{className:"flex justify-end mt-2",children:jsxRuntime.jsxs(R,{size:"sm",onClick:n,disabled:!o.trim(),className:"gap-2",children:[jsxRuntime.jsx(lucideReact.Send,{className:"h-3.5 w-3.5"}),"Comment"]})})]})}),jsxRuntime.jsx("div",{className:"space-y-6",children:e.map(s=>jsxRuntime.jsxs("div",{className:"flex gap-3",children:[jsxRuntime.jsx(F,{src:s.user.avatar,alt:s.user.name,size:"sm"}),jsxRuntime.jsxs("div",{className:"flex-1 bg-white/[0.03] border border-white/5 rounded-2xl p-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-1",children:[jsxRuntime.jsx("span",{className:"text-xs font-bold text-white",children:s.user.name}),jsxRuntime.jsx("span",{className:"text-[10px] text-white/30",children:s.timestamp.toLocaleString()})]}),jsxRuntime.jsx("p",{className:"text-sm text-white/70 leading-relaxed",children:s.content})]})]},s.id))})]})}function Cs({attachments:e,onRemove:t,onDownload:r,className:o}){return jsxRuntime.jsxs("div",{className:l("space-y-4",o),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Attachments"}),jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 text-white/40 hover:text-white",children:[jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-3 w-3"}),"Add"]})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-3",children:e.map(a=>jsxRuntime.jsxs("div",{className:"group relative bg-white/[0.03] border border-white/5 rounded-xl overflow-hidden hover:border-white/20 transition-all",children:[a.thumbnail?jsxRuntime.jsx("div",{className:"aspect-video w-full overflow-hidden",children:jsxRuntime.jsx("img",{src:a.thumbnail,alt:a.name,className:"w-full h-full object-cover"})}):jsxRuntime.jsx("div",{className:"aspect-video w-full flex items-center justify-center bg-white/5",children:jsxRuntime.jsx(lucideReact.FileIcon,{className:"h-8 w-8 text-white/20"})}),jsxRuntime.jsxs("div",{className:"p-2",children:[jsxRuntime.jsx("p",{className:"text-xs font-medium text-white truncate",children:a.name}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/30 uppercase",children:a.size})]}),jsxRuntime.jsxs("div",{className:"absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-full bg-white/10 hover:bg-white/20",onClick:()=>r?.(a),children:jsxRuntime.jsx(lucideReact.Download,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-full bg-red-500/20 hover:bg-red-500/40 text-red-400",onClick:()=>t?.(a.id),children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})]},a.id))})]})}function Ms({labels:e,selectedIds:t,onToggle:r,className:o}){return jsxRuntime.jsxs("div",{className:l("space-y-3",o),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Tag,{className:"h-3 w-3"}),"Labels"]}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(a=>{let n=t.includes(a.id);return jsxRuntime.jsxs("button",{onClick:()=>r(a.id),className:l("px-3 py-1.5 rounded-full text-xs font-medium transition-all flex items-center gap-2 border",n?"bg-white/10 border-white/20 text-white":"bg-transparent border-white/5 text-white/40 hover:border-white/10"),children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:a.color}}),a.name,n&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})]},a.id)})})]})}function Rs({users:e,selectedId:t,onSelect:r,className:o}){return jsxRuntime.jsxs("div",{className:l("space-y-3",o),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Users,{className:"h-3 w-3"}),"Assignee"]}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 gap-1",children:e.map(a=>{let n=t===a.id;return jsxRuntime.jsxs("button",{onClick:()=>r(a.id),className:l("flex items-center gap-3 p-2 rounded-xl transition-all text-left",n?"bg-white/10 text-white":"text-white/60 hover:bg-white/5"),children:[jsxRuntime.jsx(F,{src:a.avatar,alt:a.name,size:"sm"}),jsxRuntime.jsx("span",{className:"text-sm flex-1 truncate",children:a.name}),n&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-blue-500"})]},a.id)})})]})}function Ps({date:e,onChange:t,className:r}){return jsxRuntime.jsxs("div",{className:l("space-y-3",r),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-3 w-3"}),"Due Date"]}),e?jsxRuntime.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-2xl bg-white/5 border border-white/10",children:[jsxRuntime.jsx("div",{className:"h-8 w-8 rounded-lg bg-blue-500/20 flex items-center justify-center text-blue-400",children:jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-white",children:e.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/40",children:e.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})})]}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/20 hover:text-red-400",onClick:()=>t(void 0),children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}):jsxRuntime.jsxs(R,{variant:"ghost",className:"w-full justify-start gap-3 h-12 rounded-2xl border border-dashed border-white/10 text-white/40 hover:border-white/20 hover:bg-white/5",onClick:()=>t(new Date),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"}),"Set due date"]})]})}function Ss({initialSeconds:e=0,onTimeUpdate:t,className:r}){let[o,a]=Te.useState(e),[n,s]=Te.useState(false);Te.useEffect(()=>{let d=null;return n?d=setInterval(()=>{a(c=>{let m=c+1;return t?.(m),m});},1e3):clearInterval(d),()=>clearInterval(d)},[n,t]);let i=d=>{let c=Math.floor(d/3600),m=Math.floor(d%3600/60),u=d%60;return `${c.toString().padStart(2,"0")}:${m.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}`};return jsxRuntime.jsxs("div",{className:l("space-y-3",r),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Timer,{className:"h-3 w-3"}),"Time Tracking"]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-2xl bg-white/[0.03] border border-white/5",children:[jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("p",{className:"text-2xl font-mono font-bold text-white tracking-tight",children:i(o)}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/30 uppercase font-bold mt-1",children:"Total Time Spent"})]}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-10 w-10 rounded-full bg-white/5 hover:bg-white/10",onClick:()=>a(0),children:jsxRuntime.jsx(lucideReact.RotateCcw,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:n?"secondary":"primary",size:"icon",className:l("h-10 w-10 rounded-full shadow-lg transition-all",n?"bg-orange-500 hover:bg-orange-600":"bg-blue-600 hover:bg-blue-700"),onClick:()=>s(!n),children:n?jsxRuntime.jsx(lucideReact.Pause,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Play,{className:"h-4 w-4 ml-0.5"})})]})]})]})}function Ds({isOpen:e,onClose:t,onSave:r,onDelete:o,onDuplicate:a,onArchive:n,task:s,columnId:i,columns:d=[],users:c=[],availableLabels:m=[],showSubtasks:u=true,showChecklist:p=true,showAttachments:g=true,showComments:h=true,showActivity:x=true}){let[b,f]=Te.useState(""),[w,v]=Te.useState(""),[y,k]=Te.useState("medium"),[N,C]=Te.useState(""),[T,E]=Te.useState(void 0),[B,S]=Te.useState([]),[D,K]=Te.useState(void 0);Te.useEffect(()=>{s?(f(s.title||""),v(s.description||""),k(s.priority||"medium"),C(s.columnId||""),E(s.assignee?.id),S(s.labels?.map(M=>M.id)||[]),K(s.dueDate?new Date(s.dueDate):void 0)):(f(""),v(""),k("medium"),C(i||""),E(void 0),S([]),K(void 0));},[s,e,i]);let H=()=>{b.trim()&&(r({...s,title:b,description:w,priority:y,columnId:N,assignee:c.find(M=>M.id===T),labels:m.filter(M=>B.includes(M.id)),dueDate:D?.toISOString()}),t());};return jsxRuntime.jsxs(fo,{isOpen:e,onClose:t,children:[jsxRuntime.jsxs(go,{className:"flex items-center justify-between pr-12",children:[jsxRuntime.jsx(ks,{children:s?"Edit Task":"Create New Task"}),jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>a?.(s),children:jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>n?.(s.id),children:jsxRuntime.jsx(lucideReact.Archive,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-red-400",onClick:()=>o?.(s.id),children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4"})})]})})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8 py-6",children:[jsxRuntime.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{htmlFor:"task-title",className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Title"}),jsxRuntime.jsx(Pt,{id:"task-title",placeholder:"What needs to be done?",value:b,onChange:M=>f(M.target.value),className:"text-lg font-bold bg-transparent border-white/10 focus:border-blue-500",autoFocus:true})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{htmlFor:"task-desc",className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Description"}),jsxRuntime.jsx(Mr,{id:"task-desc",placeholder:"Add more details...",value:w,onChange:M=>v(M.target.value),rows:6,className:"bg-white/[0.03] border-white/10 text-sm leading-relaxed"})]}),p&&s?.checklist&&jsxRuntime.jsx(Ns,{items:s.checklist}),g&&s?.attachments&&jsxRuntime.jsx(Cs,{attachments:[]}),h&&jsxRuntime.jsx(Ts,{comments:[]})]}),jsxRuntime.jsxs("div",{className:"space-y-8 bg-white/[0.02] p-6 rounded-3xl border border-white/5 h-fit",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Status"}),jsxRuntime.jsx(to,{value:N,onChange:M=>C(M),options:d.map(M=>({label:M.title,value:M.id})),className:"bg-white/5 border-white/10"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Priority"}),jsxRuntime.jsx(to,{value:y,onChange:M=>k(M),options:[{label:"Low",value:"low"},{label:"Medium",value:"medium"},{label:"High",value:"high"},{label:"Urgent",value:"urgent"}],className:"bg-white/5 border-white/10"})]}),jsxRuntime.jsx(Rs,{users:c,selectedId:T,onSelect:E}),jsxRuntime.jsx(Ms,{labels:m,selectedIds:B,onToggle:M=>S($=>$.includes(M)?$.filter(ee=>ee!==M):[...$,M])}),jsxRuntime.jsx(Ps,{date:D,onChange:K}),jsxRuntime.jsx(Ss,{initialSeconds:s?.timeSpent})]})]}),jsxRuntime.jsxs(bo,{className:"border-t border-white/5 pt-6",children:[jsxRuntime.jsx(R,{variant:"ghost",onClick:t,children:"Cancel"}),jsxRuntime.jsx(R,{onClick:H,className:"px-8",children:"Save Changes"})]})]})}function Hs({title:e,count:t,isCollapsed:r,onToggle:o,children:a,className:n}){return jsxRuntime.jsxs("div",{className:l("space-y-4",n),children:[jsxRuntime.jsxs("button",{onClick:o,className:"flex items-center gap-3 w-full group",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[r?jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 text-white/20"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4 text-white/20"}),jsxRuntime.jsx("h4",{className:"text-xs font-bold uppercase tracking-widest text-white/40 group-hover:text-white/60 transition-colors",children:e})]}),jsxRuntime.jsx("div",{className:"h-px flex-1 bg-white/5"}),jsxRuntime.jsx("span",{className:"text-[10px] font-bold px-2 py-0.5 rounded-full bg-white/5 text-white/20",children:t})]}),!r&&jsxRuntime.jsx("div",{className:"animate-in fade-in slide-in-from-top-2 duration-300",children:a})]})}function Bs(e){let[t,r]=Te.useState(""),[o,a]=Te.useState({}),n=Te.useMemo(()=>e.filter(d=>{if(t){let c=t.toLowerCase();if(!(d.title.toLowerCase().includes(c)||d.description?.toLowerCase().includes(c)||d.tags?.some(u=>u.toLowerCase().includes(c))))return false}for(let[c,m]of Object.entries(o))if(!(!m||m.length===0)&&(c==="priority"&&!m.includes(d.priority)||c==="assignee"&&(!d.assignee||!m.includes(d.assignee.id))||c==="tags"&&!d.tags?.some(u=>m.includes(u))))return false;return true}),[e,t,o]),s=Te.useCallback((d,c)=>{a(m=>{let u=m[d]||[],p=u.includes(c)?u.filter(h=>h!==c):[...u,c],g={...m,[d]:p};return p.length===0&&delete g[d],g});},[]),i=Te.useCallback(()=>{a({}),r("");},[]);return {searchQuery:t,setSearchQuery:r,activeFilters:o,setActiveFilters:a,filteredTasks:n,toggleFilter:s,clearFilters:i}}function Vs(e){let[t,r]=Te.useState({history:[e],currentIndex:0}),o=Te.useRef(e);Te.useEffect(()=>{let i=e.tasks.length!==o.current.tasks.length||e.tasks.some((c,m)=>c.id!==o.current.tasks[m]?.id||c.columnId!==o.current.tasks[m]?.columnId),d=e.columns.length!==o.current.columns.length||e.columns.some((c,m)=>c.id!==o.current.columns[m]?.id);if(i||d){let c=t.history[t.currentIndex];c&&e.tasks.length===c.tasks.length&&e.tasks.every((u,p)=>u.id===c.tasks[p]?.id&&u.columnId===c.tasks[p]?.columnId)||r({history:[e],currentIndex:0}),o.current=e;}},[e,t.history,t.currentIndex]);let a=Te.useCallback(i=>{r(d=>({history:[...d.history.slice(0,d.currentIndex+1),i],currentIndex:d.currentIndex+1}));},[]),n=Te.useCallback(()=>{r(i=>i.currentIndex>0?{...i,currentIndex:i.currentIndex-1}:i);},[]),s=Te.useCallback(()=>{r(i=>i.currentIndex<i.history.length-1?{...i,currentIndex:i.currentIndex+1}:i);},[]);return {state:t.history[t.currentIndex],pushState:a,undo:n,redo:s,canUndo:t.currentIndex>0,canRedo:t.currentIndex<t.history.length-1}}function Os({onUndo:e,onRedo:t,onSearch:r,onNewTask:o,onNewColumn:a,enabled:n=true}){Te.useEffect(()=>{if(!n)return;let s=i=>{(i.ctrlKey||i.metaKey)&&i.key==="z"&&!i.shiftKey&&(i.preventDefault(),e?.()),((i.ctrlKey||i.metaKey)&&i.key==="z"&&i.shiftKey||(i.ctrlKey||i.metaKey)&&i.key==="y")&&(i.preventDefault(),t?.()),((i.ctrlKey||i.metaKey)&&i.key==="f"||i.key==="/"&&document.activeElement===document.body)&&(i.preventDefault(),r?.()),i.key==="n"&&document.activeElement===document.body&&(i.preventDefault(),o?.()),i.key==="c"&&document.activeElement===document.body&&(i.preventDefault(),a?.());};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[n,e,t,r,o,a]);}function Ks({tasks:e,columns:t,selectedTaskIds:r,onTaskMove:o,onColumnMove:a,onTaskDrop:n,onTaskDragStart:s,onTaskDragEnd:i}){let[d,c]=Te.useState(null),[m,u]=Te.useState(null),[p,g]=Te.useState(null),[h,x]=Te.useState(null),[b,f]=Te.useState(null),w=Te.useRef(null),v=Te.useRef(null),y=(S,D,K)=>{K==="task"?(c(D),S.dataTransfer.setData("taskId",D),s?.(D)):(u(D),S.dataTransfer.setData("columnId",D)),S.dataTransfer.effectAllowed="move";},k=Te.useCallback(()=>{d&&i?.(d),c(null),u(null),g(null),x(null),f(null);},[d,i]);return {draggedTaskId:d,draggedColumnId:m,dragOverColumnId:p,dragOverTaskId:h,dropPosition:b,handleDragStart:y,handleDragEnd:k,handleDragOver:(S,D,K)=>{if(S.preventDefault(),S.dataTransfer.dropEffect="move",m){g(D);let H=S.currentTarget.getBoundingClientRect(),M=H.left+H.width/2;f(S.clientX<M?"left":"right");}else if(g(D),K){x(K);let H=S.currentTarget.getBoundingClientRect(),M=H.top+H.height/2;f(S.clientY<M?"top":"bottom");}else S.target===S.currentTarget&&(x(null),f(null));},handleDrop:(S,D,K)=>{S.preventDefault();let H=d||S.dataTransfer.getData("taskId"),M=m||S.dataTransfer.getData("columnId");if(M&&a)a(M,D,b==="right"?"right":"left");else if(H&&o){if(!e.find(G=>G.id===H))return;(r.includes(H)?r:[H]).forEach(G=>{let fe=e.find(rt=>rt.id===G)?.columnId||"";o(G,D,K,b==="bottom"?"bottom":"top"),n?.(G,fe,D,0);});}k();},handleTouchStart:(S,D,K)=>{let H=S.touches[0];H&&(w.current=setTimeout(()=>{K==="task"?(c(D),s?.(D)):u(D),v.current={x:H.clientX,y:H.clientY};},500));},handleTouchMove:S=>{if(!d&&!m)return;S.preventDefault();let D=S.touches[0];if(!D)return;let K=document.elementFromPoint(D.clientX,D.clientY);if(!K)return;let H=K.closest("[data-column-id]"),M=K.closest("[data-task-id]");if(H){let $=H.getAttribute("data-column-id");if(g($),m){let ee=H.getBoundingClientRect(),G=ee.left+ee.width/2;f(D.clientX<G?"left":"right");}else if(M){let ee=M.getAttribute("data-task-id");x(ee);let G=M.getBoundingClientRect(),J=G.top+G.height/2;f(D.clientY<J?"top":"bottom");}}},handleTouchEnd:S=>{if(clearTimeout(w.current),d||m){if(p){let D=d,K=m;K&&a?a(K,p,b==="right"?"right":"left"):D&&o&&o(D,p,h||void 0,b==="bottom"?"bottom":"top");}k();}},setDraggedTaskId:c}}function Zu({columns:e,tasks:t,onTaskMove:r,onColumnMove:o,onTaskClick:a,onTaskAdd:n,onColumnAction:s,swimlanes:i=false,swimlaneBy:d="priority",view:c,onViewChange:m,className:u,...p}){let[g,h]=Te.useState(c||"board"),[x,b]=Te.useState(null),[f,w]=Te.useState([]),v=c||g,y=_=>{h(_),m?.(_);},{state:k,pushState:N,undo:C,redo:T,canUndo:E,canRedo:B}=Vs({tasks:t,columns:e}),S=k?.tasks||[],D=k?.columns||[],{setSearchQuery:K,setActiveFilters:H,filteredTasks:M}=Bs(S),$=Te.useMemo(()=>{if(!i)return null;let _={},Y=(L,A)=>A.includes(".")?A.split(".").reduce((O,ne)=>O&&O[ne],L):L[A];return M.forEach(L=>{let A=Y(L,d),O=String(A||"Uncategorized");_[O]||(_[O]=[]),_[O].push(L);}),_},[M,i,d]),{handleDragStart:ee,handleDragOver:G,handleDrop:J}=Ks({columns:D,tasks:S,selectedTaskIds:[],onTaskMove:(_,Y,L,A)=>{let O=[...S],ne=O.findIndex(Gr=>Gr.id===_);if(ne===-1)return;let ot={...O[ne],columnId:Y};if(O.splice(ne,1),!L)O.push(ot);else {let Gr=O.findIndex(cl=>cl.id===L),ll=A==="bottom"?Gr+1:Gr;O.splice(ll,0,ot);}N({tasks:O,columns:D}),r?.(_,Y,L,A);}});Os({onUndo:C,onRedo:T,onSearch:()=>document.querySelector('input[placeholder*="Search"]')?.focus(),onNewTask:()=>n?.("todo","New Task")});let rt=Te.useMemo(()=>S.find(_=>_.id===x),[S,x]),Ye=()=>{let _=Y=>{b(Y.id),a?.(Y);};switch(v){case "list":return jsxRuntime.jsx(po,{tasks:M,columns:D,onTaskClick:_});case "timeline":return jsxRuntime.jsx(us,{tasks:M});case "table":return jsxRuntime.jsx(ps,{tasks:M,columns:D,onTaskClick:_});case "calendar":return jsxRuntime.jsx(fs,{tasks:M,onTaskClick:_});default:if(i){let Y=$&&Object.keys($).length>0?$:{"All Tasks":[]};return jsxRuntime.jsx("div",{className:"flex flex-col gap-8 overflow-y-auto h-full pr-2 custom-scrollbar",children:Object.entries(Y).map(([L,A])=>jsxRuntime.jsx(Hs,{title:L,count:A.length,isCollapsed:f.includes(L),onToggle:()=>w(O=>O.includes(L)?O.filter(ne=>ne!==L):[...O,L]),children:jsxRuntime.jsx("div",{className:"flex gap-6 min-h-[200px]",children:D.map(O=>jsxRuntime.jsx(ga,{column:O,tasks:A.filter(ne=>ne.columnId===O.id),onTaskClick:_,onAddTask:()=>n?.(O.id,"New Task"),onAction:ne=>s?.(O.id,ne),onDragStart:ee,onDragOver:(ne,ot)=>G(ne,O.id,ot),onDrop:(ne,ot)=>J(ne,O.id,ot)},O.id))})},L))})}return jsxRuntime.jsx("div",{className:"flex gap-6 overflow-x-auto pb-4 min-h-[500px] scrollbar-thin scrollbar-thumb-white/10",children:D.map(Y=>jsxRuntime.jsx(ga,{column:Y,tasks:M.filter(L=>L.columnId===Y.id),onTaskClick:_,onAddTask:()=>n?.(Y.id,"New Task"),onAction:L=>s?.(Y.id,L),onDragStart:ee,onDragOver:(L,A)=>G(L,Y.id,A),onDrop:(L,A)=>J(L,Y.id,A)},Y.id))})}};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-4 h-full",u),children:[jsxRuntime.jsx(ls,{title:"Project Board",view:v,onViewChange:_=>y(_),canUndo:E,canRedo:B,onUndo:C,onRedo:T}),jsxRuntime.jsx(ys,{onSearchChange:K,onFilterChange:H}),jsxRuntime.jsx("div",{className:"flex-1 overflow-hidden",children:Ye()}),rt&&jsxRuntime.jsx(Ds,{isOpen:!!x,onClose:()=>b(null),task:rt,onSave:_=>{let Y=S.map(L=>L.id===rt.id?{...L,..._}:L);N({tasks:Y,columns:D}),b(null);}})]})}function z5({columnId:e,onAdd:t,placeholder:r="Add task...",className:o}){let[a,n]=Te.useState(false),[s,i]=Te.useState(""),d=c=>{c?.preventDefault(),s.trim()&&(t(e,s),i(""),n(false));};return a?jsxRuntime.jsxs("form",{onSubmit:d,className:l("bg-white/[0.03] border border-white/10 rounded-2xl p-3 space-y-3",o),children:[jsxRuntime.jsx("input",{autoFocus:true,value:s,onChange:c=>i(c.target.value),placeholder:"What needs to be done?",className:"w-full bg-transparent border-none outline-none text-sm text-white placeholder:text-white/20",onKeyDown:c=>{c.key==="Escape"&&n(false);}}),jsxRuntime.jsxs("div",{className:"flex items-center justify-end gap-2",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"sm",onClick:()=>n(false),className:"h-8 text-white/40 hover:text-white",children:"Cancel"}),jsxRuntime.jsx(R,{size:"sm",onClick:()=>d(),disabled:!s.trim(),className:"h-8",children:"Add Task"})]})]}):jsxRuntime.jsxs("button",{onClick:()=>n(true),className:l("w-full flex items-center gap-2 p-3 rounded-2xl border border-dashed border-white/10 text-white/40 hover:border-white/20 hover:bg-white/5 transition-all text-sm",o),children:[jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"}),r]})}function W5({onSync:e,interval:t=3e4,enabled:r=false}){let[o,a]=Te.useState(null),[n,s]=Te.useState(false),[i,d]=Te.useState(null);return {sync:Te.useCallback(async m=>{if(e){s(true),d(null);try{await e(m),a(new Date);}catch(u){d(u instanceof Error?u:new Error("Sync failed"));}finally{s(false);}}},[e]),isSyncing:n,lastSynced:o,error:i}}function X5(){let[e,t]=Te.useState([]),r=Te.useCallback(a=>{let n={...a,id:Math.random().toString(36).substr(2,9),timestamp:new Date};t(s=>[n,...s]);},[]),o=Te.useCallback(()=>{t([]);},[]);return {history:e,addEntry:r,clearHistory:o}}function J5({subtasks:e,onToggle:t,className:r}){return !e||e.length===0?null:jsxRuntime.jsx("div",{className:l("space-y-1",r),children:e.map(o=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 group cursor-pointer",onClick:()=>t?.(o.id),children:[o.completed?jsxRuntime.jsx(lucideReact.CheckCircle2,{className:"h-3.5 w-3.5 text-green-500"}):jsxRuntime.jsx(lucideReact.Circle,{className:"h-3.5 w-3.5 text-white/20 group-hover:text-white/40"}),jsxRuntime.jsx("span",{className:l("text-xs transition-colors",o.completed?"text-white/40 line-through":"text-white/70"),children:o.title})]},o.id))})}function rC({activities:e,className:t}){return jsxRuntime.jsxs("div",{className:l("space-y-4",t),children:[jsxRuntime.jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Activity"}),jsxRuntime.jsx("div",{className:"space-y-4",children:e.map(r=>jsxRuntime.jsxs("div",{className:"flex gap-3",children:[jsxRuntime.jsx(F,{src:r.user.avatar,alt:r.user.name,size:"sm"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("p",{className:"text-xs text-white/80",children:[jsxRuntime.jsx("span",{className:"font-bold text-white",children:r.user.name})," ",r.action," ",r.target&&jsxRuntime.jsx("span",{className:"font-medium text-blue-400",children:r.target})]}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/30 mt-0.5",children:r.timestamp.toLocaleString()})]})]},r.id))})]})}var lp=Te__namespace.default.forwardRef(({className:e,title:t="Terminal",children:r,...o},a)=>jsxRuntime.jsxs("div",{ref:a,className:l("overflow-hidden rounded-2xl border border-gray-200 bg-gray-950 shadow-xl dark:border-white/10",e),...o,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b border-white/10 bg-white/[0.03] px-4 py-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5",children:[jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-rose-500/80"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),jsxRuntime.jsx("div",{className:"text-xs font-medium text-white/50",children:t}),jsxRuntime.jsx("div",{className:"w-10"})," "]}),jsxRuntime.jsx("div",{className:"p-4 font-mono text-sm text-gray-300",children:r})]}));lp.displayName="Terminal";var VC=({children:e,prefix:t="$",className:r})=>jsxRuntime.jsxs("div",{className:l("flex gap-2",r),children:[jsxRuntime.jsx("span",{className:"select-none text-emerald-400",children:t}),jsxRuntime.jsx("span",{children:e})]});var $C=({className:e,pauseOnHover:t=false,direction:r="left",speed:o="normal",children:a,...n})=>{let s={slow:"40s",normal:"20s",fast:"10s"};return jsxRuntime.jsxs("div",{className:l("group flex overflow-hidden p-2 [--gap:1rem] [gap:var(--gap)]",e),...n,children:[jsxRuntime.jsx("div",{className:l("flex shrink-0 justify-around [gap:var(--gap)] min-w-full",r==="left"?"animate-marquee":"animate-marquee-reverse",t&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:s[o]},children:a}),jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("flex shrink-0 justify-around [gap:var(--gap)] min-w-full",r==="left"?"animate-marquee":"animate-marquee-reverse",t&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:s[o]},children:a}),jsxRuntime.jsx("style",{children:`
12
+ `})]})};Jl.displayName="LetterPullup";var X=Te__namespace.default.forwardRef(({className:e,children:t,required:r,...o},a)=>jsxRuntime.jsxs("label",{ref:a,className:l("text-sm font-medium leading-none text-gray-700 dark:text-white/80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...o,children:[t,r&&jsxRuntime.jsx("span",{className:"ml-1 text-rose-500",children:"*"})]}));X.displayName="Label";var oc=classVarianceAuthority.cva("w-full rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3 border border-gray-200 dark:border-white/[0.10] text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-white/30 focus:outline-none focus:ring-2 focus:ring-purple-400/30 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200",{variants:{hasError:{true:"border-rose-400/25 focus:ring-rose-300/25",false:""},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""}},defaultVariants:{hasError:false,hasLeftIcon:false,hasRightIcon:false}}),Et=Te__namespace.default.forwardRef(({className:e,containerClassName:t,label:r,error:o,leftIcon:a,rightIcon:n,id:s,...i},d)=>{let c=s||Te__namespace.default.useId(),m=!!o;return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",t),children:[r&&jsxRuntime.jsx(X,{htmlFor:c,required:i.required,children:r}),jsxRuntime.jsxs("div",{className:"relative flex items-center",children:[a&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 dark:text-white/35",children:a}),jsxRuntime.jsx("input",{ref:d,id:c,className:l(oc({hasError:m,hasLeftIcon:!!a,hasRightIcon:!!n,className:e})),...i}),n&&jsxRuntime.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:n})]}),o&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:o})]})});Et.displayName="TextInput";var jo=Te__namespace.default.forwardRef(({className:e,label:t,error:r,id:o,disabled:a,checked:n,defaultChecked:s,onChange:i,...d},c)=>{let m=o||Te__namespace.default.useId(),[u,p]=Te__namespace.default.useState(s||n||false);Te__namespace.default.useEffect(()=>{n!==void 0&&p(n);},[n]);let g=()=>{if(a)return;let h=!u;p(h),i&&i({target:{checked:h}});};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",e),children:[jsxRuntime.jsxs("button",{ref:c,type:"button",id:m,role:"checkbox","aria-checked":u,"aria-label":t,onClick:g,disabled:a,className:l("flex items-center gap-3 rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-3","hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",a&&"opacity-50 cursor-not-allowed"),...d,children:[jsxRuntime.jsx("span",{"aria-hidden":"true",className:l("grid h-6 w-6 place-items-center rounded-lg border",u?"border-emerald-400/30 bg-emerald-400/15":"border-gray-300 dark:border-white/10 bg-white dark:bg-white/[0.02]"),children:u?jsxRuntime.jsx("svg",{className:"h-4 w-4 text-emerald-200",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):null}),t&&jsxRuntime.jsx("span",{className:"text-sm text-gray-700 dark:text-white/70",children:t})]}),r&&jsxRuntime.jsx("p",{className:"text-xs text-rose-500 mt-1 ml-1",children:r})]})});jo.displayName="Checkbox";var qo=Te__namespace.default.forwardRef(({className:e,label:t,error:r,id:o,disabled:a,checked:n,defaultChecked:s,onChange:i,...d},c)=>{let m=o||Te__namespace.default.useId(),[u,p]=Te__namespace.default.useState(s||n||false);Te__namespace.default.useEffect(()=>{n!==void 0&&p(n);},[n]);let g=()=>{if(a)return;let h=!u;p(h),i&&i({target:{checked:h}});};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",e),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("button",{type:"button",id:m,role:"switch","aria-checked":u,onClick:g,disabled:a,className:l("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 dark:focus-visible:ring-offset-black disabled:cursor-not-allowed disabled:opacity-50",u?"bg-emerald-500":"bg-gray-200 dark:bg-white/[0.06]"),...d,children:jsxRuntime.jsx("span",{className:l("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform",u?"translate-x-5":"translate-x-0")})}),t&&jsxRuntime.jsx(X,{htmlFor:m,className:"cursor-pointer select-none text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",onClick:g,children:t})]}),r&&jsxRuntime.jsx("p",{className:"text-xs text-rose-500 mt-1 ml-1",children:r})]})});qo.displayName="Switch";var to=Te__namespace.default.forwardRef(({label:e,name:t,options:r,value:o,defaultValue:a,onChange:n,placeholder:s="Select an option",error:i,disabled:d,className:c},m)=>{let[u,p]=Te.useState(false),[g,h]=Te.useState(a),[x,b]=Te.useState(-1),f=Te.useRef(null),v=Te__namespace.default.useId(),w=o!==void 0,y=w?o:g,k=r.find(T=>T.value===y);Te.useEffect(()=>{if(u){let T=r.findIndex(E=>E.value===y);b(T!==-1?T:0);}else b(-1);},[u,y,r]),Te.useEffect(()=>{let T=E=>{f.current&&!f.current.contains(E.target)&&p(false);};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);let N=T=>{d||(w||h(T),n?.(T),p(false));},C=T=>{d||(T.key==="Enter"||T.key===" "?(T.preventDefault(),u&&x!==-1?N(r[x].value):p(true)):T.key==="Escape"?p(false):T.key==="ArrowDown"?(T.preventDefault(),u?b(E=>(E+1)%r.length):p(true)):T.key==="ArrowUp"?(T.preventDefault(),u?b(E=>(E-1+r.length)%r.length):p(true)):T.key==="Home"?(T.preventDefault(),u&&b(0)):T.key==="End"&&(T.preventDefault(),u&&b(r.length-1)));};return jsxRuntime.jsxs("div",{ref:f,className:l("flex flex-col gap-1.5 relative",c),children:[e&&jsxRuntime.jsx(X,{htmlFor:v,className:l(d&&"opacity-50 cursor-not-allowed"),children:e}),jsxRuntime.jsxs("div",{ref:m,id:v,role:"combobox","aria-expanded":u,"aria-haspopup":"listbox","aria-controls":`${v}-listbox`,"aria-disabled":d,tabIndex:d?-1:0,onClick:()=>!d&&p(!u),onKeyDown:C,className:l("w-full appearance-none rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3","border border-gray-200 dark:border-white/[0.10]","text-gray-900 dark:text-white flex items-center","focus:outline-none focus:ring-2 focus:ring-purple-400/30","hover:bg-gray-100 dark:hover:bg-white/[0.05] cursor-pointer",d&&"cursor-not-allowed opacity-50 hover:bg-gray-50 dark:hover:bg-white/[0.04]",u&&"border-gray-300 dark:border-white/20 ring-2 ring-purple-400/20",i&&"border-rose-400/25 focus:ring-rose-300/25"),children:[jsxRuntime.jsx("span",{className:l("block truncate",!k&&"text-gray-400 dark:text-white/20"),children:k?k.label:s}),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:l("absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 dark:text-white/40 transition-transform duration-200",u&&"rotate-180"),children:jsxRuntime.jsx("path",{d:"m6 9 6 6 6-6"})})]}),u&&jsxRuntime.jsx("div",{className:"absolute top-full left-0 z-[110] mt-1 w-full overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A] p-1 shadow-xl animate-in fade-in zoom-in-95 duration-100",children:jsxRuntime.jsx("ul",{id:`${v}-listbox`,role:"listbox","aria-activedescendant":x!==-1?`${v}-option-${x}`:void 0,className:"max-h-60 overflow-auto p-1 flex flex-col gap-2",children:r.map((T,E)=>jsxRuntime.jsx("li",{id:`${v}-option-${E}`,role:"option","aria-selected":y===T.value,onClick:()=>N(T.value),onMouseEnter:()=>b(E),className:l("w-full rounded-2xl px-3 py-2 text-left text-sm transition-colors cursor-pointer","hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white",y===T.value||x===E?"bg-gray-100 dark:bg-white/[0.06] text-gray-900 dark:text-white/90":"text-gray-700 dark:text-white/80"),children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsx("span",{className:"flex-1 truncate",children:T.label}),y===T.value&&jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})})]})},T.value))})}),i&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:i}),jsxRuntime.jsx("input",{type:"hidden",name:t,value:y||""})]})});to.displayName="Select";function Gt(e,t,r={}){let{side:o="bottom",align:a="center",sideOffset:n=4,alignOffset:s=0,isOpen:i=false}=r,[d,c]=Te.useState({top:0,left:0}),[m,u]=Te.useState(false),p=Te.useCallback(()=>{if(!e.current||!t.current||!i)return;let g=e.current.getBoundingClientRect(),h=t.current.getBoundingClientRect(),x=0,b=0;switch(o){case "top":x=g.top-h.height-n;break;case "bottom":x=g.bottom+n;break;case "left":b=g.left-h.width-n;break;case "right":b=g.right+n;break}if(o==="top"||o==="bottom")switch(a){case "start":b=g.left+s;break;case "center":b=g.left+g.width/2-h.width/2+s;break;case "end":b=g.right-h.width+s;break}else switch(a){case "start":x=g.top+s;break;case "center":x=g.top+g.height/2-h.height/2+s;break;case "end":x=g.bottom-h.height+s;break}let f=8,v=window.innerWidth,w=window.innerHeight;b<f&&(b=f),b+h.width>v-f&&(b=v-h.width-f),x<f&&(x=f),x+h.height>w-f&&(x=w-h.height-f),c({top:x,left:b}),u(true);},[e,t,o,a,n,s,i]);return Te.useLayoutEffect(()=>{if(!i){m&&u(false);return}p();let g=new ResizeObserver(()=>p());return e.current&&g.observe(e.current),t.current&&g.observe(t.current),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{g.disconnect(),window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[i,p,e,t]),{position:d,isPositioned:m,updatePosition:p}}var Qo=Te.createContext(void 0);function st({children:e,open:t,onOpenChange:r}){let[o,a]=Te.useState(false),n=Te.useRef(null),s=t!==void 0,i=s?t:o,d=c=>{s||a(c),r?.(c);};return jsxRuntime.jsx(Qo.Provider,{value:{isOpen:i,setIsOpen:d,triggerRef:n},children:jsxRuntime.jsx("div",{className:"relative inline-block",children:e})})}function it({className:e,children:t,...r}){let o=Te.useContext(Qo);if(!o)throw new Error("PopoverTrigger must be used within Popover");let a=n=>{o.setIsOpen(!o.isOpen),r.onClick?.(n);};return jsxRuntime.jsx("button",{ref:o.triggerRef,type:"button","aria-haspopup":"dialog","aria-expanded":o.isOpen?"true":"false",onClick:a,className:l("inline-flex items-center justify-center",e),...r,children:t})}function lt({className:e,children:t,align:r="center",sideOffset:o=4,...a}){let n=Te.useContext(Qo);if(!n)throw new Error("PopoverContent must be used within Popover");let s=Te.useRef(null),{position:i,isPositioned:d}=Gt(n.triggerRef,s,{side:"bottom",align:r,sideOffset:o,isOpen:n.isOpen});if(Te.useEffect(()=>{if(n.isOpen){let m=u=>{s.current&&!s.current.contains(u.target)&&n.triggerRef.current&&!n.triggerRef.current.contains(u.target)&&n.setIsOpen(false);};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m);}}},[n.isOpen,n.setIsOpen,n.triggerRef]),!n.isOpen)return null;let c=()=>{let m=i.top>(n.triggerRef.current?.getBoundingClientRect().top||0)?"bottom":"top";return m==="bottom"?r==="start"?"top left":r==="end"?"top right":"top center":m==="top"?r==="start"?"bottom left":r==="end"?"bottom right":"bottom center":"center center"};return reactDom.createPortal(jsxRuntime.jsx("div",{ref:s,style:{top:i.top,left:i.left,transformOrigin:c()},className:l("fixed z-[110] min-w-[12rem] rounded-2xl border border-gray-200 dark:border-white/10 bg-white/80 dark:bg-white/[0.03] backdrop-blur-xl p-4 shadow-xl outline-none duration-200",d?"animate-in fade-in zoom-in-95 opacity-100":"opacity-0",e),...a,children:t}),document.body)}var Cr=Te.createContext(void 0);function Zo({children:e,value:t,defaultValue:r="",onValueChange:o,filter:a=(s,i)=>s.toLowerCase().includes(i.toLowerCase()),usePopover:n=true}){let[s,i]=Te.useState(r),[d,c]=Te.useState(""),[m,u]=Te.useState(false),[p,g]=Te.useState(new Map),[h,x]=Te.useState(-1),b=t!==void 0,f=b?t:s,v=N=>{b||i(N),o?.(N),u(false),c("");},w=Te__namespace.default.useCallback((N,C,T)=>(g(E=>{let O=new Map(E);return O.set(N,{text:C,value:T}),O}),()=>{g(E=>{let O=new Map(E);return O.delete(N),O});}),[]),y=Te.useMemo(()=>Array.from(p.entries()).filter(([N,C])=>a(C.text,d)).map(([N,C])=>({id:N,value:C.value})),[p,d,a]),k=y.length>0;return Te.useEffect(()=>{x(m?0:-1);},[m]),jsxRuntime.jsx(Cr.Provider,{value:{value:f,onValueChange:v,searchTerm:d,setSearchTerm:c,isOpen:m,setIsOpen:u,registerItem:w,isItemVisible:(N,C)=>a(C,d),hasVisibleItems:k,activeIndex:h,setActiveIndex:x,visibleItems:y},children:n?jsxRuntime.jsx(st,{open:m,onOpenChange:u,children:e}):e})}function aw({className:e,children:t,...r}){let o=Te.useContext(Cr);return jsxRuntime.jsxs(it,{role:"combobox","aria-expanded":o?.isOpen,"aria-haspopup":"listbox",className:l("flex h-10 w-full items-center justify-between rounded-2xl border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-900 placeholder:text-gray-500 focus:border-purple-500 focus:outline-none focus:ring-2 focus:ring-purple-500/20 disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:bg-white/[0.03] dark:text-white dark:placeholder:text-white/40 dark:focus:border-white/20 dark:focus:ring-white/10",e),...r,children:[t,jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-2 opacity-50",children:jsxRuntime.jsx("path",{d:"m6 9 6 6 6-6"})})]})}function nw({className:e,children:t,...r}){return jsxRuntime.jsx(lt,{className:l("p-0 w-[200px]",e),align:"start",...r,children:t})}function zn({className:e,placeholder:t="Search...",...r}){let o=Te.useContext(Cr);if(!o)throw new Error("ComboboxInput must be used within Combobox");let a=n=>{n.key==="ArrowDown"?(n.preventDefault(),o.setActiveIndex(s=>(s+1)%o.visibleItems.length)):n.key==="ArrowUp"?(n.preventDefault(),o.setActiveIndex(s=>(s-1+o.visibleItems.length)%o.visibleItems.length)):n.key==="Enter"?(n.preventDefault(),o.activeIndex!==-1&&o.visibleItems[o.activeIndex]&&o.onValueChange(o.visibleItems[o.activeIndex].value)):n.key==="Escape"&&o.setIsOpen(false),r.onKeyDown?.(n);};return jsxRuntime.jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-white/10 px-3",children:[jsxRuntime.jsxs("svg",{className:"mr-2 h-4 w-4 shrink-0 opacity-50",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("circle",{cx:"11",cy:"11",r:"8"}),jsxRuntime.jsx("path",{d:"m21 21-4.3-4.3"})]}),jsxRuntime.jsx("input",{className:l("flex h-10 w-full rounded-md bg-transparent py-3 text-sm text-gray-900 dark:text-white outline-none placeholder:text-gray-400 dark:placeholder:text-white/40 disabled:cursor-not-allowed disabled:opacity-50",e),placeholder:t,value:o.searchTerm,onChange:n=>o.setSearchTerm(n.target.value),onKeyDown:a,"aria-autocomplete":"list","aria-activedescendant":o.activeIndex!==-1?o.visibleItems[o.activeIndex]?.id:void 0,...r})]})}function Kn({className:e,children:t,...r}){return jsxRuntime.jsx("div",{role:"listbox",className:l("max-h-[300px] overflow-y-auto overflow-x-hidden p-1",e),...r,children:t})}function $n({className:e,children:t,...r}){let o=Te.useContext(Cr);if(!o)throw new Error("ComboboxEmpty must be used within Combobox");return o.hasVisibleItems?null:jsxRuntime.jsx("div",{className:l("py-6 text-center text-sm text-gray-500 dark:text-white/40",e),...r,children:t})}function Fn({className:e,value:t,children:r,textValue:o,...a}){let n=Te.useContext(Cr);if(!n)throw new Error("ComboboxItem must be used within Combobox");let s=Te__namespace.default.useId(),i=o||(typeof r=="string"?r:t),d=n.isItemVisible(s,i),c=n.value===t,m=n.visibleItems.findIndex(p=>p.id===s),u=n.activeIndex===m;return Te.useEffect(()=>n.registerItem(s,i,t),[s,i,t,n.registerItem]),d?jsxRuntime.jsxs("div",{id:s,role:"option","aria-selected":c,onClick:()=>n.onValueChange(t),onMouseEnter:()=>n.setActiveIndex(m),className:l("relative flex cursor-default select-none items-center rounded-2xl px-3 py-2 text-sm outline-none transition-colors","text-gray-700 dark:text-white/80","aria-selected:bg-gray-100 aria-selected:text-gray-900 dark:aria-selected:bg-white/[0.06] dark:aria-selected:text-white","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.06] dark:hover:text-white",(c||u)&&"bg-gray-100 text-gray-900 dark:bg-white/[0.06] dark:text-white",e),...a,children:[jsxRuntime.jsx("svg",{className:l("mr-2 h-4 w-4",c?"opacity-100":"opacity-0"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})}),r]}):null}var mw=Te__namespace.default.forwardRef(({className:e,value:t,defaultValue:r=0,min:o=0,max:a=100,step:n=1,onChange:s,disabled:i,...d},c)=>{let[m,u]=Te.useState(r),p=t!==void 0,g=p?t:m,h=Te.useRef(null),x=(g-o)/(a-o)*100,b=Te.useCallback(y=>{if(i||!h.current)return;let k=h.current.getBoundingClientRect(),N=k.width,C=k.left,T=(y-C)/N*(a-o)+o;T=Math.min(Math.max(T,o),a);let E=Math.round((T-o)/n);T=o+E*n,T=Number(T.toFixed(10)),p||u(T),s?.(T);},[i,p,a,o,s,n]),f=y=>{if(i)return;b(y.clientX);let k=C=>{b(C.clientX);},N=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",N);};document.addEventListener("mousemove",k),document.addEventListener("mouseup",N);},v=y=>{if(i)return;let k=y.touches[0];k&&b(k.clientX);let N=T=>{let E=T.touches[0];E&&b(E.clientX);},C=()=>{document.removeEventListener("touchmove",N),document.removeEventListener("touchend",C);};document.addEventListener("touchmove",N,{passive:false}),document.addEventListener("touchend",C);};return jsxRuntime.jsxs("div",{ref:c,role:"slider","aria-valuemin":o,"aria-valuemax":a,"aria-valuenow":g,"aria-disabled":i,tabIndex:i?-1:0,onKeyDown:y=>{if(i)return;let k=g;if(y.key==="ArrowRight"||y.key==="ArrowUp")k=Math.min(g+n,a);else if(y.key==="ArrowLeft"||y.key==="ArrowDown")k=Math.max(g-n,o);else if(y.key==="Home")k=o;else if(y.key==="End")k=a;else return;y.preventDefault(),k!==g&&(p||u(k),s?.(k));},className:l("relative flex w-full touch-none select-none items-center py-4 group",i&&"opacity-50 cursor-not-allowed",e),onMouseDown:f,onTouchStart:v,...d,children:[jsxRuntime.jsx("div",{ref:h,className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.06] backdrop-blur-sm border border-gray-200 dark:border-white/5",children:jsxRuntime.jsx("div",{className:"absolute h-full bg-gray-900 dark:bg-white transition-none dark:shadow-[0_0_10px_rgba(255,255,255,0.5)]",style:{width:`${x}%`}})}),jsxRuntime.jsx("div",{className:"absolute h-5 w-5 rounded-full border-2 border-gray-900 dark:border-white bg-white dark:bg-black shadow-md dark:shadow-[0_0_15px_rgba(255,255,255,0.5)] transition-transform hover:scale-110 focus:scale-110",style:{left:`calc(${x}% - 10px)`}})]})});var wc=["Su","Mo","Tu","We","Th","Fr","Sa"],yc=["January","February","March","April","May","June","July","August","September","October","November","December"];function so({className:e,value:t,onChange:r,minDate:o,maxDate:a}){let[n,s]=Te.useState(t||new Date),[i,d]=Te.useState(t||new Date),c=(f,v)=>new Date(f,v+1,0).getDate(),m=(f,v)=>new Date(f,v,1).getDay(),u=()=>{d(new Date(i.getFullYear(),i.getMonth()-1,1));},p=()=>{d(new Date(i.getFullYear(),i.getMonth()+1,1));},g=f=>{let v=new Date(i.getFullYear(),i.getMonth(),f);r&&r(v),s(v);},h=f=>t&&t.getDate()===f&&t.getMonth()===i.getMonth()&&t.getFullYear()===i.getFullYear(),x=f=>{let v=new Date;return v.getDate()===f&&v.getMonth()===i.getMonth()&&v.getFullYear()===i.getFullYear()},b=()=>{let f=c(i.getFullYear(),i.getMonth()),v=m(i.getFullYear(),i.getMonth()),w=[];for(let y=0;y<v;y++)w.push(jsxRuntime.jsx("div",{className:"h-9 w-9"},`empty-${y}`));for(let y=1;y<=f;y++){let k=h(y),N=x(y);w.push(jsxRuntime.jsx("button",{onClick:()=>g(y),type:"button",className:l("h-9 w-9 rounded-2xl text-sm font-medium transition-all duration-200","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20",k&&"bg-gray-900 text-white dark:bg-white dark:text-black shadow-md dark:shadow-[0_0_15px_rgba(255,255,255,0.3)] hover:bg-gray-800 dark:hover:bg-white/90",!k&&N&&"bg-gray-100 dark:bg-white/[0.03] text-gray-900 dark:text-white border border-gray-200 dark:border-white/10",!k&&!N&&"text-gray-700 dark:text-white/70 hover:text-gray-900 dark:hover:text-white"),children:y},y));}return w};return jsxRuntime.jsxs("div",{className:l("p-4 bg-white dark:bg-black/40 backdrop-blur-xl border border-gray-200 dark:border-white/10 rounded-2xl w-fit",e),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[jsxRuntime.jsxs("div",{className:"font-semibold text-gray-900 dark:text-white",children:[yc[i.getMonth()]," ",jsxRuntime.jsx("span",{className:"text-gray-500 dark:text-white/50",children:i.getFullYear()})]}),jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx("button",{onClick:u,type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/70 hover:text-gray-900 dark:hover:text-white transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{onClick:p,type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/70 hover:text-gray-900 dark:hover:text-white transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2 text-center",children:wc.map(f=>jsxRuntime.jsx("div",{className:"h-9 w-9 flex items-center justify-center text-xs font-medium text-gray-400 dark:text-white/40",children:f},f))}),jsxRuntime.jsx("div",{className:"grid grid-cols-7 gap-1",children:b()})]})}function Mw({value:e,onChange:t,placeholder:r="Pick a date",className:o}){let[a,n]=Te.useState(e),[s,i]=Te.useState(false),d=u=>{n(u),t?.(u),i(false);},c=u=>u.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});return jsxRuntime.jsxs(st,{open:s,onOpenChange:i,children:[jsxRuntime.jsxs(it,{onMouseMove:u=>{let p=u.currentTarget.getBoundingClientRect(),g=u.clientX-p.left,h=u.clientY-p.top;u.currentTarget.style.setProperty("--x",`${g}px`),u.currentTarget.style.setProperty("--y",`${h}px`);},className:l("group relative flex h-11 w-full items-center justify-between rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-2 text-sm text-gray-900 dark:text-white transition-all duration-200 overflow-hidden","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/15",!a&&"text-gray-400 dark:text-white/40",o),children:[jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--x) var(--y), rgba(255,255,255,0.06), transparent 40%)"}}),jsxRuntime.jsx("span",{className:"relative z-10",children:a?c(a):r}),jsxRuntime.jsx(lucideReact.Calendar,{className:"relative z-10 h-4 w-4 text-white/40"})]}),jsxRuntime.jsx(lt,{className:"w-auto p-0 border-none bg-transparent shadow-none",align:"start",children:jsxRuntime.jsx(so,{value:a,onChange:d,className:"shadow-2xl shadow-black/50"})})]})}var ft=Te__namespace.default.forwardRef(({className:e,children:t,orientation:r="vertical",scrollbarSize:o="sm",...a},n)=>jsxRuntime.jsx("div",{ref:n,className:l("overflow-auto","[&::-webkit-scrollbar]:bg-transparent","[&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-thumb]:bg-white/[0.06]","[&::-webkit-scrollbar-thumb]:rounded-full","hover:[&::-webkit-scrollbar-thumb]:bg-gray-400 dark:hover:[&::-webkit-scrollbar-thumb]:bg-white/20","[&::-webkit-scrollbar-track]:bg-transparent","[scrollbar-width:thin] [scrollbar-color:rgba(0,0,0,0.2)_transparent] dark:[scrollbar-color:rgba(255,255,255,0.1)_transparent]",r==="vertical"&&"overflow-y-auto overflow-x-hidden",r==="horizontal"&&"overflow-x-auto overflow-y-hidden",r==="both"&&"overflow-auto",o==="sm"&&"[&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar]:h-1.5",o==="md"&&"[&::-webkit-scrollbar]:w-2.5 [&::-webkit-scrollbar]:h-2.5",o==="lg"&&"[&::-webkit-scrollbar]:w-4 [&::-webkit-scrollbar]:h-4",e),...a,children:t}));ft.displayName="ScrollArea";function Kw({value:e,onChange:t,placeholder:r="Pick date & time",className:o}){let[a,n]=Te.useState(e),[s,i]=Te.useState(false),[d,c]=Te.useState(e?e.getHours():12),[m,u]=Te.useState(e?e.getMinutes():0);Te.useEffect(()=>{e&&(n(e),c(e.getHours()),u(e.getMinutes()));},[e]);let p=b=>{let f=new Date(b);f.setHours(d),f.setMinutes(m),n(f),t?.(f);},g=(b,f)=>{let v=parseInt(f,10);if(isNaN(v))return;let w=d,y=m;b==="hours"?(v=Math.max(0,Math.min(23,v)),c(v),w=v):(v=Math.max(0,Math.min(59,v)),u(v),y=v);let k=a||new Date,N=new Date(k);N.setHours(w),N.setMinutes(y),n(N),t?.(N);},h=b=>b.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"});return jsxRuntime.jsxs(st,{open:s,onOpenChange:i,children:[jsxRuntime.jsxs(it,{onMouseMove:b=>{let f=b.currentTarget.getBoundingClientRect(),v=b.clientX-f.left,w=b.clientY-f.top;b.currentTarget.style.setProperty("--x",`${v}px`),b.currentTarget.style.setProperty("--y",`${w}px`);},className:l("group relative flex h-11 w-full items-center justify-between rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-2 text-sm text-gray-900 dark:text-white transition-all duration-200 overflow-hidden","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/15",!a&&"text-gray-400 dark:text-white/40",o),children:[jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--x) var(--y), rgba(0,0,0,0.06), transparent 40%)"}}),jsxRuntime.jsx("span",{className:"relative z-10",children:a?h(a):r}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-400 dark:text-white/40",children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"}),jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"})]})]}),jsxRuntime.jsx(lt,{className:"w-auto p-0 border-none bg-transparent shadow-none",align:"start",children:jsxRuntime.jsx("div",{className:"flex flex-col rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/40 backdrop-blur-xl shadow-2xl dark:shadow-black/50",children:jsxRuntime.jsxs("div",{className:"flex",children:[jsxRuntime.jsx("div",{className:"p-4 border-r border-gray-200 dark:border-white/10",children:jsxRuntime.jsx(so,{value:a,onChange:p,className:"border-0 p-0 bg-transparent backdrop-blur-none shadow-none rounded-none"})}),jsxRuntime.jsxs("div",{className:"flex flex-col p-4 w-[160px] h-[340px]",children:[jsxRuntime.jsx("div",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-white/70",children:"Time"}),jsxRuntime.jsxs("div",{className:"flex flex-1 gap-2 min-h-0 overflow-hidden",children:[jsxRuntime.jsxs(ft,{className:"flex-1 flex flex-col gap-1",scrollbarSize:"sm",children:[jsxRuntime.jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 text-center mb-1 sticky top-0 bg-white dark:bg-[#0A0A0A] py-1 z-10",children:"Hr"}),jsxRuntime.jsx("div",{className:"flex flex-col gap-1",children:Array.from({length:24}).map((b,f)=>jsxRuntime.jsx("button",{onClick:()=>g("hours",f.toString()),className:l("w-full rounded-lg px-1 py-1.5 text-sm transition-colors text-center shrink-0",d===f?"bg-emerald-500 dark:bg-emerald-600/80 text-white font-medium":"text-gray-700 dark:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white"),children:f.toString().padStart(2,"0")},f))})]}),jsxRuntime.jsx("div",{className:"w-[1px] bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsxs(ft,{className:"flex-1 flex flex-col gap-1",scrollbarSize:"sm",children:[jsxRuntime.jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 text-center mb-1 sticky top-0 bg-white dark:bg-[#0A0A0A] py-1 z-10",children:"Min"}),jsxRuntime.jsx("div",{className:"flex flex-col gap-1",children:Array.from({length:60}).map((b,f)=>jsxRuntime.jsx("button",{onClick:()=>g("minutes",f.toString()),className:l("w-full rounded-lg px-1 py-1.5 text-sm transition-colors text-center shrink-0",m===f?"bg-emerald-500 dark:bg-emerald-600/80 text-white font-medium":"text-gray-700 dark:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white"),children:f.toString().padStart(2,"0")},f))})]})]})]})]})})})]})}var Rr=Te__namespace.default.forwardRef(({className:e,label:t,error:r,id:o,disabled:a,...n},s)=>{let i=Te__namespace.default.useId(),d=o||i;return jsxRuntime.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&jsxRuntime.jsx(X,{htmlFor:d,className:l(a&&"opacity-50 cursor-not-allowed"),children:t}),jsxRuntime.jsx("textarea",{ref:s,id:d,disabled:a,className:l("w-full rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3","border border-gray-200 dark:border-white/[0.10]","text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-white/30","focus:outline-none focus:ring-2 focus:ring-purple-400/30","resize-none","disabled:cursor-not-allowed disabled:opacity-50",r&&"border-rose-400/25 focus:ring-rose-300/25",e),...n}),r&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:r})]})});Rr.displayName="Textarea";var Hc=Te__namespace.default.forwardRef((e,t)=>{let[r,o]=Te.useState(false);return jsxRuntime.jsx(Et,{...e,ref:t,type:r?"text":"password",rightIcon:jsxRuntime.jsx(R,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-white/10",onClick:()=>o(!r),"aria-label":r?"Hide password":"Show password",children:r?jsxRuntime.jsx(lucideReact.EyeOff,{className:"h-4 w-4 text-gray-400 dark:text-white/35"}):jsxRuntime.jsx(lucideReact.Eye,{className:"h-4 w-4 text-gray-400 dark:text-white/35"})})})});Hc.displayName="PasswordInput";var Bc=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-full border px-2.5 py-1 text-xs font-medium whitespace-nowrap transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-white/[0.06] dark:text-white/70 dark:border-white/10",neutral:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-white/[0.06] dark:text-white/70 dark:border-white/10",success:"bg-emerald-100 text-emerald-700 border-emerald-200 dark:bg-emerald-400/15 dark:text-emerald-200 dark:border-emerald-400/20",warning:"bg-amber-100 text-amber-700 border-amber-200 dark:bg-amber-400/15 dark:text-amber-200 dark:border-amber-400/20",danger:"bg-rose-100 text-rose-700 border-rose-200 dark:bg-rose-400/15 dark:text-rose-200 dark:border-rose-400/20",info:"bg-sky-100 text-sky-700 border-sky-200 dark:bg-sky-400/15 dark:text-sky-200 dark:border-sky-400/20",outline:"bg-transparent text-white/60 border-white/10 hover:bg-white/[0.06]"}},defaultVariants:{variant:"default"}}),We=Te__namespace.default.forwardRef(({className:e,variant:t,...r},o)=>jsxRuntime.jsx("span",{ref:o,className:l(Bc({variant:t}),e),...r}));We.displayName="Badge";function uy({label:e,placeholder:t="Add tag...",tags:r,onChange:o,error:a,className:n}){let[s,i]=Te.useState(""),d=m=>{m.key==="Enter"&&s.trim()?(m.preventDefault(),r.includes(s.trim())||o([...r,s.trim()]),i("")):m.key==="Backspace"&&!s&&r.length>0&&o(r.slice(0,-1));},c=m=>{o(r.filter(u=>u!==m));};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",n),children:[e&&jsxRuntime.jsx(X,{children:e}),jsxRuntime.jsxs("div",{className:l("flex flex-wrap gap-2 rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-3 py-2 border border-gray-200 dark:border-white/[0.10] focus-within:ring-2 focus-within:ring-purple-400/30 transition-all duration-200",a&&"border-rose-400/25"),children:[r.map(m=>jsxRuntime.jsxs(We,{variant:"default",className:"gap-1 pr-1",children:[m,jsxRuntime.jsx("button",{type:"button",onClick:()=>c(m),className:"rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10 transition-colors",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},m)),jsxRuntime.jsx("input",{type:"text",value:s,onChange:m=>i(m.target.value),onKeyDown:d,placeholder:r.length===0?t:"",className:"flex-1 bg-transparent py-1 text-sm outline-none placeholder:text-gray-400 dark:placeholder:text-white/30 min-w-[120px]"})]}),a&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:a})]})}function hy({label:e,value:t,onChange:r,error:o,className:a}){return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",a),children:[e&&jsxRuntime.jsx(X,{children:e}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"h-10 w-10 rounded-xl border border-gray-200 dark:border-white/10 overflow-hidden relative",style:{backgroundColor:t},children:jsxRuntime.jsx("input",{type:"color",value:t,onChange:n=>r(n.target.value),className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full"})}),jsxRuntime.jsx("input",{type:"text",value:t,onChange:n=>r(n.target.value),className:"flex-1 rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-2 border border-gray-200 dark:border-white/[0.10] text-sm focus:outline-none focus:ring-2 focus:ring-purple-400/30 transition-all"})]}),o&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400",children:o})]})}var jn=Te.createContext({}),Fc=Te__namespace.default.forwardRef(({className:e,value:t,onChange:r,name:o,disabled:a,label:n,children:s,...i},d)=>{let c=Te__namespace.default.useId();return jsxRuntime.jsxs("div",{ref:d,className:l("flex flex-col gap-2",e),...i,children:[n&&jsxRuntime.jsx(X,{className:l(a&&"opacity-50 cursor-not-allowed"),children:n}),jsxRuntime.jsx("div",{className:"flex flex-col gap-2",role:"radiogroup",children:jsxRuntime.jsx(jn.Provider,{value:{value:t,onChange:r,name:o||c,disabled:a},children:s})})]})});Fc.displayName="RadioGroup";var Uc=Te__namespace.default.forwardRef(({className:e,value:t,label:r,disabled:o,...a},n)=>{let s=Te.useContext(jn),i=s.value===t,d=s.disabled||o,c=Te__namespace.default.useId();return jsxRuntime.jsxs("label",{htmlFor:c,className:l("flex items-center gap-3 cursor-pointer group",d&&"cursor-not-allowed opacity-50",e),children:[jsxRuntime.jsxs("div",{className:"relative flex items-center justify-center",children:[jsxRuntime.jsx("input",{ref:n,id:c,type:"radio",name:s.name,value:t,checked:i,disabled:d,onChange:m=>{m.target.checked&&s.onChange?.(t);},className:"peer sr-only",...a}),jsxRuntime.jsx("div",{className:l("h-5 w-5 rounded-full border border-gray-300 dark:border-white/20 bg-gray-50 dark:bg-white/[0.03] transition-all duration-200","peer-focus-visible:ring-2 peer-focus-visible:ring-gray-400 dark:peer-focus-visible:ring-white/20 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-white dark:peer-focus-visible:ring-offset-[#0A0A0A]","group-hover:bg-gray-100 dark:group-hover:bg-white/[0.05]",i&&"border-gray-900 bg-gray-900 dark:border-white dark:bg-white"),children:i&&jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full bg-white dark:bg-black"})})})]}),r&&jsxRuntime.jsx("span",{className:"text-sm text-gray-900 dark:text-white/90 select-none font-medium",children:r})]})});Uc.displayName="RadioGroupItem";var Er=Te__namespace.default.createContext({}),Wc=Te__namespace.default.forwardRef(({className:e,...t},r)=>{let o=Te__namespace.default.useId();return jsxRuntime.jsx(Er.Provider,{value:{id:o},children:jsxRuntime.jsx("div",{ref:r,className:l("space-y-2",e),...t})})});Wc.displayName="FormItem";var _c=Te__namespace.default.forwardRef(({className:e,...t},r)=>{let{id:o}=Te__namespace.default.useContext(Er);return jsxRuntime.jsx(X,{ref:r,className:l("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),htmlFor:o,...t})});_c.displayName="FormLabel";var Yc=Te__namespace.default.forwardRef(({...e},t)=>{let{id:r}=Te__namespace.default.useContext(Er),{children:o,...a}=e;return Te__namespace.default.isValidElement(o)?Te__namespace.default.cloneElement(o,{id:r,"aria-describedby":`${r}-description ${r}-message`,...a,...o.props}):jsxRuntime.jsx("div",{ref:t,...e})});Yc.displayName="FormControl";var Xc=Te__namespace.default.forwardRef(({className:e,...t},r)=>{let{id:o}=Te__namespace.default.useContext(Er);return jsxRuntime.jsx("p",{ref:r,id:`${o}-description`,className:l("text-xs text-white/50",e),...t})});Xc.displayName="FormDescription";var jc=Te__namespace.default.forwardRef(({className:e,children:t,...r},o)=>{let{id:a}=Te__namespace.default.useContext(Er);return t?jsxRuntime.jsx("p",{ref:o,id:`${a}-message`,className:l("text-xs font-medium text-rose-500",e),...r,children:t}):null});jc.displayName="FormMessage";var Zc=classVarianceAuthority.cva("relative flex flex-col items-center justify-center rounded-2xl border-2 border-dashed transition-all duration-200 text-center",{variants:{isDragActive:{true:"border-blue-500 bg-blue-50 dark:bg-blue-500/10",false:"border-gray-200 bg-gray-50 hover:bg-gray-100 dark:border-white/10 dark:bg-white/[0.02] dark:hover:bg-white/[0.05]"},error:{true:"border-rose-500 bg-rose-50 dark:bg-rose-500/10",false:""}},defaultVariants:{isDragActive:false,error:false}}),ed=Te__namespace.default.forwardRef(({className:e,onDrop:t,maxFiles:r=1,maxSize:o,label:a="Upload files",description:n="Drag & drop or click to upload",...s},i)=>{let[d,c]=Te.useState(false),[m,u]=Te.useState([]),[p,g]=Te.useState(null),h=Te__namespace.default.useRef(null),x=k=>{k.preventDefault(),c(true);},b=k=>{k.preventDefault(),c(false);},f=k=>r&&k.length>r?(g(`Max ${r} files allowed`),false):o&&k.some(C=>C.size>o)?(g(`File too large (max ${o/1024/1024}MB)`),false):(g(null),true),v=k=>{k.preventDefault(),c(false);let N=Array.from(k.dataTransfer.files);f(N)&&(u(N),t?.(N));},w=k=>{if(k.target.files){let N=Array.from(k.target.files);f(N)&&(u(N),t?.(N));}},y=(k,N)=>{N.stopPropagation();let C=m.filter((T,E)=>E!==k);u(C),t?.(C);};return jsxRuntime.jsxs("div",{className:"w-full space-y-4",children:[jsxRuntime.jsxs("div",{ref:i,className:l(Zc({isDragActive:d,error:!!p,className:e}),"p-8 cursor-pointer"),onDragOver:x,onDragLeave:b,onDrop:v,onClick:()=>h.current?.click(),...s,children:[jsxRuntime.jsx("input",{ref:h,type:"file",className:"hidden",multiple:r>1,onChange:w}),jsxRuntime.jsx("div",{className:"mb-4 rounded-full bg-gray-100 p-3 dark:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.Upload,{className:"h-6 w-6 text-gray-500 dark:text-white/70"})}),jsxRuntime.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-white",children:a}),jsxRuntime.jsx("div",{className:"mt-1 text-xs text-gray-500 dark:text-white/50",children:n}),p&&jsxRuntime.jsx("div",{className:"mt-2 text-xs font-medium text-rose-500",children:p})]}),m.length>0&&jsxRuntime.jsx("div",{className:"grid gap-2",children:m.map((k,N)=>jsxRuntime.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-gray-200 bg-white p-3 dark:border-white/10 dark:bg-white/[0.03]",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-gray-100 dark:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4 text-gray-500 dark:text-white/70"})}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white truncate max-w-[200px]",children:k.name}),jsxRuntime.jsxs("span",{className:"text-xs text-gray-500 dark:text-white/50",children:[(k.size/1024).toFixed(1)," KB"]})]})]}),jsxRuntime.jsx("button",{onClick:C=>y(N,C),className:"rounded-full p-1 hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]},N))})]})});ed.displayName="FileDropzone";var sd=classVarianceAuthority.cva("flex items-center gap-2",{variants:{size:{sm:"[&>input]:h-8 [&>input]:w-8 [&>input]:text-sm",md:"[&>input]:h-10 [&>input]:w-10 [&>input]:text-base",lg:"[&>input]:h-12 [&>input]:w-12 [&>input]:text-lg"}},defaultVariants:{size:"md"}}),id=Te__namespace.default.forwardRef(({className:e,size:t,length:r=6,value:o="",onChange:a,onComplete:n,disabled:s,error:i,...d},c)=>{let[m,u]=Te.useState(new Array(r).fill("")),p=Te.useRef([]);Te.useEffect(()=>{let b=o.split("").slice(0,r),f=[...b,...new Array(r-b.length).fill("")];u(f);},[o,r]);let g=(b,f)=>{let v=b.target.value;if(isNaN(Number(v)))return;let w=[...m];w[f]=v.substring(v.length-1),u(w);let y=w.join("");a?.(y),v&&f<r-1&&p.current[f+1]?.focus(),y.length===r&&n?.(y);},h=(b,f)=>{b.key==="Backspace"&&!m[f]&&f>0&&p.current[f-1]?.focus();},x=b=>{b.preventDefault();let f=b.clipboardData.getData("text/plain").slice(0,r);if(!/^\d+$/.test(f))return;let v=[...m];f.split("").forEach((y,k)=>{v[k]=y;}),u(v);let w=v.join("");a?.(w),w.length===r&&n?.(w),p.current[Math.min(f.length,r-1)]?.focus();};return jsxRuntime.jsx("div",{ref:c,className:l(sd({size:t,className:e})),...d,children:m.map((b,f)=>jsxRuntime.jsx("input",{ref:v=>p.current[f]=v,type:"text",inputMode:"numeric",maxLength:1,value:b,disabled:s,onChange:v=>g(v,f),onKeyDown:v=>h(v,f),onPaste:x,className:l("rounded-2xl border bg-gray-50 text-center font-semibold transition-all duration-200","focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed","dark:bg-white/[0.03] dark:text-white",i?"border-rose-500 text-rose-500 focus:border-rose-500 focus:ring-rose-500/20":"border-gray-200 dark:border-white/10")},f))})});id.displayName="OTPInput";var ud=classVarianceAuthority.cva("flex items-center rounded-2xl border bg-gray-50 dark:bg-white/[0.03] dark:border-white/10",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},error:{true:"border-rose-500",false:"border-gray-200"}},defaultVariants:{size:"md",error:false}}),pd=Te__namespace.default.forwardRef(({className:e,size:t,error:r,value:o=0,onChange:a,min:n=-1/0,max:s=1/0,step:i=1,disabled:d,...c},m)=>{let u=()=>{o-i>=n&&a?.(o-i);},p=()=>{o+i<=s&&a?.(o+i);},g=h=>{let x=parseFloat(h.target.value);isNaN(x)||a?.(x);};return jsxRuntime.jsxs("div",{className:l(ud({size:t,error:r,className:e})),children:[jsxRuntime.jsx("button",{type:"button",onClick:u,disabled:d||o<=n,className:"flex h-full items-center justify-center px-3 text-gray-500 hover:text-gray-900 disabled:opacity-50 dark:text-white/50 dark:hover:text-white",children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx("div",{className:"h-full w-px bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsx("input",{ref:m,type:"number",value:o,onChange:g,disabled:d,className:"h-full w-full min-w-[3rem] bg-transparent text-center text-sm font-medium text-gray-900 focus:outline-none dark:text-white",...c}),jsxRuntime.jsx("div",{className:"h-full w-px bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsx("button",{type:"button",onClick:p,disabled:d||o>=s,className:"flex h-full items-center justify-center px-3 text-gray-500 hover:text-gray-900 disabled:opacity-50 dark:text-white/50 dark:hover:text-white",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-3.5 w-3.5"})})]})});pd.displayName="NumberInput";var bd=classVarianceAuthority.cva("inline-flex items-center rounded-2xl border border-gray-200 bg-gray-50 p-1 dark:border-white/10 dark:bg-white/[0.03]",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full flex",false:""}},defaultVariants:{size:"md",fullWidth:false}}),hd=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-2xl px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-gray-950 dark:focus-visible:ring-gray-300",{variants:{selected:{true:"bg-white text-gray-950 shadow-sm dark:bg-gray-800 dark:text-gray-50",false:"text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-50"},fullWidth:{true:"flex-1",false:""}},defaultVariants:{selected:false,fullWidth:false}}),xd=Te__namespace.default.forwardRef(({className:e,size:t,fullWidth:r,value:o,onChange:a,options:n,...s},i)=>jsxRuntime.jsx("div",{ref:i,className:l(bd({size:t,fullWidth:r,className:e})),...s,children:n.map(d=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>a?.(d.value),className:l(hd({selected:o===d.value,fullWidth:r})),children:[d.icon&&jsxRuntime.jsx("span",{className:"mr-2",children:d.icon}),d.label]},d.value))}));xd.displayName="ToggleGroup";var Zn={loading:jsxRuntime.jsx("svg",{className:"animate-spin text-blue-500",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),success:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-400",children:[jsxRuntime.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),jsxRuntime.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-rose-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),warning:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-400",children:[jsxRuntime.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),jsxRuntime.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),jsxRuntime.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},es=({id:e,title:t,description:r,variant:o="default",duration:a=5e3,onDismiss:n})=>(Te.useEffect(()=>{if(a===1/0)return;let s=setTimeout(()=>{n(e);},a);return ()=>clearTimeout(s)},[a,e,n]),jsxRuntime.jsxs("div",{role:"alert",className:l("pointer-events-auto relative flex w-full max-w-sm items-start gap-4 overflow-hidden rounded-2xl border p-4 shadow-lg transition-all","animate-in slide-in-from-right-full fade-in duration-300","bg-white dark:bg-[#0A0A0A]/90 backdrop-blur-md border-gray-200 dark:border-white/10",o==="error"&&"border-rose-200 dark:border-rose-500/30 bg-rose-50 dark:bg-rose-500/10",o==="success"&&"border-emerald-200 dark:border-emerald-500/20 bg-emerald-50 dark:bg-emerald-950/10",o==="warning"&&"border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-950/10",o==="info"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10",o==="loading"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10"),children:[o!=="default"&&Zn[o]&&jsxRuntime.jsx("div",{className:"shrink-0 pt-0.5",children:Zn[o]}),jsxRuntime.jsxs("div",{className:"flex-1 gap-1",children:[t&&jsxRuntime.jsx("div",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t}),r&&jsxRuntime.jsx("div",{className:"text-sm text-gray-600 dark:text-white/80",children:r})]}),jsxRuntime.jsx("button",{onClick:()=>n(e),className:"shrink-0 rounded-md p-1 text-gray-400 dark:text-white/50 opacity-0 transition-opacity hover:text-gray-900 dark:hover:text-white group-hover:opacity-100 focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20",children:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntime.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}));var na=Te.createContext(void 0);function lk({children:e}){let[t,r]=Te.useState([]),o=Te.useCallback(i=>{r(d=>d.filter(c=>c.id!==i));},[]),a=Te.useCallback(i=>{let d=Math.random().toString(36).substring(2,9);return r(c=>[...c,{...i,id:d,onDismiss:o}]),d},[o]),n=Te.useCallback((i,d)=>{r(c=>c.map(m=>m.id===i?{...m,...d}:m));},[]),s=Te.useCallback(async(i,d)=>{let c=typeof d.loading=="string"?{title:d.loading,variant:"loading"}:{variant:"loading",...d.loading},m=a({...c,duration:1/0});try{let u=await i,p=typeof d.success=="function"?d.success(u):typeof d.success=="string"?{title:d.success,variant:"success"}:d.success;return n(m,{...p,duration:5e3}),u}catch(u){let p=typeof d.error=="function"?d.error(u):typeof d.error=="string"?{title:d.error,variant:"error"}:d.error;throw n(m,{...p,duration:5e3}),u}},[a,n]);return jsxRuntime.jsxs(na.Provider,{value:{toast:a,dismiss:o,promise:s},children:[e,jsxRuntime.jsx("div",{className:"fixed bottom-0 right-0 z-[150] flex max-h-screen w-full flex-col-reverse gap-2 p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",children:t.map(i=>jsxRuntime.jsx(es,{...i},i.id))})]})}var Cd={success:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-400",children:[jsxRuntime.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),jsxRuntime.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-rose-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),warning:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-400",children:[jsxRuntime.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),jsxRuntime.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),jsxRuntime.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},Md=Te__namespace.default.forwardRef(({className:e,variant:t="default",icon:r,title:o,children:a,...n},s)=>{let i=r||(t!=="default"?Cd[t]:null);return jsxRuntime.jsxs("div",{ref:s,role:"alert",className:l("relative w-full rounded-2xl border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-gray-900 dark:[&>svg]:text-white","bg-white dark:bg-[#0A0A0A]/50 backdrop-blur-md border-gray-200 dark:border-white/10 text-gray-900 dark:text-white",t==="error"&&"border-rose-200 dark:border-rose-500/20 bg-rose-50 dark:bg-rose-950/10 text-rose-900 dark:text-rose-50 [&>svg]:text-rose-600 dark:[&>svg]:text-rose-400",t==="success"&&"border-emerald-200 dark:border-emerald-500/20 bg-emerald-50 dark:bg-emerald-950/10 text-emerald-900 dark:text-emerald-50 [&>svg]:text-emerald-600 dark:[&>svg]:text-emerald-400",t==="warning"&&"border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-950/10 text-amber-900 dark:text-amber-50 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",t==="info"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10 text-blue-900 dark:text-blue-50 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",e),...n,children:[i,jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[o&&jsxRuntime.jsx("h5",{className:"mb-1 font-medium leading-none tracking-tight",children:o}),a&&jsxRuntime.jsx("div",{className:"text-sm opacity-90 [&_p]:leading-relaxed",children:a})]})]})});Md.displayName="Alert";var Ld=Te__namespace.default.forwardRef(({className:e,value:t=0,max:r=100,variant:o="default",size:a="md",isIndeterminate:n=false,hasStripe:s=false,indicatorClassName:i,...d},c)=>{let m=n?0:Math.min(Math.max((t||0)/r,0),1)*100,u={default:"bg-gray-900 dark:bg-white dark:shadow-[0_0_10px_rgba(255,255,255,0.5)]",success:"bg-emerald-500 shadow-sm dark:shadow-[0_0_10px_rgba(16,185,129,0.5)]",warning:"bg-amber-500 shadow-sm dark:shadow-[0_0_10px_rgba(245,158,11,0.5)]",danger:"bg-rose-500 shadow-sm dark:shadow-[0_0_10px_rgba(244,63,94,0.5)]",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 shadow-sm dark:shadow-[0_0_15px_rgba(99,102,241,0.5)]"};return jsxRuntime.jsx("div",{ref:c,role:"progressbar","aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":n?void 0:t,className:l("relative w-full overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.03] border border-gray-200 dark:border-white/5 backdrop-blur-sm",{sm:"h-1",md:"h-2",lg:"h-4"}[a],e),...d,children:jsxRuntime.jsx("div",{className:l("h-full w-full flex-1 transition-all duration-500 ease-in-out relative overflow-hidden",u[o],n&&"absolute inset-0 w-full origin-left animate-indeterminate-progress",i),style:{transform:n?void 0:`translateX(-${100-m}%)`},children:s&&!n&&jsxRuntime.jsx("div",{className:"absolute inset-0 w-full h-full animate-progress-stripe",style:{backgroundImage:"linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)",backgroundSize:"1rem 1rem"}})})})});Ld.displayName="Progress";var Sd=Te__namespace.default.forwardRef(({icon:e,title:t,description:r,action:o,className:a,...n},s)=>jsxRuntime.jsx(ce,{ref:s,className:l("p-8 text-center",a),...n,children:jsxRuntime.jsxs("div",{className:"mx-auto w-full max-w-md space-y-3",children:[jsxRuntime.jsx("div",{className:"mx-auto grid h-12 w-12 place-items-center rounded-2xl border border-white/10 bg-white/[0.03] text-white/70",children:e??jsxRuntime.jsx(lucideReact.Info,{className:"h-5 w-5"})}),jsxRuntime.jsx("div",{className:"text-lg font-semibold text-white",children:t}),r?jsxRuntime.jsx("div",{className:"text-sm text-white/55",children:r}):null,o?jsxRuntime.jsx("div",{className:"pt-2 flex justify-center",children:o}):null]})}));Sd.displayName="EmptyState";function rs({className:e,variant:t="default",...r}){return jsxRuntime.jsx("div",{className:l("animate-pulse bg-gray-200 dark:bg-white/[0.03]",t==="circle"&&"rounded-full",t==="default"&&"rounded-2xl",t==="text"&&"rounded h-4 w-full",e),...r})}var Vd=Te__namespace.default.forwardRef(({className:e,max:t=5,value:r=0,onChange:o,readOnly:a=false,size:n="md",...s},i)=>{let[d,c]=Te.useState(null),m={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};return jsxRuntime.jsx("div",{ref:i,className:l("flex items-center gap-1",e),...s,children:Array.from({length:t}).map((u,p)=>{let g=p+1,h=(d!==null?d:r)>=g;return jsxRuntime.jsx("button",{type:"button",disabled:a,onClick:()=>o?.(g),onMouseEnter:()=>!a&&c(g),onMouseLeave:()=>!a&&c(null),className:l("transition-transform hover:scale-110 focus:outline-none",a&&"cursor-default hover:scale-100"),children:jsxRuntime.jsx(lucideReact.Star,{className:l(m[n],"transition-colors duration-200",h?"fill-amber-400 text-amber-400":"fill-transparent text-gray-300 dark:text-white/20")})},p)})})});Vd.displayName="Rating";var os=classVarianceAuthority.cva("transition-all duration-700 ease-out",{variants:{preset:{fade:"opacity-0 translate-y-4",spring:"opacity-0 scale-95 translate-y-4","slide-right":"opacity-0 -translate-x-8","slide-left":"opacity-0 translate-x-8",blur:"opacity-0 blur-sm scale-105","3d-flip":"opacity-0 rotate-x-90"},visibleState:{fade:"opacity-100 translate-y-0",spring:"opacity-100 scale-100 translate-y-0 animate-enter-spring","slide-right":"opacity-100 translate-x-0","slide-left":"opacity-100 translate-x-0",blur:"opacity-100 blur-0 scale-100","3d-flip":"opacity-100 rotate-x-0"}},defaultVariants:{preset:"spring"}});function as({className:e,preset:t="spring",viewport:r=true,visible:o,delay:a=0,once:n=true,asChild:s=false,children:i,style:d,...c}){let{ref:m,isInView:u,hasAnimated:p}=je({threshold:.1,enabled:r&&o===void 0}),h=o!==void 0?o:r?n?p:u:true,x=os({preset:t}),b=h?os({visibleState:t}):"";return jsxRuntime.jsx(s?Pt:"div",{ref:m,className:l(x,b,e),style:{transitionDelay:`${a}ms`,willChange:"transform, opacity",...d},...c,children:i})}function Fk({children:e,stagger:t=100,delay:r=0,className:o,...a}){let{ref:n,hasAnimated:s}=je({threshold:.1});return jsxRuntime.jsx("div",{ref:n,className:l("relative",o),...a,children:Te__namespace.default.Children.map(e,(i,d)=>Te__namespace.default.isValidElement(i)?Te__namespace.default.cloneElement(i,{visible:s,viewport:false,delay:r+d*t}):i)})}function Xk({text:e,type:t="char",stagger:r=30,delay:o=0,className:a,...n}){let{ref:s,hasAnimated:i}=je({threshold:.2}),d=t==="char"?e.split(""):e.split(" ");return jsxRuntime.jsx("div",{ref:s,className:l("flex flex-wrap",a),"aria-label":e,...n,children:d.map((c,m)=>jsxRuntime.jsxs("span",{className:l("inline-block whitespace-pre transition-all duration-500 ease-out will-change-transform",i?"opacity-100 translate-y-0 blur-0":"opacity-0 translate-y-4 blur-sm"),style:{transitionDelay:`${o+m*r}ms`},children:[c,t==="word"&&m!==d.length-1?" ":""]},m))})}function Zk({children:e,speed:t=.1,direction:r="vertical",className:o,...a}){let n=Te.useRef(null);return Te.useEffect(()=>{let s=n.current;if(!s)return;let i=()=>{let d=s.getBoundingClientRect(),c=window.innerHeight;if(d.top>c||d.bottom<0)return;let u=(c/2-(d.top+d.height/2))*t;r==="vertical"?s.style.transform=`translate3d(0, ${u}px, 0)`:s.style.transform=`translate3d(${u}px, 0, 0)`;};return window.addEventListener("scroll",i,{passive:true}),i(),()=>window.removeEventListener("scroll",i)},[t,r]),jsxRuntime.jsx("div",{ref:n,className:l("will-change-transform",o),...a,children:e})}function s1({children:e,strength:t=.5,className:r}){let o=Te.useRef(null),a=s=>{let i=o.current;if(!i)return;let{clientX:d,clientY:c}=s,{left:m,top:u,width:p,height:g}=i.getBoundingClientRect(),h=m+p/2,x=u+g/2,b=d-h,f=c-x,v=Math.max(p,g)*1.5;Math.abs(b)<v&&Math.abs(f)<v?(i.style.setProperty("--mag-x",`${b*t}px`),i.style.setProperty("--mag-y",`${f*t}px`)):(i.style.setProperty("--mag-x","0px"),i.style.setProperty("--mag-y","0px"));},n=()=>{let s=o.current;s&&(s.style.setProperty("--mag-x","0px"),s.style.setProperty("--mag-y","0px"));};return Te.useEffect(()=>(window.addEventListener("mousemove",a),()=>window.removeEventListener("mousemove",a)),[t]),jsxRuntime.jsx("div",{ref:o,className:l("inline-block transition-transform duration-300 ease-out will-change-transform",r),onMouseLeave:n,style:{transform:"translate3d(var(--mag-x, 0px), var(--mag-y, 0px), 0)"},children:e})}function p1({value:e,duration:t=2e3,delay:r=0,decimalPlaces:o=0,className:a,...n}){let[s,i]=Te.useState(0),{ref:d,hasAnimated:c}=je({threshold:.1}),m=Te.useRef(null);return Te.useEffect(()=>{if(!c)return;let u=g=>{m.current||(m.current=g);let h=Math.min((g-m.current-r)/t,1);if(h>=0){let x=h*e;i(x);}h<1&&requestAnimationFrame(u);},p=setTimeout(()=>{requestAnimationFrame(u);},r);return ()=>clearTimeout(p)},[c,e,t,r]),jsxRuntime.jsx("span",{ref:d,className:l("tabular-nums tracking-tighter",a),...n,children:s.toFixed(o)})}function x1({variant:e="spinner",text:t,fullscreen:r=true,className:o,...a}){let n=r?"fixed inset-0 z-[200] flex items-center justify-center bg-white/80 dark:bg-black/80 backdrop-blur-sm":"flex items-center justify-center p-8 w-full h-full min-h-[200px]";return e==="bar"?jsxRuntime.jsx("div",{className:l("fixed top-0 left-0 right-0 z-[200] h-1 bg-transparent",o),...a,children:jsxRuntime.jsx("div",{className:"h-full bg-blue-500 animate-indeterminate-progress origin-left"})}):e==="dots"?jsxRuntime.jsxs("div",{className:l(n,o),...a,children:[jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce [animation-delay:-0.3s]"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce [animation-delay:-0.15s]"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce"})]}),t&&jsxRuntime.jsx("span",{className:"ml-4 text-sm font-medium text-gray-500 dark:text-white/70",children:t})]}):e==="logo"?jsxRuntime.jsx("div",{className:l(n,o),...a,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4",children:[jsxRuntime.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-full bg-white dark:bg-white/[0.06] shadow-lg ring-1 ring-black/5",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 rounded-full animate-ping bg-blue-500/20"}),jsxRuntime.jsx("div",{className:"h-8 w-8 rounded bg-blue-500"})]}),t&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-white/70 animate-pulse",children:t})]})}):e==="glass"?jsxRuntime.jsx("div",{className:l(n,"bg-white/30 dark:bg-black/30 backdrop-blur-md",o),...a,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"h-8 w-8 animate-spin text-white"}),t&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-white tracking-wider",children:t})]})}):jsxRuntime.jsx("div",{className:l(n,o),...a,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"h-8 w-8 animate-spin text-blue-500"}),t&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-white/70",children:t})]})})}function T1({preset:e="fade",duration:t=300,useViewTransition:r=false,className:o,children:a,...n}){let[s,i]=Te.useState(false);Te.useEffect(()=>{if(r&&document.startViewTransition)document.startViewTransition(()=>{i(true);});else {let m=requestAnimationFrame(()=>{i(true);});return ()=>cancelAnimationFrame(m)}},[r]);let c={fade:{initial:"opacity-0",animate:"opacity-100"},"slide-up":{initial:"opacity-0 translate-y-8",animate:"opacity-100 translate-y-0"},scale:{initial:"opacity-0 scale-95",animate:"opacity-100 scale-100"},blur:{initial:"opacity-0 blur-sm",animate:"opacity-100 blur-0"},none:{initial:"",animate:""}}[e];return jsxRuntime.jsx("div",{className:l("transition-all ease-out",s?c.animate:c.initial,o),style:{transitionDuration:`${t}ms`,viewTransitionName:r?"page-content":void 0},...n,children:a})}var nm={sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-14 w-14 text-base",xl:"h-20 w-20 text-xl"},U=Te__namespace.default.forwardRef(({className:e,src:t,alt:r,fallback:o,size:a="md",...n},s)=>{let[i,d]=Te.useState(false);return Te.useEffect(()=>{d(false);},[t]),jsxRuntime.jsx("div",{ref:s,className:l("relative flex shrink-0 overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.06]",nm[a],e),...n,children:t&&!i?jsxRuntime.jsx("img",{src:t,alt:r,className:"aspect-square h-full w-full object-cover",onError:()=>d(true)}):jsxRuntime.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-100 dark:bg-white/5 text-gray-600 dark:text-white/70 font-medium",children:o||(r?r.charAt(0).toUpperCase():"?")})})});U.displayName="Avatar";var da=Te.createContext(void 0);function A1({type:e="single",defaultValue:t,value:r,onValueChange:o,className:a,children:n,...s}){let[i,d]=Te.useState(t||(e==="multiple"?[]:"")),c=r!==void 0?r:i,m=u=>{let p;if(e==="multiple"){let g=Array.isArray(c)?c:[];g.includes(u)?p=g.filter(h=>h!==u):p=[...g,u];}else p=c===u?"":u;r===void 0&&d(p),o?.(p);};return jsxRuntime.jsx(da.Provider,{value:{value:c,onValueChange:m,type:e},children:jsxRuntime.jsx("div",{className:l("space-y-2",a),...s,children:n})})}var ma=Te.createContext({value:"",isOpen:false});function B1({className:e,value:t,children:r,...o}){let a=Te.useContext(da),n=Array.isArray(a?.value)?a?.value.includes(t):a?.value===t;return jsxRuntime.jsx(ma.Provider,{value:{value:t,isOpen:!!n},children:jsxRuntime.jsx("div",{className:l("overflow-hidden rounded-2xl border border-gray-200 dark:border-white/5 bg-gray-50 dark:bg-white/[0.03] transition-all duration-200",n&&"bg-white dark:bg-white/[0.04] border-gray-300 dark:border-white/10",e),...o,children:r})})}function V1({className:e,children:t,...r}){let o=Te.useContext(da),{value:a,isOpen:n}=Te.useContext(ma);return jsxRuntime.jsxs("button",{type:"button",onClick:()=>o?.onValueChange(a),"aria-expanded":n,"aria-controls":`accordion-content-${a}`,id:`accordion-trigger-${a}`,className:l("flex w-full items-center justify-between px-4 py-3 text-sm font-medium text-gray-900 dark:text-white transition-all hover:text-gray-700 dark:hover:text-white/90 focus:outline-none",e),...r,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{className:l("h-4 w-4 shrink-0 text-gray-400 dark:text-white/50 transition-transform duration-200",n&&"rotate-180 text-gray-900 dark:text-white")})]})}function O1({className:e,children:t,...r}){let{isOpen:o,value:a}=Te.useContext(ma);return o?jsxRuntime.jsx("div",{id:`accordion-content-${a}`,role:"region","aria-labelledby":`accordion-trigger-${a}`,className:l("px-4 pb-3 pt-0 text-sm text-gray-600 dark:text-white/70 animate-in slide-in-from-top-1 fade-in duration-200",e),...r,children:t}):null}Te__namespace.default.createContext(null);var Sr=Te__namespace.default.forwardRef(({className:e,wrapperClassName:t,rounded:r=false,maxHeight:o,...a},n)=>jsxRuntime.jsx(ft,{className:l("w-full",r&&"rounded-2xl border border-white/10",t),style:{maxHeight:o},orientation:o?"both":"horizontal",scrollbarSize:"sm",children:jsxRuntime.jsx("table",{ref:n,className:l("w-full caption-bottom text-sm text-left",e),...a})}));Sr.displayName="Table";var Dr=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("thead",{ref:r,className:l("bg-white/[0.02] text-white/55",e),...t}));Dr.displayName="TableHeader";var Hr=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("tbody",{ref:r,className:l("[&_tr:last-child]:border-0",e),...t}));Hr.displayName="TableBody";var ht=Te__namespace.default.forwardRef(({className:e,hoverable:t=true,optimized:r=false,...o},a)=>jsxRuntime.jsx("tr",{ref:a,className:l("border-t border-white/10 transition-colors data-[state=selected]:bg-white/[0.04]",t&&"hover:bg-white/[0.02]",e),style:r?{contentVisibility:"auto",containIntrinsicSize:"0 56px"}:void 0,...o}));ht.displayName="TableRow";var ct=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("th",{ref:r,className:l("h-10 px-5 py-3 text-left align-middle font-semibold text-white/55 [&:has([role=checkbox])]:pr-0 whitespace-nowrap",e),...t}));ct.displayName="TableHead";var Ge=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("td",{ref:r,className:l("p-5 align-middle [&:has([role=checkbox])]:pr-0 text-white/85 whitespace-nowrap",e),...t}));Ge.displayName="TableCell";function Z1({data:e,columns:t,searchPlaceholder:r="Search...",searchKeys:o,onRowClick:a,className:n,maxHeight:s,rounded:i=true}){let[d,c]=Te.useState(""),[m,u]=Te.useState({key:"",direction:null}),p=Te.useMemo(()=>{let h=[...e];return d&&o&&(h=h.filter(x=>o.some(b=>String(x[b]??"").toLowerCase().includes(d.toLowerCase())))),m.key&&m.direction&&h.sort((x,b)=>{let f=x[m.key],v=b[m.key];return f==null||v===void 0||v===null?0:f<v?m.direction==="asc"?-1:1:f>v?m.direction==="asc"?1:-1:0}),h},[e,d,o,m]),g=h=>{u(x=>({key:h,direction:x.key===h&&x.direction==="asc"?"desc":"asc"}));};return jsxRuntime.jsxs("div",{className:l("space-y-4",n),children:[o&&jsxRuntime.jsx("div",{className:"relative max-w-sm",children:jsxRuntime.jsx(Et,{placeholder:r,value:d,onChange:h=>c(h.target.value),leftIcon:jsxRuntime.jsx(lucideReact.Search,{className:"w-4 h-4 text-white/40"})})}),jsxRuntime.jsxs(Sr,{rounded:i,maxHeight:s,children:[jsxRuntime.jsx(Dr,{children:jsxRuntime.jsx(ht,{children:t.map(h=>jsxRuntime.jsx(ct,{className:l(h.sortable&&"cursor-pointer select-none hover:text-cyan-500 transition-colors",h.className),onClick:()=>h.sortable&&g(h.key),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[h.header,h.sortable&&jsxRuntime.jsx("span",{className:"text-white/30",children:m.key===h.key?m.direction==="asc"?jsxRuntime.jsx(lucideReact.ArrowUp,{className:"w-3 h-3 text-cyan-500"}):jsxRuntime.jsx(lucideReact.ArrowDown,{className:"w-3 h-3 text-cyan-500"}):jsxRuntime.jsx(lucideReact.ArrowUpDown,{className:"w-3 h-3"})})]})},String(h.key)))})}),jsxRuntime.jsxs(Hr,{children:[p.map((h,x)=>jsxRuntime.jsx(ht,{onClick:()=>a?.(h),className:l(a&&"cursor-pointer hover:bg-white/[0.03] transition-colors group"),children:t.map(b=>jsxRuntime.jsx(Ge,{className:b.className,children:b.render?b.render(h):h[b.key]},String(b.key)))},x)),p.length===0&&jsxRuntime.jsx(ht,{children:jsxRuntime.jsxs(Ge,{colSpan:t.length,className:"h-32 text-center text-white/40",children:['No results found for "',d,'"']})})]})]})]})}var fa=Te__namespace.default.forwardRef(({className:e,containerClassName:t,alt:r,src:o,fallback:a,onLoad:n,onError:s,...i},d)=>{let[c,m]=Te.useState(true),[u,p]=Te.useState(false),[g,h]=Te.useState(false),x=Te.useRef(null);Te.useEffect(()=>{x.current?.complete&&(m(false),h(true));},[o]);let b=v=>{m(false),n?.(v);},f=v=>{m(false),p(true),s?.(v);};return u&&a?jsxRuntime.jsx(jsxRuntime.Fragment,{children:a}):jsxRuntime.jsxs("div",{className:l("relative overflow-hidden rounded-2xl bg-gray-100 dark:bg-white/[0.02] border border-gray-200 dark:border-white/10",t),children:[c&&jsxRuntime.jsx(rs,{className:"absolute inset-0 h-full w-full"}),jsxRuntime.jsx("img",{ref:v=>{x.current=v,typeof d=="function"?d(v):d&&(d.current=v);},src:o,alt:r,onLoad:b,onError:f,className:l("h-full w-full object-cover",!g&&"transition-opacity duration-300",c?"opacity-0":"opacity-100",e),...i})]})});fa.displayName="Image";var ym=classVarianceAuthority.cva("flex flex-col gap-4 rounded-2xl border p-4 transition-all duration-200",{variants:{variant:{default:"bg-white border-gray-200 dark:bg-white/[0.03] dark:border-white/10",glass:"backdrop-blur-md bg-white/80 border-white/20 dark:bg-black/40 dark:border-white/10"}},defaultVariants:{variant:"default"}}),km=Te__namespace.default.forwardRef(({className:e,variant:t,user:r,onFollow:o,onMessage:a,...n},s)=>jsxRuntime.jsxs("div",{ref:s,className:l(ym({variant:t,className:e})),...n,children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between",children:[jsxRuntime.jsxs("div",{className:"flex gap-3",children:[jsxRuntime.jsx(U,{src:r.avatarSrc,alt:r.name,size:"lg"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:r.name}),r.role&&jsxRuntime.jsx("span",{className:"text-xs text-gray-500 dark:text-white/50",children:r.role}),r.email&&jsxRuntime.jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 mt-0.5",children:r.email})]})]}),o&&jsxRuntime.jsx(R,{size:"sm",variant:"outline",onClick:o,children:"Follow"})]}),r.bio&&jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 line-clamp-2",children:r.bio}),r.stats&&jsxRuntime.jsx("div",{className:"flex gap-4 border-t border-gray-100 pt-3 dark:border-white/5",children:r.stats.map((i,d)=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:i.value}),jsxRuntime.jsx("span",{className:"text-[10px] text-gray-500 dark:text-white/40",children:i.label})]},d))}),a&&jsxRuntime.jsx(R,{className:"w-full mt-2",onClick:a,children:"Message"})]}));km.displayName="UserPreview";var Cm=classVarianceAuthority.cva("relative pl-8 pb-8 last:pb-0",{variants:{status:{default:"[&>div:first-child]:bg-gray-200 dark:[&>div:first-child]:bg-white/20",active:"[&>div:first-child]:bg-blue-500",success:"[&>div:first-child]:bg-emerald-500",error:"[&>div:first-child]:bg-rose-500"}},defaultVariants:{status:"default"}}),Mm=Te__namespace.default.forwardRef(({className:e,status:t,title:r,date:o,description:a,icon:n,isLast:s,...i},d)=>jsxRuntime.jsxs("div",{ref:d,className:l(Cm({status:t,className:e})),...i,children:[!s&&jsxRuntime.jsx("div",{className:"absolute left-[11px] top-[24px] bottom-0 w-px bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsx("div",{className:l("absolute left-0 top-1.5 flex h-6 w-6 items-center justify-center rounded-full border-2 border-white dark:border-black ring-1 ring-transparent transition-colors",t==="active"?"bg-blue-500 ring-blue-500/30":t==="success"?"bg-emerald-500 ring-emerald-500/30":t==="error"?"bg-rose-500 ring-rose-500/30":"bg-gray-200 dark:bg-white/20"),children:n&&jsxRuntime.jsx("span",{className:"text-white text-[10px]",children:n})}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:r}),o&&jsxRuntime.jsx("span",{className:"text-xs text-gray-500 dark:text-white/40",children:o})]}),a&&jsxRuntime.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:a})]})]}));Mm.displayName="TimelineItem";var hN=({children:e,className:t})=>jsxRuntime.jsx("div",{className:l("flex flex-col",t),children:e});var cs=({node:e,depth:t=0,onSelect:r})=>{let[o,a]=Te.useState(false),n=e.children&&e.children.length>0,s=i=>{i.stopPropagation(),n&&a(!o),r?.(e);};return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 rounded-lg px-2 py-1.5 text-sm text-gray-700 transition-colors hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-white/[0.03] cursor-pointer"),style:{paddingLeft:`${t*12+8}px`},onClick:s,children:[n?jsxRuntime.jsx("span",{className:"text-gray-400 dark:text-white/40",children:o?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})}):jsxRuntime.jsx("span",{className:"w-4"}),e.icon?jsxRuntime.jsx("span",{className:"text-gray-500 dark:text-white/50",children:e.icon}):jsxRuntime.jsx("span",{className:"text-blue-500 dark:text-blue-400",children:n?o?jsxRuntime.jsx(lucideReact.FolderOpen,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"})}),jsxRuntime.jsx("span",{className:"truncate",children:e.label})]}),o&&n&&jsxRuntime.jsx("div",{className:"animate-in slide-in-from-top-1 fade-in duration-200",children:e.children.map(i=>jsxRuntime.jsx(cs,{node:i,depth:t+1,onSelect:r},i.id))})]})},TN=({data:e,className:t,onSelect:r})=>jsxRuntime.jsx("div",{className:l("w-full select-none",t),children:e.map(o=>jsxRuntime.jsx(cs,{node:o,onSelect:r},o.id))});function ds({title:e,view:t="board",onViewChange:r,onFilter:o,onSort:a,onAddColumn:n,canUndo:s,canRedo:i,onUndo:d,onRedo:c,className:m}){let u=[{id:"board",icon:lucideReact.Layout,label:"Board"},{id:"list",icon:lucideReact.List,label:"List"},{id:"calendar",icon:lucideReact.Calendar,label:"Calendar"},{id:"timeline",icon:lucideReact.Clock,label:"Timeline"}];return jsxRuntime.jsxs("div",{className:l("flex items-center justify-between mb-8",m),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-6",children:[jsxRuntime.jsx("h1",{className:"text-2xl font-bold text-white tracking-tight",children:e}),jsxRuntime.jsx("div",{className:"flex items-center bg-white/5 rounded-xl p-1",children:u.map(p=>jsxRuntime.jsxs("button",{onClick:()=>r?.(p.id),className:l("flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs font-medium transition-all",t===p.id?"bg-white/10 text-white shadow-lg":"text-white/40 hover:text-white/60"),children:[jsxRuntime.jsx(p.icon,{className:"h-3.5 w-3.5"}),p.label]},p.id))})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mr-2",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"icon",onClick:d,disabled:!s,className:"h-8 w-8 text-white/40 disabled:opacity-20",children:jsxRuntime.jsx(lucideReact.Undo2,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",onClick:c,disabled:!i,className:"h-8 w-8 text-white/40 disabled:opacity-20",children:jsxRuntime.jsx(lucideReact.Redo2,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",onClick:o,className:"gap-2 text-white/60",children:[jsxRuntime.jsx(lucideReact.Filter,{className:"h-4 w-4"}),"Filter"]}),jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",onClick:a,className:"gap-2 text-white/60",children:[jsxRuntime.jsx(lucideReact.SortAsc,{className:"h-4 w-4"}),"Sort"]}),jsxRuntime.jsx("div",{className:"w-px h-4 bg-white/10 mx-2"}),jsxRuntime.jsxs(R,{size:"sm",onClick:n,className:"gap-2",children:[jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"}),"Add Column"]}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-9 w-9 text-white/40",children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-4 w-4"})})]})]})}function us({count:e,limit:t,className:r}){if(!t)return null;let o=e>t,a=Math.min(e/t*100,100);return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3",r),children:[jsxRuntime.jsx("div",{className:"flex-1 h-1 bg-white/5 rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:l("h-full transition-all duration-500",o?"bg-red-500":a>80?"bg-orange-500":"bg-blue-500"),style:{width:`${a}%`}})}),jsxRuntime.jsxs("div",{className:l("flex items-center gap-1.5 text-[10px] font-bold px-2 py-0.5 rounded-full",o?"bg-red-500/20 text-red-400":"bg-white/5 text-white/40"),children:[o&&jsxRuntime.jsx(lucideReact.AlertCircle,{className:"h-3 w-3"}),e,"/",t]})]})}var ha=Te__namespace.default.memo(({task:e,isSelected:t,showTimer:r,onEdit:o,onDelete:a,draggable:n=true,activeTimerTaskId:s,selectable:i,cardClassName:d,onTaskClick:c,onTaskSelectionChange:m,onTaskTimerToggle:u,onDragStart:p,onDragOver:g,onDrop:h,renderCard:x})=>{if(x)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:x(e)});let b=f=>{switch(f){case "urgent":return "danger";case "high":return "warning";case "medium":return "info";case "low":return "success";default:return "neutral"}};return jsxRuntime.jsx(ce,{onClick:f=>c?.(f,e),draggable:n,onDragStart:p,onDragOver:g,onDrop:h,className:l("p-6 border border-white/10 bg-white/[0.03] hover:bg-white/[0.06] transition-all duration-200 rounded-2xl group cursor-grab active:cursor-grabbing",e.blockedBy&&e.blockedBy.length>0&&"border-red-500/30 bg-red-500/[0.02]",t&&"ring-2 ring-cyan-500/50 bg-cyan-500/[0.02]",d),children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-3",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i&&jsxRuntime.jsx(jo,{checked:t,onChange:f=>{m?.(t?[]:[e.id]);},onClick:f=>f.stopPropagation(),className:"mr-1"}),e.blockedBy&&e.blockedBy.length>0&&jsxRuntime.jsx(lucideReact.Lock,{className:"h-3.5 w-3.5 text-red-500 flex-shrink-0"}),jsxRuntime.jsx(Ne,{className:l("font-medium text-sm leading-tight group-hover:text-cyan-400 transition-colors truncate",e.blockedBy&&e.blockedBy.length>0&&"text-red-400/80"),children:e.title})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[a&&jsxRuntime.jsx("button",{onClick:f=>{f.stopPropagation(),a(e.id);},className:"p-1 rounded-md hover:bg-red-500/20 text-white/20 hover:text-red-400 transition-colors",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-3.5 w-3.5"})}),n&&jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-white/20 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]})]}),e.description&&jsxRuntime.jsx(Ne,{className:"text-xs text-white/50 line-clamp-2",children:e.description}),e.progress!==void 0&&jsxRuntime.jsxs("div",{className:"space-y-1.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[jsxRuntime.jsx("span",{className:"text-white/30 uppercase font-bold tracking-wider",children:"Progress"}),jsxRuntime.jsxs("span",{className:"text-white/50",children:[e.progress,"%"]})]}),jsxRuntime.jsx("div",{className:"h-1 w-full bg-white/[0.03] rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:"h-full bg-cyan-500 transition-all duration-500",style:{width:`${e.progress}%`}})})]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2 mt-1",children:[e.priority&&jsxRuntime.jsx(We,{variant:b(e.priority),className:"text-[10px] px-1.5 py-0 uppercase font-bold",children:e.priority}),e.tags?.map(f=>jsxRuntime.jsx(We,{variant:"neutral",className:"text-[10px] px-1.5 py-0 bg-white/[0.03] border-white/5",children:f},f))]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between mt-2 pt-3 border-t border-white/5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-white/30",children:[e.timeSpent!==void 0&&jsxRuntime.jsxs("div",{className:l("flex items-center gap-1 px-1.5 py-0.5 rounded-md transition-colors",s===e.id?"bg-cyan-500/20 text-cyan-400":"bg-white/[0.03]"),children:[s===e.id?jsxRuntime.jsx(lucideReact.Pause,{className:"h-2.5 w-2.5 cursor-pointer hover:scale-110 transition-transform",onClick:f=>{f.stopPropagation(),u?.(e.id);}}):jsxRuntime.jsx(lucideReact.Play,{className:"h-2.5 w-2.5 cursor-pointer hover:scale-110 transition-transform",onClick:f=>{f.stopPropagation(),u?.(e.id);}}),jsxRuntime.jsxs("span",{className:"font-mono",children:[Math.floor(e.timeSpent/3600),"h ",Math.floor(e.timeSpent%3600/60),"m"]})]}),e.comments!==void 0&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-3 w-3"}),e.comments]}),e.attachments!==void 0&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-3 w-3"}),e.attachments]}),e.dueDate&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Clock,{className:"h-3 w-3"}),e.dueDate]})]}),e.assignee&&jsxRuntime.jsx("div",{className:"flex -space-x-2",children:jsxRuntime.jsx("div",{className:"h-6 w-6 rounded-full border-2 border-[#0a0a0a] bg-white/[0.06] flex items-center justify-center text-[10px] font-bold overflow-hidden",children:e.assignee.avatar?jsxRuntime.jsx("img",{src:e.assignee.avatar,alt:e.assignee.name,className:"h-full w-full object-cover"}):e.assignee.name[0]})})]})]})})});ha.displayName="KanbanCard";function xa({column:e,tasks:t,onAddTask:r,onCollapse:o,onTaskClick:a,onAction:n,onDragStart:s,onDragOver:i,onDrop:d,isCollapsed:c,children:m,className:u}){return jsxRuntime.jsxs("div",{className:l("flex flex-col h-full transition-all duration-300",c?"w-12":"w-80",u),onDragOver:p=>i?.(p),onDrop:p=>d?.(p),onDragStart:p=>s?.(p,e.id,"column"),draggable:!c,children:[jsxRuntime.jsxs("div",{className:l("flex items-center justify-between mb-4 px-2",c&&"flex-col gap-4"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[jsxRuntime.jsx("button",{onClick:()=>o?.(e.id),className:"p-1 rounded hover:bg-white/5 text-white/40",children:c?jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"})}),!c&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:e.color||"#3b82f6"}}),jsxRuntime.jsx("h3",{className:"font-bold text-sm text-white truncate",children:e.title}),jsxRuntime.jsx("span",{className:"text-[10px] font-bold px-1.5 py-0.5 rounded-md bg-white/5 text-white/40",children:t.length})]})]}),!c&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>r?.(e.id),children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>n?.("more"),children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-4 w-4"})})]})]}),!c&&e.limit&&jsxRuntime.jsx("div",{className:"px-2 mb-4",children:jsxRuntime.jsx(us,{count:t.length,limit:e.limit})}),jsxRuntime.jsx("div",{className:l("flex-1 overflow-y-auto min-h-0 px-2 space-y-3 custom-scrollbar",c&&"hidden"),children:m||t.map(p=>jsxRuntime.jsx(ha,{task:p,onTaskClick:(g,h)=>a?.(h),onDragStart:g=>s?.(g,p.id,"task"),onDragOver:g=>i?.(g,p.id),onDrop:g=>d?.(g,p.id)},p.id))}),c&&jsxRuntime.jsx("div",{className:"flex-1 flex items-center justify-center",children:jsxRuntime.jsx("span",{className:"rotate-90 whitespace-nowrap text-[10px] font-bold uppercase tracking-widest text-white/20",children:e.title})})]})}function po({tasks:e,columns:t,onTaskClick:r,className:o}){let a=n=>t.find(s=>s.id===n);return jsxRuntime.jsx("div",{className:l("bg-white/[0.02] border border-white/5 rounded-2xl overflow-hidden",o),children:jsxRuntime.jsxs(Sr,{children:[jsxRuntime.jsx(Dr,{children:jsxRuntime.jsxs(ht,{className:"hover:bg-transparent border-white/5",children:[jsxRuntime.jsx(ct,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Task"}),jsxRuntime.jsx(ct,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Status"}),jsxRuntime.jsx(ct,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Priority"}),jsxRuntime.jsx(ct,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Assignee"}),jsxRuntime.jsx(ct,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Due Date"})]})}),jsxRuntime.jsx(Hr,{children:e.map(n=>{let s=a(n.columnId);return jsxRuntime.jsxs(ht,{className:"border-white/5 hover:bg-white/[0.03] cursor-pointer transition-colors",onClick:()=>r?.(n),children:[jsxRuntime.jsx(Ge,{className:"font-medium text-white",children:n.title}),jsxRuntime.jsx(Ge,{children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:s?.color||"#3b82f6"}}),jsxRuntime.jsx("span",{className:"text-xs text-white/60",children:s?.title})]})}),jsxRuntime.jsx(Ge,{children:jsxRuntime.jsx(We,{variant:n.priority==="urgent"?"danger":n.priority==="high"?"warning":"info",className:"text-[10px] uppercase",children:n.priority||"medium"})}),jsxRuntime.jsx(Ge,{children:n.assignee&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(U,{src:n.assignee.avatar,alt:n.assignee.name,size:"sm"}),jsxRuntime.jsx("span",{className:"text-xs text-white/60",children:n.assignee.name})]})}),jsxRuntime.jsx(Ge,{className:"text-xs text-white/40",children:n.dueDate?new Date(n.dueDate).toLocaleDateString():"-"})]},n.id)})})]})})}function fs({tasks:e,className:t}){return jsxRuntime.jsxs("div",{className:l("p-8 bg-white/[0.02] border border-white/5 rounded-2xl flex flex-col items-center justify-center min-h-[400px]",t),children:[jsxRuntime.jsx("div",{className:"h-12 w-12 rounded-full bg-blue-500/10 flex items-center justify-center mb-4",children:jsxRuntime.jsx("div",{className:"h-6 w-6 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})}),jsxRuntime.jsx("h3",{className:"text-lg font-bold text-white mb-2",children:"Timeline View"}),jsxRuntime.jsxs("p",{className:"text-sm text-white/40 text-center max-w-xs",children:["The timeline view is currently being optimized for high-performance rendering of ",e.length," tasks."]})]})}function gs({tasks:e,columns:t,onTaskClick:r,className:o}){return jsxRuntime.jsx(po,{tasks:e,columns:t,onTaskClick:r,className:o})}function bs({tasks:e,onTaskClick:t,onAddTask:r,className:o}){let[a,n]=Te.useState(new Date),s=(f,v)=>new Date(f,v+1,0).getDate(),i=(f,v)=>new Date(f,v,1).getDay(),d=a.getFullYear(),c=a.getMonth(),m=s(d,c),u=i(d,c),p=()=>n(new Date(d,c-1,1)),g=()=>n(new Date(d,c+1,1)),h=["January","February","March","April","May","June","July","August","September","October","November","December"],x=[];for(let f=0;f<u;f++)x.push(null);for(let f=1;f<=m;f++)x.push(new Date(d,c,f));let b=f=>e.filter(v=>{if(!v.dueDate)return false;let w=new Date(v.dueDate);return w.getDate()===f.getDate()&&w.getMonth()===f.getMonth()&&w.getFullYear()===f.getFullYear()});return jsxRuntime.jsxs("div",{className:l("flex flex-col h-full",o),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-6",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsxs(du,{level:3,className:"text-white",children:[h[c]," ",d]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"sm",onClick:p,children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"sm",onClick:g,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]}),jsxRuntime.jsx(R,{variant:"ghost",size:"sm",onClick:()=>n(new Date),children:"Today"})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-7 gap-px bg-white/5 border border-white/5 rounded-2xl overflow-hidden flex-1",children:[["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(f=>jsxRuntime.jsx("div",{className:"bg-white/[0.02] p-3 text-center",children:jsxRuntime.jsx(Ne,{size:"xs",className:"text-white/40 font-medium uppercase tracking-wider",children:f})},f)),x.map((f,v)=>jsxRuntime.jsx("div",{className:l("bg-gray-900/50 min-h-[120px] p-2 group transition-colors hover:bg-white/[0.02]",!f&&"bg-transparent"),children:f&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-2",children:[jsxRuntime.jsx("span",{className:l("text-xs font-medium w-6 h-6 flex items-center justify-center rounded-full",f.toDateString()===new Date().toDateString()?"bg-blue-500 text-white":"text-white/40"),children:f.getDate()}),jsxRuntime.jsx("button",{onClick:()=>r?.(f),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-white/10 rounded-lg transition-all",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-3 w-3 text-white/40"})})]}),jsxRuntime.jsx("div",{className:"space-y-1",children:b(f).map(w=>jsxRuntime.jsx("div",{onClick:()=>t?.(w),className:"px-2 py-1 rounded-lg bg-blue-500/10 border border-blue-500/20 cursor-pointer hover:bg-blue-500/20 transition-all",children:jsxRuntime.jsx(Ne,{size:"xs",className:"text-blue-400 truncate",children:w.title})},w.id))})]})},v))]})]})}function du({children:e,level:t,className:r}){let o=`h${t}`;return jsxRuntime.jsx(o,{className:l("font-semibold",r),children:e})}function hs({children:e,...t}){return jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-2xl bg-white dark:bg-black/90 text-gray-900 dark:text-white",children:jsxRuntime.jsx(Zo,{usePopover:false,...t,children:e})})}function C2({children:e,open:t,onOpenChange:r,...o}){let a=Te.useRef(null);Te.useEffect(()=>{let s=i=>{i.key==="Escape"&&r(false);};return t&&(document.addEventListener("keydown",s),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",s),document.body.style.overflow="unset";}},[t,r]);let n=s=>{s.target===a.current&&r(false);};return t?reactDom.createPortal(jsxRuntime.jsx("div",{ref:a,onClick:n,className:"fixed inset-0 z-[100] flex items-start justify-center bg-black/60 backdrop-blur-sm animate-in fade-in duration-200 pt-[20vh]",children:jsxRuntime.jsx("div",{className:"relative w-full max-w-lg overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/90 shadow-2xl animate-in zoom-in-95 duration-200",children:jsxRuntime.jsx(Zo,{usePopover:false,...o,children:e})})}),document.body):null}function xs({className:e,...t}){return jsxRuntime.jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-white/10 px-3","cmdk-input-wrapper":"",children:[jsxRuntime.jsx(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsxRuntime.jsx(zn,{className:l("flex h-12 w-full rounded-md bg-transparent py-3 text-sm text-gray-900 dark:text-white outline-none placeholder:text-gray-400 dark:placeholder:text-white/50 disabled:cursor-not-allowed disabled:opacity-50 border-none focus:ring-0 px-0",e),...t})]})}function vs({className:e,...t}){return jsxRuntime.jsx(Kn,{className:l("max-h-[300px] overflow-y-auto overflow-x-hidden p-2",e),...t})}function M2(e){return jsxRuntime.jsx($n,{className:"py-6 text-center text-sm",...e})}function ws({children:e,heading:t,className:r,...o}){return jsxRuntime.jsxs("div",{className:l("overflow-hidden p-1 text-gray-900 dark:text-white",r),...o,children:[t&&jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-gray-500 dark:text-white/50",children:t}),e]})}function ys({className:e,...t}){return jsxRuntime.jsx(Fn,{className:l("relative flex cursor-default select-none items-center rounded-2xl px-2 py-1.5 text-sm outline-none text-gray-900 dark:text-white aria-selected:bg-gray-100 dark:aria-selected:bg-white/[0.06] aria-selected:text-gray-900 dark:aria-selected:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t})}function R2({className:e,...t}){return jsxRuntime.jsx("span",{className:l("ml-auto text-xs tracking-widest text-gray-400 dark:text-white/50",e),...t})}function Ns({onSearchChange:e,onFilterChange:t,onSortChange:r,onViewChange:o,onGroupChange:a,priorityOptions:n=[],tagOptions:s=[],assigneeOptions:i=[],viewOptions:d=["board","list","calendar","timeline"],sortOptions:c=[],groupOptions:m=[],savedFilters:u=[],onSaveFilter:p,className:g}){let[h,x]=Te.useState(""),[b,f]=Te.useState({}),[v,w]=Te.useState("board"),y=(C,T)=>{let E=b[C]||[],O=E.includes(T)?E.filter(S=>S!==T):[...E,T],P={...b,[C]:O};O.length===0&&delete P[C],f(P),t?.(P);},k=()=>{f({}),t?.({}),x(""),e?.("");},N=Object.values(b).flat().length;return jsxRuntime.jsxs(ce,{className:l("p-2 flex flex-wrap items-center gap-3 bg-white/[0.02] border-white/5",g),children:[jsxRuntime.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-white/20"}),jsxRuntime.jsx("input",{type:"text",placeholder:"Search tasks...",className:"w-full pl-10 pr-4 py-2 text-sm rounded-2xl border border-white/10 bg-white/[0.03] focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all placeholder:text-white/20 text-white",value:h,onChange:C=>{x(C.target.value),e?.(C.target.value);}})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(ya,{label:"Priority",options:n,selected:b.priority||[],onSelect:C=>y("priority",C)}),jsxRuntime.jsx(ya,{label:"Tags",options:s,selected:b.tags||[],onSelect:C=>y("tags",C)}),jsxRuntime.jsx(ya,{label:"Assignee",options:i,selected:b.assignee||[],onSelect:C=>y("assignee",C)}),jsxRuntime.jsx("div",{className:"w-px h-4 bg-white/10 mx-1"}),jsxRuntime.jsxs(st,{children:[jsxRuntime.jsx(it,{children:jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",className:"h-9 gap-2 text-white/60",children:[jsxRuntime.jsx(lucideReact.SortAsc,{className:"h-4 w-4"}),"Sort"]})}),jsxRuntime.jsx(lt,{className:"w-48 p-1 bg-gray-900 border-white/10",children:c.map(C=>jsxRuntime.jsx("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-xs text-white/60 hover:text-white hover:bg-white/5 rounded-lg text-left",onClick:()=>r?.(C.value,"asc"),children:C.label},C.value))})]}),N>0&&jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",onClick:k,className:"h-9 px-3 text-xs text-white/40 hover:text-white gap-2",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-3.5 w-3.5"})," Clear",jsxRuntime.jsx(We,{variant:"neutral",className:"bg-white/[0.06] border-white/10 ml-1",children:N})]})]})]})}function ya({label:e,options:t,selected:r,onSelect:o}){return jsxRuntime.jsxs(st,{children:[jsxRuntime.jsx(it,{children:jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",className:l("h-9 gap-2 text-xs transition-all",r.length>0?"bg-blue-500/10 text-blue-400":"text-white/60 hover:text-white"),children:[e,r.length>0?jsxRuntime.jsx(We,{variant:"info",className:"h-4 min-w-[16px] px-1 bg-blue-500 text-white border-none",children:r.length}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-3.5 w-3.5 opacity-40"})]})}),jsxRuntime.jsx(lt,{className:"w-56 p-0 bg-gray-900 border-white/10 shadow-2xl",children:jsxRuntime.jsxs(hs,{children:[jsxRuntime.jsx(xs,{placeholder:`Search ${e.toLowerCase()}...`,className:"border-none"}),jsxRuntime.jsx(vs,{className:"max-h-[240px]",children:jsxRuntime.jsx(ws,{children:t.map(a=>jsxRuntime.jsxs(ys,{value:a.value,onClick:()=>o(a.value),className:"flex items-center justify-between py-2 px-3 cursor-pointer hover:bg-white/5",children:[jsxRuntime.jsx("span",{className:"text-xs text-white/80",children:a.label}),r.includes(a.value)&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3.5 w-3.5 text-blue-500"})]},a.value))})})]})})]})}function fo({isOpen:e,onClose:t,children:r,className:o}){let a=Te.useRef(null),[n,s]=Te__namespace.default.useState(false);Te.useEffect(()=>{s(true);},[]),Te.useEffect(()=>{let d=a.current;d&&(e?d.open||(d.showModal(),document.body.style.overflow="hidden"):d.open&&(d.close(),document.body.style.overflow="unset"));},[e,n]),Te.useEffect(()=>{let d=a.current;if(!d)return;let c=m=>{m.preventDefault(),t();};return d.addEventListener("cancel",c),()=>d.removeEventListener("cancel",c)},[t,n]);let i=d=>{d.target===a.current&&t();};return n?reactDom.createPortal(jsxRuntime.jsx("dialog",{ref:a,onClick:i,className:l("fixed inset-0 z-[100] m-auto bg-transparent p-0 backdrop:bg-black/60 backdrop:backdrop-blur-sm open:flex open:items-center open:justify-center","animate-in fade-in duration-200",o),children:jsxRuntime.jsxs("div",{className:l("relative w-full max-w-lg scale-100 gap-4 border border-zinc-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 p-6 shadow-2xl backdrop-blur-xl transition-all sm:rounded-2xl","animate-in fade-in zoom-in-95 duration-200 slide-in-from-bottom-2"),children:[r,jsxRuntime.jsxs("button",{onClick:t,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20 disabled:pointer-events-none",children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:[jsxRuntime.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntime.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})}),document.body):null}function go({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left mb-4",e),children:t})}function bo({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),children:t})}function Ts({className:e,children:t}){return jsxRuntime.jsx(nt,{as:"h2",className:l("text-lg font-semibold leading-none tracking-tight",e),children:t})}function J2({className:e,children:t}){return jsxRuntime.jsx(Ne,{variant:"muted",className:l("text-sm",e),children:t})}function Cs({items:e,onToggle:t,className:r}){if(!e||e.length===0)return null;let o=e.filter(n=>n.completed).length,a=o/e.length*100;return jsxRuntime.jsxs("div",{className:l("space-y-3",r),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between text-[10px] text-white/40 uppercase tracking-wider font-bold",children:[jsxRuntime.jsx("span",{children:"Checklist"}),jsxRuntime.jsxs("span",{children:[o,"/",e.length]})]}),jsxRuntime.jsx("div",{className:"h-1 w-full bg-white/5 rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:"h-full bg-blue-500 transition-all duration-500",style:{width:`${a}%`}})}),jsxRuntime.jsx("div",{className:"space-y-2",children:e.map(n=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 group cursor-pointer",onClick:()=>t?.(n.id),children:[n.completed?jsxRuntime.jsx(lucideReact.CheckSquare,{className:"h-4 w-4 text-blue-500"}):jsxRuntime.jsx(lucideReact.Square,{className:"h-4 w-4 text-white/20 group-hover:text-white/40"}),jsxRuntime.jsx("span",{className:l("text-sm transition-colors",n.completed?"text-white/40 line-through":"text-white/80"),children:n.title})]},n.id))})]})}function Ms({comments:e,onAddComment:t,className:r}){let[o,a]=Te.useState(""),n=()=>{o.trim()&&(t?.(o),a(""));};return jsxRuntime.jsxs("div",{className:l("space-y-6",r),children:[jsxRuntime.jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Comments"}),jsxRuntime.jsx("div",{className:"flex gap-3",children:jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx(Rr,{placeholder:"Write a comment...",value:o,onChange:s=>a(s.target.value),className:"min-h-[80px] bg-white/[0.03] border-white/10 text-sm"}),jsxRuntime.jsx("div",{className:"flex justify-end mt-2",children:jsxRuntime.jsxs(R,{size:"sm",onClick:n,disabled:!o.trim(),className:"gap-2",children:[jsxRuntime.jsx(lucideReact.Send,{className:"h-3.5 w-3.5"}),"Comment"]})})]})}),jsxRuntime.jsx("div",{className:"space-y-6",children:e.map(s=>jsxRuntime.jsxs("div",{className:"flex gap-3",children:[jsxRuntime.jsx(U,{src:s.user.avatar,alt:s.user.name,size:"sm"}),jsxRuntime.jsxs("div",{className:"flex-1 bg-white/[0.03] border border-white/5 rounded-2xl p-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-1",children:[jsxRuntime.jsx("span",{className:"text-xs font-bold text-white",children:s.user.name}),jsxRuntime.jsx("span",{className:"text-[10px] text-white/30",children:s.timestamp.toLocaleString()})]}),jsxRuntime.jsx("p",{className:"text-sm text-white/70 leading-relaxed",children:s.content})]})]},s.id))})]})}function Rs({attachments:e,onRemove:t,onDownload:r,className:o}){return jsxRuntime.jsxs("div",{className:l("space-y-4",o),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Attachments"}),jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 text-white/40 hover:text-white",children:[jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-3 w-3"}),"Add"]})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-3",children:e.map(a=>jsxRuntime.jsxs("div",{className:"group relative bg-white/[0.03] border border-white/5 rounded-xl overflow-hidden hover:border-white/20 transition-all",children:[a.thumbnail?jsxRuntime.jsx("div",{className:"aspect-video w-full overflow-hidden",children:jsxRuntime.jsx("img",{src:a.thumbnail,alt:a.name,className:"w-full h-full object-cover"})}):jsxRuntime.jsx("div",{className:"aspect-video w-full flex items-center justify-center bg-white/5",children:jsxRuntime.jsx(lucideReact.FileIcon,{className:"h-8 w-8 text-white/20"})}),jsxRuntime.jsxs("div",{className:"p-2",children:[jsxRuntime.jsx("p",{className:"text-xs font-medium text-white truncate",children:a.name}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/30 uppercase",children:a.size})]}),jsxRuntime.jsxs("div",{className:"absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-full bg-white/10 hover:bg-white/20",onClick:()=>r?.(a),children:jsxRuntime.jsx(lucideReact.Download,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-full bg-red-500/20 hover:bg-red-500/40 text-red-400",onClick:()=>t?.(a.id),children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})]},a.id))})]})}function Ls({labels:e,selectedIds:t,onToggle:r,className:o}){return jsxRuntime.jsxs("div",{className:l("space-y-3",o),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Tag,{className:"h-3 w-3"}),"Labels"]}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(a=>{let n=t.includes(a.id);return jsxRuntime.jsxs("button",{onClick:()=>r(a.id),className:l("px-3 py-1.5 rounded-full text-xs font-medium transition-all flex items-center gap-2 border",n?"bg-white/10 border-white/20 text-white":"bg-transparent border-white/5 text-white/40 hover:border-white/10"),children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:a.color}}),a.name,n&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})]},a.id)})})]})}function Ps({users:e,selectedId:t,onSelect:r,className:o}){return jsxRuntime.jsxs("div",{className:l("space-y-3",o),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Users,{className:"h-3 w-3"}),"Assignee"]}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 gap-1",children:e.map(a=>{let n=t===a.id;return jsxRuntime.jsxs("button",{onClick:()=>r(a.id),className:l("flex items-center gap-3 p-2 rounded-xl transition-all text-left",n?"bg-white/10 text-white":"text-white/60 hover:bg-white/5"),children:[jsxRuntime.jsx(U,{src:a.avatar,alt:a.name,size:"sm"}),jsxRuntime.jsx("span",{className:"text-sm flex-1 truncate",children:a.name}),n&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-blue-500"})]},a.id)})})]})}function Ss({date:e,onChange:t,className:r}){return jsxRuntime.jsxs("div",{className:l("space-y-3",r),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-3 w-3"}),"Due Date"]}),e?jsxRuntime.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-2xl bg-white/5 border border-white/10",children:[jsxRuntime.jsx("div",{className:"h-8 w-8 rounded-lg bg-blue-500/20 flex items-center justify-center text-blue-400",children:jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-white",children:e.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/40",children:e.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})})]}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/20 hover:text-red-400",onClick:()=>t(void 0),children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}):jsxRuntime.jsxs(R,{variant:"ghost",className:"w-full justify-start gap-3 h-12 rounded-2xl border border-dashed border-white/10 text-white/40 hover:border-white/20 hover:bg-white/5",onClick:()=>t(new Date),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"}),"Set due date"]})]})}function Hs({initialSeconds:e=0,onTimeUpdate:t,className:r}){let[o,a]=Te.useState(e),[n,s]=Te.useState(false);Te.useEffect(()=>{let d=null;return n?d=setInterval(()=>{a(c=>{let m=c+1;return t?.(m),m});},1e3):clearInterval(d),()=>clearInterval(d)},[n,t]);let i=d=>{let c=Math.floor(d/3600),m=Math.floor(d%3600/60),u=d%60;return `${c.toString().padStart(2,"0")}:${m.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}`};return jsxRuntime.jsxs("div",{className:l("space-y-3",r),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Timer,{className:"h-3 w-3"}),"Time Tracking"]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-2xl bg-white/[0.03] border border-white/5",children:[jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("p",{className:"text-2xl font-mono font-bold text-white tracking-tight",children:i(o)}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/30 uppercase font-bold mt-1",children:"Total Time Spent"})]}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-10 w-10 rounded-full bg-white/5 hover:bg-white/10",onClick:()=>a(0),children:jsxRuntime.jsx(lucideReact.RotateCcw,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:n?"secondary":"primary",size:"icon",className:l("h-10 w-10 rounded-full shadow-lg transition-all",n?"bg-orange-500 hover:bg-orange-600":"bg-blue-600 hover:bg-blue-700"),onClick:()=>s(!n),children:n?jsxRuntime.jsx(lucideReact.Pause,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Play,{className:"h-4 w-4 ml-0.5"})})]})]})]})}function Is({isOpen:e,onClose:t,onSave:r,onDelete:o,onDuplicate:a,onArchive:n,task:s,columnId:i,columns:d=[],users:c=[],availableLabels:m=[],showSubtasks:u=true,showChecklist:p=true,showAttachments:g=true,showComments:h=true,showActivity:x=true}){let[b,f]=Te.useState(""),[v,w]=Te.useState(""),[y,k]=Te.useState("medium"),[N,C]=Te.useState(""),[T,E]=Te.useState(void 0),[O,P]=Te.useState([]),[S,$]=Te.useState(void 0);Te.useEffect(()=>{s?(f(s.title||""),w(s.description||""),k(s.priority||"medium"),C(s.columnId||""),E(s.assignee?.id),P(s.labels?.map(M=>M.id)||[]),$(s.dueDate?new Date(s.dueDate):void 0)):(f(""),w(""),k("medium"),C(i||""),E(void 0),P([]),$(void 0));},[s,e,i]);let D=()=>{b.trim()&&(r({...s,title:b,description:v,priority:y,columnId:N,assignee:c.find(M=>M.id===T),labels:m.filter(M=>O.includes(M.id)),dueDate:S?.toISOString()}),t());};return jsxRuntime.jsxs(fo,{isOpen:e,onClose:t,children:[jsxRuntime.jsxs(go,{className:"flex items-center justify-between pr-12",children:[jsxRuntime.jsx(Ts,{children:s?"Edit Task":"Create New Task"}),jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>a?.(s),children:jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>n?.(s.id),children:jsxRuntime.jsx(lucideReact.Archive,{className:"h-4 w-4"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-red-400",onClick:()=>o?.(s.id),children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4"})})]})})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8 py-6",children:[jsxRuntime.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{htmlFor:"task-title",className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Title"}),jsxRuntime.jsx(Et,{id:"task-title",placeholder:"What needs to be done?",value:b,onChange:M=>f(M.target.value),className:"text-lg font-bold bg-transparent border-white/10 focus:border-blue-500",autoFocus:true})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{htmlFor:"task-desc",className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Description"}),jsxRuntime.jsx(Rr,{id:"task-desc",placeholder:"Add more details...",value:v,onChange:M=>w(M.target.value),rows:6,className:"bg-white/[0.03] border-white/10 text-sm leading-relaxed"})]}),p&&s?.checklist&&jsxRuntime.jsx(Cs,{items:s.checklist}),g&&s?.attachments&&jsxRuntime.jsx(Rs,{attachments:[]}),h&&jsxRuntime.jsx(Ms,{comments:[]})]}),jsxRuntime.jsxs("div",{className:"space-y-8 bg-white/[0.02] p-6 rounded-3xl border border-white/5 h-fit",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Status"}),jsxRuntime.jsx(to,{value:N,onChange:M=>C(M),options:d.map(M=>({label:M.title,value:M.id})),className:"bg-white/5 border-white/10"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Priority"}),jsxRuntime.jsx(to,{value:y,onChange:M=>k(M),options:[{label:"Low",value:"low"},{label:"Medium",value:"medium"},{label:"High",value:"high"},{label:"Urgent",value:"urgent"}],className:"bg-white/5 border-white/10"})]}),jsxRuntime.jsx(Ps,{users:c,selectedId:T,onSelect:E}),jsxRuntime.jsx(Ls,{labels:m,selectedIds:O,onToggle:M=>P(F=>F.includes(M)?F.filter(re=>re!==M):[...F,M])}),jsxRuntime.jsx(Ss,{date:S,onChange:$}),jsxRuntime.jsx(Hs,{initialSeconds:s?.timeSpent})]})]}),jsxRuntime.jsxs(bo,{className:"border-t border-white/5 pt-6",children:[jsxRuntime.jsx(R,{variant:"ghost",onClick:t,children:"Cancel"}),jsxRuntime.jsx(R,{onClick:D,className:"px-8",children:"Save Changes"})]})]})}function As({title:e,count:t,isCollapsed:r,onToggle:o,children:a,className:n}){return jsxRuntime.jsxs("div",{className:l("space-y-4",n),children:[jsxRuntime.jsxs("button",{onClick:o,className:"flex items-center gap-3 w-full group",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[r?jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 text-white/20"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4 text-white/20"}),jsxRuntime.jsx("h4",{className:"text-xs font-bold uppercase tracking-widest text-white/40 group-hover:text-white/60 transition-colors",children:e})]}),jsxRuntime.jsx("div",{className:"h-px flex-1 bg-white/5"}),jsxRuntime.jsx("span",{className:"text-[10px] font-bold px-2 py-0.5 rounded-full bg-white/5 text-white/20",children:t})]}),!r&&jsxRuntime.jsx("div",{className:"animate-in fade-in slide-in-from-top-2 duration-300",children:a})]})}function Os(e){let[t,r]=Te.useState(""),[o,a]=Te.useState({}),n=Te.useMemo(()=>e.filter(d=>{if(t){let c=t.toLowerCase();if(!(d.title.toLowerCase().includes(c)||d.description?.toLowerCase().includes(c)||d.tags?.some(u=>u.toLowerCase().includes(c))))return false}for(let[c,m]of Object.entries(o))if(!(!m||m.length===0)&&(c==="priority"&&!m.includes(d.priority)||c==="assignee"&&(!d.assignee||!m.includes(d.assignee.id))||c==="tags"&&!d.tags?.some(u=>m.includes(u))))return false;return true}),[e,t,o]),s=Te.useCallback((d,c)=>{a(m=>{let u=m[d]||[],p=u.includes(c)?u.filter(h=>h!==c):[...u,c],g={...m,[d]:p};return p.length===0&&delete g[d],g});},[]),i=Te.useCallback(()=>{a({}),r("");},[]);return {searchQuery:t,setSearchQuery:r,activeFilters:o,setActiveFilters:a,filteredTasks:n,toggleFilter:s,clearFilters:i}}function zs(e){let[t,r]=Te.useState({history:[e],currentIndex:0}),o=Te.useRef(e);Te.useEffect(()=>{let i=e.tasks.length!==o.current.tasks.length||e.tasks.some((c,m)=>c.id!==o.current.tasks[m]?.id||c.columnId!==o.current.tasks[m]?.columnId),d=e.columns.length!==o.current.columns.length||e.columns.some((c,m)=>c.id!==o.current.columns[m]?.id);if(i||d){let c=t.history[t.currentIndex];c&&e.tasks.length===c.tasks.length&&e.tasks.every((u,p)=>u.id===c.tasks[p]?.id&&u.columnId===c.tasks[p]?.columnId)||r({history:[e],currentIndex:0}),o.current=e;}},[e,t.history,t.currentIndex]);let a=Te.useCallback(i=>{r(d=>({history:[...d.history.slice(0,d.currentIndex+1),i],currentIndex:d.currentIndex+1}));},[]),n=Te.useCallback(()=>{r(i=>i.currentIndex>0?{...i,currentIndex:i.currentIndex-1}:i);},[]),s=Te.useCallback(()=>{r(i=>i.currentIndex<i.history.length-1?{...i,currentIndex:i.currentIndex+1}:i);},[]);return {state:t.history[t.currentIndex],pushState:a,undo:n,redo:s,canUndo:t.currentIndex>0,canRedo:t.currentIndex<t.history.length-1}}function Ks({onUndo:e,onRedo:t,onSearch:r,onNewTask:o,onNewColumn:a,enabled:n=true}){Te.useEffect(()=>{if(!n)return;let s=i=>{(i.ctrlKey||i.metaKey)&&i.key==="z"&&!i.shiftKey&&(i.preventDefault(),e?.()),((i.ctrlKey||i.metaKey)&&i.key==="z"&&i.shiftKey||(i.ctrlKey||i.metaKey)&&i.key==="y")&&(i.preventDefault(),t?.()),((i.ctrlKey||i.metaKey)&&i.key==="f"||i.key==="/"&&document.activeElement===document.body)&&(i.preventDefault(),r?.()),i.key==="n"&&document.activeElement===document.body&&(i.preventDefault(),o?.()),i.key==="c"&&document.activeElement===document.body&&(i.preventDefault(),a?.());};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[n,e,t,r,o,a]);}function Fs({tasks:e,columns:t,selectedTaskIds:r,onTaskMove:o,onColumnMove:a,onTaskDrop:n,onTaskDragStart:s,onTaskDragEnd:i}){let[d,c]=Te.useState(null),[m,u]=Te.useState(null),[p,g]=Te.useState(null),[h,x]=Te.useState(null),[b,f]=Te.useState(null),v=Te.useRef(null),w=Te.useRef(null),y=(P,S,$)=>{$==="task"?(c(S),P.dataTransfer.setData("taskId",S),s?.(S)):(u(S),P.dataTransfer.setData("columnId",S)),P.dataTransfer.effectAllowed="move";},k=Te.useCallback(()=>{d&&i?.(d),c(null),u(null),g(null),x(null),f(null);},[d,i]);return {draggedTaskId:d,draggedColumnId:m,dragOverColumnId:p,dragOverTaskId:h,dropPosition:b,handleDragStart:y,handleDragEnd:k,handleDragOver:(P,S,$)=>{if(P.preventDefault(),P.dataTransfer.dropEffect="move",m){g(S);let D=P.currentTarget.getBoundingClientRect(),M=D.left+D.width/2;f(P.clientX<M?"left":"right");}else if(g(S),$){x($);let D=P.currentTarget.getBoundingClientRect(),M=D.top+D.height/2;f(P.clientY<M?"top":"bottom");}else P.target===P.currentTarget&&(x(null),f(null));},handleDrop:(P,S,$)=>{P.preventDefault();let D=d||P.dataTransfer.getData("taskId"),M=m||P.dataTransfer.getData("columnId");if(M&&a)a(M,S,b==="right"?"right":"left");else if(D&&o){if(!e.find(J=>J.id===D))return;(r.includes(D)?r:[D]).forEach(J=>{let fe=e.find(ot=>ot.id===J)?.columnId||"";o(J,S,$,b==="bottom"?"bottom":"top"),n?.(J,fe,S,0);});}k();},handleTouchStart:(P,S,$)=>{let D=P.touches[0];D&&(v.current=setTimeout(()=>{$==="task"?(c(S),s?.(S)):u(S),w.current={x:D.clientX,y:D.clientY};},500));},handleTouchMove:P=>{if(!d&&!m)return;P.preventDefault();let S=P.touches[0];if(!S)return;let $=document.elementFromPoint(S.clientX,S.clientY);if(!$)return;let D=$.closest("[data-column-id]"),M=$.closest("[data-task-id]");if(D){let F=D.getAttribute("data-column-id");if(g(F),m){let re=D.getBoundingClientRect(),J=re.left+re.width/2;f(S.clientX<J?"left":"right");}else if(M){let re=M.getAttribute("data-task-id");x(re);let J=M.getBoundingClientRect(),K=J.top+J.height/2;f(S.clientY<K?"top":"bottom");}}},handleTouchEnd:P=>{if(clearTimeout(v.current),d||m){if(p){let S=d,$=m;$&&a?a($,p,b==="right"?"right":"left"):S&&o&&o(S,p,h||void 0,b==="bottom"?"bottom":"top");}k();}},setDraggedTaskId:c}}function rp({columns:e,tasks:t,onTaskMove:r,onColumnMove:o,onTaskClick:a,onTaskAdd:n,onColumnAction:s,swimlanes:i=false,swimlaneBy:d="priority",view:c,onViewChange:m,className:u,...p}){let[g,h]=Te.useState(c||"board"),[x,b]=Te.useState(null),[f,v]=Te.useState([]),w=c||g,y=W=>{h(W),m?.(W);},{state:k,pushState:N,undo:C,redo:T,canUndo:E,canRedo:O}=zs({tasks:t,columns:e}),P=k?.tasks||[],S=k?.columns||[],{setSearchQuery:$,setActiveFilters:D,filteredTasks:M}=Os(P),F=Te.useMemo(()=>{if(!i)return null;let W={},Q=(V,H)=>H.includes(".")?H.split(".").reduce((I,Z)=>I&&I[Z],V):V[H];return M.forEach(V=>{let H=Q(V,d),I=String(H||"Uncategorized");W[I]||(W[I]=[]),W[I].push(V);}),W},[M,i,d]),{handleDragStart:re,handleDragOver:J,handleDrop:K}=Fs({columns:S,tasks:P,selectedTaskIds:[],onTaskMove:(W,Q,V,H)=>{let I=[...P],Z=I.findIndex(at=>at.id===W);if(Z===-1)return;let Se={...I[Z],columnId:Q};if(I.splice(Z,1),!V)I.push(Se);else {let at=I.findIndex(_o=>_o.id===V),Wo=H==="bottom"?at+1:at;I.splice(Wo,0,Se);}N({tasks:I,columns:S}),r?.(W,Q,V,H);}});Ks({onUndo:C,onRedo:T,onSearch:()=>document.querySelector('input[placeholder*="Search"]')?.focus(),onNewTask:()=>n?.("todo","New Task")});let ot=Te.useMemo(()=>P.find(W=>W.id===x),[P,x]),Xe=()=>{let W=Q=>{b(Q.id),a?.(Q);};switch(w){case "list":return jsxRuntime.jsx(po,{tasks:M,columns:S,onTaskClick:W});case "timeline":return jsxRuntime.jsx(fs,{tasks:M});case "table":return jsxRuntime.jsx(gs,{tasks:M,columns:S,onTaskClick:W});case "calendar":return jsxRuntime.jsx(bs,{tasks:M,onTaskClick:W});default:if(i){let Q=F&&Object.keys(F).length>0?F:{"All Tasks":[]};return jsxRuntime.jsx("div",{className:"flex flex-col gap-8 overflow-y-auto h-full pr-2 custom-scrollbar",children:Object.entries(Q).map(([V,H])=>jsxRuntime.jsx(As,{title:V,count:H.length,isCollapsed:f.includes(V),onToggle:()=>v(I=>I.includes(V)?I.filter(Z=>Z!==V):[...I,V]),children:jsxRuntime.jsx("div",{className:"flex gap-6 min-h-[200px]",children:S.map(I=>jsxRuntime.jsx(xa,{column:I,tasks:H.filter(Z=>Z.columnId===I.id),onTaskClick:W,onAddTask:()=>n?.(I.id,"New Task"),onAction:Z=>s?.(I.id,Z),onDragStart:re,onDragOver:(Z,Se)=>J(Z,I.id,Se),onDrop:(Z,Se)=>K(Z,I.id,Se)},I.id))})},V))})}return jsxRuntime.jsx("div",{className:"flex gap-6 overflow-x-auto pb-4 min-h-[500px] scrollbar-thin scrollbar-thumb-white/10",children:S.map(Q=>jsxRuntime.jsx(xa,{column:Q,tasks:M.filter(V=>V.columnId===Q.id),onTaskClick:W,onAddTask:()=>n?.(Q.id,"New Task"),onAction:V=>s?.(Q.id,V),onDragStart:re,onDragOver:(V,H)=>J(V,Q.id,H),onDrop:(V,H)=>K(V,Q.id,H)},Q.id))})}};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-4 h-full",u),children:[jsxRuntime.jsx(ds,{title:"Project Board",view:w,onViewChange:W=>y(W),canUndo:E,canRedo:O,onUndo:C,onRedo:T}),jsxRuntime.jsx(Ns,{onSearchChange:$,onFilterChange:D}),jsxRuntime.jsx("div",{className:"flex-1 overflow-hidden",children:Xe()}),ot&&jsxRuntime.jsx(Is,{isOpen:!!x,onClose:()=>b(null),task:ot,onSave:W=>{let Q=P.map(V=>V.id===ot.id?{...V,...W}:V);N({tasks:Q,columns:S}),b(null);}})]})}function W5({columnId:e,onAdd:t,placeholder:r="Add task...",className:o}){let[a,n]=Te.useState(false),[s,i]=Te.useState(""),d=c=>{c?.preventDefault(),s.trim()&&(t(e,s),i(""),n(false));};return a?jsxRuntime.jsxs("form",{onSubmit:d,className:l("bg-white/[0.03] border border-white/10 rounded-2xl p-3 space-y-3",o),children:[jsxRuntime.jsx("input",{autoFocus:true,value:s,onChange:c=>i(c.target.value),placeholder:"What needs to be done?",className:"w-full bg-transparent border-none outline-none text-sm text-white placeholder:text-white/20",onKeyDown:c=>{c.key==="Escape"&&n(false);}}),jsxRuntime.jsxs("div",{className:"flex items-center justify-end gap-2",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"sm",onClick:()=>n(false),className:"h-8 text-white/40 hover:text-white",children:"Cancel"}),jsxRuntime.jsx(R,{size:"sm",onClick:()=>d(),disabled:!s.trim(),className:"h-8",children:"Add Task"})]})]}):jsxRuntime.jsxs("button",{onClick:()=>n(true),className:l("w-full flex items-center gap-2 p-3 rounded-2xl border border-dashed border-white/10 text-white/40 hover:border-white/20 hover:bg-white/5 transition-all text-sm",o),children:[jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"}),r]})}function q5({onSync:e,interval:t=3e4,enabled:r=false}){let[o,a]=Te.useState(null),[n,s]=Te.useState(false),[i,d]=Te.useState(null);return {sync:Te.useCallback(async m=>{if(e){s(true),d(null);try{await e(m),a(new Date);}catch(u){d(u instanceof Error?u:new Error("Sync failed"));}finally{s(false);}}},[e]),isSyncing:n,lastSynced:o,error:i}}function Q5(){let[e,t]=Te.useState([]),r=Te.useCallback(a=>{let n={...a,id:Math.random().toString(36).substr(2,9),timestamp:new Date};t(s=>[n,...s]);},[]),o=Te.useCallback(()=>{t([]);},[]);return {history:e,addEntry:r,clearHistory:o}}function rC({subtasks:e,onToggle:t,className:r}){return !e||e.length===0?null:jsxRuntime.jsx("div",{className:l("space-y-1",r),children:e.map(o=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 group cursor-pointer",onClick:()=>t?.(o.id),children:[o.completed?jsxRuntime.jsx(lucideReact.CheckCircle2,{className:"h-3.5 w-3.5 text-green-500"}):jsxRuntime.jsx(lucideReact.Circle,{className:"h-3.5 w-3.5 text-white/20 group-hover:text-white/40"}),jsxRuntime.jsx("span",{className:l("text-xs transition-colors",o.completed?"text-white/40 line-through":"text-white/70"),children:o.title})]},o.id))})}function iC({activities:e,className:t}){return jsxRuntime.jsxs("div",{className:l("space-y-4",t),children:[jsxRuntime.jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Activity"}),jsxRuntime.jsx("div",{className:"space-y-4",children:e.map(r=>jsxRuntime.jsxs("div",{className:"flex gap-3",children:[jsxRuntime.jsx(U,{src:r.user.avatar,alt:r.user.name,size:"sm"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("p",{className:"text-xs text-white/80",children:[jsxRuntime.jsx("span",{className:"font-bold text-white",children:r.user.name})," ",r.action," ",r.target&&jsxRuntime.jsx("span",{className:"font-medium text-blue-400",children:r.target})]}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/30 mt-0.5",children:r.timestamp.toLocaleString()})]})]},r.id))})]})}var mp=Te__namespace.default.forwardRef(({className:e,title:t="Terminal",children:r,...o},a)=>jsxRuntime.jsxs("div",{ref:a,className:l("overflow-hidden rounded-2xl border border-gray-200 bg-gray-950 shadow-xl dark:border-white/10",e),...o,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b border-white/10 bg-white/[0.03] px-4 py-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5",children:[jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-rose-500/80"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),jsxRuntime.jsx("div",{className:"text-xs font-medium text-white/50",children:t}),jsxRuntime.jsx("div",{className:"w-10"})," "]}),jsxRuntime.jsx("div",{className:"p-4 font-mono text-sm text-gray-300",children:r})]}));mp.displayName="Terminal";var FC=({children:e,prefix:t="$",className:r})=>jsxRuntime.jsxs("div",{className:l("flex gap-2",r),children:[jsxRuntime.jsx("span",{className:"select-none text-emerald-400",children:t}),jsxRuntime.jsx("span",{children:e})]});var YC=({className:e,pauseOnHover:t=false,direction:r="left",speed:o="normal",children:a,...n})=>{let s={slow:"40s",normal:"20s",fast:"10s"};return jsxRuntime.jsxs("div",{className:l("group flex overflow-hidden p-2 [--gap:1rem] [gap:var(--gap)]",e),...n,children:[jsxRuntime.jsx("div",{className:l("flex shrink-0 justify-around [gap:var(--gap)] min-w-full",r==="left"?"animate-marquee":"animate-marquee-reverse",t&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:s[o]},children:a}),jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("flex shrink-0 justify-around [gap:var(--gap)] min-w-full",r==="left"?"animate-marquee":"animate-marquee-reverse",t&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:s[o]},children:a}),jsxRuntime.jsx("style",{children:`
13
13
  @keyframes marquee {
14
14
  from { transform: translateX(0); }
15
15
  to { transform: translateX(calc(-100% - var(--gap))); }
@@ -24,7 +24,7 @@
24
24
  .animate-marquee-reverse {
25
25
  animation: marquee-reverse linear infinite;
26
26
  }
27
- `})]})};var up=classVarianceAuthority.cva("inline-block rounded-full",{variants:{variant:{success:"bg-emerald-500",warning:"bg-amber-500",error:"bg-rose-500",info:"bg-blue-500",neutral:"bg-gray-400"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},animate:{true:"animate-pulse",false:""}},defaultVariants:{variant:"neutral",size:"md",animate:false}}),pp=Te__namespace.default.forwardRef(({className:e,variant:t,size:r,animate:o,...a},n)=>jsxRuntime.jsx("span",{ref:n,className:l(up({variant:t,size:r,animate:o,className:e})),...a}));pp.displayName="StatusDot";var hp=classVarianceAuthority.cva("shrink-0 bg-gray-200 dark:bg-white/[0.03]",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"}},defaultVariants:{orientation:"horizontal"}}),$r=Te__namespace.default.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,...o},a)=>jsxRuntime.jsx("div",{ref:a,role:r?"none":"separator","aria-orientation":r?void 0:t,className:l(hp({orientation:t,className:e})),...o}));$r.displayName="Separator";function sM({title:e,open:t,defaultOpen:r=false,onOpenChange:o,disabled:a=false,children:n,className:s,triggerClassName:i,contentClassName:d,...c}){let[m,u]=Te.useState(r),p=t!==void 0,g=p?t:m,h=()=>{if(a)return;let x=!g;p||u(x),o?.(x);};return jsxRuntime.jsxs("div",{className:l("w-full overflow-hidden rounded-2xl border border-gray-200 bg-white dark:border-white/10 dark:bg-white/[0.02]",s),...c,children:[e&&jsxRuntime.jsxs("button",{type:"button",onClick:h,disabled:a,className:l("flex w-full items-center justify-between px-4 py-3 text-sm font-medium transition-colors hover:bg-gray-50 dark:hover:bg-white/[0.02]",a&&"cursor-not-allowed opacity-50",i),children:[e,jsxRuntime.jsx(lucideReact.ChevronDown,{className:l("h-4 w-4 shrink-0 text-gray-500 transition-transform duration-200 dark:text-gray-400",g&&"rotate-180")})]}),jsxRuntime.jsx("div",{className:l("grid transition-all duration-300 ease-in-out",g?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:jsxRuntime.jsx("div",{className:"overflow-hidden",children:jsxRuntime.jsx("div",{className:l("px-4 pb-4 pt-0",e&&"pt-1",d),children:n})})})]})}var js=Te.createContext(void 0);function Ee(){let e=Te.useContext(js);if(!e)throw new Error("Chart components must be used within a ChartContainer");return e}function sr(e,t,r){return t===0?0:e/t*r}function mM({data:e,height:t=300,padding:r={top:20,right:20,bottom:40,left:40},className:o,children:a,...n}){let[s,i]=Te.useState(null),[d,c]=Te.useState(0),m=Te__namespace.default.useRef(null);Te__namespace.default.useEffect(()=>{if(!m.current)return;let p=new ResizeObserver(g=>{g[0]&&c(g[0].contentRect.width);});return p.observe(m.current),()=>p.disconnect()},[]);let u=Te.useMemo(()=>{if(!e||e.length===0)return 1;let p=Math.max(...e.map(g=>g.value));return p===0?1:p*1.1},[e]);return jsxRuntime.jsx(js.Provider,{value:{width:d,height:t,data:e,maxValue:u,padding:r,hoveredIndex:s,setHoveredIndex:i},children:jsxRuntime.jsx("div",{ref:m,className:l("relative w-full select-none",o),style:{height:t},...n,children:d>0&&jsxRuntime.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${d} ${t}`,className:"overflow-visible",children:a})})})}function uM({lines:e=5}){let{width:t,height:r,padding:o}=Ee(),a=r-o.top-o.bottom;return jsxRuntime.jsx("g",{className:"text-gray-200 dark:text-white/5",children:Array.from({length:e+1}).map((n,s)=>{let i=o.top+a/e*s;return jsxRuntime.jsx("line",{x1:o.left,y1:i,x2:t-o.right,y2:i,stroke:"currentColor",strokeWidth:1,strokeDasharray:"4 4"},s)})})}function pM(){let{width:e,height:t,padding:r,data:o}=Ee(),n=(e-r.left-r.right)/o.length;return jsxRuntime.jsx("g",{children:o.map((s,i)=>{let d=r.left+n*i+n/2,c=t-r.bottom+20;return jsxRuntime.jsx("text",{x:d,y:c,textAnchor:"middle",className:"fill-gray-400 dark:fill-white/40 text-xs font-medium",children:s.label},i)})})}function fM({renderTooltip:e}){let{hoveredIndex:t,data:r,width:o,padding:a}=Ee();if(t===null)return null;let s=(o-a.left-a.right)/r.length,i=a.left+s*t+s/2,d=r[t];if(!d)return null;let c=e?e(d):jsxRuntime.jsxs("div",{className:"rounded-xl border border-gray-200 dark:border-white/10 bg-white/90 dark:bg-black/80 px-3 py-2 text-xs shadow-xl backdrop-blur-md",children:[jsxRuntime.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:d.label}),jsxRuntime.jsxs("div",{className:"text-gray-500 dark:text-white/70",children:["Value: ",d.value]})]});return jsxRuntime.jsx("foreignObject",{x:i-75,y:0,width:150,height:"100%",className:"pointer-events-none overflow-visible",children:jsxRuntime.jsx("div",{className:"flex h-full flex-col justify-center items-center",children:jsxRuntime.jsx("div",{className:"animate-in fade-in zoom-in-95 duration-200",children:c})})})}function gM(){return jsxRuntime.jsx("div",{className:"w-full h-full flex items-end justify-between gap-2 p-4 animate-pulse bg-gray-100 dark:bg-white/[0.02] rounded-2xl border border-gray-200 dark:border-white/5",children:[...Array(12)].map((e,t)=>jsxRuntime.jsx("div",{className:"w-full bg-gray-200 dark:bg-white/[0.03] rounded-t-lg",style:{height:`${Math.random()*60+20}%`}},t))})}function wM({color:e="cyan",showValues:t=false,animationDelay:r=0,onValueClick:o}){let{width:a,height:n,padding:s,data:i,maxValue:d,setHoveredIndex:c,hoveredIndex:m}=Ee();if(!i||i.length===0)return null;let u=a-s.left-s.right,p=n-s.top-s.bottom,g=u/i.length,h=g*.6,x={cyan:"from-cyan-500 to-blue-600",purple:"from-purple-500 to-indigo-600",emerald:"from-emerald-500 to-teal-600",amber:"from-amber-400 to-orange-600",rose:"from-rose-500 to-pink-600"};return jsxRuntime.jsxs("g",{children:[i.map((b,f)=>{let w=sr(b.value,d,p),v=s.left+g*f+(g-h)/2,y=n-s.bottom-w,k=m===f,N=f*.1+r;return jsxRuntime.jsxs("g",{onMouseEnter:()=>c(f),onMouseLeave:()=>c(null),onClick:()=>o?.(b),className:l("cursor-pointer",o&&"cursor-pointer"),children:[jsxRuntime.jsx("rect",{x:s.left+g*f,y:s.top,width:g,height:p,fill:"transparent"}),jsxRuntime.jsx("rect",{x:v,y,width:h,height:w,rx:4,className:l("transition-all duration-300 ease-out",k?"brightness-125 filter":"opacity-80"),style:{transformOrigin:`center ${n-s.bottom}px`,animation:`grow-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) ${N}s backwards`}}),jsxRuntime.jsx("rect",{x:v,y,width:h,height:w,rx:4,className:l("bg-gradient-to-b",x[e]),style:{pointerEvents:"none",transformOrigin:`center ${n-s.bottom}px`,animation:`grow-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) ${N}s backwards`}}),t&&jsxRuntime.jsx("text",{x:v+h/2,y:y-8,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${N+.4}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:b.value})]},f)}),jsxRuntime.jsx("style",{children:`
27
+ `})]})};var gp=classVarianceAuthority.cva("inline-block rounded-full",{variants:{variant:{success:"bg-emerald-500",warning:"bg-amber-500",error:"bg-rose-500",info:"bg-blue-500",neutral:"bg-gray-400"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},animate:{true:"animate-pulse",false:""}},defaultVariants:{variant:"neutral",size:"md",animate:false}}),bp=Te__namespace.default.forwardRef(({className:e,variant:t,size:r,animate:o,...a},n)=>jsxRuntime.jsx("span",{ref:n,className:l(gp({variant:t,size:r,animate:o,className:e})),...a}));bp.displayName="StatusDot";var wp=classVarianceAuthority.cva("shrink-0 bg-gray-200 dark:bg-white/[0.03]",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"}},defaultVariants:{orientation:"horizontal"}}),Fr=Te__namespace.default.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,...o},a)=>jsxRuntime.jsx("div",{ref:a,role:r?"none":"separator","aria-orientation":r?void 0:t,className:l(wp({orientation:t,className:e})),...o}));Fr.displayName="Separator";function mM({title:e,open:t,defaultOpen:r=false,onOpenChange:o,disabled:a=false,children:n,className:s,triggerClassName:i,contentClassName:d,...c}){let[m,u]=Te.useState(r),p=t!==void 0,g=p?t:m,h=()=>{if(a)return;let x=!g;p||u(x),o?.(x);};return jsxRuntime.jsxs("div",{className:l("w-full overflow-hidden rounded-2xl border border-gray-200 bg-white dark:border-white/10 dark:bg-white/[0.02]",s),...c,children:[e&&jsxRuntime.jsxs("button",{type:"button",onClick:h,disabled:a,className:l("flex w-full items-center justify-between px-4 py-3 text-sm font-medium transition-colors hover:bg-gray-50 dark:hover:bg-white/[0.02]",a&&"cursor-not-allowed opacity-50",i),children:[e,jsxRuntime.jsx(lucideReact.ChevronDown,{className:l("h-4 w-4 shrink-0 text-gray-500 transition-transform duration-200 dark:text-gray-400",g&&"rotate-180")})]}),jsxRuntime.jsx("div",{className:l("grid transition-all duration-300 ease-in-out",g?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:jsxRuntime.jsx("div",{className:"overflow-hidden",children:jsxRuntime.jsx("div",{className:l("px-4 pb-4 pt-0",e&&"pt-1",d),children:n})})})]})}var Gs=Te.createContext(void 0);function Ee(){let e=Te.useContext(Gs);if(!e)throw new Error("Chart components must be used within a ChartContainer");return e}function ir(e,t,r){return t===0?0:e/t*r}function bM({data:e,height:t=300,padding:r={top:20,right:20,bottom:40,left:40},className:o,children:a,...n}){let[s,i]=Te.useState(null),[d,c]=Te.useState(0),m=Te__namespace.default.useRef(null);Te__namespace.default.useEffect(()=>{if(!m.current)return;let p=new ResizeObserver(g=>{g[0]&&c(g[0].contentRect.width);});return p.observe(m.current),()=>p.disconnect()},[]);let u=Te.useMemo(()=>{if(!e||e.length===0)return 1;let p=Math.max(...e.map(g=>g.value));return p===0?1:p*1.1},[e]);return jsxRuntime.jsx(Gs.Provider,{value:{width:d,height:t,data:e,maxValue:u,padding:r,hoveredIndex:s,setHoveredIndex:i},children:jsxRuntime.jsx("div",{ref:m,className:l("relative w-full select-none",o),style:{height:t},...n,children:d>0&&jsxRuntime.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${d} ${t}`,className:"overflow-visible",children:a})})})}function hM({lines:e=5}){let{width:t,height:r,padding:o}=Ee(),a=r-o.top-o.bottom;return jsxRuntime.jsx("g",{className:"text-gray-200 dark:text-white/5",children:Array.from({length:e+1}).map((n,s)=>{let i=o.top+a/e*s;return jsxRuntime.jsx("line",{x1:o.left,y1:i,x2:t-o.right,y2:i,stroke:"currentColor",strokeWidth:1,strokeDasharray:"4 4"},s)})})}function xM(){let{width:e,height:t,padding:r,data:o}=Ee(),n=(e-r.left-r.right)/o.length;return jsxRuntime.jsx("g",{children:o.map((s,i)=>{let d=r.left+n*i+n/2,c=t-r.bottom+20;return jsxRuntime.jsx("text",{x:d,y:c,textAnchor:"middle",className:"fill-gray-400 dark:fill-white/40 text-xs font-medium",children:s.label},i)})})}function vM({renderTooltip:e}){let{hoveredIndex:t,data:r,width:o,padding:a}=Ee();if(t===null)return null;let s=(o-a.left-a.right)/r.length,i=a.left+s*t+s/2,d=r[t];if(!d)return null;let c=e?e(d):jsxRuntime.jsxs("div",{className:"rounded-xl border border-gray-200 dark:border-white/10 bg-white/90 dark:bg-black/80 px-3 py-2 text-xs shadow-xl backdrop-blur-md",children:[jsxRuntime.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:d.label}),jsxRuntime.jsxs("div",{className:"text-gray-500 dark:text-white/70",children:["Value: ",d.value]})]});return jsxRuntime.jsx("foreignObject",{x:i-75,y:0,width:150,height:"100%",className:"pointer-events-none overflow-visible",children:jsxRuntime.jsx("div",{className:"flex h-full flex-col justify-center items-center",children:jsxRuntime.jsx("div",{className:"animate-in fade-in zoom-in-95 duration-200",children:c})})})}function wM(){return jsxRuntime.jsx("div",{className:"w-full h-full flex items-end justify-between gap-2 p-4 animate-pulse bg-gray-100 dark:bg-white/[0.02] rounded-2xl border border-gray-200 dark:border-white/5",children:[...Array(12)].map((e,t)=>jsxRuntime.jsx("div",{className:"w-full bg-gray-200 dark:bg-white/[0.03] rounded-t-lg",style:{height:`${Math.random()*60+20}%`}},t))})}function CM({color:e="cyan",showValues:t=false,animationDelay:r=0,onValueClick:o}){let{width:a,height:n,padding:s,data:i,maxValue:d,setHoveredIndex:c,hoveredIndex:m}=Ee();if(!i||i.length===0)return null;let u=a-s.left-s.right,p=n-s.top-s.bottom,g=u/i.length,h=g*.6,x={cyan:"from-cyan-500 to-blue-600",purple:"from-purple-500 to-indigo-600",emerald:"from-emerald-500 to-teal-600",amber:"from-amber-400 to-orange-600",rose:"from-rose-500 to-pink-600"};return jsxRuntime.jsxs("g",{children:[i.map((b,f)=>{let v=ir(b.value,d,p),w=s.left+g*f+(g-h)/2,y=n-s.bottom-v,k=m===f,N=f*.1+r;return jsxRuntime.jsxs("g",{onMouseEnter:()=>c(f),onMouseLeave:()=>c(null),onClick:()=>o?.(b),className:l("cursor-pointer",o&&"cursor-pointer"),children:[jsxRuntime.jsx("rect",{x:s.left+g*f,y:s.top,width:g,height:p,fill:"transparent"}),jsxRuntime.jsx("rect",{x:w,y,width:h,height:v,rx:4,className:l("transition-all duration-300 ease-out",k?"brightness-125 filter":"opacity-80"),style:{transformOrigin:`center ${n-s.bottom}px`,animation:`grow-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) ${N}s backwards`}}),jsxRuntime.jsx("rect",{x:w,y,width:h,height:v,rx:4,className:l("bg-gradient-to-b",x[e]),style:{pointerEvents:"none",transformOrigin:`center ${n-s.bottom}px`,animation:`grow-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) ${N}s backwards`}}),t&&jsxRuntime.jsx("text",{x:w+h/2,y:y-8,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${N+.4}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:b.value})]},f)}),jsxRuntime.jsx("style",{children:`
28
28
  @keyframes grow-up {
29
29
  from { transform: scaleY(0); }
30
30
  to { transform: scaleY(1); }
@@ -33,12 +33,12 @@
33
33
  from { opacity: 0; transform: translateY(10px); }
34
34
  to { opacity: 1; transform: translateY(0); }
35
35
  }
36
- `})]})}function CM({color:e="purple",showValues:t=false,animationDelay:r=0,onValueClick:o}){let{width:a,height:n,padding:s,data:i,maxValue:d,setHoveredIndex:c,hoveredIndex:m}=Ee();if(!i||i.length===0)return null;let u=a-s.left-s.right,p=n-s.top-s.bottom,g=i.length>1?u/(i.length-1):u,x={cyan:{stroke:"#06b6d4",fill:"rgba(6, 182, 212, 0.2)"},purple:{stroke:"#8b5cf6",fill:"rgba(139, 92, 246, 0.2)"},emerald:{stroke:"#10b981",fill:"rgba(16, 185, 129, 0.2)"},amber:{stroke:"#f59e0b",fill:"rgba(245, 158, 11, 0.2)"},rose:{stroke:"#f43f5e",fill:"rgba(244, 63, 94, 0.2)"}}[e],b=i.map((v,y)=>{let k=s.left+g*y,N=n-s.bottom-sr(v.value,d,p);return {x:k,y:N,item:v}}),f=b.map((v,y)=>y===0?`M ${v.x} ${v.y}`:`L ${v.x} ${v.y}`).join(" "),w=`
36
+ `})]})}function EM({color:e="purple",showValues:t=false,animationDelay:r=0,onValueClick:o}){let{width:a,height:n,padding:s,data:i,maxValue:d,setHoveredIndex:c,hoveredIndex:m}=Ee();if(!i||i.length===0)return null;let u=a-s.left-s.right,p=n-s.top-s.bottom,g=i.length>1?u/(i.length-1):u,x={cyan:{stroke:"#06b6d4",fill:"rgba(6, 182, 212, 0.2)"},purple:{stroke:"#8b5cf6",fill:"rgba(139, 92, 246, 0.2)"},emerald:{stroke:"#10b981",fill:"rgba(16, 185, 129, 0.2)"},amber:{stroke:"#f59e0b",fill:"rgba(245, 158, 11, 0.2)"},rose:{stroke:"#f43f5e",fill:"rgba(244, 63, 94, 0.2)"}}[e],b=i.map((w,y)=>{let k=s.left+g*y,N=n-s.bottom-ir(w.value,d,p);return {x:k,y:N,item:w}}),f=b.map((w,y)=>y===0?`M ${w.x} ${w.y}`:`L ${w.x} ${w.y}`).join(" "),v=`
37
37
  ${f}
38
38
  L ${a-s.right} ${n-s.bottom}
39
39
  L ${s.left} ${n-s.bottom}
40
40
  Z
41
- `;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("path",{d:w,fill:x.fill,style:{opacity:0,animation:`fade-in 1s ease-out ${r}s forwards`}}),jsxRuntime.jsx("path",{d:f,fill:"none",stroke:x.stroke,strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",style:{strokeDasharray:2e3,strokeDashoffset:2e3,animation:`draw-line 2s ease-out ${r}s forwards`}}),b.map((v,y)=>jsxRuntime.jsxs("g",{onMouseEnter:()=>c(y),onMouseLeave:()=>c(null),onClick:()=>o?.(v.item),className:l("cursor-crosshair",o&&"cursor-pointer"),children:[jsxRuntime.jsx("rect",{x:v.x-g/2,y:s.top,width:g,height:p,fill:"transparent"}),(m===y||t)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[m===y&&jsxRuntime.jsx("line",{x1:v.x,y1:s.top,x2:v.x,y2:n-s.bottom,stroke:"white",strokeWidth:1,strokeDasharray:"4 4",className:"opacity-50"}),jsxRuntime.jsx("circle",{cx:v.x,cy:v.y,r:m===y?6:4,fill:x.stroke,stroke:"white",strokeWidth:2,style:{transition:"r 0.2s ease-out"}}),t&&jsxRuntime.jsx("text",{x:v.x,y:v.y-12,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${r+1+y*.1}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:i[y]?.value})]})]},y)),jsxRuntime.jsx("style",{children:`
41
+ `;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("path",{d:v,fill:x.fill,style:{opacity:0,animation:`fade-in 1s ease-out ${r}s forwards`}}),jsxRuntime.jsx("path",{d:f,fill:"none",stroke:x.stroke,strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",style:{strokeDasharray:2e3,strokeDashoffset:2e3,animation:`draw-line 2s ease-out ${r}s forwards`}}),b.map((w,y)=>jsxRuntime.jsxs("g",{onMouseEnter:()=>c(y),onMouseLeave:()=>c(null),onClick:()=>o?.(w.item),className:l("cursor-crosshair",o&&"cursor-pointer"),children:[jsxRuntime.jsx("rect",{x:w.x-g/2,y:s.top,width:g,height:p,fill:"transparent"}),(m===y||t)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[m===y&&jsxRuntime.jsx("line",{x1:w.x,y1:s.top,x2:w.x,y2:n-s.bottom,stroke:"white",strokeWidth:1,strokeDasharray:"4 4",className:"opacity-50"}),jsxRuntime.jsx("circle",{cx:w.x,cy:w.y,r:m===y?6:4,fill:x.stroke,stroke:"white",strokeWidth:2,style:{transition:"r 0.2s ease-out"}}),t&&jsxRuntime.jsx("text",{x:w.x,y:w.y-12,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${r+1+y*.1}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:i[y]?.value})]})]},y)),jsxRuntime.jsx("style",{children:`
42
42
  @keyframes draw-line {
43
43
  to { stroke-dashoffset: 0; }
44
44
  }
@@ -50,7 +50,7 @@
50
50
  from { opacity: 0; transform: translateY(10px); }
51
51
  to { opacity: 1; transform: translateY(0); }
52
52
  }
53
- `})]})}function EM({color:e="cyan",showValues:t=false,animationDelay:r=0,curve:o="smooth",strokeWidth:a=3,align:n="edge",onValueClick:s}){let{width:i,height:d,padding:c,data:m,maxValue:u,setHoveredIndex:p,hoveredIndex:g}=Ee();if(!m||m.length===0)return null;let h=i-c.left-c.right,x=d-c.top-c.bottom,b=n==="center"?h/m.length:m.length>1?h/(m.length-1):h,w={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e"}[e],v=m.map((k,N)=>{let C;n==="center"?C=c.left+b*N+b/2:C=c.left+b*N;let T=d-c.bottom-sr(k.value,u,x);return {x:C,y:T,item:k}}),y="";if(v.length>0)if(y=`M ${v[0].x} ${v[0].y}`,o==="smooth")for(let k=0;k<v.length-1;k++){let N=v[k],C=v[k+1],T=N.x+(C.x-N.x)/2,E=N.y,B=N.x+(C.x-N.x)/2,S=C.y;y+=` C ${T} ${E}, ${B} ${S}, ${C.x} ${C.y}`;}else if(o==="step")for(let k=0;k<v.length-1;k++){let N=v[k],C=v[k+1];y+=` L ${C.x} ${N.y} L ${C.x} ${C.y}`;}else for(let k=1;k<v.length;k++)y+=` L ${v[k].x} ${v[k].y}`;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("path",{d:y,fill:"none",stroke:w,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:{strokeDasharray:3e3,strokeDashoffset:3e3,animation:`draw-line 2.5s ease-out ${r}s forwards`}}),v.map((k,N)=>jsxRuntime.jsxs("g",{onMouseEnter:()=>p(N),onMouseLeave:()=>p(null),onClick:()=>s?.(k.item),className:l("cursor-crosshair",s&&"cursor-pointer"),children:[jsxRuntime.jsx("rect",{x:k.x-b/2,y:c.top,width:b,height:x,fill:"transparent"}),(g===N||t)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g===N&&jsxRuntime.jsx("line",{x1:k.x,y1:c.top,x2:k.x,y2:d-c.bottom,stroke:"white",strokeWidth:1,strokeDasharray:"4 4",className:"opacity-50"}),jsxRuntime.jsx("circle",{cx:k.x,cy:k.y,r:g===N?6:4,fill:w,stroke:"white",strokeWidth:2,style:{transition:"r 0.2s ease-out"}}),t&&jsxRuntime.jsx("text",{x:k.x,y:k.y-12,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${r+1+N*.1}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:m[N]?.value})]})]},N)),jsxRuntime.jsx("style",{children:`
53
+ `})]})}function AM({color:e="cyan",showValues:t=false,animationDelay:r=0,curve:o="smooth",strokeWidth:a=3,align:n="edge",onValueClick:s}){let{width:i,height:d,padding:c,data:m,maxValue:u,setHoveredIndex:p,hoveredIndex:g}=Ee();if(!m||m.length===0)return null;let h=i-c.left-c.right,x=d-c.top-c.bottom,b=n==="center"?h/m.length:m.length>1?h/(m.length-1):h,v={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e"}[e],w=m.map((k,N)=>{let C;n==="center"?C=c.left+b*N+b/2:C=c.left+b*N;let T=d-c.bottom-ir(k.value,u,x);return {x:C,y:T,item:k}}),y="";if(w.length>0)if(y=`M ${w[0].x} ${w[0].y}`,o==="smooth")for(let k=0;k<w.length-1;k++){let N=w[k],C=w[k+1],T=N.x+(C.x-N.x)/2,E=N.y,O=N.x+(C.x-N.x)/2,P=C.y;y+=` C ${T} ${E}, ${O} ${P}, ${C.x} ${C.y}`;}else if(o==="step")for(let k=0;k<w.length-1;k++){let N=w[k],C=w[k+1];y+=` L ${C.x} ${N.y} L ${C.x} ${C.y}`;}else for(let k=1;k<w.length;k++)y+=` L ${w[k].x} ${w[k].y}`;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("path",{d:y,fill:"none",stroke:v,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:{strokeDasharray:3e3,strokeDashoffset:3e3,animation:`draw-line 2.5s ease-out ${r}s forwards`}}),w.map((k,N)=>jsxRuntime.jsxs("g",{onMouseEnter:()=>p(N),onMouseLeave:()=>p(null),onClick:()=>s?.(k.item),className:l("cursor-crosshair",s&&"cursor-pointer"),children:[jsxRuntime.jsx("rect",{x:k.x-b/2,y:c.top,width:b,height:x,fill:"transparent"}),(g===N||t)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g===N&&jsxRuntime.jsx("line",{x1:k.x,y1:c.top,x2:k.x,y2:d-c.bottom,stroke:"white",strokeWidth:1,strokeDasharray:"4 4",className:"opacity-50"}),jsxRuntime.jsx("circle",{cx:k.x,cy:k.y,r:g===N?6:4,fill:v,stroke:"white",strokeWidth:2,style:{transition:"r 0.2s ease-out"}}),t&&jsxRuntime.jsx("text",{x:k.x,y:k.y-12,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${r+1+N*.1}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:m[N]?.value})]})]},N)),jsxRuntime.jsx("style",{children:`
54
54
  @keyframes draw-line {
55
55
  to { stroke-dashoffset: 0; }
56
56
  }
@@ -58,14 +58,14 @@
58
58
  from { opacity: 0; transform: translateY(10px); }
59
59
  to { opacity: 1; transform: translateY(0); }
60
60
  }
61
- `})]})}function VM({innerRadius:e=0,padAngle:t=.02,showLabels:r=false,colors:o=["#06b6d4","#8b5cf6","#10b981","#f59e0b","#f43f5e","#3b82f6","#ec4899"],onValueClick:a}){let{width:n,height:s,data:i,setHoveredIndex:d,hoveredIndex:c}=Ee(),m=Math.min(n,s)/2*.8,u=n/2,p=s/2,g=Te.useMemo(()=>i.reduce((f,w)=>f+w.value,0),[i]),h=0,x=i.map((f,w)=>{let v=f.value/g,y=v*2*Math.PI,k=h,N=h+y;return h+=y,{...f,startAngle:k,endAngle:N,color:o[w%o.length],percentage:v}}),b=(f,w)=>{let v=u+w*Math.cos(f),y=p+w*Math.sin(f);return [v,y]};return jsxRuntime.jsxs("g",{children:[x.map((f,w)=>{let v=f.startAngle+(x.length>1?t/2:0),y=f.endAngle-(x.length>1?t/2:0);if(y<=v)return null;let[k,N]=b(v,m),[C,T]=b(y,m),E=y-v>Math.PI?1:0,B=m*e,[S,D]=b(y,B),[K,H]=b(v,B),M=[`M ${k} ${N}`,`A ${m} ${m} 0 ${E} 1 ${C} ${T}`,e>0?`L ${S} ${D}`:`L ${u} ${p}`,e>0?`A ${B} ${B} 0 ${E} 0 ${K} ${H}`:"","Z"].join(" "),$=c===w,ee=(f.startAngle+f.endAngle)/2,G=m*(e>0?(1+e)/2:.7),[J,fe]=b(ee,G);return jsxRuntime.jsxs("g",{onMouseEnter:()=>d(w),onMouseLeave:()=>d(null),className:"cursor-pointer",children:[jsxRuntime.jsx("path",{d:M,fill:f.color,className:l("transition-all duration-300 ease-out",$?"opacity-100 brightness-110":"opacity-90"),style:{transformOrigin:`${u}px ${p}px`,transform:$?"scale(1.05)":"scale(1)",animation:`pie-enter 0.6s ease-out ${w*.05}s backwards`}}),(r||$)&&jsxRuntime.jsxs("text",{x:J,y:fe,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:12,fontWeight:600,className:"pointer-events-none",style:{textShadow:"0 1px 2px rgba(0,0,0,0.5)"},children:[Math.round(f.percentage*100),"%"]})]},w)}),jsxRuntime.jsx("style",{children:`
61
+ `})]})}function FM({innerRadius:e=0,padAngle:t=.02,showLabels:r=false,colors:o=["#06b6d4","#8b5cf6","#10b981","#f59e0b","#f43f5e","#3b82f6","#ec4899"],onValueClick:a}){let{width:n,height:s,data:i,setHoveredIndex:d,hoveredIndex:c}=Ee(),m=Math.min(n,s)/2*.8,u=n/2,p=s/2,g=Te.useMemo(()=>i.reduce((f,v)=>f+v.value,0),[i]),h=0,x=i.map((f,v)=>{let w=f.value/g,y=w*2*Math.PI,k=h,N=h+y;return h+=y,{...f,startAngle:k,endAngle:N,color:o[v%o.length],percentage:w}}),b=(f,v)=>{let w=u+v*Math.cos(f),y=p+v*Math.sin(f);return [w,y]};return jsxRuntime.jsxs("g",{children:[x.map((f,v)=>{let w=f.startAngle+(x.length>1?t/2:0),y=f.endAngle-(x.length>1?t/2:0);if(y<=w)return null;let[k,N]=b(w,m),[C,T]=b(y,m),E=y-w>Math.PI?1:0,O=m*e,[P,S]=b(y,O),[$,D]=b(w,O),M=[`M ${k} ${N}`,`A ${m} ${m} 0 ${E} 1 ${C} ${T}`,e>0?`L ${P} ${S}`:`L ${u} ${p}`,e>0?`A ${O} ${O} 0 ${E} 0 ${$} ${D}`:"","Z"].join(" "),F=c===v,re=(f.startAngle+f.endAngle)/2,J=m*(e>0?(1+e)/2:.7),[K,fe]=b(re,J);return jsxRuntime.jsxs("g",{onMouseEnter:()=>d(v),onMouseLeave:()=>d(null),className:"cursor-pointer",children:[jsxRuntime.jsx("path",{d:M,fill:f.color,className:l("transition-all duration-300 ease-out",F?"opacity-100 brightness-110":"opacity-90"),style:{transformOrigin:`${u}px ${p}px`,transform:F?"scale(1.05)":"scale(1)",animation:`pie-enter 0.6s ease-out ${v*.05}s backwards`}}),(r||F)&&jsxRuntime.jsxs("text",{x:K,y:fe,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:12,fontWeight:600,className:"pointer-events-none",style:{textShadow:"0 1px 2px rgba(0,0,0,0.5)"},children:[Math.round(f.percentage*100),"%"]})]},v)}),jsxRuntime.jsx("style",{children:`
62
62
  @keyframes pie-enter {
63
63
  from { opacity: 0; transform: scale(0.8) rotate(-10deg); }
64
64
  to { opacity: 0.9; transform: scale(1) rotate(0); }
65
65
  }
66
- `})]})}function FM({data:e,keys:t,colors:r=["cyan","purple","emerald"],maxValue:o,height:a=300,className:n,...s}){let[i,d]=Te.useState(0),c=Te__namespace.default.useRef(null);Te__namespace.default.useEffect(()=>{if(!c.current)return;let b=new ResizeObserver(f=>{f[0]&&d(f[0].contentRect.width);});return b.observe(c.current),()=>b.disconnect()},[]);let m={x:i/2,y:a/2},u=Math.min(i,a)/2-40,p=Te.useMemo(()=>{if(o)return o;let b=0;return e.forEach(f=>{t.forEach(w=>{let v=Number(f[w])||0;v>b&&(b=v);});}),b*1.1||100},[e,t,o]),g=Math.PI*2/e.length,h={cyan:"rgba(6, 182, 212, 0.5)",purple:"rgba(139, 92, 246, 0.5)",emerald:"rgba(16, 185, 129, 0.5)",amber:"rgba(245, 158, 11, 0.5)",rose:"rgba(244, 63, 94, 0.5)"},x={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e"};return i===0?jsxRuntime.jsx("div",{ref:c,style:{height:a}}):jsxRuntime.jsx("div",{ref:c,className:l("relative w-full select-none",n),style:{height:a},...s,children:jsxRuntime.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${i} ${a}`,className:"overflow-visible",children:[[1,2,3,4,5].map(b=>{let f=u/5*b,w=e.map((v,y)=>{let k=g*y-Math.PI/2;return `${m.x+Math.cos(k)*f},${m.y+Math.sin(k)*f}`}).join(" ");return jsxRuntime.jsx("polygon",{points:w,fill:"none",stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"},b)}),e.map((b,f)=>{let w=g*f-Math.PI/2,v=m.x+Math.cos(w)*u,y=m.y+Math.sin(w)*u,k=m.x+Math.cos(w)*(u+20),N=m.y+Math.sin(w)*(u+20);return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:m.x,y1:m.y,x2:v,y2:y,stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"}),jsxRuntime.jsx("text",{x:k,y:N,textAnchor:"middle",dominantBaseline:"middle",fill:"rgba(255,255,255,0.6)",fontSize:"12",children:b.subject})]},f)}),t.map((b,f)=>{let w=e.map((N,C)=>{let E=(Number(N[b])||0)/p*u,B=g*C-Math.PI/2;return `${m.x+Math.cos(B)*E},${m.y+Math.sin(B)*E}`}).join(" "),v=r[f%r.length]||"cyan",y=h[v],k=x[v];return jsxRuntime.jsx("polygon",{points:w,fill:y,fillOpacity:.3,stroke:k,strokeWidth:2,className:"transition-all duration-500 ease-out hover:fill-opacity-50"},b)})]})})}function YM({data:e,color:t="emerald",height:r=40,strokeWidth:o=2,fill:a=false,className:n,...s}){let i=Math.max(...e),d=Math.min(...e),c=i-d||1,u={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e",white:"#ffffff"}[t],p=e.map((x,b)=>{let f=b/(e.length-1)*100,v=95-(x-d)/c*90;return {x:f,y:v}}),g="";if(p.length>0){g=`M ${p[0].x} ${p[0].y}`;for(let x=0;x<p.length-1;x++){let b=p[x],f=p[x+1],w=b.x+(f.x-b.x)/2,v=b.y,y=b.x+(f.x-b.x)/2,k=f.y;g+=` C ${w} ${v}, ${y} ${k}, ${f.x} ${f.y}`;}}let h=a?`${g} L 100 100 L 0 100 Z`:void 0;return jsxRuntime.jsx("div",{className:l("w-full overflow-hidden",n),style:{height:r},...s,children:jsxRuntime.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"overflow-visible",children:[a&&jsxRuntime.jsx("path",{d:h,fill:u,fillOpacity:.1,stroke:"none"}),jsxRuntime.jsx("path",{d:g,fill:"none",stroke:u,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})})}function GM({ticks:e=5,format:t=r=>r.toString()}){let{height:r,padding:o,maxValue:a}=Ee(),n=r-o.top-o.bottom;return jsxRuntime.jsx("g",{children:Array.from({length:e+1}).map((s,i)=>{let d=a/e*i,c=r-o.bottom-n/e*i;return jsxRuntime.jsx("text",{x:o.left-10,y:c,textAnchor:"end",dominantBaseline:"middle",className:"fill-gray-400 dark:fill-white/40 text-xs font-medium",children:t(Math.round(d))},i)})})}var Ha=Te.createContext(void 0);function rR({defaultValue:e,value:t,onValueChange:r,className:o,children:a,...n}){let[s,i]=Te.useState(e),d=m=>{t===void 0&&i(m),r?.(m);},c=t!==void 0?t:s;return jsxRuntime.jsx(Ha.Provider,{value:{value:c,onValueChange:d},children:jsxRuntime.jsx("div",{className:l("w-full",o),...n,children:a})})}function oR({className:e,children:t,...r}){return jsxRuntime.jsx("div",{role:"tablist",className:l("inline-flex h-10 items-center justify-center rounded-2xl bg-gray-100 p-1 text-gray-500 dark:bg-white/[0.03] dark:text-white/60",e),...r,children:t})}function aR({className:e,value:t,children:r,...o}){let a=Te.useContext(Ha);if(!a)throw new Error("TabsTrigger must be used within Tabs");let n=a.value===t;return jsxRuntime.jsx("button",{type:"button",role:"tab","aria-selected":n,"aria-controls":`tabs-content-${t}`,id:`tabs-trigger-${t}`,onClick:()=>a.onValueChange(t),className:l("inline-flex items-center justify-center whitespace-nowrap rounded-2xl px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-white/20",n?"bg-white text-gray-900 shadow-sm dark:bg-white/[0.06] dark:text-white dark:backdrop-blur-sm":"hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-white/[0.03] dark:hover:text-white",e),...o,children:r})}function nR({className:e,value:t,children:r,...o}){let a=Te.useContext(Ha);if(!a)throw new Error("TabsContent must be used within Tabs");return a.value!==t?null:jsxRuntime.jsx("div",{role:"tabpanel",id:`tabs-content-${t}`,"aria-labelledby":`tabs-trigger-${t}`,tabIndex:0,className:l("mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20 focus-visible:ring-offset-2",e),...o,children:r})}var dR=Te__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("aside",{ref:o,className:l("flex h-full w-64 flex-col border-r backdrop-blur-xl transition-colors duration-200","border-zinc-200 bg-white/80","dark:border-white/10 dark:bg-black/20",e),...r,children:t})),mR=Te__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("flex h-16 items-center px-6 border-b border-gray-200 dark:border-white/5",e),...r,children:t})),uR=Te__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("flex-1 overflow-y-auto py-4 px-3 space-y-1",e),...r,children:t})),pR=Te__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("p-4 border-t border-gray-200 dark:border-white/5",e),...r,children:t})),fR=Te__namespace.default.forwardRef(({className:e,children:t,active:r,icon:o,badge:a,...n},s)=>jsxRuntime.jsxs("button",{ref:s,className:l("flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium transition-colors","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.03] dark:hover:text-white",r?"bg-gray-200 text-gray-900 dark:bg-white/[0.06] dark:text-white":"text-gray-600 dark:text-white/60",e),...n,children:[o&&jsxRuntime.jsx("span",{className:l("flex h-4 w-4 items-center justify-center",r?"text-gray-900 dark:text-white":"text-gray-500 dark:text-white/60"),children:o}),jsxRuntime.jsx("span",{className:"flex-1 text-left",children:t}),a&&jsxRuntime.jsx("span",{className:"flex h-5 min-w-5 items-center justify-center rounded-full bg-gray-200 dark:bg-white/[0.06] px-1.5 text-[10px] font-bold text-gray-900 dark:text-white",children:a})]})),gR=Te__namespace.default.forwardRef(({className:e,children:t,label:r,...o},a)=>jsxRuntime.jsxs("div",{ref:a,className:l("mb-6",e),...o,children:[r&&jsxRuntime.jsx("div",{className:"mb-2 px-3 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-white/40",children:r}),jsxRuntime.jsx("div",{className:"space-y-1",children:t})]}));var Ap={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"};function NR({logo:e,links:t=[],actions:r,className:o,maxWidth:a="xl"}){let[n,s]=Te.useState(false),[i,d]=Te.useState(false);return Te.useEffect(()=>{let c=()=>{s(window.scrollY>20);};return window.addEventListener("scroll",c),()=>window.removeEventListener("scroll",c)},[]),jsxRuntime.jsx("nav",{className:l("fixed top-0 left-0 right-0 z-50 transition-all duration-300 px-4 py-4",n?"py-3":"py-6",o),children:jsxRuntime.jsxs("div",{className:l("mx-auto transition-all duration-300",Ap[a]),children:[jsxRuntime.jsxs(ce,{className:l("flex items-center justify-between px-6 py-3 transition-all duration-300",n?"rounded-2xl border-white/10 bg-white/70 dark:bg-zinc-900/70 backdrop-blur-xl shadow-lg":"rounded-2xl border-transparent bg-transparent dark:bg-transparent backdrop-blur-none shadow-none"),children:[jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:e||jsxRuntime.jsx("span",{className:"text-xl font-bold tracking-tighter",children:"PIXON"})}),jsxRuntime.jsx("div",{className:"hidden md:flex items-center gap-8",children:t.map(c=>jsxRuntime.jsx("a",{href:c.href,className:"text-sm font-medium text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors",children:c.label},c.label))}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsx("div",{className:"hidden md:flex items-center gap-2",children:r}),jsxRuntime.jsx("button",{className:"md:hidden p-2 text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-white/[0.03] rounded-2xl transition-colors",onClick:()=>d(!i),children:i?jsxRuntime.jsx(lucideReact.X,{size:20}):jsxRuntime.jsx(lucideReact.Menu,{size:20})})]})]}),jsxRuntime.jsx("div",{className:l("md:hidden absolute top-full left-4 right-4 mt-2 transition-all duration-300 origin-top",i?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 -translate-y-4 pointer-events-none"),children:jsxRuntime.jsxs(ce,{className:"p-4 flex flex-col gap-4 shadow-2xl border-white/10 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-2xl",children:[t.map(c=>jsxRuntime.jsx("a",{href:c.href,className:"text-base font-medium px-4 py-2 rounded-2xl hover:bg-zinc-100 dark:hover:bg-white/[0.03] text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-all",onClick:()=>d(false),children:c.label},c.label)),jsxRuntime.jsx("div",{className:"pt-4 border-t border-zinc-200 dark:border-white/10 flex flex-col gap-2",children:r})]})})]})})}var Co=Te.createContext(void 0);function dt({children:e}){let[t,r]=Te.useState(false),o=Te.useRef(null);return jsxRuntime.jsx(Co.Provider,{value:{isOpen:t,setIsOpen:r,triggerRef:o},children:jsxRuntime.jsx("div",{className:"relative inline-block text-left",children:e})})}function mt({className:e,children:t,...r}){let o=Te.useContext(Co);if(!o)throw new Error("DropdownMenuTrigger must be used within DropdownMenu");let a=n=>{o.setIsOpen(!o.isOpen),r.onClick?.(n);};return jsxRuntime.jsx("button",{ref:o.triggerRef,type:"button","aria-haspopup":"menu","aria-expanded":o.isOpen?"true":"false",onClick:a,className:l("inline-flex items-center justify-center",e),...r,children:t})}function ut({className:e,children:t,align:r="start",side:o="bottom",...a}){let n=Te.useContext(Co);if(!n)throw new Error("DropdownMenuContent must be used within DropdownMenu");let s=Te.useRef(null),{position:i,isPositioned:d}=qt(n.triggerRef,s,{side:o,align:r,isOpen:n.isOpen});if(Te.useEffect(()=>{if(n.isOpen){let m=p=>{s.current&&!s.current.contains(p.target)&&n.triggerRef.current&&!n.triggerRef.current.contains(p.target)&&n.setIsOpen(false);},u=p=>{if(p.key==="Escape"&&(n.setIsOpen(false),n.triggerRef.current?.focus()),p.key==="ArrowDown"||p.key==="ArrowUp"){p.preventDefault();let g=s.current?.querySelectorAll('[role="menuitem"]');if(!g.length)return;let h=Array.from(g).indexOf(document.activeElement),x=0;p.key==="ArrowDown"?x=(h+1)%g.length:x=(h-1+g.length)%g.length,g[x]?.focus();}};return document.addEventListener("mousedown",m),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",u);}}},[n.isOpen,n.setIsOpen,n.triggerRef]),!n.isOpen)return null;let c=()=>o==="bottom"?r==="start"?"top left":r==="end"?"top right":"top center":o==="top"?r==="start"?"bottom left":r==="end"?"bottom right":"bottom center":o==="left"?r==="start"?"top right":r==="end"?"bottom right":"center right":o==="right"?r==="start"?"top left":r==="end"?"bottom left":"center left":"center center";return reactDom.createPortal(jsxRuntime.jsx("div",{ref:s,role:"menu","aria-orientation":"vertical",style:{top:i.top,left:i.left,transformOrigin:c()},className:l("fixed z-[110] min-w-[8rem] overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white/80 dark:bg-white/[0.03] backdrop-blur-xl p-1 shadow-md duration-100",d?"animate-in fade-in zoom-in-95 opacity-100":"opacity-0",e),...a,children:t}),document.body)}function V({className:e,children:t,...r}){let o=Te.useContext(Co);return jsxRuntime.jsx("button",{type:"button",role:"menuitem",onClick:n=>{o?.setIsOpen(false),r.onClick?.(n);},className:l("relative flex w-full cursor-pointer select-none items-center rounded-2xl px-3 py-2 text-sm outline-none transition-colors","text-gray-700 dark:text-white/80","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.06] dark:hover:text-white","focus:bg-gray-100 focus:text-gray-900 dark:focus:bg-white/[0.06] dark:focus:text-white","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:t})}function ai({className:e,children:t,...r}){return jsxRuntime.jsx("div",{className:l("px-2 py-1.5 text-sm font-semibold text-gray-900 dark:text-white",e),...r,children:t})}function Aa({className:e,...t}){return jsxRuntime.jsx("div",{className:l("-mx-1 my-1 h-px bg-gray-200 dark:bg-white/[0.03]",e),...t})}function OR({name:e,description:t,avatarSrc:r,avatarFallback:o,className:a,side:n="top",align:s="start"}){return jsxRuntime.jsxs(dt,{children:[jsxRuntime.jsx(mt,{className:l("w-full outline-none",a),children:jsxRuntime.jsxs("div",{className:"group flex w-full items-center gap-3 rounded-2xl border border-gray-200 dark:border-white/5 bg-white dark:bg-white/[0.03] p-3 transition-colors hover:bg-gray-50 dark:hover:bg-white/[0.06]",children:[jsxRuntime.jsx(F,{src:r,fallback:o||e.charAt(0),size:"sm"}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col items-start text-left",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:e}),t&&jsxRuntime.jsx("span",{className:"text-[10px] text-gray-500 dark:text-white/50",children:t})]}),jsxRuntime.jsx(lucideReact.Settings,{className:"h-4 w-4 text-gray-400 dark:text-white/50 transition-colors group-hover:text-gray-900 dark:group-hover:text-white"})]})}),jsxRuntime.jsxs(ut,{className:"w-56",align:s,side:n,children:[jsxRuntime.jsx(ai,{children:"My Account"}),jsxRuntime.jsx(Aa,{}),jsxRuntime.jsxs(V,{children:[jsxRuntime.jsx(lucideReact.User,{className:"mr-2 h-4 w-4"}),jsxRuntime.jsx("span",{children:"Profile"})]}),jsxRuntime.jsxs(V,{children:[jsxRuntime.jsx(lucideReact.Settings,{className:"mr-2 h-4 w-4"}),jsxRuntime.jsx("span",{children:"Settings"})]}),jsxRuntime.jsx(Aa,{}),jsxRuntime.jsxs(V,{className:"text-rose-400 focus:text-rose-400",children:[jsxRuntime.jsx(lucideReact.LogOut,{className:"mr-2 h-4 w-4"}),jsxRuntime.jsx("span",{children:"Log out"})]})]})]})}var Fp=Te__namespace.default.forwardRef(({...e},t)=>jsxRuntime.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));Fp.displayName="Breadcrumb";var Up=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("ol",{ref:r,className:l("flex flex-wrap items-center gap-1.5 break-words text-sm text-gray-500 dark:text-white/50 sm:gap-2.5",e),...t}));Up.displayName="BreadcrumbList";var Wp=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("li",{ref:r,className:l("inline-flex items-center gap-1.5",e),...t}));Wp.displayName="BreadcrumbItem";var _p=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("a",{ref:r,className:l("transition-colors hover:text-gray-900 dark:hover:text-white",e),...t}));_p.displayName="BreadcrumbLink";var Yp=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:l("font-normal text-gray-900 dark:text-white",e),...t}));Yp.displayName="BreadcrumbPage";var Xp=({children:e,className:t,...r})=>jsxRuntime.jsx("li",{role:"presentation","aria-hidden":"true",className:l("[&>svg]:size-3.5",t),...r,children:e??jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsxRuntime.jsx("path",{d:"m9 18 6-6-6-6"})})});Xp.displayName="BreadcrumbSeparator";var jp=({className:e,...t})=>jsxRuntime.jsxs("span",{role:"presentation","aria-hidden":"true",className:l("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"19",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"5",cy:"12",r:"1"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"More"})]});jp.displayName="BreadcrumbElipssis";function YR({contentId:e="main-content",className:t,children:r="Skip to content"}){return jsxRuntime.jsx("a",{href:`#${e}`,className:l("sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:bg-purple-600 focus:text-white focus:rounded-xl focus:shadow-2xl focus:outline-none focus:ring-2 focus:ring-white/20 transition-all",t),children:r})}var Gp=({className:e,...t})=>jsxRuntime.jsx("nav",{role:"navigation","aria-label":"pagination",className:l("mx-auto flex w-full justify-center",e),...t});Gp.displayName="Pagination";var Jp=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("ul",{ref:r,className:l("flex flex-row items-center gap-1",e),...t}));Jp.displayName="PaginationContent";var Qp=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("li",{ref:r,className:l("",e),...t}));Qp.displayName="PaginationItem";var Ba=({className:e,isActive:t,...r})=>jsxRuntime.jsx("a",{"aria-current":t?"page":void 0,className:l("inline-flex h-9 w-9 items-center justify-center rounded-2xl text-sm font-medium transition-colors","hover:bg-gray-100 dark:hover:bg-white/[0.03] hover:text-gray-900 dark:hover:text-white",t?"bg-gray-100 text-gray-900 dark:bg-white/[0.06] dark:text-white":"text-gray-500 dark:text-white/60",e),...r});Ba.displayName="PaginationLink";var Zp=({className:e,...t})=>jsxRuntime.jsxs(Ba,{"aria-label":"Go to previous page",className:l("w-auto gap-1 px-2.5",e),...t,children:[jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsxRuntime.jsx("path",{d:"m15 18-6-6 6-6"})}),jsxRuntime.jsx("span",{children:"Previous"})]});Zp.displayName="PaginationPrevious";var ef=({className:e,...t})=>jsxRuntime.jsxs(Ba,{"aria-label":"Go to next page",className:l("w-auto gap-1 px-2.5",e),...t,children:[jsxRuntime.jsx("span",{children:"Next"}),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsxRuntime.jsx("path",{d:"m9 18 6-6-6-6"})})]});ef.displayName="PaginationNext";var tf=({className:e,...t})=>jsxRuntime.jsxs("span",{"aria-hidden":true,className:l("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"19",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"5",cy:"12",r:"1"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"More pages"})]});tf.displayName="PaginationEllipsis";var t4=({steps:e,currentStep:t,className:r,onStepClick:o})=>jsxRuntime.jsx("div",{className:l("flex w-full flex-col gap-4 md:flex-row",r),children:e.map((a,n)=>{let s=t>n,i=t===n,d=!!o;return jsxRuntime.jsxs("div",{className:l("flex flex-1 flex-col gap-2 md:flex-row md:items-center md:gap-4",d&&"cursor-pointer"),onClick:()=>d&&o(n),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4 md:flex-col md:gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("div",{className:l("flex h-8 w-8 items-center justify-center rounded-full border-2 text-sm font-semibold transition-colors",s?"border-blue-600 bg-blue-600 text-white dark:border-blue-500 dark:bg-blue-500":i?"border-blue-600 text-blue-600 dark:border-blue-500 dark:text-blue-500":"border-gray-300 text-gray-500 dark:border-white/20 dark:text-white/40"),children:s?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"}):n+1}),n<e.length-1&&jsxRuntime.jsx("div",{className:l("ml-4 h-px flex-1 bg-gray-200 md:hidden dark:bg-white/[0.03]",s&&"bg-blue-600 dark:bg-blue-500")})]}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:l("text-sm font-medium",i||s?"text-gray-900 dark:text-white":"text-gray-500 dark:text-white/50"),children:a.title}),a.description&&jsxRuntime.jsx("span",{className:"text-xs text-gray-500 dark:text-white/40 hidden md:block",children:a.description})]})]}),n<e.length-1&&jsxRuntime.jsx("div",{className:l("hidden h-px flex-1 bg-gray-200 md:block dark:bg-white/[0.03]",s&&"bg-blue-600 dark:bg-blue-500")})]},n)})});function c4({isOpen:e,onClose:t,onConfirm:r,title:o,description:a,confirmText:n="Confirm",cancelText:s="Cancel",variant:i="primary",isLoading:d=false}){return jsxRuntime.jsxs(fo,{isOpen:e,onClose:t,children:[jsxRuntime.jsx(go,{children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[i==="danger"&&jsxRuntime.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-rose-500/10 text-rose-500",children:jsxRuntime.jsx(lucideReact.AlertTriangle,{className:"h-5 w-5"})}),jsxRuntime.jsx(at,{as:"h3",children:o})]})}),jsxRuntime.jsx("div",{className:"py-2",children:jsxRuntime.jsx(Ne,{className:"text-gray-500 dark:text-white/60",children:a})}),jsxRuntime.jsxs(bo,{children:[jsxRuntime.jsx(R,{variant:"ghost",onClick:t,disabled:d,children:s}),jsxRuntime.jsx(R,{variant:i==="danger"?"danger":"primary",onClick:r,isLoading:d,children:n})]})]})}function b4({isOpen:e,onClose:t,children:r,className:o,hideClose:a}){let n=Te.useRef(null),[s,i]=Te__namespace.default.useState(false);Te.useEffect(()=>{i(true);},[]),Te.useEffect(()=>{let c=n.current;c&&(e?c.open||c.showModal():c.open&&c.close());},[e,s]),Te.useEffect(()=>{let c=n.current;if(!c)return;let m=u=>{u.preventDefault(),t();};return c.addEventListener("cancel",m),()=>c.removeEventListener("cancel",m)},[t,s]);let d=c=>{c.target===n.current&&t();};return s?reactDom.createPortal(jsxRuntime.jsx("dialog",{ref:n,onClick:d,className:l("fixed inset-0 z-[100] m-auto bg-transparent p-0 backdrop:bg-black/60 backdrop:backdrop-blur-sm open:flex open:items-center open:justify-center","open:animate-in open:fade-in open:duration-200"),children:jsxRuntime.jsxs("div",{className:l("relative w-full max-w-lg scale-100 gap-4 border border-zinc-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 p-6 shadow-2xl backdrop-blur-xl transition-all sm:rounded-2xl","animate-in fade-in zoom-in-95 duration-200 slide-in-from-bottom-2",o),children:[r,!a&&jsxRuntime.jsxs("button",{onClick:t,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20 disabled:pointer-events-none",children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:[jsxRuntime.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntime.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})}),document.body):null}function h4({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left mb-4",e),children:t})}function x4({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),children:t})}function v4({className:e,children:t}){return jsxRuntime.jsx(at,{as:"h2",className:l("text-lg font-semibold leading-none tracking-tight",e),children:t})}function w4({className:e,children:t}){return jsxRuntime.jsx("p",{className:l("text-sm text-gray-500 dark:text-gray-400",e),children:t})}function P4({isOpen:e,onClose:t,position:r="right",children:o,className:a}){let[n,s]=Te.useState(false),[i,d]=Te.useState(false),c=Te.useRef(null);Te.useEffect(()=>{if(e)d(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{s(true);});}),document.body.style.overflow="hidden";else {s(false);let g=setTimeout(()=>{d(false),document.body.style.overflow="unset";},300);return ()=>clearTimeout(g)}},[e]),Te.useEffect(()=>{let g=h=>{h.key==="Escape"&&t();};return e&&document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g);}},[e,t]);let m=g=>{g.target===c.current&&t();};if(!i)return null;let u={left:"left-0 h-full w-3/4 max-w-sm border-r",right:"right-0 h-full w-3/4 max-w-sm border-l",bottom:"bottom-0 w-full h-auto max-h-[90vh] border-t rounded-t-2xl"},p={left:n?"translate-x-0":"-translate-x-full",right:n?"translate-x-0":"translate-x-full",bottom:n?"translate-y-0":"translate-y-full"};return reactDom.createPortal(jsxRuntime.jsx("div",{ref:c,onClick:m,className:l("fixed inset-0 z-[100] flex bg-black/60 backdrop-blur-sm transition-opacity duration-300",n?"opacity-100":"opacity-0"),role:"dialog","aria-modal":"true",children:jsxRuntime.jsx("div",{className:l("absolute bg-white dark:bg-[#0A0A0A] border-gray-200 dark:border-white/10 p-6 shadow-2xl transition-transform duration-300 ease-in-out",u[r],p[r],a),children:o})}),document.body)}function E4({className:e,children:t,...r}){return jsxRuntime.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left mb-6",e),...r,children:t})}function S4({className:e,children:t,...r}){return jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-auto pt-6",e),...r,children:t})}function D4({className:e,children:t,...r}){return jsxRuntime.jsx(at,{as:"h2",className:l("text-lg font-semibold leading-none tracking-tight",e),...r,children:t})}function H4({className:e,children:t,...r}){return jsxRuntime.jsx(Ne,{variant:"muted",className:l("text-sm",e),...r,children:t})}function $4({content:e,children:t,position:r="top",delay:o=200,className:a}){let[n,s]=Te.useState(false),i=Te.useRef(null),d=Te.useRef(null),c=Te.useRef(null),{position:m,isPositioned:u}=qt(d,c,{side:r,align:"center",sideOffset:8,isOpen:n}),p=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>s(true),o);},g=()=>{i.current&&clearTimeout(i.current),s(false);};Te.useEffect(()=>()=>{i.current&&clearTimeout(i.current);},[]);let h={top:"slide-in-from-bottom-2",bottom:"slide-in-from-top-2",left:"slide-in-from-right-2",right:"slide-in-from-left-2"};return jsxRuntime.jsxs("div",{ref:d,className:"relative inline-flex",onMouseEnter:p,onMouseLeave:g,onFocus:p,onBlur:g,children:[t,n&&reactDom.createPortal(jsxRuntime.jsx("div",{ref:c,role:"tooltip",style:{top:m.top,left:m.left},className:l("fixed z-[120] min-w-max max-w-xs rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 px-3 py-1.5 text-xs text-gray-900 dark:text-white shadow-xl backdrop-blur-md","duration-200",u?"animate-in fade-in opacity-100":"opacity-0",h[r],a),children:e}),document.body)]})}var bf=Te__namespace.default.forwardRef(({className:e,size:t="lg",...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("mx-auto w-full px-4",{sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl",full:"max-w-full"}[t],e),...r}));bf.displayName="Container";var vf=Te__namespace.default.forwardRef(({className:e,direction:t="col",gap:r=4,align:o,justify:a,wrap:n,style:s,...i},d)=>jsxRuntime.jsx("div",{ref:d,className:l("flex",{"flex-row":t==="row","flex-col":t==="col","flex-row-reverse":t==="row-reverse","flex-col-reverse":t==="col-reverse","flex-wrap":n,"items-start":o==="start","items-end":o==="end","items-center":o==="center","items-baseline":o==="baseline","items-stretch":o==="stretch","justify-start":a==="start","justify-end":a==="end","justify-center":a==="center","justify-between":a==="between","justify-around":a==="around","justify-evenly":a==="evenly"},e),style:{gap:typeof r=="number"?`${r*.25}rem`:r,...s},...i}));vf.displayName="Stack";var di={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},kf={1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},Nf={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},Tf={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},Cf={1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6",7:"xl:grid-cols-7",8:"xl:grid-cols-8",9:"xl:grid-cols-9",10:"xl:grid-cols-10",11:"xl:grid-cols-11",12:"xl:grid-cols-12"},Mf=Te__namespace.default.forwardRef(({className:e,cols:t,sm:r,md:o,lg:a,xl:n,gap:s=4,style:i,...d},c)=>jsxRuntime.jsx("div",{ref:c,className:l("grid",t&&di[t],r&&kf[r],o&&Nf[o],a&&Tf[a],n&&Cf[n],e),style:{gridTemplateColumns:t&&!di[t]?`repeat(${t}, minmax(0, 1fr))`:void 0,gap:typeof s=="number"?`${s*.25}rem`:s,...i},...d}));Mf.displayName="Grid";var Lf=Te__namespace.default.forwardRef(({variant:e="none",noise:t=false,patternColor:r,size:o=24,mask:a="none",animate:n=false,followMouse:s=false,bgColor:i,className:d,children:c,style:m,...u},p)=>{let g=Te__namespace.default.useRef(null);Te__namespace.default.useEffect(()=>{if(!s)return;let b=f=>{let w=g.current;if(!w)return;let v=w.getBoundingClientRect(),y=f.clientX-v.left,k=f.clientY-v.top;w.style.setProperty("--mouse-x",`${y}px`),w.style.setProperty("--mouse-y",`${k}px`);};return window.addEventListener("mousemove",b),()=>window.removeEventListener("mousemove",b)},[s]);let h=()=>{let b={},f=r||"var(--pattern-color, rgba(255,255,255,0.08))";return e==="dots"?{...b,backgroundImage:`radial-gradient(${f} 1px, transparent 1px)`,backgroundSize:`${o}px ${o}px`,transform:s?"translate3d(calc((var(--mouse-x, 0) - 24px) / 40), calc((var(--mouse-y, 0) - 24px) / 40), 0)":void 0}:e==="grid"?{...b,backgroundImage:`
66
+ `})]})}function XM({data:e,keys:t,colors:r=["cyan","purple","emerald"],maxValue:o,height:a=300,className:n,...s}){let[i,d]=Te.useState(0),c=Te__namespace.default.useRef(null);Te__namespace.default.useEffect(()=>{if(!c.current)return;let b=new ResizeObserver(f=>{f[0]&&d(f[0].contentRect.width);});return b.observe(c.current),()=>b.disconnect()},[]);let m={x:i/2,y:a/2},u=Math.min(i,a)/2-40,p=Te.useMemo(()=>{if(o)return o;let b=0;return e.forEach(f=>{t.forEach(v=>{let w=Number(f[v])||0;w>b&&(b=w);});}),b*1.1||100},[e,t,o]),g=Math.PI*2/e.length,h={cyan:"rgba(6, 182, 212, 0.5)",purple:"rgba(139, 92, 246, 0.5)",emerald:"rgba(16, 185, 129, 0.5)",amber:"rgba(245, 158, 11, 0.5)",rose:"rgba(244, 63, 94, 0.5)"},x={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e"};return i===0?jsxRuntime.jsx("div",{ref:c,style:{height:a}}):jsxRuntime.jsx("div",{ref:c,className:l("relative w-full select-none",n),style:{height:a},...s,children:jsxRuntime.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${i} ${a}`,className:"overflow-visible",children:[[1,2,3,4,5].map(b=>{let f=u/5*b,v=e.map((w,y)=>{let k=g*y-Math.PI/2;return `${m.x+Math.cos(k)*f},${m.y+Math.sin(k)*f}`}).join(" ");return jsxRuntime.jsx("polygon",{points:v,fill:"none",stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"},b)}),e.map((b,f)=>{let v=g*f-Math.PI/2,w=m.x+Math.cos(v)*u,y=m.y+Math.sin(v)*u,k=m.x+Math.cos(v)*(u+20),N=m.y+Math.sin(v)*(u+20);return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:m.x,y1:m.y,x2:w,y2:y,stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"}),jsxRuntime.jsx("text",{x:k,y:N,textAnchor:"middle",dominantBaseline:"middle",fill:"rgba(255,255,255,0.6)",fontSize:"12",children:b.subject})]},f)}),t.map((b,f)=>{let v=e.map((N,C)=>{let E=(Number(N[b])||0)/p*u,O=g*C-Math.PI/2;return `${m.x+Math.cos(O)*E},${m.y+Math.sin(O)*E}`}).join(" "),w=r[f%r.length]||"cyan",y=h[w],k=x[w];return jsxRuntime.jsx("polygon",{points:v,fill:y,fillOpacity:.3,stroke:k,strokeWidth:2,className:"transition-all duration-500 ease-out hover:fill-opacity-50"},b)})]})})}function JM({data:e,color:t="emerald",height:r=40,strokeWidth:o=2,fill:a=false,className:n,...s}){let i=Math.max(...e),d=Math.min(...e),c=i-d||1,u={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e",white:"#ffffff"}[t],p=e.map((x,b)=>{let f=b/(e.length-1)*100,w=95-(x-d)/c*90;return {x:f,y:w}}),g="";if(p.length>0){g=`M ${p[0].x} ${p[0].y}`;for(let x=0;x<p.length-1;x++){let b=p[x],f=p[x+1],v=b.x+(f.x-b.x)/2,w=b.y,y=b.x+(f.x-b.x)/2,k=f.y;g+=` C ${v} ${w}, ${y} ${k}, ${f.x} ${f.y}`;}}let h=a?`${g} L 100 100 L 0 100 Z`:void 0;return jsxRuntime.jsx("div",{className:l("w-full overflow-hidden",n),style:{height:r},...s,children:jsxRuntime.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"overflow-visible",children:[a&&jsxRuntime.jsx("path",{d:h,fill:u,fillOpacity:.1,stroke:"none"}),jsxRuntime.jsx("path",{d:g,fill:"none",stroke:u,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})})}function tR({ticks:e=5,format:t=r=>r.toString()}){let{height:r,padding:o,maxValue:a}=Ee(),n=r-o.top-o.bottom;return jsxRuntime.jsx("g",{children:Array.from({length:e+1}).map((s,i)=>{let d=a/e*i,c=r-o.bottom-n/e*i;return jsxRuntime.jsx("text",{x:o.left-10,y:c,textAnchor:"end",dominantBaseline:"middle",className:"fill-gray-400 dark:fill-white/40 text-xs font-medium",children:t(Math.round(d))},i)})})}var Ba=Te.createContext(void 0);function iR({defaultValue:e,value:t,onValueChange:r,className:o,children:a,...n}){let[s,i]=Te.useState(e),d=m=>{t===void 0&&i(m),r?.(m);},c=t!==void 0?t:s;return jsxRuntime.jsx(Ba.Provider,{value:{value:c,onValueChange:d},children:jsxRuntime.jsx("div",{className:l("w-full",o),...n,children:a})})}function lR({className:e,children:t,...r}){return jsxRuntime.jsx("div",{role:"tablist",className:l("inline-flex h-10 items-center justify-center rounded-2xl bg-gray-100 p-1 text-gray-500 dark:bg-white/[0.03] dark:text-white/60",e),...r,children:t})}function cR({className:e,value:t,children:r,...o}){let a=Te.useContext(Ba);if(!a)throw new Error("TabsTrigger must be used within Tabs");let n=a.value===t;return jsxRuntime.jsx("button",{type:"button",role:"tab","aria-selected":n,"aria-controls":`tabs-content-${t}`,id:`tabs-trigger-${t}`,onClick:()=>a.onValueChange(t),className:l("inline-flex items-center justify-center whitespace-nowrap rounded-2xl px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-white/20",n?"bg-white text-gray-900 shadow-sm dark:bg-white/[0.06] dark:text-white dark:backdrop-blur-sm":"hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-white/[0.03] dark:hover:text-white",e),...o,children:r})}function dR({className:e,value:t,children:r,...o}){let a=Te.useContext(Ba);if(!a)throw new Error("TabsContent must be used within Tabs");return a.value!==t?null:jsxRuntime.jsx("div",{role:"tabpanel",id:`tabs-content-${t}`,"aria-labelledby":`tabs-trigger-${t}`,tabIndex:0,className:l("mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20 focus-visible:ring-offset-2",e),...o,children:r})}var gR=Te__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("aside",{ref:o,className:l("flex h-full w-64 flex-col border-r backdrop-blur-xl transition-colors duration-200","border-zinc-200 bg-white/80","dark:border-white/10 dark:bg-black/20",e),...r,children:t})),bR=Te__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("flex h-16 items-center px-6 border-b border-gray-200 dark:border-white/5",e),...r,children:t})),hR=Te__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("flex-1 overflow-y-auto py-4 px-3 space-y-1",e),...r,children:t})),xR=Te__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("p-4 border-t border-gray-200 dark:border-white/5",e),...r,children:t})),vR=Te__namespace.default.forwardRef(({className:e,children:t,active:r,icon:o,badge:a,...n},s)=>jsxRuntime.jsxs("button",{ref:s,className:l("flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium transition-colors","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.03] dark:hover:text-white",r?"bg-gray-200 text-gray-900 dark:bg-white/[0.06] dark:text-white":"text-gray-600 dark:text-white/60",e),...n,children:[o&&jsxRuntime.jsx("span",{className:l("flex h-4 w-4 items-center justify-center",r?"text-gray-900 dark:text-white":"text-gray-500 dark:text-white/60"),children:o}),jsxRuntime.jsx("span",{className:"flex-1 text-left",children:t}),a&&jsxRuntime.jsx("span",{className:"flex h-5 min-w-5 items-center justify-center rounded-full bg-gray-200 dark:bg-white/[0.06] px-1.5 text-[10px] font-bold text-gray-900 dark:text-white",children:a})]})),wR=Te__namespace.default.forwardRef(({className:e,children:t,label:r,...o},a)=>jsxRuntime.jsxs("div",{ref:a,className:l("mb-6",e),...o,children:[r&&jsxRuntime.jsx("div",{className:"mb-2 px-3 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-white/40",children:r}),jsxRuntime.jsx("div",{className:"space-y-1",children:t})]}));var Op={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"};function LR({logo:e,links:t=[],actions:r,className:o,maxWidth:a="xl"}){let[n,s]=Te.useState(false),[i,d]=Te.useState(false);return Te.useEffect(()=>{let c=()=>{s(window.scrollY>20);};return window.addEventListener("scroll",c),()=>window.removeEventListener("scroll",c)},[]),jsxRuntime.jsx("nav",{className:l("fixed top-0 left-0 right-0 z-50 transition-all duration-300 px-4 py-4",n?"py-3":"py-6",o),children:jsxRuntime.jsxs("div",{className:l("mx-auto transition-all duration-300",Op[a]),children:[jsxRuntime.jsxs(ce,{className:l("flex items-center justify-between px-6 py-3 transition-all duration-300",n?"rounded-2xl border-white/10 bg-white/70 dark:bg-zinc-900/70 backdrop-blur-xl shadow-lg":"rounded-2xl border-transparent bg-transparent dark:bg-transparent backdrop-blur-none shadow-none"),children:[jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:e||jsxRuntime.jsx("span",{className:"text-xl font-bold tracking-tighter",children:"PIXON"})}),jsxRuntime.jsx("div",{className:"hidden md:flex items-center gap-8",children:t.map(c=>jsxRuntime.jsx("a",{href:c.href,className:"text-sm font-medium text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors",children:c.label},c.label))}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsx("div",{className:"hidden md:flex items-center gap-2",children:r}),jsxRuntime.jsx("button",{className:"md:hidden p-2 text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-white/[0.03] rounded-2xl transition-colors",onClick:()=>d(!i),children:i?jsxRuntime.jsx(lucideReact.X,{size:20}):jsxRuntime.jsx(lucideReact.Menu,{size:20})})]})]}),jsxRuntime.jsx("div",{className:l("md:hidden absolute top-full left-4 right-4 mt-2 transition-all duration-300 origin-top",i?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 -translate-y-4 pointer-events-none"),children:jsxRuntime.jsxs(ce,{className:"p-4 flex flex-col gap-4 shadow-2xl border-white/10 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-2xl",children:[t.map(c=>jsxRuntime.jsx("a",{href:c.href,className:"text-base font-medium px-4 py-2 rounded-2xl hover:bg-zinc-100 dark:hover:bg-white/[0.03] text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-all",onClick:()=>d(false),children:c.label},c.label)),jsxRuntime.jsx("div",{className:"pt-4 border-t border-zinc-200 dark:border-white/10 flex flex-col gap-2",children:r})]})})]})})}var Co=Te.createContext(void 0);function mt({children:e}){let[t,r]=Te.useState(false),o=Te.useRef(null);return jsxRuntime.jsx(Co.Provider,{value:{isOpen:t,setIsOpen:r,triggerRef:o},children:jsxRuntime.jsx("div",{className:"relative inline-block text-left",children:e})})}function ut({className:e,children:t,...r}){let o=Te.useContext(Co);if(!o)throw new Error("DropdownMenuTrigger must be used within DropdownMenu");let a=n=>{o.setIsOpen(!o.isOpen),r.onClick?.(n);};return jsxRuntime.jsx("button",{ref:o.triggerRef,type:"button","aria-haspopup":"menu","aria-expanded":o.isOpen?"true":"false",onClick:a,className:l("inline-flex items-center justify-center",e),...r,children:t})}function pt({className:e,children:t,align:r="start",side:o="bottom",...a}){let n=Te.useContext(Co);if(!n)throw new Error("DropdownMenuContent must be used within DropdownMenu");let s=Te.useRef(null),{position:i,isPositioned:d}=Gt(n.triggerRef,s,{side:o,align:r,isOpen:n.isOpen});if(Te.useEffect(()=>{if(n.isOpen){let m=p=>{s.current&&!s.current.contains(p.target)&&n.triggerRef.current&&!n.triggerRef.current.contains(p.target)&&n.setIsOpen(false);},u=p=>{if(p.key==="Escape"&&(n.setIsOpen(false),n.triggerRef.current?.focus()),p.key==="ArrowDown"||p.key==="ArrowUp"){p.preventDefault();let g=s.current?.querySelectorAll('[role="menuitem"]');if(!g.length)return;let h=Array.from(g).indexOf(document.activeElement),x=0;p.key==="ArrowDown"?x=(h+1)%g.length:x=(h-1+g.length)%g.length,g[x]?.focus();}};return document.addEventListener("mousedown",m),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",u);}}},[n.isOpen,n.setIsOpen,n.triggerRef]),!n.isOpen)return null;let c=()=>o==="bottom"?r==="start"?"top left":r==="end"?"top right":"top center":o==="top"?r==="start"?"bottom left":r==="end"?"bottom right":"bottom center":o==="left"?r==="start"?"top right":r==="end"?"bottom right":"center right":o==="right"?r==="start"?"top left":r==="end"?"bottom left":"center left":"center center";return reactDom.createPortal(jsxRuntime.jsx("div",{ref:s,role:"menu","aria-orientation":"vertical",style:{top:i.top,left:i.left,transformOrigin:c()},className:l("fixed z-[110] min-w-[8rem] overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white/80 dark:bg-white/[0.03] backdrop-blur-xl p-1 shadow-md duration-100",d?"animate-in fade-in zoom-in-95 opacity-100":"opacity-0",e),...a,children:t}),document.body)}function z({className:e,children:t,...r}){let o=Te.useContext(Co);return jsxRuntime.jsx("button",{type:"button",role:"menuitem",onClick:n=>{o?.setIsOpen(false),r.onClick?.(n);},className:l("relative flex w-full cursor-pointer select-none items-center rounded-2xl px-3 py-2 text-sm outline-none transition-colors","text-gray-700 dark:text-white/80","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.06] dark:hover:text-white","focus:bg-gray-100 focus:text-gray-900 dark:focus:bg-white/[0.06] dark:focus:text-white","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:t})}function si({className:e,children:t,...r}){return jsxRuntime.jsx("div",{className:l("px-2 py-1.5 text-sm font-semibold text-gray-900 dark:text-white",e),...r,children:t})}function Oa({className:e,...t}){return jsxRuntime.jsx("div",{className:l("-mx-1 my-1 h-px bg-gray-200 dark:bg-white/[0.03]",e),...t})}function UR({name:e,description:t,avatarSrc:r,avatarFallback:o,className:a,side:n="top",align:s="start"}){return jsxRuntime.jsxs(mt,{children:[jsxRuntime.jsx(ut,{className:l("w-full outline-none",a),children:jsxRuntime.jsxs("div",{className:"group flex w-full items-center gap-3 rounded-2xl border border-gray-200 dark:border-white/5 bg-white dark:bg-white/[0.03] p-3 transition-colors hover:bg-gray-50 dark:hover:bg-white/[0.06]",children:[jsxRuntime.jsx(U,{src:r,fallback:o||e.charAt(0),size:"sm"}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col items-start text-left",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:e}),t&&jsxRuntime.jsx("span",{className:"text-[10px] text-gray-500 dark:text-white/50",children:t})]}),jsxRuntime.jsx(lucideReact.Settings,{className:"h-4 w-4 text-gray-400 dark:text-white/50 transition-colors group-hover:text-gray-900 dark:group-hover:text-white"})]})}),jsxRuntime.jsxs(pt,{className:"w-56",align:s,side:n,children:[jsxRuntime.jsx(si,{children:"My Account"}),jsxRuntime.jsx(Oa,{}),jsxRuntime.jsxs(z,{children:[jsxRuntime.jsx(lucideReact.User,{className:"mr-2 h-4 w-4"}),jsxRuntime.jsx("span",{children:"Profile"})]}),jsxRuntime.jsxs(z,{children:[jsxRuntime.jsx(lucideReact.Settings,{className:"mr-2 h-4 w-4"}),jsxRuntime.jsx("span",{children:"Settings"})]}),jsxRuntime.jsx(Oa,{}),jsxRuntime.jsxs(z,{className:"text-rose-400 focus:text-rose-400",children:[jsxRuntime.jsx(lucideReact.LogOut,{className:"mr-2 h-4 w-4"}),jsxRuntime.jsx("span",{children:"Log out"})]})]})]})}var _p=Te__namespace.default.forwardRef(({...e},t)=>jsxRuntime.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));_p.displayName="Breadcrumb";var Yp=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("ol",{ref:r,className:l("flex flex-wrap items-center gap-1.5 break-words text-sm text-gray-500 dark:text-white/50 sm:gap-2.5",e),...t}));Yp.displayName="BreadcrumbList";var Xp=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("li",{ref:r,className:l("inline-flex items-center gap-1.5",e),...t}));Xp.displayName="BreadcrumbItem";var jp=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("a",{ref:r,className:l("transition-colors hover:text-gray-900 dark:hover:text-white",e),...t}));jp.displayName="BreadcrumbLink";var qp=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:l("font-normal text-gray-900 dark:text-white",e),...t}));qp.displayName="BreadcrumbPage";var Gp=({children:e,className:t,...r})=>jsxRuntime.jsx("li",{role:"presentation","aria-hidden":"true",className:l("[&>svg]:size-3.5",t),...r,children:e??jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsxRuntime.jsx("path",{d:"m9 18 6-6-6-6"})})});Gp.displayName="BreadcrumbSeparator";var Jp=({className:e,...t})=>jsxRuntime.jsxs("span",{role:"presentation","aria-hidden":"true",className:l("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"19",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"5",cy:"12",r:"1"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"More"})]});Jp.displayName="BreadcrumbElipssis";function JR({contentId:e="main-content",className:t,children:r="Skip to content"}){return jsxRuntime.jsx("a",{href:`#${e}`,className:l("sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:bg-purple-600 focus:text-white focus:rounded-xl focus:shadow-2xl focus:outline-none focus:ring-2 focus:ring-white/20 transition-all",t),children:r})}var Zp=({className:e,...t})=>jsxRuntime.jsx("nav",{role:"navigation","aria-label":"pagination",className:l("mx-auto flex w-full justify-center",e),...t});Zp.displayName="Pagination";var ef=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("ul",{ref:r,className:l("flex flex-row items-center gap-1",e),...t}));ef.displayName="PaginationContent";var tf=Te__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("li",{ref:r,className:l("",e),...t}));tf.displayName="PaginationItem";var za=({className:e,isActive:t,...r})=>jsxRuntime.jsx("a",{"aria-current":t?"page":void 0,className:l("inline-flex h-9 w-9 items-center justify-center rounded-2xl text-sm font-medium transition-colors","hover:bg-gray-100 dark:hover:bg-white/[0.03] hover:text-gray-900 dark:hover:text-white",t?"bg-gray-100 text-gray-900 dark:bg-white/[0.06] dark:text-white":"text-gray-500 dark:text-white/60",e),...r});za.displayName="PaginationLink";var rf=({className:e,...t})=>jsxRuntime.jsxs(za,{"aria-label":"Go to previous page",className:l("w-auto gap-1 px-2.5",e),...t,children:[jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsxRuntime.jsx("path",{d:"m15 18-6-6 6-6"})}),jsxRuntime.jsx("span",{children:"Previous"})]});rf.displayName="PaginationPrevious";var of=({className:e,...t})=>jsxRuntime.jsxs(za,{"aria-label":"Go to next page",className:l("w-auto gap-1 px-2.5",e),...t,children:[jsxRuntime.jsx("span",{children:"Next"}),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsxRuntime.jsx("path",{d:"m9 18 6-6-6-6"})})]});of.displayName="PaginationNext";var af=({className:e,...t})=>jsxRuntime.jsxs("span",{"aria-hidden":true,className:l("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"19",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"5",cy:"12",r:"1"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"More pages"})]});af.displayName="PaginationEllipsis";var s4=({steps:e,currentStep:t,className:r,onStepClick:o})=>jsxRuntime.jsx("div",{className:l("flex w-full flex-col gap-4 md:flex-row",r),children:e.map((a,n)=>{let s=t>n,i=t===n,d=!!o;return jsxRuntime.jsxs("div",{className:l("flex flex-1 flex-col gap-2 md:flex-row md:items-center md:gap-4",d&&"cursor-pointer"),onClick:()=>d&&o(n),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4 md:flex-col md:gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("div",{className:l("flex h-8 w-8 items-center justify-center rounded-full border-2 text-sm font-semibold transition-colors",s?"border-blue-600 bg-blue-600 text-white dark:border-blue-500 dark:bg-blue-500":i?"border-blue-600 text-blue-600 dark:border-blue-500 dark:text-blue-500":"border-gray-300 text-gray-500 dark:border-white/20 dark:text-white/40"),children:s?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"}):n+1}),n<e.length-1&&jsxRuntime.jsx("div",{className:l("ml-4 h-px flex-1 bg-gray-200 md:hidden dark:bg-white/[0.03]",s&&"bg-blue-600 dark:bg-blue-500")})]}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:l("text-sm font-medium",i||s?"text-gray-900 dark:text-white":"text-gray-500 dark:text-white/50"),children:a.title}),a.description&&jsxRuntime.jsx("span",{className:"text-xs text-gray-500 dark:text-white/40 hidden md:block",children:a.description})]})]}),n<e.length-1&&jsxRuntime.jsx("div",{className:l("hidden h-px flex-1 bg-gray-200 md:block dark:bg-white/[0.03]",s&&"bg-blue-600 dark:bg-blue-500")})]},n)})});function f4({isOpen:e,onClose:t,onConfirm:r,title:o,description:a,confirmText:n="Confirm",cancelText:s="Cancel",variant:i="primary",isLoading:d=false}){return jsxRuntime.jsxs(fo,{isOpen:e,onClose:t,children:[jsxRuntime.jsx(go,{children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[i==="danger"&&jsxRuntime.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-rose-500/10 text-rose-500",children:jsxRuntime.jsx(lucideReact.AlertTriangle,{className:"h-5 w-5"})}),jsxRuntime.jsx(nt,{as:"h3",children:o})]})}),jsxRuntime.jsx("div",{className:"py-2",children:jsxRuntime.jsx(Ne,{className:"text-gray-500 dark:text-white/60",children:a})}),jsxRuntime.jsxs(bo,{children:[jsxRuntime.jsx(R,{variant:"ghost",onClick:t,disabled:d,children:s}),jsxRuntime.jsx(R,{variant:i==="danger"?"danger":"primary",onClick:r,isLoading:d,children:n})]})]})}function y4({isOpen:e,onClose:t,children:r,className:o,hideClose:a}){let n=Te.useRef(null),[s,i]=Te__namespace.default.useState(false);Te.useEffect(()=>{i(true);},[]),Te.useEffect(()=>{let c=n.current;c&&(e?c.open||c.showModal():c.open&&c.close());},[e,s]),Te.useEffect(()=>{let c=n.current;if(!c)return;let m=u=>{u.preventDefault(),t();};return c.addEventListener("cancel",m),()=>c.removeEventListener("cancel",m)},[t,s]);let d=c=>{c.target===n.current&&t();};return s?reactDom.createPortal(jsxRuntime.jsx("dialog",{ref:n,onClick:d,className:l("fixed inset-0 z-[100] m-auto bg-transparent p-0 backdrop:bg-black/60 backdrop:backdrop-blur-sm open:flex open:items-center open:justify-center","open:animate-in open:fade-in open:duration-200"),children:jsxRuntime.jsxs("div",{className:l("relative w-full max-w-lg scale-100 gap-4 border border-zinc-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 p-6 shadow-2xl backdrop-blur-xl transition-all sm:rounded-2xl","animate-in fade-in zoom-in-95 duration-200 slide-in-from-bottom-2",o),children:[r,!a&&jsxRuntime.jsxs("button",{onClick:t,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20 disabled:pointer-events-none",children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:[jsxRuntime.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntime.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})}),document.body):null}function k4({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left mb-4",e),children:t})}function N4({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),children:t})}function T4({className:e,children:t}){return jsxRuntime.jsx(nt,{as:"h2",className:l("text-lg font-semibold leading-none tracking-tight",e),children:t})}function C4({className:e,children:t}){return jsxRuntime.jsx("p",{className:l("text-sm text-gray-500 dark:text-gray-400",e),children:t})}function I4({isOpen:e,onClose:t,position:r="right",children:o,className:a}){let[n,s]=Te.useState(false),[i,d]=Te.useState(false),c=Te.useRef(null);Te.useEffect(()=>{if(e)d(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{s(true);});}),document.body.style.overflow="hidden";else {s(false);let g=setTimeout(()=>{d(false),document.body.style.overflow="unset";},300);return ()=>clearTimeout(g)}},[e]),Te.useEffect(()=>{let g=h=>{h.key==="Escape"&&t();};return e&&document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g);}},[e,t]);let m=g=>{g.target===c.current&&t();};if(!i)return null;let u={left:"left-0 h-full w-3/4 max-w-sm border-r",right:"right-0 h-full w-3/4 max-w-sm border-l",bottom:"bottom-0 w-full h-auto max-h-[90vh] border-t rounded-t-2xl"},p={left:n?"translate-x-0":"-translate-x-full",right:n?"translate-x-0":"translate-x-full",bottom:n?"translate-y-0":"translate-y-full"};return reactDom.createPortal(jsxRuntime.jsx("div",{ref:c,onClick:m,className:l("fixed inset-0 z-[100] flex bg-black/60 backdrop-blur-sm transition-opacity duration-300",n?"opacity-100":"opacity-0"),role:"dialog","aria-modal":"true",children:jsxRuntime.jsx("div",{className:l("absolute bg-white dark:bg-[#0A0A0A] border-gray-200 dark:border-white/10 p-6 shadow-2xl transition-transform duration-300 ease-in-out",u[r],p[r],a),children:o})}),document.body)}function A4({className:e,children:t,...r}){return jsxRuntime.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left mb-6",e),...r,children:t})}function B4({className:e,children:t,...r}){return jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-auto pt-6",e),...r,children:t})}function V4({className:e,children:t,...r}){return jsxRuntime.jsx(nt,{as:"h2",className:l("text-lg font-semibold leading-none tracking-tight",e),...r,children:t})}function O4({className:e,children:t,...r}){return jsxRuntime.jsx(Ne,{variant:"muted",className:l("text-sm",e),...r,children:t})}function Y4({content:e,children:t,position:r="top",delay:o=200,className:a}){let[n,s]=Te.useState(false),i=Te.useRef(null),d=Te.useRef(null),c=Te.useRef(null),{position:m,isPositioned:u}=Gt(d,c,{side:r,align:"center",sideOffset:8,isOpen:n}),p=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>s(true),o);},g=()=>{i.current&&clearTimeout(i.current),s(false);};Te.useEffect(()=>()=>{i.current&&clearTimeout(i.current);},[]);let h={top:"slide-in-from-bottom-2",bottom:"slide-in-from-top-2",left:"slide-in-from-right-2",right:"slide-in-from-left-2"};return jsxRuntime.jsxs("div",{ref:d,className:"relative inline-flex",onMouseEnter:p,onMouseLeave:g,onFocus:p,onBlur:g,children:[t,n&&reactDom.createPortal(jsxRuntime.jsx("div",{ref:c,role:"tooltip",style:{top:m.top,left:m.left},className:l("fixed z-[120] min-w-max max-w-xs rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 px-3 py-1.5 text-xs text-gray-900 dark:text-white shadow-xl backdrop-blur-md","duration-200",u?"animate-in fade-in opacity-100":"opacity-0",h[r],a),children:e}),document.body)]})}var vf=Te__namespace.default.forwardRef(({className:e,size:t="lg",...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("mx-auto w-full px-4",{sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl",full:"max-w-full"}[t],e),...r}));vf.displayName="Container";var kf=Te__namespace.default.forwardRef(({className:e,direction:t="col",gap:r=4,align:o,justify:a,wrap:n,style:s,...i},d)=>jsxRuntime.jsx("div",{ref:d,className:l("flex",{"flex-row":t==="row","flex-col":t==="col","flex-row-reverse":t==="row-reverse","flex-col-reverse":t==="col-reverse","flex-wrap":n,"items-start":o==="start","items-end":o==="end","items-center":o==="center","items-baseline":o==="baseline","items-stretch":o==="stretch","justify-start":a==="start","justify-end":a==="end","justify-center":a==="center","justify-between":a==="between","justify-around":a==="around","justify-evenly":a==="evenly"},e),style:{gap:typeof r=="number"?`${r*.25}rem`:r,...s},...i}));kf.displayName="Stack";var ui={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},Cf={1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},Mf={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},Rf={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},Lf={1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6",7:"xl:grid-cols-7",8:"xl:grid-cols-8",9:"xl:grid-cols-9",10:"xl:grid-cols-10",11:"xl:grid-cols-11",12:"xl:grid-cols-12"},Pf=Te__namespace.default.forwardRef(({className:e,cols:t,sm:r,md:o,lg:a,xl:n,gap:s=4,style:i,...d},c)=>jsxRuntime.jsx("div",{ref:c,className:l("grid",t&&ui[t],r&&Cf[r],o&&Mf[o],a&&Rf[a],n&&Lf[n],e),style:{gridTemplateColumns:t&&!ui[t]?`repeat(${t}, minmax(0, 1fr))`:void 0,gap:typeof s=="number"?`${s*.25}rem`:s,...i},...d}));Pf.displayName="Grid";var Sf=Te__namespace.default.forwardRef(({variant:e="none",noise:t=false,patternColor:r,size:o=24,mask:a="none",animate:n=false,followMouse:s=false,bgColor:i,className:d,children:c,style:m,...u},p)=>{let g=Te__namespace.default.useRef(null);Te__namespace.default.useEffect(()=>{if(!s)return;let b=f=>{let v=g.current;if(!v)return;let w=v.getBoundingClientRect(),y=f.clientX-w.left,k=f.clientY-w.top;v.style.setProperty("--mouse-x",`${y}px`),v.style.setProperty("--mouse-y",`${k}px`);};return window.addEventListener("mousemove",b),()=>window.removeEventListener("mousemove",b)},[s]);let h=()=>{let b={},f=r||"var(--pattern-color, rgba(255,255,255,0.08))";return e==="dots"?{...b,backgroundImage:`radial-gradient(${f} 1px, transparent 1px)`,backgroundSize:`${o}px ${o}px`,transform:s?"translate3d(calc((var(--mouse-x, 0) - 24px) / 40), calc((var(--mouse-y, 0) - 24px) / 40), 0)":void 0}:e==="grid"?{...b,backgroundImage:`
67
67
  linear-gradient(to right, ${f} 1px, transparent 1px),
68
68
  linear-gradient(to bottom, ${f} 1px, transparent 1px)
69
- `,backgroundSize:`${o}px ${o}px`,transform:s?"translate3d(calc((var(--mouse-x, 0) - 24px) / 40), calc((var(--mouse-y, 0) - 24px) / 40), 0)":void 0}:e==="gradient"?{...b,background:s?`radial-gradient(circle at var(--mouse-x, center) var(--mouse-y, center), ${f}, transparent)`:`radial-gradient(circle at center, ${f}, transparent)`}:e==="beams"?{...b,background:`radial-gradient(60% 40% at 50% 0%, ${f} 0%, transparent 100%)`}:b},x=a==="fade"?{maskImage:"radial-gradient(ellipse at center, black, transparent 90%)",WebkitMaskImage:"radial-gradient(ellipse at center, black, transparent 90%)"}:{};return jsxRuntime.jsxs("div",{ref:b=>{b&&(g.current=b),typeof p=="function"?p(b):p&&(p.current=b);},className:l("absolute inset-0 overflow-hidden pointer-events-none transition-transform duration-300 ease-out","z-0","[--pattern-color:rgba(0,0,0,0.05)] dark:[--pattern-color:rgba(255,255,255,0.08)]",i?.startsWith("bg-")?i:"",d),style:{...h(),...x,...m,backgroundColor:i&&!i.startsWith("bg-")?i:void 0},...u,children:[t&&jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none brightness-100 contrast-150",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`}}),e==="beams"&&jsxRuntime.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[jsxRuntime.jsx("div",{className:"absolute top-0 left-1/4 w-px h-full bg-gradient-to-b from-transparent via-white/10 to-transparent"}),jsxRuntime.jsx("div",{className:"absolute top-0 right-1/4 w-px h-full bg-gradient-to-b from-transparent via-white/10 to-transparent"})]}),e==="mesh"&&jsxRuntime.jsxs("div",{className:l("absolute inset-0 opacity-30 blur-[100px]",n&&"animate-pulse"),children:[jsxRuntime.jsx("div",{className:"absolute top-[-10%] left-[-10%] w-[50%] h-[50%] rounded-full bg-blue-500/20"}),jsxRuntime.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] w-[50%] h-[50%] rounded-full bg-purple-500/20"}),jsxRuntime.jsx("div",{className:"absolute top-[20%] right-[10%] w-[40%] h-[40%] rounded-full bg-indigo-500/10"})]}),c]})});Lf.displayName="Background";var mL=({children:e,className:t,size:r=300,color:o,fill:a,...n})=>{let s=Te.useRef(null),i=a||o||"rgba(255, 255, 255, 0.1)";return jsxRuntime.jsxs("div",{ref:s,onMouseMove:u=>{let p=s.current;if(!p)return;let g=p.getBoundingClientRect(),h=u.clientX-g.left,x=u.clientY-g.top;p.style.setProperty("--mouse-x",`${h}px`),p.style.setProperty("--mouse-y",`${x}px`);},onMouseEnter:()=>{s.current?.style.setProperty("--opacity","1");},onMouseLeave:()=>{s.current?.style.setProperty("--opacity","0");},className:l("relative overflow-hidden rounded-2xl border border-gray-200 bg-white dark:border-white/10 dark:bg-black",t),...n,children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute -inset-px transition-opacity duration-300",style:{opacity:"var(--opacity, 0)",background:`radial-gradient(${r}px circle at var(--mouse-x, center) var(--mouse-y, center), ${i}, transparent 80%)`}}),e&&jsxRuntime.jsx("div",{className:"relative h-full",children:e})]})};var Ff=classVarianceAuthority.cva("relative flex w-full flex-col rounded-2xl border transition-all duration-200 focus-within:ring-4",{variants:{variant:{default:"bg-white border-gray-200 shadow-sm focus-within:border-purple-500/50 focus-within:ring-purple-500/10 dark:bg-white/[0.03] dark:border-white/10 dark:shadow-none",ghost:"bg-transparent border-transparent shadow-none focus-within:bg-white/50 dark:focus-within:bg-white/5"}},defaultVariants:{variant:"default"}}),Uf=Te__namespace.default.forwardRef(({className:e,variant:t,onSubmit:r,isGenerating:o,onAttach:a,onFilesSelected:n,onStop:s,onMic:i,maxLength:d,footer:c,attachments:m,onRemoveAttachment:u,accept:p,multiple:g,placeholder:h="Ask AI anything...",value:x,onChange:b,...f},w)=>{let[v,y]=Te.useState(""),k=x!==void 0,N=k?x:v,C=Te.useRef(null),T=Te.useRef(null),E=()=>{C.current&&(C.current.style.height="auto",C.current.style.height=`${C.current.scrollHeight}px`);};Te.useEffect(()=>{E();},[N]);let B=M=>{let $=M.target.value;d&&$.length>d||(k||y($),b?.(M));},S=M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),N.trim()&&!o&&(r?.(N),k||y(""))),f.onKeyDown?.(M);},D=()=>{o&&s?s():N.trim()&&(r?.(N),k||y(""));},K=()=>{n&&T.current?T.current.click():a?.();},H=M=>{M.target.files&&M.target.files.length>0&&n?.(M.target.files),T.current&&(T.current.value="");};return jsxRuntime.jsxs("div",{className:l(Ff({variant:t,className:e})),children:[jsxRuntime.jsx("input",{type:"file",ref:T,className:"hidden",onChange:H,accept:p,multiple:g}),m&&m.length>0&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 px-4 pt-4",children:m.map(M=>jsxRuntime.jsxs("div",{className:"group relative flex items-center gap-2 rounded-xl border border-gray-200 bg-gray-50 px-3 py-1.5 text-sm transition-colors hover:bg-gray-100 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/[0.06]",children:[jsxRuntime.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded-lg bg-white dark:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.File,{className:"h-3 w-3 text-purple-500"})}),jsxRuntime.jsx("span",{className:"max-w-[120px] truncate text-gray-700 dark:text-gray-300",children:M.name}),jsxRuntime.jsx("button",{onClick:()=>u?.(M.id),className:"ml-1 rounded-full p-0.5 text-gray-400 opacity-0 transition-all hover:bg-gray-200 hover:text-gray-600 group-hover:opacity-100 dark:hover:bg-white/[0.06] dark:hover:text-white",type:"button",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},M.id))}),jsxRuntime.jsx("textarea",{ref:M=>{C.current=M,typeof w=="function"?w(M):w&&(w.current=M);},value:N,onChange:B,onKeyDown:S,placeholder:h,rows:1,className:l("w-full resize-none bg-transparent px-4 py-4 text-base outline-none max-h-[200px]","text-gray-900 placeholder:text-gray-400","dark:text-white dark:placeholder:text-white/40"),disabled:o&&!s,...f}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2 pb-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-gray-600 dark:text-white/40 dark:hover:text-white",onClick:K,type:"button",title:"Attach file",children:jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-5 w-5"})}),i&&jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-gray-600 dark:text-white/40 dark:hover:text-white",onClick:i,type:"button",title:"Use microphone",children:jsxRuntime.jsx(lucideReact.Mic,{className:"h-5 w-5"})})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[d&&jsxRuntime.jsxs("span",{className:"text-xs text-gray-400 dark:text-white/30",children:[N.length,"/",d]}),jsxRuntime.jsx(R,{size:"icon",disabled:!N.trim()&&!o||o&&!s,onClick:D,className:l("h-8 w-8 rounded-full transition-all duration-200",N.trim()||o?"bg-purple-600 text-white hover:bg-purple-500 shadow-lg shadow-purple-500/25":"bg-gray-100 text-gray-400 dark:bg-white/[0.06] dark:text-white/20"),children:o?s?jsxRuntime.jsx(lucideReact.Square,{className:"h-3 w-3 fill-current"}):jsxRuntime.jsx(lucideReact.Sparkles,{className:"h-4 w-4 animate-pulse"}):jsxRuntime.jsx(lucideReact.ArrowUp,{className:"h-4 w-4"})})]})]}),c&&jsxRuntime.jsx("div",{className:"border-t border-gray-100 px-4 py-2 text-xs text-gray-400 dark:border-white/5 dark:text-white/30",children:c})]})});Uf.displayName="AIPromptInput";var e0=classVarianceAuthority.cva("group relative overflow-hidden rounded-2xl border transition-all duration-200",{variants:{variant:{default:"bg-gray-50 border-gray-200 dark:bg-white/[0.02] dark:border-white/10",ghost:"bg-transparent border-transparent",outline:"bg-transparent border-gray-200 dark:border-white/10"}},defaultVariants:{variant:"default"}}),t0=Te__namespace.default.forwardRef(({className:e,variant:t,children:r,onCopy:o,onRegenerate:a,onFeedback:n,onShare:s,onEdit:i,timestamp:d,sources:c,model:m,usage:u,...p},g)=>jsxRuntime.jsxs("div",{ref:g,className:l(e0({variant:t,className:e})),...p,children:[jsxRuntime.jsxs("div",{className:"absolute left-4 top-4 flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br from-purple-500 to-blue-500 shadow-lg shadow-purple-500/20",children:jsxRuntime.jsx(lucideReact.Sparkles,{className:"h-3.5 w-3.5 text-white"})}),d&&jsxRuntime.jsx("span",{className:"text-xs font-medium text-gray-400 dark:text-white/30",children:d})]}),jsxRuntime.jsxs("div",{className:"pl-14 pr-4 py-4",children:[jsxRuntime.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none text-gray-700 dark:text-gray-300",children:r}),c&&c.length>0&&jsxRuntime.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:c.map((h,x)=>jsxRuntime.jsxs("a",{href:h.url,target:"_blank",rel:"noopener noreferrer",className:l("flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs transition-colors","border-gray-200 bg-white text-gray-600 hover:bg-gray-50","dark:border-white/10 dark:bg-white/[0.03] dark:text-white/60 dark:hover:bg-white/[0.06]"),children:[jsxRuntime.jsx("span",{className:"max-w-[150px] truncate",children:h.title}),jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3 opacity-50"})]},x))})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 bg-white/50 px-2 py-1.5 backdrop-blur dark:border-white/5 dark:bg-white/[0.02]",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-2 text-[10px] font-medium text-gray-400 dark:text-white/20",children:[m&&jsxRuntime.jsx("span",{children:m}),u&&jsxRuntime.jsx("span",{children:u})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:o,children:[jsxRuntime.jsx(lucideReact.Copy,{className:"mr-1.5 h-3.5 w-3.5"}),"Copy"]}),s&&jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:s,title:"Share",children:jsxRuntime.jsx(lucideReact.Share,{className:"h-3.5 w-3.5"})}),i&&jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:i,title:"Edit",children:jsxRuntime.jsx(lucideReact.Edit,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx("div",{className:"mx-1 h-3 w-px bg-gray-200 dark:bg-white/10"}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:a,title:"Regenerate",children:jsxRuntime.jsx(lucideReact.RefreshCw,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:()=>n?.("up"),title:"Helpful",children:jsxRuntime.jsx(lucideReact.ThumbsUp,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:()=>n?.("down"),title:"Not helpful",children:jsxRuntime.jsx(lucideReact.ThumbsDown,{className:"h-3.5 w-3.5"})})]})]})]}));t0.displayName="AIResponse";function EL({summary:e,onRegenerate:t,isLoading:r,className:o,...a}){return jsxRuntime.jsxs("div",{className:l("relative overflow-hidden rounded-2xl border border-white/10 bg-white/[0.03] backdrop-blur-xl p-5 group",o),...a,children:[jsxRuntime.jsx("div",{className:"absolute -top-24 -right-24 w-48 h-48 bg-purple-500/20 rounded-full blur-[80px] pointer-events-none group-hover:bg-purple-500/30 transition-all duration-700"}),jsxRuntime.jsx("div",{className:"absolute -bottom-24 -left-24 w-48 h-48 bg-blue-500/20 rounded-full blur-[80px] pointer-events-none group-hover:bg-blue-500/30 transition-all duration-700"}),jsxRuntime.jsxs("div",{className:"relative space-y-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-gradient-to-br from-purple-500 to-blue-500 shadow-lg shadow-purple-500/20",children:jsxRuntime.jsx(lucideReact.Sparkles,{className:"h-4 w-4 text-white"})}),jsxRuntime.jsx("h3",{className:"text-sm font-bold text-white tracking-tight",children:"Resumo Inteligente"})]}),t&&jsxRuntime.jsx("button",{onClick:t,disabled:r,className:"p-2 rounded-lg hover:bg-white/5 text-white/40 hover:text-white transition-all active:scale-95 disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.RefreshCw,{className:l("h-4 w-4",r&&"animate-spin")})})]}),jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsx("p",{className:"text-sm text-white/70 leading-relaxed font-medium",children:e}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 rounded-full bg-white/5 border border-white/5 text-[10px] font-bold text-white/40 uppercase tracking-widest",children:[jsxRuntime.jsx(lucideReact.ListChecks,{size:12}),"Key Points Extracted"]})})]}),jsxRuntime.jsx("div",{className:"pt-2",children:jsxRuntime.jsxs("button",{className:"flex items-center gap-2 text-[11px] font-bold text-blue-400 hover:text-blue-300 transition-colors uppercase tracking-wider group/btn",children:["Ver detalhes da an\xE1lise",jsxRuntime.jsx(lucideReact.ArrowRight,{size:14,className:"group-hover/btn:translate-x-1 transition-transform"})]})})]})]})}var i0={fade:{initial:"opacity-0",animate:"opacity-100"},"fade-up":{initial:"opacity-0 translate-y-4",animate:"opacity-100 translate-y-0"},"fade-down":{initial:"opacity-0 -translate-y-4",animate:"opacity-100 translate-y-0"},scale:{initial:"opacity-0 scale-95",animate:"opacity-100 scale-100"},"slide-bottom":{initial:"opacity-0 translate-y-full",animate:"opacity-100 translate-y-0"},"slide-top":{initial:"opacity-0 -translate-y-full",animate:"opacity-100 translate-y-0"}};function Mt({children:e,preset:t="fade",show:r=true,delay:o=0,duration:a=200,className:n,onAnimationComplete:s,style:i,...d}){let[c,m]=Te.useState(false),[u,p]=Te.useState(false);if(Te.useEffect(()=>{if(r){m(true);let h=setTimeout(()=>{p(true),s&&setTimeout(s,a);},o);return ()=>clearTimeout(h)}else {p(false);let h=setTimeout(()=>m(false),a);return ()=>clearTimeout(h)}},[r,o,a,s]),!c&&!r)return null;let g=i0[t];return jsxRuntime.jsx("div",{className:l("transition-all ease-out",u?g.animate:g.initial,n),style:{transitionDuration:`${a}ms`,transitionDelay:`${o}ms`,...i},...d,children:e})}function $L({replies:e,onSelect:t,isLoading:r}){return r?jsxRuntime.jsx("div",{className:"flex gap-2 p-2 px-4 animate-pulse",children:[1,2,3].map(o=>jsxRuntime.jsx("div",{className:"h-8 w-32 bg-white/5 rounded-full border border-white/5"},o))}):jsxRuntime.jsxs("div",{className:"flex gap-2 p-2 px-4 overflow-x-auto no-scrollbar scroll-smooth",children:[jsxRuntime.jsxs("div",{className:"flex items-center shrink-0 pr-2 border-r border-white/10 mr-1",children:[jsxRuntime.jsx(lucideReact.Sparkles,{size:14,className:"text-purple-400 mr-2"}),jsxRuntime.jsx("span",{className:"text-[10px] font-bold text-purple-400/50 uppercase tracking-widest select-none",children:"IA Sugere"})]}),e.map((o,a)=>jsxRuntime.jsx(Mt,{preset:"fade-up",delay:a*100,children:jsxRuntime.jsxs("button",{onClick:()=>t(o),className:l("shrink-0 flex items-center gap-2 px-4 py-2 rounded-full","bg-white/[0.03] border border-white/10 text-white/70 text-xs font-medium","hover:bg-white/10 hover:border-white/20 hover:text-white transition-all active:scale-95 group"),children:[o,jsxRuntime.jsx(lucideReact.Send,{size:10,className:"opacity-0 group-hover:opacity-100 group-hover:translate-x-0.5 transition-all"})]})},a))]})}function Wa(e,t=200){let[r,o]=Te.useState(e);return Te.useEffect(()=>{if(e)o(true);else {let a=setTimeout(()=>{o(false);},t);return ()=>clearTimeout(a)}},[e,t]),r}function Lo({present:e,children:t,exitDuration:r=200}){return Wa(e,r)?Te__namespace.default.cloneElement(t,{show:e,duration:r}):null}function eP({isVisible:e,selectedCount:t,onClose:r,onDelete:o,onForward:a,onMarkRead:n,onCopyAll:s}){return jsxRuntime.jsx(Lo,{present:e,exitDuration:300,children:jsxRuntime.jsx(Mt,{preset:"slide-bottom",className:"fixed bottom-24 left-1/2 -translate-x-1/2 z-[100] w-full max-w-lg px-4",children:jsxRuntime.jsxs("div",{className:"bg-[#1a1a1a]/90 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl p-3 flex items-center justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 pl-2",children:[jsxRuntime.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-white/40 hover:text-white transition-all",children:jsxRuntime.jsx(lucideReact.X,{size:18})}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsxs("span",{className:"text-white font-bold text-sm",children:[t," selecionados"]}),jsxRuntime.jsx("span",{className:"text-white/40 text-[10px] font-bold uppercase tracking-widest",children:"A\xE7\xF5es em massa"})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(Po,{icon:jsxRuntime.jsx(lucideReact.Forward,{size:18}),label:"Encaminhar",onClick:a,variant:"ghost"}),jsxRuntime.jsx(Po,{icon:jsxRuntime.jsx(lucideReact.Copy,{size:18}),label:"Copiar",onClick:s,variant:"ghost"}),jsxRuntime.jsx(Po,{icon:jsxRuntime.jsx(lucideReact.MessageSquare,{size:18}),label:"Lido",onClick:n,variant:"ghost"}),jsxRuntime.jsx("div",{className:"w-px h-8 bg-white/10 mx-1"}),jsxRuntime.jsx(Po,{icon:jsxRuntime.jsx(lucideReact.Trash2,{size:18}),label:"Excluir",onClick:o,variant:"danger"})]})]})})})}function Po({icon:e,label:t,onClick:r,variant:o="ghost"}){return jsxRuntime.jsxs("button",{onClick:r,className:l("flex flex-col items-center justify-center w-14 h-14 rounded-xl transition-all group active:scale-95",o==="ghost"?"text-white/60 hover:text-white hover:bg-white/5":"text-rose-500 hover:text-rose-400 hover:bg-rose-500/10"),children:[e,jsxRuntime.jsx("span",{className:"text-[10px] mt-1 font-medium scale-90 group-hover:scale-100 transition-transform",children:t})]})}function sP({status:e,onRetry:t,message:r}){let o={disconnected:{bg:"bg-rose-500/10",border:"border-rose-500/20",text:"text-rose-400",icon:jsxRuntime.jsx(lucideReact.WifiOff,{size:14}),label:"Telefone Desconectado"},connecting:{bg:"bg-amber-500/10",border:"border-amber-500/20",text:"text-amber-400",icon:jsxRuntime.jsx(lucideReact.RefreshCcw,{size:14,className:"animate-spin"}),label:"Conectando..."},reconnecting:{bg:"bg-blue-500/10",border:"border-blue-500/20",text:"text-blue-400",icon:jsxRuntime.jsx(lucideReact.RefreshCcw,{size:14,className:"animate-spin"}),label:"Tentando reconectar..."},error:{bg:"bg-rose-500/10",border:"border-rose-500/20",text:"text-rose-400",icon:jsxRuntime.jsx(lucideReact.AlertTriangle,{size:14}),label:"Erro na conex\xE3o"}}[e];return jsxRuntime.jsxs(Mt,{preset:"fade-down",className:l("flex items-center justify-center gap-4 py-2 px-4 border-b backdrop-blur-md z-50",o.bg,o.border),children:[jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 text-xs font-bold uppercase tracking-widest",o.text),children:[o.icon,r||o.label]}),t&&(e==="disconnected"||e==="error")&&jsxRuntime.jsxs("button",{onClick:t,className:"flex items-center gap-1.5 px-3 py-1 rounded-full bg-white/5 hover:bg-white/10 border border-white/5 text-[10px] font-bold text-white transition-all active:scale-95",children:["Tentar agora",jsxRuntime.jsx(lucideReact.RefreshCcw,{size:10})]})]})}function dP({children:e,className:t,...r}){return jsxRuntime.jsx("div",{className:l("flex h-[800px] w-full overflow-hidden rounded-3xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/40 backdrop-blur-xl shadow-2xl",t),...r,children:e})}function vP({conversations:e,activeId:t,onSelect:r,onNewChat:o,onSearch:a,onArchive:n,onPin:s,onMute:i,onDelete:d,onMarkUnread:c,filter:m="all",sortBy:u="recent",hideHeader:p=false,className:g,...h}){let[x,b]=Te.useState(""),f=Te.useMemo(()=>e.filter(v=>(v.user?.name||v.group?.name||"").toLowerCase().includes(x.toLowerCase())),[e,x]),w=v=>{let y=v.target.value;b(y),a?.(y);};return jsxRuntime.jsxs("div",{className:l("flex flex-col border-r border-gray-200 dark:border-white/10 bg-gray-50/50 dark:bg-white/[0.02]",!g?.includes("w-")&&"w-80",g),...h,children:[!p&&jsxRuntime.jsxs("div",{className:"p-4 space-y-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"Messages"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",title:"Filter",children:jsxRuntime.jsx(lucideReact.Filter,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{onClick:o,className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",title:"New Chat",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-5 w-5"})})]})]}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),jsxRuntime.jsx("input",{type:"text",value:x,onChange:w,placeholder:"Search messages...",className:"w-full h-10 pl-9 pr-4 rounded-2xl bg-white dark:bg-white/[0.03] border border-gray-200 dark:border-white/10 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all placeholder:text-gray-400 dark:text-white"})]})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-white/20 [&::-webkit-scrollbar-track]:bg-transparent",children:jsxRuntime.jsx("div",{className:"flex flex-col",children:f.map(v=>{let y=v.user?.name||v.group?.name||"Unknown",k=v.user?.avatar||v.group?.avatar,N=v.user?.status==="online",C=t===v.id;return jsxRuntime.jsx("div",{className:"p-2",children:jsxRuntime.jsxs("div",{onClick:()=>r?.(v.id),className:l("w-full h-16 flex items-center gap-3 p-3 rounded-2xl transition-all text-left group cursor-pointer",C?"bg-blue-500/10 dark:bg-white/[0.06] shadow-[0_0_15px_rgba(59,130,246,0.1)] dark:shadow-[0_0_15px_rgba(255,255,255,0.05)]":"hover:bg-gray-100 dark:hover:bg-white/[0.03]"),children:[jsxRuntime.jsxs("div",{className:"relative flex-shrink-0",children:[jsxRuntime.jsx(F,{src:k,alt:y,fallback:y[0]}),N&&jsxRuntime.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-3.5 h-3.5 bg-green-500 border-2 border-white dark:border-[#0a0a0a] rounded-full"})]}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[jsxRuntime.jsx("span",{className:l("font-semibold truncate",C?"text-blue-600 dark:text-white":"text-gray-900 dark:text-white/90"),children:y}),v.lastMessage&&jsxRuntime.jsx("span",{className:"text-[10px] text-gray-400 dark:text-white/30 whitespace-nowrap",children:new Date(v.lastMessage.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsxRuntime.jsx("p",{className:"text-xs text-gray-500 dark:text-white/40 truncate",children:v.isTyping?jsxRuntime.jsx("span",{className:"text-blue-500 animate-pulse",children:"typing..."}):v.lastMessage?.content||"No messages yet"}),v.unreadCount>0&&jsxRuntime.jsx("span",{className:"flex-shrink-0 min-w-[18px] h-[18px] flex items-center justify-center bg-blue-500 text-white text-[10px] font-bold rounded-full px-1",children:v.unreadCount})]})]}),jsxRuntime.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:T=>T.stopPropagation(),children:jsxRuntime.jsxs(dt,{children:[jsxRuntime.jsx(mt,{className:"p-1 rounded-lg hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400",children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-4 w-4"})}),jsxRuntime.jsxs(ut,{align:"end",children:[jsxRuntime.jsxs(V,{onClick:()=>s?.(v.id),children:[jsxRuntime.jsx(lucideReact.Pin,{className:"h-4 w-4 mr-2"})," Pin"]}),jsxRuntime.jsxs(V,{onClick:()=>n?.(v.id),children:[jsxRuntime.jsx(lucideReact.Archive,{className:"h-4 w-4 mr-2"})," Archive"]}),jsxRuntime.jsxs(V,{onClick:()=>i?.(v.id),children:[jsxRuntime.jsx(lucideReact.BellOff,{className:"h-4 w-4 mr-2"})," Mute"]}),jsxRuntime.jsxs(V,{onClick:()=>c?.(v.id),children:[jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-4 w-4 mr-2"})," Mark as Unread"]}),jsxRuntime.jsxs(V,{className:"text-red-500",onClick:()=>d?.(v.id),children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4 mr-2"})," Delete"]})]})]})})]})},v.id)})})})]})}function CP({user:e,onBack:t,onInfo:r,onAvatarClick:o,onCall:a,onVideoCall:n,onSearch:s,onMute:i,isTyping:d,isMuted:c,actions:m,className:u,...p}){return jsxRuntime.jsxs("div",{className:l("flex h-16 items-center justify-between border-b border-gray-200 dark:border-white/10 bg-white/80 dark:bg-black/40 backdrop-blur px-4 sticky top-0 z-10",u),...p,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx("button",{onClick:t,className:"md:hidden p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.ArrowLeft,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),jsxRuntime.jsxs("div",{className:"relative cursor-pointer",onClick:o||r,children:[jsxRuntime.jsx(F,{src:e.avatar,alt:e.name,fallback:e.name[0]}),e.status==="online"&&jsxRuntime.jsx("span",{className:"absolute bottom-0 right-0 h-3 w-3 rounded-full bg-green-500 border-2 border-white dark:border-black"})]}),jsxRuntime.jsxs("div",{className:"cursor-pointer",onClick:r,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white leading-none",children:e.name}),c&&jsxRuntime.jsx(lucideReact.BellOff,{className:"h-3 w-3 text-gray-400"}),e.tags&&e.tags.length>0&&jsxRuntime.jsxs("div",{className:"flex gap-1",children:[e.tags.slice(0,2).map((g,h)=>jsxRuntime.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded-full bg-primary/10 text-primary border border-primary/20 font-medium",children:g},h)),e.tags.length>2&&jsxRuntime.jsxs("span",{className:"text-[9px] text-gray-400",children:["+",e.tags.length-2]})]})]}),jsxRuntime.jsx("p",{className:l("text-xs mt-1 transition-colors",d?"text-blue-500 font-medium animate-pulse":"text-gray-500 dark:text-white/50"),children:d?"typing...":e.status==="online"?"Online":`Last seen ${e.lastSeen?.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[s&&jsxRuntime.jsx("button",{onClick:s,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5"})}),a&&jsxRuntime.jsx("button",{onClick:a,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Phone,{className:"h-5 w-5"})}),n&&jsxRuntime.jsx("button",{onClick:n,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Video,{className:"h-5 w-5"})}),m,jsxRuntime.jsx("button",{onClick:r,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-5 w-5"})})]})]})}function gi({src:e,duration:t,isMe:r,bars:o=35,className:a,...n}){let[s,i]=Te.useState(false),[d,c]=Te.useState(0),m=Te.useRef(null),u=Te.useMemo(()=>{let w=[],v=e.length;for(let y=0;y<o;y++){let k=(Math.sin(v+y*1.5)+1)/2*80+20;w.push(Math.round(k));}return w},[e,o]),p=()=>{m.current&&(s?m.current.pause():m.current.play(),i(!s));},g=()=>{m.current&&c(m.current.currentTime);},h=()=>{i(false),c(0);},x=w=>{let v=Math.floor(w/60),y=Math.floor(w%60);return `${v}:${y.toString().padStart(2,"0")}`},b=t?d/t:0,f=Math.floor(b*o);return jsxRuntime.jsxs("div",{className:l("flex items-center gap-4 py-2 px-3 rounded-2xl min-w-[280px]",r?"bg-white/10 text-white":"bg-white/[0.03] text-white/90 border border-white/10",a),...n,children:[jsxRuntime.jsx("audio",{ref:m,src:e,onTimeUpdate:g,onEnded:h}),jsxRuntime.jsx("div",{className:"relative shrink-0",children:jsxRuntime.jsx("button",{onClick:p,className:l("w-12 h-12 rounded-full flex items-center justify-center transition-all group active:scale-95",r?"bg-white text-blue-600":"bg-blue-500 text-white shadow-lg shadow-blue-500/20"),children:s?jsxRuntime.jsx(lucideReact.Pause,{className:"h-6 w-6 fill-current"}):jsxRuntime.jsx(lucideReact.Play,{className:"h-6 w-6 fill-current ml-1"})})}),jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col gap-1",children:[jsxRuntime.jsx("div",{className:"flex items-end gap-[2px] h-8 w-full group cursor-pointer",onClick:w=>{if(!m.current||!t)return;let v=w.currentTarget.getBoundingClientRect(),k=(w.clientX-v.left)/v.width*t;m.current.currentTime=k,c(k);},children:u.map((w,v)=>jsxRuntime.jsx("div",{className:l("flex-1 rounded-full transition-all duration-300",v<=f?r?"bg-white":"bg-blue-500":r?"bg-white/30":"bg-white/10"),style:{height:`${w}%`}},v))}),jsxRuntime.jsxs("div",{className:"flex justify-between items-center px-0.5",children:[jsxRuntime.jsx("span",{className:"text-[10px] tabular-nums font-semibold opacity-60",children:x(d)}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 grayscale opacity-40",children:[jsxRuntime.jsx("span",{className:"text-[10px] font-semibold",children:t?x(t):"--:--"}),jsxRuntime.jsx(lucideReact.Smartphone,{size:10})]})]})]})]})}function hi({status:e,className:t,...r}){return e==="sending"?jsxRuntime.jsx("div",{className:l("w-3 h-3 border border-current border-t-transparent rounded-full animate-spin opacity-50",t),...r}):e==="failed"?jsxRuntime.jsx("span",{className:l("text-red-500 text-[10px] font-bold",t),...r,children:"!"}):jsxRuntime.jsxs("div",{className:l("flex items-center",t),...r,children:[e==="sent"&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3 opacity-50"}),e==="delivered"&&jsxRuntime.jsx(lucideReact.CheckCheck,{className:"h-3 w-3 opacity-50"}),e==="read"&&jsxRuntime.jsx(lucideReact.CheckCheck,{className:"h-3 w-3 text-blue-500"})]})}function xi({url:e,title:t,description:r,image:o,siteName:a,className:n,...s}){return jsxRuntime.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:l("block overflow-hidden rounded-xl border border-gray-200 dark:border-white/10 bg-white dark:bg-white/[0.03] hover:bg-gray-50 dark:hover:bg-white/[0.05] transition-all group",n),...s,children:[o&&jsxRuntime.jsx("div",{className:"aspect-video w-full overflow-hidden border-b border-gray-200 dark:border-white/10",children:jsxRuntime.jsx("img",{src:o,alt:t,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})}),jsxRuntime.jsxs("div",{className:"p-3 space-y-1",children:[a&&jsxRuntime.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-blue-500",children:a}),jsxRuntime.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white line-clamp-1",children:t||e}),r&&jsxRuntime.jsx("p",{className:"text-xs text-gray-500 dark:text-white/50 line-clamp-2",children:r}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-gray-400 pt-1",children:[jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3"}),jsxRuntime.jsx("span",{className:"truncate",children:new URL(e).hostname})]})]})]})}function ki({data:e,isOwn:t,onAction:r}){return jsxRuntime.jsxs("div",{className:"space-y-2 max-w-sm",children:[(()=>{if(!e.header)return null;switch(e.header.type){case "text":return jsxRuntime.jsx("h4",{className:"font-bold mb-1 text-sm",children:e.header.text});case "image":return jsxRuntime.jsx("div",{className:"mb-2 rounded-lg overflow-hidden border border-white/10",children:jsxRuntime.jsx("img",{src:e.header.attachment?.url,alt:"Header",className:"w-full h-auto object-cover"})});default:return null}})(),jsxRuntime.jsx("p",{className:"text-sm leading-relaxed",children:e.body}),e.footer&&jsxRuntime.jsx("p",{className:"text-[10px] opacity-50 italic",children:e.footer}),e.type==="button"&&e.buttons&&jsxRuntime.jsx("div",{className:"flex flex-col gap-1 mt-3",children:e.buttons.map(a=>jsxRuntime.jsxs("button",{onClick:()=>r?.(a),className:l("flex items-center justify-center gap-2 p-2.5 rounded-xl text-sm font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10 active:scale-[0.98]",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[a.type==="url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3.5 w-3.5"}),a.type==="call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3.5 w-3.5"}),a.type==="reply"&&jsxRuntime.jsx(lucideReact.Reply,{className:"h-3.5 w-3.5"}),a.text]},a.id))}),e.type==="list"&&e.sections&&jsxRuntime.jsx("div",{className:"mt-3 space-y-3",children:e.sections.map((a,n)=>jsxRuntime.jsxs("div",{className:"space-y-1",children:[a.title&&jsxRuntime.jsx("p",{className:"text-[10px] uppercase tracking-wider opacity-40 font-bold px-1",children:a.title}),jsxRuntime.jsx("div",{className:"flex flex-col gap-1",children:a.rows.map(s=>jsxRuntime.jsxs("button",{onClick:()=>r?.({id:s.id,text:s.title,type:"reply"}),className:"flex flex-col items-start p-3 rounded-xl bg-white/5 hover:bg-white/10 border border-white/5 transition-colors text-left",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:s.title}),s.description&&jsxRuntime.jsx("span",{className:"text-xs opacity-50 line-clamp-1",children:s.description})]},s.id))})]},n))}),e.nativeFlow&&jsxRuntime.jsx("div",{className:"flex flex-col gap-1 mt-3",children:e.nativeFlow.buttons.map((a,n)=>{let s={};try{s=typeof a.buttonParamsJson=="string"?JSON.parse(a.buttonParamsJson):a.buttonParamsJson;}catch{}return jsxRuntime.jsxs("button",{onClick:()=>r?.({id:s.id||a.name,text:s.display_text||a.name,type:"reply",params:s}),className:l("flex items-center justify-center gap-2 p-2.5 rounded-xl text-sm font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10 active:scale-[0.98]",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[a.name==="cta_copy"&&jsxRuntime.jsx(lucideReact.Copy,{className:"h-3.5 w-3.5"}),a.name==="cta_url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3.5 w-3.5"}),a.name==="cta_call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3.5 w-3.5"}),a.name==="single_select"&&jsxRuntime.jsx(lucideReact.Reply,{className:"h-3.5 w-3.5"}),s.display_text||s.title||a.name]},n)})})]})}function Ci({cards:e,isOwn:t,onAction:r}){let o=Te__namespace.default.useRef(null),a=n=>{o.current&&o.current.scrollBy({left:n==="left"?-240:240,behavior:"smooth"});};return jsxRuntime.jsxs("div",{className:"relative group/carousel max-w-[300px] sm:max-w-[400px]",children:[jsxRuntime.jsx("div",{ref:o,className:"flex gap-3 overflow-x-auto scrollbar-hide snap-x snap-mandatory pb-2",children:e.map((n,s)=>jsxRuntime.jsxs("div",{className:"flex-shrink-0 w-[240px] snap-start rounded-2xl bg-white/5 dark:bg-white/[0.03] border border-white/10 overflow-hidden flex flex-col",children:[n.header?.attachment&&jsxRuntime.jsx("div",{className:"aspect-video w-full overflow-hidden",children:jsxRuntime.jsx("img",{src:n.header.attachment.url,alt:"Card",className:"w-full h-full object-cover"})}),jsxRuntime.jsxs("div",{className:"p-3 flex-1 flex flex-col",children:[jsxRuntime.jsx("p",{className:"text-sm leading-relaxed mb-1",children:n.body}),n.footer&&jsxRuntime.jsx("p",{className:"text-[10px] opacity-50 italic mb-3",children:n.footer}),jsxRuntime.jsxs("div",{className:"mt-auto flex flex-col gap-1",children:[n.buttons?.map(i=>jsxRuntime.jsxs("button",{onClick:()=>r?.(i),className:l("flex items-center justify-center gap-2 p-2 rounded-lg text-xs font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[i.type==="url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3"}),i.type==="call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3 w-3"}),i.type==="reply"&&jsxRuntime.jsx(lucideReact.Reply,{className:"h-3 w-3"}),i.text]},i.id)),n.nativeFlow?.buttons.map((i,d)=>{let c={};try{c=typeof i.buttonParamsJson=="string"?JSON.parse(i.buttonParamsJson):i.buttonParamsJson;}catch{}return jsxRuntime.jsxs("button",{onClick:()=>r?.({id:c.id||i.name,text:c.display_text||i.name,type:"reply",params:c}),className:l("flex items-center justify-center gap-2 p-2 rounded-lg text-xs font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[i.name==="cta_copy"&&jsxRuntime.jsx(lucideReact.Copy,{className:"h-3 w-3"}),i.name==="cta_url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3"}),i.name==="cta_call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3 w-3"}),c.display_text||i.name]},d)})]})]})]},s))}),e.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>a("left"),className:"absolute left-[-12px] top-1/2 -translate-y-1/2 p-1.5 rounded-full bg-white dark:bg-gray-800 shadow-lg border border-white/10 opacity-0 group-hover/carousel:opacity-100 transition-opacity z-10",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{onClick:()=>a("right"),className:"absolute right-[-12px] top-1/2 -translate-y-1/2 p-1.5 rounded-full bg-white dark:bg-gray-800 shadow-lg border border-white/10 opacity-0 group-hover/carousel:opacity-100 transition-opacity z-10",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})}function So({message:e,isOwn:t,showAvatar:r,showStatus:o=true,className:a,onReply:n,onReact:s,onDelete:i,onEdit:d,onForward:c,onCopy:m,onPin:u,onStar:p,onSelect:g,onAction:h,onTTS:x,onTranscribe:b,hasAi:f,onImageClick:w,isSelected:v}){let y=()=>!t||!o?null:jsxRuntime.jsx(hi,{status:e.status||"sent",className:"ml-1"}),k=()=>{if(e.type==="revoked")return jsxRuntime.jsxs("p",{className:"text-sm italic opacity-50 flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-3 w-3"})," This message was deleted"]});switch(e.type){case "audio":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(gi,{src:e.attachments?.[0]?.url||"",duration:e.attachments?.[0]?.duration,isMe:t}),(e.transcription||e.isTranscribing||f)&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 pt-2 border-t border-white/5",children:e.isTranscribing?jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-blue-400 animate-pulse font-bold uppercase tracking-wider",children:[jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-3 w-3"}),"Transcrevendo..."]}):e.transcription?jsxRuntime.jsx("div",{className:"bg-black/10 dark:bg-black/40 p-3 rounded-xl text-xs italic opacity-90 leading-relaxed border-l-2 border-primary/50",children:e.transcription}):f&&jsxRuntime.jsxs("button",{onClick:()=>b?.(e),className:"text-[10px] flex items-center gap-1.5 px-2 py-1 rounded-full bg-primary/10 text-primary hover:bg-primary/20 transition-all w-fit font-bold uppercase tracking-wider",children:[jsxRuntime.jsx(lucideReact.Volume2,{className:"h-3 w-3"}),"Transcrever com IA"]})})]});case "location":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"text-sm font-medium",children:e.location?.address||"Shared Location"})]}),jsxRuntime.jsxs("div",{className:"aspect-video rounded-xl bg-gray-200 dark:bg-white/10 flex items-center justify-center overflow-hidden relative group/map",children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"h-8 w-8 opacity-20 group-hover/map:scale-110 transition-transform"}),jsxRuntime.jsx("div",{className:"absolute inset-0 bg-blue-500/5 group-hover/map:bg-blue-500/10 transition-colors"})]})]});case "contact":return jsxRuntime.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-xl bg-black/5 dark:bg-white/10 border border-white/5",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center text-white shadow-lg shadow-blue-500/20",children:jsxRuntime.jsx(lucideReact.User,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-sm font-bold truncate",children:e.contact?.name}),jsxRuntime.jsx("p",{className:"text-xs opacity-60 truncate",children:e.contact?.phone})]})]});case "file":return jsxRuntime.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl bg-black/5 dark:bg-white/10 border border-white/5 hover:bg-black/10 dark:hover:bg-white/20 transition-colors cursor-pointer",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-500/20 flex items-center justify-center text-blue-500",children:jsxRuntime.jsx(lucideReact.FileText,{className:"h-6 w-6"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium truncate",children:e.attachments?.[0]?.name||"File"}),jsxRuntime.jsx("p",{className:"text-[10px] opacity-60 uppercase",children:e.attachments?.[0]?.size||"Unknown size"})]})]});case "sticker":return jsxRuntime.jsx("div",{className:"relative group/sticker",children:jsxRuntime.jsx("img",{src:e.attachments?.[0]?.url,alt:"Sticker",className:"w-32 h-32 object-contain"})});case "image":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"relative rounded-2xl overflow-hidden border border-white/5 group/image cursor-pointer",onClick:()=>w?.(e.attachments?.[0]?.url||""),children:jsxRuntime.jsx(ma,{src:e.attachments?.[0]?.url||"",alt:e.content||"Image",className:"max-h-[300px] w-auto object-contain bg-black/20 transition-transform duration-300 group-hover/image:scale-105"})}),e.content&&jsxRuntime.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words px-1",children:e.content})]});case "video":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"relative rounded-2xl overflow-hidden border border-white/5 bg-black/20 aspect-video flex items-center justify-center group/video",children:jsxRuntime.jsx("video",{src:e.attachments?.[0]?.url,controls:true,className:"max-h-[300px] w-full"})}),e.content&&jsxRuntime.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words px-1",children:e.content})]});case "interactive":return e.interactive?.type==="carousel"&&e.interactive.cards?jsxRuntime.jsx(Ci,{cards:e.interactive.cards,isOwn:t,onAction:h}):e.interactive?jsxRuntime.jsx(ki,{data:e.interactive,isOwn:t,onAction:h}):null;default:let N=/(https?:\/\/[^\s]+)/g,C=e.content.match(N);return jsxRuntime.jsxs("div",{className:"space-y-2",children:[e.replyTo&&jsxRuntime.jsxs("div",{className:"mb-2 p-2 rounded-lg bg-black/5 dark:bg-white/5 border-l-4 border-blue-500 text-xs",children:[jsxRuntime.jsx("p",{className:"font-bold text-blue-500 truncate",children:e.replyTo.senderId===e.senderId?"You":"Other"}),jsxRuntime.jsx("p",{className:"opacity-60 truncate",children:e.replyTo.content})]}),jsxRuntime.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words",children:e.content}),C&&C.map(T=>jsxRuntime.jsx(xi,{url:T},T))]})}};return jsxRuntime.jsxs("div",{className:l("flex w-full mb-4 group/bubble",t?"justify-end":"justify-start",a),children:[!t&&r&&jsxRuntime.jsx("div",{className:"mr-2 mt-auto",children:jsxRuntime.jsx(F,{src:e.contact?.avatar,alt:e.contact?.name||"User",className:"w-8 h-8",fallback:(e.contact?.name||e.senderId||"?").charAt(0).toUpperCase()})}),jsxRuntime.jsxs("div",{className:l("relative max-w-[75%] sm:max-w-[60%] transition-all duration-300",v&&"scale-95 opacity-80"),children:[e.agentName&&jsxRuntime.jsxs("div",{className:l("flex items-center gap-1.5 mb-1 px-2 opacity-50",t?"justify-end":"justify-start"),children:[jsxRuntime.jsx("div",{className:"flex h-4 w-4 items-center justify-center rounded-full bg-white/10",children:jsxRuntime.jsx(lucideReact.User,{size:10,className:"text-blue-400"})}),jsxRuntime.jsxs("span",{className:"text-[10px] font-bold tracking-wider uppercase",children:["Agente: ",e.agentName]})]}),jsxRuntime.jsx(ts,{preset:"spring",children:jsxRuntime.jsxs("div",{className:l("relative p-3 rounded-2xl shadow-sm backdrop-blur-md border",e.isInternalNote?"bg-amber-500/10 border-amber-500/20 text-amber-100 italic":t?"bg-blue-600/90 dark:bg-blue-500/20 text-white border-blue-500/20 rounded-tr-none":"bg-white/80 dark:bg-white/[0.05] text-gray-900 dark:text-white border-white/10 rounded-tl-none","hover:shadow-lg hover:shadow-blue-500/5 transition-shadow"),children:[e.isInternalNote&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5 px-1.5 py-0.5 rounded-md bg-amber-500/20 border border-amber-500/30 w-fit",children:[jsxRuntime.jsx(lucideReact.Lock,{size:10,className:"text-amber-500"}),jsxRuntime.jsx("span",{className:"text-[10px] font-bold text-amber-500 uppercase tracking-widest",children:"Nota Interna"})]}),!t&&e.remoteJid?.endsWith("@g.us")&&e.contact?.name&&jsxRuntime.jsx("p",{className:"text-[11px] font-bold text-blue-500 dark:text-blue-400 mb-1 truncate",children:e.contact.name}),k(),jsxRuntime.jsxs("div",{className:"flex items-center justify-end gap-1 mt-1 opacity-60 text-[10px]",children:[jsxRuntime.jsx("span",{children:new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),y()]}),e.reactions&&Object.keys(e.reactions).length>0&&jsxRuntime.jsx("div",{className:"absolute -bottom-3 right-2 flex -space-x-1",children:Object.entries(e.reactions).map(([N,C])=>jsxRuntime.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-white/10 rounded-full px-1.5 py-0.5 text-xs shadow-sm animate-in zoom-in-50",title:C.join(", "),children:N},N))})]})}),jsxRuntime.jsxs("div",{className:l("absolute top-0 opacity-0 group-hover/bubble:opacity-100 transition-opacity flex items-center gap-1",t?"right-full mr-2":"left-full ml-2"),children:[jsxRuntime.jsxs(dt,{children:[jsxRuntime.jsx(mt,{className:"p-1.5 rounded-full hover:bg-gray-100 dark:hover:bg-white/10 text-gray-400 transition-colors",children:jsxRuntime.jsx(lucideReact.Smile,{className:"h-4 w-4"})}),jsxRuntime.jsx(ut,{side:"top",className:"flex gap-1 p-1",children:["\u{1F44D}","\u2764\uFE0F","\u{1F602}","\u{1F62E}","\u{1F622}","\u{1F64F}"].map(N=>jsxRuntime.jsx("button",{onClick:()=>s?.(N),className:"p-1.5 hover:bg-gray-100 dark:hover:bg-white/10 rounded-lg transition-transform hover:scale-125",children:N},N))})]}),jsxRuntime.jsxs(dt,{children:[jsxRuntime.jsx(mt,{className:"p-1.5 rounded-full hover:bg-gray-100 dark:hover:bg-white/10 text-gray-400 transition-colors",children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-4 w-4"})}),jsxRuntime.jsxs(ut,{align:t?"end":"start",children:[jsxRuntime.jsxs(V,{onClick:n,children:[jsxRuntime.jsx(lucideReact.Reply,{className:"h-4 w-4 mr-2"})," Reply"]}),jsxRuntime.jsxs(V,{onClick:m,children:[jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4 mr-2"})," Copy"]}),jsxRuntime.jsxs(V,{onClick:c,children:[jsxRuntime.jsx(lucideReact.Forward,{className:"h-4 w-4 mr-2"})," Forward"]}),jsxRuntime.jsxs(V,{onClick:u,children:[jsxRuntime.jsx(lucideReact.Pin,{className:"h-4 w-4 mr-2"})," Pin"]}),jsxRuntime.jsxs(V,{onClick:()=>p?.(true),children:[jsxRuntime.jsx(lucideReact.Star,{className:"h-4 w-4 mr-2"})," Star"]}),x&&e.type==="text"&&jsxRuntime.jsxs(V,{onClick:x,children:[jsxRuntime.jsx(lucideReact.Volume2,{className:"h-4 w-4 mr-2"})," Listen (TTS)"]}),t&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(V,{onClick:d,children:[jsxRuntime.jsx(lucideReact.Edit2,{className:"h-4 w-4 mr-2"})," Edit"]}),jsxRuntime.jsxs(V,{className:"text-red-500",onClick:i,children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4 mr-2"})," Delete"]})]})]})]})]})]})]})}function Do({date:e,sticky:t=true,className:r,...o}){let a=typeof e=="string"?e:e.toLocaleDateString("pt-BR",{day:"numeric",month:"long",year:"numeric"});return jsxRuntime.jsx("div",{className:l("flex justify-center my-6 z-20",t&&"sticky top-4",r),...o,children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-4 py-1.5 rounded-full bg-white/[0.05] border border-white/10 backdrop-blur-md shadow-lg",children:[jsxRuntime.jsx(lucideReact.Calendar,{size:12,className:"text-white/40"}),jsxRuntime.jsx("span",{className:"text-[11px] font-bold text-white/60 tracking-wider uppercase",children:a})]})})}function CE({messages:e,currentUserId:t,className:r,onReply:o,onReact:a,onDelete:n,onEdit:s,onForward:i,onCopy:d,onPin:c,onStar:m,onSelect:u,onAction:p,onImageClick:g,onTTS:h,onTranscribe:x,hasAi:b,onLoadMore:f,hasMore:w,isLoadingMore:v,selectedMessages:y=[],dateFormat:k="MMMM d, yyyy",groupByDate:N=true,...C}){let[T,E]=Te.useState(true),B=Te.useRef(null),S=Te.useRef(null),D=Te.useCallback((H="auto")=>{S.current?.scrollIntoView({behavior:H});},[]);Te.useEffect(()=>{T&&D("smooth");},[e.length,T,D]);let K=H=>{let M=H.currentTarget,$=Math.abs(M.scrollHeight-M.clientHeight-M.scrollTop)<100;E($),M.scrollTop===0&&w&&!v&&f&&f();};return e.length===0&&!v?jsxRuntime.jsx("div",{className:l("flex-1 flex items-center justify-center p-8 text-center text-gray-500 dark:text-white/40",r),...C,children:jsxRuntime.jsxs("div",{className:"max-w-sm space-y-4",children:[jsxRuntime.jsx("div",{className:"w-24 h-24 bg-blue-500/10 dark:bg-white/[0.03] rounded-full flex items-center justify-center mx-auto mb-6 animate-pulse",children:jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-12 w-12 text-blue-500"})}),jsxRuntime.jsx("h3",{className:"text-xl font-medium text-gray-900 dark:text-white",children:"No messages yet"}),jsxRuntime.jsx("p",{children:"Start the conversation by sending a message below."})]})}):jsxRuntime.jsxs("div",{className:l("flex-1 relative overflow-hidden",r),...C,children:[jsxRuntime.jsx("div",{ref:B,onScroll:K,className:"h-full overflow-y-auto p-4 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-white/20 [&::-webkit-scrollbar-track]:bg-transparent",children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-4",children:[e.map((H,M)=>{let $=H.senderId===t,ee=M>0?e[M-1]:null,G=new Date(H.timestamp),J=ee?new Date(ee.timestamp):null,fe=N&&(!J||G.toDateString()!==J.toDateString()),rt=!$&&(!ee||ee.senderId!==H.senderId||fe);return jsxRuntime.jsxs(Te__namespace.default.Fragment,{children:[fe&&jsxRuntime.jsx("div",{className:"my-4",children:jsxRuntime.jsx(Do,{date:H.timestamp})}),jsxRuntime.jsx(So,{message:H,isOwn:$,showAvatar:rt,onReply:()=>o?.(H),onReact:Ye=>a?.(H,Ye),onDelete:()=>n?.(H),onEdit:()=>s?.(H),onForward:()=>i?.(H),onCopy:()=>d?.(H),onPin:()=>c?.(H),onStar:Ye=>m?.(H,Ye),onSelect:()=>u?.(H),onAction:Ye=>p?.(H,Ye),onImageClick:g,onTTS:h?()=>h(H):void 0,onTranscribe:x,hasAi:b,isSelected:y.includes(H.id)})]},H.id)}),jsxRuntime.jsx("div",{ref:S})]})}),!T&&jsxRuntime.jsx("button",{onClick:()=>D("smooth"),className:"absolute bottom-6 right-6 p-3 rounded-full bg-white dark:bg-white/10 backdrop-blur border border-gray-200 dark:border-white/10 shadow-lg text-gray-600 dark:text-white hover:scale-110 transition-all z-10",children:jsxRuntime.jsx(lucideReact.ArrowDown,{className:"h-5 w-5"})})]})}function Di(){let[e,t]=Te.useState(false),[r,o]=Te.useState(0),[a,n]=Te.useState(null),[s,i]=Te.useState(null),d=Te.useRef(null),c=Te.useRef(null),m=Te.useRef([]),u=Te.useCallback(async()=>{try{let x=await navigator.mediaDevices.getUserMedia({audio:!0}),b=MediaRecorder.isTypeSupported("audio/ogg; codecs=opus")?"audio/ogg; codecs=opus":"audio/webm";d.current=new MediaRecorder(x,{mimeType:b}),m.current=[],d.current.ondataavailable=f=>{f.data.size>0&&m.current.push(f.data);},d.current.onstop=()=>{let f=new Blob(m.current,{type:b}),w=URL.createObjectURL(f);n(f),i(w),x.getTracks().forEach(v=>v.stop());},d.current.start(),t(!0),o(0),c.current=window.setInterval(()=>{o(f=>f+1);},1e3);}catch(x){throw console.error("Failed to start recording",x),x}},[]),p=Te.useCallback(()=>{d.current&&e&&(d.current.stop(),t(false),c.current&&clearInterval(c.current));},[e]),g=Te.useCallback(()=>{d.current&&e&&(d.current.stop(),t(false),c.current&&clearInterval(c.current),n(null),i(null),o(0));},[e]),h=Te.useCallback(()=>{n(null),i(null),o(0);},[]);return {isRecording:e,duration:r,audioBlob:a,audioUrl:s,startRecording:u,stopRecording:p,cancelRecording:g,clearAudio:h}}function Hi({onSend:e,onCancel:t,className:r,...o}){let{isRecording:a,duration:n,audioBlob:s,startRecording:i,stopRecording:d,cancelRecording:c}=Di();Te.useEffect(()=>(i(),()=>c()),[]);let m=u=>{let p=Math.floor(u/60),g=u%60;return `${p}:${g.toString().padStart(2,"0")}`};return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 p-2 rounded-2xl bg-gray-100 dark:bg-white/[0.03] border border-gray-200 dark:border-white/10 animate-in slide-in-from-bottom-2",r),...o,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-xl bg-red-500/10 text-red-500",children:[jsxRuntime.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500 animate-pulse"}),jsxRuntime.jsx("span",{className:"text-sm font-mono font-bold",children:m(n)})]}),jsxRuntime.jsx("div",{className:"flex-1 h-8 flex items-center gap-0.5 px-2",children:[...Array(20)].map((u,p)=>jsxRuntime.jsx("div",{className:"w-1 bg-red-500/40 rounded-full transition-all duration-150",style:{height:a?`${20+Math.random()*80}%`:"20%",animationDelay:`${p*.05}s`}},p))}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{onClick:()=>{c(),t();},className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-500 transition-colors",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-5 w-5"})}),a?jsxRuntime.jsx(R,{size:"icon",variant:"ghost",onClick:d,className:"rounded-full bg-red-500 text-white hover:bg-red-600",children:jsxRuntime.jsx(lucideReact.Square,{className:"h-4 w-4 fill-current"})}):jsxRuntime.jsx(R,{size:"icon",onClick:()=>s&&e(s,n),className:"rounded-full bg-blue-500 text-white hover:bg-blue-600",children:jsxRuntime.jsx(lucideReact.Send,{className:"h-4 w-4"})})]})]})}function jE({value:e,onValueChange:t,onSend:r,onChange:o,onAttach:a,onMic:n,onVoiceEnd:s,onEmoji:i,onGif:d,onLocation:c,onContact:m,onPoll:u,onPix:p,onCarousel:g,onButtons:h,onList:x,onCancelReply:b,placeholder:f="Type a message...",users:w=[],replyingTo:v,isRecording:y,maxLength:k,disabled:N,className:C,...T}){let[E,B]=Te.useState(""),S=e!==void 0?e:E,D=L=>{t?t(L):B(L);},[K,H]=Te.useState(false),[M,$]=Te.useState(null),[ee,G]=Te.useState(0),J=Te.useRef(null),fe=Te.useMemo(()=>M===null?[]:w.filter(L=>L.name.toLowerCase().includes(M.toLowerCase())).slice(0,5),[w,M]),rt=L=>{if(N)return;let A=L.target.value;if(k&&A.length>k)return;D(A),o?.(A);A[L.target.selectionStart-1];let ot=A.slice(0,L.target.selectionStart).match(/@(\w*)$/);ot?($(ot[1]||""),G(0)):$(null),J.current&&(J.current.style.height="auto",J.current.style.height=`${Math.min(J.current.scrollHeight,120)}px`);},Ye=L=>{if(!J.current)return;let A=J.current.selectionStart,O=S.slice(0,A).replace(/@\w*$/,`@${L.name} `),ne=S.slice(A);D(O+ne),$(null),J.current.focus();},_=L=>{if(!N){if(M!==null&&fe.length>0){L.key==="ArrowDown"?(L.preventDefault(),G(A=>(A+1)%fe.length)):L.key==="ArrowUp"?(L.preventDefault(),G(A=>(A-1+fe.length)%fe.length)):L.key==="Enter"||L.key==="Tab"?(L.preventDefault(),Ye(fe[ee])):L.key==="Escape"&&$(null);return}L.key==="Enter"&&!L.shiftKey&&(L.preventDefault(),Y());}},Y=()=>{N||!S.trim()&&!y||(r?.(S),D(""),J.current&&(J.current.style.height="auto"));};return jsxRuntime.jsxs("div",{className:l("p-4 bg-white/80 dark:bg-black/40 backdrop-blur border-t border-gray-200 dark:border-white/10 relative",C),...T,children:[M!==null&&fe.length>0&&jsxRuntime.jsx("div",{className:"absolute bottom-full left-4 mb-2 w-64 bg-white dark:bg-gray-900 border border-gray-200 dark:border-white/10 rounded-2xl shadow-2xl overflow-hidden animate-in slide-in-from-bottom-4",children:fe.map((L,A)=>jsxRuntime.jsxs("button",{onClick:()=>Ye(L),className:l("w-full flex items-center gap-3 p-3 text-left transition-colors",A===ee?"bg-blue-500/10 dark:bg-white/10":"hover:bg-gray-50 dark:hover:bg-white/5"),children:[jsxRuntime.jsx(F,{src:L.avatar,alt:L.name,className:"w-8 h-8"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-bold dark:text-white",children:L.name}),jsxRuntime.jsxs("p",{className:"text-xs text-gray-500 dark:text-white/40",children:["@",L.name.toLowerCase().replace(/\s/g,"")]})]})]},L.id))}),v&&jsxRuntime.jsxs("div",{className:"mb-3 flex items-center justify-between p-3 rounded-2xl bg-blue-500/5 border-l-4 border-blue-500 animate-in slide-in-from-bottom-2",children:[jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-xs font-bold text-blue-500",children:"Replying to"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-white/60 truncate",children:v.content})]}),jsxRuntime.jsx("button",{onClick:b,className:"p-1.5 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs("div",{className:"flex items-end gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[jsxRuntime.jsxs(dt,{children:[jsxRuntime.jsx(mt,{disabled:N,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-5 w-5"})}),jsxRuntime.jsxs(ut,{align:"start",side:"top",children:[jsxRuntime.jsxs(V,{onClick:a,children:[jsxRuntime.jsx(lucideReact.Image,{className:"h-4 w-4 mr-2"})," Image & Video"]}),jsxRuntime.jsxs(V,{onClick:a,children:[jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-4 w-4 mr-2"})," Document"]}),jsxRuntime.jsxs(V,{onClick:c,children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"h-4 w-4 mr-2"})," Location"]}),jsxRuntime.jsxs(V,{onClick:m,children:[jsxRuntime.jsx(lucideReact.AtSign,{className:"h-4 w-4 mr-2"})," Contact"]}),jsxRuntime.jsxs(V,{onClick:u,children:[jsxRuntime.jsx(lucideReact.AtSign,{className:"h-4 w-4 mr-2"})," Poll"]}),jsxRuntime.jsxs(V,{onClick:p,children:[jsxRuntime.jsx(lucideReact.AtSign,{className:"h-4 w-4 mr-2"})," PIX"]}),jsxRuntime.jsxs(V,{onClick:g,children:[jsxRuntime.jsx(lucideReact.Layout,{className:"h-4 w-4 mr-2"})," Carousel"]}),jsxRuntime.jsxs(V,{onClick:h,children:[jsxRuntime.jsx(lucideReact.Layout,{className:"h-4 w-4 mr-2"})," Buttons"]}),jsxRuntime.jsxs(V,{onClick:x,children:[jsxRuntime.jsx(lucideReact.List,{className:"h-4 w-4 mr-2"})," List Menu"]}),jsxRuntime.jsxs(V,{onClick:d,children:[jsxRuntime.jsx(lucideReact.Gift,{className:"h-4 w-4 mr-2"})," GIF"]})]})]}),jsxRuntime.jsx("button",{onClick:i,disabled:N,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.Smile,{className:"h-5 w-5"})})]}),jsxRuntime.jsx("div",{className:"flex-1 relative",children:y?jsxRuntime.jsx(Hi,{onSend:(L,A)=>s?.(L,A),onCancel:()=>b?.()}):jsxRuntime.jsx("textarea",{ref:J,value:S,onChange:rt,onKeyDown:_,placeholder:f,disabled:N,rows:1,className:"w-full p-2.5 max-h-[120px] rounded-2xl bg-gray-100 dark:bg-white/[0.03] border border-transparent focus:border-blue-500/50 focus:bg-white dark:focus:bg-white/[0.06] text-sm resize-none transition-all outline-none dark:text-white placeholder:text-gray-400"})}),jsxRuntime.jsx("div",{className:"flex items-center gap-1 mb-1",children:S.trim()||y?jsxRuntime.jsx("button",{onClick:Y,disabled:N,className:"p-2.5 rounded-full bg-blue-500 text-white hover:bg-blue-600 shadow-lg shadow-blue-500/20 transition-all active:scale-90",children:jsxRuntime.jsx(lucideReact.Send,{className:"h-5 w-5"})}):jsxRuntime.jsx("button",{onClick:n,disabled:N,className:"p-2.5 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.Mic,{className:"h-5 w-5"})})})]})]})}function nS({user:e,onClose:t,className:r,...o}){return jsxRuntime.jsxs("div",{className:l("w-80 border-l border-gray-200 dark:border-white/10 bg-white dark:bg-black/20 flex flex-col",r),...o,children:[jsxRuntime.jsxs("div",{className:"h-16 flex items-center px-4 border-b border-gray-200 dark:border-white/10",children:[jsxRuntime.jsx("button",{onClick:t,className:"p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5 text-gray-500"})}),jsxRuntime.jsx("span",{className:"ml-2 font-semibold text-gray-900 dark:text-white",children:"Contact Info"})]}),jsxRuntime.jsxs(pt,{className:"flex-1",children:[jsxRuntime.jsxs("div",{className:"p-6 flex flex-col items-center text-center",children:[jsxRuntime.jsx(F,{src:e.avatar,alt:e.name,fallback:e.name[0],className:"h-24 w-24 mb-4 text-2xl"}),jsxRuntime.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:e.name}),jsxRuntime.jsx("p",{className:"text-sm text-gray-500 dark:text-white/50 mt-1",children:e.phone||"+1 (555) 000-0000"}),jsxRuntime.jsxs("div",{className:"mt-6 w-full",children:[jsxRuntime.jsx("p",{className:"text-sm text-gray-500 dark:text-white/50 mb-1 text-left",children:"About"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-900 dark:text-white text-left",children:e.bio||"Hey there! I am using Pixon Chat."})]})]}),jsxRuntime.jsx($r,{}),jsxRuntime.jsxs("div",{className:"p-4 space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-xs font-semibold text-gray-500 dark:text-white/40 uppercase tracking-wider",children:"Media & Docs"}),jsxRuntime.jsx("div",{className:"grid grid-cols-3 gap-2",children:[1,2,3,4,5,6].map(a=>jsxRuntime.jsxs("div",{className:"aspect-square rounded-2xl bg-gray-100 dark:bg-white/[0.03] overflow-hidden relative group cursor-pointer",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-gray-400",children:jsxRuntime.jsx(lucideReact.Image,{className:"h-6 w-6"})}),jsxRuntime.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity"})]},a))})]}),jsxRuntime.jsx($r,{}),jsxRuntime.jsx("div",{className:"p-4 space-y-4",children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 text-gray-700 dark:text-white/80",children:[jsxRuntime.jsx(lucideReact.Bell,{className:"h-5 w-5"}),jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"Mute Notifications"})]}),jsxRuntime.jsx(Xo,{})]})}),jsxRuntime.jsx($r,{}),jsxRuntime.jsxs("div",{className:"p-4 space-y-2",children:[jsxRuntime.jsxs("button",{className:"w-full flex items-center gap-3 p-3 rounded-2xl hover:bg-red-50 dark:hover:bg-red-500/10 text-red-600 dark:text-red-400 transition-colors text-sm font-medium",children:[jsxRuntime.jsx(lucideReact.Ban,{className:"h-5 w-5"}),"Block ",e.name]}),jsxRuntime.jsxs("button",{className:"w-full flex items-center gap-3 p-3 rounded-2xl hover:bg-red-50 dark:hover:bg-red-500/10 text-red-600 dark:text-red-400 transition-colors text-sm font-medium",children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-5 w-5"}),"Delete Chat"]})]})]})]})}function cS({users:e=[],variant:t="default",className:r,...o}){let a=e.length===0?"Someone is typing":e.length===1?`${e[0]} is typing`:e.length===2?`${e[0]} and ${e[1]} are typing`:`${e[0]} and ${e.length-1} others are typing`;return t==="bubble"?jsxRuntime.jsx("div",{className:l("flex items-center gap-1 px-3 py-2 rounded-2xl bg-gray-100 dark:bg-white/[0.03] w-fit",r),...o,children:jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce [animation-delay:-0.3s]"}),jsxRuntime.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce [animation-delay:-0.15s]"}),jsxRuntime.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce"})]})}):jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 text-xs text-gray-500 dark:text-white/40 italic",r),...o,children:[jsxRuntime.jsxs("div",{className:"flex gap-0.5",children:[jsxRuntime.jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.3s]"}),jsxRuntime.jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.15s]"}),jsxRuntime.jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce"})]}),a]})}function fS({message:e,onCancel:t,className:r,...o}){return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 p-2 rounded-xl bg-blue-500/5 border-l-4 border-blue-500 animate-in slide-in-from-bottom-2",r),...o,children:[jsxRuntime.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/10 text-blue-500",children:jsxRuntime.jsx(lucideReact.Reply,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-xs font-bold text-blue-500",children:"Replying to"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-white/60 truncate",children:e.content})]}),t&&jsxRuntime.jsx("button",{onClick:t,className:"p-1 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400 transition-colors",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})}function vS({type:e="info",message:t,action:r,onClose:o,className:a,...n}){let s={info:lucideReact.Info,warning:lucideReact.AlertCircle,error:lucideReact.AlertCircle,success:lucideReact.CheckCircle2},i={info:"bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20",warning:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20",error:"bg-red-500/10 text-red-600 dark:text-red-400 border-red-500/20",success:"bg-green-500/10 text-green-600 dark:text-green-400 border-green-500/20"},d=s[e];return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 px-4 py-2 border-b text-sm animate-in slide-in-from-top duration-300",i[e],a),...n,children:[jsxRuntime.jsx(d,{className:"h-4 w-4 shrink-0"}),jsxRuntime.jsx("p",{className:"flex-1 font-medium",children:t}),r&&jsxRuntime.jsx("button",{onClick:r.onClick,className:"text-xs font-bold uppercase tracking-wider hover:underline",children:r.label}),o&&jsxRuntime.jsx("button",{onClick:o,className:"p-1 rounded-full hover:bg-black/5 dark:hover:bg-white/5 transition-colors",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})}function RS({src:e,duration:t,isMe:r,className:o,...a}){let[n,s]=Te.useState(false),[i,d]=Te.useState(0),[c,m]=Te.useState(false),u=Te.useRef(null),p=()=>{u.current&&(n?u.current.pause():u.current.play(),s(!n));},g=()=>{u.current&&d(u.current.currentTime);},h=()=>{s(false),d(0);},x=f=>{let w=Math.floor(f/60),v=Math.floor(f%60);return `${w}:${v.toString().padStart(2,"0")}`},b=t?i/t*100:0;return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 p-2 rounded-2xl min-w-[200px]",r?"bg-white/10":"bg-gray-100 dark:bg-white/[0.03]",o),...a,children:[jsxRuntime.jsx("audio",{ref:u,src:e,onTimeUpdate:g,onEnded:h}),jsxRuntime.jsx("button",{onClick:p,className:l("w-10 h-10 rounded-full flex items-center justify-center transition-all",r?"bg-white text-blue-600":"bg-blue-500 text-white"),children:n?jsxRuntime.jsx(lucideReact.Pause,{className:"h-5 w-5 fill-current"}):jsxRuntime.jsx(lucideReact.Play,{className:"h-5 w-5 fill-current ml-0.5"})}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[jsxRuntime.jsx("div",{className:"h-1.5 w-full bg-gray-300 dark:bg-white/10 rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:l("h-full transition-all duration-100",r?"bg-white":"bg-blue-500"),style:{width:`${b}%`}})}),jsxRuntime.jsxs("div",{className:"flex justify-between text-[10px] font-medium opacity-60",children:[jsxRuntime.jsx("span",{children:x(i)}),jsxRuntime.jsx("span",{children:t?x(t):"--:--"})]})]}),jsxRuntime.jsx("button",{onClick:()=>m(!c),className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/5 opacity-60",children:c?jsxRuntime.jsx(lucideReact.VolumeX,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Volume2,{className:"h-4 w-4"})})]})}function DS({date:e,className:t,...r}){return jsxRuntime.jsx("div",{className:l("flex justify-center sticky top-0 z-10 py-4",t),...r,children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 rounded-full bg-gray-100/80 dark:bg-white/5 backdrop-blur text-[10px] font-bold uppercase tracking-wider text-gray-500 dark:text-white/40 border border-gray-200 dark:border-white/10 shadow-sm",children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-3 w-3"}),e]})})}function BS({status:e="offline",size:t="md",className:r,...o}){let a={online:"bg-green-500",offline:"bg-gray-400",away:"bg-amber-500",busy:"bg-red-500"},n={sm:"h-2 w-2",md:"h-3 w-3",lg:"h-4 w-4"};return jsxRuntime.jsx("span",{className:l("rounded-full border-2 border-white dark:border-black shrink-0",a[e],n[t],e==="online"&&"animate-pulse",r),...o})}function KS({content:e,className:t,...r}){return jsxRuntime.jsx("div",{className:l("flex justify-center py-2",t),...r,children:jsxRuntime.jsx("div",{className:"px-4 py-1 rounded-lg bg-gray-100/50 dark:bg-white/[0.02] text-[11px] font-medium text-gray-500 dark:text-white/30 border border-gray-200/50 dark:border-white/5",children:e})})}function XS({group:e,onBack:t,onInfo:r,isTyping:o,typingUsers:a=[],className:n,...s}){let i=a.length>0?`${a.join(", ")} ${a.length===1?"is":"are"} typing...`:"typing...";return jsxRuntime.jsxs("div",{className:l("flex h-16 items-center justify-between border-b border-gray-200 dark:border-white/10 bg-white/80 dark:bg-black/40 backdrop-blur px-4 sticky top-0 z-10",n),...s,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx("button",{onClick:t,className:"md:hidden p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.ArrowLeft,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),jsxRuntime.jsx("div",{className:"relative cursor-pointer",onClick:r,children:jsxRuntime.jsxs("div",{className:"flex -space-x-3",children:[e.members.slice(0,2).map((d,c)=>jsxRuntime.jsx(F,{src:d.avatar,alt:d.name,fallback:d.name[0],className:l("border-2 border-white dark:border-black",c===0?"z-10":"z-0")},d.id)),e.members.length>2&&jsxRuntime.jsxs("div",{className:"w-10 h-10 rounded-full bg-gray-200 dark:bg-white/10 border-2 border-white dark:border-black flex items-center justify-center text-[10px] font-bold text-gray-600 dark:text-white/60 z-0",children:["+",e.members.length-2]})]})}),jsxRuntime.jsxs("div",{className:"cursor-pointer min-w-0",onClick:r,children:[jsxRuntime.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white leading-none truncate",children:e.name}),jsxRuntime.jsx("p",{className:l("text-xs mt-1 truncate transition-colors",o?"text-blue-500 font-medium animate-pulse":"text-gray-500 dark:text-white/50"),children:o?i:`${e.members.length} members`})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Phone,{className:"h-5 w-5"})}),jsxRuntime.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Video,{className:"h-5 w-5"})}),jsxRuntime.jsx("button",{onClick:r,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-5 w-5"})})]})]})}function ZS({users:e,selectedIndex:t,onSelect:r,className:o,...a}){return e.length===0?null:jsxRuntime.jsx(ce,{className:l("w-64 overflow-hidden shadow-xl animate-in fade-in slide-in-from-bottom-2",o),...a,children:jsxRuntime.jsxs("div",{className:"p-1",children:[jsxRuntime.jsx("div",{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-wider text-gray-400 border-b border-gray-200 dark:border-white/5 mb-1",children:"Mention someone"}),e.map((n,s)=>jsxRuntime.jsxs("button",{onClick:()=>r(n),className:l("w-full flex items-center gap-2 p-2 rounded-xl text-left transition-colors",s===t?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-white/[0.06]"),children:[jsxRuntime.jsx(F,{src:n.avatar,alt:n.name,fallback:n.name[0],size:"sm"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium truncate",children:n.name}),n.status&&jsxRuntime.jsx("p",{className:l("text-[10px]",s===t?"text-white/70":"text-gray-500"),children:n.status})]})]},n.id))]})})}var ob=[{name:"Smileys",emojis:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F602}","\u{1F923}","\u{1F60A}","\u{1F607}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60C}","\u{1F60D}","\u{1F970}","\u{1F618}","\u{1F617}","\u{1F619}","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61D}","\u{1F61C}","\u{1F92A}","\u{1F928}","\u{1F9D0}","\u{1F913}","\u{1F60E}","\u{1F929}","\u{1F973}","\u{1F60F}","\u{1F612}","\u{1F61E}","\u{1F614}","\u{1F61F}","\u{1F615}","\u{1F641}","\u2639\uFE0F","\u{1F623}","\u{1F616}","\u{1F62B}","\u{1F629}","\u{1F97A}","\u{1F622}","\u{1F62D}","\u{1F624}","\u{1F620}","\u{1F621}","\u{1F92C}","\u{1F92F}","\u{1F633}","\u{1F975}","\u{1F976}","\u{1F631}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F613}","\u{1F917}","\u{1F914}","\u{1F92D}","\u{1F92B}","\u{1F925}","\u{1F636}","\u{1F610}","\u{1F611}","\u{1F62C}","\u{1F644}","\u{1F62F}","\u{1F626}","\u{1F627}","\u{1F62E}","\u{1F632}","\u{1F971}","\u{1F634}","\u{1F924}","\u{1F62A}","\u{1F635}","\u{1F910}","\u{1F974}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F637}","\u{1F912}","\u{1F915}"]},{name:"Hearts",emojis:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}"]},{name:"Gestures",emojis:["\u{1F44D}","\u{1F44E}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9B5}","\u{1F9BF}","\u{1F9B6}","\u{1F463}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}"]},{name:"Activities",emojis:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}"]},{name:"Nature",emojis:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F43B}\u200D\u2744\uFE0F","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1F99F}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}","\u{1F9AC}","\u{1F403}","\u{1F402}","\u{1F404}","\u{1F40E}","\u{1F416}","\u{1F40F}","\u{1F411}","\u{1F410}","\u{1F98C}","\u{1F415}","\u{1F429}","\u{1F9AE}","\u{1F415}\u200D\u{1F9BA}","\u{1F408}","\u{1F408}\u200D\u2B1B","\u{1F413}","\u{1F983}","\u{1F99A}","\u{1F99C}","\u{1F9A2}","\u{1F9A9}","\u{1F54A}\uFE0F","\u{1F407}","\u{1F99D}","\u{1F9A8}","\u{1F9A1}","\u{1F9AB}","\u{1F9A6}","\u{1F9A5}","\u{1F401}","\u{1F400}","\u{1F43F}\uFE0F","\u{1F994}","\u{1F43E}","\u{1F409}","\u{1F432}","\u{1F335}","\u{1F384}","\u{1F332}","\u{1F333}","\u{1F334}","\u{1FAB5}","\u{1F331}","\u{1F33F}","\u2618\uFE0F","\u{1F340}","\u{1F38D}","\u{1FAB4}","\u{1F38B}","\u{1F343}","\u{1F342}","\u{1F341}","\u{1F344}","\u{1F41A}","\u{1FAA8}","\u{1F33E}","\u{1F490}","\u{1F337}","\u{1F339}","\u{1F940}","\u{1F33A}","\u{1F338}","\u{1F33C}","\u{1F33B}","\u{1F31E}","\u{1F31D}","\u{1F31B}","\u{1F31C}","\u{1F31A}","\u{1F315}","\u{1F316}","\u{1F317}","\u{1F318}","\u{1F311}","\u{1F312}","\u{1F313}","\u{1F314}","\u{1F319}","\u{1F30E}","\u{1F30D}","\u{1F30F}","\u{1FA90}","\u{1F4AB}","\u2B50\uFE0F","\u{1F31F}","\u2728","\u26A1\uFE0F","\u2604\uFE0F","\u{1F4A5}","\u{1F525}","\u{1F32A}\uFE0F","\u{1F308}","\u2600\uFE0F","\u{1F324}\uFE0F","\u26C5\uFE0F","\u{1F325}\uFE0F","\u2601\uFE0F","\u{1F326}\uFE0F","\u{1F327}\uFE0F","\u26C8\uFE0F","\u{1F329}\uFE0F","\u{1F328}\uFE0F","\u2744\uFE0F","\u2603\uFE0F","\u26C4\uFE0F","\u{1F32C}\uFE0F","\u{1F4A8}","\u{1F4A7}","\u{1F4A6}","\u2614\uFE0F","\u2602\uFE0F","\u{1F30A}","\u{1F32B}\uFE0F"]}];function iD({onSelect:e,className:t,...r}){let[o,a]=Te.useState(""),n=ob.map(s=>({...s,emojis:s.emojis.filter(i=>o===""||i.includes(o))})).filter(s=>s.emojis.length>0);return jsxRuntime.jsxs(ce,{className:l("w-72 h-96 flex flex-col overflow-hidden shadow-2xl",t),...r,children:[jsxRuntime.jsx("div",{className:"p-3 border-b border-gray-200 dark:border-white/10",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),jsxRuntime.jsx("input",{type:"text",value:o,onChange:s=>a(s.target.value),placeholder:"Search emoji...",className:"w-full h-8 pl-8 pr-3 rounded-lg bg-gray-100 dark:bg-white/5 text-xs focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all"})]})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto p-2 custom-scrollbar",children:n.map(s=>jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("h4",{className:"text-[10px] font-bold uppercase tracking-wider text-gray-400 px-2 mb-2",children:s.name}),jsxRuntime.jsx("div",{className:"grid grid-cols-8 gap-1",children:s.emojis.map(i=>jsxRuntime.jsx("button",{onClick:()=>e(i),className:"h-8 w-8 flex items-center justify-center rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-lg transition-colors",children:i},i))})]},s.name))})]})}function bD({onSearch:e,results:t,onResultClick:r,onClose:o,className:a,...n}){let[s,i]=Te.useState(""),d=c=>{let m=c.target.value;i(m),e(m);};return jsxRuntime.jsxs("div",{className:l("flex flex-col h-full bg-white dark:bg-gray-900 border-l border-gray-200 dark:border-white/10 animate-in slide-in-from-right duration-300",a),...n,children:[jsxRuntime.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-white/10 flex items-center justify-between",children:[jsxRuntime.jsx("h3",{className:"font-bold text-gray-900 dark:text-white",children:"Search Messages"}),jsxRuntime.jsx("button",{onClick:o,className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-white/10",children:jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5 text-gray-500"})})]}),jsxRuntime.jsx("div",{className:"p-4",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),jsxRuntime.jsx("input",{type:"text",value:s,onChange:d,placeholder:"Search in conversation...",className:"w-full h-10 pl-10 pr-4 rounded-xl bg-gray-100 dark:bg-white/5 border-none text-sm focus:ring-2 focus:ring-blue-500/50 transition-all",autoFocus:true})]})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:s&&t.length===0?jsxRuntime.jsx("div",{className:"p-8 text-center text-gray-500 dark:text-white/30",children:jsxRuntime.jsxs("p",{className:"text-sm",children:['No messages found for "',s,'"']})}):jsxRuntime.jsx("div",{className:"space-y-1",children:t.map(c=>jsxRuntime.jsxs("button",{onClick:()=>r(c),className:"w-full p-3 rounded-xl hover:bg-gray-100 dark:hover:bg-white/5 text-left transition-all group",children:[jsxRuntime.jsxs("div",{className:"flex justify-between mb-1",children:[jsxRuntime.jsx("span",{className:"text-[10px] font-bold text-blue-500 uppercase",children:c.timestamp.toLocaleDateString()}),jsxRuntime.jsx("span",{className:"text-[10px] text-gray-400",children:c.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),jsxRuntime.jsx("p",{className:"text-sm text-gray-700 dark:text-white/70 line-clamp-2 group-hover:text-gray-900 dark:group-hover:text-white",children:c.content})]},c.id))})})]})}function an(e){let[t,r]=Te.useState(false),[o,a]=Te.useState({x:0,y:0}),n=Te.useRef({x:0,y:0}),s=Te.useRef({x:0,y:0}),i=Te.useRef(Date.now()),d=Te.useRef({x:0,y:0}),c=Te.useCallback((p,g)=>{r(true),n.current={x:p-o.x,y:g-o.y},s.current={x:p,y:g},i.current=Date.now();},[o]),m=Te.useCallback((p,g)=>{if(!t)return;let h=p-n.current.x,x=g-n.current.y,b=Date.now(),f=b-i.current;f>0&&(d.current={x:(p-s.current.x)/f,y:(g-s.current.y)/f}),a({x:h,y:x}),s.current={x:p,y:g},i.current=b,e?.({isDragging:true,offset:{x:h,y:x},velocity:d.current});},[t,e]),u=Te.useCallback(()=>{r(false),e?.({isDragging:false,offset:o,velocity:d.current});},[o,e]);return Te.useEffect(()=>{let p=b=>m(b.clientX,b.clientY),g=b=>{b.touches[0]&&m(b.touches[0].clientX,b.touches[0].clientY);},h=()=>u(),x=()=>u();return t&&(window.addEventListener("mousemove",p),window.addEventListener("mouseup",h),window.addEventListener("touchmove",g),window.addEventListener("touchend",x)),()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",h),window.removeEventListener("touchmove",g),window.removeEventListener("touchend",x);}},[t,m,u]),{isDragging:t,offset:o,dragProps:{onMouseDown:p=>c(p.clientX,p.clientY),onTouchStart:p=>{p.touches[0]&&c(p.touches[0].clientX,p.touches[0].clientY);},style:{cursor:t?"grabbing":"grab",touchAction:"none"}}}}function PD({isOpen:e,onClose:t,url:r,type:o="image",fileName:a,caption:n}){let[s,i]=Te.useState(1),[d,c]=Te.useState(0),m=an();Te.useEffect(()=>(e?document.body.style.overflow="hidden":(document.body.style.overflow="auto",i(1),c(0),m.offset.x=0,m.offset.y=0),()=>{document.body.style.overflow="auto";}),[e]);let u=()=>i(h=>Math.min(h+.5,3)),p=()=>i(h=>Math.max(h-.5,.5)),g=()=>c(h=>(h+90)%360);return e?jsxRuntime.jsx(Lo,{present:e,exitDuration:300,children:jsxRuntime.jsxs(Mt,{preset:"fade",className:"fixed inset-0 z-[9999] flex flex-col bg-black/95 backdrop-blur-2xl overflow-hidden",onKeyDown:h=>h.key==="Escape"&&t(),tabIndex:0,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-4 bg-gradient-to-b from-black/50 to-transparent shrink-0",children:[jsxRuntime.jsx("div",{className:"flex items-center gap-3",children:jsxRuntime.jsxs("div",{className:"text-white",children:[jsxRuntime.jsx("p",{className:"text-sm font-bold truncate max-w-[200px]",children:a||"Arquivo de M\xEDdia"}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/50",children:"WhatsApp Media Viewer"})]})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("button",{onClick:p,className:"p-2.5 rounded-full hover:bg-white/10 text-white transition-all",children:jsxRuntime.jsx(lucideReact.ZoomOut,{size:20})}),jsxRuntime.jsx("button",{onClick:u,className:"p-2.5 rounded-full hover:bg-white/10 text-white transition-all",children:jsxRuntime.jsx(lucideReact.ZoomIn,{size:20})}),jsxRuntime.jsx("button",{onClick:g,className:"p-2.5 rounded-full hover:bg-white/10 text-white transition-all",children:jsxRuntime.jsx(lucideReact.RotateCw,{size:20})}),jsxRuntime.jsx("div",{className:"w-px h-6 bg-white/10 mx-1"}),jsxRuntime.jsx("button",{onClick:t,className:"p-2.5 rounded-full bg-white/10 hover:bg-rose-500 text-white transition-all shadow-xl",children:jsxRuntime.jsx(lucideReact.X,{size:20})})]})]}),jsxRuntime.jsx("div",{className:"flex-1 relative flex items-center justify-center p-4 sm:p-12 overflow-hidden",children:jsxRuntime.jsx("div",{...m.dragProps,className:"relative max-w-full max-h-full",style:{...m.dragProps.style,transform:`translate3d(${m.offset.x}px, ${m.offset.y}px, 0) scale(${s}) rotate(${d}deg)`,transition:m.isDragging?"none":"transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1)"},children:o==="image"?jsxRuntime.jsx("img",{src:r,alt:n||"Media",className:"max-w-full max-h-[80vh] object-contain rounded-lg shadow-[0_0_100px_rgba(0,0,0,0.5)] select-none pointer-events-none"}):jsxRuntime.jsx("video",{src:r,controls:true,autoPlay:true,className:"max-w-full max-h-[80vh] rounded-lg shadow-2xl"})})}),n&&jsxRuntime.jsx("div",{className:"p-8 text-center bg-gradient-to-t from-black/50 to-transparent",children:jsxRuntime.jsx("p",{className:"text-white text-base font-medium max-w-2xl mx-auto drop-shadow-md",children:n})})]})}):null}function _i({itemCount:e,itemHeight:t,overscan:r=5,initialScrollTop:o=0,startAtBottom:a=false}){let[n,s]=Te.useState(o),[i,d]=Te.useState(0),c=Te.useRef(null),m=Te.useRef(false),u=Te.useCallback(f=>typeof t=="function"?t(f):t,[t]);Te.useLayoutEffect(()=>{if(c.current){let f=new ResizeObserver(w=>{for(let v of w)d(v.contentRect.height);});return f.observe(c.current),o>0&&(c.current.scrollTop=o),()=>f.disconnect()}},[o]);let p=Te.useCallback(f=>{s(f.currentTarget.scrollTop);},[]),{visibleItems:g,totalHeight:h,startIndex:x}=Te.useMemo(()=>{let f=0,w=[];for(let T=0;T<e;T++)w.push(f),f+=u(T);let v=0,k=0,N=e-1;for(;k<=N;){let T=Math.floor((k+N)/2),E=w[T];E!==void 0&&E<=n?(v=T,k=T+1):N=T-1;}v=Math.max(0,v-r);let C=[];for(let T=v;T<e;T++){let E=w[T];if(E===void 0||E>n+i+r*u(T))break;C.push({index:T,offsetTop:E,height:u(T)});}return {visibleItems:C,totalHeight:f,startIndex:v}},[n,i,e,u,r]);Te.useLayoutEffect(()=>{if(a&&!m.current&&h>0&&c.current&&i>0){let f=c.current,w=h-i;w>0&&(f.scrollTop=w,s(w)),m.current=true;}},[h,i,a]);let b=Te.useCallback((f,w="auto")=>{if(c.current){let v=0;for(let y=0;y<f;y++)v+=u(y);c.current.scrollTo({top:v,behavior:w});}},[u]);return {containerRef:c,visibleItems:g,totalHeight:h,startIndex:x,onScroll:p,scrollToIndex:b,scrollToBottom:(f="auto")=>{c.current&&c.current.scrollTo({top:c.current.scrollHeight,behavior:f});}}}function OD({messages:e,currentUserId:t,onReply:r,onImageClick:o,className:a,itemHeight:n=80}){let{containerRef:s,visibleItems:i,totalHeight:d,onScroll:c}=_i({itemCount:e.length,itemHeight:n,startAtBottom:true,overscan:10});return jsxRuntime.jsx("div",{ref:s,onScroll:c,className:l("flex-1 overflow-y-auto relative no-scrollbar",a),children:jsxRuntime.jsx("div",{className:"w-full relative",style:{height:`${d}px`},children:i.map(({index:m,offsetTop:u,height:p})=>{let g=e[m];if(!g)return null;let h=m>0?e[m-1]:null,x=!h||new Date(h.timestamp).toDateString()!==new Date(g.timestamp).toDateString();return jsxRuntime.jsxs("div",{className:"absolute left-0 w-full px-4",style:{top:`${u}px`,height:`${p}px`},children:[x&&jsxRuntime.jsx(Do,{date:g.timestamp,sticky:false}),jsxRuntime.jsx(So,{message:g,isOwn:g.senderId===t,onReply:()=>r?.(g),onImageClick:o})]},g.id)})})})}var sn=class{constructor(){this.state={conversations:new Map,messages:new Map,activeChatId:null,presence:new Map};this.listeners=new Set;this.getState=()=>this.state;this.subscribe=t=>(this.listeners.add(t),()=>this.listeners.delete(t));}emitChange(t){this.state=t;for(let r of this.listeners)r();}setConversations(t){this.emitChange({...this.state,conversations:new Map(t.map(r=>[r.id,r]))});}upsertConversation(t){let r=new Map(this.state.conversations),o=r.get(t.id);r.set(t.id,{...o||{unreadCount:0},...t}),this.emitChange({...this.state,conversations:r});}setMessages(t,r){let o=new Map(this.state.messages);o.set(t,r),this.emitChange({...this.state,messages:o});}addMessage(t,r){let o=this.state.messages.get(t)||[];if(o.some(i=>i.id===r.id))return;let a=new Map(this.state.messages);a.set(t,[...o,r]);let n={...this.state,messages:a},s=this.state.conversations.get(t);if(s){let i=new Map(this.state.conversations);i.set(t,{...s,lastMessage:r,unreadCount:this.state.activeChatId===t?0:(s.unreadCount||0)+1}),n.conversations=i;}this.emitChange(n);}updateMessageStatus(t,r,o){let a=this.state.messages.get(t);if(!a)return;let n=a.findIndex(s=>s.id===r);if(n!==-1){let s=[...a],i=s[n];if(i){s[n]={...i,status:o};let d=new Map(this.state.messages);d.set(t,s),this.emitChange({...this.state,messages:d});}}}updateMessage(t,r,o){let a=this.state.messages.get(t);if(!a)return;let n=a.findIndex(s=>s.id===r);if(n!==-1){let s=[...a];s[n]={...s[n],...o};let i=new Map(this.state.messages);i.set(t,s),this.emitChange({...this.state,messages:i});}}addReaction(t,r,o,a){let n=this.state.messages.get(t);if(!n)return;let s=n.findIndex(i=>i.id===r);if(s!==-1){let i=[...n],d={...i[s]},c={...d.reactions||{}},m=[...c[o]||[]];if(!m.includes(a)){m.push(a),c[o]=m,d.reactions=c,i[s]=d;let u=new Map(this.state.messages);u.set(t,i),this.emitChange({...this.state,messages:u});}}}removeReaction(t,r,o,a){let n=this.state.messages.get(t);if(!n)return;let s=n.findIndex(i=>i.id===r);if(s!==-1){let i=[...n],d={...i[s]},c={...d.reactions||{}};if(c[o]){c[o]=c[o].filter(u=>u!==a),c[o].length===0&&delete c[o],d.reactions=c,i[s]=d;let m=new Map(this.state.messages);m.set(t,i),this.emitChange({...this.state,messages:m});}}}deleteMessage(t,r){let o=this.state.messages.get(t);if(!o)return;let a=o.findIndex(n=>n.id===r);if(a!==-1){let n=[...o];n[a]={...n[a],type:"revoked",content:"Esta mensagem foi apagada",attachments:[],reactions:{}};let s=new Map(this.state.messages);s.set(t,n),this.emitChange({...this.state,messages:s});}}setActiveChat(t){let r={...this.state,activeChatId:t};if(t){let o=this.state.conversations.get(t);if(o&&o.unreadCount>0){let a=new Map(this.state.conversations);a.set(t,{...o,unreadCount:0}),r.conversations=a;}}this.emitChange(r);}setUserPresence(t,r){let o=new Map(this.state.presence);o.set(t,r),this.emitChange({...this.state,presence:o});}},tt=new sn;function Ko(e){let t=Te.useSyncExternalStore(tt.subscribe,tt.getState);return Te.useMemo(()=>e(t),[t,e])}var hb=e=>Array.from(e.conversations.values()).sort((t,r)=>{if(t.isPinned&&!r.isPinned)return -1;if(!t.isPinned&&r.isPinned)return 1;let o=t.lastMessage?.timestamp.getTime()||0;return (r.lastMessage?.timestamp.getTime()||0)-o});function FD(){return Ko(hb)}function UD(e){let t=Te.useCallback(r=>e?r.messages.get(e)||[]:[],[e]);return Ko(t)}function WD(){let e=Te.useCallback(t=>t.activeChatId?t.conversations.get(t.activeChatId):null,[]);return Ko(e)}function _D(e){let t=Te.useCallback(r=>r.presence.get(e)||"unavailable",[e]);return Ko(t)}function cn({url:e,token:t,rooms:r=[],onConnect:o,onDisconnect:a,onError:n}){let s=Te.useRef(null);Te.useEffect(()=>{let c=socket_ioClient.io(e,{auth:{token:t},transports:["websocket"],reconnectionAttempts:5,reconnectionDelay:1e3});return s.current=c,c.on("connect",()=>{console.log("Socket connected:",c.id),r.forEach(m=>c.emit("join",m)),o?.();}),c.on("disconnect",m=>{console.log("Socket disconnected:",m),a?.();}),c.on("connect_error",m=>{console.error("Socket connection error:",m),n?.(m);}),()=>{c.disconnect();}},[e,t,r,o,a,n]);let i=Te.useCallback((c,m)=>{s.current?.connected?s.current.emit(c,m):console.warn("Socket not connected. Event buffered or dropped:",c);},[]),d=Te.useCallback((c,m)=>(s.current?.on(c,m),()=>{s.current?.off(c,m);}),[]);return {socket:s.current,emit:i,on:d,isConnected:s.current?.connected||false}}function e3(e,t){let{on:r,emit:o,isConnected:a}=cn({url:e,token:t});return Te.useEffect(()=>{r("chats.set",n=>{tt.setConversations(n);}),r("chats.upsert",n=>{n.forEach(s=>tt.upsertConversation(s));}),r("chats.update",n=>{n.forEach(s=>{s.id&&tt.upsertConversation(s);});}),r("messages.upsert",({chatId:n,messages:s})=>{s.forEach(i=>tt.addMessage(n,i));}),r("messages.update",({chatId:n,messageId:s,status:i})=>{tt.updateMessageStatus(n,s,i);}),r("presence.update",({userId:n,status:s})=>{tt.setUserPresence(n,s);}),r("groups.update",n=>{n.forEach(s=>{tt.upsertConversation({id:s.id,group:s});});});},[r]),{isConnected:a,emit:o}}function t3(e,t){let{emit:r}=cn({url:""});return {setPresence:a=>{r("presence.send",{chatId:e,userId:t,status:a});}}}function r3(){return {uploadMedia:async(t,r)=>({url:"...",thumbnail:"...",blurhash:"..."})}}function o3(e){return {search:r=>r?e.filter(o=>o.content.toLowerCase().includes(r.toLowerCase())):e}}function Xi(){let[e,t]=Te.useState({scrollX:0,scrollY:0,scrollProgressX:0,scrollProgressY:0}),r=Te.useRef(false),o=Te.useCallback(()=>{r.current||(window.requestAnimationFrame(()=>{let a=window.scrollX,n=window.scrollY,s=document.documentElement.scrollWidth-document.documentElement.clientWidth,i=document.documentElement.scrollHeight-document.documentElement.clientHeight;t({scrollX:a,scrollY:n,scrollProgressX:s>0?a/s:0,scrollProgressY:i>0?n/i:0}),r.current=false;}),r.current=true);},[]);return Te.useEffect(()=>(window.addEventListener("scroll",o,{passive:true}),o(),()=>window.removeEventListener("scroll",o)),[o]),e}function c3({className:e,color:t="bg-blue-500",height:r=2,position:o="top",...a}){let{scrollProgressY:n}=Xi();return jsxRuntime.jsx("div",{className:l("fixed left-0 right-0 z-[100] w-full pointer-events-none",o==="top"?"top-0":"bottom-0",e),style:{height:r},...a,children:jsxRuntime.jsx("div",{className:l("h-full transition-all duration-75 ease-out",t),style:{width:`${n*100}%`,boxShadow:n>0?`0 0 10px ${t.replace("bg-","var(--")}`:"none"}})})}var Rb=Te__namespace.default.forwardRef(({orientation:e="horizontal",className:t,...r},o)=>jsxRuntime.jsx("hr",{ref:o,className:l("border-0 bg-gray-200 dark:bg-white/10",{"h-px w-full":e==="horizontal","h-full w-px":e==="vertical"},t),...r}));Rb.displayName="Divider";var Eb=Te__namespace.default.forwardRef(({children:e,className:t,...r},o)=>jsxRuntime.jsx("kbd",{ref:o,className:l("rounded-lg border border-gray-200 dark:border-white/10 bg-gray-100 dark:bg-white/[0.03] px-2 py-1 text-[11px] font-semibold text-gray-500 dark:text-white/65",t),...r,children:e}));Eb.displayName="Kbd";var Ab={theme:"system",setTheme:()=>null},Gi=Te.createContext(Ab);function k3({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...o}){let[a,n]=Te.useState(t);Te.useEffect(()=>{let i=localStorage.getItem(r);i&&n(i);},[r]),Te.useEffect(()=>{let i=window.document.documentElement;if(i.classList.remove("light","dark"),a==="system"){let d=window.matchMedia("(prefers-color-scheme: dark)"),c=()=>{i.classList.remove("light","dark"),i.classList.add(d.matches?"dark":"light");};return c(),d.addEventListener("change",c),()=>d.removeEventListener("change",c)}i.classList.add(a);},[a]);let s={theme:a,setTheme:i=>{localStorage.setItem(r,i),n(i);}};return jsxRuntime.jsx(Gi.Provider,{...o,value:s,children:e})}var Ji=()=>{let e=Te.useContext(Gi);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function P3({className:e}){let{setTheme:t,theme:r}=Ji();return jsxRuntime.jsxs(R,{variant:"ghost",size:"icon",className:l("h-9 w-9",e),onClick:()=>t(r==="light"?"dark":"light"),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsxRuntime.jsx(lucideReact.Moon,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function Fb(e,t=true){let[r,o]=Te.useState({data:null,error:null,isLoading:false}),a=Te.useCallback(async()=>{o({data:null,error:null,isLoading:true});try{let n=await e();return o({data:n,error:null,isLoading:!1}),n}catch(n){throw o({data:null,error:n,isLoading:false}),n}},[e]);return Te.useEffect(()=>{t&&a();},[a,t]),{...r,execute:a}}function H3(e,t){let r=Te.useCallback(()=>fetch(e,t).then(o=>o.json()),[e,t]);return Fb(r)}function B3({initialMessages:e=[],onSendMessage:t,scrollThreshold:r=100}={}){let[o,a]=Te.useState(e),[n,s]=Te.useState(false),[i,d]=Te.useState(false),c=Te.useRef(null),m=Te.useRef(true),u=Te.useCallback((x="smooth")=>{c.current&&c.current.scrollTo({top:c.current.scrollHeight,behavior:x});},[]),p=Te.useCallback(()=>{if(c.current){let{scrollTop:x,scrollHeight:b,clientHeight:f}=c.current;m.current=b-x-f<r;}},[r]);Te.useEffect(()=>{m.current&&u();},[o,u]);let g=Te.useCallback(async(x,b)=>{if(!x.trim())return;let f=crypto.randomUUID(),w={id:f,content:x,senderId:b,timestamp:new Date,status:"sending"};a(v=>[...v,w]);try{t&&await t(x),a(v=>v.map(y=>y.id===f?{...y,status:"sent"}:y));}catch{a(y=>y.map(k=>k.id===f?{...k,status:"error"}:k));}},[t]),h=Te.useCallback(()=>{a([]);},[]);return {messages:o,setMessages:a,sendMessage:g,clearMessages:h,isTyping:n,setIsTyping:s,isLoading:i,setIsLoading:d,scrollRef:c,handleScroll:p,scrollToBottom:u}}function K3(e=[]){let[t,r]=Te.useState(e),o=Te.useCallback(c=>{r(m=>[...m,c]);},[]),a=Te.useCallback((c,m)=>{r(u=>u.map(p=>p.id===c?{...p,status:m}:p));},[]),n=Te.useCallback(c=>{r(m=>m.filter(u=>u.id!==c));},[]),s=Te.useCallback((c,m)=>{r(u=>u.map(p=>p.id===c?{...p,content:m,isEdited:true}:p));},[]),i=Te.useCallback((c,m,u)=>{r(p=>p.map(g=>{if(g.id!==c)return g;let h={...g.reactions||{}},x=h[m]||[];return x.includes(u)?(h[m]=x.filter(b=>b!==u),h[m].length===0&&delete h[m]):h[m]=[...x,u],{...g,reactions:h}}));},[]),d=Te.useCallback(()=>{r([]);},[]);return {messages:t,setMessages:r,addMessage:o,updateMessageStatus:a,deleteMessage:n,editMessage:s,addReaction:i,clearMessages:d}}function U3(e){let[t,r]=Te.useState(""),o=Te.useMemo(()=>{if(!t.trim())return [];let a=t.toLowerCase();return e.filter(n=>n.content.toLowerCase().includes(a))},[e,t]);return {query:t,setQuery:r,results:o}}function Y3(e){let t=Te.useRef(null);return Te.useEffect(()=>{let r=o=>{let a=t.current;!a||a.contains(o?.target||null)||e(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e]),t}function q3({timeout:e=2e3}={}){let[t,r]=Te.useState(false),[o,a]=Te.useState(null);return {copy:Te.useCallback(async s=>{if(!navigator?.clipboard){a(new Error("Clipboard API not supported"));return}try{await navigator.clipboard.writeText(s),r(!0),setTimeout(()=>r(!1),e);}catch(i){a(i instanceof Error?i:new Error("Failed to copy"));}},[e]),copied:t,error:o}}function Q3(e,t){let[r,o]=Te.useState(e);return Te.useEffect(()=>{let a=setTimeout(()=>{o(e);},t);return ()=>{clearTimeout(a);}},[e,t]),r}function tH(e){let[t,r]=Te.useState({progress:0,scrollY:0,isIntersecting:false}),o=Te.useRef(false);return Te.useEffect(()=>{let a=e.current;if(!a)return;let n=()=>{o.current||(window.requestAnimationFrame(()=>{let s=a.getBoundingClientRect(),i=window.innerHeight,d=i+s.height,c=i-s.top,m=Math.max(0,Math.min(1,c/d));r({progress:m,scrollY:window.scrollY,isIntersecting:s.top<i&&s.bottom>0}),o.current=false;}),o.current=true);};return window.addEventListener("scroll",n,{passive:true}),window.addEventListener("resize",n),n(),()=>{window.removeEventListener("scroll",n),window.removeEventListener("resize",n);}},[e]),t}function aH(e,t){let r=Te.useRef(null);return Te.useLayoutEffect(()=>{let o=document.querySelector(`[data-flip-id="${e}"]`);if(!o)return;let a=r.current,n=o.getBoundingClientRect();if(a){let s=a.left-n.left,i=a.top-n.top,d=a.width/n.width,c=a.height/n.height;(Math.abs(s)>.5||Math.abs(i)>.5||Math.abs(d-1)>.01||Math.abs(c-1)>.01)&&o.animate([{transformOrigin:"top left",transform:`translate(${s}px, ${i}px) scale(${d}, ${c})`},{transformOrigin:"top left",transform:"none"}],{duration:400,easing:"cubic-bezier(0.2, 0.8, 0.2, 1)"});}r.current=n;},t),{"data-flip-id":e}}function iH({initialValues:e,onSubmit:t}){let[r,o]=Te.useState(e),[a,n]=Te.useState({}),[s,i]=Te.useState(false),d=Te.useCallback(u=>{let{name:p,value:g,type:h}=u.target,x=h==="checkbox"?u.target.checked:g;o(b=>({...b,[p]:x})),a[p]&&n(b=>({...b,[p]:""}));},[a]),c=Te.useCallback(async u=>{u.preventDefault();let p=u.currentTarget;if(!p.checkValidity()){let g={};Array.from(p.elements).forEach(h=>{let x=h;x.name&&!x.validity.valid&&(g[x.name]=x.validationMessage);}),n(g);return}i(true);try{await t(r);}finally{i(false);}},[r,t]),m=Te.useCallback(u=>({name:u,value:r[u],onChange:d,error:a[u]}),[r,a,d]);return {values:r,errors:a,isSubmitting:s,handleChange:d,handleSubmit:c,register:m,setValues:o,setErrors:n}}function mH(e){let[t,r]=Te.useState({past:[],present:e,future:[]}),o=t.past.length>0,a=t.future.length>0,n=Te.useCallback(()=>{o&&r(c=>{let m=c.past[c.past.length-1];return m===void 0?c:{past:c.past.slice(0,c.past.length-1),present:m,future:[c.present,...c.future]}});},[o]),s=Te.useCallback(()=>{a&&r(c=>{let m=c.future[0];if(m===void 0)return c;let u=c.future.slice(1);return {past:[...c.past,c.present],present:m,future:u}});},[a]),i=Te.useCallback(c=>{r(m=>{let u=typeof c=="function"?c(m.present):c;return m.present===u?m:{past:[...m.past,m.present],present:u,future:[]}});},[]),d=Te.useCallback(()=>{r({past:[],present:e,future:[]});},[e]);return {state:t.present,set:i,undo:n,redo:s,clear:d,canUndo:o,canRedo:a,history:t}}function fH(e=3e3){let[t,r]=Te.useState(false),o=Te.useRef();return Te.useEffect(()=>{let a=()=>{r(false),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(true);},e);},n=["mousemove","mousedown","keydown","touchstart","scroll"];return n.forEach(s=>{window.addEventListener(s,a);}),a(),()=>{n.forEach(s=>{window.removeEventListener(s,a);}),o.current&&clearTimeout(o.current);}},[e]),t}function hH({onLoadMore:e,isLoading:t,hasMore:r,threshold:o=100,root:a=null}){let n=Te.useRef(null),s=Te.useRef(null),i=Te.useCallback(d=>{let c=d[0];c&&c.isIntersecting&&r&&!t&&e();},[r,t,e]);return Te.useEffect(()=>{let d=s.current;if(d)return n.current=new IntersectionObserver(i,{root:a,rootMargin:`0px 0px ${o}px 0px`,threshold:.1}),n.current.observe(d),()=>{n.current&&n.current.disconnect();}},[i,a,o]),s}function yH(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=false}={}){let[n,s]=Te.useState(),i=n?.isIntersecting&&a,d=([c])=>{s(c);};return Te.useEffect(()=>{let c=e?.current;if(!!!window.IntersectionObserver||i||!c)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(d,u);return p.observe(c),()=>p.disconnect()},[e,t,r,o,i]),n}function TH(e){let[t,r]=Te.useState(e),o=Te.useCallback((i,d,c,m)=>{r(u=>{let p=u.columns[d],g=u.columns[c],h=u.tasks[i];if(!p||!g||!h)return u;let x=Array.from(p.taskIds);x.splice(x.indexOf(i),1);let b={...p,taskIds:x},f=d===c?x:Array.from(g.taskIds);f.splice(m,0,i);let w={...g,taskIds:f};return {...u,columns:{...u.columns,[d]:b,[c]:w},tasks:{...u.tasks,[i]:{...h,columnId:c}}}});},[]),a=Te.useCallback((i,d)=>{r(c=>{let m=Array.from(c.columnOrder);return m.splice(m.indexOf(i),1),m.splice(d,0,i),{...c,columnOrder:m}});},[]),n=Te.useCallback((i,d)=>{r(c=>{let m=c.columns[i];if(!m)return c;let u={...m,taskIds:[...m.taskIds,d.id]};return {...c,tasks:{...c.tasks,[d.id]:d},columns:{...c.columns,[i]:u}}});},[]),s=Te.useCallback(i=>{r(d=>{let c=d.tasks[i];if(!c)return d;let m=d.columns[c.columnId];if(!m)return d;let u={...d.tasks};delete u[i];let p={...m,taskIds:m.taskIds.filter(g=>g!==i)};return {...d,tasks:u,columns:{...d.columns,[c.columnId]:p}}});},[]);return {board:t,setBoard:r,moveTask:o,moveColumn:a,addTask:n,removeTask:s}}function RH(e){let t=Te.useRef(e);t.current=e,Te.useEffect(()=>{let r=o=>{let a=[];(o.ctrlKey||o.metaKey)&&a.push("mod"),o.shiftKey&&a.push("shift"),o.altKey&&a.push("alt");let s=o.key.toLowerCase();["control","meta","shift","alt"].includes(s)||a.push(s);let i=a.join("+"),d=t.current[i]||t.current[s];d&&d(o);};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[]);}function EH(e){let t=Te.useRef(false);Te.useEffect(()=>{t.current||(t.current=true,e());},[]);}function SH(e){Te.useEffect(()=>()=>{e();},[]);}function AH(e,t){let[r,o]=Te.useState(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(n){return console.warn(`Error reading localStorage key "${e}":`,n),t}}),a=Te.useCallback(n=>{try{let s=n instanceof Function?n(r):n;o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s));}catch(s){console.warn(`Error setting localStorage key "${e}":`,s);}},[e,r]);return [r,a]}function OH(e){let[t,r]=Te.useState({x:0,y:0,elementX:0,elementY:0,percentageX:0,percentageY:0}),o=Te.useRef(),a=Te.useRef({x:0,y:0});return Te.useEffect(()=>{let n=i=>{a.current={x:i.clientX,y:i.clientY},o.current||(o.current=requestAnimationFrame(s));},s=()=>{let{x:i,y:d}=a.current,c=0,m=0,u=0,p=0;if(e?.current){let g=e.current.getBoundingClientRect();c=i-g.left,m=d-g.top,u=Math.max(0,Math.min(100,c/g.width*100)),p=Math.max(0,Math.min(100,m/g.height*100));}r({x:i,y:d,elementX:c,elementY:m,percentageX:u,percentageY:p}),o.current=void 0;};return window.addEventListener("mousemove",n),()=>{window.removeEventListener("mousemove",n),o.current&&cancelAnimationFrame(o.current);}},[e]),t}function $H(){let[e,t]=Te.useState({alpha:null,beta:null,gamma:null,absolute:false});return Te.useEffect(()=>{let r=o=>{t({alpha:o.alpha,beta:o.beta,gamma:o.gamma,absolute:o.absolute});};return typeof window<"u"&&"DeviceOrientationEvent"in window&&window.addEventListener("deviceorientation",r),()=>{window.removeEventListener("deviceorientation",r);}},[]),e}function WH(e){let t=Te.useRef();return Te.useEffect(()=>{t.current=e;},[e]),t.current}function XH(e){let t=Te.useRef(null),r=Te.useCallback((o,a,n)=>{!o||n||!t.current||(o.dataset.messageId=a,t.current.observe(o));},[]);return Te.useEffect(()=>(t.current=new IntersectionObserver(o=>{o.forEach(a=>{if(a.isIntersecting){let n=a.target.dataset.messageId;n&&(e(n),t.current?.unobserve(a.target));}});},{threshold:.5}),()=>{t.current?.disconnect();}),[e]),{registerMessage:r}}function GH(){let[e,t]=Te.useState(false);return Te.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");t(r.matches);let o=a=>{t(a.matches);};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),e}var Eh={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function Sh(e){let[t,r]=Te.useState(false);return Te.useEffect(()=>{let o=window.matchMedia(e);r(o.matches);let a=()=>r(o.matches);return o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[e]),t}function ZH(e){return Sh(`(min-width: ${Eh[e]}px)`)}function eI(e){let[t,r]=Te.useState({width:0,height:0});return Te.useLayoutEffect(()=>{if(!e.current)return;let o=new ResizeObserver(a=>{for(let n of a)r({width:n.contentRect.width,height:n.contentRect.height});});return o.observe(e.current),()=>o.disconnect()},[e]),t}function oI(e=10){let[t,r]=Te.useState(null),o=Te.useRef(0);return Te.useEffect(()=>{let a=()=>{let s=window.scrollY;if(Math.abs(s-o.current)<e)return;let i=s>o.current?"down":"up";i!==t&&(s>0||i==="down")&&r(i),o.current=s>0?s:0;},n=()=>{window.requestAnimationFrame(a);};return window.addEventListener("scroll",n),()=>window.removeEventListener("scroll",n)},[t,e]),t}function sI(e=true){Te.useLayoutEffect(()=>{if(!e)return;let t=window.getComputedStyle(document.body).overflow,r=window.getComputedStyle(document.body).paddingRight,o=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",o>0&&(document.body.style.paddingRight=`${parseFloat(r)+o}px`),()=>{document.body.style.overflow=t,document.body.style.paddingRight=r;}},[e]);}function Bh(e,t,r){let[o,a]=t,[n,s]=r,i=(e-o)/(a-o),d=Math.max(0,Math.min(1,i));return n+d*(s-n)}function lI(e,t,r){return Bh(e,t,r)}function mI(){let[e,t]=Te.useState(0),r=Te.useRef(0),o=Te.useRef(Date.now()),a=Te.useRef();return Te.useEffect(()=>{let n=()=>{let i=window.scrollY,d=Date.now(),c=d-o.current;if(c>0){let u=(i-r.current)/c;t(u);}r.current=i,o.current=d,a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(s);},s=()=>{t(i=>Math.abs(i)<.01?0:i*.9),a.current=requestAnimationFrame(s);};return window.addEventListener("scroll",n,{passive:true}),()=>{window.removeEventListener("scroll",n),a.current&&cancelAnimationFrame(a.current);}},[]),e}function Kh(e,t){let r=e.toLowerCase().replace(/\s/g,""),o=t.toLowerCase(),a=0;for(let n=0;n<o.length&&a<r.length;n++)o[n]===r[a]&&a++;return a===r.length}function fI(e,t,r){return Te.useMemo(()=>t.trim()?e.filter(o=>r.some(a=>{let n=o[a];return n==null?false:Kh(t,String(n))})):e,[e,t,r])}function hI(e,t){let r=Te.useCallback(()=>{if(typeof window>"u")return t;try{let s=window.sessionStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return console.warn(`Error reading sessionStorage key "${e}":`,s),t}},[t,e]),[o,a]=Te.useState(r),n=Te.useCallback(s=>{try{let i=s instanceof Function?s(o):s;a(i),typeof window<"u"&&window.sessionStorage.setItem(e,JSON.stringify(i));}catch(i){console.warn(`Error setting sessionStorage key "${e}":`,i);}},[e,o]);return Te.useEffect(()=>{a(r());},[r]),[o,n]}function wI(e,t={}){let{stiffness:r=.15,damping:o=.8,mass:a=1,precision:n=.01}=t,[s,i]=Te.useState(e),d=Te.useRef(0),c=Te.useRef(e),m=Te.useRef();return Te.useEffect(()=>{let u=()=>{let p=e-c.current,h=p*r/a;if(d.current=(d.current+h)*o,c.current+=d.current,Math.abs(p)<n&&Math.abs(d.current)<n){c.current=e,i(e),m.current=void 0;return}i(c.current),m.current=requestAnimationFrame(u);};return m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(u),()=>{m.current&&cancelAnimationFrame(m.current);}},[e,r,o,a,n]),s}function kI(e,t=100,r=0){return r+e*t}function NI(e,t=100){return Array.from({length:e},(r,o)=>o*t)}var sl="01XYZ#%&@$+-/<>!_";function MI(e,t=800,r=true){let[o,a]=Te.useState(e),n=Te.useRef();return Te.useEffect(()=>{if(!r){a(e);return}let s=Date.now(),i=()=>{let d=Date.now()-s,c=Math.min(d/t,1),m=e.split("").map((u,p)=>u===" "?" ":c>p/e.length?u:sl[Math.floor(Math.random()*sl.length)]).join("");a(m),c<1&&(n.current=requestAnimationFrame(i));};return n.current=requestAnimationFrame(i),()=>{n.current&&cancelAnimationFrame(n.current);}},[e,t,r]),o}function PI(e,t){let[r,o]=Te.useState(e),a=Te.useRef(Date.now());return Te.useEffect(()=>{let n=setTimeout(()=>{Date.now()-a.current>=t&&(o(e),a.current=Date.now());},t-(Date.now()-a.current));return ()=>{clearTimeout(n);}},[e,t]),r}function DI(e=0){let[t,r]=Te.useState(e),[o,a]=Te.useState(false),n=Te.useRef(null),s=Te.useCallback(()=>{o||(a(true),n.current=setInterval(()=>{r(m=>m+1);},1e3));},[o]),i=Te.useCallback(()=>{o&&n.current&&(clearInterval(n.current),a(false));},[o]),d=Te.useCallback(()=>{n.current&&clearInterval(n.current),a(false),r(0);},[]);return Te.useEffect(()=>()=>{n.current&&clearInterval(n.current);},[]),{seconds:t,isActive:o,start:s,pause:i,reset:d,formattedTime:(m=>{let u=Math.floor(m/3600),p=Math.floor(m%3600/60),g=m%60;return [u,p,g].map(h=>h<10?"0"+h:h).filter((h,x)=>h!=="00"||x>0).join(":")})(t)}}function BI(){let e=Te.useContext(oa);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function zI(e=false){let[t,r]=Te.useState(e),o=Te.useCallback(()=>{r(a=>!a);},[]);return [t,o,r]}function FI(e=3e3){let[t,r]=Te.useState(false),o=Te.useRef(null),a=Te.useCallback(n=>{r(n),o.current&&clearTimeout(o.current),n&&(o.current=window.setTimeout(()=>{r(false);},e));},[e]);return Te.useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{isTyping:t,setTyping:a}}function _I(){return {startTransition:t=>{if(!document.startViewTransition){t();return}document.startViewTransition(()=>{reactDom.flushSync(()=>{t();});});}}}function XI(e,t={month:"short",day:"numeric",year:"numeric"}){let r=new Date(e);return new Intl.DateTimeFormat("en-US",t).format(r)}function jI(e){return new Intl.NumberFormat("en-US").format(e)}function qI(e,t="USD"){return new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e)}function JI(e,t){return e.length<=t?e:e.slice(0,t)+"..."}function QI(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}
70
- exports.AIPromptInput=Uf;exports.AIResponse=t0;exports.AISummaryCard=EL;exports.Accordion=E1;exports.AccordionContent=H1;exports.AccordionItem=S1;exports.AccordionTrigger=D1;exports.Alert=Cd;exports.Animate=Mt;exports.AreaChart=CM;exports.AssigneePicker=Rs;exports.AudioPlayer=RS;exports.Avatar=F;exports.Background=Lf;exports.Badge=Ue;exports.BarChart=wM;exports.Breadcrumb=Fp;exports.BreadcrumbEllipsis=jp;exports.BreadcrumbItem=Wp;exports.BreadcrumbLink=_p;exports.BreadcrumbList=Up;exports.BreadcrumbPage=Yp;exports.BreadcrumbSeparator=Xp;exports.BulkActionBar=eP;exports.Button=R;exports.Calendar=so;exports.Card=El;exports.CardContent=Il;exports.CardDescription=Hl;exports.CardFooter=Al;exports.CardHeader=Sl;exports.CardTitle=Dl;exports.CarouselMessage=Ci;exports.ChartContainer=mM;exports.ChartGrid=uM;exports.ChartSkeleton=gM;exports.ChartTooltip=fM;exports.ChartXAxis=pM;exports.ChartYAxis=GM;exports.ChatBanner=vS;exports.ChatHeader=CP;exports.ChatInput=jE;exports.ChatLayout=dP;exports.ChatProfile=nS;exports.ChatSidebar=vP;exports.Checkbox=Yo;exports.Checklist=Ns;exports.Collapse=sM;exports.ColorPicker=uy;exports.ColumnLimit=ds;exports.Combobox=Jo;exports.ComboboxContent=ew;exports.ComboboxEmpty=On;exports.ComboboxInput=Bn;exports.ComboboxItem=zn;exports.ComboboxList=Vn;exports.ComboboxTrigger=Zv;exports.Command=gs;exports.CommandDialog=w2;exports.CommandEmpty=y2;exports.CommandGroup=xs;exports.CommandInput=bs;exports.CommandItem=vs;exports.CommandList=hs;exports.CommandShortcut=k2;exports.ConfirmDialog=c4;exports.ConnectionStatusBanner=sP;exports.Container=bf;exports.DataTable=j1;exports.DatePicker=yw;exports.DateSeparator=DS;exports.DateTimePicker=Aw;exports.Dialog=b4;exports.DialogDescription=w4;exports.DialogFooter=x4;exports.DialogHeader=h4;exports.DialogTitle=v4;exports.Divider=Rb;exports.Drawer=P4;exports.DrawerDescription=H4;exports.DrawerFooter=S4;exports.DrawerHeader=E4;exports.DrawerTitle=D4;exports.DropdownMenu=dt;exports.DropdownMenuContent=ut;exports.DropdownMenuItem=V;exports.DropdownMenuLabel=ai;exports.DropdownMenuSeparator=Aa;exports.DropdownMenuTrigger=mt;exports.DueDatePicker=Ps;exports.EmojiPicker=iD;exports.EmptyState=Ed;exports.FileDropzone=Zc;exports.FormControl=_c;exports.FormDescription=Yc;exports.FormItem=Uc;exports.FormLabel=Wc;exports.FormMessage=Xc;exports.GlowButton=vl;exports.Grid=Mf;exports.GroupHeader=XS;exports.Heading=at;exports.HeroText=ql;exports.Image=ma;exports.InteractiveMessage=ki;exports.Kanban=Zu;exports.KanbanBoard=Zu;exports.KanbanCalendarView=fs;exports.KanbanCard=fa;exports.KanbanColumn=ga;exports.KanbanFilterBar=ys;exports.KanbanHeader=ls;exports.KanbanListView=po;exports.KanbanQuickAdd=z5;exports.KanbanSwimlane=Hs;exports.KanbanTableView=ps;exports.KanbanTaskModal=Ds;exports.KanbanTimelineView=us;exports.Kbd=Eb;exports.Label=X;exports.LabelPicker=Ms;exports.LetterPullup=Gl;exports.LineChart=EM;exports.LinkPreview=xi;exports.Magnetic=t1;exports.Marquee=$C;exports.MediaLightbox=PD;exports.MentionList=ZS;exports.MessageBubble=So;exports.MessageList=CE;exports.MessageSearch=bD;exports.MetricCard=Cl;exports.Modal=fo;exports.ModalDescription=Y2;exports.ModalFooter=bo;exports.ModalHeader=go;exports.ModalTitle=ks;exports.Motion=ts;exports.MotionGroup=Vk;exports.Navbar=NR;exports.NumberInput=ud;exports.NumberTicker=l1;exports.OTPInput=sd;exports.OnlineIndicator=BS;exports.PageLoader=p1;exports.PageTransition=v1;exports.Pagination=Gp;exports.PaginationContent=Jp;exports.PaginationEllipsis=tf;exports.PaginationItem=Qp;exports.PaginationLink=Ba;exports.PaginationNext=ef;exports.PaginationPrevious=Zp;exports.Parallax=jk;exports.PasswordInput=Dc;exports.PieChart=VM;exports.Popover=nt;exports.PopoverContent=it;exports.PopoverTrigger=st;exports.Presence=Lo;exports.PrimaryButton=pl;exports.Progress=Rd;exports.RadarChart=FM;exports.RadioGroup=$c;exports.RadioGroupItem=Fc;exports.Rating=Bd;exports.ReadReceipt=hi;exports.ReplyPreview=fS;exports.Reveal=Nn;exports.ScrollArea=pt;exports.ScrollProgress=c3;exports.Select=to;exports.Separator=$r;exports.ShinyText=Wl;exports.Sidebar=dR;exports.SidebarContent=uR;exports.SidebarFooter=pR;exports.SidebarGroup=gR;exports.SidebarHeader=mR;exports.SidebarItem=fR;exports.Skeleton=Zn;exports.SkipToContent=YR;exports.Slider=sw;exports.SmartReplySuggestions=$L;exports.Sparkline=YM;exports.Spotlight=mL;exports.Stack=vf;exports.StatusDot=pp;exports.Stepper=t4;exports.StickyDateHeader=Do;exports.SubtaskList=J5;exports.Surface=ce;exports.Switch=Xo;exports.SystemMessage=KS;exports.Table=Er;exports.TableBody=Dr;exports.TableCell=qe;exports.TableHead=lt;exports.TableHeader=Sr;exports.TableRow=bt;exports.Tabs=rR;exports.TabsContent=nR;exports.TabsList=oR;exports.TabsTrigger=aR;exports.TagInput=iy;exports.TaskActivity=rC;exports.TaskAttachments=Cs;exports.TaskComments=Ts;exports.Terminal=lp;exports.TerminalLine=VC;exports.Text=Ne;exports.TextGradient=$l;exports.TextInput=Pt;exports.TextMotion=Fk;exports.Textarea=Mr;exports.ThemeProvider=k3;exports.ThemeToggle=P3;exports.TimeTracker=Ss;exports.Timeline=uN;exports.TimelineItem=Nm;exports.Toast=Jn;exports.ToastContext=oa;exports.ToastProvider=ok;exports.ToggleGroup=hd;exports.Tooltip=$4;exports.Tree=vN;exports.TypingIndicator=cS;exports.UserMenu=OR;exports.UserPreview=vm;exports.VirtualizedMessageList=OD;exports.VoiceRecorder=Hi;exports.WaveformAudio=gi;exports.chatStore=tt;exports.cn=l;exports.formatCurrency=qI;exports.formatDate=XI;exports.formatNumber=jI;exports.normalize=sr;exports.slugify=QI;exports.truncate=JI;exports.useActiveChat=WD;exports.useAsync=Fb;exports.useBaileysSync=e3;exports.useBreakpoint=ZH;exports.useChart=Ee;exports.useChat=B3;exports.useChatMedia=r3;exports.useChatMessages=K3;exports.useChatPresence=t3;exports.useChatSearch=U3;exports.useChatSearchWorker=o3;exports.useChatStore=Ko;exports.useClickOutside=Y3;exports.useClipboard=q3;exports.useContainerQuery=eI;exports.useConversations=FD;exports.useDebounce=Q3;exports.useDrag=an;exports.useElementScroll=tH;exports.useFetch=H3;exports.useFlip=aH;exports.useFloating=qt;exports.useForm=iH;exports.useHistory=mH;exports.useIdle=fH;exports.useInView=Xe;exports.useInfiniteScroll=hH;exports.useIntersection=yH;exports.useKanban=TH;exports.useKanbanFilters=Bs;exports.useKanbanHistory=X5;exports.useKanbanKeyboard=Os;exports.useKanbanSync=W5;exports.useKanbanUndo=Vs;exports.useKeyboardShortcuts=RH;exports.useLocalStorage=AH;exports.useMediaQuery=Sh;exports.useMessages=UD;exports.useMousePosition=OH;exports.useOnMount=EH;exports.useOnUnmount=SH;exports.useOrientation=$H;exports.usePresence=Wa;exports.usePrevious=WH;exports.useReadReceipts=XH;exports.useReducedMotion=GH;exports.useScroll=Xi;exports.useScrollDirection=oI;exports.useScrollLock=sI;exports.useScrollTransform=lI;exports.useScrollVelocity=mI;exports.useSearch=fI;exports.useSequence=NI;exports.useSessionStorage=hI;exports.useSocket=cn;exports.useSpring=wI;exports.useStagger=kI;exports.useTextScramble=MI;exports.useTheme=Ji;exports.useThrottle=PI;exports.useTimer=DI;exports.useToast=BI;exports.useToggle=zI;exports.useTypingIndicator=FI;exports.useUserPresence=_D;exports.useViewTransition=_I;exports.useVirtualList=_i;exports.useVoiceRecorder=Di;//# sourceMappingURL=index.js.map
69
+ `,backgroundSize:`${o}px ${o}px`,transform:s?"translate3d(calc((var(--mouse-x, 0) - 24px) / 40), calc((var(--mouse-y, 0) - 24px) / 40), 0)":void 0}:e==="gradient"?{...b,background:s?`radial-gradient(circle at var(--mouse-x, center) var(--mouse-y, center), ${f}, transparent)`:`radial-gradient(circle at center, ${f}, transparent)`}:e==="beams"?{...b,background:`radial-gradient(60% 40% at 50% 0%, ${f} 0%, transparent 100%)`}:b},x=a==="fade"?{maskImage:"radial-gradient(ellipse at center, black, transparent 90%)",WebkitMaskImage:"radial-gradient(ellipse at center, black, transparent 90%)"}:{};return jsxRuntime.jsxs("div",{ref:b=>{b&&(g.current=b),typeof p=="function"?p(b):p&&(p.current=b);},className:l("absolute inset-0 overflow-hidden pointer-events-none transition-transform duration-300 ease-out","z-0","[--pattern-color:rgba(0,0,0,0.05)] dark:[--pattern-color:rgba(255,255,255,0.08)]",i?.startsWith("bg-")?i:"",d),style:{...h(),...x,...m,backgroundColor:i&&!i.startsWith("bg-")?i:void 0},...u,children:[t&&jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none brightness-100 contrast-150",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`}}),e==="beams"&&jsxRuntime.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[jsxRuntime.jsx("div",{className:"absolute top-0 left-1/4 w-px h-full bg-gradient-to-b from-transparent via-white/10 to-transparent"}),jsxRuntime.jsx("div",{className:"absolute top-0 right-1/4 w-px h-full bg-gradient-to-b from-transparent via-white/10 to-transparent"})]}),e==="mesh"&&jsxRuntime.jsxs("div",{className:l("absolute inset-0 opacity-30 blur-[100px]",n&&"animate-pulse"),children:[jsxRuntime.jsx("div",{className:"absolute top-[-10%] left-[-10%] w-[50%] h-[50%] rounded-full bg-blue-500/20"}),jsxRuntime.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] w-[50%] h-[50%] rounded-full bg-purple-500/20"}),jsxRuntime.jsx("div",{className:"absolute top-[20%] right-[10%] w-[40%] h-[40%] rounded-full bg-indigo-500/10"})]}),c]})});Sf.displayName="Background";var bL=({children:e,className:t,size:r=300,color:o,fill:a,...n})=>{let s=Te.useRef(null),i=a||o||"rgba(255, 255, 255, 0.1)";return jsxRuntime.jsxs("div",{ref:s,onMouseMove:u=>{let p=s.current;if(!p)return;let g=p.getBoundingClientRect(),h=u.clientX-g.left,x=u.clientY-g.top;p.style.setProperty("--mouse-x",`${h}px`),p.style.setProperty("--mouse-y",`${x}px`);},onMouseEnter:()=>{s.current?.style.setProperty("--opacity","1");},onMouseLeave:()=>{s.current?.style.setProperty("--opacity","0");},className:l("relative overflow-hidden rounded-2xl border border-gray-200 bg-white dark:border-white/10 dark:bg-black",t),...n,children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute -inset-px transition-opacity duration-300",style:{opacity:"var(--opacity, 0)",background:`radial-gradient(${r}px circle at var(--mouse-x, center) var(--mouse-y, center), ${i}, transparent 80%)`}}),e&&jsxRuntime.jsx("div",{className:"relative h-full",children:e})]})};var _f=classVarianceAuthority.cva("relative flex w-full flex-col rounded-2xl border transition-all duration-200 focus-within:ring-4",{variants:{variant:{default:"bg-white border-gray-200 shadow-sm focus-within:border-purple-500/50 focus-within:ring-purple-500/10 dark:bg-white/[0.03] dark:border-white/10 dark:shadow-none",ghost:"bg-transparent border-transparent shadow-none focus-within:bg-white/50 dark:focus-within:bg-white/5"}},defaultVariants:{variant:"default"}}),Yf=Te__namespace.default.forwardRef(({className:e,variant:t,onSubmit:r,isGenerating:o,onAttach:a,onFilesSelected:n,onStop:s,onMic:i,maxLength:d,footer:c,attachments:m,onRemoveAttachment:u,accept:p,multiple:g,placeholder:h="Ask AI anything...",value:x,onChange:b,...f},v)=>{let[w,y]=Te.useState(""),k=x!==void 0,N=k?x:w,C=Te.useRef(null),T=Te.useRef(null),E=()=>{C.current&&(C.current.style.height="auto",C.current.style.height=`${C.current.scrollHeight}px`);};Te.useEffect(()=>{E();},[N]);let O=M=>{let F=M.target.value;d&&F.length>d||(k||y(F),b?.(M));},P=M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),N.trim()&&!o&&(r?.(N),k||y(""))),f.onKeyDown?.(M);},S=()=>{o&&s?s():N.trim()&&(r?.(N),k||y(""));},$=()=>{n&&T.current?T.current.click():a?.();},D=M=>{M.target.files&&M.target.files.length>0&&n?.(M.target.files),T.current&&(T.current.value="");};return jsxRuntime.jsxs("div",{className:l(_f({variant:t,className:e})),children:[jsxRuntime.jsx("input",{type:"file",ref:T,className:"hidden",onChange:D,accept:p,multiple:g}),m&&m.length>0&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 px-4 pt-4",children:m.map(M=>jsxRuntime.jsxs("div",{className:"group relative flex items-center gap-2 rounded-xl border border-gray-200 bg-gray-50 px-3 py-1.5 text-sm transition-colors hover:bg-gray-100 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/[0.06]",children:[jsxRuntime.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded-lg bg-white dark:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.File,{className:"h-3 w-3 text-purple-500"})}),jsxRuntime.jsx("span",{className:"max-w-[120px] truncate text-gray-700 dark:text-gray-300",children:M.name}),jsxRuntime.jsx("button",{onClick:()=>u?.(M.id),className:"ml-1 rounded-full p-0.5 text-gray-400 opacity-0 transition-all hover:bg-gray-200 hover:text-gray-600 group-hover:opacity-100 dark:hover:bg-white/[0.06] dark:hover:text-white",type:"button",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},M.id))}),jsxRuntime.jsx("textarea",{ref:M=>{C.current=M,typeof v=="function"?v(M):v&&(v.current=M);},value:N,onChange:O,onKeyDown:P,placeholder:h,rows:1,className:l("w-full resize-none bg-transparent px-4 py-4 text-base outline-none max-h-[200px]","text-gray-900 placeholder:text-gray-400","dark:text-white dark:placeholder:text-white/40"),disabled:o&&!s,...f}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2 pb-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-gray-600 dark:text-white/40 dark:hover:text-white",onClick:$,type:"button",title:"Attach file",children:jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-5 w-5"})}),i&&jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-gray-600 dark:text-white/40 dark:hover:text-white",onClick:i,type:"button",title:"Use microphone",children:jsxRuntime.jsx(lucideReact.Mic,{className:"h-5 w-5"})})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[d&&jsxRuntime.jsxs("span",{className:"text-xs text-gray-400 dark:text-white/30",children:[N.length,"/",d]}),jsxRuntime.jsx(R,{size:"icon",disabled:!N.trim()&&!o||o&&!s,onClick:S,className:l("h-8 w-8 rounded-full transition-all duration-200",N.trim()||o?"bg-purple-600 text-white hover:bg-purple-500 shadow-lg shadow-purple-500/25":"bg-gray-100 text-gray-400 dark:bg-white/[0.06] dark:text-white/20"),children:o?s?jsxRuntime.jsx(lucideReact.Square,{className:"h-3 w-3 fill-current"}):jsxRuntime.jsx(lucideReact.Sparkles,{className:"h-4 w-4 animate-pulse"}):jsxRuntime.jsx(lucideReact.ArrowUp,{className:"h-4 w-4"})})]})]}),c&&jsxRuntime.jsx("div",{className:"border-t border-gray-100 px-4 py-2 text-xs text-gray-400 dark:border-white/5 dark:text-white/30",children:c})]})});Yf.displayName="AIPromptInput";var o0=classVarianceAuthority.cva("group relative overflow-hidden rounded-2xl border transition-all duration-200",{variants:{variant:{default:"bg-gray-50 border-gray-200 dark:bg-white/[0.02] dark:border-white/10",ghost:"bg-transparent border-transparent",outline:"bg-transparent border-gray-200 dark:border-white/10"}},defaultVariants:{variant:"default"}}),a0=Te__namespace.default.forwardRef(({className:e,variant:t,children:r,onCopy:o,onRegenerate:a,onFeedback:n,onShare:s,onEdit:i,timestamp:d,sources:c,model:m,usage:u,...p},g)=>jsxRuntime.jsxs("div",{ref:g,className:l(o0({variant:t,className:e})),...p,children:[jsxRuntime.jsxs("div",{className:"absolute left-4 top-4 flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br from-purple-500 to-blue-500 shadow-lg shadow-purple-500/20",children:jsxRuntime.jsx(lucideReact.Sparkles,{className:"h-3.5 w-3.5 text-white"})}),d&&jsxRuntime.jsx("span",{className:"text-xs font-medium text-gray-400 dark:text-white/30",children:d})]}),jsxRuntime.jsxs("div",{className:"pl-14 pr-4 py-4",children:[jsxRuntime.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none text-gray-700 dark:text-gray-300",children:r}),c&&c.length>0&&jsxRuntime.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:c.map((h,x)=>jsxRuntime.jsxs("a",{href:h.url,target:"_blank",rel:"noopener noreferrer",className:l("flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs transition-colors","border-gray-200 bg-white text-gray-600 hover:bg-gray-50","dark:border-white/10 dark:bg-white/[0.03] dark:text-white/60 dark:hover:bg-white/[0.06]"),children:[jsxRuntime.jsx("span",{className:"max-w-[150px] truncate",children:h.title}),jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3 opacity-50"})]},x))})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 bg-white/50 px-2 py-1.5 backdrop-blur dark:border-white/5 dark:bg-white/[0.02]",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-2 text-[10px] font-medium text-gray-400 dark:text-white/20",children:[m&&jsxRuntime.jsx("span",{children:m}),u&&jsxRuntime.jsx("span",{children:u})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsxs(R,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:o,children:[jsxRuntime.jsx(lucideReact.Copy,{className:"mr-1.5 h-3.5 w-3.5"}),"Copy"]}),s&&jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:s,title:"Share",children:jsxRuntime.jsx(lucideReact.Share,{className:"h-3.5 w-3.5"})}),i&&jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:i,title:"Edit",children:jsxRuntime.jsx(lucideReact.Edit,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx("div",{className:"mx-1 h-3 w-px bg-gray-200 dark:bg-white/10"}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:a,title:"Regenerate",children:jsxRuntime.jsx(lucideReact.RefreshCw,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:()=>n?.("up"),title:"Helpful",children:jsxRuntime.jsx(lucideReact.ThumbsUp,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:()=>n?.("down"),title:"Not helpful",children:jsxRuntime.jsx(lucideReact.ThumbsDown,{className:"h-3.5 w-3.5"})})]})]})]}));a0.displayName="AIResponse";function AL({summary:e,onRegenerate:t,isLoading:r,className:o,...a}){return jsxRuntime.jsxs("div",{className:l("relative overflow-hidden rounded-2xl border border-white/10 bg-white/[0.03] backdrop-blur-xl p-5 group",o),...a,children:[jsxRuntime.jsx("div",{className:"absolute -top-24 -right-24 w-48 h-48 bg-purple-500/20 rounded-full blur-[80px] pointer-events-none group-hover:bg-purple-500/30 transition-all duration-700"}),jsxRuntime.jsx("div",{className:"absolute -bottom-24 -left-24 w-48 h-48 bg-blue-500/20 rounded-full blur-[80px] pointer-events-none group-hover:bg-blue-500/30 transition-all duration-700"}),jsxRuntime.jsxs("div",{className:"relative space-y-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-gradient-to-br from-purple-500 to-blue-500 shadow-lg shadow-purple-500/20",children:jsxRuntime.jsx(lucideReact.Sparkles,{className:"h-4 w-4 text-white"})}),jsxRuntime.jsx("h3",{className:"text-sm font-bold text-white tracking-tight",children:"Resumo Inteligente"})]}),t&&jsxRuntime.jsx("button",{onClick:t,disabled:r,className:"p-2 rounded-lg hover:bg-white/5 text-white/40 hover:text-white transition-all active:scale-95 disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.RefreshCw,{className:l("h-4 w-4",r&&"animate-spin")})})]}),jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsx("p",{className:"text-sm text-white/70 leading-relaxed font-medium",children:e}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 rounded-full bg-white/5 border border-white/5 text-[10px] font-bold text-white/40 uppercase tracking-widest",children:[jsxRuntime.jsx(lucideReact.ListChecks,{size:12}),"Key Points Extracted"]})})]}),jsxRuntime.jsx("div",{className:"pt-2",children:jsxRuntime.jsxs("button",{className:"flex items-center gap-2 text-[11px] font-bold text-blue-400 hover:text-blue-300 transition-colors uppercase tracking-wider group/btn",children:["Ver detalhes da an\xE1lise",jsxRuntime.jsx(lucideReact.ArrowRight,{size:14,className:"group-hover/btn:translate-x-1 transition-transform"})]})})]})]})}var d0={fade:{initial:"opacity-0",animate:"opacity-100"},"fade-up":{initial:"opacity-0 translate-y-4",animate:"opacity-100 translate-y-0"},"fade-down":{initial:"opacity-0 -translate-y-4",animate:"opacity-100 translate-y-0"},scale:{initial:"opacity-0 scale-95",animate:"opacity-100 scale-100"},"slide-bottom":{initial:"opacity-0 translate-y-full",animate:"opacity-100 translate-y-0"},"slide-top":{initial:"opacity-0 -translate-y-full",animate:"opacity-100 translate-y-0"}};function Rt({children:e,preset:t="fade",show:r=true,delay:o=0,duration:a=200,className:n,onAnimationComplete:s,style:i,...d}){let[c,m]=Te.useState(false),[u,p]=Te.useState(false);if(Te.useEffect(()=>{if(r){m(true);let h=setTimeout(()=>{p(true),s&&setTimeout(s,a);},o);return ()=>clearTimeout(h)}else {p(false);let h=setTimeout(()=>m(false),a);return ()=>clearTimeout(h)}},[r,o,a,s]),!c&&!r)return null;let g=d0[t];return jsxRuntime.jsx("div",{className:l("transition-all ease-out",u?g.animate:g.initial,n),style:{transitionDuration:`${a}ms`,transitionDelay:`${o}ms`,...i},...d,children:e})}function YL({replies:e,onSelect:t,isLoading:r}){return r?jsxRuntime.jsx("div",{className:"flex gap-2 p-2 px-4 animate-pulse",children:[1,2,3].map(o=>jsxRuntime.jsx("div",{className:"h-8 w-32 bg-white/5 rounded-full border border-white/5"},o))}):jsxRuntime.jsxs("div",{className:"flex gap-2 p-2 px-4 overflow-x-auto no-scrollbar scroll-smooth",children:[jsxRuntime.jsxs("div",{className:"flex items-center shrink-0 pr-2 border-r border-white/10 mr-1",children:[jsxRuntime.jsx(lucideReact.Sparkles,{size:14,className:"text-purple-400 mr-2"}),jsxRuntime.jsx("span",{className:"text-[10px] font-bold text-purple-400/50 uppercase tracking-widest select-none",children:"IA Sugere"})]}),e.map((o,a)=>jsxRuntime.jsx(Rt,{preset:"fade-up",delay:a*100,children:jsxRuntime.jsxs("button",{onClick:()=>t(o),className:l("shrink-0 flex items-center gap-2 px-4 py-2 rounded-full","bg-white/[0.03] border border-white/10 text-white/70 text-xs font-medium","hover:bg-white/10 hover:border-white/20 hover:text-white transition-all active:scale-95 group"),children:[o,jsxRuntime.jsx(lucideReact.Send,{size:10,className:"opacity-0 group-hover:opacity-100 group-hover:translate-x-0.5 transition-all"})]})},a))]})}function Xa(e,t=200){let[r,o]=Te.useState(e);return Te.useEffect(()=>{if(e)o(true);else {let a=setTimeout(()=>{o(false);},t);return ()=>clearTimeout(a)}},[e,t]),r}function Lo({present:e,children:t,exitDuration:r=200}){return Xa(e,r)?Te__namespace.default.cloneElement(t,{show:e,duration:r}):null}function nP({isVisible:e,selectedCount:t,onClose:r,onDelete:o,onForward:a,onMarkRead:n,onCopyAll:s}){return jsxRuntime.jsx(Lo,{present:e,exitDuration:300,children:jsxRuntime.jsx(Rt,{preset:"slide-bottom",className:"fixed bottom-24 left-1/2 -translate-x-1/2 z-[100] w-full max-w-lg px-4",children:jsxRuntime.jsxs("div",{className:"bg-[#1a1a1a]/90 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl p-3 flex items-center justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 pl-2",children:[jsxRuntime.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-white/40 hover:text-white transition-all",children:jsxRuntime.jsx(lucideReact.X,{size:18})}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsxs("span",{className:"text-white font-bold text-sm",children:[t," selecionados"]}),jsxRuntime.jsx("span",{className:"text-white/40 text-[10px] font-bold uppercase tracking-widest",children:"A\xE7\xF5es em massa"})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(Po,{icon:jsxRuntime.jsx(lucideReact.Forward,{size:18}),label:"Encaminhar",onClick:a,variant:"ghost"}),jsxRuntime.jsx(Po,{icon:jsxRuntime.jsx(lucideReact.Copy,{size:18}),label:"Copiar",onClick:s,variant:"ghost"}),jsxRuntime.jsx(Po,{icon:jsxRuntime.jsx(lucideReact.MessageSquare,{size:18}),label:"Lido",onClick:n,variant:"ghost"}),jsxRuntime.jsx("div",{className:"w-px h-8 bg-white/10 mx-1"}),jsxRuntime.jsx(Po,{icon:jsxRuntime.jsx(lucideReact.Trash2,{size:18}),label:"Excluir",onClick:o,variant:"danger"})]})]})})})}function Po({icon:e,label:t,onClick:r,variant:o="ghost"}){return jsxRuntime.jsxs("button",{onClick:r,className:l("flex flex-col items-center justify-center w-14 h-14 rounded-xl transition-all group active:scale-95",o==="ghost"?"text-white/60 hover:text-white hover:bg-white/5":"text-rose-500 hover:text-rose-400 hover:bg-rose-500/10"),children:[e,jsxRuntime.jsx("span",{className:"text-[10px] mt-1 font-medium scale-90 group-hover:scale-100 transition-transform",children:t})]})}function mP({status:e,onRetry:t,message:r}){let o={disconnected:{bg:"bg-rose-500/10",border:"border-rose-500/20",text:"text-rose-400",icon:jsxRuntime.jsx(lucideReact.WifiOff,{size:14}),label:"Telefone Desconectado"},connecting:{bg:"bg-amber-500/10",border:"border-amber-500/20",text:"text-amber-400",icon:jsxRuntime.jsx(lucideReact.RefreshCcw,{size:14,className:"animate-spin"}),label:"Conectando..."},reconnecting:{bg:"bg-blue-500/10",border:"border-blue-500/20",text:"text-blue-400",icon:jsxRuntime.jsx(lucideReact.RefreshCcw,{size:14,className:"animate-spin"}),label:"Tentando reconectar..."},error:{bg:"bg-rose-500/10",border:"border-rose-500/20",text:"text-rose-400",icon:jsxRuntime.jsx(lucideReact.AlertTriangle,{size:14}),label:"Erro na conex\xE3o"}}[e];return jsxRuntime.jsxs(Rt,{preset:"fade-down",className:l("flex items-center justify-center gap-4 py-2 px-4 border-b backdrop-blur-md z-50",o.bg,o.border),children:[jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 text-xs font-bold uppercase tracking-widest",o.text),children:[o.icon,r||o.label]}),t&&(e==="disconnected"||e==="error")&&jsxRuntime.jsxs("button",{onClick:t,className:"flex items-center gap-1.5 px-3 py-1 rounded-full bg-white/5 hover:bg-white/10 border border-white/5 text-[10px] font-bold text-white transition-all active:scale-95",children:["Tentar agora",jsxRuntime.jsx(lucideReact.RefreshCcw,{size:10})]})]})}function gP({children:e,className:t,...r}){return jsxRuntime.jsx("div",{className:l("flex h-[800px] w-full overflow-hidden rounded-3xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/40 backdrop-blur-xl shadow-2xl",t),...r,children:e})}function TP({conversations:e,activeId:t,onSelect:r,onNewChat:o,onSearch:a,onArchive:n,onPin:s,onMute:i,onDelete:d,onMarkUnread:c,filter:m="all",sortBy:u="recent",hideHeader:p=false,className:g,...h}){let[x,b]=Te.useState(""),f=Te.useMemo(()=>e.filter(w=>(w.user?.name||w.group?.name||"").toLowerCase().includes(x.toLowerCase())),[e,x]),v=w=>{let y=w.target.value;b(y),a?.(y);};return jsxRuntime.jsxs("div",{className:l("flex flex-col border-r border-gray-200 dark:border-white/10 bg-gray-50/50 dark:bg-white/[0.02]",!g?.includes("w-")&&"w-80",g),...h,children:[!p&&jsxRuntime.jsxs("div",{className:"p-4 space-y-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"Messages"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",title:"Filter",children:jsxRuntime.jsx(lucideReact.Filter,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{onClick:o,className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",title:"New Chat",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-5 w-5"})})]})]}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),jsxRuntime.jsx("input",{type:"text",value:x,onChange:v,placeholder:"Search messages...",className:"w-full h-10 pl-9 pr-4 rounded-2xl bg-white dark:bg-white/[0.03] border border-gray-200 dark:border-white/10 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all placeholder:text-gray-400 dark:text-white"})]})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-white/20 [&::-webkit-scrollbar-track]:bg-transparent",children:jsxRuntime.jsx("div",{className:"flex flex-col",children:f.map(w=>{let y=w.user?.name||w.group?.name||"Unknown",k=w.user?.avatar||w.group?.avatar,N=w.user?.status==="online",C=t===w.id;return jsxRuntime.jsx("div",{className:"p-2",children:jsxRuntime.jsxs("div",{onClick:()=>r?.(w.id),className:l("w-full h-16 flex items-center gap-3 p-3 rounded-2xl transition-all text-left group cursor-pointer",C?"bg-blue-500/10 dark:bg-white/[0.06] shadow-[0_0_15px_rgba(59,130,246,0.1)] dark:shadow-[0_0_15px_rgba(255,255,255,0.05)]":"hover:bg-gray-100 dark:hover:bg-white/[0.03]"),children:[jsxRuntime.jsxs("div",{className:"relative flex-shrink-0",children:[jsxRuntime.jsx(U,{src:k,alt:y,fallback:y[0]}),N&&jsxRuntime.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-3.5 h-3.5 bg-green-500 border-2 border-white dark:border-[#0a0a0a] rounded-full"})]}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[jsxRuntime.jsx("span",{className:l("font-semibold truncate",C?"text-blue-600 dark:text-white":"text-gray-900 dark:text-white/90"),children:y}),w.lastMessage&&jsxRuntime.jsx("span",{className:"text-[10px] text-gray-400 dark:text-white/30 whitespace-nowrap",children:new Date(w.lastMessage.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsxRuntime.jsx("p",{className:"text-xs text-gray-500 dark:text-white/40 truncate",children:w.isTyping?jsxRuntime.jsx("span",{className:"text-blue-500 animate-pulse",children:"typing..."}):w.lastMessage?.content||"No messages yet"}),w.unreadCount>0&&jsxRuntime.jsx("span",{className:"flex-shrink-0 min-w-[18px] h-[18px] flex items-center justify-center bg-blue-500 text-white text-[10px] font-bold rounded-full px-1",children:w.unreadCount})]})]}),jsxRuntime.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:T=>T.stopPropagation(),children:jsxRuntime.jsxs(mt,{children:[jsxRuntime.jsx(ut,{className:"p-1 rounded-lg hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400",children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-4 w-4"})}),jsxRuntime.jsxs(pt,{align:"end",children:[jsxRuntime.jsxs(z,{onClick:()=>s?.(w.id),children:[jsxRuntime.jsx(lucideReact.Pin,{className:"h-4 w-4 mr-2"})," Pin"]}),jsxRuntime.jsxs(z,{onClick:()=>n?.(w.id),children:[jsxRuntime.jsx(lucideReact.Archive,{className:"h-4 w-4 mr-2"})," Archive"]}),jsxRuntime.jsxs(z,{onClick:()=>i?.(w.id),children:[jsxRuntime.jsx(lucideReact.BellOff,{className:"h-4 w-4 mr-2"})," Mute"]}),jsxRuntime.jsxs(z,{onClick:()=>c?.(w.id),children:[jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-4 w-4 mr-2"})," Mark as Unread"]}),jsxRuntime.jsxs(z,{className:"text-red-500",onClick:()=>d?.(w.id),children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4 mr-2"})," Delete"]})]})]})})]})},w.id)})})})]})}function EP({user:e,onBack:t,onInfo:r,onAvatarClick:o,onCall:a,onVideoCall:n,onSearch:s,onMute:i,isTyping:d,isMuted:c,actions:m,className:u,...p}){return jsxRuntime.jsxs("div",{className:l("flex h-16 items-center justify-between border-b border-gray-200 dark:border-white/10 bg-white/80 dark:bg-black/40 backdrop-blur px-4 sticky top-0 z-10",u),...p,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx("button",{onClick:t,className:"md:hidden p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.ArrowLeft,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),jsxRuntime.jsxs("div",{className:"relative cursor-pointer",onClick:o||r,children:[jsxRuntime.jsx(U,{src:e.avatar,alt:e.name,fallback:e.name[0]}),e.status==="online"&&jsxRuntime.jsx("span",{className:"absolute bottom-0 right-0 h-3 w-3 rounded-full bg-green-500 border-2 border-white dark:border-black"})]}),jsxRuntime.jsxs("div",{className:"cursor-pointer",onClick:r,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white leading-none",children:e.name}),c&&jsxRuntime.jsx(lucideReact.BellOff,{className:"h-3 w-3 text-gray-400"}),e.tags&&e.tags.length>0&&jsxRuntime.jsxs("div",{className:"flex gap-1",children:[e.tags.slice(0,2).map((g,h)=>jsxRuntime.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded-full bg-primary/10 text-primary border border-primary/20 font-medium",children:g},h)),e.tags.length>2&&jsxRuntime.jsxs("span",{className:"text-[9px] text-gray-400",children:["+",e.tags.length-2]})]})]}),jsxRuntime.jsx("p",{className:l("text-xs mt-1 transition-colors",d?"text-blue-500 font-medium animate-pulse":"text-gray-500 dark:text-white/50"),children:d?"typing...":e.status==="online"?"Online":`Last seen ${e.lastSeen?.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[s&&jsxRuntime.jsx("button",{onClick:s,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5"})}),a&&jsxRuntime.jsx("button",{onClick:a,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Phone,{className:"h-5 w-5"})}),n&&jsxRuntime.jsx("button",{onClick:n,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Video,{className:"h-5 w-5"})}),m,jsxRuntime.jsx("button",{onClick:r,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-5 w-5"})})]})]})}function hi({src:e,duration:t,isMe:r,bars:o=35,className:a,...n}){let[s,i]=Te.useState(false),[d,c]=Te.useState(0),m=Te.useRef(null),u=Te.useMemo(()=>{let v=[],w=e.length;for(let y=0;y<o;y++){let k=(Math.sin(w+y*1.5)+1)/2*80+20;v.push(Math.round(k));}return v},[e,o]),p=()=>{m.current&&(s?m.current.pause():m.current.play(),i(!s));},g=()=>{m.current&&c(m.current.currentTime);},h=()=>{i(false),c(0);},x=v=>{let w=Math.floor(v/60),y=Math.floor(v%60);return `${w}:${y.toString().padStart(2,"0")}`},b=t?d/t:0,f=Math.floor(b*o);return jsxRuntime.jsxs("div",{className:l("flex items-center gap-4 py-2 px-3 rounded-2xl min-w-[280px]",r?"bg-white/10 text-white":"bg-white/[0.03] text-white/90 border border-white/10",a),...n,children:[jsxRuntime.jsx("audio",{ref:m,src:e,onTimeUpdate:g,onEnded:h}),jsxRuntime.jsx("div",{className:"relative shrink-0",children:jsxRuntime.jsx("button",{onClick:p,className:l("w-12 h-12 rounded-full flex items-center justify-center transition-all group active:scale-95",r?"bg-white text-blue-600":"bg-blue-500 text-white shadow-lg shadow-blue-500/20"),children:s?jsxRuntime.jsx(lucideReact.Pause,{className:"h-6 w-6 fill-current"}):jsxRuntime.jsx(lucideReact.Play,{className:"h-6 w-6 fill-current ml-1"})})}),jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col gap-1",children:[jsxRuntime.jsx("div",{className:"flex items-end gap-[2px] h-8 w-full group cursor-pointer",onClick:v=>{if(!m.current||!t)return;let w=v.currentTarget.getBoundingClientRect(),k=(v.clientX-w.left)/w.width*t;m.current.currentTime=k,c(k);},children:u.map((v,w)=>jsxRuntime.jsx("div",{className:l("flex-1 rounded-full transition-all duration-300",w<=f?r?"bg-white":"bg-blue-500":r?"bg-white/30":"bg-white/10"),style:{height:`${v}%`}},w))}),jsxRuntime.jsxs("div",{className:"flex justify-between items-center px-0.5",children:[jsxRuntime.jsx("span",{className:"text-[10px] tabular-nums font-semibold opacity-60",children:x(d)}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 grayscale opacity-40",children:[jsxRuntime.jsx("span",{className:"text-[10px] font-semibold",children:t?x(t):"--:--"}),jsxRuntime.jsx(lucideReact.Smartphone,{size:10})]})]})]})]})}function vi({status:e,className:t,...r}){return e==="sending"?jsxRuntime.jsx("div",{className:l("w-3 h-3 border border-current border-t-transparent rounded-full animate-spin opacity-50",t),...r}):e==="failed"?jsxRuntime.jsx("span",{className:l("text-red-500 text-[10px] font-bold",t),...r,children:"!"}):jsxRuntime.jsxs("div",{className:l("flex items-center",t),...r,children:[e==="sent"&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3 opacity-50"}),e==="delivered"&&jsxRuntime.jsx(lucideReact.CheckCheck,{className:"h-3 w-3 opacity-50"}),e==="read"&&jsxRuntime.jsx(lucideReact.CheckCheck,{className:"h-3 w-3 text-blue-500"})]})}function wi({url:e,title:t,description:r,image:o,siteName:a,className:n,...s}){return jsxRuntime.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:l("block overflow-hidden rounded-xl border border-gray-200 dark:border-white/10 bg-white dark:bg-white/[0.03] hover:bg-gray-50 dark:hover:bg-white/[0.05] transition-all group",n),...s,children:[o&&jsxRuntime.jsx("div",{className:"aspect-video w-full overflow-hidden border-b border-gray-200 dark:border-white/10",children:jsxRuntime.jsx("img",{src:o,alt:t,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})}),jsxRuntime.jsxs("div",{className:"p-3 space-y-1",children:[a&&jsxRuntime.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-blue-500",children:a}),jsxRuntime.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white line-clamp-1",children:t||e}),r&&jsxRuntime.jsx("p",{className:"text-xs text-gray-500 dark:text-white/50 line-clamp-2",children:r}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-gray-400 pt-1",children:[jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3"}),jsxRuntime.jsx("span",{className:"truncate",children:new URL(e).hostname})]})]})]})}function Ti({data:e,isOwn:t,onAction:r}){return jsxRuntime.jsxs("div",{className:"space-y-2 max-w-sm",children:[(()=>{if(!e.header)return null;switch(e.header.type){case "text":return jsxRuntime.jsx("h4",{className:"font-bold mb-1 text-sm",children:e.header.text});case "image":return jsxRuntime.jsx("div",{className:"mb-2 rounded-lg overflow-hidden border border-white/10",children:jsxRuntime.jsx("img",{src:e.header.attachment?.url,alt:"Header",className:"w-full h-auto object-cover"})});default:return null}})(),jsxRuntime.jsx("p",{className:"text-sm leading-relaxed",children:e.body}),e.footer&&jsxRuntime.jsx("p",{className:"text-[10px] opacity-50 italic",children:e.footer}),e.type==="button"&&e.buttons&&jsxRuntime.jsx("div",{className:"flex flex-col gap-1 mt-3",children:e.buttons.map(a=>jsxRuntime.jsxs("button",{onClick:()=>r?.(a),className:l("flex items-center justify-center gap-2 p-2.5 rounded-xl text-sm font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10 active:scale-[0.98]",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[a.type==="url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3.5 w-3.5"}),a.type==="call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3.5 w-3.5"}),a.type==="reply"&&jsxRuntime.jsx(lucideReact.Reply,{className:"h-3.5 w-3.5"}),a.text]},a.id))}),e.type==="list"&&e.sections&&jsxRuntime.jsx("div",{className:"mt-3 space-y-3",children:e.sections.map((a,n)=>jsxRuntime.jsxs("div",{className:"space-y-1",children:[a.title&&jsxRuntime.jsx("p",{className:"text-[10px] uppercase tracking-wider opacity-40 font-bold px-1",children:a.title}),jsxRuntime.jsx("div",{className:"flex flex-col gap-1",children:a.rows.map(s=>jsxRuntime.jsxs("button",{onClick:()=>r?.({id:s.id,text:s.title,type:"reply"}),className:"flex flex-col items-start p-3 rounded-xl bg-white/5 hover:bg-white/10 border border-white/5 transition-colors text-left",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:s.title}),s.description&&jsxRuntime.jsx("span",{className:"text-xs opacity-50 line-clamp-1",children:s.description})]},s.id))})]},n))}),e.nativeFlow&&jsxRuntime.jsx("div",{className:"flex flex-col gap-1 mt-3",children:e.nativeFlow.buttons.map((a,n)=>{let s={};try{s=typeof a.buttonParamsJson=="string"?JSON.parse(a.buttonParamsJson):a.buttonParamsJson;}catch{}return jsxRuntime.jsxs("button",{onClick:()=>r?.({id:s.id||a.name,text:s.display_text||a.name,type:"reply",params:s}),className:l("flex items-center justify-center gap-2 p-2.5 rounded-xl text-sm font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10 active:scale-[0.98]",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[a.name==="cta_copy"&&jsxRuntime.jsx(lucideReact.Copy,{className:"h-3.5 w-3.5"}),a.name==="cta_url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3.5 w-3.5"}),a.name==="cta_call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3.5 w-3.5"}),a.name==="single_select"&&jsxRuntime.jsx(lucideReact.Reply,{className:"h-3.5 w-3.5"}),s.display_text||s.title||a.name]},n)})})]})}function Ri({cards:e,isOwn:t,onAction:r}){let o=Te__namespace.default.useRef(null),a=n=>{o.current&&o.current.scrollBy({left:n==="left"?-240:240,behavior:"smooth"});};return jsxRuntime.jsxs("div",{className:"relative group/carousel max-w-[300px] sm:max-w-[400px]",children:[jsxRuntime.jsx("div",{ref:o,className:"flex gap-3 overflow-x-auto scrollbar-hide snap-x snap-mandatory pb-2",children:e.map((n,s)=>jsxRuntime.jsxs("div",{className:"flex-shrink-0 w-[240px] snap-start rounded-2xl bg-white/5 dark:bg-white/[0.03] border border-white/10 overflow-hidden flex flex-col",children:[n.header?.attachment&&jsxRuntime.jsx("div",{className:"aspect-video w-full overflow-hidden",children:jsxRuntime.jsx("img",{src:n.header.attachment.url,alt:"Card",className:"w-full h-full object-cover"})}),jsxRuntime.jsxs("div",{className:"p-3 flex-1 flex flex-col",children:[jsxRuntime.jsx("p",{className:"text-sm leading-relaxed mb-1",children:n.body}),n.footer&&jsxRuntime.jsx("p",{className:"text-[10px] opacity-50 italic mb-3",children:n.footer}),jsxRuntime.jsxs("div",{className:"mt-auto flex flex-col gap-1",children:[n.buttons?.map(i=>jsxRuntime.jsxs("button",{onClick:()=>r?.(i),className:l("flex items-center justify-center gap-2 p-2 rounded-lg text-xs font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[i.type==="url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3"}),i.type==="call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3 w-3"}),i.type==="reply"&&jsxRuntime.jsx(lucideReact.Reply,{className:"h-3 w-3"}),i.text]},i.id)),n.nativeFlow?.buttons.map((i,d)=>{let c={};try{c=typeof i.buttonParamsJson=="string"?JSON.parse(i.buttonParamsJson):i.buttonParamsJson;}catch{}return jsxRuntime.jsxs("button",{onClick:()=>r?.({id:c.id||i.name,text:c.display_text||i.name,type:"reply",params:c}),className:l("flex items-center justify-center gap-2 p-2 rounded-lg text-xs font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[i.name==="cta_copy"&&jsxRuntime.jsx(lucideReact.Copy,{className:"h-3 w-3"}),i.name==="cta_url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3"}),i.name==="cta_call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3 w-3"}),c.display_text||i.name]},d)})]})]})]},s))}),e.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>a("left"),className:"absolute left-[-12px] top-1/2 -translate-y-1/2 p-1.5 rounded-full bg-white dark:bg-gray-800 shadow-lg border border-white/10 opacity-0 group-hover/carousel:opacity-100 transition-opacity z-10",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{onClick:()=>a("right"),className:"absolute right-[-12px] top-1/2 -translate-y-1/2 p-1.5 rounded-full bg-white dark:bg-gray-800 shadow-lg border border-white/10 opacity-0 group-hover/carousel:opacity-100 transition-opacity z-10",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})}function So({message:e,isOwn:t,showAvatar:r,showStatus:o=true,className:a,onReply:n,onReact:s,onDelete:i,onEdit:d,onForward:c,onCopy:m,onPin:u,onStar:p,onSelect:g,onAction:h,onTTS:x,onTranscribe:b,hasAi:f,onImageClick:v,isSelected:w}){let y=()=>!t||!o?null:jsxRuntime.jsx(vi,{status:e.status||"sent",className:"ml-1"}),k=()=>{if(e.type==="revoked")return jsxRuntime.jsxs("p",{className:"text-sm italic opacity-50 flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-3 w-3"})," This message was deleted"]});switch(e.type){case "audio":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(hi,{src:e.attachments?.[0]?.url||"",duration:e.attachments?.[0]?.duration,isMe:t}),(e.transcription||e.isTranscribing||f)&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 pt-2 border-t border-white/5",children:e.isTranscribing?jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-blue-400 animate-pulse font-bold uppercase tracking-wider",children:[jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-3 w-3"}),"Transcrevendo..."]}):e.transcription?jsxRuntime.jsx("div",{className:"bg-black/10 dark:bg-black/40 p-3 rounded-xl text-xs italic opacity-90 leading-relaxed border-l-2 border-primary/50",children:e.transcription}):f&&jsxRuntime.jsxs("button",{onClick:()=>b?.(e),className:"text-[10px] flex items-center gap-1.5 px-2 py-1 rounded-full bg-primary/10 text-primary hover:bg-primary/20 transition-all w-fit font-bold uppercase tracking-wider",children:[jsxRuntime.jsx(lucideReact.Volume2,{className:"h-3 w-3"}),"Transcrever com IA"]})})]});case "location":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"text-sm font-medium",children:e.location?.address||"Shared Location"})]}),jsxRuntime.jsxs("div",{className:"aspect-video rounded-xl bg-gray-200 dark:bg-white/10 flex items-center justify-center overflow-hidden relative group/map",children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"h-8 w-8 opacity-20 group-hover/map:scale-110 transition-transform"}),jsxRuntime.jsx("div",{className:"absolute inset-0 bg-blue-500/5 group-hover/map:bg-blue-500/10 transition-colors"})]})]});case "contact":return jsxRuntime.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-xl bg-black/5 dark:bg-white/10 border border-white/5",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center text-white shadow-lg shadow-blue-500/20",children:jsxRuntime.jsx(lucideReact.User,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-sm font-bold truncate",children:e.contact?.name}),jsxRuntime.jsx("p",{className:"text-xs opacity-60 truncate",children:e.contact?.phone})]})]});case "file":return jsxRuntime.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl bg-black/5 dark:bg-white/10 border border-white/5 hover:bg-black/10 dark:hover:bg-white/20 transition-colors cursor-pointer",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-500/20 flex items-center justify-center text-blue-500",children:jsxRuntime.jsx(lucideReact.FileText,{className:"h-6 w-6"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium truncate",children:e.attachments?.[0]?.name||"File"}),jsxRuntime.jsx("p",{className:"text-[10px] opacity-60 uppercase",children:e.attachments?.[0]?.size||"Unknown size"})]})]});case "sticker":return jsxRuntime.jsx("div",{className:"relative group/sticker",children:jsxRuntime.jsx("img",{src:e.attachments?.[0]?.url,alt:"Sticker",className:"w-32 h-32 object-contain"})});case "image":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"relative rounded-2xl overflow-hidden border border-white/5 group/image cursor-pointer",onClick:()=>v?.(e.attachments?.[0]?.url||""),children:jsxRuntime.jsx(fa,{src:e.attachments?.[0]?.url||"",alt:e.content||"Image",className:"max-h-[300px] w-auto object-contain bg-black/20 transition-transform duration-300 group-hover/image:scale-105"})}),e.content&&jsxRuntime.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words px-1",children:e.content})]});case "video":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"relative rounded-2xl overflow-hidden border border-white/5 bg-black/20 aspect-video flex items-center justify-center group/video",children:jsxRuntime.jsx("video",{src:e.attachments?.[0]?.url,controls:true,className:"max-h-[300px] w-full"})}),e.content&&jsxRuntime.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words px-1",children:e.content})]});case "interactive":return e.interactive?.type==="carousel"&&e.interactive.cards?jsxRuntime.jsx(Ri,{cards:e.interactive.cards,isOwn:t,onAction:h}):e.interactive?jsxRuntime.jsx(Ti,{data:e.interactive,isOwn:t,onAction:h}):null;default:let N=/(https?:\/\/[^\s]+)/g,C=e.content.match(N);return jsxRuntime.jsxs("div",{className:"space-y-2",children:[e.replyTo&&jsxRuntime.jsxs("div",{className:"mb-2 p-2 rounded-lg bg-black/5 dark:bg-white/5 border-l-4 border-blue-500 text-xs",children:[jsxRuntime.jsx("p",{className:"font-bold text-blue-500 truncate",children:e.replyTo.senderId===e.senderId?"You":"Other"}),jsxRuntime.jsx("p",{className:"opacity-60 truncate",children:e.replyTo.content})]}),jsxRuntime.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words",children:e.content}),C&&C.map(T=>jsxRuntime.jsx(wi,{url:T},T))]})}};return jsxRuntime.jsxs("div",{className:l("flex w-full mb-4 group/bubble",t?"justify-end":"justify-start",a),children:[!t&&r&&jsxRuntime.jsx("div",{className:"mr-2 mt-auto",children:jsxRuntime.jsx(U,{src:e.contact?.avatar,alt:e.contact?.name||"User",className:"w-8 h-8",fallback:(e.contact?.name||e.senderId||"?").charAt(0).toUpperCase()})}),jsxRuntime.jsxs("div",{className:l("relative max-w-[75%] sm:max-w-[60%] transition-all duration-300",w&&"scale-95 opacity-80"),children:[e.agentName&&jsxRuntime.jsxs("div",{className:l("flex items-center gap-1.5 mb-1 px-2 opacity-50",t?"justify-end":"justify-start"),children:[jsxRuntime.jsx("div",{className:"flex h-4 w-4 items-center justify-center rounded-full bg-white/10",children:jsxRuntime.jsx(lucideReact.User,{size:10,className:"text-blue-400"})}),jsxRuntime.jsxs("span",{className:"text-[10px] font-bold tracking-wider uppercase",children:["Agente: ",e.agentName]})]}),jsxRuntime.jsx(as,{preset:"spring",children:jsxRuntime.jsxs("div",{className:l("relative p-3 rounded-2xl shadow-sm backdrop-blur-md border",e.isInternalNote?"bg-amber-500/10 border-amber-500/20 text-amber-100 italic":t?"bg-blue-600/90 dark:bg-blue-500/20 text-white border-blue-500/20 rounded-tr-none":"bg-white/80 dark:bg-white/[0.05] text-gray-900 dark:text-white border-white/10 rounded-tl-none","hover:shadow-lg hover:shadow-blue-500/5 transition-shadow"),children:[e.isInternalNote&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5 px-1.5 py-0.5 rounded-md bg-amber-500/20 border border-amber-500/30 w-fit",children:[jsxRuntime.jsx(lucideReact.Lock,{size:10,className:"text-amber-500"}),jsxRuntime.jsx("span",{className:"text-[10px] font-bold text-amber-500 uppercase tracking-widest",children:"Nota Interna"})]}),!t&&e.remoteJid?.endsWith("@g.us")&&e.contact?.name&&jsxRuntime.jsx("p",{className:"text-[11px] font-bold text-blue-500 dark:text-blue-400 mb-1 truncate",children:e.contact.name}),k(),jsxRuntime.jsxs("div",{className:"flex items-center justify-end gap-1 mt-1 opacity-60 text-[10px]",children:[jsxRuntime.jsx("span",{children:new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),y()]}),e.reactions&&Object.keys(e.reactions).length>0&&jsxRuntime.jsx("div",{className:"absolute -bottom-3 right-2 flex -space-x-1",children:Object.entries(e.reactions).map(([N,C])=>jsxRuntime.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-white/10 rounded-full px-1.5 py-0.5 text-xs shadow-sm animate-in zoom-in-50",title:C.join(", "),children:N},N))})]})}),jsxRuntime.jsxs("div",{className:l("absolute top-0 opacity-0 group-hover/bubble:opacity-100 transition-opacity flex items-center gap-1",t?"right-full mr-2":"left-full ml-2"),children:[jsxRuntime.jsxs(mt,{children:[jsxRuntime.jsx(ut,{className:"p-1.5 rounded-full hover:bg-gray-100 dark:hover:bg-white/10 text-gray-400 transition-colors",children:jsxRuntime.jsx(lucideReact.Smile,{className:"h-4 w-4"})}),jsxRuntime.jsx(pt,{side:"top",className:"flex gap-1 p-1",children:["\u{1F44D}","\u2764\uFE0F","\u{1F602}","\u{1F62E}","\u{1F622}","\u{1F64F}"].map(N=>jsxRuntime.jsx("button",{onClick:()=>s?.(N),className:"p-1.5 hover:bg-gray-100 dark:hover:bg-white/10 rounded-lg transition-transform hover:scale-125",children:N},N))})]}),jsxRuntime.jsxs(mt,{children:[jsxRuntime.jsx(ut,{className:"p-1.5 rounded-full hover:bg-gray-100 dark:hover:bg-white/10 text-gray-400 transition-colors",children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-4 w-4"})}),jsxRuntime.jsxs(pt,{align:t?"end":"start",children:[jsxRuntime.jsxs(z,{onClick:n,children:[jsxRuntime.jsx(lucideReact.Reply,{className:"h-4 w-4 mr-2"})," Reply"]}),jsxRuntime.jsxs(z,{onClick:m,children:[jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4 mr-2"})," Copy"]}),jsxRuntime.jsxs(z,{onClick:c,children:[jsxRuntime.jsx(lucideReact.Forward,{className:"h-4 w-4 mr-2"})," Forward"]}),jsxRuntime.jsxs(z,{onClick:u,children:[jsxRuntime.jsx(lucideReact.Pin,{className:"h-4 w-4 mr-2"})," Pin"]}),jsxRuntime.jsxs(z,{onClick:()=>p?.(true),children:[jsxRuntime.jsx(lucideReact.Star,{className:"h-4 w-4 mr-2"})," Star"]}),x&&e.type==="text"&&jsxRuntime.jsxs(z,{onClick:x,children:[jsxRuntime.jsx(lucideReact.Volume2,{className:"h-4 w-4 mr-2"})," Listen (TTS)"]}),t&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(z,{onClick:d,children:[jsxRuntime.jsx(lucideReact.Edit2,{className:"h-4 w-4 mr-2"})," Edit"]}),jsxRuntime.jsxs(z,{className:"text-red-500",onClick:i,children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4 mr-2"})," Delete"]})]})]})]})]})]})]})}function Do({date:e,sticky:t=true,className:r,...o}){let a=typeof e=="string"?e:e.toLocaleDateString("pt-BR",{day:"numeric",month:"long",year:"numeric"});return jsxRuntime.jsx("div",{className:l("flex justify-center my-6 z-20",t&&"sticky top-4",r),...o,children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-4 py-1.5 rounded-full bg-white/[0.05] border border-white/10 backdrop-blur-md shadow-lg",children:[jsxRuntime.jsx(lucideReact.Calendar,{size:12,className:"text-white/40"}),jsxRuntime.jsx("span",{className:"text-[11px] font-bold text-white/60 tracking-wider uppercase",children:a})]})})}function EE({messages:e,currentUserId:t,className:r,onReply:o,onReact:a,onDelete:n,onEdit:s,onForward:i,onCopy:d,onPin:c,onStar:m,onSelect:u,onAction:p,onImageClick:g,onTTS:h,onTranscribe:x,hasAi:b,onLoadMore:f,hasMore:v,isLoadingMore:w,selectedMessages:y=[],dateFormat:k="MMMM d, yyyy",groupByDate:N=true,...C}){let[T,E]=Te.useState(true),O=Te.useRef(null),P=Te.useRef(null),S=Te.useCallback((D="auto")=>{P.current?.scrollIntoView({behavior:D});},[]);Te.useEffect(()=>{T&&S("smooth");},[e.length,T,S]);let $=D=>{let M=D.currentTarget,F=Math.abs(M.scrollHeight-M.clientHeight-M.scrollTop)<100;E(F),M.scrollTop===0&&v&&!w&&f&&f();};return e.length===0&&!w?jsxRuntime.jsx("div",{className:l("flex-1 flex items-center justify-center p-8 text-center text-gray-500 dark:text-white/40",r),...C,children:jsxRuntime.jsxs("div",{className:"max-w-sm space-y-4",children:[jsxRuntime.jsx("div",{className:"w-24 h-24 bg-blue-500/10 dark:bg-white/[0.03] rounded-full flex items-center justify-center mx-auto mb-6 animate-pulse",children:jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-12 w-12 text-blue-500"})}),jsxRuntime.jsx("h3",{className:"text-xl font-medium text-gray-900 dark:text-white",children:"No messages yet"}),jsxRuntime.jsx("p",{children:"Start the conversation by sending a message below."})]})}):jsxRuntime.jsxs("div",{className:l("flex-1 relative overflow-hidden",r),...C,children:[jsxRuntime.jsx("div",{ref:O,onScroll:$,className:"h-full overflow-y-auto p-4 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-white/20 [&::-webkit-scrollbar-track]:bg-transparent",children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-4",children:[e.map((D,M)=>{let F=D.senderId===t,re=M>0?e[M-1]:null,J=new Date(D.timestamp),K=re?new Date(re.timestamp):null,fe=N&&(!K||J.toDateString()!==K.toDateString()),ot=!F&&(!re||re.senderId!==D.senderId||fe);return jsxRuntime.jsxs(Te__namespace.default.Fragment,{children:[fe&&jsxRuntime.jsx("div",{className:"my-4",children:jsxRuntime.jsx(Do,{date:D.timestamp})}),jsxRuntime.jsx(So,{message:D,isOwn:F,showAvatar:ot,onReply:()=>o?.(D),onReact:Xe=>a?.(D,Xe),onDelete:()=>n?.(D),onEdit:()=>s?.(D),onForward:()=>i?.(D),onCopy:()=>d?.(D),onPin:()=>c?.(D),onStar:Xe=>m?.(D,Xe),onSelect:()=>u?.(D),onAction:Xe=>p?.(D,Xe),onImageClick:g,onTTS:h?()=>h(D):void 0,onTranscribe:x,hasAi:b,isSelected:y.includes(D.id)})]},D.id)}),jsxRuntime.jsx("div",{ref:P})]})}),!T&&jsxRuntime.jsx("button",{onClick:()=>S("smooth"),className:"absolute bottom-6 right-6 p-3 rounded-full bg-white dark:bg-white/10 backdrop-blur border border-gray-200 dark:border-white/10 shadow-lg text-gray-600 dark:text-white hover:scale-110 transition-all z-10",children:jsxRuntime.jsx(lucideReact.ArrowDown,{className:"h-5 w-5"})})]})}function Ii(){let[e,t]=Te.useState(false),[r,o]=Te.useState(0),[a,n]=Te.useState(null),[s,i]=Te.useState(null),d=Te.useRef(null),c=Te.useRef(null),m=Te.useRef([]),u=Te.useCallback(async()=>{try{let x=await navigator.mediaDevices.getUserMedia({audio:!0}),b=MediaRecorder.isTypeSupported("audio/ogg; codecs=opus")?"audio/ogg; codecs=opus":"audio/webm";d.current=new MediaRecorder(x,{mimeType:b}),m.current=[],d.current.ondataavailable=f=>{f.data.size>0&&m.current.push(f.data);},d.current.onstop=()=>{let f=new Blob(m.current,{type:b}),v=URL.createObjectURL(f);n(f),i(v),x.getTracks().forEach(w=>w.stop());},d.current.start(),t(!0),o(0),c.current=window.setInterval(()=>{o(f=>f+1);},1e3);}catch(x){throw console.error("Failed to start recording",x),x}},[]),p=Te.useCallback(()=>{d.current&&e&&(d.current.stop(),t(false),c.current&&clearInterval(c.current));},[e]),g=Te.useCallback(()=>{d.current&&e&&(d.current.stop(),t(false),c.current&&clearInterval(c.current),n(null),i(null),o(0));},[e]),h=Te.useCallback(()=>{n(null),i(null),o(0);},[]);return {isRecording:e,duration:r,audioBlob:a,audioUrl:s,startRecording:u,stopRecording:p,cancelRecording:g,clearAudio:h}}function Ai({onSend:e,onCancel:t,className:r,...o}){let{isRecording:a,duration:n,audioBlob:s,startRecording:i,stopRecording:d,cancelRecording:c}=Ii();Te.useEffect(()=>(i(),()=>c()),[]);let m=u=>{let p=Math.floor(u/60),g=u%60;return `${p}:${g.toString().padStart(2,"0")}`};return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 p-2 rounded-2xl bg-gray-100 dark:bg-white/[0.03] border border-gray-200 dark:border-white/10 animate-in slide-in-from-bottom-2",r),...o,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-xl bg-red-500/10 text-red-500",children:[jsxRuntime.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500 animate-pulse"}),jsxRuntime.jsx("span",{className:"text-sm font-mono font-bold",children:m(n)})]}),jsxRuntime.jsx("div",{className:"flex-1 h-8 flex items-center gap-0.5 px-2",children:[...Array(20)].map((u,p)=>jsxRuntime.jsx("div",{className:"w-1 bg-red-500/40 rounded-full transition-all duration-150",style:{height:a?`${20+Math.random()*80}%`:"20%",animationDelay:`${p*.05}s`}},p))}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{onClick:()=>{c(),t();},className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-500 transition-colors",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-5 w-5"})}),a?jsxRuntime.jsx(R,{size:"icon",variant:"ghost",onClick:d,className:"rounded-full bg-red-500 text-white hover:bg-red-600",children:jsxRuntime.jsx(lucideReact.Square,{className:"h-4 w-4 fill-current"})}):jsxRuntime.jsx(R,{size:"icon",onClick:()=>s&&e(s,n),className:"rounded-full bg-blue-500 text-white hover:bg-blue-600",children:jsxRuntime.jsx(lucideReact.Send,{className:"h-4 w-4"})})]})]})}function tS({value:e,onValueChange:t,onSend:r,onChange:o,onAttach:a,onMic:n,onVoiceEnd:s,onEmoji:i,onGif:d,onLocation:c,onContact:m,onPoll:u,onPix:p,onCarousel:g,onButtons:h,onList:x,onCancelReply:b,placeholder:f="Type a message...",users:v=[],replyingTo:w,isRecording:y,maxLength:k,disabled:N,className:C,...T}){let[E,O]=Te.useState(""),P=e!==void 0?e:E,S=H=>{t?t(H):O(H);},[$,D]=Te.useState(false),[M,F]=Te.useState(null),[re,J]=Te.useState(0),K=Te.useRef(null),fe=Te.useMemo(()=>M===null?[]:v.filter(H=>H.name.toLowerCase().includes(M.toLowerCase())).slice(0,5),[v,M]),ot=H=>{if(N)return;let I=H.target.value;if(k&&I.length>k)return;S(I),o?.(I);I[H.target.selectionStart-1];let at=I.slice(0,H.target.selectionStart).match(/@(\w*)$/);at?(F(at[1]||""),J(0)):F(null),K.current&&(K.current.style.height="auto",K.current.style.height=`${Math.min(K.current.scrollHeight,300)}px`);},Xe=(H,I=H)=>{if(!K.current)return;let Z=K.current.selectionStart,Se=K.current.selectionEnd,at=P.slice(Z,Se),Wo=P.slice(0,Z),_o=P.slice(Se),dl=Wo+H+at+I+_o;S(dl),setTimeout(()=>{K.current&&(K.current.style.height="auto",K.current.style.height=`${Math.min(K.current.scrollHeight,300)}px`);},0),K.current.focus();},W=H=>{if(!K.current)return;let I=K.current.selectionStart,Z=P.slice(0,I).replace(/@\w*$/,`@${H.name} `),Se=P.slice(I);S(Z+Se),F(null),K.current.focus();},Q=H=>{if(!N){if(M!==null&&fe.length>0){H.key==="ArrowDown"?(H.preventDefault(),J(I=>(I+1)%fe.length)):H.key==="ArrowUp"?(H.preventDefault(),J(I=>(I-1+fe.length)%fe.length)):H.key==="Enter"||H.key==="Tab"?(H.preventDefault(),W(fe[re])):H.key==="Escape"&&F(null);return}H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),V());}},V=()=>{N||!P.trim()&&!y||(r?.(P),S(""),K.current&&(K.current.style.height="auto"));};return jsxRuntime.jsxs("div",{className:l("p-4 bg-white/80 dark:bg-black/40 backdrop-blur relative",C),...T,children:[M!==null&&fe.length>0&&jsxRuntime.jsx("div",{className:"absolute bottom-full left-4 mb-2 w-64 bg-white dark:bg-gray-900 border border-gray-200 dark:border-white/10 rounded-2xl shadow-2xl overflow-hidden animate-in slide-in-from-bottom-4",children:fe.map((H,I)=>jsxRuntime.jsxs("button",{onClick:()=>W(H),className:l("w-full flex items-center gap-3 p-3 text-left transition-colors",I===re?"bg-blue-500/10 dark:bg-white/10":"hover:bg-gray-50 dark:hover:bg-white/5"),children:[jsxRuntime.jsx(U,{src:H.avatar,alt:H.name,className:"w-8 h-8"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-bold dark:text-white",children:H.name}),jsxRuntime.jsxs("p",{className:"text-xs text-gray-500 dark:text-white/40",children:["@",H.name.toLowerCase().replace(/\s/g,"")]})]})]},H.id))}),w&&jsxRuntime.jsxs("div",{className:"mb-3 flex items-center justify-between p-3 rounded-2xl bg-blue-500/5 border-l-4 border-blue-500 animate-in slide-in-from-bottom-2",children:[jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-xs font-bold text-blue-500",children:"Replying to"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-white/60 truncate",children:w.content})]}),jsxRuntime.jsx("button",{onClick:b,className:"p-1.5 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs("div",{className:"flex items-end gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[jsxRuntime.jsxs(mt,{children:[jsxRuntime.jsx(ut,{disabled:N,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-5 w-5"})}),jsxRuntime.jsxs(pt,{align:"start",side:"top",children:[jsxRuntime.jsxs(z,{onClick:a,children:[jsxRuntime.jsx(lucideReact.Image,{className:"h-4 w-4 mr-2"})," Image & Video"]}),jsxRuntime.jsxs(z,{onClick:a,children:[jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-4 w-4 mr-2"})," Document"]}),jsxRuntime.jsxs(z,{onClick:c,children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"h-4 w-4 mr-2"})," Location"]}),jsxRuntime.jsxs(z,{onClick:m,children:[jsxRuntime.jsx(lucideReact.AtSign,{className:"h-4 w-4 mr-2"})," Contact"]}),jsxRuntime.jsxs(z,{onClick:u,children:[jsxRuntime.jsx(lucideReact.AtSign,{className:"h-4 w-4 mr-2"})," Poll"]}),jsxRuntime.jsxs(z,{onClick:p,children:[jsxRuntime.jsx(lucideReact.AtSign,{className:"h-4 w-4 mr-2"})," PIX"]}),jsxRuntime.jsxs(z,{onClick:g,children:[jsxRuntime.jsx(lucideReact.Layout,{className:"h-4 w-4 mr-2"})," Carousel"]}),jsxRuntime.jsxs(z,{onClick:h,children:[jsxRuntime.jsx(lucideReact.Layout,{className:"h-4 w-4 mr-2"})," Buttons"]}),jsxRuntime.jsxs(z,{onClick:x,children:[jsxRuntime.jsx(lucideReact.List,{className:"h-4 w-4 mr-2"})," List Menu"]}),jsxRuntime.jsxs(z,{onClick:d,children:[jsxRuntime.jsx(lucideReact.Gift,{className:"h-4 w-4 mr-2"})," GIF"]})]})]}),jsxRuntime.jsx("button",{onClick:i,disabled:N,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.Smile,{className:"h-5 w-5"})})]}),jsxRuntime.jsx("div",{className:"flex-1 relative",children:y?jsxRuntime.jsx(Ai,{onSend:(H,I)=>s?.(H,I),onCancel:()=>b?.()}):jsxRuntime.jsx("textarea",{ref:K,value:P,onChange:ot,onKeyDown:Q,placeholder:f,disabled:N,rows:2,className:"w-full p-2.5 min-h-[56px] max-h-[300px] rounded-2xl bg-gray-100 dark:bg-white/[0.03] border border-transparent focus:border-blue-500/50 focus:bg-white dark:focus:bg-white/[0.06] text-sm resize-none transition-all outline-none dark:text-white placeholder:text-gray-400 font-medium"})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-1 mb-1",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{onClick:()=>Xe("*"),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 hover:text-blue-500 transition-colors",title:"Bold",children:jsxRuntime.jsx(lucideReact.Bold,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{onClick:()=>Xe("_"),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 hover:text-blue-500 transition-colors",title:"Italic",children:jsxRuntime.jsx(lucideReact.Italic,{className:"h-4 w-4"})})]}),P.trim()||y?jsxRuntime.jsx("button",{onClick:V,disabled:N,className:"p-2.5 rounded-full bg-blue-500 text-white hover:bg-blue-600 shadow-lg shadow-blue-500/20 transition-all active:scale-90",children:jsxRuntime.jsx(lucideReact.Send,{className:"h-5 w-5"})}):jsxRuntime.jsx("button",{onClick:n,disabled:N,className:"p-2.5 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.Mic,{className:"h-5 w-5"})})]})]})]})}function uS({user:e,onClose:t,className:r,...o}){return jsxRuntime.jsxs("div",{className:l("w-80 border-l border-gray-200 dark:border-white/10 bg-white dark:bg-black/20 flex flex-col",r),...o,children:[jsxRuntime.jsxs("div",{className:"h-16 flex items-center px-4 border-b border-gray-200 dark:border-white/10",children:[jsxRuntime.jsx("button",{onClick:t,className:"p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5 text-gray-500"})}),jsxRuntime.jsx("span",{className:"ml-2 font-semibold text-gray-900 dark:text-white",children:"Contact Info"})]}),jsxRuntime.jsxs(ft,{className:"flex-1",children:[jsxRuntime.jsxs("div",{className:"p-6 flex flex-col items-center text-center",children:[jsxRuntime.jsx(U,{src:e.avatar,alt:e.name,fallback:e.name[0],className:"h-24 w-24 mb-4 text-2xl"}),jsxRuntime.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:e.name}),jsxRuntime.jsx("p",{className:"text-sm text-gray-500 dark:text-white/50 mt-1",children:e.phone||"+1 (555) 000-0000"}),jsxRuntime.jsxs("div",{className:"mt-6 w-full",children:[jsxRuntime.jsx("p",{className:"text-sm text-gray-500 dark:text-white/50 mb-1 text-left",children:"About"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-900 dark:text-white text-left",children:e.bio||"Hey there! I am using Pixon Chat."})]})]}),jsxRuntime.jsx(Fr,{}),jsxRuntime.jsxs("div",{className:"p-4 space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-xs font-semibold text-gray-500 dark:text-white/40 uppercase tracking-wider",children:"Media & Docs"}),jsxRuntime.jsx("div",{className:"grid grid-cols-3 gap-2",children:[1,2,3,4,5,6].map(a=>jsxRuntime.jsxs("div",{className:"aspect-square rounded-2xl bg-gray-100 dark:bg-white/[0.03] overflow-hidden relative group cursor-pointer",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-gray-400",children:jsxRuntime.jsx(lucideReact.Image,{className:"h-6 w-6"})}),jsxRuntime.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity"})]},a))})]}),jsxRuntime.jsx(Fr,{}),jsxRuntime.jsx("div",{className:"p-4 space-y-4",children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 text-gray-700 dark:text-white/80",children:[jsxRuntime.jsx(lucideReact.Bell,{className:"h-5 w-5"}),jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"Mute Notifications"})]}),jsxRuntime.jsx(qo,{})]})}),jsxRuntime.jsx(Fr,{}),jsxRuntime.jsxs("div",{className:"p-4 space-y-2",children:[jsxRuntime.jsxs("button",{className:"w-full flex items-center gap-3 p-3 rounded-2xl hover:bg-red-50 dark:hover:bg-red-500/10 text-red-600 dark:text-red-400 transition-colors text-sm font-medium",children:[jsxRuntime.jsx(lucideReact.Ban,{className:"h-5 w-5"}),"Block ",e.name]}),jsxRuntime.jsxs("button",{className:"w-full flex items-center gap-3 p-3 rounded-2xl hover:bg-red-50 dark:hover:bg-red-500/10 text-red-600 dark:text-red-400 transition-colors text-sm font-medium",children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-5 w-5"}),"Delete Chat"]})]})]})]})}function bS({users:e=[],variant:t="default",className:r,...o}){let a=e.length===0?"Someone is typing":e.length===1?`${e[0]} is typing`:e.length===2?`${e[0]} and ${e[1]} are typing`:`${e[0]} and ${e.length-1} others are typing`;return t==="bubble"?jsxRuntime.jsx("div",{className:l("flex items-center gap-1 px-3 py-2 rounded-2xl bg-gray-100 dark:bg-white/[0.03] w-fit",r),...o,children:jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce [animation-delay:-0.3s]"}),jsxRuntime.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce [animation-delay:-0.15s]"}),jsxRuntime.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce"})]})}):jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 text-xs text-gray-500 dark:text-white/40 italic",r),...o,children:[jsxRuntime.jsxs("div",{className:"flex gap-0.5",children:[jsxRuntime.jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.3s]"}),jsxRuntime.jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.15s]"}),jsxRuntime.jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce"})]}),a]})}function yS({message:e,onCancel:t,className:r,...o}){return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 p-2 rounded-xl bg-blue-500/5 border-l-4 border-blue-500 animate-in slide-in-from-bottom-2",r),...o,children:[jsxRuntime.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/10 text-blue-500",children:jsxRuntime.jsx(lucideReact.Reply,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-xs font-bold text-blue-500",children:"Replying to"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-white/60 truncate",children:e.content})]}),t&&jsxRuntime.jsx("button",{onClick:t,className:"p-1 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400 transition-colors",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})}function MS({type:e="info",message:t,action:r,onClose:o,className:a,...n}){let s={info:lucideReact.Info,warning:lucideReact.AlertCircle,error:lucideReact.AlertCircle,success:lucideReact.CheckCircle2},i={info:"bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20",warning:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20",error:"bg-red-500/10 text-red-600 dark:text-red-400 border-red-500/20",success:"bg-green-500/10 text-green-600 dark:text-green-400 border-green-500/20"},d=s[e];return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 px-4 py-2 border-b text-sm animate-in slide-in-from-top duration-300",i[e],a),...n,children:[jsxRuntime.jsx(d,{className:"h-4 w-4 shrink-0"}),jsxRuntime.jsx("p",{className:"flex-1 font-medium",children:t}),r&&jsxRuntime.jsx("button",{onClick:r.onClick,className:"text-xs font-bold uppercase tracking-wider hover:underline",children:r.label}),o&&jsxRuntime.jsx("button",{onClick:o,className:"p-1 rounded-full hover:bg-black/5 dark:hover:bg-white/5 transition-colors",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})}function IS({src:e,duration:t,isMe:r,className:o,...a}){let[n,s]=Te.useState(false),[i,d]=Te.useState(0),[c,m]=Te.useState(false),u=Te.useRef(null),p=()=>{u.current&&(n?u.current.pause():u.current.play(),s(!n));},g=()=>{u.current&&d(u.current.currentTime);},h=()=>{s(false),d(0);},x=f=>{let v=Math.floor(f/60),w=Math.floor(f%60);return `${v}:${w.toString().padStart(2,"0")}`},b=t?i/t*100:0;return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 p-2 rounded-2xl min-w-[200px]",r?"bg-white/10":"bg-gray-100 dark:bg-white/[0.03]",o),...a,children:[jsxRuntime.jsx("audio",{ref:u,src:e,onTimeUpdate:g,onEnded:h}),jsxRuntime.jsx("button",{onClick:p,className:l("w-10 h-10 rounded-full flex items-center justify-center transition-all",r?"bg-white text-blue-600":"bg-blue-500 text-white"),children:n?jsxRuntime.jsx(lucideReact.Pause,{className:"h-5 w-5 fill-current"}):jsxRuntime.jsx(lucideReact.Play,{className:"h-5 w-5 fill-current ml-0.5"})}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[jsxRuntime.jsx("div",{className:"h-1.5 w-full bg-gray-300 dark:bg-white/10 rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:l("h-full transition-all duration-100",r?"bg-white":"bg-blue-500"),style:{width:`${b}%`}})}),jsxRuntime.jsxs("div",{className:"flex justify-between text-[10px] font-medium opacity-60",children:[jsxRuntime.jsx("span",{children:x(i)}),jsxRuntime.jsx("span",{children:t?x(t):"--:--"})]})]}),jsxRuntime.jsx("button",{onClick:()=>m(!c),className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/5 opacity-60",children:c?jsxRuntime.jsx(lucideReact.VolumeX,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Volume2,{className:"h-4 w-4"})})]})}function zS({date:e,className:t,...r}){return jsxRuntime.jsx("div",{className:l("flex justify-center sticky top-0 z-10 py-4",t),...r,children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 rounded-full bg-gray-100/80 dark:bg-white/5 backdrop-blur text-[10px] font-bold uppercase tracking-wider text-gray-500 dark:text-white/40 border border-gray-200 dark:border-white/10 shadow-sm",children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-3 w-3"}),e]})})}function US({status:e="offline",size:t="md",className:r,...o}){let a={online:"bg-green-500",offline:"bg-gray-400",away:"bg-amber-500",busy:"bg-red-500"},n={sm:"h-2 w-2",md:"h-3 w-3",lg:"h-4 w-4"};return jsxRuntime.jsx("span",{className:l("rounded-full border-2 border-white dark:border-black shrink-0",a[e],n[t],e==="online"&&"animate-pulse",r),...o})}function XS({content:e,className:t,...r}){return jsxRuntime.jsx("div",{className:l("flex justify-center py-2",t),...r,children:jsxRuntime.jsx("div",{className:"px-4 py-1 rounded-lg bg-gray-100/50 dark:bg-white/[0.02] text-[11px] font-medium text-gray-500 dark:text-white/30 border border-gray-200/50 dark:border-white/5",children:e})})}function eD({group:e,onBack:t,onInfo:r,isTyping:o,typingUsers:a=[],className:n,...s}){let i=a.length>0?`${a.join(", ")} ${a.length===1?"is":"are"} typing...`:"typing...";return jsxRuntime.jsxs("div",{className:l("flex h-16 items-center justify-between border-b border-gray-200 dark:border-white/10 bg-white/80 dark:bg-black/40 backdrop-blur px-4 sticky top-0 z-10",n),...s,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx("button",{onClick:t,className:"md:hidden p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.ArrowLeft,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),jsxRuntime.jsx("div",{className:"relative cursor-pointer",onClick:r,children:jsxRuntime.jsxs("div",{className:"flex -space-x-3",children:[e.members.slice(0,2).map((d,c)=>jsxRuntime.jsx(U,{src:d.avatar,alt:d.name,fallback:d.name[0],className:l("border-2 border-white dark:border-black",c===0?"z-10":"z-0")},d.id)),e.members.length>2&&jsxRuntime.jsxs("div",{className:"w-10 h-10 rounded-full bg-gray-200 dark:bg-white/10 border-2 border-white dark:border-black flex items-center justify-center text-[10px] font-bold text-gray-600 dark:text-white/60 z-0",children:["+",e.members.length-2]})]})}),jsxRuntime.jsxs("div",{className:"cursor-pointer min-w-0",onClick:r,children:[jsxRuntime.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white leading-none truncate",children:e.name}),jsxRuntime.jsx("p",{className:l("text-xs mt-1 truncate transition-colors",o?"text-blue-500 font-medium animate-pulse":"text-gray-500 dark:text-white/50"),children:o?i:`${e.members.length} members`})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Phone,{className:"h-5 w-5"})}),jsxRuntime.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Video,{className:"h-5 w-5"})}),jsxRuntime.jsx("button",{onClick:r,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-5 w-5"})})]})]})}function sD({users:e,selectedIndex:t,onSelect:r,className:o,...a}){return e.length===0?null:jsxRuntime.jsx(ce,{className:l("w-64 overflow-hidden shadow-xl animate-in fade-in slide-in-from-bottom-2",o),...a,children:jsxRuntime.jsxs("div",{className:"p-1",children:[jsxRuntime.jsx("div",{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-wider text-gray-400 border-b border-gray-200 dark:border-white/5 mb-1",children:"Mention someone"}),e.map((n,s)=>jsxRuntime.jsxs("button",{onClick:()=>r(n),className:l("w-full flex items-center gap-2 p-2 rounded-xl text-left transition-colors",s===t?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-white/[0.06]"),children:[jsxRuntime.jsx(U,{src:n.avatar,alt:n.name,fallback:n.name[0],size:"sm"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium truncate",children:n.name}),n.status&&jsxRuntime.jsx("p",{className:l("text-[10px]",s===t?"text-white/70":"text-gray-500"),children:n.status})]})]},n.id))]})})}var lb=[{name:"Smileys",emojis:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F602}","\u{1F923}","\u{1F60A}","\u{1F607}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60C}","\u{1F60D}","\u{1F970}","\u{1F618}","\u{1F617}","\u{1F619}","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61D}","\u{1F61C}","\u{1F92A}","\u{1F928}","\u{1F9D0}","\u{1F913}","\u{1F60E}","\u{1F929}","\u{1F973}","\u{1F60F}","\u{1F612}","\u{1F61E}","\u{1F614}","\u{1F61F}","\u{1F615}","\u{1F641}","\u2639\uFE0F","\u{1F623}","\u{1F616}","\u{1F62B}","\u{1F629}","\u{1F97A}","\u{1F622}","\u{1F62D}","\u{1F624}","\u{1F620}","\u{1F621}","\u{1F92C}","\u{1F92F}","\u{1F633}","\u{1F975}","\u{1F976}","\u{1F631}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F613}","\u{1F917}","\u{1F914}","\u{1F92D}","\u{1F92B}","\u{1F925}","\u{1F636}","\u{1F610}","\u{1F611}","\u{1F62C}","\u{1F644}","\u{1F62F}","\u{1F626}","\u{1F627}","\u{1F62E}","\u{1F632}","\u{1F971}","\u{1F634}","\u{1F924}","\u{1F62A}","\u{1F635}","\u{1F910}","\u{1F974}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F637}","\u{1F912}","\u{1F915}"]},{name:"Hearts",emojis:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}"]},{name:"Gestures",emojis:["\u{1F44D}","\u{1F44E}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9B5}","\u{1F9BF}","\u{1F9B6}","\u{1F463}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}"]},{name:"Activities",emojis:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}"]},{name:"Nature",emojis:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F43B}\u200D\u2744\uFE0F","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1F99F}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}","\u{1F9AC}","\u{1F403}","\u{1F402}","\u{1F404}","\u{1F40E}","\u{1F416}","\u{1F40F}","\u{1F411}","\u{1F410}","\u{1F98C}","\u{1F415}","\u{1F429}","\u{1F9AE}","\u{1F415}\u200D\u{1F9BA}","\u{1F408}","\u{1F408}\u200D\u2B1B","\u{1F413}","\u{1F983}","\u{1F99A}","\u{1F99C}","\u{1F9A2}","\u{1F9A9}","\u{1F54A}\uFE0F","\u{1F407}","\u{1F99D}","\u{1F9A8}","\u{1F9A1}","\u{1F9AB}","\u{1F9A6}","\u{1F9A5}","\u{1F401}","\u{1F400}","\u{1F43F}\uFE0F","\u{1F994}","\u{1F43E}","\u{1F409}","\u{1F432}","\u{1F335}","\u{1F384}","\u{1F332}","\u{1F333}","\u{1F334}","\u{1FAB5}","\u{1F331}","\u{1F33F}","\u2618\uFE0F","\u{1F340}","\u{1F38D}","\u{1FAB4}","\u{1F38B}","\u{1F343}","\u{1F342}","\u{1F341}","\u{1F344}","\u{1F41A}","\u{1FAA8}","\u{1F33E}","\u{1F490}","\u{1F337}","\u{1F339}","\u{1F940}","\u{1F33A}","\u{1F338}","\u{1F33C}","\u{1F33B}","\u{1F31E}","\u{1F31D}","\u{1F31B}","\u{1F31C}","\u{1F31A}","\u{1F315}","\u{1F316}","\u{1F317}","\u{1F318}","\u{1F311}","\u{1F312}","\u{1F313}","\u{1F314}","\u{1F319}","\u{1F30E}","\u{1F30D}","\u{1F30F}","\u{1FA90}","\u{1F4AB}","\u2B50\uFE0F","\u{1F31F}","\u2728","\u26A1\uFE0F","\u2604\uFE0F","\u{1F4A5}","\u{1F525}","\u{1F32A}\uFE0F","\u{1F308}","\u2600\uFE0F","\u{1F324}\uFE0F","\u26C5\uFE0F","\u{1F325}\uFE0F","\u2601\uFE0F","\u{1F326}\uFE0F","\u{1F327}\uFE0F","\u26C8\uFE0F","\u{1F329}\uFE0F","\u{1F328}\uFE0F","\u2744\uFE0F","\u2603\uFE0F","\u26C4\uFE0F","\u{1F32C}\uFE0F","\u{1F4A8}","\u{1F4A7}","\u{1F4A6}","\u2614\uFE0F","\u2602\uFE0F","\u{1F30A}","\u{1F32B}\uFE0F"]}];function fD({onSelect:e,className:t,...r}){let[o,a]=Te.useState(""),n=lb.map(s=>({...s,emojis:s.emojis.filter(i=>o===""||i.includes(o))})).filter(s=>s.emojis.length>0);return jsxRuntime.jsxs(ce,{className:l("w-72 h-96 flex flex-col overflow-hidden shadow-2xl",t),...r,children:[jsxRuntime.jsx("div",{className:"p-3 border-b border-gray-200 dark:border-white/10",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),jsxRuntime.jsx("input",{type:"text",value:o,onChange:s=>a(s.target.value),placeholder:"Search emoji...",className:"w-full h-8 pl-8 pr-3 rounded-lg bg-gray-100 dark:bg-white/5 text-xs focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all"})]})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto p-2 custom-scrollbar",children:n.map(s=>jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("h4",{className:"text-[10px] font-bold uppercase tracking-wider text-gray-400 px-2 mb-2",children:s.name}),jsxRuntime.jsx("div",{className:"grid grid-cols-8 gap-1",children:s.emojis.map(i=>jsxRuntime.jsx("button",{onClick:()=>e(i),className:"h-8 w-8 flex items-center justify-center rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-lg transition-colors",children:i},i))})]},s.name))})]})}function ND({onSearch:e,results:t,onResultClick:r,onClose:o,className:a,...n}){let[s,i]=Te.useState(""),d=c=>{let m=c.target.value;i(m),e(m);};return jsxRuntime.jsxs("div",{className:l("flex flex-col h-full bg-white dark:bg-gray-900 border-l border-gray-200 dark:border-white/10 animate-in slide-in-from-right duration-300",a),...n,children:[jsxRuntime.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-white/10 flex items-center justify-between",children:[jsxRuntime.jsx("h3",{className:"font-bold text-gray-900 dark:text-white",children:"Search Messages"}),jsxRuntime.jsx("button",{onClick:o,className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-white/10",children:jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5 text-gray-500"})})]}),jsxRuntime.jsx("div",{className:"p-4",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),jsxRuntime.jsx("input",{type:"text",value:s,onChange:d,placeholder:"Search in conversation...",className:"w-full h-10 pl-10 pr-4 rounded-xl bg-gray-100 dark:bg-white/5 border-none text-sm focus:ring-2 focus:ring-blue-500/50 transition-all",autoFocus:true})]})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:s&&t.length===0?jsxRuntime.jsx("div",{className:"p-8 text-center text-gray-500 dark:text-white/30",children:jsxRuntime.jsxs("p",{className:"text-sm",children:['No messages found for "',s,'"']})}):jsxRuntime.jsx("div",{className:"space-y-1",children:t.map(c=>jsxRuntime.jsxs("button",{onClick:()=>r(c),className:"w-full p-3 rounded-xl hover:bg-gray-100 dark:hover:bg-white/5 text-left transition-all group",children:[jsxRuntime.jsxs("div",{className:"flex justify-between mb-1",children:[jsxRuntime.jsx("span",{className:"text-[10px] font-bold text-blue-500 uppercase",children:c.timestamp.toLocaleDateString()}),jsxRuntime.jsx("span",{className:"text-[10px] text-gray-400",children:c.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),jsxRuntime.jsx("p",{className:"text-sm text-gray-700 dark:text-white/70 line-clamp-2 group-hover:text-gray-900 dark:group-hover:text-white",children:c.content})]},c.id))})})]})}function ln(e){let[t,r]=Te.useState(false),[o,a]=Te.useState({x:0,y:0}),n=Te.useRef({x:0,y:0}),s=Te.useRef({x:0,y:0}),i=Te.useRef(Date.now()),d=Te.useRef({x:0,y:0}),c=Te.useCallback((p,g)=>{r(true),n.current={x:p-o.x,y:g-o.y},s.current={x:p,y:g},i.current=Date.now();},[o]),m=Te.useCallback((p,g)=>{if(!t)return;let h=p-n.current.x,x=g-n.current.y,b=Date.now(),f=b-i.current;f>0&&(d.current={x:(p-s.current.x)/f,y:(g-s.current.y)/f}),a({x:h,y:x}),s.current={x:p,y:g},i.current=b,e?.({isDragging:true,offset:{x:h,y:x},velocity:d.current});},[t,e]),u=Te.useCallback(()=>{r(false),e?.({isDragging:false,offset:o,velocity:d.current});},[o,e]);return Te.useEffect(()=>{let p=b=>m(b.clientX,b.clientY),g=b=>{b.touches[0]&&m(b.touches[0].clientX,b.touches[0].clientY);},h=()=>u(),x=()=>u();return t&&(window.addEventListener("mousemove",p),window.addEventListener("mouseup",h),window.addEventListener("touchmove",g),window.addEventListener("touchend",x)),()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",h),window.removeEventListener("touchmove",g),window.removeEventListener("touchend",x);}},[t,m,u]),{isDragging:t,offset:o,dragProps:{onMouseDown:p=>c(p.clientX,p.clientY),onTouchStart:p=>{p.touches[0]&&c(p.touches[0].clientX,p.touches[0].clientY);},style:{cursor:t?"grabbing":"grab",touchAction:"none"}}}}function BD({isOpen:e,onClose:t,url:r,type:o="image",fileName:a,caption:n}){let[s,i]=Te.useState(1),[d,c]=Te.useState(0),m=ln();Te.useEffect(()=>(e?document.body.style.overflow="hidden":(document.body.style.overflow="auto",i(1),c(0),m.offset.x=0,m.offset.y=0),()=>{document.body.style.overflow="auto";}),[e]);let u=()=>i(h=>Math.min(h+.5,3)),p=()=>i(h=>Math.max(h-.5,.5)),g=()=>c(h=>(h+90)%360);return e?jsxRuntime.jsx(Lo,{present:e,exitDuration:300,children:jsxRuntime.jsxs(Rt,{preset:"fade",className:"fixed inset-0 z-[9999] flex flex-col bg-black/95 backdrop-blur-2xl overflow-hidden",onKeyDown:h=>h.key==="Escape"&&t(),tabIndex:0,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-4 bg-gradient-to-b from-black/50 to-transparent shrink-0",children:[jsxRuntime.jsx("div",{className:"flex items-center gap-3",children:jsxRuntime.jsxs("div",{className:"text-white",children:[jsxRuntime.jsx("p",{className:"text-sm font-bold truncate max-w-[200px]",children:a||"Arquivo de M\xEDdia"}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/50",children:"WhatsApp Media Viewer"})]})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("button",{onClick:p,className:"p-2.5 rounded-full hover:bg-white/10 text-white transition-all",children:jsxRuntime.jsx(lucideReact.ZoomOut,{size:20})}),jsxRuntime.jsx("button",{onClick:u,className:"p-2.5 rounded-full hover:bg-white/10 text-white transition-all",children:jsxRuntime.jsx(lucideReact.ZoomIn,{size:20})}),jsxRuntime.jsx("button",{onClick:g,className:"p-2.5 rounded-full hover:bg-white/10 text-white transition-all",children:jsxRuntime.jsx(lucideReact.RotateCw,{size:20})}),jsxRuntime.jsx("div",{className:"w-px h-6 bg-white/10 mx-1"}),jsxRuntime.jsx("button",{onClick:t,className:"p-2.5 rounded-full bg-white/10 hover:bg-rose-500 text-white transition-all shadow-xl",children:jsxRuntime.jsx(lucideReact.X,{size:20})})]})]}),jsxRuntime.jsx("div",{className:"flex-1 relative flex items-center justify-center p-4 sm:p-12 overflow-hidden",children:jsxRuntime.jsx("div",{...m.dragProps,className:"relative max-w-full max-h-full",style:{...m.dragProps.style,transform:`translate3d(${m.offset.x}px, ${m.offset.y}px, 0) scale(${s}) rotate(${d}deg)`,transition:m.isDragging?"none":"transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1)"},children:o==="image"?jsxRuntime.jsx("img",{src:r,alt:n||"Media",className:"max-w-full max-h-[80vh] object-contain rounded-lg shadow-[0_0_100px_rgba(0,0,0,0.5)] select-none pointer-events-none"}):jsxRuntime.jsx("video",{src:r,controls:true,autoPlay:true,className:"max-w-full max-h-[80vh] rounded-lg shadow-2xl"})})}),n&&jsxRuntime.jsx("div",{className:"p-8 text-center bg-gradient-to-t from-black/50 to-transparent",children:jsxRuntime.jsx("p",{className:"text-white text-base font-medium max-w-2xl mx-auto drop-shadow-md",children:n})})]})}):null}function Xi({itemCount:e,itemHeight:t,overscan:r=5,initialScrollTop:o=0,startAtBottom:a=false}){let[n,s]=Te.useState(o),[i,d]=Te.useState(0),c=Te.useRef(null),m=Te.useRef(false),u=Te.useCallback(f=>typeof t=="function"?t(f):t,[t]);Te.useLayoutEffect(()=>{if(c.current){let f=new ResizeObserver(v=>{for(let w of v)d(w.contentRect.height);});return f.observe(c.current),o>0&&(c.current.scrollTop=o),()=>f.disconnect()}},[o]);let p=Te.useCallback(f=>{s(f.currentTarget.scrollTop);},[]),{visibleItems:g,totalHeight:h,startIndex:x}=Te.useMemo(()=>{let f=0,v=[];for(let T=0;T<e;T++)v.push(f),f+=u(T);let w=0,k=0,N=e-1;for(;k<=N;){let T=Math.floor((k+N)/2),E=v[T];E!==void 0&&E<=n?(w=T,k=T+1):N=T-1;}w=Math.max(0,w-r);let C=[];for(let T=w;T<e;T++){let E=v[T];if(E===void 0||E>n+i+r*u(T))break;C.push({index:T,offsetTop:E,height:u(T)});}return {visibleItems:C,totalHeight:f,startIndex:w}},[n,i,e,u,r]);Te.useLayoutEffect(()=>{if(a&&!m.current&&h>0&&c.current&&i>0){let f=c.current,v=h-i;v>0&&(f.scrollTop=v,s(v)),m.current=true;}},[h,i,a]);let b=Te.useCallback((f,v="auto")=>{if(c.current){let w=0;for(let y=0;y<f;y++)w+=u(y);c.current.scrollTo({top:w,behavior:v});}},[u]);return {containerRef:c,visibleItems:g,totalHeight:h,startIndex:x,onScroll:p,scrollToIndex:b,scrollToBottom:(f="auto")=>{c.current&&c.current.scrollTo({top:c.current.scrollHeight,behavior:f});}}}function _D({messages:e,currentUserId:t,onReply:r,onImageClick:o,className:a,itemHeight:n=80}){let{containerRef:s,visibleItems:i,totalHeight:d,onScroll:c}=Xi({itemCount:e.length,itemHeight:n,startAtBottom:true,overscan:10});return jsxRuntime.jsx("div",{ref:s,onScroll:c,className:l("flex-1 overflow-y-auto relative no-scrollbar",a),children:jsxRuntime.jsx("div",{className:"w-full relative",style:{height:`${d}px`},children:i.map(({index:m,offsetTop:u,height:p})=>{let g=e[m];if(!g)return null;let h=m>0?e[m-1]:null,x=!h||new Date(h.timestamp).toDateString()!==new Date(g.timestamp).toDateString();return jsxRuntime.jsxs("div",{className:"absolute left-0 w-full px-4",style:{top:`${u}px`,height:`${p}px`},children:[x&&jsxRuntime.jsx(Do,{date:g.timestamp,sticky:false}),jsxRuntime.jsx(So,{message:g,isOwn:g.senderId===t,onReply:()=>r?.(g),onImageClick:o})]},g.id)})})})}var dn=class{constructor(){this.state={conversations:new Map,messages:new Map,activeChatId:null,presence:new Map};this.listeners=new Set;this.getState=()=>this.state;this.subscribe=t=>(this.listeners.add(t),()=>this.listeners.delete(t));}emitChange(t){this.state=t;for(let r of this.listeners)r();}setConversations(t){this.emitChange({...this.state,conversations:new Map(t.map(r=>[r.id,r]))});}upsertConversation(t){let r=new Map(this.state.conversations),o=r.get(t.id);r.set(t.id,{...o||{unreadCount:0},...t}),this.emitChange({...this.state,conversations:r});}setMessages(t,r){let o=new Map(this.state.messages);o.set(t,r),this.emitChange({...this.state,messages:o});}addMessage(t,r){let o=this.state.messages.get(t)||[];if(o.some(i=>i.id===r.id))return;let a=new Map(this.state.messages);a.set(t,[...o,r]);let n={...this.state,messages:a},s=this.state.conversations.get(t);if(s){let i=new Map(this.state.conversations);i.set(t,{...s,lastMessage:r,unreadCount:this.state.activeChatId===t?0:(s.unreadCount||0)+1}),n.conversations=i;}this.emitChange(n);}updateMessageStatus(t,r,o){let a=this.state.messages.get(t);if(!a)return;let n=a.findIndex(s=>s.id===r);if(n!==-1){let s=[...a],i=s[n];if(i){s[n]={...i,status:o};let d=new Map(this.state.messages);d.set(t,s),this.emitChange({...this.state,messages:d});}}}updateMessage(t,r,o){let a=this.state.messages.get(t);if(!a)return;let n=a.findIndex(s=>s.id===r);if(n!==-1){let s=[...a];s[n]={...s[n],...o};let i=new Map(this.state.messages);i.set(t,s),this.emitChange({...this.state,messages:i});}}addReaction(t,r,o,a){let n=this.state.messages.get(t);if(!n)return;let s=n.findIndex(i=>i.id===r);if(s!==-1){let i=[...n],d={...i[s]},c={...d.reactions||{}},m=[...c[o]||[]];if(!m.includes(a)){m.push(a),c[o]=m,d.reactions=c,i[s]=d;let u=new Map(this.state.messages);u.set(t,i),this.emitChange({...this.state,messages:u});}}}removeReaction(t,r,o,a){let n=this.state.messages.get(t);if(!n)return;let s=n.findIndex(i=>i.id===r);if(s!==-1){let i=[...n],d={...i[s]},c={...d.reactions||{}};if(c[o]){c[o]=c[o].filter(u=>u!==a),c[o].length===0&&delete c[o],d.reactions=c,i[s]=d;let m=new Map(this.state.messages);m.set(t,i),this.emitChange({...this.state,messages:m});}}}deleteMessage(t,r){let o=this.state.messages.get(t);if(!o)return;let a=o.findIndex(n=>n.id===r);if(a!==-1){let n=[...o];n[a]={...n[a],type:"revoked",content:"Esta mensagem foi apagada",attachments:[],reactions:{}};let s=new Map(this.state.messages);s.set(t,n),this.emitChange({...this.state,messages:s});}}setActiveChat(t){let r={...this.state,activeChatId:t};if(t){let o=this.state.conversations.get(t);if(o&&o.unreadCount>0){let a=new Map(this.state.conversations);a.set(t,{...o,unreadCount:0}),r.conversations=a;}}this.emitChange(r);}setUserPresence(t,r){let o=new Map(this.state.presence);o.set(t,r),this.emitChange({...this.state,presence:o});}},rt=new dn;function Ko(e){let t=Te.useSyncExternalStore(rt.subscribe,rt.getState);return Te.useMemo(()=>e(t),[t,e])}var kb=e=>Array.from(e.conversations.values()).sort((t,r)=>{if(t.isPinned&&!r.isPinned)return -1;if(!t.isPinned&&r.isPinned)return 1;let o=t.lastMessage?.timestamp.getTime()||0;return (r.lastMessage?.timestamp.getTime()||0)-o});function qD(){return Ko(kb)}function GD(e){let t=Te.useCallback(r=>e?r.messages.get(e)||[]:[],[e]);return Ko(t)}function JD(){let e=Te.useCallback(t=>t.activeChatId?t.conversations.get(t.activeChatId):null,[]);return Ko(e)}function QD(e){let t=Te.useCallback(r=>r.presence.get(e)||"unavailable",[e]);return Ko(t)}function un({url:e,token:t,rooms:r=[],onConnect:o,onDisconnect:a,onError:n}){let s=Te.useRef(null);Te.useEffect(()=>{let c=socket_ioClient.io(e,{auth:{token:t},transports:["websocket"],reconnectionAttempts:5,reconnectionDelay:1e3});return s.current=c,c.on("connect",()=>{console.log("Socket connected:",c.id),r.forEach(m=>c.emit("join",m)),o?.();}),c.on("disconnect",m=>{console.log("Socket disconnected:",m),a?.();}),c.on("connect_error",m=>{console.error("Socket connection error:",m),n?.(m);}),()=>{c.disconnect();}},[e,t,r,o,a,n]);let i=Te.useCallback((c,m)=>{s.current?.connected?s.current.emit(c,m):console.warn("Socket not connected. Event buffered or dropped:",c);},[]),d=Te.useCallback((c,m)=>(s.current?.on(c,m),()=>{s.current?.off(c,m);}),[]);return {socket:s.current,emit:i,on:d,isConnected:s.current?.connected||false}}function i3(e,t){let{on:r,emit:o,isConnected:a}=un({url:e,token:t});return Te.useEffect(()=>{r("chats.set",n=>{rt.setConversations(n);}),r("chats.upsert",n=>{n.forEach(s=>rt.upsertConversation(s));}),r("chats.update",n=>{n.forEach(s=>{s.id&&rt.upsertConversation(s);});}),r("messages.upsert",({chatId:n,messages:s})=>{s.forEach(i=>rt.addMessage(n,i));}),r("messages.update",({chatId:n,messageId:s,status:i})=>{rt.updateMessageStatus(n,s,i);}),r("presence.update",({userId:n,status:s})=>{rt.setUserPresence(n,s);}),r("groups.update",n=>{n.forEach(s=>{rt.upsertConversation({id:s.id,group:s});});});},[r]),{isConnected:a,emit:o}}function l3(e,t){let{emit:r}=un({url:""});return {setPresence:a=>{r("presence.send",{chatId:e,userId:t,status:a});}}}function c3(){return {uploadMedia:async(t,r)=>({url:"...",thumbnail:"...",blurhash:"..."})}}function d3(e){return {search:r=>r?e.filter(o=>o.content.toLowerCase().includes(r.toLowerCase())):e}}function qi(){let[e,t]=Te.useState({scrollX:0,scrollY:0,scrollProgressX:0,scrollProgressY:0}),r=Te.useRef(false),o=Te.useCallback(()=>{r.current||(window.requestAnimationFrame(()=>{let a=window.scrollX,n=window.scrollY,s=document.documentElement.scrollWidth-document.documentElement.clientWidth,i=document.documentElement.scrollHeight-document.documentElement.clientHeight;t({scrollX:a,scrollY:n,scrollProgressX:s>0?a/s:0,scrollProgressY:i>0?n/i:0}),r.current=false;}),r.current=true);},[]);return Te.useEffect(()=>(window.addEventListener("scroll",o,{passive:true}),o(),()=>window.removeEventListener("scroll",o)),[o]),e}function b3({className:e,color:t="bg-blue-500",height:r=2,position:o="top",...a}){let{scrollProgressY:n}=qi();return jsxRuntime.jsx("div",{className:l("fixed left-0 right-0 z-[100] w-full pointer-events-none",o==="top"?"top-0":"bottom-0",e),style:{height:r},...a,children:jsxRuntime.jsx("div",{className:l("h-full transition-all duration-75 ease-out",t),style:{width:`${n*100}%`,boxShadow:n>0?`0 0 10px ${t.replace("bg-","var(--")}`:"none"}})})}var Db=Te__namespace.default.forwardRef(({orientation:e="horizontal",className:t,...r},o)=>jsxRuntime.jsx("hr",{ref:o,className:l("border-0 bg-gray-200 dark:bg-white/10",{"h-px w-full":e==="horizontal","h-full w-px":e==="vertical"},t),...r}));Db.displayName="Divider";var Ab=Te__namespace.default.forwardRef(({children:e,className:t,...r},o)=>jsxRuntime.jsx("kbd",{ref:o,className:l("rounded-lg border border-gray-200 dark:border-white/10 bg-gray-100 dark:bg-white/[0.03] px-2 py-1 text-[11px] font-semibold text-gray-500 dark:text-white/65",t),...r,children:e}));Ab.displayName="Kbd";var Kb={theme:"system",setTheme:()=>null},Qi=Te.createContext(Kb);function P3({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...o}){let[a,n]=Te.useState(t);Te.useEffect(()=>{let i=localStorage.getItem(r);i&&n(i);},[r]),Te.useEffect(()=>{let i=window.document.documentElement;if(i.classList.remove("light","dark"),a==="system"){let d=window.matchMedia("(prefers-color-scheme: dark)"),c=()=>{i.classList.remove("light","dark"),i.classList.add(d.matches?"dark":"light");};return c(),d.addEventListener("change",c),()=>d.removeEventListener("change",c)}i.classList.add(a);},[a]);let s={theme:a,setTheme:i=>{localStorage.setItem(r,i),n(i);}};return jsxRuntime.jsx(Qi.Provider,{...o,value:s,children:e})}var Zi=()=>{let e=Te.useContext(Qi);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function B3({className:e}){let{setTheme:t,theme:r}=Zi();return jsxRuntime.jsxs(R,{variant:"ghost",size:"icon",className:l("h-9 w-9",e),onClick:()=>t(r==="light"?"dark":"light"),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsxRuntime.jsx(lucideReact.Moon,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function Xb(e,t=true){let[r,o]=Te.useState({data:null,error:null,isLoading:false}),a=Te.useCallback(async()=>{o({data:null,error:null,isLoading:true});try{let n=await e();return o({data:n,error:null,isLoading:!1}),n}catch(n){throw o({data:null,error:n,isLoading:false}),n}},[e]);return Te.useEffect(()=>{t&&a();},[a,t]),{...r,execute:a}}function K3(e,t){let r=Te.useCallback(()=>fetch(e,t).then(o=>o.json()),[e,t]);return Xb(r)}function U3({initialMessages:e=[],onSendMessage:t,scrollThreshold:r=100}={}){let[o,a]=Te.useState(e),[n,s]=Te.useState(false),[i,d]=Te.useState(false),c=Te.useRef(null),m=Te.useRef(true),u=Te.useCallback((x="smooth")=>{c.current&&c.current.scrollTo({top:c.current.scrollHeight,behavior:x});},[]),p=Te.useCallback(()=>{if(c.current){let{scrollTop:x,scrollHeight:b,clientHeight:f}=c.current;m.current=b-x-f<r;}},[r]);Te.useEffect(()=>{m.current&&u();},[o,u]);let g=Te.useCallback(async(x,b)=>{if(!x.trim())return;let f=crypto.randomUUID(),v={id:f,content:x,senderId:b,timestamp:new Date,status:"sending"};a(w=>[...w,v]);try{t&&await t(x),a(w=>w.map(y=>y.id===f?{...y,status:"sent"}:y));}catch{a(y=>y.map(k=>k.id===f?{...k,status:"error"}:k));}},[t]),h=Te.useCallback(()=>{a([]);},[]);return {messages:o,setMessages:a,sendMessage:g,clearMessages:h,isTyping:n,setIsTyping:s,isLoading:i,setIsLoading:d,scrollRef:c,handleScroll:p,scrollToBottom:u}}function X3(e=[]){let[t,r]=Te.useState(e),o=Te.useCallback(c=>{r(m=>[...m,c]);},[]),a=Te.useCallback((c,m)=>{r(u=>u.map(p=>p.id===c?{...p,status:m}:p));},[]),n=Te.useCallback(c=>{r(m=>m.filter(u=>u.id!==c));},[]),s=Te.useCallback((c,m)=>{r(u=>u.map(p=>p.id===c?{...p,content:m,isEdited:true}:p));},[]),i=Te.useCallback((c,m,u)=>{r(p=>p.map(g=>{if(g.id!==c)return g;let h={...g.reactions||{}},x=h[m]||[];return x.includes(u)?(h[m]=x.filter(b=>b!==u),h[m].length===0&&delete h[m]):h[m]=[...x,u],{...g,reactions:h}}));},[]),d=Te.useCallback(()=>{r([]);},[]);return {messages:t,setMessages:r,addMessage:o,updateMessageStatus:a,deleteMessage:n,editMessage:s,addReaction:i,clearMessages:d}}function G3(e){let[t,r]=Te.useState(""),o=Te.useMemo(()=>{if(!t.trim())return [];let a=t.toLowerCase();return e.filter(n=>n.content.toLowerCase().includes(a))},[e,t]);return {query:t,setQuery:r,results:o}}function Z3(e){let t=Te.useRef(null);return Te.useEffect(()=>{let r=o=>{let a=t.current;!a||a.contains(o?.target||null)||e(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e]),t}function rH({timeout:e=2e3}={}){let[t,r]=Te.useState(false),[o,a]=Te.useState(null);return {copy:Te.useCallback(async s=>{if(!navigator?.clipboard){a(new Error("Clipboard API not supported"));return}try{await navigator.clipboard.writeText(s),r(!0),setTimeout(()=>r(!1),e);}catch(i){a(i instanceof Error?i:new Error("Failed to copy"));}},[e]),copied:t,error:o}}function nH(e,t){let[r,o]=Te.useState(e);return Te.useEffect(()=>{let a=setTimeout(()=>{o(e);},t);return ()=>{clearTimeout(a);}},[e,t]),r}function lH(e){let[t,r]=Te.useState({progress:0,scrollY:0,isIntersecting:false}),o=Te.useRef(false);return Te.useEffect(()=>{let a=e.current;if(!a)return;let n=()=>{o.current||(window.requestAnimationFrame(()=>{let s=a.getBoundingClientRect(),i=window.innerHeight,d=i+s.height,c=i-s.top,m=Math.max(0,Math.min(1,c/d));r({progress:m,scrollY:window.scrollY,isIntersecting:s.top<i&&s.bottom>0}),o.current=false;}),o.current=true);};return window.addEventListener("scroll",n,{passive:true}),window.addEventListener("resize",n),n(),()=>{window.removeEventListener("scroll",n),window.removeEventListener("resize",n);}},[e]),t}function mH(e,t){let r=Te.useRef(null);return Te.useLayoutEffect(()=>{let o=document.querySelector(`[data-flip-id="${e}"]`);if(!o)return;let a=r.current,n=o.getBoundingClientRect();if(a){let s=a.left-n.left,i=a.top-n.top,d=a.width/n.width,c=a.height/n.height;(Math.abs(s)>.5||Math.abs(i)>.5||Math.abs(d-1)>.01||Math.abs(c-1)>.01)&&o.animate([{transformOrigin:"top left",transform:`translate(${s}px, ${i}px) scale(${d}, ${c})`},{transformOrigin:"top left",transform:"none"}],{duration:400,easing:"cubic-bezier(0.2, 0.8, 0.2, 1)"});}r.current=n;},t),{"data-flip-id":e}}function fH({initialValues:e,onSubmit:t}){let[r,o]=Te.useState(e),[a,n]=Te.useState({}),[s,i]=Te.useState(false),d=Te.useCallback(u=>{let{name:p,value:g,type:h}=u.target,x=h==="checkbox"?u.target.checked:g;o(b=>({...b,[p]:x})),a[p]&&n(b=>({...b,[p]:""}));},[a]),c=Te.useCallback(async u=>{u.preventDefault();let p=u.currentTarget;if(!p.checkValidity()){let g={};Array.from(p.elements).forEach(h=>{let x=h;x.name&&!x.validity.valid&&(g[x.name]=x.validationMessage);}),n(g);return}i(true);try{await t(r);}finally{i(false);}},[r,t]),m=Te.useCallback(u=>({name:u,value:r[u],onChange:d,error:a[u]}),[r,a,d]);return {values:r,errors:a,isSubmitting:s,handleChange:d,handleSubmit:c,register:m,setValues:o,setErrors:n}}function xH(e){let[t,r]=Te.useState({past:[],present:e,future:[]}),o=t.past.length>0,a=t.future.length>0,n=Te.useCallback(()=>{o&&r(c=>{let m=c.past[c.past.length-1];return m===void 0?c:{past:c.past.slice(0,c.past.length-1),present:m,future:[c.present,...c.future]}});},[o]),s=Te.useCallback(()=>{a&&r(c=>{let m=c.future[0];if(m===void 0)return c;let u=c.future.slice(1);return {past:[...c.past,c.present],present:m,future:u}});},[a]),i=Te.useCallback(c=>{r(m=>{let u=typeof c=="function"?c(m.present):c;return m.present===u?m:{past:[...m.past,m.present],present:u,future:[]}});},[]),d=Te.useCallback(()=>{r({past:[],present:e,future:[]});},[e]);return {state:t.present,set:i,undo:n,redo:s,clear:d,canUndo:o,canRedo:a,history:t}}function yH(e=3e3){let[t,r]=Te.useState(false),o=Te.useRef();return Te.useEffect(()=>{let a=()=>{r(false),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(true);},e);},n=["mousemove","mousedown","keydown","touchstart","scroll"];return n.forEach(s=>{window.addEventListener(s,a);}),a(),()=>{n.forEach(s=>{window.removeEventListener(s,a);}),o.current&&clearTimeout(o.current);}},[e]),t}function TH({onLoadMore:e,isLoading:t,hasMore:r,threshold:o=100,root:a=null}){let n=Te.useRef(null),s=Te.useRef(null),i=Te.useCallback(d=>{let c=d[0];c&&c.isIntersecting&&r&&!t&&e();},[r,t,e]);return Te.useEffect(()=>{let d=s.current;if(d)return n.current=new IntersectionObserver(i,{root:a,rootMargin:`0px 0px ${o}px 0px`,threshold:.1}),n.current.observe(d),()=>{n.current&&n.current.disconnect();}},[i,a,o]),s}function LH(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=false}={}){let[n,s]=Te.useState(),i=n?.isIntersecting&&a,d=([c])=>{s(c);};return Te.useEffect(()=>{let c=e?.current;if(!!!window.IntersectionObserver||i||!c)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(d,u);return p.observe(c),()=>p.disconnect()},[e,t,r,o,i]),n}function SH(e){let[t,r]=Te.useState(e),o=Te.useCallback((i,d,c,m)=>{r(u=>{let p=u.columns[d],g=u.columns[c],h=u.tasks[i];if(!p||!g||!h)return u;let x=Array.from(p.taskIds);x.splice(x.indexOf(i),1);let b={...p,taskIds:x},f=d===c?x:Array.from(g.taskIds);f.splice(m,0,i);let v={...g,taskIds:f};return {...u,columns:{...u.columns,[d]:b,[c]:v},tasks:{...u.tasks,[i]:{...h,columnId:c}}}});},[]),a=Te.useCallback((i,d)=>{r(c=>{let m=Array.from(c.columnOrder);return m.splice(m.indexOf(i),1),m.splice(d,0,i),{...c,columnOrder:m}});},[]),n=Te.useCallback((i,d)=>{r(c=>{let m=c.columns[i];if(!m)return c;let u={...m,taskIds:[...m.taskIds,d.id]};return {...c,tasks:{...c.tasks,[d.id]:d},columns:{...c.columns,[i]:u}}});},[]),s=Te.useCallback(i=>{r(d=>{let c=d.tasks[i];if(!c)return d;let m=d.columns[c.columnId];if(!m)return d;let u={...d.tasks};delete u[i];let p={...m,taskIds:m.taskIds.filter(g=>g!==i)};return {...d,tasks:u,columns:{...d.columns,[c.columnId]:p}}});},[]);return {board:t,setBoard:r,moveTask:o,moveColumn:a,addTask:n,removeTask:s}}function IH(e){let t=Te.useRef(e);t.current=e,Te.useEffect(()=>{let r=o=>{let a=[];(o.ctrlKey||o.metaKey)&&a.push("mod"),o.shiftKey&&a.push("shift"),o.altKey&&a.push("alt");let s=o.key.toLowerCase();["control","meta","shift","alt"].includes(s)||a.push(s);let i=a.join("+"),d=t.current[i]||t.current[s];d&&d(o);};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[]);}function VH(e){let t=Te.useRef(false);Te.useEffect(()=>{t.current||(t.current=true,e());},[]);}function OH(e){Te.useEffect(()=>()=>{e();},[]);}function FH(e,t){let[r,o]=Te.useState(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(n){return console.warn(`Error reading localStorage key "${e}":`,n),t}}),a=Te.useCallback(n=>{try{let s=n instanceof Function?n(r):n;o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s));}catch(s){console.warn(`Error setting localStorage key "${e}":`,s);}},[e,r]);return [r,a]}function _H(e){let[t,r]=Te.useState({x:0,y:0,elementX:0,elementY:0,percentageX:0,percentageY:0}),o=Te.useRef(),a=Te.useRef({x:0,y:0});return Te.useEffect(()=>{let n=i=>{a.current={x:i.clientX,y:i.clientY},o.current||(o.current=requestAnimationFrame(s));},s=()=>{let{x:i,y:d}=a.current,c=0,m=0,u=0,p=0;if(e?.current){let g=e.current.getBoundingClientRect();c=i-g.left,m=d-g.top,u=Math.max(0,Math.min(100,c/g.width*100)),p=Math.max(0,Math.min(100,m/g.height*100));}r({x:i,y:d,elementX:c,elementY:m,percentageX:u,percentageY:p}),o.current=void 0;};return window.addEventListener("mousemove",n),()=>{window.removeEventListener("mousemove",n),o.current&&cancelAnimationFrame(o.current);}},[e]),t}function jH(){let[e,t]=Te.useState({alpha:null,beta:null,gamma:null,absolute:false});return Te.useEffect(()=>{let r=o=>{t({alpha:o.alpha,beta:o.beta,gamma:o.gamma,absolute:o.absolute});};return typeof window<"u"&&"DeviceOrientationEvent"in window&&window.addEventListener("deviceorientation",r),()=>{window.removeEventListener("deviceorientation",r);}},[]),e}function JH(e){let t=Te.useRef();return Te.useEffect(()=>{t.current=e;},[e]),t.current}function eI(e){let t=Te.useRef(null),r=Te.useCallback((o,a,n)=>{!o||n||!t.current||(o.dataset.messageId=a,t.current.observe(o));},[]);return Te.useEffect(()=>(t.current=new IntersectionObserver(o=>{o.forEach(a=>{if(a.isIntersecting){let n=a.target.dataset.messageId;n&&(e(n),t.current?.unobserve(a.target));}});},{threshold:.5}),()=>{t.current?.disconnect();}),[e]),{registerMessage:r}}function oI(){let[e,t]=Te.useState(false);return Te.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");t(r.matches);let o=a=>{t(a.matches);};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),e}var Ah={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function Bh(e){let[t,r]=Te.useState(false);return Te.useEffect(()=>{let o=window.matchMedia(e);r(o.matches);let a=()=>r(o.matches);return o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[e]),t}function sI(e){return Bh(`(min-width: ${Ah[e]}px)`)}function iI(e){let[t,r]=Te.useState({width:0,height:0});return Te.useLayoutEffect(()=>{if(!e.current)return;let o=new ResizeObserver(a=>{for(let n of a)r({width:n.contentRect.width,height:n.contentRect.height});});return o.observe(e.current),()=>o.disconnect()},[e]),t}function dI(e=10){let[t,r]=Te.useState(null),o=Te.useRef(0);return Te.useEffect(()=>{let a=()=>{let s=window.scrollY;if(Math.abs(s-o.current)<e)return;let i=s>o.current?"down":"up";i!==t&&(s>0||i==="down")&&r(i),o.current=s>0?s:0;},n=()=>{window.requestAnimationFrame(a);};return window.addEventListener("scroll",n),()=>window.removeEventListener("scroll",n)},[t,e]),t}function pI(e=true){Te.useLayoutEffect(()=>{if(!e)return;let t=window.getComputedStyle(document.body).overflow,r=window.getComputedStyle(document.body).paddingRight,o=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",o>0&&(document.body.style.paddingRight=`${parseFloat(r)+o}px`),()=>{document.body.style.overflow=t,document.body.style.paddingRight=r;}},[e]);}function $h(e,t,r){let[o,a]=t,[n,s]=r,i=(e-o)/(a-o),d=Math.max(0,Math.min(1,i));return n+d*(s-n)}function gI(e,t,r){return $h(e,t,r)}function xI(){let[e,t]=Te.useState(0),r=Te.useRef(0),o=Te.useRef(Date.now()),a=Te.useRef();return Te.useEffect(()=>{let n=()=>{let i=window.scrollY,d=Date.now(),c=d-o.current;if(c>0){let u=(i-r.current)/c;t(u);}r.current=i,o.current=d,a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(s);},s=()=>{t(i=>Math.abs(i)<.01?0:i*.9),a.current=requestAnimationFrame(s);};return window.addEventListener("scroll",n,{passive:true}),()=>{window.removeEventListener("scroll",n),a.current&&cancelAnimationFrame(a.current);}},[]),e}function _h(e,t){let r=e.toLowerCase().replace(/\s/g,""),o=t.toLowerCase(),a=0;for(let n=0;n<o.length&&a<r.length;n++)o[n]===r[a]&&a++;return a===r.length}function yI(e,t,r){return Te.useMemo(()=>t.trim()?e.filter(o=>r.some(a=>{let n=o[a];return n==null?false:_h(t,String(n))})):e,[e,t,r])}function TI(e,t){let r=Te.useCallback(()=>{if(typeof window>"u")return t;try{let s=window.sessionStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return console.warn(`Error reading sessionStorage key "${e}":`,s),t}},[t,e]),[o,a]=Te.useState(r),n=Te.useCallback(s=>{try{let i=s instanceof Function?s(o):s;a(i),typeof window<"u"&&window.sessionStorage.setItem(e,JSON.stringify(i));}catch(i){console.warn(`Error setting sessionStorage key "${e}":`,i);}},[e,o]);return Te.useEffect(()=>{a(r());},[r]),[o,n]}function RI(e,t={}){let{stiffness:r=.15,damping:o=.8,mass:a=1,precision:n=.01}=t,[s,i]=Te.useState(e),d=Te.useRef(0),c=Te.useRef(e),m=Te.useRef();return Te.useEffect(()=>{let u=()=>{let p=e-c.current,h=p*r/a;if(d.current=(d.current+h)*o,c.current+=d.current,Math.abs(p)<n&&Math.abs(d.current)<n){c.current=e,i(e),m.current=void 0;return}i(c.current),m.current=requestAnimationFrame(u);};return m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(u),()=>{m.current&&cancelAnimationFrame(m.current);}},[e,r,o,a,n]),s}function PI(e,t=100,r=0){return r+e*t}function EI(e,t=100){return Array.from({length:e},(r,o)=>o*t)}var ll="01XYZ#%&@$+-/<>!_";function HI(e,t=800,r=true){let[o,a]=Te.useState(e),n=Te.useRef();return Te.useEffect(()=>{if(!r){a(e);return}let s=Date.now(),i=()=>{let d=Date.now()-s,c=Math.min(d/t,1),m=e.split("").map((u,p)=>u===" "?" ":c>p/e.length?u:ll[Math.floor(Math.random()*ll.length)]).join("");a(m),c<1&&(n.current=requestAnimationFrame(i));};return n.current=requestAnimationFrame(i),()=>{n.current&&cancelAnimationFrame(n.current);}},[e,t,r]),o}function BI(e,t){let[r,o]=Te.useState(e),a=Te.useRef(Date.now());return Te.useEffect(()=>{let n=setTimeout(()=>{Date.now()-a.current>=t&&(o(e),a.current=Date.now());},t-(Date.now()-a.current));return ()=>{clearTimeout(n);}},[e,t]),r}function zI(e=0){let[t,r]=Te.useState(e),[o,a]=Te.useState(false),n=Te.useRef(null),s=Te.useCallback(()=>{o||(a(true),n.current=setInterval(()=>{r(m=>m+1);},1e3));},[o]),i=Te.useCallback(()=>{o&&n.current&&(clearInterval(n.current),a(false));},[o]),d=Te.useCallback(()=>{n.current&&clearInterval(n.current),a(false),r(0);},[]);return Te.useEffect(()=>()=>{n.current&&clearInterval(n.current);},[]),{seconds:t,isActive:o,start:s,pause:i,reset:d,formattedTime:(m=>{let u=Math.floor(m/3600),p=Math.floor(m%3600/60),g=m%60;return [u,p,g].map(h=>h<10?"0"+h:h).filter((h,x)=>h!=="00"||x>0).join(":")})(t)}}function UI(){let e=Te.useContext(na);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function YI(e=false){let[t,r]=Te.useState(e),o=Te.useCallback(()=>{r(a=>!a);},[]);return [t,o,r]}function qI(e=3e3){let[t,r]=Te.useState(false),o=Te.useRef(null),a=Te.useCallback(n=>{r(n),o.current&&clearTimeout(o.current),n&&(o.current=window.setTimeout(()=>{r(false);},e));},[e]);return Te.useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{isTyping:t,setTyping:a}}function QI(){return {startTransition:t=>{if(!document.startViewTransition){t();return}document.startViewTransition(()=>{reactDom.flushSync(()=>{t();});});}}}function eA(e,t={month:"short",day:"numeric",year:"numeric"}){let r=new Date(e);return new Intl.DateTimeFormat("en-US",t).format(r)}function tA(e){return new Intl.NumberFormat("en-US").format(e)}function rA(e,t="USD"){return new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e)}function aA(e,t){return e.length<=t?e:e.slice(0,t)+"..."}function nA(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}
70
+ exports.AIPromptInput=Yf;exports.AIResponse=a0;exports.AISummaryCard=AL;exports.Accordion=A1;exports.AccordionContent=O1;exports.AccordionItem=B1;exports.AccordionTrigger=V1;exports.Alert=Md;exports.Animate=Rt;exports.AreaChart=EM;exports.AssigneePicker=Ps;exports.AudioPlayer=IS;exports.Avatar=U;exports.Background=Sf;exports.Badge=We;exports.BarChart=CM;exports.Breadcrumb=_p;exports.BreadcrumbEllipsis=Jp;exports.BreadcrumbItem=Xp;exports.BreadcrumbLink=jp;exports.BreadcrumbList=Yp;exports.BreadcrumbPage=qp;exports.BreadcrumbSeparator=Gp;exports.BulkActionBar=nP;exports.Button=R;exports.Calendar=so;exports.Card=Sl;exports.CardContent=Al;exports.CardDescription=Il;exports.CardFooter=Bl;exports.CardHeader=Dl;exports.CardTitle=Hl;exports.CarouselMessage=Ri;exports.ChartContainer=bM;exports.ChartGrid=hM;exports.ChartSkeleton=wM;exports.ChartTooltip=vM;exports.ChartXAxis=xM;exports.ChartYAxis=tR;exports.ChatBanner=MS;exports.ChatHeader=EP;exports.ChatInput=tS;exports.ChatLayout=gP;exports.ChatProfile=uS;exports.ChatSidebar=TP;exports.Checkbox=jo;exports.Checklist=Cs;exports.Collapse=mM;exports.ColorPicker=hy;exports.ColumnLimit=us;exports.Combobox=Zo;exports.ComboboxContent=nw;exports.ComboboxEmpty=$n;exports.ComboboxInput=zn;exports.ComboboxItem=Fn;exports.ComboboxList=Kn;exports.ComboboxTrigger=aw;exports.Command=hs;exports.CommandDialog=C2;exports.CommandEmpty=M2;exports.CommandGroup=ws;exports.CommandInput=xs;exports.CommandItem=ys;exports.CommandList=vs;exports.CommandShortcut=R2;exports.ConfirmDialog=f4;exports.ConnectionStatusBanner=mP;exports.Container=vf;exports.DataTable=Z1;exports.DatePicker=Mw;exports.DateSeparator=zS;exports.DateTimePicker=Kw;exports.Dialog=y4;exports.DialogDescription=C4;exports.DialogFooter=N4;exports.DialogHeader=k4;exports.DialogTitle=T4;exports.Divider=Db;exports.Drawer=I4;exports.DrawerDescription=O4;exports.DrawerFooter=B4;exports.DrawerHeader=A4;exports.DrawerTitle=V4;exports.DropdownMenu=mt;exports.DropdownMenuContent=pt;exports.DropdownMenuItem=z;exports.DropdownMenuLabel=si;exports.DropdownMenuSeparator=Oa;exports.DropdownMenuTrigger=ut;exports.DueDatePicker=Ss;exports.EmojiPicker=fD;exports.EmptyState=Sd;exports.FileDropzone=ed;exports.FormControl=Yc;exports.FormDescription=Xc;exports.FormItem=Wc;exports.FormLabel=_c;exports.FormMessage=jc;exports.GlowButton=wl;exports.Grid=Pf;exports.GroupHeader=eD;exports.Heading=nt;exports.HeroText=Gl;exports.Image=fa;exports.InteractiveMessage=Ti;exports.Kanban=rp;exports.KanbanBoard=rp;exports.KanbanCalendarView=bs;exports.KanbanCard=ha;exports.KanbanColumn=xa;exports.KanbanFilterBar=Ns;exports.KanbanHeader=ds;exports.KanbanListView=po;exports.KanbanQuickAdd=W5;exports.KanbanSwimlane=As;exports.KanbanTableView=gs;exports.KanbanTaskModal=Is;exports.KanbanTimelineView=fs;exports.Kbd=Ab;exports.Label=X;exports.LabelPicker=Ls;exports.LetterPullup=Jl;exports.LineChart=AM;exports.LinkPreview=wi;exports.Magnetic=s1;exports.Marquee=YC;exports.MediaLightbox=BD;exports.MentionList=sD;exports.MessageBubble=So;exports.MessageList=EE;exports.MessageSearch=ND;exports.MetricCard=Ml;exports.Modal=fo;exports.ModalDescription=J2;exports.ModalFooter=bo;exports.ModalHeader=go;exports.ModalTitle=Ts;exports.Motion=as;exports.MotionGroup=Fk;exports.Navbar=LR;exports.NumberInput=pd;exports.NumberTicker=p1;exports.OTPInput=id;exports.OnlineIndicator=US;exports.PageLoader=x1;exports.PageTransition=T1;exports.Pagination=Zp;exports.PaginationContent=ef;exports.PaginationEllipsis=af;exports.PaginationItem=tf;exports.PaginationLink=za;exports.PaginationNext=of;exports.PaginationPrevious=rf;exports.Parallax=Zk;exports.PasswordInput=Hc;exports.PieChart=FM;exports.Popover=st;exports.PopoverContent=lt;exports.PopoverTrigger=it;exports.Presence=Lo;exports.PrimaryButton=fl;exports.Progress=Ld;exports.RadarChart=XM;exports.RadioGroup=Fc;exports.RadioGroupItem=Uc;exports.Rating=Vd;exports.ReadReceipt=vi;exports.ReplyPreview=yS;exports.Reveal=Mn;exports.ScrollArea=ft;exports.ScrollProgress=b3;exports.Select=to;exports.Separator=Fr;exports.ShinyText=_l;exports.Sidebar=gR;exports.SidebarContent=hR;exports.SidebarFooter=xR;exports.SidebarGroup=wR;exports.SidebarHeader=bR;exports.SidebarItem=vR;exports.Skeleton=rs;exports.SkipToContent=JR;exports.Slider=mw;exports.SmartReplySuggestions=YL;exports.Sparkline=JM;exports.Spotlight=bL;exports.Stack=kf;exports.StatusDot=bp;exports.Stepper=s4;exports.StickyDateHeader=Do;exports.SubtaskList=rC;exports.Surface=ce;exports.Switch=qo;exports.SystemMessage=XS;exports.Table=Sr;exports.TableBody=Hr;exports.TableCell=Ge;exports.TableHead=ct;exports.TableHeader=Dr;exports.TableRow=ht;exports.Tabs=iR;exports.TabsContent=dR;exports.TabsList=lR;exports.TabsTrigger=cR;exports.TagInput=uy;exports.TaskActivity=iC;exports.TaskAttachments=Rs;exports.TaskComments=Ms;exports.Terminal=mp;exports.TerminalLine=FC;exports.Text=Ne;exports.TextGradient=Fl;exports.TextInput=Et;exports.TextMotion=Xk;exports.Textarea=Rr;exports.ThemeProvider=P3;exports.ThemeToggle=B3;exports.TimeTracker=Hs;exports.Timeline=hN;exports.TimelineItem=Mm;exports.Toast=es;exports.ToastContext=na;exports.ToastProvider=lk;exports.ToggleGroup=xd;exports.Tooltip=Y4;exports.Tree=TN;exports.TypingIndicator=bS;exports.UserMenu=UR;exports.UserPreview=km;exports.VirtualizedMessageList=_D;exports.VoiceRecorder=Ai;exports.WaveformAudio=hi;exports.chatStore=rt;exports.cn=l;exports.formatCurrency=rA;exports.formatDate=eA;exports.formatNumber=tA;exports.normalize=ir;exports.slugify=nA;exports.truncate=aA;exports.useActiveChat=JD;exports.useAsync=Xb;exports.useBaileysSync=i3;exports.useBreakpoint=sI;exports.useChart=Ee;exports.useChat=U3;exports.useChatMedia=c3;exports.useChatMessages=X3;exports.useChatPresence=l3;exports.useChatSearch=G3;exports.useChatSearchWorker=d3;exports.useChatStore=Ko;exports.useClickOutside=Z3;exports.useClipboard=rH;exports.useContainerQuery=iI;exports.useConversations=qD;exports.useDebounce=nH;exports.useDrag=ln;exports.useElementScroll=lH;exports.useFetch=K3;exports.useFlip=mH;exports.useFloating=Gt;exports.useForm=fH;exports.useHistory=xH;exports.useIdle=yH;exports.useInView=je;exports.useInfiniteScroll=TH;exports.useIntersection=LH;exports.useKanban=SH;exports.useKanbanFilters=Os;exports.useKanbanHistory=Q5;exports.useKanbanKeyboard=Ks;exports.useKanbanSync=q5;exports.useKanbanUndo=zs;exports.useKeyboardShortcuts=IH;exports.useLocalStorage=FH;exports.useMediaQuery=Bh;exports.useMessages=GD;exports.useMousePosition=_H;exports.useOnMount=VH;exports.useOnUnmount=OH;exports.useOrientation=jH;exports.usePresence=Xa;exports.usePrevious=JH;exports.useReadReceipts=eI;exports.useReducedMotion=oI;exports.useScroll=qi;exports.useScrollDirection=dI;exports.useScrollLock=pI;exports.useScrollTransform=gI;exports.useScrollVelocity=xI;exports.useSearch=yI;exports.useSequence=EI;exports.useSessionStorage=TI;exports.useSocket=un;exports.useSpring=RI;exports.useStagger=PI;exports.useTextScramble=HI;exports.useTheme=Zi;exports.useThrottle=BI;exports.useTimer=zI;exports.useToast=UI;exports.useToggle=YI;exports.useTypingIndicator=qI;exports.useUserPresence=QD;exports.useViewTransition=QI;exports.useVirtualList=Xi;exports.useVoiceRecorder=Ii;//# sourceMappingURL=index.js.map
71
71
  //# sourceMappingURL=index.js.map