@hanzo/ui 5.6.0 → 5.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/3d/carousel.js +1 -1
  2. package/dist/3d/carousel.mjs +1 -1
  3. package/dist/animation/animated-background.js +1 -1
  4. package/dist/animation/animated-background.mjs +1 -1
  5. package/dist/animation/animated-icon.js +2 -2
  6. package/dist/animation/animated-icon.mjs +2 -2
  7. package/dist/animation/animated-list.js +1 -1
  8. package/dist/animation/animated-list.mjs +1 -1
  9. package/dist/animation/animated-number.js +1 -1
  10. package/dist/animation/animated-number.mjs +1 -1
  11. package/dist/animation/index.js +2 -2
  12. package/dist/animation/index.mjs +2 -2
  13. package/dist/auth/index.js +2 -2
  14. package/dist/auth/index.mjs +2 -2
  15. package/dist/billing/index.js +2 -2
  16. package/dist/billing/index.mjs +2 -2
  17. package/dist/drawer.js +1 -1
  18. package/dist/drawer.mjs +1 -1
  19. package/dist/index.js +1 -1
  20. package/dist/index.mjs +1 -1
  21. package/dist/models/index.js +1 -1
  22. package/dist/models/index.mjs +1 -1
  23. package/dist/navigation/hanzo-shell.js +1 -1
  24. package/dist/navigation/hanzo-shell.mjs +1 -1
  25. package/dist/navigation/index.js +2 -2
  26. package/dist/navigation/index.mjs +2 -2
  27. package/dist/primitives/drawer.d.ts +2 -2
  28. package/dist/primitives/drawer.d.ts.map +1 -1
  29. package/dist/primitives/form.d.ts +1 -1
  30. package/dist/primitives/form.d.ts.map +1 -1
  31. package/dist/primitives/resizable.d.ts +18 -2
  32. package/dist/primitives/resizable.d.ts.map +1 -1
  33. package/dist/primitives/resizable.js +1 -1
  34. package/dist/resizable.js +1 -1
  35. package/dist/resizable.mjs +1 -1
  36. package/dist/src/auth/AuthGuard.d.ts.map +1 -1
  37. package/dist/src/auth/AuthGuard.js +3 -7
  38. package/dist/src/auth/IAMLoginButton.d.ts +10 -3
  39. package/dist/src/auth/IAMLoginButton.d.ts.map +1 -1
  40. package/dist/src/auth/IAMLoginButton.js +14 -19
  41. package/dist/src/auth/PasswordForm.d.ts +22 -0
  42. package/dist/src/auth/PasswordForm.d.ts.map +1 -0
  43. package/dist/src/auth/PasswordForm.js +28 -0
  44. package/dist/src/auth/SignIn.d.ts +37 -0
  45. package/dist/src/auth/SignIn.d.ts.map +1 -0
  46. package/dist/src/auth/SignIn.js +26 -0
  47. package/dist/src/auth/SocialButton.d.ts +27 -0
  48. package/dist/src/auth/SocialButton.d.ts.map +1 -0
  49. package/dist/src/auth/SocialButton.js +37 -0
  50. package/dist/src/auth/Web3Connect.d.ts +9 -0
  51. package/dist/src/auth/Web3Connect.d.ts.map +1 -0
  52. package/dist/src/auth/Web3Connect.js +11 -0
  53. package/dist/src/auth/iam.d.ts +56 -0
  54. package/dist/src/auth/iam.d.ts.map +1 -0
  55. package/dist/src/auth/iam.js +78 -0
  56. package/dist/src/auth/index.d.ts +11 -0
  57. package/dist/src/auth/index.d.ts.map +1 -1
  58. package/dist/src/auth/index.js +9 -0
  59. package/dist/src/auth/types.d.ts +43 -0
  60. package/dist/src/auth/types.d.ts.map +1 -0
  61. package/dist/src/auth/types.js +8 -0
  62. package/dist/src/billing/components/payment-manager.d.ts.map +1 -1
  63. package/dist/src/billing/components/payment-manager.js +13 -1
  64. package/dist/src/form/form.d.ts +4 -2
  65. package/dist/src/form/form.d.ts.map +1 -1
  66. package/dist/src/models/ModelCard.js +2 -2
  67. package/dist/src/navigation/hanzo-shell/AppSwitcher.js +1 -1
  68. package/dist/src/navigation/hanzo-shell/types.d.ts +1 -0
  69. package/dist/src/navigation/hanzo-shell/types.d.ts.map +1 -1
  70. package/dist/src/navigation/hanzo-shell/types.js +11 -0
  71. package/dist/src/navigation/hanzo-shell/useHanzoAuth.js +2 -2
  72. package/dist/util/index.mjs +1 -1
  73. package/package.json +8 -16
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- 'use strict';var lucideReact=require('lucide-react'),jsxRuntime=require('react/jsx-runtime'),react=require('react'),navigation=require('next/navigation');var I=Object.defineProperty;var a=(e,s)=>I(e,"name",{value:s,configurable:true});function q(e){return e?e>=1e6?`${(e/1e6).toFixed(e%1e6===0?0:1)}M ctx`:e>=1e3?`${Math.round(e/1e3)}K ctx`:`${e} ctx`:""}a(q,"fmtCtx");function D(e){switch(e){case "preview":return {label:"PREVIEW",className:"bg-amber-500/20 text-amber-600 dark:text-amber-400"};case "coming-soon":return {label:"SOON",className:"bg-muted text-muted-foreground"};case "contact-sales":return {label:"EARLY ACCESS",className:"bg-purple-500/20 text-purple-600 dark:text-purple-400"};default:return null}}a(D,"statusInfo");function O(e,s){return s?s.includes(e):["zen4-max","zen-max","zen5","zen4"].includes(e)}a(O,"isFeaturedModel");function P({model:e,onNavigate:s,linkPrefix:o="/docs/models/",chatBaseUrl:d="https://hanzo.chat",requestAccessUrl:p="https://hanzo.ai/contact",featuredIds:c}){let t=e.status,g=O(e.id,c),b=D(t),y=[e.spec.params&&e.spec.params!=="N/A"&&e.spec.params!=="TBA"&&e.spec.params!=="TBD"?e.spec.params:null,e.spec.activeParams?`(${e.spec.activeParams} active)`:null,e.spec.arch??null].filter(Boolean).join(" "),$=q(e.spec.context),M=[y,$].filter(Boolean).join(" \xB7 "),C=g?"border-primary/30 bg-primary/5":t==="coming-soon"?"border-border bg-muted/30 opacity-75":t==="contact-sales"?"border-purple-500/20 bg-purple-500/5":"border-border bg-background",h=!!s,N=a(()=>s?.(e.id),"handleClick");return jsxRuntime.jsxs("div",{role:h?"link":void 0,tabIndex:h?0:void 0,onClick:h?N:void 0,onKeyDown:h?a(l=>{(l.key==="Enter"||l.key===" ")&&N();},"handleKey"):void 0,className:`rounded-lg border p-4 transition hover:border-primary/40 ${C} ${h?"cursor-pointer":""}`,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[jsxRuntime.jsx("span",{className:"font-semibold text-sm",children:e.id}),b&&jsxRuntime.jsx("span",{className:`text-[9px] font-semibold tracking-wider uppercase px-1.5 py-0.5 rounded-full ${b.className}`,children:b.label})]}),M&&jsxRuntime.jsx("div",{className:"text-xs font-mono text-muted-foreground mb-2",children:M}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:e.description}),jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-auto",children:[t==="contact-sales"&&jsxRuntime.jsxs("a",{href:p,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs bg-purple-500/20 text-purple-400 border border-purple-500/30 px-2 py-0.5 rounded hover:bg-purple-500/30 transition",children:[jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-2.5 w-2.5"})," Request Access"]}),(t==="available"||t==="preview"||t==="cloud-only")&&jsxRuntime.jsxs("a",{href:`${d}?model=${e.id}`,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs bg-primary text-primary-foreground px-2 py-0.5 rounded hover:opacity-90 transition",children:[jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-2.5 w-2.5"})," Chat"]}),e.huggingface&&jsxRuntime.jsxs("a",{href:e.huggingface,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-2.5 w-2.5"})," Weights"]}),e.github&&jsxRuntime.jsxs("a",{href:e.github,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:underline",children:[jsxRuntime.jsx(lucideReact.Github,{className:"h-2.5 w-2.5"})," Repo"]}),e.paper&&jsxRuntime.jsxs("a",{href:e.paper,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:underline",children:[jsxRuntime.jsx(lucideReact.FileText,{className:"h-2.5 w-2.5"})," Paper"]})]})]})}a(P,"ModelCard");function K(e){return e?e>=1e6?`${(e/1e6).toFixed(e%1e6===0?0:1)}M`:e>=1e3?`${Math.round(e/1e3)}K`:`${e}`:"\u2014"}a(K,"fmtCtx");function A(e){return e==null?"\u2014":`$${e.toFixed(2)}`}a(A,"fmtPrice");function W({status:e}){return e==="preview"||e==="coming-soon"?jsxRuntime.jsx("span",{className:"ml-1 text-[9px] font-semibold tracking-wider uppercase bg-amber-500/20 text-amber-600 dark:text-amber-400 px-1.5 py-0.5 rounded-full align-middle",children:e==="preview"?"PREVIEW":"SOON"}):e==="contact-sales"?jsxRuntime.jsx("span",{className:"ml-1 text-[9px] font-semibold tracking-wider uppercase bg-purple-500/20 text-purple-600 dark:text-purple-400 px-1.5 py-0.5 rounded-full align-middle",children:"EARLY ACCESS"}):null}a(W,"StatusBadge");function V({models:e,linkPrefix:s="/docs/models/",showParams:o=true,showArch:d=false,showContext:p=true,showPricing:c=true}){return jsxRuntime.jsx("div",{className:"overflow-x-auto my-4",children:jsxRuntime.jsxs("table",{className:"w-full text-sm",children:[jsxRuntime.jsx("thead",{children:jsxRuntime.jsxs("tr",{className:"border-b border-border text-left",children:[jsxRuntime.jsx("th",{className:"pb-2 pr-4 font-medium",children:"Model"}),o&&jsxRuntime.jsx("th",{className:"pb-2 pr-4 font-medium",children:"Parameters"}),d&&jsxRuntime.jsx("th",{className:"pb-2 pr-4 font-medium",children:"Architecture"}),p&&jsxRuntime.jsx("th",{className:"pb-2 pr-4 font-medium",children:"Context"}),c&&jsxRuntime.jsx("th",{className:"pb-2 pr-4 font-medium text-right",children:"Input $/1M"}),c&&jsxRuntime.jsx("th",{className:"pb-2 font-medium text-right",children:"Output $/1M"})]})}),jsxRuntime.jsx("tbody",{className:"divide-y divide-border",children:e.map(t=>jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsxs("td",{className:"py-2 pr-4",children:[jsxRuntime.jsx("a",{href:`${s}${t.id}`,className:"font-mono text-primary hover:underline text-sm",children:t.id}),jsxRuntime.jsx(W,{status:t.status})]}),o&&jsxRuntime.jsxs("td",{className:"py-2 pr-4 text-sm text-muted-foreground",children:[t.spec.params&&!["N/A","TBA","TBD"].includes(t.spec.params)?t.spec.params:"\u2014",t.spec.activeParams?` (${t.spec.activeParams} active)`:""]}),d&&jsxRuntime.jsx("td",{className:"py-2 pr-4 text-sm text-muted-foreground",children:t.spec.arch??"\u2014"}),p&&jsxRuntime.jsx("td",{className:"py-2 pr-4 text-sm text-muted-foreground",children:K(t.spec.context)}),c&&jsxRuntime.jsx("td",{className:"py-2 pr-4 text-sm text-right font-mono",children:A(t.pricing?.input)}),c&&jsxRuntime.jsx("td",{className:"py-2 text-sm text-right font-mono",children:A(t.pricing?.output)})]},t.id))})]})})}a(V,"ModelTable");var ce={Sparkles:jsxRuntime.jsx(lucideReact.Sparkles,{className:"h-5 w-5"}),Rocket:jsxRuntime.jsx(lucideReact.Rocket,{className:"h-5 w-5"}),Eye:jsxRuntime.jsx(lucideReact.Eye,{className:"h-5 w-5"}),Code:jsxRuntime.jsx(lucideReact.Code,{className:"h-5 w-5"}),Search:jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5"}),Image:jsxRuntime.jsx(lucideReact.Image,{className:"h-5 w-5"}),Mic:jsxRuntime.jsx(lucideReact.Mic,{className:"h-5 w-5"}),Brain:jsxRuntime.jsx(lucideReact.Brain,{className:"h-5 w-5"}),Shield:jsxRuntime.jsx(lucideReact.Shield,{className:"h-5 w-5"}),Network:jsxRuntime.jsx(lucideReact.Network,{className:"h-5 w-5"}),Box:jsxRuntime.jsx(lucideReact.Box,{className:"h-5 w-5"}),Video:jsxRuntime.jsx(lucideReact.Video,{className:"h-5 w-5"}),Atom:jsxRuntime.jsx(lucideReact.Atom,{className:"h-5 w-5"}),Cpu:jsxRuntime.jsx(lucideReact.Cpu,{className:"h-5 w-5"}),Zap:jsxRuntime.jsx(lucideReact.Zap,{className:"h-5 w-5"})};function E(e){return e==="available"||e==="contact-sales"||e==="cloud-only"}a(E,"isActiveStatus");function F({family:e,models:s,onNavigate:o,chatBaseUrl:d,requestAccessUrl:p,featuredIds:c}){let t=(e.icon&&ce[e.icon])??jsxRuntime.jsx(lucideReact.Atom,{className:"h-5 w-5"});return jsxRuntime.jsxs("div",{className:"mb-12",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[jsxRuntime.jsx("div",{className:"rounded-lg bg-muted p-2 text-primary",children:t}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-xl font-semibold",children:e.name}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:e.description})]}),jsxRuntime.jsxs("span",{className:"ml-auto text-xs text-muted-foreground bg-muted px-2 py-1 rounded-full",children:[s.length," model",s.length!==1?"s":""]})]}),jsxRuntime.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-3 mt-4",children:s.map(g=>jsxRuntime.jsx(P,{model:g,onNavigate:o,chatBaseUrl:d,requestAccessUrl:p,featuredIds:c},g.id))})]})}a(F,"ModelFamilySection");function pe({families:e,allModels:s,linkPrefix:o="/docs/models/",chatBaseUrl:d="https://hanzo.chat",requestAccessUrl:p="https://hanzo.ai/contact",featuredIds:c,showAllLabel:t="Show All Models",showCurrentLabel:g="Show Current Only",onNavigate:b}){let[m,y]=react.useState(false),$=navigation.useRouter(),M=new Map(s.map(i=>[i.id,i])),C=a(i=>{b?b(i):$.push(`${o}${i}`);},"handleNavigate"),h=e.map(i=>{let Z=i.models.map(k=>M.get(k)).filter(k=>k!==void 0).filter(k=>m||E(k.status));return {...i,resolvedModels:Z}}).filter(i=>i.resolvedModels.length>0),N=s.filter(i=>E(i.status)).length,S=s.length,l=S-N;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-8",children:[jsxRuntime.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing ",jsxRuntime.jsx("strong",{children:m?S:N})," models",!m&&l>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[" \xB7 ",l," legacy/upcoming hidden"]})]}),jsxRuntime.jsxs("button",{onClick:()=>y(!m),className:"inline-flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-1.5 text-sm font-medium hover:bg-muted transition",children:[jsxRuntime.jsx(lucideReact.Filter,{className:"h-3.5 w-3.5"}),m?g:t]})]}),h.map(i=>jsxRuntime.jsx(F,{family:i,models:i.resolvedModels,onNavigate:C,chatBaseUrl:d,requestAccessUrl:p,featuredIds:c},i.id))]})}a(pe,"ModelLibrary");function me({size:e=64,color:s="#A855F7",animate:o=true,loop:d=false,asLoader:p=false,className:c=""}){let t=Math.random().toString(36).slice(2,7),g=d?"1.35s":"1.25s",b=d?"0.60s":"0.55s",m=d?"infinite":"1",y=p?{animation:`zenEnsoSpin-${t} 1.2s linear infinite`}:{};return jsxRuntime.jsxs("span",{className:`inline-flex items-center justify-center ${c}`,style:{width:e,height:e},"aria-label":"Zen LM",children:[jsxRuntime.jsx("style",{children:`
2
+ 'use strict';var lucideReact=require('lucide-react'),jsxRuntime=require('react/jsx-runtime'),react=require('react'),navigation=require('next/navigation');var I=Object.defineProperty;var a=(e,s)=>I(e,"name",{value:s,configurable:true});function q(e){return e?e>=1e6?`${(e/1e6).toFixed(e%1e6===0?0:1)}M ctx`:e>=1e3?`${Math.round(e/1e3)}K ctx`:`${e} ctx`:""}a(q,"fmtCtx");function D(e){switch(e){case "preview":return {label:"PREVIEW",className:"bg-amber-500/20 text-amber-600 dark:text-amber-400"};case "coming-soon":return {label:"SOON",className:"bg-muted text-muted-foreground"};case "contact-sales":return {label:"EARLY ACCESS",className:"bg-purple-500/20 text-purple-600 dark:text-purple-400"};default:return null}}a(D,"statusInfo");function O(e,s){return s?s.includes(e):["zen4-max","zen-max","zen5","zen4"].includes(e)}a(O,"isFeaturedModel");function P({model:e,onNavigate:s,linkPrefix:o="/docs/models/",chatBaseUrl:d="https://hanzo.chat",requestAccessUrl:p="https://hanzo.ai/contact",featuredIds:c}){let t=e.status,g=O(e.id,c),b=D(t),y=[e.spec.params&&e.spec.params!=="N/A"&&e.spec.params!=="TBA"&&e.spec.params!=="TBD"?e.spec.params:null,e.spec.activeParams?`(${e.spec.activeParams} active)`:null,e.spec.arch??null].filter(Boolean).join(" "),$=q(e.spec.context),M=[y,$].filter(Boolean).join(" \xB7 "),C=g?"border-primary/30 bg-primary/5":t==="coming-soon"?"border-border bg-muted/30 opacity-75":t==="contact-sales"?"border-purple-500/20 bg-purple-500/5":"border-border bg-background",h=!!s,N=a(()=>s?.(e.id),"handleClick");return jsxRuntime.jsxs("div",{role:h?"link":void 0,tabIndex:h?0:void 0,onClick:h?N:void 0,onKeyDown:h?a(l=>{(l.key==="Enter"||l.key===" ")&&N();},"handleKey"):void 0,className:`rounded-lg border p-4 transition hover:border-primary/40 ${C} ${h?"cursor-pointer":""}`,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[jsxRuntime.jsx("span",{className:"font-semibold text-sm",children:e.id}),b&&jsxRuntime.jsx("span",{className:`text-[9px] font-semibold tracking-wider uppercase px-1.5 py-0.5 rounded-full ${b.className}`,children:b.label})]}),M&&jsxRuntime.jsx("div",{className:"text-xs font-mono text-muted-foreground mb-2",children:M}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:e.description}),jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-auto",children:[t==="contact-sales"&&jsxRuntime.jsxs("a",{href:p,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs bg-purple-500/20 text-purple-400 border border-purple-500/30 px-2 py-0.5 rounded hover:bg-purple-500/30 transition",children:[jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-2.5 w-2.5"})," Request Access"]}),(t==="available"||t==="preview"||t==="cloud-only")&&jsxRuntime.jsxs("a",{href:`${d}?model=${e.id}`,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs bg-primary text-primary-foreground px-2 py-0.5 rounded hover:opacity-90 transition",children:[jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-2.5 w-2.5"})," Chat"]}),e.huggingface&&jsxRuntime.jsxs("a",{href:e.huggingface,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-2.5 w-2.5"})," Weights"]}),e.github&&jsxRuntime.jsxs("a",{href:e.github,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:underline",children:[jsxRuntime.jsx(lucideReact.Code,{className:"h-2.5 w-2.5"})," Repo"]}),e.paper&&jsxRuntime.jsxs("a",{href:e.paper,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:underline",children:[jsxRuntime.jsx(lucideReact.FileText,{className:"h-2.5 w-2.5"})," Paper"]})]})]})}a(P,"ModelCard");function K(e){return e?e>=1e6?`${(e/1e6).toFixed(e%1e6===0?0:1)}M`:e>=1e3?`${Math.round(e/1e3)}K`:`${e}`:"\u2014"}a(K,"fmtCtx");function A(e){return e==null?"\u2014":`$${e.toFixed(2)}`}a(A,"fmtPrice");function W({status:e}){return e==="preview"||e==="coming-soon"?jsxRuntime.jsx("span",{className:"ml-1 text-[9px] font-semibold tracking-wider uppercase bg-amber-500/20 text-amber-600 dark:text-amber-400 px-1.5 py-0.5 rounded-full align-middle",children:e==="preview"?"PREVIEW":"SOON"}):e==="contact-sales"?jsxRuntime.jsx("span",{className:"ml-1 text-[9px] font-semibold tracking-wider uppercase bg-purple-500/20 text-purple-600 dark:text-purple-400 px-1.5 py-0.5 rounded-full align-middle",children:"EARLY ACCESS"}):null}a(W,"StatusBadge");function V({models:e,linkPrefix:s="/docs/models/",showParams:o=true,showArch:d=false,showContext:p=true,showPricing:c=true}){return jsxRuntime.jsx("div",{className:"overflow-x-auto my-4",children:jsxRuntime.jsxs("table",{className:"w-full text-sm",children:[jsxRuntime.jsx("thead",{children:jsxRuntime.jsxs("tr",{className:"border-b border-border text-left",children:[jsxRuntime.jsx("th",{className:"pb-2 pr-4 font-medium",children:"Model"}),o&&jsxRuntime.jsx("th",{className:"pb-2 pr-4 font-medium",children:"Parameters"}),d&&jsxRuntime.jsx("th",{className:"pb-2 pr-4 font-medium",children:"Architecture"}),p&&jsxRuntime.jsx("th",{className:"pb-2 pr-4 font-medium",children:"Context"}),c&&jsxRuntime.jsx("th",{className:"pb-2 pr-4 font-medium text-right",children:"Input $/1M"}),c&&jsxRuntime.jsx("th",{className:"pb-2 font-medium text-right",children:"Output $/1M"})]})}),jsxRuntime.jsx("tbody",{className:"divide-y divide-border",children:e.map(t=>jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsxs("td",{className:"py-2 pr-4",children:[jsxRuntime.jsx("a",{href:`${s}${t.id}`,className:"font-mono text-primary hover:underline text-sm",children:t.id}),jsxRuntime.jsx(W,{status:t.status})]}),o&&jsxRuntime.jsxs("td",{className:"py-2 pr-4 text-sm text-muted-foreground",children:[t.spec.params&&!["N/A","TBA","TBD"].includes(t.spec.params)?t.spec.params:"\u2014",t.spec.activeParams?` (${t.spec.activeParams} active)`:""]}),d&&jsxRuntime.jsx("td",{className:"py-2 pr-4 text-sm text-muted-foreground",children:t.spec.arch??"\u2014"}),p&&jsxRuntime.jsx("td",{className:"py-2 pr-4 text-sm text-muted-foreground",children:K(t.spec.context)}),c&&jsxRuntime.jsx("td",{className:"py-2 pr-4 text-sm text-right font-mono",children:A(t.pricing?.input)}),c&&jsxRuntime.jsx("td",{className:"py-2 text-sm text-right font-mono",children:A(t.pricing?.output)})]},t.id))})]})})}a(V,"ModelTable");var ce={Sparkles:jsxRuntime.jsx(lucideReact.Sparkles,{className:"h-5 w-5"}),Rocket:jsxRuntime.jsx(lucideReact.Rocket,{className:"h-5 w-5"}),Eye:jsxRuntime.jsx(lucideReact.Eye,{className:"h-5 w-5"}),Code:jsxRuntime.jsx(lucideReact.Code,{className:"h-5 w-5"}),Search:jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5"}),Image:jsxRuntime.jsx(lucideReact.Image,{className:"h-5 w-5"}),Mic:jsxRuntime.jsx(lucideReact.Mic,{className:"h-5 w-5"}),Brain:jsxRuntime.jsx(lucideReact.Brain,{className:"h-5 w-5"}),Shield:jsxRuntime.jsx(lucideReact.Shield,{className:"h-5 w-5"}),Network:jsxRuntime.jsx(lucideReact.Network,{className:"h-5 w-5"}),Box:jsxRuntime.jsx(lucideReact.Box,{className:"h-5 w-5"}),Video:jsxRuntime.jsx(lucideReact.Video,{className:"h-5 w-5"}),Atom:jsxRuntime.jsx(lucideReact.Atom,{className:"h-5 w-5"}),Cpu:jsxRuntime.jsx(lucideReact.Cpu,{className:"h-5 w-5"}),Zap:jsxRuntime.jsx(lucideReact.Zap,{className:"h-5 w-5"})};function E(e){return e==="available"||e==="contact-sales"||e==="cloud-only"}a(E,"isActiveStatus");function F({family:e,models:s,onNavigate:o,chatBaseUrl:d,requestAccessUrl:p,featuredIds:c}){let t=(e.icon&&ce[e.icon])??jsxRuntime.jsx(lucideReact.Atom,{className:"h-5 w-5"});return jsxRuntime.jsxs("div",{className:"mb-12",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[jsxRuntime.jsx("div",{className:"rounded-lg bg-muted p-2 text-primary",children:t}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-xl font-semibold",children:e.name}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:e.description})]}),jsxRuntime.jsxs("span",{className:"ml-auto text-xs text-muted-foreground bg-muted px-2 py-1 rounded-full",children:[s.length," model",s.length!==1?"s":""]})]}),jsxRuntime.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-3 mt-4",children:s.map(g=>jsxRuntime.jsx(P,{model:g,onNavigate:o,chatBaseUrl:d,requestAccessUrl:p,featuredIds:c},g.id))})]})}a(F,"ModelFamilySection");function pe({families:e,allModels:s,linkPrefix:o="/docs/models/",chatBaseUrl:d="https://hanzo.chat",requestAccessUrl:p="https://hanzo.ai/contact",featuredIds:c,showAllLabel:t="Show All Models",showCurrentLabel:g="Show Current Only",onNavigate:b}){let[m,y]=react.useState(false),$=navigation.useRouter(),M=new Map(s.map(i=>[i.id,i])),C=a(i=>{b?b(i):$.push(`${o}${i}`);},"handleNavigate"),h=e.map(i=>{let Z=i.models.map(k=>M.get(k)).filter(k=>k!==void 0).filter(k=>m||E(k.status));return {...i,resolvedModels:Z}}).filter(i=>i.resolvedModels.length>0),N=s.filter(i=>E(i.status)).length,S=s.length,l=S-N;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-8",children:[jsxRuntime.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing ",jsxRuntime.jsx("strong",{children:m?S:N})," models",!m&&l>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[" \xB7 ",l," legacy/upcoming hidden"]})]}),jsxRuntime.jsxs("button",{onClick:()=>y(!m),className:"inline-flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-1.5 text-sm font-medium hover:bg-muted transition",children:[jsxRuntime.jsx(lucideReact.Filter,{className:"h-3.5 w-3.5"}),m?g:t]})]}),h.map(i=>jsxRuntime.jsx(F,{family:i,models:i.resolvedModels,onNavigate:C,chatBaseUrl:d,requestAccessUrl:p,featuredIds:c},i.id))]})}a(pe,"ModelLibrary");function me({size:e=64,color:s="#A855F7",animate:o=true,loop:d=false,asLoader:p=false,className:c=""}){let t=Math.random().toString(36).slice(2,7),g=d?"1.35s":"1.25s",b=d?"0.60s":"0.55s",m=d?"infinite":"1",y=p?{animation:`zenEnsoSpin-${t} 1.2s linear infinite`}:{};return jsxRuntime.jsxs("span",{className:`inline-flex items-center justify-center ${c}`,style:{width:e,height:e},"aria-label":"Zen LM",children:[jsxRuntime.jsx("style",{children:`
3
3
  @keyframes zenEnsoDraw-${t} {
4
4
  to { stroke-dashoffset: 0; }
5
5
  }
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import {Zap,Cpu,Atom,Video,Box,Network,Shield,Brain,Mic,Image,Search,Code,Eye,Rocket,Sparkles,ExternalLink,MessageSquare,Github,FileText,Filter}from'lucide-react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useState}from'react';import {useRouter}from'next/navigation';var I=Object.defineProperty;var a=(e,s)=>I(e,"name",{value:s,configurable:true});function q(e){return e?e>=1e6?`${(e/1e6).toFixed(e%1e6===0?0:1)}M ctx`:e>=1e3?`${Math.round(e/1e3)}K ctx`:`${e} ctx`:""}a(q,"fmtCtx");function D(e){switch(e){case "preview":return {label:"PREVIEW",className:"bg-amber-500/20 text-amber-600 dark:text-amber-400"};case "coming-soon":return {label:"SOON",className:"bg-muted text-muted-foreground"};case "contact-sales":return {label:"EARLY ACCESS",className:"bg-purple-500/20 text-purple-600 dark:text-purple-400"};default:return null}}a(D,"statusInfo");function O(e,s){return s?s.includes(e):["zen4-max","zen-max","zen5","zen4"].includes(e)}a(O,"isFeaturedModel");function P({model:e,onNavigate:s,linkPrefix:o="/docs/models/",chatBaseUrl:d="https://hanzo.chat",requestAccessUrl:p="https://hanzo.ai/contact",featuredIds:c}){let t=e.status,g=O(e.id,c),b=D(t),y=[e.spec.params&&e.spec.params!=="N/A"&&e.spec.params!=="TBA"&&e.spec.params!=="TBD"?e.spec.params:null,e.spec.activeParams?`(${e.spec.activeParams} active)`:null,e.spec.arch??null].filter(Boolean).join(" "),$=q(e.spec.context),M=[y,$].filter(Boolean).join(" \xB7 "),C=g?"border-primary/30 bg-primary/5":t==="coming-soon"?"border-border bg-muted/30 opacity-75":t==="contact-sales"?"border-purple-500/20 bg-purple-500/5":"border-border bg-background",h=!!s,N=a(()=>s?.(e.id),"handleClick");return jsxs("div",{role:h?"link":void 0,tabIndex:h?0:void 0,onClick:h?N:void 0,onKeyDown:h?a(l=>{(l.key==="Enter"||l.key===" ")&&N();},"handleKey"):void 0,className:`rounded-lg border p-4 transition hover:border-primary/40 ${C} ${h?"cursor-pointer":""}`,children:[jsxs("div",{className:"flex items-center gap-2 mb-1",children:[jsx("span",{className:"font-semibold text-sm",children:e.id}),b&&jsx("span",{className:`text-[9px] font-semibold tracking-wider uppercase px-1.5 py-0.5 rounded-full ${b.className}`,children:b.label})]}),M&&jsx("div",{className:"text-xs font-mono text-muted-foreground mb-2",children:M}),jsx("p",{className:"text-xs text-muted-foreground mb-3",children:e.description}),jsxs("div",{className:"flex flex-wrap gap-1.5 mt-auto",children:[t==="contact-sales"&&jsxs("a",{href:p,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs bg-purple-500/20 text-purple-400 border border-purple-500/30 px-2 py-0.5 rounded hover:bg-purple-500/30 transition",children:[jsx(ExternalLink,{className:"h-2.5 w-2.5"})," Request Access"]}),(t==="available"||t==="preview"||t==="cloud-only")&&jsxs("a",{href:`${d}?model=${e.id}`,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs bg-primary text-primary-foreground px-2 py-0.5 rounded hover:opacity-90 transition",children:[jsx(MessageSquare,{className:"h-2.5 w-2.5"})," Chat"]}),e.huggingface&&jsxs("a",{href:e.huggingface,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[jsx(ExternalLink,{className:"h-2.5 w-2.5"})," Weights"]}),e.github&&jsxs("a",{href:e.github,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:underline",children:[jsx(Github,{className:"h-2.5 w-2.5"})," Repo"]}),e.paper&&jsxs("a",{href:e.paper,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:underline",children:[jsx(FileText,{className:"h-2.5 w-2.5"})," Paper"]})]})]})}a(P,"ModelCard");function K(e){return e?e>=1e6?`${(e/1e6).toFixed(e%1e6===0?0:1)}M`:e>=1e3?`${Math.round(e/1e3)}K`:`${e}`:"\u2014"}a(K,"fmtCtx");function A(e){return e==null?"\u2014":`$${e.toFixed(2)}`}a(A,"fmtPrice");function W({status:e}){return e==="preview"||e==="coming-soon"?jsx("span",{className:"ml-1 text-[9px] font-semibold tracking-wider uppercase bg-amber-500/20 text-amber-600 dark:text-amber-400 px-1.5 py-0.5 rounded-full align-middle",children:e==="preview"?"PREVIEW":"SOON"}):e==="contact-sales"?jsx("span",{className:"ml-1 text-[9px] font-semibold tracking-wider uppercase bg-purple-500/20 text-purple-600 dark:text-purple-400 px-1.5 py-0.5 rounded-full align-middle",children:"EARLY ACCESS"}):null}a(W,"StatusBadge");function V({models:e,linkPrefix:s="/docs/models/",showParams:o=true,showArch:d=false,showContext:p=true,showPricing:c=true}){return jsx("div",{className:"overflow-x-auto my-4",children:jsxs("table",{className:"w-full text-sm",children:[jsx("thead",{children:jsxs("tr",{className:"border-b border-border text-left",children:[jsx("th",{className:"pb-2 pr-4 font-medium",children:"Model"}),o&&jsx("th",{className:"pb-2 pr-4 font-medium",children:"Parameters"}),d&&jsx("th",{className:"pb-2 pr-4 font-medium",children:"Architecture"}),p&&jsx("th",{className:"pb-2 pr-4 font-medium",children:"Context"}),c&&jsx("th",{className:"pb-2 pr-4 font-medium text-right",children:"Input $/1M"}),c&&jsx("th",{className:"pb-2 font-medium text-right",children:"Output $/1M"})]})}),jsx("tbody",{className:"divide-y divide-border",children:e.map(t=>jsxs("tr",{children:[jsxs("td",{className:"py-2 pr-4",children:[jsx("a",{href:`${s}${t.id}`,className:"font-mono text-primary hover:underline text-sm",children:t.id}),jsx(W,{status:t.status})]}),o&&jsxs("td",{className:"py-2 pr-4 text-sm text-muted-foreground",children:[t.spec.params&&!["N/A","TBA","TBD"].includes(t.spec.params)?t.spec.params:"\u2014",t.spec.activeParams?` (${t.spec.activeParams} active)`:""]}),d&&jsx("td",{className:"py-2 pr-4 text-sm text-muted-foreground",children:t.spec.arch??"\u2014"}),p&&jsx("td",{className:"py-2 pr-4 text-sm text-muted-foreground",children:K(t.spec.context)}),c&&jsx("td",{className:"py-2 pr-4 text-sm text-right font-mono",children:A(t.pricing?.input)}),c&&jsx("td",{className:"py-2 text-sm text-right font-mono",children:A(t.pricing?.output)})]},t.id))})]})})}a(V,"ModelTable");var ce={Sparkles:jsx(Sparkles,{className:"h-5 w-5"}),Rocket:jsx(Rocket,{className:"h-5 w-5"}),Eye:jsx(Eye,{className:"h-5 w-5"}),Code:jsx(Code,{className:"h-5 w-5"}),Search:jsx(Search,{className:"h-5 w-5"}),Image:jsx(Image,{className:"h-5 w-5"}),Mic:jsx(Mic,{className:"h-5 w-5"}),Brain:jsx(Brain,{className:"h-5 w-5"}),Shield:jsx(Shield,{className:"h-5 w-5"}),Network:jsx(Network,{className:"h-5 w-5"}),Box:jsx(Box,{className:"h-5 w-5"}),Video:jsx(Video,{className:"h-5 w-5"}),Atom:jsx(Atom,{className:"h-5 w-5"}),Cpu:jsx(Cpu,{className:"h-5 w-5"}),Zap:jsx(Zap,{className:"h-5 w-5"})};function E(e){return e==="available"||e==="contact-sales"||e==="cloud-only"}a(E,"isActiveStatus");function F({family:e,models:s,onNavigate:o,chatBaseUrl:d,requestAccessUrl:p,featuredIds:c}){let t=(e.icon&&ce[e.icon])??jsx(Atom,{className:"h-5 w-5"});return jsxs("div",{className:"mb-12",children:[jsxs("div",{className:"flex items-center gap-3 mb-2",children:[jsx("div",{className:"rounded-lg bg-muted p-2 text-primary",children:t}),jsxs("div",{children:[jsx("h3",{className:"text-xl font-semibold",children:e.name}),jsx("p",{className:"text-sm text-muted-foreground",children:e.description})]}),jsxs("span",{className:"ml-auto text-xs text-muted-foreground bg-muted px-2 py-1 rounded-full",children:[s.length," model",s.length!==1?"s":""]})]}),jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-3 mt-4",children:s.map(g=>jsx(P,{model:g,onNavigate:o,chatBaseUrl:d,requestAccessUrl:p,featuredIds:c},g.id))})]})}a(F,"ModelFamilySection");function pe({families:e,allModels:s,linkPrefix:o="/docs/models/",chatBaseUrl:d="https://hanzo.chat",requestAccessUrl:p="https://hanzo.ai/contact",featuredIds:c,showAllLabel:t="Show All Models",showCurrentLabel:g="Show Current Only",onNavigate:b}){let[m,y]=useState(false),$=useRouter(),M=new Map(s.map(i=>[i.id,i])),C=a(i=>{b?b(i):$.push(`${o}${i}`);},"handleNavigate"),h=e.map(i=>{let Z=i.models.map(k=>M.get(k)).filter(k=>k!==void 0).filter(k=>m||E(k.status));return {...i,resolvedModels:Z}}).filter(i=>i.resolvedModels.length>0),N=s.filter(i=>E(i.status)).length,S=s.length,l=S-N;return jsxs(Fragment,{children:[jsxs("div",{className:"flex items-center justify-between mb-8",children:[jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing ",jsx("strong",{children:m?S:N})," models",!m&&l>0&&jsxs(Fragment,{children:[" \xB7 ",l," legacy/upcoming hidden"]})]}),jsxs("button",{onClick:()=>y(!m),className:"inline-flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-1.5 text-sm font-medium hover:bg-muted transition",children:[jsx(Filter,{className:"h-3.5 w-3.5"}),m?g:t]})]}),h.map(i=>jsx(F,{family:i,models:i.resolvedModels,onNavigate:C,chatBaseUrl:d,requestAccessUrl:p,featuredIds:c},i.id))]})}a(pe,"ModelLibrary");function me({size:e=64,color:s="#A855F7",animate:o=true,loop:d=false,asLoader:p=false,className:c=""}){let t=Math.random().toString(36).slice(2,7),g=d?"1.35s":"1.25s",b=d?"0.60s":"0.55s",m=d?"infinite":"1",y=p?{animation:`zenEnsoSpin-${t} 1.2s linear infinite`}:{};return jsxs("span",{className:`inline-flex items-center justify-center ${c}`,style:{width:e,height:e},"aria-label":"Zen LM",children:[jsx("style",{children:`
2
+ import {Zap,Cpu,Atom,Video,Box,Network,Shield,Brain,Mic,Image,Search,Code,Eye,Rocket,Sparkles,ExternalLink,MessageSquare,FileText,Filter}from'lucide-react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useState}from'react';import {useRouter}from'next/navigation';var I=Object.defineProperty;var a=(e,s)=>I(e,"name",{value:s,configurable:true});function q(e){return e?e>=1e6?`${(e/1e6).toFixed(e%1e6===0?0:1)}M ctx`:e>=1e3?`${Math.round(e/1e3)}K ctx`:`${e} ctx`:""}a(q,"fmtCtx");function D(e){switch(e){case "preview":return {label:"PREVIEW",className:"bg-amber-500/20 text-amber-600 dark:text-amber-400"};case "coming-soon":return {label:"SOON",className:"bg-muted text-muted-foreground"};case "contact-sales":return {label:"EARLY ACCESS",className:"bg-purple-500/20 text-purple-600 dark:text-purple-400"};default:return null}}a(D,"statusInfo");function O(e,s){return s?s.includes(e):["zen4-max","zen-max","zen5","zen4"].includes(e)}a(O,"isFeaturedModel");function P({model:e,onNavigate:s,linkPrefix:o="/docs/models/",chatBaseUrl:d="https://hanzo.chat",requestAccessUrl:p="https://hanzo.ai/contact",featuredIds:c}){let t=e.status,g=O(e.id,c),b=D(t),y=[e.spec.params&&e.spec.params!=="N/A"&&e.spec.params!=="TBA"&&e.spec.params!=="TBD"?e.spec.params:null,e.spec.activeParams?`(${e.spec.activeParams} active)`:null,e.spec.arch??null].filter(Boolean).join(" "),$=q(e.spec.context),M=[y,$].filter(Boolean).join(" \xB7 "),C=g?"border-primary/30 bg-primary/5":t==="coming-soon"?"border-border bg-muted/30 opacity-75":t==="contact-sales"?"border-purple-500/20 bg-purple-500/5":"border-border bg-background",h=!!s,N=a(()=>s?.(e.id),"handleClick");return jsxs("div",{role:h?"link":void 0,tabIndex:h?0:void 0,onClick:h?N:void 0,onKeyDown:h?a(l=>{(l.key==="Enter"||l.key===" ")&&N();},"handleKey"):void 0,className:`rounded-lg border p-4 transition hover:border-primary/40 ${C} ${h?"cursor-pointer":""}`,children:[jsxs("div",{className:"flex items-center gap-2 mb-1",children:[jsx("span",{className:"font-semibold text-sm",children:e.id}),b&&jsx("span",{className:`text-[9px] font-semibold tracking-wider uppercase px-1.5 py-0.5 rounded-full ${b.className}`,children:b.label})]}),M&&jsx("div",{className:"text-xs font-mono text-muted-foreground mb-2",children:M}),jsx("p",{className:"text-xs text-muted-foreground mb-3",children:e.description}),jsxs("div",{className:"flex flex-wrap gap-1.5 mt-auto",children:[t==="contact-sales"&&jsxs("a",{href:p,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs bg-purple-500/20 text-purple-400 border border-purple-500/30 px-2 py-0.5 rounded hover:bg-purple-500/30 transition",children:[jsx(ExternalLink,{className:"h-2.5 w-2.5"})," Request Access"]}),(t==="available"||t==="preview"||t==="cloud-only")&&jsxs("a",{href:`${d}?model=${e.id}`,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs bg-primary text-primary-foreground px-2 py-0.5 rounded hover:opacity-90 transition",children:[jsx(MessageSquare,{className:"h-2.5 w-2.5"})," Chat"]}),e.huggingface&&jsxs("a",{href:e.huggingface,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[jsx(ExternalLink,{className:"h-2.5 w-2.5"})," Weights"]}),e.github&&jsxs("a",{href:e.github,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:underline",children:[jsx(Code,{className:"h-2.5 w-2.5"})," Repo"]}),e.paper&&jsxs("a",{href:e.paper,target:"_blank",rel:"noopener noreferrer",onClick:l=>{l.stopPropagation();},className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:underline",children:[jsx(FileText,{className:"h-2.5 w-2.5"})," Paper"]})]})]})}a(P,"ModelCard");function K(e){return e?e>=1e6?`${(e/1e6).toFixed(e%1e6===0?0:1)}M`:e>=1e3?`${Math.round(e/1e3)}K`:`${e}`:"\u2014"}a(K,"fmtCtx");function A(e){return e==null?"\u2014":`$${e.toFixed(2)}`}a(A,"fmtPrice");function W({status:e}){return e==="preview"||e==="coming-soon"?jsx("span",{className:"ml-1 text-[9px] font-semibold tracking-wider uppercase bg-amber-500/20 text-amber-600 dark:text-amber-400 px-1.5 py-0.5 rounded-full align-middle",children:e==="preview"?"PREVIEW":"SOON"}):e==="contact-sales"?jsx("span",{className:"ml-1 text-[9px] font-semibold tracking-wider uppercase bg-purple-500/20 text-purple-600 dark:text-purple-400 px-1.5 py-0.5 rounded-full align-middle",children:"EARLY ACCESS"}):null}a(W,"StatusBadge");function V({models:e,linkPrefix:s="/docs/models/",showParams:o=true,showArch:d=false,showContext:p=true,showPricing:c=true}){return jsx("div",{className:"overflow-x-auto my-4",children:jsxs("table",{className:"w-full text-sm",children:[jsx("thead",{children:jsxs("tr",{className:"border-b border-border text-left",children:[jsx("th",{className:"pb-2 pr-4 font-medium",children:"Model"}),o&&jsx("th",{className:"pb-2 pr-4 font-medium",children:"Parameters"}),d&&jsx("th",{className:"pb-2 pr-4 font-medium",children:"Architecture"}),p&&jsx("th",{className:"pb-2 pr-4 font-medium",children:"Context"}),c&&jsx("th",{className:"pb-2 pr-4 font-medium text-right",children:"Input $/1M"}),c&&jsx("th",{className:"pb-2 font-medium text-right",children:"Output $/1M"})]})}),jsx("tbody",{className:"divide-y divide-border",children:e.map(t=>jsxs("tr",{children:[jsxs("td",{className:"py-2 pr-4",children:[jsx("a",{href:`${s}${t.id}`,className:"font-mono text-primary hover:underline text-sm",children:t.id}),jsx(W,{status:t.status})]}),o&&jsxs("td",{className:"py-2 pr-4 text-sm text-muted-foreground",children:[t.spec.params&&!["N/A","TBA","TBD"].includes(t.spec.params)?t.spec.params:"\u2014",t.spec.activeParams?` (${t.spec.activeParams} active)`:""]}),d&&jsx("td",{className:"py-2 pr-4 text-sm text-muted-foreground",children:t.spec.arch??"\u2014"}),p&&jsx("td",{className:"py-2 pr-4 text-sm text-muted-foreground",children:K(t.spec.context)}),c&&jsx("td",{className:"py-2 pr-4 text-sm text-right font-mono",children:A(t.pricing?.input)}),c&&jsx("td",{className:"py-2 text-sm text-right font-mono",children:A(t.pricing?.output)})]},t.id))})]})})}a(V,"ModelTable");var ce={Sparkles:jsx(Sparkles,{className:"h-5 w-5"}),Rocket:jsx(Rocket,{className:"h-5 w-5"}),Eye:jsx(Eye,{className:"h-5 w-5"}),Code:jsx(Code,{className:"h-5 w-5"}),Search:jsx(Search,{className:"h-5 w-5"}),Image:jsx(Image,{className:"h-5 w-5"}),Mic:jsx(Mic,{className:"h-5 w-5"}),Brain:jsx(Brain,{className:"h-5 w-5"}),Shield:jsx(Shield,{className:"h-5 w-5"}),Network:jsx(Network,{className:"h-5 w-5"}),Box:jsx(Box,{className:"h-5 w-5"}),Video:jsx(Video,{className:"h-5 w-5"}),Atom:jsx(Atom,{className:"h-5 w-5"}),Cpu:jsx(Cpu,{className:"h-5 w-5"}),Zap:jsx(Zap,{className:"h-5 w-5"})};function E(e){return e==="available"||e==="contact-sales"||e==="cloud-only"}a(E,"isActiveStatus");function F({family:e,models:s,onNavigate:o,chatBaseUrl:d,requestAccessUrl:p,featuredIds:c}){let t=(e.icon&&ce[e.icon])??jsx(Atom,{className:"h-5 w-5"});return jsxs("div",{className:"mb-12",children:[jsxs("div",{className:"flex items-center gap-3 mb-2",children:[jsx("div",{className:"rounded-lg bg-muted p-2 text-primary",children:t}),jsxs("div",{children:[jsx("h3",{className:"text-xl font-semibold",children:e.name}),jsx("p",{className:"text-sm text-muted-foreground",children:e.description})]}),jsxs("span",{className:"ml-auto text-xs text-muted-foreground bg-muted px-2 py-1 rounded-full",children:[s.length," model",s.length!==1?"s":""]})]}),jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-3 mt-4",children:s.map(g=>jsx(P,{model:g,onNavigate:o,chatBaseUrl:d,requestAccessUrl:p,featuredIds:c},g.id))})]})}a(F,"ModelFamilySection");function pe({families:e,allModels:s,linkPrefix:o="/docs/models/",chatBaseUrl:d="https://hanzo.chat",requestAccessUrl:p="https://hanzo.ai/contact",featuredIds:c,showAllLabel:t="Show All Models",showCurrentLabel:g="Show Current Only",onNavigate:b}){let[m,y]=useState(false),$=useRouter(),M=new Map(s.map(i=>[i.id,i])),C=a(i=>{b?b(i):$.push(`${o}${i}`);},"handleNavigate"),h=e.map(i=>{let Z=i.models.map(k=>M.get(k)).filter(k=>k!==void 0).filter(k=>m||E(k.status));return {...i,resolvedModels:Z}}).filter(i=>i.resolvedModels.length>0),N=s.filter(i=>E(i.status)).length,S=s.length,l=S-N;return jsxs(Fragment,{children:[jsxs("div",{className:"flex items-center justify-between mb-8",children:[jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing ",jsx("strong",{children:m?S:N})," models",!m&&l>0&&jsxs(Fragment,{children:[" \xB7 ",l," legacy/upcoming hidden"]})]}),jsxs("button",{onClick:()=>y(!m),className:"inline-flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-1.5 text-sm font-medium hover:bg-muted transition",children:[jsx(Filter,{className:"h-3.5 w-3.5"}),m?g:t]})]}),h.map(i=>jsx(F,{family:i,models:i.resolvedModels,onNavigate:C,chatBaseUrl:d,requestAccessUrl:p,featuredIds:c},i.id))]})}a(pe,"ModelLibrary");function me({size:e=64,color:s="#A855F7",animate:o=true,loop:d=false,asLoader:p=false,className:c=""}){let t=Math.random().toString(36).slice(2,7),g=d?"1.35s":"1.25s",b=d?"0.60s":"0.55s",m=d?"infinite":"1",y=p?{animation:`zenEnsoSpin-${t} 1.2s linear infinite`}:{};return jsxs("span",{className:`inline-flex items-center justify-center ${c}`,style:{width:e,height:e},"aria-label":"Zen LM",children:[jsx("style",{children:`
3
3
  @keyframes zenEnsoDraw-${t} {
4
4
  to { stroke-dashoffset: 0; }
5
5
  }
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- 'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');var mt=Object.defineProperty;var l=(e,t)=>mt(e,"name",{value:t,configurable:true});function bt({x:e,y:t,onClose:o}){let n=react.useRef(null);react.useEffect(()=>{let p=l(c=>{n.current&&!n.current.contains(c.target)&&o();},"handler"),s=l(c=>{c.key==="Escape"&&o();},"escape");return document.addEventListener("mousedown",p),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",s);}},[o]);let d=[{label:"Brand Guidelines",href:"https://hanzo.ai/brand"},{label:"Press Kit",href:"https://hanzo.ai/press"},{label:"Download Logo",href:"https://hanzo.ai/brand#download"},{label:"Copy SVG",action:"copy-svg"},{label:"hanzo.ai \u2192",href:"https://hanzo.ai"}],r='<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg"><path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/><path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/><path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/><path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/></svg>';return jsxRuntime.jsxs("div",{ref:n,role:"menu",className:"fixed z-[9999] min-w-[180px] rounded-xl border border-white/[0.08] bg-[#111113] py-1.5 shadow-2xl shadow-black/60",style:{top:t,left:e},children:[jsxRuntime.jsx("div",{className:"border-b border-white/[0.06] px-3 pb-2 pt-1",children:jsxRuntime.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-white/30",children:"Hanzo Brand"})}),d.map(p=>p.action==="copy-svg"?jsxRuntime.jsx("button",{type:"button",role:"menuitem",onClick:()=>{navigator.clipboard.writeText(r).catch(()=>{}),o();},className:"flex w-full items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors text-left",children:"Copy SVG"},"copy"):jsxRuntime.jsx("a",{href:p.href,role:"menuitem",target:p.href?.startsWith("https")?"_blank":void 0,rel:"noopener noreferrer",onClick:o,className:"flex items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors",children:p.label},p.label))]})}l(bt,"BrandContextMenu");function j({size:e=22,className:t="",brandMenu:o=true,animate:n=true}){let[d,r]=react.useState(null),[p,s]=react.useState(false),c=react.useCallback(m=>{o&&(m.preventDefault(),r({x:m.clientX,y:m.clientY}));},[o]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("svg",{width:e,height:e,viewBox:"0 0 67 67",xmlns:"http://www.w3.org/2000/svg","aria-label":"Hanzo",className:t,style:n?{transition:"transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease",transform:p?"scale(1.12) perspective(80px) rotateY(-6deg)":"scale(1) perspective(80px) rotateY(0deg)",transformOrigin:"center center"}:{},onMouseEnter:()=>s(true),onMouseLeave:()=>s(false),onContextMenu:c,children:[jsxRuntime.jsx("path",{d:"M22.21 67V44.6369H0V67H22.21Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M0 44.6369L22.21 46.8285V44.6369H0Z",fill:"#DDDDDD"}),jsxRuntime.jsx("path",{d:"M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M22.21 0H0V22.3184H22.21V0Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M66.7198 0H44.5098V22.3184H66.7198V0Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z",fill:"#DDDDDD"}),jsxRuntime.jsx("path",{d:"M66.7198 67V44.6369H44.5098V67H66.7198Z",fill:"#ffffff"})]}),d&&jsxRuntime.jsx(bt,{x:d.x,y:d.y,onClose:()=>r(null)})]})}l(j,"HanzoMark");var U=[{id:"account",label:"Account",href:"https://hanzo.id/account",description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:"https://billing.hanzo.ai",description:"Subscriptions & usage"},{id:"console",label:"Console",href:"https://console.hanzo.ai",description:"API keys & projects"},{id:"chat",label:"Chat",href:"https://hanzo.chat",description:"AI chat & models"},{id:"flow",label:"Flow",href:"https://flow.hanzo.ai",description:"Visual workflow builder"},{id:"bot",label:"Bot",href:"https://hanzo.bot",description:"AI bot platform"},{id:"o11y",label:"O11y",href:"https://o11y.hanzo.ai",description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:"https://sentry.hanzo.ai",description:"Error & crash tracking"},{id:"insights",label:"Insights",href:"https://insights.hanzo.ai",description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:"https://analytics.hanzo.ai",description:"Web analytics"},{id:"platform",label:"Platform",href:"https://platform.hanzo.ai",description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:"https://cloud.hanzo.ai",description:"Cloud infrastructure"},{id:"storage",label:"Storage",href:"https://s3.hanzo.ai",description:"S3 object storage"},{id:"kms",label:"KMS",href:"https://kms.hanzo.ai",description:"Secrets & key management"},{id:"dns",label:"DNS",href:"https://dns.hanzo.ai",description:"DNS management"},{id:"registry",label:"Registry",href:"https://registry.hanzo.ai",description:"Container registry"},{id:"commerce",label:"Commerce",href:"https://commerce.hanzo.ai",description:"Payments & storefront"},{id:"base",label:"Base",href:"https://base.hanzo.ai",description:"Backend-as-a-Service"},{id:"search",label:"Search",href:"https://search.hanzo.ai",description:"Full-text search"},{id:"auto",label:"Auto",href:"https://auto.hanzo.ai",description:"Workflow automation"},{id:"team",label:"Team",href:"https://hanzo.team",description:"Team collaboration"},{id:"sign",label:"Sign",href:"https://sign.hanzo.ai",description:"Document signing"},{id:"dataroom",label:"Dataroom",href:"https://dataroom.hanzo.ai",description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:"https://captable.hanzo.ai",description:"Equity management"},{id:"docs",label:"Docs",href:"https://docs.hanzo.ai",description:"Documentation"},{id:"status",label:"Status",href:"https://status.hanzo.ai",description:"System status"}],A={hanzo:{id:"hanzo",iam:"https://hanzo.id",billing:"https://billing.hanzo.ai",console:"https://console.hanzo.ai",cloud:"https://cloud.hanzo.ai",chat:"https://hanzo.chat",flow:"https://flow.hanzo.ai",bot:"https://hanzo.bot",o11y:"https://o11y.hanzo.ai",sentry:"https://sentry.hanzo.ai",insights:"https://insights.hanzo.ai",analytics:"https://analytics.hanzo.ai",platform:"https://platform.hanzo.ai",storage:"https://s3.hanzo.ai",s3:"https://s3.hanzo.ai",kms:"https://kms.hanzo.ai",dns:"https://dns.hanzo.ai",registry:"https://registry.hanzo.ai",commerce:"https://commerce.hanzo.ai",base:"https://base.hanzo.ai",search:"https://search.hanzo.ai",auto:"https://auto.hanzo.ai",team:"https://hanzo.team",sign:"https://sign.hanzo.ai",dataroom:"https://dataroom.hanzo.ai",captable:"https://captable.hanzo.ai",docs:"https://docs.hanzo.ai",status:"https://status.hanzo.ai"},lux:{id:"lux",iam:"https://lux.id",billing:"https://billing.lux.network",console:"https://console.lux.network",cloud:"https://cloud.lux.network",chat:"https://lux.chat",flow:"https://flow.lux.network",bot:"https://bot.lux.network",o11y:"https://o11y.lux.network",sentry:"https://sentry.lux.network",insights:"https://insights.lux.network",analytics:"https://analytics.lux.network",platform:"https://platform.lux.network",storage:"https://s3.lux.network",s3:"https://s3.lux.network",kms:"https://kms.lux.network",dns:"https://dns.lux.network",registry:"https://registry.lux.network",commerce:"https://commerce.lux.network",base:"https://base.lux.network",search:"https://search.lux.network",auto:"https://auto.lux.network",team:"https://team.lux.network",sign:"https://sign.lux.network",dataroom:"https://dataroom.lux.network",captable:"https://captable.lux.network",docs:"https://docs.lux.network",status:"https://status.lux.network"},zoo:{id:"zoo",iam:"https://zoo.id",billing:"https://billing.zoo.ngo",console:"https://console.zoo.ngo",cloud:"https://cloud.zoo.network",chat:"https://chat.zoo.ngo",flow:"https://flow.zoo.ngo",bot:"https://bot.zoo.ngo",o11y:"https://o11y.zoo.network",sentry:"https://sentry.zoo.network",insights:"https://insights.zoo.ngo",analytics:"https://analytics.zoo.ngo",platform:"https://platform.zoo.ngo",storage:"https://s3.zoo.ngo",s3:"https://s3.zoo.ngo",kms:"https://kms.zoo.network",dns:"https://dns.zoo.ngo",registry:"https://registry.zoo.ngo",commerce:"https://commerce.zoo.ngo",base:"https://base.zoo.ngo",search:"https://search.zoo.ngo",auto:"https://auto.zoo.ngo",team:"https://team.zoo.ngo",sign:"https://sign.zoo.ngo",dataroom:"https://dataroom.zoo.ngo",captable:"https://captable.zoo.ngo",docs:"https://docs.zoo.ngo",status:"https://status.zoo.network"},pars:{id:"pars",iam:"https://pars.id",billing:"https://billing.pars.network",console:"https://console.pars.network",cloud:"https://cloud.pars.network",chat:"https://chat.pars.network",flow:"https://flow.pars.network",bot:"https://bot.pars.network",o11y:"https://o11y.pars.network",sentry:"https://sentry.pars.network",insights:"https://insights.pars.network",analytics:"https://analytics.pars.network",platform:"https://platform.pars.network",storage:"https://s3.pars.network",s3:"https://s3.pars.network",kms:"https://kms.pars.network",dns:"https://dns.pars.network",registry:"https://registry.pars.network",commerce:"https://commerce.pars.network",base:"https://base.pars.network",search:"https://search.pars.network",auto:"https://auto.pars.network",team:"https://team.pars.network",sign:"https://sign.pars.network",dataroom:"https://dataroom.pars.network",captable:"https://captable.pars.network",docs:"https://docs.pars.network",status:"https://status.pars.network"}};function K(e){let t=A[e]||A.hanzo;return [{id:"account",label:"Account",href:`${t.iam}/account`,description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:t.billing,description:"Subscriptions & usage"},{id:"console",label:"Console",href:t.console,description:"API keys & projects"},{id:"chat",label:"Chat",href:t.chat,description:"AI chat & models"},{id:"flow",label:"Flow",href:t.flow,description:"Visual workflow builder"},{id:"bot",label:"Bot",href:t.bot,description:"AI bot platform"},{id:"o11y",label:"O11y",href:t.o11y,description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:t.sentry,description:"Error & crash tracking"},{id:"insights",label:"Insights",href:t.insights,description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:t.analytics,description:"Web analytics"},{id:"platform",label:"Platform",href:t.platform,description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:t.cloud,description:"Cloud infrastructure"},{id:"storage",label:"Storage",href:t.storage,description:"S3 object storage"},{id:"kms",label:"KMS",href:t.kms,description:"Secrets & key management"},{id:"dns",label:"DNS",href:t.dns,description:"DNS management"},{id:"registry",label:"Registry",href:t.registry,description:"Container registry"},{id:"commerce",label:"Commerce",href:t.commerce,description:"Payments & storefront"},{id:"base",label:"Base",href:t.base,description:"Backend-as-a-Service"},{id:"search",label:"Search",href:t.search,description:"Full-text search"},{id:"auto",label:"Auto",href:t.auto,description:"Workflow automation"},{id:"team",label:"Team",href:t.team,description:"Team collaboration"},{id:"sign",label:"Sign",href:t.sign,description:"Document signing"},{id:"dataroom",label:"Dataroom",href:t.dataroom,description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:t.captable,description:"Equity management"},{id:"docs",label:"Docs",href:t.docs,description:"Documentation"},{id:"status",label:"Status",href:t.status,description:"System status"}]}l(K,"getAppsForOrg");var it=[{label:"Core",ids:["account","billing","console"]},{label:"AI",ids:["chat","flow","bot"]},{label:"Observability",ids:["o11y","sentry","insights","analytics"]},{label:"Infrastructure",ids:["platform","cloud","storage","kms","dns","registry"]},{label:"Apps",ids:["commerce","base","search","auto"]},{label:"Business",ids:["team","sign","dataroom","captable"]},{label:"Resources",ids:["docs","status"]}];function W({apps:e=U,currentAppId:t}){let[o,n]=react.useState(false),d=react.useRef(null);react.useEffect(()=>{let s=l(c=>{d.current&&!d.current.contains(c.target)&&n(false);},"handler");return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);let r=e.filter(s=>s.id!==t),p=new Map(r.map(s=>[s.id,s]));return jsxRuntime.jsxs("div",{ref:d,className:"relative",children:[jsxRuntime.jsx("button",{type:"button",onClick:()=>n(s=>!s),className:"flex h-8 w-8 items-center justify-center rounded-lg text-white/40 hover:bg-white/[0.06] hover:text-white/70 transition-colors","aria-label":"Switch app",title:"Switch app",children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[jsxRuntime.jsx("rect",{x:"1",y:"1",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"6",y:"1",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"11",y:"1",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"1",y:"6",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"6",y:"6",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"11",y:"6",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"1",y:"11",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"6",y:"11",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"11",y:"11",width:"4",height:"4",rx:"1"})]})}),o&&jsxRuntime.jsxs("div",{className:"absolute left-0 top-10 z-50 w-72 max-h-[80vh] overflow-y-auto rounded-xl border border-white/[0.08] bg-[#0e0e13] p-2 shadow-2xl",children:[it.map(s=>{let c=s.ids.map(a=>p.get(a)).filter(Boolean);return c.length===0?null:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:s.label}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(a=>jsxRuntime.jsxs("a",{href:a.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>n(false),children:[jsxRuntime.jsx("span",{className:"text-[13px] font-medium text-white/80",children:a.label}),a.description&&jsxRuntime.jsx("span",{className:"text-[11px] leading-tight text-white/30",children:a.description})]},a.id))})]},s.label)}),(()=>{let s=new Set(it.flatMap(a=>a.ids)),c=r.filter(a=>!s.has(a.id));return c.length===0?null:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Other"}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(a=>jsxRuntime.jsxs("a",{href:a.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>n(false),children:[jsxRuntime.jsx("span",{className:"text-[13px] font-medium text-white/80",children:a.label}),a.description&&jsxRuntime.jsx("span",{className:"text-[11px] leading-tight text-white/30",children:a.description})]},a.id))})]})})()]})]})}l(W,"AppSwitcher");var kt=["#0A0310","#49007E","#FF005B","#FF7D10","#FFB238"];function zt(e){let t=0;for(let o=0;o<e.length;o++)t=(t<<5)-t+e.charCodeAt(o)|0;return Math.abs(t)}l(zt,"hashStr");function M(e,t,o){return e%(t*(o+1))%t}l(M,"getUnit");function Nt(e,t){return M(e,2,t)===0}l(Nt,"getBoolean");function lt(e,t,o){return o[M(e,o.length,t)]}l(lt,"getRandomColor");function St(e){let t=parseInt(e.slice(1,3),16),o=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return t*.299+o*.587+n*.114>128?"#000":"#fff"}l(St,"getContrast");function Y({name:e,size:t=40,colors:o=kt,className:n,square:d=false}){let r=zt(e),p=lt(r,0,o),s=St(p),c=Nt(r,2),a=M(r,3,7),m=M(r,5,8),h=M(r,10,9),f=h>6?h-10:h,b=M(r,5,10)>3?M(r,5,10)-5:M(r,5,10);return jsxRuntime.jsxs("svg",{viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,className:n,style:d?void 0:{borderRadius:"50%"},children:[jsxRuntime.jsx("mask",{id:`beam-${r}`,maskUnits:"userSpaceOnUse",x:0,y:0,width:36,height:36,children:jsxRuntime.jsx("rect",{width:36,height:36,rx:d?void 0:72,fill:"#fff"})}),jsxRuntime.jsxs("g",{mask:`url(#beam-${r})`,children:[jsxRuntime.jsx("rect",{width:36,height:36,fill:p}),jsxRuntime.jsx("rect",{x:0,y:0,width:36,height:36,transform:`translate(${f} ${b}) rotate(${h} 18 18)`,fill:lt(r,1,o),rx:6}),jsxRuntime.jsxs("g",{transform:`translate(${f} ${b}) rotate(${h} 18 18)`,children:[c?jsxRuntime.jsx("path",{d:`M15 ${19+a}c2 1 4 1 6 0`,stroke:s,fill:"none",strokeLinecap:"round"}):jsxRuntime.jsx("path",{d:`M13 ${19+a}a1 .75 0 0 0 10 0`,fill:s}),jsxRuntime.jsx("rect",{x:14-m,y:14,width:1.5,height:2,rx:1,fill:s}),jsxRuntime.jsx("rect",{x:20+m,y:14,width:1.5,height:2,rx:1,fill:s})]})]})]})}l(Y,"BeamAvatar");async function At(e){let o=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(n)).map(d=>d.toString(16).padStart(2,"0")).join("")}l(At,"sha256");function Dt(e,t){let[o,n]=react.useState(null);return react.useMemo(()=>{if(!e){n(null);return}let d=e.trim().toLowerCase();At(d).then(r=>{n(`https://www.gravatar.com/avatar/${r}?s=${t||80}&d=404`);});},[e,t]),o}l(Dt,"useGravatarUrl");function Q({src:e,email:t,name:o,size:n=40,colors:d,className:r}){let[p,s]=react.useState(false),[c,a]=react.useState(false),m=Dt(t,n*2),h=`rounded-full object-cover ${r||""}`,f={width:n,height:n};return e&&!p?jsxRuntime.jsx("img",{src:e,alt:o||t||"avatar",className:h,style:f,onError:()=>s(true)}):m&&!c?jsxRuntime.jsx("img",{src:m,alt:o||t||"avatar",className:h,style:f,onError:()=>a(true)}):jsxRuntime.jsx(Y,{name:o||t||"user",size:n,colors:d,className:r})}l(Q,"UserAvatar");function tt({user:e,organizations:t=[],currentOrgId:o,onOrgSwitch:n,onSignOut:d}){let[r,p]=react.useState(false),s=react.useRef(null);if(react.useEffect(()=>{let h=l(f=>{s.current&&!s.current.contains(f.target)&&p(false);},"handler");return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),!e)return null;let c=t.find(h=>h.id===o),a=c?.slug||"hanzo",m=A[a]||A.hanzo;return jsxRuntime.jsxs("div",{ref:s,className:"relative",children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>p(h=>!h),className:"flex items-center gap-2 rounded-lg px-2 py-1.5 hover:bg-white/[0.06] transition-colors",children:[jsxRuntime.jsx(Q,{src:e.avatar,email:e.email,name:e.name,size:28}),jsxRuntime.jsxs("div",{className:"hidden flex-col items-start sm:flex",children:[e.name&&jsxRuntime.jsx("span",{className:"text-[12px] font-medium text-white/70 leading-none",children:e.name}),jsxRuntime.jsx("span",{className:"text-[11px] text-white/30 leading-none mt-0.5",children:e.email})]}),jsxRuntime.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/30 hidden sm:block",children:jsxRuntime.jsx("path",{d:"M6 9l6 6 6-6"})})]}),r&&jsxRuntime.jsxs("div",{className:"absolute right-0 top-10 z-50 w-64 rounded-xl border border-white/[0.08] bg-[#0e0e13] shadow-2xl",children:[jsxRuntime.jsxs("div",{className:"border-b border-white/[0.06] px-4 py-3",children:[jsxRuntime.jsx("p",{className:"text-[13px] font-medium text-white/80",children:e.name||"User"}),jsxRuntime.jsx("p",{className:"text-[11px] text-white/40",children:e.email}),c&&jsxRuntime.jsx("p",{className:"mt-0.5 text-[10px] font-medium text-white/25 uppercase tracking-wider",children:c.name})]}),t.length>0&&jsxRuntime.jsxs("div",{className:"border-b border-white/[0.06] p-2",children:[jsxRuntime.jsx("p",{className:"px-2 pb-1 pt-0.5 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Organizations"}),t.map(h=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>{n?.(h.id),p(false);},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left hover:bg-white/[0.06] transition-colors",children:[jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"text-[13px] text-white/70",children:h.name}),h.role&&jsxRuntime.jsx("span",{className:"text-[10px] text-white/25 capitalize",children:h.role})]}),h.id===o&&jsxRuntime.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/50",children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})})]},h.id))]}),jsxRuntime.jsxs("div",{className:"p-2",children:[jsxRuntime.jsx("a",{href:`${m.iam}/account`,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Account settings"}),jsxRuntime.jsx("a",{href:m.billing,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Billing"}),jsxRuntime.jsx("button",{type:"button",onClick:()=>{p(false),d?.();},className:"flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/40 hover:bg-white/[0.06] hover:text-red-400/70 transition-colors",children:"Sign out"})]})]})]})}l(tt,"UserOrgDropdown");function Et({className:e}){return jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[jsxRuntime.jsx("path",{d:"M21 2v6h-6"}),jsxRuntime.jsx("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),jsxRuntime.jsx("path",{d:"M3 22v-6h6"}),jsxRuntime.jsx("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]})}l(Et,"HardRefreshIcon");function Lt({className:e}){return jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[jsxRuntime.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}l(Lt,"SettingsIcon");async function It(){try{if(localStorage.clear(),sessionStorage.clear(),document.cookie.split(";").forEach(e=>{let t=e.split("=")[0].trim();if(t){document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${location.hostname}`;let o=location.hostname.split(".");if(o.length>2){let n="."+o.slice(-2).join(".");document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${n}`;}}}),"caches"in window){let e=await caches.keys();await Promise.all(e.map(t=>caches.delete(t)));}if("serviceWorker"in navigator){let e=await navigator.serviceWorker.getRegistrations();await Promise.all(e.map(t=>t.unregister()));}if("indexedDB"in window&&indexedDB.databases)try{(await indexedDB.databases()).forEach(t=>{t.name&&indexedDB.deleteDatabase(t.name);});}catch{}}catch{}location.reload();}l(It,"hardRefresh");function Rt({currentApp:e,currentAppId:t,user:o,organizations:n,currentOrgId:d,onOrgSwitch:r,onSignOut:p,apps:s,headerRight:c,settingsHref:a,onSettingsClick:m,hideHardRefresh:h,hideSettings:f}){let[b,P]=react.useState(false),E=n?.find(k=>k.id===d)?.slug||"hanzo",u=s||K(E),S=A[E]||A.hanzo,$=react.useCallback(()=>{P(true),It();},[]),v=react.useCallback(()=>{m?m():window.location.href=a||`${S.iam}/account`;},[m,a,S.iam]);return jsxRuntime.jsxs("header",{className:"sticky top-0 z-50 flex h-14 w-full items-center justify-between border-b border-white/[0.07] bg-[#09090b]/90 px-4 backdrop-blur-xl",role:"banner",children:[jsxRuntime.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[jsxRuntime.jsx("a",{href:`${S.iam}/account`,className:"flex-shrink-0 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Account",children:jsxRuntime.jsx(j,{size:22,brandMenu:true,animate:true})}),jsxRuntime.jsx("span",{className:"select-none text-white/[0.15]",children:"/"}),jsxRuntime.jsx("span",{className:"truncate text-[13px] font-medium text-white/50",children:e}),jsxRuntime.jsx(W,{apps:u,currentAppId:t})]}),jsxRuntime.jsxs("div",{className:"flex flex-shrink-0 items-center gap-1",children:[c,!h&&jsxRuntime.jsx("button",{type:"button",onClick:$,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Hard refresh \u2014 clear all storage, cookies, cache and reload",title:"Hard refresh",children:jsxRuntime.jsx(Et,{className:b?"animate-spin":""})}),!f&&jsxRuntime.jsx("button",{type:"button",onClick:v,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Settings",title:"Settings",children:jsxRuntime.jsx(Lt,{})}),jsxRuntime.jsx(tt,{user:o,organizations:n,currentOrgId:d,onOrgSwitch:r,onSignOut:p})]})]})}l(Rt,"HanzoHeader");var pt="hanzo-auth-token",ot="hanzo-user",dt="hanzo-auth-expires",Ut="https://iam.hanzo.ai",Tt={hanzo:{name:"Hanzo AI",slug:"hanzo"},lux:{name:"Lux Network",slug:"lux"},zoo:{name:"Zoo Labs",slug:"zoo"},pars:{name:"Pars",slug:"pars"}};function Vt(){let[e,t]=react.useState(void 0),[o,n]=react.useState([]),[d,r]=react.useState(void 0),[p,s]=react.useState(null),[c,a]=react.useState(true),m=react.useCallback(async()=>{try{let b=localStorage.getItem(pt),P=localStorage.getItem(dt);if(!b||P&&Date.now()>Number(P)){a(!1);return}s(b);let I=localStorage.getItem(ot);if(I)try{let u=JSON.parse(I);u?.email&&t({id:u.id,name:u.displayName||u.name,email:u.email,avatar:u.avatar});}catch{}let E=await fetch(`${Ut}/api/userinfo`,{headers:{Authorization:`Bearer ${b}`}});if(E.ok){let u=await E.json(),S={id:u.sub||u.id,name:u.name||u.displayName,email:u.email,avatar:u.picture||u.avatar};t(S),localStorage.setItem(ot,JSON.stringify(u));let v=(u.groups||[]).map(k=>{let R=k.toLowerCase().replace(/^\//,""),B=Tt[R];return B?{id:R,name:B.name,slug:B.slug}:null}).filter(Boolean);v.length===0&&S.email&&v.push({id:"personal",name:"Personal",slug:"personal"}),n(v),r(v[0]?.id);}}catch{}finally{a(false);}},[]);react.useEffect(()=>{m();},[m]);let h=react.useCallback(()=>{localStorage.removeItem(pt),localStorage.removeItem(ot),localStorage.removeItem(dt),window.location.href="https://hanzo.id";},[]),f=react.useCallback(b=>{r(b);},[]);return {user:e,organizations:o,currentOrgId:d,token:p,loading:c,signOut:h,switchOrg:f}}l(Vt,"useHanzoAuth");function $t(e,t){return e.filter(o=>o.id!==t).map(o=>({id:`app-${o.id}`,title:o.label,description:o.description,href:o.href,category:"Hanzo Apps",external:true,keywords:[o.id,o.label.toLowerCase()]}))}l($t,"buildCrossAppCommands");function Ft({commands:e=[],apps:t,currentAppId:o,open:n,onOpenChange:d,onNavigate:r}){var nt;let[p,s]=react.useState(false),c=n??p,a=react.useCallback(i=>{d?d(i):s(i);},[d]),[m,h]=react.useState(""),[f,b]=react.useState(0),P=react.useRef(null),I=react.useRef(null),E=$t(t??U,o),u=[...e,...E],S=m.toLowerCase(),$=S?u.filter(i=>i.title.toLowerCase().includes(S)||i.description?.toLowerCase().includes(S)||i.keywords?.some(z=>z.includes(S))):u,v={};for(let i of $)(v[nt=i.category]??(v[nt]=[])).push(i);let k=Object.values(v).flat();react.useEffect(()=>b(0),[m]),react.useEffect(()=>{c&&(h(""),b(0),requestAnimationFrame(()=>P.current?.focus()));},[c]),react.useEffect(()=>{let i=l(z=>{(z.metaKey||z.ctrlKey)&&z.key==="k"&&(z.preventDefault(),a(!c));},"handler");return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[c,a]);let R=react.useCallback(i=>{i.action?i.action():i.href&&(r?r(i.href,i.external):i.external?window.open(i.href,"_blank"):window.location.href=i.href),a(false);},[r,a]),B=react.useCallback(i=>{i.key==="ArrowDown"?(i.preventDefault(),b(z=>(z+1)%(k.length||1))):i.key==="ArrowUp"?(i.preventDefault(),b(z=>(z-1+(k.length||1))%(k.length||1))):i.key==="Enter"&&k[f]?(i.preventDefault(),R(k[f])):i.key==="Escape"&&a(false);},[k,f,R,a]);return react.useEffect(()=>{I.current?.querySelector(`[data-idx="${f}"]`)?.scrollIntoView({block:"nearest"});},[f]),c?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[100]",onClick:()=>a(false)}),jsxRuntime.jsx("div",{className:"fixed top-[15%] left-1/2 -translate-x-1/2 w-full max-w-xl z-[101]",children:jsxRuntime.jsxs("div",{className:"bg-[#111113] border border-white/[0.08] rounded-xl shadow-2xl overflow-hidden",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-white/[0.07]",children:[jsxRuntime.jsx("svg",{className:"w-4 h-4 text-white/30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),jsxRuntime.jsx("input",{ref:P,type:"text",value:m,onChange:i=>h(i.target.value),onKeyDown:B,placeholder:"Search commands...",className:"flex-1 bg-transparent text-white text-[13px] placeholder-white/30 outline-none"}),jsxRuntime.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono bg-white/[0.06] rounded text-white/30",children:"ESC"})]}),jsxRuntime.jsx("div",{ref:I,className:"max-h-[400px] overflow-y-auto py-1",children:k.length===0?jsxRuntime.jsxs("div",{className:"px-4 py-8 text-center text-white/30 text-[13px]",children:["No results for \u201C",m,"\u201D"]}):Object.entries(v).map(([i,z])=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"px-4 py-2 text-[10px] font-semibold text-white/25 uppercase tracking-widest",children:i}),z.map(O=>{let _=k.indexOf(O),Z=_===f;return jsxRuntime.jsxs("button",{"data-idx":_,onClick:()=>R(O),onMouseEnter:()=>b(_),className:`w-full flex items-center gap-3 px-4 py-2 text-left transition-colors ${Z?"bg-white/[0.06] text-white":"text-white/50 hover:bg-white/[0.03]"}`,children:[O.icon&&jsxRuntime.jsx("span",{className:`w-5 h-5 flex items-center justify-center ${Z?"text-white/70":"text-white/25"}`,children:O.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("span",{className:"text-[13px] font-medium truncate block",children:O.title}),O.description&&jsxRuntime.jsx("span",{className:"text-[11px] text-white/25 truncate block",children:O.description})]}),Z&&jsxRuntime.jsx("span",{className:"text-white/25 text-[11px]",children:"\u21B5"})]},O.id)})]},i))}),jsxRuntime.jsxs("div",{className:"px-4 py-2 border-t border-white/[0.07] flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4 text-[10px] text-white/20",children:[jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2191"}),jsxRuntime.jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2193"}),"navigate"]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u21B5"}),"select"]})]}),jsxRuntime.jsx("span",{className:"text-[10px] text-white/20",children:"\u2318K"})]})]})})]}):null}l(Ft,"HanzoCommandPalette");
2
+ 'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');var mt=Object.defineProperty;var l=(e,t)=>mt(e,"name",{value:t,configurable:true});function bt({x:e,y:t,onClose:o}){let n=react.useRef(null);react.useEffect(()=>{let p=l(c=>{n.current&&!n.current.contains(c.target)&&o();},"handler"),s=l(c=>{c.key==="Escape"&&o();},"escape");return document.addEventListener("mousedown",p),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",s);}},[o]);let d=[{label:"Brand Guidelines",href:"https://hanzo.ai/brand"},{label:"Press Kit",href:"https://hanzo.ai/press"},{label:"Download Logo",href:"https://hanzo.ai/brand#download"},{label:"Copy SVG",action:"copy-svg"},{label:"hanzo.ai \u2192",href:"https://hanzo.ai"}],r='<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg"><path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/><path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/><path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/><path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/></svg>';return jsxRuntime.jsxs("div",{ref:n,role:"menu",className:"fixed z-[9999] min-w-[180px] rounded-xl border border-white/[0.08] bg-[#111113] py-1.5 shadow-2xl shadow-black/60",style:{top:t,left:e},children:[jsxRuntime.jsx("div",{className:"border-b border-white/[0.06] px-3 pb-2 pt-1",children:jsxRuntime.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-white/30",children:"Hanzo Brand"})}),d.map(p=>p.action==="copy-svg"?jsxRuntime.jsx("button",{type:"button",role:"menuitem",onClick:()=>{navigator.clipboard.writeText(r).catch(()=>{}),o();},className:"flex w-full items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors text-left",children:"Copy SVG"},"copy"):jsxRuntime.jsx("a",{href:p.href,role:"menuitem",target:p.href?.startsWith("https")?"_blank":void 0,rel:"noopener noreferrer",onClick:o,className:"flex items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors",children:p.label},p.label))]})}l(bt,"BrandContextMenu");function j({size:e=22,className:t="",brandMenu:o=true,animate:n=true}){let[d,r]=react.useState(null),[p,s]=react.useState(false),c=react.useCallback(m=>{o&&(m.preventDefault(),r({x:m.clientX,y:m.clientY}));},[o]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("svg",{width:e,height:e,viewBox:"0 0 67 67",xmlns:"http://www.w3.org/2000/svg","aria-label":"Hanzo",className:t,style:n?{transition:"transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease",transform:p?"scale(1.12) perspective(80px) rotateY(-6deg)":"scale(1) perspective(80px) rotateY(0deg)",transformOrigin:"center center"}:{},onMouseEnter:()=>s(true),onMouseLeave:()=>s(false),onContextMenu:c,children:[jsxRuntime.jsx("path",{d:"M22.21 67V44.6369H0V67H22.21Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M0 44.6369L22.21 46.8285V44.6369H0Z",fill:"#DDDDDD"}),jsxRuntime.jsx("path",{d:"M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M22.21 0H0V22.3184H22.21V0Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M66.7198 0H44.5098V22.3184H66.7198V0Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z",fill:"#DDDDDD"}),jsxRuntime.jsx("path",{d:"M66.7198 67V44.6369H44.5098V67H66.7198Z",fill:"#ffffff"})]}),d&&jsxRuntime.jsx(bt,{x:d.x,y:d.y,onClose:()=>r(null)})]})}l(j,"HanzoMark");var U=[{id:"account",label:"Account",href:"https://hanzo.id/account",description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:"https://billing.hanzo.ai",description:"Subscriptions & usage"},{id:"console",label:"Console",href:"https://console.hanzo.ai",description:"API keys & projects"},{id:"chat",label:"Chat",href:"https://hanzo.chat",description:"AI chat & models"},{id:"flow",label:"Flow",href:"https://flow.hanzo.ai",description:"Visual workflow builder"},{id:"bot",label:"Bot",href:"https://hanzo.bot",description:"AI bot platform"},{id:"o11y",label:"O11y",href:"https://o11y.hanzo.ai",description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:"https://sentry.hanzo.ai",description:"Error & crash tracking"},{id:"insights",label:"Insights",href:"https://insights.hanzo.ai",description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:"https://analytics.hanzo.ai",description:"Web analytics"},{id:"platform",label:"Platform",href:"https://platform.hanzo.ai",description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:"https://cloud.hanzo.ai",description:"Cloud infrastructure"},{id:"web3",label:"Web3",href:"https://web3.hanzo.ai",description:"Deploy & manage blockchain validators across Bitcoin, Ethereum, Solana, Lux, and any Lux-derived L1"},{id:"storage",label:"Storage",href:"https://s3.hanzo.ai",description:"S3 object storage"},{id:"kms",label:"KMS",href:"https://kms.hanzo.ai",description:"Secrets & key management"},{id:"dns",label:"DNS",href:"https://dns.hanzo.ai",description:"DNS management"},{id:"registry",label:"Registry",href:"https://registry.hanzo.ai",description:"Container registry"},{id:"commerce",label:"Commerce",href:"https://commerce.hanzo.ai",description:"Payments & storefront"},{id:"base",label:"Base",href:"https://base.hanzo.ai",description:"Backend-as-a-Service"},{id:"search",label:"Search",href:"https://search.hanzo.ai",description:"Full-text search"},{id:"auto",label:"Auto",href:"https://auto.hanzo.ai",description:"Workflow automation"},{id:"team",label:"Team",href:"https://hanzo.team",description:"Team collaboration"},{id:"sign",label:"Sign",href:"https://sign.hanzo.ai",description:"Document signing"},{id:"dataroom",label:"Dataroom",href:"https://dataroom.hanzo.ai",description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:"https://captable.hanzo.ai",description:"Equity management"},{id:"docs",label:"Docs",href:"https://docs.hanzo.ai",description:"Documentation"},{id:"status",label:"Status",href:"https://status.hanzo.ai",description:"System status"}],A={hanzo:{id:"hanzo",iam:"https://hanzo.id",billing:"https://billing.hanzo.ai",console:"https://console.hanzo.ai",cloud:"https://cloud.hanzo.ai",web3:"https://web3.hanzo.ai",chat:"https://hanzo.chat",flow:"https://flow.hanzo.ai",bot:"https://hanzo.bot",o11y:"https://o11y.hanzo.ai",sentry:"https://sentry.hanzo.ai",insights:"https://insights.hanzo.ai",analytics:"https://analytics.hanzo.ai",platform:"https://platform.hanzo.ai",storage:"https://s3.hanzo.ai",s3:"https://s3.hanzo.ai",kms:"https://kms.hanzo.ai",dns:"https://dns.hanzo.ai",registry:"https://registry.hanzo.ai",commerce:"https://commerce.hanzo.ai",base:"https://base.hanzo.ai",search:"https://search.hanzo.ai",auto:"https://auto.hanzo.ai",team:"https://hanzo.team",sign:"https://sign.hanzo.ai",dataroom:"https://dataroom.hanzo.ai",captable:"https://captable.hanzo.ai",docs:"https://docs.hanzo.ai",status:"https://status.hanzo.ai"},lux:{id:"lux",iam:"https://lux.id",billing:"https://billing.lux.network",console:"https://console.lux.network",cloud:"https://cloud.lux.network",web3:"https://web3.lux.network",chat:"https://lux.chat",flow:"https://flow.lux.network",bot:"https://bot.lux.network",o11y:"https://o11y.lux.network",sentry:"https://sentry.lux.network",insights:"https://insights.lux.network",analytics:"https://analytics.lux.network",platform:"https://platform.lux.network",storage:"https://s3.lux.network",s3:"https://s3.lux.network",kms:"https://kms.lux.network",dns:"https://dns.lux.network",registry:"https://registry.lux.network",commerce:"https://commerce.lux.network",base:"https://base.lux.network",search:"https://search.lux.network",auto:"https://auto.lux.network",team:"https://team.lux.network",sign:"https://sign.lux.network",dataroom:"https://dataroom.lux.network",captable:"https://captable.lux.network",docs:"https://docs.lux.network",status:"https://status.lux.network"},zoo:{id:"zoo",iam:"https://zoo.id",billing:"https://billing.zoo.ngo",console:"https://console.zoo.ngo",cloud:"https://cloud.zoo.network",web3:"https://web3.zoo.ngo",chat:"https://chat.zoo.ngo",flow:"https://flow.zoo.ngo",bot:"https://bot.zoo.ngo",o11y:"https://o11y.zoo.network",sentry:"https://sentry.zoo.network",insights:"https://insights.zoo.ngo",analytics:"https://analytics.zoo.ngo",platform:"https://platform.zoo.ngo",storage:"https://s3.zoo.ngo",s3:"https://s3.zoo.ngo",kms:"https://kms.zoo.network",dns:"https://dns.zoo.ngo",registry:"https://registry.zoo.ngo",commerce:"https://commerce.zoo.ngo",base:"https://base.zoo.ngo",search:"https://search.zoo.ngo",auto:"https://auto.zoo.ngo",team:"https://team.zoo.ngo",sign:"https://sign.zoo.ngo",dataroom:"https://dataroom.zoo.ngo",captable:"https://captable.zoo.ngo",docs:"https://docs.zoo.ngo",status:"https://status.zoo.network"},pars:{id:"pars",iam:"https://pars.id",billing:"https://billing.pars.network",console:"https://console.pars.network",cloud:"https://cloud.pars.network",web3:"https://web3.pars.network",chat:"https://chat.pars.network",flow:"https://flow.pars.network",bot:"https://bot.pars.network",o11y:"https://o11y.pars.network",sentry:"https://sentry.pars.network",insights:"https://insights.pars.network",analytics:"https://analytics.pars.network",platform:"https://platform.pars.network",storage:"https://s3.pars.network",s3:"https://s3.pars.network",kms:"https://kms.pars.network",dns:"https://dns.pars.network",registry:"https://registry.pars.network",commerce:"https://commerce.pars.network",base:"https://base.pars.network",search:"https://search.pars.network",auto:"https://auto.pars.network",team:"https://team.pars.network",sign:"https://sign.pars.network",dataroom:"https://dataroom.pars.network",captable:"https://captable.pars.network",docs:"https://docs.pars.network",status:"https://status.pars.network"}};function K(e){let t=A[e]||A.hanzo;return [{id:"account",label:"Account",href:`${t.iam}/account`,description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:t.billing,description:"Subscriptions & usage"},{id:"console",label:"Console",href:t.console,description:"API keys & projects"},{id:"chat",label:"Chat",href:t.chat,description:"AI chat & models"},{id:"flow",label:"Flow",href:t.flow,description:"Visual workflow builder"},{id:"bot",label:"Bot",href:t.bot,description:"AI bot platform"},{id:"o11y",label:"O11y",href:t.o11y,description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:t.sentry,description:"Error & crash tracking"},{id:"insights",label:"Insights",href:t.insights,description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:t.analytics,description:"Web analytics"},{id:"platform",label:"Platform",href:t.platform,description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:t.cloud,description:"Cloud infrastructure"},{id:"web3",label:"Web3",href:t.web3,description:"Deploy & manage blockchain validators across Bitcoin, Ethereum, Solana, Lux, and any Lux-derived L1"},{id:"storage",label:"Storage",href:t.storage,description:"S3 object storage"},{id:"kms",label:"KMS",href:t.kms,description:"Secrets & key management"},{id:"dns",label:"DNS",href:t.dns,description:"DNS management"},{id:"registry",label:"Registry",href:t.registry,description:"Container registry"},{id:"commerce",label:"Commerce",href:t.commerce,description:"Payments & storefront"},{id:"base",label:"Base",href:t.base,description:"Backend-as-a-Service"},{id:"search",label:"Search",href:t.search,description:"Full-text search"},{id:"auto",label:"Auto",href:t.auto,description:"Workflow automation"},{id:"team",label:"Team",href:t.team,description:"Team collaboration"},{id:"sign",label:"Sign",href:t.sign,description:"Document signing"},{id:"dataroom",label:"Dataroom",href:t.dataroom,description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:t.captable,description:"Equity management"},{id:"docs",label:"Docs",href:t.docs,description:"Documentation"},{id:"status",label:"Status",href:t.status,description:"System status"}]}l(K,"getAppsForOrg");var it=[{label:"Core",ids:["account","billing","console"]},{label:"AI",ids:["chat","flow","bot"]},{label:"Observability",ids:["o11y","sentry","insights","analytics"]},{label:"Infrastructure",ids:["platform","cloud","web3","storage","kms","dns","registry"]},{label:"Apps",ids:["commerce","base","search","auto"]},{label:"Business",ids:["team","sign","dataroom","captable"]},{label:"Resources",ids:["docs","status"]}];function W({apps:e=U,currentAppId:t}){let[o,n]=react.useState(false),d=react.useRef(null);react.useEffect(()=>{let s=l(c=>{d.current&&!d.current.contains(c.target)&&n(false);},"handler");return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);let r=e.filter(s=>s.id!==t),p=new Map(r.map(s=>[s.id,s]));return jsxRuntime.jsxs("div",{ref:d,className:"relative",children:[jsxRuntime.jsx("button",{type:"button",onClick:()=>n(s=>!s),className:"flex h-8 w-8 items-center justify-center rounded-lg text-white/40 hover:bg-white/[0.06] hover:text-white/70 transition-colors","aria-label":"Switch app",title:"Switch app",children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[jsxRuntime.jsx("rect",{x:"1",y:"1",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"6",y:"1",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"11",y:"1",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"1",y:"6",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"6",y:"6",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"11",y:"6",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"1",y:"11",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"6",y:"11",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"11",y:"11",width:"4",height:"4",rx:"1"})]})}),o&&jsxRuntime.jsxs("div",{className:"absolute left-0 top-10 z-50 w-72 max-h-[80vh] overflow-y-auto rounded-xl border border-white/[0.08] bg-[#0e0e13] p-2 shadow-2xl",children:[it.map(s=>{let c=s.ids.map(a=>p.get(a)).filter(Boolean);return c.length===0?null:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:s.label}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(a=>jsxRuntime.jsxs("a",{href:a.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>n(false),children:[jsxRuntime.jsx("span",{className:"text-[13px] font-medium text-white/80",children:a.label}),a.description&&jsxRuntime.jsx("span",{className:"text-[11px] leading-tight text-white/30",children:a.description})]},a.id))})]},s.label)}),(()=>{let s=new Set(it.flatMap(a=>a.ids)),c=r.filter(a=>!s.has(a.id));return c.length===0?null:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Other"}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(a=>jsxRuntime.jsxs("a",{href:a.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>n(false),children:[jsxRuntime.jsx("span",{className:"text-[13px] font-medium text-white/80",children:a.label}),a.description&&jsxRuntime.jsx("span",{className:"text-[11px] leading-tight text-white/30",children:a.description})]},a.id))})]})})()]})]})}l(W,"AppSwitcher");var kt=["#0A0310","#49007E","#FF005B","#FF7D10","#FFB238"];function zt(e){let t=0;for(let o=0;o<e.length;o++)t=(t<<5)-t+e.charCodeAt(o)|0;return Math.abs(t)}l(zt,"hashStr");function M(e,t,o){return e%(t*(o+1))%t}l(M,"getUnit");function Nt(e,t){return M(e,2,t)===0}l(Nt,"getBoolean");function lt(e,t,o){return o[M(e,o.length,t)]}l(lt,"getRandomColor");function St(e){let t=parseInt(e.slice(1,3),16),o=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return t*.299+o*.587+n*.114>128?"#000":"#fff"}l(St,"getContrast");function Y({name:e,size:t=40,colors:o=kt,className:n,square:d=false}){let r=zt(e),p=lt(r,0,o),s=St(p),c=Nt(r,2),a=M(r,3,7),m=M(r,5,8),h=M(r,10,9),f=h>6?h-10:h,b=M(r,5,10)>3?M(r,5,10)-5:M(r,5,10);return jsxRuntime.jsxs("svg",{viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,className:n,style:d?void 0:{borderRadius:"50%"},children:[jsxRuntime.jsx("mask",{id:`beam-${r}`,maskUnits:"userSpaceOnUse",x:0,y:0,width:36,height:36,children:jsxRuntime.jsx("rect",{width:36,height:36,rx:d?void 0:72,fill:"#fff"})}),jsxRuntime.jsxs("g",{mask:`url(#beam-${r})`,children:[jsxRuntime.jsx("rect",{width:36,height:36,fill:p}),jsxRuntime.jsx("rect",{x:0,y:0,width:36,height:36,transform:`translate(${f} ${b}) rotate(${h} 18 18)`,fill:lt(r,1,o),rx:6}),jsxRuntime.jsxs("g",{transform:`translate(${f} ${b}) rotate(${h} 18 18)`,children:[c?jsxRuntime.jsx("path",{d:`M15 ${19+a}c2 1 4 1 6 0`,stroke:s,fill:"none",strokeLinecap:"round"}):jsxRuntime.jsx("path",{d:`M13 ${19+a}a1 .75 0 0 0 10 0`,fill:s}),jsxRuntime.jsx("rect",{x:14-m,y:14,width:1.5,height:2,rx:1,fill:s}),jsxRuntime.jsx("rect",{x:20+m,y:14,width:1.5,height:2,rx:1,fill:s})]})]})]})}l(Y,"BeamAvatar");async function At(e){let o=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(n)).map(d=>d.toString(16).padStart(2,"0")).join("")}l(At,"sha256");function Dt(e,t){let[o,n]=react.useState(null);return react.useMemo(()=>{if(!e){n(null);return}let d=e.trim().toLowerCase();At(d).then(r=>{n(`https://www.gravatar.com/avatar/${r}?s=${t||80}&d=404`);});},[e,t]),o}l(Dt,"useGravatarUrl");function Q({src:e,email:t,name:o,size:n=40,colors:d,className:r}){let[p,s]=react.useState(false),[c,a]=react.useState(false),m=Dt(t,n*2),h=`rounded-full object-cover ${r||""}`,f={width:n,height:n};return e&&!p?jsxRuntime.jsx("img",{src:e,alt:o||t||"avatar",className:h,style:f,onError:()=>s(true)}):m&&!c?jsxRuntime.jsx("img",{src:m,alt:o||t||"avatar",className:h,style:f,onError:()=>a(true)}):jsxRuntime.jsx(Y,{name:o||t||"user",size:n,colors:d,className:r})}l(Q,"UserAvatar");function tt({user:e,organizations:t=[],currentOrgId:o,onOrgSwitch:n,onSignOut:d}){let[r,p]=react.useState(false),s=react.useRef(null);if(react.useEffect(()=>{let h=l(f=>{s.current&&!s.current.contains(f.target)&&p(false);},"handler");return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),!e)return null;let c=t.find(h=>h.id===o),a=c?.slug||"hanzo",m=A[a]||A.hanzo;return jsxRuntime.jsxs("div",{ref:s,className:"relative",children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>p(h=>!h),className:"flex items-center gap-2 rounded-lg px-2 py-1.5 hover:bg-white/[0.06] transition-colors",children:[jsxRuntime.jsx(Q,{src:e.avatar,email:e.email,name:e.name,size:28}),jsxRuntime.jsxs("div",{className:"hidden flex-col items-start sm:flex",children:[e.name&&jsxRuntime.jsx("span",{className:"text-[12px] font-medium text-white/70 leading-none",children:e.name}),jsxRuntime.jsx("span",{className:"text-[11px] text-white/30 leading-none mt-0.5",children:e.email})]}),jsxRuntime.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/30 hidden sm:block",children:jsxRuntime.jsx("path",{d:"M6 9l6 6 6-6"})})]}),r&&jsxRuntime.jsxs("div",{className:"absolute right-0 top-10 z-50 w-64 rounded-xl border border-white/[0.08] bg-[#0e0e13] shadow-2xl",children:[jsxRuntime.jsxs("div",{className:"border-b border-white/[0.06] px-4 py-3",children:[jsxRuntime.jsx("p",{className:"text-[13px] font-medium text-white/80",children:e.name||"User"}),jsxRuntime.jsx("p",{className:"text-[11px] text-white/40",children:e.email}),c&&jsxRuntime.jsx("p",{className:"mt-0.5 text-[10px] font-medium text-white/25 uppercase tracking-wider",children:c.name})]}),t.length>0&&jsxRuntime.jsxs("div",{className:"border-b border-white/[0.06] p-2",children:[jsxRuntime.jsx("p",{className:"px-2 pb-1 pt-0.5 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Organizations"}),t.map(h=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>{n?.(h.id),p(false);},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left hover:bg-white/[0.06] transition-colors",children:[jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"text-[13px] text-white/70",children:h.name}),h.role&&jsxRuntime.jsx("span",{className:"text-[10px] text-white/25 capitalize",children:h.role})]}),h.id===o&&jsxRuntime.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/50",children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})})]},h.id))]}),jsxRuntime.jsxs("div",{className:"p-2",children:[jsxRuntime.jsx("a",{href:`${m.iam}/account`,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Account settings"}),jsxRuntime.jsx("a",{href:m.billing,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Billing"}),jsxRuntime.jsx("button",{type:"button",onClick:()=>{p(false),d?.();},className:"flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/40 hover:bg-white/[0.06] hover:text-red-400/70 transition-colors",children:"Sign out"})]})]})]})}l(tt,"UserOrgDropdown");function Lt({className:e}){return jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[jsxRuntime.jsx("path",{d:"M21 2v6h-6"}),jsxRuntime.jsx("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),jsxRuntime.jsx("path",{d:"M3 22v-6h6"}),jsxRuntime.jsx("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]})}l(Lt,"HardRefreshIcon");function Et({className:e}){return jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[jsxRuntime.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}l(Et,"SettingsIcon");async function It(){try{if(localStorage.clear(),sessionStorage.clear(),document.cookie.split(";").forEach(e=>{let t=e.split("=")[0].trim();if(t){document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${location.hostname}`;let o=location.hostname.split(".");if(o.length>2){let n="."+o.slice(-2).join(".");document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${n}`;}}}),"caches"in window){let e=await caches.keys();await Promise.all(e.map(t=>caches.delete(t)));}if("serviceWorker"in navigator){let e=await navigator.serviceWorker.getRegistrations();await Promise.all(e.map(t=>t.unregister()));}if("indexedDB"in window&&indexedDB.databases)try{(await indexedDB.databases()).forEach(t=>{t.name&&indexedDB.deleteDatabase(t.name);});}catch{}}catch{}location.reload();}l(It,"hardRefresh");function Rt({currentApp:e,currentAppId:t,user:o,organizations:n,currentOrgId:d,onOrgSwitch:r,onSignOut:p,apps:s,headerRight:c,settingsHref:a,onSettingsClick:m,hideHardRefresh:h,hideSettings:f}){let[b,P]=react.useState(false),L=n?.find(k=>k.id===d)?.slug||"hanzo",u=s||K(L),S=A[L]||A.hanzo,$=react.useCallback(()=>{P(true),It();},[]),v=react.useCallback(()=>{m?m():window.location.href=a||`${S.iam}/account`;},[m,a,S.iam]);return jsxRuntime.jsxs("header",{className:"sticky top-0 z-50 flex h-14 w-full items-center justify-between border-b border-white/[0.07] bg-[#09090b]/90 px-4 backdrop-blur-xl",role:"banner",children:[jsxRuntime.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[jsxRuntime.jsx("a",{href:`${S.iam}/account`,className:"flex-shrink-0 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Account",children:jsxRuntime.jsx(j,{size:22,brandMenu:true,animate:true})}),jsxRuntime.jsx("span",{className:"select-none text-white/[0.15]",children:"/"}),jsxRuntime.jsx("span",{className:"truncate text-[13px] font-medium text-white/50",children:e}),jsxRuntime.jsx(W,{apps:u,currentAppId:t})]}),jsxRuntime.jsxs("div",{className:"flex flex-shrink-0 items-center gap-1",children:[c,!h&&jsxRuntime.jsx("button",{type:"button",onClick:$,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Hard refresh \u2014 clear all storage, cookies, cache and reload",title:"Hard refresh",children:jsxRuntime.jsx(Lt,{className:b?"animate-spin":""})}),!f&&jsxRuntime.jsx("button",{type:"button",onClick:v,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Settings",title:"Settings",children:jsxRuntime.jsx(Et,{})}),jsxRuntime.jsx(tt,{user:o,organizations:n,currentOrgId:d,onOrgSwitch:r,onSignOut:p})]})]})}l(Rt,"HanzoHeader");var pt="hanzo-auth-token",ot="hanzo-user",dt="hanzo-auth-expires",Ut="https://iam.hanzo.ai",Tt={hanzo:{name:"Hanzo AI",slug:"hanzo"},lux:{name:"Lux Network",slug:"lux"},zoo:{name:"Zoo Labs",slug:"zoo"},pars:{name:"Pars",slug:"pars"}};function Vt(){let[e,t]=react.useState(void 0),[o,n]=react.useState([]),[d,r]=react.useState(void 0),[p,s]=react.useState(null),[c,a]=react.useState(true),m=react.useCallback(async()=>{try{let b=localStorage.getItem(pt),P=localStorage.getItem(dt);if(!b||P&&Date.now()>Number(P)){a(!1);return}s(b);let I=localStorage.getItem(ot);if(I)try{let u=JSON.parse(I);u?.email&&t({id:u.id,name:u.displayName||u.name,email:u.email,avatar:u.avatar});}catch{}let L=await fetch(`${Ut}/v1/iam/oauth/userinfo`,{headers:{Authorization:`Bearer ${b}`}});if(L.ok){let u=await L.json(),S={id:u.sub||u.id,name:u.name||u.displayName,email:u.email,avatar:u.picture||u.avatar};t(S),localStorage.setItem(ot,JSON.stringify(u));let v=(u.groups||[]).map(k=>{let R=k.toLowerCase().replace(/^\//,""),B=Tt[R];return B?{id:R,name:B.name,slug:B.slug}:null}).filter(Boolean);v.length===0&&S.email&&v.push({id:"personal",name:"Personal",slug:"personal"}),n(v),r(v[0]?.id);}}catch{}finally{a(false);}},[]);react.useEffect(()=>{m();},[m]);let h=react.useCallback(()=>{localStorage.removeItem(pt),localStorage.removeItem(ot),localStorage.removeItem(dt),window.location.href="https://hanzo.id";},[]),f=react.useCallback(b=>{r(b);},[]);return {user:e,organizations:o,currentOrgId:d,token:p,loading:c,signOut:h,switchOrg:f}}l(Vt,"useHanzoAuth");function $t(e,t){return e.filter(o=>o.id!==t).map(o=>({id:`app-${o.id}`,title:o.label,description:o.description,href:o.href,category:"Hanzo Apps",external:true,keywords:[o.id,o.label.toLowerCase()]}))}l($t,"buildCrossAppCommands");function Ft({commands:e=[],apps:t,currentAppId:o,open:n,onOpenChange:d,onNavigate:r}){var nt;let[p,s]=react.useState(false),c=n??p,a=react.useCallback(i=>{d?d(i):s(i);},[d]),[m,h]=react.useState(""),[f,b]=react.useState(0),P=react.useRef(null),I=react.useRef(null),L=$t(t??U,o),u=[...e,...L],S=m.toLowerCase(),$=S?u.filter(i=>i.title.toLowerCase().includes(S)||i.description?.toLowerCase().includes(S)||i.keywords?.some(z=>z.includes(S))):u,v={};for(let i of $)(v[nt=i.category]??(v[nt]=[])).push(i);let k=Object.values(v).flat();react.useEffect(()=>b(0),[m]),react.useEffect(()=>{c&&(h(""),b(0),requestAnimationFrame(()=>P.current?.focus()));},[c]),react.useEffect(()=>{let i=l(z=>{(z.metaKey||z.ctrlKey)&&z.key==="k"&&(z.preventDefault(),a(!c));},"handler");return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[c,a]);let R=react.useCallback(i=>{i.action?i.action():i.href&&(r?r(i.href,i.external):i.external?window.open(i.href,"_blank"):window.location.href=i.href),a(false);},[r,a]),B=react.useCallback(i=>{i.key==="ArrowDown"?(i.preventDefault(),b(z=>(z+1)%(k.length||1))):i.key==="ArrowUp"?(i.preventDefault(),b(z=>(z-1+(k.length||1))%(k.length||1))):i.key==="Enter"&&k[f]?(i.preventDefault(),R(k[f])):i.key==="Escape"&&a(false);},[k,f,R,a]);return react.useEffect(()=>{I.current?.querySelector(`[data-idx="${f}"]`)?.scrollIntoView({block:"nearest"});},[f]),c?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[100]",onClick:()=>a(false)}),jsxRuntime.jsx("div",{className:"fixed top-[15%] left-1/2 -translate-x-1/2 w-full max-w-xl z-[101]",children:jsxRuntime.jsxs("div",{className:"bg-[#111113] border border-white/[0.08] rounded-xl shadow-2xl overflow-hidden",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-white/[0.07]",children:[jsxRuntime.jsx("svg",{className:"w-4 h-4 text-white/30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),jsxRuntime.jsx("input",{ref:P,type:"text",value:m,onChange:i=>h(i.target.value),onKeyDown:B,placeholder:"Search commands...",className:"flex-1 bg-transparent text-white text-[13px] placeholder-white/30 outline-none"}),jsxRuntime.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono bg-white/[0.06] rounded text-white/30",children:"ESC"})]}),jsxRuntime.jsx("div",{ref:I,className:"max-h-[400px] overflow-y-auto py-1",children:k.length===0?jsxRuntime.jsxs("div",{className:"px-4 py-8 text-center text-white/30 text-[13px]",children:["No results for \u201C",m,"\u201D"]}):Object.entries(v).map(([i,z])=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"px-4 py-2 text-[10px] font-semibold text-white/25 uppercase tracking-widest",children:i}),z.map(O=>{let _=k.indexOf(O),Z=_===f;return jsxRuntime.jsxs("button",{"data-idx":_,onClick:()=>R(O),onMouseEnter:()=>b(_),className:`w-full flex items-center gap-3 px-4 py-2 text-left transition-colors ${Z?"bg-white/[0.06] text-white":"text-white/50 hover:bg-white/[0.03]"}`,children:[O.icon&&jsxRuntime.jsx("span",{className:`w-5 h-5 flex items-center justify-center ${Z?"text-white/70":"text-white/25"}`,children:O.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("span",{className:"text-[13px] font-medium truncate block",children:O.title}),O.description&&jsxRuntime.jsx("span",{className:"text-[11px] text-white/25 truncate block",children:O.description})]}),Z&&jsxRuntime.jsx("span",{className:"text-white/25 text-[11px]",children:"\u21B5"})]},O.id)})]},i))}),jsxRuntime.jsxs("div",{className:"px-4 py-2 border-t border-white/[0.07] flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4 text-[10px] text-white/20",children:[jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2191"}),jsxRuntime.jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2193"}),"navigate"]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u21B5"}),"select"]})]}),jsxRuntime.jsx("span",{className:"text-[10px] text-white/20",children:"\u2318K"})]})]})})]}):null}l(Ft,"HanzoCommandPalette");
3
3
  exports.AppSwitcher=W;exports.BeamAvatar=Y;exports.DEFAULT_HANZO_APPS=U;exports.HanzoCommandPalette=Ft;exports.HanzoHeader=Rt;exports.HanzoMark=j;exports.ORG_DOMAINS=A;exports.UserAvatar=Q;exports.UserOrgDropdown=tt;exports.getAppsForOrg=K;exports.useHanzoAuth=Vt;
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import {useState,useCallback,useRef,useEffect,useMemo}from'react';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var mt=Object.defineProperty;var l=(e,t)=>mt(e,"name",{value:t,configurable:true});function bt({x:e,y:t,onClose:o}){let n=useRef(null);useEffect(()=>{let p=l(c=>{n.current&&!n.current.contains(c.target)&&o();},"handler"),s=l(c=>{c.key==="Escape"&&o();},"escape");return document.addEventListener("mousedown",p),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",s);}},[o]);let d=[{label:"Brand Guidelines",href:"https://hanzo.ai/brand"},{label:"Press Kit",href:"https://hanzo.ai/press"},{label:"Download Logo",href:"https://hanzo.ai/brand#download"},{label:"Copy SVG",action:"copy-svg"},{label:"hanzo.ai \u2192",href:"https://hanzo.ai"}],r='<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg"><path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/><path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/><path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/><path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/></svg>';return jsxs("div",{ref:n,role:"menu",className:"fixed z-[9999] min-w-[180px] rounded-xl border border-white/[0.08] bg-[#111113] py-1.5 shadow-2xl shadow-black/60",style:{top:t,left:e},children:[jsx("div",{className:"border-b border-white/[0.06] px-3 pb-2 pt-1",children:jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-white/30",children:"Hanzo Brand"})}),d.map(p=>p.action==="copy-svg"?jsx("button",{type:"button",role:"menuitem",onClick:()=>{navigator.clipboard.writeText(r).catch(()=>{}),o();},className:"flex w-full items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors text-left",children:"Copy SVG"},"copy"):jsx("a",{href:p.href,role:"menuitem",target:p.href?.startsWith("https")?"_blank":void 0,rel:"noopener noreferrer",onClick:o,className:"flex items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors",children:p.label},p.label))]})}l(bt,"BrandContextMenu");function j({size:e=22,className:t="",brandMenu:o=true,animate:n=true}){let[d,r]=useState(null),[p,s]=useState(false),c=useCallback(m=>{o&&(m.preventDefault(),r({x:m.clientX,y:m.clientY}));},[o]);return jsxs(Fragment,{children:[jsxs("svg",{width:e,height:e,viewBox:"0 0 67 67",xmlns:"http://www.w3.org/2000/svg","aria-label":"Hanzo",className:t,style:n?{transition:"transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease",transform:p?"scale(1.12) perspective(80px) rotateY(-6deg)":"scale(1) perspective(80px) rotateY(0deg)",transformOrigin:"center center"}:{},onMouseEnter:()=>s(true),onMouseLeave:()=>s(false),onContextMenu:c,children:[jsx("path",{d:"M22.21 67V44.6369H0V67H22.21Z",fill:"#ffffff"}),jsx("path",{d:"M0 44.6369L22.21 46.8285V44.6369H0Z",fill:"#DDDDDD"}),jsx("path",{d:"M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z",fill:"#ffffff"}),jsx("path",{d:"M22.21 0H0V22.3184H22.21V0Z",fill:"#ffffff"}),jsx("path",{d:"M66.7198 0H44.5098V22.3184H66.7198V0Z",fill:"#ffffff"}),jsx("path",{d:"M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z",fill:"#DDDDDD"}),jsx("path",{d:"M66.7198 67V44.6369H44.5098V67H66.7198Z",fill:"#ffffff"})]}),d&&jsx(bt,{x:d.x,y:d.y,onClose:()=>r(null)})]})}l(j,"HanzoMark");var U=[{id:"account",label:"Account",href:"https://hanzo.id/account",description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:"https://billing.hanzo.ai",description:"Subscriptions & usage"},{id:"console",label:"Console",href:"https://console.hanzo.ai",description:"API keys & projects"},{id:"chat",label:"Chat",href:"https://hanzo.chat",description:"AI chat & models"},{id:"flow",label:"Flow",href:"https://flow.hanzo.ai",description:"Visual workflow builder"},{id:"bot",label:"Bot",href:"https://hanzo.bot",description:"AI bot platform"},{id:"o11y",label:"O11y",href:"https://o11y.hanzo.ai",description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:"https://sentry.hanzo.ai",description:"Error & crash tracking"},{id:"insights",label:"Insights",href:"https://insights.hanzo.ai",description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:"https://analytics.hanzo.ai",description:"Web analytics"},{id:"platform",label:"Platform",href:"https://platform.hanzo.ai",description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:"https://cloud.hanzo.ai",description:"Cloud infrastructure"},{id:"storage",label:"Storage",href:"https://s3.hanzo.ai",description:"S3 object storage"},{id:"kms",label:"KMS",href:"https://kms.hanzo.ai",description:"Secrets & key management"},{id:"dns",label:"DNS",href:"https://dns.hanzo.ai",description:"DNS management"},{id:"registry",label:"Registry",href:"https://registry.hanzo.ai",description:"Container registry"},{id:"commerce",label:"Commerce",href:"https://commerce.hanzo.ai",description:"Payments & storefront"},{id:"base",label:"Base",href:"https://base.hanzo.ai",description:"Backend-as-a-Service"},{id:"search",label:"Search",href:"https://search.hanzo.ai",description:"Full-text search"},{id:"auto",label:"Auto",href:"https://auto.hanzo.ai",description:"Workflow automation"},{id:"team",label:"Team",href:"https://hanzo.team",description:"Team collaboration"},{id:"sign",label:"Sign",href:"https://sign.hanzo.ai",description:"Document signing"},{id:"dataroom",label:"Dataroom",href:"https://dataroom.hanzo.ai",description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:"https://captable.hanzo.ai",description:"Equity management"},{id:"docs",label:"Docs",href:"https://docs.hanzo.ai",description:"Documentation"},{id:"status",label:"Status",href:"https://status.hanzo.ai",description:"System status"}],A={hanzo:{id:"hanzo",iam:"https://hanzo.id",billing:"https://billing.hanzo.ai",console:"https://console.hanzo.ai",cloud:"https://cloud.hanzo.ai",chat:"https://hanzo.chat",flow:"https://flow.hanzo.ai",bot:"https://hanzo.bot",o11y:"https://o11y.hanzo.ai",sentry:"https://sentry.hanzo.ai",insights:"https://insights.hanzo.ai",analytics:"https://analytics.hanzo.ai",platform:"https://platform.hanzo.ai",storage:"https://s3.hanzo.ai",s3:"https://s3.hanzo.ai",kms:"https://kms.hanzo.ai",dns:"https://dns.hanzo.ai",registry:"https://registry.hanzo.ai",commerce:"https://commerce.hanzo.ai",base:"https://base.hanzo.ai",search:"https://search.hanzo.ai",auto:"https://auto.hanzo.ai",team:"https://hanzo.team",sign:"https://sign.hanzo.ai",dataroom:"https://dataroom.hanzo.ai",captable:"https://captable.hanzo.ai",docs:"https://docs.hanzo.ai",status:"https://status.hanzo.ai"},lux:{id:"lux",iam:"https://lux.id",billing:"https://billing.lux.network",console:"https://console.lux.network",cloud:"https://cloud.lux.network",chat:"https://lux.chat",flow:"https://flow.lux.network",bot:"https://bot.lux.network",o11y:"https://o11y.lux.network",sentry:"https://sentry.lux.network",insights:"https://insights.lux.network",analytics:"https://analytics.lux.network",platform:"https://platform.lux.network",storage:"https://s3.lux.network",s3:"https://s3.lux.network",kms:"https://kms.lux.network",dns:"https://dns.lux.network",registry:"https://registry.lux.network",commerce:"https://commerce.lux.network",base:"https://base.lux.network",search:"https://search.lux.network",auto:"https://auto.lux.network",team:"https://team.lux.network",sign:"https://sign.lux.network",dataroom:"https://dataroom.lux.network",captable:"https://captable.lux.network",docs:"https://docs.lux.network",status:"https://status.lux.network"},zoo:{id:"zoo",iam:"https://zoo.id",billing:"https://billing.zoo.ngo",console:"https://console.zoo.ngo",cloud:"https://cloud.zoo.network",chat:"https://chat.zoo.ngo",flow:"https://flow.zoo.ngo",bot:"https://bot.zoo.ngo",o11y:"https://o11y.zoo.network",sentry:"https://sentry.zoo.network",insights:"https://insights.zoo.ngo",analytics:"https://analytics.zoo.ngo",platform:"https://platform.zoo.ngo",storage:"https://s3.zoo.ngo",s3:"https://s3.zoo.ngo",kms:"https://kms.zoo.network",dns:"https://dns.zoo.ngo",registry:"https://registry.zoo.ngo",commerce:"https://commerce.zoo.ngo",base:"https://base.zoo.ngo",search:"https://search.zoo.ngo",auto:"https://auto.zoo.ngo",team:"https://team.zoo.ngo",sign:"https://sign.zoo.ngo",dataroom:"https://dataroom.zoo.ngo",captable:"https://captable.zoo.ngo",docs:"https://docs.zoo.ngo",status:"https://status.zoo.network"},pars:{id:"pars",iam:"https://pars.id",billing:"https://billing.pars.network",console:"https://console.pars.network",cloud:"https://cloud.pars.network",chat:"https://chat.pars.network",flow:"https://flow.pars.network",bot:"https://bot.pars.network",o11y:"https://o11y.pars.network",sentry:"https://sentry.pars.network",insights:"https://insights.pars.network",analytics:"https://analytics.pars.network",platform:"https://platform.pars.network",storage:"https://s3.pars.network",s3:"https://s3.pars.network",kms:"https://kms.pars.network",dns:"https://dns.pars.network",registry:"https://registry.pars.network",commerce:"https://commerce.pars.network",base:"https://base.pars.network",search:"https://search.pars.network",auto:"https://auto.pars.network",team:"https://team.pars.network",sign:"https://sign.pars.network",dataroom:"https://dataroom.pars.network",captable:"https://captable.pars.network",docs:"https://docs.pars.network",status:"https://status.pars.network"}};function K(e){let t=A[e]||A.hanzo;return [{id:"account",label:"Account",href:`${t.iam}/account`,description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:t.billing,description:"Subscriptions & usage"},{id:"console",label:"Console",href:t.console,description:"API keys & projects"},{id:"chat",label:"Chat",href:t.chat,description:"AI chat & models"},{id:"flow",label:"Flow",href:t.flow,description:"Visual workflow builder"},{id:"bot",label:"Bot",href:t.bot,description:"AI bot platform"},{id:"o11y",label:"O11y",href:t.o11y,description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:t.sentry,description:"Error & crash tracking"},{id:"insights",label:"Insights",href:t.insights,description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:t.analytics,description:"Web analytics"},{id:"platform",label:"Platform",href:t.platform,description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:t.cloud,description:"Cloud infrastructure"},{id:"storage",label:"Storage",href:t.storage,description:"S3 object storage"},{id:"kms",label:"KMS",href:t.kms,description:"Secrets & key management"},{id:"dns",label:"DNS",href:t.dns,description:"DNS management"},{id:"registry",label:"Registry",href:t.registry,description:"Container registry"},{id:"commerce",label:"Commerce",href:t.commerce,description:"Payments & storefront"},{id:"base",label:"Base",href:t.base,description:"Backend-as-a-Service"},{id:"search",label:"Search",href:t.search,description:"Full-text search"},{id:"auto",label:"Auto",href:t.auto,description:"Workflow automation"},{id:"team",label:"Team",href:t.team,description:"Team collaboration"},{id:"sign",label:"Sign",href:t.sign,description:"Document signing"},{id:"dataroom",label:"Dataroom",href:t.dataroom,description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:t.captable,description:"Equity management"},{id:"docs",label:"Docs",href:t.docs,description:"Documentation"},{id:"status",label:"Status",href:t.status,description:"System status"}]}l(K,"getAppsForOrg");var it=[{label:"Core",ids:["account","billing","console"]},{label:"AI",ids:["chat","flow","bot"]},{label:"Observability",ids:["o11y","sentry","insights","analytics"]},{label:"Infrastructure",ids:["platform","cloud","storage","kms","dns","registry"]},{label:"Apps",ids:["commerce","base","search","auto"]},{label:"Business",ids:["team","sign","dataroom","captable"]},{label:"Resources",ids:["docs","status"]}];function W({apps:e=U,currentAppId:t}){let[o,n]=useState(false),d=useRef(null);useEffect(()=>{let s=l(c=>{d.current&&!d.current.contains(c.target)&&n(false);},"handler");return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);let r=e.filter(s=>s.id!==t),p=new Map(r.map(s=>[s.id,s]));return jsxs("div",{ref:d,className:"relative",children:[jsx("button",{type:"button",onClick:()=>n(s=>!s),className:"flex h-8 w-8 items-center justify-center rounded-lg text-white/40 hover:bg-white/[0.06] hover:text-white/70 transition-colors","aria-label":"Switch app",title:"Switch app",children:jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[jsx("rect",{x:"1",y:"1",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"6",y:"1",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"11",y:"1",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"1",y:"6",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"6",y:"6",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"11",y:"6",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"1",y:"11",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"6",y:"11",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"11",y:"11",width:"4",height:"4",rx:"1"})]})}),o&&jsxs("div",{className:"absolute left-0 top-10 z-50 w-72 max-h-[80vh] overflow-y-auto rounded-xl border border-white/[0.08] bg-[#0e0e13] p-2 shadow-2xl",children:[it.map(s=>{let c=s.ids.map(a=>p.get(a)).filter(Boolean);return c.length===0?null:jsxs("div",{children:[jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:s.label}),jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(a=>jsxs("a",{href:a.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>n(false),children:[jsx("span",{className:"text-[13px] font-medium text-white/80",children:a.label}),a.description&&jsx("span",{className:"text-[11px] leading-tight text-white/30",children:a.description})]},a.id))})]},s.label)}),(()=>{let s=new Set(it.flatMap(a=>a.ids)),c=r.filter(a=>!s.has(a.id));return c.length===0?null:jsxs("div",{children:[jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Other"}),jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(a=>jsxs("a",{href:a.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>n(false),children:[jsx("span",{className:"text-[13px] font-medium text-white/80",children:a.label}),a.description&&jsx("span",{className:"text-[11px] leading-tight text-white/30",children:a.description})]},a.id))})]})})()]})]})}l(W,"AppSwitcher");var kt=["#0A0310","#49007E","#FF005B","#FF7D10","#FFB238"];function zt(e){let t=0;for(let o=0;o<e.length;o++)t=(t<<5)-t+e.charCodeAt(o)|0;return Math.abs(t)}l(zt,"hashStr");function M(e,t,o){return e%(t*(o+1))%t}l(M,"getUnit");function Nt(e,t){return M(e,2,t)===0}l(Nt,"getBoolean");function lt(e,t,o){return o[M(e,o.length,t)]}l(lt,"getRandomColor");function St(e){let t=parseInt(e.slice(1,3),16),o=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return t*.299+o*.587+n*.114>128?"#000":"#fff"}l(St,"getContrast");function Y({name:e,size:t=40,colors:o=kt,className:n,square:d=false}){let r=zt(e),p=lt(r,0,o),s=St(p),c=Nt(r,2),a=M(r,3,7),m=M(r,5,8),h=M(r,10,9),f=h>6?h-10:h,b=M(r,5,10)>3?M(r,5,10)-5:M(r,5,10);return jsxs("svg",{viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,className:n,style:d?void 0:{borderRadius:"50%"},children:[jsx("mask",{id:`beam-${r}`,maskUnits:"userSpaceOnUse",x:0,y:0,width:36,height:36,children:jsx("rect",{width:36,height:36,rx:d?void 0:72,fill:"#fff"})}),jsxs("g",{mask:`url(#beam-${r})`,children:[jsx("rect",{width:36,height:36,fill:p}),jsx("rect",{x:0,y:0,width:36,height:36,transform:`translate(${f} ${b}) rotate(${h} 18 18)`,fill:lt(r,1,o),rx:6}),jsxs("g",{transform:`translate(${f} ${b}) rotate(${h} 18 18)`,children:[c?jsx("path",{d:`M15 ${19+a}c2 1 4 1 6 0`,stroke:s,fill:"none",strokeLinecap:"round"}):jsx("path",{d:`M13 ${19+a}a1 .75 0 0 0 10 0`,fill:s}),jsx("rect",{x:14-m,y:14,width:1.5,height:2,rx:1,fill:s}),jsx("rect",{x:20+m,y:14,width:1.5,height:2,rx:1,fill:s})]})]})]})}l(Y,"BeamAvatar");async function At(e){let o=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(n)).map(d=>d.toString(16).padStart(2,"0")).join("")}l(At,"sha256");function Dt(e,t){let[o,n]=useState(null);return useMemo(()=>{if(!e){n(null);return}let d=e.trim().toLowerCase();At(d).then(r=>{n(`https://www.gravatar.com/avatar/${r}?s=${t||80}&d=404`);});},[e,t]),o}l(Dt,"useGravatarUrl");function Q({src:e,email:t,name:o,size:n=40,colors:d,className:r}){let[p,s]=useState(false),[c,a]=useState(false),m=Dt(t,n*2),h=`rounded-full object-cover ${r||""}`,f={width:n,height:n};return e&&!p?jsx("img",{src:e,alt:o||t||"avatar",className:h,style:f,onError:()=>s(true)}):m&&!c?jsx("img",{src:m,alt:o||t||"avatar",className:h,style:f,onError:()=>a(true)}):jsx(Y,{name:o||t||"user",size:n,colors:d,className:r})}l(Q,"UserAvatar");function tt({user:e,organizations:t=[],currentOrgId:o,onOrgSwitch:n,onSignOut:d}){let[r,p]=useState(false),s=useRef(null);if(useEffect(()=>{let h=l(f=>{s.current&&!s.current.contains(f.target)&&p(false);},"handler");return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),!e)return null;let c=t.find(h=>h.id===o),a=c?.slug||"hanzo",m=A[a]||A.hanzo;return jsxs("div",{ref:s,className:"relative",children:[jsxs("button",{type:"button",onClick:()=>p(h=>!h),className:"flex items-center gap-2 rounded-lg px-2 py-1.5 hover:bg-white/[0.06] transition-colors",children:[jsx(Q,{src:e.avatar,email:e.email,name:e.name,size:28}),jsxs("div",{className:"hidden flex-col items-start sm:flex",children:[e.name&&jsx("span",{className:"text-[12px] font-medium text-white/70 leading-none",children:e.name}),jsx("span",{className:"text-[11px] text-white/30 leading-none mt-0.5",children:e.email})]}),jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/30 hidden sm:block",children:jsx("path",{d:"M6 9l6 6 6-6"})})]}),r&&jsxs("div",{className:"absolute right-0 top-10 z-50 w-64 rounded-xl border border-white/[0.08] bg-[#0e0e13] shadow-2xl",children:[jsxs("div",{className:"border-b border-white/[0.06] px-4 py-3",children:[jsx("p",{className:"text-[13px] font-medium text-white/80",children:e.name||"User"}),jsx("p",{className:"text-[11px] text-white/40",children:e.email}),c&&jsx("p",{className:"mt-0.5 text-[10px] font-medium text-white/25 uppercase tracking-wider",children:c.name})]}),t.length>0&&jsxs("div",{className:"border-b border-white/[0.06] p-2",children:[jsx("p",{className:"px-2 pb-1 pt-0.5 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Organizations"}),t.map(h=>jsxs("button",{type:"button",onClick:()=>{n?.(h.id),p(false);},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left hover:bg-white/[0.06] transition-colors",children:[jsxs("div",{className:"flex flex-col",children:[jsx("span",{className:"text-[13px] text-white/70",children:h.name}),h.role&&jsx("span",{className:"text-[10px] text-white/25 capitalize",children:h.role})]}),h.id===o&&jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/50",children:jsx("polyline",{points:"20 6 9 17 4 12"})})]},h.id))]}),jsxs("div",{className:"p-2",children:[jsx("a",{href:`${m.iam}/account`,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Account settings"}),jsx("a",{href:m.billing,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Billing"}),jsx("button",{type:"button",onClick:()=>{p(false),d?.();},className:"flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/40 hover:bg-white/[0.06] hover:text-red-400/70 transition-colors",children:"Sign out"})]})]})]})}l(tt,"UserOrgDropdown");function Et({className:e}){return jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[jsx("path",{d:"M21 2v6h-6"}),jsx("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),jsx("path",{d:"M3 22v-6h6"}),jsx("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]})}l(Et,"HardRefreshIcon");function Lt({className:e}){return jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),jsx("circle",{cx:"12",cy:"12",r:"3"})]})}l(Lt,"SettingsIcon");async function It(){try{if(localStorage.clear(),sessionStorage.clear(),document.cookie.split(";").forEach(e=>{let t=e.split("=")[0].trim();if(t){document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${location.hostname}`;let o=location.hostname.split(".");if(o.length>2){let n="."+o.slice(-2).join(".");document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${n}`;}}}),"caches"in window){let e=await caches.keys();await Promise.all(e.map(t=>caches.delete(t)));}if("serviceWorker"in navigator){let e=await navigator.serviceWorker.getRegistrations();await Promise.all(e.map(t=>t.unregister()));}if("indexedDB"in window&&indexedDB.databases)try{(await indexedDB.databases()).forEach(t=>{t.name&&indexedDB.deleteDatabase(t.name);});}catch{}}catch{}location.reload();}l(It,"hardRefresh");function Rt({currentApp:e,currentAppId:t,user:o,organizations:n,currentOrgId:d,onOrgSwitch:r,onSignOut:p,apps:s,headerRight:c,settingsHref:a,onSettingsClick:m,hideHardRefresh:h,hideSettings:f}){let[b,P]=useState(false),E=n?.find(k=>k.id===d)?.slug||"hanzo",u=s||K(E),S=A[E]||A.hanzo,$=useCallback(()=>{P(true),It();},[]),v=useCallback(()=>{m?m():window.location.href=a||`${S.iam}/account`;},[m,a,S.iam]);return jsxs("header",{className:"sticky top-0 z-50 flex h-14 w-full items-center justify-between border-b border-white/[0.07] bg-[#09090b]/90 px-4 backdrop-blur-xl",role:"banner",children:[jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[jsx("a",{href:`${S.iam}/account`,className:"flex-shrink-0 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Account",children:jsx(j,{size:22,brandMenu:true,animate:true})}),jsx("span",{className:"select-none text-white/[0.15]",children:"/"}),jsx("span",{className:"truncate text-[13px] font-medium text-white/50",children:e}),jsx(W,{apps:u,currentAppId:t})]}),jsxs("div",{className:"flex flex-shrink-0 items-center gap-1",children:[c,!h&&jsx("button",{type:"button",onClick:$,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Hard refresh \u2014 clear all storage, cookies, cache and reload",title:"Hard refresh",children:jsx(Et,{className:b?"animate-spin":""})}),!f&&jsx("button",{type:"button",onClick:v,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Settings",title:"Settings",children:jsx(Lt,{})}),jsx(tt,{user:o,organizations:n,currentOrgId:d,onOrgSwitch:r,onSignOut:p})]})]})}l(Rt,"HanzoHeader");var pt="hanzo-auth-token",ot="hanzo-user",dt="hanzo-auth-expires",Ut="https://iam.hanzo.ai",Tt={hanzo:{name:"Hanzo AI",slug:"hanzo"},lux:{name:"Lux Network",slug:"lux"},zoo:{name:"Zoo Labs",slug:"zoo"},pars:{name:"Pars",slug:"pars"}};function Vt(){let[e,t]=useState(void 0),[o,n]=useState([]),[d,r]=useState(void 0),[p,s]=useState(null),[c,a]=useState(true),m=useCallback(async()=>{try{let b=localStorage.getItem(pt),P=localStorage.getItem(dt);if(!b||P&&Date.now()>Number(P)){a(!1);return}s(b);let I=localStorage.getItem(ot);if(I)try{let u=JSON.parse(I);u?.email&&t({id:u.id,name:u.displayName||u.name,email:u.email,avatar:u.avatar});}catch{}let E=await fetch(`${Ut}/api/userinfo`,{headers:{Authorization:`Bearer ${b}`}});if(E.ok){let u=await E.json(),S={id:u.sub||u.id,name:u.name||u.displayName,email:u.email,avatar:u.picture||u.avatar};t(S),localStorage.setItem(ot,JSON.stringify(u));let v=(u.groups||[]).map(k=>{let R=k.toLowerCase().replace(/^\//,""),B=Tt[R];return B?{id:R,name:B.name,slug:B.slug}:null}).filter(Boolean);v.length===0&&S.email&&v.push({id:"personal",name:"Personal",slug:"personal"}),n(v),r(v[0]?.id);}}catch{}finally{a(false);}},[]);useEffect(()=>{m();},[m]);let h=useCallback(()=>{localStorage.removeItem(pt),localStorage.removeItem(ot),localStorage.removeItem(dt),window.location.href="https://hanzo.id";},[]),f=useCallback(b=>{r(b);},[]);return {user:e,organizations:o,currentOrgId:d,token:p,loading:c,signOut:h,switchOrg:f}}l(Vt,"useHanzoAuth");function $t(e,t){return e.filter(o=>o.id!==t).map(o=>({id:`app-${o.id}`,title:o.label,description:o.description,href:o.href,category:"Hanzo Apps",external:true,keywords:[o.id,o.label.toLowerCase()]}))}l($t,"buildCrossAppCommands");function Ft({commands:e=[],apps:t,currentAppId:o,open:n,onOpenChange:d,onNavigate:r}){var nt;let[p,s]=useState(false),c=n??p,a=useCallback(i=>{d?d(i):s(i);},[d]),[m,h]=useState(""),[f,b]=useState(0),P=useRef(null),I=useRef(null),E=$t(t??U,o),u=[...e,...E],S=m.toLowerCase(),$=S?u.filter(i=>i.title.toLowerCase().includes(S)||i.description?.toLowerCase().includes(S)||i.keywords?.some(z=>z.includes(S))):u,v={};for(let i of $)(v[nt=i.category]??(v[nt]=[])).push(i);let k=Object.values(v).flat();useEffect(()=>b(0),[m]),useEffect(()=>{c&&(h(""),b(0),requestAnimationFrame(()=>P.current?.focus()));},[c]),useEffect(()=>{let i=l(z=>{(z.metaKey||z.ctrlKey)&&z.key==="k"&&(z.preventDefault(),a(!c));},"handler");return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[c,a]);let R=useCallback(i=>{i.action?i.action():i.href&&(r?r(i.href,i.external):i.external?window.open(i.href,"_blank"):window.location.href=i.href),a(false);},[r,a]),B=useCallback(i=>{i.key==="ArrowDown"?(i.preventDefault(),b(z=>(z+1)%(k.length||1))):i.key==="ArrowUp"?(i.preventDefault(),b(z=>(z-1+(k.length||1))%(k.length||1))):i.key==="Enter"&&k[f]?(i.preventDefault(),R(k[f])):i.key==="Escape"&&a(false);},[k,f,R,a]);return useEffect(()=>{I.current?.querySelector(`[data-idx="${f}"]`)?.scrollIntoView({block:"nearest"});},[f]),c?jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[100]",onClick:()=>a(false)}),jsx("div",{className:"fixed top-[15%] left-1/2 -translate-x-1/2 w-full max-w-xl z-[101]",children:jsxs("div",{className:"bg-[#111113] border border-white/[0.08] rounded-xl shadow-2xl overflow-hidden",children:[jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-white/[0.07]",children:[jsx("svg",{className:"w-4 h-4 text-white/30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),jsx("input",{ref:P,type:"text",value:m,onChange:i=>h(i.target.value),onKeyDown:B,placeholder:"Search commands...",className:"flex-1 bg-transparent text-white text-[13px] placeholder-white/30 outline-none"}),jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono bg-white/[0.06] rounded text-white/30",children:"ESC"})]}),jsx("div",{ref:I,className:"max-h-[400px] overflow-y-auto py-1",children:k.length===0?jsxs("div",{className:"px-4 py-8 text-center text-white/30 text-[13px]",children:["No results for \u201C",m,"\u201D"]}):Object.entries(v).map(([i,z])=>jsxs("div",{children:[jsx("div",{className:"px-4 py-2 text-[10px] font-semibold text-white/25 uppercase tracking-widest",children:i}),z.map(O=>{let _=k.indexOf(O),Z=_===f;return jsxs("button",{"data-idx":_,onClick:()=>R(O),onMouseEnter:()=>b(_),className:`w-full flex items-center gap-3 px-4 py-2 text-left transition-colors ${Z?"bg-white/[0.06] text-white":"text-white/50 hover:bg-white/[0.03]"}`,children:[O.icon&&jsx("span",{className:`w-5 h-5 flex items-center justify-center ${Z?"text-white/70":"text-white/25"}`,children:O.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("span",{className:"text-[13px] font-medium truncate block",children:O.title}),O.description&&jsx("span",{className:"text-[11px] text-white/25 truncate block",children:O.description})]}),Z&&jsx("span",{className:"text-white/25 text-[11px]",children:"\u21B5"})]},O.id)})]},i))}),jsxs("div",{className:"px-4 py-2 border-t border-white/[0.07] flex items-center justify-between",children:[jsxs("div",{className:"flex items-center gap-4 text-[10px] text-white/20",children:[jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2191"}),jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2193"}),"navigate"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u21B5"}),"select"]})]}),jsx("span",{className:"text-[10px] text-white/20",children:"\u2318K"})]})]})})]}):null}l(Ft,"HanzoCommandPalette");
2
+ import {useState,useCallback,useRef,useEffect,useMemo}from'react';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var mt=Object.defineProperty;var l=(e,t)=>mt(e,"name",{value:t,configurable:true});function bt({x:e,y:t,onClose:o}){let n=useRef(null);useEffect(()=>{let p=l(c=>{n.current&&!n.current.contains(c.target)&&o();},"handler"),s=l(c=>{c.key==="Escape"&&o();},"escape");return document.addEventListener("mousedown",p),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",s);}},[o]);let d=[{label:"Brand Guidelines",href:"https://hanzo.ai/brand"},{label:"Press Kit",href:"https://hanzo.ai/press"},{label:"Download Logo",href:"https://hanzo.ai/brand#download"},{label:"Copy SVG",action:"copy-svg"},{label:"hanzo.ai \u2192",href:"https://hanzo.ai"}],r='<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg"><path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/><path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/><path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/><path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/></svg>';return jsxs("div",{ref:n,role:"menu",className:"fixed z-[9999] min-w-[180px] rounded-xl border border-white/[0.08] bg-[#111113] py-1.5 shadow-2xl shadow-black/60",style:{top:t,left:e},children:[jsx("div",{className:"border-b border-white/[0.06] px-3 pb-2 pt-1",children:jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-white/30",children:"Hanzo Brand"})}),d.map(p=>p.action==="copy-svg"?jsx("button",{type:"button",role:"menuitem",onClick:()=>{navigator.clipboard.writeText(r).catch(()=>{}),o();},className:"flex w-full items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors text-left",children:"Copy SVG"},"copy"):jsx("a",{href:p.href,role:"menuitem",target:p.href?.startsWith("https")?"_blank":void 0,rel:"noopener noreferrer",onClick:o,className:"flex items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors",children:p.label},p.label))]})}l(bt,"BrandContextMenu");function j({size:e=22,className:t="",brandMenu:o=true,animate:n=true}){let[d,r]=useState(null),[p,s]=useState(false),c=useCallback(m=>{o&&(m.preventDefault(),r({x:m.clientX,y:m.clientY}));},[o]);return jsxs(Fragment,{children:[jsxs("svg",{width:e,height:e,viewBox:"0 0 67 67",xmlns:"http://www.w3.org/2000/svg","aria-label":"Hanzo",className:t,style:n?{transition:"transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease",transform:p?"scale(1.12) perspective(80px) rotateY(-6deg)":"scale(1) perspective(80px) rotateY(0deg)",transformOrigin:"center center"}:{},onMouseEnter:()=>s(true),onMouseLeave:()=>s(false),onContextMenu:c,children:[jsx("path",{d:"M22.21 67V44.6369H0V67H22.21Z",fill:"#ffffff"}),jsx("path",{d:"M0 44.6369L22.21 46.8285V44.6369H0Z",fill:"#DDDDDD"}),jsx("path",{d:"M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z",fill:"#ffffff"}),jsx("path",{d:"M22.21 0H0V22.3184H22.21V0Z",fill:"#ffffff"}),jsx("path",{d:"M66.7198 0H44.5098V22.3184H66.7198V0Z",fill:"#ffffff"}),jsx("path",{d:"M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z",fill:"#DDDDDD"}),jsx("path",{d:"M66.7198 67V44.6369H44.5098V67H66.7198Z",fill:"#ffffff"})]}),d&&jsx(bt,{x:d.x,y:d.y,onClose:()=>r(null)})]})}l(j,"HanzoMark");var U=[{id:"account",label:"Account",href:"https://hanzo.id/account",description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:"https://billing.hanzo.ai",description:"Subscriptions & usage"},{id:"console",label:"Console",href:"https://console.hanzo.ai",description:"API keys & projects"},{id:"chat",label:"Chat",href:"https://hanzo.chat",description:"AI chat & models"},{id:"flow",label:"Flow",href:"https://flow.hanzo.ai",description:"Visual workflow builder"},{id:"bot",label:"Bot",href:"https://hanzo.bot",description:"AI bot platform"},{id:"o11y",label:"O11y",href:"https://o11y.hanzo.ai",description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:"https://sentry.hanzo.ai",description:"Error & crash tracking"},{id:"insights",label:"Insights",href:"https://insights.hanzo.ai",description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:"https://analytics.hanzo.ai",description:"Web analytics"},{id:"platform",label:"Platform",href:"https://platform.hanzo.ai",description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:"https://cloud.hanzo.ai",description:"Cloud infrastructure"},{id:"web3",label:"Web3",href:"https://web3.hanzo.ai",description:"Deploy & manage blockchain validators across Bitcoin, Ethereum, Solana, Lux, and any Lux-derived L1"},{id:"storage",label:"Storage",href:"https://s3.hanzo.ai",description:"S3 object storage"},{id:"kms",label:"KMS",href:"https://kms.hanzo.ai",description:"Secrets & key management"},{id:"dns",label:"DNS",href:"https://dns.hanzo.ai",description:"DNS management"},{id:"registry",label:"Registry",href:"https://registry.hanzo.ai",description:"Container registry"},{id:"commerce",label:"Commerce",href:"https://commerce.hanzo.ai",description:"Payments & storefront"},{id:"base",label:"Base",href:"https://base.hanzo.ai",description:"Backend-as-a-Service"},{id:"search",label:"Search",href:"https://search.hanzo.ai",description:"Full-text search"},{id:"auto",label:"Auto",href:"https://auto.hanzo.ai",description:"Workflow automation"},{id:"team",label:"Team",href:"https://hanzo.team",description:"Team collaboration"},{id:"sign",label:"Sign",href:"https://sign.hanzo.ai",description:"Document signing"},{id:"dataroom",label:"Dataroom",href:"https://dataroom.hanzo.ai",description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:"https://captable.hanzo.ai",description:"Equity management"},{id:"docs",label:"Docs",href:"https://docs.hanzo.ai",description:"Documentation"},{id:"status",label:"Status",href:"https://status.hanzo.ai",description:"System status"}],A={hanzo:{id:"hanzo",iam:"https://hanzo.id",billing:"https://billing.hanzo.ai",console:"https://console.hanzo.ai",cloud:"https://cloud.hanzo.ai",web3:"https://web3.hanzo.ai",chat:"https://hanzo.chat",flow:"https://flow.hanzo.ai",bot:"https://hanzo.bot",o11y:"https://o11y.hanzo.ai",sentry:"https://sentry.hanzo.ai",insights:"https://insights.hanzo.ai",analytics:"https://analytics.hanzo.ai",platform:"https://platform.hanzo.ai",storage:"https://s3.hanzo.ai",s3:"https://s3.hanzo.ai",kms:"https://kms.hanzo.ai",dns:"https://dns.hanzo.ai",registry:"https://registry.hanzo.ai",commerce:"https://commerce.hanzo.ai",base:"https://base.hanzo.ai",search:"https://search.hanzo.ai",auto:"https://auto.hanzo.ai",team:"https://hanzo.team",sign:"https://sign.hanzo.ai",dataroom:"https://dataroom.hanzo.ai",captable:"https://captable.hanzo.ai",docs:"https://docs.hanzo.ai",status:"https://status.hanzo.ai"},lux:{id:"lux",iam:"https://lux.id",billing:"https://billing.lux.network",console:"https://console.lux.network",cloud:"https://cloud.lux.network",web3:"https://web3.lux.network",chat:"https://lux.chat",flow:"https://flow.lux.network",bot:"https://bot.lux.network",o11y:"https://o11y.lux.network",sentry:"https://sentry.lux.network",insights:"https://insights.lux.network",analytics:"https://analytics.lux.network",platform:"https://platform.lux.network",storage:"https://s3.lux.network",s3:"https://s3.lux.network",kms:"https://kms.lux.network",dns:"https://dns.lux.network",registry:"https://registry.lux.network",commerce:"https://commerce.lux.network",base:"https://base.lux.network",search:"https://search.lux.network",auto:"https://auto.lux.network",team:"https://team.lux.network",sign:"https://sign.lux.network",dataroom:"https://dataroom.lux.network",captable:"https://captable.lux.network",docs:"https://docs.lux.network",status:"https://status.lux.network"},zoo:{id:"zoo",iam:"https://zoo.id",billing:"https://billing.zoo.ngo",console:"https://console.zoo.ngo",cloud:"https://cloud.zoo.network",web3:"https://web3.zoo.ngo",chat:"https://chat.zoo.ngo",flow:"https://flow.zoo.ngo",bot:"https://bot.zoo.ngo",o11y:"https://o11y.zoo.network",sentry:"https://sentry.zoo.network",insights:"https://insights.zoo.ngo",analytics:"https://analytics.zoo.ngo",platform:"https://platform.zoo.ngo",storage:"https://s3.zoo.ngo",s3:"https://s3.zoo.ngo",kms:"https://kms.zoo.network",dns:"https://dns.zoo.ngo",registry:"https://registry.zoo.ngo",commerce:"https://commerce.zoo.ngo",base:"https://base.zoo.ngo",search:"https://search.zoo.ngo",auto:"https://auto.zoo.ngo",team:"https://team.zoo.ngo",sign:"https://sign.zoo.ngo",dataroom:"https://dataroom.zoo.ngo",captable:"https://captable.zoo.ngo",docs:"https://docs.zoo.ngo",status:"https://status.zoo.network"},pars:{id:"pars",iam:"https://pars.id",billing:"https://billing.pars.network",console:"https://console.pars.network",cloud:"https://cloud.pars.network",web3:"https://web3.pars.network",chat:"https://chat.pars.network",flow:"https://flow.pars.network",bot:"https://bot.pars.network",o11y:"https://o11y.pars.network",sentry:"https://sentry.pars.network",insights:"https://insights.pars.network",analytics:"https://analytics.pars.network",platform:"https://platform.pars.network",storage:"https://s3.pars.network",s3:"https://s3.pars.network",kms:"https://kms.pars.network",dns:"https://dns.pars.network",registry:"https://registry.pars.network",commerce:"https://commerce.pars.network",base:"https://base.pars.network",search:"https://search.pars.network",auto:"https://auto.pars.network",team:"https://team.pars.network",sign:"https://sign.pars.network",dataroom:"https://dataroom.pars.network",captable:"https://captable.pars.network",docs:"https://docs.pars.network",status:"https://status.pars.network"}};function K(e){let t=A[e]||A.hanzo;return [{id:"account",label:"Account",href:`${t.iam}/account`,description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:t.billing,description:"Subscriptions & usage"},{id:"console",label:"Console",href:t.console,description:"API keys & projects"},{id:"chat",label:"Chat",href:t.chat,description:"AI chat & models"},{id:"flow",label:"Flow",href:t.flow,description:"Visual workflow builder"},{id:"bot",label:"Bot",href:t.bot,description:"AI bot platform"},{id:"o11y",label:"O11y",href:t.o11y,description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:t.sentry,description:"Error & crash tracking"},{id:"insights",label:"Insights",href:t.insights,description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:t.analytics,description:"Web analytics"},{id:"platform",label:"Platform",href:t.platform,description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:t.cloud,description:"Cloud infrastructure"},{id:"web3",label:"Web3",href:t.web3,description:"Deploy & manage blockchain validators across Bitcoin, Ethereum, Solana, Lux, and any Lux-derived L1"},{id:"storage",label:"Storage",href:t.storage,description:"S3 object storage"},{id:"kms",label:"KMS",href:t.kms,description:"Secrets & key management"},{id:"dns",label:"DNS",href:t.dns,description:"DNS management"},{id:"registry",label:"Registry",href:t.registry,description:"Container registry"},{id:"commerce",label:"Commerce",href:t.commerce,description:"Payments & storefront"},{id:"base",label:"Base",href:t.base,description:"Backend-as-a-Service"},{id:"search",label:"Search",href:t.search,description:"Full-text search"},{id:"auto",label:"Auto",href:t.auto,description:"Workflow automation"},{id:"team",label:"Team",href:t.team,description:"Team collaboration"},{id:"sign",label:"Sign",href:t.sign,description:"Document signing"},{id:"dataroom",label:"Dataroom",href:t.dataroom,description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:t.captable,description:"Equity management"},{id:"docs",label:"Docs",href:t.docs,description:"Documentation"},{id:"status",label:"Status",href:t.status,description:"System status"}]}l(K,"getAppsForOrg");var it=[{label:"Core",ids:["account","billing","console"]},{label:"AI",ids:["chat","flow","bot"]},{label:"Observability",ids:["o11y","sentry","insights","analytics"]},{label:"Infrastructure",ids:["platform","cloud","web3","storage","kms","dns","registry"]},{label:"Apps",ids:["commerce","base","search","auto"]},{label:"Business",ids:["team","sign","dataroom","captable"]},{label:"Resources",ids:["docs","status"]}];function W({apps:e=U,currentAppId:t}){let[o,n]=useState(false),d=useRef(null);useEffect(()=>{let s=l(c=>{d.current&&!d.current.contains(c.target)&&n(false);},"handler");return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);let r=e.filter(s=>s.id!==t),p=new Map(r.map(s=>[s.id,s]));return jsxs("div",{ref:d,className:"relative",children:[jsx("button",{type:"button",onClick:()=>n(s=>!s),className:"flex h-8 w-8 items-center justify-center rounded-lg text-white/40 hover:bg-white/[0.06] hover:text-white/70 transition-colors","aria-label":"Switch app",title:"Switch app",children:jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[jsx("rect",{x:"1",y:"1",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"6",y:"1",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"11",y:"1",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"1",y:"6",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"6",y:"6",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"11",y:"6",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"1",y:"11",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"6",y:"11",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"11",y:"11",width:"4",height:"4",rx:"1"})]})}),o&&jsxs("div",{className:"absolute left-0 top-10 z-50 w-72 max-h-[80vh] overflow-y-auto rounded-xl border border-white/[0.08] bg-[#0e0e13] p-2 shadow-2xl",children:[it.map(s=>{let c=s.ids.map(a=>p.get(a)).filter(Boolean);return c.length===0?null:jsxs("div",{children:[jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:s.label}),jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(a=>jsxs("a",{href:a.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>n(false),children:[jsx("span",{className:"text-[13px] font-medium text-white/80",children:a.label}),a.description&&jsx("span",{className:"text-[11px] leading-tight text-white/30",children:a.description})]},a.id))})]},s.label)}),(()=>{let s=new Set(it.flatMap(a=>a.ids)),c=r.filter(a=>!s.has(a.id));return c.length===0?null:jsxs("div",{children:[jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Other"}),jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(a=>jsxs("a",{href:a.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>n(false),children:[jsx("span",{className:"text-[13px] font-medium text-white/80",children:a.label}),a.description&&jsx("span",{className:"text-[11px] leading-tight text-white/30",children:a.description})]},a.id))})]})})()]})]})}l(W,"AppSwitcher");var kt=["#0A0310","#49007E","#FF005B","#FF7D10","#FFB238"];function zt(e){let t=0;for(let o=0;o<e.length;o++)t=(t<<5)-t+e.charCodeAt(o)|0;return Math.abs(t)}l(zt,"hashStr");function M(e,t,o){return e%(t*(o+1))%t}l(M,"getUnit");function Nt(e,t){return M(e,2,t)===0}l(Nt,"getBoolean");function lt(e,t,o){return o[M(e,o.length,t)]}l(lt,"getRandomColor");function St(e){let t=parseInt(e.slice(1,3),16),o=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return t*.299+o*.587+n*.114>128?"#000":"#fff"}l(St,"getContrast");function Y({name:e,size:t=40,colors:o=kt,className:n,square:d=false}){let r=zt(e),p=lt(r,0,o),s=St(p),c=Nt(r,2),a=M(r,3,7),m=M(r,5,8),h=M(r,10,9),f=h>6?h-10:h,b=M(r,5,10)>3?M(r,5,10)-5:M(r,5,10);return jsxs("svg",{viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,className:n,style:d?void 0:{borderRadius:"50%"},children:[jsx("mask",{id:`beam-${r}`,maskUnits:"userSpaceOnUse",x:0,y:0,width:36,height:36,children:jsx("rect",{width:36,height:36,rx:d?void 0:72,fill:"#fff"})}),jsxs("g",{mask:`url(#beam-${r})`,children:[jsx("rect",{width:36,height:36,fill:p}),jsx("rect",{x:0,y:0,width:36,height:36,transform:`translate(${f} ${b}) rotate(${h} 18 18)`,fill:lt(r,1,o),rx:6}),jsxs("g",{transform:`translate(${f} ${b}) rotate(${h} 18 18)`,children:[c?jsx("path",{d:`M15 ${19+a}c2 1 4 1 6 0`,stroke:s,fill:"none",strokeLinecap:"round"}):jsx("path",{d:`M13 ${19+a}a1 .75 0 0 0 10 0`,fill:s}),jsx("rect",{x:14-m,y:14,width:1.5,height:2,rx:1,fill:s}),jsx("rect",{x:20+m,y:14,width:1.5,height:2,rx:1,fill:s})]})]})]})}l(Y,"BeamAvatar");async function At(e){let o=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(n)).map(d=>d.toString(16).padStart(2,"0")).join("")}l(At,"sha256");function Dt(e,t){let[o,n]=useState(null);return useMemo(()=>{if(!e){n(null);return}let d=e.trim().toLowerCase();At(d).then(r=>{n(`https://www.gravatar.com/avatar/${r}?s=${t||80}&d=404`);});},[e,t]),o}l(Dt,"useGravatarUrl");function Q({src:e,email:t,name:o,size:n=40,colors:d,className:r}){let[p,s]=useState(false),[c,a]=useState(false),m=Dt(t,n*2),h=`rounded-full object-cover ${r||""}`,f={width:n,height:n};return e&&!p?jsx("img",{src:e,alt:o||t||"avatar",className:h,style:f,onError:()=>s(true)}):m&&!c?jsx("img",{src:m,alt:o||t||"avatar",className:h,style:f,onError:()=>a(true)}):jsx(Y,{name:o||t||"user",size:n,colors:d,className:r})}l(Q,"UserAvatar");function tt({user:e,organizations:t=[],currentOrgId:o,onOrgSwitch:n,onSignOut:d}){let[r,p]=useState(false),s=useRef(null);if(useEffect(()=>{let h=l(f=>{s.current&&!s.current.contains(f.target)&&p(false);},"handler");return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),!e)return null;let c=t.find(h=>h.id===o),a=c?.slug||"hanzo",m=A[a]||A.hanzo;return jsxs("div",{ref:s,className:"relative",children:[jsxs("button",{type:"button",onClick:()=>p(h=>!h),className:"flex items-center gap-2 rounded-lg px-2 py-1.5 hover:bg-white/[0.06] transition-colors",children:[jsx(Q,{src:e.avatar,email:e.email,name:e.name,size:28}),jsxs("div",{className:"hidden flex-col items-start sm:flex",children:[e.name&&jsx("span",{className:"text-[12px] font-medium text-white/70 leading-none",children:e.name}),jsx("span",{className:"text-[11px] text-white/30 leading-none mt-0.5",children:e.email})]}),jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/30 hidden sm:block",children:jsx("path",{d:"M6 9l6 6 6-6"})})]}),r&&jsxs("div",{className:"absolute right-0 top-10 z-50 w-64 rounded-xl border border-white/[0.08] bg-[#0e0e13] shadow-2xl",children:[jsxs("div",{className:"border-b border-white/[0.06] px-4 py-3",children:[jsx("p",{className:"text-[13px] font-medium text-white/80",children:e.name||"User"}),jsx("p",{className:"text-[11px] text-white/40",children:e.email}),c&&jsx("p",{className:"mt-0.5 text-[10px] font-medium text-white/25 uppercase tracking-wider",children:c.name})]}),t.length>0&&jsxs("div",{className:"border-b border-white/[0.06] p-2",children:[jsx("p",{className:"px-2 pb-1 pt-0.5 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Organizations"}),t.map(h=>jsxs("button",{type:"button",onClick:()=>{n?.(h.id),p(false);},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left hover:bg-white/[0.06] transition-colors",children:[jsxs("div",{className:"flex flex-col",children:[jsx("span",{className:"text-[13px] text-white/70",children:h.name}),h.role&&jsx("span",{className:"text-[10px] text-white/25 capitalize",children:h.role})]}),h.id===o&&jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/50",children:jsx("polyline",{points:"20 6 9 17 4 12"})})]},h.id))]}),jsxs("div",{className:"p-2",children:[jsx("a",{href:`${m.iam}/account`,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Account settings"}),jsx("a",{href:m.billing,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Billing"}),jsx("button",{type:"button",onClick:()=>{p(false),d?.();},className:"flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/40 hover:bg-white/[0.06] hover:text-red-400/70 transition-colors",children:"Sign out"})]})]})]})}l(tt,"UserOrgDropdown");function Lt({className:e}){return jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[jsx("path",{d:"M21 2v6h-6"}),jsx("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),jsx("path",{d:"M3 22v-6h6"}),jsx("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]})}l(Lt,"HardRefreshIcon");function Et({className:e}){return jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),jsx("circle",{cx:"12",cy:"12",r:"3"})]})}l(Et,"SettingsIcon");async function It(){try{if(localStorage.clear(),sessionStorage.clear(),document.cookie.split(";").forEach(e=>{let t=e.split("=")[0].trim();if(t){document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${location.hostname}`;let o=location.hostname.split(".");if(o.length>2){let n="."+o.slice(-2).join(".");document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${n}`;}}}),"caches"in window){let e=await caches.keys();await Promise.all(e.map(t=>caches.delete(t)));}if("serviceWorker"in navigator){let e=await navigator.serviceWorker.getRegistrations();await Promise.all(e.map(t=>t.unregister()));}if("indexedDB"in window&&indexedDB.databases)try{(await indexedDB.databases()).forEach(t=>{t.name&&indexedDB.deleteDatabase(t.name);});}catch{}}catch{}location.reload();}l(It,"hardRefresh");function Rt({currentApp:e,currentAppId:t,user:o,organizations:n,currentOrgId:d,onOrgSwitch:r,onSignOut:p,apps:s,headerRight:c,settingsHref:a,onSettingsClick:m,hideHardRefresh:h,hideSettings:f}){let[b,P]=useState(false),L=n?.find(k=>k.id===d)?.slug||"hanzo",u=s||K(L),S=A[L]||A.hanzo,$=useCallback(()=>{P(true),It();},[]),v=useCallback(()=>{m?m():window.location.href=a||`${S.iam}/account`;},[m,a,S.iam]);return jsxs("header",{className:"sticky top-0 z-50 flex h-14 w-full items-center justify-between border-b border-white/[0.07] bg-[#09090b]/90 px-4 backdrop-blur-xl",role:"banner",children:[jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[jsx("a",{href:`${S.iam}/account`,className:"flex-shrink-0 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Account",children:jsx(j,{size:22,brandMenu:true,animate:true})}),jsx("span",{className:"select-none text-white/[0.15]",children:"/"}),jsx("span",{className:"truncate text-[13px] font-medium text-white/50",children:e}),jsx(W,{apps:u,currentAppId:t})]}),jsxs("div",{className:"flex flex-shrink-0 items-center gap-1",children:[c,!h&&jsx("button",{type:"button",onClick:$,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Hard refresh \u2014 clear all storage, cookies, cache and reload",title:"Hard refresh",children:jsx(Lt,{className:b?"animate-spin":""})}),!f&&jsx("button",{type:"button",onClick:v,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Settings",title:"Settings",children:jsx(Et,{})}),jsx(tt,{user:o,organizations:n,currentOrgId:d,onOrgSwitch:r,onSignOut:p})]})]})}l(Rt,"HanzoHeader");var pt="hanzo-auth-token",ot="hanzo-user",dt="hanzo-auth-expires",Ut="https://iam.hanzo.ai",Tt={hanzo:{name:"Hanzo AI",slug:"hanzo"},lux:{name:"Lux Network",slug:"lux"},zoo:{name:"Zoo Labs",slug:"zoo"},pars:{name:"Pars",slug:"pars"}};function Vt(){let[e,t]=useState(void 0),[o,n]=useState([]),[d,r]=useState(void 0),[p,s]=useState(null),[c,a]=useState(true),m=useCallback(async()=>{try{let b=localStorage.getItem(pt),P=localStorage.getItem(dt);if(!b||P&&Date.now()>Number(P)){a(!1);return}s(b);let I=localStorage.getItem(ot);if(I)try{let u=JSON.parse(I);u?.email&&t({id:u.id,name:u.displayName||u.name,email:u.email,avatar:u.avatar});}catch{}let L=await fetch(`${Ut}/v1/iam/oauth/userinfo`,{headers:{Authorization:`Bearer ${b}`}});if(L.ok){let u=await L.json(),S={id:u.sub||u.id,name:u.name||u.displayName,email:u.email,avatar:u.picture||u.avatar};t(S),localStorage.setItem(ot,JSON.stringify(u));let v=(u.groups||[]).map(k=>{let R=k.toLowerCase().replace(/^\//,""),B=Tt[R];return B?{id:R,name:B.name,slug:B.slug}:null}).filter(Boolean);v.length===0&&S.email&&v.push({id:"personal",name:"Personal",slug:"personal"}),n(v),r(v[0]?.id);}}catch{}finally{a(false);}},[]);useEffect(()=>{m();},[m]);let h=useCallback(()=>{localStorage.removeItem(pt),localStorage.removeItem(ot),localStorage.removeItem(dt),window.location.href="https://hanzo.id";},[]),f=useCallback(b=>{r(b);},[]);return {user:e,organizations:o,currentOrgId:d,token:p,loading:c,signOut:h,switchOrg:f}}l(Vt,"useHanzoAuth");function $t(e,t){return e.filter(o=>o.id!==t).map(o=>({id:`app-${o.id}`,title:o.label,description:o.description,href:o.href,category:"Hanzo Apps",external:true,keywords:[o.id,o.label.toLowerCase()]}))}l($t,"buildCrossAppCommands");function Ft({commands:e=[],apps:t,currentAppId:o,open:n,onOpenChange:d,onNavigate:r}){var nt;let[p,s]=useState(false),c=n??p,a=useCallback(i=>{d?d(i):s(i);},[d]),[m,h]=useState(""),[f,b]=useState(0),P=useRef(null),I=useRef(null),L=$t(t??U,o),u=[...e,...L],S=m.toLowerCase(),$=S?u.filter(i=>i.title.toLowerCase().includes(S)||i.description?.toLowerCase().includes(S)||i.keywords?.some(z=>z.includes(S))):u,v={};for(let i of $)(v[nt=i.category]??(v[nt]=[])).push(i);let k=Object.values(v).flat();useEffect(()=>b(0),[m]),useEffect(()=>{c&&(h(""),b(0),requestAnimationFrame(()=>P.current?.focus()));},[c]),useEffect(()=>{let i=l(z=>{(z.metaKey||z.ctrlKey)&&z.key==="k"&&(z.preventDefault(),a(!c));},"handler");return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[c,a]);let R=useCallback(i=>{i.action?i.action():i.href&&(r?r(i.href,i.external):i.external?window.open(i.href,"_blank"):window.location.href=i.href),a(false);},[r,a]),B=useCallback(i=>{i.key==="ArrowDown"?(i.preventDefault(),b(z=>(z+1)%(k.length||1))):i.key==="ArrowUp"?(i.preventDefault(),b(z=>(z-1+(k.length||1))%(k.length||1))):i.key==="Enter"&&k[f]?(i.preventDefault(),R(k[f])):i.key==="Escape"&&a(false);},[k,f,R,a]);return useEffect(()=>{I.current?.querySelector(`[data-idx="${f}"]`)?.scrollIntoView({block:"nearest"});},[f]),c?jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[100]",onClick:()=>a(false)}),jsx("div",{className:"fixed top-[15%] left-1/2 -translate-x-1/2 w-full max-w-xl z-[101]",children:jsxs("div",{className:"bg-[#111113] border border-white/[0.08] rounded-xl shadow-2xl overflow-hidden",children:[jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-white/[0.07]",children:[jsx("svg",{className:"w-4 h-4 text-white/30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),jsx("input",{ref:P,type:"text",value:m,onChange:i=>h(i.target.value),onKeyDown:B,placeholder:"Search commands...",className:"flex-1 bg-transparent text-white text-[13px] placeholder-white/30 outline-none"}),jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono bg-white/[0.06] rounded text-white/30",children:"ESC"})]}),jsx("div",{ref:I,className:"max-h-[400px] overflow-y-auto py-1",children:k.length===0?jsxs("div",{className:"px-4 py-8 text-center text-white/30 text-[13px]",children:["No results for \u201C",m,"\u201D"]}):Object.entries(v).map(([i,z])=>jsxs("div",{children:[jsx("div",{className:"px-4 py-2 text-[10px] font-semibold text-white/25 uppercase tracking-widest",children:i}),z.map(O=>{let _=k.indexOf(O),Z=_===f;return jsxs("button",{"data-idx":_,onClick:()=>R(O),onMouseEnter:()=>b(_),className:`w-full flex items-center gap-3 px-4 py-2 text-left transition-colors ${Z?"bg-white/[0.06] text-white":"text-white/50 hover:bg-white/[0.03]"}`,children:[O.icon&&jsx("span",{className:`w-5 h-5 flex items-center justify-center ${Z?"text-white/70":"text-white/25"}`,children:O.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("span",{className:"text-[13px] font-medium truncate block",children:O.title}),O.description&&jsx("span",{className:"text-[11px] text-white/25 truncate block",children:O.description})]}),Z&&jsx("span",{className:"text-white/25 text-[11px]",children:"\u21B5"})]},O.id)})]},i))}),jsxs("div",{className:"px-4 py-2 border-t border-white/[0.07] flex items-center justify-between",children:[jsxs("div",{className:"flex items-center gap-4 text-[10px] text-white/20",children:[jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2191"}),jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2193"}),"navigate"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u21B5"}),"select"]})]}),jsx("span",{className:"text-[10px] text-white/20",children:"\u2318K"})]})]})})]}):null}l(Ft,"HanzoCommandPalette");
3
3
  export{W as AppSwitcher,Y as BeamAvatar,U as DEFAULT_HANZO_APPS,Ft as HanzoCommandPalette,Rt as HanzoHeader,j as HanzoMark,A as ORG_DOMAINS,Q as UserAvatar,tt as UserOrgDropdown,K as getAppsForOrg,Vt as useHanzoAuth};