hyperframes 0.8.158 → 0.8.160
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/README.md +24 -0
- package/dist/{add-VBBOJ3RB.js → add-OGBTJCU4.js} +11 -11
- package/dist/{animatedGifPrep-MTJRHJ5G.js → animatedGifPrep-YAJTDXB7.js} +6 -6
- package/dist/api.js +16 -16
- package/dist/{asset-3MLXYJCT.js → asset-DKQFFGPP.js} +2 -2
- package/dist/{assetCataloger-DI7FC5KZ.js → assetCataloger-BIDQA34M.js} +2 -2
- package/dist/audio-GK4OVVTH.js +2086 -0
- package/dist/{auth-RJCTHSMH.js → auth-AQMRAFXN.js} +1 -1
- package/dist/{autoUpdate-VD6R34HF.js → autoUpdate-NFQB7V2X.js} +2 -2
- package/dist/{backgroundChecks-CWWIZDTW.js → backgroundChecks-7JKE2FIU.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-FTZ67377.js → batchRender-C2JCG5EK.js} +3 -3
- package/dist/{beats-6CN4BEXJ.js → beats-C3ZSK2R2.js} +12 -12
- package/dist/{benchmark-4QSNJZXI.js → benchmark-RRU67WEY.js} +8 -8
- package/dist/{browser-H7PRFBJV.js → browser-K4TP4ZM2.js} +5 -5
- package/dist/{bundleWithLocalizedFonts-IVO43QBQ.js → bundleWithLocalizedFonts-SLBVWQ7O.js} +2 -2
- package/dist/{capture-GZSY7LZJ.js → capture-T2TBROMS.js} +2 -2
- package/dist/{capture-IEEQTPAS.js → capture-ZPRK3TOZ.js} +10 -10
- package/dist/{catalog-PD25CVG3.js → catalog-IMIHQ4KX.js} +11 -11
- package/dist/{catch-up-2TGBK342.js → catch-up-UY5MJWOG.js} +4 -4
- package/dist/{check-HFNJEV3O.js → check-6NAJSJHQ.js} +135 -124
- package/dist/{checkBrowser-767LAZKF.js → checkBrowser-JWNQFYTY.js} +38 -36
- package/dist/{chunk-YIJMVFEJ.js → chunk-22QHO26F.js} +1 -1
- package/dist/{chunk-7F3B5YYT.js → chunk-2742O5DO.js} +178 -23
- package/dist/{chunk-EEEUI3ON.js → chunk-2ZLYSXZC.js} +16 -9
- package/dist/{chunk-L6AJC7UQ.js → chunk-37LNY2EC.js} +1 -1
- package/dist/{chunk-EY6ISRP3.js → chunk-3XPVZLAR.js} +1 -1
- package/dist/{chunk-DISITOR6.js → chunk-4ID635FL.js} +1 -1
- package/dist/{chunk-EDEFAJI5.js → chunk-4VYNMVMC.js} +12 -12
- package/dist/chunk-6JR2XUEE.js +127 -0
- package/dist/{chunk-7FGHFHWD.js → chunk-6MCASYIS.js} +31 -11
- package/dist/{chunk-3MQBIZHG.js → chunk-7OFNPEKR.js} +7 -7
- package/dist/{chunk-BB2SFTMY.js → chunk-A2DMF2Q6.js} +6 -5
- package/dist/{chunk-LAAGHMRC.js → chunk-B5FZ2CQM.js} +6 -2
- package/dist/{chunk-SLUFA6UM.js → chunk-B7RUGHBT.js} +1 -1
- package/dist/{chunk-3UMNI4XZ.js → chunk-D2WGLWIK.js} +3 -3
- package/dist/{chunk-3FRK53UC.js → chunk-D33YJZOH.js} +1 -1
- package/dist/{chunk-54DMWFQZ.js → chunk-D3ZWBHZP.js} +2 -15
- package/dist/{chunk-PKHDQELW.js → chunk-D46G5IQH.js} +11 -11
- package/dist/{chunk-ZZ3ZWTOI.js → chunk-DJZEIVAP.js} +3 -3
- package/dist/{chunk-J7WFHOCW.js → chunk-ERTJPFCH.js} +1 -1
- package/dist/{chunk-QRPYTJBW.js → chunk-EVRUR7DW.js} +1 -1
- package/dist/{chunk-QH2PL6J4.js → chunk-FRGYHRP6.js} +1 -1
- package/dist/{chunk-T243WV6D.js → chunk-G642IIVK.js} +2 -2
- package/dist/{chunk-GPUVPZRK.js → chunk-GG37I7B3.js} +1 -1
- package/dist/chunk-GJQHHAAX.js +336 -0
- package/dist/{chunk-Y6E2PW7Z.js → chunk-GOASXWDD.js} +2 -2
- package/dist/{chunk-4R6OZQGX.js → chunk-GOTCGKX6.js} +79 -4
- package/dist/{chunk-H6BWNY56.js → chunk-ICZVCVD3.js} +1 -1
- package/dist/{chunk-YVD5M26L.js → chunk-IGTGLGML.js} +2 -2
- package/dist/{chunk-KEGTYA7V.js → chunk-IK3SOMZ4.js} +5 -3
- package/dist/{chunk-6PIGOKTE.js → chunk-JGYHWVXQ.js} +339 -67
- package/dist/{chunk-2XUQPJ3W.js → chunk-KRE55WLI.js} +1 -1
- package/dist/{chunk-NNQP5TNO.js → chunk-KWRBEDJI.js} +3 -3
- package/dist/{chunk-FJT35XBA.js → chunk-LYIG2GZ5.js} +2 -2
- package/dist/{chunk-T76NSAXO.js → chunk-MMV6IY6U.js} +6 -4
- package/dist/{chunk-4YDQQQY6.js → chunk-MP676E4B.js} +2 -2
- package/dist/{chunk-LAPUMJOC.js → chunk-MYGXKD7A.js} +5 -5
- package/dist/{chunk-LQXHRO6F.js → chunk-N2NDDTYW.js} +2 -2
- package/dist/{chunk-J6SJCYAQ.js → chunk-OMJA7JP6.js} +5 -5
- package/dist/chunk-P47XYVEQ.js +3795 -0
- package/dist/{chunk-NFX4K6OW.js → chunk-P4QE7SSN.js} +1 -1
- package/dist/{chunk-EGKIQS5J.js → chunk-PBNV5V5G.js} +1 -1
- package/dist/{chunk-56QTFOWH.js → chunk-PINFPWRV.js} +5 -119
- package/dist/{chunk-IRRRH66M.js → chunk-PLEMSN3E.js} +115 -13
- package/dist/{chunk-23VDPRQ3.js → chunk-PPF65XAF.js} +1 -1
- package/dist/{chunk-SGIZMTWO.js → chunk-Q3TFX4OZ.js} +1 -1
- package/dist/{chunk-XSEGMQYA.js → chunk-QABAVWEX.js} +26 -3
- package/dist/{chunk-7ZWOLEGS.js → chunk-RTS7BGEC.js} +1 -1
- package/dist/{chunk-YB26LWR2.js → chunk-SB5DX6AD.js} +2 -2
- package/dist/{chunk-J4SSEVRU.js → chunk-SHVDJON6.js} +2 -2
- package/dist/{chunk-W2SNLHKF.js → chunk-TTFDAWCS.js} +1 -1
- package/dist/{chunk-RU6AIVON.js → chunk-TU2CQJO3.js} +2 -2
- package/dist/{chunk-Z347DFOL.js → chunk-V2FQQILJ.js} +8 -8
- package/dist/{chunk-DCQCGE2W.js → chunk-VD7WQYTO.js} +22 -20
- package/dist/{chunk-SHEVPNUR.js → chunk-VZ6LCTOZ.js} +1 -1
- package/dist/{chunk-SQHWDFTV.js → chunk-X3SCQP2A.js} +1 -1
- package/dist/{chunk-LBT4AMSF.js → chunk-XRKMITSS.js} +1 -1
- package/dist/{chunk-OTG5H2VM.js → chunk-XTLV6UVP.js} +3 -3
- package/dist/{clean-FQUVFH6H.js → clean-RRE6PMKZ.js} +24 -23
- package/dist/cli.js +54 -53
- package/dist/{cloud-BHAYVT6F.js → cloud-OIR6K7TS.js} +4 -4
- package/dist/{cloudrun-STLNWUBW.js → cloudrun-BIQXBUDO.js} +3 -3
- package/dist/{compare-2FRBIK5Z.js → compare-E57W737I.js} +31 -30
- package/dist/{compiler-VFJVUZWR.js → compiler-57M6W5WY.js} +3 -3
- package/dist/{component-DRKXJVXB.js → component-I2O4AX56.js} +3 -3
- package/dist/{compositions-D3SN64J3.js → compositions-B6NKZHIN.js} +10 -10
- package/dist/{delete-NA5WC2IR.js → delete-DTUNBC6K.js} +2 -2
- package/dist/{dist-SVTSOG4Q.js → dist-4JFB3WAR.js} +2 -2
- package/dist/{dist-2VXSQLXO.js → dist-ROVMAL74.js} +1 -1
- package/dist/{doctor-VXCMPOY3.js → doctor-SCNB73Z3.js} +12 -12
- package/dist/{events-ZJEPMUWT.js → events-6LQNRKHZ.js} +3 -3
- package/dist/{events-QAHWXFFG.js → events-Q37UJL36.js} +2 -2
- package/dist/{feedback-UGOQ57TU.js → feedback-FOEBE2OW.js} +9 -9
- package/dist/{ffmpeg-2ROTISBL.js → ffmpeg-7BYARPLM.js} +4 -2
- package/dist/{figma-YO2MJZDP.js → figma-54MRTBKH.js} +3 -3
- package/dist/fontLocalizeCli.js +9 -9
- package/dist/{get-WMJAYRNF.js → get-EPGHM2SA.js} +2 -2
- package/dist/{gpuPolicy-VXNJ4UBN.js → gpuPolicy-VGE3I5J4.js} +6 -6
- package/dist/{grade-compare-QZ7BG2AP.js → grade-compare-LOJWX6SK.js} +33 -32
- package/dist/{help-AR4MX2AH.js → help-6FPZI3WP.js} +2 -1
- package/dist/{history-NF764OFQ.js → history-GRXSUA5R.js} +12 -11
- package/dist/hyperframe-runtime.js +56 -56
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +56 -56
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-476ERK4G.js → info-LV7DFCLD.js} +7 -7
- package/dist/{init-M6YUOBBZ.js → init-3J7BSAC3.js} +29 -29
- package/dist/{inspect-QYPUG3UZ.js → inspect-5RON554C.js} +30 -29
- package/dist/{installer-HF5BXXXM.js → installer-T3STEB4U.js} +4 -4
- package/dist/{keyframes-MTZRE34W.js → keyframes-KHXTHI5C.js} +6 -6
- package/dist/{lambda-ZCX7KGTY.js → lambda-4KCSMIM6.js} +4 -4
- package/dist/{layout-DLX4HQFL.js → layout-DVWWT2TR.js} +30 -29
- package/dist/{lint-OQ5QWCHZ.js → lint-Q5WFB5ST.js} +9 -9
- package/dist/{lintProject-JGHKRO5L.js → lintProject-BGDYHF3F.js} +1 -1
- package/dist/{list-AZ6OIOIK.js → list-RFEUTW6N.js} +2 -2
- package/dist/{login-DJPYT4YZ.js → login-WBHWA4M2.js} +4 -4
- package/dist/{manager-JNJE54OQ.js → manager-B6MVBM2E.js} +3 -3
- package/dist/{manager-ZLJD3EAY.js → manager-HEUPD2YB.js} +2 -2
- package/dist/{media-treatment-4YKC4LGB.js → media-treatment-WRHVNWLS.js} +15 -14
- package/dist/{models-WHDUQZQZ.js → models-OA4MXEYG.js} +12 -12
- package/dist/{motionShot-KEHC5AMK.js → motionShot-BZLRN3SS.js} +13 -13
- package/dist/{normalize-audio-ATAQGUPX.js → normalize-audio-4YXE3RIF.js} +7 -7
- package/dist/{open-4DXBEX2U.js → open-MCGYEFML.js} +7 -7
- package/dist/{parakeetRunner-5PNBGCGH.js → parakeetRunner-DBLHMD5T.js} +13 -13
- package/dist/{pipeline-QA2422UI.js → pipeline-FSY65OQ4.js} +8 -8
- package/dist/{play-SKTSHZM5.js → play-WXOV3BD7.js} +28 -27
- package/dist/{preflight-BH2XUQBS.js → preflight-G5KP7ZKA.js} +4 -4
- package/dist/{present-KSQ5GASH.js → present-RVG4J6CJ.js} +23 -22
- package/dist/{preview-TDD3QDR3.js → preview-PDUQR2JQ.js} +24 -24
- package/dist/{producer-PQMZ7OYH.js → producer-C5V2A3YL.js} +1 -1
- package/dist/{projectConfig-EYYDESVO.js → projectConfig-X2IEHCSK.js} +6 -6
- package/dist/{publication-MJY3XYYV.js → publication-JEANCWBW.js} +2 -2
- package/dist/{publish-5TZIKVLW.js → publish-VX5OH4ST.js} +12 -12
- package/dist/{remove-background-HT73ZUIG.js → remove-background-IXCISD26.js} +9 -9
- package/dist/{render-ADBL3C7S.js → render-5BGU3FXU.js} +57 -35
- package/dist/{render-YTJ3SMCD.js → render-ISUT7Q3X.js} +3 -3
- package/dist/{render-KJCDJEGI.js → render-JNJVFBFF.js} +13 -13
- package/dist/{render-batch-AFB2XK3I.js → render-batch-2C6RUP3F.js} +3 -3
- package/dist/renderSetupWorker.js +4 -4
- package/dist/{resolver-F2D2YCSQ.js → resolver-KTNKZVIB.js} +4 -4
- package/dist/{sherpa-IBKSF6GX.js → sherpa-GFRG3TMM.js} +12 -12
- package/dist/skills/hyperframes-cli/SKILL.md +5 -4
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +8 -0
- package/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +1 -1
- package/dist/{skills-E75DFHGG.js → skills-LKJA27ZN.js} +5 -5
- package/dist/{skillsUpdateCheck-EPTKOBR6.js → skillsUpdateCheck-RFZJKZC4.js} +3 -3
- package/dist/{snapshot-Z6T4I5TE.js → snapshot-EOYA4MLG.js} +86 -50
- package/dist/{src-NDI4KNT3.js → src-GPUDUKY6.js} +7 -5
- package/dist/{src-4GCHM2LX.js → src-IMCQRH4P.js} +8 -8
- package/dist/{staticProjectServer-ITNEQNQ7.js → staticProjectServer-S3NK3V4S.js} +18 -15
- package/dist/studio/assets/{hyperframes-player-DX8LgKgb.js → hyperframes-player-CXL23NEv.js} +1 -1
- package/dist/studio/assets/{index-BdnuQ7ta.js → index-Bl_xrA5T.js} +1 -1
- package/dist/studio/assets/{index-DB0YwjiT.js → index-CejKvBNw.js} +1 -1
- package/dist/studio/assets/{index-7Ljcoa9s.js → index-D7BvLHtZ.js} +7 -7
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-JMWUSAG7.js → studio-api-YM5HLXUS.js} +16 -11
- package/dist/{studioServer-MWZNMAVJ.js → studioServer-CEXJK5TC.js} +60 -59
- package/dist/{telemetry-D6A2TRK6.js → telemetry-7AWYECPL.js} +3 -3
- package/dist/{timeline-VIF4G3IT.js → timeline-G7H373XX.js} +48 -353
- package/dist/{tokens-ORS6MFMG.js → tokens-GYH7NXXA.js} +2 -2
- package/dist/{transcribe-DNRG7OGE.js → transcribe-CIC7WAT5.js} +17 -17
- package/dist/{transcribe-DZ6O6EG5.js → transcribe-FL6NGWHF.js} +11 -11
- package/dist/{updateCheck-YY4BPYNT.js → updateCheck-MQ44KGUR.js} +2 -2
- package/dist/{upgrade-CUDVTTF5.js → upgrade-OL47SID3.js} +2 -2
- package/dist/{urlDownloader-INLS5A6I.js → urlDownloader-KDJGLR2Y.js} +5 -5
- package/dist/{usage-EC3KFUIJ.js → usage-HG4WMM7A.js} +33 -5
- package/dist/{validate-CQCQVHUX.js → validate-TDCH6X3C.js} +22 -21
- package/dist/{video-3GLT6U6Z.js → video-AHO4CDCK.js} +6 -6
- package/package.json +1 -1
- package/dist/chunk-LPOTN5GW.js +0 -3795
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
readMediaOffsetSeconds
|
|
9
|
+
} from "./chunk-BSQ7XANM.js";
|
|
10
|
+
|
|
11
|
+
// ../core/dist/mediaLink.js
|
|
12
|
+
var MEDIA_LINK_ATTR = "data-link";
|
|
13
|
+
function readNumber(el, names, fallback) {
|
|
14
|
+
for (const name of names) {
|
|
15
|
+
const raw = el.getAttribute(name);
|
|
16
|
+
if (raw === null || raw.trim() === "")
|
|
17
|
+
continue;
|
|
18
|
+
const value = Number(raw);
|
|
19
|
+
if (Number.isFinite(value))
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
return fallback;
|
|
23
|
+
}
|
|
24
|
+
function readLinkTiming(el) {
|
|
25
|
+
return {
|
|
26
|
+
start: readNumber(el, ["data-start"], 0),
|
|
27
|
+
duration: readNumber(el, ["data-duration"], 0),
|
|
28
|
+
mediaStart: readMediaOffsetSeconds((name) => el.getAttribute(name)),
|
|
29
|
+
playbackRate: readNumber(el, ["data-playback-rate"], 1)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
var LINK_SCOPE_SELECTOR = "[data-composition-id], [data-composition-file]";
|
|
33
|
+
function mintLinkId(taken) {
|
|
34
|
+
const used = new Set(taken);
|
|
35
|
+
let n = 1;
|
|
36
|
+
while (used.has(`lk-${n}`))
|
|
37
|
+
n += 1;
|
|
38
|
+
return `lk-${n}`;
|
|
39
|
+
}
|
|
40
|
+
function takenLinkIds(doc) {
|
|
41
|
+
return Array.from(doc.querySelectorAll(`[id], [${MEDIA_LINK_ATTR}], [${SYNC_ORIGIN_ATTR}]`)).flatMap((el) => [
|
|
42
|
+
el.id,
|
|
43
|
+
el.getAttribute(MEDIA_LINK_ATTR) ?? "",
|
|
44
|
+
el.getAttribute(SYNC_ORIGIN_ATTR) ?? ""
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
function renameShared(doc, ids, attr, taken) {
|
|
48
|
+
const renamed = /* @__PURE__ */ new Map();
|
|
49
|
+
for (const id of ids) {
|
|
50
|
+
const el = doc.getElementById(id);
|
|
51
|
+
const old = el?.getAttribute(attr);
|
|
52
|
+
if (!el || !old)
|
|
53
|
+
continue;
|
|
54
|
+
let fresh = renamed.get(old);
|
|
55
|
+
if (!fresh) {
|
|
56
|
+
fresh = mintLinkId(taken);
|
|
57
|
+
taken.add(fresh);
|
|
58
|
+
renamed.set(old, fresh);
|
|
59
|
+
}
|
|
60
|
+
el.setAttribute(attr, fresh);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function relinkSplitHalves(doc, rightHalfIds) {
|
|
64
|
+
const taken = new Set(takenLinkIds(doc));
|
|
65
|
+
renameShared(doc, rightHalfIds, MEDIA_LINK_ATTR, taken);
|
|
66
|
+
renameShared(doc, idsWithBothSidesCut(doc, rightHalfIds), SYNC_ORIGIN_ATTR, taken);
|
|
67
|
+
}
|
|
68
|
+
function idsWithBothSidesCut(doc, rightHalfIds) {
|
|
69
|
+
const tagsByOrigin = /* @__PURE__ */ new Map();
|
|
70
|
+
const originOf = (id) => doc.getElementById(id)?.getAttribute(SYNC_ORIGIN_ATTR) ?? null;
|
|
71
|
+
for (const id of rightHalfIds) {
|
|
72
|
+
const origin = originOf(id);
|
|
73
|
+
const tag = doc.getElementById(id)?.tagName.toLowerCase();
|
|
74
|
+
if (!origin || !tag)
|
|
75
|
+
continue;
|
|
76
|
+
tagsByOrigin.set(origin, (tagsByOrigin.get(origin) ?? /* @__PURE__ */ new Set()).add(tag));
|
|
77
|
+
}
|
|
78
|
+
return rightHalfIds.filter((id) => {
|
|
79
|
+
const tags = tagsByOrigin.get(originOf(id) ?? "");
|
|
80
|
+
return tags?.has("video") === true && tags.has("audio");
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
var SYNC_ORIGIN_ATTR = "data-sync-origin";
|
|
84
|
+
var rateOf = (timing) => timing.playbackRate > 0 ? timing.playbackRate : 1;
|
|
85
|
+
function sourceZeroTime(timing) {
|
|
86
|
+
return timing.start - timing.mediaStart / rateOf(timing);
|
|
87
|
+
}
|
|
88
|
+
function syncOffsetFrames(clip, partner, fps) {
|
|
89
|
+
if (Math.abs(rateOf(clip) - rateOf(partner)) > 1e-6)
|
|
90
|
+
return null;
|
|
91
|
+
const frames = Math.round((sourceZeroTime(clip) - sourceZeroTime(partner)) * fps);
|
|
92
|
+
return Object.is(frames, -0) ? 0 : frames;
|
|
93
|
+
}
|
|
94
|
+
function sharedSeconds(a, b) {
|
|
95
|
+
return Math.min(a.start + a.duration, b.start + b.duration) - Math.max(a.start, b.start);
|
|
96
|
+
}
|
|
97
|
+
function sameOriginInScope(el, tag, origin) {
|
|
98
|
+
const scopeOf = (node) => node.closest(LINK_SCOPE_SELECTOR) ?? el.ownerDocument;
|
|
99
|
+
const scope = scopeOf(el);
|
|
100
|
+
return Array.from(scope.querySelectorAll(tag)).filter((candidate) => candidate.getAttribute(SYNC_ORIGIN_ATTR) === origin && scopeOf(candidate) === scope);
|
|
101
|
+
}
|
|
102
|
+
function findSyncPartner(el) {
|
|
103
|
+
const origin = el.getAttribute(SYNC_ORIGIN_ATTR);
|
|
104
|
+
const tag = el.tagName.toLowerCase();
|
|
105
|
+
if (!origin || tag !== "video" && tag !== "audio")
|
|
106
|
+
return null;
|
|
107
|
+
const partnerTag = tag === "video" ? "audio" : "video";
|
|
108
|
+
const own = readLinkTiming(el);
|
|
109
|
+
let best = null;
|
|
110
|
+
for (const candidate of sameOriginInScope(el, partnerTag, origin)) {
|
|
111
|
+
const timing = readLinkTiming(candidate);
|
|
112
|
+
const shared = sharedSeconds(own, timing);
|
|
113
|
+
const distance = Math.abs(timing.start - own.start);
|
|
114
|
+
if (!best || shared > best.shared || shared === best.shared && distance < best.distance) {
|
|
115
|
+
best = { el: candidate, shared, distance };
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return best?.el ?? null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export {
|
|
122
|
+
MEDIA_LINK_ATTR,
|
|
123
|
+
readLinkTiming,
|
|
124
|
+
relinkSplitHalves,
|
|
125
|
+
syncOffsetFrames,
|
|
126
|
+
findSyncPartner
|
|
127
|
+
};
|
|
@@ -11,22 +11,22 @@ import {
|
|
|
11
11
|
launchManagedBrowser,
|
|
12
12
|
resolveManagedGpuMode,
|
|
13
13
|
rethrowAfterBrowserCleanup
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-B5FZ2CQM.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveDiagnosticNavigationTimeoutMs,
|
|
17
17
|
windowsChromeCrashRemediation
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ERTJPFCH.js";
|
|
19
19
|
import {
|
|
20
20
|
resolveLocalBrowserGpuMode,
|
|
21
21
|
resolveLocalWebGpu
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-SB5DX6AD.js";
|
|
23
23
|
import {
|
|
24
24
|
c
|
|
25
25
|
} from "./chunk-ZTZA4UWZ.js";
|
|
26
26
|
import {
|
|
27
27
|
assertWebGpuAdapterAvailable,
|
|
28
28
|
compositionRequiresWebGpu
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-PLEMSN3E.js";
|
|
30
30
|
import {
|
|
31
31
|
normalizeErrorMessage
|
|
32
32
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -105,30 +105,33 @@ async function installPageFunctionGuard(page) {
|
|
|
105
105
|
}
|
|
106
106
|
async function openSettledCompositionPage(html, url, options) {
|
|
107
107
|
const viewport = resolveCompositionViewportFromHtml(html);
|
|
108
|
-
const { ensureBrowser, findSystemBrowser } = await import("./manager-
|
|
108
|
+
const { ensureBrowser, findSystemBrowser } = await import("./manager-HEUPD2YB.js");
|
|
109
109
|
const browser = await ensureBrowser({ signal: options.signal });
|
|
110
110
|
const puppeteer = await import("puppeteer-core");
|
|
111
|
-
const { buildChromeArgs } = await import("./src-
|
|
111
|
+
const { buildChromeArgs } = await import("./src-GPUDUKY6.js");
|
|
112
112
|
const requestedGpuMode = options.browserGpuMode ?? resolveCliChromeGpuMode();
|
|
113
|
+
const answer = (await import("./staticProjectServer-S3NK3V4S.js")).inProcessAnswer(url);
|
|
113
114
|
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
114
115
|
let softwareWebGpu = false;
|
|
115
116
|
const launch = async (executablePath) => {
|
|
116
117
|
options.signal?.throwIfAborted();
|
|
117
118
|
const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, executablePath, {
|
|
118
119
|
signal: options.signal,
|
|
119
|
-
onBrowser: options.onBrowser
|
|
120
|
+
onBrowser: options.onBrowser,
|
|
121
|
+
noListen: answer !== void 0
|
|
120
122
|
});
|
|
121
123
|
options.signal?.throwIfAborted();
|
|
122
124
|
const webGpu = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
|
|
123
125
|
softwareWebGpu = webGpu.softwareWebGpu;
|
|
126
|
+
const args = buildChromeArgs(
|
|
127
|
+
{ ...viewport, captureMode: "screenshot", requiresWebGpu },
|
|
128
|
+
webGpu.gpuConfig
|
|
129
|
+
);
|
|
124
130
|
return launchManagedBrowser(puppeteer.default, {
|
|
125
131
|
headless: true,
|
|
126
132
|
signal: options.signal,
|
|
127
133
|
executablePath,
|
|
128
|
-
args:
|
|
129
|
-
{ ...viewport, captureMode: "screenshot", requiresWebGpu },
|
|
130
|
-
webGpu.gpuConfig
|
|
131
|
-
)
|
|
134
|
+
...answer ? { pipe: true, args: [...args, "--single-process"] } : { args }
|
|
132
135
|
});
|
|
133
136
|
};
|
|
134
137
|
let chromeBrowser;
|
|
@@ -164,6 +167,7 @@ ${remediation}`,
|
|
|
164
167
|
const page = await chromeBrowser.newPage();
|
|
165
168
|
await installPageFunctionGuard(page);
|
|
166
169
|
await page.setViewport(viewport);
|
|
170
|
+
if (answer) await answerPageInProcess(page, url, answer);
|
|
167
171
|
await options.beforeNavigate?.(page);
|
|
168
172
|
await page.goto(url, {
|
|
169
173
|
waitUntil: "domcontentloaded",
|
|
@@ -368,6 +372,22 @@ async function runFfmpegOnce(ffmpegPath, args, timeoutMs) {
|
|
|
368
372
|
});
|
|
369
373
|
});
|
|
370
374
|
}
|
|
375
|
+
async function answerPageInProcess(page, url, answer) {
|
|
376
|
+
const origin = new URL(url).origin;
|
|
377
|
+
await page.setRequestInterception(true);
|
|
378
|
+
page.on("request", (request) => {
|
|
379
|
+
if (request.isInterceptResolutionHandled()) return;
|
|
380
|
+
const target = new URL(request.url());
|
|
381
|
+
if (target.origin !== origin) return void request.continue().catch(() => {
|
|
382
|
+
});
|
|
383
|
+
answer({
|
|
384
|
+
method: request.method(),
|
|
385
|
+
path: target.pathname + target.search,
|
|
386
|
+
headers: request.headers()
|
|
387
|
+
}).then((response) => request.respond(response)).catch(() => request.abort("failed").catch(() => {
|
|
388
|
+
}));
|
|
389
|
+
});
|
|
390
|
+
}
|
|
371
391
|
|
|
372
392
|
export {
|
|
373
393
|
AUDIT_SEEK_OPTIONS,
|
|
@@ -7,29 +7,29 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
RegistryCompatibilityError,
|
|
9
9
|
gateRegistryItemsCompatibility
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3XPVZLAR.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_PROJECT_CONFIG,
|
|
13
13
|
createProjectConfig,
|
|
14
14
|
loadProjectConfig,
|
|
15
15
|
projectConfigPath,
|
|
16
16
|
recordProjectRegistryItems
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GG37I7B3.js";
|
|
18
18
|
import {
|
|
19
19
|
resolveItemWithDependencies,
|
|
20
20
|
resolveItemsByTag
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-D33YJZOH.js";
|
|
22
22
|
import {
|
|
23
23
|
InvalidVariableValuesError,
|
|
24
24
|
prepareItem,
|
|
25
25
|
publishItem
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-N2NDDTYW.js";
|
|
27
27
|
import {
|
|
28
28
|
DEFAULT_REGISTRY_URL
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-EVRUR7DW.js";
|
|
30
30
|
import {
|
|
31
31
|
trackRegistryItemAdded
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-KRE55WLI.js";
|
|
33
33
|
import {
|
|
34
34
|
defineCommand
|
|
35
35
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
} from "./chunk-ZTZA4UWZ.js";
|
|
42
42
|
import {
|
|
43
43
|
ITEM_TYPE_DIRS
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-Q3TFX4OZ.js";
|
|
45
45
|
import {
|
|
46
46
|
isProjectRootMissing,
|
|
47
47
|
realpath
|
|
@@ -10,17 +10,18 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
ensureBrowser,
|
|
12
12
|
findBrowser
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XRKMITSS.js";
|
|
14
14
|
import {
|
|
15
|
+
FIRST_LAUNCH_TIMEOUT_MS,
|
|
15
16
|
chromeDepsInstallCommand,
|
|
16
17
|
detectLinuxDistro,
|
|
17
18
|
distroLabel,
|
|
18
19
|
getFFmpegInstallHint,
|
|
19
20
|
parseLddMissingLibs
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-IK3SOMZ4.js";
|
|
21
22
|
import {
|
|
22
23
|
runCancellableProcess
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-D3ZWBHZP.js";
|
|
24
25
|
import {
|
|
25
26
|
FFMPEG_PATH_ENV,
|
|
26
27
|
FFPROBE_PATH_ENV,
|
|
@@ -75,7 +76,7 @@ async function readToolVersion(binaryPath, signal) {
|
|
|
75
76
|
try {
|
|
76
77
|
const output = (await runCancellableProcess(binaryPath, ["-version"], {
|
|
77
78
|
signal,
|
|
78
|
-
timeoutMs:
|
|
79
|
+
timeoutMs: FIRST_LAUNCH_TIMEOUT_MS
|
|
79
80
|
})).stdout;
|
|
80
81
|
const raw = output.split("\n")[0] ?? "";
|
|
81
82
|
const version = parseToolVersion(raw);
|
|
@@ -214,7 +215,7 @@ async function chromeLaunchOutcome(executablePath, found, signal) {
|
|
|
214
215
|
try {
|
|
215
216
|
const { stdout } = await runCancellableProcess(executablePath, ["--version"], {
|
|
216
217
|
signal,
|
|
217
|
-
timeoutMs:
|
|
218
|
+
timeoutMs: FIRST_LAUNCH_TIMEOUT_MS,
|
|
218
219
|
maxBufferBytes: 64 * 1024
|
|
219
220
|
});
|
|
220
221
|
return { ...found, versionMajor: extractMajorVersion(stdout) };
|
|
@@ -6,7 +6,7 @@ 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-SB5DX6AD.js";
|
|
10
10
|
import {
|
|
11
11
|
requestCliExit
|
|
12
12
|
} from "./chunk-PBN6GBJE.js";
|
|
@@ -49,7 +49,11 @@ async function resolveManagedGpuMode(requestedMode, chromePath, context = {}) {
|
|
|
49
49
|
return resolveCaptureBrowserGpuMode(requestedMode, chromePath, {
|
|
50
50
|
launch: async (puppeteer, options) => {
|
|
51
51
|
context.signal?.throwIfAborted();
|
|
52
|
-
const browser = await launchManagedBrowser(puppeteer, {
|
|
52
|
+
const browser = await launchManagedBrowser(puppeteer, {
|
|
53
|
+
...options,
|
|
54
|
+
...context.noListen ? { pipe: true, args: [...options.args ?? [], "--single-process"] } : {},
|
|
55
|
+
signal: context.signal
|
|
56
|
+
});
|
|
53
57
|
try {
|
|
54
58
|
context.onBrowser?.(browser);
|
|
55
59
|
} catch (error) {
|
|
@@ -7,10 +7,10 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
parseFeedbackRating,
|
|
9
9
|
trackRenderFeedback
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KRE55WLI.js";
|
|
11
11
|
import {
|
|
12
12
|
shouldTrack
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ICZVCVD3.js";
|
|
14
14
|
import {
|
|
15
15
|
detectAgentRuntime
|
|
16
16
|
} from "./chunk-QWQ6GQTI.js";
|
|
@@ -84,7 +84,7 @@ async function getDoctorSummary() {
|
|
|
84
84
|
try {
|
|
85
85
|
const [{ getSystemMeta }, { findFFmpeg }] = await Promise.all([
|
|
86
86
|
import("./system-VRXC6S4A.js"),
|
|
87
|
-
import("./ffmpeg-
|
|
87
|
+
import("./ffmpeg-7BYARPLM.js")
|
|
88
88
|
]);
|
|
89
89
|
const sys = getSystemMeta();
|
|
90
90
|
const parts = [
|
|
@@ -118,13 +118,7 @@ function runCancellableProcess(command, args, options = {}) {
|
|
|
118
118
|
};
|
|
119
119
|
const finishReject = async (error) => {
|
|
120
120
|
if (settled) return;
|
|
121
|
-
if (terminationTask)
|
|
122
|
-
try {
|
|
123
|
-
terminationSignal = await terminationTask;
|
|
124
|
-
} catch (terminationError) {
|
|
125
|
-
error = terminationError;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
121
|
+
if (terminationTask) terminationSignal = await terminationTask.catch(() => terminationSignal);
|
|
128
122
|
if (settled) return;
|
|
129
123
|
settled = true;
|
|
130
124
|
cleanup();
|
|
@@ -156,14 +150,7 @@ function runCancellableProcess(command, args, options = {}) {
|
|
|
156
150
|
child.once("error", (error) => void finishReject(error));
|
|
157
151
|
child.once("close", async (status, closeSignal) => {
|
|
158
152
|
if (settled) return;
|
|
159
|
-
if (terminationTask)
|
|
160
|
-
try {
|
|
161
|
-
terminationSignal = await terminationTask;
|
|
162
|
-
} catch (error) {
|
|
163
|
-
await finishReject(error);
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
153
|
+
if (terminationTask) terminationSignal = await terminationTask.catch(() => terminationSignal);
|
|
167
154
|
if (settled) return;
|
|
168
155
|
settled = true;
|
|
169
156
|
cleanup();
|
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
resolveCliChromeGpuMode,
|
|
10
10
|
seekCompositionTimeline,
|
|
11
11
|
waitForRuntimeReady
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6MCASYIS.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveCompositionViewportFromHtml
|
|
15
15
|
} from "./chunk-FH7WODJH.js";
|
|
16
16
|
import {
|
|
17
17
|
launchManagedBrowser,
|
|
18
18
|
resolveManagedGpuMode
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-B5FZ2CQM.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveProject
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-37LNY2EC.js";
|
|
23
23
|
import {
|
|
24
24
|
defineCommand
|
|
25
25
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
printDeprecationNotice,
|
|
35
35
|
withMeta
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-FRGYHRP6.js";
|
|
37
37
|
import {
|
|
38
38
|
decodeWellFormedEscapes
|
|
39
39
|
} from "./chunk-BSQ7XANM.js";
|
|
@@ -228,7 +228,7 @@ function extractCompositionErrorsFromLint(lintResult) {
|
|
|
228
228
|
async function localizeRemoteAssets(html) {
|
|
229
229
|
let dir;
|
|
230
230
|
try {
|
|
231
|
-
const { loadProducer } = await import("./producer-
|
|
231
|
+
const { loadProducer } = await import("./producer-C5V2A3YL.js");
|
|
232
232
|
const { localizeRemoteMediaSources, localizeRemoteImageSources, localizeRemoteFontFaces } = await loadProducer();
|
|
233
233
|
dir = mkdtempSync(join(tmpdir(), "hf-validate-assets-"));
|
|
234
234
|
const assetDir = dir;
|
|
@@ -249,10 +249,10 @@ async function localizeRemoteAssets(html) {
|
|
|
249
249
|
}
|
|
250
250
|
async function validateInBrowser(project, opts) {
|
|
251
251
|
const projectDir = project.dir;
|
|
252
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
253
|
-
const { ensureBrowser } = await import("./manager-
|
|
254
|
-
const { serveStaticProjectHtml } = await import("./staticProjectServer-
|
|
255
|
-
const { lintProject } = await import("./lintProject-
|
|
252
|
+
const { bundleToSingleHtml } = await import("./compiler-57M6W5WY.js");
|
|
253
|
+
const { ensureBrowser } = await import("./manager-HEUPD2YB.js");
|
|
254
|
+
const { serveStaticProjectHtml } = await import("./staticProjectServer-S3NK3V4S.js");
|
|
255
|
+
const { lintProject } = await import("./lintProject-BGDYHF3F.js");
|
|
256
256
|
const lintResult = await lintProject(projectDir);
|
|
257
257
|
const compositionErrors = extractCompositionErrorsFromLint(lintResult);
|
|
258
258
|
const html = await bundleToSingleHtml(projectDir);
|
|
@@ -273,9 +273,9 @@ async function validateInBrowser(project, opts) {
|
|
|
273
273
|
try {
|
|
274
274
|
const browser = await ensureBrowser();
|
|
275
275
|
const puppeteer = await import("puppeteer-core");
|
|
276
|
-
const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-
|
|
276
|
+
const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-GPUDUKY6.js");
|
|
277
277
|
const requestedGpuMode = resolveCliChromeGpuMode();
|
|
278
|
-
const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-
|
|
278
|
+
const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-VGE3I5J4.js");
|
|
279
279
|
const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, browser.executablePath);
|
|
280
280
|
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
281
281
|
const { gpuConfig, softwareWebGpu } = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
|
|
@@ -6,18 +6,18 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
stoppedByCancelSignal
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-G642IIVK.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_MODEL,
|
|
12
12
|
ensureModel,
|
|
13
13
|
ensureWhisper,
|
|
14
14
|
hasFFmpeg
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-X3SCQP2A.js";
|
|
16
16
|
import {
|
|
17
17
|
findFFmpeg,
|
|
18
18
|
findFFprobe,
|
|
19
19
|
getFFmpegInstallHint
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IK3SOMZ4.js";
|
|
21
21
|
import {
|
|
22
22
|
findWavChunk
|
|
23
23
|
} from "./chunk-UOFAE5RF.js";
|
|
@@ -6,12 +6,12 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
setHostHandlesSigint
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PLEMSN3E.js";
|
|
10
10
|
import {
|
|
11
11
|
processAncestorSnapshot,
|
|
12
12
|
processIdentity,
|
|
13
13
|
processParentPid
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-22QHO26F.js";
|
|
15
15
|
import {
|
|
16
16
|
processIsAlive
|
|
17
17
|
} from "./chunk-KGPLIH7B.js";
|