diff --git a/ad-assets/MUSIC-LICENSE.md b/ad-assets/MUSIC-LICENSE.md index d221dfa..2178963 100644 --- a/ad-assets/MUSIC-LICENSE.md +++ b/ad-assets/MUSIC-LICENSE.md @@ -1,19 +1,17 @@ -# Music: ad v2 +# Music: intro ad v3 | | | |---|---| -| Track | "Techno" by AtlasAudio | -| Page | https://pixabay.com/music/techno-trance-techno-606278/ | -| File | `atlasaudio-techno-606278.mp3` (Pixabay CDN, published 18 Sep 2026), 1:46, sha256 `db2437894192b4d04f3c24035a80c05a403be30688e64c11db40c9296f06c819` | -| License | Pixabay Content License: https://pixabay.com/service/license-summary/ (full terms: https://pixabay.com/service/terms/) | -| Downloaded | 9 Oct 2026 | -| Tempo | 130 BPM, measured (librosa onset envelope + fine comb search); drop on track beat 33 (~15.26 s) | +| Track | "Tiger Rhythm" | +| Artist | Surkin | +| Use | Used with the artist's written permission to Predge. Same track as the original "Don't Blink" ad (v1). | +| File | `ad-audio/tiger.mp3`, 62.0 s, sha256 `5edc723be4bd899eb1812b5798546b3c710d38dc1189053b6533748b201569b2` | +| Tempo | 125.0 BPM, measured (onset envelope + comb search); first downbeat at 0.27 s | +| Structure | intro beats 0 to 8; drop on beat 8 (4.11 s); short break on beats 28 to 32; second drop on beat 32 (15.63 s); breakdown beats 61 to 96; final section beats 96 to 124; natural decay to the end of the file | -Why this track: +The permission covers syncing the track to Predge's videos. It does not let anyone else reuse +the audio, so the file is not redistributed: the mp3 stays in `ad-audio/` (gitignored) and only +the finished video carries it. Never commit the mp3 or a music-carrying mp4. -- Pixabay Content License: free for commercial use, attribution not required, can be modified and synced to video. -- The track page shows **no "Content ID Registered" badge** (checked 9 Oct 2026), so a YouTube upload should not draw an automated claim. Several other candidates were dropped because they were Content ID registered or the author added extra restrictions. -- The author adds no extra restriction on the page ("No copyright music for your videos"). - -What the license does not allow: redistributing the audio file on its own. So the mp3 stays in -`ad-audio/` (gitignored); only the finished video carries it. +v2 (69 s, 130 BPM) used "Techno" by AtlasAudio under the Pixabay Content License; that track +is no longer used. See git history of this file for its record. diff --git a/ad-v3/.gitignore b/ad-v3/.gitignore new file mode 100644 index 0000000..9822dd3 --- /dev/null +++ b/ad-v3/.gitignore @@ -0,0 +1,4 @@ +renders/ +snapshots/ +.hyperframes/ +node_modules/ diff --git a/ad-v3/AD_SPEC.md b/ad-v3/AD_SPEC.md new file mode 100644 index 0000000..86350bb --- /dev/null +++ b/ad-v3/AD_SPEC.md @@ -0,0 +1,87 @@ +# Predge intro v3 · spec (revision 4: black, readable, on the beat) + +Kinetic product ad on one black ground (near-black with the opener's soft amber glow and grain) for the +whole film; amber only for key words and numbers; product UI sits on the black. Cut to Surkin +"Tiger Rhythm" (the original "Don't Blink" track) on the 125 BPM grid. + +- **Length:** 61.68 s · 128.5 beats · **54 shots, average 1.14 s**. Default shot 2 beats (0.96 s); a full bar + for lines over about 4 words; UI punch-ins hold 2 beats each and are cut into 2 to 4 beat runs. +- **Readability:** a headline stays on screen whole; long ones build in on beats (never replaced word by + word), max about 6 words per frame, big type. Every text element is at full opacity for at least + 2 beats (0.96 s) and builds leave the last part on screen for at least 2 beats. +- **Motion:** hard cuts on the beat; inside a shot a snap on the cut and a slow push-in (3%). Half-beat + snaps only for the logo hits; whips only at section boundaries; 2-frame flashes only on the two drops. +- **Aspects:** 1920x1080 master, 1080x1080, 1080x1920 (`node build.mjs 169|sq|vt`). UI punch-ins are framed + per aspect inside a crop window; 1:1 and 9:16 use tighter targets (chip and LTV, borrowing power, + Release and Released) so text stays large on a phone. +- **Engine:** HyperFrames 0.8.143 composition (`index.html`, one paused GSAP timeline, seek-safe), + rendered with `npx hyperframes render`; audio muxed with ffmpeg (`render-all.sh`). +- **Pixels:** all our own (HTML/CSS/SVG). No AI images or video, no screen capture, no stock photos. +- **Personas are generic** ("a lending desk", "an agent", "a vault", "a trader"); persona UI shots carry + "Product illustration". The trader section is labelled **Coming soon**: @predge_alerts_bot sends + whale-trade and watched-wallet alerts today, not dispute or settlement alerts. + No customer, revenue, win-rate or edge claims. + +## Shot list (beats; 1 beat = 0.48 s; video t=0 = track 0.27 s) + +Source of truth: the `S` array in `src/ad.html`. + +| beats | section | shots | +|---|---|---| +| 0–8 | intro: wordmark; "Settlement risk for prediction markets." | 2 | +| 8–32 | drop 1 (flash): "A market resolves." · market card · DISPUTED · "Someone disputes it." · Disputed row · "Resolved is not final." · Settled on-chain: Over · "Predge reads the dispute on-chain." · pipeline (2) | 10 | +| 32–44 | drop 2 (flash): 3,005 UMA disputes on Polymarket · 2,666 markets disputed · 323 disputed twice or more · 323 sent to a UMA vote · 33.5% of settled disputed markets · settled differently from the disputed proposal (853 of 2,543 · 1 Jan to 2 Oct 2026) | 6 | +| 44–56 | a lending desk: persona · "Price the risk before it settles." · desk + risk toast · Disputed chip + LTV 60% to 0% · borrowing power $28,690 | 5 | +| 56–70 | an agent: persona · "Agents pay per call." · return key · 402, 0.03 USDC, pay on Arc · "No account. No API key." · 200 signed, free settlement check, resolved · verify valid, decision | 7 | +| 70–82 | a vault: persona · "Funds wait for final." · Release · Blocked: MarketDisputed · Settled, Cooling, Final · Released 12,500 USDC | 6 | +| 82–96 | a trader (coming soon): persona + Coming soon · "Know before it costs you." · lock-screen alert · Disputed message · signed record + Final: Over · "Coming soon to @predge_alerts_bot" | 6 | +| 96–108 | proof: "Every answer is signed." · record · Under/Over and signature · "Verify, don't trust." · offline verify · Valid | 6 | +| 108–118 | "One signed answer: is it final?" · hub (tiles on half-beats) · Contracts on Solana · Arc · Arbitrum One | 3 | +| 118–128.5 | close: "Know when an outcome / is actually final." · wordmark (last hit) · wordmark + predge.io · app.predge.io · @PredgeAI | 3 | + +## Checks + +- `edgecheck.mjs`: every frame of all three aspects, no visible text crosses the frame edge (text inside a + crop window is skipped; the window is always inside the frame). Clean on all three. +- `sync-check.py video.mp4 1.5 src/ad.html`: measures the beat grid from the render's own audio (onset + peaks, least squares: 125.08 BPM, residual 6 ms) and finds every designed cut in the video by frame + differencing. Revision 4, 16:9: 52/53 cuts found, median offset to the beat grid 10.8 ms, p90 24 ms, + max 38 ms, 51/52 within one frame. 1:1: 10.1 ms median, 52/53 within a frame; 9:16: 11.6 ms, 49/52. + +## On-screen claims and sources + +| Claim | Source | +|---|---| +| 3,005 UMA disputes on Polymarket; 2,666 markets disputed; 323 disputed twice or more and sent to a UMA vote; 853 of 2,543 settled disputed markets (33.5%) settled differently from the disputed proposal; 1 Jan to 2 Oct 2026 | `context` block of `GET api.predge.io/v1/settlement-risk/1137824`, read 9 Oct 2026 (`evidence/settlement-risk-1137824.json`); same figures as v2 | +| Montana Grizzlies vs. Idaho Vandals O/U 151.5, Polymarket market 1137824: proposal Under disputed 9 Jan 2026 04:38:50 UTC, one dispute, settled on-chain Over, uma_state settled, risk_level resolved | same record; ed25519 signature checked offline with Node crypto (valid) and `payload` re-canonicalises to `canonical` | +| Trader scene (Coming soon) | `apps/bot` in predgeAI/predge (main, 8 Oct 2026): whale-trade alerts, wallet watchlist and digests only; no dispute or settlement alerts yet | +| Signature prefix/suffix `8c5a4c46...67379209`, kid `13fa3d18a369e6c7` | same record (the signature changes on each fetch because `checked_at` changes; this is the saved one) | +| Settlement-risk check is free and signed; paid routes are x402, 0.03 USDC for `/v1/signals/consensus`, accepted on Base · Arc · Solana · Algorand | `api.predge.io` root, read 9 Oct 2026 (same price v2 used) | +| `check_settlement` reverts with `MarketDisputed`; settled + cooling period before release; Solana devnet | predgeAI/predge-solana-guard README | +| Contracts on Solana · Arc · Arbitrum One | v2 spec (guard on Solana devnet; bond/arbiter contracts on Arc and Arbitrum One) | +| @predge_alerts_bot | `api.predge.io` description | +| Lending desk rows (Rate decision, Season MVP), values, LTVs; vault amount; agent decision text; trader dispute/final alerts | product illustrations, labelled as such | + +Copy rules held: no em dashes; never "flipped", "edited rules", "payout", "markets settle wrong"; +no win rate, edge, PnL, customer or revenue claims; no third-party verification claims; +no ERC-8434 mention; Robinhood Chain not shown. + +## Audio + +Surkin "Tiger Rhythm", used with the artist's written permission to Predge; see +`../ad-assets/MUSIC-LICENSE.md`. The mp3 stays in gitignored `../ad-audio/`. Measured 125.0 BPM, +first downbeat at track 0.27 s (video t=0). Drop 1 on beat 8 (video 3.84 s), drop 2 on beat 32 +(video 15.36 s, numbers scene), last hit on beat 124 (59.52 s, end card), then the track's own +decay with a 0.3 s tail fade at 61.68 s. + +## Pipeline + +```bash +cd ad-v3 +node build.mjs # src/ad.html -> index.html (16:9). Edit src/ad.html, never index.html. +npx hyperframes check # lint + layout + contrast +node edgecheck.mjs $PWD/index.html 1920 1080 # every frame: no text across the frame edge +python3 sync-check.py renders/predge-intro-v3-169.mp4 1.5 src/ad.html # cut-to-beat offsets from the render +npx hyperframes snapshot --at 1.5,3.5,... # stills for review +./render-all.sh 169 sq vt # renders/predge-intro-v3-.mp4, 2 workers, nice 10 +``` diff --git a/ad-v3/assets/fonts/JetBrainsMono-400.woff2 b/ad-v3/assets/fonts/JetBrainsMono-400.woff2 new file mode 100644 index 0000000..5858873 Binary files /dev/null and b/ad-v3/assets/fonts/JetBrainsMono-400.woff2 differ diff --git a/ad-v3/assets/fonts/JetBrainsMono-700.woff2 b/ad-v3/assets/fonts/JetBrainsMono-700.woff2 new file mode 100644 index 0000000..3a4e333 Binary files /dev/null and b/ad-v3/assets/fonts/JetBrainsMono-700.woff2 differ diff --git a/ad-v3/assets/fonts/OFL-inter.txt b/ad-v3/assets/fonts/OFL-inter.txt new file mode 100644 index 0000000..40589da --- /dev/null +++ b/ad-v3/assets/fonts/OFL-inter.txt @@ -0,0 +1,93 @@ +Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/ad-v3/assets/fonts/OFL-jetbrains-mono.txt b/ad-v3/assets/fonts/OFL-jetbrains-mono.txt new file mode 100644 index 0000000..8f7ed67 --- /dev/null +++ b/ad-v3/assets/fonts/OFL-jetbrains-mono.txt @@ -0,0 +1,93 @@ +Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) JetBrainsMono-Italic[wght].ttf: Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/ad-v3/assets/fonts/inter-latin-400-normal.woff2 b/ad-v3/assets/fonts/inter-latin-400-normal.woff2 new file mode 100644 index 0000000..f15b025 Binary files /dev/null and b/ad-v3/assets/fonts/inter-latin-400-normal.woff2 differ diff --git a/ad-v3/assets/fonts/inter-latin-500-normal.woff2 b/ad-v3/assets/fonts/inter-latin-500-normal.woff2 new file mode 100644 index 0000000..54f0a59 Binary files /dev/null and b/ad-v3/assets/fonts/inter-latin-500-normal.woff2 differ diff --git a/ad-v3/assets/fonts/inter-latin-600-normal.woff2 b/ad-v3/assets/fonts/inter-latin-600-normal.woff2 new file mode 100644 index 0000000..d189794 Binary files /dev/null and b/ad-v3/assets/fonts/inter-latin-600-normal.woff2 differ diff --git a/ad-v3/assets/fonts/inter-latin-700-normal.woff2 b/ad-v3/assets/fonts/inter-latin-700-normal.woff2 new file mode 100644 index 0000000..a68fb10 Binary files /dev/null and b/ad-v3/assets/fonts/inter-latin-700-normal.woff2 differ diff --git a/ad-v3/assets/fonts/inter-latin-800-normal.woff2 b/ad-v3/assets/fonts/inter-latin-800-normal.woff2 new file mode 100644 index 0000000..74a16d4 Binary files /dev/null and b/ad-v3/assets/fonts/inter-latin-800-normal.woff2 differ diff --git a/ad-v3/assets/fonts/inter-latin-900-normal.woff2 b/ad-v3/assets/fonts/inter-latin-900-normal.woff2 new file mode 100644 index 0000000..4db8333 Binary files /dev/null and b/ad-v3/assets/fonts/inter-latin-900-normal.woff2 differ diff --git a/ad-v3/assets/predge-wordmark.svg b/ad-v3/assets/predge-wordmark.svg new file mode 100644 index 0000000..a8805fe --- /dev/null +++ b/ad-v3/assets/predge-wordmark.svg @@ -0,0 +1,7 @@ + + PREDGE + + + + diff --git a/ad-v3/build.mjs b/ad-v3/build.mjs new file mode 100644 index 0000000..b3d7290 --- /dev/null +++ b/ad-v3/build.mjs @@ -0,0 +1,33 @@ +// Stamp src/ad.html into the three renderable HyperFrames compositions. +// node build.mjs [169|sq|vt] -> index.html at 1920x1080 (default), 1080x1080 or 1080x1920 +// HyperFrames allows one root composition per project, so each aspect is built in turn +// into index.html and rendered; the committed index.html is the 16:9 master. +// Timing lives in the shot list in src/ad.html (beats at 125 BPM); panels CSS is inlined from src/panels.css. +import { readFileSync, writeFileSync } from "node:fs"; +import { dirname, join } from "node:path"; +import { fileURLToPath } from "node:url"; + +const HERE = dirname(fileURLToPath(import.meta.url)); +const BEAT = 60 / 125; +const TOTAL_BEATS = 128.5; +const s = (b) => +(b * BEAT).toFixed(4); + +const src = readFileSync(join(HERE, "src/ad.html"), "utf8").replace("/*__PANELS_CSS__*/", readFileSync(join(HERE, "src/panels.css"), "utf8")); +const wordmark = readFileSync(join(HERE, "assets/predge-wordmark.svg"), "utf8").replace(/<\?xml[^>]*>/, "").replace(/[^<]*<\/title>/, "").replace(/<!--[\s\S]*?-->/g, ""); +const cursor = `<svg viewBox="0 0 24 24"><path d="M3 2 L3 19.5 L7.6 15.4 L10.9 22.2 L14 20.8 L10.8 14.2 L17.2 14.2 Z" fill="#1c1c1c" stroke="#fff" stroke-width="1.4" stroke-linejoin="round"/></svg>`; + +const sizes = { "169": [1920, 1080], sq: [1080, 1080], vt: [1080, 1920] }; +const ar = process.argv[2] || "169"; +if (!sizes[ar]) throw new Error("aspect must be 169 | sq | vt"); +const file = "index.html"; +{ + const [w, h] = sizes[ar]; + let out = src + .replaceAll("__W__", String(w)).replaceAll("__H__", String(h)).replaceAll("__AR__", ar) + .replaceAll("__TOTAL__", String(s(TOTAL_BEATS))) + .replaceAll("__WORDMARK__", wordmark).replaceAll("__CURSOR__", cursor) + ; + out = out.replace(/<!-- Source template\.[\s\S]*?-->/, "<!-- GENERATED by build.mjs from src/ad.html. Do not edit. -->"); + writeFileSync(join(HERE, file), out); + console.log(file, w + "x" + h, s(TOTAL_BEATS) + "s"); +} diff --git a/ad-v3/edgecheck.mjs b/ad-v3/edgecheck.mjs new file mode 100644 index 0000000..826cb9c --- /dev/null +++ b/ad-v3/edgecheck.mjs @@ -0,0 +1,36 @@ +// Usage: node build.mjs <ar> && node edgecheck.mjs $PWD/index.html <width> <height> (prints "clean" or each offending frame) +// Seek the composition frame by frame and report any visible text that crosses the frame edge. +// Text inside a clip-path crop window is skipped: the window itself is computed inside the frame. +import { pathToFileURL } from "node:url"; +const PW = process.env.PLAYWRIGHT || "/Users/amir/Documents/Playground/iapm-applyreset/node_modules/playwright/index.js"; +const CHROME = process.env.CHROME || "/Users/amir/Library/Caches/ms-playwright/chromium-1228/chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing"; +const { chromium } = (await import(pathToFileURL(PW).href)).default; +const [file, W, H] = [process.argv[2], +process.argv[3], +process.argv[4]]; +const b = await chromium.launch({ executablePath: CHROME }); +const p = await b.newPage({ viewport: { width: W, height: H } }); +await p.addInitScript(() => { window.__timelines = {}; }); +p.on("pageerror", (e) => console.log("PAGEERR", e.message)); p.on("console", (m) => m.type() === "error" && console.log("CONSOLE", m.text())); +await p.goto(pathToFileURL(file).href); +await p.waitForFunction(() => !!window.__timelines.main, null, { timeout: 8000, polling: 200 }); +const res = await p.evaluate(({ W, H }) => { + const tl = window.__timelines.main, clips = [...document.querySelectorAll("[data-start]")].filter((c) => c.id !== "root"); + const total = +document.getElementById("root").dataset.duration, out = []; + const leaves = [...document.querySelectorAll("#root *")].filter((e) => [...e.childNodes].some((n) => n.nodeType === 3 && n.textContent.trim())); + for (let f = 0; f < total * 30; f++) { + const t = f / 30; tl.seek(t, false); + for (const c of clips) { const s = +c.dataset.start, d = +c.dataset.duration; c.style.visibility = t >= s && t < s + d ? "visible" : "hidden"; } + for (const e of leaves) { + let o = 1, n = e, vis = true; + let clipped = false; + while (n && n.nodeType === 1) { const cs = getComputedStyle(n); o *= +cs.opacity; if (cs.visibility === "hidden" || cs.display === "none") vis = false; if (cs.clipPath && cs.clipPath !== "none") clipped = true; n = n.parentElement; } + // inside a crop window (clip-path inset, always inside the frame) only the window can show + if (clipped) continue; + if (!vis || o < 0.04) continue; + const r = e.getBoundingClientRect(); if (!r.width) continue; + if (r.left < -1 || r.top < -1 || r.right > W + 1 || r.bottom > H + 1) out.push(`${t.toFixed(2)} op=${o.toFixed(2)} "${e.textContent.trim().slice(0, 30)}" [${r.left|0},${r.top|0},${r.right|0},${r.bottom|0}]`); + } + } + return out; +}, { W, H }); +console.log(res.length ? res.join("\n") : "clean"); +await b.close(); diff --git a/ad-v3/evidence/settlement-risk-1137824.json b/ad-v3/evidence/settlement-risk-1137824.json new file mode 100644 index 0000000..a29518e --- /dev/null +++ b/ad-v3/evidence/settlement-risk-1137824.json @@ -0,0 +1 @@ +{"market":{"market_id":"1137824","condition_id":"0x53abd8d573f0d9e1712bc50223a6be99e7588617ec0d1e51c236f940302d30e8","slug":"cbb-mont-idaho-2026-01-08-total-151pt5","question":"Montana Grizzlies vs. Idaho Vandals: O/U 151.5","uma_question_id":"0x4f186113c27b1617df6cfec3c39aabe368d9a63276f784548b565eb6a0e41079","adapter":"0x65070be91477460d8a7aeeb94ef92fe056c2f2a7","neg_risk":false,"closed":true,"end_date":"2026-01-09T02:00:00Z"},"adapter":"0x65070be91477460d8a7aeeb94ef92fe056c2f2a7","adapter_label":"UmaCtfAdapter (Managed OOV2)","oracle":"0x2c0367a9db231ddebd88a94b4f6461a6e47c58b1","uma_state":"settled","resolved_on_chain":true,"paused":false,"dispute_count":1,"open_dispute":false,"sent_to_uma_vote":false,"current_proposal":null,"disputes":[{"disputed_at":"2026-01-09T04:38:50Z","tx":"0xf7ccb655259f50e5eeaed83b911300dcd11375ae000b0e8af50e94fcf903e1aa","disputed_proposal":"Under"}],"bulletin_board":{"count":0,"latest":null},"onchain_resolution":{"outcome":"Over"},"checked_at":"2026-10-09T13:09:44Z","risk_level":"resolved","recommendation":"resolved: the on-chain resolution is final (Over); nothing is left to settle.","context":{"period":"2026-01-01 to 2026-10-02","source":"UMA Optimistic Oracle and Polymarket UMA CTF adapter logs on Polygon, scanned by Predge","disputes":3005,"disputed_markets":2666,"disputed_twice_or_more":323,"settled_disputed_markets":2543,"settled_differently_from_disputed_proposal":853,"settled_differently_share":"33.5%","median_hours_first_dispute_to_onchain_resolution":"3.3","median_hours_second_dispute_to_onchain_resolution":"88.5","note":"A dispute blocks a proposal; it does not by itself change the outcome. A second dispute sends the outcome to a UMA token-holder vote."},"data_basis":"Live read of UMA's Optimistic Oracle and Polymarket's UMA CTF adapter on Polygon (eth_call and eth_getLogs on public RPC) at checked_at. uma_question_id, dispute times and txs, bulletin-board updates and the on-chain resolution are chain facts, re-checkable on any Polygon RPC. The market lookup (condition id, market id, slug to UMA question id) uses Polymarket's public gamma API and is re-checked on chain: keccak256(ancillaryData) equals uma_question_id. Only the question creator's and the venue operator accounts' bulletin-board posts are counted. risk_level and recommendation are Predge's reading of those facts, not advice. The signature proves Predge published this record.","attestation":{"version":"predge-attest-v1","issuer":"predge.io","algorithm":"ed25519","kind":"settlement-risk","data_basis":"Live read of UMA's Optimistic Oracle and Polymarket's UMA CTF adapter on Polygon (eth_call and eth_getLogs on public RPC) at checked_at. uma_question_id, dispute times and txs, bulletin-board updates and the on-chain resolution are chain facts, re-checkable on any Polygon RPC. The market lookup (condition id, market id, slug to UMA question id) uses Polymarket's public gamma API and is re-checked on chain: keccak256(ancillaryData) equals uma_question_id. Only the question creator's and the venue operator accounts' bulletin-board posts are counted. risk_level and recommendation are Predge's reading of those facts, not advice. The signature proves Predge published this record.","public_key":"13fa3d18a369e6c71bf941563ba47822b30182273d5106a0e8fb61c5016352d9","canonical":"{\"adapter\":\"0x65070be91477460d8a7aeeb94ef92fe056c2f2a7\",\"bulletin_board_count\":\"0\",\"chain\":\"polygon\",\"checked_at\":\"2026-10-09T13:09:44Z\",\"condition_id\":\"0x53abd8d573f0d9e1712bc50223a6be99e7588617ec0d1e51c236f940302d30e8\",\"current_proposal\":null,\"dispute_count\":\"1\",\"disputes\":[{\"disputed_at\":\"2026-01-09T04:38:50Z\",\"disputed_proposal\":\"Under\",\"tx\":\"0xf7ccb655259f50e5eeaed83b911300dcd11375ae000b0e8af50e94fcf903e1aa\"}],\"issued_at\":\"2026-10-09T13:09:47.133Z\",\"issuer\":\"predge.io\",\"kind\":\"settlement-risk\",\"latest_bulletin_board_update\":null,\"market_id\":\"1137824\",\"onchain_resolution\":{\"outcome\":\"Over\"},\"open_dispute\":false,\"oracle\":\"0x2c0367a9db231ddebd88a94b4f6461a6e47c58b1\",\"paused\":false,\"platform\":\"polymarket\",\"recommendation\":\"resolved: the on-chain resolution is final (Over); nothing is left to settle.\",\"resolved_on_chain\":true,\"risk_level\":\"resolved\",\"sent_to_uma_vote\":false,\"uma_question_id\":\"0x4f186113c27b1617df6cfec3c39aabe368d9a63276f784548b565eb6a0e41079\",\"uma_state\":\"settled\",\"version\":\"predge-attest-v1\"}","signature":"8c5a4c468be0a42810ffca1e3673c4aa35e76c8c5093ea9347d419cfb194a2561947ce515982aa44ea64cb8bde7277cd22d5de671a971dac03cc741067379209","payload":{"version":"predge-attest-v1","issuer":"predge.io","kind":"settlement-risk","platform":"polymarket","chain":"polygon","market_id":"1137824","condition_id":"0x53abd8d573f0d9e1712bc50223a6be99e7588617ec0d1e51c236f940302d30e8","uma_question_id":"0x4f186113c27b1617df6cfec3c39aabe368d9a63276f784548b565eb6a0e41079","adapter":"0x65070be91477460d8a7aeeb94ef92fe056c2f2a7","oracle":"0x2c0367a9db231ddebd88a94b4f6461a6e47c58b1","uma_state":"settled","resolved_on_chain":true,"paused":false,"dispute_count":"1","open_dispute":false,"sent_to_uma_vote":false,"current_proposal":null,"disputes":[{"disputed_at":"2026-01-09T04:38:50Z","tx":"0xf7ccb655259f50e5eeaed83b911300dcd11375ae000b0e8af50e94fcf903e1aa","disputed_proposal":"Under"}],"bulletin_board_count":"0","latest_bulletin_board_update":null,"onchain_resolution":{"outcome":"Over"},"risk_level":"resolved","recommendation":"resolved: the on-chain resolution is final (Over); nothing is left to settle.","checked_at":"2026-10-09T13:09:44Z","issued_at":"2026-10-09T13:09:47.133Z"},"verify":"ed25519: verify `signature` (hex, 64 bytes) over the UTF-8 bytes of `canonical` using `public_key` (hex, raw 32-byte ed25519 point). `canonical` is the exact byte string that was signed — JSON with keys sorted lexicographically at every level and no insignificant whitespace (a subset of RFC 8785 / JCS). `payload` is the same object parsed; re-canonicalise it and you MUST reproduce `canonical`. If `payload.payment` is present it names the x402 payment that bought this response. On `payment.network`, find the `AuthorizationUsed(payer, nonce)` log emitted by `payment.asset`; in that same transaction receipt (not just the same block) require status 1 and a `Transfer(payer, payTo, amount)` log from `payment.asset`. Those arguments are the fields of `payment` with the same names. envelope_signature: remove the `envelope_signature` field from the envelope, canonicalise what is left with the same rule as `canonical` (keys sorted at every level, no whitespace), and verify `envelope_signature` (hex, 64 bytes) over its UTF-8 bytes with `public_key`.","kid":"13fa3d18a369e6c7","content_hash":"ff00e6984f10bbea75423c1f28073c21d8c8fc99cb34cb70e60a155cef7c2172","envelope_signature":"284b0a0d1f97468f7980f24168dec1a44f6593f72d01678544b60a7b0d294ce66590b6ba069e44b4d988bbaab91842120b26dce6e7aab19750d74ae97d9e6806"}} \ No newline at end of file diff --git a/ad-v3/hyperframes.json b/ad-v3/hyperframes.json new file mode 100644 index 0000000..dc9ec2e --- /dev/null +++ b/ad-v3/hyperframes.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://hyperframes.heygen.com/schema/hyperframes.json", + "registry": "https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry", + "paths": { + "blocks": "compositions", + "components": "compositions/components", + "assets": "assets" + }, + "media": { + "autoProxy": true + } +} diff --git a/ad-v3/index.html b/ad-v3/index.html new file mode 100644 index 0000000..c6551f3 --- /dev/null +++ b/ad-v3/index.html @@ -0,0 +1,710 @@ +<!doctype html> +<html lang="en"> +<head> +<meta charset="UTF-8" /> +<meta name="viewport" content="width=1920, height=1080" /> +<title>Predge intro v3 + + + + + +
+
+
+ +
+
+
Polymarket · College basketball#1137824
+
Montana Grizzlies vs. Idaho Vandals
+
Total points · O/U 151.5
+
Over O 151.5
Under U 151.5
+
+
Outcome proposed: Underchallenge window open
+
+
Disputed9 Jan 2026 · 04:38 UTC
+
Settled on-chain: OverUMA · Polygon
+
+
+
DISPUTED
+
+
OOUMA Optimistic Oracle
CTFPolymarket UMA adapter
POLPolygon logs
sigSigned record
402API · x402
getFree signed check
solOn-chain guard
+ + + + + +
+
+
Collateral · prediction market positionsPredge risk feed
+
+
Market
Value
LTV
Settlement
+
Grizzlies vs. VandalsO/U 151.5 · Over
$48,200
60%
+
ProposedDisputed
+
Rate decision, DecemberYes
$31,800
55%
Final
+
Season MVPCandidate A
$22,400
50%
Open
+
+
Borrowing powerGrizzlies vs. Vandals paused until final$57,610
+
P
Settlement risk: disputedmarket 1137824 · proposal Under
+
1 dispute · waiting for final
Proposal Under was disputed. A new proposal must settle on-chain.
signed by predge.io · ed25519
+
+
+
return⏎
+
+
agent · settle-checkidle
+
+
>GET api.predge.io/v1/signals/consensus
+
<402 Payment Required0.03 USDC
+
accepts Base · Arc · Solana · Algorand
+
>x402 pay 0.03 USDC on Arc
+
<200 OKsigned JSON
+
>GET /v1/settlement-risk/1137824
+
<200 OKfree · signed ed25519
+
risk_levelresolvedoutcomeOver
+
>verify signaturevalid
+
decisionoutcome is final, safe to act
+
+
+
+
Escrow vaultcheck_settlement · Solana devnet
+
+
Settles on
+
Montana Grizzlies vs. Idaho Vandals · O/U 151.5
+
12,500USDC locked
+
+
Proposed
Disputed
Settled
Cooling
Final
+
+
Release
Blocked: MarketDisputed
Released · 12,500 USDC
+
+
vault.releasereverted · MarketDisputed
+
guardsettled on-chain · cooling period
+
vault.releaseok · funds released
+
+
+
+
+
+
+
4:39
Friday, 9 January
+
P
Predge alertsA market you watch was disputed: Grizzlies vs. Vandals O/U 151.5
+
+
P
Predge alerts@predge_alerts_bot
+
+
Disputed
Montana Grizzlies vs. Idaho Vandals · O/U 151.5
proposal Under · 9 Jan, 04:38 UTC
not final yet
+
Open record
Mute
+
Signed record
dispute_count 1 · not final
kid 13fa3d18a369e6c7
+
Final: Over
Settled on-chain. Nothing left to settle.
+
+
+
+
+
settlement-risk/1137824.json
+
+
{
+
"issuer": "predge.io",
+
"chain": "polygon",
+
"market_id": "1137824",
+
"dispute_count": "1",
+
"disputed_proposal": "Under",
+
"onchain_resolution": "Over",
+
"uma_state": "settled",
+
"risk_level": "resolved"
+
}
+
ed25519 8c5a4c46...67379209
kid 13fa3d18a369e6c7
+
+
+
+
verify · offline
+
+
$verify record.json
+
canonicalkeys sorted ✓
+
ed25519signature valid ✓
+
networknone used ✓
+
Valid
+
+
+
+ + + + + +
Lending desksprice settlement risk
Agentscheck before they act
Vaultsrelease only when final
Tradersalerts coming soon
+
+ +
Product illustration
+
Product illustration · coming soon
+
+
+
+ + + + diff --git a/ad-v3/meta.json b/ad-v3/meta.json new file mode 100644 index 0000000..906def7 --- /dev/null +++ b/ad-v3/meta.json @@ -0,0 +1,5 @@ +{ + "id": "ad-v3", + "name": "ad-v3", + "createdAt": "2026-10-09T13:10:18.273Z" +} \ No newline at end of file diff --git a/ad-v3/package.json b/ad-v3/package.json new file mode 100644 index 0000000..0598171 --- /dev/null +++ b/ad-v3/package.json @@ -0,0 +1,11 @@ +{ + "name": "ad-v3", + "private": true, + "type": "module", + "scripts": { + "dev": "npx --yes hyperframes@0.8.143 preview", + "check": "npx --yes hyperframes@0.8.143 check", + "render": "npx --yes hyperframes@0.8.143 render", + "publish": "npx --yes hyperframes@0.8.143 publish" + } +} diff --git a/ad-v3/render-all.sh b/ad-v3/render-all.sh new file mode 100755 index 0000000..ecd0bea --- /dev/null +++ b/ad-v3/render-all.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Render the three aspects (silent) with modest parallelism, then mux the licensed track. +# Usage: ./render-all.sh [169 sq vt] (needs Node >= 22 and ffmpeg; music in ../ad-audio/) +set -u +cd "$(dirname "$0")" +MUSIC=../ad-audio/tiger.mp3 +OUT=${OUT:-renders} +mkdir -p "$OUT" +for ar in "${@:-169 sq vt}"; do + for a in $ar; do + node build.mjs "$a" || exit 1 + nice -n 10 npx --yes hyperframes@0.8.143 render --workers 2 --quality high --fps 30 -o "$OUT/silent-$a.mp4" || exit 1 + # video t=0 = track 0.27 s (beat 0, measured). Drop 1 on beat 8 (3.84 s), drop 2 on beat 32 (15.36 s, + # numbers scene). Last hit on beat 124 (59.52 s, end card); the track's own decay runs out with a 0.3 s tail fade. + ffmpeg -y -loglevel error -i "$OUT/silent-$a.mp4" -ss 0.27 -i "$MUSIC" \ + -filter_complex "[1:a]atrim=0:61.68,afade=t=in:st=0:d=0.02,afade=t=out:st=61.38:d=0.3,apad,alimiter=limit=0.97[a]" \ + -map 0:v -map "[a]" -c:v copy -c:a aac -b:a 192k -shortest -movflags +faststart "$OUT/predge-intro-v3-$a.mp4" || exit 1 + echo "done $a" + done +done +node build.mjs 169 >/dev/null diff --git a/ad-v3/src/ad.html b/ad-v3/src/ad.html new file mode 100644 index 0000000..34a1efc --- /dev/null +++ b/ad-v3/src/ad.html @@ -0,0 +1,491 @@ + + + + + +Predge intro v3 + + + + + +
+
+
+ +
+
+
Polymarket · College basketball#1137824
+
Montana Grizzlies vs. Idaho Vandals
+
Total points · O/U 151.5
+
Over O 151.5
Under U 151.5
+
+
Outcome proposed: Underchallenge window open
+
+
Disputed9 Jan 2026 · 04:38 UTC
+
Settled on-chain: OverUMA · Polygon
+
+
+
DISPUTED
+
+
OOUMA Optimistic Oracle
CTFPolymarket UMA adapter
POLPolygon logs
sigSigned record
402API · x402
getFree signed check
solOn-chain guard
__WORDMARK__
+
+
Collateral · prediction market positionsPredge risk feed
+
+
Market
Value
LTV
Settlement
+
Grizzlies vs. VandalsO/U 151.5 · Over
$48,200
60%
+
ProposedDisputed
+
Rate decision, DecemberYes
$31,800
55%
Final
+
Season MVPCandidate A
$22,400
50%
Open
+
+
Borrowing powerGrizzlies vs. Vandals paused until final$57,610
+
P
Settlement risk: disputedmarket 1137824 · proposal Under
+
1 dispute · waiting for final
Proposal Under was disputed. A new proposal must settle on-chain.
signed by predge.io · ed25519
+
__CURSOR__
+
+
return⏎
+
+
agent · settle-checkidle
+
+
>GET api.predge.io/v1/signals/consensus
+
<402 Payment Required0.03 USDC
+
accepts Base · Arc · Solana · Algorand
+
>x402 pay 0.03 USDC on Arc
+
<200 OKsigned JSON
+
>GET /v1/settlement-risk/1137824
+
<200 OKfree · signed ed25519
+
risk_levelresolvedoutcomeOver
+
>verify signaturevalid
+
decisionoutcome is final, safe to act
+
+
+
+
Escrow vaultcheck_settlement · Solana devnet
+
+
Settles on
+
Montana Grizzlies vs. Idaho Vandals · O/U 151.5
+
12,500USDC locked
+
+
Proposed
Disputed
Settled
Cooling
Final
+
+
Release
Blocked: MarketDisputed
Released · 12,500 USDC
+
+
vault.releasereverted · MarketDisputed
+
guardsettled on-chain · cooling period
+
vault.releaseok · funds released
+
+
+
__CURSOR__
+
+
+
+
4:39
Friday, 9 January
+
P
Predge alertsA market you watch was disputed: Grizzlies vs. Vandals O/U 151.5
+
+
P
Predge alerts@predge_alerts_bot
+
+
Disputed
Montana Grizzlies vs. Idaho Vandals · O/U 151.5
proposal Under · 9 Jan, 04:38 UTC
not final yet
+
Open record
Mute
+
Signed record
dispute_count 1 · not final
kid 13fa3d18a369e6c7
+
Final: Over
Settled on-chain. Nothing left to settle.
+
+
+
__CURSOR__
+
+
settlement-risk/1137824.json
+
+
{
+
"issuer": "predge.io",
+
"chain": "polygon",
+
"market_id": "1137824",
+
"dispute_count": "1",
+
"disputed_proposal": "Under",
+
"onchain_resolution": "Over",
+
"uma_state": "settled",
+
"risk_level": "resolved"
+
}
+
ed25519 8c5a4c46...67379209
kid 13fa3d18a369e6c7
+
+
+
+
verify · offline
+
+
$verify record.json
+
canonicalkeys sorted ✓
+
ed25519signature valid ✓
+
networknone used ✓
+
Valid
+
+
+
__WORDMARK__
Lending desksprice settlement risk
Agentscheck before they act
Vaultsrelease only when final
Tradersalerts coming soon
+
+ +
Product illustration
+
Product illustration · coming soon
+
+
+
+ + + + diff --git a/ad-v3/src/panels.css b/ad-v3/src/panels.css new file mode 100644 index 0000000..fc3f37b --- /dev/null +++ b/ad-v3/src/panels.css @@ -0,0 +1,211 @@ + +@font-face{font-family:"Inter";font-weight:400;src:url(assets/fonts/inter-latin-400-normal.woff2) format("woff2");} +@font-face{font-family:"Inter";font-weight:500;src:url(assets/fonts/inter-latin-500-normal.woff2) format("woff2");} +@font-face{font-family:"Inter";font-weight:600;src:url(assets/fonts/inter-latin-600-normal.woff2) format("woff2");} +@font-face{font-family:"Inter";font-weight:700;src:url(assets/fonts/inter-latin-700-normal.woff2) format("woff2");} +@font-face{font-family:"Inter";font-weight:800;src:url(assets/fonts/inter-latin-800-normal.woff2) format("woff2");} +@font-face{font-family:"Inter";font-weight:900;src:url(assets/fonts/inter-latin-900-normal.woff2) format("woff2");} +@font-face{font-family:"JetBrains Mono";font-weight:400;src:url(assets/fonts/JetBrainsMono-400.woff2) format("woff2");} +@font-face{font-family:"JetBrains Mono";font-weight:700;src:url(assets/fonts/JetBrainsMono-700.woff2) format("woff2");} +:root{ + --paper:#F4F2EC; --paper2:#EAE6DC; --gridc:rgba(24,22,18,.07); + --ink:#0D0D0F; --ink2:#5A5B61; --ink3:#8C8D93; + --amber:#F5A623; --amberInk:#B87100; --amberSoft:#FCE9C6; + --ui:#101114; --ui2:#181A1F; --ui3:#20232A; --uiLine:#2A2D35; --uiFg:#ECEDEF; --uiDim:#8A8F9A; + --good:#2FBF71; --bad:#EF5A4C; + --sans:"Inter",sans-serif; --mono:"JetBrains Mono",monospace; +} +*{margin:0;padding:0;box-sizing:border-box;} +html,body{width:__W__px;height:__H__px;overflow:hidden;background:#07070A;} +body{font-family:var(--sans);color:var(--ink);-webkit-font-smoothing:antialiased;} +#root{position:relative;width:100%;height:100%;overflow:hidden;background:#07070A;} +.clip{position:absolute;inset:0;} +.mono{font-family:var(--mono);} + +/* ── backgrounds ─────────────────────────────────────────── */ +.dark-bg{position:absolute;inset:0;background:#07070A;overflow:hidden;} +.blob{position:absolute;border-radius:50%;} +.b1{width:1500px;height:1500px;left:-300px;top:-520px;background:radial-gradient(closest-side,rgba(245,166,35,.55),rgba(245,166,35,.18) 45%,rgba(245,166,35,0) 72%);} +.b2{width:1700px;height:1700px;left:700px;top:60px;background:radial-gradient(closest-side,rgba(214,82,32,.42),rgba(150,40,40,.14) 50%,rgba(0,0,0,0) 74%);} +.b3{width:1300px;height:1300px;left:240px;top:420px;background:radial-gradient(closest-side,rgba(70,60,140,.40),rgba(40,30,90,.12) 52%,rgba(0,0,0,0) 74%);} +.leak{position:absolute;width:900px;height:2200px;top:-560px;left:-900px;transform:rotate(18deg); + background:linear-gradient(90deg,rgba(255,200,120,0),rgba(255,214,150,.30) 45%,rgba(255,240,210,.42) 50%,rgba(255,200,120,0));mix-blend-mode:screen;} +.vign{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 50%,rgba(0,0,0,0) 45%,rgba(0,0,0,.62) 100%);} +.grain{position:absolute;left:-256px;top:-256px;right:-256px;bottom:-256px;opacity:.16;mix-blend-mode:overlay; + background-image:url("data:image/svg+xml;utf8,");} +.light-bg{position:absolute;inset:0;background:var(--paper);overflow:hidden;} +.gridlines{position:absolute;left:-480px;top:-480px;width:calc(100% + 4200px);height:calc(100% + 960px); + background-image:linear-gradient(var(--gridc) 1px,transparent 1px),linear-gradient(90deg,var(--gridc) 1px,transparent 1px); + background-size:96px 96px;} +.lightwash{position:absolute;inset:0;background:radial-gradient(ellipse 70% 60% at 70% 45%,rgba(255,255,255,.75),rgba(255,255,255,0) 70%), + radial-gradient(ellipse 50% 50% at 10% 95%,rgba(245,166,35,.10),rgba(245,166,35,0) 70%);} +#flash{position:absolute;inset:0;background:var(--amber);opacity:0;pointer-events:none;} + +/* ── scene scaffolding ───────────────────────────────────── */ +.persona{display:inline-flex;align-items:center;gap:12px;height:48px;padding:0 20px 0 14px;border-radius:24px;background:#fff; + border:1px solid rgba(0,0,0,.08);box-shadow:0 6px 18px rgba(30,25,10,.06);font-weight:600;font-size:22px;color:var(--ink);margin-bottom:34px;} +.persona.soon{background:var(--amber);border-color:var(--amber);color:#1A1205;padding:0 20px;margin-left:8px;} +.persona i{width:28px;height:28px;border-radius:50%;background:var(--amber);display:grid;place-items:center;} +.persona i svg{width:16px;height:16px;} +.illus{position:absolute;right:42px;bottom:32px;font-size:16px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink2);font-weight:600;} + +/* dark product panels */ +.panel{position:relative;background:var(--ui);color:var(--uiFg);border-radius:26px;border:1px solid #23252C; + box-shadow:0 60px 120px -30px rgba(30,22,8,.42),0 18px 40px -12px rgba(30,22,8,.28);overflow:hidden;} +.chrome{display:flex;align-items:center;gap:10px;height:58px;padding:0 22px;border-bottom:1px solid var(--uiLine);background:var(--ui2); + font-size:18px;color:var(--uiDim);font-weight:500;} +.chrome .d{width:13px;height:13px;border-radius:50%;background:#3A3D46;} +.chrome .ttl{margin-left:12px;color:var(--uiFg);font-weight:600;} +.chrome .rt{margin-left:auto;display:flex;align-items:center;gap:9px;} +.sdot{width:12px;height:12px;border-radius:50%;background:#5B5F69;display:inline-block;} +.chip{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 14px;border-radius:18px;font-size:17px;font-weight:600;white-space:nowrap;} +.chip .sdot{width:10px;height:10px;} +.c-grey{background:#262931;color:#C9CCD3;} .c-amber{background:rgba(245,166,35,.16);color:var(--amber);} .c-good{background:rgba(47,191,113,.15);color:var(--good);} .c-bad{background:rgba(239,90,76,.15);color:var(--bad);} + +/* cursor */ +.cursor{position:absolute;left:0;top:0;width:92px;height:92px;margin:-7px 0 0 -11px;z-index:30;pointer-events:none; + filter:drop-shadow(0 6px 8px rgba(0,0,0,.35));will-change:transform;} +.cursor svg{width:100%;height:100%;} +.ripple{position:absolute;width:80px;height:80px;margin:-40px 0 0 -40px;border-radius:50%;border:3px solid var(--amber);opacity:0;z-index:29;} + +/* ── S1 opener ───────────────────────────────────────────── */ +.wm{width:1080px;} +.wm svg{width:100%;height:auto;display:block;} + +/* ── S2 hook: market card ────────────────────────────────── */ +.mcard{width:860px;padding:0 0 30px;} +.mc-body{padding:30px 36px 0;} +.mc-top{display:flex;align-items:center;gap:14px;font-size:19px;color:var(--uiDim);font-weight:500;} +.mc-ball{width:44px;height:44px;border-radius:12px;background:#2A1F12;display:grid;place-items:center;} +.mc-top .id{margin-left:auto;font-family:var(--mono);font-size:17px;} +.mc-title{margin-top:22px;font-size:40px;font-weight:700;letter-spacing:-.02em;line-height:1.12;} +.mc-sub{margin-top:8px;font-size:22px;color:var(--uiDim);} +.mc-outs{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:28px;} +.out{height:76px;border-radius:16px;background:var(--ui3);display:flex;align-items:center;justify-content:space-between;padding:0 24px;font-size:26px;font-weight:700;border:2px solid transparent;} +.out small{font-size:18px;color:var(--uiDim);font-weight:600;} +.mc-status{margin-top:26px;display:flex;flex-direction:column;gap:12px;} +.st{display:flex;align-items:center;gap:14px;height:62px;padding:0 20px;border-radius:14px;background:var(--ui2);font-size:22px;color:#C9CCD3;opacity:0;} +.st b{color:#fff;font-weight:700;} +.st .tm{margin-left:auto;font-family:var(--mono);font-size:17px;color:var(--uiDim);} +.st .sdot{width:14px;height:14px;} +.st-disp{background:rgba(245,166,35,.10);border:1px solid rgba(245,166,35,.35);} +.st-disp b{color:var(--amber);} +.st-final b{color:var(--good);} +.winbar{height:6px;border-radius:3px;background:#2A2D35;margin:0 20px;overflow:hidden;} +.winbar i{display:block;height:100%;width:100%;background:var(--uiDim);transform-origin:0 50%;} +.slam{position:absolute;right:36px;top:146px;padding:12px 26px;border-radius:14px;background:var(--amber);color:#1A1205;font-weight:900;font-size:34px;letter-spacing:.06em;transform:rotate(-6deg);opacity:0;box-shadow:0 18px 40px rgba(245,166,35,.35);} + +/* ── S3 pipeline graph ───────────────────────────────────── */ +.node{position:absolute;display:flex;align-items:center;gap:14px;height:76px;padding:0 26px 0 18px;border-radius:20px;background:#fff;border:1px solid rgba(0,0,0,.08); + box-shadow:0 14px 30px -10px rgba(30,25,10,.18);font-size:24px;font-weight:600;white-space:nowrap;} +.node i{width:42px;height:42px;border-radius:12px;background:var(--paper2);display:grid;place-items:center;font-family:var(--mono);font-weight:700;font-size:16px;color:var(--ink2);} +.node.hub{height:120px;padding:0 40px;border-radius:30px;background:var(--ui);border-color:#23252C;} +.node.hub .wmm{width:300px;} +.node.hub .wmm svg{width:100%;height:auto;display:block;} +.node.out i{background:var(--amberSoft);color:var(--amberInk);} + +/* ── S4 numbers ──────────────────────────────────────────── */ + +/* ── S5 lending desk ─────────────────────────────────────── */ +.desk{width:1000px;} +.desk .chrome{font-size:20px;height:62px;} +.desk .chip{height:46px;padding:0 18px;font-size:22px;border-radius:23px;} +.desk .chip .sdot{width:12px;height:12px;} +.tbl{padding:10px 30px 24px;} +.tr{display:grid;grid-template-columns:1fr 150px 110px 200px;align-items:center;gap:12px;height:100px;border-bottom:1px solid var(--uiLine);font-size:27px;position:relative;} +.tr.th{height:60px;font-size:17px;letter-spacing:.1em;text-transform:uppercase;color:var(--uiDim);font-weight:600;} +.tr .mk{font-weight:600;line-height:1.2;} +.tr .mk small{display:block;font-size:19px;color:var(--uiDim);font-weight:500;margin-top:3px;} +.tr .num{font-family:var(--mono);font-size:25px;text-align:right;padding-right:6px;} +.tr .ltv{font-family:var(--mono);font-size:30px;font-weight:700;text-align:right;padding-right:6px;} +.tr .sett{position:relative;height:46px;} +.tr .sett .chip{position:absolute;right:0;top:0;} +.rowhl{position:absolute;inset:6px -14px;border-radius:14px;background:rgba(245,166,35,.09);border:1px solid rgba(245,166,35,.32);opacity:0;} +.deskfoot{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 30px 24px;font-size:23px;color:var(--uiDim);} +.deskfoot .bp{font-family:var(--mono);font-size:46px;font-weight:700;color:#fff;} +.deskfoot .tag{font-size:20px;font-weight:600;} +.toast{position:absolute;right:24px;top:80px;width:520px;padding:16px 20px;border-radius:16px;background:#23262E;border:1px solid #3A3D46; + box-shadow:0 20px 40px rgba(0,0,0,.45);display:flex;gap:14px;align-items:flex-start;z-index:5;opacity:0;} +.toast .ti{width:38px;height:38px;border-radius:10px;background:var(--amber);display:grid;place-items:center;flex:none;font-weight:900;color:#1A1205;font-size:20px;} +.toast b{display:block;font-size:23px;color:#fff;} +.toast span{font-size:18px;color:var(--uiDim);font-family:var(--mono);} +.pop{position:absolute;width:440px;padding:20px 22px;border-radius:16px;background:#fff;color:var(--ink);box-shadow:0 24px 50px rgba(0,0,0,.45);z-index:6;opacity:0;font-size:20px;line-height:1.45;} +.pop b{font-size:23px;display:block;margin-bottom:6px;} +.pop .k{font-family:var(--mono);font-size:16px;color:var(--ink2);} + +/* ── S6 agent terminal ───────────────────────────────────── */ +.term{width:980px;} +.tbody{padding:26px 32px 30px;font-family:var(--mono);font-size:23px;line-height:1.5;min-height:560px;} +.ln{opacity:0;white-space:pre;display:flex;gap:14px;} +#rec .ln{border-radius:6px;margin-left:-8px;margin-right:-8px;padding:0 8px;} +.ln + .ln{margin-top:7px;} +.ln .p{color:var(--amber);} .ln .g{color:var(--good);} .ln .r{color:var(--bad);} .ln .dm{color:var(--uiDim);} .ln .wh{color:#fff;} +.ln.dec{margin-top:18px !important;padding:14px 18px;border-radius:12px;background:rgba(47,191,113,.12);border:1px solid rgba(47,191,113,.35);color:#fff;} +.keycap{position:absolute;width:150px;height:130px;border-radius:24px;background:linear-gradient(#FFFFFF,#ECE9E2);border:1px solid rgba(0,0,0,.12); + box-shadow:0 10px 0 #D3CFC4,0 26px 40px rgba(30,25,10,.25);display:flex;flex-direction:column;justify-content:space-between;padding:18px 20px; + font-weight:600;font-size:20px;color:var(--ink2);z-index:8;} +.keycap .sym{font-size:44px;color:var(--ink);font-weight:500;align-self:flex-end;line-height:1;} + +/* ── S7 vault ────────────────────────────────────────────── */ +.vault{width:900px;} +.vbody{padding:30px 36px 30px;} +.vlab{font-size:17px;letter-spacing:.1em;text-transform:uppercase;color:var(--uiDim);font-weight:600;} +.vmk{margin-top:8px;font-size:28px;font-weight:600;} +.vamt{margin-top:22px;display:flex;align-items:baseline;gap:14px;} +.vamt b{font-family:var(--mono);font-size:64px;font-weight:700;letter-spacing:-.02em;} +.vamt span{font-size:24px;color:var(--uiDim);font-weight:600;} +.steps{margin-top:28px;display:grid;grid-template-columns:repeat(5,1fr);gap:10px;} +.step{position:relative;height:70px;border-radius:12px;background:var(--ui2);display:flex;align-items:flex-end;padding:0 0 12px 14px;font-size:19px;font-weight:600;color:var(--uiDim);overflow:hidden;} +.step i{position:absolute;left:0;top:0;height:6px;width:100%;background:var(--uiLine);} +.step i b{display:block;height:100%;width:100%;transform-origin:0 50%;transform:scaleX(0);background:var(--amber);} +.vrow{margin-top:30px;display:flex;align-items:center;gap:22px;} +.btn{height:78px;padding:0 44px;border-radius:18px;background:var(--amber);color:#1A1205;font-weight:800;font-size:28px;display:flex;align-items:center;} +.vmsg{font-size:25px;font-weight:700;opacity:0;} +.vlog{margin-top:26px;padding:16px 20px;border-radius:14px;background:#0A0B0D;border:1px solid var(--uiLine);font-family:var(--mono);font-size:20px;line-height:1.6;min-height:120px;} +.vlog .ln{font-size:20px;} + +/* ── S8 trader phone ─────────────────────────────────────── */ +.phone{width:440px;height:880px;border-radius:66px;background:#0B0C0E;padding:14px;box-shadow:0 60px 120px -30px rgba(30,22,8,.5),0 0 0 2px #2A2C31 inset;position:relative;} +.screen{position:relative;width:100%;height:100%;border-radius:54px;overflow:hidden;background:linear-gradient(160deg,#3A2A16,#151418 55%,#0E1520);} +.notch{position:absolute;left:50%;top:14px;width:130px;height:36px;margin-left:-65px;border-radius:20px;background:#000;z-index:9;} +.lock{position:absolute;left:0;right:0;top:120px;text-align:center;color:#fff;} +.lock .tme{font-size:96px;font-weight:300;letter-spacing:-.03em;} +.lock .dt{font-size:20px;color:rgba(255,255,255,.75);font-weight:500;} +.notif{position:absolute;left:14px;right:14px;top:330px;padding:16px 18px;border-radius:24px;background:rgba(40,40,46,.86);color:#fff;display:flex;gap:14px;opacity:0;z-index:4;} +.notif .ai{width:46px;height:46px;border-radius:12px;background:var(--amber);flex:none;display:grid;place-items:center;font-weight:900;color:#1A1205;font-size:24px;} +.notif b{font-size:18px;display:block;} +.notif span{font-size:18px;line-height:1.3;color:rgba(255,255,255,.88);display:block;margin-top:2px;} +.chat{position:absolute;inset:0;background:#0F1621;opacity:0;z-index:6;} +.chat .ch{height:118px;padding:58px 20px 0;display:flex;align-items:center;gap:12px;background:#17212B;border-bottom:1px solid #22303D;} +.chat .ch .av{width:40px;height:40px;border-radius:50%;background:var(--amber);display:grid;place-items:center;font-weight:900;color:#1A1205;font-size:20px;} +.chat .ch b{font-size:17px;color:#fff;display:block;} .chat .ch span{font-size:14px;color:#6FA8DC;} +.msgs{padding:18px 14px;display:flex;flex-direction:column;gap:12px;} +.msg{background:#182533;border-radius:18px 18px 18px 6px;padding:14px 16px;color:#E9ECF1;font-size:19px;line-height:1.38;opacity:0;} +.msg .t{font-weight:800;font-size:19px;margin-bottom:4px;} +.msg .t.am{color:var(--amber);} .msg .t.gd{color:var(--good);} +.msg .mm{font-family:var(--mono);font-size:16px;color:#8FA3B8;margin-top:6px;} +.ibtns{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:-4px;opacity:0;} +.ibtns div{height:46px;border-radius:12px;background:#22303D;color:#BFD6EA;font-size:16px;font-weight:600;display:grid;place-items:center;} +.phonewrap{position:relative;} + +/* ── S9 proof ────────────────────────────────────────────── */ +.proof{display:flex;gap:28px;align-items:stretch;} +.rec{width:560px;} +.rec .tbody,.ver .tbody{min-height:0;font-size:20px;line-height:1.55;padding:22px 26px 24px;} +.ver{width:450px;} +.jk{color:#9BB7FF;} .js{color:#E9D5A6;} +.sigrow{margin-top:14px;padding-top:14px;border-top:1px solid var(--uiLine);font-size:16px;color:var(--uiDim);} +.sigrow b{color:var(--amber);font-weight:400;} +.vline{display:flex;justify-content:space-between;} +.okbig{margin-top:22px;height:88px;border-radius:16px;background:rgba(47,191,113,.12);border:1px solid rgba(47,191,113,.4);display:flex;align-items:center;gap:16px;padding:0 22px;color:var(--good);font-family:var(--sans);font-weight:800;font-size:28px;opacity:0;} +.okbig i{width:46px;height:46px;border-radius:50%;background:var(--good);display:grid;place-items:center;} + +/* ── S10 hub ─────────────────────────────────────────────── */ +.tile{position:absolute;width:330px;height:150px;border-radius:26px;background:#fff;border:1px solid rgba(0,0,0,.08);box-shadow:0 20px 40px -14px rgba(30,25,10,.22); + display:flex;align-items:center;gap:18px;padding:0 26px;font-size:28px;font-weight:700;letter-spacing:-.01em;} +.tile i{width:62px;height:62px;border-radius:18px;background:var(--amberSoft);display:grid;place-items:center;flex:none;} +.tile i svg{width:32px;height:32px;} +.tile small{display:block;font-size:17px;font-weight:500;color:var(--ink2);margin-top:4px;letter-spacing:0;} + +/* ── S11/S12 close ───────────────────────────────────────── */ + diff --git a/ad-v3/sync-check.py b/ad-v3/sync-check.py new file mode 100644 index 0000000..f38a899 --- /dev/null +++ b/ad-v3/sync-check.py @@ -0,0 +1,68 @@ +# Cut-to-beat sync of a rendered file. +# audio: tempo by comb search on the onset envelope, phase from kick attacks (low-passed energy, +# first rise to 50% of the local peak) in a +-100 ms window around each grid beat; +# video: per-frame difference on a small grey proxy; hits 1-2 frames after a cut (in-shot snaps, flash-off) are merged. +# Usage: python3 sync2.py video.mp4 [scene_threshold] +import subprocess, re, sys, numpy as np +from scipy.signal import butter, sosfilt +f = sys.argv[1]; th = sys.argv[2] if len(sys.argv) > 2 else "1.5"; sr = 44100; FR = 1 / 30 +x = np.frombuffer(subprocess.run(["ffmpeg", "-loglevel", "error", "-i", f, "-ac", "1", "-ar", str(sr), "-f", "f32le", "-"], capture_output=True).stdout, dtype=np.float32) +dur = len(x) / sr +# tempo: spectral-flux comb search +hop, n = 256, 1024 +fr = np.lib.stride_tricks.sliding_window_view(x[::2], n)[::hop] * np.hanning(n); fps = sr / 2 / hop +S = np.log1p(10 * np.abs(np.fft.rfft(fr, axis=1))) +flux = np.concatenate([[0], np.maximum(0, np.diff(S, axis=0)).sum(1)]); env = np.maximum(flux - np.convolve(flux, np.ones(32) / 32, "same"), 0) +best = (0, 0) +for bpm in np.arange(120, 130, 0.01): + per = 60 / bpm * fps; ph = np.arange(0, per, 0.25) + idx = (np.arange(0, len(env) / per - 1)[:, None] * per + ph[None, :]).astype(int); v = env[idx].sum(0).max() + if v > best[0]: best = (v, bpm) +bpm = best[1]; beat = 60 / bpm +# phase: full-band spectral-flux peak (3 ms hop) within +-80 ms of each beat; tempo/phase by least squares +h2, n2 = 128, 1024 +fr2 = np.lib.stride_tricks.sliding_window_view(x, n2)[::h2] * np.hanning(n2); f2 = sr / h2 +S2 = np.log1p(10 * np.abs(np.fft.rfft(fr2, axis=1))) +fl = np.concatenate([[0], np.maximum(0, np.diff(S2, axis=0)).sum(1)]) +ts, ks = [], [] +for k in range(int(dur / beat)): + g = k * beat; a, b = int((g - 0.08) * f2), int((g + 0.08) * f2) + if a < 0 or b >= len(fl): continue + seg = fl[a:b] + if seg.max() < np.percentile(fl, 97): continue + ts.append((a + seg.argmax() + n2 / 2 / h2) / f2); ks.append(k) +A = np.vstack([np.ones(len(ks)), ks]).T; ph, beat = np.linalg.lstsq(A, np.array(ts), rcond=None)[0]; bpm = 60 / beat +offs = np.array(ts) - (ph + beat * np.array(ks)) +# video cuts: per-frame mean absolute difference on a 192x108 grey proxy; a cut is a frame whose +# difference jumps above both a floor and 4x the running median (merging hits within 2 frames) +w, h = 192, 108 +raw = subprocess.run(["ffmpeg", "-loglevel", "error", "-i", f, "-vf", f"scale={w}:{h},format=gray", "-f", "rawvideo", "-"], capture_output=True).stdout +fr = np.frombuffer(raw, dtype=np.uint8).reshape(-1, h, w).astype(np.float32) +d = np.concatenate([[0], np.abs(np.diff(fr, axis=0)).mean(axis=(1, 2))]) +med = np.array([np.median(d[max(0, i - 15):i + 15]) for i in range(len(d))]) +hits = [i for i in range(1, len(d)) if d[i] > max(float(th), 4 * med[i]) and d[i] >= d[i - 1]] +cuts = [] +for i in hits: + if cuts and i - cuts[-1] <= 2: continue + cuts.append(i) +raw = hits; cuts = np.array(cuts) / 30.0 +def off(t, step): return t - (ph + np.round((t - ph) / step) * step) +dh = off(cuts, beat / 2); db = off(cuts, beat) +print(f"audio: {bpm:.3f} BPM, kick phase {ph*1000:+.1f} ms from {len(offs)} onset peaks (residual median {np.median(np.abs(offs))*1000:.1f} ms)") +print(f"video: {len(cuts)} cuts detected (frame-diff floor {th}, raw {len(raw)}) in {dur:.2f} s -> average shot {dur/(len(cuts)+1):.2f} s") +print(f"cut vs nearest half-beat: median {np.median(np.abs(dh))*1000:.1f} ms, p90 {np.percentile(np.abs(dh),90)*1000:.1f} ms, max {np.abs(dh).max()*1000:.1f} ms; within 1 frame: {(np.abs(dh) <= FR + 1e-6).sum()}/{len(cuts)}") +print(f"cuts on a full beat (within 1 frame): {(np.abs(db) <= FR + 1e-6).sum()}/{len(cuts)}") +# Optional: the shot list (src/ad.html) -> measure each designed cut in the video and report its offset +if len(sys.argv) > 3: + src = open(sys.argv[3]).read(); a = src.index("const S = ["); b = src.index("];", a) + beats = [float(m) for m in re.findall(r"^\s*(?:\[|[TNU]\()(\d+(?:\.\d+)?),", src[a:b], re.M)][1:] + det = np.array(hits) / 30.0 + found, offs2 = 0, [] + for bt in beats: + t = bt * 60 / 125 + if not len(det): break + j = np.argmin(np.abs(det - t)) + if abs(det[j] - t) <= 0.1: found += 1; offs2.append(det[j]) + o2 = off(np.array(offs2), beat / 2) + print(f"shot list: {len(beats) + 1} shots, {len(beats)} cuts, average shot {dur/(len(beats)+1):.2f} s; {found}/{len(beats)} cuts found in the video") + print(f"designed cuts vs audio grid: median {np.median(np.abs(o2))*1000:.1f} ms, p90 {np.percentile(np.abs(o2),90)*1000:.1f} ms, max {np.abs(o2).max()*1000:.1f} ms; within 1 frame: {(np.abs(o2) <= FR + 1e-6).sum()}/{found}") diff --git a/ad-v3/vendor/gsap.min.js b/ad-v3/vendor/gsap.min.js new file mode 100644 index 0000000..72c17a8 --- /dev/null +++ b/ad-v3/vendor/gsap.min.js @@ -0,0 +1,10 @@ +/*! + * GSAP 3.15.0 + * https://gsap.com + * + * @license Copyright 2026, GreenSock. All rights reserved. + * Subject to the terms at https://gsap.com/standard-license. + * @author: Jack Doyle, jack@greensock.com + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(t)||r(t)}function R(t){return(i=bt(t,ht))&&Fe}function S(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function T(t,e){return!e&&console.warn(t)}function U(t,e){return t&&(ht[t]=e)&&i&&(i[t]=e)||ht}function V(){return 0}function ga(t){var e,r,i=t[0];if(v(i)||s(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=yt.length;r--&&!yt[r].targetTest(i););e=yt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Xt(t[r],e)))||t.splice(r,1);return t}function ha(t){return t._gsap||ga(Pt(t))[0]._gsap}function ia(t,e,r){return(r=t[e])&&s(r)?t[e]():u(r)&&t.getAttribute&&t.getAttribute(e)||r}function ja(t,e){return(t=t.split(",")).forEach(e)||t}function ka(t){return Math.round(1e5*t)/1e5||0}function la(t){return Math.round(1e7*t)/1e7||0}function ma(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function na(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++ia;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function Ba(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function Ca(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0}function Da(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function Fa(t,e,r,i){return t._startAt&&(I?t._startAt.revert(ft):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))}function Ha(t){return t._repeat?wt(t._tTime,t=t.duration()+t._rDelay)*t:0}function Ja(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Ka(t){return t._end=la(t._start+(t._tDur/Math.abs(t._ts||t._rts||q)||0))}function La(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=la(r._time-(0q)&&e.render(r,!0)),Da(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur(n=Math.abs(n))&&(a=i,o=n);return a}function wb(t){return Ca(t),t.scrollTrigger&&t.scrollTrigger.kill(!!I),t.progress()<1&&At(t,"onInterrupt"),t}function zb(t){if(t)if(t=!t.name&&t.default||t,x()||t.headless){var e=t.name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:V,render:_e,add:$t,kill:Te,modifier:ve,rawVars:0},a={targetTest:0,get:0,getSetter:ue,aliases:{},register:0};if(Lt(),t!==i){if(mt[e])return;ta(i,ta(xa(t,n),a)),bt(i.prototype,bt(n,xa(t,a))),mt[i.prop=e]=i,t.targetTest&&(yt.push(i),dt[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}U(e,i),t.register&&t.register(Fe,i,we)}else Dt.push(t)}function Cb(t,e,r){return(6*(t+=t<0?1:1>16,e>>8&zt,e&zt]:0:Rt.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Rt[e])p=Rt[e];else if("#"===e.charAt(0)){if(e.length<6&&(e="#"+(n=e.charAt(1))+n+(a=e.charAt(2))+a+(s=e.charAt(3))+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&zt,p&zt,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&zt,e&zt]}else if("hsl"===e.substr(0,3))if(p=d=e.match(rt),r){if(~e.indexOf("="))return p=e.match(it),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,u=p[1]/100,n=2*(h=p[2]/100)-(a=h<=.5?h*(u+1):h+u-h*u),3=X?u.endTime(!1):t._dur;return r(e)&&(isNaN(e)||e in o)?(a=e.charAt(0),s="%"===e.substr(-1),n=e.indexOf("="),"<"===a||">"===a?(0<=n&&(e=e.replace(/=/,"")),("<"===a?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(s?(n<0?u:i).totalDuration()/100:1)):n<0?(e in o||(o[e]=h),o[e]):(a=parseFloat(e.charAt(n-1)+e.substr(n+1)),s&&i&&(a=a/100*(K(i)?i[0]:i).totalDuration()),1=r&&te)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0=i&&(a instanceof te?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return r(t)?this.removeLabel(t):s(t)?this.killTweensOf(t):(t.parent===this&&Ba(this,t),t===this._recent&&(this._recent=this._last),Da(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=la(It.time-(0r:!r||s.isActive())&&n.push(s):(i=s.getTweensOf(a,r)).length&&n.push.apply(n,i),s=s._next;return n},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=Ot(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=te.to(i,ta({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||q,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ua(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,ta({startAt:{time:Ot(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+q)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);var i,n=this._first,a=this.labels;for(t=la(t);n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return Da(this)},e.invalidate=function invalidate(t){var e=this._first;for(this._lock=0;e;)e.invalidate(t),e=e._next;return i.prototype.invalidate.call(this,t)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Da(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=X;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Na(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=la(r/a._ts),a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ua(a,a===L&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(L._ts&&(qa(L,Ja(t,L)),f=It.frame),It.frame>=vt){vt+=Y.autoSleep||120;var e=L._first;if((!e||!e._ts)&&Y.autoSleep&&It._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||It.sleep()}}},Timeline}(qt);ta(Gt.prototype,{_lock:0,_hasPause:0,_forcing:0});function cc(t,e,i,n,a,o){var u,h,l,f;if(mt[t]&&!1!==(u=new mt[t]).init(a,u.rawVars?e[t]:function _processVars(t,e,i,n,a){if(s(t)&&(t=Qt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||K(t)||J(t))return r(t)?Qt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Qt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new we(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==c))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function ic(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if(K(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Zt,Wt,$t=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var c,d=t[e],p="get"!==i?i:s(d)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():d,_=s(d)?l?se:ae:ie;if(r(n)&&(~n.indexOf("random(")&&(n=rb(n)),"="===n.charAt(1)&&(!(c=ma(p,n)+(_a(p)||0))&&0!==c||(n=c))),!f||p!==n||Wt)return isNaN(p*n)||""===n?(d||e in t||S(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,c,d,p,_=new we(this._pt,t,e,0,1,pe,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(d=~(i+="").indexOf("random("))&&(i=rb(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(at)||[];o=at.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(c=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:c,c:"="===l.charAt(1)?ma(c,l)-c:parseFloat(l)-c,m:h&&h<4?Math.round:0},m=at.lastIndex);return _.c=m")}),s.duration();else{for(l in u={},k)"ease"===l||"easeEach"===l||ic(l,k[l],u,k.easeEach);for(l in u)for(A=u[l].sort(function(t,e){return t.t-e.t}),o=R=0;o=t._tDur||e<0)&&t.ratio===u&&(u&&Ca(t,1),r||I||(At(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets},e.invalidate=function invalidate(t){return t&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),E.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i,n){d||It.wake(),this._ts||this.play();var a,s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ht(this,s),a=this._ease(s/this._dur),function _updatePropTweens(t,e,r,i,n,a,s,o){var u,h,l,f,c=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!c)for(c=t._ptCache[e]=[],l=t._ptLookup,f=t._targets.length;f--;){if((u=l[f][e])&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==e&&u.fp!==e;)u=u._next;if(!u)return Wt=1,t.vars[e]="+=0",Ht(t,s),Wt=0,o?T(e+" not eligible for reset. Try splitting into individual properties"):1;c.push(u)}for(f=c.length;f--;)(u=(h=c[f])._pt||h).s=!i&&0!==i||n?u.s+(i||0)+a*u.c:i,u.c=r-u.s,h.e&&(h.e=ka(r)+_a(h.e)),h.b&&(h.b=u.s+_a(h.b))}(this,t,e,r,i,a,s,n)?this.resetTo(t,e,r,i,1):(La(this,0),this.parent||Aa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?wb(this):this.scrollTrigger&&this.scrollTrigger.kill(!!I),this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Zt&&!0!==Zt.vars.overwrite)._first||wb(this),this.parent&&i!==this.timeline.totalDuration()&&Ua(this,this._dur*this.timeline._tDur/i,0,1),this}var n,a,s,o,u,h,l,f=this._targets,c=t?Pt(t):f,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,c))return"all"===e&&(this._pt=0),wb(this);for(n=this._op=this._op||[],"all"!==e&&(r(e)&&(u={},ja(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?ha(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=bt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~c.indexOf(f[l]))for(u in a=d[l],"all"===e?(n[l]=e,o=a,s={}):(s=n[l]=n[l]||{},o=e),o)(h=a&&a[u])&&("kill"in h.d&&!0!==h.d.kill(u)||Ba(this,h,"_pt"),delete a[u]),"all"!==s&&(s[u]=1);return this._initted&&!this._pt&&p&&wb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Ya(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Ya(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return L.killTweensOf(t,e,r)},Tween}(qt);ta(te.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ja("staggerTo,staggerFrom,staggerFromTo",function(r){te[r]=function(){var t=new Gt,e=Ct.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function qc(t,e,r){return t.setAttribute(e,r)}function yc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var ie=function _setterPlain(t,e,r){return t[e]=r},ae=function _setterFunc(t,e,r){return t[e](r)},se=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},ue=function _getSetter(t,e){return s(t[e])?ae:u(t[e])&&t.setAttribute?qc:ie},fe=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},de=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},pe=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},_e=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},ve=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},Te=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?Ba(this,i,"_pt"):i.dep||(e=1),i=r;return!e},be=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},we=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=yc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||fe,this.d=s||this,this.set=o||ie,this.pr=u||0,(this._next=t)&&(t._prev=this)}ja(Tt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return dt[t]=1}),ht.TweenMax=ht.TweenLite=te,ht.TimelineLite=ht.TimelineMax=Gt,L=new Gt({sortChildren:!1,defaults:j,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Y.stringFilter=Ib;function Gc(t){return(Oe[t]||Me).map(function(t){return t()})}function Hc(){var t=Date.now(),o=[];2