{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "contact-route-map",
  "type": "registry:component",
  "title": "Contact Route Map",
  "description": "A street map card that draws the route from the station to your studio for walking, tram or bike, with a traveling marker and step list. A validated visit form overlaps the map and confirms with the chosen route.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "contact",
    "contact",
    "map",
    "route",
    "form",
    "directions",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/contact-route-map",
  "files": [
    {
      "path": "registry/hyperblur/contact-route-map.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/contact-route-map.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport type ContactRouteMode = \"walk\" | \"transit\" | \"bike\";\n\nexport interface ContactRoute {\n  mode: ContactRouteMode;\n  label: string;\n  minutes: number;\n  distance: string;\n  steps: string[];\n}\n\nexport interface ContactRouteMapValues {\n  name: string;\n  email: string;\n  message: string;\n}\n\nexport interface ContactRouteMapProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onSubmit\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  studio?: string;\n  address?: string[];\n  hours?: string;\n  origin?: string;\n  routes?: ContactRoute[];\n  defaultMode?: ContactRouteMode;\n  mapLink?: { label: string; href: string };\n  onModeChange?: (mode: ContactRouteMode) => void;\n  onSubmit?: (values: ContactRouteMapValues) => void | Promise<void>;\n  accent?: string;\n}\n\nconst defaultRoutes: ContactRoute[] = [\n  { mode: \"walk\", label: \"Walk\", minutes: 17, distance: \"1.3 km\", steps: [\"Exit Central Station via Gate B\", \"Follow Canal Street north for 400 m\", \"Turn right on Weaver Lane\", \"Studio is the red door at No. 14\"] },\n  { mode: \"transit\", label: \"Tram\", minutes: 9, distance: \"3 stops\", steps: [\"Line 4 toward Harbour from platform 2\", \"Ride three stops to Mill Square\", \"Walk 2 minutes east on Weaver Lane\", \"Ring Halden at the red door\"] },\n  { mode: \"bike\", label: \"Bike\", minutes: 6, distance: \"1.6 km\", steps: [\"Docking bay on the station forecourt\", \"Riverside cycle path, flat all the way\", \"Up Foundry Road to the bridge\", \"Racks right outside No. 14\"] },\n];\n\nconst paths: Record<ContactRouteMode, string> = {\n  walk: \"M128 440 L128 330 L376 330 L376 220 L624 220 L624 168\",\n  transit: \"M128 440 L254 440 C 330 440 392 300 500 236 C 540 214 580 220 624 220 L624 168\",\n  bike: \"M128 440 L500 440 L500 112 L624 112 L624 168\",\n};\n\nconst stops: Record<ContactRouteMode, [number, number][]> = {\n  walk: [],\n  transit: [[254, 440], [404, 330], [500, 236]],\n  bike: [[500, 276]],\n};\n\nconst cols = [0, 128, 254, 376, 500, 624, 752, 860];\nconst rows = [0, 112, 220, 330, 440, 560];\n\nfunction hash(n: number) {\n  let x = (n * 2654435761) >>> 0;\n  x ^= x >>> 15;\n  x = Math.imul(x, 2246822519) >>> 0;\n  x ^= x >>> 13;\n  return x >>> 0;\n}\n\nconst blocks = (() => {\n  const out: { x: number; y: number; w: number; h: number; kind: number }[] = [];\n  let i = 0;\n  for (let r = 0; r < rows.length - 1; r++) {\n    for (let c = 0; c < cols.length - 1; c++) {\n      const h = hash(i + 7);\n      const x = cols[c] + 9;\n      const y = rows[r] + 9;\n      const w = cols[c + 1] - cols[c] - 18;\n      const hh = rows[r + 1] - rows[r] - 18;\n      const kind = r === 1 && c === 1 ? 2 : r === 3 && c === 5 ? 2 : h % 5 === 0 ? 1 : 0;\n      if (kind === 0 && h % 3 === 0) {\n        const split = Math.round(w * (0.38 + (h % 20) / 100));\n        out.push({ x, y, w: split - 5, h: hh, kind });\n        out.push({ x: x + split + 5, y, w: w - split - 5, h: hh, kind });\n      } else {\n        out.push({ x, y, w, h: hh, kind });\n      }\n      i++;\n    }\n  }\n  return out;\n})();\n\nconst css = `\n@keyframes hb-wd1-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }\n@keyframes hb-wd1-travel { from { offset-distance: 0%; } to { offset-distance: 100%; } }\n@keyframes hb-wd1-pulse { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(2.6); opacity: 0; } }\n@keyframes hb-wd1-drop { 0% { transform: translateY(-26px); opacity: 0; } 60% { transform: translateY(3px); opacity: 1; } 100% { transform: none; } }\n@keyframes hb-wd1-step { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }\n@keyframes hb-wd1-spin { to { transform: rotate(360deg); } }\n@keyframes hb-wd1-check { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }\n.hb-wd1 {\n  --hb-wd1-accent: #10b981;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  overflow: hidden;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-wd1 *, .hb-wd1 *::before, .hb-wd1 *::after { box-sizing: border-box; }\n.hb-wd1-in { position: relative; max-width: 1120px; margin: 0 auto; padding: 72px 20px 88px; }\n.hb-wd1-head { display: grid; gap: 14px; margin-bottom: 32px; }\n@container (min-width: 820px) { .hb-wd1-head { grid-template-columns: 1.1fr 1fr; align-items: end; gap: 40px; } }\n.hb-wd1-eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--font-mono, ui-monospace, monospace); letter-spacing: 0.08em; text-transform: uppercase; color: var(--hb-wd1-accent); }\n.hb-wd1-eyebrow::before { content: \"\"; width: 18px; height: 1px; background: currentColor; }\n.hb-wd1-title { margin: 10px 0 0; font: 600 clamp(30px, 4.6cqw, 48px)/1.04 var(--font-grotesk, inherit); letter-spacing: -0.03em; }\n.hb-wd1-sub { margin: 0; color: #8f8f8f; font-size: 15px; line-height: 1.6; max-width: 46ch; }\n.hb-wd1-grid { display: grid; gap: 16px; }\n@container (min-width: 880px) { .hb-wd1-grid { grid-template-columns: 1.45fr 1fr; gap: 0; align-items: center; } }\n.hb-wd1-mapcard { position: relative; border-radius: 20px; border: 1px solid rgba(255,255,255,0.08); background: #0e0f10; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); }\n.hb-wd1-svg { display: block; width: 100%; height: auto; aspect-ratio: 860 / 560; }\n.hb-wd1-block { fill: #16181a; stroke: rgba(255,255,255,0.035); }\n.hb-wd1-block[data-kind=\"1\"] { fill: #1b1d20; }\n.hb-wd1-block[data-kind=\"2\"] { fill: color-mix(in srgb, var(--hb-wd1-accent) 12%, #121413); stroke: color-mix(in srgb, var(--hb-wd1-accent) 18%, transparent); }\n.hb-wd1-river { fill: none; stroke: #0f1a24; stroke-width: 38; stroke-linecap: round; }\n.hb-wd1-river-edge { fill: none; stroke: rgba(127,179,255,0.12); stroke-width: 40; stroke-linecap: round; }\n.hb-wd1-streetname { font: 500 9px var(--font-mono, monospace); fill: #4a4d52; letter-spacing: 0.12em; text-transform: uppercase; }\n.hb-wd1-ghost { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }\n.hb-wd1-route { fill: none; stroke: var(--hb-wd1-accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; animation: hb-wd1-draw 1.1s cubic-bezier(0.65, 0, 0.35, 1) both; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--hb-wd1-accent) 60%, transparent)); }\n.hb-wd1-route[data-mode=\"transit\"] { stroke-dasharray: 1; }\n.hb-wd1-rail { fill: none; stroke: #0e0f10; stroke-width: 1.6; stroke-dasharray: 6 8; stroke-linecap: round; }\n.hb-wd1-stop { fill: #0e0f10; stroke: var(--hb-wd1-accent); stroke-width: 3; }\n.hb-wd1-dot { offset-rotate: 0deg; animation: hb-wd1-travel 3.6s cubic-bezier(0.45, 0, 0.25, 1) 1.1s infinite; }\n.hb-wd1-origin-pulse { transform-box: fill-box; transform-origin: center; animation: hb-wd1-pulse 2.2s cubic-bezier(0.2, 0.6, 0.3, 1) infinite; fill: #7fb3ff; }\n.hb-wd1-pin { animation: hb-wd1-drop 0.7s cubic-bezier(0.3, 1.4, 0.5, 1) 0.9s both; }\n.hb-wd1-label { font: 600 12px var(--font-sans, sans-serif); fill: #ededed; }\n.hb-wd1-label-sub { font: 500 10px var(--font-mono, monospace); fill: #8f8f8f; }\n.hb-wd1-chip-bg { fill: rgba(10,10,10,0.86); stroke: rgba(255,255,255,0.1); }\n.hb-wd1-modes { position: absolute; left: 14px; top: 14px; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(10,10,10,0.78); border: 1px solid rgba(255,255,255,0.08); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }\n.hb-wd1-mode { appearance: none; border: 0; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: transparent; color: #a1a1a1; font: 500 12.5px/1 inherit; font-family: inherit; cursor: pointer; transition: background-color 0.25s ease, color 0.25s ease; }\n.hb-wd1-mode:hover { color: #ededed; }\n.hb-wd1-mode[aria-selected=\"true\"] { background: #ededed; color: #0a0a0a; }\n.hb-wd1-mode:focus-visible { outline: 2px solid var(--hb-wd1-accent); outline-offset: 2px; }\n.hb-wd1-mode svg { width: 14px; height: 14px; }\n.hb-wd1-eta { position: absolute; left: 14px; bottom: 14px; right: 14px; display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: rgba(10,10,10,0.82); border: 1px solid rgba(255,255,255,0.08); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }\n@container (min-width: 600px) { .hb-wd1-eta { right: auto; width: min(320px, 52%); } }\n.hb-wd1-eta-top { display: flex; align-items: baseline; gap: 10px; }\n.hb-wd1-eta-min { font: 600 26px/1 var(--font-grotesk, inherit); letter-spacing: -0.02em; }\n.hb-wd1-eta-min span { font-size: 13px; color: #8f8f8f; margin-left: 4px; font-weight: 500; }\n.hb-wd1-eta-dist { margin-left: auto; font: 500 11px var(--font-mono, monospace); color: var(--hb-wd1-accent); }\n.hb-wd1-steps { list-style: none; margin: 0; padding: 0; display: none; gap: 6px; counter-reset: hb-wd1-s; }\n@container (min-width: 600px) { .hb-wd1-steps { display: grid; } }\n.hb-wd1-steps li { position: relative; padding-left: 22px; font-size: 12px; color: #a1a1a1; line-height: 1.4; animation: hb-wd1-step 0.4s ease both; counter-increment: hb-wd1-s; }\n.hb-wd1-steps li::before { content: counter(hb-wd1-s); position: absolute; left: 0; top: 0; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; font: 600 9px/1 var(--font-mono, monospace); color: #0a0a0a; background: #3a3d42; }\n.hb-wd1-steps li:last-child::before { background: var(--hb-wd1-accent); }\n.hb-wd1-form { position: relative; z-index: 2; display: grid; gap: 14px; padding: 26px; border-radius: 20px; background: linear-gradient(180deg, #161616, #111); border: 1px solid rgba(255,255,255,0.09); box-shadow: 0 30px 80px -30px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.06); }\n@container (min-width: 880px) { .hb-wd1-form { margin-left: -56px; } }\n.hb-wd1-studio { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.07); }\n.hb-wd1-studio-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--hb-wd1-accent) 16%, transparent); color: var(--hb-wd1-accent); }\n.hb-wd1-studio-ic svg { width: 18px; height: 18px; }\n.hb-wd1-studio strong { display: block; font-size: 14px; font-weight: 600; }\n.hb-wd1-studio p { margin: 3px 0 0; font-size: 12.5px; color: #8f8f8f; line-height: 1.5; }\n.hb-wd1-open { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font: 500 11px var(--font-mono, monospace); color: var(--hb-wd1-accent); }\n.hb-wd1-open::before { content: \"\"; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); }\n.hb-wd1-maplink { margin-left: auto; flex: none; font-size: 12px; color: #ededed; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 1px; transition: border-color 0.2s ease; }\n.hb-wd1-maplink:hover { border-color: var(--hb-wd1-accent); }\n.hb-wd1-maplink:focus-visible { outline: 2px solid var(--hb-wd1-accent); outline-offset: 3px; border-radius: 2px; }\n.hb-wd1-row { display: grid; gap: 12px; }\n@container (min-width: 480px) { .hb-wd1-row { grid-template-columns: 1fr 1fr; } }\n.hb-wd1-field { display: grid; gap: 6px; }\n.hb-wd1-field label { font-size: 12px; color: #a1a1a1; font-weight: 500; }\n.hb-wd1-input { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.09); background: #0c0c0c; color: #ededed; font: 400 14px/1.4 inherit; font-family: inherit; outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; resize: none; }\n.hb-wd1-input::placeholder { color: #5b5b5b; }\n.hb-wd1-input:focus { border-color: color-mix(in srgb, var(--hb-wd1-accent) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hb-wd1-accent) 18%, transparent); }\n.hb-wd1-input[aria-invalid=\"true\"] { border-color: #f87171; }\n.hb-wd1-err { font-size: 11.5px; color: #f87171; min-height: 0; }\n.hb-wd1-submit { appearance: none; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 12px; background: var(--hb-wd1-accent); color: #04110b; font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 10px 24px -10px var(--hb-wd1-accent); transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.5, 1), filter 0.2s ease; }\n.hb-wd1-submit:hover { filter: brightness(1.08); }\n.hb-wd1-submit:active { transform: scale(0.98); }\n.hb-wd1-submit:disabled { cursor: progress; filter: saturate(0.6); }\n.hb-wd1-submit:focus-visible { outline: 2px solid #ededed; outline-offset: 3px; }\n.hb-wd1-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(4,17,11,0.25); border-top-color: #04110b; animation: hb-wd1-spin 0.7s linear infinite; }\n.hb-wd1-done { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 30px 8px; }\n.hb-wd1-done svg { width: 52px; height: 52px; }\n.hb-wd1-done circle { fill: color-mix(in srgb, var(--hb-wd1-accent) 16%, transparent); stroke: var(--hb-wd1-accent); stroke-width: 1.5; }\n.hb-wd1-done path { fill: none; stroke: var(--hb-wd1-accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; animation: hb-wd1-check 0.5s ease 0.15s both; }\n.hb-wd1-done strong { font-size: 17px; }\n.hb-wd1-done p { margin: 0; font-size: 13px; color: #8f8f8f; max-width: 32ch; line-height: 1.5; }\n.hb-wd1-again { appearance: none; background: none; border: 0; color: #ededed; font: 500 12.5px inherit; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }\n@media (prefers-reduced-motion: reduce) {\n  .hb-wd1 *, .hb-wd1 *::before, .hb-wd1 *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition: none !important; }\n  .hb-wd1-dot, .hb-wd1-origin-pulse { display: none; }\n}\n`;\n\nfunction ModeIcon({ mode }: { mode: ContactRouteMode }) {\n  if (mode === \"walk\") {\n    return (\n      <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n        <circle cx=\"9\" cy=\"2.6\" r=\"1.4\" />\n        <path d=\"M6 15l2-5 2 2v3M8 10l-.6-3.4L5 8M7.4 6.6L10 5.6l1.6 2.4 1.6.6\" />\n      </svg>\n    );\n  }\n  if (mode === \"transit\") {\n    return (\n      <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n        <rect x=\"3.5\" y=\"2\" width=\"9\" height=\"10\" rx=\"2.4\" />\n        <path d=\"M3.5 7.5h9M6 14.5l1-2.5M10 14.5l-1-2.5M6 1h4\" />\n      </svg>\n    );\n  }\n  return (\n    <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n      <circle cx=\"3.6\" cy=\"11\" r=\"2.6\" />\n      <circle cx=\"12.4\" cy=\"11\" r=\"2.6\" />\n      <path d=\"M3.6 11L6.4 5.5h4.4L12.4 11M6.4 5.5L8.6 11l2.2-5.5M5.6 3.6h2\" />\n    </svg>\n  );\n}\n\nexport function ContactRouteMap({\n  eyebrow = \"Visit the studio\",\n  title = \"Come by for coffee, leave with a plan\",\n  subtitle = \"We are a six minute ride from Central Station. Pick how you are getting here and send us a note so someone is at the door.\",\n  studio = \"Halden Studio\",\n  address = [\"14 Weaver Lane, 2nd floor\", \"Mill Quarter, Rotterdam\"],\n  hours = \"Open today until 18:00\",\n  origin = \"Central Station\",\n  routes = defaultRoutes,\n  defaultMode = \"transit\",\n  mapLink = { label: \"Open in maps\", href: \"#\" },\n  onModeChange,\n  onSubmit,\n  accent = \"#10b981\",\n  className = \"\",\n  style,\n  ...rest\n}: ContactRouteMapProps) {\n  const uid = React.useId().replace(/:/g, \"\");\n  const [mode, setMode] = React.useState<ContactRouteMode>(routes.some((r) => r.mode === defaultMode) ? defaultMode : routes[0]?.mode ?? \"walk\");\n  const [values, setValues] = React.useState<ContactRouteMapValues>({ name: \"\", email: \"\", message: \"\" });\n  const [errors, setErrors] = React.useState<Partial<Record<keyof ContactRouteMapValues, string>>>({});\n  const [status, setStatus] = React.useState<\"idle\" | \"sending\" | \"sent\">(\"idle\");\n  const tabRefs = React.useRef<(HTMLButtonElement | null)[]>([]);\n  const route = routes.find((r) => r.mode === mode) ?? routes[0];\n  const d = paths[mode];\n\n  const choose = (m: ContactRouteMode) => {\n    setMode(m);\n    onModeChange?.(m);\n  };\n\n  const onTabKey = (e: React.KeyboardEvent, i: number) => {\n    if (e.key !== \"ArrowRight\" && e.key !== \"ArrowLeft\") return;\n    e.preventDefault();\n    const n = (i + (e.key === \"ArrowRight\" ? 1 : -1) + routes.length) % routes.length;\n    choose(routes[n].mode);\n    tabRefs.current[n]?.focus();\n  };\n\n  const update = (k: keyof ContactRouteMapValues) => (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n    const v = e.target.value;\n    setValues((s) => ({ ...s, [k]: v }));\n    if (errors[k]) setErrors((s) => ({ ...s, [k]: undefined }));\n  };\n\n  const submit = async (e: React.FormEvent) => {\n    e.preventDefault();\n    const next: Partial<Record<keyof ContactRouteMapValues, string>> = {};\n    if (!values.name.trim()) next.name = \"Tell us who is coming\";\n    if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(values.email)) next.email = \"Use a valid email\";\n    if (values.message.trim().length < 8) next.message = \"A few more words, please\";\n    setErrors(next);\n    if (Object.keys(next).length) return;\n    setStatus(\"sending\");\n    try {\n      if (onSubmit) await onSubmit(values);\n      else await new Promise((r) => setTimeout(r, 900));\n      setStatus(\"sent\");\n    } catch {\n      setStatus(\"idle\");\n    }\n  };\n\n  return (\n    <section className={`hb-wd1 ${className}`} style={{ \"--hb-wd1-accent\": accent, ...style } as React.CSSProperties} {...rest}>\n      <style href=\"hb-contact-route-map\" precedence=\"default\">{css}</style>\n      <div className=\"hb-wd1-in\">\n        <div className=\"hb-wd1-head\">\n          <div>\n            <span className=\"hb-wd1-eyebrow\">{eyebrow}</span>\n            <h2 className=\"hb-wd1-title\">{title}</h2>\n          </div>\n          <p className=\"hb-wd1-sub\">{subtitle}</p>\n        </div>\n        <div className=\"hb-wd1-grid\">\n          <div className=\"hb-wd1-mapcard\">\n            <svg className=\"hb-wd1-svg\" viewBox=\"0 0 860 560\" role=\"img\" aria-label={`Map from ${origin} to ${studio}, ${route?.minutes ?? 0} minutes by ${route?.label.toLowerCase() ?? mode}`}>\n              <defs>\n                <pattern id={`hb-wd1-grid-${uid}`} width=\"16\" height=\"16\" patternUnits=\"userSpaceOnUse\">\n                  <path d=\"M16 0H0V16\" fill=\"none\" stroke=\"rgba(255,255,255,0.025)\" />\n                </pattern>\n              </defs>\n              <rect width=\"860\" height=\"560\" fill=\"#0c0d0e\" />\n              <rect width=\"860\" height=\"560\" fill={`url(#hb-wd1-grid-${uid})`} />\n              {blocks.map((b, i) => (\n                <rect key={i} className=\"hb-wd1-block\" data-kind={b.kind} x={b.x} y={b.y} width={b.w} height={b.h} rx=\"6\" />\n              ))}\n              <path className=\"hb-wd1-river-edge\" d=\"M-20 300 C 120 360 160 520 320 600\" />\n              <path className=\"hb-wd1-river\" d=\"M-20 300 C 120 360 160 520 320 600\" />\n              <text className=\"hb-wd1-streetname\" x=\"140\" y=\"200\" transform=\"rotate(-90 140 200)\">Canal Street</text>\n              <text className=\"hb-wd1-streetname\" x=\"400\" y=\"226\">Weaver Lane</text>\n              <text className=\"hb-wd1-streetname\" x=\"560\" y=\"446\">Foundry Road</text>\n              <path className=\"hb-wd1-ghost\" d={paths.walk} />\n              <path className=\"hb-wd1-ghost\" d={paths.transit} />\n              <path className=\"hb-wd1-ghost\" d={paths.bike} />\n              <path key={mode} className=\"hb-wd1-route\" data-mode={mode} d={d} pathLength={1} />\n              {mode === \"transit\" && <path key={`${mode}-rail`} className=\"hb-wd1-rail\" d={d} />}\n              {stops[mode].map(([x, y], i) => (\n                <circle key={`${mode}-${i}`} className=\"hb-wd1-stop\" cx={x} cy={y} r=\"6\" />\n              ))}\n              <circle className=\"hb-wd1-dot\" r=\"6\" fill=\"#ededed\" style={{ offsetPath: `path(\"${d}\")` } as React.CSSProperties} key={`${mode}-dot`} />\n              <circle className=\"hb-wd1-origin-pulse\" cx=\"128\" cy=\"440\" r=\"9\" />\n              <circle cx=\"128\" cy=\"440\" r=\"8\" fill=\"#7fb3ff\" stroke=\"#0a0a0a\" strokeWidth=\"3\" />\n              <g transform=\"translate(144 452)\">\n                <rect className=\"hb-wd1-chip-bg\" width=\"128\" height=\"40\" rx=\"10\" />\n                <text className=\"hb-wd1-label\" x=\"12\" y=\"17\">{origin}</text>\n                <text className=\"hb-wd1-label-sub\" x=\"12\" y=\"31\">YOU START HERE</text>\n              </g>\n              <g className=\"hb-wd1-pin\" key={`${mode}-pin`}>\n                <path d=\"M624 168 c-14 -16 -22 -26 -22 -38 a22 22 0 0 1 44 0 c0 12 -8 22 -22 38z\" fill=\"var(--hb-wd1-accent)\" stroke=\"#0a0a0a\" strokeWidth=\"2.5\" />\n                <circle cx=\"624\" cy=\"130\" r=\"7.5\" fill=\"#0a0a0a\" />\n                <g transform=\"translate(656 104)\">\n                  <rect className=\"hb-wd1-chip-bg\" width=\"118\" height=\"40\" rx=\"10\" />\n                  <text className=\"hb-wd1-label\" x=\"12\" y=\"17\">{studio}</text>\n                  <text className=\"hb-wd1-label-sub\" x=\"12\" y=\"31\">NO. 14, RED DOOR</text>\n                </g>\n              </g>\n            </svg>\n            <div className=\"hb-wd1-modes\" role=\"tablist\" aria-label=\"How are you getting here\">\n              {routes.map((r, i) => (\n                <button\n                  key={r.mode}\n                  ref={(el) => {\n                    tabRefs.current[i] = el;\n                  }}\n                  type=\"button\"\n                  role=\"tab\"\n                  aria-selected={r.mode === mode}\n                  tabIndex={r.mode === mode ? 0 : -1}\n                  className=\"hb-wd1-mode\"\n                  onClick={() => choose(r.mode)}\n                  onKeyDown={(e) => onTabKey(e, i)}\n                >\n                  <ModeIcon mode={r.mode} />\n                  {r.label}\n                </button>\n              ))}\n            </div>\n            {route && (\n              <div className=\"hb-wd1-eta\" aria-live=\"polite\">\n                <div className=\"hb-wd1-eta-top\">\n                  <span className=\"hb-wd1-eta-min\">\n                    {route.minutes}\n                    <span>min</span>\n                  </span>\n                  <span className=\"hb-wd1-eta-dist\">{route.distance}</span>\n                </div>\n                <ol className=\"hb-wd1-steps\" key={mode}>\n                  {route.steps.map((s, i) => (\n                    <li key={s} style={{ animationDelay: `${(0.25 + i * 0.08).toFixed(2)}s` }}>\n                      {s}\n                    </li>\n                  ))}\n                </ol>\n              </div>\n            )}\n          </div>\n          <form className=\"hb-wd1-form\" onSubmit={submit} noValidate>\n            <div className=\"hb-wd1-studio\">\n              <span className=\"hb-wd1-studio-ic\" aria-hidden=\"true\">\n                <svg viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n                  <path d=\"M3 17V8l7-5 7 5v9M8 17v-5h4v5\" />\n                </svg>\n              </span>\n              <div>\n                <strong>{studio}</strong>\n                {address.map((l) => (\n                  <p key={l}>{l}</p>\n                ))}\n                <span className=\"hb-wd1-open\">{hours}</span>\n              </div>\n              <a className=\"hb-wd1-maplink\" href={mapLink.href}>\n                {mapLink.label}\n              </a>\n            </div>\n            {status === \"sent\" ? (\n              <div className=\"hb-wd1-done\" role=\"status\">\n                <svg viewBox=\"0 0 52 52\" aria-hidden=\"true\">\n                  <circle cx=\"26\" cy=\"26\" r=\"24\" />\n                  <path d=\"M17 27l6 6 12-13\" />\n                </svg>\n                <strong>See you soon, {values.name.split(\" \")[0]}</strong>\n                <p>\n                  We will keep the door open. Take the {route?.label.toLowerCase()} from {origin}, about {route?.minutes} minutes.\n                </p>\n                <button\n                  type=\"button\"\n                  className=\"hb-wd1-again\"\n                  onClick={() => {\n                    setStatus(\"idle\");\n                    setValues({ name: \"\", email: \"\", message: \"\" });\n                  }}\n                >\n                  Send another note\n                </button>\n              </div>\n            ) : (\n              <>\n                <div className=\"hb-wd1-row\">\n                  <div className=\"hb-wd1-field\">\n                    <label htmlFor={`${uid}-n`}>Name</label>\n                    <input id={`${uid}-n`} className=\"hb-wd1-input\" value={values.name} onChange={update(\"name\")} placeholder=\"Ada Brandt\" autoComplete=\"name\" aria-invalid={!!errors.name} aria-describedby={errors.name ? `${uid}-ne` : undefined} />\n                    {errors.name && <span id={`${uid}-ne`} className=\"hb-wd1-err\">{errors.name}</span>}\n                  </div>\n                  <div className=\"hb-wd1-field\">\n                    <label htmlFor={`${uid}-e`}>Email</label>\n                    <input id={`${uid}-e`} type=\"email\" className=\"hb-wd1-input\" value={values.email} onChange={update(\"email\")} placeholder=\"ada@northfield.io\" autoComplete=\"email\" aria-invalid={!!errors.email} aria-describedby={errors.email ? `${uid}-ee` : undefined} />\n                    {errors.email && <span id={`${uid}-ee`} className=\"hb-wd1-err\">{errors.email}</span>}\n                  </div>\n                </div>\n                <div className=\"hb-wd1-field\">\n                  <label htmlFor={`${uid}-m`}>What should we prepare?</label>\n                  <textarea id={`${uid}-m`} rows={3} className=\"hb-wd1-input\" value={values.message} onChange={update(\"message\")} placeholder=\"Thursday around 15:00, we want to talk about our booking flow.\" aria-invalid={!!errors.message} aria-describedby={errors.message ? `${uid}-me` : undefined} />\n                  {errors.message && <span id={`${uid}-me`} className=\"hb-wd1-err\">{errors.message}</span>}\n                </div>\n                <button type=\"submit\" className=\"hb-wd1-submit\" disabled={status === \"sending\"}>\n                  {status === \"sending\" ? <span className=\"hb-wd1-spinner\" aria-hidden=\"true\" /> : null}\n                  {status === \"sending\" ? \"Sending\" : \"Let us know you are coming\"}\n                </button>\n              </>\n            )}\n          </form>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}