{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dashboard-crypto",
  "type": "registry:component",
  "title": "Crypto Portfolio Dashboard",
  "description": "A portfolio screen with a scrolling price ticker, total balance with a sparkline, an allocation donut, a candlestick chart with volume and range tabs, recent activity and a sortable holdings table. Selecting an asset charts it.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "dashboards",
    "dashboard",
    "crypto",
    "portfolio",
    "candlestick",
    "ticker",
    "donut"
  ],
  "docs": "https://hyperblur.dev/effects/dashboard-crypto",
  "files": [
    {
      "path": "registry/hyperblur/dashboard-crypto.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/dashboard-crypto.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport type CryptoRange = \"24H\" | \"7D\" | \"30D\" | \"1Y\";\n\nexport interface CryptoHolding {\n  symbol: string;\n  name: string;\n  amount: number;\n  price: number;\n  change: number;\n  color: string;\n}\n\nexport interface DashboardCryptoProps extends React.HTMLAttributes<HTMLDivElement> {\n  accent?: string;\n  brand?: string;\n  user?: string;\n  currency?: string;\n  holdings?: CryptoHolding[];\n  range?: CryptoRange;\n  defaultRange?: CryptoRange;\n  onRangeChange?: (range: CryptoRange) => void;\n  asset?: string;\n  defaultAsset?: string;\n  onAssetChange?: (symbol: string) => void;\n}\n\nconst css = `\n.hb-yd1 {\n  --a: #f5b544;\n  --hb-yd1-up: #34d399;\n  --hb-yd1-down: #f87171;\n  container: hb-yd1 / inline-size;\n  box-sizing: border-box;\n  width: 100%;\n  border: 1px solid #202326;\n  border-radius: 18px;\n  background:\n    radial-gradient(900px 420px at 100% -10%, color-mix(in srgb, var(--a) 10%, transparent), transparent 60%),\n    radial-gradient(700px 380px at -10% 110%, rgba(52, 211, 153, .05), transparent 60%),\n    #07090b;\n  color: #ececec;\n  font-family: inherit;\n  font-size: 13px;\n  line-height: 1.4;\n  overflow: hidden;\n  position: relative;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-yd1 *, .hb-yd1 *::before, .hb-yd1 *::after { box-sizing: border-box; }\n.hb-yd1 button, .hb-yd1 input { font: inherit; color: inherit; }\n.hb-yd1 button:focus-visible, .hb-yd1 input:focus-visible, .hb-yd1 [tabindex]:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }\n.hb-yd1-num { font-family: ui-monospace, \"SF Mono\", SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }\n.hb-yd1-app { display: grid; grid-template-columns: 68px minmax(0, 1fr); min-height: 680px; }\n.hb-yd1-rail {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 6px;\n  min-width: 0;\n  padding: 16px 0;\n  border-right: 1px solid rgba(255, 255, 255, .06);\n  background: rgba(10, 12, 14, .7);\n}\n.hb-yd1-logo {\n  display: grid;\n  place-items: center;\n  width: 36px;\n  height: 36px;\n  margin-bottom: 14px;\n  border-radius: 11px;\n  background: conic-gradient(from 210deg, var(--a), color-mix(in srgb, var(--a) 40%, #ffffff), var(--a));\n  color: #120d02;\n  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 8px 24px -8px var(--a);\n}\n.hb-yd1-rbtn {\n  position: relative;\n  display: grid;\n  place-items: center;\n  width: 40px;\n  height: 40px;\n  border: 0;\n  border-radius: 12px;\n  background: transparent;\n  color: #7c8086;\n  cursor: pointer;\n  transition: background .15s ease, color .15s ease;\n}\n.hb-yd1-rbtn:hover { background: rgba(255, 255, 255, .05); color: #ececec; }\n.hb-yd1-rbtn[aria-current=\"page\"] { background: color-mix(in srgb, var(--a) 14%, transparent); color: var(--a); }\n.hb-yd1-rbtn[aria-current=\"page\"]::before {\n  content: \"\";\n  position: absolute;\n  top: 10px;\n  bottom: 10px;\n  left: -14px;\n  width: 3px;\n  border-radius: 0 3px 3px 0;\n  background: var(--a);\n}\n.hb-yd1-rail-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: auto; }\n.hb-yd1-av { display: grid; place-items: center; flex: none; border-radius: 50%; color: #ffffff; font-size: 11px; font-weight: 600; }\n.hb-yd1-main { display: flex; flex-direction: column; min-width: 0; }\n.hb-yd1-top { display: flex; align-items: center; gap: 12px; padding: 18px 24px 14px; }\n.hb-yd1-ttl { min-width: 0; margin-right: auto; }\n.hb-yd1-ttl h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }\n.hb-yd1-ttl p { margin: 2px 0 0; overflow: hidden; color: #868a90; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }\n.hb-yd1-search { position: relative; width: 220px; color: #6c7076; }\n.hb-yd1-search svg { position: absolute; top: 50%; left: 11px; width: 15px; height: 15px; transform: translateY(-50%); pointer-events: none; }\n.hb-yd1-search input {\n  width: 100%;\n  height: 36px;\n  padding: 0 12px 0 34px;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 999px;\n  background: rgba(255, 255, 255, .03);\n  font-size: 13px;\n  transition: border-color .15s ease, background .15s ease;\n}\n.hb-yd1-search input::placeholder { color: #6c7076; }\n.hb-yd1-search input:focus-visible { border-color: var(--a); outline-offset: 0; }\n.hb-yd1-ibtn {\n  display: grid;\n  place-items: center;\n  flex: none;\n  width: 36px;\n  height: 36px;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 999px;\n  background: rgba(255, 255, 255, .03);\n  color: #a3a7ad;\n  cursor: pointer;\n  transition: background .15s ease, color .15s ease, border-color .15s ease;\n}\n.hb-yd1-ibtn:hover { border-color: rgba(255, 255, 255, .16); color: #ffffff; }\n.hb-yd1-ibtn[aria-pressed=\"true\"] { border-color: color-mix(in srgb, var(--a) 50%, transparent); color: var(--a); }\n.hb-yd1-cta {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  flex: none;\n  height: 36px;\n  padding: 0 16px 0 12px;\n  border: 0;\n  border-radius: 999px;\n  background: var(--a);\n  color: #120d02;\n  font-size: 13px;\n  font-weight: 600;\n  cursor: pointer;\n  box-shadow: 0 0 0 1px rgba(255, 255, 255, .2) inset, 0 6px 20px -8px var(--a);\n  transition: filter .15s ease, transform .15s ease;\n}\n.hb-yd1-cta:hover { filter: brightness(1.08); }\n.hb-yd1-cta:active { transform: translateY(1px); }\n.hb-yd1-ico { display: block; flex: none; width: 16px; height: 16px; }\n.hb-yd1-tick {\n  position: relative;\n  display: flex;\n  margin: 0 24px;\n  border-top: 1px solid rgba(255, 255, 255, .06);\n  border-bottom: 1px solid rgba(255, 255, 255, .06);\n  overflow: hidden;\n  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);\n  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);\n}\n.hb-yd1-tick-track { display: flex; flex: none; animation: hb-yd1-marq 38s linear infinite; }\n.hb-yd1-tick:hover .hb-yd1-tick-track { animation-play-state: paused; }\n.hb-yd1-tick-copy { display: flex; flex: none; }\n.hb-yd1-tick-i { display: flex; align-items: center; gap: 10px; flex: none; padding: 10px 22px; border-right: 1px solid rgba(255, 255, 255, .05); font-size: 12px; white-space: nowrap; }\n.hb-yd1-tick-i b { font-weight: 600; letter-spacing: .02em; }\n.hb-yd1-tick-i span { color: #b9bdc2; }\n.hb-yd1-tick-i em { font-style: normal; font-weight: 600; }\n.hb-yd1-tick-i svg { width: 44px; height: 16px; }\n.hb-yd1 [data-dir=\"up\"] { color: var(--hb-yd1-up); }\n.hb-yd1 [data-dir=\"down\"] { color: var(--hb-yd1-down); }\n.hb-yd1-content { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 18px 24px 24px; }\n.hb-yd1-row { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; }\n.hb-yd1-card {\n  position: relative;\n  min-width: 0;\n  padding: 18px;\n  border: 1px solid rgba(255, 255, 255, .07);\n  border-radius: 16px;\n  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012));\n  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset;\n  animation: hb-yd1-rise .6s cubic-bezier(.2, .7, .2, 1) both;\n  animation-delay: calc(var(--d, 0) * 70ms);\n}\n.hb-yd1-ch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }\n.hb-yd1-ct { margin: 0; font-size: 13px; font-weight: 600; }\n.hb-yd1-cs { margin: 2px 0 0; color: #7c8086; font-size: 12px; }\n.hb-yd1-bal { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; }\n.hb-yd1-bal-l { min-width: 0; }\n.hb-yd1-eyebrow { display: flex; align-items: center; gap: 8px; color: #868a90; font-size: 12px; }\n.hb-yd1-big { margin: 8px 0 6px; font-size: 40px; font-weight: 600; letter-spacing: -.04em; line-height: 1; white-space: nowrap; }\n.hb-yd1-big small { color: #6c7076; font-size: 24px; letter-spacing: -.02em; }\n.hb-yd1-pill {\n  display: inline-flex;\n  align-items: center;\n  gap: 3px;\n  height: 22px;\n  padding: 0 8px;\n  border-radius: 999px;\n  font-size: 11.5px;\n  font-weight: 600;\n  white-space: nowrap;\n}\n.hb-yd1-pill[data-dir=\"up\"] { background: rgba(52, 211, 153, .12); }\n.hb-yd1-pill[data-dir=\"down\"] { background: rgba(248, 113, 113, .12); }\n.hb-yd1-pill svg { width: 11px; height: 11px; }\n.hb-yd1-bal-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #868a90; font-size: 12.5px; }\n.hb-yd1-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 18px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 12px; background: rgba(255, 255, 255, .06); overflow: hidden; }\n.hb-yd1-stat { min-width: 0; padding: 10px 12px; background: #0b0d10; }\n.hb-yd1-stat span { display: block; color: #7c8086; font-size: 11.5px; }\n.hb-yd1-stat b { display: block; margin-top: 3px; overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }\n.hb-yd1-acts { display: flex; flex-direction: column; gap: 8px; }\n.hb-yd1-act {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  height: 34px;\n  padding: 0 14px 0 10px;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 10px;\n  background: rgba(255, 255, 255, .03);\n  color: #d6d9dd;\n  font-size: 12.5px;\n  font-weight: 500;\n  cursor: pointer;\n  transition: border-color .15s ease, background .15s ease;\n}\n.hb-yd1-act:hover { border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); }\n.hb-yd1-act svg { width: 15px; height: 15px; color: var(--a); }\n.hb-yd1-bspark { display: block; width: calc(100% + 36px); height: 84px; margin: 16px -18px -18px; color: var(--a); animation: hb-yd1-wipe 1.1s .2s cubic-bezier(.3, .7, .2, 1) both; }\n.hb-yd1-bspark path:last-child { fill: none; stroke: currentColor; stroke-width: 1.8; vector-effect: non-scaling-stroke; }\n.hb-yd1-donut { position: relative; width: 156px; height: 156px; margin: 4px auto 14px; }\n.hb-yd1-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }\n.hb-yd1-donut circle { fill: none; stroke-width: 4.2; }\n.hb-yd1-dseg { cursor: pointer; transition: opacity .2s ease, stroke-width .2s ease; animation: hb-yd1-arc 1s cubic-bezier(.3, .7, .2, 1) both; }\n.hb-yd1-dseg[data-hot=\"true\"] { stroke-width: 5.4; }\n.hb-yd1-dseg[data-dim=\"true\"] { opacity: .28; }\n.hb-yd1-dc { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }\n.hb-yd1-dc strong { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }\n.hb-yd1-dc span { color: #7c8086; font-size: 11px; }\n.hb-yd1-leg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; margin: 0; padding: 0; list-style: none; }\n.hb-yd1-leg button {\n  display: grid;\n  grid-template-columns: 8px minmax(0, 1fr) auto;\n  align-items: center;\n  gap: 7px;\n  width: 100%;\n  padding: 5px 6px;\n  border: 0;\n  border-radius: 7px;\n  background: transparent;\n  color: #b9bdc2;\n  font-size: 12px;\n  text-align: left;\n  cursor: pointer;\n}\n.hb-yd1-leg button:hover, .hb-yd1-leg button[aria-pressed=\"true\"] { background: rgba(255, 255, 255, .05); color: #ffffff; }\n.hb-yd1-leg i { width: 8px; height: 8px; border-radius: 50%; }\n.hb-yd1-leg em { color: #7c8086; font-style: normal; }\n.hb-yd1-seg { display: inline-flex; padding: 3px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 999px; background: rgba(0, 0, 0, .35); }\n.hb-yd1-seg button {\n  height: 26px;\n  padding: 0 11px;\n  border: 0;\n  border-radius: 999px;\n  background: transparent;\n  color: #868a90;\n  font-size: 12px;\n  font-weight: 600;\n  cursor: pointer;\n  transition: background .15s ease, color .15s ease;\n}\n.hb-yd1-seg button:hover { color: #ffffff; }\n.hb-yd1-seg button[aria-pressed=\"true\"] { background: rgba(255, 255, 255, .1); color: #ffffff; }\n.hb-yd1-pair { display: flex; align-items: center; gap: 10px; min-width: 0; }\n.hb-yd1-coin { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; color: #ffffff; font-size: 10px; font-weight: 700; letter-spacing: .02em; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14) inset; }\n.hb-yd1-pair-p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }\n.hb-yd1-pair-p b { font-size: 18px; font-weight: 600; }\n.hb-yd1-chart { display: grid; grid-template-columns: minmax(0, 1fr) 64px; grid-template-rows: 250px auto; }\n.hb-yd1-plot { position: relative; cursor: crosshair; touch-action: pan-y; }\n.hb-yd1-plot > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }\n.hb-yd1-gl { stroke: rgba(255, 255, 255, .05); stroke-width: 1; vector-effect: non-scaling-stroke; }\n.hb-yd1-cdl { transform-box: fill-box; transform-origin: center; animation: hb-yd1-grow .5s cubic-bezier(.3, .7, .2, 1) both; }\n.hb-yd1-cdl line { stroke-width: 1; vector-effect: non-scaling-stroke; }\n.hb-yd1-cdl[data-dir=\"up\"] rect, .hb-yd1-cdl[data-dir=\"up\"] line { fill: var(--hb-yd1-up); stroke: var(--hb-yd1-up); }\n.hb-yd1-cdl[data-dir=\"down\"] rect, .hb-yd1-cdl[data-dir=\"down\"] line { fill: var(--hb-yd1-down); stroke: var(--hb-yd1-down); }\n.hb-yd1-cdl rect { stroke-width: 0; }\n.hb-yd1-cdl[data-hot=\"true\"] rect { filter: brightness(1.35); }\n.hb-yd1-vol { transform-box: fill-box; transform-origin: bottom; animation: hb-yd1-grow .6s cubic-bezier(.3, .7, .2, 1) both; }\n.hb-yd1-vol[data-dir=\"up\"] { fill: rgba(52, 211, 153, .22); }\n.hb-yd1-vol[data-dir=\"down\"] { fill: rgba(248, 113, 113, .22); }\n.hb-yd1-last { stroke: var(--a); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }\n.hb-yd1-yax { position: relative; }\n.hb-yd1-yax span { position: absolute; left: 10px; color: #6c7076; font-size: 11px; transform: translateY(-50%); }\n.hb-yd1-ytag { position: absolute; left: 6px; padding: 2px 6px; border-radius: 5px; background: var(--a); color: #120d02 !important; font-size: 11px; font-weight: 600; transform: translateY(-50%); }\n.hb-yd1-xax { display: flex; justify-content: space-between; padding-top: 8px; color: #6c7076; font-size: 11px; }\n.hb-yd1-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .22); pointer-events: none; }\n.hb-yd1-tt {\n  position: absolute;\n  top: 6px;\n  z-index: 3;\n  display: grid;\n  grid-template-columns: auto auto;\n  gap: 2px 12px;\n  padding: 8px 10px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 10px;\n  background: rgba(14, 16, 19, .95);\n  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, .8);\n  font-size: 11.5px;\n  white-space: nowrap;\n  pointer-events: none;\n  -webkit-backdrop-filter: blur(6px);\n  backdrop-filter: blur(6px);\n}\n.hb-yd1-tt-d { grid-column: 1 / -1; margin-bottom: 3px; color: #868a90; }\n.hb-yd1-tt span { color: #7c8086; }\n.hb-yd1-tt b { font-weight: 600; text-align: right; }\n.hb-yd1-feed { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }\n.hb-yd1-feed li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .05); animation: hb-yd1-rise .5s cubic-bezier(.2, .7, .2, 1) both; }\n.hb-yd1-feed li:first-child { border-top: 0; padding-top: 0; }\n.hb-yd1-fi { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .05); color: #b9bdc2; }\n.hb-yd1-fi[data-k=\"buy\"] { background: rgba(52, 211, 153, .12); color: var(--hb-yd1-up); }\n.hb-yd1-fi[data-k=\"sell\"] { background: rgba(248, 113, 113, .12); color: var(--hb-yd1-down); }\n.hb-yd1-fi[data-k=\"stake\"] { background: color-mix(in srgb, var(--a) 14%, transparent); color: var(--a); }\n.hb-yd1-fi svg { width: 15px; height: 15px; }\n.hb-yd1-ft { min-width: 0; }\n.hb-yd1-ft b { display: block; overflow: hidden; font-size: 12.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }\n.hb-yd1-ft span { color: #6c7076; font-size: 11.5px; }\n.hb-yd1-fv { text-align: right; font-size: 12.5px; }\n.hb-yd1-fv span { display: block; color: #6c7076; font-size: 11px; }\n.hb-yd1-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }\n.hb-yd1-tbl th { padding: 0 10px 10px; color: #6c7076; font-size: 11.5px; font-weight: 500; text-align: right; white-space: nowrap; }\n.hb-yd1-tbl th:first-child, .hb-yd1-tbl td:first-child { padding-left: 0; text-align: left; }\n.hb-yd1-tbl th:last-child, .hb-yd1-tbl td:last-child { padding-right: 0; }\n.hb-yd1-tbl th button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font-size: inherit; font-weight: inherit; cursor: pointer; }\n.hb-yd1-tbl th button:hover, .hb-yd1-tbl th[aria-sort] button { color: #ececec; }\n.hb-yd1-tbl th svg { width: 11px; height: 11px; }\n.hb-yd1-tbl td { padding: 10px; border-top: 1px solid rgba(255, 255, 255, .05); text-align: right; white-space: nowrap; }\n.hb-yd1-tbl tbody tr { cursor: pointer; transition: background .15s ease; }\n.hb-yd1-tbl tbody tr:hover { background: rgba(255, 255, 255, .025); }\n.hb-yd1-tbl tbody tr[data-on=\"true\"] { background: color-mix(in srgb, var(--a) 7%, transparent); }\n.hb-yd1-tbl tbody tr[data-on=\"true\"] td:first-child { box-shadow: inset 2px 0 0 var(--a); }\n.hb-yd1-asset { display: flex; align-items: center; gap: 10px; padding: 0 0 0 8px; border: 0; background: none; text-align: left; cursor: pointer; }\n.hb-yd1-asset b { display: block; font-size: 13px; font-weight: 600; }\n.hb-yd1-asset span { display: block; color: #6c7076; font-size: 11.5px; }\n.hb-yd1-alloc { display: inline-flex; align-items: center; gap: 8px; }\n.hb-yd1-alloc i { position: relative; display: block; width: 64px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }\n.hb-yd1-alloc i::after { content: \"\"; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--c); transform-origin: left; animation: hb-yd1-bar .9s cubic-bezier(.3, .7, .2, 1) both; animation-delay: inherit; }\n.hb-yd1-msp { display: inline-block; width: 72px; height: 22px; vertical-align: middle; }\n.hb-yd1-msp path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }\n.hb-yd1-mask { letter-spacing: .12em; }\n@keyframes hb-yd1-rise { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }\n@keyframes hb-yd1-wipe { from { clip-path: inset(-6px 100% -6px -6px); } to { clip-path: inset(-6px -6px -6px -6px); } }\n@keyframes hb-yd1-grow { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }\n@keyframes hb-yd1-arc { from { stroke-dasharray: 0 100; } }\n@keyframes hb-yd1-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }\n@keyframes hb-yd1-marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }\n@container hb-yd1 (max-width: 979px) {\n  .hb-yd1-row { grid-template-columns: minmax(0, 1fr); }\n  .hb-yd1-hide-md { display: none; }\n}\n@container hb-yd1 (max-width: 759px) {\n  .hb-yd1-app { grid-template-columns: minmax(0, 1fr); min-height: 0; }\n  .hb-yd1-rail { flex-direction: row; padding: 10px 14px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .06); overflow-x: auto; }\n  .hb-yd1-logo { margin: 0 8px 0 0; }\n  .hb-yd1-rbtn[aria-current=\"page\"]::before { top: auto; right: 10px; bottom: -11px; left: 10px; width: auto; height: 3px; border-radius: 3px 3px 0 0; }\n  .hb-yd1-rail-foot { flex-direction: row; margin: 0 0 0 auto; }\n  .hb-yd1-search { display: none; }\n  .hb-yd1-top { flex-wrap: wrap; padding: 16px; }\n  .hb-yd1-tick { margin: 0 16px; }\n  .hb-yd1-content { padding: 16px; }\n  .hb-yd1-bal { grid-template-columns: minmax(0, 1fr); }\n  .hb-yd1-acts { flex-direction: row; flex-wrap: wrap; }\n  .hb-yd1-hide-sm { display: none; }\n}\n@container hb-yd1 (max-width: 479px) {\n  .hb-yd1-big { font-size: 30px; }\n  .hb-yd1-big small { font-size: 18px; }\n  .hb-yd1-stats { grid-template-columns: minmax(0, 1fr); }\n  .hb-yd1-hide-xs { display: none; }\n  .hb-yd1-chart { grid-template-columns: minmax(0, 1fr) 52px; grid-template-rows: 200px auto; }\n  .hb-yd1-rail-foot .hb-yd1-rbtn { display: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-yd1 *, .hb-yd1 *::before, .hb-yd1 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nfunction hash(n: number) {\n  let x = Math.imul(n + 1, 2654435761) >>> 0;\n  x ^= x >>> 15;\n  x = Math.imul(x, 2246822519) >>> 0;\n  x ^= x >>> 13;\n  return (x >>> 0) / 4294967296;\n}\n\nfunction seedOf(s: string) {\n  let h = 0;\n  for (let i = 0; i < s.length; i++) h = (h * 31 + s.charCodeAt(i)) >>> 0;\n  return h % 100000;\n}\n\ntype Pt = [number, number];\n\nfunction smooth(pts: Pt[]) {\n  let d = `M${pts[0][0].toFixed(2)} ${pts[0][1].toFixed(2)}`;\n  for (let i = 0; i < pts.length - 1; i++) {\n    const p0 = pts[i - 1] ?? pts[i];\n    const p1 = pts[i];\n    const p2 = pts[i + 1];\n    const p3 = pts[i + 2] ?? p2;\n    d += `C${(p1[0] + (p2[0] - p0[0]) / 6).toFixed(2)} ${(p1[1] + (p2[1] - p0[1]) / 6).toFixed(2)} ${(p2[0] - (p3[0] - p1[0]) / 6).toFixed(2)} ${(p2[1] - (p3[1] - p1[1]) / 6).toFixed(2)} ${p2[0].toFixed(2)} ${p2[1].toFixed(2)}`;\n  }\n  return d;\n}\n\nfunction project(values: number[], w: number, h: number, pad: number): Pt[] {\n  const min = Math.min(...values);\n  const max = Math.max(...values);\n  const span = max - min || 1;\n  return values.map((v, i) => [(i / Math.max(1, values.length - 1)) * w, pad + (1 - (v - min) / span) * (h - pad * 2)]);\n}\n\nfunction walk(seed: number, n: number, last: number, vol: number) {\n  const out: number[] = [];\n  let v = 100;\n  for (let i = 0; i < n; i++) {\n    v *= 1 + (hash(seed + i * 7) - 0.47) * vol;\n    out.push(v);\n  }\n  const k = last / out[n - 1];\n  return out.map((x) => x * k);\n}\n\ninterface Candle {\n  o: number;\n  h: number;\n  l: number;\n  c: number;\n  v: number;\n}\n\nfunction makeCandles(seed: number, n: number, last: number, vol: number): Candle[] {\n  const opens: number[] = [];\n  const closes: number[] = [];\n  const rets: number[] = [];\n  let v = 100;\n  for (let i = 0; i < n; i++) {\n    const r = (hash(seed + i * 7) - 0.47) * vol;\n    rets.push(r);\n    opens.push(v);\n    v *= 1 + r;\n    closes.push(v);\n  }\n  const k = last / closes[n - 1];\n  return closes.map((c, i) => {\n    const o = opens[i] * k;\n    const cc = c * k;\n    return {\n      o,\n      c: cc,\n      h: Math.max(o, cc) * (1 + hash(seed + i * 13 + 5) * vol * 0.55),\n      l: Math.min(o, cc) * (1 - hash(seed + i * 17 + 9) * vol * 0.55),\n      v: 0.25 + hash(seed + i * 19 + 3) * 0.55 + Math.min(0.2, Math.abs(rets[i]) / vol / 3),\n    };\n  });\n}\n\nconst MLEN = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst MNAME = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nconst DNAME = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n\nfunction stamp(minutesBack: number) {\n  const total = 14 * 60 - minutesBack;\n  const dayShift = Math.floor(total / 1440);\n  const minute = total - dayShift * 1440;\n  let m = 10;\n  let y = 2026;\n  let d = 4 + dayShift;\n  while (d < 1) {\n    m--;\n    if (m < 0) {\n      m = 11;\n      y--;\n    }\n    d += MLEN[m];\n  }\n  const dow = (((3 + dayShift) % 7) + 7) % 7;\n  const hh = String(Math.floor(minute / 60)).padStart(2, \"0\");\n  const mm = String(minute % 60).padStart(2, \"0\");\n  return { m, d, y, dow, time: `${hh}:${mm}` };\n}\n\nconst RANGES: Record<CryptoRange, { n: number; step: number; vol: number; label: string }> = {\n  \"24H\": { n: 48, step: 30, vol: 0.007, label: \"30m candles\" },\n  \"7D\": { n: 42, step: 240, vol: 0.016, label: \"4h candles\" },\n  \"30D\": { n: 30, step: 1440, vol: 0.032, label: \"Daily candles\" },\n  \"1Y\": { n: 52, step: 10080, vol: 0.075, label: \"Weekly candles\" },\n};\nconst RANGE_KEYS: CryptoRange[] = [\"24H\", \"7D\", \"30D\", \"1Y\"];\n\nfunction axisLabel(r: CryptoRange, back: number) {\n  const s = stamp(back * RANGES[r].step);\n  if (r === \"24H\") return s.time;\n  if (r === \"7D\") return `${DNAME[s.dow]} ${s.d}`;\n  if (r === \"30D\") return `${MNAME[s.m]} ${s.d}`;\n  return `${MNAME[s.m]} ${String(s.y).slice(2)}`;\n}\n\nfunction tipLabel(r: CryptoRange, back: number) {\n  const s = stamp(back * RANGES[r].step);\n  if (r === \"1Y\") return `Week of ${MNAME[s.m]} ${s.d}, ${s.y}`;\n  if (r === \"30D\") return `${DNAME[s.dow]}, ${MNAME[s.m]} ${s.d}`;\n  return `${MNAME[s.m]} ${s.d}, ${s.time}`;\n}\n\nconst DEFAULT_HOLDINGS: CryptoHolding[] = [\n  { symbol: \"HLCN\", name: \"Halcyon\", amount: 1.842, price: 48210.55, change: 2.84, color: \"#f5b544\" },\n  { symbol: \"MRDN\", name: \"Meridian\", amount: 24.15, price: 2904.12, change: -1.37, color: \"#8b7cff\" },\n  { symbol: \"TSRA\", name: \"Tessera\", amount: 310.5, price: 142.78, change: 6.12, color: \"#22d3ee\" },\n  { symbol: \"QUIL\", name: \"Quill\", amount: 52000, price: 0.3815, change: 11.4, color: \"#f472b6\" },\n  { symbol: \"EMBR\", name: \"Ember\", amount: 1250, price: 8.64, change: -4.71, color: \"#fb7185\" },\n  { symbol: \"CRVD\", name: \"Corvid Dollar\", amount: 8420, price: 1.0004, change: 0.02, color: \"#34d399\" },\n];\n\nconst TICKER_EXTRA = [\n  { symbol: \"PYLN\", price: 23.41, change: 3.9 },\n  { symbol: \"SABL\", price: 0.0841, change: -2.2 },\n  { symbol: \"VIRO\", price: 611.2, change: 1.15 },\n  { symbol: \"KSTL\", price: 4.072, change: -0.84 },\n];\n\nconst FEED = [\n  { k: \"buy\", title: \"Bought 0.120 HLCN\", sub: \"Limit order filled\", value: \"+$5,785.27\", meta: \"4 min ago\" },\n  { k: \"stake\", title: \"Staked 120 TSRA\", sub: \"Validator Northgate, 6.8% APR\", value: \"$17,133.60\", meta: \"1 h ago\" },\n  { k: \"recv\", title: \"Received 2,400 CRVD\", sub: \"From 0x7a3f...91c2\", value: \"+$2,400.96\", meta: \"3 h ago\" },\n  { k: \"sell\", title: \"Sold 300 EMBR\", sub: \"Market order\", value: \"-$2,592.00\", meta: \"Yesterday\" },\n  { k: \"swap\", title: \"Swapped MRDN to QUIL\", sub: \"1.2 MRDN for 9,134 QUIL\", value: \"$3,484.94\", meta: \"Nov 2\" },\n];\n\nconst icons: Record<string, string[]> = {\n  home: [\"M3 11l9-7 9 7\", \"M5 10v10h14V10\"],\n  wallet: [\"M3 7a2 2 0 0 1 2-2h13v4\", \"M3 7v11a2 2 0 0 0 2 2h15V9H5a2 2 0 0 1-2-2z\", \"M16 14.5h.01\"],\n  chart: [\"M3 3v18h18\", \"M7 15l4-4 3 3 5-6\"],\n  swap: [\"M7 4L3 8l4 4\", \"M3 8h14\", \"M17 20l4-4-4-4\", \"M21 16H7\"],\n  layers: [\"M12 3l9 5-9 5-9-5 9-5z\", \"M3 13l9 5 9-5\"],\n  gear: [\"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z\", \"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z\"],\n  bell: [\"M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9\", \"M13.7 21a2 2 0 0 1-3.4 0\"],\n  search: [\"M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z\", \"M21 21l-4.3-4.3\"],\n  eye: [\"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z\", \"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z\"],\n  eyeoff: [\"M3 3l18 18\", \"M10.6 6.1A10 10 0 0 1 12 6c6.5 0 10 6 10 6a17 17 0 0 1-3.2 3.9\", \"M6.6 7.6A17 17 0 0 0 2 12s3.5 6 10 6a9.7 9.7 0 0 0 4.4-1\"],\n  up: [\"M7 17L17 7\", \"M8 7h9v9\"],\n  down: [\"M17 7L7 17\", \"M16 17H7V8\"],\n  plus: [\"M12 5v14\", \"M5 12h14\"],\n  send: [\"M22 2L11 13\", \"M22 2l-7 20-4-9-9-4 20-7z\"],\n  recv: [\"M12 4v12\", \"M6 10l6 6 6-6\", \"M4 20h16\"],\n  sort: [\"M8 10l4-4 4 4\", \"M8 14l4 4 4-4\"],\n  sortd: [\"M8 10l4 4 4-4\"],\n  sortu: [\"M8 14l4-4 4 4\"],\n};\n\nfunction Ico({ n, className = \"hb-yd1-ico\" }: { n: string; className?: string }) {\n  return (\n    <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n      {(icons[n] ?? []).map((d, i) => (\n        <path key={i} d={d} />\n      ))}\n    </svg>\n  );\n}\n\nfunction initials(name: string) {\n  return name\n    .split(\" \")\n    .map((w) => w[0])\n    .slice(0, 2)\n    .join(\"\")\n    .toUpperCase();\n}\n\nfunction fmtPrice(n: number, cur: string) {\n  const digits = n >= 1 ? 2 : 4;\n  return `${cur}${n.toLocaleString(\"en-US\", { minimumFractionDigits: digits, maximumFractionDigits: digits })}`;\n}\n\nfunction fmtMoney(n: number, cur: string) {\n  const sign = n < 0 ? \"-\" : \"\";\n  return `${sign}${cur}${Math.abs(n).toLocaleString(\"en-US\", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;\n}\n\nfunction fmtAmount(n: number) {\n  return n.toLocaleString(\"en-US\", { maximumFractionDigits: n >= 100 ? 0 : 3 });\n}\n\nfunction Change({ value }: { value: number }) {\n  const up = value >= 0;\n  return (\n    <span className=\"hb-yd1-pill hb-yd1-num\" data-dir={up ? \"up\" : \"down\"}>\n      <Ico n={up ? \"up\" : \"down\"} className=\"\" />\n      {Math.abs(value).toFixed(2)}%\n    </span>\n  );\n}\n\nfunction MiniSpark({ values, className }: { values: number[]; className: string }) {\n  return (\n    <svg className={className} viewBox=\"0 0 100 30\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n      <path d={smooth(project(values, 100, 30, 3))} />\n    </svg>\n  );\n}\n\nconst NAV = [\n  { id: \"home\", label: \"Overview\", icon: \"home\" },\n  { id: \"wallet\", label: \"Wallets\", icon: \"wallet\" },\n  { id: \"markets\", label: \"Markets\", icon: \"chart\" },\n  { id: \"swap\", label: \"Swap\", icon: \"swap\" },\n  { id: \"earn\", label: \"Staking\", icon: \"layers\" },\n];\n\ntype SortKey = \"value\" | \"change\" | \"price\";\n\nexport function DashboardCrypto({\n  accent = \"#f5b544\",\n  brand = \"Vaultline\",\n  user = \"Kenji Watanabe\",\n  currency = \"$\",\n  holdings = DEFAULT_HOLDINGS,\n  range,\n  defaultRange = \"7D\",\n  onRangeChange,\n  asset,\n  defaultAsset,\n  onAssetChange,\n  className = \"\",\n  style,\n  ...rest\n}: DashboardCryptoProps) {\n  const uid = React.useId().replace(/:/g, \"\");\n  const [innerRange, setInnerRange] = React.useState<CryptoRange>(defaultRange);\n  const [innerAsset, setInnerAsset] = React.useState<string>(defaultAsset ?? holdings[0]?.symbol ?? \"\");\n  const [nav, setNav] = React.useState(\"home\");\n  const [masked, setMasked] = React.useState(false);\n  const [hover, setHover] = React.useState<number | null>(null);\n  const [hot, setHot] = React.useState<number | null>(null);\n  const [sort, setSort] = React.useState<{ key: SortKey; desc: boolean }>({ key: \"value\", desc: true });\n\n  const r = range ?? innerRange;\n  const sym = asset ?? innerAsset;\n  const cfg = RANGES[r];\n  const sel = holdings.find((h) => h.symbol === sym) ?? holdings[0];\n\n  const pickRange = (next: CryptoRange) => {\n    setInnerRange(next);\n    setHover(null);\n    onRangeChange?.(next);\n  };\n  const pickAsset = (next: string) => {\n    setInnerAsset(next);\n    setHover(null);\n    onAssetChange?.(next);\n  };\n\n  const rows = holdings.map((h) => {\n    const value = h.amount * h.price;\n    return { ...h, value, prev: value / (1 + h.change / 100), week: walk(seedOf(h.symbol) + 71, 28, h.price, 0.05) };\n  });\n  const total = rows.reduce((t, h) => t + h.value, 0);\n  const prevTotal = rows.reduce((t, h) => t + h.prev, 0);\n  const dayPl = total - prevTotal;\n  const dayPct = (dayPl / prevTotal) * 100;\n  const balSeries = walk(9137, 64, total, 0.018);\n  const weekAgo = balSeries[0];\n\n  const sorted = [...rows].sort((a, b) => (sort.desc ? b[sort.key] - a[sort.key] : a[sort.key] - b[sort.key]));\n  const toggleSort = (key: SortKey) => setSort((s) => (s.key === key ? { key, desc: !s.desc } : { key, desc: true }));\n\n  const shares = rows.map((h) => (h.value / total) * 100);\n  const arcs = rows.map((h, i) => ({\n    color: h.color,\n    len: Math.max(shares[i] - 1.4, 0.4),\n    offset: shares.slice(0, i).reduce((t, x) => t + x, 0) + 0.7,\n  }));\n\n  const candles = sel ? makeCandles(seedOf(sel.symbol + r), cfg.n, sel.price, cfg.vol) : [];\n  const hi = Math.max(...candles.map((c) => c.h));\n  const lo = Math.min(...candles.map((c) => c.l));\n  const pad = (hi - lo) * 0.08;\n  const top = hi + pad;\n  const bot = lo - pad;\n  const y = (v: number) => 2 + (1 - (v - bot) / (top - bot)) * 72;\n  const slot = 100 / cfg.n;\n  const rangeChange = candles.length ? ((candles[candles.length - 1].c - candles[0].o) / candles[0].o) * 100 : 0;\n  const ticks = Array.from({ length: 5 }, (_, k) => bot + ((top - bot) * (4 - k + 0.5)) / 5);\n  const xs = Array.from({ length: 5 }, (_, k) => Math.round((k * (cfg.n - 1)) / 4));\n  const hc = hover === null ? null : candles[hover];\n\n  const moveTo = (e: React.PointerEvent<HTMLDivElement>) => {\n    const b = e.currentTarget.getBoundingClientRect();\n    setHover(Math.max(0, Math.min(cfg.n - 1, Math.floor(((e.clientX - b.left) / b.width) * cfg.n))));\n  };\n  const keyMove = (e: React.KeyboardEvent<HTMLDivElement>) => {\n    if (e.key === \"ArrowRight\") setHover((h) => Math.min(cfg.n - 1, (h ?? -1) + 1));\n    else if (e.key === \"ArrowLeft\") setHover((h) => Math.max(0, (h ?? cfg.n) - 1));\n    else if (e.key === \"Escape\") setHover(null);\n    else return;\n    e.preventDefault();\n  };\n\n  const money = (n: number) => (masked ? <span className=\"hb-yd1-mask\">{currency}••••••</span> : fmtMoney(n, currency));\n  const [whole, cents] = fmtMoney(total, currency).split(\".\");\n  const ticker = [\n    ...rows.map((h) => ({ symbol: h.symbol, price: h.price, change: h.change, series: h.week })),\n    ...TICKER_EXTRA.map((t) => ({ ...t, series: walk(seedOf(t.symbol), 24, t.price, 0.05) })),\n  ];\n\n  const vars = { \"--a\": accent, ...style } as React.CSSProperties;\n\n  return (\n    <div className={`hb-yd1 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-dashboard-crypto\" precedence=\"default\">\n        {css}\n      </style>\n      <div className=\"hb-yd1-app\">\n        <aside className=\"hb-yd1-rail\" aria-label={brand}>\n          <span className=\"hb-yd1-logo\" title={brand}>\n            <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n              <path d=\"M12 2l8 5v10l-8 5-8-5V7z\" />\n              <path d=\"M12 8v8M8.5 10l3.5-2 3.5 2\" />\n            </svg>\n          </span>\n          <nav aria-label=\"Main\" style={{ display: \"contents\" }}>\n            {NAV.map((item) => (\n              <button\n                key={item.id}\n                type=\"button\"\n                className=\"hb-yd1-rbtn\"\n                aria-label={item.label}\n                title={item.label}\n                aria-current={nav === item.id ? \"page\" : undefined}\n                onClick={() => setNav(item.id)}\n              >\n                <Ico n={item.icon} />\n              </button>\n            ))}\n          </nav>\n          <div className=\"hb-yd1-rail-foot\">\n            <button type=\"button\" className=\"hb-yd1-rbtn\" aria-label=\"Settings\" title=\"Settings\">\n              <Ico n=\"gear\" />\n            </button>\n            <span className=\"hb-yd1-av\" style={{ width: 32, height: 32, background: \"linear-gradient(135deg, #8b7cff, #22d3ee)\" }} title={user}>\n              {initials(user)}\n            </span>\n          </div>\n        </aside>\n\n        <div className=\"hb-yd1-main\">\n          <header className=\"hb-yd1-top\">\n            <div className=\"hb-yd1-ttl\">\n              <h2>Portfolio</h2>\n              <p>\n                Main wallet · {holdings.length} assets · synced 12s ago\n              </p>\n            </div>\n            <label className=\"hb-yd1-search\">\n              <Ico n=\"search\" />\n              <input type=\"search\" placeholder=\"Search assets\" aria-label=\"Search assets\" />\n            </label>\n            <button type=\"button\" className=\"hb-yd1-ibtn\" aria-label={masked ? \"Show balances\" : \"Hide balances\"} aria-pressed={masked} onClick={() => setMasked((m) => !m)}>\n              <Ico n={masked ? \"eyeoff\" : \"eye\"} />\n            </button>\n            <button type=\"button\" className=\"hb-yd1-ibtn\" aria-label=\"Notifications\">\n              <Ico n=\"bell\" />\n            </button>\n            <button type=\"button\" className=\"hb-yd1-cta\">\n              <Ico n=\"plus\" />\n              Deposit\n            </button>\n          </header>\n\n          <div className=\"hb-yd1-tick\" role=\"region\" aria-label=\"Market prices\">\n            <div className=\"hb-yd1-tick-track\">\n              {[0, 1].map((copy) => (\n                <div className=\"hb-yd1-tick-copy\" key={copy} aria-hidden={copy === 1 ? true : undefined}>\n                  {ticker.map((t) => {\n                    const dir = t.change >= 0 ? \"up\" : \"down\";\n                    return (\n                      <div className=\"hb-yd1-tick-i\" key={t.symbol}>\n                        <b>{t.symbol}</b>\n                        <span className=\"hb-yd1-num\">{fmtPrice(t.price, currency)}</span>\n                        <em className=\"hb-yd1-num\" data-dir={dir}>\n                          {t.change >= 0 ? \"+\" : \"-\"}\n                          {Math.abs(t.change).toFixed(2)}%\n                        </em>\n                        <svg viewBox=\"0 0 100 30\" preserveAspectRatio=\"none\" data-dir={dir} aria-hidden=\"true\">\n                          <path d={smooth(project(t.series, 100, 30, 4))} fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.4\" vectorEffect=\"non-scaling-stroke\" />\n                        </svg>\n                      </div>\n                    );\n                  })}\n                </div>\n              ))}\n            </div>\n          </div>\n\n          <div className=\"hb-yd1-content\">\n            <div className=\"hb-yd1-row\">\n              <section className=\"hb-yd1-card\" style={{ \"--d\": 0, overflow: \"hidden\" } as React.CSSProperties} aria-label=\"Total balance\">\n                <div className=\"hb-yd1-bal\">\n                  <div className=\"hb-yd1-bal-l\">\n                    <div className=\"hb-yd1-eyebrow\">Total balance</div>\n                    <p className=\"hb-yd1-big hb-yd1-num\">\n                      {masked ? (\n                        <span className=\"hb-yd1-mask\">{currency}••••••</span>\n                      ) : (\n                        <>\n                          {whole}\n                          <small>.{cents}</small>\n                        </>\n                      )}\n                    </p>\n                    <div className=\"hb-yd1-bal-row\">\n                      <Change value={dayPct} />\n                      <span className=\"hb-yd1-num\" data-dir={dayPl >= 0 ? \"up\" : \"down\"}>\n                        {dayPl >= 0 ? \"+\" : \"\"}\n                        {masked ? \"••••\" : fmtMoney(dayPl, currency)}\n                      </span>\n                      <span>today</span>\n                    </div>\n                  </div>\n                  <div className=\"hb-yd1-acts\">\n                    <button type=\"button\" className=\"hb-yd1-act\">\n                      <Ico n=\"send\" />\n                      Send\n                    </button>\n                    <button type=\"button\" className=\"hb-yd1-act\">\n                      <Ico n=\"recv\" />\n                      Receive\n                    </button>\n                    <button type=\"button\" className=\"hb-yd1-act\">\n                      <Ico n=\"swap\" />\n                      Swap\n                    </button>\n                  </div>\n                </div>\n                <div className=\"hb-yd1-stats\">\n                  <div className=\"hb-yd1-stat\">\n                    <span>7 day change</span>\n                    <b className=\"hb-yd1-num\" data-dir={total >= weekAgo ? \"up\" : \"down\"}>\n                      {total >= weekAgo ? \"+\" : \"\"}\n                      {(((total - weekAgo) / weekAgo) * 100).toFixed(2)}%\n                    </b>\n                  </div>\n                  <div className=\"hb-yd1-stat\">\n                    <span>Staking rewards</span>\n                    <b className=\"hb-yd1-num\">{money(1284.62)}</b>\n                  </div>\n                  <div className=\"hb-yd1-stat\">\n                    <span>Unrealized gain</span>\n                    <b className=\"hb-yd1-num\">{money(total * 0.214)}</b>\n                  </div>\n                </div>\n                <svg className=\"hb-yd1-bspark\" viewBox=\"0 0 100 40\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n                  <defs>\n                    <linearGradient id={`${uid}b`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n                      <stop offset=\"0\" stopColor=\"currentColor\" stopOpacity=\".28\" />\n                      <stop offset=\"1\" stopColor=\"currentColor\" stopOpacity=\"0\" />\n                    </linearGradient>\n                  </defs>\n                  <path d={`${smooth(project(balSeries, 100, 40, 4))}L100 40L0 40Z`} fill={`url(#${uid}b)`} />\n                  <path d={smooth(project(balSeries, 100, 40, 4))} />\n                </svg>\n              </section>\n\n              <section className=\"hb-yd1-card\" style={{ \"--d\": 1 } as React.CSSProperties} aria-label=\"Allocation\">\n                <div className=\"hb-yd1-ch\">\n                  <div>\n                    <h3 className=\"hb-yd1-ct\">Allocation</h3>\n                    <p className=\"hb-yd1-cs\">Share of portfolio value</p>\n                  </div>\n                </div>\n                <div className=\"hb-yd1-donut\">\n                  <svg viewBox=\"0 0 42 42\" role=\"img\" aria-label=\"Allocation by asset\">\n                    <circle cx=\"21\" cy=\"21\" r=\"15.9155\" stroke=\"rgba(255,255,255,.05)\" />\n                    {arcs.map((a, i) => (\n                      <circle\n                        key={rows[i].symbol}\n                        className=\"hb-yd1-dseg\"\n                        cx=\"21\"\n                        cy=\"21\"\n                        r=\"15.9155\"\n                        pathLength={100}\n                        data-hot={hot === i}\n                        data-dim={hot !== null && hot !== i}\n                        style={{ stroke: a.color, strokeDasharray: `${a.len.toFixed(2)} ${(100 - a.len).toFixed(2)}`, strokeDashoffset: -Number(a.offset.toFixed(2)) }}\n                        onPointerEnter={() => setHot(i)}\n                        onPointerLeave={() => setHot(null)}\n                        onClick={() => pickAsset(rows[i].symbol)}\n                      />\n                    ))}\n                  </svg>\n                  <div className=\"hb-yd1-dc\">\n                    <strong className=\"hb-yd1-num\">{hot === null ? `${holdings.length}` : `${shares[hot].toFixed(1)}%`}</strong>\n                    <span>{hot === null ? \"assets held\" : rows[hot].name}</span>\n                  </div>\n                </div>\n                <ul className=\"hb-yd1-leg\">\n                  {rows.map((h, i) => (\n                    <li key={h.symbol}>\n                      <button\n                        type=\"button\"\n                        aria-pressed={sym === h.symbol}\n                        onPointerEnter={() => setHot(i)}\n                        onPointerLeave={() => setHot(null)}\n                        onFocus={() => setHot(i)}\n                        onBlur={() => setHot(null)}\n                        onClick={() => pickAsset(h.symbol)}\n                      >\n                        <i style={{ background: h.color }} />\n                        <span>{h.symbol}</span>\n                        <em className=\"hb-yd1-num\">{shares[i].toFixed(1)}%</em>\n                      </button>\n                    </li>\n                  ))}\n                </ul>\n              </section>\n            </div>\n\n            <div className=\"hb-yd1-row\">\n              <section className=\"hb-yd1-card\" style={{ \"--d\": 2 } as React.CSSProperties} aria-label=\"Price chart\">\n                <div className=\"hb-yd1-ch\">\n                  <div className=\"hb-yd1-pair\">\n                    <span className=\"hb-yd1-coin\" style={{ background: `linear-gradient(135deg, ${sel?.color ?? accent}, #1a1d22)` }}>\n                      {sel?.symbol.slice(0, 2)}\n                    </span>\n                    <div>\n                      <div className=\"hb-yd1-pair-p\">\n                        <b className=\"hb-yd1-num\">{fmtPrice(sel?.price ?? 0, currency)}</b>\n                        <Change value={rangeChange} />\n                      </div>\n                      <p className=\"hb-yd1-cs\">\n                        {sel?.name} / USD · {cfg.label}\n                      </p>\n                    </div>\n                  </div>\n                  <div className=\"hb-yd1-seg\" role=\"group\" aria-label=\"Chart range\">\n                    {RANGE_KEYS.map((k) => (\n                      <button key={k} type=\"button\" aria-pressed={r === k} onClick={() => pickRange(k)}>\n                        {k}\n                      </button>\n                    ))}\n                  </div>\n                </div>\n                <div className=\"hb-yd1-chart\">\n                  <div\n                    className=\"hb-yd1-plot\"\n                    role=\"img\"\n                    tabIndex={0}\n                    aria-label={`${sel?.name} price, ${cfg.n} candles over ${r}, ${rangeChange >= 0 ? \"up\" : \"down\"} ${Math.abs(rangeChange).toFixed(2)} percent. Use arrow keys to inspect candles.`}\n                    onPointerMove={moveTo}\n                    onPointerLeave={() => setHover(null)}\n                    onKeyDown={keyMove}\n                    onBlur={() => setHover(null)}\n                  >\n                    <svg key={`${sym}${r}`} viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n                      {ticks.map((t, k) => (\n                        <line key={k} className=\"hb-yd1-gl\" x1=\"0\" x2=\"100\" y1={y(t).toFixed(2)} y2={y(t).toFixed(2)} />\n                      ))}\n                      {candles.map((c, i) => {\n                        const vh = c.v * 18;\n                        return (\n                          <rect\n                            key={`v${i}`}\n                            className=\"hb-yd1-vol\"\n                            data-dir={c.c >= c.o ? \"up\" : \"down\"}\n                            x={(i * slot + slot * 0.18).toFixed(3)}\n                            width={(slot * 0.64).toFixed(3)}\n                            y={(100 - vh).toFixed(2)}\n                            height={vh.toFixed(2)}\n                            style={{ animationDelay: `${i * 10}ms` }}\n                          />\n                        );\n                      })}\n                      {candles.map((c, i) => {\n                        const x = i * slot + slot / 2;\n                        const yt = y(Math.max(c.o, c.c));\n                        const yb = y(Math.min(c.o, c.c));\n                        return (\n                          <g key={i} className=\"hb-yd1-cdl\" data-dir={c.c >= c.o ? \"up\" : \"down\"} data-hot={hover === i} style={{ animationDelay: `${i * 12}ms` }}>\n                            <line x1={x.toFixed(3)} x2={x.toFixed(3)} y1={y(c.h).toFixed(2)} y2={y(c.l).toFixed(2)} />\n                            <rect x={(i * slot + slot * 0.18).toFixed(3)} width={(slot * 0.64).toFixed(3)} y={yt.toFixed(2)} height={Math.max(0.5, yb - yt).toFixed(2)} rx=\"0.15\" />\n                          </g>\n                        );\n                      })}\n                      {sel ? <line className=\"hb-yd1-last\" x1=\"0\" x2=\"100\" y1={y(sel.price).toFixed(2)} y2={y(sel.price).toFixed(2)} /> : null}\n                    </svg>\n                    {hc && hover !== null ? (\n                      <>\n                        <div className=\"hb-yd1-cross\" style={{ left: `${(hover * slot + slot / 2).toFixed(2)}%` }} />\n                        <div\n                          className=\"hb-yd1-tt hb-yd1-num\"\n                          style={{\n                            left: `${(hover * slot + slot / 2).toFixed(2)}%`,\n                            transform: hover * slot > 62 ? \"translateX(calc(-100% - 12px))\" : \"translateX(12px)\",\n                          }}\n                        >\n                          <div className=\"hb-yd1-tt-d\">{tipLabel(r, cfg.n - 1 - hover)}</div>\n                          <span>Open</span>\n                          <b>{fmtPrice(hc.o, currency)}</b>\n                          <span>High</span>\n                          <b>{fmtPrice(hc.h, currency)}</b>\n                          <span>Low</span>\n                          <b>{fmtPrice(hc.l, currency)}</b>\n                          <span>Close</span>\n                          <b data-dir={hc.c >= hc.o ? \"up\" : \"down\"}>{fmtPrice(hc.c, currency)}</b>\n                        </div>\n                      </>\n                    ) : null}\n                  </div>\n                  <div className=\"hb-yd1-yax hb-yd1-num\" aria-hidden=\"true\">\n                    {ticks.map((t, k) => (\n                      <span key={k} style={{ top: `${y(t).toFixed(2)}%` }}>\n                        {fmtPrice(t, \"\")}\n                      </span>\n                    ))}\n                    {sel ? (\n                      <span className=\"hb-yd1-ytag\" style={{ top: `${y(sel.price).toFixed(2)}%` }}>\n                        {fmtPrice(sel.price, \"\")}\n                      </span>\n                    ) : null}\n                  </div>\n                  <div className=\"hb-yd1-xax\" aria-hidden=\"true\">\n                    {xs.map((x) => (\n                      <span key={x}>{axisLabel(r, cfg.n - 1 - x)}</span>\n                    ))}\n                  </div>\n                </div>\n              </section>\n\n              <section className=\"hb-yd1-card\" style={{ \"--d\": 3 } as React.CSSProperties} aria-label=\"Recent activity\">\n                <div className=\"hb-yd1-ch\">\n                  <div>\n                    <h3 className=\"hb-yd1-ct\">Recent activity</h3>\n                    <p className=\"hb-yd1-cs\">Trades, transfers and rewards</p>\n                  </div>\n                </div>\n                <ul className=\"hb-yd1-feed\">\n                  {FEED.map((f, i) => (\n                    <li key={f.title} style={{ animationDelay: `${300 + i * 70}ms` }}>\n                      <span className=\"hb-yd1-fi\" data-k={f.k}>\n                        <Ico n={f.k === \"buy\" ? \"plus\" : f.k === \"sell\" ? \"send\" : f.k === \"stake\" ? \"layers\" : f.k === \"recv\" ? \"recv\" : \"swap\"} />\n                      </span>\n                      <div className=\"hb-yd1-ft\">\n                        <b>{f.title}</b>\n                        <span>{f.sub}</span>\n                      </div>\n                      <div className=\"hb-yd1-fv hb-yd1-num\">\n                        {masked ? \"••••\" : f.value}\n                        <span>{f.meta}</span>\n                      </div>\n                    </li>\n                  ))}\n                </ul>\n              </section>\n            </div>\n\n            <section className=\"hb-yd1-card\" style={{ \"--d\": 4 } as React.CSSProperties} aria-label=\"Holdings\">\n              <div className=\"hb-yd1-ch\">\n                <div>\n                  <h3 className=\"hb-yd1-ct\">Holdings</h3>\n                  <p className=\"hb-yd1-cs\">Select an asset to chart it</p>\n                </div>\n              </div>\n              <table className=\"hb-yd1-tbl\">\n                <thead>\n                  <tr>\n                    <th scope=\"col\">Asset</th>\n                    <th scope=\"col\" className=\"hb-yd1-hide-xs\" aria-sort={sort.key === \"price\" ? (sort.desc ? \"descending\" : \"ascending\") : undefined}>\n                      <button type=\"button\" onClick={() => toggleSort(\"price\")}>\n                        Price\n                        <Ico n={sort.key === \"price\" ? (sort.desc ? \"sortd\" : \"sortu\") : \"sort\"} className=\"\" />\n                      </button>\n                    </th>\n                    <th scope=\"col\" aria-sort={sort.key === \"change\" ? (sort.desc ? \"descending\" : \"ascending\") : undefined}>\n                      <button type=\"button\" onClick={() => toggleSort(\"change\")}>\n                        24h\n                        <Ico n={sort.key === \"change\" ? (sort.desc ? \"sortd\" : \"sortu\") : \"sort\"} className=\"\" />\n                      </button>\n                    </th>\n                    <th scope=\"col\" className=\"hb-yd1-hide-sm\">\n                      Holdings\n                    </th>\n                    <th scope=\"col\" aria-sort={sort.key === \"value\" ? (sort.desc ? \"descending\" : \"ascending\") : undefined}>\n                      <button type=\"button\" onClick={() => toggleSort(\"value\")}>\n                        Value\n                        <Ico n={sort.key === \"value\" ? (sort.desc ? \"sortd\" : \"sortu\") : \"sort\"} className=\"\" />\n                      </button>\n                    </th>\n                    <th scope=\"col\" className=\"hb-yd1-hide-md\">\n                      Allocation\n                    </th>\n                    <th scope=\"col\" className=\"hb-yd1-hide-sm\">\n                      7 days\n                    </th>\n                  </tr>\n                </thead>\n                <tbody>\n                  {sorted.map((h, i) => {\n                    const dir = h.change >= 0 ? \"up\" : \"down\";\n                    return (\n                      <tr key={h.symbol} data-on={sym === h.symbol} onClick={() => pickAsset(h.symbol)}>\n                        <td>\n                          <button type=\"button\" className=\"hb-yd1-asset\" aria-pressed={sym === h.symbol} onClick={(e) => { e.stopPropagation(); pickAsset(h.symbol); }}>\n                            <span className=\"hb-yd1-coin\" style={{ background: `linear-gradient(135deg, ${h.color}, #1a1d22)` }}>\n                              {h.symbol.slice(0, 2)}\n                            </span>\n                            <span>\n                              <b>{h.name}</b>\n                              <span>{h.symbol}</span>\n                            </span>\n                          </button>\n                        </td>\n                        <td className=\"hb-yd1-num hb-yd1-hide-xs\">{fmtPrice(h.price, currency)}</td>\n                        <td>\n                          <Change value={h.change} />\n                        </td>\n                        <td className=\"hb-yd1-num hb-yd1-hide-sm\">\n                          {masked ? \"••••\" : fmtAmount(h.amount)} <span style={{ color: \"#6c7076\" }}>{h.symbol}</span>\n                        </td>\n                        <td className=\"hb-yd1-num\">{money(h.value)}</td>\n                        <td className=\"hb-yd1-hide-md\">\n                          <span className=\"hb-yd1-alloc hb-yd1-num\">\n                            <i style={{ \"--w\": `${((h.value / total) * 100).toFixed(1)}%`, \"--c\": h.color, animationDelay: `${i * 60}ms` } as React.CSSProperties} />\n                            {((h.value / total) * 100).toFixed(1)}%\n                          </span>\n                        </td>\n                        <td className=\"hb-yd1-hide-sm\" data-dir={dir}>\n                          <MiniSpark values={h.week} className=\"hb-yd1-msp\" />\n                        </td>\n                      </tr>\n                    );\n                  })}\n                </tbody>\n              </table>\n            </section>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n"
    }
  ]
}