{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "marketing-hero-analytics",
  "type": "registry:ui",
  "description": "Analytics hero section for marketing pages",
  "files": [
    {
      "path": "registry/default/ui/marketing-hero-analytics.tsx",
      "content": "\"use client\"\n\nimport type * as React from \"react\"\nimport { useCallback, useEffect, useId, useMemo, useRef, useState } from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport type AnalyticsHeroChartDatum = {\n  label: string\n  value: number\n}\n\nexport type AnalyticsHeroSourceIconKey =\n  | \"google\"\n  | \"vercel\"\n  | \"x\"\n  | \"yc\"\n  | \"splitbee\"\n  | \"linear\"\n  | \"github\"\n\nexport type AnalyticsHeroSource = {\n  name: string\n  visitors: number\n  icon: AnalyticsHeroSourceIconKey\n}\n\nexport type AnalyticsHeroLog = {\n  time: string\n  rt: \"mw\" | \"fe\"\n  method: string\n  status: number\n  path: string\n}\n\nexport const ANALYTICS_HERO_CHART_DATA: AnalyticsHeroChartDatum[] = [\n  { label: \"Fri May 10 6am - 7am\", value: 142_310 },\n  { label: \"Fri May 10 7am - 8am\", value: 142_310 },\n  { label: \"Fri May 10 8am - 9am\", value: 285_420 },\n  { label: \"Fri May 10 9am - 10am\", value: 428_530 },\n  { label: \"Fri May 10 10am - 11am\", value: 428_530 },\n  { label: \"Fri May 10 11am - 12pm\", value: 609_797 },\n  { label: \"Fri May 10 12pm - 1pm\", value: 752_640 },\n  { label: \"Fri May 10 1pm - 2pm\", value: 618_070 },\n  { label: \"Fri May 10 2pm - 3pm\", value: 895_750 },\n  { label: \"Fri May 10 3pm - 4pm\", value: 752_640 },\n  { label: \"Fri May 10 4pm - 5pm\", value: 895_750 },\n  { label: \"Fri May 10 5pm - 6pm\", value: 895_750 },\n  { label: \"Fri May 10 6pm - 7pm\", value: 1_038_860 },\n]\n\nexport const ANALYTICS_HERO_SOURCES: AnalyticsHeroSource[] = [\n  { name: \"google.com\", visitors: 259_010, icon: \"google\" },\n  { name: \"vercel.com\", visitors: 132_821, icon: \"vercel\" },\n  { name: \"x.com\", visitors: 51_280, icon: \"x\" },\n  { name: \"ycombinator.com\", visitors: 27_102, icon: \"yc\" },\n  { name: \"splitbee.com\", visitors: 20_186, icon: \"splitbee\" },\n  { name: \"linear.com\", visitors: 18_281, icon: \"linear\" },\n  { name: \"github.blog\", visitors: 13_021, icon: \"github\" },\n]\n\nexport const ANALYTICS_HERO_LOGS: AnalyticsHeroLog[] = [\n  {\n    time: \"24:59\",\n    rt: \"mw\",\n    method: \"GET\",\n    status: 200,\n    path: \"/app/front/ap...\",\n  },\n  { time: \"24.52\", rt: \"fe\", method: \"GET\", status: 200, path: \"/status/api\" },\n  { time: \"24.50\", rt: \"mw\", method: \"GET\", status: 200, path: \"/docs\" },\n  { time: \"24.43\", rt: \"fe\", method: \"GET\", status: 200, path: \"/api/jwt\" },\n]\n\nexport const ANALYTICS_HERO_STOPS = [\n  \"#FF975C\",\n  \"#FAA95A\",\n  \"#F5BE57\",\n  \"#EED353\",\n  \"#EAE550\",\n  \"#D7E84B\",\n  \"#C2E447\",\n  \"#B2E444\",\n  \"#9ADD3E\",\n  \"#84DB40\",\n  \"#67D141\",\n  \"#4ECB42\",\n  \"#37C442\",\n] as const\n\nexport function getAnalyticsHeroColor(index: number) {\n  return ANALYTICS_HERO_STOPS[Math.min(index, ANALYTICS_HERO_STOPS.length - 1)]\n}\n\nexport function AnalyticsHeroGoogleIcon(props: React.ComponentProps<\"svg\">) {\n  return (\n    <svg\n      aria-hidden=\"true\"\n      data-slot=\"analytics-hero-icon-google\"\n      focusable=\"false\"\n      height=\"15\"\n      viewBox=\"0 0 16 16\"\n      width=\"15\"\n      {...props}\n    >\n      <path\n        d=\"M8.16 6.545v3.098h4.305c-.189.996-.756 1.84-1.607 2.407l2.596 2.015c1.513-1.397 2.386-3.448 2.386-5.884 0-.567-.051-1.113-.145-1.636H8.16z\"\n        fill=\"#4285F4\"\n      />\n      <path\n        d=\"M3.676 9.523l-.585.448-2.073 1.615c1.316 2.61 4.014 4.414 7.142 4.414 2.16 0 3.971-.717 5.294-1.94l-2.596-2.015c-.713.48-1.622.771-2.698.771-2.08 0-3.847-1.404-4.48-3.295l-.004.002z\"\n        fill=\"#34A853\"\n      />\n      <path\n        d=\"M1.018 4.415A7.81 7.81 0 00.16 8c0 1.294.313 2.509.858 3.585l2.662-2.066A4.632 4.632 0 013.425 8c0-.531.095-1.04.255-1.52L1.018 4.415z\"\n        fill=\"#FBBC05\"\n      />\n      <path\n        d=\"M8.16 3.185c1.178 0 2.226.407 3.062 1.193l2.29-2.29C12.123.793 10.32 0 8.16 0 5.033 0 2.334 1.796 1.018 4.415l2.662 2.065c.632-1.891 2.4-3.295 4.48-3.295z\"\n        fill=\"#EA4335\"\n      />\n    </svg>\n  )\n}\n\nexport function AnalyticsHeroVercelIcon(props: React.ComponentProps<\"svg\">) {\n  return (\n    <svg\n      aria-hidden=\"true\"\n      data-slot=\"analytics-hero-icon-vercel\"\n      focusable=\"false\"\n      height=\"15\"\n      viewBox=\"0 0 16 16\"\n      width=\"15\"\n      {...props}\n    >\n      <path d=\"M8 1L16 15H0L8 1Z\" fill=\"currentColor\" />\n    </svg>\n  )\n}\n\nexport function AnalyticsHeroXIcon(props: React.ComponentProps<\"svg\">) {\n  return (\n    <svg\n      aria-hidden=\"true\"\n      data-slot=\"analytics-hero-icon-x\"\n      focusable=\"false\"\n      height=\"15\"\n      viewBox=\"0 0 16 16\"\n      width=\"15\"\n      {...props}\n    >\n      <path\n        d=\"M0.5 0.5H5.75L9.48 5.71L14 0.5H16L10.39 6.97L16.5 15.5H11.25L7.52 10.29L3 15.5H1L6.61 9.03L0.5 0.5ZM12.02 14L3.42 2H4.98L13.58 14H12.02Z\"\n        fill=\"currentColor\"\n      />\n    </svg>\n  )\n}\n\nexport function AnalyticsHeroYcIcon(props: React.ComponentProps<\"svg\">) {\n  return (\n    <svg\n      aria-hidden=\"true\"\n      data-slot=\"analytics-hero-icon-yc\"\n      focusable=\"false\"\n      height=\"15\"\n      viewBox=\"0 0 16 16\"\n      width=\"15\"\n      {...props}\n    >\n      <rect fill=\"#FB651E\" height=\"16\" rx=\"1\" width=\"16\" />\n      <path\n        d=\"M7.46 9.047L4.715 3.902h1.255l1.615 3.256.087.18.087.193.037.064.025.056c.041.083.079.164.112.242.033.079.062.151.087.218a6.55 6.55 0 01.218-.454c.079-.161.16-.329.242-.497l1.64-3.258h1.169l-2.771 5.207v3.318H7.461V9.047z\"\n        fill=\"white\"\n      />\n    </svg>\n  )\n}\n\nexport function AnalyticsHeroSplitbeeIcon(props: React.ComponentProps<\"svg\">) {\n  return (\n    <svg\n      aria-hidden=\"true\"\n      data-slot=\"analytics-hero-icon-splitbee\"\n      focusable=\"false\"\n      height=\"15\"\n      viewBox=\"0 0 16 16\"\n      width=\"15\"\n      {...props}\n    >\n      <circle\n        cx=\"8\"\n        cy=\"10\"\n        fill=\"#FFC700\"\n        r=\"5\"\n        stroke=\"#222\"\n        strokeWidth=\"0.6\"\n      />\n      <ellipse\n        cx=\"6\"\n        cy=\"4.5\"\n        fill=\"white\"\n        rx=\"2\"\n        ry=\"2.7\"\n        stroke=\"#222\"\n        strokeWidth=\"0.6\"\n        transform=\"rotate(-10 6 4.5)\"\n      />\n      <ellipse\n        cx=\"5.2\"\n        cy=\"5.8\"\n        fill=\"white\"\n        rx=\"2.4\"\n        ry=\"1.6\"\n        stroke=\"#222\"\n        strokeWidth=\"0.6\"\n        transform=\"rotate(25 5.2 5.8)\"\n      />\n      <circle cx=\"11.2\" cy=\"9\" fill=\"#222\" r=\"0.55\" />\n    </svg>\n  )\n}\n\nexport function AnalyticsHeroLinearIcon(props: React.ComponentProps<\"svg\">) {\n  return (\n    <svg\n      aria-hidden=\"true\"\n      data-slot=\"analytics-hero-icon-linear\"\n      focusable=\"false\"\n      height=\"15\"\n      viewBox=\"0 0 16 16\"\n      width=\"15\"\n      {...props}\n    >\n      <path\n        d=\"M1.172 9.613c-.031-.133.127-.216.223-.12l5.112 5.112c.096.097.013.255-.12.224a7.002 7.002 0 01-5.215-5.216zM1 7.564a.167.167 0 01.04.106l7.289 7.289a.167.167 0 00.106.04c.33-.02.656-.064.975-.13a.147.147 0 00.067-.13L1.36 6.523a.147.147 0 00-.13.067 7.12 7.12 0 00-.13.975zM1.59 5.16a.167.167 0 00.029.154l9.068 9.069a.167.167 0 00.154.029c.25-.112.493-.236.726-.375a.167.167 0 00.026-.216L2.181 4.407a.167.167 0 00-.215.026 7.09 7.09 0 00-.376.726zM2.772 3.53a.167.167 0 00-.006-.19A6.996 6.996 0 017.993 1C11.863 1 15 4.137 15 8.007a6.997 6.997 0 01-2.341 5.227.167.167 0 01-.19-.006L2.773 3.53z\"\n        fill=\"#5E6AD2\"\n      />\n    </svg>\n  )\n}\n\nexport function AnalyticsHeroGithubIcon(props: React.ComponentProps<\"svg\">) {\n  return (\n    <svg\n      aria-hidden=\"true\"\n      data-slot=\"analytics-hero-icon-github\"\n      focusable=\"false\"\n      height=\"15\"\n      viewBox=\"0 0 16 16\"\n      width=\"15\"\n      {...props}\n    >\n      <path\n        d=\"M8 0C3.58 0 0 3.579 0 7.997c0 3.539 2.29 6.528 5.47 7.588.37.07.52-.24.52-.45 0-.2-.01-.83-.01-1.5-2 .37-2.52-.86-2.68-1.31-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.88 2.33.67.07-.53.28-.88.51-1.08-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.56 7.56 0 014 0c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 7.997C16 3.579 12.42 0 8 0z\"\n        fill=\"currentColor\"\n      />\n    </svg>\n  )\n}\n\nexport const ANALYTICS_HERO_ICONS: Record<\n  AnalyticsHeroSourceIconKey,\n  (props: React.ComponentProps<\"svg\">) => React.JSX.Element\n> = {\n  google: AnalyticsHeroGoogleIcon,\n  vercel: AnalyticsHeroVercelIcon,\n  x: AnalyticsHeroXIcon,\n  yc: AnalyticsHeroYcIcon,\n  splitbee: AnalyticsHeroSplitbeeIcon,\n  linear: AnalyticsHeroLinearIcon,\n  github: AnalyticsHeroGithubIcon,\n}\n\nexport interface AnalyticsHeroCrosshairProps\n  extends React.ComponentProps<\"div\"> {}\n\nexport function AnalyticsHeroCrosshair({\n  className,\n  ...props\n}: AnalyticsHeroCrosshairProps) {\n  return (\n    <div\n      className={cn(\"absolute\", className)}\n      data-slot=\"analytics-hero-crosshair\"\n      {...props}\n    >\n      <div className=\"relative h-[14px] w-[14px]\">\n        <div\n          className=\"-translate-x-1/2 absolute top-0 left-1/2 h-full w-px\"\n          style={{ background: \"hsl(0 0% 66%)\" }}\n        />\n        <div\n          className=\"-translate-y-1/2 absolute top-1/2 left-0 h-px w-full\"\n          style={{ background: \"hsl(0 0% 66%)\" }}\n        />\n      </div>\n    </div>\n  )\n}\n\nexport interface AnalyticsHeroGridLinesProps\n  extends React.ComponentProps<\"div\"> {\n  cols: number\n  rows: number\n}\n\nexport function AnalyticsHeroGridLines({\n  cols,\n  rows,\n  className,\n  ...props\n}: AnalyticsHeroGridLinesProps) {\n  const verticalPositions = Array.from(\n    { length: cols + 1 },\n    (_, i) => `${((i / cols) * 100).toFixed(4)}%`\n  )\n  const horizontalPositions = Array.from(\n    { length: rows + 1 },\n    (_, i) => `${((i / rows) * 100).toFixed(4)}%`\n  )\n\n  return (\n    <div\n      aria-hidden=\"true\"\n      className={cn(\"pointer-events-none absolute inset-0\", className)}\n      data-slot=\"analytics-hero-grid-lines\"\n      {...props}\n    >\n      {verticalPositions.map((left) => (\n        <div\n          className=\"absolute top-0 bottom-0\"\n          key={`v-${left}`}\n          style={{\n            left,\n            borderLeft: \"1px solid hsl(0 0% 88%)\",\n          }}\n        />\n      ))}\n      {horizontalPositions.map((top) => (\n        <div\n          className=\"absolute right-0 left-0\"\n          key={`h-${top}`}\n          style={{\n            top,\n            borderTop: \"1px solid hsl(0 0% 88%)\",\n          }}\n        />\n      ))}\n      <AnalyticsHeroCrosshair className=\"-top-[7px] -left-[7px]\" />\n      <AnalyticsHeroCrosshair className=\"-bottom-[7px] -right-[7px]\" />\n    </div>\n  )\n}\n\nexport interface AnalyticsHeroChartProps\n  extends Omit<React.ComponentProps<\"svg\">, \"onHover\"> {\n  data: AnalyticsHeroChartDatum[]\n  hovered: number | null\n  onHover: (index: number | null) => void\n}\n\nexport function AnalyticsHeroChart({\n  data,\n  hovered,\n  onHover,\n  className,\n  ...props\n}: AnalyticsHeroChartProps) {\n  const idBase = useId().replaceAll(\":\", \"\")\n  const lineGradientId = `${idBase}-line-gradient`\n  const fillGradientId = `${idBase}-fill-gradient`\n  const hoverClipId = `${idBase}-hover-clip`\n\n  const max = Math.max(...data.map((d) => d.value))\n  const points = data.map((d, i) => ({\n    x: (i / (data.length - 1)) * 960,\n    y: 560 - (d.value / max) * 480 - 20,\n  }))\n  const linePath = points\n    .map((point, i) => `${i ? \"L\" : \"M\"}${point.x} ${point.y}`)\n    .join(\" \")\n  const fillPath = `${linePath} L960 560 L0 560 Z`\n  const clipX = hovered !== null ? (points[hovered]?.x ?? 0) : 0\n\n  return (\n    <svg\n      className={cn(\"h-full w-full\", className)}\n      data-slot=\"analytics-hero-chart\"\n      onMouseLeave={() => onHover(null)}\n      onMouseMove={(event) => {\n        const bounds = event.currentTarget.getBoundingClientRect()\n        const ratio = Math.min(\n          1,\n          Math.max(0, (event.clientX - bounds.left) / bounds.width)\n        )\n        onHover(Math.round(ratio * (data.length - 1)))\n      }}\n      preserveAspectRatio=\"none\"\n      style={{ cursor: \"crosshair\", overflow: \"visible\" }}\n      viewBox=\"0 0 960 560\"\n      {...props}\n    >\n      <title>Visitors chart</title>\n      <defs>\n        <linearGradient\n          gradientUnits=\"userSpaceOnUse\"\n          id={lineGradientId}\n          x1=\"960\"\n          x2=\"0\"\n          y1=\"2\"\n          y2=\"542\"\n        >\n          <stop offset=\"0\" stopColor=\"#35C442\" />\n          <stop offset=\".333\" stopColor=\"#9AE13E\" />\n          <stop offset=\".667\" stopColor=\"#E9EB4E\" />\n          <stop offset=\"1\" stopColor=\"#FF975C\" />\n        </linearGradient>\n        <linearGradient\n          gradientUnits=\"userSpaceOnUse\"\n          id={fillGradientId}\n          x1=\"960\"\n          x2=\"0\"\n          y1=\"0\"\n          y2=\"560\"\n        >\n          <stop offset=\"0\" stopColor=\"#35C442\" />\n          <stop offset=\".333\" stopColor=\"#9AE13E\" />\n          <stop offset=\".667\" stopColor=\"#E9EB4E\" />\n          <stop offset=\"1\" stopColor=\"#FF975C\" />\n        </linearGradient>\n        <clipPath id={hoverClipId}>\n          <rect height=\"560\" width={clipX} x=\"0\" y=\"0\" />\n        </clipPath>\n      </defs>\n      <path\n        clipPath={`url(#${hoverClipId})`}\n        d={fillPath}\n        fill={`url(#${fillGradientId})`}\n        opacity=\"0.05\"\n      />\n      <path\n        d={linePath}\n        fill=\"none\"\n        stroke={`url(#${lineGradientId})`}\n        strokeLinecap=\"square\"\n        strokeWidth=\"2\"\n        vectorEffect=\"non-scaling-stroke\"\n      />\n      {points.map((point, i) => {\n        const isHovered = hovered === i\n        const color = getAnalyticsHeroColor(i)\n        const datum = data[i]\n        return (\n          <g key={`${datum.label}-${datum.value}`}>\n            {isHovered ? (\n              <circle\n                cx={point.x}\n                cy={point.y}\n                fill=\"hsl(0 0% 8%)\"\n                opacity=\"0.08\"\n                r=\"9\"\n              />\n            ) : null}\n            <circle\n              cx={point.x}\n              cy={point.y}\n              fill={color}\n              r={isHovered ? 6 : 4}\n              stroke=\"hsl(0 0% 98%)\"\n              strokeWidth={isHovered ? 2 : 1}\n              style={{\n                filter: \"drop-shadow(0px 1px 2px rgba(0,0,0,0.04))\",\n                transition: \"r 120ms cubic-bezier(0.23,1,0.32,1)\",\n              }}\n            />\n          </g>\n        )\n      })}\n    </svg>\n  )\n}\n\nexport interface AnalyticsHeroTooltipProps extends React.ComponentProps<\"div\"> {\n  data: AnalyticsHeroChartDatum[]\n  index: number | null\n  containerRef: React.RefObject<HTMLDivElement | null>\n  sectionRef: React.RefObject<HTMLElement | null>\n}\n\nexport function AnalyticsHeroTooltip({\n  data,\n  index,\n  containerRef,\n  sectionRef,\n  className,\n  ...props\n}: AnalyticsHeroTooltipProps) {\n  if (index === null || !containerRef.current || !sectionRef.current) {\n    return null\n  }\n\n  const chartRect = containerRef.current.getBoundingClientRect()\n  const sectionRect = sectionRef.current.getBoundingClientRect()\n  const max = Math.max(...data.map((d) => d.value))\n  const xRatio = index / (data.length - 1)\n  const yRatio = 1 - (data[index].value / max) * (480 / 560) - 20 / 560\n  let left = chartRect.left - sectionRect.left + xRatio * chartRect.width + 12\n  const top = chartRect.top - sectionRect.top + yRatio * chartRect.height + 12\n  if (left + 200 > sectionRect.width) {\n    left = chartRect.left - sectionRect.left + xRatio * chartRect.width - 210\n  }\n\n  return (\n    <div\n      className={cn(\"pointer-events-none absolute z-50\", className)}\n      data-slot=\"analytics-hero-tooltip\"\n      style={{\n        left,\n        top,\n        transition:\n          \"left 60ms cubic-bezier(0.23,1,0.32,1), top 60ms cubic-bezier(0.23,1,0.32,1)\",\n      }}\n      {...props}\n    >\n      <div\n        style={{\n          background: \"hsl(0 0% 100%)\",\n          border: \"1px solid hsl(0 0% 88% / 0.6)\",\n          borderRadius: 8,\n          padding: \"10px 14px\",\n          boxShadow: \"0 4px 12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04)\",\n        }}\n      >\n        <div className=\"flex items-center justify-between\" style={{ gap: 28 }}>\n          <span\n            style={{\n              fontSize: 13,\n              fontWeight: 600,\n              color: \"hsl(0 0% 10%)\",\n              letterSpacing: \"-0.01em\",\n            }}\n          >\n            Visitors\n          </span>\n          <span\n            style={{\n              fontSize: 13,\n              fontWeight: 600,\n              color: \"hsl(0 0% 10%)\",\n              fontVariantNumeric: \"tabular-nums\",\n            }}\n          >\n            {data[index].value.toLocaleString()}\n          </span>\n        </div>\n        <p\n          style={{\n            fontSize: 12,\n            color: \"hsl(0 0% 40%)\",\n            marginTop: 2,\n            whiteSpace: \"nowrap\",\n            margin: \"2px 0 0\",\n          }}\n        >\n          {data[index].label}\n        </p>\n      </div>\n    </div>\n  )\n}\n\nexport interface AnalyticsHeroAppLogsProps extends React.ComponentProps<\"div\"> {\n  logs: AnalyticsHeroLog[]\n  timestamp?: string\n}\n\nexport function AnalyticsHeroAppLogs({\n  logs,\n  timestamp = \"13:39\",\n  className,\n  ...props\n}: AnalyticsHeroAppLogsProps) {\n  const [visible, setVisible] = useState(false)\n  useEffect(() => {\n    const timeout = setTimeout(() => setVisible(true), 420)\n    return () => clearTimeout(timeout)\n  }, [])\n\n  return (\n    <div\n      className={cn(className)}\n      data-slot=\"analytics-hero-app-logs\"\n      style={{\n        opacity: visible ? 1 : 0,\n        transform: visible ? \"translateY(0)\" : \"translateY(12px)\",\n        filter: visible ? \"blur(0)\" : \"blur(4px)\",\n        transition: \"all 500ms cubic-bezier(0.23,1,0.32,1)\",\n        background: \"hsl(0 0% 100%)\",\n        borderRadius: 10,\n        border: \"1px solid hsl(0 0% 88% / 0.7)\",\n        boxShadow: \"0 2px 8px rgba(0,0,0,0.05), 0 0 0 1px rgba(0,0,0,0.03)\",\n        overflow: \"hidden\",\n        width: 270,\n      }}\n      {...props}\n    >\n      <div\n        style={{\n          padding: \"12px 16px 6px\",\n          display: \"flex\",\n          justifyContent: \"space-between\",\n          alignItems: \"center\",\n        }}\n      >\n        <span style={{ fontSize: 13, fontWeight: 600, color: \"hsl(0 0% 10%)\" }}>\n          App Logs\n        </span>\n        <span\n          style={{\n            fontSize: 12,\n            fontFamily: \"ui-monospace, SFMono-Regular, monospace\",\n            color: \"hsl(0 0% 56%)\",\n          }}\n        >\n          {timestamp}\n        </span>\n      </div>\n      <div style={{ padding: \"2px 8px 10px\" }}>\n        {logs.map((log) => (\n          <div\n            key={`${log.time}-${log.path}-${log.method}-${log.status}`}\n            style={{\n              display: \"flex\",\n              alignItems: \"center\",\n              gap: 6,\n              padding: \"5px 8px\",\n              borderRadius: 6,\n              fontSize: 11,\n              color: \"hsl(0 0% 30%)\",\n            }}\n          >\n            <span\n              style={{\n                fontFamily: \"ui-monospace, SFMono-Regular, monospace\",\n                color: \"hsl(0 0% 62%)\",\n                width: 36,\n                flexShrink: 0,\n                fontVariantNumeric: \"tabular-nums\",\n                fontSize: 10,\n              }}\n            >\n              {log.time}\n            </span>\n            <span\n              style={{\n                width: 20,\n                height: 20,\n                borderRadius: 4,\n                border: \"1px solid hsl(0 0% 88%)\",\n                display: \"inline-flex\",\n                alignItems: \"center\",\n                justifyContent: \"center\",\n                fontSize: 7,\n                fontWeight: 700,\n                color: \"hsl(0 0% 56%)\",\n                flexShrink: 0,\n                background: \"hsl(0 0% 100%)\",\n              }}\n            >\n              {log.rt === \"mw\" ? \"M\" : \"ƒe\"}\n            </span>\n            <span\n              style={{\n                fontFamily: \"ui-monospace, SFMono-Regular, monospace\",\n                color: \"hsl(0 0% 46%)\",\n                flexShrink: 0,\n                fontSize: 11,\n              }}\n            >\n              {log.method}\n            </span>\n            <span\n              style={{\n                display: \"inline-flex\",\n                alignItems: \"center\",\n                justifyContent: \"center\",\n                padding: \"2px 5px\",\n                borderRadius: 4,\n                fontSize: 10,\n                fontWeight: 600,\n                lineHeight: 1,\n                fontFamily: \"ui-monospace, SFMono-Regular, monospace\",\n                background: \"hsl(152 69% 96%)\",\n                color: \"hsl(152 69% 31%)\",\n                border: \"1px solid hsl(152 60% 85%)\",\n                flexShrink: 0,\n              }}\n            >\n              {log.status}\n            </span>\n            <span\n              style={{\n                fontSize: 11,\n                color: \"hsl(0 0% 50%)\",\n                overflow: \"hidden\",\n                textOverflow: \"ellipsis\",\n                whiteSpace: \"nowrap\",\n              }}\n            >\n              {log.path}\n            </span>\n          </div>\n        ))}\n      </div>\n    </div>\n  )\n}\n\nexport interface AnalyticsHeroTopSourcesProps\n  extends React.ComponentProps<\"div\"> {\n  sources: AnalyticsHeroSource[]\n}\n\nexport function AnalyticsHeroTopSources({\n  sources,\n  className,\n  ...props\n}: AnalyticsHeroTopSourcesProps) {\n  const maxVisitors = Math.max(...sources.map((source) => source.visitors))\n  const [visible, setVisible] = useState(false)\n  useEffect(() => {\n    const timeout = setTimeout(() => setVisible(true), 540)\n    return () => clearTimeout(timeout)\n  }, [])\n\n  return (\n    <div\n      className={cn(className)}\n      data-slot=\"analytics-hero-top-sources\"\n      style={{\n        opacity: visible ? 1 : 0,\n        transform: visible ? \"translateX(0)\" : \"translateX(16px)\",\n        filter: visible ? \"blur(0)\" : \"blur(4px)\",\n        transition: \"all 500ms cubic-bezier(0.23,1,0.32,1)\",\n        background: \"hsl(0 0% 100%)\",\n        borderRadius: 10,\n        border: \"1px solid hsl(0 0% 88% / 0.7)\",\n        boxShadow: \"0 2px 8px rgba(0,0,0,0.05), 0 0 0 1px rgba(0,0,0,0.03)\",\n        overflow: \"hidden\",\n        width: 246,\n      }}\n      {...props}\n    >\n      <div\n        style={{\n          padding: \"12px 16px 6px\",\n          display: \"flex\",\n          justifyContent: \"space-between\",\n          alignItems: \"center\",\n        }}\n      >\n        <span style={{ fontSize: 13, fontWeight: 600, color: \"hsl(0 0% 10%)\" }}>\n          Top Sources\n        </span>\n        <span style={{ fontSize: 12, color: \"hsl(0 0% 56%)\" }}>Visitors</span>\n      </div>\n      <div\n        style={{\n          padding: \"2px 8px 10px\",\n          display: \"flex\",\n          flexDirection: \"column\",\n          gap: 2,\n        }}\n      >\n        {sources.map((source) => {\n          const SourceIcon = ANALYTICS_HERO_ICONS[source.icon]\n          const width = (source.visitors / maxVisitors) * 100\n          return (\n            <div\n              data-slot=\"analytics-hero-top-sources-row\"\n              key={`${source.name}-${source.visitors}`}\n              style={{\n                position: \"relative\",\n                display: \"flex\",\n                alignItems: \"center\",\n                justifyContent: \"space-between\",\n                gap: 8,\n                padding: \"5px 8px\",\n                borderRadius: 5,\n              }}\n            >\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 0,\n                  top: 0,\n                  bottom: 0,\n                  width: `${width}%`,\n                  background: \"hsl(0 0% 96%)\",\n                  borderRadius: 5,\n                }}\n              />\n              <div\n                style={{\n                  position: \"relative\",\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  gap: 10,\n                  minWidth: 0,\n                }}\n              >\n                <SourceIcon />\n                <span style={{ fontSize: 12, color: \"hsl(0 0% 40%)\" }}>\n                  {source.name}\n                </span>\n              </div>\n              <span\n                style={{\n                  position: \"relative\",\n                  fontSize: 12,\n                  color: \"hsl(0 0% 40%)\",\n                  fontVariantNumeric: \"tabular-nums\",\n                  flexShrink: 0,\n                }}\n              >\n                {source.visitors.toLocaleString()}\n              </span>\n            </div>\n          )\n        })}\n      </div>\n    </div>\n  )\n}\n\nexport interface AnalyticsHeroCopyProps extends React.ComponentProps<\"div\"> {\n  visible: boolean\n  title?: string\n  description?: string\n  deployLabel?: string\n  demoLabel?: string\n}\n\nexport function AnalyticsHeroCopy({\n  visible,\n  title = \"Understand production from the inside out.\",\n  description = \"With real-time infrastructure and traffic insights, Vercel is the mission control for frontend applications.\",\n  deployLabel = \"Deploy Now\",\n  demoLabel = \"Get a Demo\",\n  className,\n  ...props\n}: AnalyticsHeroCopyProps) {\n  return (\n    <div\n      className={cn(className)}\n      data-slot=\"analytics-hero-copy\"\n      style={{\n        display: \"flex\",\n        flexDirection: \"column\",\n        justifyContent: \"center\",\n        padding: \"0 48px\",\n      }}\n      {...props}\n    >\n      <h1\n        style={{\n          fontSize: \"clamp(28px, 2.8vw, 40px)\",\n          fontWeight: 700,\n          lineHeight: 1.12,\n          letterSpacing: \"-0.025em\",\n          color: \"hsl(0 0% 6%)\",\n          maxWidth: \"18ch\",\n          textWrap: \"balance\",\n          margin: 0,\n          opacity: visible ? 1 : 0,\n          transform: visible ? \"translateY(0)\" : \"translateY(10px)\",\n          filter: visible ? \"blur(0)\" : \"blur(4px)\",\n          transition:\n            \"opacity 700ms cubic-bezier(0.23,1,0.32,1), transform 700ms cubic-bezier(0.23,1,0.32,1), filter 700ms cubic-bezier(0.23,1,0.32,1)\",\n        }}\n      >\n        {title}\n      </h1>\n      <p\n        style={{\n          marginTop: 16,\n          fontSize: \"clamp(15px, 1.3vw, 18px)\",\n          lineHeight: 1.55,\n          color: \"hsl(0 0% 40%)\",\n          maxWidth: \"30ch\",\n          textWrap: \"pretty\",\n          opacity: visible ? 1 : 0,\n          transform: visible ? \"translateY(0)\" : \"translateY(8px)\",\n          filter: visible ? \"blur(0)\" : \"blur(3px)\",\n          transition:\n            \"opacity 700ms 80ms cubic-bezier(0.23,1,0.32,1), transform 700ms 80ms cubic-bezier(0.23,1,0.32,1), filter 700ms 80ms cubic-bezier(0.23,1,0.32,1)\",\n        }}\n      >\n        {description}\n      </p>\n      <div\n        data-slot=\"analytics-hero-actions\"\n        style={{\n          display: \"flex\",\n          gap: 12,\n          marginTop: 24,\n          opacity: visible ? 1 : 0,\n          transform: visible ? \"translateY(0)\" : \"translateY(8px)\",\n          filter: visible ? \"blur(0)\" : \"blur(3px)\",\n          transition:\n            \"opacity 700ms 160ms cubic-bezier(0.23,1,0.32,1), transform 700ms 160ms cubic-bezier(0.23,1,0.32,1), filter 700ms 160ms cubic-bezier(0.23,1,0.32,1)\",\n        }}\n      >\n        <button\n          className=\"active:scale-[0.97]\"\n          data-slot=\"analytics-hero-primary-action\"\n          style={{\n            display: \"inline-flex\",\n            alignItems: \"center\",\n            gap: 8,\n            padding: \"10px 20px\",\n            background: \"hsl(0 0% 6%)\",\n            color: \"white\",\n            fontSize: 14,\n            fontWeight: 500,\n            borderRadius: 999,\n            border: \"none\",\n            cursor: \"pointer\",\n            transition: \"transform 160ms cubic-bezier(0.23,1,0.32,1)\",\n          }}\n          type=\"button\"\n        >\n          <svg\n            aria-hidden=\"true\"\n            focusable=\"false\"\n            height=\"12\"\n            viewBox=\"0 0 74 64\"\n            width=\"12\"\n          >\n            <path\n              d=\"M37.5896 0.25L74.5396 64.25H0.639648L37.5896 0.25Z\"\n              fill=\"white\"\n            />\n          </svg>\n          {deployLabel}\n        </button>\n        <button\n          className=\"active:scale-[0.97]\"\n          data-slot=\"analytics-hero-secondary-action\"\n          style={{\n            display: \"inline-flex\",\n            alignItems: \"center\",\n            padding: \"10px 20px\",\n            background: \"white\",\n            color: \"hsl(0 0% 6%)\",\n            fontSize: 14,\n            fontWeight: 500,\n            borderRadius: 999,\n            border: \"1px solid hsl(0 0% 88%)\",\n            cursor: \"pointer\",\n            boxShadow: \"0 1px 2px rgba(0,0,0,0.04)\",\n            transition: \"transform 160ms cubic-bezier(0.23,1,0.32,1)\",\n          }}\n          type=\"button\"\n        >\n          {demoLabel}\n        </button>\n      </div>\n    </div>\n  )\n}\n\nexport interface AnalyticsHeroVisualProps extends React.ComponentProps<\"div\"> {\n  logs: AnalyticsHeroLog[]\n  sources: AnalyticsHeroSource[]\n}\n\nexport function AnalyticsHeroVisual({\n  logs,\n  sources,\n  className,\n  ...props\n}: AnalyticsHeroVisualProps) {\n  return (\n    <div\n      className={cn(\"pointer-events-none relative min-h-[400px]\", className)}\n      data-slot=\"analytics-hero-visual\"\n      {...props}\n    >\n      <div\n        className=\"pointer-events-auto\"\n        data-slot=\"analytics-hero-app-logs-positioner\"\n        style={{ position: \"absolute\", bottom: 8, left: -12 }}\n      >\n        <AnalyticsHeroAppLogs logs={logs} />\n      </div>\n      <div\n        className=\"pointer-events-auto\"\n        data-slot=\"analytics-hero-top-sources-positioner\"\n        style={{ position: \"absolute\", top: \"36%\", right: -6 }}\n      >\n        <AnalyticsHeroTopSources sources={sources} />\n      </div>\n    </div>\n  )\n}\n\nexport interface AnalyticsHeroProps extends React.ComponentProps<\"section\"> {\n  data?: AnalyticsHeroChartDatum[]\n  sources?: AnalyticsHeroSource[]\n  logs?: AnalyticsHeroLog[]\n  logsTimestamp?: string\n  title?: string\n  description?: string\n  deployLabel?: string\n  demoLabel?: string\n}\n\nexport function AnalyticsHero({\n  data = ANALYTICS_HERO_CHART_DATA,\n  sources = ANALYTICS_HERO_SOURCES,\n  logs = ANALYTICS_HERO_LOGS,\n  title,\n  description,\n  deployLabel,\n  demoLabel,\n  className,\n  ...props\n}: AnalyticsHeroProps) {\n  const [hovered, setHovered] = useState<number | null>(null)\n  const chartRef = useRef<HTMLDivElement>(null)\n  const sectionRef = useRef<HTMLElement>(null)\n  const [visible, setVisible] = useState(false)\n\n  useEffect(() => {\n    const timeout = setTimeout(() => setVisible(true), 60)\n    return () => clearTimeout(timeout)\n  }, [])\n\n  const lineX = useMemo(() => {\n    if (hovered === null || !chartRef.current || !sectionRef.current) {\n      return null\n    }\n    const chartRect = chartRef.current.getBoundingClientRect()\n    const sectionRect = sectionRef.current.getBoundingClientRect()\n    const xRatio = hovered / (data.length - 1)\n    return chartRect.left - sectionRect.left + xRatio * chartRect.width\n  }, [data.length, hovered])\n\n  const handleHover = useCallback((index: number | null) => {\n    setHovered(index)\n  }, [])\n\n  return (\n    <section\n      className={cn(className)}\n      data-slot=\"analytics-hero\"\n      ref={sectionRef}\n      style={{\n        position: \"relative\",\n        width: \"100%\",\n        background: \"hsl(0 0% 98%)\",\n        borderBottom: \"1px solid hsl(0 0% 88%)\",\n        overflow: \"hidden\",\n        fontFamily:\n          '\"Geist\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif',\n        WebkitFontSmoothing: \"antialiased\",\n        MozOsxFontSmoothing: \"grayscale\",\n      }}\n      {...props}\n    >\n      <div\n        data-slot=\"analytics-hero-grid\"\n        style={{\n          position: \"absolute\",\n          inset: 0,\n          maxWidth: 1080,\n          margin: \"0 auto\",\n          zIndex: 0,\n        }}\n      >\n        <AnalyticsHeroGridLines cols={12} rows={8} />\n      </div>\n      <div\n        data-slot=\"analytics-hero-chart-frame\"\n        ref={chartRef}\n        style={{\n          position: \"absolute\",\n          inset: 0,\n          zIndex: 1,\n          minHeight: 600,\n          opacity: visible ? 1 : 0,\n          transition: \"opacity 800ms 200ms cubic-bezier(0.23,1,0.32,1)\",\n        }}\n      >\n        <AnalyticsHeroChart\n          data={data}\n          hovered={hovered}\n          onHover={handleHover}\n        />\n      </div>\n      {lineX !== null ? (\n        <div\n          aria-hidden=\"true\"\n          data-slot=\"analytics-hero-hover-line\"\n          style={{\n            position: \"absolute\",\n            left: lineX,\n            top: 0,\n            bottom: 0,\n            width: 1,\n            background: \"hsl(0 0% 12%)\",\n            zIndex: 20,\n            pointerEvents: \"none\",\n            transition: \"left 60ms cubic-bezier(0.23,1,0.32,1)\",\n          }}\n        />\n      ) : null}\n      {hovered !== null ? (\n        <div\n          aria-hidden\n          className=\"pointer-events-none absolute inset-0 z-15\"\n          data-slot=\"analytics-hero-tooltip-layer\"\n        >\n          <AnalyticsHeroTooltip\n            containerRef={chartRef}\n            data={data}\n            index={hovered}\n            sectionRef={sectionRef}\n          />\n        </div>\n      ) : null}\n      <div\n        data-slot=\"analytics-hero-content\"\n        style={{\n          position: \"relative\",\n          zIndex: 10,\n          maxWidth: 1080,\n          margin: \"0 auto\",\n          pointerEvents: \"none\",\n        }}\n      >\n        <div\n          className=\"grid grid-cols-1 lg:grid-cols-2\"\n          style={{ minHeight: 600 }}\n        >\n          <div className=\"pointer-events-auto w-fit max-w-full self-center justify-self-start\">\n            <AnalyticsHeroCopy\n              demoLabel={demoLabel}\n              deployLabel={deployLabel}\n              description={description}\n              title={title}\n              visible={visible}\n            />\n          </div>\n          <AnalyticsHeroVisual logs={logs} sources={sources} />\n        </div>\n      </div>\n    </section>\n  )\n}\n\nexport default AnalyticsHero\n",
      "type": "registry:ui"
    }
  ]
}