hyperframes 0.8.173 → 0.8.174
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-V7VBTFNG.js → add-XANMFNIP.js} +14 -15
- package/dist/{animatedGifPrep-62S72ZY6.js → animatedGifPrep-OUQ4M2T3.js} +9 -11
- package/dist/api.js +19 -21
- package/dist/{asset-Z4JI2F6V.js → asset-SVONSQ67.js} +2 -2
- package/dist/{assetCataloger-Q7LE7BCC.js → assetCataloger-AG77T6SF.js} +9 -11
- package/dist/{audio-HIHNLQJ7.js → audio-DMQOTXKL.js} +16 -18
- package/dist/{auth-4K6DSZCD.js → auth-ED7SPBS6.js} +2 -2
- package/dist/{autoUpdate-DXZDD5VT.js → autoUpdate-4QQYZOVT.js} +2 -2
- package/dist/{backgroundChecks-ODMKKJ4S.js → backgroundChecks-2VT46P5S.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-I4BFJGPA.js → batchRender-KIYAPCTG.js} +4 -4
- package/dist/{beats-7QCA6GDR.js → beats-OE7M5BEE.js} +6 -7
- package/dist/{benchmark-IT4WTSMZ.js → benchmark-2ZQP2RNF.js} +11 -12
- package/dist/{browser-5VHM72PM.js → browser-CSSJ3VWW.js} +5 -6
- package/dist/{bundleWithLocalizedFonts-MKTQCB2Y.js → bundleWithLocalizedFonts-ZUC4MLSO.js} +2 -2
- package/dist/{capture-CMNNIMIL.js → capture-3NXAHID3.js} +2 -2
- package/dist/{capture-B5Y45EWD.js → capture-APNSW4ZT.js} +22 -18
- package/dist/{catalog-AKPJ65GY.js → catalog-CFDBIVSC.js} +15 -16
- package/dist/{catch-up-2SVYRMD3.js → catch-up-OUK522JT.js} +6 -7
- package/dist/{check-Q7AX6K7O.js → check-PUDEOXGP.js} +37 -39
- package/dist/{checkBrowser-CPXD5BZY.js → checkBrowser-PMRJSTFJ.js} +34 -36
- package/dist/chunk-2CDBTQKS.js +113 -0
- package/dist/{chunk-KR5ZHRF2.js → chunk-2XSAYE7U.js} +2 -2
- package/dist/{chunk-QVPOR7WE.js → chunk-32GKETR7.js} +22 -1
- package/dist/{chunk-BTPZ74Z3.js → chunk-3MDO2Q4F.js} +1 -1
- package/dist/{chunk-3O45NOL7.js → chunk-4PX47Z65.js} +1 -1
- package/dist/{chunk-IK3SOMZ4.js → chunk-4VTUDCHM.js} +19 -22
- package/dist/{chunk-NOMPG5HQ.js → chunk-4WQUBVDO.js} +3 -3
- package/dist/{chunk-HCOL75LA.js → chunk-55LJK3H2.js} +3 -3
- package/dist/{chunk-H5C375DW.js → chunk-6HF2WFPV.js} +5 -5
- package/dist/{chunk-BCPJSBCS.js → chunk-ALCCEHX2.js} +7 -3
- package/dist/{chunk-XDPXSQJO.js → chunk-APMA7XXB.js} +1 -1
- package/dist/{chunk-L4SFGSSQ.js → chunk-AR2SEGPZ.js} +1 -1
- package/dist/{chunk-ETPPGNJB.js → chunk-B23GBPCW.js} +2 -2
- package/dist/{chunk-4RDDUBOC.js → chunk-CI7ZHFSV.js} +11 -11
- package/dist/chunk-CIWX5UKC.js +16 -0
- package/dist/{chunk-4D2T6Y5Y.js → chunk-CSMKMVGG.js} +6 -6
- package/dist/{chunk-BYRHCRU3.js → chunk-D2YN4FNH.js} +2 -2
- package/dist/{chunk-PBVUVNWP.js → chunk-DRR3UMIY.js} +1 -1
- package/dist/{chunk-TNHRCZT3.js → chunk-EAR5LFOH.js} +42 -2
- package/dist/{chunk-5JTRGGTX.js → chunk-EJZJ5AY7.js} +1 -1
- package/dist/{chunk-ODR7V2JL.js → chunk-G4UUEQDT.js} +1 -1
- package/dist/{chunk-2TNPXPI5.js → chunk-GK2FIKIQ.js} +10 -8
- package/dist/{chunk-CBOYQOLY.js → chunk-GXWV4FNV.js} +1 -1
- package/dist/{chunk-QURKHVV5.js → chunk-H2BPHBDY.js} +1 -1
- package/dist/{chunk-X3SCQP2A.js → chunk-HB2UP4V7.js} +1 -1
- package/dist/chunk-HIP62XAW.js +36 -0
- package/dist/{chunk-6JQDH4O6.js → chunk-HIYAJFRH.js} +1 -1
- package/dist/{chunk-45IAFBUP.js → chunk-HZZYJV7K.js} +14 -14
- package/dist/{chunk-A2DMF2Q6.js → chunk-HZZZ6C6Z.js} +2 -2
- package/dist/{chunk-XZNKIYIG.js → chunk-JKPI7VLI.js} +1 -1
- package/dist/{chunk-TWZRU64W.js → chunk-JL76Y45C.js} +7 -7
- package/dist/{chunk-KRWEUM4R.js → chunk-LR72ON5B.js} +1 -1
- package/dist/{chunk-C4QGOXO2.js → chunk-LUKY7253.js} +491 -133
- package/dist/{chunk-2QJDC4NT.js → chunk-MXNPYP5F.js} +1 -1
- package/dist/{chunk-VFCKXTBB.js → chunk-NL5F3AD4.js} +27 -38
- package/dist/{chunk-WIAO42MD.js → chunk-ONXTLGJB.js} +5 -5
- package/dist/{chunk-N7RTLKMM.js → chunk-PLYTTPVE.js} +2 -2
- package/dist/{chunk-PCLYCYBK.js → chunk-QJCVK7CI.js} +4 -4
- package/dist/{chunk-6HKO6VWS.js → chunk-QRO2UBWS.js} +1 -1
- package/dist/{chunk-ROQBQHBK.js → chunk-QUK2IZKI.js} +1 -1
- package/dist/{chunk-2DWYRHJS.js → chunk-RLBLLBLL.js} +2 -2
- package/dist/{chunk-U7EGMXQR.js → chunk-RMKL5FVH.js} +4 -17
- package/dist/{chunk-2BL7BJ22.js → chunk-RNKNDYBN.js} +1 -1
- package/dist/{chunk-SOAXQ7Q7.js → chunk-RYR3LTZR.js} +2 -2
- package/dist/{chunk-5E43335V.js → chunk-RZ2FMZ5U.js} +1 -1
- package/dist/{chunk-L3RCYYON.js → chunk-S5D4Q74P.js} +2 -2
- package/dist/{chunk-V2D4QZBC.js → chunk-SEHRMJTO.js} +3 -3
- package/dist/{chunk-X2ALZSKK.js → chunk-SEXAKOK3.js} +3 -3
- package/dist/{chunk-6RIH2NDU.js → chunk-SH43VDEF.js} +9 -9
- package/dist/{chunk-YOOW26KG.js → chunk-SI76MFBF.js} +2 -2
- package/dist/{chunk-QWQ6GQTI.js → chunk-T6AGUTZJ.js} +2 -4
- package/dist/{chunk-LN4SZS7W.js → chunk-TI3HKGQC.js} +3 -3
- package/dist/{chunk-CHALU2TF.js → chunk-UDJHYQSZ.js} +1 -1
- package/dist/{chunk-MWNSVO4P.js → chunk-UKAOWORD.js} +8 -8
- package/dist/chunk-UKJECUDK.js +3805 -0
- package/dist/{chunk-OFFNB2SU.js → chunk-UQLXFITA.js} +241 -6
- package/dist/{chunk-JYVGYKXG.js → chunk-W2LGJSEN.js} +73 -1
- package/dist/{chunk-BYVBP3U5.js → chunk-W3YVQ6VI.js} +9 -9
- package/dist/{chunk-FDWTZVA6.js → chunk-W4AECR7V.js} +1 -1
- package/dist/{chunk-2YTOJ447.js → chunk-X3BE2HX4.js} +3 -3
- package/dist/{chunk-TDPVEMBS.js → chunk-XFCLWWL3.js} +1 -1
- package/dist/{chunk-O433SZAJ.js → chunk-XVIFWEPR.js} +35 -16
- package/dist/{clean-SBFI3ZKR.js → clean-6SVCU47L.js} +18 -20
- package/dist/cli.js +53 -53
- package/dist/{cloud-IRE4HLEK.js → cloud-TIISRMZV.js} +4 -4
- package/dist/{cloudrun-GIHWEBGM.js → cloudrun-4TMBWELQ.js} +5 -5
- package/dist/{compare-S6NM2FSV.js → compare-YV2XTKYX.js} +28 -30
- package/dist/{compiler-WCWRB2LZ.js → compiler-O5R3ZZDV.js} +5 -6
- package/dist/{component-WDFZQ2HN.js → component-7LWSMRKZ.js} +3 -3
- package/dist/{compositions-RMUBDPD4.js → compositions-5VTSC4M3.js} +14 -16
- package/dist/{delete-SDNARGJ4.js → delete-AV2SKLZW.js} +4 -4
- package/dist/{deploy-4MK3Y67M.js → deploy-NKWMPAMH.js} +19 -5
- package/dist/{destroy-GFQLTIY3.js → destroy-UKP522AE.js} +4 -2
- package/dist/{dist-FAN2FFAV.js → dist-2FMTAVGL.js} +3 -3
- package/dist/{dist-65ELHZOF.js → dist-4FY5EEH5.js} +3 -3
- package/dist/{doctor-YPCZILXV.js → doctor-XOCYSEAZ.js} +14 -16
- package/dist/{events-INXDJ44V.js → events-6QPRKX45.js} +4 -5
- package/dist/{events-Q2K7SNEZ.js → events-MAZUZI43.js} +5 -6
- package/dist/{feedback-FRGRCTIX.js → feedback-MGRILBMP.js} +10 -11
- package/dist/{ffmpeg-7BYARPLM.js → ffmpeg-YCULCUB2.js} +24 -4
- package/dist/{figma-C262EFOC.js → figma-UMBACTCG.js} +3 -3
- package/dist/fontLocalizeCli.js +11 -13
- package/dist/{get-ZIUUGSVI.js → get-LWEOLWYN.js} +4 -4
- package/dist/{gpuPolicy-FRLW63IY.js → gpuPolicy-MCIQK5Z7.js} +9 -11
- package/dist/{grade-compare-DN342HJC.js → grade-compare-MZQOTX3F.js} +29 -31
- package/dist/{help-XQPBPSBP.js → help-THPG2NRP.js} +1 -1
- package/dist/{history-PF5FUC6M.js → history-2IQYTDU5.js} +8 -9
- package/dist/hyperframe-runtime.js +55 -55
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +55 -55
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-PC7IKGVB.js → info-CXMADV6K.js} +10 -11
- package/dist/{init-ORZX3PSQ.js → init-Y5GU454D.js} +34 -34
- package/dist/{inspect-L5GRL6SP.js → inspect-S7JDKEMJ.js} +29 -31
- package/dist/{installer-KXS557O7.js → installer-AY23RPEZ.js} +5 -5
- package/dist/{keyframes-EIZDSXUH.js → keyframes-FKYT6QAJ.js} +8 -9
- package/dist/{lambda-U3N7MRD7.js → lambda-7WMZGRH5.js} +16 -12
- package/dist/{layout-WHAVE2H5.js → layout-LL4GOS6G.js} +29 -31
- package/dist/{lint-I7PYIW56.js → lint-2M7FY4ZT.js} +11 -12
- package/dist/{lintProject-7IEOAXJY.js → lintProject-ARKJXDQF.js} +3 -3
- package/dist/{list-XXQM3WDO.js → list-SZBMUHBW.js} +4 -4
- package/dist/{login-64NUUDYU.js → login-QRACITGK.js} +4 -4
- package/dist/{manager-B6MVBM2E.js → manager-W2BTPAVT.js} +25 -3
- package/dist/{media-treatment-5XIM4A3F.js → media-treatment-E4VJETTT.js} +23 -18
- package/dist/{models-WRB3S67Z.js → models-AHO3MYE7.js} +13 -15
- package/dist/{motionShot-BOFBL73C.js → motionShot-LMMYPGPT.js} +19 -21
- package/dist/{normalize-audio-PP4BSZSU.js → normalize-audio-RDWIWZOO.js} +6 -7
- package/dist/{open-F4CUWMZF.js → open-WOKRHFDH.js} +14 -15
- package/dist/{parakeetRunner-O7QYJ7V7.js → parakeetRunner-RY2KIE63.js} +16 -18
- package/dist/{pipeline-BCHSFFT3.js → pipeline-LEA32KLW.js} +11 -13
- package/dist/{play-PPBR2GJK.js → play-3S46XG66.js} +21 -23
- package/dist/{policies-DCSIM4AB.js → policies-5NTZOHJA.js} +2 -0
- package/dist/preflight-MCOFNWFQ.js +52 -0
- package/dist/{present-Y7VTCZRZ.js → present-GR7F4CTI.js} +17 -19
- package/dist/{preview-53AD4OME.js → preview-TKEAF3KR.js} +34 -25
- package/dist/{producer-WBJDNLBF.js → producer-BJ5SUPVD.js} +1 -1
- package/dist/{progress-5AM2MZ7V.js → progress-I37JB7R4.js} +1 -0
- package/dist/{projectConfig-4KUGQ4P6.js → projectConfig-YJBYWSNK.js} +7 -7
- package/dist/{publication-OFDIFS4R.js → publication-2HXIW4LS.js} +3 -3
- package/dist/{publish-RWWTY743.js → publish-LHJFEKEI.js} +11 -11
- package/dist/{remove-background-G7VK3VKP.js → remove-background-AQUUVAPD.js} +12 -14
- package/dist/{render-7PPMS4P6.js → render-AOHXNGIM.js} +40 -38
- package/dist/{render-6CXZNXXZ.js → render-AXTGGHVZ.js} +9 -4
- package/dist/{render-52W63I3Y.js → render-B5S7FLLS.js} +14 -15
- package/dist/{render-batch-2EJVUVVN.js → render-batch-DMQG3QWK.js} +4 -4
- package/dist/renderSetupWorker.js +3 -3
- package/dist/{resolver-FF5GV6IA.js → resolver-FV54X3T2.js} +5 -5
- package/dist/sam-IKPEJRRO.js +21 -0
- package/dist/{screenshotCapture-XAYELJK7.js → screenshotCapture-HXEZ3TNJ.js} +20 -3
- package/dist/{sherpa-QJPI6B5S.js → sherpa-RKURBTUM.js} +15 -17
- package/dist/skills/hyperframes/SKILL.md +42 -0
- package/dist/skills/hyperframes-cli/references/cloud.md +1 -1
- package/dist/skills/media-use/scripts/lib/recipe-store.mjs +5 -2
- package/dist/{skills-H6ZJNOLH.js → skills-YUXI4IRF.js} +11 -10
- package/dist/{skillsUpdateCheck-4EBGMO2A.js → skillsUpdateCheck-HK3GDYD6.js} +3 -3
- package/dist/{snapshot-DZRUBWRH.js → snapshot-D6Q52Z4X.js} +32 -34
- package/dist/{src-ZL7ACIZ3.js → src-DPR7JBU3.js} +10 -12
- package/dist/{src-WD5GOYON.js → src-MRYINZ62.js} +8 -10
- package/dist/{staticProjectServer-72JF5PPO.js → staticProjectServer-RT7JATD2.js} +15 -16
- package/dist/{status-RGHSK3DJ.js → status-BV7QAUQD.js} +2 -3
- package/dist/studio/assets/{hyperframes-player-B-wEZiX3.js → hyperframes-player-B4KfQdfl.js} +1 -1
- package/dist/studio/assets/{index-DPugLDRK.js → index-Bsc8xBh9.js} +1 -1
- package/dist/studio/assets/{index-Bvkb0Zxy.js → index-DGl_Zvb3.js} +97 -97
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-BL6CLOA6.js → studio-api-NL2RMVB5.js} +9 -10
- package/dist/{studioServer-TRWCZZXP.js → studioServer-VL2GUVCR.js} +47 -49
- package/dist/{system-VRXC6S4A.js → system-7F3UEHQT.js} +2 -3
- package/dist/{telemetry-FDSW3ZOZ.js → telemetry-5PJWDFSZ.js} +5 -6
- package/dist/{timeline-ZRN336EA.js → timeline-OH35TN25.js} +124 -51
- package/dist/{tokens-RMLNQHIB.js → tokens-YISVK7W2.js} +2 -2
- package/dist/{transcribe-SOODKU6H.js → transcribe-6KBSE76Q.js} +12 -14
- package/dist/{transcribe-AEHHCYAL.js → transcribe-KRPN2FWA.js} +22 -24
- package/dist/{updateCheck-OSPEYRBY.js → updateCheck-QCZTFFSQ.js} +2 -2
- package/dist/{upgrade-AK4S7DMX.js → upgrade-DRFQISI6.js} +2 -2
- package/dist/{urlDownloader-FSCMLFG7.js → urlDownloader-CJDXTKMC.js} +8 -10
- package/dist/{validate-JJTCKZIV.js → validate-BKY3FIJC.js} +23 -25
- package/dist/{video-ZDM5CFI2.js → video-3UEJ57Q7.js} +9 -11
- package/package.json +1 -1
- package/dist/chunk-7JDEZNBY.js +0 -3805
- package/dist/chunk-7KDQAD2W.js +0 -81
- package/dist/chunk-BXCMXMJQ.js +0 -73
- package/dist/chunk-KCF6GHJP.js +0 -250
- package/dist/preflight-G5KP7ZKA.js +0 -32
|
@@ -4,9 +4,6 @@ import { dirname as __hf_dirname } from "node:path";
|
|
|
4
4
|
var require = __hf_createRequire(import.meta.url);
|
|
5
5
|
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
|
-
import {
|
|
8
|
-
ensureHfIds
|
|
9
|
-
} from "./chunk-KCF6GHJP.js";
|
|
10
7
|
import {
|
|
11
8
|
HF_AUDIO_FX_ATTR,
|
|
12
9
|
HF_COLOR_GRADING_ATTR,
|
|
@@ -40,7 +37,7 @@ import {
|
|
|
40
37
|
stripEmbeddedRuntimeScripts,
|
|
41
38
|
styleElementsFor,
|
|
42
39
|
warnUnknownEnumValues
|
|
43
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-UKJECUDK.js";
|
|
44
41
|
import {
|
|
45
42
|
cssVariableName
|
|
46
43
|
} from "./chunk-VC76R6W2.js";
|
|
@@ -50,11 +47,11 @@ import {
|
|
|
50
47
|
} from "./chunk-OFQWTKPW.js";
|
|
51
48
|
import {
|
|
52
49
|
lintHyperframeHtml
|
|
53
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-GK2FIKIQ.js";
|
|
54
51
|
import {
|
|
55
52
|
checkSubCompositionUsability,
|
|
56
53
|
resolveSubCompositionContent
|
|
57
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-32GKETR7.js";
|
|
58
55
|
import {
|
|
59
56
|
CSS_URL_RE,
|
|
60
57
|
decodeCssEscapes,
|
|
@@ -1862,6 +1859,239 @@ function inlineSubCompositions(document, hosts, options) {
|
|
|
1862
1859
|
};
|
|
1863
1860
|
}
|
|
1864
1861
|
|
|
1862
|
+
// ../parsers/dist/hfIds.js
|
|
1863
|
+
var EXCLUDED_TAGS = /* @__PURE__ */ new Set([
|
|
1864
|
+
"script",
|
|
1865
|
+
"style",
|
|
1866
|
+
"template",
|
|
1867
|
+
"meta",
|
|
1868
|
+
"link",
|
|
1869
|
+
"noscript",
|
|
1870
|
+
"base"
|
|
1871
|
+
]);
|
|
1872
|
+
function fnv1a(str) {
|
|
1873
|
+
let h = 2166136261;
|
|
1874
|
+
for (let i = 0; i < str.length; i++) {
|
|
1875
|
+
h ^= str.charCodeAt(i);
|
|
1876
|
+
h = Math.imul(h, 16777619);
|
|
1877
|
+
}
|
|
1878
|
+
return h >>> 0;
|
|
1879
|
+
}
|
|
1880
|
+
function toHfId(hash2) {
|
|
1881
|
+
const s = (hash2 >>> 0).toString(36);
|
|
1882
|
+
const four = s.length >= 4 ? s.slice(-4) : s.padStart(4, "0");
|
|
1883
|
+
return `hf-${four}`;
|
|
1884
|
+
}
|
|
1885
|
+
function ownText(el) {
|
|
1886
|
+
let text = "";
|
|
1887
|
+
el.childNodes.forEach((n) => {
|
|
1888
|
+
if (n.nodeType === 3) text += n.nodeValue ?? "";
|
|
1889
|
+
});
|
|
1890
|
+
return text.trim();
|
|
1891
|
+
}
|
|
1892
|
+
function getContractAttribute(el, name) {
|
|
1893
|
+
return Array.from(el.attributes).find((attr) => attr.name.toLowerCase() === name)?.value ?? null;
|
|
1894
|
+
}
|
|
1895
|
+
function contentKey(el) {
|
|
1896
|
+
const attrs = Array.from(el.attributes).filter((a) => !a.name.toLowerCase().startsWith("data-hf-")).map((a) => `${a.name.toLowerCase()}\0${a.value}`).sort().join("");
|
|
1897
|
+
return `${el.tagName.toLowerCase()}|${attrs}|${ownText(el)}`;
|
|
1898
|
+
}
|
|
1899
|
+
function mintHfId(el, assigned) {
|
|
1900
|
+
const key = contentKey(el);
|
|
1901
|
+
let id = toHfId(fnv1a(key));
|
|
1902
|
+
let dup = 0;
|
|
1903
|
+
while (assigned.has(id)) {
|
|
1904
|
+
dup += 1;
|
|
1905
|
+
if (dup > 1e4) {
|
|
1906
|
+
id = `hf-${(fnv1a(key) >>> 0).toString(36)}-${dup}`;
|
|
1907
|
+
break;
|
|
1908
|
+
}
|
|
1909
|
+
id = toHfId(fnv1a(`${key}#${dup}`));
|
|
1910
|
+
}
|
|
1911
|
+
assigned.add(id);
|
|
1912
|
+
return id;
|
|
1913
|
+
}
|
|
1914
|
+
function getChildElements(parent) {
|
|
1915
|
+
const directChildren = Array.from(parent.children);
|
|
1916
|
+
if (directChildren.length || parent.tagName.toLowerCase() !== "template") return directChildren;
|
|
1917
|
+
const content = parent.content;
|
|
1918
|
+
if (content?.children.length) return Array.from(content.children);
|
|
1919
|
+
return directChildren;
|
|
1920
|
+
}
|
|
1921
|
+
function isCompositionTemplate(el) {
|
|
1922
|
+
if (el.tagName.toLowerCase() !== "template") return false;
|
|
1923
|
+
if (getContractAttribute(el, "data-composition-id") !== null) return true;
|
|
1924
|
+
for (const child of getChildElements(el)) {
|
|
1925
|
+
if (getContractAttribute(child, "data-composition-id") !== null) return true;
|
|
1926
|
+
}
|
|
1927
|
+
return false;
|
|
1928
|
+
}
|
|
1929
|
+
function walkCompositionDescendants(root, visit) {
|
|
1930
|
+
const rootElement = root.nodeType === 9 ? root.documentElement : root;
|
|
1931
|
+
if (!rootElement) return;
|
|
1932
|
+
const walk = (parent) => {
|
|
1933
|
+
for (const child of getChildElements(parent)) {
|
|
1934
|
+
const isTemplate = child.tagName.toLowerCase() === "template";
|
|
1935
|
+
if (isTemplate && !isCompositionTemplate(child)) continue;
|
|
1936
|
+
visit(child);
|
|
1937
|
+
walk(child);
|
|
1938
|
+
}
|
|
1939
|
+
};
|
|
1940
|
+
walk(rootElement);
|
|
1941
|
+
}
|
|
1942
|
+
function assignHfIds(body) {
|
|
1943
|
+
const assigned = /* @__PURE__ */ new Set();
|
|
1944
|
+
walkCompositionDescendants(body, (el) => {
|
|
1945
|
+
const existing = getContractAttribute(el, "data-hf-id");
|
|
1946
|
+
if (existing) assigned.add(existing);
|
|
1947
|
+
});
|
|
1948
|
+
walkCompositionDescendants(body, (el) => {
|
|
1949
|
+
if (EXCLUDED_TAGS.has(el.tagName.toLowerCase())) return;
|
|
1950
|
+
if (getContractAttribute(el, "data-hf-id")) return;
|
|
1951
|
+
el.setAttribute("data-hf-id", mintHfId(el, assigned));
|
|
1952
|
+
});
|
|
1953
|
+
}
|
|
1954
|
+
function ensureHfIds(html) {
|
|
1955
|
+
const { document, wrapped } = parseFragmentOrDocument(html);
|
|
1956
|
+
if (!document.body) return html;
|
|
1957
|
+
assignHfIds(document.body);
|
|
1958
|
+
return wrapped ? document.body.innerHTML || "" : document.toString();
|
|
1959
|
+
}
|
|
1960
|
+
function parseFragmentOrDocument(html) {
|
|
1961
|
+
const wrapped = !/^(?:<!doctype|<html[\s>/])/i.test(
|
|
1962
|
+
html.replace(/^(?:\s|<!--(?:>|->|[\s\S]*?-->))*/, "")
|
|
1963
|
+
);
|
|
1964
|
+
const { document } = wrapped ? parseHTML(`<!DOCTYPE html><html><head></head><body>${html}</body></html>`) : parseHTML(html);
|
|
1965
|
+
return { document, wrapped };
|
|
1966
|
+
}
|
|
1967
|
+
function stampHfIdsInPlace(html) {
|
|
1968
|
+
const { document, wrapped } = parseFragmentOrDocument(html);
|
|
1969
|
+
if (!document.body) return html;
|
|
1970
|
+
const elements = wrapped ? getChildElements(document.body).flatMap(inDocumentOrder) : inDocumentOrder(document.documentElement);
|
|
1971
|
+
const existing = elements.map((el) => el.getAttribute("data-hf-id"));
|
|
1972
|
+
const pinned = existing.map((id) => id !== null && id.length > 0);
|
|
1973
|
+
assignHfIds(document.body);
|
|
1974
|
+
const minted = elements.map((el, n) => pinned[n] ? null : el.getAttribute("data-hf-id"));
|
|
1975
|
+
const tags = startTags(html);
|
|
1976
|
+
const inserts = tags && alignInserts(html, tags, elements, minted, existing);
|
|
1977
|
+
return inserts ? spliceIds(html, inserts) : ensureHfIds(html);
|
|
1978
|
+
}
|
|
1979
|
+
function inDocumentOrder(el) {
|
|
1980
|
+
return [el, ...getChildElements(el).flatMap(inDocumentOrder)];
|
|
1981
|
+
}
|
|
1982
|
+
var RAW_TEXT = /* @__PURE__ */ new Set(["script", "style", "textarea", "title", "xmp", "noembed", "noframes"]);
|
|
1983
|
+
var IMPLIED = /* @__PURE__ */ new Set(["html", "head", "body", "tbody"]);
|
|
1984
|
+
function startTags(html) {
|
|
1985
|
+
const lower = html.toLowerCase();
|
|
1986
|
+
const tags = [];
|
|
1987
|
+
let i = html.indexOf("<");
|
|
1988
|
+
while (i >= 0) {
|
|
1989
|
+
const name = html.startsWith("<!--", i) ? null : /^<([a-zA-Z][^\s/>]*)/.exec(html.slice(i, i + 128));
|
|
1990
|
+
if (!name) {
|
|
1991
|
+
i = nextTagAfter(html, i);
|
|
1992
|
+
continue;
|
|
1993
|
+
}
|
|
1994
|
+
const end = closingBracket(html, i + name[0].length);
|
|
1995
|
+
if (end < 0) return null;
|
|
1996
|
+
const tag = name[1].toLowerCase();
|
|
1997
|
+
tags.push({ name: tag, nameEnd: i + name[0].length, bracket: end });
|
|
1998
|
+
const after = RAW_TEXT.has(tag) ? rawTextEnd(lower, tag, end) : end;
|
|
1999
|
+
i = after < 0 ? -1 : html.indexOf("<", after + 1);
|
|
2000
|
+
}
|
|
2001
|
+
return tags;
|
|
2002
|
+
}
|
|
2003
|
+
function rawTextEnd(lower, tag, from) {
|
|
2004
|
+
const marker = `</${tag}`;
|
|
2005
|
+
for (let at = lower.indexOf(marker, from); at >= 0; at = lower.indexOf(marker, at + marker.length)) {
|
|
2006
|
+
const next = lower[at + marker.length];
|
|
2007
|
+
if (next !== void 0 && /[\s/>]/.test(next)) return at;
|
|
2008
|
+
}
|
|
2009
|
+
return -1;
|
|
2010
|
+
}
|
|
2011
|
+
function nextTagAfter(html, lt) {
|
|
2012
|
+
const comment = html.startsWith("<!--", lt);
|
|
2013
|
+
const end = comment ? html.indexOf("-->", lt + 4) : html.indexOf(">", lt);
|
|
2014
|
+
return end < 0 ? -1 : html.indexOf("<", end + 1);
|
|
2015
|
+
}
|
|
2016
|
+
function closingBracket(html, from) {
|
|
2017
|
+
let quote = "";
|
|
2018
|
+
for (let i = from; i < html.length; i++) {
|
|
2019
|
+
const c = html[i];
|
|
2020
|
+
if (quote) quote = c === quote ? "" : quote;
|
|
2021
|
+
else if (c === '"' || c === "'") quote = c;
|
|
2022
|
+
else if (c === ">") return i;
|
|
2023
|
+
}
|
|
2024
|
+
return -1;
|
|
2025
|
+
}
|
|
2026
|
+
function alignInserts(html, tags, elements, minted, existing) {
|
|
2027
|
+
const walked = walkAlign(html, tags, elements, minted, existing);
|
|
2028
|
+
if (!walked) return null;
|
|
2029
|
+
return walked.next === tags.length ? walked.inserts : null;
|
|
2030
|
+
}
|
|
2031
|
+
function walkAlign(html, tags, elements, minted, existing) {
|
|
2032
|
+
const state = { inserts: [], next: 0 };
|
|
2033
|
+
for (const [n, el] of elements.entries()) {
|
|
2034
|
+
if (!take(state, html, tags, el, minted[n] ?? null, existing[n] === "")) return null;
|
|
2035
|
+
}
|
|
2036
|
+
return state;
|
|
2037
|
+
}
|
|
2038
|
+
function take(state, html, tags, el, id, fillEmpty) {
|
|
2039
|
+
const step = alignOne(html, tags[state.next], el, id, fillEmpty);
|
|
2040
|
+
if (!step) return false;
|
|
2041
|
+
if (step.insert) state.inserts.push(step.insert);
|
|
2042
|
+
if (step.next) state.next += 1;
|
|
2043
|
+
return true;
|
|
2044
|
+
}
|
|
2045
|
+
function alignOne(html, tag, el, id, fillEmpty) {
|
|
2046
|
+
if (tag?.name === el.tagName.toLowerCase()) return matched(html, tag, id, fillEmpty);
|
|
2047
|
+
if (IMPLIED.has(el.tagName.toLowerCase()) && !id) return { insert: null, next: false };
|
|
2048
|
+
return null;
|
|
2049
|
+
}
|
|
2050
|
+
function matched(html, tag, id, fillEmpty) {
|
|
2051
|
+
if (!id) return { insert: null, next: true };
|
|
2052
|
+
const placed = placeId(html, tag, id, fillEmpty);
|
|
2053
|
+
if (!placed) return null;
|
|
2054
|
+
return { insert: placed, next: true };
|
|
2055
|
+
}
|
|
2056
|
+
function placeId(html, tag, id, fillEmpty) {
|
|
2057
|
+
if (!fillEmpty) return { at: tag.nameEnd, text: ` data-hf-id="${id}"` };
|
|
2058
|
+
const emptyAt = emptyHfIdValue(html, tag);
|
|
2059
|
+
if (emptyAt === null) return null;
|
|
2060
|
+
return { at: emptyAt, text: id };
|
|
2061
|
+
}
|
|
2062
|
+
function emptyHfIdValue(html, tag) {
|
|
2063
|
+
const open = outsideQuotes(html.slice(tag.nameEnd, tag.bracket));
|
|
2064
|
+
const match = /\sdata-hf-id\s*=\s*(["'])\1/i.exec(open);
|
|
2065
|
+
if (!match) return null;
|
|
2066
|
+
return tag.nameEnd + match.index + match[0].length - 1;
|
|
2067
|
+
}
|
|
2068
|
+
function outsideQuotes(open) {
|
|
2069
|
+
let quote = "";
|
|
2070
|
+
let out = "";
|
|
2071
|
+
for (const c of open) {
|
|
2072
|
+
out += quotedChar(quote, c);
|
|
2073
|
+
quote = quoteOf(quote, c);
|
|
2074
|
+
}
|
|
2075
|
+
return out;
|
|
2076
|
+
}
|
|
2077
|
+
function quoteOf(quote, c) {
|
|
2078
|
+
if (quote) return c === quote ? "" : quote;
|
|
2079
|
+
return c === '"' || c === "'" ? c : "";
|
|
2080
|
+
}
|
|
2081
|
+
function quotedChar(quote, c) {
|
|
2082
|
+
if (!quote || c === quote) return c;
|
|
2083
|
+
return " ".repeat(c.length);
|
|
2084
|
+
}
|
|
2085
|
+
function spliceIds(html, inserts) {
|
|
2086
|
+
let out = "";
|
|
2087
|
+
let from = 0;
|
|
2088
|
+
for (const { at, text } of inserts) {
|
|
2089
|
+
out += html.slice(from, at) + text;
|
|
2090
|
+
from = at;
|
|
2091
|
+
}
|
|
2092
|
+
return out + html.slice(from);
|
|
2093
|
+
}
|
|
2094
|
+
|
|
1865
2095
|
// ../core/dist/compiler/htmlBundler.js
|
|
1866
2096
|
var DEFAULT_RUNTIME_SCRIPT_URL = "";
|
|
1867
2097
|
function getRuntimeScriptUrl() {
|
|
@@ -3142,6 +3372,11 @@ export {
|
|
|
3142
3372
|
validateHyperframeHtmlContract,
|
|
3143
3373
|
ensureExternalLinkTag,
|
|
3144
3374
|
inlineSubCompositions,
|
|
3375
|
+
EXCLUDED_TAGS,
|
|
3376
|
+
mintHfId,
|
|
3377
|
+
walkCompositionDescendants,
|
|
3378
|
+
ensureHfIds,
|
|
3379
|
+
stampHfIdsInPlace,
|
|
3145
3380
|
assignBundledRuntimeCompositionIds,
|
|
3146
3381
|
prepareFlattenedInnerRoot,
|
|
3147
3382
|
parsesAsScript,
|
|
@@ -102,9 +102,81 @@ function isLowMemorySystem(totalMb = getSystemTotalMb()) {
|
|
|
102
102
|
return totalMb <= LOW_MEMORY_TOTAL_MB_THRESHOLD;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
// ../engine/src/services/wslHost.ts
|
|
106
|
+
import { accessSync, constants, existsSync, readFileSync as readFileSync2, statSync } from "fs";
|
|
107
|
+
import { platform, release } from "os";
|
|
108
|
+
function groupName(gid) {
|
|
109
|
+
try {
|
|
110
|
+
const line = readFileSync2("/etc/group", "utf-8").split("\n").find((entry) => entry.split(":")[2] === String(gid));
|
|
111
|
+
return line?.split(":")[0] || String(gid);
|
|
112
|
+
} catch {
|
|
113
|
+
return String(gid);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
var realHost = {
|
|
117
|
+
get platform() {
|
|
118
|
+
return platform();
|
|
119
|
+
},
|
|
120
|
+
get release() {
|
|
121
|
+
return release();
|
|
122
|
+
},
|
|
123
|
+
readProcVersion: () => readFileSync2("/proc/version", "utf-8"),
|
|
124
|
+
renderNodeAccess: (path) => {
|
|
125
|
+
if (!existsSync(path)) return { state: "missing" };
|
|
126
|
+
try {
|
|
127
|
+
accessSync(path, constants.R_OK | constants.W_OK);
|
|
128
|
+
return { state: "read-write" };
|
|
129
|
+
} catch {
|
|
130
|
+
const gid = statSync(path, { throwIfNoEntry: false })?.gid ?? -1;
|
|
131
|
+
return {
|
|
132
|
+
state: "denied",
|
|
133
|
+
group: groupName(gid),
|
|
134
|
+
userInGroup: process.getgroups?.().includes(gid) ?? false
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
function detectWsl(host = realHost) {
|
|
140
|
+
if (host.platform !== "linux") return false;
|
|
141
|
+
try {
|
|
142
|
+
const osRelease = host.release.toLowerCase();
|
|
143
|
+
if (osRelease.includes("microsoft") || osRelease.includes("wsl")) return true;
|
|
144
|
+
const procVersion = host.readProcVersion().toLowerCase();
|
|
145
|
+
return procVersion.includes("microsoft") || procVersion.includes("wsl");
|
|
146
|
+
} catch {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
var RENDER_NODE = "/dev/dri/renderD128";
|
|
151
|
+
var NATIVE_WINDOWS = "render from native Windows (project copied to a Windows drive, run from PowerShell), where Chrome uses the GPU through Direct3D.";
|
|
152
|
+
function describeWslGpuAccess(host = realHost) {
|
|
153
|
+
if (!detectWsl(host)) return null;
|
|
154
|
+
const access = host.renderNodeAccess(RENDER_NODE);
|
|
155
|
+
if (access.state === "denied" && !access.userInGroup) {
|
|
156
|
+
return [
|
|
157
|
+
` Your Linux user cannot read and write ${RENDER_NODE} and is not in its group ("${access.group}"), which can stop Mesa from reaching the GPU.`,
|
|
158
|
+
` Fix: run \`sudo usermod -aG ${access.group} $USER\`, then \`wsl --shutdown\` from Windows, reopen WSL and render again.`,
|
|
159
|
+
` Or ${NATIVE_WINDOWS}`
|
|
160
|
+
];
|
|
161
|
+
}
|
|
162
|
+
if (access.state === "denied") {
|
|
163
|
+
return [
|
|
164
|
+
` Your Linux user is in the "${access.group}" group but still cannot read and write ${RENDER_NODE}; check its permissions with \`ls -l ${RENDER_NODE}\`.`,
|
|
165
|
+
` Or ${NATIVE_WINDOWS}`
|
|
166
|
+
];
|
|
167
|
+
}
|
|
168
|
+
const seen = access.state === "missing" ? "does not exist" : "is readable and writable";
|
|
169
|
+
return [
|
|
170
|
+
` ${RENDER_NODE} ${seen}, so file permissions are not the cause.`,
|
|
171
|
+
` To use the GPU, ${NATIVE_WINDOWS}`
|
|
172
|
+
];
|
|
173
|
+
}
|
|
174
|
+
|
|
105
175
|
export {
|
|
106
176
|
getCgroupMemoryLimitMb,
|
|
107
177
|
getSystemTotalMb,
|
|
108
178
|
LOW_MEMORY_TOTAL_MB_THRESHOLD,
|
|
109
|
-
isLowMemorySystem
|
|
179
|
+
isLowMemorySystem,
|
|
180
|
+
detectWsl,
|
|
181
|
+
describeWslGpuAccess
|
|
110
182
|
};
|
|
@@ -10,21 +10,21 @@ import {
|
|
|
10
10
|
seekCompositionTimeline,
|
|
11
11
|
waitForCompositionFonts,
|
|
12
12
|
waitForRuntimeReady
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SH43VDEF.js";
|
|
14
14
|
import {
|
|
15
15
|
gotoWhenSent,
|
|
16
16
|
launchManagedBrowser,
|
|
17
17
|
resolveManagedGpuMode
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-EAR5LFOH.js";
|
|
19
19
|
import {
|
|
20
20
|
pageNavigationTimeoutMs
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-SEHRMJTO.js";
|
|
22
22
|
import {
|
|
23
23
|
resolveProject
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-HIYAJFRH.js";
|
|
25
25
|
import {
|
|
26
26
|
serveStaticProjectHtml
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-X3BE2HX4.js";
|
|
28
28
|
import {
|
|
29
29
|
defineCommand
|
|
30
30
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
import {
|
|
39
39
|
printDeprecationNotice,
|
|
40
40
|
withMeta
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-JKPI7VLI.js";
|
|
42
42
|
import {
|
|
43
43
|
normalizeErrorMessage
|
|
44
44
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -709,7 +709,7 @@ async function collectTweenBoundaries(page) {
|
|
|
709
709
|
});
|
|
710
710
|
}
|
|
711
711
|
async function bundleProjectHtml(projectDir) {
|
|
712
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
712
|
+
const { bundleToSingleHtml } = await import("./compiler-O5R3ZZDV.js");
|
|
713
713
|
return bundleToSingleHtml(projectDir);
|
|
714
714
|
}
|
|
715
715
|
async function alignViewportToComposition(page, url) {
|
|
@@ -728,13 +728,13 @@ async function alignViewportToComposition(page, url) {
|
|
|
728
728
|
async function runLayoutAudit(projectDir, opts) {
|
|
729
729
|
const { ensureBrowser } = await import("./manager-HEUPD2YB.js");
|
|
730
730
|
const puppeteer = await import("puppeteer-core");
|
|
731
|
-
const { buildChromeArgs } = await import("./src-
|
|
731
|
+
const { buildChromeArgs } = await import("./src-MRYINZ62.js");
|
|
732
732
|
const {
|
|
733
733
|
assertWebGpuAdapterAvailable,
|
|
734
734
|
compositionRequiresWebGpu,
|
|
735
735
|
resolveLocalBrowserGpuMode,
|
|
736
736
|
resolveLocalWebGpu
|
|
737
|
-
} = await import("./gpuPolicy-
|
|
737
|
+
} = await import("./gpuPolicy-MCIQK5Z7.js");
|
|
738
738
|
const html = await bundleProjectHtml(projectDir);
|
|
739
739
|
const server = await serveStaticProjectHtml(
|
|
740
740
|
projectDir,
|
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getMimeType,
|
|
9
9
|
injectMediaCodecMapIntoHtml
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CI7ZHFSV.js";
|
|
11
11
|
import {
|
|
12
12
|
PROXY_VARIANT_CONFIG,
|
|
13
13
|
ProxyCapacityError,
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
recordProxyRequest,
|
|
19
19
|
resolveProxy,
|
|
20
20
|
resolveProxyVariantRequest
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-APMA7XXB.js";
|
|
22
22
|
import {
|
|
23
23
|
resolveAutoProxy
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-UDJHYQSZ.js";
|
|
25
25
|
import {
|
|
26
26
|
decodeWellFormedEscapes
|
|
27
27
|
} from "./chunk-BSQ7XANM.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-PBN6GBJE.js";
|
|
22
22
|
|
|
23
23
|
// src/cloud/poll.ts
|
|
24
|
-
var DEFAULT_POLL_INTERVAL_MS =
|
|
24
|
+
var DEFAULT_POLL_INTERVAL_MS = 2e3;
|
|
25
25
|
var DEFAULT_MAX_WAIT_MS = 60 * 60 * 1e3;
|
|
26
26
|
var TERMINAL_STATUSES = /* @__PURE__ */ new Set(["completed", "failed"]);
|
|
27
27
|
var PollTimeoutError = class extends Error {
|
|
@@ -6,13 +6,11 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
LOW_MEMORY_TOTAL_MB_THRESHOLD,
|
|
9
|
+
describeWslGpuAccess,
|
|
10
|
+
detectWsl,
|
|
9
11
|
getSystemTotalMb,
|
|
10
12
|
isLowMemorySystem
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
describeWslGpuAccess,
|
|
14
|
-
detectWsl
|
|
15
|
-
} from "./chunk-7KDQAD2W.js";
|
|
13
|
+
} from "./chunk-W2LGJSEN.js";
|
|
16
14
|
import {
|
|
17
15
|
DISTRIBUTED_FPS,
|
|
18
16
|
MEDIA_VISUAL_STYLE_PROPERTIES,
|
|
@@ -31,7 +29,7 @@ import {
|
|
|
31
29
|
renderFrameIdForRenderId,
|
|
32
30
|
resolveAuthoredTimingWindow,
|
|
33
31
|
toFps
|
|
34
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-RMKL5FVH.js";
|
|
35
33
|
import {
|
|
36
34
|
AUDIO_GROUP_RENDER_ID_ATTR,
|
|
37
35
|
COLOR_GRADING_SOURCE_HIDDEN_ATTR,
|
|
@@ -60,7 +58,7 @@ import {
|
|
|
60
58
|
shiftRateLane,
|
|
61
59
|
sourceTimeAt,
|
|
62
60
|
timeAtSourceTime
|
|
63
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-UKJECUDK.js";
|
|
64
62
|
import {
|
|
65
63
|
clampAudioGain,
|
|
66
64
|
isAudibleVideoElement
|
|
@@ -84,7 +82,7 @@ import {
|
|
|
84
82
|
import {
|
|
85
83
|
parseNumeric,
|
|
86
84
|
parseStartExpression
|
|
87
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-32GKETR7.js";
|
|
88
86
|
import {
|
|
89
87
|
isPathInside
|
|
90
88
|
} from "./chunk-BSQ7XANM.js";
|
|
@@ -565,8 +563,8 @@ function applyConcreteGpuScreenshotClamp(currentForceScreenshot, resolvedGpuMode
|
|
|
565
563
|
|
|
566
564
|
// ../engine/src/utils/sdrCaptureColor.ts
|
|
567
565
|
var SDR_RGB_TO_BT709_FILTER = "scale=out_color_matrix=bt709:out_range=tv:flags=neighbor";
|
|
568
|
-
var SDR_CAPTURE_TO_BT709_FILTER = `scale=in_color_matrix=bt601:in_range=pc:flags=neighbor+accurate_rnd,format=gbrp,${SDR_RGB_TO_BT709_FILTER}`;
|
|
569
566
|
var SDR_RGB_TO_TAGGED_BT709_FILTER = `${SDR_RGB_TO_BT709_FILTER},setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709:range=tv`;
|
|
567
|
+
var SDR_CAPTURE_TO_BT709_FILTER = `scale=in_color_matrix=bt601:in_range=pc:flags=neighbor+accurate_rnd,format=gbrp,${SDR_RGB_TO_TAGGED_BT709_FILTER}`;
|
|
570
568
|
|
|
571
569
|
// ../parsers/dist/htmlAttributeSpans.js
|
|
572
570
|
function readAttributeValue(html, at) {
|
|
@@ -6971,6 +6969,15 @@ async function captureFrameSurface(session, frameIndex, time, seekOptions, heldV
|
|
|
6971
6969
|
let screenshotBuffer;
|
|
6972
6970
|
if (session.captureMode === "beginframe") {
|
|
6973
6971
|
const frameTimeTicks = session.beginFrameTimeTicks + frameIndex * session.beginFrameIntervalMs;
|
|
6972
|
+
if (!session.beginFrameSeekPresented) {
|
|
6973
|
+
const client = await getCdpSession(page);
|
|
6974
|
+
await client.send("HeadlessExperimental.beginFrame", {
|
|
6975
|
+
frameTimeTicks: frameTimeTicks - session.beginFrameIntervalMs / 2,
|
|
6976
|
+
interval: session.beginFrameIntervalMs,
|
|
6977
|
+
noDisplayUpdates: false
|
|
6978
|
+
});
|
|
6979
|
+
session.beginFrameSeekPresented = true;
|
|
6980
|
+
}
|
|
6974
6981
|
const result = await beginFrameCapture(
|
|
6975
6982
|
page,
|
|
6976
6983
|
options,
|
|
@@ -7984,6 +7991,10 @@ function getHdrEncoderColorParams(transfer, mastering = DEFAULT_HDR10_MASTERING)
|
|
|
7984
7991
|
mastering
|
|
7985
7992
|
};
|
|
7986
7993
|
}
|
|
7994
|
+
function hdrFrameTagsFilter(transfer) {
|
|
7995
|
+
const { colorPrimaries, colorTrc, colorspace } = getHdrEncoderColorParams(transfer);
|
|
7996
|
+
return `setparams=color_primaries=${colorPrimaries}:color_trc=${colorTrc}:colorspace=${colorspace}:range=tv`;
|
|
7997
|
+
}
|
|
7987
7998
|
var HDR_AUTO_PROMOTION_PIPELINE = {
|
|
7988
7999
|
colorSpace: "BT.2020",
|
|
7989
8000
|
codec: "HEVC Main10"
|
|
@@ -9110,15 +9121,21 @@ function buildEncoderArgs(options, inputArgs, outputPath, gpuEncoder = null) {
|
|
|
9110
9121
|
"tv"
|
|
9111
9122
|
);
|
|
9112
9123
|
}
|
|
9124
|
+
const hdrTags = options.hdr ? hdrFrameTagsFilter(options.hdr.transfer) : void 0;
|
|
9113
9125
|
const sdrFilter = options.hdr ? void 0 : SDR_CAPTURE_TO_BT709_FILTER;
|
|
9114
|
-
const captureFilter = sdrFilter ??
|
|
9126
|
+
const captureFilter = sdrFilter ?? `scale=in_range=pc:out_range=tv,${hdrTags}`;
|
|
9115
9127
|
if (gpuEncoder === "vaapi") {
|
|
9116
9128
|
const vfIdx = args.indexOf("-vf");
|
|
9117
9129
|
if (vfIdx !== -1) {
|
|
9118
9130
|
args[vfIdx + 1] = `${captureFilter},${args[vfIdx + 1]}`;
|
|
9119
9131
|
}
|
|
9120
9132
|
} else if (shouldUseGpu) {
|
|
9121
|
-
const vf = withEvenDimensionPad(
|
|
9133
|
+
const vf = withEvenDimensionPad(
|
|
9134
|
+
sdrFilter ?? hdrTags ?? "",
|
|
9135
|
+
pixelFormat,
|
|
9136
|
+
options.width,
|
|
9137
|
+
options.height
|
|
9138
|
+
);
|
|
9122
9139
|
if (vf) args.push("-vf", vf);
|
|
9123
9140
|
} else {
|
|
9124
9141
|
args.push(
|
|
@@ -9771,15 +9788,17 @@ function buildStreamingArgs(options, outputPath, gpuEncoder = null) {
|
|
|
9771
9788
|
"tv"
|
|
9772
9789
|
);
|
|
9773
9790
|
}
|
|
9774
|
-
const
|
|
9775
|
-
if (
|
|
9776
|
-
} else if (gpuEncoder === "vaapi") {
|
|
9791
|
+
const frameFilter = options.rawInputFormat && options.hdr ? hdrFrameTagsFilter(options.hdr.transfer) : options.rawInputFormat ? SDR_RGB_TO_TAGGED_BT709_FILTER : SDR_CAPTURE_TO_BT709_FILTER;
|
|
9792
|
+
if (gpuEncoder === "vaapi") {
|
|
9777
9793
|
const vfIdx = args.indexOf("-vf");
|
|
9778
9794
|
if (vfIdx !== -1) {
|
|
9779
|
-
args[vfIdx + 1] = `${
|
|
9795
|
+
args[vfIdx + 1] = `${frameFilter},${args[vfIdx + 1]}`;
|
|
9780
9796
|
}
|
|
9781
9797
|
} else {
|
|
9782
|
-
args.push(
|
|
9798
|
+
args.push(
|
|
9799
|
+
"-vf",
|
|
9800
|
+
withEvenDimensionPad(frameFilter, pixelFormat, options.width, options.height)
|
|
9801
|
+
);
|
|
9783
9802
|
}
|
|
9784
9803
|
args.push("-video_track_timescale", "90000");
|
|
9785
9804
|
}
|
|
@@ -6,32 +6,32 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
redactHome
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CSMKMVGG.js";
|
|
10
10
|
import "./chunk-Z27A7NUB.js";
|
|
11
11
|
import "./chunk-5ETJX6WM.js";
|
|
12
12
|
import {
|
|
13
13
|
loadProducer
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QUK2IZKI.js";
|
|
15
15
|
import {
|
|
16
16
|
formatBytes
|
|
17
17
|
} from "./chunk-K2FLNJVB.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-CI7ZHFSV.js";
|
|
19
|
+
import "./chunk-QJCVK7CI.js";
|
|
20
20
|
import "./chunk-6JR2XUEE.js";
|
|
21
21
|
import "./chunk-C6TPGUWD.js";
|
|
22
22
|
import {
|
|
23
23
|
CACHE_DIR_NAME,
|
|
24
24
|
cleanupProxyCache
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-APMA7XXB.js";
|
|
26
26
|
import {
|
|
27
27
|
DEFAULT_HISTORY_ROOT,
|
|
28
28
|
listProjectHistories,
|
|
29
29
|
pruneGoneProjectHistories
|
|
30
30
|
} from "./chunk-GMJ3ILLW.js";
|
|
31
31
|
import "./chunk-FFDC5OWV.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-HZZZ6C6Z.js";
|
|
33
33
|
import "./chunk-5CS4T6C6.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-T6AGUTZJ.js";
|
|
35
35
|
import {
|
|
36
36
|
defineCommand
|
|
37
37
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -47,29 +47,27 @@ import "./chunk-7FMUTGOH.js";
|
|
|
47
47
|
import "./chunk-XRKMITSS.js";
|
|
48
48
|
import {
|
|
49
49
|
withMeta
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-JKPI7VLI.js";
|
|
51
51
|
import "./chunk-K4WIOZFP.js";
|
|
52
52
|
import "./chunk-XUXGIA7H.js";
|
|
53
53
|
import "./chunk-WERLJGIC.js";
|
|
54
54
|
import "./chunk-ISN5GRYI.js";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-SI76MFBF.js";
|
|
56
56
|
import "./chunk-3DKN5WKL.js";
|
|
57
57
|
import "./chunk-EOVYQ3IG.js";
|
|
58
58
|
import "./chunk-6BEFEWFB.js";
|
|
59
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-4VTUDCHM.js";
|
|
60
60
|
import "./chunk-XT6MXC7A.js";
|
|
61
61
|
import {
|
|
62
62
|
EXTRACT_CACHE_MIN_AGE_MS,
|
|
63
63
|
directorySizeBytes,
|
|
64
64
|
gcExtractionCache,
|
|
65
65
|
resolveExtractCacheDir
|
|
66
|
-
} from "./chunk-
|
|
67
|
-
import "./chunk-
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import "./chunk-
|
|
71
|
-
import "./chunk-U7EGMXQR.js";
|
|
72
|
-
import "./chunk-7JDEZNBY.js";
|
|
66
|
+
} from "./chunk-XVIFWEPR.js";
|
|
67
|
+
import "./chunk-UQLXFITA.js";
|
|
68
|
+
import "./chunk-W2LGJSEN.js";
|
|
69
|
+
import "./chunk-RMKL5FVH.js";
|
|
70
|
+
import "./chunk-UKJECUDK.js";
|
|
73
71
|
import "./chunk-VC76R6W2.js";
|
|
74
72
|
import "./chunk-UJKQWGFF.js";
|
|
75
73
|
import "./chunk-YMS5FOMC.js";
|
|
@@ -80,11 +78,11 @@ import "./chunk-FXMKHHPO.js";
|
|
|
80
78
|
import "./chunk-RQVDTPGD.js";
|
|
81
79
|
import "./chunk-D3ZWBHZP.js";
|
|
82
80
|
import "./chunk-TWWSYAKJ.js";
|
|
83
|
-
import "./chunk-
|
|
81
|
+
import "./chunk-GK2FIKIQ.js";
|
|
84
82
|
import "./chunk-6BNTGNGD.js";
|
|
85
|
-
import "./chunk-OYLO6TYK.js";
|
|
86
83
|
import "./chunk-VAS6HQX3.js";
|
|
87
|
-
import "./chunk-
|
|
84
|
+
import "./chunk-OYLO6TYK.js";
|
|
85
|
+
import "./chunk-32GKETR7.js";
|
|
88
86
|
import "./chunk-BSQ7XANM.js";
|
|
89
87
|
import "./chunk-SDYDNHEE.js";
|
|
90
88
|
import "./chunk-TYXH3EKP.js";
|