{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-dot-worldmap",
  "type": "registry:component",
  "title": "Hero Dot Worldmap",
  "description": "Flat dotted world map across the full width on an ocean-blue gradient: light cyan square dots, golden arcs between cities with pulsing pings, headline over the calm Pacific.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "hero",
    "hero",
    "world map",
    "dots",
    "arcs",
    "network",
    "canvas"
  ],
  "docs": "https://hyperblur.dev/effects/hero-dot-worldmap",
  "files": [
    {
      "path": "registry/hyperblur/hero-dot-worldmap.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/hero-dot-worldmap.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface HeroDotWorldmapLink {\n  label: string;\n  href: string;\n}\n\nexport interface HeroDotWorldmapNode {\n  name: string;\n  lon: number;\n  lat: number;\n}\n\nexport interface HeroDotWorldmapProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  title?: string;\n  subtitle?: string;\n  caption?: string;\n  command?: string;\n  primaryCta?: HeroDotWorldmapLink | null;\n  brand?: string;\n  nav?: HeroDotWorldmapLink[];\n  navCta?: HeroDotWorldmapLink | null;\n  learnMore?: HeroDotWorldmapLink | null;\n  accent?: string;\n  alert?: string;\n  density?: number;\n  speed?: number;\n  nodes?: HeroDotWorldmapNode[];\n  routes?: [string, string][];\n  rate?: number;\n  showFeed?: boolean;\n  showStats?: boolean;\n  headingAs?: \"h1\" | \"h2\";\n  onSearch?: () => void;\n  showBar?: boolean;\n}\n\ninterface FeedEvent {\n  key: number;\n  from: string;\n  to: string;\n  tag: string;\n  hot: boolean;\n  ms: number;\n}\n\nconst css = `\n@keyframes hb-hh10-up {\n  from { opacity: 0; transform: translate3d(0, 14px, 0); }\n  to { opacity: 1; transform: translate3d(0, 0, 0); }\n}\n@keyframes hb-hh10-bob {\n  0%, 100% { transform: translate3d(0, 0, 0); }\n  50% { transform: translate3d(0, 4px, 0); }\n}\n@keyframes hb-hh10-in {\n  from { opacity: 0; transform: translate3d(0, -6px, 0); }\n  to { opacity: 1; transform: translate3d(0, 0, 0); }\n}\n@keyframes hb-hh10-beat {\n  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hb-hh10-accent) 70%, transparent); }\n  70%, 100% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--hb-hh10-accent) 0%, transparent); }\n}\n.hb-hh10 {\n  --hb-hh10-accent: #ffc857;\n  --hb-hh10-alert: #ff7a66;\n  --hb-hh10-ink: #0a2540;\n  --hb-hh10-line: rgba(176, 224, 255, .22);\n  --hb-hh10-panel: rgba(5, 36, 70, .66);\n  --hb-hh10-mono: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);\n  position: relative;\n  isolation: isolate;\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  min-height: 820px;\n  padding-top: 40px;\n  overflow: hidden;\n  container-type: inline-size;\n  background:\n    radial-gradient(60% 55% at 62% 36%, rgba(70, 160, 235, .3), transparent 70%),\n    linear-gradient(180deg, #06284a 0%, #08396c 55%, #0a4a8a 100%);\n  color: #eaf6ff;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-hh10 *, .hb-hh10 *::before, .hb-hh10 *::after { box-sizing: border-box; }\n.hb-hh10-canvas {\n  position: absolute;\n  inset: 0;\n  z-index: 0;\n  display: block;\n  width: 100%;\n  height: 100%;\n  pointer-events: none;\n}\n.hb-hh10-bar {\n  position: relative;\n  z-index: 3;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  width: calc(100% - 48px);\n  max-width: 1180px;\n  margin: 18px auto 0;\n  padding: 8px 8px 8px 16px;\n  border: 1px solid var(--hb-hh10-line);\n  border-radius: 8px;\n  background: rgba(5, 36, 70, .55);\n  box-shadow: 0 18px 40px -22px rgba(2, 16, 36, .8);\n  -webkit-backdrop-filter: blur(12px);\n  backdrop-filter: blur(12px);\n}\n.hb-hh10-brand {\n  display: inline-flex;\n  align-items: center;\n  gap: 9px;\n  color: #fff;\n  font-size: 15px;\n  font-weight: 700;\n  letter-spacing: -.01em;\n  text-decoration: none;\n  border-radius: 8px;\n}\n.hb-hh10-mark { flex: none; color: var(--hb-hh10-accent); }\n.hb-hh10-links {\n  display: flex;\n  align-items: center;\n  gap: 2px;\n  margin: 0;\n  padding: 0;\n  list-style: none;\n}\n.hb-hh10-link {\n  display: inline-flex;\n  padding: 7px 12px;\n  border-radius: 8px;\n  color: rgba(214, 238, 255, .78);\n  font-size: 13px;\n  font-weight: 500;\n  text-decoration: none;\n  transition: color .2s ease, background-color .2s ease;\n}\n.hb-hh10-link:hover { color: #fff; background: rgba(176, 224, 255, .12); }\n.hb-hh10-tools {\n  display: flex;\n  align-items: center;\n  gap: 6px;\n}\n.hb-hh10-search {\n  display: inline-grid;\n  place-items: center;\n  width: 34px;\n  height: 34px;\n  padding: 0;\n  border: 0;\n  border-radius: 8px;\n  background: transparent;\n  color: rgba(214, 238, 255, .78);\n  cursor: pointer;\n  transition: color .2s ease, background-color .2s ease;\n}\n.hb-hh10-search:hover { color: #fff; background: rgba(176, 224, 255, .12); }\n.hb-hh10-outline {\n  display: inline-flex;\n  align-items: center;\n  height: 34px;\n  padding: 0 14px;\n  border-radius: 8px;\n  background: var(--hb-hh10-accent);\n  color: var(--hb-hh10-ink);\n  font-size: 13px;\n  font-weight: 700;\n  text-decoration: none;\n  white-space: nowrap;\n  transition: filter .2s ease;\n}\n.hb-hh10-outline:hover { filter: brightness(1.07); }\n.hb-hh10-hud {\n  position: absolute;\n  right: 32px;\n  bottom: 36px;\n  z-index: 2;\n  display: flex;\n  align-items: flex-end;\n  gap: 12px;\n  pointer-events: none;\n}\n.hb-hh10-panel {\n  border: 1px solid var(--hb-hh10-line);\n  border-radius: 8px;\n  background: var(--hb-hh10-panel);\n  box-shadow: 0 18px 40px -24px rgba(2, 16, 36, .9);\n  -webkit-backdrop-filter: blur(10px);\n  backdrop-filter: blur(10px);\n  animation: hb-hh10-up .8s .2s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-hh10-stats {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n  width: 212px;\n  padding: 11px 13px 12px;\n}\n.hb-hh10-live {\n  display: flex;\n  align-items: center;\n  gap: 7px;\n  color: rgba(214, 238, 255, .75);\n  font-family: var(--hb-hh10-mono);\n  font-size: 10px;\n  letter-spacing: .14em;\n  text-transform: uppercase;\n}\n.hb-hh10-dot {\n  flex: none;\n  width: 6px;\n  height: 6px;\n  border-radius: 2px;\n  background: var(--hb-hh10-accent);\n  animation: hb-hh10-beat 1.6s ease-out infinite;\n}\n.hb-hh10-num {\n  display: flex;\n  align-items: baseline;\n  gap: 7px;\n  margin: 0;\n  white-space: nowrap;\n}\n.hb-hh10-num b {\n  color: #fff;\n  font-family: var(--hb-hh10-mono);\n  font-size: 22px;\n  font-weight: 500;\n  letter-spacing: -.02em;\n  font-variant-numeric: tabular-nums;\n}\n.hb-hh10-num span { color: rgba(214, 238, 255, .6); font-family: var(--hb-hh10-mono); font-size: 10.5px; letter-spacing: .04em; }\n.hb-hh10-kv {\n  display: grid;\n  grid-template-columns: 1fr 1fr;\n  gap: 8px;\n  margin: 0;\n  padding-top: 8px;\n  border-top: 1px solid var(--hb-hh10-line);\n}\n.hb-hh10-kv div { min-width: 0; }\n.hb-hh10-kv dt { margin: 0; color: rgba(214, 238, 255, .6); font-family: var(--hb-hh10-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; }\n.hb-hh10-kv dd { margin: 2px 0 0; color: #eaf6ff; font-family: var(--hb-hh10-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }\n.hb-hh10-kv dd[data-hot=\"true\"] { color: var(--hb-hh10-alert); }\n.hb-hh10-legend {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 4px 12px;\n  margin: 0;\n  padding: 0;\n  list-style: none;\n  color: rgba(214, 238, 255, .7);\n  font-family: var(--hb-hh10-mono);\n  font-size: 10px;\n  letter-spacing: .04em;\n}\n.hb-hh10-legend li { display: inline-flex; align-items: center; gap: 6px; }\n.hb-hh10-sw { width: 6px; height: 6px; border-radius: 1px; background: var(--hb-hh10-accent); }\n.hb-hh10-sw[data-kind=\"hot\"] { background: var(--hb-hh10-alert); }\n.hb-hh10-sw[data-kind=\"node\"] { background: transparent; border: 1px solid #eaf6ff; border-radius: 2px; }\n.hb-hh10-latest {\n  display: none;\n  min-width: 0;\n  margin: 0;\n  overflow: hidden;\n  color: rgba(214, 238, 255, .8);\n  font-family: var(--hb-hh10-mono);\n  font-size: 10.5px;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n}\n.hb-hh10-latest b { font-weight: 500; color: var(--hb-hh10-accent); }\n.hb-hh10-latest b[data-hot=\"true\"] { color: var(--hb-hh10-alert); }\n.hb-hh10-feed {\n  width: 248px;\n  padding: 10px 6px 6px;\n}\n.hb-hh10-feedhead {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 0 7px 7px;\n  color: rgba(214, 238, 255, .75);\n  font-family: var(--hb-hh10-mono);\n  font-size: 10px;\n  letter-spacing: .14em;\n  text-transform: uppercase;\n}\n.hb-hh10-feedhead span:last-child { color: rgba(214, 238, 255, .45); letter-spacing: .06em; }\n.hb-hh10-list { margin: 0; padding: 0; list-style: none; }\n.hb-hh10-row {\n  display: grid;\n  grid-template-columns: 44px minmax(0, 1fr) auto;\n  align-items: center;\n  gap: 8px;\n  height: 21px;\n  padding: 0 7px;\n  border-radius: 6px;\n  font-family: var(--hb-hh10-mono);\n  font-size: 10.5px;\n  animation: hb-hh10-in .45s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-hh10-row:first-child { background: rgba(176, 224, 255, .08); }\n.hb-hh10-tag {\n  justify-self: start;\n  padding: 1px 5px;\n  border-radius: 4px;\n  background: color-mix(in srgb, var(--hb-hh10-accent) 18%, transparent);\n  color: var(--hb-hh10-accent);\n  font-size: 9px;\n  letter-spacing: .06em;\n}\n.hb-hh10-row[data-hot=\"true\"] .hb-hh10-tag {\n  background: color-mix(in srgb, var(--hb-hh10-alert) 20%, transparent);\n  color: var(--hb-hh10-alert);\n}\n.hb-hh10-route { min-width: 0; overflow: hidden; color: #eaf6ff; white-space: nowrap; text-overflow: ellipsis; }\n.hb-hh10-ms { color: rgba(214, 238, 255, .6); font-variant-numeric: tabular-nums; }\n.hb-hh10-row[data-hot=\"true\"] .hb-hh10-ms { color: color-mix(in srgb, var(--hb-hh10-alert) 80%, #eaf6ff); }\n.hb-hh10-row[data-empty=\"true\"] { animation: none; }\n.hb-hh10-row[data-empty=\"true\"] .hb-hh10-route {\n  height: 5px;\n  border-radius: 3px;\n  background: rgba(176, 224, 255, .1);\n}\n.hb-hh10-tip {\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 3;\n  pointer-events: none;\n  opacity: 0;\n  transition: opacity .15s ease;\n}\n.hb-hh10-tip[data-on=\"true\"] { opacity: 1; }\n.hb-hh10-tipbox {\n  display: flex;\n  flex-direction: column;\n  gap: 2px;\n  padding: 6px 9px;\n  border: 1px solid color-mix(in srgb, var(--hb-hh10-accent) 55%, transparent);\n  border-radius: 8px;\n  background: rgba(5, 36, 70, .92);\n  white-space: nowrap;\n  transform: translate(-50%, calc(-100% - 14px));\n}\n.hb-hh10-tipbox b { color: #fff; font-size: 12px; font-weight: 600; }\n.hb-hh10-tipbox span { color: rgba(214, 238, 255, .75); font-family: var(--hb-hh10-mono); font-size: 10px; }\n.hb-hh10-stage {\n  position: relative;\n  z-index: 2;\n  flex: 1 1 auto;\n  width: 100%;\n  min-height: 300px;\n}\n.hb-hh10-foot {\n  position: absolute;\n  left: 48px;\n  bottom: 44px;\n  z-index: 2;\n  display: grid;\n  grid-template-columns: minmax(0, 1fr);\n  gap: 22px;\n  width: min(430px, 40%);\n}\n.hb-hh10-copy { min-width: 0; }\n.hb-hh10-title {\n  margin: 0;\n  color: #fff;\n  font-size: clamp(30px, 4.4cqi, 62px);\n  font-weight: 700;\n  line-height: .99;\n  letter-spacing: -.045em;\n  text-wrap: balance;\n  text-shadow: 0 2px 24px rgba(3, 22, 46, .55);\n  animation: hb-hh10-up .8s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-hh10-sub {\n  max-width: 26em;\n  margin: 14px 0 0;\n  color: rgba(226, 243, 255, .9);\n  font-size: 14.5px;\n  line-height: 1.55;\n  text-wrap: pretty;\n  text-shadow: 0 1px 14px rgba(3, 22, 46, .6);\n  animation: hb-hh10-up .8s .08s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-hh10-side {\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 12px;\n  min-width: 0;\n  animation: hb-hh10-up .8s .16s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-hh10-caption {\n  margin: 0;\n  color: var(--hb-hh10-accent);\n  font-family: var(--hb-hh10-mono);\n  font-size: 11px;\n  letter-spacing: .06em;\n}\n.hb-hh10-row2 {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: stretch;\n  gap: 8px;\n  max-width: 100%;\n}\n.hb-hh10-cmd {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  min-width: 0;\n  height: 42px;\n  padding: 0 6px 0 12px;\n  border: 1px solid var(--hb-hh10-line);\n  border-radius: 8px;\n  background: var(--hb-hh10-panel);\n  -webkit-backdrop-filter: blur(8px);\n  backdrop-filter: blur(8px);\n}\n.hb-hh10-prompt { flex: none; color: var(--hb-hh10-accent); font-family: var(--hb-hh10-mono); font-size: 12px; }\n.hb-hh10-code {\n  min-width: 0;\n  overflow: hidden;\n  color: #eaf6ff;\n  font-family: var(--hb-hh10-mono);\n  font-size: 11.5px;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n}\n.hb-hh10-copybtn {\n  position: relative;\n  display: inline-grid;\n  flex: none;\n  place-items: center;\n  width: 30px;\n  height: 30px;\n  padding: 0;\n  border: 0;\n  border-radius: 8px;\n  background: transparent;\n  color: rgba(214, 238, 255, .75);\n  cursor: pointer;\n  transition: color .2s ease, background-color .2s ease;\n}\n.hb-hh10-copybtn:hover { color: #fff; background: rgba(176, 224, 255, .14); }\n.hb-hh10-copybtn[data-done=\"true\"] { color: var(--hb-hh10-accent); }\n.hb-hh10-cta {\n  display: inline-flex;\n  flex: none;\n  align-items: center;\n  justify-content: center;\n  gap: 6px;\n  height: 42px;\n  padding: 0 14px 0 18px;\n  border-radius: 8px;\n  background: var(--hb-hh10-accent);\n  color: var(--hb-hh10-ink);\n  font-size: 14px;\n  font-weight: 700;\n  letter-spacing: -.01em;\n  text-decoration: none;\n  white-space: nowrap;\n  box-shadow: 0 12px 28px -12px rgba(2, 16, 36, .8);\n  transition: filter .2s ease;\n}\n.hb-hh10-cta:hover { filter: brightness(1.07); }\n.hb-hh10-cta svg { transition: transform .2s ease; }\n.hb-hh10-cta:hover svg { transform: translateX(2px); }\n.hb-hh10-more {\n  position: absolute;\n  left: 50%;\n  bottom: 12px;\n  z-index: 2;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  padding: 4px 8px;\n  border-radius: 8px;\n  color: rgba(214, 238, 255, .7);\n  font-family: var(--hb-hh10-mono);\n  font-size: 10.5px;\n  letter-spacing: .12em;\n  text-transform: uppercase;\n  text-decoration: none;\n  transform: translateX(-50%);\n  transition: color .2s ease;\n}\n.hb-hh10-more:hover { color: #fff; }\n.hb-hh10-more svg { animation: hb-hh10-bob 1.8s ease-in-out infinite; }\n.hb-hh10 a:focus-visible, .hb-hh10 button:focus-visible {\n  outline: 2px solid var(--hb-hh10-accent);\n  outline-offset: 2px;\n}\n.hb-hh10-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  overflow: hidden;\n  clip: rect(0 0 0 0);\n  white-space: nowrap;\n}\n@container (max-width: 1140px) {\n  .hb-hh10-feed { display: none; }\n  .hb-hh10-latest { display: block; flex: 1 1 auto; }\n  .hb-hh10-stats {\n    flex-direction: row;\n    align-items: center;\n    gap: 10px;\n    width: auto;\n    max-width: 420px;\n    padding: 8px 12px;\n  }\n  .hb-hh10-live span:last-child, .hb-hh10-kv, .hb-hh10-legend { display: none; }\n  .hb-hh10-num { gap: 5px; }\n  .hb-hh10-num b { font-size: 14px; }\n  .hb-hh10-num span { font-size: 9.5px; }\n  .hb-hh10-hud { right: 24px; bottom: 28px; }\n  .hb-hh10-foot { left: 32px; }\n}\n@container (max-width: 760px) {\n  .hb-hh10 { min-height: 0; padding-top: 20px; }\n  .hb-hh10-hud { position: relative; right: auto; bottom: auto; order: 2; padding: 0 24px; margin-top: 10px; }\n  .hb-hh10-stats { max-width: 100%; }\n  .hb-hh10-stage { order: 3; min-height: calc(62cqi + 10px); flex: 1 1 auto; }\n  .hb-hh10-foot { position: relative; left: auto; bottom: auto; order: 4; width: 100%; padding: 8px 24px 64px; }\n  .hb-hh10-title { font-size: clamp(32px, 10.5cqi, 48px); }\n  .hb-hh10-sub { font-size: 14px; }\n  .hb-hh10-bar { width: calc(100% - 32px); margin-top: 16px; }\n}\n@container (max-width: 640px) {\n  .hb-hh10-links, .hb-hh10-search { display: none; }\n  .hb-hh10-side, .hb-hh10-row2 { align-self: stretch; }\n  .hb-hh10-row2 { flex-direction: column; }\n  .hb-hh10-cta { width: 100%; }\n  .hb-hh10-more { display: none; }\n}\n@container (max-width: 360px) {\n  .hb-hh10-foot { padding: 8px 18px 56px; }\n  .hb-hh10-hud { padding: 0 18px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-hh10-title, .hb-hh10-sub, .hb-hh10-side, .hb-hh10-panel, .hb-hh10-row, .hb-hh10-dot, .hb-hh10-more svg { animation: none; }\n  .hb-hh10-link, .hb-hh10-search, .hb-hh10-outline, .hb-hh10-copybtn, .hb-hh10-cta, .hb-hh10-cta svg, .hb-hh10-more, .hb-hh10-tip { transition: none; }\n  .hb-hh10-cta:hover svg { transform: none; }\n}\n`;\n\nconst defaultNav: HeroDotWorldmapLink[] = [\n  { label: \"Network\", href: \"#\" },\n  { label: \"Routes\", href: \"#\" },\n  { label: \"Docs\", href: \"#\" },\n];\nconst defaultNavCta: HeroDotWorldmapLink = { label: \"Sign in\", href: \"#\" };\nconst defaultPrimary: HeroDotWorldmapLink = { label: \"Open console\", href: \"#\" };\nconst defaultMore: HeroDotWorldmapLink = { label: \"Learn more\", href: \"#\" };\n\nexport const heroDotWorldmapCities: HeroDotWorldmapNode[] = [\n  { name: \"San Francisco\", lon: -122.42, lat: 37.77 },\n  { name: \"Mexico City\", lon: -99.13, lat: 19.43 },\n  { name: \"Chicago\", lon: -87.63, lat: 41.88 },\n  { name: \"New York\", lon: -74.0, lat: 40.71 },\n  { name: \"Miami\", lon: -80.19, lat: 25.76 },\n  { name: \"Bogota\", lon: -74.07, lat: 4.71 },\n  { name: \"Lima\", lon: -77.04, lat: -12.05 },\n  { name: \"Sao Paulo\", lon: -46.63, lat: -23.55 },\n  { name: \"Buenos Aires\", lon: -58.38, lat: -34.6 },\n  { name: \"Santiago\", lon: -70.67, lat: -33.45 },\n  { name: \"London\", lon: -0.13, lat: 51.51 },\n  { name: \"Madrid\", lon: -3.7, lat: 40.42 },\n  { name: \"Frankfurt\", lon: 8.68, lat: 50.11 },\n  { name: \"Stockholm\", lon: 18.07, lat: 59.33 },\n  { name: \"Moscow\", lon: 37.62, lat: 55.76 },\n  { name: \"Istanbul\", lon: 28.98, lat: 41.01 },\n  { name: \"Cairo\", lon: 31.24, lat: 30.04 },\n  { name: \"Lagos\", lon: 3.38, lat: 6.52 },\n  { name: \"Nairobi\", lon: 36.82, lat: -1.29 },\n  { name: \"Johannesburg\", lon: 28.05, lat: -26.2 },\n  { name: \"Dubai\", lon: 55.27, lat: 25.2 },\n  { name: \"Mumbai\", lon: 72.88, lat: 19.08 },\n  { name: \"Delhi\", lon: 77.21, lat: 28.61 },\n  { name: \"Singapore\", lon: 103.82, lat: 1.35 },\n  { name: \"Hong Kong\", lon: 114.17, lat: 22.32 },\n  { name: \"Seoul\", lon: 126.98, lat: 37.57 },\n  { name: \"Tokyo\", lon: 139.69, lat: 35.69 },\n  { name: \"Sydney\", lon: 151.21, lat: -33.87 },\n];\n\nconst LAND: number[][] = [\n  [-168,65.6,-166,68.4,-163,69.6,-161,70.4,-156.5,71.3,-152,70.8,-148,70.4,-143,70.1,-139,69.6,-135,69.5,-130,70,-127,70.2,-124,69.6,-120,69.4,-115,68.5,-110,68.2,-106,68.6,-101,67.8,-97,68.2,-95,68.5,-94,71.5,-92,70.5,-89,69.5,-86,69.8,-82,69,-81.5,67.5,-84,66.2,-87,64.3,-90.5,63.3,-93.5,61.4,-94.6,59.5,-94,58.5,-92.5,57.2,-90,57,-86,55.6,-82.5,55,-82,53,-80.5,51.6,-79.2,51.7,-79,54,-77,55.8,-76.6,57.6,-77.6,59.5,-77.6,60.8,-78,62.4,-76,62.3,-73,62.1,-71,61.2,-69.5,60,-69.5,58.8,-67.5,58.3,-65.5,59.8,-64,60.1,-62,58,-61.5,56.5,-59.5,55.2,-57.5,54.2,-56,52.5,-56,51.6,-58.5,51.2,-60.5,50.2,-64,50.2,-66.5,50,-68.5,49.2,-70.5,47.5,-69,48.5,-66.5,49.1,-64.5,49,-64.3,48.1,-65.5,47.5,-64.6,46.6,-63,45.8,-61,45.3,-61.5,45.7,-60,46,-60.5,47,-61.5,45.2,-63.5,44.6,-65.5,43.5,-66.2,44.4,-64.8,45.3,-67,44.8,-68.5,44.2,-70,43.7,-70.7,42.5,-70,41.9,-70.5,41.5,-71.8,41.3,-73.5,40.9,-74,40.5,-74.1,39.6,-75,38.9,-75.1,38.3,-76,37,-75.8,36,-75.5,35.2,-76.5,34.7,-77.9,33.9,-79.2,33.2,-80.6,32.2,-81.4,30.7,-81.2,29.5,-80.5,28.1,-80,26.8,-80.2,25.3,-81.1,25.2,-81.8,26.2,-82.6,27.5,-82.8,28.6,-83.6,29.9,-85,29.6,-86.5,30.4,-88.5,30.4,-89.6,30.2,-89.3,29.2,-90.5,29.1,-92,29.6,-94,29.6,-95.3,28.8,-97,27.8,-97.4,26,-97.7,24,-97.8,22.4,-97.2,21,-96.4,19.5,-95.2,18.7,-94.5,18.2,-92.8,18.6,-91.4,18.8,-90.8,19.9,-90.4,21.1,-88.6,21.5,-87,21.5,-86.8,20.2,-87.5,19,-88.2,17.6,-88.3,16.2,-87.6,15.9,-86,15.9,-84.8,15.8,-83.4,15.2,-83.2,14,-83.6,12.4,-83.7,11.2,-83,10,-82.2,9.1,-81,8.8,-79.6,9.6,-78.4,9.4,-77.6,8.6,-77.3,7.9,-78.2,7.5,-79,8.4,-80.1,7.4,-80.9,7.3,-81.8,8.2,-83,8.3,-83.7,9.3,-85.7,9.9,-85.8,11.2,-87.3,12.9,-88.5,13.2,-89.8,13.5,-91.4,13.9,-92.8,14.6,-93.9,15.9,-95,16.2,-96.5,15.7,-98.2,16.3,-99.6,16.8,-101.5,17.8,-103.5,18.3,-105.3,19.5,-105.6,20.6,-105.3,21.6,-105.7,22.6,-106.9,23.8,-108.5,25.3,-109.4,26.3,-110.6,27.8,-111.9,29,-112.8,30.4,-114.4,31.5,-114.8,31,-114.4,30,-113.2,28.9,-112.2,27.2,-111.6,26,-110.6,24.7,-110,23.2,-109.4,23.2,-110.2,24.3,-111.4,25.8,-112.2,26.8,-113.4,27.8,-114.3,28.8,-115.4,29.8,-116.2,31,-117.1,32.5,-117.4,33.2,-118.5,34,-119.6,34.4,-120.6,34.6,-120.9,35.5,-121.9,36.6,-122.5,37.6,-123,38.2,-123.8,39.3,-124.4,40.4,-124.1,41.8,-124.5,43,-124,44.6,-124,46.2,-124.2,47.3,-124.7,48.4,-123.1,48.9,-123.5,49.5,-125,50.2,-126.5,50.8,-127.8,51.5,-128.3,52.5,-129.8,53.6,-130.5,54.6,-130.2,55.7,-132,57,-133.6,58.3,-135.5,59.2,-137.6,58.8,-139.8,59.8,-142.5,60.1,-145.5,60.5,-148,60.8,-149.8,59.7,-151.8,59.2,-151.4,60.6,-153.5,59.2,-154.3,58.1,-156.4,57.2,-158.7,56,-161.5,55.4,-164.5,54.5,-162.6,55.7,-160,56.8,-158,58.6,-161.9,58.6,-162.3,60,-165.2,60.8,-165,61.8,-166,62.5,-164.6,63.2,-161,64.4,-163.6,64.6,-166.2,64.6,-167.8,65.4],\n  [-80.3,73.7,-76.5,72.7,-72.5,71.6,-69.5,70.5,-67.5,69.6,-66.8,68.6,-63.5,67.5,-61.8,66.7,-63,65.8,-64.7,65.3,-65.7,64.3,-64.6,63.3,-65.5,62.5,-67.4,62.7,-69.5,63.3,-71.4,63.9,-73.3,64.5,-75.8,64.4,-77.5,64.6,-76.8,65.4,-73.8,65.6,-73.2,66.9,-73.5,67.8,-75,68.5,-77.2,69.4,-79.5,69.9,-82,69.8,-84.6,70.2,-87.5,70.4,-89.5,71.2,-90,72.5,-89,73.5,-85.8,73.6,-83,73.8],\n  [-62,82.4,-66,82.9,-72,83.1,-80,82.9,-86,82.3,-89.5,81.2,-86.6,80.4,-84.6,79.6,-86.8,78.6,-89,77.6,-87.8,76.7,-83,76.3,-79.5,76.5,-78.4,77.4,-75.6,78.3,-73.2,78.9,-71.5,79.9,-68.5,80.5,-65,81.3],\n  [-96.2,80.4,-91.5,81.2,-87.8,80.5,-88.2,79.4,-91,78.4,-94.6,78.8],\n  [-80.6,74.6,-81.4,75.8,-85.5,76.6,-90,76.6,-93.6,76.3,-96.2,75.7,-93.2,75.1,-89.2,74.6,-84.8,74.5],\n  [-95.6,74.1,-92,74.1,-90.4,73.3,-93.3,72.4,-95.7,73],\n  [-97,73.9,-100.2,73.9,-102.6,73,-101.2,72,-98.2,71.4,-96.6,72.2],\n  [-104.2,76.4,-99.2,76.6,-97.6,75.5,-99,75,-102.8,75.3],\n  [-117.2,76.2,-112.2,76.6,-106.4,76,-105.5,75.2,-109.8,74.7,-115,74.5,-117.6,75.3],\n  [-118.6,71.2,-117.4,72.7,-114.2,73.3,-109.2,73,-105.2,73.3,-102.2,72.6,-101.6,70.6,-104,69.2,-107,68.9,-111.8,68.6,-115.2,69.3,-117.6,69.7,-119,70.4],\n  [-125.3,71.8,-124,73.6,-120.4,74.4,-116,74.2,-115.3,73.3,-117.6,72,-121,71.2,-124,71.2],\n  [-87,64.6,-85.2,65.9,-82.2,65.5,-80.4,64,-83,62.4,-86,63.4],\n  [-72.4,78.2,-68,79.6,-64,80.6,-60,81.6,-52,82.3,-44,83.2,-34,83.6,-26,83.3,-20,82.3,-12,81.6,-16,80.2,-19,79,-18.5,77,-20,75.6,-19.5,74,-22,72.6,-22,71,-24.5,70,-26,68.8,-30,68.2,-32.5,67.6,-35,66.3,-37.5,65.7,-40,64.8,-41,63.5,-42.5,61.5,-43,60.2,-44.5,59.8,-46,60.6,-48.5,61.2,-50,62.5,-51.2,64,-52.5,65.5,-53.5,66.8,-53,68.5,-51.5,69.6,-54,70.6,-54.5,71.5,-55.8,72.8,-57,74.2,-58.5,75.4,-61.5,76.1,-66.5,76.1,-69,76.7,-71.5,77.4],\n  [-59.3,47.7,-58.4,49.2,-57,50.7,-55.6,51.6,-55.8,49.9,-53.6,49.5,-53.2,48.2,-52.6,47.5,-53.2,46.7,-54.4,47.4,-55.8,46.9,-56.2,47.6,-58.2,47.6],\n  [-128.4,50.8,-127,50.8,-125,50.1,-123.3,48.4,-124.6,48.5,-126.5,49.4,-128,50.2],\n  [-133,54.2,-131.6,54.1,-131.2,52.6,-131.8,52.2,-132.8,53.1],\n  [-84.9,21.9,-84,22.7,-82.5,23.1,-80.5,23.1,-79,22.6,-77.5,21.8,-76,21.2,-74.2,20.3,-74.6,20,-77.2,19.9,-77.7,20.7,-78.5,21.5,-80.5,22,-81.7,22.3,-83,22.2,-84.3,21.8],\n  [-74.4,18.4,-72.8,19.9,-71,19.9,-69.5,19.4,-68.3,18.6,-68.8,18.2,-70.5,18.2,-71.4,17.6,-72.8,18.1,-74.2,18.1],\n  [-78.4,18.4,-77,18.5,-76.2,18,-77.2,17.8,-78.3,18.2],\n  [-67.3,18.5,-65.6,18.4,-65.7,18,-67.2,18],\n  [-180,69.4,-176,69.8,-172,69.2,-170,68.6,-169.7,66.2,-171.6,65.5,-172.5,64.4,-175,64.8,-177.5,64.9,-178.8,65.6,-180,65.4],\n  [-77.4,8.6,-76,10.4,-75.3,10.9,-74.2,11.3,-72.2,11.9,-71.5,12.4,-71.7,11.3,-71.9,10.4,-71,9.7,-71.3,11,-70,11.9,-68.6,11.5,-68,10.6,-66,10.6,-64,10.6,-62.5,10.7,-61.5,10.5,-62.2,10,-60.8,8.6,-59.5,8,-58.3,7,-57,6,-55,6,-53,5.6,-51.6,4.3,-51,3.5,-50.2,1.8,-49.9,1,-50.6,0.2,-48.5,-0.6,-47,-0.7,-44.6,-1.6,-43,-2.4,-41,-2.9,-39,-3.8,-37.2,-4.9,-35.4,-5.3,-34.8,-7.2,-35,-9,-36.4,-10.5,-37.6,-12.1,-38.6,-13,-39,-15.4,-38.9,-17.6,-39.7,-19.6,-40.9,-21.6,-41.9,-22.9,-44.6,-23.3,-46.8,-24.2,-48.3,-25.6,-48.6,-28,-49.7,-29,-51,-30.8,-52.1,-32.2,-53.4,-33.7,-54.9,-34.9,-56.6,-34.6,-58.4,-34,-57.6,-35.3,-57,-36.4,-57.6,-37.9,-59.2,-38.7,-62.1,-38.9,-62.3,-40.6,-63.7,-41.1,-65.1,-41,-64.4,-42.4,-63.6,-42.8,-64.6,-43,-65.3,-44.4,-66.6,-45.1,-67.6,-46.4,-66.1,-47.2,-65.9,-48.1,-67.7,-49.5,-68.6,-50.4,-69.1,-51.6,-68.4,-52.4,-69.5,-52.6,-68.6,-53.2,-67.2,-54.6,-68.6,-55,-70.2,-55.1,-71.9,-54.4,-73.5,-53.4,-74.6,-52.2,-75.1,-50.4,-75.6,-48.6,-74.4,-46.8,-75.4,-46,-74,-44.6,-73.6,-43.4,-73.7,-41.8,-73.9,-40.2,-73.4,-38.5,-73.6,-37.2,-72.6,-35.6,-71.6,-33.4,-71.5,-31.6,-71.3,-29.2,-70.8,-27.3,-70.4,-25.3,-70.4,-23.4,-70.1,-21.4,-70.2,-19.4,-70.9,-18.2,-72.6,-17,-74.9,-15.6,-76.3,-13.7,-77.1,-12.1,-78.2,-10.1,-79.4,-7.9,-80.8,-6.2,-81.2,-5,-80.3,-3.4,-80.2,-2.6,-80.9,-2.1,-80.4,-0.6,-80,0.8,-79,1.4,-78.6,2.4,-77.4,4,-77.4,5.7,-77.8,7,-77.9,7.6],\n  [-61.4,-51.1,-58,-51.2,-57.8,-51.9,-60.4,-52.3],\n  [-9.4,36.9,-8.9,38.4,-9.5,38.8,-9,40.2,-8.7,41.8,-9.3,43.1,-8,43.7,-5.9,43.6,-4,43.4,-1.8,43.4,-1.2,44.6,-1.2,46.1,-2.3,47.1,-4.6,47.9,-4.7,48.6,-3,48.8,-1.6,48.7,-1.4,49.7,0.2,49.5,1.5,50.2,1.7,50.9,3,51.2,4,51.6,4.6,52.4,5.1,53.3,6.9,53.4,8.4,53.6,8.6,54.9,8.3,55.6,8.1,56.6,8.6,57.1,10.6,57.7,10.4,56.6,10.9,56.4,10,55.1,10.9,54.3,12.5,54.3,14.2,53.9,16.5,54.6,18.6,54.6,19.9,54.4,21.2,55.2,21,56.4,21.6,57.4,22.6,57.6,23.5,57,24.4,57.2,24.3,58.3,23.4,59.2,25.4,59.5,28,59.6,29.8,60,28.4,60.6,26.5,60.4,23.4,59.9,22.4,60.4,21.4,60.7,21.4,61.8,21.1,62.7,22.2,63.4,24.4,64.6,25.4,65.2,24.6,65.8,22.4,65.8,21.4,64.8,20.8,63.8,19,63.4,17.8,62.4,17.4,61.6,17.2,60.7,18.6,60.2,18.4,59.3,16.8,58.6,16.6,57.4,16,56.2,14.4,55.6,12.9,55.4,12.6,56.1,11.9,57.6,11.2,58.9,10.6,59.9,10.4,59.1,9.6,59,8.2,58.1,6.6,58.1,5.6,58.6,5,60,5,61.5,5.4,62.4,7.2,63,8.6,63.4,10.6,64.4,12.4,65.8,13.4,67.2,15,68.2,16.6,68.8,18.5,69.8,20.6,70.1,23.2,70.5,25.8,71.1,28.4,71,30.6,70.4,31.2,69.8,33.4,69.3,36.6,69,40,67.8,41.2,66.7,40.2,65.8,38,66.1,35.2,66.3,34.4,65.1,35.2,64.3,37,63.9,37.6,64.6,36.4,65,38.4,65.2,40.5,64.5,42,66.4,43.8,66.1,44.4,67.6,43.8,68.4,46.2,68.2,48.2,67.6,50.4,68.2,53.6,68.8,56,68.4,58.4,68.8,60.4,69.6,64.4,69.3,67.4,68.4,68.6,68.9,67,69.9,66.8,71.1,68.6,72.6,69.6,72.9,72.6,72.7,72.8,71.6,71.8,71,72.6,70,73.6,68.6,72.6,67,74.6,67.7,74.8,69,73.6,69.7,74.4,70.8,73,71.6,74.8,72.4,76.5,71.3,78.4,72.4,80.5,73.6,83.6,74.1,86.5,74.6,87,75.4,89.6,75.6,93,76.1,96.4,76.2,100,76.6,104.2,77.7,106.8,77,107.6,76.5,111,76.7,113.6,75.6,113,74.2,112,73.6,113.6,73.6,116.6,73.8,119.8,73.1,123.4,73.6,126.6,72.6,128.6,72.9,129.6,71.8,131.8,70.8,133.6,71.4,137,71.5,139.4,71.6,140.2,72.4,144,72.4,147.4,72.3,150.4,71.5,152.6,70.8,156.6,71,159.8,70.6,160.8,69.6,164,69.7,167.8,69.6,170.6,70.1,173.6,69.8,176.4,69.6,180,68.9,180,65.2,178.6,64.6,177.6,64.2,178.6,63.2,176.8,62.6,174.6,61.8,172,60.8,170.2,59.9,166.2,60.3,164.8,59.8,163.6,59.6,162.2,58.4,161.8,57.6,163.2,56.2,162.4,55.4,161.6,54.8,160.2,54.2,158.4,52.8,156.6,51,155.8,53.6,155.6,55.8,156.2,57.4,157.6,58,159,58.6,160.8,60.4,163,61.6,160.2,61.8,159.4,61.2,156.6,61.6,154.2,59.8,152.4,59.2,149.2,59.6,147.2,59.4,145,59.4,143.4,59.4,142,58.6,139.8,57.6,137.8,56.6,136.4,55.4,135,54.8,137,53.8,138.6,53.8,140.2,53.4,141.4,52.2,141.2,50.6,140.4,48.6,138.6,47.2,137.2,45.8,135.4,44.4,133.8,43.2,132.2,43.2,130.8,42.6,129.8,41.2,129.6,40.4,128.2,39.4,129.4,37.6,129.4,36,128.6,35.2,127.4,34.7,126.4,34.4,126.2,35.3,126.6,36.4,126.2,37.2,126.6,37.8,125.4,37.8,124.8,38.6,125.4,39.4,124.6,39.8,122.8,40.4,121.6,39.4,121.2,38.8,121.8,40,121.2,40.9,119.6,39.9,118.6,39.2,117.6,38.8,118.6,37.6,119.2,37.2,120.6,37.8,122.4,37.4,122.4,36.8,120.6,36.1,119.4,35.2,119.6,34.4,120.6,33.4,121.4,32.2,121.8,31.6,121.6,30.8,122,29.8,121.6,28.8,121.4,28.2,120.6,27.2,119.8,26.4,119.4,25.4,118.4,24.6,117.2,23.6,116.2,22.8,114.8,22.6,113.6,22.2,112.4,21.8,110.8,21.4,110.4,20.4,109.8,21.4,108.6,21.6,107.4,21.2,106.6,20.4,105.8,19.4,105.6,18.6,106.6,17.6,107.6,16.4,108.6,15.4,109.2,13.8,109.2,11.6,108.6,11,107.2,10.4,106.6,9.8,105.2,8.6,104.8,9.6,104.8,10.4,103.6,10.6,102.6,12,101.2,12.6,100.6,13.4,100,12.2,99.2,10,99.6,8.8,100.4,7.2,101.6,6.8,102.4,6.1,103.4,4.8,103.4,3,104.2,1.4,103.4,1.3,102.2,2.2,101.2,2.9,100.4,4.2,100.4,5.6,99.6,6.6,98.6,8,98.4,9.4,98.8,10.8,98.6,12.6,98.2,14,97.8,15.4,97.6,16.6,96.4,16.6,95.2,15.8,94.4,16.4,94.6,17.8,94,19.4,93.4,20.4,92.4,21.4,91.8,22.4,90.6,22.6,89.6,21.8,88.6,21.6,87.4,21.4,86.6,20.2,85,19.4,84,18.2,82.4,17,81.4,16.2,80.6,15.4,80.2,13.6,80.2,12.2,79.8,10.6,79.2,10.2,78.4,9,77.6,8.1,77,8.4,76.4,9.4,75.6,11.6,74.8,12.8,74.4,14.6,73.6,16,73.2,17.6,72.8,19,72.8,20.4,72.6,21.4,72.2,21.2,70.8,20.6,69.4,21.8,69.2,22.6,70.4,23,68.8,23.4,68,23.8,66.8,24.8,65.2,25.3,63.6,25.3,61.6,25.2,59.6,25.5,58,25.7,57.2,27.2,56.2,27.2,54.8,26.6,53.4,26.9,51.6,27.8,50.6,29.2,50,30.2,48.6,30.1,48,29.8,48.4,28.4,49.2,27.2,50.2,26.4,50.6,25.8,51.4,26,51.6,24.8,52.2,24,53.6,24.2,55,24.6,56,25.6,56.4,26.4,56.4,25.2,56.6,24.4,57.6,23.8,58.8,23.4,59.8,22.4,59.4,21.4,58.4,20.4,57.8,19,56.8,18.8,55.6,17.8,54.2,17,52.2,16.2,50.2,15.4,48.6,14,46.8,13.4,45,12.8,43.6,12.6,43.2,13.4,42.8,14.8,42.6,16.4,41.8,17.6,40.8,19.4,39.6,20.6,39,21.8,38.6,23.6,37.4,24.8,36.6,26.2,35.6,27.6,34.8,28.6,34.6,29.6,34,28,33.4,28.6,32.6,29.8,32.4,31.2,34.2,31.3,34.8,32.6,35.2,33.4,35.6,34.6,35.8,35.8,36,36.6,34.6,36.8,32.8,36.2,31.2,36.6,29.6,36.2,28.2,36.8,27.4,37.4,26.6,38.4,26.8,39.4,26.2,40,26.6,40.6,28,41,29.2,41.2,31.2,41.1,33.2,41.9,35.2,42,36.8,41.4,38.4,40.9,40.2,41,41.6,41.6,41.6,42.4,40.4,43.2,39,44,37.6,44.6,36.8,45.2,35.4,45.2,35.4,44.6,33.6,44.4,32.6,45.4,33.6,45.9,32,46.2,31,46.6,30.2,45.6,29.6,45,29,44.4,28.6,43.2,28,42.2,28,41.4,29,41.2,28.2,40.8,26.6,40.6,26.2,40.4,24.2,40.8,23.4,40.4,22.6,40.2,23.4,39.4,22.6,38.2,23.8,38,24.2,37.6,23.4,37.2,22.8,36.4,21.8,36.8,21.6,37.6,21,38.4,20.8,39.4,20,39.8,19.4,41.6,19.6,42.2,18.6,42.6,17.6,43,16.6,43.4,15.8,44.2,14.4,45.4,13.6,45.8,12.4,45.4,12.2,44.6,12.4,44,13.6,43.4,14,42.4,15.4,41.8,16.2,41.6,18,40.6,18.4,40,17.4,40.4,16.8,40.2,16.6,39.6,17.2,39,16.6,38.2,15.6,38,15.8,38.8,16,39.6,15.6,40.2,14.6,40.6,14,41.2,12.6,41.6,11.4,42.4,10.4,43,9.6,44.2,8.4,44.2,7,43.6,6.2,43.1,5,43.4,3.8,43.4,3.2,42.6,3.2,41.8,2,41.2,0.8,40.8,0,39.8,-0.4,39.2,0.2,38.8,-0.6,38.2,-0.8,37.6,-1.8,37.2,-2.4,36.8,-4.4,36.7,-5,36.2,-5.6,36,-6.2,36.4,-6.4,36.8,-7.4,37.2,-8.8,37],\n  [-5.7,50.1,-4.2,50.4,-3,50.7,-1,50.8,0.3,50.8,1.4,51.1,1.4,51.5,1.7,52.6,0.3,53,0.1,53.6,-1,54.5,-1.6,55.5,-2.1,56,-2.6,56.4,-2,57.1,-1.8,57.6,-3.5,57.7,-3,58.6,-5,58.6,-5.4,58,-5.8,57.3,-5.6,56.6,-5.6,56.1,-5.6,55.3,-4.8,55.5,-5,54.8,-3.3,54.9,-3.4,54.3,-2.9,53.8,-3.1,53.3,-4.6,53.3,-4.2,52.9,-4.1,52.4,-5.3,51.9,-4.2,51.6,-3.2,51.4,-4.2,51.2,-5,50.7],\n  [-10,51.6,-8.5,51.6,-6.3,52.2,-6,53,-6.2,54,-5.5,54.4,-5.8,55.2,-7.3,55.4,-8.3,55.2,-8.6,54.6,-10,54.2,-9.9,53.5,-10.3,52.9,-9.4,52.6,-10.4,52.1],\n  [-24.5,65.5,-22,66.4,-18,66.2,-15,66.5,-13.5,65.3,-14.5,64.4,-17,63.8,-20,63.5,-22.7,63.8,-21.8,64.5,-24,64.9],\n  [10.8,79.7,15,80,18,79.7,20,80.4,24,80.4,27.2,80,23,79.2,21.5,78.6,22,77.6,19,77,16.5,76.5,14,77.2,12.5,78,11.5,78.6],\n  [52,71.5,53,72.5,54,73.5,56,74.5,58,75.5,61,76.3,65,76.9,69,77,68,76.3,64,75.6,61,75,58.5,74,56.8,73,56,72,57.5,70.6,55,70.5,53,70.6],\n  [91,79.5,96,81.2,100,80.8,104,79.3,100,78.3,95,78.6],\n  [136.2,75.6,140,76.1,143,75.9,149,75.2,145,74.5,140,74.6,137.2,74.9],\n  [8.6,41.4,9.4,41.4,9.6,42.6,9.4,43,8.6,42.4],\n  [8.2,41,9.7,41,9.8,40,9.6,39,8.4,39,8.4,40],\n  [12.4,38.1,15.6,38.3,15.1,36.7,12.5,37.6],\n  [23.5,35.6,26.3,35.3,26,35,23.5,35.2],\n  [32.3,35.1,34.6,35.7,34,34.6,32.5,34.7],\n  [32.4,31.3,30,31.4,28,31.1,25.2,31.6,23,32.6,21,32.8,20,32,19.6,30.6,18,30.8,16,31.3,15.2,32.3,13,32.9,11.2,33.2,10.2,33.8,11,35.2,10.6,36.8,11.1,37.1,10,37.3,8.6,36.9,6.4,37.1,5,36.8,3,36.8,1,36.5,-1,35.4,-2.2,35.2,-5.3,35.9,-6,35.4,-6.8,34,-8.4,33.4,-9.6,32.4,-9.8,30.6,-10,29.4,-11.4,28.2,-12.9,27.8,-14.4,26.2,-15,24.6,-16.2,23.6,-16.9,22.2,-17.1,20.8,-16.4,19.6,-16.2,18.2,-16.4,16.6,-16.8,15.4,-17.4,14.8,-16.8,13.6,-16.8,12.4,-16.2,11.8,-15.2,11,-14.6,10.4,-13.6,9.6,-13.2,8.8,-12.4,7.6,-11.4,6.9,-10.2,6.2,-8.8,5,-7.4,4.4,-6,4.8,-4.6,5.2,-3.2,5.1,-2,4.7,-0.8,5.4,0.6,5.8,1.6,6.2,2.8,6.4,4.4,6.3,5.6,5.2,6.2,4.3,7.4,4.4,8.4,4.6,9,3.8,9.6,3,9.8,2,9.4,1,9.2,-0.2,8.8,-1,9.8,-2.6,11,-3.8,11.8,-5,12.4,-6,13.2,-8.4,13.4,-9.8,13.6,-11.6,13,-12.6,12.4,-14,11.8,-16,11.6,-17.2,12,-18.6,13,-20.4,14.2,-22.6,14.4,-24.4,15,-26.4,15.8,-27.8,16.4,-28.6,17,-29.6,17.8,-31.2,18.4,-32.8,18.2,-33.6,18.4,-34.1,19.4,-34.6,20,-34.8,21.4,-34.4,22.6,-33.9,24,-34,25.6,-33.8,26.6,-33.6,27.8,-33,29,-32,30,-31.2,30.8,-30,31.4,-29.2,32.2,-28.4,32.6,-27,32.8,-26.2,32.8,-25.6,33.4,-25.2,35,-24.6,35.4,-23.6,35.4,-22.4,35.6,-21.2,35.2,-20,34.8,-19.2,35.6,-18.4,36.6,-17.6,38,-17,39.4,-16.4,40.4,-15.4,40.6,-14,40.6,-12.6,40.4,-11.2,40,-10.2,39.6,-9,39.4,-7.8,39.2,-6.6,38.8,-5.8,39.2,-4.8,39.6,-3.6,40.2,-2.6,40.8,-1.8,41.6,-1,42.4,0,43.4,1.4,44.6,2.6,45.8,4,47.4,5.6,48.8,7.6,49.6,9.4,50.8,10.6,51.2,11.6,51,12,49,11.4,47,11,45.4,10.6,44,10.6,43.2,11.6,42.6,12.6,41.8,14.4,41,15,40.2,16,39.4,17.4,38.6,18.6,38,20.4,37.2,22,36.8,23.4,35.6,25.2,34.8,26.8,34,28,33.6,29,32.8,30.4,32.6,31.2],\n  [49.3,-12,50.4,-15.4,49.8,-16.8,49.4,-18.2,48.6,-20.4,47.8,-23,47.2,-24.9,45.4,-25.6,44,-25,43.4,-23.4,43.6,-21.6,44.4,-20,44.2,-18,44,-16.6,45.4,-16,46.6,-15.6,48,-14.2,48.6,-13.4],\n  [129.7,33.5,131,33.9,132,33.3,131.6,32,131.1,31.2,130.3,31.1,130.1,32.2,129.7,32.6],\n  [132.2,33.4,133.5,34.3,134.6,34.2,134.7,33.8,134.2,33.3,133,32.8],\n  [130.9,34.3,132.6,35.4,134.3,35.6,135.8,35.6,136.1,36.3,136.7,37.4,137.3,37.2,138.6,37.6,139.4,38.2,140,39.5,140.1,40.6,140.4,41.3,141.5,41.4,141.5,40.4,142,39.5,141.6,38.4,141,37.8,140.9,36.9,140.8,35.7,140.2,35,139.6,35.2,138.9,34.6,137.9,34.6,137,34.6,136.9,34.3,135.8,33.45,135.1,33.9,135.3,34.6,134,34.7,132.6,34.3,131.3,33.95],\n  [139.8,42.2,140.3,41.4,141.2,41.8,143.2,41.9,144.5,42.95,145.8,43.4,145.2,44.2,143.5,44.2,142,45.5,141.6,44.7,141.4,43.5,140.4,43.3,139.9,42.6],\n  [142,46,143.5,49,144.6,49,143,51,143.2,53.6,142.6,54.4,142.2,53.4,141.8,51.6,142.2,49.4,141.8,47.6],\n  [120.1,23,120.8,21.9,121.9,25,121,25.3],\n  [108.7,19.2,110.5,20,111,19.5,110,18.3,109,18.4],\n  [80,9.8,81.9,7.5,81.2,6,80,6.2,79.8,8],\n  [120.4,18.6,122.3,18.5,122.2,17,121.6,15.8,122.4,14.2,124.1,13.1,123.2,13,122,13.8,120.6,14.2,120.2,16.2],\n  [121.9,11.9,123.2,11.9,124.4,12.6,125.6,12.4,125.6,11,125,10,123.2,9.1,122.4,9.8,122,10.6],\n  [117.2,8.4,118.2,9.2,119.4,10.6,119.4,11.4,119.1,10.9,117.9,9.6],\n  [122,8,123.4,8.7,125,9.4,126.5,9.3,126.3,6.5,125.5,5.8,124,6.8,123,7.6],\n  [109,1.5,110,2,111.5,1.5,113,3.2,115,5,116.7,7,117.8,6.2,119.2,5.2,118.4,4.4,117.8,2.4,119,1,118,0.6,117.6,-0.6,116.5,-1.5,116.2,-3.5,114.5,-4,113,-3.2,111.6,-3.4,110.2,-2.9,109.6,-1.4,109.2,-0.4],\n  [95.3,5.6,97.4,5.2,98.4,4.2,99.8,2.8,100.6,2,101.6,1.6,103.4,0,103.7,-1,104.6,-2,105.8,-3,106,-4.6,105.9,-5.8,104.6,-5.9,103.4,-4.8,102.2,-3.9,101,-2.4,100.4,-1,99.6,0.4,98.8,1.6,97.6,2.6,96.4,3.6,95.6,4.6],\n  [105.2,-6.8,106.5,-6,108.5,-6.5,110.8,-6.4,112.7,-6.9,114.5,-7.8,114.5,-8.7,111,-8.3,108,-7.8,105.3,-6.9],\n  [114.5,-8,117,-8.1,119,-8.2,121,-8.3,123,-8.2,122.8,-8.7,121,-8.9,119,-8.9,117,-9,115,-8.8],\n  [123.5,-10.3,125,-9.2,127.3,-8.4,126.8,-8.9,125,-9.8,124,-10.4],\n  [119.4,-5.6,119.5,-3.6,118.8,-2.8,119.5,-0.5,120.1,0.8,121,1.3,122.5,1,124.5,1.6,125.2,1.5,124.3,0.4,123,0.5,121.5,0.5,120.3,0.2,120.2,-0.8,121.6,-0.8,123.4,-0.9,123.2,-1.6,121.6,-1.8,122.2,-3,123.2,-4.6,122.6,-5.2,121.6,-4.6,121,-3,120.4,-3,120.5,-5.5],\n  [127.5,2,128.5,1.5,128.8,0.5,128,0.2,127.5,-0.6,127.8,1],\n  [127.9,-3.2,130.8,-3,130.6,-3.8,128.5,-3.6],\n  [131,-0.8,132.4,-0.4,134,-0.9,135.4,-3.2,137.6,-1.6,139.6,-2.2,141,-2.6,143,-3.4,144.6,-3.9,145.8,-5,146.8,-6.4,147.6,-6.6,147.8,-8,149.2,-9.4,150.6,-10.4,149,-10.4,147.2,-10.1,146,-8.8,144.6,-7.8,143.6,-8.4,143,-9.2,141.2,-9.2,140.2,-8.2,138.8,-8.2,138,-7.4,138.6,-6.6,137.6,-5.4,135.6,-4.4,134,-3.8,132.8,-4,132,-2.8,133.2,-2.4,132.2,-2.2,131,-1.4],\n  [148.3,-5.5,150,-5.2,151.5,-4.2,152.2,-4.3,151,-5.8,149,-6.2],\n  [164.1,-20.2,165,-20.5,167,-22.1,166.5,-22.4,165,-21.4],\n  [113.5,-22,113.6,-24.6,114.2,-26.4,113.4,-26.6,114.6,-28.8,115,-30.6,115.6,-32.6,115.2,-34.2,116.6,-35,118.2,-35,119.8,-34.4,121.8,-33.8,123.6,-33.9,124.4,-33,126.2,-32.3,128.8,-31.6,131.2,-31.5,132.6,-32,134.2,-32.8,135.2,-34.6,136,-34.8,137.4,-34,137.8,-33,138,-34.4,137.6,-35.6,138.6,-35.6,139.6,-36.6,140.6,-38,142.4,-38.4,143.6,-38.8,144.8,-38.2,146.4,-39.1,147.6,-38,149.8,-37.6,150.2,-36.2,150.8,-35,151.4,-33.6,152.4,-32.4,153.2,-30.6,153.6,-28.6,153.2,-27,153,-25.2,152,-24.6,151,-23.4,150,-22.2,149.4,-21,148.6,-20.2,147.4,-19.4,146.2,-18.6,146,-17,145.4,-15.6,145.2,-14.8,144.4,-14.2,143.6,-13.6,143.4,-12.2,142.6,-10.8,142,-11.6,141.6,-13.4,141.6,-15.4,141,-16.8,140.2,-17.6,139.2,-17.2,137.8,-16.2,136.6,-15.6,135.4,-14.8,135.8,-13.4,136.8,-12.2,136,-11.8,134.6,-12,133.4,-11.6,132.6,-11.4,131.8,-11.4,130.4,-12.4,129.6,-14.6,128.4,-15,127.4,-14,126.2,-14.2,125,-15,124.4,-16.4,123.6,-17.2,122.4,-17.6,122.2,-18.4,121.2,-19.4,119.6,-20,118.2,-20.4,117,-20.6,115.6,-21.2,114.6,-21.8],\n  [144.7,-40.7,148.3,-40.9,148,-43,146.5,-43.6,145.2,-42.2],\n  [172.7,-34.5,173.6,-35,174.6,-36.2,175.4,-37,175.8,-36.8,176.2,-37.6,177.4,-38,178.5,-37.7,177.9,-39.2,177,-39.4,176.8,-40.2,175.8,-41.4,175,-41.6,174.6,-41.2,175.2,-40.4,174.6,-39.8,173.8,-39.2,174.6,-38.4,174.6,-37.4],\n  [172.7,-40.5,174.2,-41.2,174.2,-41.8,173.4,-42.8,172.6,-43.8,171.2,-44.4,170.6,-45.8,169.4,-46.6,168,-46.6,166.6,-46,166.6,-45.2,168,-44.2,170.2,-43.2,171.4,-41.8,172,-40.8],\n];\n\nconst WATER: number[][] = [\n  [47,44.3,47.3,45.7,49.3,46.6,51.5,47,53.1,46.6,53,45.3,51,44.4,51.3,43.2,52.7,42,52.9,41,54,40.8,53.8,39.5,53.9,37.4,51,36.7,49.5,37.5,48.9,38.5,49.4,40.3,48.5,41.9,47.5,43],\n  [-92.1,46.7,-90,46.6,-86.5,46.4,-84.5,46.5,-84.8,47.5,-86,48.6,-88.5,48.4,-90,47.8],\n  [-87.9,41.7,-86.6,41.8,-86.2,43.5,-85.5,45.3,-84.8,45.8,-86.5,45.9,-87.6,44.8,-87.8,43.5],\n  [-84.6,45.9,-83.5,46.1,-81,46.1,-80.2,45.2,-80.6,44.5,-81.7,44.3,-82.4,43,-83.3,44,-83.4,44.9,-84.4,45.5],\n  [-83.4,41.7,-81,41.6,-79,42.5,-79.5,42.9,-81.5,42.6,-83.1,42.1],\n  [-79.8,43.3,-76.2,43.4,-76.3,44.2,-79,43.9],\n  [31.6,-1,33,-0.3,34,-0.2,34.5,-1,33.5,-2.6,32,-2.6],\n  [58.4,46.6,61.2,46.6,61.8,45,60.4,43.8,58.6,44.4],\n  [103.8,51.6,105.6,51.8,108.6,53.6,109.8,55.6,108.4,55.2,106,52.6],\n];\n\nconst TAU = Math.PI * 2;\nconst LAT_TOP = 84;\nconst LAT_BOT = -56;\nconst LAT_SPAN = LAT_TOP - LAT_BOT;\nconst LAT_MID = (LAT_TOP + LAT_BOT) / 2;\nconst MR = 2;\nconst MASK_W = 360 * MR;\nconst MASK_H = LAT_SPAN * MR;\nconst WARM: [number, number, number] = [222, 247, 255];\nconst ALPHAS = [0.06, 0.16, 0.3, 0.46, 0.64, 0.82, 1];\nconst TONES = 4;\nconst NORMAL_TAGS = [\"HTTPS\", \"API\", \"SYNC\", \"EDGE\", \"WS\"];\nconst HOT_TAGS = [\"DDOS\", \"SCAN\", \"BRUTE\", \"BOT\"];\nlet maskCache: Uint8Array | null = null;\n\nfunction fillSpan(row: Uint8Array, poly: number[], lat: number, val: number, xs: number[]) {\n  xs.length = 0;\n  const n = poly.length / 2;\n  for (let i = 0, j = n - 1; i < n; j = i++) {\n    const yi = poly[i * 2 + 1];\n    const yj = poly[j * 2 + 1];\n    if (yi > lat !== yj > lat) {\n      const xi = poly[i * 2];\n      const xj = poly[j * 2];\n      xs.push(xi + ((lat - yi) * (xj - xi)) / (yj - yi));\n    }\n  }\n  xs.sort((a, b) => a - b);\n  for (let k = 0; k + 1 < xs.length; k += 2) {\n    const q0 = Math.max(0, Math.ceil((xs[k] + 180) * MR - 0.5));\n    const q1 = Math.min(MASK_W - 1, Math.floor((xs[k + 1] + 180) * MR - 0.5));\n    for (let q = q0; q <= q1; q++) row[q] = val;\n  }\n}\n\nexport function heroDotWorldmapMask() {\n  if (maskCache) return maskCache;\n  const m = new Uint8Array(MASK_W * MASK_H);\n  const xs: number[] = [];\n  for (let r = 0; r < MASK_H; r++) {\n    const lat = LAT_TOP - (r + 0.5) / MR;\n    const row = m.subarray(r * MASK_W, (r + 1) * MASK_W);\n    for (let k = 0; k < LAND.length; k++) fillSpan(row, LAND[k], lat, 1, xs);\n    for (let k = 0; k < WATER.length; k++) fillSpan(row, WATER[k], lat, 0, xs);\n  }\n  maskCache = m;\n  return m;\n}\n\nfunction maskAt(mask: Uint8Array, lon: number, lat: number) {\n  const r = Math.floor((LAT_TOP - lat) * MR);\n  if (r < 0 || r >= MASK_H) return 0;\n  let q = Math.floor((lon + 180) * MR);\n  q = ((q % MASK_W) + MASK_W) % MASK_W;\n  return mask[r * MASK_W + q];\n}\n\nexport function heroDotWorldmapSnap(mask: Uint8Array, node: HeroDotWorldmapNode): HeroDotWorldmapNode {\n  const interior = (lon: number, lat: number) =>\n    maskAt(mask, lon, lat) === 1 &&\n    maskAt(mask, lon + 0.5, lat) === 1 &&\n    maskAt(mask, lon - 0.5, lat) === 1 &&\n    maskAt(mask, lon, lat + 0.5) === 1 &&\n    maskAt(mask, lon, lat - 0.5) === 1;\n  if (interior(node.lon, node.lat)) return node;\n  let best: [number, number] | null = null;\n  let bestD = Infinity;\n  let fallback: [number, number] | null = null;\n  let fallD = Infinity;\n  for (let dy = -8; dy <= 8; dy++) {\n    for (let dx = -8; dx <= 8; dx++) {\n      const lon = node.lon + dx * 0.5;\n      const lat = node.lat + dy * 0.5;\n      const d = dx * dx + dy * dy;\n      if (maskAt(mask, lon, lat) !== 1) continue;\n      if (d < fallD) {\n        fallD = d;\n        fallback = [lon, lat];\n      }\n      if (d < bestD && interior(lon, lat)) {\n        bestD = d;\n        best = [lon, lat];\n      }\n    }\n  }\n  const pick = best && bestD <= fallD + 8 ? best : fallback;\n  return pick ? { name: node.name, lon: pick[0], lat: pick[1] } : node;\n}\n\nfunction hash(i: number, salt: number) {\n  let x = (Math.imul(i + 1, 0x9e3779b1) ^ Math.imul(salt + 11, 0x85ebca6b)) >>> 0;\n  x = Math.imul((x >>> 16) ^ x, 0x45d9f3b) >>> 0;\n  x = Math.imul((x >>> 16) ^ x, 0x45d9f3b) >>> 0;\n  x = ((x >>> 16) ^ x) >>> 0;\n  return x / 4294967296;\n}\n\nfunction hexRgb(value: string): [number, number, number] | null {\n  const m = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(value.trim());\n  if (!m) return null;\n  let h = m[1];\n  if (h.length === 3) h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];\n  const n = parseInt(h, 16);\n  return [(n >> 16) & 255, (n >> 8) & 255, n & 255];\n}\n\nfunction resolveRgb(value: string, ctx: CanvasRenderingContext2D, fallback: [number, number, number]): [number, number, number] {\n  const direct = hexRgb(value);\n  if (direct) return direct;\n  ctx.fillStyle = \"#000000\";\n  ctx.fillStyle = value;\n  const out = String(ctx.fillStyle);\n  const hex = hexRgb(out);\n  if (hex) return hex;\n  const nums = out.match(/[\\d.]+/g);\n  if (nums && nums.length >= 3) return [Number(nums[0]), Number(nums[1]), Number(nums[2])];\n  return fallback;\n}\n\nfunction inkFor(accent: string) {\n  const rgb = hexRgb(accent);\n  if (!rgb) return \"#0a2540\";\n  const lum = (0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]) / 255;\n  return lum > 0.55 ? \"#0a2540\" : \"#ffffff\";\n}\n\nfunction group(n: number) {\n  return String(Math.max(0, Math.round(n))).replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}\n\nexport function heroDotWorldmapRoutes(nodes: HeroDotWorldmapNode[], routes?: [string, string][]) {\n  const out: [number, number][] = [];\n  const seen = new Set<number>();\n  const n = nodes.length;\n  const add = (a: number, b: number) => {\n    if (a < 0 || b < 0 || a === b) return;\n    const key = Math.min(a, b) * 4096 + Math.max(a, b);\n    if (seen.has(key)) return;\n    seen.add(key);\n    out.push([a, b]);\n  };\n  if (routes && routes.length) {\n    const index = new Map<string, number>();\n    nodes.forEach((node, i) => index.set(node.name.toLowerCase(), i));\n    for (const [a, b] of routes) add(index.get(String(a).toLowerCase()) ?? -1, index.get(String(b).toLowerCase()) ?? -1);\n    return out;\n  }\n  for (let i = 0; i < n; i++) {\n    let made = 0;\n    for (let t = 0; t < 24 && made < 3; t++) {\n      const j = Math.floor(hash(i * 31 + t, 61) * n);\n      if (j === i) continue;\n      const dl = Math.abs(nodes[i].lon - nodes[j].lon);\n      const dd = Math.hypot(Math.min(dl, 360 - dl), nodes[i].lat - nodes[j].lat);\n      if (dd < 28) continue;\n      add(i, j);\n      made++;\n    }\n  }\n  return out;\n}\n\nexport interface HeroDotWorldmapArc {\n  from: number;\n  to: number;\n  hot: boolean;\n  start: number;\n  travel: number;\n  lift: number;\n  tag: string;\n  ms: number;\n}\n\nexport function heroDotWorldmapArc(k: number, rate: number, nodes: HeroDotWorldmapNode[], pairs: [number, number][]): HeroDotWorldmapArc | null {\n  if (!pairs.length || !nodes.length) return null;\n  const p = pairs[Math.floor(hash(k, 1) * pairs.length) % pairs.length];\n  const flip = hash(k, 2) < 0.5;\n  const from = flip ? p[1] : p[0];\n  const to = flip ? p[0] : p[1];\n  const a = nodes[from];\n  const b = nodes[to];\n  const du = (b.lon - a.lon) / 360;\n  const dv = (b.lat - a.lat) / 360;\n  const dist = Math.hypot(du, dv);\n  const hot = hash(k, 3) < 0.28;\n  const tags = hot ? HOT_TAGS : NORMAL_TAGS;\n  return {\n    from,\n    to,\n    hot,\n    start: (k + 0.15 + hash(k, 4) * 0.7) / rate,\n    travel: 2.3 + dist * 3.9,\n    lift: Math.min(0.17, 0.035 + dist * 0.3),\n    tag: tags[Math.floor(hash(k, 5) * tags.length) % tags.length],\n    ms: Math.round(14 + hash(k, 6) * hash(k, 7) * 220 + dist * 120),\n  };\n}\n\nfunction epsAt(tick: number, rate: number) {\n  const base = 8800 * Math.max(0.2, rate);\n  return Math.round(base * (1 + 0.05 * Math.sin(tick * 0.9) + 0.035 * Math.sin(tick * 2.3 + 1)) + hash(tick, 90) * 140);\n}\n\nfunction makeGlow(rgb: [number, number, number]) {\n  const c = document.createElement(\"canvas\");\n  c.width = 64;\n  c.height = 64;\n  const g = c.getContext(\"2d\");\n  if (!g) return c;\n  const grad = g.createRadialGradient(32, 32, 0, 32, 32, 32);\n  grad.addColorStop(0, `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, 0.9)`);\n  grad.addColorStop(0.25, `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, 0.35)`);\n  grad.addColorStop(1, `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, 0)`);\n  g.fillStyle = grad;\n  g.fillRect(0, 0, 64, 64);\n  return c;\n}\n\nfunction Mark() {\n  return (\n    <svg className=\"hb-hh10-mark\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n      <rect x=\"2.5\" y=\"5\" width=\"19\" height=\"14\" rx=\"3\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeDasharray=\"1.2 2.1\" strokeLinecap=\"round\" />\n      <path d=\"M6.5 15c2.5-6 8.5-6 11 0\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" />\n      <circle cx=\"6.5\" cy=\"15\" r=\"1.7\" fill=\"currentColor\" />\n      <circle cx=\"17.5\" cy=\"15\" r=\"1.7\" fill=\"currentColor\" />\n    </svg>\n  );\n}\n\nconst SLOTS = [0, 1, 2, 3, 4];\n\nexport function HeroDotWorldmap({\n  title = \"Every route, live on one map.\",\n  subtitle = \"Live traffic and threat telemetry from 28 regions on a single flat map. Built for status pages, NOC walls and security consoles.\",\n  caption = \"28 regions · live arcs · MIT licensed\",\n  command = \"npx shadcn@latest add https://hyperblur.dev/r/hero-dot-worldmap.json\",\n  primaryCta = defaultPrimary,\n  brand = \"Your brand\",\n  nav = defaultNav,\n  navCta = defaultNavCta,\n  learnMore = defaultMore,\n  accent = \"#ffc857\",\n  alert = \"#ff7a66\",\n  density = 1,\n  speed = 1,\n  nodes = heroDotWorldmapCities,\n  routes,\n  rate = 1.4,\n  showFeed = true,\n  showStats = true,\n  headingAs = \"h1\",\n  onSearch,\n  showBar = false,\n  className = \"\",\n  style,\n  ...rest\n}: HeroDotWorldmapProps) {\n  const rootRef = React.useRef<HTMLElement>(null);\n  const canvasRef = React.useRef<HTMLCanvasElement>(null);\n  const stageRef = React.useRef<HTMLDivElement>(null);\n  const statsRef = React.useRef<HTMLDivElement>(null);\n  const tipRef = React.useRef<HTMLDivElement>(null);\n  const tipNameRef = React.useRef<HTMLElement>(null);\n  const tipMetaRef = React.useRef<HTMLSpanElement>(null);\n  const timerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  const queueRef = React.useRef<FeedEvent[]>([]);\n  const aliveRef = React.useRef(0);\n  const hotRef = React.useRef(0);\n  const runRef = React.useRef(0);\n  const [copied, setCopied] = React.useState(false);\n  const [feed, setFeed] = React.useState<FeedEvent[]>([]);\n  const [tick, setTick] = React.useState(0);\n  const [alive, setAlive] = React.useState(() => Math.round(Math.max(0.2, rate) * 4.8));\n  const [blocked, setBlocked] = React.useState(18240);\n\n  const safeRate = Math.min(6, Math.max(0.2, Number.isFinite(rate) ? rate : 1.4));\n  const routeJson = routes ? JSON.stringify(routes) : \"\";\n  const nodeJson = JSON.stringify(nodes);\n\n  React.useEffect(() => {\n    const root = rootRef.current;\n    const canvas = canvasRef.current;\n    const stage = stageRef.current;\n    const ctx = canvas?.getContext(\"2d\");\n    if (!root || !canvas || !stage || !ctx) return;\n    const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    const mult = Math.min(2, Math.max(0.2, Number.isFinite(density) ? density : 1));\n    const pace = Math.max(0, Number.isFinite(speed) ? speed : 1);\n    const mask = heroDotWorldmapMask();\n    runRef.current++;\n    const run = runRef.current;\n    const parsed = JSON.parse(nodeJson) as HeroDotWorldmapNode[];\n    const list = parsed.filter((n) => Number.isFinite(n.lon) && Number.isFinite(n.lat)).map((n) => heroDotWorldmapSnap(mask, n));\n    const pairs = heroDotWorldmapRoutes(list, routeJson ? (JSON.parse(routeJson) as [string, string][]) : undefined);\n    const nN = list.length;\n    const nu = new Float32Array(nN);\n    const nv = new Float32Array(nN);\n    const nph = new Float32Array(nN);\n    const nRoutes = new Int32Array(nN);\n    for (let i = 0; i < nN; i++) {\n      nu[i] = list[i].lon / 360;\n      nv[i] = (list[i].lat - LAT_MID) / 360;\n      nph[i] = hash(i, 20);\n    }\n    for (const [a, b] of pairs) {\n      nRoutes[a]++;\n      nRoutes[b]++;\n    }\n    const nsx = new Float32Array(nN);\n    const nsy = new Float32Array(nN);\n    const nHit = new Float32Array(nN).fill(-99);\n\n    const acc = resolveRgb(accent, ctx, [255, 200, 87]);\n    const hot = resolveRgb(alert, ctx, [255, 122, 102]);\n    const fills: string[] = [];\n    for (let b = 0; b < ALPHAS.length; b++) {\n      for (let t = 0; t < TONES; t++) {\n        const m = t / (TONES - 1);\n        const r = Math.round(WARM[0] + (acc[0] - WARM[0]) * m);\n        const g = Math.round(WARM[1] + (acc[1] - WARM[1]) * m);\n        const bl = Math.round(WARM[2] + (acc[2] - WARM[2]) * m);\n        fills.push(`rgba(${r}, ${g}, ${bl}, ${ALPHAS[b].toFixed(3)})`);\n      }\n    }\n    const accCss = `rgb(${acc[0]}, ${acc[1]}, ${acc[2]})`;\n    const hotCss = `rgb(${hot[0]}, ${hot[1]}, ${hot[2]})`;\n    const warmCss = `rgb(${WARM[0]}, ${WARM[1]}, ${WARM[2]})`;\n    const glowAcc = makeGlow(acc);\n    const glowHot = makeGlow(hot);\n    const glowWarm = makeGlow(WARM);\n\n    let du = new Float32Array(0);\n    let dv = new Float32Array(0);\n    let dbase = new Float32Array(0);\n    let dtone = new Uint8Array(0);\n    let dsize = new Float32Array(0);\n    let sx = new Float32Array(0);\n    let sy = new Float32Array(0);\n    let ss = new Float32Array(0);\n    let bucket = new Uint8Array(0);\n    let order = new Int32Array(0);\n    let total = 0;\n    const buckets = ALPHAS.length * TONES;\n    const counts = new Int32Array(buckets);\n    const starts = new Int32Array(buckets);\n\n    let w = 0;\n    let h = 0;\n    let cx = 0;\n    let cy = 0;\n    let mapW = 0;\n    let small = false;\n    let dpr = 1;\n    let visible = true;\n    let raf = 0;\n    let last = 0;\n    let time = reduce ? 14 : 9;\n    let pointer = false;\n    let ptx = 0;\n    let pty = 0;\n    let mx = -9999;\n    let my = -9999;\n    let curX = 0;\n    let curY = 0;\n    let hover = -1;\n    let tipShown = false;\n    let lastK = Math.floor(time * safeRate);\n    while (lastK > -50) {\n      const arc = heroDotWorldmapArc(lastK, safeRate, list, pairs);\n      if (!arc || arc.start <= time) break;\n      lastK--;\n    }\n\n    function pushEvent(k: number) {\n      const arc = heroDotWorldmapArc(k, safeRate, list, pairs);\n      if (!arc) return;\n      if (arc.hot) hotRef.current++;\n      queueRef.current.push({ key: run * 1000000 + k, from: list[arc.from].name, to: list[arc.to].name, tag: arc.tag, hot: arc.hot, ms: arc.ms });\n      if (queueRef.current.length > 12) queueRef.current.splice(0, queueRef.current.length - 12);\n    }\n    queueRef.current = [];\n    for (let k = lastK - 4; k <= lastK; k++) pushEvent(k);\n    hotRef.current = 0;\n\n    let tiltC = 1;\n    let tiltS = 0;\n    let yawC = 1;\n    let yawS = 0;\n    let focal = 1;\n    let liftK = 1;\n    let pz = 0;\n    let pScale = 1;\n    let qx = 0;\n    let qy = 0;\n\n    function project(u: number, v: number, lift: number) {\n      const x = u * mapW;\n      const y = v * mapW;\n      const hh = lift * mapW * liftK;\n      const up = y * tiltC + hh;\n      const z0 = y * tiltS - hh * 0.45;\n      const xr = x * yawC + z0 * yawS;\n      const zr = -x * yawS + z0 * yawC;\n      const p = focal / (focal + zr);\n      pz = zr;\n      pScale = p;\n      qx = cx + curX * mapW * 0.012 + xr * p;\n      qy = cy + curY * mapW * 0.008 - up * p;\n    }\n\n    function buildGrid() {\n      const pitch = (small ? 4.2 : 5) / Math.sqrt(mult);\n      const cols = Math.max(84, Math.min(400, Math.round(mapW / pitch)));\n      const rows = Math.max(30, Math.round((cols * LAT_SPAN) / 360));\n      const land = new Uint8Array(cols * rows);\n      for (let r = 0; r < rows; r++) {\n        const lat = LAT_TOP - ((r + 0.5) * LAT_SPAN) / rows;\n        for (let c = 0; c < cols; c++) {\n          const lon = -180 + ((c + 0.5) * 360) / cols;\n          land[r * cols + c] = maskAt(mask, lon, lat);\n        }\n      }\n      const cap = cols * rows;\n      const tu = new Float32Array(cap);\n      const tv = new Float32Array(cap);\n      const tb = new Float32Array(cap);\n      const tt = new Uint8Array(cap);\n      const ts = new Float32Array(cap);\n      const dotPx = Math.min(3.4, Math.max(1.6, (mapW / cols) * 0.56));\n      const sigma = 2 * 6.5 * 6.5;\n      let n = 0;\n      for (let r = 0; r < rows; r++) {\n        const lat = LAT_TOP - ((r + 0.5) * LAT_SPAN) / rows;\n        for (let c = 0; c < cols; c++) {\n          const lon = -180 + ((c + 0.5) * 360) / cols;\n          const idx = r * cols + c;\n          const isLand = land[idx] === 1;\n          if (!isLand) {\n            if (r % 4 !== 2 || c % 4 !== 2) continue;\n            tu[n] = lon / 360;\n            tv[n] = (lat - LAT_MID) / 360;\n            tb[n] = 0.12;\n            tt[n] = 0;\n            ts[n] = dotPx * 0.55;\n            n++;\n            continue;\n          }\n          let coast = 0;\n          if (c > 0 && !land[idx - 1]) coast++;\n          if (c < cols - 1 && !land[idx + 1]) coast++;\n          if (r > 0 && !land[idx - cols]) coast++;\n          if (r < rows - 1 && !land[idx + cols]) coast++;\n          const edge = coast > 0 ? 1 : 0;\n          let heat = 0;\n          for (let i = 0; i < nN; i++) {\n            const dl = lon - list[i].lon;\n            const dd = lat - list[i].lat;\n            const e = Math.exp(-(dl * dl + dd * dd) / sigma);\n            if (e > heat) heat = e;\n          }\n          const grain = hash(idx, 33);\n          tu[n] = lon / 360;\n          tv[n] = (lat - LAT_MID) / 360;\n          tb[n] = 0.62 + 0.2 * edge + 0.14 * heat + 0.16 * grain;\n          let tone = Math.floor(heat * 0.95 * TONES);\n          if (tone >= TONES) tone = TONES - 1;\n          tt[n] = tone;\n          ts[n] = dotPx * (1 + 0.1 * edge + 0.14 * heat);\n          n++;\n        }\n      }\n      total = n;\n      du = tu;\n      dv = tv;\n      dbase = tb;\n      dtone = tt;\n      dsize = ts;\n      sx = new Float32Array(n);\n      sy = new Float32Array(n);\n      ss = new Float32Array(n);\n      bucket = new Uint8Array(n);\n      order = new Int32Array(n);\n    }\n\n    function layout() {\n      if (!root || !canvas || !stage || !ctx) return;\n      const rect = root.getBoundingClientRect();\n      w = rect.width;\n      h = rect.height;\n      dpr = Math.min(2, window.devicePixelRatio || 1);\n      canvas.width = Math.max(1, Math.round(w * dpr));\n      canvas.height = Math.max(1, Math.round(h * dpr));\n      const st = stage.getBoundingClientRect();\n      const stTop = st.top - rect.top;\n      const stH = st.height;\n      const aspect = 360 / LAT_SPAN;\n      const prevW = mapW;\n      const wasSmall = small;\n      small = w < 640;\n      cx = w / 2;\n      if (small) {\n        mapW = w * 1.5;\n        cy = stTop + stH / 2;\n      } else {\n        mapW = w;\n        cy = Math.max(stTop + mapW / aspect / 2 + 6, 0);\n      }\n      liftK = small ? 0.75 : 1;\n      focal = mapW * 2.4;\n      if (Math.abs(prevW - mapW) > 0.5 || wasSmall !== small || !total) buildGrid();\n    }\n\n    function ringDots(x: number, y: number, r: number, count: number, squash: number, size: number, phase: number) {\n      if (!ctx) return;\n      for (let q = 0; q < count; q++) {\n        const a = phase + (q / count) * TAU;\n        ctx.fillRect(x + Math.cos(a) * r - size / 2, y + Math.sin(a) * r * squash - size / 2, size, size);\n      }\n    }\n\n    function curve(a: number, b: number, lift: number, t: number) {\n      const u = nu[a] + (nu[b] - nu[a]) * t;\n      const v = nv[a] + (nv[b] - nv[a]) * t;\n      project(u, v, 4 * t * (1 - t) * lift);\n    }\n\n    function draw() {\n      if (!ctx || !w || !h) return;\n      ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n      ctx.clearRect(0, 0, w, h);\n\n      const tilt = 0.05 + curY * 0.02;\n      const yaw = curX * 0.015;\n      tiltC = Math.cos(tilt);\n      tiltS = Math.sin(tilt);\n      yawC = Math.cos(yaw);\n      yawS = Math.sin(yaw);\n      const sc = Math.min(1.25, Math.max(0.55, mapW / 1300));\n      const squash = 0.6;\n\n      const flick = 1;\n\n      counts.fill(0);\n      const depthNorm = 1 / (mapW * 0.06);\n      for (let i = 0; i < total; i++) {\n        project(du[i], dv[i], 0);\n        sx[i] = qx;\n        sy[i] = qy;\n        const near = Math.max(-1, Math.min(1, -pz * depthNorm));\n        ss[i] = dsize[i] * pScale * (1 + 0.1 * near);\n        let b = dbase[i] * (1 + 0.22 * near);\n        const au = Math.abs(du[i]) * 2;\n        if (au > 0.78) b *= 1 - ((au - 0.78) / 0.22) * 0.3;\n        if (b > 0.999) b = 0.999;\n        if (b < 0) b = 0;\n        const bi = Math.floor(b * ALPHAS.length);\n        const k = bi * TONES + dtone[i];\n        bucket[i] = k;\n        counts[k]++;\n      }\n      let acc0 = 0;\n      for (let k = 0; k < buckets; k++) {\n        starts[k] = acc0;\n        acc0 += counts[k];\n      }\n      for (let i = 0; i < total; i++) order[starts[bucket[i]]++] = i;\n      ctx.globalAlpha = flick;\n      let pos = 0;\n      for (let k = 0; k < buckets; k++) {\n        const n = counts[k];\n        if (!n) continue;\n        ctx.fillStyle = fills[k];\n        ctx.beginPath();\n        for (let q = pos; q < pos + n; q++) {\n          const i = order[q];\n          const s = ss[i];\n          ctx.rect(sx[i] - s / 2, sy[i] - s / 2, s, s);\n        }\n        ctx.fill();\n        pos += n;\n      }\n\n      for (let i = 0; i < nN; i++) {\n        project(nu[i], nv[i], 0);\n        nsx[i] = qx;\n        nsy[i] = qy;\n      }\n\n      hover = -1;\n      if (pointer || reduce) {\n        let best = (small ? 26 : 20) ** 2;\n        for (let i = 0; i < nN; i++) {\n          const d = (nsx[i] - mx) ** 2 + (nsy[i] - my) ** 2;\n          if (d < best) {\n            best = d;\n            hover = i;\n          }\n        }\n      }\n\n      if (hover >= 0) {\n        ctx.fillStyle = accCss;\n        const march = reduce ? 0 : time * 0.35;\n        for (const [a, b] of pairs) {\n          if (a !== hover && b !== hover) continue;\n          const from = hover;\n          const to = a === hover ? b : a;\n          const dist = Math.hypot(nu[to] - nu[from], nv[to] - nv[from]);\n          const lift = Math.min(0.17, 0.035 + dist * 0.3);\n          const len = mapW * (dist + lift * 1.3);\n          const steps = Math.max(8, Math.floor(len / 6));\n          for (let q = 0; q < steps; q++) {\n            const t = ((q + (march * steps) / 3) % steps) / steps;\n            curve(from, to, lift, t);\n            ctx.globalAlpha = (0.16 + 0.3 * Math.sin(Math.PI * t)) * flick;\n            const s = 1 * pScale;\n            ctx.fillRect(qx - s / 2, qy - s / 2, s, s);\n          }\n        }\n      }\n\n      const kNow = Math.floor(time * safeRate);\n      const kMin = Math.floor((time - 12) * safeRate) - 1;\n      let liveCount = 0;\n      for (let k = kMin; k <= kNow + 1; k++) {\n        const arc = heroDotWorldmapArc(k, safeRate, list, pairs);\n        if (!arc) break;\n        const age = time - arc.start;\n        const life = arc.travel * 1.52 + 1.2;\n        if (age < 0 || age > life) continue;\n        liveCount++;\n        const dim = hover >= 0 && arc.from !== hover && arc.to !== hover ? 0.28 : 1;\n        const pr = Math.min(1, age / arc.travel);\n        const head = pr * pr * (3 - 2 * pr) * 0.55 + pr * 0.45;\n        const trailLen = 0.5;\n        const tailRaw = Math.min(1, age / arc.travel - trailLen);\n        const tail = Math.max(0, tailRaw);\n        const dist = Math.hypot(nu[arc.to] - nu[arc.from], nv[arc.to] - nv[arc.from]);\n        const len = mapW * (dist + arc.lift * 1.3);\n        const color = arc.hot ? hotCss : accCss;\n        ctx.fillStyle = color;\n\n        const fadeIn = Math.min(1, age / 0.35);\n        const fadeOut = tailRaw >= 1 ? Math.max(0, 1 - (age - arc.travel * (1 + trailLen)) / 0.5) : 1;\n        const ghostA = 0.32 * fadeIn * fadeOut * dim * flick;\n        if (ghostA > 0.005) {\n          const gSteps = Math.max(12, Math.floor(len / 4.2));\n          ctx.globalAlpha = ghostA;\n          for (let q = 0; q <= gSteps; q++) {\n            const t = q / gSteps;\n            if (t < tail) continue;\n            curve(arc.from, arc.to, arc.lift, t);\n            const s = 1.2 * pScale;\n            ctx.fillRect(qx - s / 2, qy - s / 2, s, s);\n          }\n        }\n\n        if (head > tail) {\n          const span = head - tail;\n          const tSteps = Math.max(8, Math.floor((len * span) / 1.8));\n          for (let q = 0; q <= tSteps; q++) {\n            const f = q / tSteps;\n            const t = tail + span * f;\n            curve(arc.from, arc.to, arc.lift, t);\n            const ramp = Math.pow(f, 1.7);\n            ctx.globalAlpha = Math.min(1, 0.08 + 0.95 * ramp) * dim * flick * fadeOut;\n            const s = (0.95 + 0.85 * ramp) * pScale * Math.min(1.15, sc + 0.3);\n            ctx.fillRect(qx - s / 2, qy - s / 2, s, s);\n          }\n        }\n\n        if (pr < 1) {\n          curve(arc.from, arc.to, arc.lift, head);\n          const hx = qx;\n          const hy = qy;\n          const g = (arc.hot ? 42 : 38) * sc * pScale;\n          ctx.globalAlpha = dim * flick;\n          ctx.drawImage(arc.hot ? glowHot : glowAcc, hx - g / 2, hy - g / 2, g, g);\n          ctx.drawImage(arc.hot ? glowHot : glowAcc, hx - g / 4, hy - g / 4, g / 2, g / 2);\n          ctx.drawImage(glowWarm, hx - g / 6, hy - g / 6, g / 3, g / 3);\n          ctx.fillStyle = warmCss;\n          ctx.globalAlpha = dim * flick;\n          const s = 2.8 * pScale;\n          ctx.fillRect(hx - s / 2, hy - s / 2, s, s);\n          ctx.fillStyle = color;\n        } else {\n          const ia = age - arc.travel;\n          if (ia < 1.1) {\n            const ip = ia / 1.1;\n            const arrival = arc.start + arc.travel;\n            if (nHit[arc.to] < arrival) nHit[arc.to] = arrival;\n            const x = nsx[arc.to];\n            const y = nsy[arc.to];\n            const ease = 1 - Math.pow(1 - ip, 3);\n            const fade = Math.pow(1 - ip, 1.4);\n            ctx.globalAlpha = 0.9 * fade * dim * flick;\n            ringDots(x, y, (3 + ease * 24) * sc, 26, squash, 1.4, ip * 0.6);\n            ctx.globalAlpha = 0.5 * fade * dim * flick;\n            ringDots(x, y, (2 + ease * 13) * sc, 16, squash, 1.2, -ip * 0.8);\n            const g = 44 * sc * (0.6 + 0.4 * (1 - ip));\n            ctx.globalAlpha = 0.8 * fade * dim * flick;\n            ctx.drawImage(arc.hot ? glowHot : glowAcc, x - g / 2, y - g / 2, g, g);\n          }\n        }\n\n        if (age < 0.5) {\n          const lp = age / 0.5;\n          const g = 18 * sc;\n          ctx.globalAlpha = 0.7 * (1 - lp) * dim * flick;\n          ctx.drawImage(arc.hot ? glowHot : glowAcc, nsx[arc.from] - g / 2, nsy[arc.from] - g / 2, g, g);\n        }\n      }\n      aliveRef.current = liveCount;\n\n      for (let i = 0; i < nN; i++) {\n        const x = nsx[i];\n        const y = nsy[i];\n        const isHover = i === hover;\n        const sinceHit = time - nHit[i];\n        const warm = sinceHit < 2.4 ? 1 - sinceHit / 2.4 : 0;\n        ctx.fillStyle = accCss;\n        for (let r = 0; r < 3; r++) {\n          const ph = reduce ? 0.2 + r * 0.3 : (time / 2.6 + nph[i] + r / 3) % 1;\n          ctx.globalAlpha = Math.min(1, Math.pow(1 - ph, 1.6) * (0.72 + 0.3 * warm)) * flick;\n          ringDots(x, y, (3 + ph * 15) * sc, 16, squash, 1.3, nph[i] * TAU);\n        }\n        if (isHover) {\n          ctx.globalAlpha = 0.9;\n          ringDots(x, y, 9 * sc + 3, 20, squash, 1.2, reduce ? 0 : time * 0.6);\n        }\n        const g = (isHover ? 36 : 22 + warm * 14) * sc;\n        ctx.globalAlpha = (isHover ? 1 : 0.8 + 0.2 * warm) * flick;\n        ctx.drawImage(glowWarm, x - g / 2, y - g / 2, g, g);\n        ctx.fillStyle = warmCss;\n        ctx.globalAlpha = flick;\n        const s = isHover ? 3 : 2.4;\n        ctx.fillRect(x - s / 2, y - s / 2, s, s);\n      }\n      ctx.globalAlpha = 1;\n\n      const tip = tipRef.current;\n      if (tip) {\n        if (hover >= 0) {\n          const node = list[hover];\n          if (tipNameRef.current) tipNameRef.current.textContent = node.name;\n          if (tipMetaRef.current) {\n            const ns = node.lat >= 0 ? \"N\" : \"S\";\n            const ew = node.lon >= 0 ? \"E\" : \"W\";\n            tipMetaRef.current.textContent = `${Math.abs(node.lat).toFixed(1)}°${ns} ${Math.abs(node.lon).toFixed(1)}°${ew} · ${nRoutes[hover]} routes`;\n          }\n          const tx = Math.max(84, Math.min(w - 84, nsx[hover]));\n          tip.style.transform = `translate3d(${tx.toFixed(1)}px, ${nsy[hover].toFixed(1)}px, 0)`;\n          if (!tipShown) {\n            tip.setAttribute(\"data-on\", \"true\");\n            tipShown = true;\n          }\n        } else if (tipShown) {\n          tip.setAttribute(\"data-on\", \"false\");\n          tipShown = false;\n        }\n      }\n    }\n\n    function frame(now: number) {\n      raf = 0;\n      const step = last ? Math.min(0.05, (now - last) / 1000) : 0;\n      last = now;\n      time += step * pace;\n      let tx = ptx;\n      let ty = pty;\n      if (!pointer) {\n        tx = Math.sin(now * 0.00017) * 0.5;\n        ty = Math.sin(now * 0.00011 + 1.2) * 0.35;\n      }\n      const ease = Math.min(1, step * 2.2);\n      curX += (tx - curX) * ease;\n      curY += (ty - curY) * ease;\n      for (;;) {\n        const arc = heroDotWorldmapArc(lastK + 1, safeRate, list, pairs);\n        if (!arc || arc.start > time) break;\n        lastK++;\n        pushEvent(lastK);\n      }\n      draw();\n      schedule();\n    }\n\n    function schedule() {\n      if (reduce || raf || !visible || document.hidden) return;\n      raf = requestAnimationFrame(frame);\n    }\n\n    function stop() {\n      if (raf) cancelAnimationFrame(raf);\n      raf = 0;\n      last = 0;\n    }\n\n    function onMove(e: PointerEvent) {\n      if (!root) return;\n      const rect = root.getBoundingClientRect();\n      pointer = true;\n      mx = e.clientX - rect.left;\n      my = e.clientY - rect.top;\n      ptx = Math.max(-1, Math.min(1, (mx / rect.width) * 2 - 1));\n      pty = Math.max(-1, Math.min(1, (my / rect.height) * 2 - 1));\n      if (reduce) draw();\n    }\n    function onLeave() {\n      pointer = false;\n      mx = -9999;\n      my = -9999;\n      if (reduce) draw();\n    }\n    function onVisibility() {\n      if (document.hidden) stop();\n      else schedule();\n    }\n\n    layout();\n    draw();\n\n    const ro = new ResizeObserver(() => {\n      layout();\n      draw();\n    });\n    ro.observe(root);\n    const io = new IntersectionObserver((entries) => {\n      visible = entries[0]?.isIntersecting ?? true;\n      if (visible) schedule();\n      else stop();\n    });\n    io.observe(root);\n    root.addEventListener(\"pointermove\", onMove);\n    root.addEventListener(\"pointerleave\", onLeave);\n    document.addEventListener(\"visibilitychange\", onVisibility);\n    schedule();\n\n    return () => {\n      stop();\n      ro.disconnect();\n      io.disconnect();\n      root.removeEventListener(\"pointermove\", onMove);\n      root.removeEventListener(\"pointerleave\", onLeave);\n      document.removeEventListener(\"visibilitychange\", onVisibility);\n    };\n  }, [accent, alert, density, speed, safeRate, routeJson, nodeJson]);\n\n  React.useEffect(() => {\n    const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    let n = 0;\n    const flush = () => {\n      const q = queueRef.current;\n      if (q.length) {\n        const fresh = q.splice(0, q.length).reverse();\n        setFeed((prev) => fresh.concat(prev).slice(0, 5));\n      }\n      setAlive(aliveRef.current);\n      setBlocked(18240 + hotRef.current);\n    };\n    const first = setTimeout(flush, 40);\n    if (reduce) return () => clearTimeout(first);\n    const id = setInterval(() => {\n      n++;\n      setTick(n);\n      flush();\n    }, 900);\n    return () => {\n      clearTimeout(first);\n      clearInterval(id);\n    };\n  }, []);\n\n  React.useEffect(() => {\n    return () => {\n      if (timerRef.current) clearTimeout(timerRef.current);\n    };\n  }, []);\n\n  function copy() {\n    navigator.clipboard?.writeText(command).catch(() => undefined);\n    setCopied(true);\n    if (timerRef.current) clearTimeout(timerRef.current);\n    timerRef.current = setTimeout(() => setCopied(false), 1600);\n  }\n\n  const Heading = headingAs;\n  const vars = {\n    \"--hb-hh10-accent\": accent,\n    \"--hb-hh10-alert\": alert,\n    \"--hb-hh10-ink\": inkFor(accent),\n    ...style,\n  } as React.CSSProperties;\n  const latest = feed[0];\n\n  return (\n    <section ref={rootRef} className={`hb-hh10 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-hero-dot-worldmap\" precedence=\"default\">{css}</style>\n      <canvas ref={canvasRef} className=\"hb-hh10-canvas\" aria-hidden=\"true\" />\n      {showBar ? (\n      <header className=\"hb-hh10-bar\">\n        <a className=\"hb-hh10-brand\" href=\"#\">\n          <Mark />\n          <span>{brand}</span>\n        </a>\n        {nav.length ? (\n          <nav aria-label=\"Primary\">\n            <ul className=\"hb-hh10-links\">\n              {nav.map((item) => (\n                <li key={item.label}>\n                  <a className=\"hb-hh10-link\" href={item.href}>\n                    {item.label}\n                  </a>\n                </li>\n              ))}\n            </ul>\n          </nav>\n        ) : (\n          <span />\n        )}\n        <div className=\"hb-hh10-tools\">\n          <button type=\"button\" className=\"hb-hh10-search\" aria-label=\"Search\" onClick={onSearch}>\n            <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden=\"true\">\n              <circle cx=\"11\" cy=\"11\" r=\"6.5\" />\n              <path d=\"M16 16l4.5 4.5\" />\n            </svg>\n          </button>\n          {navCta ? (\n            <a className=\"hb-hh10-outline\" href={navCta.href}>\n              {navCta.label}\n            </a>\n          ) : null}\n        </div>\n      </header>\n      ) : null}\n      {showStats || showFeed ? (\n        <div className=\"hb-hh10-hud\">\n          {showStats ? (\n            <div ref={statsRef} className=\"hb-hh10-panel hb-hh10-stats\" role=\"group\" aria-label=\"Network activity\">\n              <div className=\"hb-hh10-live\">\n                <span className=\"hb-hh10-dot\" aria-hidden=\"true\" />\n                <span>Live · global</span>\n              </div>\n              <p className=\"hb-hh10-num\">\n                <b>{group(epsAt(tick, safeRate))}</b>\n                <span>events / s</span>\n              </p>\n              <dl className=\"hb-hh10-kv\">\n                <div>\n                  <dt>Routes</dt>\n                  <dd>{alive}</dd>\n                </div>\n                <div>\n                  <dt>Blocked</dt>\n                  <dd data-hot=\"true\">{group(blocked)}</dd>\n                </div>\n              </dl>\n              <ul className=\"hb-hh10-legend\" aria-label=\"Legend\">\n                <li>\n                  <span className=\"hb-hh10-sw\" aria-hidden=\"true\" />\n                  Traffic\n                </li>\n                <li>\n                  <span className=\"hb-hh10-sw\" data-kind=\"hot\" aria-hidden=\"true\" />\n                  Threat\n                </li>\n                <li>\n                  <span className=\"hb-hh10-sw\" data-kind=\"node\" aria-hidden=\"true\" />\n                  Region\n                </li>\n              </ul>\n              <p className=\"hb-hh10-latest\">\n                {latest ? (\n                  <>\n                    <b data-hot={latest.hot}>{latest.tag}</b> {latest.from} → {latest.to}\n                  </>\n                ) : (\n                  \"Listening for events\"\n                )}\n              </p>\n            </div>\n          ) : (\n            <span />\n          )}\n          {showFeed ? (\n            <div className=\"hb-hh10-panel hb-hh10-feed\" role=\"group\" aria-label=\"Live event feed\">\n              <div className=\"hb-hh10-feedhead\">\n                <span>Live feed</span>\n                <span>last 5</span>\n              </div>\n              <ol className=\"hb-hh10-list\">\n                {SLOTS.map((slot) => {\n                  const ev = feed[slot];\n                  if (!ev) {\n                    return (\n                      <li key={`empty-${slot}`} className=\"hb-hh10-row\" data-empty=\"true\">\n                        <span className=\"hb-hh10-tag\">····</span>\n                        <span className=\"hb-hh10-route\" />\n                        <span className=\"hb-hh10-ms\" />\n                      </li>\n                    );\n                  }\n                  return (\n                    <li key={ev.key} className=\"hb-hh10-row\" data-hot={ev.hot}>\n                      <span className=\"hb-hh10-tag\">{ev.tag}</span>\n                      <span className=\"hb-hh10-route\">\n                        {ev.from} → {ev.to}\n                      </span>\n                      <span className=\"hb-hh10-ms\">{ev.hot ? \"blocked\" : `${ev.ms} ms`}</span>\n                    </li>\n                  );\n                })}\n              </ol>\n            </div>\n          ) : null}\n        </div>\n      ) : null}\n      <div ref={tipRef} className=\"hb-hh10-tip\" data-on=\"false\" aria-hidden=\"true\">\n        <div className=\"hb-hh10-tipbox\">\n          <b ref={tipNameRef} />\n          <span ref={tipMetaRef} />\n        </div>\n      </div>\n      <div ref={stageRef} className=\"hb-hh10-stage\" aria-hidden=\"true\" />\n      <div className=\"hb-hh10-foot\">\n        <div className=\"hb-hh10-copy\">\n          <Heading className=\"hb-hh10-title\">{title}</Heading>\n          {subtitle ? <p className=\"hb-hh10-sub\">{subtitle}</p> : null}\n        </div>\n        {caption || command || primaryCta ? (\n          <div className=\"hb-hh10-side\">\n            {caption ? <p className=\"hb-hh10-caption\">{caption}</p> : null}\n            {command || primaryCta ? (\n              <div className=\"hb-hh10-row2\">\n                {command ? (\n                  <div className=\"hb-hh10-cmd\">\n                    <span className=\"hb-hh10-prompt\" aria-hidden=\"true\">$</span>\n                    <code className=\"hb-hh10-code\">{command}</code>\n                    <button type=\"button\" className=\"hb-hh10-copybtn\" data-done={copied} onClick={copy} aria-label={copied ? \"Copied\" : \"Copy command\"}>\n                      {copied ? (\n                        <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                          <path d=\"M5 12.5l4.5 4.5L19 7.5\" />\n                        </svg>\n                      ) : (\n                        <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.9\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                          <rect x=\"8.5\" y=\"8.5\" width=\"11\" height=\"11\" rx=\"2.2\" />\n                          <path d=\"M15.5 8.5V6.7a2.2 2.2 0 0 0-2.2-2.2H6.7a2.2 2.2 0 0 0-2.2 2.2v6.6a2.2 2.2 0 0 0 2.2 2.2h1.8\" />\n                        </svg>\n                      )}\n                      <span className=\"hb-hh10-sr\" aria-live=\"polite\">{copied ? \"Copied\" : \"\"}</span>\n                    </button>\n                  </div>\n                ) : null}\n                {primaryCta ? (\n                  <a className=\"hb-hh10-cta\" href={primaryCta.href}>\n                    {primaryCta.label}\n                    <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                      <path d=\"M9 6l6 6-6 6\" />\n                    </svg>\n                  </a>\n                ) : null}\n              </div>\n            ) : null}\n          </div>\n        ) : null}\n      </div>\n      {learnMore ? (\n        <a className=\"hb-hh10-more\" href={learnMore.href}>\n          <span>{learnMore.label}</span>\n          <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n            <path d=\"M6 9l6 6 6-6\" />\n          </svg>\n        </a>\n      ) : null}\n    </section>\n  );\n}\n"
    }
  ]
}