{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "app-store-listing",
  "title": "App Store Listing",
  "description": "A phone app store listing with ratings and screenshot carousel gets an Open button.",
  "dependencies": ["remotion", "@remotion/google-fonts"],
  "registryDependencies": ["@remocn/gsh"],
  "files": [
    {
      "path": "registry/remocn/app-store-listing/index.tsx",
      "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Onest\";\nimport type React from \"react\";\nimport { useId } from \"react\";\nimport {\n  AbsoluteFill,\n  Easing,\n  Img,\n  interpolate,\n  interpolateColors,\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 { fontFamily } = loadFont(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\n\nexport interface AppScreenshot {\n  title: string;\n  src?: string;\n}\n\nexport interface AppStoreListingProps {\n  appName?: string;\n  subtitle?: string;\n  developer?: string;\n  iconSrc?: string;\n  rating?: number;\n  ratingCount?: string;\n  ageRating?: string;\n  category?: string;\n  chartRank?: number;\n  award?: string | null;\n  screenshots?: AppScreenshot[];\n  accent?: string;\n  speed?: number;\n  theme?: \"light\" | \"dark\";\n  lines?: string[];\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}\n\nconst SW = 390;\nconst SH = 844;\nconst BEZEL = 12;\nconst BW = SW + BEZEL * 2;\nconst BH = SH + BEZEL * 2;\n\nconst ICON = 118;\nconst HEAD_Y = 106;\nconst COL_X = 20 + ICON + 16;\nconst GET_Y = HEAD_Y + ICON - 30;\nconst GET_W = 76;\nconst STRIP_Y = 250;\nconst STRIP_H = 84;\nconst CELL_W = 106;\nconst SHOT_Y = STRIP_Y + STRIP_H + 18;\nconst SHOT_W = 188;\nconst SHOT_H = 406;\nconst SHOT_GAP = 10;\nconst PAGE = SHOT_W + SHOT_GAP;\nconst TAB_H = 83;\n\nconst T_TAP = 40;\nconst T_SPIN = T_TAP + 9;\nconst T_PROG = 64;\nconst T_DONE = 150;\nconst DRAG = [\n  { down: 104, up: 115, settle: 127, from: 0 },\n  { down: 131, up: 141, settle: 153, from: PAGE },\n];\n\nconst LINE_AT = [0, T_TAP + 6, DRAG[0].down - 8, T_DONE];\n\nconst tween = (f: number, a: number, b: number, easing = enterE) =>\n  interpolate(f, [a, b], [0, 1], {\n    extrapolateLeft: \"clamp\",\n    extrapolateRight: \"clamp\",\n    easing,\n  });\nconst clamp = { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" } as const;\nconst enterE = Easing.bezier(0.22, 1, 0.36, 1);\nconst exitE = Easing.bezier(0.55, 0, 1, 0.45);\nconst moveE = Easing.bezier(0.65, 0, 0.35, 1);\nconst camE = Easing.bezier(0.87, 0, 0.13, 1);\nconst morph = moveE;\n\ntype SpringCfg = { mass?: number; damping: number; stiffness?: number };\nconst HEAVY: SpringCfg = { mass: 1, damping: 26, stiffness: 120 };\nconst CARD: SpringCfg = { mass: 0.8, damping: 18, stiffness: 160 };\nconst CHIP: SpringCfg = { mass: 0.5, damping: 12, stiffness: 200 };\nconst MORPH: SpringCfg = { damping: 200 };\n\nconst REMOCN_R_PATH =\n  \"M 0.01 0.81 C 0.01 1.73, 0.36 2.79, 1.09 4.13 C 4.91 11.04, 13.45 17.16, 21.7 18.9 C 22.94 19.16, 23.18 19.16, 51.39 19.27 C 76.07 19.36, 80.02 19.4, 81.32 19.57 C 89.89 20.69, 96.2 24.68, 99.38 31.01 C 103.19 38.56, 102.53 50.1, 97.91 57.07 C 94.66 61.96, 89.68 64.99, 83.26 66 C 82.81 66.07, 70.18 66.83, 55.2 67.69 C 24.82 69.43, 27.03 69.23, 24.18 70.4 C 19.9 72.15, 14.84 75.7, 10.65 79.89 C 4.86 85.68, 1.3 91.91, 0.25 98.13 C 0.12 98.85, 0.08 103.13, 0.04 116.66 L 0 134.26 9.5 134.26 L 19 134.26 19.05 119.41 C 19.1 103.27, 19.08 103.82, 19.82 101.04 C 21.79 93.65, 27.86 88.75, 36.45 87.63 C 37.23 87.53, 39.41 87.5, 43.57 87.53 C 50.12 87.59, 50.75 87.65, 53.22 88.45 C 56.61 89.56, 59.67 91.86, 62.02 95.07 C 62.52 95.76, 69.35 103.85, 77.2 113.07 C 85.04 122.28, 91.63 130.04, 91.85 130.32 C 92.07 130.59, 92.5 131.34, 92.82 131.97 C 93.52 133.35, 94.11 133.93, 95.06 134.13 C 95.5 134.23, 98.97 134.26, 106.36 134.23 L 117.01 134.19 100.82 113.07 C 91.91 101.45, 84.52 91.78, 84.39 91.57 C 83.36 89.89, 83.66 87.53, 85.09 86 C 85.79 85.25, 86.36 84.94, 88.07 84.38 C 96.18 81.72, 104.15 76.62, 109.97 70.36 C 120.59 58.93, 124.06 44.32, 119.44 30.43 C 114.59 15.81, 101.93 4.02, 87.64 0.83 C 83.93 0.01, 88.09 0.08, 41.85 0.04 L 0.01 0 0.01 0.81 Z\";\n\nconst LIGHT = {\n  stage: \"#EEF0F5\",\n  scrim: \"rgba(246,246,248,0.2)\",\n  copy: \"#121216\",\n  copyMuted: \"rgba(18,18,22,0.42)\",\n  screen: \"#ffffff\",\n  text: \"#111113\",\n  muted: \"#8a8a8e\",\n  hair: \"rgba(60,60,67,0.16)\",\n  track: \"#e3e3e8\",\n  blue: \"#007AFF\",\n  tab: \"rgba(250,250,250,0.94)\",\n  tabIdle: \"#99999e\",\n  iconRing: \"rgba(0,0,0,0.08)\",\n  touch: \"rgba(20,20,30,0.18)\",\n  phoneShadow:\n    \"0 50px 90px -20px rgba(30,34,60,0.35), 0 12px 28px rgba(30,32,40,0.12), 0 2px 6px rgba(30,32,40,0.08)\",\n};\nconst DARK: typeof LIGHT = {\n  stage: \"#03050B\",\n  scrim: \"rgba(2,3,8,0.25)\",\n  copy: \"#F4F5F8\",\n  copyMuted: \"rgba(244,245,248,0.42)\",\n  screen: \"#000000\",\n  text: \"#f5f5f7\",\n  muted: \"#8d8d93\",\n  hair: \"rgba(255,255,255,0.12)\",\n  track: \"#3a3a3c\",\n  blue: \"#0A84FF\",\n  tab: \"rgba(22,22,24,0.94)\",\n  tabIdle: \"#7c7c82\",\n  iconRing: \"rgba(255,255,255,0.1)\",\n  touch: \"rgba(255,255,255,0.2)\",\n  phoneShadow:\n    \"0 50px 100px -10px rgba(0,0,0,0.7), 0 12px 30px rgba(0,0,0,0.45)\",\n};\ntype Palette = typeof LIGHT;\n\nconst PATH = {\n  back: \"M15 18l-6-6 6-6\",\n  share:\n    \"M12 14V3M8 7l4-4 4 4M7 10H6a2 2 0 00-2 2v7a2 2 0 002 2h12a2 2 0 002-2v-7a2 2 0 00-2-2h-1\",\n  star: \"M12 2.6l2.85 5.95 6.55.85-4.8 4.55 1.22 6.5L12 17.3l-5.82 3.15 1.22-6.5-4.8-4.55 6.55-.85z\",\n  person: \"M12 12a4 4 0 100-8 4 4 0 000 8zM4.5 21a7.5 7.5 0 0115 0\",\n  today:\n    \"M5 4h14a1 1 0 011 1v14a1 1 0 01-1 1H5a1 1 0 01-1-1V5a1 1 0 011-1zM8 9h8M8 13h8M8 17h4\",\n  games:\n    \"M6 9h12a4 4 0 014 4v1a3 3 0 01-5.4 1.8L15.5 14h-7l-1.1 1.8A3 3 0 012 14v-1a4 4 0 014-4zM7.5 11v3M6 12.5h3M16 12h.01M18 13.5h.01\",\n  apps: \"M12 3l9 4.5-9 4.5-9-4.5zM3 12l9 4.5 9-4.5M3 16.5L12 21l9-4.5\",\n  updates: \"M12 4v11M7.5 10.5L12 15l4.5-4.5M5 20h14\",\n  search: \"M10.5 4a6.5 6.5 0 110 13 6.5 6.5 0 010-13zM20 20l-4.8-4.8\",\n  play: \"M9 6.5v11l9-5.5z\",\n};\n\nconst DEFAULT_SHOTS: AppScreenshot[] = [\n  { title: \"Launch videos, written in React\" },\n  { title: \"Drop in your own screenshots\" },\n  { title: \"Render with one command\" },\n  { title: \"Own every single frame\" },\n];\n\nfunction Glyph({\n  d,\n  size = 24,\n  color,\n  sw = 1.75,\n  fill = \"none\",\n}: {\n  d: string;\n  size?: number;\n  color: string;\n  sw?: number;\n  fill?: string;\n}) {\n  return (\n    <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n      <path\n        d={d}\n        fill={fill}\n        stroke={color}\n        strokeWidth={sw}\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n      />\n    </svg>\n  );\n}\n\nfunction Stars({\n  rating,\n  size,\n  color,\n  track,\n}: {\n  rating: number;\n  size: number;\n  color: string;\n  track: string;\n}) {\n  const id = `st${useId().replace(/[^a-zA-Z0-9_-]/g, \"\")}`;\n  const w = size * 5 + 2 * 4;\n  return (\n    <svg width={w} height={size} viewBox={`0 0 ${w} ${size}`}>\n      <defs>\n        <clipPath id={id}>\n          <rect width={(rating / 5) * w} height={size} />\n        </clipPath>\n      </defs>\n      {[0, 1].map((layer) => (\n        <g key={layer} clipPath={layer ? `url(#${id})` : undefined}>\n          {[0, 1, 2, 3, 4].map((i) => (\n            <path\n              key={i}\n              d={PATH.star}\n              transform={`translate(${i * (size + 2)} 0) scale(${size / 24})`}\n              fill={layer ? color : track}\n            />\n          ))}\n        </g>\n      ))}\n    </svg>\n  );\n}\n\nfunction StatusBar({ color }: { color: string }) {\n  return (\n    <div\n      style={{\n        position: \"absolute\",\n        top: 0,\n        left: 0,\n        right: 0,\n        height: 54,\n        display: \"flex\",\n        alignItems: \"center\",\n        justifyContent: \"space-between\",\n        padding: \"4px 30px 0 52px\",\n        zIndex: 30,\n      }}\n    >\n      <span style={{ fontSize: 17, fontWeight: 400, color }}>9:41</span>\n      <div style={{ display: \"flex\", gap: 6, alignItems: \"center\" }}>\n        <svg width=\"18\" height=\"12\" viewBox=\"0 0 18 12\">\n          {[0, 1, 2, 3].map((i) => (\n            <rect\n              key={i}\n              x={i * 4.6}\n              y={9 - i * 3}\n              width={3.2}\n              height={3 + i * 3}\n              rx={0.8}\n              fill={color}\n            />\n          ))}\n        </svg>\n        <svg width=\"17\" height=\"12\" viewBox=\"0 0 17 12\">\n          <path\n            d=\"M8.5 11.5l2.4-2.9a3.6 3.6 0 00-4.8 0zM3.7 6.2a7 7 0 019.6 0l1.6-1.9a9.6 9.6 0 00-12.8 0zM.5 2.9a12 12 0 0116 0\"\n            fill={color}\n            stroke={color}\n            strokeWidth={0.6}\n          />\n        </svg>\n        <div\n          style={{\n            width: 26,\n            height: 12.5,\n            borderRadius: 4,\n            border: `1px solid ${color}`,\n            padding: 1.5,\n            boxSizing: \"border-box\",\n          }}\n        >\n          <div\n            style={{\n              width: \"80%\",\n              height: \"100%\",\n              borderRadius: 2,\n              background: color,\n            }}\n          />\n        </div>\n      </div>\n    </div>\n  );\n}\n\nfunction Phone({\n  children,\n  screen,\n  home,\n}: {\n  children: React.ReactNode;\n  screen: string;\n  home: string;\n}) {\n  const side = (s: \"left\" | \"right\", top: number, h: number) => (\n    <div\n      style={{\n        position: \"absolute\",\n        [s]: -2.5,\n        top,\n        width: 4,\n        height: h,\n        borderRadius: 2,\n        background: \"linear-gradient(90deg,#6f6f75,#d6d6db 50%,#6f6f75)\",\n      }}\n    />\n  );\n  return (\n    <div style={{ position: \"relative\", width: BW, height: BH }}>\n      {side(\"left\", 168, 30)}\n      {side(\"left\", 226, 60)}\n      {side(\"left\", 298, 60)}\n      {side(\"right\", 258, 96)}\n      <div\n        style={{\n          position: \"absolute\",\n          inset: 0,\n          borderRadius: 67,\n          background:\n            \"linear-gradient(140deg,#e4e4e8 0%,#8a8a91 16%,#cfcfd4 38%,#77777e 62%,#c8c8cd 84%,#8b8b91 100%)\",\n          boxShadow: \"inset 0 0 0 1px rgba(0,0,0,0.35)\",\n        }}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          inset: 3,\n          borderRadius: 64,\n          background: \"#050506\",\n        }}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          left: BEZEL,\n          top: BEZEL,\n          width: SW,\n          height: SH,\n          borderRadius: 55,\n          overflow: \"hidden\",\n          background: screen,\n        }}\n      >\n        {children}\n        <div\n          style={{\n            position: \"absolute\",\n            top: 11,\n            left: (SW - 124) / 2,\n            width: 124,\n            height: 36,\n            borderRadius: 18,\n            background: \"#000\",\n            zIndex: 40,\n          }}\n        />\n        <div\n          style={{\n            position: \"absolute\",\n            bottom: 8,\n            left: (SW - 136) / 2,\n            width: 136,\n            height: 5,\n            borderRadius: 3,\n            background: home,\n            zIndex: 40,\n          }}\n        />\n      </div>\n    </div>\n  );\n}\n\nfunction AppIcon({\n  size,\n  accent,\n  src,\n  ring,\n}: {\n  size: number;\n  accent: string;\n  src?: string;\n  ring: string;\n}) {\n  const radius = size * 0.2237;\n  const deep = interpolateColors(0.22, [0, 1], [accent, \"#06070b\"]);\n  return (\n    <div\n      style={{\n        position: \"relative\",\n        width: size,\n        height: size,\n        borderRadius: radius,\n        overflow: \"hidden\",\n        flexShrink: 0,\n        background: `linear-gradient(170deg, ${accent} 0%, ${deep} 100%)`,\n      }}\n    >\n      {src ? (\n        <Img\n          src={src}\n          style={{ width: \"100%\", height: \"100%\", objectFit: \"cover\" }}\n        />\n      ) : (\n        <svg\n          width={size}\n          height={size}\n          viewBox=\"-62 -62 248 258\"\n          style={{ position: \"absolute\", inset: 0 }}\n        >\n          <path d={REMOCN_R_PATH} fill=\"#ffffff\" />\n        </svg>\n      )}\n      <div\n        style={{\n          position: \"absolute\",\n          inset: 0,\n          borderRadius: radius,\n          boxShadow: `inset 0 0 0 1px ${ring}`,\n        }}\n      />\n    </div>\n  );\n}\n\nfunction Laurel({ color }: { color: string }) {\n  const branch = (flip: boolean) => (\n    <g transform={flip ? \"translate(66 0) scale(-1 1)\" : undefined}>\n      <path\n        d=\"M14 6C8 11 6.5 19 10 27\"\n        fill=\"none\"\n        stroke={color}\n        strokeWidth={1.3}\n        strokeLinecap=\"round\"\n      />\n      {[0, 1, 2, 3, 4].map((i) => {\n        const t = i / 4;\n        const x = 13.2 - t * 5.8 + t * t * 2.2;\n        const y = 7 + t * 18;\n        return (\n          <ellipse\n            key={i}\n            cx={x - 2.6}\n            cy={y}\n            rx={1.6}\n            ry={3.4}\n            fill={color}\n            transform={`rotate(${-38 + t * 30} ${x - 2.6} ${y})`}\n          />\n        );\n      })}\n    </g>\n  );\n  return (\n    <svg width={82} height={34} viewBox=\"0 0 66 32\">\n      {branch(false)}\n      {branch(true)}\n    </svg>\n  );\n}\n\nfunction MockShot({\n  index,\n  title,\n  accent,\n}: {\n  index: number;\n  title: string;\n  accent: string;\n}) {\n  const kind = index % 4;\n  const bg = [\n    accent,\n    \"#EDEBE6\",\n    \"#0E0F12\",\n    interpolateColors(0.55, [0, 1], [accent, \"#05060a\"]),\n  ][kind];\n  const light = kind === 1;\n  const ink = light ? \"#16161A\" : \"#ffffff\";\n  const line = \"rgba(255,255,255,0.08)\";\n  const row = (label: string, value: string, on = false) => (\n    <div\n      key={label}\n      style={{\n        display: \"flex\",\n        justifyContent: \"space-between\",\n        padding: \"7px 0\",\n        borderTop: `1px solid ${line}`,\n        color: on ? \"#ffffff\" : \"#8d8d93\",\n        fontVariantNumeric: \"tabular-nums\",\n      }}\n    >\n      <span>{label}</span>\n      <span>{value}</span>\n    </div>\n  );\n  const screen = (() => {\n    if (kind === 0)\n      return (\n        <>\n          <div\n            style={{\n              height: 92,\n              borderRadius: 10,\n              background: interpolateColors(0.3, [0, 1], [accent, \"#0b0b0d\"]),\n              display: \"flex\",\n              alignItems: \"flex-end\",\n              padding: 8,\n              color: \"#fff\",\n              fontSize: 9,\n            }}\n          >\n            launch.mp4\n          </div>\n          <div\n            style={{\n              marginTop: 10,\n              height: 3,\n              borderRadius: 2,\n              background: \"#2a2b30\",\n            }}\n          >\n            <div\n              style={{\n                width: \"62%\",\n                height: 3,\n                borderRadius: 2,\n                background: \"#fff\",\n              }}\n            />\n          </div>\n          <div\n            style={{\n              marginTop: 6,\n              display: \"flex\",\n              justifyContent: \"space-between\",\n              fontSize: 8,\n              color: \"#8d8d93\",\n              fontVariantNumeric: \"tabular-nums\",\n            }}\n          >\n            <span>0:18</span>\n            <span>0:30</span>\n          </div>\n          <div style={{ marginTop: 10, fontSize: 9 }}>\n            {row(\"Scenes\", \"6\")}\n            {row(\"Size\", \"1080p\", true)}\n            {row(\"Frame rate\", \"30 fps\")}\n          </div>\n        </>\n      );\n    if (kind === 1)\n      return (\n        <div\n          style={{\n            display: \"grid\",\n            gridTemplateColumns: \"1fr 1fr\",\n            gap: 6,\n          }}\n        >\n          {[0.18, 0.32, 0.46, 0.6].map((t) => (\n            <div\n              key={t}\n              style={{\n                height: 78,\n                borderRadius: 8,\n                background: interpolateColors(t, [0, 1], [\"#3a3b40\", accent]),\n              }}\n            />\n          ))}\n        </div>\n      );\n    if (kind === 2)\n      return (\n        <div\n          style={{\n            display: \"flex\",\n            flexDirection: \"column\",\n            gap: 6,\n            fontSize: 8.5,\n            color: \"#d4d4d8\",\n            fontVariantNumeric: \"tabular-nums\",\n          }}\n        >\n          <span>$ npx remotion render</span>\n          <span style={{ color: \"#8d8d93\" }}>Bundled in 1.2s</span>\n          <span>Rendered 248 / 300</span>\n          <div style={{ height: 3, borderRadius: 2, background: \"#2a2b30\" }}>\n            <div\n              style={{\n                width: \"83%\",\n                height: 3,\n                borderRadius: 2,\n                background: \"#fff\",\n              }}\n            />\n          </div>\n          <span style={{ color: \"#8d8d93\" }}>out/launch.mp4 · 14.2 MB</span>\n        </div>\n      );\n    return (\n      <div style={{ fontSize: 9 }}>\n        {row(\"Intro\", \"0:00\")}\n        {row(\"Feature tour\", \"0:04\", true)}\n        {row(\"Pricing\", \"0:16\")}\n        {row(\"Call to action\", \"0:24\")}\n      </div>\n    );\n  })();\n  return (\n    <div\n      style={{\n        position: \"absolute\",\n        inset: 0,\n        background: bg,\n        overflow: \"hidden\",\n      }}\n    >\n      <div\n        style={{\n          position: \"absolute\",\n          left: 18,\n          right: 18,\n          top: 24,\n          textAlign: \"center\",\n          color: ink,\n          fontSize: 17,\n          lineHeight: 1.18,\n          fontWeight: 400,\n          letterSpacing: \"-0.02em\",\n          textWrap: \"balance\",\n        }}\n      >\n        {title}\n      </div>\n      <div\n        style={{\n          position: \"absolute\",\n          left: 22,\n          right: 22,\n          top: 92,\n          height: SHOT_H,\n          borderRadius: 26,\n          background: \"#0b0b0d\",\n          boxShadow: `0 0 0 3px ${light ? \"rgba(17,17,19,0.08)\" : \"rgba(255,255,255,0.12)\"}, 0 18px 40px rgba(0,0,0,0.22)`,\n          padding: \"36px 12px 0\",\n        }}\n      >\n        <div\n          style={{\n            position: \"absolute\",\n            top: 9,\n            left: \"50%\",\n            width: 40,\n            height: 12,\n            marginLeft: -20,\n            borderRadius: 6,\n            background: \"#000\",\n          }}\n        />\n        <div style={{ fontSize: 11, color: \"#f5f5f7\", marginBottom: 10 }}>\n          remocn\n        </div>\n        <div style={{ position: \"relative\" }}>{screen}</div>\n      </div>\n    </div>\n  );\n}\n\nexport function AppStoreListing({\n  appName = \"remocn\",\n  subtitle = \"Launch videos, written in React\",\n  developer = \"remocn Labs\",\n  iconSrc,\n  rating = 4.8,\n  ratingCount = \"12K\",\n  ageRating = \"4+\",\n  category = \"Developer Tools\",\n  chartRank = 3,\n  award = null,\n  screenshots = DEFAULT_SHOTS,\n  accent = \"#3B5BFD\",\n  speed = 1,\n  theme = \"light\",\n  lines = [\n    \"Now on the App Store.\",\n    \"One tap to install.\",\n    \"Every screen, previewed.\",\n    \"Open it. Ship today.\",\n  ],\n  ground,\n  groundParams,\n}: AppStoreListingProps) {\n  const frame = useCurrentFrame();\n  const { fps, width, height } = useVideoConfig();\n  const f = frame * speed;\n  const c: Palette = theme === \"dark\" ? DARK : LIGHT;\n  const tall = height > width;\n  const k = (height * (tall ? 0.66 : 0.92)) / BH;\n  const phoneCx = tall ? width / 2 : width * 0.69;\n  const yOff = tall ? 0.1 : 0;\n  const sp = (at: number, config: SpringCfg, durationInFrames?: number) =>\n    spring({ frame: f - at, fps, config, durationInFrames });\n  const bump = (at: number) => sp(at - 2, MORPH, 3) - sp(at + 2, CHIP);\n\n  const rise = sp(0, HEAVY);\n  const camT = [0, 20, 38, 86, 102, 154, 172];\n  const camEase = { ...clamp, easing: camE };\n  const camS = interpolate(f, camT, [1, 1, 1.5, 1.5, 1, 1, 1.36], camEase);\n  const camFy = interpolate(\n    f,\n    camT,\n    [BH / 2, BH / 2, 206, 206, BH / 2, BH / 2, 214],\n    camEase,\n  );\n  const camTy = interpolate(\n    f,\n    camT,\n    [0.5, 0.5, 0.44, 0.44, 0.5, 0.5, 0.42].map((v) => v + yOff),\n    camEase,\n  );\n  const S = k * camS;\n\n  const press = bump(T_TAP);\n  const collapse = interpolate(f, [T_TAP + 2, T_TAP + 10], [0, 1], {\n    ...clamp,\n    easing: morph,\n  });\n  const expand = Math.min(1, sp(T_DONE + 1, CARD));\n  const btnW =\n    f < T_DONE\n      ? interpolate(collapse, [0, 1], [GET_W, 30])\n      : interpolate(expand, [0, 1], [30, GET_W]);\n  const fillAmt =\n    f < T_DONE\n      ? interpolate(collapse, [0.5, 1], [1, 0], clamp)\n      : interpolate(expand, [0, 0.3], [0, 1], clamp);\n  const ringOn =\n    interpolate(f, [T_TAP + 6, T_TAP + 10], [0, 1], clamp) *\n    interpolate(f, [T_DONE + 2, T_DONE + 5], [1, 0], clamp);\n  const spinning = f < T_PROG;\n  const progress = interpolate(\n    f,\n    [T_PROG, T_PROG + 12, T_PROG + 30, T_PROG + 48, T_PROG + 74, T_DONE - 2],\n    [0, 0.08, 0.36, 0.52, 0.9, 1],\n    clamp,\n  );\n  const spinAngle = (f - T_SPIN) * 13;\n  const labelGet = interpolate(collapse, [0, 0.35], [1, 0], clamp);\n  const labelOpen = interpolate(expand, [0.35, 0.85], [0, 1], clamp);\n  const iapOpacity = 1 - collapse;\n\n  let scrollX = 0;\n  for (const d of DRAG) {\n    const pulled = PAGE * 0.62;\n    if (f >= d.down) {\n      const drag = interpolate(f, [d.down, d.up], [0, pulled], {\n        ...clamp,\n        easing: moveE,\n      });\n      const settle = (PAGE - pulled) * sp(d.up, CARD);\n      scrollX = d.from + drag + settle;\n    }\n  }\n\n  const getCenter = { x: COL_X + GET_W / 2, y: GET_Y + 15 };\n  const swipeY = SHOT_Y + 200;\n  const touches = [\n    { t: 22, x: 262, y: 420 },\n    { t: T_TAP, ...getCenter },\n    { t: DRAG[0].down - 9, x: 318, y: swipeY + 40 },\n    { t: DRAG[0].down, x: 300, y: swipeY },\n    { t: DRAG[0].up, x: 300 - PAGE * 0.62, y: swipeY - 6 },\n    { t: DRAG[1].down, x: 304, y: swipeY + 4 },\n    { t: DRAG[1].up, x: 304 - PAGE * 0.62, y: swipeY - 2 },\n  ];\n  let touch = { x: touches[0].x, y: touches[0].y };\n  for (let i = 0; i < touches.length - 1; i++) {\n    const a = touches[i];\n    const b = touches[i + 1];\n    const dragging = DRAG.some((d) => a.t === d.down);\n    const start = dragging ? a.t : a.t + 2;\n    const end = dragging ? b.t : b.t - 2;\n    if (f >= start) {\n      const e = moveE(Math.min(1, Math.max(0, (f - start) / (end - start))));\n      const arc = dragging ? 0 : Math.sin(Math.PI * e) * 26;\n      touch = {\n        x: a.x + (b.x - a.x) * e + arc * 0.4,\n        y: a.y + (b.y - a.y) * e - arc,\n      };\n    }\n  }\n  const down =\n    bump(T_TAP) +\n    DRAG.reduce(\n      (acc, d) =>\n        acc +\n        interpolate(\n          f,\n          [d.down - 2, d.down, d.up, d.up + 2],\n          [0, 1, 1, 0],\n          clamp,\n        ),\n      0,\n    );\n  const touchOpacity = interpolate(\n    f,\n    [\n      22,\n      28,\n      T_TAP + 4,\n      T_TAP + 9,\n      DRAG[0].down - 7,\n      DRAG[0].down - 2,\n      DRAG[1].up + 2,\n      DRAG[1].up + 7,\n    ],\n    [0, 1, 1, 0, 0, 1, 1, 0],\n    clamp,\n  );\n\n  const cells: {\n    label: string;\n    value: React.ReactNode;\n    foot: React.ReactNode;\n  }[] = [\n    {\n      label: `${ratingCount} Ratings`,\n      value: rating.toFixed(1),\n      foot: <Stars rating={rating} size={12} color={c.muted} track={c.track} />,\n    },\n    ...(award\n      ? [\n          {\n            label: \"Award\",\n            value: (\n              <div style={{ position: \"relative\", width: 82, height: 34 }}>\n                <Laurel color={c.muted} />\n                <div\n                  style={{\n                    position: \"absolute\",\n                    inset: 0,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    justifyContent: \"center\",\n                    textAlign: \"center\",\n                    fontSize: 10,\n                    lineHeight: 1.05,\n                    fontWeight: 400,\n                    letterSpacing: \"-0.01em\",\n                    padding: \"0 18px\",\n                  }}\n                >\n                  {award}\n                </div>\n              </div>\n            ),\n            foot: \"Apps\",\n          },\n        ]\n      : []),\n    { label: \"Age\", value: ageRating, foot: \"Years Old\" },\n    { label: \"Chart\", value: `#${chartRank}`, foot: category },\n    {\n      label: \"Developer\",\n      value: <Glyph d={PATH.person} size={24} color={c.muted} sw={1.8} />,\n      foot: developer,\n    },\n  ];\n\n  const tabs = [\n    [\"Today\", PATH.today],\n    [\"Games\", PATH.games],\n    [\"Apps\", PATH.apps],\n    [\"Updates\", PATH.updates],\n    [\"Search\", PATH.search],\n  ] as const;\n\n  return (\n    <AbsoluteFill\n      style={{ fontFamily, overflow: \"hidden\", background: c.stage }}\n    >\n      <GshGround\n        preset={ground ?? (theme === \"dark\" ? \"europa\" : \"paper-crease\")}\n        params={groundParams}\n        timeOffset={theme === \"dark\" ? 4 : 5}\n        timeScale={0.3}\n      />\n      <AbsoluteFill style={{ background: c.scrim }} />\n      <div\n        style={{\n          position: \"absolute\",\n          left: tall ? width * 0.08 : width * 0.075,\n          top: tall ? height * 0.075 : height * 0.5 - height * 0.12,\n          width: tall ? width * 0.84 : width * 0.4,\n          height: tall ? height * 0.12 : height * 0.24,\n          overflow: \"hidden\",\n        }}\n      >\n        {lines.slice(0, LINE_AT.length).map((line, i) => {\n          const at = LINE_AT[i];\n          const next = LINE_AT[i + 1] ?? 100000;\n          const pin = i === 0 ? rise : tween(f, at, at + 12, enterE);\n          const pout = tween(f, next - 7, next, exitE);\n          if (f < at - 1 || f > next + 1) return null;\n          return (\n            <div\n              key={line}\n              style={{\n                position: \"absolute\",\n                left: 0,\n                right: 0,\n                top: 0,\n                bottom: 0,\n                display: \"flex\",\n                alignItems: tall ? \"flex-start\" : \"center\",\n                fontSize: tall ? height * 0.04 : height * 0.085,\n                fontWeight: 300,\n                lineHeight: 1.04,\n                letterSpacing: \"-0.035em\",\n                color: c.copy,\n                textWrap: \"balance\",\n                transform: `translateY(${(1 - pin) * 70 - pout * 50}%)`,\n                opacity: pin * (1 - pout),\n              }}\n            >\n              {line}\n            </div>\n          );\n        })}\n      </div>\n      <div\n        style={{\n          position: \"absolute\",\n          left: 0,\n          top: 0,\n          width: BW,\n          height: BH,\n          transformOrigin: \"0 0\",\n          transform: `translate(${phoneCx - (BW / 2) * S}px, ${height * camTy - camFy * S + (1 - rise) * height}px) scale(${S})`,\n          WebkitFontSmoothing: \"antialiased\",\n        }}\n      >\n        <div\n          style={{\n            position: \"absolute\",\n            inset: 0,\n            borderRadius: 67,\n            boxShadow: c.phoneShadow,\n          }}\n        />\n        <Phone screen={c.screen} home={c.text}>\n          <StatusBar color={c.text} />\n          <div\n            style={{\n              position: \"absolute\",\n              top: 54,\n              left: 8,\n              height: 44,\n              display: \"flex\",\n              alignItems: \"center\",\n              gap: 1,\n              color: c.blue,\n              fontSize: 17,\n            }}\n          >\n            <Glyph d={PATH.back} size={28} color={c.blue} sw={2.4} />\n            Search\n          </div>\n          <div style={{ position: \"absolute\", left: 20, top: HEAD_Y }}>\n            <AppIcon\n              size={ICON}\n              accent={accent}\n              src={iconSrc}\n              ring={c.iconRing}\n            />\n          </div>\n          <div\n            style={{\n              position: \"absolute\",\n              left: COL_X,\n              right: 20,\n              top: HEAD_Y + 2,\n            }}\n          >\n            <div\n              style={{\n                fontSize: 22,\n                fontWeight: 400,\n                lineHeight: 1.2,\n                letterSpacing: \"-0.01em\",\n                color: c.text,\n              }}\n            >\n              {appName}\n            </div>\n            <div\n              style={{\n                marginTop: 3,\n                fontSize: 15,\n                lineHeight: 1.3,\n                color: c.muted,\n                textWrap: \"pretty\",\n              }}\n            >\n              {subtitle}\n            </div>\n          </div>\n          <div\n            style={{\n              position: \"absolute\",\n              left: COL_X + (GET_W - btnW) / 2,\n              top: GET_Y,\n              width: btnW,\n              height: 30,\n              borderRadius: 15,\n              background: interpolateColors(\n                fillAmt,\n                [0, 1],\n                [`${c.blue}00`, c.blue],\n              ),\n              transform: `scale(${1 - press * 0.04})`,\n              display: \"flex\",\n              alignItems: \"center\",\n              justifyContent: \"center\",\n              color: \"#ffffff\",\n              fontSize: 15,\n              fontWeight: 400,\n            }}\n          >\n            <span style={{ position: \"absolute\", opacity: labelGet }}>Get</span>\n            <span style={{ position: \"absolute\", opacity: labelOpen }}>\n              Open\n            </span>\n            {ringOn > 0 ? (\n              <svg\n                width={30}\n                height={30}\n                viewBox=\"0 0 30 30\"\n                style={{ position: \"absolute\", opacity: ringOn }}\n              >\n                <circle\n                  cx={15}\n                  cy={15}\n                  r={13}\n                  fill=\"none\"\n                  stroke={c.track}\n                  strokeWidth={2.5}\n                />\n                <circle\n                  cx={15}\n                  cy={15}\n                  r={13}\n                  fill=\"none\"\n                  stroke={spinning ? c.muted : c.blue}\n                  strokeWidth={2.5}\n                  strokeLinecap={spinning ? \"round\" : \"butt\"}\n                  pathLength={1}\n                  strokeDasharray={`${spinning ? 0.22 : progress} 1`}\n                  transform={`rotate(${spinning ? spinAngle : -90} 15 15)`}\n                />\n                {!spinning ? (\n                  <rect\n                    x={11}\n                    y={11}\n                    width={8}\n                    height={8}\n                    rx={1.6}\n                    fill={c.blue}\n                  />\n                ) : null}\n              </svg>\n            ) : null}\n          </div>\n          <div\n            style={{\n              position: \"absolute\",\n              left: COL_X + GET_W + 10,\n              top: GET_Y + 3,\n              fontSize: 9,\n              lineHeight: 1.2,\n              color: c.muted,\n              opacity: iapOpacity,\n            }}\n          >\n            In-App\n            <br />\n            Purchases\n          </div>\n          <div style={{ position: \"absolute\", right: 20, top: GET_Y + 2 }}>\n            <Glyph d={PATH.share} size={24} color={c.blue} sw={1.8} />\n          </div>\n          <div\n            style={{\n              position: \"absolute\",\n              left: 20,\n              right: 20,\n              top: STRIP_Y,\n              height: 1,\n              background: c.hair,\n            }}\n          />\n          <div\n            style={{\n              position: \"absolute\",\n              left: 0,\n              top: STRIP_Y,\n              height: STRIP_H,\n              display: \"flex\",\n              paddingLeft: 4,\n            }}\n          >\n            {cells.map((cell, i) => (\n              <div\n                key={cell.label}\n                style={{\n                  position: \"relative\",\n                  width: CELL_W,\n                  height: STRIP_H,\n                  display: \"flex\",\n                  flexDirection: \"column\",\n                  alignItems: \"center\",\n                  justifyContent: \"center\",\n                  gap: 4,\n                  color: c.muted,\n                }}\n              >\n                {i > 0 ? (\n                  <div\n                    style={{\n                      position: \"absolute\",\n                      left: 0,\n                      top: 24,\n                      width: 1,\n                      height: 36,\n                      background: c.hair,\n                    }}\n                  />\n                ) : null}\n                <span\n                  style={{\n                    fontSize: 11,\n                    fontWeight: 400,\n                    textTransform: \"uppercase\",\n                    letterSpacing: \"0.04em\",\n                  }}\n                >\n                  {cell.label}\n                </span>\n                <div\n                  style={{\n                    height: 32,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    fontSize: 21,\n                    fontWeight: 300,\n                    letterSpacing: \"-0.01em\",\n                    fontVariantNumeric: \"tabular-nums\",\n                  }}\n                >\n                  {cell.value}\n                </div>\n                <span\n                  style={{\n                    fontSize: 12,\n                    maxWidth: CELL_W - 16,\n                    whiteSpace: \"nowrap\",\n                    overflow: \"hidden\",\n                    textOverflow: \"ellipsis\",\n                    height: 14,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                  }}\n                >\n                  {cell.foot}\n                </span>\n              </div>\n            ))}\n          </div>\n          <div\n            style={{\n              position: \"absolute\",\n              left: 20,\n              right: 20,\n              top: STRIP_Y + STRIP_H,\n              height: 1,\n              background: c.hair,\n            }}\n          />\n          <div\n            style={{\n              position: \"absolute\",\n              left: 20,\n              top: SHOT_Y,\n              display: \"flex\",\n              gap: SHOT_GAP,\n              transform: `translateX(${-scrollX}px)`,\n            }}\n          >\n            {screenshots.map((s, i) => (\n              <div\n                key={i}\n                style={{\n                  position: \"relative\",\n                  width: SHOT_W,\n                  height: SHOT_H,\n                  flexShrink: 0,\n                  borderRadius: 22,\n                  overflow: \"hidden\",\n                }}\n              >\n                {s.src ? (\n                  <Img\n                    src={s.src}\n                    style={{\n                      width: \"100%\",\n                      height: \"100%\",\n                      objectFit: \"cover\",\n                    }}\n                  />\n                ) : (\n                  <MockShot index={i} title={s.title} accent={accent} />\n                )}\n                <div\n                  style={{\n                    position: \"absolute\",\n                    inset: 0,\n                    borderRadius: 22,\n                    boxShadow: `inset 0 0 0 1px ${c.iconRing}`,\n                  }}\n                />\n              </div>\n            ))}\n          </div>\n          <div\n            style={{\n              position: \"absolute\",\n              left: 0,\n              right: 0,\n              bottom: 0,\n              height: TAB_H,\n              background: c.tab,\n              borderTop: `1px solid ${c.hair}`,\n              display: \"flex\",\n              justifyContent: \"space-around\",\n              padding: \"7px 8px 0\",\n              zIndex: 20,\n            }}\n          >\n            {tabs.map(([label, d]) => {\n              const on = label === \"Search\";\n              const col = on ? c.blue : c.tabIdle;\n              return (\n                <div\n                  key={label}\n                  style={{\n                    width: 62,\n                    display: \"flex\",\n                    flexDirection: \"column\",\n                    alignItems: \"center\",\n                    gap: 3,\n                    color: col,\n                    fontSize: 10,\n                    fontWeight: 400,\n                  }}\n                >\n                  <Glyph d={d} size={26} color={col} sw={1.7} />\n                  {label}\n                </div>\n              );\n            })}\n          </div>\n          <div\n            style={{\n              position: \"absolute\",\n              left: touch.x - 22,\n              top: touch.y - 22,\n              width: 44,\n              height: 44,\n              borderRadius: 22,\n              background: c.touch,\n              border: \"1.5px solid rgba(255,255,255,0.75)\",\n              boxShadow: \"0 2px 10px rgba(0,0,0,0.25)\",\n              opacity: touchOpacity,\n              transform: `scale(${1 - Math.min(1, down) * 0.14})`,\n              zIndex: 35,\n            }}\n          />\n        </Phone>\n      </div>\n    </AbsoluteFill>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/remocn/app-store-listing.tsx"
    }
  ],
  "type": "registry:component"
}
