diff --git "a/static/assets/index-8c8a2e12.js" "b/static/assets/index-8c8a2e12.js" --- "a/static/assets/index-8c8a2e12.js" +++ "b/static/assets/index-8c8a2e12.js" @@ -289,7 +289,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GN=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Ns=ee("zap",GN),KN=[{name:"Templates",href:"/templates",icon:Er,description:"Browse assistant templates and examples"},{name:"Assistant Studio",href:"/playground",icon:ea,description:"Build, test and refine your AI assistants"},{name:"Model Catalog",href:"/models",icon:Zs,description:"Browse and manage AI models"},{name:"Settings",href:"/settings",icon:si,description:"Application settings"}];function QN(){const e=$o();return a.jsxs("div",{className:"flex h-full flex-col bg-background border-r",children:[a.jsx("div",{className:"p-6 border-b",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-8 h-8 bg-primary rounded-lg flex items-center justify-center",children:a.jsx(Er,{className:"h-5 w-5 text-primary-foreground"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"font-semibold text-lg",children:"Edge LLM"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Local AI Platform"})]})]})}),a.jsxs("div",{className:"flex-1 px-3 py-4 space-y-8",children:[a.jsx("div",{children:a.jsxs(Up,{to:"/",className:"flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-all hover:bg-accent text-muted-foreground hover:text-foreground",children:[a.jsx(Vk,{className:"h-4 w-4"}),a.jsx("span",{children:"Back to Home"})]})}),a.jsxs("div",{children:[a.jsx("h2",{className:"mb-2 px-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Get started"}),a.jsx("nav",{className:"space-y-1",children:KN.map(t=>{const n=e.pathname===t.href;return a.jsxs(Up,{to:t.href,className:ue("flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-all hover:bg-accent",n?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:text-foreground"),children:[a.jsx(t.icon,{className:"h-4 w-4"}),a.jsx("div",{className:"flex-1",children:t.name})]},t.name)})})]})]})]})}function YN(){return a.jsxs("div",{className:"flex h-screen bg-background",children:[a.jsx("div",{className:"w-64 border-r",children:a.jsx(QN,{})}),a.jsx("div",{className:"flex-1 overflow-hidden",children:a.jsx(Xb,{})})]})}function Jp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ty(...e){return t=>{let n=!1;const r=e.map(i=>{const o=Jp(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:o,...l}=r,s=g.Children.toArray(o),u=s.find(ZN);if(u){const c=u.props.children,f=s.map(d=>d===u?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:d);return a.jsx(t,{...l,ref:i,children:g.isValidElement(c)?g.cloneElement(c,void 0,f):null})}return a.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var XN=Si("Slot");function qN(e){const t=g.forwardRef((n,r)=>{const{children:i,...o}=n;if(g.isValidElement(i)){const l=tC(i),s=eC(o,i.props);return i.type!==g.Fragment&&(s.ref=r?ty(r,l):l),g.cloneElement(i,s)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ny=Symbol("radix.slottable");function JN(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ny,t}function ZN(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ny}function eC(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{const u=o(...s);return i(...s),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function tC(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Zp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,em=Bx,Ud=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return em(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(c=>{const f=n==null?void 0:n[c],d=o==null?void 0:o[c];if(f===null)return null;const p=Zp(f)||Zp(d);return i[c][p]}),s=n&&Object.entries(n).reduce((c,f)=>{let[d,p]=f;return p===void 0||(c[d]=p),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,f)=>{let{class:d,className:p,...m}=f;return Object.entries(m).every(w=>{let[x,S]=w;return Array.isArray(S)?S.includes({...o,...s}[x]):{...o,...s}[x]===S})?[...c,d,p]:c},[]);return em(e,l,u,n==null?void 0:n.class,n==null?void 0:n.className)},Vd=Ud("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),fe=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const l=r?XN:"button";return a.jsx(l,{className:ue(Vd({variant:t,size:n,className:e})),ref:o,...i})});fe.displayName="Button";function nC(){const e=Ti();return a.jsxs("div",{className:"min-h-screen bg-gray-50",children:[a.jsx("nav",{className:"bg-white border-b border-gray-200",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex justify-between items-center h-20",children:[a.jsx("div",{className:"flex items-center",children:a.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-16 w-16",onError:t=>{console.error("Logo failed to load"),t.currentTarget.style.display="none"}})}),a.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[a.jsx("span",{className:"text-white bg-purple-600 px-4 py-2 rounded-md font-medium",children:"Home"}),a.jsx("button",{onClick:()=>e("/technology"),className:"text-gray-700 hover:text-purple-600 font-medium transition-colors",children:"Technology"}),a.jsx("button",{onClick:()=>e("/usecases"),className:"text-gray-700 hover:text-purple-600 font-medium transition-colors",children:"Use Cases"}),a.jsx(fe,{variant:"outline",onClick:()=>e("/playground"),className:"border-purple-600 text-purple-600 hover:bg-purple-50",children:"My device"})]}),a.jsx("div",{className:"md:hidden",children:a.jsx(fe,{variant:"ghost",size:"sm",children:a.jsx(Bd,{className:"h-5 w-5"})})})]})})}),a.jsx("div",{className:"relative py-24 px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[a.jsx("div",{className:"relative mb-8",children:a.jsxs("h1",{className:"text-5xl md:text-7xl lg:text-8xl font-bold text-black leading-tight",children:["Offline AI that",a.jsx("br",{}),"works where the",a.jsx("br",{}),"cloud cannot"]})}),a.jsx("p",{className:"text-xl md:text-2xl text-purple-700 font-semibold mb-12 max-w-3xl mx-auto",children:"AI that stays reliable, private, and resilient in any environment"}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center items-center mb-20",children:[a.jsx(fe,{size:"lg",className:"bg-purple-600 hover:bg-purple-700 text-white px-8 py-3 text-lg font-medium",onClick:()=>e("/playground"),children:"Learn More"}),a.jsx(fe,{size:"lg",variant:"outline",className:"border-purple-600 text-purple-600 hover:bg-purple-50 px-8 py-3 text-lg font-medium",onClick:()=>e("/playground"),children:"I already have a device"})]})]})}),a.jsx("div",{className:"py-16 px-4 sm:px-6 lg:px-8 bg-white",children:a.jsx("div",{className:"max-w-6xl mx-auto",children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[a.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-lg border border-gray-200",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"w-18 h-18 bg-purple-100 rounded-2xl flex items-center justify-center mb-6",children:a.jsx(sN,{className:"h-12 w-12 text-purple-600"})}),a.jsx("h3",{className:"text-2xl font-bold text-black mb-4",children:"Always Available"})]}),a.jsx("p",{className:"text-gray-700 text-base leading-relaxed",children:"Cloud AI fails without internet. Our offline AI runs fully on-device, ready to assist anywhere — from airplanes to remote mountains."})]}),a.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-lg border border-gray-200",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"w-18 h-18 bg-purple-100 rounded-2xl flex items-center justify-center mb-6",children:a.jsx(gc,{className:"h-12 w-12 text-purple-600"})}),a.jsx("h3",{className:"text-2xl font-bold text-black mb-4",children:"Privacy & Security"})]}),a.jsx("p",{className:"text-gray-700 text-base leading-relaxed",children:"Cloud AI requires uploading sensitive data. Offline AI keeps all processing local, protecting personal privacy and enterprise security."})]}),a.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-lg border border-gray-200",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"w-18 h-18 bg-purple-100 rounded-2xl flex items-center justify-center mb-6",children:a.jsx(Ns,{className:"h-12 w-12 text-purple-600"})}),a.jsx("h3",{className:"text-2xl font-bold text-black mb-4",children:"Reliability"})]}),a.jsx("p",{className:"text-gray-700 text-base leading-relaxed",children:"Cloud latency can cost lives in emergencies. Offline AI responds instantly, built for survival, healthcare, and safety-critical moments."})]})]})})}),a.jsx("footer",{className:"bg-gray-900 text-white py-12 px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"max-w-6xl mx-auto text-center",children:[a.jsx("div",{className:"flex items-center justify-center mb-4",children:a.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-12 w-12",onError:t=>{console.error("Footer logo failed to load"),t.currentTarget.style.display="none"}})}),a.jsx("p",{className:"text-gray-400 mb-6",children:"Need help? Contact us to get customized device and services"}),a.jsxs("div",{className:"flex justify-center space-x-6",children:[a.jsx("a",{href:"#",className:"text-gray-400 hover:text-white",children:"Privacy Policy"}),a.jsx("a",{href:"#",className:"text-gray-400 hover:text-white",children:"Terms of Service"}),a.jsx("a",{href:"#",className:"text-gray-400 hover:text-white",children:"Support"})]})]})})]})}const rC=Ud("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ye({className:e,variant:t,...n}){return a.jsx("div",{className:ue(rC({variant:t}),e),...n})}const Ue=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ue("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Ue.displayName="Card";const It=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ue("flex flex-col space-y-1.5 p-6",e),...t}));It.displayName="CardHeader";const Mt=g.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:ue("text-2xl font-semibold leading-none tracking-tight",e),...t}));Mt.displayName="CardTitle";const iC=g.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:ue("text-sm text-muted-foreground",e),...t}));iC.displayName="CardDescription";const Qe=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ue("p-6 pt-0",e),...t}));Qe.displayName="CardContent";const oC=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ue("flex items-center p-6 pt-0",e),...t}));oC.displayName="CardFooter";function lC(){const[e,t]=g.useState("Hardware"),n=Ti();return a.jsxs("div",{className:"min-h-screen bg-gray-50",children:[a.jsx("nav",{className:"bg-white border-b border-gray-200",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex justify-between items-center h-20",children:[a.jsx("div",{className:"flex items-center",children:a.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-16 w-16",onError:r=>{console.error("Logo failed to load"),r.currentTarget.style.display="none"}})}),a.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[a.jsx("button",{onClick:()=>n("/"),className:"text-gray-700 hover:text-purple-600 font-medium",children:"Home"}),a.jsx("span",{className:"text-white bg-purple-600 px-4 py-2 rounded-md font-medium",children:"Technology"}),a.jsx("button",{onClick:()=>n("/usecases"),className:"text-gray-700 hover:text-purple-600 font-medium transition-colors",children:"Use Cases"}),a.jsx(fe,{variant:"outline",onClick:()=>n("/playground"),className:"border-purple-600 text-purple-600 hover:bg-purple-50",children:"My device"})]}),a.jsx("div",{className:"md:hidden",children:a.jsx(fe,{variant:"ghost",size:"sm",children:a.jsx(Bd,{className:"h-5 w-5"})})})]})})}),a.jsx("div",{className:"py-24 px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[a.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-black mb-6",children:"Our Technology"}),a.jsx("p",{className:"text-xl text-purple-700 font-semibold max-w-2xl mx-auto mb-8",children:"Low-cost FPGA-based design, optimized for Large Language Models on-device."}),a.jsx("div",{className:"flex justify-center mb-12",children:a.jsx("div",{className:"bg-white rounded-lg p-1 shadow-sm",children:["Hardware","Software"].map(r=>a.jsx("button",{onClick:()=>t(r),className:`px-6 py-2 rounded-md text-sm font-medium transition-all ${e===r?"bg-purple-600 text-white":"text-gray-700 hover:text-purple-600"}`,children:r},r))})})]})}),a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:[e==="Hardware"&&a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-start",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-6",children:"Hardware Description"}),a.jsx("p",{className:"text-lg text-gray-800 leading-relaxed",children:"Huoxu is an ultra–low-budget single-board computer designed specifically for large language model (LLM) deployment. Despite its compact form factor and low power consumption, we provide:"}),a.jsxs("ul",{className:"mt-6 space-y-3 text-lg text-gray-800",children:[a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Accelerated inference performance — delivering up to 15 tokens per second on a 30B model, thanks to its optimized FPGA-based AI engine."]}),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"High memory capacity — up to 40GB RAM, enabling hosting of LLMs up to ≥30B parameters."]}),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Cost efficiency — making advanced AI workloads accessible at low cost."]})]})]}),a.jsx(Ue,{className:"bg-gradient-to-br from-purple-50 to-blue-50 border-0 shadow-lg",children:a.jsx(Qe,{className:"p-8 space-y-6",children:a.jsxs("div",{className:"flex flex-col space-y-4",children:[a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Chip"}),a.jsx("span",{className:"text-base text-gray-700",children:"AMD Zynq UltraScale+ XCZU3EG"})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Processor"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"Quad-core 64-bit Arm Cortex-A53 CPU"}),a.jsx("div",{children:"Dual-core 64-bit Arm Cortex-R5 CPU"}),a.jsx("div",{children:"ARM Mali-400 GPU"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"FPGA Fabric"}),a.jsx("span",{className:"text-base text-gray-700",children:"70K LUT, 360 DSP slices"})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Memory"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"8 GB 64-bit DDR4 (2400 Mbps) on CPU side"}),a.jsx("div",{children:"8 GB / 16 GB / 32 GB DDR4 (2133 Mbps) on FPGA side (SODIMM)"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Storage"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"256 GB PCIe 2.0 x1 NVMe SSD"}),a.jsx("div",{children:"MicroSD card slot"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"I/O"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"USB 2.0 / 3.0 via Type-C"}),a.jsx("div",{children:"Mini DisplayPort"})]})]})]})})})]}),e==="Software"&&a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-start",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-6",children:"Software Stack"}),a.jsx("p",{className:"text-lg text-gray-800 leading-relaxed",children:"Our comprehensive software ecosystem is designed to maximize the potential of Huoxu hardware, providing seamless LLM deployment and management capabilities:"}),a.jsxs("ul",{className:"mt-6 space-y-3 text-lg text-gray-800",children:[a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Custom FPGA-optimized inference engine with quantization support for efficient model deployment."]}),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Edge LLM Platform — intuitive web interface for model management, chat, and system monitoring."]}),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Support for popular model formats (GGUF, ONNX) and frameworks (Transformers, LLaMA.cpp)."]}),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"REST API for seamless integration with existing applications and services."]})]})]}),a.jsx(Ue,{className:"bg-gradient-to-br from-green-50 to-blue-50 border-0 shadow-lg",children:a.jsx(Qe,{className:"p-8 space-y-6",children:a.jsxs("div",{className:"flex flex-col space-y-4",children:[a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"OS Support"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"Ubuntu 22.04 LTS"}),a.jsx("div",{children:"Custom Linux Distribution"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Model Formats"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"GGUF (LLaMA.cpp)"}),a.jsx("div",{children:"ONNX"}),a.jsx("div",{children:"PyTorch"}),a.jsx("div",{children:"Transformers"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Inference Engine"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"Custom FPGA Accelerator"}),a.jsx("div",{children:"LLaMA.cpp Integration"}),a.jsx("div",{children:"Quantization Support"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Management Interface"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"Web-based Dashboard"}),a.jsx("div",{children:"REST API"}),a.jsx("div",{children:"CLI Tools"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Development Tools"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"Python SDK"}),a.jsx("div",{children:"Model Optimization Tools"}),a.jsx("div",{children:"Performance Profiler"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Security"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"Secure Boot"}),a.jsx("div",{children:"Model Encryption"}),a.jsx("div",{children:"Access Control"})]})]})]})})})]})]}),a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:[a.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-8",children:"Why us?"}),a.jsxs("div",{className:"bg-white rounded-3xl shadow-xl overflow-hidden",children:[a.jsxs("div",{className:"grid grid-cols-4 bg-gradient-to-r from-gray-50 to-gray-100",children:[a.jsx("div",{className:"p-6"}),a.jsx("div",{className:"p-6 text-center",children:a.jsx(ye,{className:"bg-purple-600 text-white font-bold px-4 py-2",children:"Ours"})}),a.jsx("div",{className:"p-6 text-center",children:a.jsx("span",{className:"font-bold text-gray-800",children:"Raspberry Pi 5"})}),a.jsx("div",{className:"p-6 text-center",children:a.jsx("span",{className:"font-bold text-gray-800",children:"Jetson Orin Nano"})})]}),[{label:"Price",ours:"$199",pi:"$120",jetson:"$249"},{label:"RAM",ours:"24GB/40GB",pi:"16GB",jetson:"8GB"},{label:"CPU",ours:"Cortex-A53",pi:"Cortex-A72",jetson:"Cortex-A78"},{label:"AI Engine",ours:"Optimized Accelerator on FPGA",pi:"Neon SIMD Instructions",jetson:"Cuda/Tensor Core"},{label:"Power",ours:"<10W",pi:"5-12 W",jetson:"7-25"},{label:"LLM decode Performance",ours:"15 tokens/s",pi:"<5 tokens/s",jetson:"15 tokens/s"}].map((r,i)=>a.jsxs("div",{className:`grid grid-cols-4 ${i%2===0?"bg-gray-50":"bg-white"}`,children:[a.jsx("div",{className:"p-4 font-medium text-gray-900 border-r border-gray-200",children:r.label}),a.jsx("div",{className:"p-4 text-center text-white bg-purple-600 font-medium",children:r.ours}),a.jsx("div",{className:"p-4 text-center text-purple-600 font-medium border-r border-gray-200",children:r.pi}),a.jsx("div",{className:"p-4 text-center text-purple-600 font-medium",children:r.jetson})]},r.label))]}),a.jsx("div",{className:"text-center mt-8",children:a.jsx(fe,{className:"bg-purple-600 hover:bg-purple-700 text-white px-8 py-3",children:"View our vision"})})]}),a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:[a.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-8",children:"The device layout plan"}),a.jsxs("div",{className:"bg-white rounded-2xl shadow-xl p-8 text-center",children:[a.jsx("div",{className:"relative max-w-4xl mx-auto",children:a.jsx("img",{src:"/assets/chips.png",alt:"Device Layout Plan",className:"w-full h-auto rounded-lg shadow-lg",onError:r=>{console.error("Chips image failed to load"),r.currentTarget.style.display="none"}})}),a.jsxs("div",{className:"flex justify-center space-x-4 mt-8",children:[a.jsx(fe,{className:"bg-purple-600 hover:bg-purple-700 text-white px-6 py-2",children:"Get your device"}),a.jsx(fe,{variant:"outline",className:"border-purple-600 text-purple-600 hover:bg-purple-50 px-6 py-2",children:"View use cases"})]})]}),a.jsx("p",{className:"text-center text-gray-600 mt-6",children:"Need help? Contact us to get customized device and services"})]})]})}function sC(){const e=Ti(),t=[{id:1,category:"Use case 1: Outdoor Rescue",title:"Offline AI that guides survival in extreme environments",description:"When hikers, travelers, or drivers lose connection to mountains, forests, or rural roads, cloud AI systems can't offer real-time survival guidance, first aid tips, and emergency signaling — even without internet. Includes moments, it becomes your reliable voice of calm and safety.",image:"/api/placeholder/336/240",bgColor:"from-blue-100 to-purple-100"},{id:2,category:"Use case 2: Offline Healthcare",title:"A simple device for seniors to access trusted medical guidance",description:"Many elderly users struggle with smartphones and digital devices. Our simple, voice-only need to press a button or speak a request to get clear, step-by-step medical advice. No internet, no accounts, no complicated setup — just instant, private support for everyday health concerns that helps.",image:"/api/placeholder/336/240",bgColor:"from-green-100 to-blue-100"},{id:3,category:"Use case 3: AI Companion and Assistance",title:"A private, always-available conversational partner",description:"Life can be stressful and lonely at times. Our Offline AI device can be embedded inside a plush toy, transforming it into a private, always-available companion. It listens, talks, tells stories without uploading data to the cloud. AI partner that brings warmth, reassurance, and practical help whenever you need it.",image:"/api/placeholder/336/240",bgColor:"from-purple-100 to-pink-100"}];return a.jsxs("div",{className:"min-h-screen bg-gray-50",children:[a.jsx("nav",{className:"bg-white border-b border-gray-200",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex justify-between items-center h-20",children:[a.jsx("div",{className:"flex items-center",children:a.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-16 w-16",onError:n=>{console.error("Logo failed to load"),n.currentTarget.style.display="none"}})}),a.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[a.jsx("button",{onClick:()=>e("/"),className:"text-gray-700 hover:text-purple-600 font-medium",children:"Home"}),a.jsx("button",{onClick:()=>e("/technology"),className:"text-gray-700 hover:text-purple-600 font-medium",children:"Technology"}),a.jsx("span",{className:"text-white bg-purple-600 px-4 py-2 rounded-md font-medium",children:"Use Cases"}),a.jsx(fe,{variant:"outline",onClick:()=>e("/playground"),className:"border-purple-600 text-purple-600 hover:bg-purple-50",children:"My device"})]}),a.jsx("div",{className:"md:hidden",children:a.jsx(fe,{variant:"ghost",size:"sm",children:a.jsx(Bd,{className:"h-5 w-5"})})})]})})}),a.jsx("div",{className:"py-24 px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[a.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-black mb-6",children:"Use Case Examples"}),a.jsx("p",{className:"text-xl text-purple-700 font-semibold max-w-2xl mx-auto mb-12",children:"Bringing intelligent computing to the edge of connectivity"})]})}),a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:t.map((n,r)=>a.jsx(Ue,{className:"bg-white shadow-lg border-0 rounded-3xl overflow-hidden h-full flex flex-col",children:a.jsxs(Qe,{className:"p-6 flex flex-col h-full",children:[a.jsx("div",{className:"w-full h-60 rounded-xl mb-6 overflow-hidden",children:a.jsx("img",{src:`/assets/${r===0?"outdoor_rescue.png":r===1?"health_care.png":"companion.png"}`,alt:n.title,className:"w-full h-full object-cover",onError:i=>{console.error(`Failed to load image for use case ${r+1}`),i.currentTarget.style.display="none";const o=document.createElement("div");o.className="w-full h-60 bg-gradient-to-br from-gray-200 to-gray-300 rounded-xl flex items-center justify-center",r===0?o.innerHTML='':r===1?o.innerHTML='':o.innerHTML='',i.currentTarget.parentNode&&i.currentTarget.parentNode.appendChild(o)}})}),a.jsxs("div",{className:"flex flex-col flex-grow space-y-4",children:[a.jsx("div",{className:"text-sm font-semibold text-purple-600",children:n.category}),a.jsx("h3",{className:"text-xl font-semibold text-black leading-tight",children:n.title}),a.jsx("p",{className:"text-gray-600 text-sm leading-relaxed flex-grow",children:n.description}),a.jsx("div",{className:"pt-4",children:a.jsx(fe,{className:"bg-purple-600 hover:bg-purple-700 text-white text-sm px-4 py-2 w-auto",onClick:()=>{console.log("Selected use case:",n.id)},children:"Select"})})]})]})},n.id))})}),a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-purple-400/30 via-blue-500/30 to-pink-500/30 backdrop-blur-sm rounded-3xl"}),a.jsxs("div",{className:"relative bg-purple-400/20 backdrop-blur-lg rounded-3xl p-8 text-center",children:[a.jsx("div",{className:"flex justify-center mb-6 space-x-1",children:[...Array(20)].map((n,r)=>a.jsx("div",{className:"bg-purple-600 rounded-full animate-pulse",style:{width:"3px",height:`${Math.random()*40+10}px`,animationDelay:`${r*.1}s`,animationDuration:"1s"}},r))}),a.jsx("h2",{className:"text-2xl font-medium text-white mb-4",children:"Customize your own device"}),a.jsx("p",{className:"text-gray-900 mb-6",children:"Need help? Contact us to get customized device and services"}),a.jsx(fe,{className:"bg-purple-600 hover:bg-purple-700 text-white px-8 py-3",onClick:()=>e("/playground"),children:"Get Started"})]})]})})]})}const ry=g.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:ue("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));ry.displayName="Input";function aC(){return[{id:"code-reviewer",name:"Code Review Expert",description:"Professional code reviewer for detailed analysis and suggestions. Helps identify bugs, security issues, and performance optimizations.",author:"EdgeLLM Team",category:"Developer Tools",tags:["code review","programming","debugging"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a senior software engineer. Analyze code for quality, best practices, performance, and security. Provide constructive feedback with specific examples.",temperature:.3,maxTokens:1e3,isOfficial:!0,createdAt:"2024-01-15",icon:"🔍",usageCount:1247,rating:4.8},{id:"writing-tutor",name:"Writing Assistant",description:"Helps improve writing with structure suggestions and clarity enhancements. Perfect for essays, articles, and professional documents.",author:"Community",category:"Writing",tags:["writing","editing","grammar"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a writing tutor. Help improve writing through structure, clarity, grammar, and style suggestions. Provide specific feedback and examples.",temperature:.4,maxTokens:800,isOfficial:!1,createdAt:"2024-01-20",icon:"📝",usageCount:892,rating:4.6},{id:"creative-writer",name:"Creative Writing Coach",description:"Inspires creativity and helps develop compelling stories and characters. Great for fiction writers and storytellers.",author:"Community",category:"Writing",tags:["creative","storytelling","fiction"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a creative writing coach. Help develop stories, characters, and narrative techniques. Provide encouraging feedback and creative suggestions.",temperature:.8,maxTokens:1e3,isOfficial:!0,createdAt:"2024-01-30",icon:"✨",usageCount:634,rating:4.7},{id:"data-analyst",name:"Data Analysis Expert",description:"Helps analyze data patterns, create insights, and generate comprehensive reports with statistical analysis.",author:"EdgeLLM Team",category:"Data & Analytics",tags:["data","analytics","statistics"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a data analysis expert. Help users understand data patterns, create visualizations, and provide statistical insights.",temperature:.2,maxTokens:1200,isOfficial:!0,createdAt:"2024-01-18",icon:"📊",usageCount:567,rating:4.9},{id:"language-tutor",name:"Language Learning Tutor",description:"Interactive language tutor for vocabulary, grammar, and conversation practice. Supports multiple languages.",author:"Community",category:"Education",tags:["language","learning","education"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a friendly language tutor. Help users learn languages through interactive exercises, explanations, and conversation practice.",temperature:.6,maxTokens:800,isOfficial:!1,createdAt:"2024-01-20",icon:"🌐",usageCount:423,rating:4.5},{id:"business-advisor",name:"Business Strategy Advisor",description:"Provides strategic business advice, market analysis, and growth recommendations for entrepreneurs and businesses.",author:"EdgeLLM Team",category:"Business",tags:["strategy","business","consulting"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a business strategy consultant. Provide strategic advice, market insights, and growth recommendations based on business principles.",temperature:.4,maxTokens:1e3,isOfficial:!0,createdAt:"2024-01-22",icon:"💼",usageCount:789,rating:4.7},{id:"research-assistant",name:"Research Assistant",description:"Helps with academic and professional research, source analysis, and comprehensive report writing.",author:"Community",category:"Research",tags:["research","academic","analysis"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a research assistant. Help users conduct thorough research, analyze sources, and organize findings into comprehensive reports.",temperature:.3,maxTokens:1200,isOfficial:!1,createdAt:"2024-01-25",icon:"📚",usageCount:356,rating:4.4},{id:"math-tutor",name:"Math & Science Tutor",description:"Expert tutor for mathematics, physics, chemistry, and other STEM subjects with step-by-step explanations.",author:"EdgeLLM Team",category:"Education",tags:["math","science","tutoring"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a math and science tutor. Provide clear, step-by-step explanations for mathematical and scientific concepts.",temperature:.2,maxTokens:1e3,isOfficial:!0,createdAt:"2024-01-28",icon:"🔬",usageCount:678,rating:4.8}]}function uC(){const e=Ti(),[t,n]=g.useState(!1),[r]=g.useState(aC()),[i,o]=g.useState([]),[l,s]=g.useState(""),[u,c]=g.useState("All");g.useEffect(()=>{f(),d()},[]);const f=async()=>{try{const h=`${window.location.protocol}//${window.location.host}`,v=await fetch(`${h}/models`);n(v.ok)}catch{n(!1)}},d=()=>{try{const h=JSON.parse(localStorage.getItem("likedTemplates")||"[]");o(h)}catch(h){console.error("Failed to load liked templates:",h)}},p=h=>{const v=i.includes(h)?i.filter(k=>k!==h):[...i,h];o(v),localStorage.setItem("likedTemplates",JSON.stringify(v))},m=h=>{const v={name:h.name,description:h.description,model:h.model,systemPrompt:h.systemPrompt,temperature:h.temperature,maxTokens:h.maxTokens};localStorage.setItem("loadAssistantConfig",JSON.stringify(v)),e("/playground")},w=r.filter(h=>{const v=h.name.toLowerCase().includes(l.toLowerCase())||h.description.toLowerCase().includes(l.toLowerCase())||h.tags.some(j=>j.toLowerCase().includes(l.toLowerCase())),k=u==="All"||h.category===u;return v&&k}),x=w.filter(h=>h.isOfficial),S=[...w].sort((h,v)=>v.usageCount-h.usageCount).slice(0,6),y=["All",...Array.from(new Set(r.map(h=>h.category)))];return a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx("div",{className:"sticky top-0 z-40 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:a.jsx("div",{className:"max-w-6xl mx-auto px-6 py-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("div",{className:"flex items-center gap-4",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center",children:a.jsx(Er,{className:"h-5 w-5 text-white"})}),a.jsx("h1",{className:"text-xl font-bold text-gray-900",children:"Assistant Templates"}),a.jsx(ye,{variant:t?"default":"secondary",className:"text-xs",children:t?"Online":"Offline"})]})}),a.jsxs(fe,{onClick:()=>e("/playground"),className:"flex items-center gap-2",children:[a.jsx(ei,{className:"h-4 w-4"}),"Create Assistant"]})]})})}),a.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8",children:[a.jsxs("div",{className:"text-center mb-12",children:[a.jsx("h1",{className:"text-4xl font-bold text-gray-900 mb-4",children:"Explore AI Assistants"}),a.jsx("p",{className:"text-lg text-gray-600 max-w-2xl mx-auto mb-8",children:"Discover, customize and deploy specialized AI assistants. Start with proven templates or build from scratch."}),a.jsxs("div",{className:"relative max-w-2xl mx-auto mb-8",children:[a.jsx(qp,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-400 h-5 w-5"}),a.jsx(ry,{type:"text",placeholder:"Search assistants...",value:l,onChange:h=>s(h.target.value),className:"pl-12 pr-4 py-3 text-lg rounded-full border-2 border-gray-200 focus:border-blue-500"})]}),a.jsx("div",{className:"flex flex-wrap justify-center gap-2 mb-8",children:y.map(h=>a.jsx(fe,{variant:u===h?"default":"outline",size:"sm",onClick:()=>c(h),className:"rounded-full",children:h},h))})]}),u==="All"&&x.length>0&&a.jsxs("div",{className:"mb-12",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[a.jsx(Qx,{className:"h-5 w-5 text-yellow-600"}),a.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Featured"}),a.jsx(ye,{variant:"secondary",className:"text-xs",children:"Curated by EdgeLLM Team"})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:x.slice(0,3).map(h=>a.jsx(Qa,{template:h,isLiked:i.includes(h.id),onLike:()=>p(h.id),onUse:()=>m(h),featured:!0},h.id))})]}),u==="All"&&a.jsxs("div",{className:"mb-12",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[a.jsx(Zx,{className:"h-5 w-5 text-green-600"}),a.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Trending"}),a.jsx(ye,{variant:"secondary",className:"text-xs",children:"Most popular this week"})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:S.slice(0,6).map(h=>a.jsx(Qa,{template:h,isLiked:i.includes(h.id),onLike:()=>p(h.id),onUse:()=>m(h),trending:!0},h.id))})]}),a.jsxs("div",{className:"mb-12",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[a.jsx(HN,{className:"h-5 w-5 text-blue-600"}),a.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:u==="All"?"All Templates":u}),a.jsxs(ye,{variant:"outline",className:"text-xs",children:[w.length," available"]})]}),w.length>0?a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:w.map(h=>a.jsx(Qa,{template:h,isLiked:i.includes(h.id),onLike:()=>p(h.id),onUse:()=>m(h)},h.id))}):a.jsx(Ue,{className:"p-12 text-center",children:a.jsxs("div",{className:"flex flex-col items-center gap-4",children:[a.jsx(qp,{className:"h-12 w-12 text-gray-400"}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No templates found"}),a.jsx("p",{className:"text-gray-600",children:"Try adjusting your search or category filters"})]}),a.jsx(fe,{variant:"outline",onClick:()=>{s(""),c("All")},children:"Clear filters"})]})})]})]})]})}function Qa({template:e,isLiked:t,onLike:n,onUse:r,featured:i=!1,trending:o=!1}){return a.jsxs(Ue,{className:"group hover:shadow-xl transition-all duration-300 hover:-translate-y-1 border-2 hover:border-blue-200 relative",children:[i&&a.jsxs("div",{className:"absolute -top-2 -right-2 bg-yellow-500 text-white text-xs px-2 py-1 rounded-full font-medium flex items-center gap-1",children:[a.jsx(Qx,{className:"h-3 w-3"}),"Featured"]}),o&&a.jsxs("div",{className:"absolute -top-2 -right-2 bg-green-500 text-white text-xs px-2 py-1 rounded-full font-medium flex items-center gap-1",children:[a.jsx(Zx,{className:"h-3 w-3"}),"Trending"]}),a.jsx(It,{className:"pb-4",children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-500 to-purple-600 rounded-xl flex items-center justify-center text-2xl",children:e.icon}),a.jsxs("div",{children:[a.jsx(Mt,{className:"text-lg group-hover:text-blue-600 transition-colors",children:e.name}),a.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[a.jsxs("p",{className:"text-sm text-blue-600 font-medium",children:["by ",e.author]}),e.isOfficial&&a.jsxs(ye,{variant:"default",className:"text-xs px-2 py-0 bg-blue-600",children:[a.jsx(Wk,{className:"h-3 w-3 mr-1"}),"Official"]})]})]})]}),a.jsx(fe,{variant:"ghost",size:"sm",onClick:n,className:`${t?"text-red-500":"text-gray-400 hover:text-red-500"} transition-colors`,title:t?"Unlike":"Like",children:a.jsx(yN,{className:`h-4 w-4 ${t?"fill-current":""}`})})]})}),a.jsxs(Qe,{className:"space-y-4",children:[a.jsx("p",{className:"text-sm text-gray-600 line-clamp-2 leading-relaxed",children:e.description}),a.jsx("div",{className:"flex flex-wrap gap-2",children:e.tags.slice(0,3).map(l=>a.jsx(ye,{variant:"secondary",className:"text-xs bg-gray-100 hover:bg-gray-200 transition-colors",children:l},l))}),a.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(pN,{className:"h-4 w-4"}),a.jsx("span",{children:e.usageCount.toLocaleString()})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(DN,{className:"h-4 w-4 text-yellow-500 fill-current"}),a.jsx("span",{children:e.rating})]})]}),a.jsx(ye,{variant:"outline",className:"text-xs",children:e.category})]}),a.jsx("div",{className:"pt-2",children:a.jsxs(fe,{onClick:r,className:"w-full group-hover:bg-blue-600 group-hover:text-white transition-all",variant:"outline",children:[a.jsx(ea,{className:"h-4 w-4 mr-2"}),"Build Assistant"]})})]})]})}function Z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function cC(e,t){const n=g.createContext(t),r=o=>{const{children:l,...s}=o,u=g.useMemo(()=>s,Object.values(s));return a.jsx(n.Provider,{value:u,children:l})};r.displayName=e+"Provider";function i(o){const l=g.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function sr(e,t=[]){let n=[];function r(o,l){const s=g.createContext(l),u=n.length;n=[...n,l];const c=d=>{var y;const{scope:p,children:m,...w}=d,x=((y=p==null?void 0:p[e])==null?void 0:y[u])||s,S=g.useMemo(()=>w,Object.values(w));return a.jsx(x.Provider,{value:S,children:m})};c.displayName=o+"Provider";function f(d,p){var x;const m=((x=p==null?void 0:p[e])==null?void 0:x[u])||s,w=g.useContext(m);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[c,f]}const i=()=>{const o=n.map(l=>g.createContext(l));return function(s){const u=(s==null?void 0:s[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,dC(i,...t)]}function dC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((s,{useScope:u,scopeName:c})=>{const d=u(o)[`__scope${c}`];return{...s,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Hd(e){const t=e+"CollectionProvider",[n,r]=sr(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=x=>{const{scope:S,children:y}=x,h=Vt.useRef(null),v=Vt.useRef(new Map).current;return a.jsx(i,{scope:S,itemMap:v,collectionRef:h,children:y})};l.displayName=t;const s=e+"CollectionSlot",u=Si(s),c=Vt.forwardRef((x,S)=>{const{scope:y,children:h}=x,v=o(s,y),k=ve(S,v.collectionRef);return a.jsx(u,{ref:k,children:h})});c.displayName=s;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=Si(f),m=Vt.forwardRef((x,S)=>{const{scope:y,children:h,...v}=x,k=Vt.useRef(null),j=ve(S,k),C=o(f,y);return Vt.useEffect(()=>(C.itemMap.set(k,{ref:k,...v}),()=>void C.itemMap.delete(k))),a.jsx(p,{[d]:"",ref:j,children:h})});m.displayName=f;function w(x){const S=o(e+"CollectionConsumer",x);return Vt.useCallback(()=>{const h=S.collectionRef.current;if(!h)return[];const v=Array.from(h.querySelectorAll(`[${d}]`));return Array.from(S.itemMap.values()).sort((C,E)=>v.indexOf(C.ref.current)-v.indexOf(E.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:l,Slot:c,ItemSlot:m},w,r]}var tt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},fC=Gc[" useId ".trim().toString()]||(()=>{}),pC=0;function qn(e){const[t,n]=g.useState(fC());return tt(()=>{e||n(r=>r??String(pC++))},[e]),e||(t?`radix-${t}`:"")}var mC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oe=mC.reduce((e,t)=>{const n=Si(`Primitive.${t}`),r=g.forwardRef((i,o)=>{const{asChild:l,...s}=i,u=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function hC(e,t){e&&Ei.flushSync(()=>e.dispatchEvent(t))}function er(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var gC=Gc[" useInsertionEffect ".trim().toString()]||tt;function bi({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,l]=xC({defaultProp:t,onChange:n}),s=e!==void 0,u=s?e:i;{const f=g.useRef(e!==void 0);g.useEffect(()=>{const d=f.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,r])}const c=g.useCallback(f=>{var d;if(s){const p=yC(f)?f(e):f;p!==e&&((d=l.current)==null||d.call(l,p))}else o(f)},[s,e,o,l]);return[u,c]}function xC({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),i=g.useRef(n),o=g.useRef(t);return gC(()=>{o.current=t},[t]),g.useEffect(()=>{var l;i.current!==n&&((l=o.current)==null||l.call(o,n),i.current=n)},[n,i]),[n,r,o]}function yC(e){return typeof e=="function"}var vC=g.createContext(void 0);function ta(e){const t=g.useContext(vC);return e||t||"ltr"}var Ya="rovingFocusGroup.onEntryFocus",wC={bubbles:!1,cancelable:!0},Uo="RovingFocusGroup",[xc,iy,SC]=Hd(Uo),[bC,oy]=sr(Uo,[SC]),[kC,NC]=bC(Uo),ly=g.forwardRef((e,t)=>a.jsx(xc.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(xc.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(CC,{...e,ref:t})})}));ly.displayName=Uo;var CC=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:f=!1,...d}=e,p=g.useRef(null),m=ve(t,p),w=ta(o),[x,S]=bi({prop:l,defaultProp:s??null,onChange:u,caller:Uo}),[y,h]=g.useState(!1),v=er(c),k=iy(n),j=g.useRef(!1),[C,E]=g.useState(0);return g.useEffect(()=>{const T=p.current;if(T)return T.addEventListener(Ya,v),()=>T.removeEventListener(Ya,v)},[v]),a.jsx(kC,{scope:n,orientation:r,dir:w,loop:i,currentTabStopId:x,onItemFocus:g.useCallback(T=>S(T),[S]),onItemShiftTab:g.useCallback(()=>h(!0),[]),onFocusableItemAdd:g.useCallback(()=>E(T=>T+1),[]),onFocusableItemRemove:g.useCallback(()=>E(T=>T-1),[]),children:a.jsx(oe.div,{tabIndex:y||C===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:Z(e.onMouseDown,()=>{j.current=!0}),onFocus:Z(e.onFocus,T=>{const O=!j.current;if(T.target===T.currentTarget&&O&&!y){const M=new CustomEvent(Ya,wC);if(T.currentTarget.dispatchEvent(M),!M.defaultPrevented){const R=k().filter(L=>L.focusable),_=R.find(L=>L.active),H=R.find(L=>L.id===x),I=[_,H,...R].filter(Boolean).map(L=>L.ref.current);uy(I,f)}}j.current=!1}),onBlur:Z(e.onBlur,()=>h(!1))})})}),sy="RovingFocusGroupItem",ay=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:l,...s}=e,u=qn(),c=o||u,f=NC(sy,n),d=f.currentTabStopId===c,p=iy(n),{onFocusableItemAdd:m,onFocusableItemRemove:w,currentTabStopId:x}=f;return g.useEffect(()=>{if(r)return m(),()=>w()},[r,m,w]),a.jsx(xc.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:a.jsx(oe.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:Z(e.onMouseDown,S=>{r?f.onItemFocus(c):S.preventDefault()}),onFocus:Z(e.onFocus,()=>f.onItemFocus(c)),onKeyDown:Z(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){f.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const y=PC(S,f.orientation,f.dir);if(y!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let v=p().filter(k=>k.focusable).map(k=>k.ref.current);if(y==="last")v.reverse();else if(y==="prev"||y==="next"){y==="prev"&&v.reverse();const k=v.indexOf(S.currentTarget);v=f.loop?TC(v,k+1):v.slice(k+1)}setTimeout(()=>uy(v))}}),children:typeof l=="function"?l({isCurrentTabStop:d,hasTabStop:x!=null}):l})})});ay.displayName=sy;var jC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function EC(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function PC(e,t,n){const r=EC(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return jC[r]}function uy(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function TC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _C=ly,AC=ay;function RC(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var Vo=e=>{const{present:t,children:n}=e,r=IC(t),i=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),o=ve(r.ref,MC(i));return typeof n=="function"||r.isPresent?g.cloneElement(i,{ref:o}):null};Vo.displayName="Presence";function IC(e){const[t,n]=g.useState(),r=g.useRef(null),i=g.useRef(e),o=g.useRef("none"),l=e?"mounted":"unmounted",[s,u]=RC(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const c=ml(r.current);o.current=s==="mounted"?c:"none"},[s]),tt(()=>{const c=r.current,f=i.current;if(f!==e){const p=o.current,m=ml(c);e?u("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),tt(()=>{if(t){let c;const f=t.ownerDocument.defaultView??window,d=m=>{const x=ml(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&x&&(u("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",c=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},p=m=>{m.target===t&&(o.current=ml(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:g.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function ml(e){return(e==null?void 0:e.animationName)||"none"}function MC(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var na="Tabs",[LC,RI]=sr(na,[oy]),cy=oy(),[OC,Wd]=LC(na),dy=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:l="horizontal",dir:s,activationMode:u="automatic",...c}=e,f=ta(s),[d,p]=bi({prop:r,onChange:i,defaultProp:o??"",caller:na});return a.jsx(OC,{scope:n,baseId:qn(),value:d,onValueChange:p,orientation:l,dir:f,activationMode:u,children:a.jsx(oe.div,{dir:f,"data-orientation":l,...c,ref:t})})});dy.displayName=na;var fy="TabsList",py=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=Wd(fy,n),l=cy(n);return a.jsx(_C,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:a.jsx(oe.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});py.displayName=fy;var my="TabsTrigger",hy=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,l=Wd(my,n),s=cy(n),u=yy(l.baseId,r),c=vy(l.baseId,r),f=r===l.value;return a.jsx(AC,{asChild:!0,...s,focusable:!i,active:f,children:a.jsx(oe.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":c,"data-state":f?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:t,onMouseDown:Z(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?l.onValueChange(r):d.preventDefault()}),onKeyDown:Z(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&l.onValueChange(r)}),onFocus:Z(e.onFocus,()=>{const d=l.activationMode!=="manual";!f&&!i&&d&&l.onValueChange(r)})})})});hy.displayName=my;var gy="TabsContent",xy=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...l}=e,s=Wd(gy,n),u=yy(s.baseId,r),c=vy(s.baseId,r),f=r===s.value,d=g.useRef(f);return g.useEffect(()=>{const p=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(p)},[]),a.jsx(Vo,{present:i||f,children:({present:p})=>a.jsx(oe.div,{"data-state":f?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!p,id:c,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:p&&o})})});xy.displayName=gy;function yy(e,t){return`${e}-trigger-${t}`}function vy(e,t){return`${e}-content-${t}`}var DC=dy,wy=py,Sy=hy,by=xy;const zC=DC,ky=g.forwardRef(({className:e,...t},n)=>a.jsx(wy,{ref:n,className:ue("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));ky.displayName=wy.displayName;const Ll=g.forwardRef(({className:e,...t},n)=>a.jsx(Sy,{ref:n,className:ue("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Ll.displayName=Sy.displayName;const Ol=g.forwardRef(({className:e,...t},n)=>a.jsx(by,{ref:n,className:ue("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ol.displayName=by.displayName;var FC="Label",Ny=g.forwardRef((e,t)=>a.jsx(oe.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Ny.displayName=FC;var Cy=Ny;const BC=Ud("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ze=g.forwardRef(({className:e,...t},n)=>a.jsx(Cy,{ref:n,className:ue(BC(),e),...t}));Ze.displayName=Cy.displayName;function $C(e,t=globalThis==null?void 0:globalThis.document){const n=er(e);g.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var UC="DismissableLayer",yc="dismissableLayer.update",VC="dismissableLayer.pointerDownOutside",HC="dismissableLayer.focusOutside",tm,jy=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gd=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:l,onDismiss:s,...u}=e,c=g.useContext(jy),[f,d]=g.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),w=ve(t,E=>d(E)),x=Array.from(c.layers),[S]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=x.indexOf(S),h=f?x.indexOf(f):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=h>=y,j=KC(E=>{const T=E.target,O=[...c.branches].some(M=>M.contains(T));!k||O||(i==null||i(E),l==null||l(E),E.defaultPrevented||s==null||s())},p),C=QC(E=>{const T=E.target;[...c.branches].some(M=>M.contains(T))||(o==null||o(E),l==null||l(E),E.defaultPrevented||s==null||s())},p);return $C(E=>{h===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},p),g.useEffect(()=>{if(f)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(tm=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),nm(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=tm)}},[f,p,n,c]),g.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),nm())},[f,c]),g.useEffect(()=>{const E=()=>m({});return document.addEventListener(yc,E),()=>document.removeEventListener(yc,E)},[]),a.jsx(oe.div,{...u,ref:w,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,j.onPointerDownCapture)})});Gd.displayName=UC;var WC="DismissableLayerBranch",GC=g.forwardRef((e,t)=>{const n=g.useContext(jy),r=g.useRef(null),i=ve(t,r);return g.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),a.jsx(oe.div,{...e,ref:i})});GC.displayName=WC;function KC(e,t=globalThis==null?void 0:globalThis.document){const n=er(e),r=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){Ey(VC,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function QC(e,t=globalThis==null?void 0:globalThis.document){const n=er(e),r=g.useRef(!1);return g.useEffect(()=>{const i=o=>{o.target&&!r.current&&Ey(HC,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nm(){const e=new CustomEvent(yc);document.dispatchEvent(e)}function Ey(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?hC(i,o):i.dispatchEvent(o)}var Xa="focusScope.autoFocusOnMount",qa="focusScope.autoFocusOnUnmount",rm={bubbles:!1,cancelable:!0},YC="FocusScope",Kd=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[s,u]=g.useState(null),c=er(i),f=er(o),d=g.useRef(null),p=ve(t,x=>u(x)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let x=function(v){if(m.paused||!s)return;const k=v.target;s.contains(k)?d.current=k:In(d.current,{select:!0})},S=function(v){if(m.paused||!s)return;const k=v.relatedTarget;k!==null&&(s.contains(k)||In(d.current,{select:!0}))},y=function(v){if(document.activeElement===document.body)for(const j of v)j.removedNodes.length>0&&In(s)};document.addEventListener("focusin",x),document.addEventListener("focusout",S);const h=new MutationObserver(y);return s&&h.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",S),h.disconnect()}}},[r,s,m.paused]),g.useEffect(()=>{if(s){om.add(m);const x=document.activeElement;if(!s.contains(x)){const y=new CustomEvent(Xa,rm);s.addEventListener(Xa,c),s.dispatchEvent(y),y.defaultPrevented||(XC(t2(Py(s)),{select:!0}),document.activeElement===x&&In(s))}return()=>{s.removeEventListener(Xa,c),setTimeout(()=>{const y=new CustomEvent(qa,rm);s.addEventListener(qa,f),s.dispatchEvent(y),y.defaultPrevented||In(x??document.body,{select:!0}),s.removeEventListener(qa,f),om.remove(m)},0)}}},[s,c,f,m]);const w=g.useCallback(x=>{if(!n&&!r||m.paused)return;const S=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,y=document.activeElement;if(S&&y){const h=x.currentTarget,[v,k]=qC(h);v&&k?!x.shiftKey&&y===k?(x.preventDefault(),n&&In(v,{select:!0})):x.shiftKey&&y===v&&(x.preventDefault(),n&&In(k,{select:!0})):y===h&&x.preventDefault()}},[n,r,m.paused]);return a.jsx(oe.div,{tabIndex:-1,...l,ref:p,onKeyDown:w})});Kd.displayName=YC;function XC(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(In(r,{select:t}),document.activeElement!==n)return}function qC(e){const t=Py(e),n=im(t,e),r=im(t.reverse(),e);return[n,r]}function Py(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function im(e,t){for(const n of e)if(!JC(n,{upTo:t}))return n}function JC(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ZC(e){return e instanceof HTMLInputElement&&"select"in e}function In(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ZC(e)&&t&&e.select()}}var om=e2();function e2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=lm(e,t),e.unshift(t)},remove(t){var n;e=lm(e,t),(n=e[0])==null||n.resume()}}}function lm(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function t2(e){return e.filter(t=>t.tagName!=="A")}var n2="Portal",Qd=g.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,o]=g.useState(!1);tt(()=>o(!0),[]);const l=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return l?ob.createPortal(a.jsx(oe.div,{...r,ref:t}),l):null});Qd.displayName=n2;var Ja=0;function Ty(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??sm()),document.body.insertAdjacentElement("beforeend",e[1]??sm()),Ja++,()=>{Ja===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ja--}},[])}function sm(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ln=function(){return ln=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return v2;var t=w2(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},b2=Iy(),ai="data-scroll-locked",k2=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,s=e.gap;return n===void 0&&(n="margin"),` + */const GN=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Ns=ee("zap",GN),KN=[{name:"Templates",href:"/templates",icon:Er,description:"Browse assistant templates and examples"},{name:"Assistant Studio",href:"/playground",icon:ea,description:"Build, test and refine your AI assistants"},{name:"Model Catalog",href:"/models",icon:Zs,description:"Browse and manage AI models"},{name:"Settings",href:"/settings",icon:si,description:"Application settings"}];function QN(){const e=$o();return a.jsxs("div",{className:"flex h-full flex-col bg-background border-r",children:[a.jsx("div",{className:"p-6 border-b",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-8 h-8 bg-primary rounded-lg flex items-center justify-center",children:a.jsx(Er,{className:"h-5 w-5 text-primary-foreground"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"font-semibold text-lg",children:"Edge LLM"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Local AI Platform"})]})]})}),a.jsxs("div",{className:"flex-1 px-3 py-4 space-y-8",children:[a.jsx("div",{children:a.jsxs(Up,{to:"/",className:"flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-all hover:bg-accent text-muted-foreground hover:text-foreground",children:[a.jsx(Vk,{className:"h-4 w-4"}),a.jsx("span",{children:"Back to Home"})]})}),a.jsxs("div",{children:[a.jsx("h2",{className:"mb-2 px-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Get started"}),a.jsx("nav",{className:"space-y-1",children:KN.map(t=>{const n=e.pathname===t.href;return a.jsxs(Up,{to:t.href,className:ue("flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-all hover:bg-accent",n?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:text-foreground"),children:[a.jsx(t.icon,{className:"h-4 w-4"}),a.jsx("div",{className:"flex-1",children:t.name})]},t.name)})})]})]})]})}function YN(){return a.jsxs("div",{className:"flex h-screen bg-background",children:[a.jsx("div",{className:"w-64 border-r",children:a.jsx(QN,{})}),a.jsx("div",{className:"flex-1 overflow-hidden",children:a.jsx(Xb,{})})]})}function Jp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ty(...e){return t=>{let n=!1;const r=e.map(i=>{const o=Jp(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:o,...l}=r,s=g.Children.toArray(o),u=s.find(ZN);if(u){const c=u.props.children,f=s.map(d=>d===u?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:d);return a.jsx(t,{...l,ref:i,children:g.isValidElement(c)?g.cloneElement(c,void 0,f):null})}return a.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var XN=Si("Slot");function qN(e){const t=g.forwardRef((n,r)=>{const{children:i,...o}=n;if(g.isValidElement(i)){const l=tC(i),s=eC(o,i.props);return i.type!==g.Fragment&&(s.ref=r?ty(r,l):l),g.cloneElement(i,s)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ny=Symbol("radix.slottable");function JN(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ny,t}function ZN(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ny}function eC(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{const u=o(...s);return i(...s),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function tC(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Zp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,em=Bx,Ud=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return em(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(c=>{const f=n==null?void 0:n[c],d=o==null?void 0:o[c];if(f===null)return null;const p=Zp(f)||Zp(d);return i[c][p]}),s=n&&Object.entries(n).reduce((c,f)=>{let[d,p]=f;return p===void 0||(c[d]=p),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,f)=>{let{class:d,className:p,...m}=f;return Object.entries(m).every(w=>{let[x,S]=w;return Array.isArray(S)?S.includes({...o,...s}[x]):{...o,...s}[x]===S})?[...c,d,p]:c},[]);return em(e,l,u,n==null?void 0:n.class,n==null?void 0:n.className)},Vd=Ud("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),fe=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const l=r?XN:"button";return a.jsx(l,{className:ue(Vd({variant:t,size:n,className:e})),ref:o,...i})});fe.displayName="Button";function nC(){const e=Ti();return a.jsxs("div",{className:"min-h-screen bg-gray-50",children:[a.jsx("nav",{className:"bg-white border-b border-gray-200",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex justify-between items-center h-20",children:[a.jsx("div",{className:"flex items-center",children:a.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-16 w-16",onError:t=>{console.error("Logo failed to load"),t.currentTarget.style.display="none"}})}),a.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[a.jsx("span",{className:"text-white bg-purple-600 px-4 py-2 rounded-md font-medium",children:"Home"}),a.jsx("button",{onClick:()=>e("/technology"),className:"text-gray-700 hover:text-purple-600 font-medium transition-colors",children:"Technology"}),a.jsx("button",{onClick:()=>e("/usecases"),className:"text-gray-700 hover:text-purple-600 font-medium transition-colors",children:"Use Cases"}),a.jsx(fe,{variant:"outline",onClick:()=>e("/playground"),className:"border-purple-600 text-purple-600 hover:bg-purple-50",children:"My device"})]}),a.jsx("div",{className:"md:hidden",children:a.jsx(fe,{variant:"ghost",size:"sm",children:a.jsx(Bd,{className:"h-5 w-5"})})})]})})}),a.jsx("div",{className:"relative py-24 px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[a.jsx("div",{className:"relative mb-8",children:a.jsxs("h1",{className:"text-5xl md:text-7xl lg:text-8xl font-bold text-black leading-tight",children:["Offline AI that",a.jsx("br",{}),"works where the",a.jsx("br",{}),"cloud cannot"]})}),a.jsx("p",{className:"text-xl md:text-2xl text-purple-700 font-semibold mb-12 max-w-3xl mx-auto",children:"AI that stays reliable, private, and resilient in any environment"}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center items-center mb-20",children:[a.jsx(fe,{size:"lg",className:"bg-purple-600 hover:bg-purple-700 text-white px-8 py-3 text-lg font-medium",onClick:()=>e("/playground"),children:"Learn More"}),a.jsx(fe,{size:"lg",variant:"outline",className:"border-purple-600 text-purple-600 hover:bg-purple-50 px-8 py-3 text-lg font-medium",onClick:()=>e("/playground"),children:"I already have a device"})]})]})}),a.jsx("div",{className:"py-16 px-4 sm:px-6 lg:px-8 bg-white",children:a.jsx("div",{className:"max-w-6xl mx-auto",children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[a.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-lg border border-gray-200",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"w-18 h-18 bg-purple-100 rounded-2xl flex items-center justify-center mb-6",children:a.jsx(sN,{className:"h-12 w-12 text-purple-600"})}),a.jsx("h3",{className:"text-2xl font-bold text-black mb-4",children:"Always Available"})]}),a.jsx("p",{className:"text-gray-700 text-base leading-relaxed",children:"Cloud AI fails without internet. Our offline AI runs fully on-device, ready to assist anywhere — from airplanes to remote mountains."})]}),a.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-lg border border-gray-200",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"w-18 h-18 bg-purple-100 rounded-2xl flex items-center justify-center mb-6",children:a.jsx(gc,{className:"h-12 w-12 text-purple-600"})}),a.jsx("h3",{className:"text-2xl font-bold text-black mb-4",children:"Privacy & Security"})]}),a.jsx("p",{className:"text-gray-700 text-base leading-relaxed",children:"Cloud AI requires uploading sensitive data. Offline AI keeps all processing local, protecting personal privacy and enterprise security."})]}),a.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-lg border border-gray-200",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"w-18 h-18 bg-purple-100 rounded-2xl flex items-center justify-center mb-6",children:a.jsx(Ns,{className:"h-12 w-12 text-purple-600"})}),a.jsx("h3",{className:"text-2xl font-bold text-black mb-4",children:"Reliability"})]}),a.jsx("p",{className:"text-gray-700 text-base leading-relaxed",children:"Cloud latency can cost lives in emergencies. Offline AI responds instantly, built for survival, healthcare, and safety-critical moments."})]})]})})}),a.jsx("footer",{className:"bg-gray-900 text-white py-12 px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"max-w-6xl mx-auto text-center",children:[a.jsx("div",{className:"flex items-center justify-center mb-4",children:a.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-12 w-12",onError:t=>{console.error("Footer logo failed to load"),t.currentTarget.style.display="none"}})}),a.jsx("p",{className:"text-gray-400 mb-6",children:"Need help? Contact us to get customized device and services"}),a.jsxs("div",{className:"flex justify-center space-x-6",children:[a.jsx("a",{href:"#",className:"text-gray-400 hover:text-white",children:"Privacy Policy"}),a.jsx("a",{href:"#",className:"text-gray-400 hover:text-white",children:"Terms of Service"}),a.jsx("a",{href:"#",className:"text-gray-400 hover:text-white",children:"Support"})]})]})})]})}const rC=Ud("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ye({className:e,variant:t,...n}){return a.jsx("div",{className:ue(rC({variant:t}),e),...n})}const Ue=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ue("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Ue.displayName="Card";const It=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ue("flex flex-col space-y-1.5 p-6",e),...t}));It.displayName="CardHeader";const Mt=g.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:ue("text-2xl font-semibold leading-none tracking-tight",e),...t}));Mt.displayName="CardTitle";const iC=g.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:ue("text-sm text-muted-foreground",e),...t}));iC.displayName="CardDescription";const Qe=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ue("p-6 pt-0",e),...t}));Qe.displayName="CardContent";const oC=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ue("flex items-center p-6 pt-0",e),...t}));oC.displayName="CardFooter";function lC(){const[e,t]=g.useState("Hardware"),n=Ti();return a.jsxs("div",{className:"min-h-screen bg-gray-50",children:[a.jsx("nav",{className:"bg-white border-b border-gray-200",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex justify-between items-center h-20",children:[a.jsx("div",{className:"flex items-center",children:a.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-16 w-16",onError:r=>{console.error("Logo failed to load"),r.currentTarget.style.display="none"}})}),a.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[a.jsx("button",{onClick:()=>n("/"),className:"text-gray-700 hover:text-purple-600 font-medium",children:"Home"}),a.jsx("span",{className:"text-white bg-purple-600 px-4 py-2 rounded-md font-medium",children:"Technology"}),a.jsx("button",{onClick:()=>n("/usecases"),className:"text-gray-700 hover:text-purple-600 font-medium transition-colors",children:"Use Cases"}),a.jsx(fe,{variant:"outline",onClick:()=>n("/playground"),className:"border-purple-600 text-purple-600 hover:bg-purple-50",children:"My device"})]}),a.jsx("div",{className:"md:hidden",children:a.jsx(fe,{variant:"ghost",size:"sm",children:a.jsx(Bd,{className:"h-5 w-5"})})})]})})}),a.jsx("div",{className:"py-24 px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[a.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-black mb-6",children:"Our Technology"}),a.jsx("p",{className:"text-xl text-purple-700 font-semibold max-w-2xl mx-auto mb-8",children:"Low-cost FPGA-based design, optimized for Large Language Models on-device."}),a.jsx("div",{className:"flex justify-center mb-12",children:a.jsx("div",{className:"bg-white rounded-lg p-1 shadow-sm",children:["Hardware","Software"].map(r=>a.jsx("button",{onClick:()=>t(r),className:`px-6 py-2 rounded-md text-sm font-medium transition-all ${e===r?"bg-purple-600 text-white":"text-gray-700 hover:text-purple-600"}`,children:r},r))})})]})}),a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:[e==="Hardware"&&a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-start",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-6",children:"Hardware Description"}),a.jsx("p",{className:"text-lg text-gray-800 leading-relaxed",children:"EdgeMate is an ultra–low-budget single-board computer designed specifically for large language model (LLM) deployment. Despite its compact form factor and low power consumption, we provide:"}),a.jsxs("ul",{className:"mt-6 space-y-3 text-lg text-gray-800",children:[a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Accelerated inference performance — delivering up to 15 tokens per second on a 30B model, thanks to its optimized FPGA-based AI engine."]}),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"High memory capacity — up to 40GB RAM, enabling hosting of LLMs up to ≥30B parameters."]}),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Cost efficiency — making advanced AI workloads accessible at low cost."]})]})]}),a.jsx(Ue,{className:"bg-gradient-to-br from-purple-50 to-blue-50 border-0 shadow-lg",children:a.jsx(Qe,{className:"p-8 space-y-6",children:a.jsxs("div",{className:"flex flex-col space-y-4",children:[a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Chip"}),a.jsx("span",{className:"text-base text-gray-700",children:"AMD Zynq UltraScale+ XCZU3EG"})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Processor"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"Quad-core 64-bit Arm Cortex-A53 CPU"}),a.jsx("div",{children:"Dual-core 64-bit Arm Cortex-R5 CPU"}),a.jsx("div",{children:"ARM Mali-400 GPU"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"FPGA Fabric"}),a.jsx("span",{className:"text-base text-gray-700",children:"70K LUT, 360 DSP slices"})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Memory"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"8 GB 64-bit DDR4 (2400 Mbps) on CPU side"}),a.jsx("div",{children:"8 GB / 16 GB / 32 GB DDR4 (2133 Mbps) on FPGA side (SODIMM)"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Storage"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"256 GB PCIe 2.0 x1 NVMe SSD"}),a.jsx("div",{children:"MicroSD card slot"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"I/O"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"USB 2.0 / 3.0 via Type-C"}),a.jsx("div",{children:"Mini DisplayPort"})]})]})]})})})]}),e==="Software"&&a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-start",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-6",children:"Software Stack"}),a.jsx("p",{className:"text-lg text-gray-800 leading-relaxed",children:"Our comprehensive software ecosystem is designed to maximize the potential of EdgeMate hardware, providing seamless LLM deployment and management capabilities:"}),a.jsxs("ul",{className:"mt-6 space-y-3 text-lg text-gray-800",children:[a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Custom FPGA-optimized inference engine with quantization support for efficient model deployment."]}),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Edge LLM Platform — intuitive web interface for model management, chat, and system monitoring."]}),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Support for popular model formats (GGUF, ONNX) and frameworks (Transformers, LLaMA.cpp)."]}),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"REST API for seamless integration with existing applications and services."]})]})]}),a.jsx(Ue,{className:"bg-gradient-to-br from-green-50 to-blue-50 border-0 shadow-lg",children:a.jsx(Qe,{className:"p-8 space-y-6",children:a.jsxs("div",{className:"flex flex-col space-y-4",children:[a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"OS Support"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"Ubuntu 22.04 LTS"}),a.jsx("div",{children:"Custom Linux Distribution"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Model Formats"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"GGUF (LLaMA.cpp)"}),a.jsx("div",{children:"ONNX"}),a.jsx("div",{children:"PyTorch"}),a.jsx("div",{children:"Transformers"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Inference Engine"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"Custom FPGA Accelerator"}),a.jsx("div",{children:"LLaMA.cpp Integration"}),a.jsx("div",{children:"Quantization Support"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Management Interface"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"Web-based Dashboard"}),a.jsx("div",{children:"REST API"}),a.jsx("div",{children:"CLI Tools"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Development Tools"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"Python SDK"}),a.jsx("div",{children:"Model Optimization Tools"}),a.jsx("div",{children:"Performance Profiler"})]})]}),a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Security"}),a.jsxs("div",{className:"text-base text-gray-700 text-right",children:[a.jsx("div",{children:"Secure Boot"}),a.jsx("div",{children:"Model Encryption"}),a.jsx("div",{children:"Access Control"})]})]})]})})})]})]}),a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:[a.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-8",children:"Why us?"}),a.jsxs("div",{className:"bg-white rounded-3xl shadow-xl overflow-hidden",children:[a.jsxs("div",{className:"grid grid-cols-4 bg-gradient-to-r from-gray-50 to-gray-100",children:[a.jsx("div",{className:"p-6"}),a.jsx("div",{className:"p-6 text-center",children:a.jsx(ye,{className:"bg-purple-600 text-white font-bold px-4 py-2",children:"Ours"})}),a.jsx("div",{className:"p-6 text-center",children:a.jsx("span",{className:"font-bold text-gray-800",children:"Raspberry Pi 5"})}),a.jsx("div",{className:"p-6 text-center",children:a.jsx("span",{className:"font-bold text-gray-800",children:"Jetson Orin Nano"})})]}),[{label:"Price",ours:"$199",pi:"$120",jetson:"$249"},{label:"RAM",ours:"24GB/40GB",pi:"16GB",jetson:"8GB"},{label:"CPU",ours:"Cortex-A53",pi:"Cortex-A72",jetson:"Cortex-A78"},{label:"AI Engine",ours:"Optimized Accelerator on FPGA",pi:"Neon SIMD Instructions",jetson:"Cuda/Tensor Core"},{label:"Power",ours:"<10W",pi:"5-12 W",jetson:"7-25"},{label:"LLM decode Performance",ours:"15 tokens/s",pi:"<5 tokens/s",jetson:"15 tokens/s"}].map((r,i)=>a.jsxs("div",{className:`grid grid-cols-4 ${i%2===0?"bg-gray-50":"bg-white"}`,children:[a.jsx("div",{className:"p-4 font-medium text-gray-900 border-r border-gray-200",children:r.label}),a.jsx("div",{className:"p-4 text-center text-white bg-purple-600 font-medium",children:r.ours}),a.jsx("div",{className:"p-4 text-center text-purple-600 font-medium border-r border-gray-200",children:r.pi}),a.jsx("div",{className:"p-4 text-center text-purple-600 font-medium",children:r.jetson})]},r.label))]}),a.jsx("div",{className:"text-center mt-8",children:a.jsx(fe,{className:"bg-purple-600 hover:bg-purple-700 text-white px-8 py-3",children:"View our vision"})})]}),a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:[a.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-8",children:"The device layout plan"}),a.jsxs("div",{className:"bg-white rounded-2xl shadow-xl p-8 text-center",children:[a.jsx("div",{className:"relative max-w-4xl mx-auto",children:a.jsx("img",{src:"/assets/chips.png",alt:"Device Layout Plan",className:"w-full h-auto rounded-lg shadow-lg",onError:r=>{console.error("Chips image failed to load"),r.currentTarget.style.display="none"}})}),a.jsxs("div",{className:"flex justify-center space-x-4 mt-8",children:[a.jsx(fe,{className:"bg-purple-600 hover:bg-purple-700 text-white px-6 py-2",children:"Get your device"}),a.jsx(fe,{variant:"outline",className:"border-purple-600 text-purple-600 hover:bg-purple-50 px-6 py-2",children:"View use cases"})]})]}),a.jsx("p",{className:"text-center text-gray-600 mt-6",children:"Need help? Contact us to get customized device and services"})]})]})}function sC(){const e=Ti(),t=[{id:1,category:"Use case 1: Outdoor Rescue",title:"Offline AI that guides survival in extreme environments",description:"When hikers, travelers, or drivers lose connection to mountains, forests, or rural roads, cloud AI systems can't offer real-time survival guidance, first aid tips, and emergency signaling — even without internet. Includes moments, it becomes your reliable voice of calm and safety.",image:"/api/placeholder/336/240",bgColor:"from-blue-100 to-purple-100"},{id:2,category:"Use case 2: Offline Healthcare",title:"A simple device for seniors to access trusted medical guidance",description:"Many elderly users struggle with smartphones and digital devices. Our simple, voice-only need to press a button or speak a request to get clear, step-by-step medical advice. No internet, no accounts, no complicated setup — just instant, private support for everyday health concerns that helps.",image:"/api/placeholder/336/240",bgColor:"from-green-100 to-blue-100"},{id:3,category:"Use case 3: AI Companion and Assistance",title:"A private, always-available conversational partner",description:"Life can be stressful and lonely at times. Our Offline AI device can be embedded inside a plush toy, transforming it into a private, always-available companion. It listens, talks, tells stories without uploading data to the cloud. AI partner that brings warmth, reassurance, and practical help whenever you need it.",image:"/api/placeholder/336/240",bgColor:"from-purple-100 to-pink-100"}];return a.jsxs("div",{className:"min-h-screen bg-gray-50",children:[a.jsx("nav",{className:"bg-white border-b border-gray-200",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex justify-between items-center h-20",children:[a.jsx("div",{className:"flex items-center",children:a.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-16 w-16",onError:n=>{console.error("Logo failed to load"),n.currentTarget.style.display="none"}})}),a.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[a.jsx("button",{onClick:()=>e("/"),className:"text-gray-700 hover:text-purple-600 font-medium",children:"Home"}),a.jsx("button",{onClick:()=>e("/technology"),className:"text-gray-700 hover:text-purple-600 font-medium",children:"Technology"}),a.jsx("span",{className:"text-white bg-purple-600 px-4 py-2 rounded-md font-medium",children:"Use Cases"}),a.jsx(fe,{variant:"outline",onClick:()=>e("/playground"),className:"border-purple-600 text-purple-600 hover:bg-purple-50",children:"My device"})]}),a.jsx("div",{className:"md:hidden",children:a.jsx(fe,{variant:"ghost",size:"sm",children:a.jsx(Bd,{className:"h-5 w-5"})})})]})})}),a.jsx("div",{className:"py-24 px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[a.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-black mb-6",children:"Use Case Examples"}),a.jsx("p",{className:"text-xl text-purple-700 font-semibold max-w-2xl mx-auto mb-12",children:"Bringing intelligent computing to the edge of connectivity"})]})}),a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:t.map((n,r)=>a.jsx(Ue,{className:"bg-white shadow-lg border-0 rounded-3xl overflow-hidden h-full flex flex-col",children:a.jsxs(Qe,{className:"p-6 flex flex-col h-full",children:[a.jsx("div",{className:"w-full h-60 rounded-xl mb-6 overflow-hidden",children:a.jsx("img",{src:`/assets/${r===0?"outdoor_rescue.png":r===1?"health_care.png":"companion.png"}`,alt:n.title,className:"w-full h-full object-cover",onError:i=>{console.error(`Failed to load image for use case ${r+1}`),i.currentTarget.style.display="none";const o=document.createElement("div");o.className="w-full h-60 bg-gradient-to-br from-gray-200 to-gray-300 rounded-xl flex items-center justify-center",r===0?o.innerHTML='':r===1?o.innerHTML='':o.innerHTML='',i.currentTarget.parentNode&&i.currentTarget.parentNode.appendChild(o)}})}),a.jsxs("div",{className:"flex flex-col flex-grow space-y-4",children:[a.jsx("div",{className:"text-sm font-semibold text-purple-600",children:n.category}),a.jsx("h3",{className:"text-xl font-semibold text-black leading-tight",children:n.title}),a.jsx("p",{className:"text-gray-600 text-sm leading-relaxed flex-grow",children:n.description}),a.jsx("div",{className:"pt-4",children:a.jsx(fe,{className:"bg-purple-600 hover:bg-purple-700 text-white text-sm px-4 py-2 w-auto",onClick:()=>{console.log("Selected use case:",n.id)},children:"Select"})})]})]})},n.id))})}),a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-purple-400/30 via-blue-500/30 to-pink-500/30 backdrop-blur-sm rounded-3xl"}),a.jsxs("div",{className:"relative bg-purple-400/20 backdrop-blur-lg rounded-3xl p-8 text-center",children:[a.jsx("div",{className:"flex justify-center mb-6 space-x-1",children:[...Array(20)].map((n,r)=>a.jsx("div",{className:"bg-purple-600 rounded-full animate-pulse",style:{width:"3px",height:`${Math.random()*40+10}px`,animationDelay:`${r*.1}s`,animationDuration:"1s"}},r))}),a.jsx("h2",{className:"text-2xl font-medium text-white mb-4",children:"Customize your own device"}),a.jsx("p",{className:"text-gray-900 mb-6",children:"Need help? Contact us to get customized device and services"}),a.jsx(fe,{className:"bg-purple-600 hover:bg-purple-700 text-white px-8 py-3",onClick:()=>e("/playground"),children:"Get Started"})]})]})})]})}const ry=g.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:ue("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));ry.displayName="Input";function aC(){return[{id:"code-reviewer",name:"Code Review Expert",description:"Professional code reviewer for detailed analysis and suggestions. Helps identify bugs, security issues, and performance optimizations.",author:"EdgeLLM Team",category:"Developer Tools",tags:["code review","programming","debugging"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a senior software engineer. Analyze code for quality, best practices, performance, and security. Provide constructive feedback with specific examples.",temperature:.3,maxTokens:1e3,isOfficial:!0,createdAt:"2024-01-15",icon:"🔍",usageCount:1247,rating:4.8},{id:"writing-tutor",name:"Writing Assistant",description:"Helps improve writing with structure suggestions and clarity enhancements. Perfect for essays, articles, and professional documents.",author:"Community",category:"Writing",tags:["writing","editing","grammar"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a writing tutor. Help improve writing through structure, clarity, grammar, and style suggestions. Provide specific feedback and examples.",temperature:.4,maxTokens:800,isOfficial:!1,createdAt:"2024-01-20",icon:"📝",usageCount:892,rating:4.6},{id:"creative-writer",name:"Creative Writing Coach",description:"Inspires creativity and helps develop compelling stories and characters. Great for fiction writers and storytellers.",author:"Community",category:"Writing",tags:["creative","storytelling","fiction"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a creative writing coach. Help develop stories, characters, and narrative techniques. Provide encouraging feedback and creative suggestions.",temperature:.8,maxTokens:1e3,isOfficial:!0,createdAt:"2024-01-30",icon:"✨",usageCount:634,rating:4.7},{id:"data-analyst",name:"Data Analysis Expert",description:"Helps analyze data patterns, create insights, and generate comprehensive reports with statistical analysis.",author:"EdgeLLM Team",category:"Data & Analytics",tags:["data","analytics","statistics"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a data analysis expert. Help users understand data patterns, create visualizations, and provide statistical insights.",temperature:.2,maxTokens:1200,isOfficial:!0,createdAt:"2024-01-18",icon:"📊",usageCount:567,rating:4.9},{id:"language-tutor",name:"Language Learning Tutor",description:"Interactive language tutor for vocabulary, grammar, and conversation practice. Supports multiple languages.",author:"Community",category:"Education",tags:["language","learning","education"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a friendly language tutor. Help users learn languages through interactive exercises, explanations, and conversation practice.",temperature:.6,maxTokens:800,isOfficial:!1,createdAt:"2024-01-20",icon:"🌐",usageCount:423,rating:4.5},{id:"business-advisor",name:"Business Strategy Advisor",description:"Provides strategic business advice, market analysis, and growth recommendations for entrepreneurs and businesses.",author:"EdgeLLM Team",category:"Business",tags:["strategy","business","consulting"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a business strategy consultant. Provide strategic advice, market insights, and growth recommendations based on business principles.",temperature:.4,maxTokens:1e3,isOfficial:!0,createdAt:"2024-01-22",icon:"💼",usageCount:789,rating:4.7},{id:"research-assistant",name:"Research Assistant",description:"Helps with academic and professional research, source analysis, and comprehensive report writing.",author:"Community",category:"Research",tags:["research","academic","analysis"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a research assistant. Help users conduct thorough research, analyze sources, and organize findings into comprehensive reports.",temperature:.3,maxTokens:1200,isOfficial:!1,createdAt:"2024-01-25",icon:"📚",usageCount:356,rating:4.4},{id:"math-tutor",name:"Math & Science Tutor",description:"Expert tutor for mathematics, physics, chemistry, and other STEM subjects with step-by-step explanations.",author:"EdgeLLM Team",category:"Education",tags:["math","science","tutoring"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a math and science tutor. Provide clear, step-by-step explanations for mathematical and scientific concepts.",temperature:.2,maxTokens:1e3,isOfficial:!0,createdAt:"2024-01-28",icon:"🔬",usageCount:678,rating:4.8}]}function uC(){const e=Ti(),[t,n]=g.useState(!1),[r]=g.useState(aC()),[i,o]=g.useState([]),[l,s]=g.useState(""),[u,c]=g.useState("All");g.useEffect(()=>{f(),d()},[]);const f=async()=>{try{const h=`${window.location.protocol}//${window.location.host}`,v=await fetch(`${h}/models`);n(v.ok)}catch{n(!1)}},d=()=>{try{const h=JSON.parse(localStorage.getItem("likedTemplates")||"[]");o(h)}catch(h){console.error("Failed to load liked templates:",h)}},p=h=>{const v=i.includes(h)?i.filter(k=>k!==h):[...i,h];o(v),localStorage.setItem("likedTemplates",JSON.stringify(v))},m=h=>{const v={name:h.name,description:h.description,model:h.model,systemPrompt:h.systemPrompt,temperature:h.temperature,maxTokens:h.maxTokens};localStorage.setItem("loadAssistantConfig",JSON.stringify(v)),e("/playground")},w=r.filter(h=>{const v=h.name.toLowerCase().includes(l.toLowerCase())||h.description.toLowerCase().includes(l.toLowerCase())||h.tags.some(j=>j.toLowerCase().includes(l.toLowerCase())),k=u==="All"||h.category===u;return v&&k}),x=w.filter(h=>h.isOfficial),S=[...w].sort((h,v)=>v.usageCount-h.usageCount).slice(0,6),y=["All",...Array.from(new Set(r.map(h=>h.category)))];return a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx("div",{className:"sticky top-0 z-40 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:a.jsx("div",{className:"max-w-6xl mx-auto px-6 py-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("div",{className:"flex items-center gap-4",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center",children:a.jsx(Er,{className:"h-5 w-5 text-white"})}),a.jsx("h1",{className:"text-xl font-bold text-gray-900",children:"Assistant Templates"}),a.jsx(ye,{variant:t?"default":"secondary",className:"text-xs",children:t?"Online":"Offline"})]})}),a.jsxs(fe,{onClick:()=>e("/playground"),className:"flex items-center gap-2",children:[a.jsx(ei,{className:"h-4 w-4"}),"Create Assistant"]})]})})}),a.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8",children:[a.jsxs("div",{className:"text-center mb-12",children:[a.jsx("h1",{className:"text-4xl font-bold text-gray-900 mb-4",children:"Explore AI Assistants"}),a.jsx("p",{className:"text-lg text-gray-600 max-w-2xl mx-auto mb-8",children:"Discover, customize and deploy specialized AI assistants. Start with proven templates or build from scratch."}),a.jsxs("div",{className:"relative max-w-2xl mx-auto mb-8",children:[a.jsx(qp,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-400 h-5 w-5"}),a.jsx(ry,{type:"text",placeholder:"Search assistants...",value:l,onChange:h=>s(h.target.value),className:"pl-12 pr-4 py-3 text-lg rounded-full border-2 border-gray-200 focus:border-blue-500"})]}),a.jsx("div",{className:"flex flex-wrap justify-center gap-2 mb-8",children:y.map(h=>a.jsx(fe,{variant:u===h?"default":"outline",size:"sm",onClick:()=>c(h),className:"rounded-full",children:h},h))})]}),u==="All"&&x.length>0&&a.jsxs("div",{className:"mb-12",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[a.jsx(Qx,{className:"h-5 w-5 text-yellow-600"}),a.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Featured"}),a.jsx(ye,{variant:"secondary",className:"text-xs",children:"Curated by EdgeLLM Team"})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:x.slice(0,3).map(h=>a.jsx(Qa,{template:h,isLiked:i.includes(h.id),onLike:()=>p(h.id),onUse:()=>m(h),featured:!0},h.id))})]}),u==="All"&&a.jsxs("div",{className:"mb-12",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[a.jsx(Zx,{className:"h-5 w-5 text-green-600"}),a.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Trending"}),a.jsx(ye,{variant:"secondary",className:"text-xs",children:"Most popular this week"})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:S.slice(0,6).map(h=>a.jsx(Qa,{template:h,isLiked:i.includes(h.id),onLike:()=>p(h.id),onUse:()=>m(h),trending:!0},h.id))})]}),a.jsxs("div",{className:"mb-12",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[a.jsx(HN,{className:"h-5 w-5 text-blue-600"}),a.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:u==="All"?"All Templates":u}),a.jsxs(ye,{variant:"outline",className:"text-xs",children:[w.length," available"]})]}),w.length>0?a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:w.map(h=>a.jsx(Qa,{template:h,isLiked:i.includes(h.id),onLike:()=>p(h.id),onUse:()=>m(h)},h.id))}):a.jsx(Ue,{className:"p-12 text-center",children:a.jsxs("div",{className:"flex flex-col items-center gap-4",children:[a.jsx(qp,{className:"h-12 w-12 text-gray-400"}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No templates found"}),a.jsx("p",{className:"text-gray-600",children:"Try adjusting your search or category filters"})]}),a.jsx(fe,{variant:"outline",onClick:()=>{s(""),c("All")},children:"Clear filters"})]})})]})]})]})}function Qa({template:e,isLiked:t,onLike:n,onUse:r,featured:i=!1,trending:o=!1}){return a.jsxs(Ue,{className:"group hover:shadow-xl transition-all duration-300 hover:-translate-y-1 border-2 hover:border-blue-200 relative",children:[i&&a.jsxs("div",{className:"absolute -top-2 -right-2 bg-yellow-500 text-white text-xs px-2 py-1 rounded-full font-medium flex items-center gap-1",children:[a.jsx(Qx,{className:"h-3 w-3"}),"Featured"]}),o&&a.jsxs("div",{className:"absolute -top-2 -right-2 bg-green-500 text-white text-xs px-2 py-1 rounded-full font-medium flex items-center gap-1",children:[a.jsx(Zx,{className:"h-3 w-3"}),"Trending"]}),a.jsx(It,{className:"pb-4",children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-500 to-purple-600 rounded-xl flex items-center justify-center text-2xl",children:e.icon}),a.jsxs("div",{children:[a.jsx(Mt,{className:"text-lg group-hover:text-blue-600 transition-colors",children:e.name}),a.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[a.jsxs("p",{className:"text-sm text-blue-600 font-medium",children:["by ",e.author]}),e.isOfficial&&a.jsxs(ye,{variant:"default",className:"text-xs px-2 py-0 bg-blue-600",children:[a.jsx(Wk,{className:"h-3 w-3 mr-1"}),"Official"]})]})]})]}),a.jsx(fe,{variant:"ghost",size:"sm",onClick:n,className:`${t?"text-red-500":"text-gray-400 hover:text-red-500"} transition-colors`,title:t?"Unlike":"Like",children:a.jsx(yN,{className:`h-4 w-4 ${t?"fill-current":""}`})})]})}),a.jsxs(Qe,{className:"space-y-4",children:[a.jsx("p",{className:"text-sm text-gray-600 line-clamp-2 leading-relaxed",children:e.description}),a.jsx("div",{className:"flex flex-wrap gap-2",children:e.tags.slice(0,3).map(l=>a.jsx(ye,{variant:"secondary",className:"text-xs bg-gray-100 hover:bg-gray-200 transition-colors",children:l},l))}),a.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(pN,{className:"h-4 w-4"}),a.jsx("span",{children:e.usageCount.toLocaleString()})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(DN,{className:"h-4 w-4 text-yellow-500 fill-current"}),a.jsx("span",{children:e.rating})]})]}),a.jsx(ye,{variant:"outline",className:"text-xs",children:e.category})]}),a.jsx("div",{className:"pt-2",children:a.jsxs(fe,{onClick:r,className:"w-full group-hover:bg-blue-600 group-hover:text-white transition-all",variant:"outline",children:[a.jsx(ea,{className:"h-4 w-4 mr-2"}),"Build Assistant"]})})]})]})}function Z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function cC(e,t){const n=g.createContext(t),r=o=>{const{children:l,...s}=o,u=g.useMemo(()=>s,Object.values(s));return a.jsx(n.Provider,{value:u,children:l})};r.displayName=e+"Provider";function i(o){const l=g.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function sr(e,t=[]){let n=[];function r(o,l){const s=g.createContext(l),u=n.length;n=[...n,l];const c=d=>{var y;const{scope:p,children:m,...w}=d,x=((y=p==null?void 0:p[e])==null?void 0:y[u])||s,S=g.useMemo(()=>w,Object.values(w));return a.jsx(x.Provider,{value:S,children:m})};c.displayName=o+"Provider";function f(d,p){var x;const m=((x=p==null?void 0:p[e])==null?void 0:x[u])||s,w=g.useContext(m);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[c,f]}const i=()=>{const o=n.map(l=>g.createContext(l));return function(s){const u=(s==null?void 0:s[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,dC(i,...t)]}function dC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((s,{useScope:u,scopeName:c})=>{const d=u(o)[`__scope${c}`];return{...s,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Hd(e){const t=e+"CollectionProvider",[n,r]=sr(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=x=>{const{scope:S,children:y}=x,h=Vt.useRef(null),v=Vt.useRef(new Map).current;return a.jsx(i,{scope:S,itemMap:v,collectionRef:h,children:y})};l.displayName=t;const s=e+"CollectionSlot",u=Si(s),c=Vt.forwardRef((x,S)=>{const{scope:y,children:h}=x,v=o(s,y),k=ve(S,v.collectionRef);return a.jsx(u,{ref:k,children:h})});c.displayName=s;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=Si(f),m=Vt.forwardRef((x,S)=>{const{scope:y,children:h,...v}=x,k=Vt.useRef(null),j=ve(S,k),C=o(f,y);return Vt.useEffect(()=>(C.itemMap.set(k,{ref:k,...v}),()=>void C.itemMap.delete(k))),a.jsx(p,{[d]:"",ref:j,children:h})});m.displayName=f;function w(x){const S=o(e+"CollectionConsumer",x);return Vt.useCallback(()=>{const h=S.collectionRef.current;if(!h)return[];const v=Array.from(h.querySelectorAll(`[${d}]`));return Array.from(S.itemMap.values()).sort((C,E)=>v.indexOf(C.ref.current)-v.indexOf(E.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:l,Slot:c,ItemSlot:m},w,r]}var tt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},fC=Gc[" useId ".trim().toString()]||(()=>{}),pC=0;function qn(e){const[t,n]=g.useState(fC());return tt(()=>{e||n(r=>r??String(pC++))},[e]),e||(t?`radix-${t}`:"")}var mC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oe=mC.reduce((e,t)=>{const n=Si(`Primitive.${t}`),r=g.forwardRef((i,o)=>{const{asChild:l,...s}=i,u=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function hC(e,t){e&&Ei.flushSync(()=>e.dispatchEvent(t))}function er(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var gC=Gc[" useInsertionEffect ".trim().toString()]||tt;function bi({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,l]=xC({defaultProp:t,onChange:n}),s=e!==void 0,u=s?e:i;{const f=g.useRef(e!==void 0);g.useEffect(()=>{const d=f.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,r])}const c=g.useCallback(f=>{var d;if(s){const p=yC(f)?f(e):f;p!==e&&((d=l.current)==null||d.call(l,p))}else o(f)},[s,e,o,l]);return[u,c]}function xC({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),i=g.useRef(n),o=g.useRef(t);return gC(()=>{o.current=t},[t]),g.useEffect(()=>{var l;i.current!==n&&((l=o.current)==null||l.call(o,n),i.current=n)},[n,i]),[n,r,o]}function yC(e){return typeof e=="function"}var vC=g.createContext(void 0);function ta(e){const t=g.useContext(vC);return e||t||"ltr"}var Ya="rovingFocusGroup.onEntryFocus",wC={bubbles:!1,cancelable:!0},Uo="RovingFocusGroup",[xc,iy,SC]=Hd(Uo),[bC,oy]=sr(Uo,[SC]),[kC,NC]=bC(Uo),ly=g.forwardRef((e,t)=>a.jsx(xc.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(xc.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(CC,{...e,ref:t})})}));ly.displayName=Uo;var CC=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:f=!1,...d}=e,p=g.useRef(null),m=ve(t,p),w=ta(o),[x,S]=bi({prop:l,defaultProp:s??null,onChange:u,caller:Uo}),[y,h]=g.useState(!1),v=er(c),k=iy(n),j=g.useRef(!1),[C,E]=g.useState(0);return g.useEffect(()=>{const T=p.current;if(T)return T.addEventListener(Ya,v),()=>T.removeEventListener(Ya,v)},[v]),a.jsx(kC,{scope:n,orientation:r,dir:w,loop:i,currentTabStopId:x,onItemFocus:g.useCallback(T=>S(T),[S]),onItemShiftTab:g.useCallback(()=>h(!0),[]),onFocusableItemAdd:g.useCallback(()=>E(T=>T+1),[]),onFocusableItemRemove:g.useCallback(()=>E(T=>T-1),[]),children:a.jsx(oe.div,{tabIndex:y||C===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:Z(e.onMouseDown,()=>{j.current=!0}),onFocus:Z(e.onFocus,T=>{const O=!j.current;if(T.target===T.currentTarget&&O&&!y){const M=new CustomEvent(Ya,wC);if(T.currentTarget.dispatchEvent(M),!M.defaultPrevented){const R=k().filter(L=>L.focusable),_=R.find(L=>L.active),H=R.find(L=>L.id===x),I=[_,H,...R].filter(Boolean).map(L=>L.ref.current);uy(I,f)}}j.current=!1}),onBlur:Z(e.onBlur,()=>h(!1))})})}),sy="RovingFocusGroupItem",ay=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:l,...s}=e,u=qn(),c=o||u,f=NC(sy,n),d=f.currentTabStopId===c,p=iy(n),{onFocusableItemAdd:m,onFocusableItemRemove:w,currentTabStopId:x}=f;return g.useEffect(()=>{if(r)return m(),()=>w()},[r,m,w]),a.jsx(xc.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:a.jsx(oe.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:Z(e.onMouseDown,S=>{r?f.onItemFocus(c):S.preventDefault()}),onFocus:Z(e.onFocus,()=>f.onItemFocus(c)),onKeyDown:Z(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){f.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const y=PC(S,f.orientation,f.dir);if(y!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let v=p().filter(k=>k.focusable).map(k=>k.ref.current);if(y==="last")v.reverse();else if(y==="prev"||y==="next"){y==="prev"&&v.reverse();const k=v.indexOf(S.currentTarget);v=f.loop?TC(v,k+1):v.slice(k+1)}setTimeout(()=>uy(v))}}),children:typeof l=="function"?l({isCurrentTabStop:d,hasTabStop:x!=null}):l})})});ay.displayName=sy;var jC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function EC(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function PC(e,t,n){const r=EC(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return jC[r]}function uy(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function TC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _C=ly,AC=ay;function RC(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var Vo=e=>{const{present:t,children:n}=e,r=IC(t),i=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),o=ve(r.ref,MC(i));return typeof n=="function"||r.isPresent?g.cloneElement(i,{ref:o}):null};Vo.displayName="Presence";function IC(e){const[t,n]=g.useState(),r=g.useRef(null),i=g.useRef(e),o=g.useRef("none"),l=e?"mounted":"unmounted",[s,u]=RC(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const c=ml(r.current);o.current=s==="mounted"?c:"none"},[s]),tt(()=>{const c=r.current,f=i.current;if(f!==e){const p=o.current,m=ml(c);e?u("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),tt(()=>{if(t){let c;const f=t.ownerDocument.defaultView??window,d=m=>{const x=ml(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&x&&(u("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",c=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},p=m=>{m.target===t&&(o.current=ml(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:g.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function ml(e){return(e==null?void 0:e.animationName)||"none"}function MC(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var na="Tabs",[LC,RI]=sr(na,[oy]),cy=oy(),[OC,Wd]=LC(na),dy=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:l="horizontal",dir:s,activationMode:u="automatic",...c}=e,f=ta(s),[d,p]=bi({prop:r,onChange:i,defaultProp:o??"",caller:na});return a.jsx(OC,{scope:n,baseId:qn(),value:d,onValueChange:p,orientation:l,dir:f,activationMode:u,children:a.jsx(oe.div,{dir:f,"data-orientation":l,...c,ref:t})})});dy.displayName=na;var fy="TabsList",py=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=Wd(fy,n),l=cy(n);return a.jsx(_C,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:a.jsx(oe.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});py.displayName=fy;var my="TabsTrigger",hy=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,l=Wd(my,n),s=cy(n),u=yy(l.baseId,r),c=vy(l.baseId,r),f=r===l.value;return a.jsx(AC,{asChild:!0,...s,focusable:!i,active:f,children:a.jsx(oe.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":c,"data-state":f?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:t,onMouseDown:Z(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?l.onValueChange(r):d.preventDefault()}),onKeyDown:Z(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&l.onValueChange(r)}),onFocus:Z(e.onFocus,()=>{const d=l.activationMode!=="manual";!f&&!i&&d&&l.onValueChange(r)})})})});hy.displayName=my;var gy="TabsContent",xy=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...l}=e,s=Wd(gy,n),u=yy(s.baseId,r),c=vy(s.baseId,r),f=r===s.value,d=g.useRef(f);return g.useEffect(()=>{const p=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(p)},[]),a.jsx(Vo,{present:i||f,children:({present:p})=>a.jsx(oe.div,{"data-state":f?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!p,id:c,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:p&&o})})});xy.displayName=gy;function yy(e,t){return`${e}-trigger-${t}`}function vy(e,t){return`${e}-content-${t}`}var DC=dy,wy=py,Sy=hy,by=xy;const zC=DC,ky=g.forwardRef(({className:e,...t},n)=>a.jsx(wy,{ref:n,className:ue("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));ky.displayName=wy.displayName;const Ll=g.forwardRef(({className:e,...t},n)=>a.jsx(Sy,{ref:n,className:ue("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Ll.displayName=Sy.displayName;const Ol=g.forwardRef(({className:e,...t},n)=>a.jsx(by,{ref:n,className:ue("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ol.displayName=by.displayName;var FC="Label",Ny=g.forwardRef((e,t)=>a.jsx(oe.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Ny.displayName=FC;var Cy=Ny;const BC=Ud("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ze=g.forwardRef(({className:e,...t},n)=>a.jsx(Cy,{ref:n,className:ue(BC(),e),...t}));Ze.displayName=Cy.displayName;function $C(e,t=globalThis==null?void 0:globalThis.document){const n=er(e);g.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var UC="DismissableLayer",yc="dismissableLayer.update",VC="dismissableLayer.pointerDownOutside",HC="dismissableLayer.focusOutside",tm,jy=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gd=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:l,onDismiss:s,...u}=e,c=g.useContext(jy),[f,d]=g.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),w=ve(t,E=>d(E)),x=Array.from(c.layers),[S]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=x.indexOf(S),h=f?x.indexOf(f):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=h>=y,j=KC(E=>{const T=E.target,O=[...c.branches].some(M=>M.contains(T));!k||O||(i==null||i(E),l==null||l(E),E.defaultPrevented||s==null||s())},p),C=QC(E=>{const T=E.target;[...c.branches].some(M=>M.contains(T))||(o==null||o(E),l==null||l(E),E.defaultPrevented||s==null||s())},p);return $C(E=>{h===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},p),g.useEffect(()=>{if(f)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(tm=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),nm(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=tm)}},[f,p,n,c]),g.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),nm())},[f,c]),g.useEffect(()=>{const E=()=>m({});return document.addEventListener(yc,E),()=>document.removeEventListener(yc,E)},[]),a.jsx(oe.div,{...u,ref:w,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,j.onPointerDownCapture)})});Gd.displayName=UC;var WC="DismissableLayerBranch",GC=g.forwardRef((e,t)=>{const n=g.useContext(jy),r=g.useRef(null),i=ve(t,r);return g.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),a.jsx(oe.div,{...e,ref:i})});GC.displayName=WC;function KC(e,t=globalThis==null?void 0:globalThis.document){const n=er(e),r=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){Ey(VC,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function QC(e,t=globalThis==null?void 0:globalThis.document){const n=er(e),r=g.useRef(!1);return g.useEffect(()=>{const i=o=>{o.target&&!r.current&&Ey(HC,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nm(){const e=new CustomEvent(yc);document.dispatchEvent(e)}function Ey(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?hC(i,o):i.dispatchEvent(o)}var Xa="focusScope.autoFocusOnMount",qa="focusScope.autoFocusOnUnmount",rm={bubbles:!1,cancelable:!0},YC="FocusScope",Kd=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[s,u]=g.useState(null),c=er(i),f=er(o),d=g.useRef(null),p=ve(t,x=>u(x)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let x=function(v){if(m.paused||!s)return;const k=v.target;s.contains(k)?d.current=k:In(d.current,{select:!0})},S=function(v){if(m.paused||!s)return;const k=v.relatedTarget;k!==null&&(s.contains(k)||In(d.current,{select:!0}))},y=function(v){if(document.activeElement===document.body)for(const j of v)j.removedNodes.length>0&&In(s)};document.addEventListener("focusin",x),document.addEventListener("focusout",S);const h=new MutationObserver(y);return s&&h.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",S),h.disconnect()}}},[r,s,m.paused]),g.useEffect(()=>{if(s){om.add(m);const x=document.activeElement;if(!s.contains(x)){const y=new CustomEvent(Xa,rm);s.addEventListener(Xa,c),s.dispatchEvent(y),y.defaultPrevented||(XC(t2(Py(s)),{select:!0}),document.activeElement===x&&In(s))}return()=>{s.removeEventListener(Xa,c),setTimeout(()=>{const y=new CustomEvent(qa,rm);s.addEventListener(qa,f),s.dispatchEvent(y),y.defaultPrevented||In(x??document.body,{select:!0}),s.removeEventListener(qa,f),om.remove(m)},0)}}},[s,c,f,m]);const w=g.useCallback(x=>{if(!n&&!r||m.paused)return;const S=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,y=document.activeElement;if(S&&y){const h=x.currentTarget,[v,k]=qC(h);v&&k?!x.shiftKey&&y===k?(x.preventDefault(),n&&In(v,{select:!0})):x.shiftKey&&y===v&&(x.preventDefault(),n&&In(k,{select:!0})):y===h&&x.preventDefault()}},[n,r,m.paused]);return a.jsx(oe.div,{tabIndex:-1,...l,ref:p,onKeyDown:w})});Kd.displayName=YC;function XC(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(In(r,{select:t}),document.activeElement!==n)return}function qC(e){const t=Py(e),n=im(t,e),r=im(t.reverse(),e);return[n,r]}function Py(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function im(e,t){for(const n of e)if(!JC(n,{upTo:t}))return n}function JC(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ZC(e){return e instanceof HTMLInputElement&&"select"in e}function In(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ZC(e)&&t&&e.select()}}var om=e2();function e2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=lm(e,t),e.unshift(t)},remove(t){var n;e=lm(e,t),(n=e[0])==null||n.resume()}}}function lm(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function t2(e){return e.filter(t=>t.tagName!=="A")}var n2="Portal",Qd=g.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,o]=g.useState(!1);tt(()=>o(!0),[]);const l=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return l?ob.createPortal(a.jsx(oe.div,{...r,ref:t}),l):null});Qd.displayName=n2;var Ja=0;function Ty(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??sm()),document.body.insertAdjacentElement("beforeend",e[1]??sm()),Ja++,()=>{Ja===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ja--}},[])}function sm(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ln=function(){return ln=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return v2;var t=w2(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},b2=Iy(),ai="data-scroll-locked",k2=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,s=e.gap;return n===void 0&&(n="margin"),` .`.concat(i2,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`;