hyperframes 0.8.155 → 0.8.157

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 (162) hide show
  1. package/dist/{add-QHRTHQDD.js → add-XKIJJAC6.js} +12 -12
  2. package/dist/{animatedGifPrep-KYVKRWHT.js → animatedGifPrep-MTJRHJ5G.js} +8 -8
  3. package/dist/api.js +14 -14
  4. package/dist/{asset-LBQA2IUJ.js → asset-TEWIJMG5.js} +2 -2
  5. package/dist/{assetCataloger-Y3OELLLW.js → assetCataloger-DI7FC5KZ.js} +3 -3
  6. package/dist/{auth-3MMX5MLV.js → auth-ERW6EOVW.js} +1 -1
  7. package/dist/{autoUpdate-6EMWLUKO.js → autoUpdate-IHYT5BQF.js} +2 -2
  8. package/dist/{backgroundChecks-3VL65XVE.js → backgroundChecks-DTKZTDHN.js} +3 -3
  9. package/dist/backgroundChecksWorker.js +3 -3
  10. package/dist/{batchRender-6TD4XSIP.js → batchRender-FTZ67377.js} +4 -4
  11. package/dist/{beats-NOHE5FA5.js → beats-AE4ZKJ3I.js} +13 -13
  12. package/dist/{benchmark-7EFNYNYH.js → benchmark-Q3YSQVWW.js} +9 -9
  13. package/dist/{browser-IZ2DJGGN.js → browser-IRRLG5FG.js} +3 -3
  14. package/dist/{bundleWithLocalizedFonts-YVGLQ72Z.js → bundleWithLocalizedFonts-IVO43QBQ.js} +2 -2
  15. package/dist/{capture-YJEM42PR.js → capture-ANATPLOS.js} +11 -11
  16. package/dist/{capture-HHK4GA4X.js → capture-MVH3XNAE.js} +2 -2
  17. package/dist/{catalog-GXGFKOX7.js → catalog-5BJJW3G4.js} +12 -12
  18. package/dist/{catch-up-L6E26OPV.js → catch-up-DU2O72RS.js} +4 -4
  19. package/dist/{check-HSTEN7PX.js → check-P5D3YU2H.js} +33 -33
  20. package/dist/{checkBrowser-547BWZG6.js → checkBrowser-RNIDFQZZ.js} +31 -30
  21. package/dist/{chunk-HXU4DWOZ.js → chunk-23VDPRQ3.js} +1 -1
  22. package/dist/{chunk-UNO7QJAV.js → chunk-25IXEZXH.js} +2 -2
  23. package/dist/{chunk-PXOFFSO3.js → chunk-3FRK53UC.js} +1 -1
  24. package/dist/{chunk-U3BCDVZO.js → chunk-3QATT3QF.js} +1 -1
  25. package/dist/{chunk-PCBCTD7M.js → chunk-4YDQQQY6.js} +2 -2
  26. package/dist/{chunk-WQMTHPTK.js → chunk-56QTFOWH.js} +4 -4
  27. package/dist/{chunk-M2IEAI7L.js → chunk-6B6G3QMQ.js} +10 -9
  28. package/dist/{chunk-YOEGUBBY.js → chunk-7F3B5YYT.js} +82 -14
  29. package/dist/{chunk-6ENZIL42.js → chunk-7ZWOLEGS.js} +1 -1
  30. package/dist/{chunk-45FUWHHV.js → chunk-BB2SFTMY.js} +2 -2
  31. package/dist/{chunk-O5S54BVW.js → chunk-BPTKOTF2.js} +1 -1
  32. package/dist/{chunk-P5CMYIC6.js → chunk-CA7IDB4Z.js} +1 -1
  33. package/dist/{chunk-FSZAFCU7.js → chunk-CBNI34SD.js} +1 -1
  34. package/dist/{chunk-DM2D67MP.js → chunk-DRT6ZQI2.js} +1 -1
  35. package/dist/{chunk-B4WWDPNF.js → chunk-EEEUI3ON.js} +20 -12
  36. package/dist/{chunk-TA5AUF2J.js → chunk-EGKIQS5J.js} +1 -1
  37. package/dist/{chunk-BEM57QP3.js → chunk-EYNN5DJG.js} +5 -5
  38. package/dist/{chunk-V6UUZGP6.js → chunk-FJT35XBA.js} +3 -3
  39. package/dist/{chunk-YYMJEQ4D.js → chunk-GPUVPZRK.js} +1 -1
  40. package/dist/{chunk-KS4JPMVV.js → chunk-HQG7B5ZE.js} +1 -1
  41. package/dist/{chunk-TLC4GYT5.js → chunk-IRRRH66M.js} +118 -189
  42. package/dist/{chunk-BSMBAP7O.js → chunk-J6SJCYAQ.js} +4 -4
  43. package/dist/{chunk-TXWPPBIW.js → chunk-J7WFHOCW.js} +1 -1
  44. package/dist/chunk-KCF6GHJP.js +250 -0
  45. package/dist/chunk-LPOTN5GW.js +3795 -0
  46. package/dist/{chunk-HGAOO43L.js → chunk-LQXHRO6F.js} +2 -2
  47. package/dist/{chunk-AF6Y56VA.js → chunk-LZ7C6CXD.js} +3 -3
  48. package/dist/{chunk-ECFNYTEM.js → chunk-NFX4K6OW.js} +1 -1
  49. package/dist/{chunk-RTI536FR.js → chunk-NIT2ZCNI.js} +10 -10
  50. package/dist/{chunk-5GZLD7OW.js → chunk-O4ZB2LUC.js} +1 -1
  51. package/dist/{chunk-GD5MYXEK.js → chunk-OGJFYVRC.js} +1 -1
  52. package/dist/{chunk-4U66LIUS.js → chunk-OTG5H2VM.js} +2 -2
  53. package/dist/{chunk-4OMHV7P2.js → chunk-QAWCWGQG.js} +2 -2
  54. package/dist/{chunk-2XEBNYG5.js → chunk-QRPYTJBW.js} +1 -1
  55. package/dist/{chunk-ZDEEHQ2Y.js → chunk-SGIZMTWO.js} +2 -2
  56. package/dist/{chunk-XQYLUY2F.js → chunk-SLUFA6UM.js} +2 -2
  57. package/dist/{chunk-GC36GZHM.js → chunk-SMPG26EL.js} +1 -1
  58. package/dist/{chunk-2Q2KQRG7.js → chunk-SWRIMG46.js} +1 -1
  59. package/dist/{chunk-6UMBAJRU.js → chunk-T243WV6D.js} +1 -1
  60. package/dist/{chunk-PCXEFXRK.js → chunk-T76NSAXO.js} +2 -2
  61. package/dist/{chunk-PSDTKP6K.js → chunk-TQ62EMUI.js} +12 -11
  62. package/dist/{chunk-GQ73YXKD.js → chunk-UGIIDY6C.js} +3 -3
  63. package/dist/{chunk-PFERJHKB.js → chunk-WK375PPO.js} +2 -2
  64. package/dist/{chunk-BADLIO5R.js → chunk-WZBGU46C.js} +1 -1
  65. package/dist/{chunk-HAKVKAUQ.js → chunk-XRRZZFGI.js} +1 -1
  66. package/dist/{chunk-D5VMPDTH.js → chunk-YB26LWR2.js} +2 -2
  67. package/dist/{chunk-AVGGHUVK.js → chunk-YBKIAQNU.js} +4 -4
  68. package/dist/{chunk-PVGDU7SE.js → chunk-ZFZNPLRJ.js} +2 -2
  69. package/dist/{chunk-Q3BS3MN5.js → chunk-ZTUZDPHE.js} +2 -2
  70. package/dist/{chunk-RSNBNSKZ.js → chunk-ZY4A2R7C.js} +7 -7
  71. package/dist/{chunk-RB6RHOSF.js → chunk-ZZ3ZWTOI.js} +1 -1
  72. package/dist/{clean-J3IRHNY5.js → clean-4WDZ3TFN.js} +15 -15
  73. package/dist/cli.js +52 -52
  74. package/dist/{cloud-TMV666ML.js → cloud-FL6VP6IU.js} +4 -4
  75. package/dist/{cloudrun-OUGI5NN4.js → cloudrun-STLNWUBW.js} +5 -5
  76. package/dist/commands/contrast-audit.browser.js +25 -8
  77. package/dist/commands/layout-audit.browser.js +117 -12
  78. package/dist/{compare-UXT7YJAD.js → compare-MXZ7QKBN.js} +25 -25
  79. package/dist/{compiler-WHUQZITN.js → compiler-VFJVUZWR.js} +5 -5
  80. package/dist/{component-OEWAQBRI.js → component-XKBA5ON2.js} +3 -3
  81. package/dist/{compositions-J5UAUORI.js → compositions-2LUY6RQW.js} +12 -12
  82. package/dist/{delete-RIWTBVNH.js → delete-OBAOZCXI.js} +2 -2
  83. package/dist/{deterministicFonts-EOMDR6ZF.js → deterministicFonts-LNNVHVS2.js} +2 -2
  84. package/dist/{dist-2YYJYYPY.js → dist-2VXSQLXO.js} +1 -1
  85. package/dist/{dist-NUSNSGME.js → dist-SVTSOG4Q.js} +3 -3
  86. package/dist/docker/Dockerfile.render +21 -1
  87. package/dist/{doctor-L4LKY2ZO.js → doctor-BLXWRHAE.js} +11 -11
  88. package/dist/{events-CRYKZ3VN.js → events-LSJDXTXK.js} +3 -3
  89. package/dist/{events-7O35RPKC.js → events-V4LYF3MW.js} +2 -2
  90. package/dist/{feedback-WL5ILVT2.js → feedback-LMDNGTYB.js} +7 -7
  91. package/dist/{figma-Y36QOXGR.js → figma-BXHFTYCT.js} +3 -3
  92. package/dist/fontLocalizeCli.js +11 -11
  93. package/dist/{get-BKAU2UKN.js → get-2ZKWMYCG.js} +2 -2
  94. package/dist/{gpuPolicy-5AGAE6DM.js → gpuPolicy-VXNJ4UBN.js} +8 -8
  95. package/dist/{grade-compare-6F5QLGGK.js → grade-compare-F7JNDXGF.js} +25 -25
  96. package/dist/{help-VMH6Q3TP.js → help-WGANCPIE.js} +1 -1
  97. package/dist/{history-WJI7NN5U.js → history-FILLGPWB.js} +6 -6
  98. package/dist/hyperframe-runtime.js +35 -35
  99. package/dist/hyperframe.manifest.json +1 -1
  100. package/dist/hyperframe.runtime.iife.js +35 -35
  101. package/dist/hyperframes-player.global.js +1 -1
  102. package/dist/{info-ZPGZJKYK.js → info-QQJ7C6SO.js} +8 -8
  103. package/dist/{init-FH3HAGUA.js → init-BQYTOLTG.js} +23 -23
  104. package/dist/{inspect-MIO35XDA.js → inspect-BTBKTW5W.js} +26 -26
  105. package/dist/{installer-QCHUXV6E.js → installer-HF5BXXXM.js} +5 -5
  106. package/dist/{keyframes-HL66NSCA.js → keyframes-Y5QDNXST.js} +6 -6
  107. package/dist/{lambda-Q5FTNY4J.js → lambda-ZCX7KGTY.js} +6 -6
  108. package/dist/{layout-HLA3MBNJ.js → layout-HITFK2H5.js} +26 -26
  109. package/dist/{lint-BL4JKGPG.js → lint-6HH5X4NJ.js} +7 -7
  110. package/dist/{lintProject-XQWXJYSC.js → lintProject-JGHKRO5L.js} +1 -1
  111. package/dist/{list-34AMRBCS.js → list-KBERMLPP.js} +2 -2
  112. package/dist/{login-EL5DFM34.js → login-MZNDV73I.js} +4 -4
  113. package/dist/{media-treatment-UWR4OOHW.js → media-treatment-YACCPVXX.js} +11 -11
  114. package/dist/{models-2E6AGL43.js → models-WHDUQZQZ.js} +11 -11
  115. package/dist/{motionShot-JBH6JWB4.js → motionShot-CRQTWUJB.js} +14 -14
  116. package/dist/{normalize-audio-ZZ3O7VDF.js → normalize-audio-Z7UQTZ5J.js} +4 -4
  117. package/dist/{open-QN7XTS6J.js → open-GM2J5QEA.js} +4 -4
  118. package/dist/{parakeetRunner-NUZTNYYF.js → parakeetRunner-5PNBGCGH.js} +11 -11
  119. package/dist/{pipeline-RUEI6IIO.js → pipeline-QA2422UI.js} +8 -8
  120. package/dist/{play-2Y6KCFV3.js → play-JGMRZO6G.js} +19 -19
  121. package/dist/{preflight-JS4P5HFR.js → preflight-BH2XUQBS.js} +1 -1
  122. package/dist/{present-J2UUEQWF.js → present-SI7ZE6IB.js} +15 -15
  123. package/dist/{preview-BSUSKQBL.js → preview-PZOQHOIO.js} +18 -18
  124. package/dist/{producer-6QJ5624B.js → producer-PQMZ7OYH.js} +1 -1
  125. package/dist/{projectConfig-EX35BZLA.js → projectConfig-EYYDESVO.js} +7 -7
  126. package/dist/{publication-OUGS3P7W.js → publication-MJY3XYYV.js} +3 -3
  127. package/dist/{publish-UUFZR6QT.js → publish-UT3L777Q.js} +9 -9
  128. package/dist/{remove-background-SQUYEUJN.js → remove-background-HT73ZUIG.js} +9 -9
  129. package/dist/{render-GNHKF76H.js → render-6CJXA7UA.js} +9 -9
  130. package/dist/{render-U7RMOU2K.js → render-SFIX3O3B.js} +24 -24
  131. package/dist/{render-AWFQGD4T.js → render-YTJ3SMCD.js} +4 -4
  132. package/dist/{render-batch-6UN3HT5A.js → render-batch-AFB2XK3I.js} +4 -4
  133. package/dist/renderSetupWorker.js +1 -1
  134. package/dist/{resolver-O6ZENVYP.js → resolver-F2D2YCSQ.js} +5 -5
  135. package/dist/{sherpa-CHOSLER6.js → sherpa-IBKSF6GX.js} +10 -10
  136. package/dist/{skills-2WUDLVDT.js → skills-G26XO2BY.js} +5 -5
  137. package/dist/{skillsUpdateCheck-7N4CXFNJ.js → skillsUpdateCheck-ZNDQSDB4.js} +3 -3
  138. package/dist/{snapshot-E5IT54QQ.js → snapshot-SN7I7O7I.js} +28 -28
  139. package/dist/{src-CP75EYSP.js → src-4GCHM2LX.js} +10 -10
  140. package/dist/{src-APLD7CAF.js → src-NDI4KNT3.js} +7 -7
  141. package/dist/{staticProjectServer-VO5U75UA.js → staticProjectServer-TTC3LYHO.js} +15 -15
  142. package/dist/studio/assets/{hyperframes-player-BvAidsoQ.js → hyperframes-player-D3ufdOJ_.js} +1 -1
  143. package/dist/studio/assets/{index-CbWWPYt-.js → index-7oKTFwYd.js} +1 -1
  144. package/dist/studio/assets/{index-Jt_3ZX4p.js → index-CALVHgsJ.js} +1 -1
  145. package/dist/studio/assets/{index-z1M2RwXX.js → index-DYk4U8BS.js} +83 -83
  146. package/dist/studio/index.html +1 -1
  147. package/dist/{studio-api-7JCPNJA7.js → studio-api-TVIDDUZG.js} +9 -9
  148. package/dist/{studioServer-A67X3ZLJ.js → studioServer-WBV2Q3SH.js} +40 -40
  149. package/dist/{telemetry-22DNA5QE.js → telemetry-RVFKZEOH.js} +3 -3
  150. package/dist/{timeline-K3BXXFQG.js → timeline-BUYUBI5X.js} +15 -15
  151. package/dist/{tokens-MWRAQMQU.js → tokens-PUA5FQKP.js} +2 -2
  152. package/dist/{transcribe-O5B3HUFK.js → transcribe-DZ6O6EG5.js} +9 -9
  153. package/dist/{transcribe-C7J56BLL.js → transcribe-L2QHSNHO.js} +15 -15
  154. package/dist/{updateCheck-EPJ7WDFT.js → updateCheck-PULEO7CW.js} +2 -2
  155. package/dist/{upgrade-M5XD6ZPM.js → upgrade-UJJIVNHJ.js} +2 -2
  156. package/dist/{urlDownloader-IEP2DY4N.js → urlDownloader-INLS5A6I.js} +7 -7
  157. package/dist/{validate-JAF2KIJI.js → validate-DJAZMEQB.js} +20 -20
  158. package/dist/{video-TX6DGLND.js → video-3GLT6U6Z.js} +8 -8
  159. package/package.json +1 -1
  160. package/dist/chunk-GV7I3ZSQ.js +0 -3795
  161. package/dist/chunk-NE55C6S5.js +0 -118
  162. /package/dist/{chunk-VYKPBRCB.js → chunk-ALLKNYC3.js} +0 -0
@@ -10,7 +10,8 @@ import {
10
10
  isLowMemorySystem
11
11
  } from "./chunk-JYVGYKXG.js";
12
12
  import {
13
- describeWslGpuAccess
13
+ describeWslGpuAccess,
14
+ detectWsl
14
15
  } from "./chunk-7KDQAD2W.js";
15
16
  import {
16
17
  MEDIA_VISUAL_STYLE_PROPERTIES,
@@ -29,7 +30,7 @@ import {
29
30
  renderFrameIdForRenderId,
30
31
  resolveAuthoredTimingWindow,
31
32
  toFps
32
- } from "./chunk-ZDEEHQ2Y.js";
33
+ } from "./chunk-SGIZMTWO.js";
33
34
  import {
34
35
  AUDIO_GROUP_RENDER_ID_ATTR,
35
36
  COLOR_GRADING_SOURCE_HIDDEN_ATTR,
@@ -58,7 +59,7 @@ import {
58
59
  shiftRateLane,
59
60
  sourceTimeAt,
60
61
  timeAtSourceTime
61
- } from "./chunk-GV7I3ZSQ.js";
62
+ } from "./chunk-LPOTN5GW.js";
62
63
  import {
63
64
  clampAudioGain,
64
65
  isAudibleVideoElement
@@ -665,6 +666,7 @@ function fingerprintKey(fingerprint) {
665
666
  return JSON.stringify([
666
667
  fingerprint.args,
667
668
  fingerprint.executablePath ?? null,
669
+ fingerprint.withoutWaylandDisplay === true,
668
670
  fingerprint.browserTimeoutMs,
669
671
  fingerprint.protocolTimeoutMs,
670
672
  fingerprint.requestedCaptureMode
@@ -902,6 +904,7 @@ async function probeHardwareWebGlInfo(ppt, options) {
902
904
  args: options.args,
903
905
  defaultViewport: { width: 64, height: 64 },
904
906
  executablePath: options.executablePath,
907
+ env: options.env,
905
908
  timeout: options.browserTimeout,
906
909
  waitForInitialPage: false
907
910
  };
@@ -1025,6 +1028,43 @@ function resolveHeadlessShellPath(config) {
1025
1028
  join2(home, ".cache", "hyperframes", "chrome", "chrome-headless-shell")
1026
1029
  ) ?? findCachedHeadlessShell(join2(home, ".cache", "puppeteer", "chrome-headless-shell"));
1027
1030
  }
1031
+ function resolveFullChromePath() {
1032
+ const baseDir = join2(homedir(), ".cache", "puppeteer", "chrome");
1033
+ let versions;
1034
+ try {
1035
+ versions = readdirSync(baseDir).sort(compareBrowserVersionsDescending);
1036
+ } catch {
1037
+ return void 0;
1038
+ }
1039
+ for (const version of versions) {
1040
+ const candidates = [
1041
+ join2(
1042
+ baseDir,
1043
+ version,
1044
+ "chrome-mac-arm64",
1045
+ "Google Chrome for Testing.app",
1046
+ "Contents",
1047
+ "MacOS",
1048
+ "Google Chrome for Testing"
1049
+ ),
1050
+ join2(
1051
+ baseDir,
1052
+ version,
1053
+ "chrome-mac-x64",
1054
+ "Google Chrome for Testing.app",
1055
+ "Contents",
1056
+ "MacOS",
1057
+ "Google Chrome for Testing"
1058
+ ),
1059
+ join2(baseDir, version, "chrome-linux64", "chrome"),
1060
+ join2(baseDir, version, "chrome-win64", "chrome.exe")
1061
+ ];
1062
+ for (const binary of candidates) {
1063
+ if (existsSync(binary)) return binary;
1064
+ }
1065
+ }
1066
+ return void 0;
1067
+ }
1028
1068
  var ENABLE_BROWSER_POOL = DEFAULT_CONFIG.enableBrowserPool;
1029
1069
  var BEGINFRAME_ONLY_FLAGS = /* @__PURE__ */ new Set([
1030
1070
  "--deterministic-mode",
@@ -1203,30 +1243,45 @@ function formatProbeFailure(err) {
1203
1243
  return `probe failed (${err instanceof Error ? err.message : String(err)})`;
1204
1244
  }
1205
1245
  async function probeAutoBrowserGpuMode(options) {
1206
- const platform = options.platform ?? process.platform;
1207
- const browserTimeout = options.browserTimeout ?? DEFAULT_CONFIG.browserTimeout;
1208
- const executablePath = options.chromePath ?? resolveHeadlessShellPath({});
1209
1246
  const ppt = await getPuppeteerOrNull();
1210
1247
  if (ppt === null) {
1211
1248
  logResolvedBrowserGpuMode("software", "puppeteer unavailable");
1212
1249
  return { mode: "software", cause: "probe-error" };
1213
1250
  }
1251
+ const probed = await probeWebGlMode(ppt, options);
1252
+ if (probed.mode === "hardware") return probed;
1253
+ if (detectWsl(options.wslHost) && process.env.WAYLAND_DISPLAY !== void 0) {
1254
+ const env = envWithoutWaylandDisplay();
1255
+ const retried = await probeWebGlMode(ppt, options, env, "without WAYLAND_DISPLAY: ");
1256
+ if (retried.mode === "hardware") return { mode: "hardware", withoutWaylandDisplay: true };
1257
+ }
1258
+ return { ...probed, ...wslAccess(options) };
1259
+ }
1260
+ async function probeWebGlMode(ppt, options, env, label = "") {
1214
1261
  try {
1215
1262
  const info = await probeHardwareWebGlInfo(ppt, {
1216
- args: getHardwareGpuProbeArgs(platform),
1217
- browserTimeout,
1218
- executablePath,
1219
- probeLifecycle: options.probeLifecycle
1263
+ args: getHardwareGpuProbeArgs(options.platform ?? process.platform),
1264
+ browserTimeout: options.browserTimeout ?? DEFAULT_CONFIG.browserTimeout,
1265
+ executablePath: options.chromePath ?? resolveHeadlessShellPath({}),
1266
+ probeLifecycle: options.probeLifecycle,
1267
+ env
1220
1268
  });
1221
1269
  const resolved = resolveWebGlProbeMode(info);
1222
- logResolvedBrowserGpuMode(resolved, describeWebGlProbe(info));
1223
- if (resolved === "hardware") return { mode: "hardware" };
1224
- return { mode: "software", cause: "no-gpu", ...wslAccess(options) };
1270
+ logResolvedBrowserGpuMode(resolved, label + describeWebGlProbe(info));
1271
+ return resolved === "hardware" ? { mode: "hardware" } : { mode: "software", cause: "no-gpu" };
1225
1272
  } catch (err) {
1226
- logResolvedBrowserGpuMode("software", formatProbeFailure(err));
1227
- return { mode: "software", cause: "probe-error", ...wslAccess(options) };
1273
+ logResolvedBrowserGpuMode("software", label + formatProbeFailure(err));
1274
+ return { mode: "software", cause: "probe-error" };
1228
1275
  }
1229
1276
  }
1277
+ function envWithoutWaylandDisplay() {
1278
+ const { WAYLAND_DISPLAY: _wslg, ...env } = process.env;
1279
+ return env;
1280
+ }
1281
+ async function captureWithoutWaylandDisplay(resolvedMode) {
1282
+ if (resolvedMode !== "hardware") return false;
1283
+ return (await _autoBrowserGpuModeCache)?.withoutWaylandDisplay === true;
1284
+ }
1230
1285
  function wslAccess(options) {
1231
1286
  const lines = describeWslGpuAccess(options.wslHost);
1232
1287
  return lines ? { wslAccess: lines } : {};
@@ -1286,6 +1341,7 @@ function createBrowserLaunchFingerprint(chromeArgs, config) {
1286
1341
  return {
1287
1342
  args: chromeArgs,
1288
1343
  executablePath: headlessShell,
1344
+ withoutWaylandDisplay: launchConfig.withoutWaylandDisplay === true,
1289
1345
  browserTimeoutMs: launchConfig.browserTimeout,
1290
1346
  protocolTimeoutMs: launchConfig.protocolTimeout,
1291
1347
  requestedCaptureMode
@@ -1297,6 +1353,7 @@ async function acquireBrowser(chromeArgs, config) {
1297
1353
  }
1298
1354
  async function launchBrowser(fingerprint) {
1299
1355
  const ppt = await getPuppeteer();
1356
+ const env = fingerprint.withoutWaylandDisplay ? envWithoutWaylandDisplay() : void 0;
1300
1357
  let captureMode = fingerprint.requestedCaptureMode;
1301
1358
  let browser;
1302
1359
  try {
@@ -1306,6 +1363,7 @@ async function launchBrowser(fingerprint) {
1306
1363
  args: [...fingerprint.args],
1307
1364
  defaultViewport: null,
1308
1365
  executablePath: fingerprint.executablePath,
1366
+ env,
1309
1367
  timeout: fingerprint.browserTimeoutMs,
1310
1368
  protocolTimeout: fingerprint.protocolTimeoutMs
1311
1369
  });
@@ -1335,6 +1393,7 @@ async function launchBrowser(fingerprint) {
1335
1393
  args: stripBeginFrameFlags([...fingerprint.args]),
1336
1394
  defaultViewport: null,
1337
1395
  executablePath: fingerprint.executablePath,
1396
+ env,
1338
1397
  timeout: fingerprint.browserTimeoutMs,
1339
1398
  protocolTimeout: fingerprint.protocolTimeoutMs
1340
1399
  });
@@ -5272,7 +5331,8 @@ async function createCaptureSession(serverUrl, outputDir, options, onBeforeCaptu
5272
5331
  { width: options.width, height: options.height, captureMode: preMode, requiresWebGpu },
5273
5332
  gpuConfig
5274
5333
  );
5275
- const browserLease = await acquireBrowser(chromeArgs, config);
5334
+ const withoutWaylandDisplay = await captureWithoutWaylandDisplay(resolvedGpuMode);
5335
+ const browserLease = await acquireBrowser(chromeArgs, { ...config, withoutWaylandDisplay });
5276
5336
  return constructCaptureSessionWithRollback({
5277
5337
  browserLease,
5278
5338
  serverUrl,
@@ -8031,35 +8091,6 @@ async function runFfmpeg(args, opts) {
8031
8091
  });
8032
8092
  return toResult(await managed.wait());
8033
8093
  }
8034
- async function runFfmpegPipeline(producerArgs, consumerArgs, opts) {
8035
- if (opts?.signal?.aborted) return { ...ABORTED_BEFORE_START };
8036
- const deadlineAtMs = Date.now() + (opts?.timeout ?? DEFAULT_TIMEOUT);
8037
- const producer = spawnFfmpeg(producerArgs);
8038
- const consumer = spawnFfmpeg(consumerArgs);
8039
- consumer.stdin?.on("error", () => {
8040
- });
8041
- for (const event of ["close", "error"]) {
8042
- consumer.once(event, () => producer.stdout?.destroy());
8043
- producer.once(event, () => consumer.stdin?.end());
8044
- }
8045
- if (consumer.stdin) producer.stdout?.pipe(consumer.stdin);
8046
- const settleOrder = [];
8047
- const outcomes = await Promise.all(
8048
- [producer, consumer].map(
8049
- (child) => new ManagedChildProcess(child, {
8050
- signal: opts?.signal,
8051
- deadlineAtMs,
8052
- onStderr: opts?.onStderr
8053
- }).wait().then((outcome) => {
8054
- settleOrder.push(outcome);
8055
- return outcome;
8056
- })
8057
- )
8058
- );
8059
- const reported = settleOrder.find((outcome) => !succeeded(outcome)) ?? outcomes[1];
8060
- const stderr = [...outcomes.filter((outcome) => outcome !== reported), reported].map((outcome) => outcome.stderr).join("");
8061
- return toResult(reported, stderr);
8062
- }
8063
8094
 
8064
8095
  // ../engine/src/utils/ffprobe.ts
8065
8096
  import { spawn as spawn3 } from "child_process";
@@ -11194,7 +11225,7 @@ function framePathsFromDirectory(outputDir, format, allowGaps = false) {
11194
11225
  // ../engine/src/services/extractionCache.ts
11195
11226
  var COMPLETE_SENTINEL = ".hf-complete";
11196
11227
  var GC_MARKER = ".hf-last-gc";
11197
- var SCHEMA_PREFIX = "hfcache-v6-";
11228
+ var SCHEMA_PREFIX = "hfcache-v7-";
11198
11229
  var KEY_HEX_CHARS = 16;
11199
11230
  async function readContentSha256(path, signal) {
11200
11231
  try {
@@ -11809,55 +11840,6 @@ function chromeGuessForUntaggedMatrix(metadata) {
11809
11840
  const hd = metadata.height >= 720 && !CHROME_BT601_UNTAGGED_CODECS.has(metadata.videoCodec);
11810
11841
  return [`setparams=colorspace=${hd ? "bt709" : "smpte170m"}`];
11811
11842
  }
11812
- var NUT_RAW_PIXEL_FORMATS = /* @__PURE__ */ new Set([
11813
- "yuv420p",
11814
- "yuvj420p",
11815
- "yuv422p",
11816
- "yuvj422p",
11817
- "yuv444p",
11818
- "yuvj444p",
11819
- "yuva420p",
11820
- "yuva444p",
11821
- "yuv440p",
11822
- "yuv411p",
11823
- "yuv410p",
11824
- "yuva422p",
11825
- "yuv420p10le",
11826
- "yuv422p10le",
11827
- "yuv444p10le",
11828
- "yuva420p10le",
11829
- "yuva444p10le",
11830
- "yuv420p12le",
11831
- "nv12",
11832
- "nv21",
11833
- "yuyv422",
11834
- "uyvy422",
11835
- "gray",
11836
- "gray10le",
11837
- "ya8",
11838
- "gbrp",
11839
- "gbrap",
11840
- "gbrp10le",
11841
- "gbrp12le",
11842
- "gbrap10le",
11843
- "rgb24",
11844
- "bgr24",
11845
- "rgba",
11846
- "bgra",
11847
- "argb",
11848
- "abgr",
11849
- "rgb48le",
11850
- "rgba64le"
11851
- ]);
11852
- function restoreSourceColourFilter(metadata) {
11853
- const tags = [
11854
- ["range", metadata.colorRange],
11855
- ["colorspace", metadata.colorSpace?.colorSpace],
11856
- ["color_primaries", metadata.colorSpace?.colorPrimaries],
11857
- ["color_trc", metadata.colorSpace?.colorTransfer]
11858
- ].filter(([, value]) => value && value !== "unknown" && value !== "reserved");
11859
- return tags.length > 0 ? [`setparams=${tags.map(([key, value]) => `${key}=${value}`).join(":")}`] : [];
11860
- }
11861
11843
  var EXTRACTION_SEGMENT_SECONDS = 120;
11862
11844
  var EXTRACTION_SLOTS = Math.max(1, Math.floor(cpus().length / 2));
11863
11845
  var inExtractionSlot = createConcurrencyLimit(EXTRACTION_SLOTS);
@@ -11964,8 +11946,8 @@ async function extractVideoFramesRange(videoPath, videoId, startTime, duration,
11964
11946
  const isMacOS = process.platform === "darwin";
11965
11947
  const toneMappedToSdr = options.toneMapHdrToSdr === true && isHdr && await toneMapsWithZscale();
11966
11948
  const decodeWithVideoToolbox = isHdr && isMacOS && !toneMappedToSdr;
11967
- const sampleCfrAtOutputFps = !options.finalFrameOnly && !metadata.isVFR;
11968
- if (options.frameRanges && !sampleCfrAtOutputFps) {
11949
+ const sampleAtOutputFps = !options.finalFrameOnly;
11950
+ if (options.frameRanges && (!sampleAtOutputFps || metadata.isVFR)) {
11969
11951
  throw new Error("frameRanges extraction needs a constant-frame-rate source");
11970
11952
  }
11971
11953
  const args = [];
@@ -11979,14 +11961,14 @@ async function extractVideoFramesRange(videoPath, videoId, startTime, duration,
11979
11961
  if (options.finalFrameOnly) {
11980
11962
  args.push("-i", videoPath, "-ss", String(startTime), "-frames:v", "1");
11981
11963
  } else {
11982
- if (sampleCfrAtOutputFps) args.push("-noaccurate_seek");
11964
+ if (sampleAtOutputFps) args.push("-noaccurate_seek");
11983
11965
  args.push("-ss", String(startTime), "-i", videoPath, "-t", String(duration));
11984
11966
  }
11985
11967
  const vfFilters = [];
11986
11968
  if (decodeWithVideoToolbox) {
11987
11969
  vfFilters.push("format=nv12");
11988
11970
  }
11989
- if (sampleCfrAtOutputFps) {
11971
+ if (sampleAtOutputFps) {
11990
11972
  vfFilters.push(
11991
11973
  "settb=intb/2",
11992
11974
  "setpts=PTS-lte(TB\\,0.001)",
@@ -12011,48 +11993,25 @@ async function extractVideoFramesRange(videoPath, videoId, startTime, duration,
12011
11993
  if (format === "png") encodeArgs.push("-compression_level", "1");
12012
11994
  encodeArgs.push("-y", outputPattern);
12013
11995
  const runOptions = { signal, timeout: ffmpegProcessTimeout };
12014
- const resampleVfrToCfr = !options.finalFrameOnly && metadata.isVFR;
12015
- if (resampleVfrToCfr) args.push("-fps_mode", "cfr", "-r", ffmpegFps);
12016
- let processResult;
12017
- if (resampleVfrToCfr && vfFilters.length > 0 && !isHdr && NUT_RAW_PIXEL_FORMATS.has(metadata.pixelFormat ?? "")) {
12018
- processResult = await inExtractionSlot(
12019
- () => runFfmpegPipeline(
12020
- [...args, "-an", "-sn", "-dn", "-c:v", "rawvideo", "-f", "nut", "pipe:1"],
12021
- [
12022
- "-f",
12023
- "nut",
12024
- "-i",
12025
- "pipe:0",
12026
- "-vf",
12027
- [...restoreSourceColourFilter(metadata), ...vfFilters].join(","),
12028
- "-fps_mode",
12029
- "passthrough",
12030
- ...encodeArgs
12031
- ],
12032
- runOptions
12033
- ),
12034
- signal
12035
- );
12036
- } else {
12037
- const filterArgs = vfFilters.length > 0 ? ["-vf", vfFilters.join(",")] : [];
12038
- const segmentFrames = Math.round(EXTRACTION_SEGMENT_SECONDS * fps);
12039
- const totalFrames = extractionFrameCountForDuration(duration, normalizedFps, false);
12040
- processResult = sampleCfrAtOutputFps && (options.frameRanges || totalFrames > segmentFrames) ? await runSegmentedExtraction({
12041
- decodeArgs,
12042
- filterAndEncodeArgs: [...filterArgs, ...encodeArgs],
12043
- videoPath,
12044
- startTime,
12045
- fps,
12046
- segments: splitFrameRanges(
12047
- options.frameRanges ?? [{ firstFrame: 0, frames: totalFrames }],
12048
- segmentFrames
12049
- ),
12050
- runOptions
12051
- }) : await inExtractionSlot(
12052
- () => runFfmpeg([...args, ...filterArgs, ...encodeArgs], runOptions),
12053
- signal
12054
- );
12055
- }
11996
+ const filterArgs = vfFilters.length > 0 ? ["-vf", vfFilters.join(",")] : [];
11997
+ const segmentFrames = Math.round(EXTRACTION_SEGMENT_SECONDS * fps);
11998
+ const totalFrames = extractionFrameCountForDuration(duration, normalizedFps, metadata.isVFR);
11999
+ const boundVfrFrameCount = metadata.isVFR && totalFrames > 0;
12000
+ const processResult = sampleAtOutputFps && (options.frameRanges || boundVfrFrameCount || totalFrames > segmentFrames) ? await runSegmentedExtraction({
12001
+ decodeArgs,
12002
+ filterAndEncodeArgs: [...filterArgs, ...encodeArgs],
12003
+ videoPath,
12004
+ startTime,
12005
+ fps,
12006
+ segments: splitFrameRanges(
12007
+ options.frameRanges ?? [{ firstFrame: 0, frames: totalFrames }],
12008
+ segmentFrames
12009
+ ),
12010
+ runOptions
12011
+ }) : await inExtractionSlot(
12012
+ () => runFfmpeg([...args, ...filterArgs, ...encodeArgs], runOptions),
12013
+ signal
12014
+ );
12056
12015
  if (processResult.failureReason === "external_interruption") {
12057
12016
  throw new VideoSourceExtractionError(
12058
12017
  "external_interruption",
@@ -14799,10 +14758,11 @@ function buildFadeFilters(track) {
14799
14758
  }
14800
14759
  return stages.length ? `,${stages.join(",")}` : "";
14801
14760
  }
14802
- function buildTrackInputFilter(track, index, volumeFilter, totalDuration) {
14761
+ function buildTrackInputFilter(track, index, volumeFilter, totalDuration, padToDuration = true) {
14803
14762
  const delayMs = Math.round(track.start * 1e3);
14804
14763
  const trimDuration = track.end - track.start + (track.tailSeconds ?? 0);
14805
- return `[${index}:a]atrim=0:${formatFilterNumber(trimDuration)},${volumeFilter}${buildFadeFilters(track)},adelay=${delayMs}|${delayMs},apad,asetpts=N/SR/TB,atrim=0:${formatFilterNumber(totalDuration)}[a${index}]`;
14764
+ const filters = `[${index}:a]atrim=0:${formatFilterNumber(trimDuration)},${volumeFilter}${buildFadeFilters(track)},adelay=${delayMs}|${delayMs}`;
14765
+ return `${filters}${padToDuration ? `,apad,asetpts=N/SR/TB,atrim=0:${formatFilterNumber(totalDuration)}` : ""}[a${index}]`;
14806
14766
  }
14807
14767
  function missingSourceMessage(elementId, src, baseDir, resolvedPath) {
14808
14768
  const relativePath = relative(baseDir, resolvedPath).replace(/\\/g, "/");
@@ -15079,26 +15039,26 @@ async function mixAudioTracks(tracks, outputPath, totalDuration, signal, config,
15079
15039
  }
15080
15040
  const outputDir = dirname6(outputPath);
15081
15041
  if (!existsSync10(outputDir)) mkdirSync7(outputDir, { recursive: true });
15082
- const buildFilterComplex = (ignoreAutomation) => {
15042
+ const buildFilterComplex = (ignoreAutomation, useNormalize2) => {
15083
15043
  const filterParts = [];
15084
15044
  tracks.forEach((track, i) => {
15085
15045
  const volumeFilter = buildVolumeExpression(track, ignoreAutomation);
15086
- filterParts.push(buildTrackInputFilter(track, i, volumeFilter, totalDuration));
15046
+ filterParts.push(buildTrackInputFilter(track, i, volumeFilter, totalDuration, !useNormalize2));
15087
15047
  });
15088
15048
  const mixInputs = tracks.map((_, i) => `[a${i}]`).join("");
15089
- const mixFilter = `${mixInputs}amix=inputs=${tracks.length}:duration=longest:dropout_transition=0[mixed]`;
15090
- const compensatedGain = masterOutputGain * tracks.length;
15091
- const postMixGainFilter = `[mixed]volume=${formatFilterNumber(compensatedGain)}[out]`;
15049
+ const mixFilter = `${mixInputs}amix=inputs=${tracks.length}:duration=longest:dropout_transition=0${useNormalize2 ? ":normalize=0" : ""}[mixed]`;
15050
+ const gain = masterOutputGain * (useNormalize2 ? 1 : tracks.length);
15051
+ const postMixGainFilter = useNormalize2 ? `[mixed]volume=${formatFilterNumber(gain)},apad,asetpts=N/SR/TB,atrim=0:${formatFilterNumber(totalDuration)}[out]` : `[mixed]volume=${formatFilterNumber(gain)}[out]`;
15092
15052
  return [...filterParts, mixFilter, postMixGainFilter].join(";");
15093
15053
  };
15094
- const runMix = async (ignoreAutomation) => {
15054
+ const runMix = async (ignoreAutomation, useNormalize2) => {
15095
15055
  const inputs = [];
15096
15056
  tracks.forEach((track) => inputs.push("-i", track.srcPath));
15097
15057
  const scriptDir = mkdtempSync6(join13(outputDir, ".filter-complex-"));
15098
15058
  const scriptPath = join13(scriptDir, "graph.txt");
15099
15059
  const fd = openSync4(scriptPath, "wx", 384);
15100
15060
  try {
15101
- writeFileSync6(fd, buildFilterComplex(ignoreAutomation));
15061
+ writeFileSync6(fd, buildFilterComplex(ignoreAutomation, useNormalize2));
15102
15062
  } finally {
15103
15063
  closeSync4(fd);
15104
15064
  }
@@ -15126,11 +15086,16 @@ async function mixAudioTracks(tracks, outputPath, totalDuration, signal, config,
15126
15086
  rmSync7(scriptDir, { recursive: true, force: true });
15127
15087
  }
15128
15088
  };
15129
- let result = await runMix(false);
15089
+ let useNormalize = true;
15090
+ let result = await runMix(false, useNormalize);
15091
+ if (!result.success && result.failureReason !== "external_interruption" && !signal?.aborted && groupNormalizeOptionUnsupported(result.stderr)) {
15092
+ useNormalize = false;
15093
+ result = await runMix(false, useNormalize);
15094
+ }
15130
15095
  let degradedAutomation = false;
15131
15096
  const hasAutomation = tracks.some((track) => (track.volumeKeyframes?.length ?? 0) > 0);
15132
15097
  if (!result.success && result.failureReason !== "external_interruption" && !signal?.aborted && hasAutomation) {
15133
- const retry = await runMix(true);
15098
+ const retry = await runMix(true, useNormalize);
15134
15099
  if (retry.success) {
15135
15100
  result = retry;
15136
15101
  degradedAutomation = true;
@@ -16645,9 +16610,6 @@ function verifyGpuParity(a, b, options = {}) {
16645
16610
  }
16646
16611
 
16647
16612
  // ../engine/src/services/hdrCapture.ts
16648
- import { existsSync as existsSync12, readdirSync as readdirSync7 } from "fs";
16649
- import { join as join17 } from "path";
16650
- import { homedir as homedir2 } from "os";
16651
16613
  var PQ_M1 = 0.1593017578125;
16652
16614
  var PQ_M2 = 78.84375;
16653
16615
  var PQ_C1 = 0.8359375;
@@ -16768,39 +16730,6 @@ function float16ToPqRgb(rawBuffer, bytesPerRow, width, height) {
16768
16730
  }
16769
16731
  return output;
16770
16732
  }
16771
- function resolveHeadedChromePath() {
16772
- const baseDir = join17(homedir2(), ".cache", "puppeteer", "chrome");
16773
- if (!existsSync12(baseDir)) return void 0;
16774
- const versions = readdirSync7(baseDir).sort().reverse();
16775
- for (const version of versions) {
16776
- const candidates = [
16777
- join17(
16778
- baseDir,
16779
- version,
16780
- "chrome-mac-arm64",
16781
- "Google Chrome for Testing.app",
16782
- "Contents",
16783
- "MacOS",
16784
- "Google Chrome for Testing"
16785
- ),
16786
- join17(
16787
- baseDir,
16788
- version,
16789
- "chrome-mac-x64",
16790
- "Google Chrome for Testing.app",
16791
- "Contents",
16792
- "MacOS",
16793
- "Google Chrome for Testing"
16794
- ),
16795
- join17(baseDir, version, "chrome-linux64", "chrome"),
16796
- join17(baseDir, version, "chrome-win64", "chrome.exe")
16797
- ];
16798
- for (const binary of candidates) {
16799
- if (existsSync12(binary)) return binary;
16800
- }
16801
- }
16802
- return void 0;
16803
- }
16804
16733
  async function launchHdrBrowser(width, height) {
16805
16734
  let ppt;
16806
16735
  try {
@@ -16815,7 +16744,7 @@ async function launchHdrBrowser(width, height) {
16815
16744
  ppt = mod.default;
16816
16745
  }
16817
16746
  if (!ppt) throw new Error("Neither puppeteer nor puppeteer-core found");
16818
- const chromePath = resolveHeadedChromePath();
16747
+ const chromePath = resolveFullChromePath();
16819
16748
  if (!chromePath) {
16820
16749
  throw new Error(
16821
16750
  "[HDR] No Chrome binary found. Install: npx @puppeteer/browsers install chrome@stable"
@@ -6,21 +6,21 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  parakeetRunner
9
- } from "./chunk-6ENZIL42.js";
9
+ } from "./chunk-7ZWOLEGS.js";
10
10
  import {
11
11
  DecodeCancelled,
12
12
  prepareSherpaWav,
13
13
  sherpaUnsupportedReason,
14
14
  transcribeWithSherpa
15
- } from "./chunk-PCBCTD7M.js";
15
+ } from "./chunk-4YDQQQY6.js";
16
16
  import {
17
17
  initialModelForLanguage,
18
18
  transcribe
19
- } from "./chunk-RB6RHOSF.js";
19
+ } from "./chunk-ZZ3ZWTOI.js";
20
20
  import {
21
21
  createRenderCancellationScope,
22
22
  stoppedByCancelSignal
23
- } from "./chunk-6UMBAJRU.js";
23
+ } from "./chunk-T243WV6D.js";
24
24
  import {
25
25
  formatSrt,
26
26
  formatVtt,
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-PBN6GBJE.js";
16
16
  import {
17
17
  parseFps
18
- } from "./chunk-ZDEEHQ2Y.js";
18
+ } from "./chunk-SGIZMTWO.js";
19
19
 
20
20
  // src/browser/windowsCrash.ts
21
21
  var STATUS_STACK_BUFFER_OVERRUN_DEC = "3221225595";