{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "auth-split-brand",
  "type": "registry:component",
  "title": "Auth Split Brand",
  "description": "A full-width sign-in section: a brand panel with a drifting gradient and rotating customer quotes on one side, a complete email and password form with social buttons on the other.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "auth",
    "auth",
    "login",
    "sign in",
    "split",
    "testimonial",
    "form"
  ],
  "docs": "https://hyperblur.dev/effects/auth-split-brand",
  "files": [
    {
      "path": "registry/hyperblur/auth-split-brand.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/auth-split-brand.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface AuthSplitBrandLink {\n  label: string;\n  href: string;\n}\n\nexport interface AuthSplitBrandTestimonial {\n  quote: string;\n  name: string;\n  role: string;\n}\n\nexport interface AuthSplitBrandProvider {\n  id: string;\n  label: string;\n}\n\nexport interface AuthSplitBrandValues {\n  email: string;\n  password: string;\n  remember: boolean;\n}\n\nexport interface AuthSplitBrandProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onSubmit\"> {\n  brand?: string;\n  headline?: string;\n  stats?: string[];\n  testimonials?: AuthSplitBrandTestimonial[];\n  interval?: number;\n  title?: string;\n  signup?: AuthSplitBrandLink | null;\n  forgotHref?: string;\n  providers?: AuthSplitBrandProvider[];\n  onProviderClick?: (id: string) => void;\n  onSubmit?: (values: AuthSplitBrandValues) => void | Promise<unknown>;\n  defaultEmail?: string;\n  accent?: string;\n}\n\nconst css = `\n@keyframes hb-kf1-drift-a {\n  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }\n  50% { transform: translate3d(18%, 12%, 0) scale(1.15); }\n}\n@keyframes hb-kf1-drift-b {\n  0%, 100% { transform: translate3d(0, 0, 0) scale(1.1); }\n  50% { transform: translate3d(-16%, -10%, 0) scale(.92); }\n}\n@keyframes hb-kf1-quote {\n  from { opacity: 0; transform: translate3d(0, 10px, 0); filter: blur(4px); }\n  to { opacity: 1; transform: translate3d(0, 0, 0); filter: blur(0); }\n}\n@keyframes hb-kf1-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }\n@keyframes hb-kf1-spin { to { transform: rotate(360deg); } }\n@keyframes hb-kf1-pop {\n  from { opacity: 0; transform: scale(.6); }\n  to { opacity: 1; transform: scale(1); }\n}\n@keyframes hb-kf1-draw { to { stroke-dashoffset: 0; } }\n@keyframes hb-kf1-in {\n  from { opacity: 0; transform: translate3d(0, 8px, 0); }\n  to { opacity: 1; transform: translate3d(0, 0, 0); }\n}\n.hb-kf1 {\n  --hb-kf1-accent: #8b5cf6;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  padding: 12px;\n  container-type: inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-kf1 *, .hb-kf1 *::before, .hb-kf1 *::after { box-sizing: border-box; }\n.hb-kf1-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }\n.hb-kf1-brand {\n  position: relative;\n  isolation: isolate;\n  display: flex;\n  flex-direction: column;\n  gap: 28px;\n  min-height: 340px;\n  padding: 28px 24px 24px;\n  overflow: hidden;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 24px;\n  background: #0e0c16;\n}\n.hb-kf1-blob {\n  position: absolute;\n  z-index: -1;\n  width: 70%;\n  aspect-ratio: 1;\n  border-radius: 50%;\n  filter: blur(60px);\n  opacity: .75;\n  pointer-events: none;\n}\n.hb-kf1-blob[data-b=\"a\"] {\n  top: -20%;\n  left: -15%;\n  background: radial-gradient(circle, var(--hb-kf1-accent), transparent 68%);\n  animation: hb-kf1-drift-a 16s ease-in-out infinite;\n}\n.hb-kf1-blob[data-b=\"b\"] {\n  right: -25%;\n  bottom: -30%;\n  background: radial-gradient(circle, color-mix(in srgb, var(--hb-kf1-accent) 55%, #22d3ee), transparent 66%);\n  animation: hb-kf1-drift-b 19s ease-in-out infinite;\n}\n.hb-kf1-blob[data-b=\"c\"] {\n  top: 30%;\n  right: 10%;\n  width: 40%;\n  background: radial-gradient(circle, color-mix(in srgb, var(--hb-kf1-accent) 40%, #f472b6), transparent 70%);\n  opacity: .45;\n  animation: hb-kf1-drift-a 23s ease-in-out infinite reverse;\n}\n.hb-kf1-brand::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  background-image:\n    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),\n    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);\n  background-size: 44px 44px;\n  -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 10%, transparent 75%);\n  mask-image: radial-gradient(ellipse at 30% 20%, #000 10%, transparent 75%);\n}\n.hb-kf1-brand::after {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  background: linear-gradient(180deg, transparent 40%, rgba(8, 7, 12, .7));\n  border-radius: inherit;\n}\n.hb-kf1-logo { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }\n.hb-kf1-mark {\n  display: grid;\n  place-items: center;\n  width: 32px;\n  height: 32px;\n  border-radius: 10px;\n  background: linear-gradient(140deg, #fff, color-mix(in srgb, var(--hb-kf1-accent) 70%, #fff));\n  box-shadow: 0 6px 20px -6px var(--hb-kf1-accent), inset 0 1px 0 rgba(255, 255, 255, .8);\n  color: #0e0c16;\n}\n.hb-kf1-pitch { display: flex; flex-direction: column; gap: 16px; margin-top: auto; }\n.hb-kf1-headline {\n  margin: 0;\n  max-width: 15ch;\n  font-size: clamp(28px, 7cqw, 44px);\n  font-weight: 650;\n  line-height: 1.04;\n  letter-spacing: -.035em;\n  text-wrap: balance;\n}\n.hb-kf1-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }\n.hb-kf1-stats li {\n  padding: 6px 11px;\n  border: 1px solid rgba(255, 255, 255, .12);\n  border-radius: 999px;\n  background: rgba(255, 255, 255, .05);\n  color: rgba(255, 255, 255, .78);\n  font-size: 12px;\n  backdrop-filter: blur(6px);\n}\n.hb-kf1-quote {\n  position: relative;\n  margin: 0;\n  padding: 20px;\n  border: 1px solid rgba(255, 255, 255, .12);\n  border-radius: 18px;\n  background: rgba(14, 12, 22, .55);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);\n  backdrop-filter: blur(14px);\n}\n.hb-kf1-qbody { animation: hb-kf1-quote .6s cubic-bezier(.2, .7, .2, 1) both; }\n.hb-kf1-qtext { margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .92); text-wrap: pretty; }\n.hb-kf1-who { display: flex; align-items: center; gap: 10px; }\n.hb-kf1-avatar {\n  display: grid;\n  place-items: center;\n  flex: none;\n  width: 34px;\n  height: 34px;\n  border-radius: 50%;\n  font-size: 12px;\n  font-weight: 700;\n  color: #fff;\n}\n.hb-kf1-name { display: block; font-size: 13px; font-weight: 600; }\n.hb-kf1-role { display: block; font-size: 12px; color: rgba(255, 255, 255, .55); }\n.hb-kf1-dots { display: flex; gap: 6px; margin-left: auto; }\n.hb-kf1-dot {\n  position: relative;\n  width: 22px;\n  height: 4px;\n  padding: 0;\n  overflow: hidden;\n  border: 0;\n  border-radius: 99px;\n  background: rgba(255, 255, 255, .18);\n  cursor: pointer;\n}\n.hb-kf1-dot::after {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  border-radius: inherit;\n  background: #fff;\n  transform: scaleX(0);\n  transform-origin: left;\n}\n.hb-kf1-dot[aria-current=\"true\"]::after { animation: hb-kf1-bar var(--hb-kf1-int, 6s) linear both; }\n.hb-kf1[data-paused=\"true\"] .hb-kf1-dot[aria-current=\"true\"]::after { animation: none; transform: scaleX(1); }\n.hb-kf1-dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }\n.hb-kf1-side { display: flex; align-items: center; justify-content: center; padding: 36px 12px 28px; }\n.hb-kf1-form-wrap { width: 100%; max-width: 380px; }\n.hb-kf1-title { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.025em; }\n.hb-kf1-lede { margin: 8px 0 26px; color: #8f8f8f; font-size: 14px; }\n.hb-kf1-a { color: #ededed; font-weight: 550; text-decoration: none; border-radius: 4px; }\n.hb-kf1-a:hover { color: color-mix(in srgb, var(--hb-kf1-accent) 50%, #fff); text-decoration: underline; text-underline-offset: 3px; }\n.hb-kf1-a:focus-visible { outline: 2px solid var(--hb-kf1-accent); outline-offset: 3px; }\n.hb-kf1-social { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }\n.hb-kf1-sbtn {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  gap: 8px;\n  height: 42px;\n  padding: 0 10px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 12px;\n  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);\n  color: #ededed;\n  font: inherit;\n  font-size: 13px;\n  font-weight: 550;\n  cursor: pointer;\n  transition: border-color .2s ease, background .2s ease, transform .2s ease;\n}\n.hb-kf1-sbtn:hover { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .07); }\n.hb-kf1-sbtn:active { transform: translateY(1px); }\n.hb-kf1-sbtn:focus-visible { outline: 2px solid var(--hb-kf1-accent); outline-offset: 2px; }\n.hb-kf1-sbtn svg { flex: none; color: #a1a1a1; }\n.hb-kf1-or {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  margin: 22px 0;\n  color: #6f6f6f;\n  font-size: 12px;\n}\n.hb-kf1-or::before, .hb-kf1-or::after { content: \"\"; flex: 1; height: 1px; background: rgba(255, 255, 255, .08); }\n.hb-kf1-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }\n.hb-kf1-field { display: flex; flex-direction: column; gap: 7px; }\n.hb-kf1-lrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }\n.hb-kf1-label { font-size: 13px; font-weight: 550; color: #d4d4d4; }\n.hb-kf1-forgot { color: #8f8f8f; font-size: 12px; text-decoration: none; border-radius: 4px; }\n.hb-kf1-forgot:hover { color: #ededed; }\n.hb-kf1-forgot:focus-visible { outline: 2px solid var(--hb-kf1-accent); outline-offset: 2px; }\n.hb-kf1-control { position: relative; }\n.hb-kf1-input {\n  display: block;\n  width: 100%;\n  height: 44px;\n  padding: 0 14px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 12px;\n  background: #111;\n  color: #ededed;\n  font: inherit;\n  font-size: 14px;\n  outline: none;\n  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;\n}\n.hb-kf1-input::placeholder { color: #5c5c5c; }\n.hb-kf1-input:hover { border-color: rgba(255, 255, 255, .18); }\n.hb-kf1-input:focus {\n  border-color: var(--hb-kf1-accent);\n  background: #141217;\n  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb-kf1-accent) 22%, transparent);\n}\n.hb-kf1-input[data-pw=\"true\"] { padding-right: 48px; }\n.hb-kf1-input[aria-invalid=\"true\"] { border-color: #f87171; }\n.hb-kf1-input[aria-invalid=\"true\"]:focus { box-shadow: 0 0 0 4px rgba(248, 113, 113, .2); }\n.hb-kf1-eye {\n  position: absolute;\n  top: 50%;\n  right: 6px;\n  display: grid;\n  place-items: center;\n  width: 34px;\n  height: 34px;\n  padding: 0;\n  border: 0;\n  border-radius: 9px;\n  background: transparent;\n  color: #8f8f8f;\n  cursor: pointer;\n  transform: translateY(-50%);\n  transition: color .15s ease, background .15s ease;\n}\n.hb-kf1-eye:hover { color: #ededed; background: rgba(255, 255, 255, .06); }\n.hb-kf1-eye:focus-visible { outline: 2px solid var(--hb-kf1-accent); outline-offset: 0; }\n.hb-kf1-err { display: flex; align-items: center; gap: 6px; margin: 0; color: #fca5a5; font-size: 12px; animation: hb-kf1-in .2s ease both; }\n.hb-kf1-check { display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: #a1a1a1; font-size: 13px; cursor: pointer; user-select: none; }\n.hb-kf1-check input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }\n.hb-kf1-box {\n  display: grid;\n  place-items: center;\n  width: 18px;\n  height: 18px;\n  border: 1px solid rgba(255, 255, 255, .2);\n  border-radius: 6px;\n  background: #111;\n  color: #fff;\n  transition: background .15s ease, border-color .15s ease;\n}\n.hb-kf1-box svg { opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease; }\n.hb-kf1-check input:checked + .hb-kf1-box { border-color: var(--hb-kf1-accent); background: var(--hb-kf1-accent); }\n.hb-kf1-check input:checked + .hb-kf1-box svg { opacity: 1; transform: scale(1); }\n.hb-kf1-check input:focus-visible + .hb-kf1-box { outline: 2px solid var(--hb-kf1-accent); outline-offset: 2px; }\n.hb-kf1-submit {\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  gap: 10px;\n  height: 46px;\n  margin-top: 4px;\n  overflow: hidden;\n  border: 0;\n  border-radius: 12px;\n  background: linear-gradient(180deg, color-mix(in srgb, var(--hb-kf1-accent) 82%, #fff), var(--hb-kf1-accent));\n  box-shadow: 0 10px 30px -12px var(--hb-kf1-accent), inset 0 1px 0 rgba(255, 255, 255, .35);\n  color: #fff;\n  font: inherit;\n  font-size: 14px;\n  font-weight: 600;\n  cursor: pointer;\n  transition: filter .2s ease, transform .2s ease;\n}\n.hb-kf1-submit:hover:not(:disabled) { filter: brightness(1.08); }\n.hb-kf1-submit:active:not(:disabled) { transform: translateY(1px); }\n.hb-kf1-submit:disabled { cursor: progress; opacity: .85; }\n.hb-kf1-submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }\n.hb-kf1-spin { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: hb-kf1-spin .7s linear infinite; }\n.hb-kf1-alert {\n  margin: 0;\n  padding: 10px 12px;\n  border: 1px solid rgba(248, 113, 113, .3);\n  border-radius: 10px;\n  background: rgba(248, 113, 113, .08);\n  color: #fecaca;\n  font-size: 13px;\n  animation: hb-kf1-in .25s ease both;\n}\n.hb-kf1-legal { margin: 22px 0 0; color: #6f6f6f; font-size: 12px; line-height: 1.6; text-align: center; }\n.hb-kf1-done { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 0; text-align: center; animation: hb-kf1-in .35s ease both; }\n.hb-kf1-ok {\n  display: grid;\n  place-items: center;\n  width: 64px;\n  height: 64px;\n  margin-bottom: 8px;\n  border-radius: 50%;\n  background: color-mix(in srgb, var(--hb-kf1-accent) 18%, transparent);\n  box-shadow: 0 0 0 8px color-mix(in srgb, var(--hb-kf1-accent) 8%, transparent);\n  color: color-mix(in srgb, var(--hb-kf1-accent) 55%, #fff);\n  animation: hb-kf1-pop .45s cubic-bezier(.2, 1.4, .4, 1) both;\n}\n.hb-kf1-ok path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: hb-kf1-draw .45s .2s ease forwards; }\n.hb-kf1-done h3 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.02em; }\n.hb-kf1-done p { margin: 0 0 12px; color: #8f8f8f; font-size: 14px; line-height: 1.55; }\n.hb-kf1-ghost {\n  height: 40px;\n  padding: 0 16px;\n  border: 1px solid rgba(255, 255, 255, .12);\n  border-radius: 10px;\n  background: transparent;\n  color: #ededed;\n  font: inherit;\n  font-size: 13px;\n  cursor: pointer;\n}\n.hb-kf1-ghost:hover { background: rgba(255, 255, 255, .05); }\n.hb-kf1-ghost:focus-visible { outline: 2px solid var(--hb-kf1-accent); outline-offset: 2px; }\n.hb-kf1-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n@container (min-width: 820px) {\n  .hb-kf1-grid { grid-template-columns: 1.08fr 1fr; min-height: 620px; }\n  .hb-kf1-brand { min-height: 100%; padding: 36px; }\n  .hb-kf1-side { padding: 48px 40px; }\n}\n@container (max-width: 420px) {\n  .hb-kf1-sbtn span { display: none; }\n  .hb-kf1-brand { padding: 22px 18px 18px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-kf1-blob, .hb-kf1-qbody, .hb-kf1-dot::after, .hb-kf1-err, .hb-kf1-alert, .hb-kf1-done, .hb-kf1-ok, .hb-kf1-ok path { animation: none; }\n  .hb-kf1-ok path { stroke-dashoffset: 0; }\n  .hb-kf1-dot[aria-current=\"true\"]::after { transform: scaleX(1); }\n  .hb-kf1-input, .hb-kf1-sbtn, .hb-kf1-submit, .hb-kf1-box, .hb-kf1-box svg, .hb-kf1-eye { transition: none; }\n  .hb-kf1-spin { animation-duration: 2s; }\n}\n`;\n\nconst defaultTestimonials: AuthSplitBrandTestimonial[] = [\n  {\n    quote: \"We moved 38 services onto Lumen in a weekend. Release day went from a war room to a Slack message.\",\n    name: \"Priya Raman\",\n    role: \"Head of Platform, Fernhill\",\n  },\n  {\n    quote: \"Preview environments for every pull request cut our review time almost in half. Nobody wants to go back.\",\n    name: \"Marcus Oyelaran\",\n    role: \"Staff Engineer, Tidewater\",\n  },\n  {\n    quote: \"Rollbacks take nine seconds now. I sleep through on-call weeks, which I did not think was possible.\",\n    name: \"Elena Sokolova\",\n    role: \"SRE Lead, Quartzline\",\n  },\n];\n\nconst defaultProviders: AuthSplitBrandProvider[] = [\n  { id: \"google\", label: \"Google\" },\n  { id: \"github\", label: \"GitHub\" },\n  { id: \"sso\", label: \"SSO\" },\n];\n\nconst avatarHues = [262, 190, 330, 30, 150];\n\nfunction hashName(value: string) {\n  let h = 0;\n  for (let i = 0; i < value.length; i++) h = (h * 31 + value.charCodeAt(i)) | 0;\n  return Math.abs(h);\n}\n\nfunction initials(name: string) {\n  return name\n    .split(\" \")\n    .filter(Boolean)\n    .slice(0, 2)\n    .map((part) => part[0])\n    .join(\"\")\n    .toUpperCase();\n}\n\nfunction wait(result: unknown) {\n  return result instanceof Promise ? result : new Promise((resolve) => setTimeout(resolve, 900));\n}\n\nconst emailPattern = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]{2,}$/;\n\nfunction Glyph({ index }: { index: number }) {\n  if (index % 3 === 0) {\n    return (\n      <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n        <circle cx=\"8\" cy=\"8\" r=\"6\" stroke=\"currentColor\" strokeWidth=\"1.6\" />\n        <path d=\"M8 8h5\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" />\n      </svg>\n    );\n  }\n  if (index % 3 === 1) {\n    return (\n      <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n        <path d=\"M8 1.8 13.4 5v6L8 14.2 2.6 11V5L8 1.8Z\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinejoin=\"round\" />\n        <circle cx=\"8\" cy=\"8\" r=\"1.8\" fill=\"currentColor\" />\n      </svg>\n    );\n  }\n  return (\n    <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n      <circle cx=\"5.5\" cy=\"8\" r=\"3\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n      <path d=\"M8.5 8H14M12 8v2.5M14 8v2\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n    </svg>\n  );\n}\n\nfunction EyeIcon({ open }: { open: boolean }) {\n  return (\n    <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.7\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n      <path d=\"M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z\" />\n      <circle cx=\"12\" cy=\"12\" r=\"2.8\" />\n      {open ? null : <path d=\"M4 20 20 4\" />}\n    </svg>\n  );\n}\n\nexport function AuthSplitBrand({\n  brand = \"Lumen\",\n  headline = \"Every release, one calm place to ship it.\",\n  stats = [\"4,200 teams\", \"99.99% uptime\", \"SOC 2 Type II\"],\n  testimonials = defaultTestimonials,\n  interval = 6000,\n  title = \"Welcome back\",\n  signup = { label: \"Start a free trial\", href: \"#signup\" },\n  forgotHref = \"#forgot\",\n  providers = defaultProviders,\n  onProviderClick,\n  onSubmit,\n  defaultEmail = \"\",\n  accent = \"#8b5cf6\",\n  className = \"\",\n  style,\n  ...rest\n}: AuthSplitBrandProps) {\n  const uid = React.useId();\n  const [index, setIndex] = React.useState(0);\n  const [paused, setPaused] = React.useState(false);\n  const [email, setEmail] = React.useState(defaultEmail);\n  const [password, setPassword] = React.useState(\"\");\n  const [remember, setRemember] = React.useState(true);\n  const [show, setShow] = React.useState(false);\n  const [touched, setTouched] = React.useState({ email: false, password: false });\n  const [submitted, setSubmitted] = React.useState(false);\n  const [status, setStatus] = React.useState<\"idle\" | \"loading\" | \"success\">(\"idle\");\n  const [formError, setFormError] = React.useState(\"\");\n  const emailRef = React.useRef<HTMLInputElement>(null);\n  const passwordRef = React.useRef<HTMLInputElement>(null);\n  const count = testimonials.length;\n  const active = count ? testimonials[index % count] : null;\n\n  React.useEffect(() => {\n    if (paused || count < 2) return;\n    const id = window.setInterval(() => setIndex((i) => (i + 1) % count), interval);\n    return () => window.clearInterval(id);\n  }, [paused, count, interval]);\n\n  const emailError = !email.trim()\n    ? \"Enter your email address.\"\n    : !emailPattern.test(email.trim())\n      ? \"Enter a valid email, like name@company.com.\"\n      : \"\";\n  const passwordError = !password ? \"Enter your password.\" : password.length < 8 ? \"Passwords are at least 8 characters.\" : \"\";\n  const showEmailError = (touched.email || submitted) && emailError;\n  const showPasswordError = (touched.password || submitted) && passwordError;\n  const loading = status === \"loading\";\n\n  async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    if (loading) return;\n    setSubmitted(true);\n    setFormError(\"\");\n    if (emailError) {\n      emailRef.current?.focus();\n      return;\n    }\n    if (passwordError) {\n      passwordRef.current?.focus();\n      return;\n    }\n    setStatus(\"loading\");\n    try {\n      await wait(onSubmit?.({ email: email.trim(), password, remember }));\n      setStatus(\"success\");\n    } catch (error) {\n      setStatus(\"idle\");\n      setFormError(error instanceof Error && error.message ? error.message : \"We could not sign you in. Try again.\");\n    }\n  }\n\n  function reset() {\n    setStatus(\"idle\");\n    setPassword(\"\");\n    setSubmitted(false);\n    setTouched({ email: false, password: false });\n  }\n\n  const vars = { \"--hb-kf1-accent\": accent, \"--hb-kf1-int\": `${interval}ms`, ...style } as React.CSSProperties;\n  const hue = active ? avatarHues[hashName(active.name) % avatarHues.length] : 0;\n\n  return (\n    <section className={`hb-kf1 ${className}`} style={vars} data-paused={paused ? \"true\" : undefined} aria-labelledby={`${uid}-t`} {...rest}>\n      <style href=\"hb-auth-split-brand\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kf1-grid\">\n        <div\n          className=\"hb-kf1-brand\"\n          onPointerEnter={() => setPaused(true)}\n          onPointerLeave={() => setPaused(false)}\n          onFocus={() => setPaused(true)}\n          onBlur={() => setPaused(false)}\n        >\n          <span className=\"hb-kf1-blob\" data-b=\"a\" aria-hidden=\"true\" />\n          <span className=\"hb-kf1-blob\" data-b=\"b\" aria-hidden=\"true\" />\n          <span className=\"hb-kf1-blob\" data-b=\"c\" aria-hidden=\"true\" />\n          <div className=\"hb-kf1-logo\">\n            <span className=\"hb-kf1-mark\" aria-hidden=\"true\">\n              <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n                <path d=\"M8 1.5 14.5 8 8 14.5 1.5 8 8 1.5Zm0 3.6L5.1 8 8 10.9 10.9 8 8 5.1Z\" />\n              </svg>\n            </span>\n            {brand}\n          </div>\n          <div className=\"hb-kf1-pitch\">\n            <p className=\"hb-kf1-headline\">{headline}</p>\n            {stats.length ? (\n              <ul className=\"hb-kf1-stats\">\n                {stats.map((stat) => (\n                  <li key={stat}>{stat}</li>\n                ))}\n              </ul>\n            ) : null}\n          </div>\n          {active ? (\n            <figure className=\"hb-kf1-quote\" aria-roledescription=\"carousel\" aria-label=\"Customer stories\">\n              <div className=\"hb-kf1-qbody\" key={index} aria-live={paused ? \"polite\" : \"off\"}>\n                <blockquote className=\"hb-kf1-qtext\">\n                  &ldquo;{active.quote}&rdquo;\n                </blockquote>\n              </div>\n              <figcaption className=\"hb-kf1-who\">\n                <span className=\"hb-kf1-avatar\" aria-hidden=\"true\" style={{ background: `linear-gradient(135deg, hsl(${hue} 70% 58%), hsl(${(hue + 40) % 360} 70% 42%))` }}>\n                  {initials(active.name)}\n                </span>\n                <span>\n                  <span className=\"hb-kf1-name\">{active.name}</span>\n                  <span className=\"hb-kf1-role\">{active.role}</span>\n                </span>\n                {count > 1 ? (\n                  <span className=\"hb-kf1-dots\">\n                    {testimonials.map((t, i) => (\n                      <button\n                        type=\"button\"\n                        key={t.name}\n                        className=\"hb-kf1-dot\"\n                        aria-label={`Show story ${i + 1} of ${count}`}\n                        aria-current={i === index % count ? \"true\" : undefined}\n                        onClick={() => setIndex(i)}\n                      />\n                    ))}\n                  </span>\n                ) : null}\n              </figcaption>\n            </figure>\n          ) : null}\n        </div>\n        <div className=\"hb-kf1-side\">\n          <div className=\"hb-kf1-form-wrap\">\n            {status === \"success\" ? (\n              <div className=\"hb-kf1-done\" role=\"status\">\n                <span className=\"hb-kf1-ok\" aria-hidden=\"true\">\n                  <svg width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n                    <path d=\"M5 12.5l4.5 4.5L19 7.5\" />\n                  </svg>\n                </span>\n                <h3 id={`${uid}-t`}>You&apos;re signed in</h3>\n                <p>\n                  Welcome back to {brand}. We&apos;re opening your workspace as {email.trim()}.\n                </p>\n                <button type=\"button\" className=\"hb-kf1-ghost\" onClick={reset}>\n                  Use another account\n                </button>\n              </div>\n            ) : (\n              <>\n                <h2 className=\"hb-kf1-title\" id={`${uid}-t`}>\n                  {title}\n                </h2>\n                <p className=\"hb-kf1-lede\">\n                  {signup ? (\n                    <>\n                      New to {brand}?{\" \"}\n                      <a className=\"hb-kf1-a\" href={signup.href}>\n                        {signup.label}\n                      </a>\n                    </>\n                  ) : (\n                    `Sign in to continue to ${brand}.`\n                  )}\n                </p>\n                {providers.length ? (\n                  <>\n                    <div className=\"hb-kf1-social\">\n                      {providers.map((provider, i) => (\n                        <button\n                          type=\"button\"\n                          key={provider.id}\n                          className=\"hb-kf1-sbtn\"\n                          aria-label={`Continue with ${provider.label}`}\n                          disabled={loading}\n                          onClick={() => onProviderClick?.(provider.id)}\n                        >\n                          <Glyph index={i} />\n                          <span>{provider.label}</span>\n                        </button>\n                      ))}\n                    </div>\n                    <div className=\"hb-kf1-or\">or continue with email</div>\n                  </>\n                ) : null}\n                <form className=\"hb-kf1-form\" noValidate onSubmit={handleSubmit} aria-busy={loading || undefined}>\n                  {formError ? (\n                    <p className=\"hb-kf1-alert\" role=\"alert\">\n                      {formError}\n                    </p>\n                  ) : null}\n                  <div className=\"hb-kf1-field\">\n                    <label className=\"hb-kf1-label\" htmlFor={`${uid}-email`}>\n                      Work email\n                    </label>\n                    <input\n                      ref={emailRef}\n                      id={`${uid}-email`}\n                      className=\"hb-kf1-input\"\n                      type=\"email\"\n                      name=\"email\"\n                      autoComplete=\"email\"\n                      placeholder=\"you@company.com\"\n                      value={email}\n                      disabled={loading}\n                      onChange={(e) => setEmail(e.target.value)}\n                      onBlur={() => setTouched((t) => ({ ...t, email: true }))}\n                      aria-invalid={showEmailError ? true : undefined}\n                      aria-describedby={showEmailError ? `${uid}-email-err` : undefined}\n                    />\n                    {showEmailError ? (\n                      <p className=\"hb-kf1-err\" id={`${uid}-email-err`}>\n                        {emailError}\n                      </p>\n                    ) : null}\n                  </div>\n                  <div className=\"hb-kf1-field\">\n                    <div className=\"hb-kf1-lrow\">\n                      <label className=\"hb-kf1-label\" htmlFor={`${uid}-pw`}>\n                        Password\n                      </label>\n                      <a className=\"hb-kf1-forgot\" href={forgotHref}>\n                        Forgot password?\n                      </a>\n                    </div>\n                    <div className=\"hb-kf1-control\">\n                      <input\n                        ref={passwordRef}\n                        id={`${uid}-pw`}\n                        className=\"hb-kf1-input\"\n                        data-pw=\"true\"\n                        type={show ? \"text\" : \"password\"}\n                        name=\"password\"\n                        autoComplete=\"current-password\"\n                        placeholder=\"At least 8 characters\"\n                        value={password}\n                        disabled={loading}\n                        onChange={(e) => setPassword(e.target.value)}\n                        onBlur={() => setTouched((t) => ({ ...t, password: true }))}\n                        aria-invalid={showPasswordError ? true : undefined}\n                        aria-describedby={showPasswordError ? `${uid}-pw-err` : undefined}\n                      />\n                      <button\n                        type=\"button\"\n                        className=\"hb-kf1-eye\"\n                        aria-label={show ? \"Hide password\" : \"Show password\"}\n                        aria-pressed={show}\n                        aria-controls={`${uid}-pw`}\n                        onClick={() => setShow((s) => !s)}\n                      >\n                        <EyeIcon open={show} />\n                      </button>\n                    </div>\n                    {showPasswordError ? (\n                      <p className=\"hb-kf1-err\" id={`${uid}-pw-err`}>\n                        {passwordError}\n                      </p>\n                    ) : null}\n                  </div>\n                  <label className=\"hb-kf1-check\">\n                    <input type=\"checkbox\" name=\"remember\" checked={remember} disabled={loading} onChange={(e) => setRemember(e.target.checked)} />\n                    <span className=\"hb-kf1-box\" aria-hidden=\"true\">\n                      <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n                        <path d=\"M2.5 6.2 5 8.5l4.5-5\" />\n                      </svg>\n                    </span>\n                    Keep me signed in for 30 days\n                  </label>\n                  <button type=\"submit\" className=\"hb-kf1-submit\" disabled={loading}>\n                    {loading ? <span className=\"hb-kf1-spin\" aria-hidden=\"true\" /> : null}\n                    {loading ? \"Signing in\" : \"Sign in\"}\n                  </button>\n                  <span className=\"hb-kf1-sr\" role=\"status\">\n                    {loading ? \"Signing in\" : \"\"}\n                  </span>\n                </form>\n                <p className=\"hb-kf1-legal\">Protected by single sign-on and hardware key support.</p>\n              </>\n            )}\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}