hyperframes 0.8.156 → 0.8.158
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.
- package/dist/{add-U35DO2JR.js → add-VBBOJ3RB.js} +14 -14
- package/dist/{animatedGifPrep-MRGFHBVF.js → animatedGifPrep-MTJRHJ5G.js} +9 -9
- package/dist/api.js +17 -17
- package/dist/{asset-HS4Q6LS2.js → asset-3MLXYJCT.js} +2 -2
- package/dist/{assetCataloger-SRTQYA6J.js → assetCataloger-DI7FC5KZ.js} +3 -3
- package/dist/{auth-HS6GAILF.js → auth-RJCTHSMH.js} +2 -2
- package/dist/{autoUpdate-MRQ4ULBI.js → autoUpdate-VD6R34HF.js} +2 -2
- package/dist/{backgroundChecks-K2ZMA43S.js → backgroundChecks-CWWIZDTW.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-CMVCRSWP.js → batchRender-FTZ67377.js} +4 -4
- package/dist/{beats-JYECNCTZ.js → beats-6CN4BEXJ.js} +16 -15
- package/dist/{benchmark-JGMKJSPN.js → benchmark-4QSNJZXI.js} +11 -11
- package/dist/{browser-63WITJVS.js → browser-H7PRFBJV.js} +5 -5
- package/dist/{bundleWithLocalizedFonts-5SLYBFXL.js → bundleWithLocalizedFonts-IVO43QBQ.js} +2 -2
- package/dist/{capture-T6QSEGKM.js → capture-GZSY7LZJ.js} +2 -2
- package/dist/{capture-7MFOIE4K.js → capture-IEEQTPAS.js} +22 -12
- package/dist/{catalog-KVE5KJJT.js → catalog-PD25CVG3.js} +14 -14
- package/dist/{catch-up-E3WYWSDY.js → catch-up-2TGBK342.js} +6 -6
- package/dist/{check-QRP5WCP2.js → check-HFNJEV3O.js} +36 -35
- package/dist/{checkBrowser-5XFA6PXF.js → checkBrowser-767LAZKF.js} +34 -32
- package/dist/{chunk-KMSS5TOQ.js → chunk-23VDPRQ3.js} +1 -1
- package/dist/{chunk-RXTEP3NB.js → chunk-2XUQPJ3W.js} +2 -2
- package/dist/{chunk-JKCKXGIC.js → chunk-3FRK53UC.js} +1 -1
- package/dist/{chunk-YNFJWJHW.js → chunk-3MQBIZHG.js} +7 -7
- package/dist/{chunk-U3BCDVZO.js → chunk-3QATT3QF.js} +1 -1
- package/dist/{chunk-VCCOO2TO.js → chunk-3UMNI4XZ.js} +5 -5
- package/dist/{chunk-DRNTIYT3.js → chunk-4R6OZQGX.js} +3 -3
- package/dist/{chunk-DDSQBREC.js → chunk-4YDQQQY6.js} +2 -2
- package/dist/{chunk-DSX7R5M7.js → chunk-56QTFOWH.js} +4 -4
- package/dist/{chunk-YOEGUBBY.js → chunk-7F3B5YYT.js} +82 -14
- package/dist/{chunk-MBE4SEL7.js → chunk-7FGHFHWD.js} +5 -5
- package/dist/{chunk-OBXWIVYN.js → chunk-7KDQAD2W.js} +5 -11
- package/dist/{chunk-YZEHYWOH.js → chunk-7ZWOLEGS.js} +1 -1
- package/dist/{chunk-VY23BB2D.js → chunk-BB2SFTMY.js} +4 -4
- package/dist/{chunk-FSZAFCU7.js → chunk-CBNI34SD.js} +1 -1
- package/dist/{chunk-VK5JRYJL.js → chunk-DCQCGE2W.js} +13 -12
- package/dist/{chunk-7U27WUMQ.js → chunk-DISITOR6.js} +5 -4
- package/dist/{chunk-SCMNFRL5.js → chunk-EDEFAJI5.js} +10 -9
- package/dist/{chunk-56AEM2EL.js → chunk-EEEUI3ON.js} +11 -11
- package/dist/{chunk-444O62RL.js → chunk-EGKIQS5J.js} +1 -1
- package/dist/{chunk-YGLM2DHX.js → chunk-EY6ISRP3.js} +1 -1
- package/dist/{chunk-2K5YII2L.js → chunk-FJT35XBA.js} +3 -3
- package/dist/{chunk-Q7FDYQR4.js → chunk-GPUVPZRK.js} +1 -1
- package/dist/{chunk-WLYSVHZE.js → chunk-H6BWNY56.js} +2 -2
- package/dist/{chunk-YUTUYCGK.js → chunk-IRRRH66M.js} +39 -31
- package/dist/{chunk-XXTOOXZ7.js → chunk-J4SSEVRU.js} +2 -2
- package/dist/{chunk-TLUGPEW4.js → chunk-J6SJCYAQ.js} +5 -5
- package/dist/{chunk-SNMMFFKZ.js → chunk-J7WFHOCW.js} +1 -1
- package/dist/chunk-KCF6GHJP.js +250 -0
- package/dist/{chunk-SCOXM5LP.js → chunk-KEGTYA7V.js} +1 -1
- package/dist/{chunk-DDK6E66K.js → chunk-L6AJC7UQ.js} +1 -1
- package/dist/{chunk-VPOEKLZL.js → chunk-LAAGHMRC.js} +13 -2
- package/dist/{chunk-HBKKW3NL.js → chunk-LAPUMJOC.js} +6 -6
- package/dist/chunk-LPOTN5GW.js +3795 -0
- package/dist/{chunk-FIL6QPZT.js → chunk-LQXHRO6F.js} +2 -2
- package/dist/{chunk-IOBKVP27.js → chunk-NFX4K6OW.js} +1 -1
- package/dist/{chunk-HG6H2ICP.js → chunk-NNQP5TNO.js} +3 -3
- package/dist/{chunk-OOCONATR.js → chunk-OTG5H2VM.js} +3 -3
- package/dist/{chunk-7K3CHJS3.js → chunk-PKHDQELW.js} +10 -10
- package/dist/{chunk-COBIO7VC.js → chunk-QH2PL6J4.js} +1 -1
- package/dist/{chunk-YLSSI4XB.js → chunk-QRPYTJBW.js} +1 -1
- package/dist/{chunk-7FFGZC2X.js → chunk-QWQ6GQTI.js} +1 -1
- package/dist/{chunk-SO44ETGW.js → chunk-RU6AIVON.js} +2 -2
- package/dist/{chunk-3THJEW7G.js → chunk-SGIZMTWO.js} +2 -2
- package/dist/{chunk-JJERZGVE.js → chunk-SHEVPNUR.js} +1 -1
- package/dist/{chunk-LZ2PZIVS.js → chunk-SLUFA6UM.js} +2 -2
- package/dist/{chunk-QJEHLWM4.js → chunk-SQHWDFTV.js} +1 -1
- package/dist/{chunk-M4CRDGC4.js → chunk-T243WV6D.js} +1 -1
- package/dist/{chunk-LJHF4SKT.js → chunk-T76NSAXO.js} +2 -2
- package/dist/{chunk-HVQQN4NG.js → chunk-W2SNLHKF.js} +1 -1
- package/dist/{chunk-C7WALYAY.js → chunk-Y6E2PW7Z.js} +1 -1
- package/dist/{chunk-QOP5D3UM.js → chunk-YB26LWR2.js} +2 -2
- package/dist/{chunk-GVJ4LG62.js → chunk-YVD5M26L.js} +2 -2
- package/dist/{chunk-NV2JPSI4.js → chunk-Z347DFOL.js} +1 -1
- package/dist/{chunk-SCXATNSP.js → chunk-ZZ3ZWTOI.js} +3 -3
- package/dist/{clean-4HTCYML6.js → clean-FQUVFH6H.js} +18 -18
- package/dist/cli.js +52 -52
- package/dist/{cloud-HFBG33UU.js → cloud-BHAYVT6F.js} +4 -4
- package/dist/{cloudrun-QK56WQY3.js → cloudrun-STLNWUBW.js} +5 -5
- package/dist/commands/contrast-audit.browser.js +25 -8
- package/dist/commands/layout-audit.browser.js +117 -12
- package/dist/{compare-4RYN3LLC.js → compare-2FRBIK5Z.js} +28 -27
- package/dist/{compiler-JPA25IUF.js → compiler-VFJVUZWR.js} +5 -5
- package/dist/{component-7ARXR4KZ.js → component-DRKXJVXB.js} +3 -3
- package/dist/{compositions-DNBHEIGP.js → compositions-D3SN64J3.js} +14 -14
- package/dist/{delete-4XYV72EU.js → delete-NA5WC2IR.js} +2 -2
- package/dist/{deterministicFonts-EOMDR6ZF.js → deterministicFonts-LNNVHVS2.js} +2 -2
- package/dist/{dist-2YYJYYPY.js → dist-2VXSQLXO.js} +1 -1
- package/dist/{dist-SKUIM4QJ.js → dist-SVTSOG4Q.js} +3 -3
- package/dist/docker/Dockerfile.render +21 -1
- package/dist/{doctor-5PHSH7IK.js → doctor-VXCMPOY3.js} +14 -14
- package/dist/{events-FOGRN2KV.js → events-QAHWXFFG.js} +4 -4
- package/dist/{events-GQCOQY5E.js → events-ZJEPMUWT.js} +5 -5
- package/dist/{feedback-6T6ZJOTM.js → feedback-UGOQ57TU.js} +9 -9
- package/dist/{ffmpeg-VJXXLKI6.js → ffmpeg-2ROTISBL.js} +2 -2
- package/dist/{figma-PZLGUS6C.js → figma-YO2MJZDP.js} +3 -3
- package/dist/fontLocalizeCli.js +12 -12
- package/dist/{get-XUNYSY2Z.js → get-WMJAYRNF.js} +2 -2
- package/dist/{gpuPolicy-SWCZJRZR.js → gpuPolicy-VXNJ4UBN.js} +9 -9
- package/dist/{grade-compare-S27N2NRU.js → grade-compare-QZ7BG2AP.js} +28 -28
- package/dist/{help-4HZ75YVH.js → help-AR4MX2AH.js} +1 -1
- package/dist/{history-NENOG3BT.js → history-NF764OFQ.js} +8 -8
- package/dist/hyperframe-runtime.js +15 -15
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +15 -15
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-IDEUAYJZ.js → info-476ERK4G.js} +10 -10
- package/dist/{init-KWGZEC7F.js → init-M6YUOBBZ.js} +40 -35
- package/dist/{inspect-3WLT3EHZ.js → inspect-QYPUG3UZ.js} +29 -28
- package/dist/{installer-I3SLBB7G.js → installer-HF5BXXXM.js} +5 -5
- package/dist/{keyframes-7HPN5DKO.js → keyframes-MTZRE34W.js} +8 -8
- package/dist/{lambda-MJH6U52V.js → lambda-ZCX7KGTY.js} +6 -6
- package/dist/{layout-ZEW4RZRP.js → layout-DLX4HQFL.js} +29 -28
- package/dist/{lint-3TNKI4PK.js → lint-OQ5QWCHZ.js} +9 -9
- package/dist/{lintProject-XQWXJYSC.js → lintProject-JGHKRO5L.js} +1 -1
- package/dist/{list-BJR2IXU4.js → list-AZ6OIOIK.js} +2 -2
- package/dist/{login-EA27W5T2.js → login-DJPYT4YZ.js} +4 -4
- package/dist/{manager-3EUU5UX6.js → manager-JNJE54OQ.js} +3 -3
- package/dist/{media-treatment-3JZFCG6I.js → media-treatment-4YKC4LGB.js} +14 -14
- package/dist/{models-IRFIJOIW.js → models-WHDUQZQZ.js} +13 -13
- package/dist/{motionShot-S4M7QSW3.js → motionShot-KEHC5AMK.js} +16 -15
- package/dist/{normalize-audio-IOY3NRHJ.js → normalize-audio-ATAQGUPX.js} +6 -6
- package/dist/{open-SCBC3NF5.js → open-4DXBEX2U.js} +6 -6
- package/dist/{parakeetRunner-FGTIYDG7.js → parakeetRunner-5PNBGCGH.js} +14 -14
- package/dist/{pipeline-JEFEWIZ3.js → pipeline-QA2422UI.js} +10 -10
- package/dist/{play-4TCSBDHO.js → play-SKTSHZM5.js} +21 -21
- package/dist/{preflight-OIHM57E7.js → preflight-BH2XUQBS.js} +4 -4
- package/dist/{present-S6UBG5VI.js → present-KSQ5GASH.js} +17 -17
- package/dist/{preview-HBDXDJCV.js → preview-TDD3QDR3.js} +20 -20
- package/dist/{producer-KSAUIT6F.js → producer-PQMZ7OYH.js} +1 -1
- package/dist/{projectConfig-CNAK65RI.js → projectConfig-EYYDESVO.js} +7 -7
- package/dist/{publication-AUWZFGJI.js → publication-MJY3XYYV.js} +3 -3
- package/dist/{publish-EMNP3VCC.js → publish-5TZIKVLW.js} +9 -9
- package/dist/{remove-background-GICM6TE5.js → remove-background-HT73ZUIG.js} +11 -11
- package/dist/{render-DMHQZMV4.js → render-ADBL3C7S.js} +27 -27
- package/dist/{render-PHEQSRHV.js → render-KJCDJEGI.js} +11 -11
- package/dist/{render-WMRNH7HO.js → render-YTJ3SMCD.js} +4 -4
- package/dist/{render-batch-OUTHTWN5.js → render-batch-AFB2XK3I.js} +4 -4
- package/dist/renderSetupWorker.js +1 -1
- package/dist/{resolver-NTB6HOZC.js → resolver-F2D2YCSQ.js} +5 -5
- package/dist/{sherpa-3YJNJ6TF.js → sherpa-IBKSF6GX.js} +13 -13
- package/dist/skills/hyperframes/SKILL.md +1 -1
- package/dist/skills/hyperframes/references/frame-worker-core.md +1 -1
- package/dist/skills/hyperframes/references/intent-interview.md +2 -2
- package/dist/skills/hyperframes/references/production-loop.md +11 -11
- package/dist/skills/hyperframes/references/review-loop.md +6 -6
- package/dist/skills/hyperframes/references/storyboard-format.md +1 -1
- package/dist/skills/hyperframes-cli/SKILL.md +1 -1
- package/dist/{skills-MKEJGL35.js → skills-E75DFHGG.js} +7 -7
- package/dist/{skillsUpdateCheck-RTLARPPP.js → skillsUpdateCheck-EPTKOBR6.js} +3 -3
- package/dist/{snapshot-KMLGFZWY.js → snapshot-Z6T4I5TE.js} +31 -31
- package/dist/{src-4HB343JW.js → src-4GCHM2LX.js} +11 -11
- package/dist/{src-HJ2NF55P.js → src-NDI4KNT3.js} +8 -8
- package/dist/{staticProjectServer-4XX72J23.js → staticProjectServer-ITNEQNQ7.js} +15 -15
- package/dist/{status-BMXWFO4L.js → status-RGHSK3DJ.js} +2 -2
- package/dist/studio/assets/{hyperframes-player-u2w3bDWo.js → hyperframes-player-DX8LgKgb.js} +1 -1
- package/dist/studio/assets/{index-D8B6eEBj.js → index-7Ljcoa9s.js} +83 -83
- package/dist/studio/assets/{index-BG28fXIT.js → index-BdnuQ7ta.js} +1 -1
- package/dist/studio/assets/{index-WD9j53l5.js → index-DB0YwjiT.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-LPHMA57T.js → studio-api-JMWUSAG7.js} +9 -9
- package/dist/{studioServer-P7GSE74X.js → studioServer-MWZNMAVJ.js} +45 -45
- package/dist/{system-QRHPVRPP.js → system-VRXC6S4A.js} +2 -2
- package/dist/{telemetry-576VTLGI.js → telemetry-D6A2TRK6.js} +5 -5
- package/dist/{timeline-BO7LJJ24.js → timeline-VIF4G3IT.js} +17 -17
- package/dist/{tokens-TCYANQDA.js → tokens-ORS6MFMG.js} +2 -2
- package/dist/{transcribe-6HLMGCL2.js → transcribe-DNRG7OGE.js} +19 -19
- package/dist/{transcribe-6PTFIBO6.js → transcribe-DZ6O6EG5.js} +12 -12
- package/dist/{updateCheck-ZLYIZPPQ.js → updateCheck-YY4BPYNT.js} +2 -2
- package/dist/{upgrade-DZHQE2PV.js → upgrade-CUDVTTF5.js} +2 -2
- package/dist/{urlDownloader-PJTOCTJA.js → urlDownloader-INLS5A6I.js} +8 -8
- package/dist/{validate-3I45WC7I.js → validate-CQCQVHUX.js} +23 -22
- package/dist/{video-AQFXGGKN.js → video-3GLT6U6Z.js} +9 -9
- package/package.json +1 -1
- package/dist/chunk-NE55C6S5.js +0 -118
- package/dist/chunk-OE4WEQMH.js +0 -3795
- /package/dist/{chunk-VYKPBRCB.js → chunk-ALLKNYC3.js} +0 -0
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
describeWslGpuAccess,
|
|
14
14
|
detectWsl
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7KDQAD2W.js";
|
|
16
16
|
import {
|
|
17
17
|
MEDIA_VISUAL_STYLE_PROPERTIES,
|
|
18
18
|
RENDER_FRAME_ID_PREFIX,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
renderFrameIdForRenderId,
|
|
31
31
|
resolveAuthoredTimingWindow,
|
|
32
32
|
toFps
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-SGIZMTWO.js";
|
|
34
34
|
import {
|
|
35
35
|
AUDIO_GROUP_RENDER_ID_ATTR,
|
|
36
36
|
COLOR_GRADING_SOURCE_HIDDEN_ATTR,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
shiftRateLane,
|
|
60
60
|
sourceTimeAt,
|
|
61
61
|
timeAtSourceTime
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-LPOTN5GW.js";
|
|
63
63
|
import {
|
|
64
64
|
clampAudioGain,
|
|
65
65
|
isAudibleVideoElement
|
|
@@ -666,6 +666,7 @@ function fingerprintKey(fingerprint) {
|
|
|
666
666
|
return JSON.stringify([
|
|
667
667
|
fingerprint.args,
|
|
668
668
|
fingerprint.executablePath ?? null,
|
|
669
|
+
fingerprint.withoutWaylandDisplay === true,
|
|
669
670
|
fingerprint.browserTimeoutMs,
|
|
670
671
|
fingerprint.protocolTimeoutMs,
|
|
671
672
|
fingerprint.requestedCaptureMode
|
|
@@ -903,6 +904,7 @@ async function probeHardwareWebGlInfo(ppt, options) {
|
|
|
903
904
|
args: options.args,
|
|
904
905
|
defaultViewport: { width: 64, height: 64 },
|
|
905
906
|
executablePath: options.executablePath,
|
|
907
|
+
env: options.env,
|
|
906
908
|
timeout: options.browserTimeout,
|
|
907
909
|
waitForInitialPage: false
|
|
908
910
|
};
|
|
@@ -1241,33 +1243,28 @@ function formatProbeFailure(err) {
|
|
|
1241
1243
|
return `probe failed (${err instanceof Error ? err.message : String(err)})`;
|
|
1242
1244
|
}
|
|
1243
1245
|
async function probeAutoBrowserGpuMode(options) {
|
|
1244
|
-
const executablePath = options.chromePath ?? resolveHeadlessShellPath({});
|
|
1245
1246
|
const ppt = await getPuppeteerOrNull();
|
|
1246
1247
|
if (ppt === null) {
|
|
1247
1248
|
logResolvedBrowserGpuMode("software", "puppeteer unavailable");
|
|
1248
1249
|
return { mode: "software", cause: "probe-error" };
|
|
1249
1250
|
}
|
|
1250
|
-
const probed = await probeWebGlMode(ppt,
|
|
1251
|
-
if (probed.mode === "hardware"
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
let route = { state: "missing" };
|
|
1257
|
-
if (fullChrome) {
|
|
1258
|
-
const viaFullChrome = fullChrome === shellPath ? shellOutcome : await probeWebGlMode(ppt, fullChrome, options, "full Chrome: ");
|
|
1259
|
-
if (viaFullChrome.mode === "hardware") return { mode: "hardware", browserPath: fullChrome };
|
|
1260
|
-
route = { state: viaFullChrome.cause ?? "no-gpu", path: fullChrome };
|
|
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 };
|
|
1261
1257
|
}
|
|
1262
|
-
return { ...
|
|
1258
|
+
return { ...probed, ...wslAccess(options) };
|
|
1263
1259
|
}
|
|
1264
|
-
async function probeWebGlMode(ppt,
|
|
1260
|
+
async function probeWebGlMode(ppt, options, env, label = "") {
|
|
1265
1261
|
try {
|
|
1266
1262
|
const info = await probeHardwareWebGlInfo(ppt, {
|
|
1267
1263
|
args: getHardwareGpuProbeArgs(options.platform ?? process.platform),
|
|
1268
1264
|
browserTimeout: options.browserTimeout ?? DEFAULT_CONFIG.browserTimeout,
|
|
1269
|
-
executablePath,
|
|
1270
|
-
probeLifecycle: options.probeLifecycle
|
|
1265
|
+
executablePath: options.chromePath ?? resolveHeadlessShellPath({}),
|
|
1266
|
+
probeLifecycle: options.probeLifecycle,
|
|
1267
|
+
env
|
|
1271
1268
|
});
|
|
1272
1269
|
const resolved = resolveWebGlProbeMode(info);
|
|
1273
1270
|
logResolvedBrowserGpuMode(resolved, label + describeWebGlProbe(info));
|
|
@@ -1277,9 +1274,17 @@ async function probeWebGlMode(ppt, executablePath, options, label = "") {
|
|
|
1277
1274
|
return { mode: "software", cause: "probe-error" };
|
|
1278
1275
|
}
|
|
1279
1276
|
}
|
|
1280
|
-
|
|
1281
|
-
const
|
|
1282
|
-
return
|
|
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
|
+
}
|
|
1285
|
+
function wslAccess(options) {
|
|
1286
|
+
const lines = describeWslGpuAccess(options.wslHost);
|
|
1287
|
+
return lines ? { wslAccess: lines } : {};
|
|
1283
1288
|
}
|
|
1284
1289
|
function resolveBrowserGpuMode(mode, options = {}) {
|
|
1285
1290
|
if (mode === "software") return Promise.resolve(mode);
|
|
@@ -1303,19 +1308,19 @@ function resolveBrowserGpuMode(mode, options = {}) {
|
|
|
1303
1308
|
}
|
|
1304
1309
|
var _unverifiedHardwareGpuWarned = false;
|
|
1305
1310
|
var _wslSoftwareNoteLogged = false;
|
|
1306
|
-
function buildWslSoftwareNote({ cause, wslAccess = [] }) {
|
|
1311
|
+
function buildWslSoftwareNote({ cause, wslAccess: wslAccess2 = [] }) {
|
|
1307
1312
|
const check = cause === "probe-error" ? "the GPU check could not finish (see the probe line above)" : "the GPU check found no hardware GPU";
|
|
1308
1313
|
return [
|
|
1309
1314
|
`[hyperframes] WSL: ${check}, so this render uses software WebGL (SwiftShader) and runs at CPU speed.`,
|
|
1310
|
-
...
|
|
1315
|
+
...wslAccess2,
|
|
1311
1316
|
" Pass --no-browser-gpu to skip the GPU check and render in software."
|
|
1312
1317
|
].join("\n");
|
|
1313
1318
|
}
|
|
1314
|
-
function buildUnverifiedHardwareGpuWarning(platform, { cause, wslAccess }) {
|
|
1319
|
+
function buildUnverifiedHardwareGpuWarning(platform, { cause, wslAccess: wslAccess2 }) {
|
|
1315
1320
|
if (cause === "probe-error") {
|
|
1316
|
-
return "[hyperframes] browserGpuMode=hardware was requested, but the GPU probe could not run, so hardware acceleration is UNVERIFIED. If Chrome falls back to software WebGL the capture will run at CPU speed. Honouring the explicit request anyway.\n This is a probe failure, not evidence of a missing GPU: see the `browserGpuMode probe \u2192 software (probe failed ...)` line above for the underlying error, which usually means Chrome could not launch (bad HYPERFRAMES_BROWSER_PATH, missing shared libraries, or a denied sandbox) rather than a GPU problem.\n Run `hyperframes doctor` to check the Chrome install." + (
|
|
1321
|
+
return "[hyperframes] browserGpuMode=hardware was requested, but the GPU probe could not run, so hardware acceleration is UNVERIFIED. If Chrome falls back to software WebGL the capture will run at CPU speed. Honouring the explicit request anyway.\n This is a probe failure, not evidence of a missing GPU: see the `browserGpuMode probe \u2192 software (probe failed ...)` line above for the underlying error, which usually means Chrome could not launch (bad HYPERFRAMES_BROWSER_PATH, missing shared libraries, or a denied sandbox) rather than a GPU problem.\n Run `hyperframes doctor` to check the Chrome install." + (wslAccess2 ? ["", " Under WSL, a GPU path that is slow to start or unreachable can also cause it:"].concat(wslAccess2).join("\n") : "");
|
|
1317
1322
|
}
|
|
1318
|
-
const remediation =
|
|
1323
|
+
const remediation = wslAccess2?.join("\n") ?? (platform === "linux" ? " Inside Docker, the container needs GPU passthrough: `--gpus all` with the NVIDIA Container Toolkit installed, or `--device /dev/dri` for Mesa/AMD/Intel. The image also needs the matching userspace driver + libEGL. Verify with `hyperframes render --browser-gpu` and watch for this warning disappearing." : " Check that the host exposes a GPU to this process and that the graphics drivers are installed.");
|
|
1319
1324
|
return `[hyperframes] browserGpuMode=hardware was requested, but the WebGL probe found no hardware GPU, so Chrome will silently fall back to software WebGL and the capture will run at CPU speed. Honouring the explicit request anyway.
|
|
1320
1325
|
${remediation}
|
|
1321
1326
|
Pass --no-browser-gpu to select deterministic SwiftShader instead of waiting on a hardware path that is not there.`;
|
|
@@ -1336,6 +1341,7 @@ function createBrowserLaunchFingerprint(chromeArgs, config) {
|
|
|
1336
1341
|
return {
|
|
1337
1342
|
args: chromeArgs,
|
|
1338
1343
|
executablePath: headlessShell,
|
|
1344
|
+
withoutWaylandDisplay: launchConfig.withoutWaylandDisplay === true,
|
|
1339
1345
|
browserTimeoutMs: launchConfig.browserTimeout,
|
|
1340
1346
|
protocolTimeoutMs: launchConfig.protocolTimeout,
|
|
1341
1347
|
requestedCaptureMode
|
|
@@ -1347,6 +1353,7 @@ async function acquireBrowser(chromeArgs, config) {
|
|
|
1347
1353
|
}
|
|
1348
1354
|
async function launchBrowser(fingerprint) {
|
|
1349
1355
|
const ppt = await getPuppeteer();
|
|
1356
|
+
const env = fingerprint.withoutWaylandDisplay ? envWithoutWaylandDisplay() : void 0;
|
|
1350
1357
|
let captureMode = fingerprint.requestedCaptureMode;
|
|
1351
1358
|
let browser;
|
|
1352
1359
|
try {
|
|
@@ -1356,6 +1363,7 @@ async function launchBrowser(fingerprint) {
|
|
|
1356
1363
|
args: [...fingerprint.args],
|
|
1357
1364
|
defaultViewport: null,
|
|
1358
1365
|
executablePath: fingerprint.executablePath,
|
|
1366
|
+
env,
|
|
1359
1367
|
timeout: fingerprint.browserTimeoutMs,
|
|
1360
1368
|
protocolTimeout: fingerprint.protocolTimeoutMs
|
|
1361
1369
|
});
|
|
@@ -1385,6 +1393,7 @@ async function launchBrowser(fingerprint) {
|
|
|
1385
1393
|
args: stripBeginFrameFlags([...fingerprint.args]),
|
|
1386
1394
|
defaultViewport: null,
|
|
1387
1395
|
executablePath: fingerprint.executablePath,
|
|
1396
|
+
env,
|
|
1388
1397
|
timeout: fingerprint.browserTimeoutMs,
|
|
1389
1398
|
protocolTimeout: fingerprint.protocolTimeoutMs
|
|
1390
1399
|
});
|
|
@@ -5315,16 +5324,15 @@ async function createCaptureSession(serverUrl, outputDir, options, onBeforeCaptu
|
|
|
5315
5324
|
resolvedGpuMode,
|
|
5316
5325
|
config
|
|
5317
5326
|
);
|
|
5318
|
-
const
|
|
5319
|
-
const wslFullChromeHasNoBeginFrame = browserPath !== headlessShell;
|
|
5320
|
-
const preMode = headlessShell && !wslFullChromeHasNoBeginFrame && isLinux && !effectiveForceScreenshot && !supersampling && !drawElementTransparent ? "beginframe" : "screenshot";
|
|
5327
|
+
const preMode = headlessShell && isLinux && !effectiveForceScreenshot && !supersampling && !drawElementTransparent ? "beginframe" : "screenshot";
|
|
5321
5328
|
const requiresWebGpu = options.requiresWebGpu ?? await fetch(`${serverUrl}/index.html`, { signal: AbortSignal.timeout(5e3) }).then((res) => res.text()).then(compositionRequiresWebGpu).catch(() => false);
|
|
5322
5329
|
const gpuConfig = { ...config, browserGpuMode: resolvedGpuMode };
|
|
5323
5330
|
const chromeArgs = buildChromeArgs(
|
|
5324
5331
|
{ width: options.width, height: options.height, captureMode: preMode, requiresWebGpu },
|
|
5325
5332
|
gpuConfig
|
|
5326
5333
|
);
|
|
5327
|
-
const
|
|
5334
|
+
const withoutWaylandDisplay = await captureWithoutWaylandDisplay(resolvedGpuMode);
|
|
5335
|
+
const browserLease = await acquireBrowser(chromeArgs, { ...config, withoutWaylandDisplay });
|
|
5328
5336
|
return constructCaptureSessionWithRollback({
|
|
5329
5337
|
browserLease,
|
|
5330
5338
|
serverUrl,
|
|
@@ -6,10 +6,10 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
getMimeType
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DCQCGE2W.js";
|
|
10
10
|
import {
|
|
11
11
|
injectTagsAtHeadStart
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LPOTN5GW.js";
|
|
13
13
|
|
|
14
14
|
// src/utils/compositionServer.ts
|
|
15
15
|
import { createHash } from "crypto";
|
|
@@ -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-
|
|
9
|
+
} from "./chunk-7ZWOLEGS.js";
|
|
10
10
|
import {
|
|
11
11
|
DecodeCancelled,
|
|
12
12
|
prepareSherpaWav,
|
|
13
13
|
sherpaUnsupportedReason,
|
|
14
14
|
transcribeWithSherpa
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4YDQQQY6.js";
|
|
16
16
|
import {
|
|
17
17
|
initialModelForLanguage,
|
|
18
18
|
transcribe
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZZ3ZWTOI.js";
|
|
20
20
|
import {
|
|
21
21
|
createRenderCancellationScope,
|
|
22
22
|
stoppedByCancelSignal
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-T243WV6D.js";
|
|
24
24
|
import {
|
|
25
25
|
formatSrt,
|
|
26
26
|
formatVtt,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
DEFAULT_MODEL,
|
|
32
32
|
isWhisperUnavailable
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-SQHWDFTV.js";
|
|
34
34
|
import {
|
|
35
35
|
normalizeErrorMessage
|
|
36
36
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
+
var require = __hf_createRequire(import.meta.url);
|
|
5
|
+
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
parseHTML
|
|
9
|
+
} from "./chunk-SDYDNHEE.js";
|
|
10
|
+
|
|
11
|
+
// ../parsers/dist/hfIds.js
|
|
12
|
+
var EXCLUDED_TAGS = /* @__PURE__ */ new Set([
|
|
13
|
+
"script",
|
|
14
|
+
"style",
|
|
15
|
+
"template",
|
|
16
|
+
"meta",
|
|
17
|
+
"link",
|
|
18
|
+
"noscript",
|
|
19
|
+
"base"
|
|
20
|
+
]);
|
|
21
|
+
function fnv1a(str) {
|
|
22
|
+
let h = 2166136261;
|
|
23
|
+
for (let i = 0; i < str.length; i++) {
|
|
24
|
+
h ^= str.charCodeAt(i);
|
|
25
|
+
h = Math.imul(h, 16777619);
|
|
26
|
+
}
|
|
27
|
+
return h >>> 0;
|
|
28
|
+
}
|
|
29
|
+
function toHfId(hash) {
|
|
30
|
+
const s = (hash >>> 0).toString(36);
|
|
31
|
+
const four = s.length >= 4 ? s.slice(-4) : s.padStart(4, "0");
|
|
32
|
+
return `hf-${four}`;
|
|
33
|
+
}
|
|
34
|
+
function ownText(el) {
|
|
35
|
+
let text = "";
|
|
36
|
+
el.childNodes.forEach((n) => {
|
|
37
|
+
if (n.nodeType === 3) text += n.nodeValue ?? "";
|
|
38
|
+
});
|
|
39
|
+
return text.trim();
|
|
40
|
+
}
|
|
41
|
+
function getContractAttribute(el, name) {
|
|
42
|
+
return Array.from(el.attributes).find((attr) => attr.name.toLowerCase() === name)?.value ?? null;
|
|
43
|
+
}
|
|
44
|
+
function contentKey(el) {
|
|
45
|
+
const attrs = Array.from(el.attributes).filter((a) => !a.name.toLowerCase().startsWith("data-hf-")).map((a) => `${a.name.toLowerCase()}\0${a.value}`).sort().join("");
|
|
46
|
+
return `${el.tagName.toLowerCase()}|${attrs}|${ownText(el)}`;
|
|
47
|
+
}
|
|
48
|
+
function mintHfId(el, assigned) {
|
|
49
|
+
const key = contentKey(el);
|
|
50
|
+
let id = toHfId(fnv1a(key));
|
|
51
|
+
let dup = 0;
|
|
52
|
+
while (assigned.has(id)) {
|
|
53
|
+
dup += 1;
|
|
54
|
+
if (dup > 1e4) {
|
|
55
|
+
id = `hf-${(fnv1a(key) >>> 0).toString(36)}-${dup}`;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
id = toHfId(fnv1a(`${key}#${dup}`));
|
|
59
|
+
}
|
|
60
|
+
assigned.add(id);
|
|
61
|
+
return id;
|
|
62
|
+
}
|
|
63
|
+
function getChildElements(parent) {
|
|
64
|
+
const directChildren = Array.from(parent.children);
|
|
65
|
+
if (directChildren.length || parent.tagName.toLowerCase() !== "template") return directChildren;
|
|
66
|
+
const content = parent.content;
|
|
67
|
+
if (content?.children.length) return Array.from(content.children);
|
|
68
|
+
return directChildren;
|
|
69
|
+
}
|
|
70
|
+
function isCompositionTemplate(el) {
|
|
71
|
+
if (el.tagName.toLowerCase() !== "template") return false;
|
|
72
|
+
if (getContractAttribute(el, "data-composition-id") !== null) return true;
|
|
73
|
+
for (const child of getChildElements(el)) {
|
|
74
|
+
if (getContractAttribute(child, "data-composition-id") !== null) return true;
|
|
75
|
+
}
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
function walkCompositionDescendants(root, visit) {
|
|
79
|
+
const rootElement = root.nodeType === 9 ? root.documentElement : root;
|
|
80
|
+
if (!rootElement) return;
|
|
81
|
+
const walk = (parent) => {
|
|
82
|
+
for (const child of getChildElements(parent)) {
|
|
83
|
+
const isTemplate = child.tagName.toLowerCase() === "template";
|
|
84
|
+
if (isTemplate && !isCompositionTemplate(child)) continue;
|
|
85
|
+
visit(child);
|
|
86
|
+
walk(child);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
walk(rootElement);
|
|
90
|
+
}
|
|
91
|
+
function assignHfIds(body) {
|
|
92
|
+
const assigned = /* @__PURE__ */ new Set();
|
|
93
|
+
walkCompositionDescendants(body, (el) => {
|
|
94
|
+
const existing = getContractAttribute(el, "data-hf-id");
|
|
95
|
+
if (existing) assigned.add(existing);
|
|
96
|
+
});
|
|
97
|
+
walkCompositionDescendants(body, (el) => {
|
|
98
|
+
if (EXCLUDED_TAGS.has(el.tagName.toLowerCase())) return;
|
|
99
|
+
if (getContractAttribute(el, "data-hf-id")) return;
|
|
100
|
+
el.setAttribute("data-hf-id", mintHfId(el, assigned));
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function ensureHfIds(html) {
|
|
104
|
+
const { document, wrapped } = parseFragmentOrDocument(html);
|
|
105
|
+
if (!document.body) return html;
|
|
106
|
+
assignHfIds(document.body);
|
|
107
|
+
return wrapped ? document.body.innerHTML || "" : document.toString();
|
|
108
|
+
}
|
|
109
|
+
function parseFragmentOrDocument(html) {
|
|
110
|
+
const wrapped = !/^(?:<!doctype|<html[\s>/])/i.test(
|
|
111
|
+
html.replace(/^(?:\s|<!--(?:>|->|[\s\S]*?-->))*/, "")
|
|
112
|
+
);
|
|
113
|
+
const { document } = wrapped ? parseHTML(`<!DOCTYPE html><html><head></head><body>${html}</body></html>`) : parseHTML(html);
|
|
114
|
+
return { document, wrapped };
|
|
115
|
+
}
|
|
116
|
+
function stampHfIdsInPlace(html) {
|
|
117
|
+
const { document, wrapped } = parseFragmentOrDocument(html);
|
|
118
|
+
if (!document.body) return html;
|
|
119
|
+
const elements = wrapped ? getChildElements(document.body).flatMap(inDocumentOrder) : inDocumentOrder(document.documentElement);
|
|
120
|
+
const existing = elements.map((el) => el.getAttribute("data-hf-id"));
|
|
121
|
+
const pinned = existing.map((id) => id !== null && id.length > 0);
|
|
122
|
+
assignHfIds(document.body);
|
|
123
|
+
const minted = elements.map((el, n) => pinned[n] ? null : el.getAttribute("data-hf-id"));
|
|
124
|
+
const tags = startTags(html);
|
|
125
|
+
const inserts = tags && alignInserts(html, tags, elements, minted, existing);
|
|
126
|
+
return inserts ? spliceIds(html, inserts) : ensureHfIds(html);
|
|
127
|
+
}
|
|
128
|
+
function inDocumentOrder(el) {
|
|
129
|
+
return [el, ...getChildElements(el).flatMap(inDocumentOrder)];
|
|
130
|
+
}
|
|
131
|
+
var RAW_TEXT = /* @__PURE__ */ new Set(["script", "style", "textarea", "title", "xmp", "noembed", "noframes"]);
|
|
132
|
+
var IMPLIED = /* @__PURE__ */ new Set(["html", "head", "body", "tbody"]);
|
|
133
|
+
function startTags(html) {
|
|
134
|
+
const lower = html.toLowerCase();
|
|
135
|
+
const tags = [];
|
|
136
|
+
let i = html.indexOf("<");
|
|
137
|
+
while (i >= 0) {
|
|
138
|
+
const name = html.startsWith("<!--", i) ? null : /^<([a-zA-Z][^\s/>]*)/.exec(html.slice(i, i + 128));
|
|
139
|
+
if (!name) {
|
|
140
|
+
i = nextTagAfter(html, i);
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
const end = closingBracket(html, i + name[0].length);
|
|
144
|
+
if (end < 0) return null;
|
|
145
|
+
const tag = name[1].toLowerCase();
|
|
146
|
+
tags.push({ name: tag, nameEnd: i + name[0].length, bracket: end });
|
|
147
|
+
const after = RAW_TEXT.has(tag) ? rawTextEnd(lower, tag, end) : end;
|
|
148
|
+
i = after < 0 ? -1 : html.indexOf("<", after + 1);
|
|
149
|
+
}
|
|
150
|
+
return tags;
|
|
151
|
+
}
|
|
152
|
+
function rawTextEnd(lower, tag, from) {
|
|
153
|
+
const marker = `</${tag}`;
|
|
154
|
+
for (let at = lower.indexOf(marker, from); at >= 0; at = lower.indexOf(marker, at + marker.length)) {
|
|
155
|
+
const next = lower[at + marker.length];
|
|
156
|
+
if (next !== void 0 && /[\s/>]/.test(next)) return at;
|
|
157
|
+
}
|
|
158
|
+
return -1;
|
|
159
|
+
}
|
|
160
|
+
function nextTagAfter(html, lt) {
|
|
161
|
+
const comment = html.startsWith("<!--", lt);
|
|
162
|
+
const end = comment ? html.indexOf("-->", lt + 4) : html.indexOf(">", lt);
|
|
163
|
+
return end < 0 ? -1 : html.indexOf("<", end + 1);
|
|
164
|
+
}
|
|
165
|
+
function closingBracket(html, from) {
|
|
166
|
+
let quote = "";
|
|
167
|
+
for (let i = from; i < html.length; i++) {
|
|
168
|
+
const c = html[i];
|
|
169
|
+
if (quote) quote = c === quote ? "" : quote;
|
|
170
|
+
else if (c === '"' || c === "'") quote = c;
|
|
171
|
+
else if (c === ">") return i;
|
|
172
|
+
}
|
|
173
|
+
return -1;
|
|
174
|
+
}
|
|
175
|
+
function alignInserts(html, tags, elements, minted, existing) {
|
|
176
|
+
const walked = walkAlign(html, tags, elements, minted, existing);
|
|
177
|
+
if (!walked) return null;
|
|
178
|
+
return walked.next === tags.length ? walked.inserts : null;
|
|
179
|
+
}
|
|
180
|
+
function walkAlign(html, tags, elements, minted, existing) {
|
|
181
|
+
const state = { inserts: [], next: 0 };
|
|
182
|
+
for (const [n, el] of elements.entries()) {
|
|
183
|
+
if (!take(state, html, tags, el, minted[n] ?? null, existing[n] === "")) return null;
|
|
184
|
+
}
|
|
185
|
+
return state;
|
|
186
|
+
}
|
|
187
|
+
function take(state, html, tags, el, id, fillEmpty) {
|
|
188
|
+
const step = alignOne(html, tags[state.next], el, id, fillEmpty);
|
|
189
|
+
if (!step) return false;
|
|
190
|
+
if (step.insert) state.inserts.push(step.insert);
|
|
191
|
+
if (step.next) state.next += 1;
|
|
192
|
+
return true;
|
|
193
|
+
}
|
|
194
|
+
function alignOne(html, tag, el, id, fillEmpty) {
|
|
195
|
+
if (tag?.name === el.tagName.toLowerCase()) return matched(html, tag, id, fillEmpty);
|
|
196
|
+
if (IMPLIED.has(el.tagName.toLowerCase()) && !id) return { insert: null, next: false };
|
|
197
|
+
return null;
|
|
198
|
+
}
|
|
199
|
+
function matched(html, tag, id, fillEmpty) {
|
|
200
|
+
if (!id) return { insert: null, next: true };
|
|
201
|
+
const placed = placeId(html, tag, id, fillEmpty);
|
|
202
|
+
if (!placed) return null;
|
|
203
|
+
return { insert: placed, next: true };
|
|
204
|
+
}
|
|
205
|
+
function placeId(html, tag, id, fillEmpty) {
|
|
206
|
+
if (!fillEmpty) return { at: tag.nameEnd, text: ` data-hf-id="${id}"` };
|
|
207
|
+
const emptyAt = emptyHfIdValue(html, tag);
|
|
208
|
+
if (emptyAt === null) return null;
|
|
209
|
+
return { at: emptyAt, text: id };
|
|
210
|
+
}
|
|
211
|
+
function emptyHfIdValue(html, tag) {
|
|
212
|
+
const open = outsideQuotes(html.slice(tag.nameEnd, tag.bracket));
|
|
213
|
+
const match = /\sdata-hf-id\s*=\s*(["'])\1/i.exec(open);
|
|
214
|
+
if (!match) return null;
|
|
215
|
+
return tag.nameEnd + match.index + match[0].length - 1;
|
|
216
|
+
}
|
|
217
|
+
function outsideQuotes(open) {
|
|
218
|
+
let quote = "";
|
|
219
|
+
let out = "";
|
|
220
|
+
for (const c of open) {
|
|
221
|
+
out += quotedChar(quote, c);
|
|
222
|
+
quote = quoteOf(quote, c);
|
|
223
|
+
}
|
|
224
|
+
return out;
|
|
225
|
+
}
|
|
226
|
+
function quoteOf(quote, c) {
|
|
227
|
+
if (quote) return c === quote ? "" : quote;
|
|
228
|
+
return c === '"' || c === "'" ? c : "";
|
|
229
|
+
}
|
|
230
|
+
function quotedChar(quote, c) {
|
|
231
|
+
if (!quote || c === quote) return c;
|
|
232
|
+
return " ".repeat(c.length);
|
|
233
|
+
}
|
|
234
|
+
function spliceIds(html, inserts) {
|
|
235
|
+
let out = "";
|
|
236
|
+
let from = 0;
|
|
237
|
+
for (const { at, text } of inserts) {
|
|
238
|
+
out += html.slice(from, at) + text;
|
|
239
|
+
from = at;
|
|
240
|
+
}
|
|
241
|
+
return out + html.slice(from);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export {
|
|
245
|
+
EXCLUDED_TAGS,
|
|
246
|
+
mintHfId,
|
|
247
|
+
walkCompositionDescendants,
|
|
248
|
+
ensureHfIds,
|
|
249
|
+
stampHfIdsInPlace
|
|
250
|
+
};
|
|
@@ -6,13 +6,16 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveCaptureBrowserGpuMode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YB26LWR2.js";
|
|
10
10
|
import {
|
|
11
11
|
requestCliExit
|
|
12
12
|
} from "./chunk-PBN6GBJE.js";
|
|
13
13
|
import {
|
|
14
14
|
normalizeErrorMessage
|
|
15
15
|
} from "./chunk-KNU5COPB.js";
|
|
16
|
+
import {
|
|
17
|
+
processIsAlive
|
|
18
|
+
} from "./chunk-KGPLIH7B.js";
|
|
16
19
|
|
|
17
20
|
// src/browser/launch.ts
|
|
18
21
|
var BrowserCleanupError = class extends AggregateError {
|
|
@@ -21,6 +24,7 @@ var browsers = /* @__PURE__ */ new Set();
|
|
|
21
24
|
var closing = /* @__PURE__ */ new WeakMap();
|
|
22
25
|
var pending = /* @__PURE__ */ new Map();
|
|
23
26
|
var CLOSE_GRACE_MS = 1e3;
|
|
27
|
+
var EXIT_POLL_MS = 50;
|
|
24
28
|
var listening = false;
|
|
25
29
|
var shutdown;
|
|
26
30
|
function stopForSignal(signal) {
|
|
@@ -110,6 +114,7 @@ async function closeBrowser(browser) {
|
|
|
110
114
|
if (child.exitCode !== null || child.signalCode !== null) return;
|
|
111
115
|
const exited = new Promise((resolve) => child.once("exit", () => resolve()));
|
|
112
116
|
let timer;
|
|
117
|
+
let poll;
|
|
113
118
|
const grace = new Promise((resolve) => {
|
|
114
119
|
timer = setTimeout(resolve, CLOSE_GRACE_MS);
|
|
115
120
|
});
|
|
@@ -126,9 +131,15 @@ async function closeBrowser(browser) {
|
|
|
126
131
|
CLOSE_GRACE_MS
|
|
127
132
|
);
|
|
128
133
|
});
|
|
129
|
-
|
|
134
|
+
const goneBeforeExitEvent = new Promise((resolve) => {
|
|
135
|
+
poll = setInterval(() => {
|
|
136
|
+
if (child.pid === void 0 || !processIsAlive(child.pid)) resolve();
|
|
137
|
+
}, EXIT_POLL_MS);
|
|
138
|
+
});
|
|
139
|
+
await Promise.race([exited, goneBeforeExitEvent, exitLimit]);
|
|
130
140
|
} finally {
|
|
131
141
|
clearTimeout(timer);
|
|
142
|
+
clearInterval(poll);
|
|
132
143
|
}
|
|
133
144
|
}
|
|
134
145
|
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
} from "./chunk-5ETJX6WM.js";
|
|
17
17
|
import {
|
|
18
18
|
runEnvironmentChecks
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BB2SFTMY.js";
|
|
20
20
|
import {
|
|
21
21
|
getAvailableMemoryMb,
|
|
22
22
|
getFreeDiskMb,
|
|
23
23
|
getShmSizeMb,
|
|
24
24
|
getSystemMeta
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-QWQ6GQTI.js";
|
|
26
26
|
import {
|
|
27
27
|
defineCommand
|
|
28
28
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -32,21 +32,21 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
getUpdateMeta,
|
|
34
34
|
withMeta
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-QH2PL6J4.js";
|
|
36
36
|
import {
|
|
37
37
|
CONFIG_PATH,
|
|
38
38
|
withFileLock
|
|
39
39
|
} from "./chunk-XUXGIA7H.js";
|
|
40
40
|
import {
|
|
41
41
|
VERSION
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-RU6AIVON.js";
|
|
43
43
|
import {
|
|
44
44
|
OPTIONAL_PACKAGES,
|
|
45
45
|
installedOptionalPackageVersion
|
|
46
46
|
} from "./chunk-3DKN5WKL.js";
|
|
47
47
|
import {
|
|
48
48
|
resolveExtractCacheDir
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-IRRRH66M.js";
|
|
50
50
|
import {
|
|
51
51
|
normalizeErrorMessage
|
|
52
52
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -232,7 +232,7 @@ function checkEnvironment() {
|
|
|
232
232
|
return { ok: true, detail: parts.join(" \xB7 ") };
|
|
233
233
|
}
|
|
234
234
|
async function checkWhisper() {
|
|
235
|
-
const { findWhisper, getInstallInstructions } = await import("./manager-
|
|
235
|
+
const { findWhisper, getInstallInstructions } = await import("./manager-JNJE54OQ.js");
|
|
236
236
|
const result = findWhisper();
|
|
237
237
|
if (result) {
|
|
238
238
|
return { ok: true, detail: result.executablePath };
|