{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "heat-drain-reveal",
  "title": "Heat Drain Reveal",
  "description": "A dark launch calendar cools from heat into a dithered glow and highlights the launch day.",
  "dependencies": ["remotion", "@remotion/google-fonts"],
  "registryDependencies": ["@remocn/gsh"],
  "files": [
    {
      "path": "registry/remocn/heat-drain-reveal/index.tsx",
      "content": "\"use client\";\n\nimport { loadFont as loadOnest } from \"@remotion/google-fonts/Onest\";\nimport { useId } from \"react\";\nimport {\n  AbsoluteFill,\n  Easing,\n  interpolate,\n  random,\n  spring,\n  useCurrentFrame,\n  useVideoConfig,\n} from \"remotion\";\nimport type { GradientParams } from \"@/lib/remocn/gsh/gradient-engine\";\nimport { GshGround } from \"@/lib/remocn/gsh/gsh-ground\";\nimport type { GshPresetId } from \"@/lib/remocn/gsh/presets\";\n\nconst onest = loadOnest(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\n\nconst ENTER = Easing.bezier(0.32, 0.72, 0, 1);\nconst LIGHT = Easing.bezier(0.22, 1, 0.36, 1);\nconst MOVE = Easing.bezier(0.65, 0, 0.35, 1);\nconst DRAIN = Easing.bezier(0.55, 0, 0.45, 1);\nconst EXIT = Easing.bezier(0.55, 0, 1, 0.45);\nconst SWAY = Easing.bezier(0.45, 0, 0.55, 1);\nconst HEAVY = { mass: 1, damping: 26, stiffness: 120 };\nconst CHIP = { mass: 0.5, damping: 12, stiffness: 200 };\n\nconst B = {\n  words: -10,\n  recede: 8,\n  rise: 4,\n  drain: 24,\n  drainLen: 48,\n  tiltEnd: 78,\n  halo: 52,\n  chip: 78,\n  end: 126,\n};\n\nexport const HEAT_DRAIN_REVEAL_DURATION = B.end;\n\nconst ramp = (f: number, start: number, dur: number, easing = ENTER) =>\n  interpolate(f, [start, start + dur], [0, 1], {\n    extrapolateLeft: \"clamp\",\n    extrapolateRight: \"clamp\",\n    easing,\n  });\n\nconst mix = (a: number, b: number, t: number) => a + (b - a) * t;\nconst clamp01 = (v: number) => Math.min(1, Math.max(0, v));\n\ntype CalEvent = { day: number; label: string; launch?: boolean };\n\nexport interface HeatDrainRevealProps {\n  theme?: \"dark\" | \"light\";\n  heat?: string[];\n  accent?: string;\n  headline?: string;\n  monthLabel?: string;\n  firstDay?: number;\n  daysInPrevMonth?: number;\n  daysInMonth?: number;\n  events?: CalEvent[];\n  upcoming?: { when: string; title: string; time: string }[];\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}\n\nconst DARK_GROUND: Partial<GradientParams> = {\n  kind: \"mist\",\n  colors: [\"#ff9a5a\", \"#a8401a\", \"#3a1408\", \"#0d0604\"],\n  background: \"#060302\",\n  speed: 0.6,\n  scale: 0.9,\n  blur: 0.75,\n  grain: 0.14,\n};\n\nconst LIGHT_GROUND: Partial<GradientParams> = {\n  kind: \"mist\",\n  colors: [\"#ffd9b0\", \"#ffb47a\", \"#fbeee2\", \"#e8d7c6\"],\n  background: \"#f5f1ec\",\n  speed: 0.6,\n  blur: 0.75,\n  grain: 0.18,\n};\n\nconst WEEKDAYS = [\"MON\", \"TUE\", \"WED\", \"THU\", \"FRI\", \"SAT\", \"SUN\"];\n\n// The 4×4 Bayer matrix the gsh dither-field shader uses, as a grey tile\n// holding each cell's threshold.\nconst BAYER = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5];\nconst BAYER_TILE = `data:image/svg+xml,${encodeURIComponent(\n  `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 4 4\" shape-rendering=\"crispEdges\">${BAYER.map(\n    (b, i) => {\n      const t = Math.round(((b + 0.5) / 16) * 255);\n      return `<rect x=\"${i % 4}\" y=\"${Math.floor(i / 4)}\" width=\"1\" height=\"1\" fill=\"rgb(${t},${t},${t})\"/>`;\n    },\n  ).join(\"\")}</svg>`,\n)}`;\n\n/**\n * Ordered dither on the light's alpha, the dither-field look in CSS: alpha is\n * snapped to `levels` steps with a Bayer threshold, so a smooth falloff turns\n * into fine cells while its average stays put. Solid light passes untouched.\n * `amount` mixes the cells back over the smooth light.\n */\nfunction DitherFilter({\n  id,\n  cell,\n  levels,\n  amount,\n}: {\n  id: string;\n  cell: number;\n  levels: number;\n  amount: number;\n}) {\n  const table = Array.from({ length: levels + 1 }, (_, k) =>\n    (k / levels).toFixed(4),\n  ).join(\" \");\n  return (\n    <svg width={0} height={0} aria-hidden style={{ position: \"absolute\" }}>\n      <filter\n        id={id}\n        x=\"0\"\n        y=\"0\"\n        width=\"100%\"\n        height=\"100%\"\n        colorInterpolationFilters=\"sRGB\"\n      >\n        <feImage\n          href={BAYER_TILE}\n          x={0}\n          y={0}\n          width={cell * 4}\n          height={cell * 4}\n          preserveAspectRatio=\"none\"\n          result=\"tile\"\n        />\n        <feTile in=\"tile\" result=\"bayer\" />\n        {/* Alpha into grey, nudged so the blur's ~0.98 rim at the card edge stays solid. */}\n        <feColorMatrix\n          in=\"SourceGraphic\"\n          values=\"0 0 0 1.06 0  0 0 0 1.06 0  0 0 0 1.06 0  0 0 0 0 1\"\n          result=\"alpha\"\n        />\n        {/* (levels·a + t) / (levels + 1), so the step table reads floor(levels·a + t). */}\n        <feComposite\n          in=\"alpha\"\n          in2=\"bayer\"\n          operator=\"arithmetic\"\n          k2={levels / (levels + 1)}\n          k3={1 / (levels + 1)}\n          result=\"sum\"\n        />\n        <feColorMatrix\n          in=\"sum\"\n          values=\"0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  1 0 0 0 0\"\n          result=\"lift\"\n        />\n        <feComponentTransfer in=\"lift\" result=\"steps\">\n          <feFuncA type=\"discrete\" tableValues={table} />\n        </feComponentTransfer>\n        <feColorMatrix\n          in=\"SourceGraphic\"\n          values=\"1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 0 1\"\n          result=\"solid\"\n        />\n        <feComposite in=\"solid\" in2=\"steps\" operator=\"in\" result=\"cells\" />\n        <feComposite\n          in=\"cells\"\n          in2=\"SourceGraphic\"\n          operator=\"arithmetic\"\n          k2={amount}\n          k3={1 - amount}\n        />\n      </filter>\n    </svg>\n  );\n}\n\nfunction Chevron({\n  size,\n  color,\n  flip,\n}: {\n  size: number;\n  color: string;\n  flip?: boolean;\n}) {\n  return (\n    <svg\n      viewBox=\"0 0 24 24\"\n      width={size}\n      height={size}\n      aria-hidden\n      style={{ transform: flip ? \"scaleX(-1)\" : undefined }}\n    >\n      <path\n        d=\"m9 6 6 6-6 6\"\n        fill=\"none\"\n        stroke={color}\n        strokeWidth={1.5}\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n      />\n    </svg>\n  );\n}\n\nexport function HeatDrainReveal({\n  theme = \"dark\",\n  heat = [\"#fff1df\", \"#ffc48a\", \"#ff9447\", \"#f56a22\", \"#d9481a\"],\n  accent = \"#ff7a2e\",\n  headline = \"Plan the whole launch week.\",\n  monthLabel = \"2026 / 11\",\n  firstDay = 26,\n  daysInPrevMonth = 31,\n  daysInMonth = 30,\n  events = [\n    { day: 4, label: \"Beta\" },\n    { day: 10, label: \"Docs\" },\n    { day: 13, label: \"Press\" },\n    { day: 19, label: \"Launch\", launch: true },\n    { day: 24, label: \"Recap\" },\n  ],\n  upcoming = [\n    { when: \"Thu 19\", title: \"Launch day\", time: \"09:00\" },\n    { when: \"Fri 13\", title: \"Press preview\", time: \"14:30\" },\n    { when: \"Tue 24\", title: \"Launch recap\", time: \"11:00\" },\n  ],\n  ground,\n  groundParams,\n}: HeatDrainRevealProps) {\n  const frame = useCurrentFrame();\n  const { width, height, fps } = useVideoConfig();\n  const dark = theme === \"dark\";\n  const ditherId = `hdr-dither-${useId().replace(/[^a-zA-Z0-9]/g, \"\")}`;\n  const portrait = height > width * 1.2;\n  const stageW = portrait ? 1080 : 1280;\n  const stageH = portrait ? 1920 : 720;\n  const sc = width / stageW;\n\n  const u = portrait ? 1.48 : 1.12;\n  const cw = (portrait ? 650 : 640) * u;\n  const pad = 28 * u;\n  const headerH = 64 * u;\n  const weekH = 34 * u;\n  const cellH = (portrait ? 80 : 74) * u;\n  const gridH = cellH * 5;\n  const upH = portrait ? 262 * u : 0;\n  const ch = pad + headerH + weekH + gridH + upH + pad * 0.7;\n  const radius = 24 * u;\n\n  const ink = dark ? \"#f6efe8\" : \"#1b1612\";\n  const muted = dark ? \"rgba(246,236,226,0.5)\" : \"rgba(27,22,18,0.46)\";\n  const faint = dark ? \"rgba(246,236,226,0.26)\" : \"rgba(27,22,18,0.24)\";\n  const hair = dark ? \"rgba(255,240,226,0.09)\" : \"rgba(60,40,20,0.09)\";\n\n  const rise = spring({ frame: frame - B.rise, fps, config: HEAVY });\n  const tilt = mix(24, 0, ramp(frame, B.rise, B.tiltEnd - B.rise, MOVE));\n  const drain = ramp(frame, B.drain, B.drainLen, DRAIN);\n  const feather = 84 * u;\n  const front = mix(-feather * 0.6, ch + feather, drain);\n  const halo = ramp(frame, B.halo, 30, LIGHT);\n  const breathe = 0.9 + 0.1 * Math.sin(((frame - B.halo) / 36) * Math.PI);\n  const recede = ramp(frame, B.recede, 14, EXIT);\n  const lift = spring({ frame: frame - B.recede, fps, config: HEAVY });\n  const push = 1 + 0.03 * ramp(frame, B.rise + 20, B.end - B.rise - 20, SWAY);\n  const chipS = spring({ frame: frame - B.chip, fps, config: CHIP });\n  const chipOn = ramp(frame, B.chip, 4);\n\n  const reveal = (y: number) => clamp01((front - y) / (feather * 0.55));\n  const rowStyle = (y: number) => {\n    const p = reveal(y);\n    return {\n      opacity: mix(0.15, 1, p),\n      filter: p < 1 ? `blur(${(1 - p) * 5 * u}px)` : undefined,\n      transform: `translateY(${(1 - p) * 8 * u}px)`,\n    };\n  };\n\n  const bands = Array.from({ length: 16 }).map((_, i) => {\n    const h = 0.04 + random(`hb-h-${i}`) * 0.08;\n    const a = Math.floor(random(`hb-a-${i}`) * 3);\n    const b = 1 + Math.floor(random(`hb-b-${i}`) * (heat.length - 1));\n    const stop = 25 + random(`hb-s-${i}`) * 50;\n    const drift = (random(`hb-d-${i}`) - 0.5) * 40;\n    return { h, a, b, stop, drift };\n  });\n  const bandSum = bands.reduce((s, b) => s + b.h, 0);\n\n  const grid: { day: number; inMonth: boolean }[] = [];\n  for (let i = 0; i < 35; i++) {\n    const d = firstDay + i;\n    if (d <= daysInPrevMonth) grid.push({ day: d, inMonth: false });\n    else {\n      const m = d - daysInPrevMonth;\n      grid.push({ day: m, inMonth: m <= daysInMonth });\n    }\n  }\n\n  const resolvedGround: GshPresetId = ground ?? (dark ? \"hearth\" : \"glasswork\");\n  const resolvedParams = groundParams ?? (dark ? DARK_GROUND : LIGHT_GROUND);\n\n  const surface = dark\n    ? \"linear-gradient(180deg, #1d1814 0%, #120f0c 100%)\"\n    : \"linear-gradient(180deg, #ffffff 0%, #fcfaf8 100%)\";\n\n  const headerY = pad;\n  const weekY = pad + headerH;\n  const gridY = weekY + weekH;\n  const upY = gridY + gridH + 18 * u;\n\n  const cardTop = stageH / 2 - ch / 2 + (portrait ? 110 : 0);\n  const riseY = mix(stageH * 0.75, 0, rise);\n\n  return (\n    <AbsoluteFill style={{ fontFamily: onest.fontFamily, overflow: \"hidden\" }}>\n      <GshGround\n        preset={resolvedGround}\n        params={resolvedParams}\n        timeOffset={3}\n        timeScale={0.5}\n      />\n      <AbsoluteFill\n        style={{\n          background: dark ? \"#070403\" : \"#f7f3ee\",\n          opacity: dark ? 0.3 : 0.22,\n        }}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          left: 0,\n          top: 0,\n          width: stageW,\n          height: stageH,\n          transform: `scale(${sc})`,\n          transformOrigin: \"0 0\",\n        }}\n      >\n        <div\n          style={{\n            position: \"absolute\",\n            inset: 0,\n            transform: `scale(${push})`,\n            transformOrigin: \"50% 50%\",\n            perspective: 1700 * u,\n          }}\n        >\n          <div\n            style={{\n              position: \"absolute\",\n              left: 0,\n              right: 0,\n              top: portrait ? stageH * 0.42 : stageH * 0.44,\n              display: \"flex\",\n              justifyContent: \"center\",\n              flexWrap: \"wrap\",\n              padding: `0 ${stageW * 0.08}px`,\n              fontSize: portrait ? 96 : 60,\n              fontWeight: 300,\n              letterSpacing: \"-0.035em\",\n              lineHeight: 1.08,\n              color: ink,\n              opacity: portrait ? 1 : 1 - recede,\n              filter:\n                !portrait && recede > 0 ? `blur(${recede * 14}px)` : undefined,\n              transformOrigin: \"50% 0%\",\n              transform: portrait\n                ? `translateY(${mix(0, 190 - stageH * 0.42, lift)}px) scale(${mix(1, 0.6, lift)})`\n                : `scale(${mix(1, 0.88, recede)}) translateY(${-recede * 30}px)`,\n            }}\n          >\n            {headline.split(\" \").map((w, i) => {\n              const p = ramp(frame, B.words + i * 2, 14);\n              return (\n                <span\n                  key={`${w}-${i.toString()}`}\n                  style={{\n                    display: \"inline-block\",\n                    overflow: \"hidden\",\n                    paddingBottom: \"0.12em\",\n                    marginBottom: \"-0.12em\",\n                    marginRight: \"0.24em\",\n                  }}\n                >\n                  <span\n                    style={{\n                      display: \"inline-block\",\n                      transform: `translateY(${mix(105, 0, p)}%)`,\n                      filter: p < 1 ? `blur(${(1 - p) * 6}px)` : undefined,\n                    }}\n                  >\n                    {w}\n                  </span>\n                </span>\n              );\n            })}\n          </div>\n\n          <div\n            style={{\n              position: \"absolute\",\n              left: stageW / 2 - cw / 2,\n              top: cardTop,\n              width: cw,\n              height: ch,\n              transform: `translateY(${riseY}px) rotateX(${tilt}deg)`,\n              transformOrigin: \"50% 100%\",\n            }}\n          >\n            <div\n              style={{\n                position: \"absolute\",\n                left: -cw * 0.24,\n                right: -cw * 0.24,\n                bottom: -ch * 0.3,\n                height: ch * 0.5,\n                borderRadius: \"50%\",\n                background: `radial-gradient(50% 50% at 50% 50%, ${heat[2]} 0%, color-mix(in oklab, ${heat[3]} 70%, transparent) 38%, transparent 72%)`,\n                filter: `blur(${34 * u}px)`,\n                opacity: halo * breathe * (dark ? 1 : 0.8),\n                transform: `scale(${mix(0.6, 1, halo)})`,\n              }}\n            />\n            <div\n              style={{\n                position: \"absolute\",\n                inset: 0,\n                borderRadius: radius,\n                overflow: \"hidden\",\n                background: surface,\n                border: `1px solid ${hair}`,\n                boxShadow: dark\n                  ? `inset 0 1px 0 rgba(255,240,226,0.07), 0 2px 6px rgba(0,0,0,0.35), 0 ${30 * u}px ${70 * u}px rgba(10,4,0,0.55)`\n                  : `inset 0 1px 0 #fff, 0 1px 2px rgba(60,30,10,0.06), 0 ${20 * u}px ${44 * u}px rgba(80,40,10,0.12), 0 ${60 * u}px ${110 * u}px rgba(120,60,20,0.12)`,\n              }}\n            >\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: pad,\n                  right: pad,\n                  top: headerY,\n                  height: headerH,\n                  display: \"flex\",\n                  alignItems: \"flex-start\",\n                  justifyContent: \"space-between\",\n                  color: ink,\n                  ...rowStyle(headerY + headerH / 2),\n                }}\n              >\n                <div\n                  style={{\n                    fontSize: 32 * u,\n                    letterSpacing: \"-0.03em\",\n                    lineHeight: 1,\n                  }}\n                >\n                  {monthLabel}\n                </div>\n                <div\n                  style={{ display: \"flex\", alignItems: \"center\", gap: 8 * u }}\n                >\n                  <div\n                    style={{\n                      padding: `${6 * u}px ${12 * u}px`,\n                      borderRadius: 99,\n                      border: `1px solid ${hair}`,\n                      fontSize: 16 * u,\n                      color: ink,\n                    }}\n                  >\n                    Today\n                  </div>\n                  <Chevron size={22 * u} color={muted} flip />\n                  <Chevron size={22 * u} color={muted} />\n                </div>\n              </div>\n\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: pad,\n                  right: pad,\n                  top: weekY,\n                  height: weekH,\n                  display: \"grid\",\n                  gridTemplateColumns: \"repeat(7, 1fr)\",\n                  fontSize: 15 * u,\n                  color: muted,\n                  ...rowStyle(weekY + weekH / 2),\n                }}\n              >\n                {WEEKDAYS.map((d) => (\n                  <div key={d} style={{ paddingLeft: 8 * u }}>\n                    {d}\n                  </div>\n                ))}\n              </div>\n\n              {Array.from({ length: 5 }).map((_, row) => {\n                const y = gridY + row * cellH;\n                return (\n                  <div\n                    key={`row-${row.toString()}`}\n                    style={{\n                      position: \"absolute\",\n                      left: pad,\n                      right: pad,\n                      top: y,\n                      height: cellH,\n                      display: \"grid\",\n                      gridTemplateColumns: \"repeat(7, 1fr)\",\n                      borderTop: `1px solid ${hair}`,\n                      ...rowStyle(y + cellH / 2),\n                    }}\n                  >\n                    {grid.slice(row * 7, row * 7 + 7).map((c, col) => {\n                      const ev = c.inMonth\n                        ? events.find((e) => e.day === c.day)\n                        : undefined;\n                      const isLaunch = Boolean(ev?.launch);\n                      return (\n                        <div\n                          key={`c-${row.toString()}-${col.toString()}`}\n                          style={{\n                            position: \"relative\",\n                            padding: `${8 * u}px ${8 * u}px`,\n                            display: \"flex\",\n                            flexDirection: \"column\",\n                            gap: 6 * u,\n                          }}\n                        >\n                          <div\n                            style={{\n                              position: \"relative\",\n                              width: 34 * u,\n                              height: 30 * u,\n                              display: \"flex\",\n                              alignItems: \"center\",\n                              justifyContent: \"center\",\n                              marginLeft: -2 * u,\n                            }}\n                          >\n                            {isLaunch ? (\n                              <div\n                                style={{\n                                  position: \"absolute\",\n                                  inset: 0,\n                                  borderRadius: 9 * u,\n                                  background: `linear-gradient(180deg, ${heat[2]} 0%, ${accent} 100%)`,\n                                  boxShadow: `inset 0 1px 0 rgba(255,255,255,0.35), 0 ${6 * u}px ${16 * u}px color-mix(in oklab, ${accent} 45%, transparent)`,\n                                  opacity: chipOn,\n                                  transform: `scale(${mix(0.4, 1, chipS)})`,\n                                }}\n                              />\n                            ) : null}\n                            <span\n                              style={{\n                                position: \"relative\",\n                                fontSize: 18 * u,\n                                fontVariantNumeric: \"tabular-nums\",\n                                color:\n                                  isLaunch && chipOn > 0.5\n                                    ? \"#fff\"\n                                    : c.inMonth\n                                      ? col > 4\n                                        ? muted\n                                        : ink\n                                      : faint,\n                              }}\n                            >\n                              {c.day}\n                            </span>\n                          </div>\n                          {ev ? (\n                            <div\n                              style={{\n                                display: \"flex\",\n                                alignItems: \"center\",\n                                gap: 5 * u,\n                                fontSize: 15 * u,\n                                padding: `${3 * u}px ${7 * u}px`,\n                                borderRadius: 6 * u,\n                                alignSelf: \"flex-start\",\n                                color: isLaunch ? accent : ink,\n                                background: isLaunch\n                                  ? `color-mix(in oklab, ${accent} ${Math.round(16 * chipOn)}%, transparent)`\n                                  : dark\n                                    ? \"rgba(255,240,226,0.06)\"\n                                    : \"rgba(60,40,20,0.05)\",\n                                opacity: isLaunch\n                                  ? ramp(frame, B.chip + 4, 8)\n                                  : 1,\n                              }}\n                            >\n                              <div\n                                style={{\n                                  width: 2 * u,\n                                  height: 12 * u,\n                                  borderRadius: 1,\n                                  background: isLaunch ? accent : muted,\n                                }}\n                              />\n                              {ev.label}\n                            </div>\n                          ) : null}\n                        </div>\n                      );\n                    })}\n                  </div>\n                );\n              })}\n\n              {portrait ? (\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: pad,\n                    right: pad,\n                    top: upY,\n                    display: \"flex\",\n                    flexDirection: \"column\",\n                  }}\n                >\n                  <div\n                    style={{\n                      fontSize: 16 * u,\n                      color: muted,\n                      paddingBottom: 10 * u,\n                      ...rowStyle(upY + 12 * u),\n                    }}\n                  >\n                    Upcoming\n                  </div>\n                  {upcoming.map((e, i) => {\n                    const y = upY + 40 * u + i * 64 * u;\n                    const first = i === 0;\n                    return (\n                      <div\n                        key={e.title}\n                        style={{\n                          display: \"flex\",\n                          alignItems: \"center\",\n                          gap: 14 * u,\n                          height: 64 * u,\n                          borderTop: `1px solid ${hair}`,\n                          fontSize: 19 * u,\n                          color: ink,\n                          ...rowStyle(y + 32 * u),\n                        }}\n                      >\n                        <div\n                          style={{\n                            width: 4 * u,\n                            height: 28 * u,\n                            borderRadius: 2 * u,\n                            background: first ? accent : muted,\n                          }}\n                        />\n                        <div style={{ width: 92 * u, color: muted }}>\n                          {e.when}\n                        </div>\n                        <div style={{ flex: 1 }}>{e.title}</div>\n                        <div\n                          style={{\n                            color: muted,\n                            fontVariantNumeric: \"tabular-nums\",\n                          }}\n                        >\n                          {e.time}\n                        </div>\n                      </div>\n                    );\n                  })}\n                </div>\n              ) : null}\n\n              <DitherFilter\n                id={ditherId}\n                cell={2}\n                levels={dark ? 5 : 3}\n                amount={dark ? 0.7 : 0.9}\n              />\n              <div\n                style={{\n                  position: \"absolute\",\n                  inset: 0,\n                  filter:\n                    drain > 0 && drain < 1 ? `url(#${ditherId})` : undefined,\n                  opacity: drain >= 1 ? 0 : 0.94,\n                }}\n              >\n                <div\n                  style={{\n                    position: \"absolute\",\n                    inset: 0,\n                    maskImage: `linear-gradient(180deg, transparent ${front - feather * 0.45}px, black ${front}px)`,\n                    WebkitMaskImage: `linear-gradient(180deg, transparent ${front - feather * 0.45}px, black ${front}px)`,\n                  }}\n                >\n                  <div\n                    style={{\n                      position: \"absolute\",\n                      inset: -20 * u,\n                      display: \"flex\",\n                      flexDirection: \"column\",\n                      filter: `blur(${9 * u}px)`,\n                    }}\n                  >\n                    {bands.map((b, i) => (\n                      <div\n                        key={`band-${i.toString()}`}\n                        style={{\n                          height: `${(b.h / bandSum) * 100}%`,\n                          background: `linear-gradient(90deg, ${heat[b.a]} 0%, ${heat[b.b]} ${b.stop + b.drift * (frame / 60)}%, ${heat[Math.max(0, b.a - 1)]} 100%)`,\n                        }}\n                      />\n                    ))}\n                  </div>\n                </div>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 0,\n                    right: 0,\n                    top: front - feather * 1.1,\n                    height: feather * 1.3,\n                    background: `linear-gradient(180deg, transparent 0%, color-mix(in oklab, ${heat[0]} ${dark ? 62 : 60}%, transparent) 64%, color-mix(in oklab, ${heat[0]} ${dark ? 70 : 55}%, transparent) 84%, transparent 100%)`,\n                    filter: `blur(${8 * u}px)`,\n                    opacity: drain > 0 && drain < 1 ? 1 : 0,\n                  }}\n                />\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </AbsoluteFill>\n  );\n}\n\nexport default HeatDrainReveal;\n",
      "type": "registry:component",
      "target": "components/remocn/heat-drain-reveal.tsx"
    }
  ],
  "type": "registry:component"
}
