diff --git "a/static/assets/index-7336e918.js" "b/static/assets/index-7336e918.js" --- "a/static/assets/index-7336e918.js" +++ "b/static/assets/index-7336e918.js" @@ -284,7 +284,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 Kk=[["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"}]],vc=te("zap",Kk),Qk=[{name:"Templates",href:"/templates",icon:Er,description:"Browse assistant templates and examples"},{name:"Assistant Studio",href:"/playground",icon:ia,description:"Build, test and refine your AI assistants"},{name:"Model Catalog",href:"/models",icon:ra,description:"Browse and manage AI models"},{name:"Settings",href:"/settings",icon:ui,description:"Application settings"}];function Yk(){const e=Ko();return s.jsxs("div",{className:"flex h-full flex-col bg-background border-r",children:[s.jsx("div",{className:"p-6 border-b",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-primary rounded-lg flex items-center justify-center",children:s.jsx(Er,{className:"h-5 w-5 text-primary-foreground"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-semibold text-lg",children:"Edge LLM"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Local AI Platform"})]})]})}),s.jsxs("div",{className:"flex-1 px-3 py-4 space-y-8",children:[s.jsx("div",{children:s.jsxs(Wp,{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:[s.jsx(QN,{className:"h-4 w-4"}),s.jsx("span",{children:"Back to Home"})]})}),s.jsxs("div",{children:[s.jsx("h2",{className:"mb-2 px-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Get started"}),s.jsx("nav",{className:"space-y-1",children:Qk.map(t=>{const n=e.pathname===t.href;return s.jsxs(Wp,{to:t.href,className:ce("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:[s.jsx(t.icon,{className:"h-4 w-4"}),s.jsx("div",{className:"flex-1",children:t.name})]},t.name)})})]})]})]})}function Xk(){return s.jsxs("div",{className:"flex h-screen bg-background",children:[s.jsx("div",{className:"w-64 border-r",children:s.jsx(Yk,{})}),s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(tN,{})})]})}function im(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ly(...e){return t=>{let n=!1;const r=e.map(i=>{const o=im(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:o,...l}=r,a=g.Children.toArray(o),u=a.find(eC);if(u){const c=u.props.children,f=a.map(d=>d===u?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:d);return s.jsx(t,{...l,ref:i,children:g.isValidElement(c)?g.cloneElement(c,void 0,f):null})}return s.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var qk=Ni("Slot");function Jk(e){const t=g.forwardRef((n,r)=>{const{children:i,...o}=n;if(g.isValidElement(i)){const l=nC(i),a=tC(o,i.props);return i.type!==g.Fragment&&(a.ref=r?ly(r,l):l),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sy=Symbol("radix.slottable");function Zk(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=sy,t}function eC(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sy}function tC(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]=(...a)=>{const u=o(...a);return i(...a),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function nC(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 om=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,lm=Gx,Wd=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return lm(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=om(f)||om(d);return i[c][p]}),a=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,...a}[x]):{...o,...a}[x]===S})?[...c,d,p]:c},[]);return lm(e,l,u,n==null?void 0:n.class,n==null?void 0:n.className)},Gd=Wd("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"}}),J=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const l=r?qk:"button";return s.jsx(l,{className:ce(Gd({variant:t,size:n,className:e})),ref:o,...i})});J.displayName="Button";function rC(){const e=Lr();return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsx("nav",{className:"bg-white border-b border-gray-200",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"flex justify-between items-center h-20",children:[s.jsx("div",{className:"flex items-center",children:s.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-20 w-20",onError:t=>{console.error("Logo failed to load"),t.currentTarget.style.display="none"}})}),s.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[s.jsx("span",{className:"text-white bg-purple-600 px-4 py-2 rounded-md font-medium",children:"Home"}),s.jsx("button",{onClick:()=>e("/technology"),className:"text-gray-700 hover:text-purple-600 font-medium transition-colors",children:"Technology"}),s.jsx("button",{onClick:()=>e("/usecases"),className:"text-gray-700 hover:text-purple-600 font-medium transition-colors",children:"Use Cases"}),s.jsx(J,{variant:"outline",onClick:()=>e("/mydevice"),className:"border-purple-600 text-purple-600 hover:bg-purple-50",children:"My Device"})]}),s.jsx("div",{className:"md:hidden",children:s.jsx(J,{variant:"ghost",size:"sm",children:s.jsx(Vd,{className:"h-5 w-5"})})})]})})}),s.jsx("div",{className:"relative py-12 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("div",{className:"relative mb-6",children:s.jsxs("h1",{className:"text-4xl md:text-6xl lg:text-7xl font-bold text-black leading-tight",children:["Offline AI that",s.jsx("br",{}),"works where the",s.jsx("br",{}),"cloud cannot"]})}),s.jsx("p",{className:"text-lg md:text-xl text-purple-700 font-semibold mb-8 max-w-3xl mx-auto",children:"AI that stays reliable, private, and resilient in any environment"}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center items-center mb-12",children:[s.jsx(J,{size:"lg",className:"bg-purple-600 hover:bg-purple-700 text-white px-8 py-3 text-lg font-medium",onClick:()=>e("/usecases"),children:"Learn More"}),s.jsx(J,{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("/mydevice"),children:"I already have a device"})]})]})}),s.jsx("div",{className:"py-12 px-4 sm:px-6 lg:px-8 bg-gray-50",children:s.jsx("div",{className:"max-w-6xl mx-auto",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-lg border border-gray-200 text-center",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("div",{className:"w-16 h-16 bg-purple-600 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx("img",{src:"/assets/24h.png",alt:"24/7 Available",className:"h-10 w-10",onError:t=>{console.error("24h icon failed to load"),t.currentTarget.style.display="none"}})}),s.jsx("h3",{className:"text-lg font-bold text-black mb-3",children:"Always Available"})]}),s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:"Cloud AI fails without internet. Our offline AI runs fully on-device, ready to assist anywhere — from airplanes to remote mountains."})]}),s.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-lg border border-gray-200 text-center",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("div",{className:"w-16 h-16 bg-purple-600 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx("img",{src:"/assets/privacy.png",alt:"Privacy & Security",className:"h-10 w-10",onError:t=>{console.error("Privacy icon failed to load"),t.currentTarget.style.display="none"}})}),s.jsx("h3",{className:"text-lg font-bold text-black mb-3",children:"Privacy & Security"})]}),s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:"Cloud AI requires uploading sensitive data. Offline AI keeps all processing local, protecting personal privacy and enterprise security."})]}),s.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-lg border border-gray-200 text-center",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("div",{className:"w-16 h-16 bg-purple-600 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx("img",{src:"/assets/reliablity.png",alt:"Reliability",className:"h-10 w-10",onError:t=>{console.error("Reliability icon failed to load"),t.currentTarget.style.display="none"}})}),s.jsx("h3",{className:"text-lg font-bold text-black mb-3",children:"Reliability"})]}),s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:"Cloud latency can cost lives in emergencies. Offline AI responds instantly, built for survival, healthcare, and safety-critical moments."})]})]})})}),s.jsx("footer",{className:"bg-white text-gray-600 py-8 px-4 sm:px-6 lg:px-8 border-t border-gray-200",children:s.jsxs("div",{className:"max-w-6xl mx-auto text-center",children:[s.jsx("div",{className:"flex items-center justify-center mb-4",children:s.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"}})}),s.jsx("p",{className:"text-gray-600 mb-6",children:"Need help? Contact us to get customized device and services"}),s.jsxs("div",{className:"flex justify-center space-x-6",children:[s.jsx("a",{href:"#",className:"text-gray-500 hover:text-gray-700",children:"Privacy Policy"}),s.jsx("a",{href:"#",className:"text-gray-500 hover:text-gray-700",children:"Terms of Service"}),s.jsx("a",{href:"#",className:"text-gray-500 hover:text-gray-700",children:"Support"})]})]})})]})}const iC=Wd("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 xe({className:e,variant:t,...n}){return s.jsx("div",{className:ce(iC({variant:t}),e),...n})}const Ie=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ce("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Ie.displayName="Card";const Ct=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ce("flex flex-col space-y-1.5 p-6",e),...t}));Ct.displayName="CardHeader";const jt=g.forwardRef(({className:e,...t},n)=>s.jsx("h3",{ref:n,className:ce("text-2xl font-semibold leading-none tracking-tight",e),...t}));jt.displayName="CardTitle";const oC=g.forwardRef(({className:e,...t},n)=>s.jsx("p",{ref:n,className:ce("text-sm text-muted-foreground",e),...t}));oC.displayName="CardDescription";const Ye=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ce("p-6 pt-0",e),...t}));Ye.displayName="CardContent";const lC=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ce("flex items-center p-6 pt-0",e),...t}));lC.displayName="CardFooter";function sC(){const[e,t]=g.useState("Hardware"),n=Lr();return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx("nav",{className:"bg-white border-b border-gray-200",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"flex justify-between items-center h-20",children:[s.jsx("div",{className:"flex items-center",children:s.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-20 w-20",onError:r=>{console.error("Logo failed to load"),r.currentTarget.style.display="none"}})}),s.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[s.jsx("button",{onClick:()=>n("/"),className:"text-gray-700 hover:text-purple-600 font-medium",children:"Home"}),s.jsx("span",{className:"text-white bg-purple-600 px-4 py-2 rounded-md font-medium",children:"Technology"}),s.jsx("button",{onClick:()=>n("/usecases"),className:"text-gray-700 hover:text-purple-600 font-medium transition-colors",children:"Use Cases"}),s.jsx(J,{variant:"outline",onClick:()=>n("/mydevice"),className:"border-purple-600 text-purple-600 hover:bg-purple-50",children:"My Device"})]}),s.jsx("div",{className:"md:hidden",children:s.jsx(J,{variant:"ghost",size:"sm",children:s.jsx(Vd,{className:"h-5 w-5"})})})]})})}),s.jsx("div",{className:"py-24 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-black mb-6",children:"Our Technology"}),s.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."}),s.jsx("div",{className:"flex justify-center mb-12",children:s.jsx("div",{className:"bg-white rounded-lg p-1 shadow-sm",children:["Hardware","Software"].map(r=>s.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))})})]})}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:[e==="Hardware"&&s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-start",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-6",children:"Hardware Description"}),s.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:"}),s.jsxs("ul",{className:"mt-6 space-y-3 text-lg text-gray-800",children:[s.jsxs("li",{className:"flex items-start",children:[s.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."]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"High memory capacity — up to 40GB RAM, enabling hosting of LLMs up to ≥30B parameters."]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Cost efficiency — making advanced AI workloads accessible at low cost."]})]})]}),s.jsx(Ie,{className:"bg-gradient-to-br from-purple-50 to-blue-50 border-0 shadow-lg",children:s.jsx(Ye,{className:"p-8 space-y-6",children:s.jsxs("div",{className:"flex flex-col space-y-4",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Chip"}),s.jsx("span",{className:"text-base text-gray-700",children:"AMD Zynq UltraScale+ XCZU3EG"})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Processor"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"Quad-core 64-bit Arm Cortex-A53 CPU"}),s.jsx("div",{children:"Dual-core 64-bit Arm Cortex-R5 CPU"}),s.jsx("div",{children:"ARM Mali-400 GPU"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"FPGA Fabric"}),s.jsx("span",{className:"text-base text-gray-700",children:"70K LUT, 360 DSP slices"})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Memory"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"8 GB 64-bit DDR4 (2400 Mbps) on CPU side"}),s.jsx("div",{children:"8 GB / 16 GB / 32 GB DDR4 (2133 Mbps) on FPGA side (SODIMM)"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Storage"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"256 GB PCIe 2.0 x1 NVMe SSD"}),s.jsx("div",{children:"MicroSD card slot"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"I/O"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"USB 2.0 / 3.0 via Type-C"}),s.jsx("div",{children:"Mini DisplayPort"})]})]})]})})})]}),e==="Software"&&s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-start",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-6",children:"Software Stack"}),s.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:"}),s.jsxs("ul",{className:"mt-6 space-y-3 text-lg text-gray-800",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Custom FPGA-optimized inference engine with quantization support for efficient model deployment."]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Edge LLM Platform — intuitive web interface for model management, chat, and system monitoring."]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Support for popular model formats (GGUF, ONNX) and frameworks (Transformers, LLaMA.cpp)."]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"REST API for seamless integration with existing applications and services."]})]})]}),s.jsx(Ie,{className:"bg-gradient-to-br from-green-50 to-blue-50 border-0 shadow-lg",children:s.jsx(Ye,{className:"p-8 space-y-6",children:s.jsxs("div",{className:"flex flex-col space-y-4",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"OS Support"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"Ubuntu 22.04 LTS"}),s.jsx("div",{children:"Custom Linux Distribution"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Model Formats"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"GGUF (LLaMA.cpp)"}),s.jsx("div",{children:"ONNX"}),s.jsx("div",{children:"PyTorch"}),s.jsx("div",{children:"Transformers"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Inference Engine"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"Custom FPGA Accelerator"}),s.jsx("div",{children:"LLaMA.cpp Integration"}),s.jsx("div",{children:"Quantization Support"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Management Interface"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"Web-based Dashboard"}),s.jsx("div",{children:"REST API"}),s.jsx("div",{children:"CLI Tools"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Development Tools"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"Python SDK"}),s.jsx("div",{children:"Model Optimization Tools"}),s.jsx("div",{children:"Performance Profiler"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Security"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"Secure Boot"}),s.jsx("div",{children:"Model Encryption"}),s.jsx("div",{children:"Access Control"})]})]})]})})})]})]}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:[s.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-8",children:"Why us?"}),s.jsxs("div",{className:"bg-white rounded-3xl shadow-xl overflow-hidden",children:[s.jsxs("div",{className:"grid grid-cols-4 bg-gradient-to-r from-gray-50 to-gray-100",children:[s.jsx("div",{className:"p-6"}),s.jsx("div",{className:"p-6 text-center",children:s.jsx(xe,{className:"bg-purple-600 text-white font-bold px-4 py-2",children:"Ours"})}),s.jsx("div",{className:"p-6 text-center",children:s.jsx("span",{className:"font-bold text-gray-800",children:"Raspberry Pi 5"})}),s.jsx("div",{className:"p-6 text-center",children:s.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)=>s.jsxs("div",{className:`grid grid-cols-4 ${i%2===0?"bg-gray-50":"bg-white"}`,children:[s.jsx("div",{className:"p-4 font-medium text-gray-900 border-r border-gray-200",children:r.label}),s.jsx("div",{className:"p-4 text-center text-white bg-purple-600 font-medium",children:r.ours}),s.jsx("div",{className:"p-4 text-center text-purple-600 font-medium border-r border-gray-200",children:r.pi}),s.jsx("div",{className:"p-4 text-center text-purple-600 font-medium",children:r.jetson})]},r.label))]}),s.jsx("div",{className:"text-center mt-8",children:s.jsx(J,{onClick:()=>n("/usecases"),className:"bg-purple-600 hover:bg-purple-700 text-white px-8 py-3",children:"View use cases"})})]}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:[s.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-8",children:"The device layout plan"}),s.jsxs("div",{className:"bg-white rounded-2xl shadow-xl p-8 text-center",children:[s.jsx("div",{className:"relative max-w-4xl mx-auto",children:s.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"}})}),s.jsxs("div",{className:"flex justify-center space-x-4 mt-8",children:[s.jsx(J,{className:"bg-purple-600 hover:bg-purple-700 text-white px-6 py-2",children:"Get your device"}),s.jsx(J,{variant:"outline",className:"border-purple-600 text-purple-600 hover:bg-purple-50 px-6 py-2",children:"View use cases"})]})]}),s.jsx("p",{className:"text-center text-gray-600 mt-6",children:"Need help? Contact us to get customized device and services"})]})]})}function aC(){const e=Lr(),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 s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx("nav",{className:"bg-white border-b border-gray-200",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"flex justify-between items-center h-20",children:[s.jsx("div",{className:"flex items-center",children:s.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-20 w-20",onError:n=>{console.error("Logo failed to load"),n.currentTarget.style.display="none"}})}),s.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[s.jsx("button",{onClick:()=>e("/"),className:"text-gray-700 hover:text-purple-600 font-medium",children:"Home"}),s.jsx("button",{onClick:()=>e("/technology"),className:"text-gray-700 hover:text-purple-600 font-medium",children:"Technology"}),s.jsx("span",{className:"text-white bg-purple-600 px-4 py-2 rounded-md font-medium",children:"Use Cases"}),s.jsx(J,{variant:"outline",onClick:()=>e("/mydevice"),className:"border-purple-600 text-purple-600 hover:bg-purple-50",children:"My Device"})]}),s.jsx("div",{className:"md:hidden",children:s.jsx(J,{variant:"ghost",size:"sm",children:s.jsx(Vd,{className:"h-5 w-5"})})})]})})}),s.jsx("div",{className:"py-24 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-black mb-6",children:"Use Case Examples"}),s.jsx("p",{className:"text-xl text-purple-700 font-semibold max-w-2xl mx-auto mb-10",children:"Bringing intelligent computing to the edge of connectivity"})]})}),s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:t.map((n,r)=>s.jsx(Ie,{className:"bg-white shadow-lg border-0 rounded-3xl overflow-hidden h-full flex flex-col",children:s.jsxs(Ye,{className:"p-6 flex flex-col h-full",children:[s.jsx("div",{className:"w-full h-60 rounded-xl mb-6 overflow-hidden",children:s.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)}})}),s.jsxs("div",{className:"flex flex-col flex-grow space-y-4",children:[s.jsx("div",{className:"text-sm font-semibold text-purple-600",children:n.category}),s.jsx("h3",{className:"text-xl font-semibold text-black leading-tight",children:n.title}),s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed flex-grow",children:n.description}),s.jsx("div",{className:"pt-4",children:s.jsx(J,{className:"bg-purple-600 hover:bg-purple-700 text-white text-sm px-4 py-2 w-auto",onClick:()=>{let i="";n.id===1?i="outdoor-rescue":n.id===2?i="offline-healthcare":n.id===3&&(i="ai-companion"),i&&localStorage.setItem("selectedUseCase",i),e("/mydevice")},children:"Select"})})]})]})},n.id))})}),s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:s.jsxs("div",{className:"relative",children:[s.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"}),s.jsxs("div",{className:"relative bg-purple-400/20 backdrop-blur-lg rounded-3xl p-8 text-center",children:[s.jsx("div",{className:"flex justify-center mb-6 space-x-1",children:[...Array(20)].map((n,r)=>s.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))}),s.jsx("h2",{className:"text-2xl font-medium text-white mb-4",children:"Customize your own device"}),s.jsx("p",{className:"text-gray-900 mb-6",children:"Need help? Contact us to get customized device and services"}),s.jsx(J,{className:"bg-purple-600 hover:bg-purple-700 text-white px-8 py-3",onClick:()=>e("/mydevice"),children:"Get Started"})]})]})})]})}const ni=g.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:ce("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}));ni.displayName="Input";var uC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],le=uC.reduce((e,t)=>{const n=Ni(`Primitive.${t}`),r=g.forwardRef((i,o)=>{const{asChild:l,...a}=i,u=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(u,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function cC(e,t){e&&_i.flushSync(()=>e.dispatchEvent(t))}var dC="Label",ay=g.forwardRef((e,t)=>s.jsx(le.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())}}));ay.displayName=dC;var uy=ay;const fC=Wd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ke=g.forwardRef(({className:e,...t},n)=>s.jsx(uy,{ref:n,className:ce(fC(),e),...t}));ke.displayName=uy.displayName;const Kd=g.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:ce("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Kd.displayName="Textarea";function As(e,[t,n]){return Math.min(n,Math.max(t,e))}function ee(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 pC(e,t){const n=g.createContext(t),r=o=>{const{children:l,...a}=o,u=g.useMemo(()=>a,Object.values(a));return s.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 a=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])||a,S=g.useMemo(()=>w,Object.values(w));return s.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])||a,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(a){const u=(a==null?void 0:a[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return i.scopeName=e,[r,mC(i,...t)]}function mC(...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((a,{useScope:u,scopeName:c})=>{const d=u(o)[`__scope${c}`];return{...a,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Qd(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=Ht.useRef(null),v=Ht.useRef(new Map).current;return s.jsx(i,{scope:S,itemMap:v,collectionRef:h,children:y})};l.displayName=t;const a=e+"CollectionSlot",u=Ni(a),c=Ht.forwardRef((x,S)=>{const{scope:y,children:h}=x,v=o(a,y),N=ve(S,v.collectionRef);return s.jsx(u,{ref:N,children:h})});c.displayName=a;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=Ni(f),m=Ht.forwardRef((x,S)=>{const{scope:y,children:h,...v}=x,N=Ht.useRef(null),j=ve(S,N),C=o(f,y);return Ht.useEffect(()=>(C.itemMap.set(N,{ref:N,...v}),()=>void C.itemMap.delete(N))),s.jsx(p,{[d]:"",ref:j,children:h})});m.displayName=f;function w(x){const S=o(e+"CollectionConsumer",x);return Ht.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 hC=g.createContext(void 0);function oa(e){const t=g.useContext(hC);return e||t||"ltr"}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)},[])}function gC(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 xC="DismissableLayer",wc="dismissableLayer.update",yC="dismissableLayer.pointerDownOutside",vC="dismissableLayer.focusOutside",sm,cy=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yd=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:l,onDismiss:a,...u}=e,c=g.useContext(cy),[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,N=h>=y,j=bC(E=>{const T=E.target,z=[...c.branches].some(L=>L.contains(T));!N||z||(i==null||i(E),l==null||l(E),E.defaultPrevented||a==null||a())},p),C=NC(E=>{const T=E.target;[...c.branches].some(L=>L.contains(T))||(o==null||o(E),l==null||l(E),E.defaultPrevented||a==null||a())},p);return gC(E=>{h===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},p),g.useEffect(()=>{if(f)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(sm=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),am(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=sm)}},[f,p,n,c]),g.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),am())},[f,c]),g.useEffect(()=>{const E=()=>m({});return document.addEventListener(wc,E),()=>document.removeEventListener(wc,E)},[]),s.jsx(le.div,{...u,ref:w,style:{pointerEvents:v?N?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,C.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,j.onPointerDownCapture)})});Yd.displayName=xC;var wC="DismissableLayerBranch",SC=g.forwardRef((e,t)=>{const n=g.useContext(cy),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]),s.jsx(le.div,{...e,ref:i})});SC.displayName=wC;function bC(e,t=globalThis==null?void 0:globalThis.document){const n=er(e),r=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){dy(yC,n,c,{discrete:!0})};const c={originalEvent:a};a.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 NC(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&&dy(vC,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 am(){const e=new CustomEvent(wc);document.dispatchEvent(e)}function dy(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?cC(i,o):i.dispatchEvent(o)}var Xa=0;function fy(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??um()),document.body.insertAdjacentElement("beforeend",e[1]??um()),Xa++,()=>{Xa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xa--}},[])}function um(){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 qa="focusScope.autoFocusOnMount",Ja="focusScope.autoFocusOnUnmount",cm={bubbles:!1,cancelable:!0},kC="FocusScope",Xd=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[a,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||!a)return;const N=v.target;a.contains(N)?d.current=N:Mn(d.current,{select:!0})},S=function(v){if(m.paused||!a)return;const N=v.relatedTarget;N!==null&&(a.contains(N)||Mn(d.current,{select:!0}))},y=function(v){if(document.activeElement===document.body)for(const j of v)j.removedNodes.length>0&&Mn(a)};document.addEventListener("focusin",x),document.addEventListener("focusout",S);const h=new MutationObserver(y);return a&&h.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",S),h.disconnect()}}},[r,a,m.paused]),g.useEffect(()=>{if(a){fm.add(m);const x=document.activeElement;if(!a.contains(x)){const y=new CustomEvent(qa,cm);a.addEventListener(qa,c),a.dispatchEvent(y),y.defaultPrevented||(CC(AC(py(a)),{select:!0}),document.activeElement===x&&Mn(a))}return()=>{a.removeEventListener(qa,c),setTimeout(()=>{const y=new CustomEvent(Ja,cm);a.addEventListener(Ja,f),a.dispatchEvent(y),y.defaultPrevented||Mn(x??document.body,{select:!0}),a.removeEventListener(Ja,f),fm.remove(m)},0)}}},[a,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,N]=jC(h);v&&N?!x.shiftKey&&y===N?(x.preventDefault(),n&&Mn(v,{select:!0})):x.shiftKey&&y===v&&(x.preventDefault(),n&&Mn(N,{select:!0})):y===h&&x.preventDefault()}},[n,r,m.paused]);return s.jsx(le.div,{tabIndex:-1,...l,ref:p,onKeyDown:w})});Xd.displayName=kC;function CC(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Mn(r,{select:t}),document.activeElement!==n)return}function jC(e){const t=py(e),n=dm(t,e),r=dm(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 dm(e,t){for(const n of e)if(!EC(n,{upTo:t}))return n}function EC(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 PC(e){return e instanceof HTMLInputElement&&"select"in e}function Mn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&PC(e)&&t&&e.select()}}var fm=TC();function TC(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=pm(e,t),e.unshift(t)},remove(t){var n;e=pm(e,t),(n=e[0])==null||n.resume()}}}function pm(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function AC(e){return e.filter(t=>t.tagName!=="A")}var tt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},_C=Yc[" useId ".trim().toString()]||(()=>{}),IC=0;function qn(e){const[t,n]=g.useState(_C());return tt(()=>{e||n(r=>r??String(IC++))},[e]),e||(t?`radix-${t}`:"")}const RC=["top","right","bottom","left"],tr=Math.min,wt=Math.max,_s=Math.round,wl=Math.floor,pn=e=>({x:e,y:e}),MC={left:"right",right:"left",bottom:"top",top:"bottom"},LC={start:"end",end:"start"};function Sc(e,t,n){return wt(e,tr(t,n))}function En(e,t){return typeof e=="function"?e(t):e}function Pn(e){return e.split("-")[0]}function Ri(e){return e.split("-")[1]}function qd(e){return e==="x"?"y":"x"}function Jd(e){return e==="y"?"height":"width"}const OC=new Set(["top","bottom"]);function cn(e){return OC.has(Pn(e))?"y":"x"}function Zd(e){return qd(cn(e))}function DC(e,t,n){n===void 0&&(n=!1);const r=Ri(e),i=Zd(e),o=Jd(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Is(l)),[l,Is(l)]}function zC(e){const t=Is(e);return[bc(e),t,bc(t)]}function bc(e){return e.replace(/start|end/g,t=>LC[t])}const mm=["left","right"],hm=["right","left"],FC=["top","bottom"],BC=["bottom","top"];function $C(e,t,n){switch(e){case"top":case"bottom":return n?t?hm:mm:t?mm:hm;case"left":case"right":return t?FC:BC;default:return[]}}function UC(e,t,n,r){const i=Ri(e);let o=$C(Pn(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(bc)))),o}function Is(e){return e.replace(/left|right|bottom|top/g,t=>MC[t])}function VC(e){return{top:0,right:0,bottom:0,left:0,...e}}function my(e){return typeof e!="number"?VC(e):{top:e,right:e,bottom:e,left:e}}function Rs(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function gm(e,t,n){let{reference:r,floating:i}=e;const o=cn(t),l=Zd(t),a=Jd(l),u=Pn(t),c=o==="y",f=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let m;switch(u){case"top":m={x:f,y:r.y-i.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-i.width,y:d};break;default:m={x:r.x,y:r.y}}switch(Ri(t)){case"start":m[l]-=p*(n&&c?-1:1);break;case"end":m[l]+=p*(n&&c?-1:1);break}return m}const HC=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,a=o.filter(Boolean),u=await(l.isRTL==null?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=gm(c,r,u),p=r,m={},w=0;for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:a,middlewareData:u}=t,{element:c,padding:f=0}=En(e,t)||{};if(c==null)return{};const d=my(f),p={x:n,y:r},m=Zd(i),w=Jd(m),x=await l.getDimensions(c),S=m==="y",y=S?"top":"left",h=S?"bottom":"right",v=S?"clientHeight":"clientWidth",N=o.reference[w]+o.reference[m]-p[m]-o.floating[w],j=p[m]-o.reference[m],C=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let E=C?C[v]:0;(!E||!await(l.isElement==null?void 0:l.isElement(C)))&&(E=a.floating[v]||o.floating[w]);const T=N/2-j/2,z=E/2-x[w]/2-1,L=tr(d[y],z),I=tr(d[h],z),P=L,R=E-x[w]-I,W=E/2-x[w]/2+T,M=Sc(P,W,R),O=!u.arrow&&Ri(i)!=null&&W!==M&&o.reference[w]/2-(WW<=0)){var I,P;const W=(((I=o.flip)==null?void 0:I.index)||0)+1,M=E[W];if(M&&(!(d==="alignment"?h!==cn(M):!1)||L.every(A=>cn(A.placement)===h?A.overflows[0]>0:!0)))return{data:{index:W,overflows:L},reset:{placement:M}};let O=(P=L.filter($=>$.overflows[0]<=0).sort(($,A)=>$.overflows[1]-A.overflows[1])[0])==null?void 0:P.placement;if(!O)switch(m){case"bestFit":{var R;const $=(R=L.filter(A=>{if(C){const F=cn(A.placement);return F===h||F==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(F=>F>0).reduce((F,b)=>F+b,0)]).sort((A,F)=>A[1]-F[1])[0])==null?void 0:R[0];$&&(O=$);break}case"initialPlacement":O=a;break}if(i!==O)return{reset:{placement:O}}}return{}}}};function xm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ym(e){return RC.some(t=>e[t]>=0)}const KC=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=En(e,t);switch(r){case"referenceHidden":{const o=await Lo(t,{...i,elementContext:"reference"}),l=xm(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:ym(l)}}}case"escaped":{const o=await Lo(t,{...i,altBoundary:!0}),l=xm(o,n.floating);return{data:{escapedOffsets:l,escaped:ym(l)}}}default:return{}}}}},hy=new Set(["left","top"]);async function QC(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=Pn(n),a=Ri(n),u=cn(n)==="y",c=hy.has(l)?-1:1,f=o&&u?-1:1,d=En(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof w=="number"&&(m=a==="end"?w*-1:w),u?{x:m*f,y:p*c}:{x:p*c,y:m*f}}const YC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:a}=t,u=await QC(t,e);return l===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:l}}}}},XC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:a={fn:S=>{let{x:y,y:h}=S;return{x:y,y:h}}},...u}=En(e,t),c={x:n,y:r},f=await Lo(t,u),d=cn(Pn(i)),p=qd(d);let m=c[p],w=c[d];if(o){const S=p==="y"?"top":"left",y=p==="y"?"bottom":"right",h=m+f[S],v=m-f[y];m=Sc(h,m,v)}if(l){const S=d==="y"?"top":"left",y=d==="y"?"bottom":"right",h=w+f[S],v=w-f[y];w=Sc(h,w,v)}const x=a.fn({...t,[p]:m,[d]:w});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:o,[d]:l}}}}}},qC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:a=0,mainAxis:u=!0,crossAxis:c=!0}=En(e,t),f={x:n,y:r},d=cn(i),p=qd(d);let m=f[p],w=f[d];const x=En(a,t),S=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const v=p==="y"?"height":"width",N=o.reference[p]-o.floating[v]+S.mainAxis,j=o.reference[p]+o.reference[v]-S.mainAxis;mj&&(m=j)}if(c){var y,h;const v=p==="y"?"width":"height",N=hy.has(Pn(i)),j=o.reference[d]-o.floating[v]+(N&&((y=l.offset)==null?void 0:y[d])||0)+(N?0:S.crossAxis),C=o.reference[d]+o.reference[v]+(N?0:((h=l.offset)==null?void 0:h[d])||0)-(N?S.crossAxis:0);wC&&(w=C)}return{[p]:m,[d]:w}}}},JC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:l,elements:a}=t,{apply:u=()=>{},...c}=En(e,t),f=await Lo(t,c),d=Pn(i),p=Ri(i),m=cn(i)==="y",{width:w,height:x}=o.floating;let S,y;d==="top"||d==="bottom"?(S=d,y=p===(await(l.isRTL==null?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,S=p==="end"?"top":"bottom");const h=x-f.top-f.bottom,v=w-f.left-f.right,N=tr(x-f[S],h),j=tr(w-f[y],v),C=!t.middlewareData.shift;let E=N,T=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=h),C&&!p){const L=wt(f.left,0),I=wt(f.right,0),P=wt(f.top,0),R=wt(f.bottom,0);m?T=w-2*(L!==0||I!==0?L+I:wt(f.left,f.right)):E=x-2*(P!==0||R!==0?P+R:wt(f.top,f.bottom))}await u({...t,availableWidth:T,availableHeight:E});const z=await l.getDimensions(a.floating);return w!==z.width||x!==z.height?{reset:{rects:!0}}:{}}}};function la(){return typeof window<"u"}function Mi(e){return gy(e)?(e.nodeName||"").toLowerCase():"#document"}function Et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gn(e){var t;return(t=(gy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gy(e){return la()?e instanceof Node||e instanceof Et(e).Node:!1}function Xt(e){return la()?e instanceof Element||e instanceof Et(e).Element:!1}function mn(e){return la()?e instanceof HTMLElement||e instanceof Et(e).HTMLElement:!1}function vm(e){return!la()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Et(e).ShadowRoot}const ZC=new Set(["inline","contents"]);function Qo(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ZC.has(i)}const ej=new Set(["table","td","th"]);function tj(e){return ej.has(Mi(e))}const nj=[":popover-open",":modal"];function sa(e){return nj.some(t=>{try{return e.matches(t)}catch{return!1}})}const rj=["transform","translate","scale","rotate","perspective"],ij=["transform","translate","scale","rotate","perspective","filter"],oj=["paint","layout","strict","content"];function ef(e){const t=tf(),n=Xt(e)?qt(e):e;return rj.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ij.some(r=>(n.willChange||"").includes(r))||oj.some(r=>(n.contain||"").includes(r))}function lj(e){let t=nr(e);for(;mn(t)&&!ki(t);){if(ef(t))return t;if(sa(t))return null;t=nr(t)}return null}function tf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sj=new Set(["html","body","#document"]);function ki(e){return sj.has(Mi(e))}function qt(e){return Et(e).getComputedStyle(e)}function aa(e){return Xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nr(e){if(Mi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vm(e)&&e.host||gn(e);return vm(t)?t.host:t}function xy(e){const t=nr(e);return ki(t)?e.ownerDocument?e.ownerDocument.body:e.body:mn(t)&&Qo(t)?t:xy(t)}function Oo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=xy(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Et(i);if(o){const a=Nc(l);return t.concat(l,l.visualViewport||[],Qo(i)?i:[],a&&n?Oo(a):[])}return t.concat(i,Oo(i,[],n))}function Nc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yy(e){const t=qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=mn(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,a=_s(n)!==o||_s(r)!==l;return a&&(n=o,r=l),{width:n,height:r,$:a}}function nf(e){return Xt(e)?e:e.contextElement}function ci(e){const t=nf(e);if(!mn(t))return pn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=yy(t);let l=(o?_s(n.width):n.width)/r,a=(o?_s(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const aj=pn(0);function vy(e){const t=Et(e);return!tf()||!t.visualViewport?aj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Et(e)?!1:t}function Pr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=nf(e);let l=pn(1);t&&(r?Xt(r)&&(l=ci(r)):l=ci(e));const a=uj(o,n,r)?vy(o):pn(0);let u=(i.left+a.x)/l.x,c=(i.top+a.y)/l.y,f=i.width/l.x,d=i.height/l.y;if(o){const p=Et(o),m=r&&Xt(r)?Et(r):r;let w=p,x=Nc(w);for(;x&&r&&m!==w;){const S=ci(x),y=x.getBoundingClientRect(),h=qt(x),v=y.left+(x.clientLeft+parseFloat(h.paddingLeft))*S.x,N=y.top+(x.clientTop+parseFloat(h.paddingTop))*S.y;u*=S.x,c*=S.y,f*=S.x,d*=S.y,u+=v,c+=N,w=Et(x),x=Nc(w)}}return Rs({width:f,height:d,x:u,y:c})}function ua(e,t){const n=aa(e).scrollLeft;return t?t.left+n:Pr(gn(e)).left+n}function wy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ua(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function cj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=gn(r),a=t?sa(t.floating):!1;if(r===l||a&&o)return n;let u={scrollLeft:0,scrollTop:0},c=pn(1);const f=pn(0),d=mn(r);if((d||!d&&!o)&&((Mi(r)!=="body"||Qo(l))&&(u=aa(r)),mn(r))){const m=Pr(r);c=ci(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const p=l&&!d&&!o?wy(l,u):pn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+p.x,y:n.y*c.y-u.scrollTop*c.y+f.y+p.y}}function dj(e){return Array.from(e.getClientRects())}function fj(e){const t=gn(e),n=aa(e),r=e.ownerDocument.body,i=wt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=wt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+ua(e);const a=-n.scrollTop;return qt(r).direction==="rtl"&&(l+=wt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:a}}const wm=25;function pj(e,t){const n=Et(e),r=gn(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,a=0,u=0;if(i){o=i.width,l=i.height;const f=tf();(!f||f&&t==="fixed")&&(a=i.offsetLeft,u=i.offsetTop)}const c=ua(r);if(c<=0){const f=r.ownerDocument,d=f.body,p=getComputedStyle(d),m=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(r.clientWidth-d.clientWidth-m);w<=wm&&(o-=w)}else c<=wm&&(o+=c);return{width:o,height:l,x:a,y:u}}const mj=new Set(["absolute","fixed"]);function hj(e,t){const n=Pr(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=mn(e)?ci(e):pn(1),l=e.clientWidth*o.x,a=e.clientHeight*o.y,u=i*o.x,c=r*o.y;return{width:l,height:a,x:u,y:c}}function Sm(e,t,n){let r;if(t==="viewport")r=pj(e,n);else if(t==="document")r=fj(gn(e));else if(Xt(t))r=hj(t,n);else{const i=vy(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Rs(r)}function Sy(e,t){const n=nr(e);return n===t||!Xt(n)||ki(n)?!1:qt(n).position==="fixed"||Sy(n,t)}function gj(e,t){const n=t.get(e);if(n)return n;let r=Oo(e,[],!1).filter(a=>Xt(a)&&Mi(a)!=="body"),i=null;const o=qt(e).position==="fixed";let l=o?nr(e):e;for(;Xt(l)&&!ki(l);){const a=qt(l),u=ef(l);!u&&a.position==="fixed"&&(i=null),(o?!u&&!i:!u&&a.position==="static"&&!!i&&mj.has(i.position)||Qo(l)&&!u&&Sy(e,l))?r=r.filter(f=>f!==l):i=a,l=nr(l)}return t.set(e,r),r}function xj(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?sa(t)?[]:gj(t,this._c):[].concat(n),r],a=l[0],u=l.reduce((c,f)=>{const d=Sm(t,f,i);return c.top=wt(d.top,c.top),c.right=tr(d.right,c.right),c.bottom=tr(d.bottom,c.bottom),c.left=wt(d.left,c.left),c},Sm(t,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function yj(e){const{width:t,height:n}=yy(e);return{width:t,height:n}}function vj(e,t,n){const r=mn(t),i=gn(t),o=n==="fixed",l=Pr(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const u=pn(0);function c(){u.x=ua(i)}if(r||!r&&!o)if((Mi(t)!=="body"||Qo(i))&&(a=aa(t)),r){const m=Pr(t,!0,o,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else i&&c();o&&!r&&i&&c();const f=i&&!r&&!o?wy(i,a):pn(0),d=l.left+a.scrollLeft-u.x-f.x,p=l.top+a.scrollTop-u.y-f.y;return{x:d,y:p,width:l.width,height:l.height}}function Za(e){return qt(e).position==="static"}function bm(e,t){if(!mn(e)||qt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return gn(e)===n&&(n=n.ownerDocument.body),n}function by(e,t){const n=Et(e);if(sa(e))return n;if(!mn(e)){let i=nr(e);for(;i&&!ki(i);){if(Xt(i)&&!Za(i))return i;i=nr(i)}return n}let r=bm(e,t);for(;r&&tj(r)&&Za(r);)r=bm(r,t);return r&&ki(r)&&Za(r)&&!ef(r)?n:r||lj(e)||n}const wj=async function(e){const t=this.getOffsetParent||by,n=this.getDimensions,r=await n(e.floating);return{reference:vj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sj(e){return qt(e).direction==="rtl"}const bj={convertOffsetParentRelativeRectToViewportRelativeRect:cj,getDocumentElement:gn,getClippingRect:xj,getOffsetParent:by,getElementRects:wj,getClientRects:dj,getDimensions:yj,getScale:ci,isElement:Xt,isRTL:Sj};function Ny(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Nj(e,t){let n=null,r;const i=gn(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function l(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),o();const c=e.getBoundingClientRect(),{left:f,top:d,width:p,height:m}=c;if(a||t(),!p||!m)return;const w=wl(d),x=wl(i.clientWidth-(f+p)),S=wl(i.clientHeight-(d+m)),y=wl(f),v={rootMargin:-w+"px "+-x+"px "+-S+"px "+-y+"px",threshold:wt(0,tr(1,u))||1};let N=!0;function j(C){const E=C[0].intersectionRatio;if(E!==u){if(!N)return l();E?l(!1,E):r=setTimeout(()=>{l(!1,1e-7)},1e3)}E===1&&!Ny(c,e.getBoundingClientRect())&&l(),N=!1}try{n=new IntersectionObserver(j,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(j,v)}n.observe(e)}return l(!0),o}function kj(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=nf(e),f=i||o?[...c?Oo(c):[],...Oo(t)]:[];f.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const d=c&&a?Nj(c,n):null;let p=-1,m=null;l&&(m=new ResizeObserver(y=>{let[h]=y;h&&h.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(t)})),n()}),c&&!u&&m.observe(c),m.observe(t));let w,x=u?Pr(e):null;u&&S();function S(){const y=Pr(e);x&&!Ny(x,y)&&n(),x=y,w=requestAnimationFrame(S)}return n(),()=>{var y;f.forEach(h=>{i&&h.removeEventListener("scroll",n),o&&h.removeEventListener("resize",n)}),d==null||d(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(w)}}const Cj=YC,jj=XC,Ej=GC,Pj=JC,Tj=KC,Nm=WC,Aj=qC,_j=(e,t,n)=>{const r=new Map,i={platform:bj,...n},o={...i.platform,_c:r};return HC(e,t,{...i,platform:o})};var Ij=typeof document<"u",Rj=function(){},$l=Ij?g.useLayoutEffect:Rj;function Ms(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ms(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Ms(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function ky(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function km(e,t){const n=ky(e);return Math.round(t*n)/n}function eu(e){const t=g.useRef(e);return $l(()=>{t.current=e}),t}function Mj(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[f,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=g.useState(r);Ms(p,r)||m(r);const[w,x]=g.useState(null),[S,y]=g.useState(null),h=g.useCallback(A=>{A!==C.current&&(C.current=A,x(A))},[]),v=g.useCallback(A=>{A!==E.current&&(E.current=A,y(A))},[]),N=o||w,j=l||S,C=g.useRef(null),E=g.useRef(null),T=g.useRef(f),z=u!=null,L=eu(u),I=eu(i),P=eu(c),R=g.useCallback(()=>{if(!C.current||!E.current)return;const A={placement:t,strategy:n,middleware:p};I.current&&(A.platform=I.current),_j(C.current,E.current,A).then(F=>{const b={...F,isPositioned:P.current!==!1};W.current&&!Ms(T.current,b)&&(T.current=b,_i.flushSync(()=>{d(b)}))})},[p,t,n,I,P]);$l(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[c]);const W=g.useRef(!1);$l(()=>(W.current=!0,()=>{W.current=!1}),[]),$l(()=>{if(N&&(C.current=N),j&&(E.current=j),N&&j){if(L.current)return L.current(N,j,R);R()}},[N,j,R,L,z]);const M=g.useMemo(()=>({reference:C,floating:E,setReference:h,setFloating:v}),[h,v]),O=g.useMemo(()=>({reference:N,floating:j}),[N,j]),$=g.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const F=km(O.floating,f.x),b=km(O.floating,f.y);return a?{...A,transform:"translate("+F+"px, "+b+"px)",...ky(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:b}},[n,a,O.floating,f.x,f.y]);return g.useMemo(()=>({...f,update:R,refs:M,elements:O,floatingStyles:$}),[f,R,M,O,$])}const Lj=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Nm({element:r.current,padding:i}).fn(n):{}:r?Nm({element:r,padding:i}).fn(n):{}}}},Oj=(e,t)=>({...Cj(e),options:[e,t]}),Dj=(e,t)=>({...jj(e),options:[e,t]}),zj=(e,t)=>({...Aj(e),options:[e,t]}),Fj=(e,t)=>({...Ej(e),options:[e,t]}),Bj=(e,t)=>({...Pj(e),options:[e,t]}),$j=(e,t)=>({...Tj(e),options:[e,t]}),Uj=(e,t)=>({...Lj(e),options:[e,t]});var Vj="Arrow",Cy=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return s.jsx(le.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cy.displayName=Vj;var Hj=Cy;function jy(e){const[t,n]=g.useState(void 0);return tt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,a;if("borderBoxSize"in o){const u=o.borderBoxSize,c=Array.isArray(u)?u[0]:u;l=c.inlineSize,a=c.blockSize}else l=e.offsetWidth,a=e.offsetHeight;n({width:l,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var rf="Popper",[Ey,Py]=sr(rf),[Wj,Ty]=Ey(rf),Ay=e=>{const{__scopePopper:t,children:n}=e,[r,i]=g.useState(null);return s.jsx(Wj,{scope:t,anchor:r,onAnchorChange:i,children:n})};Ay.displayName=rf;var _y="PopperAnchor",Iy=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Ty(_y,n),l=g.useRef(null),a=ve(t,l),u=g.useRef(null);return g.useEffect(()=>{const c=u.current;u.current=(r==null?void 0:r.current)||l.current,c!==u.current&&o.onAnchorChange(u.current)}),r?null:s.jsx(le.div,{...i,ref:a})});Iy.displayName=_y;var of="PopperContent",[Gj,Kj]=Ey(of),Ry=g.forwardRef((e,t)=>{var K,ne,he,oe,de,me;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:w,...x}=e,S=Ty(of,n),[y,h]=g.useState(null),v=ve(t,He=>h(He)),[N,j]=g.useState(null),C=jy(N),E=(C==null?void 0:C.width)??0,T=(C==null?void 0:C.height)??0,z=r+(o!=="center"?"-"+o:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},I=Array.isArray(c)?c:[c],P=I.length>0,R={padding:L,boundary:I.filter(Yj),altBoundary:P},{refs:W,floatingStyles:M,placement:O,isPositioned:$,middlewareData:A}=Mj({strategy:"fixed",placement:z,whileElementsMounted:(...He)=>kj(...He,{animationFrame:m==="always"}),elements:{reference:S.anchor},middleware:[Oj({mainAxis:i+T,alignmentAxis:l}),u&&Dj({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?zj():void 0,...R}),u&&Fj({...R}),Bj({...R,apply:({elements:He,rects:rt,availableWidth:Zt,availableHeight:zt})=>{const{width:en,height:Fi}=rt.reference,xn=He.floating.style;xn.setProperty("--radix-popper-available-width",`${Zt}px`),xn.setProperty("--radix-popper-available-height",`${zt}px`),xn.setProperty("--radix-popper-anchor-width",`${en}px`),xn.setProperty("--radix-popper-anchor-height",`${Fi}px`)}}),N&&Uj({element:N,padding:a}),Xj({arrowWidth:E,arrowHeight:T}),p&&$j({strategy:"referenceHidden",...R})]}),[F,b]=Oy(O),V=er(w);tt(()=>{$&&(V==null||V())},[$,V]);const Y=(K=A.arrow)==null?void 0:K.x,k=(ne=A.arrow)==null?void 0:ne.y,re=((he=A.arrow)==null?void 0:he.centerOffset)!==0,[fe,ie]=g.useState();return tt(()=>{y&&ie(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:$?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(oe=A.transformOrigin)==null?void 0:oe.x,(de=A.transformOrigin)==null?void 0:de.y].join(" "),...((me=A.hide)==null?void 0:me.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Gj,{scope:n,placedSide:F,onArrowChange:j,arrowX:Y,arrowY:k,shouldHideArrow:re,children:s.jsx(le.div,{"data-side":F,"data-align":b,...x,ref:v,style:{...x.style,animation:$?void 0:"none"}})})})});Ry.displayName=of;var My="PopperArrow",Qj={top:"bottom",right:"left",bottom:"top",left:"right"},Ly=g.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Kj(My,r),l=Qj[o.placedSide];return s.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:s.jsx(Hj,{...i,ref:n,style:{...i.style,display:"block"}})})});Ly.displayName=My;function Yj(e){return e!==null}var Xj=e=>({name:"transformOrigin",options:e,fn(t){var S,y,h;const{placement:n,rects:r,middlewareData:i}=t,l=((S=i.arrow)==null?void 0:S.centerOffset)!==0,a=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[c,f]=Oy(n),d={start:"0%",center:"50%",end:"100%"}[f],p=(((y=i.arrow)==null?void 0:y.x)??0)+a/2,m=(((h=i.arrow)==null?void 0:h.y)??0)+u/2;let w="",x="";return c==="bottom"?(w=l?d:`${p}px`,x=`${-u}px`):c==="top"?(w=l?d:`${p}px`,x=`${r.floating.height+u}px`):c==="right"?(w=`${-u}px`,x=l?d:`${m}px`):c==="left"&&(w=`${r.floating.width+u}px`,x=l?d:`${m}px`),{data:{x:w,y:x}}}});function Oy(e){const[t,n="center"]=e.split("-");return[t,n]}var qj=Ay,Jj=Iy,Zj=Ry,e2=Ly,t2="Portal",lf=g.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,o]=g.useState(!1);tt(()=>o(!0),[]);const l=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return l?cb.createPortal(s.jsx(le.div,{...r,ref:t}),l):null});lf.displayName=t2;var n2=Yc[" useInsertionEffect ".trim().toString()]||tt;function Ci({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,l]=r2({defaultProp:t,onChange:n}),a=e!==void 0,u=a?e:i;{const f=g.useRef(e!==void 0);g.useEffect(()=>{const d=f.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"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=a},[a,r])}const c=g.useCallback(f=>{var d;if(a){const p=i2(f)?f(e):f;p!==e&&((d=l.current)==null||d.call(l,p))}else o(f)},[a,e,o,l]);return[u,c]}function r2({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),i=g.useRef(n),o=g.useRef(t);return n2(()=>{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 i2(e){return typeof e=="function"}function Dy(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var zy=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),o2="VisuallyHidden",l2=g.forwardRef((e,t)=>s.jsx(le.span,{...e,ref:t,style:{...zy,...e.style}}));l2.displayName=o2;var s2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Fr=new WeakMap,Sl=new WeakMap,bl={},tu=0,Fy=function(e){return e&&(e.host||Fy(e.parentNode))},a2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Fy(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},u2=function(e,t,n,r){var i=a2(t,Array.isArray(e)?e:[e]);bl[n]||(bl[n]=new WeakMap);var o=bl[n],l=[],a=new Set,u=new Set(i),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};i.forEach(c);var f=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))f(p);else try{var m=p.getAttribute(r),w=m!==null&&m!=="false",x=(Fr.get(p)||0)+1,S=(o.get(p)||0)+1;Fr.set(p,x),o.set(p,S),l.push(p),x===1&&w&&Sl.set(p,!0),S===1&&p.setAttribute(n,"true"),w||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return f(t),a.clear(),tu++,function(){l.forEach(function(d){var p=Fr.get(d)-1,m=o.get(d)-1;Fr.set(d,p),o.set(d,m),p||(Sl.has(d)||d.removeAttribute(r),Sl.delete(d)),m||d.removeAttribute(n)}),tu--,tu||(Fr=new WeakMap,Fr=new WeakMap,Sl=new WeakMap,bl={})}},By=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||s2(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),u2(r,i,n,"aria-hidden")):function(){return null}},an=function(){return an=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return j2;var t=E2(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])}},T2=Hy(),di="data-scroll-locked",A2=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,a=e.gap;return n===void 0&&(n="margin"),` + */const Kk=[["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"}]],vc=te("zap",Kk),Qk=[{name:"Templates",href:"/templates",icon:Er,description:"Browse assistant templates and examples"},{name:"Assistant Studio",href:"/playground",icon:ia,description:"Build, test and refine your AI assistants"},{name:"Model Catalog",href:"/models",icon:ra,description:"Browse and manage AI models"},{name:"Settings",href:"/settings",icon:ui,description:"Application settings"}];function Yk(){const e=Ko();return s.jsxs("div",{className:"flex h-full flex-col bg-background border-r",children:[s.jsx("div",{className:"p-6 border-b",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-primary rounded-lg flex items-center justify-center",children:s.jsx(Er,{className:"h-5 w-5 text-primary-foreground"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-semibold text-lg",children:"Edge LLM"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Local AI Platform"})]})]})}),s.jsxs("div",{className:"flex-1 px-3 py-4 space-y-8",children:[s.jsx("div",{children:s.jsxs(Wp,{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:[s.jsx(QN,{className:"h-4 w-4"}),s.jsx("span",{children:"Back to Home"})]})}),s.jsxs("div",{children:[s.jsx("h2",{className:"mb-2 px-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Get started"}),s.jsx("nav",{className:"space-y-1",children:Qk.map(t=>{const n=e.pathname===t.href;return s.jsxs(Wp,{to:t.href,className:ce("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:[s.jsx(t.icon,{className:"h-4 w-4"}),s.jsx("div",{className:"flex-1",children:t.name})]},t.name)})})]})]})]})}function Xk(){return s.jsxs("div",{className:"flex h-screen bg-background",children:[s.jsx("div",{className:"w-64 border-r",children:s.jsx(Yk,{})}),s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(tN,{})})]})}function im(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ly(...e){return t=>{let n=!1;const r=e.map(i=>{const o=im(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:o,...l}=r,a=g.Children.toArray(o),u=a.find(eC);if(u){const c=u.props.children,f=a.map(d=>d===u?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:d);return s.jsx(t,{...l,ref:i,children:g.isValidElement(c)?g.cloneElement(c,void 0,f):null})}return s.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var qk=Ni("Slot");function Jk(e){const t=g.forwardRef((n,r)=>{const{children:i,...o}=n;if(g.isValidElement(i)){const l=nC(i),a=tC(o,i.props);return i.type!==g.Fragment&&(a.ref=r?ly(r,l):l),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sy=Symbol("radix.slottable");function Zk(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=sy,t}function eC(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sy}function tC(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]=(...a)=>{const u=o(...a);return i(...a),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function nC(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 om=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,lm=Gx,Wd=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return lm(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=om(f)||om(d);return i[c][p]}),a=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,...a}[x]):{...o,...a}[x]===S})?[...c,d,p]:c},[]);return lm(e,l,u,n==null?void 0:n.class,n==null?void 0:n.className)},Gd=Wd("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"}}),J=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const l=r?qk:"button";return s.jsx(l,{className:ce(Gd({variant:t,size:n,className:e})),ref:o,...i})});J.displayName="Button";function rC(){const e=Lr();return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsx("nav",{className:"bg-white border-b border-gray-200",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"flex justify-between items-center h-20",children:[s.jsx("div",{className:"flex items-center",children:s.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-20 w-20",onError:t=>{console.error("Logo failed to load"),t.currentTarget.style.display="none"}})}),s.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[s.jsx("span",{className:"text-white bg-purple-600 px-4 py-2 rounded-md font-medium",children:"Home"}),s.jsx("button",{onClick:()=>e("/technology"),className:"text-gray-700 hover:text-purple-600 font-medium transition-colors",children:"Technology"}),s.jsx("button",{onClick:()=>e("/usecases"),className:"text-gray-700 hover:text-purple-600 font-medium transition-colors",children:"Use Cases"}),s.jsx(J,{variant:"outline",onClick:()=>e("/mydevice"),className:"border-purple-600 text-purple-600 hover:bg-purple-50",children:"My Device"})]}),s.jsx("div",{className:"md:hidden",children:s.jsx(J,{variant:"ghost",size:"sm",children:s.jsx(Vd,{className:"h-5 w-5"})})})]})})}),s.jsx("div",{className:"relative py-12 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("div",{className:"relative mb-6",children:s.jsxs("h1",{className:"text-4xl md:text-6xl lg:text-7xl font-bold text-black leading-tight",children:["Offline AI that",s.jsx("br",{}),"works where the",s.jsx("br",{}),"cloud cannot"]})}),s.jsx("p",{className:"text-lg md:text-xl text-purple-700 font-semibold mb-8 max-w-3xl mx-auto",children:"AI that stays reliable, private, and resilient in any environment"}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center items-center mb-12",children:[s.jsx(J,{size:"lg",className:"bg-purple-600 hover:bg-purple-700 text-white px-8 py-3 text-lg font-medium",onClick:()=>e("/usecases"),children:"Learn More"}),s.jsx(J,{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("/mydevice"),children:"I already have a device"})]})]})}),s.jsx("div",{className:"py-12 px-4 sm:px-6 lg:px-8 bg-gray-50",children:s.jsx("div",{className:"max-w-6xl mx-auto",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-lg border border-gray-200 text-center",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("div",{className:"w-16 h-16 bg-purple-600 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx("img",{src:"/assets/24h.png",alt:"24/7 Available",className:"h-10 w-10",onError:t=>{console.error("24h icon failed to load"),t.currentTarget.style.display="none"}})}),s.jsx("h3",{className:"text-lg font-bold text-black mb-3",children:"Always Available"})]}),s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:"Cloud AI fails without internet. Our offline AI runs fully on-device, ready to assist anywhere — from airplanes to remote mountains."})]}),s.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-lg border border-gray-200 text-center",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("div",{className:"w-16 h-16 bg-purple-600 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx("img",{src:"/assets/privacy.png",alt:"Privacy & Security",className:"h-10 w-10",onError:t=>{console.error("Privacy icon failed to load"),t.currentTarget.style.display="none"}})}),s.jsx("h3",{className:"text-lg font-bold text-black mb-3",children:"Privacy & Security"})]}),s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:"Cloud AI requires uploading sensitive data. Offline AI keeps all processing local, protecting personal privacy and enterprise security."})]}),s.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-lg border border-gray-200 text-center",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("div",{className:"w-16 h-16 bg-purple-600 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx("img",{src:"/assets/reliablity.png",alt:"Reliability",className:"h-10 w-10",onError:t=>{console.error("Reliability icon failed to load"),t.currentTarget.style.display="none"}})}),s.jsx("h3",{className:"text-lg font-bold text-black mb-3",children:"Reliability"})]}),s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:"Cloud latency can cost lives in emergencies. Offline AI responds instantly, built for survival, healthcare, and safety-critical moments."})]})]})})}),s.jsx("footer",{className:"bg-white text-gray-600 py-8 px-4 sm:px-6 lg:px-8 border-t border-gray-200",children:s.jsxs("div",{className:"max-w-6xl mx-auto text-center",children:[s.jsx("div",{className:"flex items-center justify-center mb-4",children:s.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"}})}),s.jsx("p",{className:"text-gray-600 mb-6",children:"Need help? Contact us to get customized device and services"}),s.jsxs("div",{className:"flex justify-center space-x-6",children:[s.jsx("a",{href:"#",className:"text-gray-500 hover:text-gray-700",children:"Privacy Policy"}),s.jsx("a",{href:"#",className:"text-gray-500 hover:text-gray-700",children:"Terms of Service"}),s.jsx("a",{href:"#",className:"text-gray-500 hover:text-gray-700",children:"Support"})]})]})})]})}const iC=Wd("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 xe({className:e,variant:t,...n}){return s.jsx("div",{className:ce(iC({variant:t}),e),...n})}const Ie=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ce("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Ie.displayName="Card";const Ct=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ce("flex flex-col space-y-1.5 p-6",e),...t}));Ct.displayName="CardHeader";const jt=g.forwardRef(({className:e,...t},n)=>s.jsx("h3",{ref:n,className:ce("text-2xl font-semibold leading-none tracking-tight",e),...t}));jt.displayName="CardTitle";const oC=g.forwardRef(({className:e,...t},n)=>s.jsx("p",{ref:n,className:ce("text-sm text-muted-foreground",e),...t}));oC.displayName="CardDescription";const Ye=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ce("p-6 pt-0",e),...t}));Ye.displayName="CardContent";const lC=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ce("flex items-center p-6 pt-0",e),...t}));lC.displayName="CardFooter";function sC(){const[e,t]=g.useState("Hardware"),n=Lr();return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx("nav",{className:"bg-white border-b border-gray-200",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"flex justify-between items-center h-20",children:[s.jsx("div",{className:"flex items-center",children:s.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-20 w-20",onError:r=>{console.error("Logo failed to load"),r.currentTarget.style.display="none"}})}),s.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[s.jsx("button",{onClick:()=>n("/"),className:"text-gray-700 hover:text-purple-600 font-medium",children:"Home"}),s.jsx("span",{className:"text-white bg-purple-600 px-4 py-2 rounded-md font-medium",children:"Technology"}),s.jsx("button",{onClick:()=>n("/usecases"),className:"text-gray-700 hover:text-purple-600 font-medium transition-colors",children:"Use Cases"}),s.jsx(J,{variant:"outline",onClick:()=>n("/mydevice"),className:"border-purple-600 text-purple-600 hover:bg-purple-50",children:"My Device"})]}),s.jsx("div",{className:"md:hidden",children:s.jsx(J,{variant:"ghost",size:"sm",children:s.jsx(Vd,{className:"h-5 w-5"})})})]})})}),s.jsx("div",{className:"py-24 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-black mb-6",children:"Our Technology"}),s.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."}),s.jsx("div",{className:"flex justify-center mb-12",children:s.jsx("div",{className:"bg-white rounded-lg p-1 shadow-sm",children:["Hardware","Software"].map(r=>s.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))})})]})}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:[e==="Hardware"&&s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-start",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-6",children:"Hardware Description"}),s.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:"}),s.jsxs("ul",{className:"mt-6 space-y-3 text-lg text-gray-800",children:[s.jsxs("li",{className:"flex items-start",children:[s.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."]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"High memory capacity — up to 40GB RAM, enabling hosting of LLMs up to ≥30B parameters."]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Cost efficiency — making advanced AI workloads accessible at low cost."]})]})]}),s.jsx(Ie,{className:"bg-gradient-to-br from-purple-50 to-blue-50 border-0 shadow-lg",children:s.jsx(Ye,{className:"p-8 space-y-6",children:s.jsxs("div",{className:"flex flex-col space-y-4",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Chip"}),s.jsx("span",{className:"text-base text-gray-700",children:"AMD Zynq UltraScale+ XCZU3EG"})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Processor"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"Quad-core 64-bit Arm Cortex-A53 CPU"}),s.jsx("div",{children:"Dual-core 64-bit Arm Cortex-R5 CPU"}),s.jsx("div",{children:"ARM Mali-400 GPU"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"FPGA Fabric"}),s.jsx("span",{className:"text-base text-gray-700",children:"70K LUT, 360 DSP slices"})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Memory"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"8 GB 64-bit DDR4 (2400 Mbps) on CPU side"}),s.jsx("div",{children:"8 GB / 16 GB / 32 GB DDR4 (2133 Mbps) on FPGA side (SODIMM)"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Storage"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"256 GB PCIe 2.0 x1 NVMe SSD"}),s.jsx("div",{children:"MicroSD card slot"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"I/O"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"USB 2.0 / 3.0 via Type-C"}),s.jsx("div",{children:"Mini DisplayPort"})]})]})]})})})]}),e==="Software"&&s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-start",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-6",children:"Software Stack"}),s.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:"}),s.jsxs("ul",{className:"mt-6 space-y-3 text-lg text-gray-800",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Custom FPGA-optimized inference engine with quantization support for efficient model deployment."]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Edge LLM Platform — intuitive web interface for model management, chat, and system monitoring."]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"Support for popular model formats (GGUF, ONNX) and frameworks (Transformers, LLaMA.cpp)."]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-purple-600 mr-2",children:"•"}),"REST API for seamless integration with existing applications and services."]})]})]}),s.jsx(Ie,{className:"bg-gradient-to-br from-green-50 to-blue-50 border-0 shadow-lg",children:s.jsx(Ye,{className:"p-8 space-y-6",children:s.jsxs("div",{className:"flex flex-col space-y-4",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"OS Support"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"Ubuntu 22.04 LTS"}),s.jsx("div",{children:"Custom Linux Distribution"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Model Formats"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"GGUF (LLaMA.cpp)"}),s.jsx("div",{children:"ONNX"}),s.jsx("div",{children:"PyTorch"}),s.jsx("div",{children:"Transformers"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Inference Engine"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"Custom FPGA Accelerator"}),s.jsx("div",{children:"LLaMA.cpp Integration"}),s.jsx("div",{children:"Quantization Support"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Management Interface"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"Web-based Dashboard"}),s.jsx("div",{children:"REST API"}),s.jsx("div",{children:"CLI Tools"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Development Tools"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"Python SDK"}),s.jsx("div",{children:"Model Optimization Tools"}),s.jsx("div",{children:"Performance Profiler"})]})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("span",{className:"text-lg font-bold text-gray-900",children:"Security"}),s.jsxs("div",{className:"text-base text-gray-700 text-right",children:[s.jsx("div",{children:"Secure Boot"}),s.jsx("div",{children:"Model Encryption"}),s.jsx("div",{children:"Access Control"})]})]})]})})})]})]}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:[s.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-8",children:"Why us?"}),s.jsxs("div",{className:"bg-white rounded-3xl shadow-xl overflow-hidden",children:[s.jsxs("div",{className:"grid grid-cols-4 bg-gradient-to-r from-gray-50 to-gray-100",children:[s.jsx("div",{className:"p-6"}),s.jsx("div",{className:"p-6 text-center",children:s.jsx(xe,{className:"bg-purple-600 text-white font-bold px-4 py-2",children:"Ours"})}),s.jsx("div",{className:"p-6 text-center",children:s.jsx("span",{className:"font-bold text-gray-800",children:"Raspberry Pi 5"})}),s.jsx("div",{className:"p-6 text-center",children:s.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)=>s.jsxs("div",{className:`grid grid-cols-4 ${i%2===0?"bg-gray-50":"bg-white"}`,children:[s.jsx("div",{className:"p-4 font-medium text-gray-900 border-r border-gray-200",children:r.label}),s.jsx("div",{className:"p-4 text-center text-white bg-purple-600 font-medium",children:r.ours}),s.jsx("div",{className:"p-4 text-center text-purple-600 font-medium border-r border-gray-200",children:r.pi}),s.jsx("div",{className:"p-4 text-center text-purple-600 font-medium",children:r.jetson})]},r.label))]}),s.jsx("div",{className:"text-center mt-8",children:s.jsx(J,{onClick:()=>n("/usecases"),className:"bg-purple-600 hover:bg-purple-700 text-white px-8 py-3",children:"View use cases"})})]}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:[s.jsx("h2",{className:"text-3xl font-semibold text-purple-600 mb-8",children:"The device layout plan"}),s.jsxs("div",{className:"bg-white rounded-2xl shadow-xl p-8 text-center",children:[s.jsx("div",{className:"relative max-w-4xl mx-auto",children:s.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"}})}),s.jsxs("div",{className:"flex justify-center space-x-4 mt-8",children:[s.jsx(J,{className:"bg-purple-600 hover:bg-purple-700 text-white px-6 py-2",children:"Get your device"}),s.jsx(J,{variant:"outline",className:"border-purple-600 text-purple-600 hover:bg-purple-50 px-6 py-2",children:"View use cases"})]})]}),s.jsx("p",{className:"text-center text-gray-600 mt-6",children:"Need help? Contact us to get customized device and services"})]})]})}function aC(){const e=Lr(),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 s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx("nav",{className:"bg-white border-b border-gray-200",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"flex justify-between items-center h-20",children:[s.jsx("div",{className:"flex items-center",children:s.jsx("img",{src:"/assets/logo.png",alt:"EdgeLLM Logo",className:"h-20 w-20",onError:n=>{console.error("Logo failed to load"),n.currentTarget.style.display="none"}})}),s.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[s.jsx("button",{onClick:()=>e("/"),className:"text-gray-700 hover:text-purple-600 font-medium",children:"Home"}),s.jsx("button",{onClick:()=>e("/technology"),className:"text-gray-700 hover:text-purple-600 font-medium",children:"Technology"}),s.jsx("span",{className:"text-white bg-purple-600 px-4 py-2 rounded-md font-medium",children:"Use Cases"}),s.jsx(J,{variant:"outline",onClick:()=>e("/mydevice"),className:"border-purple-600 text-purple-600 hover:bg-purple-50",children:"My Device"})]}),s.jsx("div",{className:"md:hidden",children:s.jsx(J,{variant:"ghost",size:"sm",children:s.jsx(Vd,{className:"h-5 w-5"})})})]})})}),s.jsx("div",{className:"py-24 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-black mb-6",children:"Use Case Examples"}),s.jsx("p",{className:"text-xl text-purple-700 font-semibold max-w-2xl mx-auto mb-10",children:"Bringing intelligent computing to the edge of connectivity"})]})}),s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:t.map((n,r)=>s.jsx(Ie,{className:"bg-white shadow-lg border-0 rounded-3xl overflow-hidden h-full flex flex-col",children:s.jsxs(Ye,{className:"p-6 flex flex-col h-full",children:[s.jsx("div",{className:"w-full h-60 rounded-xl mb-6 overflow-hidden",children:s.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)}})}),s.jsxs("div",{className:"flex flex-col flex-grow space-y-4",children:[s.jsx("div",{className:"text-sm font-semibold text-purple-600",children:n.category}),s.jsx("h3",{className:"text-xl font-semibold text-black leading-tight",children:n.title}),s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed flex-grow",children:n.description}),s.jsx("div",{className:"pt-4",children:s.jsx(J,{className:"bg-purple-600 hover:bg-purple-700 text-white text-sm px-4 py-2 w-auto",onClick:()=>{let i="";n.id===1?i="outdoor-rescue":n.id===2?i="offline-healthcare":n.id===3&&(i="ai-companion"),i&&localStorage.setItem("selectedUseCase",i),e("/mydevice")},children:"Select"})})]})]})},n.id))})}),s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-16",children:s.jsxs("div",{className:"relative",children:[s.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"}),s.jsxs("div",{className:"relative bg-purple-400/20 backdrop-blur-lg rounded-3xl p-8 text-center",children:[s.jsx("div",{className:"flex justify-center mb-6 space-x-1",children:[...Array(20)].map((n,r)=>s.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))}),s.jsx("h2",{className:"text-2xl font-medium text-white mb-4",children:"Customize your own device"}),s.jsx("p",{className:"text-gray-900 mb-6",children:"Need help? Contact us to get customized device and services"}),s.jsx(J,{className:"bg-purple-600 hover:bg-purple-700 text-white px-8 py-3",onClick:()=>e("/mydevice"),children:"Get Started"})]})]})})]})}const ni=g.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:ce("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}));ni.displayName="Input";var uC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],le=uC.reduce((e,t)=>{const n=Ni(`Primitive.${t}`),r=g.forwardRef((i,o)=>{const{asChild:l,...a}=i,u=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(u,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function cC(e,t){e&&_i.flushSync(()=>e.dispatchEvent(t))}var dC="Label",ay=g.forwardRef((e,t)=>s.jsx(le.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())}}));ay.displayName=dC;var uy=ay;const fC=Wd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ke=g.forwardRef(({className:e,...t},n)=>s.jsx(uy,{ref:n,className:ce(fC(),e),...t}));ke.displayName=uy.displayName;const Kd=g.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:ce("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Kd.displayName="Textarea";function As(e,[t,n]){return Math.min(n,Math.max(t,e))}function ee(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 pC(e,t){const n=g.createContext(t),r=o=>{const{children:l,...a}=o,u=g.useMemo(()=>a,Object.values(a));return s.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 a=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])||a,S=g.useMemo(()=>w,Object.values(w));return s.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])||a,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(a){const u=(a==null?void 0:a[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return i.scopeName=e,[r,mC(i,...t)]}function mC(...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((a,{useScope:u,scopeName:c})=>{const d=u(o)[`__scope${c}`];return{...a,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Qd(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=Ht.useRef(null),v=Ht.useRef(new Map).current;return s.jsx(i,{scope:S,itemMap:v,collectionRef:h,children:y})};l.displayName=t;const a=e+"CollectionSlot",u=Ni(a),c=Ht.forwardRef((x,S)=>{const{scope:y,children:h}=x,v=o(a,y),N=ve(S,v.collectionRef);return s.jsx(u,{ref:N,children:h})});c.displayName=a;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=Ni(f),m=Ht.forwardRef((x,S)=>{const{scope:y,children:h,...v}=x,N=Ht.useRef(null),j=ve(S,N),C=o(f,y);return Ht.useEffect(()=>(C.itemMap.set(N,{ref:N,...v}),()=>void C.itemMap.delete(N))),s.jsx(p,{[d]:"",ref:j,children:h})});m.displayName=f;function w(x){const S=o(e+"CollectionConsumer",x);return Ht.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 hC=g.createContext(void 0);function oa(e){const t=g.useContext(hC);return e||t||"ltr"}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)},[])}function gC(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 xC="DismissableLayer",wc="dismissableLayer.update",yC="dismissableLayer.pointerDownOutside",vC="dismissableLayer.focusOutside",sm,cy=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yd=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:l,onDismiss:a,...u}=e,c=g.useContext(cy),[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,N=h>=y,j=bC(E=>{const T=E.target,z=[...c.branches].some(L=>L.contains(T));!N||z||(i==null||i(E),l==null||l(E),E.defaultPrevented||a==null||a())},p),C=NC(E=>{const T=E.target;[...c.branches].some(L=>L.contains(T))||(o==null||o(E),l==null||l(E),E.defaultPrevented||a==null||a())},p);return gC(E=>{h===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},p),g.useEffect(()=>{if(f)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(sm=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),am(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=sm)}},[f,p,n,c]),g.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),am())},[f,c]),g.useEffect(()=>{const E=()=>m({});return document.addEventListener(wc,E),()=>document.removeEventListener(wc,E)},[]),s.jsx(le.div,{...u,ref:w,style:{pointerEvents:v?N?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,C.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,j.onPointerDownCapture)})});Yd.displayName=xC;var wC="DismissableLayerBranch",SC=g.forwardRef((e,t)=>{const n=g.useContext(cy),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]),s.jsx(le.div,{...e,ref:i})});SC.displayName=wC;function bC(e,t=globalThis==null?void 0:globalThis.document){const n=er(e),r=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){dy(yC,n,c,{discrete:!0})};const c={originalEvent:a};a.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 NC(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&&dy(vC,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 am(){const e=new CustomEvent(wc);document.dispatchEvent(e)}function dy(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?cC(i,o):i.dispatchEvent(o)}var Xa=0;function fy(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??um()),document.body.insertAdjacentElement("beforeend",e[1]??um()),Xa++,()=>{Xa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xa--}},[])}function um(){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 qa="focusScope.autoFocusOnMount",Ja="focusScope.autoFocusOnUnmount",cm={bubbles:!1,cancelable:!0},kC="FocusScope",Xd=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[a,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||!a)return;const N=v.target;a.contains(N)?d.current=N:Mn(d.current,{select:!0})},S=function(v){if(m.paused||!a)return;const N=v.relatedTarget;N!==null&&(a.contains(N)||Mn(d.current,{select:!0}))},y=function(v){if(document.activeElement===document.body)for(const j of v)j.removedNodes.length>0&&Mn(a)};document.addEventListener("focusin",x),document.addEventListener("focusout",S);const h=new MutationObserver(y);return a&&h.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",S),h.disconnect()}}},[r,a,m.paused]),g.useEffect(()=>{if(a){fm.add(m);const x=document.activeElement;if(!a.contains(x)){const y=new CustomEvent(qa,cm);a.addEventListener(qa,c),a.dispatchEvent(y),y.defaultPrevented||(CC(AC(py(a)),{select:!0}),document.activeElement===x&&Mn(a))}return()=>{a.removeEventListener(qa,c),setTimeout(()=>{const y=new CustomEvent(Ja,cm);a.addEventListener(Ja,f),a.dispatchEvent(y),y.defaultPrevented||Mn(x??document.body,{select:!0}),a.removeEventListener(Ja,f),fm.remove(m)},0)}}},[a,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,N]=jC(h);v&&N?!x.shiftKey&&y===N?(x.preventDefault(),n&&Mn(v,{select:!0})):x.shiftKey&&y===v&&(x.preventDefault(),n&&Mn(N,{select:!0})):y===h&&x.preventDefault()}},[n,r,m.paused]);return s.jsx(le.div,{tabIndex:-1,...l,ref:p,onKeyDown:w})});Xd.displayName=kC;function CC(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Mn(r,{select:t}),document.activeElement!==n)return}function jC(e){const t=py(e),n=dm(t,e),r=dm(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 dm(e,t){for(const n of e)if(!EC(n,{upTo:t}))return n}function EC(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 PC(e){return e instanceof HTMLInputElement&&"select"in e}function Mn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&PC(e)&&t&&e.select()}}var fm=TC();function TC(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=pm(e,t),e.unshift(t)},remove(t){var n;e=pm(e,t),(n=e[0])==null||n.resume()}}}function pm(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function AC(e){return e.filter(t=>t.tagName!=="A")}var tt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},_C=Yc[" useId ".trim().toString()]||(()=>{}),IC=0;function qn(e){const[t,n]=g.useState(_C());return tt(()=>{e||n(r=>r??String(IC++))},[e]),e||(t?`radix-${t}`:"")}const RC=["top","right","bottom","left"],tr=Math.min,wt=Math.max,_s=Math.round,wl=Math.floor,pn=e=>({x:e,y:e}),MC={left:"right",right:"left",bottom:"top",top:"bottom"},LC={start:"end",end:"start"};function Sc(e,t,n){return wt(e,tr(t,n))}function En(e,t){return typeof e=="function"?e(t):e}function Pn(e){return e.split("-")[0]}function Ri(e){return e.split("-")[1]}function qd(e){return e==="x"?"y":"x"}function Jd(e){return e==="y"?"height":"width"}const OC=new Set(["top","bottom"]);function cn(e){return OC.has(Pn(e))?"y":"x"}function Zd(e){return qd(cn(e))}function DC(e,t,n){n===void 0&&(n=!1);const r=Ri(e),i=Zd(e),o=Jd(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Is(l)),[l,Is(l)]}function zC(e){const t=Is(e);return[bc(e),t,bc(t)]}function bc(e){return e.replace(/start|end/g,t=>LC[t])}const mm=["left","right"],hm=["right","left"],FC=["top","bottom"],BC=["bottom","top"];function $C(e,t,n){switch(e){case"top":case"bottom":return n?t?hm:mm:t?mm:hm;case"left":case"right":return t?FC:BC;default:return[]}}function UC(e,t,n,r){const i=Ri(e);let o=$C(Pn(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(bc)))),o}function Is(e){return e.replace(/left|right|bottom|top/g,t=>MC[t])}function VC(e){return{top:0,right:0,bottom:0,left:0,...e}}function my(e){return typeof e!="number"?VC(e):{top:e,right:e,bottom:e,left:e}}function Rs(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function gm(e,t,n){let{reference:r,floating:i}=e;const o=cn(t),l=Zd(t),a=Jd(l),u=Pn(t),c=o==="y",f=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let m;switch(u){case"top":m={x:f,y:r.y-i.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-i.width,y:d};break;default:m={x:r.x,y:r.y}}switch(Ri(t)){case"start":m[l]-=p*(n&&c?-1:1);break;case"end":m[l]+=p*(n&&c?-1:1);break}return m}const HC=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,a=o.filter(Boolean),u=await(l.isRTL==null?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=gm(c,r,u),p=r,m={},w=0;for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:a,middlewareData:u}=t,{element:c,padding:f=0}=En(e,t)||{};if(c==null)return{};const d=my(f),p={x:n,y:r},m=Zd(i),w=Jd(m),x=await l.getDimensions(c),S=m==="y",y=S?"top":"left",h=S?"bottom":"right",v=S?"clientHeight":"clientWidth",N=o.reference[w]+o.reference[m]-p[m]-o.floating[w],j=p[m]-o.reference[m],C=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let E=C?C[v]:0;(!E||!await(l.isElement==null?void 0:l.isElement(C)))&&(E=a.floating[v]||o.floating[w]);const T=N/2-j/2,z=E/2-x[w]/2-1,L=tr(d[y],z),I=tr(d[h],z),P=L,R=E-x[w]-I,W=E/2-x[w]/2+T,M=Sc(P,W,R),O=!u.arrow&&Ri(i)!=null&&W!==M&&o.reference[w]/2-(WW<=0)){var I,P;const W=(((I=o.flip)==null?void 0:I.index)||0)+1,M=E[W];if(M&&(!(d==="alignment"?h!==cn(M):!1)||L.every(A=>cn(A.placement)===h?A.overflows[0]>0:!0)))return{data:{index:W,overflows:L},reset:{placement:M}};let O=(P=L.filter($=>$.overflows[0]<=0).sort(($,A)=>$.overflows[1]-A.overflows[1])[0])==null?void 0:P.placement;if(!O)switch(m){case"bestFit":{var R;const $=(R=L.filter(A=>{if(C){const F=cn(A.placement);return F===h||F==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(F=>F>0).reduce((F,b)=>F+b,0)]).sort((A,F)=>A[1]-F[1])[0])==null?void 0:R[0];$&&(O=$);break}case"initialPlacement":O=a;break}if(i!==O)return{reset:{placement:O}}}return{}}}};function xm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ym(e){return RC.some(t=>e[t]>=0)}const KC=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=En(e,t);switch(r){case"referenceHidden":{const o=await Lo(t,{...i,elementContext:"reference"}),l=xm(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:ym(l)}}}case"escaped":{const o=await Lo(t,{...i,altBoundary:!0}),l=xm(o,n.floating);return{data:{escapedOffsets:l,escaped:ym(l)}}}default:return{}}}}},hy=new Set(["left","top"]);async function QC(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=Pn(n),a=Ri(n),u=cn(n)==="y",c=hy.has(l)?-1:1,f=o&&u?-1:1,d=En(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof w=="number"&&(m=a==="end"?w*-1:w),u?{x:m*f,y:p*c}:{x:p*c,y:m*f}}const YC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:a}=t,u=await QC(t,e);return l===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:l}}}}},XC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:a={fn:S=>{let{x:y,y:h}=S;return{x:y,y:h}}},...u}=En(e,t),c={x:n,y:r},f=await Lo(t,u),d=cn(Pn(i)),p=qd(d);let m=c[p],w=c[d];if(o){const S=p==="y"?"top":"left",y=p==="y"?"bottom":"right",h=m+f[S],v=m-f[y];m=Sc(h,m,v)}if(l){const S=d==="y"?"top":"left",y=d==="y"?"bottom":"right",h=w+f[S],v=w-f[y];w=Sc(h,w,v)}const x=a.fn({...t,[p]:m,[d]:w});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:o,[d]:l}}}}}},qC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:a=0,mainAxis:u=!0,crossAxis:c=!0}=En(e,t),f={x:n,y:r},d=cn(i),p=qd(d);let m=f[p],w=f[d];const x=En(a,t),S=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const v=p==="y"?"height":"width",N=o.reference[p]-o.floating[v]+S.mainAxis,j=o.reference[p]+o.reference[v]-S.mainAxis;mj&&(m=j)}if(c){var y,h;const v=p==="y"?"width":"height",N=hy.has(Pn(i)),j=o.reference[d]-o.floating[v]+(N&&((y=l.offset)==null?void 0:y[d])||0)+(N?0:S.crossAxis),C=o.reference[d]+o.reference[v]+(N?0:((h=l.offset)==null?void 0:h[d])||0)-(N?S.crossAxis:0);wC&&(w=C)}return{[p]:m,[d]:w}}}},JC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:l,elements:a}=t,{apply:u=()=>{},...c}=En(e,t),f=await Lo(t,c),d=Pn(i),p=Ri(i),m=cn(i)==="y",{width:w,height:x}=o.floating;let S,y;d==="top"||d==="bottom"?(S=d,y=p===(await(l.isRTL==null?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,S=p==="end"?"top":"bottom");const h=x-f.top-f.bottom,v=w-f.left-f.right,N=tr(x-f[S],h),j=tr(w-f[y],v),C=!t.middlewareData.shift;let E=N,T=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=h),C&&!p){const L=wt(f.left,0),I=wt(f.right,0),P=wt(f.top,0),R=wt(f.bottom,0);m?T=w-2*(L!==0||I!==0?L+I:wt(f.left,f.right)):E=x-2*(P!==0||R!==0?P+R:wt(f.top,f.bottom))}await u({...t,availableWidth:T,availableHeight:E});const z=await l.getDimensions(a.floating);return w!==z.width||x!==z.height?{reset:{rects:!0}}:{}}}};function la(){return typeof window<"u"}function Mi(e){return gy(e)?(e.nodeName||"").toLowerCase():"#document"}function Et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gn(e){var t;return(t=(gy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gy(e){return la()?e instanceof Node||e instanceof Et(e).Node:!1}function Xt(e){return la()?e instanceof Element||e instanceof Et(e).Element:!1}function mn(e){return la()?e instanceof HTMLElement||e instanceof Et(e).HTMLElement:!1}function vm(e){return!la()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Et(e).ShadowRoot}const ZC=new Set(["inline","contents"]);function Qo(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ZC.has(i)}const ej=new Set(["table","td","th"]);function tj(e){return ej.has(Mi(e))}const nj=[":popover-open",":modal"];function sa(e){return nj.some(t=>{try{return e.matches(t)}catch{return!1}})}const rj=["transform","translate","scale","rotate","perspective"],ij=["transform","translate","scale","rotate","perspective","filter"],oj=["paint","layout","strict","content"];function ef(e){const t=tf(),n=Xt(e)?qt(e):e;return rj.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ij.some(r=>(n.willChange||"").includes(r))||oj.some(r=>(n.contain||"").includes(r))}function lj(e){let t=nr(e);for(;mn(t)&&!ki(t);){if(ef(t))return t;if(sa(t))return null;t=nr(t)}return null}function tf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sj=new Set(["html","body","#document"]);function ki(e){return sj.has(Mi(e))}function qt(e){return Et(e).getComputedStyle(e)}function aa(e){return Xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nr(e){if(Mi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vm(e)&&e.host||gn(e);return vm(t)?t.host:t}function xy(e){const t=nr(e);return ki(t)?e.ownerDocument?e.ownerDocument.body:e.body:mn(t)&&Qo(t)?t:xy(t)}function Oo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=xy(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Et(i);if(o){const a=Nc(l);return t.concat(l,l.visualViewport||[],Qo(i)?i:[],a&&n?Oo(a):[])}return t.concat(i,Oo(i,[],n))}function Nc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yy(e){const t=qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=mn(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,a=_s(n)!==o||_s(r)!==l;return a&&(n=o,r=l),{width:n,height:r,$:a}}function nf(e){return Xt(e)?e:e.contextElement}function ci(e){const t=nf(e);if(!mn(t))return pn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=yy(t);let l=(o?_s(n.width):n.width)/r,a=(o?_s(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const aj=pn(0);function vy(e){const t=Et(e);return!tf()||!t.visualViewport?aj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Et(e)?!1:t}function Pr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=nf(e);let l=pn(1);t&&(r?Xt(r)&&(l=ci(r)):l=ci(e));const a=uj(o,n,r)?vy(o):pn(0);let u=(i.left+a.x)/l.x,c=(i.top+a.y)/l.y,f=i.width/l.x,d=i.height/l.y;if(o){const p=Et(o),m=r&&Xt(r)?Et(r):r;let w=p,x=Nc(w);for(;x&&r&&m!==w;){const S=ci(x),y=x.getBoundingClientRect(),h=qt(x),v=y.left+(x.clientLeft+parseFloat(h.paddingLeft))*S.x,N=y.top+(x.clientTop+parseFloat(h.paddingTop))*S.y;u*=S.x,c*=S.y,f*=S.x,d*=S.y,u+=v,c+=N,w=Et(x),x=Nc(w)}}return Rs({width:f,height:d,x:u,y:c})}function ua(e,t){const n=aa(e).scrollLeft;return t?t.left+n:Pr(gn(e)).left+n}function wy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ua(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function cj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=gn(r),a=t?sa(t.floating):!1;if(r===l||a&&o)return n;let u={scrollLeft:0,scrollTop:0},c=pn(1);const f=pn(0),d=mn(r);if((d||!d&&!o)&&((Mi(r)!=="body"||Qo(l))&&(u=aa(r)),mn(r))){const m=Pr(r);c=ci(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const p=l&&!d&&!o?wy(l,u):pn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+p.x,y:n.y*c.y-u.scrollTop*c.y+f.y+p.y}}function dj(e){return Array.from(e.getClientRects())}function fj(e){const t=gn(e),n=aa(e),r=e.ownerDocument.body,i=wt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=wt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+ua(e);const a=-n.scrollTop;return qt(r).direction==="rtl"&&(l+=wt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:a}}const wm=25;function pj(e,t){const n=Et(e),r=gn(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,a=0,u=0;if(i){o=i.width,l=i.height;const f=tf();(!f||f&&t==="fixed")&&(a=i.offsetLeft,u=i.offsetTop)}const c=ua(r);if(c<=0){const f=r.ownerDocument,d=f.body,p=getComputedStyle(d),m=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(r.clientWidth-d.clientWidth-m);w<=wm&&(o-=w)}else c<=wm&&(o+=c);return{width:o,height:l,x:a,y:u}}const mj=new Set(["absolute","fixed"]);function hj(e,t){const n=Pr(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=mn(e)?ci(e):pn(1),l=e.clientWidth*o.x,a=e.clientHeight*o.y,u=i*o.x,c=r*o.y;return{width:l,height:a,x:u,y:c}}function Sm(e,t,n){let r;if(t==="viewport")r=pj(e,n);else if(t==="document")r=fj(gn(e));else if(Xt(t))r=hj(t,n);else{const i=vy(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Rs(r)}function Sy(e,t){const n=nr(e);return n===t||!Xt(n)||ki(n)?!1:qt(n).position==="fixed"||Sy(n,t)}function gj(e,t){const n=t.get(e);if(n)return n;let r=Oo(e,[],!1).filter(a=>Xt(a)&&Mi(a)!=="body"),i=null;const o=qt(e).position==="fixed";let l=o?nr(e):e;for(;Xt(l)&&!ki(l);){const a=qt(l),u=ef(l);!u&&a.position==="fixed"&&(i=null),(o?!u&&!i:!u&&a.position==="static"&&!!i&&mj.has(i.position)||Qo(l)&&!u&&Sy(e,l))?r=r.filter(f=>f!==l):i=a,l=nr(l)}return t.set(e,r),r}function xj(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?sa(t)?[]:gj(t,this._c):[].concat(n),r],a=l[0],u=l.reduce((c,f)=>{const d=Sm(t,f,i);return c.top=wt(d.top,c.top),c.right=tr(d.right,c.right),c.bottom=tr(d.bottom,c.bottom),c.left=wt(d.left,c.left),c},Sm(t,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function yj(e){const{width:t,height:n}=yy(e);return{width:t,height:n}}function vj(e,t,n){const r=mn(t),i=gn(t),o=n==="fixed",l=Pr(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const u=pn(0);function c(){u.x=ua(i)}if(r||!r&&!o)if((Mi(t)!=="body"||Qo(i))&&(a=aa(t)),r){const m=Pr(t,!0,o,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else i&&c();o&&!r&&i&&c();const f=i&&!r&&!o?wy(i,a):pn(0),d=l.left+a.scrollLeft-u.x-f.x,p=l.top+a.scrollTop-u.y-f.y;return{x:d,y:p,width:l.width,height:l.height}}function Za(e){return qt(e).position==="static"}function bm(e,t){if(!mn(e)||qt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return gn(e)===n&&(n=n.ownerDocument.body),n}function by(e,t){const n=Et(e);if(sa(e))return n;if(!mn(e)){let i=nr(e);for(;i&&!ki(i);){if(Xt(i)&&!Za(i))return i;i=nr(i)}return n}let r=bm(e,t);for(;r&&tj(r)&&Za(r);)r=bm(r,t);return r&&ki(r)&&Za(r)&&!ef(r)?n:r||lj(e)||n}const wj=async function(e){const t=this.getOffsetParent||by,n=this.getDimensions,r=await n(e.floating);return{reference:vj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sj(e){return qt(e).direction==="rtl"}const bj={convertOffsetParentRelativeRectToViewportRelativeRect:cj,getDocumentElement:gn,getClippingRect:xj,getOffsetParent:by,getElementRects:wj,getClientRects:dj,getDimensions:yj,getScale:ci,isElement:Xt,isRTL:Sj};function Ny(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Nj(e,t){let n=null,r;const i=gn(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function l(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),o();const c=e.getBoundingClientRect(),{left:f,top:d,width:p,height:m}=c;if(a||t(),!p||!m)return;const w=wl(d),x=wl(i.clientWidth-(f+p)),S=wl(i.clientHeight-(d+m)),y=wl(f),v={rootMargin:-w+"px "+-x+"px "+-S+"px "+-y+"px",threshold:wt(0,tr(1,u))||1};let N=!0;function j(C){const E=C[0].intersectionRatio;if(E!==u){if(!N)return l();E?l(!1,E):r=setTimeout(()=>{l(!1,1e-7)},1e3)}E===1&&!Ny(c,e.getBoundingClientRect())&&l(),N=!1}try{n=new IntersectionObserver(j,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(j,v)}n.observe(e)}return l(!0),o}function kj(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=nf(e),f=i||o?[...c?Oo(c):[],...Oo(t)]:[];f.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const d=c&&a?Nj(c,n):null;let p=-1,m=null;l&&(m=new ResizeObserver(y=>{let[h]=y;h&&h.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(t)})),n()}),c&&!u&&m.observe(c),m.observe(t));let w,x=u?Pr(e):null;u&&S();function S(){const y=Pr(e);x&&!Ny(x,y)&&n(),x=y,w=requestAnimationFrame(S)}return n(),()=>{var y;f.forEach(h=>{i&&h.removeEventListener("scroll",n),o&&h.removeEventListener("resize",n)}),d==null||d(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(w)}}const Cj=YC,jj=XC,Ej=GC,Pj=JC,Tj=KC,Nm=WC,Aj=qC,_j=(e,t,n)=>{const r=new Map,i={platform:bj,...n},o={...i.platform,_c:r};return HC(e,t,{...i,platform:o})};var Ij=typeof document<"u",Rj=function(){},$l=Ij?g.useLayoutEffect:Rj;function Ms(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ms(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Ms(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function ky(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function km(e,t){const n=ky(e);return Math.round(t*n)/n}function eu(e){const t=g.useRef(e);return $l(()=>{t.current=e}),t}function Mj(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[f,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=g.useState(r);Ms(p,r)||m(r);const[w,x]=g.useState(null),[S,y]=g.useState(null),h=g.useCallback(A=>{A!==C.current&&(C.current=A,x(A))},[]),v=g.useCallback(A=>{A!==E.current&&(E.current=A,y(A))},[]),N=o||w,j=l||S,C=g.useRef(null),E=g.useRef(null),T=g.useRef(f),z=u!=null,L=eu(u),I=eu(i),P=eu(c),R=g.useCallback(()=>{if(!C.current||!E.current)return;const A={placement:t,strategy:n,middleware:p};I.current&&(A.platform=I.current),_j(C.current,E.current,A).then(F=>{const b={...F,isPositioned:P.current!==!1};W.current&&!Ms(T.current,b)&&(T.current=b,_i.flushSync(()=>{d(b)}))})},[p,t,n,I,P]);$l(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[c]);const W=g.useRef(!1);$l(()=>(W.current=!0,()=>{W.current=!1}),[]),$l(()=>{if(N&&(C.current=N),j&&(E.current=j),N&&j){if(L.current)return L.current(N,j,R);R()}},[N,j,R,L,z]);const M=g.useMemo(()=>({reference:C,floating:E,setReference:h,setFloating:v}),[h,v]),O=g.useMemo(()=>({reference:N,floating:j}),[N,j]),$=g.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const F=km(O.floating,f.x),b=km(O.floating,f.y);return a?{...A,transform:"translate("+F+"px, "+b+"px)",...ky(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:b}},[n,a,O.floating,f.x,f.y]);return g.useMemo(()=>({...f,update:R,refs:M,elements:O,floatingStyles:$}),[f,R,M,O,$])}const Lj=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Nm({element:r.current,padding:i}).fn(n):{}:r?Nm({element:r,padding:i}).fn(n):{}}}},Oj=(e,t)=>({...Cj(e),options:[e,t]}),Dj=(e,t)=>({...jj(e),options:[e,t]}),zj=(e,t)=>({...Aj(e),options:[e,t]}),Fj=(e,t)=>({...Ej(e),options:[e,t]}),Bj=(e,t)=>({...Pj(e),options:[e,t]}),$j=(e,t)=>({...Tj(e),options:[e,t]}),Uj=(e,t)=>({...Lj(e),options:[e,t]});var Vj="Arrow",Cy=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return s.jsx(le.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cy.displayName=Vj;var Hj=Cy;function jy(e){const[t,n]=g.useState(void 0);return tt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,a;if("borderBoxSize"in o){const u=o.borderBoxSize,c=Array.isArray(u)?u[0]:u;l=c.inlineSize,a=c.blockSize}else l=e.offsetWidth,a=e.offsetHeight;n({width:l,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var rf="Popper",[Ey,Py]=sr(rf),[Wj,Ty]=Ey(rf),Ay=e=>{const{__scopePopper:t,children:n}=e,[r,i]=g.useState(null);return s.jsx(Wj,{scope:t,anchor:r,onAnchorChange:i,children:n})};Ay.displayName=rf;var _y="PopperAnchor",Iy=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Ty(_y,n),l=g.useRef(null),a=ve(t,l),u=g.useRef(null);return g.useEffect(()=>{const c=u.current;u.current=(r==null?void 0:r.current)||l.current,c!==u.current&&o.onAnchorChange(u.current)}),r?null:s.jsx(le.div,{...i,ref:a})});Iy.displayName=_y;var of="PopperContent",[Gj,Kj]=Ey(of),Ry=g.forwardRef((e,t)=>{var K,ne,he,oe,de,me;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:w,...x}=e,S=Ty(of,n),[y,h]=g.useState(null),v=ve(t,He=>h(He)),[N,j]=g.useState(null),C=jy(N),E=(C==null?void 0:C.width)??0,T=(C==null?void 0:C.height)??0,z=r+(o!=="center"?"-"+o:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},I=Array.isArray(c)?c:[c],P=I.length>0,R={padding:L,boundary:I.filter(Yj),altBoundary:P},{refs:W,floatingStyles:M,placement:O,isPositioned:$,middlewareData:A}=Mj({strategy:"fixed",placement:z,whileElementsMounted:(...He)=>kj(...He,{animationFrame:m==="always"}),elements:{reference:S.anchor},middleware:[Oj({mainAxis:i+T,alignmentAxis:l}),u&&Dj({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?zj():void 0,...R}),u&&Fj({...R}),Bj({...R,apply:({elements:He,rects:rt,availableWidth:Zt,availableHeight:zt})=>{const{width:en,height:Fi}=rt.reference,xn=He.floating.style;xn.setProperty("--radix-popper-available-width",`${Zt}px`),xn.setProperty("--radix-popper-available-height",`${zt}px`),xn.setProperty("--radix-popper-anchor-width",`${en}px`),xn.setProperty("--radix-popper-anchor-height",`${Fi}px`)}}),N&&Uj({element:N,padding:a}),Xj({arrowWidth:E,arrowHeight:T}),p&&$j({strategy:"referenceHidden",...R})]}),[F,b]=Oy(O),V=er(w);tt(()=>{$&&(V==null||V())},[$,V]);const Y=(K=A.arrow)==null?void 0:K.x,k=(ne=A.arrow)==null?void 0:ne.y,re=((he=A.arrow)==null?void 0:he.centerOffset)!==0,[fe,ie]=g.useState();return tt(()=>{y&&ie(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:$?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(oe=A.transformOrigin)==null?void 0:oe.x,(de=A.transformOrigin)==null?void 0:de.y].join(" "),...((me=A.hide)==null?void 0:me.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Gj,{scope:n,placedSide:F,onArrowChange:j,arrowX:Y,arrowY:k,shouldHideArrow:re,children:s.jsx(le.div,{"data-side":F,"data-align":b,...x,ref:v,style:{...x.style,animation:$?void 0:"none"}})})})});Ry.displayName=of;var My="PopperArrow",Qj={top:"bottom",right:"left",bottom:"top",left:"right"},Ly=g.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Kj(My,r),l=Qj[o.placedSide];return s.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:s.jsx(Hj,{...i,ref:n,style:{...i.style,display:"block"}})})});Ly.displayName=My;function Yj(e){return e!==null}var Xj=e=>({name:"transformOrigin",options:e,fn(t){var S,y,h;const{placement:n,rects:r,middlewareData:i}=t,l=((S=i.arrow)==null?void 0:S.centerOffset)!==0,a=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[c,f]=Oy(n),d={start:"0%",center:"50%",end:"100%"}[f],p=(((y=i.arrow)==null?void 0:y.x)??0)+a/2,m=(((h=i.arrow)==null?void 0:h.y)??0)+u/2;let w="",x="";return c==="bottom"?(w=l?d:`${p}px`,x=`${-u}px`):c==="top"?(w=l?d:`${p}px`,x=`${r.floating.height+u}px`):c==="right"?(w=`${-u}px`,x=l?d:`${m}px`):c==="left"&&(w=`${r.floating.width+u}px`,x=l?d:`${m}px`),{data:{x:w,y:x}}}});function Oy(e){const[t,n="center"]=e.split("-");return[t,n]}var qj=Ay,Jj=Iy,Zj=Ry,e2=Ly,t2="Portal",lf=g.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,o]=g.useState(!1);tt(()=>o(!0),[]);const l=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return l?cb.createPortal(s.jsx(le.div,{...r,ref:t}),l):null});lf.displayName=t2;var n2=Yc[" useInsertionEffect ".trim().toString()]||tt;function Ci({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,l]=r2({defaultProp:t,onChange:n}),a=e!==void 0,u=a?e:i;{const f=g.useRef(e!==void 0);g.useEffect(()=>{const d=f.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"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=a},[a,r])}const c=g.useCallback(f=>{var d;if(a){const p=i2(f)?f(e):f;p!==e&&((d=l.current)==null||d.call(l,p))}else o(f)},[a,e,o,l]);return[u,c]}function r2({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),i=g.useRef(n),o=g.useRef(t);return n2(()=>{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 i2(e){return typeof e=="function"}function Dy(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var zy=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),o2="VisuallyHidden",l2=g.forwardRef((e,t)=>s.jsx(le.span,{...e,ref:t,style:{...zy,...e.style}}));l2.displayName=o2;var s2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Fr=new WeakMap,Sl=new WeakMap,bl={},tu=0,Fy=function(e){return e&&(e.host||Fy(e.parentNode))},a2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Fy(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},u2=function(e,t,n,r){var i=a2(t,Array.isArray(e)?e:[e]);bl[n]||(bl[n]=new WeakMap);var o=bl[n],l=[],a=new Set,u=new Set(i),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};i.forEach(c);var f=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))f(p);else try{var m=p.getAttribute(r),w=m!==null&&m!=="false",x=(Fr.get(p)||0)+1,S=(o.get(p)||0)+1;Fr.set(p,x),o.set(p,S),l.push(p),x===1&&w&&Sl.set(p,!0),S===1&&p.setAttribute(n,"true"),w||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return f(t),a.clear(),tu++,function(){l.forEach(function(d){var p=Fr.get(d)-1,m=o.get(d)-1;Fr.set(d,p),o.set(d,m),p||(Sl.has(d)||d.removeAttribute(r),Sl.delete(d)),m||d.removeAttribute(n)}),tu--,tu||(Fr=new WeakMap,Fr=new WeakMap,Sl=new WeakMap,bl={})}},By=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||s2(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),u2(r,i,n,"aria-hidden")):function(){return null}},an=function(){return an=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return j2;var t=E2(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])}},T2=Hy(),di="data-scroll-locked",A2=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,a=e.gap;return n===void 0&&(n="margin"),` .`.concat(d2,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`;