hyperframes 0.8.201 → 0.8.202

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/{add-33XNCMY4.js → add-YC7QXNDO.js} +12 -12
  2. package/dist/{animatedGifPrep-MI7Z4OYQ.js → animatedGifPrep-SFHFVFFE.js} +6 -6
  3. package/dist/api.js +14 -14
  4. package/dist/{asset-RMRQN24O.js → asset-5E5BQ6BR.js} +2 -2
  5. package/dist/{assetCataloger-KWTQNFUU.js → assetCataloger-F6YSU3H6.js} +6 -6
  6. package/dist/{audio-SQDZZS6X.js → audio-UZKBYVZ5.js} +12 -12
  7. package/dist/{auth-PNC6K5ZD.js → auth-5DWW5DMO.js} +1 -1
  8. package/dist/{autoUpdate-MBZFLUF2.js → autoUpdate-D6HTQGOE.js} +2 -2
  9. package/dist/{backgroundChecks-ZMSPA6TK.js → backgroundChecks-FW4MBBK2.js} +3 -3
  10. package/dist/backgroundChecksWorker.js +3 -3
  11. package/dist/{batchRender-2MMOZRMW.js → batchRender-DXD5THWY.js} +4 -4
  12. package/dist/{beats-GDLNPR4A.js → beats-WRF4CRL7.js} +8 -8
  13. package/dist/{benchmark-AUKB3XDF.js → benchmark-NDCR2AAG.js} +9 -9
  14. package/dist/{browser-C3AU5TST.js → browser-KSG6M66G.js} +3 -3
  15. package/dist/{bundleWithLocalizedFonts-G3UT65XI.js → bundleWithLocalizedFonts-GJ2UYZ6E.js} +2 -2
  16. package/dist/{capture-XGBPNGC5.js → capture-DTF47QX3.js} +2 -2
  17. package/dist/{capture-EKNPCFPF.js → capture-FRVDEVPB.js} +9 -9
  18. package/dist/{captureCompositionFrame-4HHLPTDH.js → captureCompositionFrame-IC3MEOJR.js} +11 -11
  19. package/dist/{catalog-HLDNEJX3.js → catalog-TX3BMPOA.js} +12 -12
  20. package/dist/{catch-up-LRFV4LJO.js → catch-up-YMVIJI2W.js} +4 -4
  21. package/dist/{check-XWHWGNYE.js → check-2LBOZR6Z.js} +35 -35
  22. package/dist/{checkBrowser-KSOBXPJ3.js → checkBrowser-56C73ZNX.js} +29 -29
  23. package/dist/{chunk-DS3XITZ5.js → chunk-24PUQCZO.js} +2 -2
  24. package/dist/{chunk-ITJAHKYO.js → chunk-3HTXEXQ6.js} +1 -1
  25. package/dist/{chunk-UOSTDTBF.js → chunk-4OPDZMV6.js} +1 -1
  26. package/dist/{chunk-GC6N2LH5.js → chunk-5KPZ4QAS.js} +5 -5
  27. package/dist/{chunk-YBJECXQJ.js → chunk-73BGPSUW.js} +3 -3
  28. package/dist/{chunk-UKB62QOT.js → chunk-75KIZWAD.js} +2 -2
  29. package/dist/{chunk-AK2MOAJY.js → chunk-7J4GQHSG.js} +10 -10
  30. package/dist/{chunk-QXBZ6VBL.js → chunk-7KGCJQGS.js} +1 -1
  31. package/dist/{chunk-LVEXHBSH.js → chunk-ABTBAQDB.js} +1 -1
  32. package/dist/{chunk-TAXGZAXM.js → chunk-ANH7DV34.js} +9 -9
  33. package/dist/{chunk-A7YO6YSD.js → chunk-AQLRXGNN.js} +5 -5
  34. package/dist/{chunk-GNX3BCQP.js → chunk-AQVLMH5C.js} +1 -1
  35. package/dist/{chunk-JOI7TNCX.js → chunk-B22YBW5W.js} +1 -1
  36. package/dist/{chunk-Q6SHXSZX.js → chunk-B2OUZUY5.js} +1 -1
  37. package/dist/{chunk-7EJ7OZGC.js → chunk-BIV4FVEN.js} +1 -1
  38. package/dist/{chunk-YTBE4JCX.js → chunk-BU6XD7H2.js} +1 -1
  39. package/dist/{chunk-I4DHHX7E.js → chunk-BUIJG2BQ.js} +3 -3
  40. package/dist/{chunk-Q537KXWA.js → chunk-CL6ZTNQH.js} +180 -54
  41. package/dist/{chunk-B67P2WP3.js → chunk-COHU6S2X.js} +2 -2
  42. package/dist/{chunk-XG365L6T.js → chunk-CXTXB2LZ.js} +1 -1
  43. package/dist/{chunk-XONIZ5CH.js → chunk-DMZ3SCCU.js} +107 -19
  44. package/dist/{chunk-VKTUZP7U.js → chunk-DYDFCX4L.js} +1 -1
  45. package/dist/{chunk-MSGWR7WP.js → chunk-E3F5L6AB.js} +29 -0
  46. package/dist/{chunk-CD5ZU6PN.js → chunk-EPZXTQOO.js} +5 -5
  47. package/dist/{chunk-47NZWTJL.js → chunk-FWS2ZWV6.js} +2 -2
  48. package/dist/{chunk-SZNCAINN.js → chunk-GZCACSED.js} +1 -1
  49. package/dist/{chunk-SEAHCCQ4.js → chunk-I64A5P5H.js} +1 -1
  50. package/dist/{chunk-53E45AKI.js → chunk-IB6ICAI7.js} +9 -9
  51. package/dist/{chunk-QTWSMJ22.js → chunk-IKX2UHEM.js} +12 -12
  52. package/dist/{chunk-X72DJZCM.js → chunk-J3CZK6PI.js} +1 -1
  53. package/dist/{chunk-GKXH4C2B.js → chunk-JCS7WFRM.js} +1 -1
  54. package/dist/{chunk-3J5KO4EJ.js → chunk-JNBHYUEU.js} +3 -3
  55. package/dist/{chunk-TOT3CLUK.js → chunk-KFJMWPZT.js} +1 -1
  56. package/dist/{chunk-T33GLS6C.js → chunk-L5IKISP2.js} +3 -3
  57. package/dist/{chunk-74UH2KGI.js → chunk-LEQU6P6H.js} +2 -2
  58. package/dist/{chunk-FDWN4XAD.js → chunk-LMRTEJYY.js} +1 -1
  59. package/dist/{chunk-QYTGUWNF.js → chunk-MO4VKSFT.js} +1 -1
  60. package/dist/{chunk-IIH24PKY.js → chunk-MS4BAXOQ.js} +2 -2
  61. package/dist/{chunk-SIZYTGG4.js → chunk-NT3L4IMM.js} +1 -1
  62. package/dist/{chunk-IHQBTZHE.js → chunk-NZEASM7M.js} +1 -1
  63. package/dist/{chunk-7WEGIXI3.js → chunk-OJDOYHPQ.js} +1 -1
  64. package/dist/chunk-PH5PJY5Z.js +39 -0
  65. package/dist/{chunk-XHVQIOOF.js → chunk-PI256PSW.js} +24 -18
  66. package/dist/{chunk-RVKJDAYE.js → chunk-PLL6VC4F.js} +1 -1
  67. package/dist/{chunk-6UFEOVR5.js → chunk-PYS6IKKM.js} +1 -1
  68. package/dist/{chunk-57GN6KWT.js → chunk-PZIWSVMO.js} +11 -1
  69. package/dist/{chunk-VCVUEK65.js → chunk-QDEZ7LRH.js} +2 -2
  70. package/dist/{chunk-6XGO7ZKS.js → chunk-QGB5DECO.js} +1 -1
  71. package/dist/chunk-QTGKDF7D.js +3983 -0
  72. package/dist/{chunk-UIIGEPYY.js → chunk-QXQ74PYD.js} +2 -2
  73. package/dist/{chunk-K2AUGELJ.js → chunk-QZTFCWG7.js} +1 -1
  74. package/dist/{chunk-U2EK5MFR.js → chunk-REFMKHRE.js} +9 -9
  75. package/dist/{chunk-IFOZZYHK.js → chunk-REUZB3HL.js} +7 -7
  76. package/dist/{chunk-WO3XZ6HC.js → chunk-RFZJGC6V.js} +1 -1
  77. package/dist/{chunk-IDRUJFT4.js → chunk-RNLJJDGE.js} +2 -2
  78. package/dist/{chunk-2FA53V5S.js → chunk-SQNPFWFM.js} +2 -2
  79. package/dist/{chunk-L33EDCSR.js → chunk-TOFL5P27.js} +5 -5
  80. package/dist/{chunk-SGKG7DNX.js → chunk-UI7YYCN2.js} +2 -2
  81. package/dist/{chunk-VF2VMKNI.js → chunk-UMGDRGF5.js} +2 -2
  82. package/dist/{chunk-DWULQYOQ.js → chunk-V6MTGX7B.js} +3 -3
  83. package/dist/{chunk-TYRDDIIH.js → chunk-VOKI2HSE.js} +1 -1
  84. package/dist/{chunk-ORMTNJBS.js → chunk-WAXBJLV6.js} +3 -3
  85. package/dist/{chunk-ZDVJXWEG.js → chunk-Z4PSJSDF.js} +2 -2
  86. package/dist/{clean-EUKURSX2.js → clean-LFPT6GNS.js} +15 -15
  87. package/dist/cli.js +53 -53
  88. package/dist/{cloud-LJDRNQ2N.js → cloud-XX5XB277.js} +4 -4
  89. package/dist/{cloudrun-AXVFD6KV.js → cloudrun-ANWC6QGV.js} +6 -6
  90. package/dist/{compare-T3LMATAF.js → compare-CISKXIRF.js} +26 -26
  91. package/dist/{compiler-KH6DMHIJ.js → compiler-XYZMBTYR.js} +3 -3
  92. package/dist/{component-2FOHCMP2.js → component-D4JJIDOC.js} +3 -3
  93. package/dist/{compositions-REQ6ARAO.js → compositions-UGRTLUBT.js} +10 -10
  94. package/dist/{delete-KEPP2QAZ.js → delete-TPH7N5PK.js} +2 -2
  95. package/dist/{deploy-N756FEME.js → deploy-ZUXLAVVX.js} +72 -20
  96. package/dist/{deterministicFonts-4FULD3AS.js → deterministicFonts-NQ6KL66D.js} +2 -2
  97. package/dist/{dist-5ULOGA6A.js → dist-UXLDRI4D.js} +5 -3
  98. package/dist/{doctor-2SJPC4WZ.js → doctor-LVOS4EDV.js} +10 -10
  99. package/dist/{events-24ZE2PKB.js → events-FIWA6UBT.js} +3 -3
  100. package/dist/{events-U53QH4XZ.js → events-UHIKJIWA.js} +2 -2
  101. package/dist/{feedback-QFMLDLUN.js → feedback-SPOCVRKJ.js} +8 -8
  102. package/dist/{ffmpeg-7XNWNO7M.js → ffmpeg-7SDXE5P5.js} +6 -6
  103. package/dist/{figma-B4JO44CV.js → figma-ONGILUUE.js} +3 -3
  104. package/dist/fontLocalizeCli.js +9 -9
  105. package/dist/{get-7CFVCINR.js → get-W7ADZ5XS.js} +2 -2
  106. package/dist/{gpuPolicy-MU7CFSAF.js → gpuPolicy-GETTDB3G.js} +6 -6
  107. package/dist/{grade-compare-Q23U2HGS.js → grade-compare-YIIQJNL3.js} +27 -27
  108. package/dist/{help-M67MEDV3.js → help-HSKEDFT6.js} +1 -1
  109. package/dist/{history-I2PZXOFL.js → history-JS6QALDS.js} +6 -6
  110. package/dist/hyperframe.manifest.json +1 -1
  111. package/dist/hyperframe.runtime.iife.js +48 -48
  112. package/dist/hyperframes-player.global.js +1 -1
  113. package/dist/{info-Z2MX54IE.js → info-BIIA6M7Q.js} +8 -8
  114. package/dist/{init-SWH5KZO2.js → init-TGDKBWUY.js} +26 -26
  115. package/dist/{inspect-WBBDB3YS.js → inspect-MVMUFUHY.js} +27 -27
  116. package/dist/{installer-DQIHGUBJ.js → installer-HITNNXHY.js} +5 -5
  117. package/dist/{keyframes-PSNEUS6P.js → keyframes-XJ7DUUBW.js} +6 -6
  118. package/dist/{lambda-KSZFMQ3L.js → lambda-4C7APDR5.js} +23 -11
  119. package/dist/{layout-AAOI7W2M.js → layout-O3LEAM7S.js} +27 -27
  120. package/dist/{lint-GGNVITIK.js → lint-72FKMBD2.js} +6 -6
  121. package/dist/{list-OFPDL2AM.js → list-YUK5VA2D.js} +2 -2
  122. package/dist/{login-MZAHGGP4.js → login-TXBDKLOH.js} +4 -4
  123. package/dist/{manager-ZOFTZTRY.js → manager-APB2JLSH.js} +7 -7
  124. package/dist/{media-treatment-PF67GSUD.js → media-treatment-GMP4JL46.js} +12 -12
  125. package/dist/{models-WR7CL54R.js → models-DW22WMQ5.js} +10 -10
  126. package/dist/{motionShot-ISLDWLIU.js → motionShot-UQJVQT76.js} +14 -14
  127. package/dist/{normalize-audio-D7AH5GFZ.js → normalize-audio-4KYSZBWI.js} +8 -8
  128. package/dist/{open-HPVBB2CX.js → open-HNYN6VM2.js} +12 -12
  129. package/dist/{parakeetRunner-P6PE4WXG.js → parakeetRunner-SJ2QW77R.js} +11 -11
  130. package/dist/{pipeline-XKBZG2CM.js → pipeline-MG2W6NIW.js} +7 -7
  131. package/dist/{play-QXHO47ZH.js → play-ZQ6RNKIE.js} +18 -18
  132. package/dist/{preflight-KZCU66ES.js → preflight-HSQEJNA2.js} +7 -7
  133. package/dist/{present-ERGC5PR4.js → present-7M3W5E3Q.js} +14 -14
  134. package/dist/{preview-AGTOQIE7.js → preview-TT5Z6JK6.js} +17 -17
  135. package/dist/{producer-4ONVM5A2.js → producer-B2Y4IKZS.js} +1 -1
  136. package/dist/{projectConfig-7T4VY6RJ.js → projectConfig-VZVY6ZZP.js} +7 -7
  137. package/dist/{publication-J5TS5VR3.js → publication-SRAYE6LT.js} +3 -3
  138. package/dist/{publish-BSOVXRF4.js → publish-3QMV3Q7B.js} +9 -9
  139. package/dist/{remove-background-645NVCGL.js → remove-background-5GA2S5OI.js} +8 -8
  140. package/dist/{render-IAVH33YG.js → render-LN24E3OI.js} +14 -14
  141. package/dist/{render-55TYPJ5U.js → render-W3VX647V.js} +16 -14
  142. package/dist/{render-R3L44QAP.js → render-WRLXYVSQ.js} +27 -27
  143. package/dist/{render-batch-JWWLQ7ZC.js → render-batch-C73ELOQ7.js} +16 -14
  144. package/dist/{resolver-DBAFWC4F.js → resolver-ALD2ZELQ.js} +5 -5
  145. package/dist/{sherpa-UPWG6TKY.js → sherpa-AHD5UPU3.js} +10 -10
  146. package/dist/skills/hyperframes-cli/references/lambda.md +1 -0
  147. package/dist/{skills-ILH52UL4.js → skills-WYJGVMR5.js} +5 -5
  148. package/dist/{skillsUpdateCheck-ZHFDGMEL.js → skillsUpdateCheck-OHEGRQ2N.js} +3 -3
  149. package/dist/{snapshot-WMVHIQVQ.js → snapshot-S6CGQACZ.js} +32 -32
  150. package/dist/{src-HPLELQRK.js → src-DAW4JYSR.js} +5 -5
  151. package/dist/{src-46QTOHZE.js → src-I6WD5SMQ.js} +8 -8
  152. package/dist/{staticProjectServer-FHP2YQFV.js → staticProjectServer-3BFEACQ6.js} +15 -15
  153. package/dist/studio/assets/{hyperframes-player-BNeO6YSP.js → hyperframes-player-DnrkDR-_.js} +1 -1
  154. package/dist/studio/assets/{index-CZWE0FI8.js → index-BhFxhBMA.js} +4 -4
  155. package/dist/studio/assets/{index-DiNYtcMK.js → index-WFQeAouT.js} +1 -1
  156. package/dist/studio/index.html +1 -1
  157. package/dist/{studio-api-5YHQ4Y2D.js → studio-api-2O6R4CM5.js} +8 -8
  158. package/dist/{studioServer-P6IC76SV.js → studioServer-6ZSAJBVY.js} +45 -45
  159. package/dist/{telemetry-WZ7OGFWQ.js → telemetry-WFLPGSUG.js} +3 -3
  160. package/dist/{timeline-U6S7BGMI.js → timeline-BZJH266Q.js} +16 -16
  161. package/dist/{tokens-FPUYNZSV.js → tokens-5TX42ZMQ.js} +2 -2
  162. package/dist/{transcribe-DJX4E2PE.js → transcribe-IEYR46HB.js} +15 -15
  163. package/dist/{transcribe-DZHTKXI5.js → transcribe-WPFFLNTS.js} +9 -9
  164. package/dist/{updateCheck-2LHWRDE7.js → updateCheck-TESZGKRJ.js} +2 -2
  165. package/dist/{upgrade-WAQHCAUS.js → upgrade-3EW4MYS7.js} +2 -2
  166. package/dist/{urlDownloader-HZQPXQET.js → urlDownloader-JULHEBLS.js} +5 -5
  167. package/dist/{validate-D6XJ7OSS.js → validate-RSJPGXUZ.js} +21 -21
  168. package/dist/{video-A4CQ4WDL.js → video-TW4TSAM4.js} +6 -6
  169. package/dist/warmCheck.js +35 -35
  170. package/package.json +1 -1
  171. package/dist/chunk-JXLHLR26.js +0 -40
  172. package/dist/chunk-ZKHXN2BV.js +0 -3983
@@ -14,11 +14,11 @@ import {
14
14
  hdrToSdrToneMapFilter,
15
15
  isHeavyForPreview,
16
16
  parseFirstFrameColour
17
- } from "./chunk-74UH2KGI.js";
17
+ } from "./chunk-LEQU6P6H.js";
18
18
  import {
19
19
  decodeAuthoredAttribute,
20
20
  scanHtmlOpeningTags
21
- } from "./chunk-MSGWR7WP.js";
21
+ } from "./chunk-E3F5L6AB.js";
22
22
  import {
23
23
  mkdirWithinProject,
24
24
  realProjectRoot,
@@ -367,23 +367,44 @@ async function scanProjectMediaCodecMap(projectDir, htmlSources, options = {}) {
367
367
  return (await scanProjectMedia(projectDir, htmlSources, options)).codecMap;
368
368
  }
369
369
 
370
- // ../studio-server/dist/chunk-5UEDEOD2.js
370
+ // ../studio-server/dist/chunk-RX6VALW3.js
371
371
  import { spawn } from "child_process";
372
- import { createHash, randomUUID } from "crypto";
372
+ import { randomUUID } from "crypto";
373
373
  import {
374
- existsSync as existsSync2,
374
+ existsSync as existsSync4,
375
375
  mkdtempSync,
376
376
  renameSync,
377
- rmSync,
378
- statSync as statSync2,
377
+ rmSync as rmSync2,
379
378
  unlinkSync as unlinkSync2,
380
379
  utimesSync,
381
- writeFileSync
380
+ writeFileSync as writeFileSync2
382
381
  } from "fs";
383
382
  import { availableParallelism, tmpdir, totalmem } from "os";
384
- import { basename, dirname, extname as extname2, isAbsolute, join as join2, relative, resolve, sep as sep2 } from "path";
385
- import { existsSync, readdirSync, statSync as statSync3, unlinkSync } from "fs";
386
- import { extname as extname3, join } from "path";
383
+ import { basename as basename3, dirname as dirname3, extname as extname3, isAbsolute, join as join4, relative, resolve, sep as sep2 } from "path";
384
+ import { existsSync, readdirSync, statSync as statSync2, unlinkSync } from "fs";
385
+ import { extname as extname2, join } from "path";
386
+ import { createHash } from "crypto";
387
+ import {
388
+ closeSync,
389
+ createReadStream,
390
+ existsSync as existsSync2,
391
+ fstatSync,
392
+ openSync,
393
+ readFileSync,
394
+ statSync as statSync22,
395
+ writeFileSync
396
+ } from "fs";
397
+ import { basename, dirname, extname as extname22, join as join2 } from "path";
398
+ import {
399
+ closeSync as closeSync2,
400
+ existsSync as existsSync3,
401
+ openSync as openSync2,
402
+ readFileSync as readFileSync2,
403
+ rmSync,
404
+ statSync as statSync3,
405
+ writeSync
406
+ } from "fs";
407
+ import { basename as basename2, dirname as dirname2, join as join3 } from "path";
387
408
  var DEFAULT_MAX_BYTES = 10 * 1024 * 1024 * 1024;
388
409
  var DEFAULT_STALE_TEMP_MS = 60 * 60 * 1e3;
389
410
  var DEFAULT_MIN_SWEEP_INTERVAL_MS = 5 * 60 * 1e3;
@@ -431,7 +452,7 @@ function readCacheInventory(cacheDir, protectedPaths, now, staleTempMs) {
431
452
  for (const dirent of readdirSync(cacheDir, { withFileTypes: true })) {
432
453
  if (!dirent.isFile()) continue;
433
454
  const path = join(cacheDir, dirent.name);
434
- const stat = statSync3(path);
455
+ const stat = statSync2(path);
435
456
  const entry = {
436
457
  path,
437
458
  size: stat.size,
@@ -442,7 +463,7 @@ function readCacheInventory(cacheDir, protectedPaths, now, staleTempMs) {
442
463
  if (leftoverIsDead(cacheDir, dirent.name, stat.mtimeMs, protectedPaths, now, staleTempMs)) {
443
464
  staleTemps.push(entry);
444
465
  }
445
- } else if (TRANSCODER_PROXY_NAME.test(dirent.name) && PROXY_EXTENSIONS.has(extname3(dirent.name))) {
466
+ } else if (TRANSCODER_PROXY_NAME.test(dirent.name) && PROXY_EXTENSIONS.has(extname2(dirent.name))) {
446
467
  entries.push(entry);
447
468
  }
448
469
  }
@@ -492,6 +513,109 @@ function cleanupProxyCache(cacheDir, options = {}) {
492
513
  skipped: false
493
514
  };
494
515
  }
516
+ var SMALL_FILE_BYTES = 16 * 1024 * 1024;
517
+ var COPY_NAME = /^[0-9a-f]{64}\.(?:mp4|webm)$/;
518
+ function digest(...parts) {
519
+ return createHash("sha256").update(parts.join("\0")).digest("hex");
520
+ }
521
+ function boxPart(box) {
522
+ return box ? formatPreviewProxyBox(box) : "";
523
+ }
524
+ function fastCopyKey(sourcePath, version, variant, box) {
525
+ const stat = statSync22(sourcePath);
526
+ return digest(
527
+ sourcePath,
528
+ String(stat.mtimeMs),
529
+ String(stat.size),
530
+ version,
531
+ variant,
532
+ boxPart(box)
533
+ );
534
+ }
535
+ async function contentCopyKey(sourcePath, version, variant, box, signal) {
536
+ const hash = createHash("sha256");
537
+ const fd = openSync(sourcePath, "r");
538
+ try {
539
+ if (fstatSync(fd).size <= SMALL_FILE_BYTES) hash.update(readFileSync(fd));
540
+ else
541
+ for await (const chunk of createReadStream(sourcePath, { fd, autoClose: false, signal }))
542
+ hash.update(chunk);
543
+ } finally {
544
+ closeSync(fd);
545
+ }
546
+ return digest(hash.digest("hex"), version, variant, boxPart(box));
547
+ }
548
+ function fastIndexPath(cachePath) {
549
+ return join2(dirname(cachePath), `.fast-${basename(cachePath, extname22(cachePath))}`);
550
+ }
551
+ function contentIndexPath(cacheDir, contentKey) {
552
+ return join2(cacheDir, `.content-${contentKey}`);
553
+ }
554
+ function readCopyIndex(indexPath) {
555
+ try {
556
+ const name = readFileSync(indexPath, "utf8").trim();
557
+ const target = join2(dirname(indexPath), name);
558
+ return COPY_NAME.test(name) && existsSync2(target) ? target : null;
559
+ } catch {
560
+ return null;
561
+ }
562
+ }
563
+ function writeCopyIndex(indexPath, copyPath) {
564
+ writeFileSync(indexPath, basename(copyPath));
565
+ }
566
+ var POLL_MS = 500;
567
+ var UNREADABLE_LOCK_MS = 1e4;
568
+ function lockPathFor(cachePath) {
569
+ return join3(dirname2(cachePath), `.lock-${basename2(cachePath)}`);
570
+ }
571
+ function ownerIsAlive(lockPath) {
572
+ try {
573
+ const pid = Number(readFileSync2(lockPath, "utf8"));
574
+ if (!Number.isInteger(pid) || pid <= 0) {
575
+ return Date.now() - statSync3(lockPath).mtimeMs < UNREADABLE_LOCK_MS;
576
+ }
577
+ try {
578
+ process.kill(pid, 0);
579
+ return true;
580
+ } catch (err) {
581
+ return err.code === "EPERM";
582
+ }
583
+ } catch {
584
+ return false;
585
+ }
586
+ }
587
+ function pause(ms, signal) {
588
+ return new Promise((resolve2, reject) => {
589
+ const timer = setTimeout(() => {
590
+ signal.removeEventListener("abort", onAbort);
591
+ resolve2();
592
+ }, ms);
593
+ const onAbort = () => {
594
+ clearTimeout(timer);
595
+ reject(signal.reason);
596
+ };
597
+ signal.addEventListener("abort", onAbort, { once: true });
598
+ });
599
+ }
600
+ async function acquireCopyLock(cachePath, signal) {
601
+ const lockPath = lockPathFor(cachePath);
602
+ for (; ; ) {
603
+ signal.throwIfAborted();
604
+ if (existsSync3(cachePath)) return null;
605
+ try {
606
+ const fd = openSync2(lockPath, "wx");
607
+ writeSync(fd, String(process.pid));
608
+ closeSync2(fd);
609
+ if (!existsSync3(cachePath)) return () => rmSync(lockPath, { force: true });
610
+ rmSync(lockPath, { force: true });
611
+ return null;
612
+ } catch (err) {
613
+ if (err.code !== "EEXIST") throw err;
614
+ }
615
+ if (ownerIsAlive(lockPath)) await pause(POLL_MS, signal);
616
+ else rmSync(lockPath, { force: true });
617
+ }
618
+ }
495
619
  var PROXY_PARAMS_VERSION = "v7";
496
620
  var CACHE_DIR_NAME = ".transcode-cache";
497
621
  function boundedEnvInteger(name, fallback, min, max) {
@@ -583,33 +707,16 @@ function canonicalizeProxySource(projectDir, absoluteSourcePath) {
583
707
  if (requestedRelativePath === ".." || requestedRelativePath.startsWith(`..${sep2}`) || isAbsolute(requestedRelativePath)) {
584
708
  throw new ProxySourceOutsideProjectError();
585
709
  }
586
- const canonicalProjectDir = realProjectRoot(projectDir);
587
- const canonicalSourcePath = realpath(absoluteSourcePath);
588
- const canonicalRelativePath = relative(canonicalProjectDir, canonicalSourcePath);
589
- const sourceIsInsideCanonicalProject = canonicalRelativePath !== ".." && !canonicalRelativePath.startsWith(`..${sep2}`) && !isAbsolute(canonicalRelativePath);
590
- return {
591
- projectDir: canonicalProjectDir,
592
- sourcePath: canonicalSourcePath,
593
- relativePath: requestedRelativePath.normalize("NFC"),
594
- // An external target needs a stable identity in addition to its project-local
595
- // symlink path, otherwise retargeting the link can reuse an unrelated proxy.
596
- cacheIdentity: (sourceIsInsideCanonicalProject ? canonicalRelativePath : canonicalSourcePath).normalize("NFC")
597
- };
598
- }
599
- function buildProxyCacheKey(source, variant, box) {
600
- const stat = statSync2(source.sourcePath);
601
- const size = box ? `\0${formatPreviewProxyBox(box)}` : "";
602
- return createHash("sha256").update(
603
- `${source.relativePath}\0${source.cacheIdentity}\0${stat.mtimeMs}\0${stat.size}\0${PROXY_PARAMS_VERSION}\0${variant}${size}`
604
- ).digest("hex");
710
+ return { projectDir: realProjectRoot(projectDir), sourcePath: realpath(absoluteSourcePath) };
605
711
  }
606
712
  function getCanonicalProxyCachePath(source, variant, box) {
607
- const key = buildProxyCacheKey(source, variant, box);
608
- return join2(
713
+ const key = fastCopyKey(source.sourcePath, PROXY_PARAMS_VERSION, variant, box);
714
+ const made = join4(
609
715
  source.projectDir,
610
716
  CACHE_DIR_NAME,
611
717
  `${key}${PROXY_VARIANT_CONFIG[variant].extension}`
612
718
  );
719
+ return existsSync4(made) ? made : readCopyIndex(fastIndexPath(made)) ?? made;
613
720
  }
614
721
  function getProxyCachePath(projectDir, absoluteSourcePath, variant = "h264", box) {
615
722
  return getCanonicalProxyCachePath(
@@ -801,9 +908,9 @@ function createPieceGate(size) {
801
908
  }
802
909
  async function encodeInChunks(ranges, chunkPrefix, tempPath, encode, concat, signal, gate, onDone = () => {
803
910
  }) {
804
- const extension = extname2(tempPath);
911
+ const extension = extname3(tempPath);
805
912
  const pieces = ranges.map((_, index) => `${chunkPrefix}${index}${extension}`);
806
- const pending = ranges.flatMap((_, index) => existsSync2(pieces[index]) ? [] : [index]);
913
+ const pending = ranges.flatMap((_, index) => existsSync4(pieces[index]) ? [] : [index]);
807
914
  let doneSeconds = 0;
808
915
  for (const [index, range] of ranges.entries()) {
809
916
  if (!pending.includes(index)) doneSeconds += range.lengthSeconds;
@@ -822,7 +929,7 @@ async function encodeInChunks(ranges, chunkPrefix, tempPath, encode, concat, sig
822
929
  const index = pending[cursor++];
823
930
  const range = ranges[index];
824
931
  const piece = pieces[index];
825
- const pieceTemp = join2(dirname(piece), `.tmp-${randomUUID()}-${basename(piece)}`);
932
+ const pieceTemp = join4(dirname3(piece), `.tmp-${randomUUID()}-${basename3(piece)}`);
826
933
  try {
827
934
  await encode(pieceTemp, range, pieceSignal, (encodedSeconds) => {
828
935
  inFlight2.set(index, encodedSeconds);
@@ -833,7 +940,7 @@ async function encodeInChunks(ranges, chunkPrefix, tempPath, encode, concat, sig
833
940
  doneSeconds += range.lengthSeconds;
834
941
  onDone(doneSeconds);
835
942
  } finally {
836
- if (existsSync2(pieceTemp)) unlinkSync2(pieceTemp);
943
+ if (existsSync4(pieceTemp)) unlinkSync2(pieceTemp);
837
944
  }
838
945
  } finally {
839
946
  gate.release();
@@ -850,19 +957,19 @@ async function encodeInChunks(ranges, chunkPrefix, tempPath, encode, concat, sig
850
957
  )
851
958
  );
852
959
  if (failure !== void 0) throw failure;
853
- const listDir = mkdtempSync(join2(tmpdir(), "hf-proxy-join-"));
960
+ const listDir = mkdtempSync(join4(tmpdir(), "hf-proxy-join-"));
854
961
  try {
855
- const listPath = join2(listDir, "pieces.txt");
856
- writeFileSync(
962
+ const listPath = join4(listDir, "pieces.txt");
963
+ writeFileSync2(
857
964
  listPath,
858
965
  pieces.map((piece) => `file '${piece.replace(/\\/g, "/").replace(/'/g, "'\\''")}'
859
966
  `).join("")
860
967
  );
861
968
  await concat(listPath, tempPath);
862
969
  } finally {
863
- rmSync(listDir, { recursive: true, force: true });
970
+ rmSync2(listDir, { recursive: true, force: true });
864
971
  }
865
- for (const piece of pieces) if (existsSync2(piece)) unlinkSync2(piece);
972
+ for (const piece of pieces) if (existsSync4(piece)) unlinkSync2(piece);
866
973
  }
867
974
  var KEYFRAME_EVERY_SECOND_ARGS = ["-force_key_frames", "expr:gte(t,n_forced*1)"];
868
975
  var H264_ARGS = [
@@ -1082,14 +1189,31 @@ function spawnFfmpeg(ffmpegPath, args, stallMs, signal, onProgress) {
1082
1189
  async function transcodeToCache(job, projectDir, absoluteSourcePath, cachePath, variant, box) {
1083
1190
  await acquireSlot(job);
1084
1191
  try {
1085
- if (existsSync2(cachePath)) return cachePath;
1086
- const cacheDir = dirname(cachePath);
1192
+ if (existsSync4(cachePath)) return cachePath;
1193
+ const cacheDir = dirname3(cachePath);
1087
1194
  mkdirWithinProject(projectDir, cacheDir);
1088
- const tempPath = join2(cacheDir, `.tmp-${randomUUID()}-${basename(cachePath)}`);
1195
+ const contentIndex = contentIndexPath(
1196
+ cacheDir,
1197
+ await contentCopyKey(
1198
+ absoluteSourcePath,
1199
+ PROXY_PARAMS_VERSION,
1200
+ variant,
1201
+ box,
1202
+ job.abandoned.signal
1203
+ )
1204
+ );
1205
+ const sameContent = readCopyIndex(contentIndex);
1206
+ if (sameContent) {
1207
+ writeCopyIndex(fastIndexPath(cachePath), sameContent);
1208
+ return sameContent;
1209
+ }
1210
+ const release = await acquireCopyLock(cachePath, job.abandoned.signal);
1211
+ if (!release) return cachePath;
1212
+ const tempPath = join4(cacheDir, `.tmp-${randomUUID()}-${basename3(cachePath)}`);
1089
1213
  try {
1090
- const chunkPrefix = join2(
1214
+ const chunkPrefix = join4(
1091
1215
  cacheDir,
1092
- `${CHUNK_PREFIX}${basename(cachePath, extname2(cachePath))}-`
1216
+ `${CHUNK_PREFIX}${basename3(cachePath, extname3(cachePath))}-`
1093
1217
  );
1094
1218
  await runFfmpeg(
1095
1219
  absoluteSourcePath,
@@ -1101,10 +1225,12 @@ async function transcodeToCache(job, projectDir, absoluteSourcePath, cachePath,
1101
1225
  (progress) => reportProgress(job, progress)
1102
1226
  );
1103
1227
  renameSync(tempPath, cachePath);
1228
+ writeCopyIndex(contentIndex, cachePath);
1104
1229
  maintainProxyCache(cacheDir);
1105
1230
  return cachePath;
1106
1231
  } finally {
1107
- if (existsSync2(tempPath)) unlinkSync2(tempPath);
1232
+ if (existsSync4(tempPath)) unlinkSync2(tempPath);
1233
+ release();
1108
1234
  }
1109
1235
  } finally {
1110
1236
  releaseSlot();
@@ -1112,8 +1238,8 @@ async function transcodeToCache(job, projectDir, absoluteSourcePath, cachePath,
1112
1238
  }
1113
1239
  var proxyActivity = 0;
1114
1240
  function proxyActivityMark(projectDir) {
1115
- if (!existsSync2(projectDir)) return String(proxyActivity);
1116
- const cacheDir = join2(realpath(projectDir), CACHE_DIR_NAME) + sep2;
1241
+ if (!existsSync4(projectDir)) return String(proxyActivity);
1242
+ const cacheDir = join4(realpath(projectDir), CACHE_DIR_NAME) + sep2;
1117
1243
  for (const cachePath of inFlight.keys()) if (cachePath.startsWith(cacheDir)) return null;
1118
1244
  return String(proxyActivity);
1119
1245
  }
@@ -1121,9 +1247,9 @@ async function resolveProxy(projectDir, absoluteSourcePath, variant = "h264", bo
1121
1247
  options.signal?.throwIfAborted();
1122
1248
  const source = canonicalizeProxySource(projectDir, absoluteSourcePath);
1123
1249
  const cachePath = getCanonicalProxyCachePath(source, variant, box);
1124
- if (existsSync2(cachePath)) {
1250
+ if (existsSync4(cachePath)) {
1125
1251
  markCacheEntryUsed(cachePath);
1126
- maintainProxyCache(dirname(cachePath));
1252
+ maintainProxyCache(dirname3(cachePath));
1127
1253
  return cachePath;
1128
1254
  }
1129
1255
  const rememberedFailure = failedTranscodes.get(cachePath);
@@ -1180,7 +1306,7 @@ async function resolveProxies(projectDir, sources, onSettled = () => {
1180
1306
  const first = sources[0];
1181
1307
  if (first) {
1182
1308
  maintainProxyCache(
1183
- dirname(getProxyCachePath(projectDir, first.sourcePath, first.variant)),
1309
+ dirname3(getProxyCachePath(projectDir, first.sourcePath, first.variant)),
1184
1310
  Math.min(
1185
1311
  Number(process.env.HYPERFRAMES_PROXY_CACHE_STALE_TEMP_MS) || UNTOUCHED_TEMP_IS_DEAD_MS,
1186
1312
  UNTOUCHED_TEMP_IS_DEAD_MS
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveConfig,
9
9
  usesSoftwareWebGpu
10
- } from "./chunk-UKB62QOT.js";
10
+ } from "./chunk-75KIZWAD.js";
11
11
 
12
12
  // src/browser/gpuPolicy.ts
13
13
  function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCER_BROWSER_GPU_MODE) {
@@ -17,7 +17,7 @@ function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCE
17
17
  return "auto";
18
18
  }
19
19
  async function resolveCaptureBrowserGpuMode(requestedMode, chromePath, probeLifecycle) {
20
- const { resolveBrowserGpuMode } = await import("./src-HPLELQRK.js");
20
+ const { resolveBrowserGpuMode } = await import("./src-DAW4JYSR.js");
21
21
  return resolveBrowserGpuMode(requestedMode, { chromePath, probeLifecycle });
22
22
  }
23
23
  function resolveLocalWebGpu(browserGpuMode, requiresWebGpu) {
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-GMECXFAN.js";
28
28
  import {
29
29
  ITEM_TYPE_DIRS
30
- } from "./chunk-74UH2KGI.js";
30
+ } from "./chunk-LEQU6P6H.js";
31
31
  import {
32
32
  realProjectRoot
33
33
  } from "./chunk-OFQWTKPW.js";
@@ -7,19 +7,19 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  ambiguousIssue,
9
9
  loadBrowserScript
10
- } from "./chunk-TAXGZAXM.js";
10
+ } from "./chunk-ANH7DV34.js";
11
11
  import {
12
12
  auditClipDurations,
13
13
  shouldIgnoreHttpError,
14
14
  shouldIgnoreRequestFailure
15
- } from "./chunk-QTWSMJ22.js";
15
+ } from "./chunk-IKX2UHEM.js";
16
16
  import {
17
17
  serveStaticProjectHtml
18
- } from "./chunk-A7YO6YSD.js";
18
+ } from "./chunk-AQLRXGNN.js";
19
19
  import {
20
20
  STUDIO_PREVIEW_CAPTURE_MODE,
21
21
  STUDIO_PREVIEW_MARK_META
22
- } from "./chunk-53E45AKI.js";
22
+ } from "./chunk-IB6ICAI7.js";
23
23
  import {
24
24
  artifactDirectory,
25
25
  finishSnapshotRun
@@ -31,7 +31,7 @@ import {
31
31
  proxyVariantFor,
32
32
  resolveProxies,
33
33
  scanProjectMediaCodecMap
34
- } from "./chunk-Q537KXWA.js";
34
+ } from "./chunk-CL6ZTNQH.js";
35
35
  import {
36
36
  AUDIT_SEEK_OPTIONS,
37
37
  DEFAULT_ZOOM_PADDING_PX,
@@ -45,21 +45,21 @@ import {
45
45
  seekCompositionTimeline,
46
46
  seekInPage,
47
47
  waitForPreferredSeekTarget
48
- } from "./chunk-U2EK5MFR.js";
48
+ } from "./chunk-REFMKHRE.js";
49
49
  import {
50
50
  BrowserCleanupError,
51
51
  closeManagedBrowser,
52
52
  onStopSignal
53
- } from "./chunk-TYRDDIIH.js";
53
+ } from "./chunk-VOKI2HSE.js";
54
54
  import {
55
55
  findStageProxyBox
56
- } from "./chunk-GKXH4C2B.js";
56
+ } from "./chunk-JCS7WFRM.js";
57
57
  import {
58
58
  resolveAutoProxy
59
- } from "./chunk-UOSTDTBF.js";
59
+ } from "./chunk-4OPDZMV6.js";
60
60
  import {
61
61
  injectTagsAtHeadStart
62
- } from "./chunk-ZKHXN2BV.js";
62
+ } from "./chunk-QTGKDF7D.js";
63
63
  import {
64
64
  normalizeErrorMessage
65
65
  } from "./chunk-T2EUWCJE.js";
@@ -310,6 +310,82 @@ function collectTweenRecords() {
310
310
  );
311
311
  }
312
312
 
313
+ // src/utils/contrastMotion.ts
314
+ var AMBIENT_TWEEN_SECONDS = 4;
315
+ function isAmbientTween(tween) {
316
+ return tween.infiniteAncestor || tween.repeat !== 0 || tween.duration >= AMBIENT_TWEEN_SECONDS;
317
+ }
318
+ function measuredInMotion(sample) {
319
+ if (Math.round(sample.opacity * 1e3) < 1e3) return true;
320
+ return sample.tweens.some((tween) => !isAmbientTween(tween) && tween.active);
321
+ }
322
+ function readContrastMotion() {
323
+ const restores = Reflect.get(window, "__contrastAuditRestores");
324
+ const registry = Reflect.get(window, "__timelines");
325
+ const timelines = Object.values(typeof registry === "object" && registry ? registry : {}).filter(
326
+ (timeline) => typeof timeline?.getChildren === "function" && typeof timeline.time === "function"
327
+ );
328
+ const registered = new Set(timelines);
329
+ const byTarget = /* @__PURE__ */ new Map();
330
+ function nestedInAnother(timeline) {
331
+ for (let parent = timeline.parent; parent; parent = parent.parent) {
332
+ if (registered.has(parent)) return true;
333
+ }
334
+ return false;
335
+ }
336
+ function activeInRoot(animation, root) {
337
+ if (animation === root) return true;
338
+ const parent = animation.parent;
339
+ if (!parent || animation.paused() || animation.timeScale() === 0) return false;
340
+ const time = parent.time();
341
+ return animation.startTime() <= time + 1e-6 && time < animation.endTime() - 1e-6 && activeInRoot(parent, root);
342
+ }
343
+ function hasInfiniteAncestor(animation, root) {
344
+ for (let parent = animation.parent; parent; parent = parent.parent) {
345
+ if (parent.repeat() === -1) return true;
346
+ if (parent === root) break;
347
+ }
348
+ return false;
349
+ }
350
+ function addTweens(timeline) {
351
+ for (const tween of timeline.getChildren(true, true, false)) {
352
+ const total = tween.totalDuration();
353
+ if (!(total > 0)) continue;
354
+ const state = {
355
+ active: activeInRoot(tween, timeline),
356
+ infiniteAncestor: hasInfiniteAncestor(tween, timeline),
357
+ duration: tween.duration(),
358
+ repeat: tween.repeat()
359
+ };
360
+ for (const target of tween.targets()) {
361
+ if (target instanceof Element)
362
+ byTarget.set(target, [...byTarget.get(target) ?? [], state]);
363
+ }
364
+ }
365
+ }
366
+ function sampleOf(element) {
367
+ if (!(element instanceof Element)) return null;
368
+ const tweens = [];
369
+ let opacity = 1;
370
+ for (let node = element; node; node = node.parentElement) {
371
+ tweens.push(...byTarget.get(node) ?? []);
372
+ const own = Number.parseFloat(getComputedStyle(node).opacity);
373
+ if (Number.isFinite(own)) opacity *= own;
374
+ }
375
+ return tweens.length > 0 ? { opacity, tweens } : null;
376
+ }
377
+ for (const timeline of timelines) {
378
+ try {
379
+ if (!nestedInAnother(timeline)) addTweens(timeline);
380
+ } catch {
381
+ continue;
382
+ }
383
+ }
384
+ return (Array.isArray(restores) ? restores : []).map(
385
+ (restore) => typeof restore === "object" && restore ? sampleOf(Reflect.get(restore, "el")) : null
386
+ );
387
+ }
388
+
313
389
  // src/utils/checkTypes.ts
314
390
  function rectToBbox(rect) {
315
391
  return { x: rect.left, y: rect.top, width: rect.width, height: rect.height };
@@ -434,7 +510,7 @@ function proxyFailedDraft(message) {
434
510
  return { code: "media_proxy_failed", severity: "warning", message, time: 0 };
435
511
  }
436
512
  async function loadCheckHtmlWithDeferredMedia(dir) {
437
- const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-G3UT65XI.js");
513
+ const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-GJ2UYZ6E.js");
438
514
  return injectTagsAtHeadStart(
439
515
  await bundleWithLocalizedFonts(dir),
440
516
  `<meta name="${STUDIO_PREVIEW_MARK_META}" content="${STUDIO_PREVIEW_CAPTURE_MODE}">`
@@ -493,7 +569,7 @@ async function runBrowserCheck(project, options, motion, runGrid, deadline, prel
493
569
  ).map((draft) => runtimeFinding(draft, rootAnchor))
494
570
  }));
495
571
  const launchSettleMs = Date.now() - launchSettleStart;
496
- const { analyzeClipMediaFit } = await import("./src-HPLELQRK.js");
572
+ const { analyzeClipMediaFit } = await import("./src-DAW4JYSR.js");
497
573
  for (const entry of await auditClipDurations(page, analyzeClipMediaFit, options.timeout)) {
498
574
  drafts.push({ code: "clip_media_fit", severity: entry.level, message: entry.text, time: 0 });
499
575
  }
@@ -902,7 +978,7 @@ function createPageDriver(page, clock = createRuntimeClock(), sampleLog) {
902
978
  collectGeometryCandidates: (time, request) => collectGeometryCandidates(page, time, request),
903
979
  collectMotionFrame: (time, selectors, scopes) => collectMotionFrame(page, time, selectors, scopes),
904
980
  anchorMotionIssues: (issues) => anchorLayoutIssues(page, issues),
905
- collectContrast: (time, annotations) => collectContrast(page, time, annotations),
981
+ collectContrast: (time, annotations, skipInMotion) => collectContrast(page, time, annotations, skipInMotion),
906
982
  collectCraftFrame: (time) => collectCraftFrame(page, time),
907
983
  collectCraftFilm: () => collectCraftFilm(page)
908
984
  });
@@ -1365,10 +1441,12 @@ async function compositionBbox(page, selector) {
1365
1441
  return rect ? { x: rect.x, y: rect.y, width: rect.width, height: rect.height } : { x: 0, y: 0, width: 0, height: 0 };
1366
1442
  }, selector);
1367
1443
  }
1368
- async function collectContrast(page, time, snapshotAnnotations) {
1444
+ async function collectContrast(page, time, snapshotAnnotations, skipInMotion = false) {
1369
1445
  let prepared = [];
1370
1446
  try {
1371
- prepared = parsePreparedContrast(await prepareContrast(page, time));
1447
+ const candidates = await prepareContrast(page, time);
1448
+ const motion = skipInMotion ? await page.evaluate(readContrastMotion).catch(() => []) : [];
1449
+ prepared = parsePreparedContrast(candidates, motion);
1372
1450
  if (prepared.length === 0 && !snapshotAnnotations) return { entries: [] };
1373
1451
  const { shot, region } = await measurementShot(page, prepared);
1374
1452
  const raw = await finishContrast(
@@ -1541,13 +1619,21 @@ async function finishContrast(page, screenshot, time, candidates, region) {
1541
1619
  { screenshot, time, candidates, region: region ?? null }
1542
1620
  );
1543
1621
  }
1544
- function parsePreparedContrast(raw) {
1545
- return raw.flatMap((value) => {
1622
+ function parsePreparedContrast(raw, motion) {
1623
+ return raw.flatMap((value, index) => {
1546
1624
  if (!isRecord(value)) return [];
1547
1625
  const raw2 = Reflect.get(value, "candidate");
1548
1626
  const candidate = parseContrastCandidate(raw2);
1549
1627
  const anchor = parseAnchor(Reflect.get(value, "anchor"));
1550
- return candidate && anchor ? [{ raw: raw2, candidate, anchor, knownBackdrop: knownBackdrop(raw2) }] : [];
1628
+ return candidate && anchor ? [
1629
+ {
1630
+ raw: raw2,
1631
+ candidate,
1632
+ anchor,
1633
+ knownBackdrop: knownBackdrop(raw2),
1634
+ motion: motion[index] ?? null
1635
+ }
1636
+ ] : [];
1551
1637
  });
1552
1638
  }
1553
1639
  function knownBackdrop(raw) {
@@ -1583,7 +1669,9 @@ function joinContrastEntries(finished, prepared) {
1583
1669
  (candidate) => candidate.candidate.selector === entry.selector && candidate.candidate.text === entry.text
1584
1670
  );
1585
1671
  const match = index >= 0 ? remaining.splice(index, 1)[0] : void 0;
1586
- return match ? [{ ...entry, ...match.anchor }] : [];
1672
+ if (!match) return [];
1673
+ if (!entry.wcagAA && match.motion && measuredInMotion(match.motion)) return [];
1674
+ return [{ ...entry, ...match.anchor }];
1587
1675
  });
1588
1676
  }
1589
1677
  function parseLayoutIssue(value) {
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  shouldTrack
9
- } from "./chunk-JOI7TNCX.js";
9
+ } from "./chunk-B22YBW5W.js";
10
10
 
11
11
  // src/telemetry/renderObservability.ts
12
12
  function renderObservabilityTelemetryPayload(observability) {
@@ -4486,6 +4486,34 @@ function checkOutputResolutionCompatibility(input) {
4486
4486
  }
4487
4487
  return OK;
4488
4488
  }
4489
+ function outputResolutionForSize(input) {
4490
+ const { compositionWidth, compositionHeight, width, height } = input;
4491
+ if (width === compositionWidth && height === compositionHeight) {
4492
+ return { ok: true, outputResolution: void 0 };
4493
+ }
4494
+ const composition = `${compositionWidth}\xD7${compositionHeight}`;
4495
+ const scale = width / compositionWidth;
4496
+ if (width < compositionWidth || height < compositionHeight) {
4497
+ return {
4498
+ ok: false,
4499
+ message: `${width}\xD7${height} is smaller than the composition (${composition}). Use the composition's size, or a whole-number multiple of it.`
4500
+ };
4501
+ }
4502
+ const preset = VALID_CANVAS_RESOLUTIONS.find(
4503
+ (name) => CANVAS_DIMENSIONS[name].width === width && CANVAS_DIMENSIONS[name].height === height
4504
+ );
4505
+ if (!Number.isInteger(scale) || height !== compositionHeight * scale || !preset || !checkOutputResolutionCompatibility({
4506
+ compositionWidth,
4507
+ compositionHeight,
4508
+ outputResolution: preset
4509
+ }).ok) {
4510
+ return {
4511
+ ok: false,
4512
+ message: `${width}\xD7${height} is not a whole-number multiple of the composition (${composition}) at a supported size. Use ${composition}, or a multiple such as ${compositionWidth * 2}\xD7${compositionHeight * 2} when that is a preset size (${VALID_CANVAS_RESOLUTIONS.map((name) => `${CANVAS_DIMENSIONS[name].width}\xD7${CANVAS_DIMENSIONS[name].height}`).join(", ")}).`
4513
+ };
4514
+ }
4515
+ return { ok: true, outputResolution: preset };
4516
+ }
4489
4517
  function propEntries(props) {
4490
4518
  return Object.entries(props).map(([k, v]) => `${safeJsKey(k)}: ${serializeValue(v)}`);
4491
4519
  }
@@ -5039,6 +5067,7 @@ export {
5039
5067
  validateCompositionHtml,
5040
5068
  suggestMatchingPreset,
5041
5069
  checkOutputResolutionCompatibility,
5070
+ outputResolutionForSize,
5042
5071
  unrollComputedTimeline,
5043
5072
  HTML_BODY_CSS_WIDTH_FIRST_RE,
5044
5073
  HTML_BODY_CSS_HEIGHT_FIRST_RE,