hyperframes 0.8.73 → 0.8.74

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.
@@ -17022,7 +17022,7 @@ var require_util = __commonJS({
17022
17022
  return path;
17023
17023
  }
17024
17024
  exports.normalize = normalize;
17025
- function join62(aRoot, aPath) {
17025
+ function join63(aRoot, aPath) {
17026
17026
  if (aRoot === "") {
17027
17027
  aRoot = ".";
17028
17028
  }
@@ -17054,7 +17054,7 @@ var require_util = __commonJS({
17054
17054
  }
17055
17055
  return joined;
17056
17056
  }
17057
- exports.join = join62;
17057
+ exports.join = join63;
17058
17058
  exports.isAbsolute = function(aPath) {
17059
17059
  return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
17060
17060
  };
@@ -17227,7 +17227,7 @@ var require_util = __commonJS({
17227
17227
  parsed.path = parsed.path.substring(0, index + 1);
17228
17228
  }
17229
17229
  }
17230
- sourceURL = join62(urlGenerate(parsed), sourceURL);
17230
+ sourceURL = join63(urlGenerate(parsed), sourceURL);
17231
17231
  }
17232
17232
  return normalize(sourceURL);
17233
17233
  }
@@ -60748,7 +60748,7 @@ async function pollHfReady(page, timeoutMs, intervalMs = 100) {
60748
60748
  State: __hf=${diag.hasHf}, seek=${diag.hasSeek}, player=${diag.hasPlayer}, renderReady=${diag.renderReady}, duration=${diag.duration}`
60749
60749
  );
60750
60750
  }
60751
- async function pollSubCompositionTimelines(page, timeoutMs, intervalMs = 150, getScriptLoadFailures, scriptFailureGraceMs = 2e3) {
60751
+ async function pollSubCompositionTimelines(page, timeoutMs, intervalMs = 150, getScriptLoadFailures, scriptFailureGraceMs = 2e3, onPending) {
60752
60752
  const expression = `(function() {
60753
60753
  var hosts = document.querySelectorAll("[data-composition-id]");
60754
60754
  if (hosts.length === 0) return true;
@@ -60788,7 +60788,7 @@ async function pollSubCompositionTimelines(page, timeoutMs, intervalMs = 150, ge
60788
60788
  })()`);
60789
60789
  return "ready";
60790
60790
  }
60791
- const missing = await page.evaluate(`(function() {
60791
+ const evaluated = await page.evaluate(`(function() {
60792
60792
  var hosts = document.querySelectorAll("[data-composition-id]");
60793
60793
  var timelines = window.__timelines || {};
60794
60794
  var m = [];
@@ -60797,8 +60797,11 @@ async function pollSubCompositionTimelines(page, timeoutMs, intervalMs = 150, ge
60797
60797
  var id = hosts[i].getAttribute("data-composition-id");
60798
60798
  if (id && !timelines[id]) m.push(id);
60799
60799
  }
60800
- return m.join(", ");
60800
+ return m;
60801
60801
  })()`);
60802
+ const pendingIds = Array.isArray(evaluated) ? evaluated.map((id) => String(id)) : [];
60803
+ onPending?.(pendingIds);
60804
+ const missing = pendingIds.join(", ");
60802
60805
  if (scriptFailureBail) {
60803
60806
  console.warn(`[FrameCapture] Composition(s) still waiting on the failed script: ${missing}.`);
60804
60807
  } else {
@@ -60912,11 +60915,17 @@ function recordSubTimelineWarning(session, timeoutMs) {
60912
60915
  if (session.subTimelineWaitOutcome === "ready" || !session.subTimelineWaitOutcome) return;
60913
60916
  const scriptFailure = session.subTimelineWaitOutcome === "script_failure";
60914
60917
  const hasRuntimeErrors = session.scriptLoadFailures.some((f) => f.startsWith("runtime-error:"));
60918
+ const pending = session.pendingTimelineIds ?? [];
60919
+ const pendingSuffix = pending.length > 0 ? ` (still unregistered: ${pending.join(", ")})` : "";
60915
60920
  recordCaptureWarnings(session, [
60916
60921
  {
60917
60922
  code: scriptFailure ? "sub_timeline_script_failure" : "sub_timeline_readiness_timeout",
60918
- message: scriptFailure ? hasRuntimeErrors ? `A sub-composition script threw during execution \u2014 timeline registration never arrived (${session.scriptLoadFailures.join(", ")})` : `A sub-composition timeline script failed to load (${session.scriptLoadFailures.join(", ")})` : `Sub-composition timelines did not become ready within ${timeoutMs}ms`,
60919
- details: { timeoutMs, sources: [...session.scriptLoadFailures] }
60923
+ message: scriptFailure ? hasRuntimeErrors ? `A sub-composition script threw during execution \u2014 timeline registration never arrived (${session.scriptLoadFailures.join(", ")})` : `A sub-composition timeline script failed to load (${session.scriptLoadFailures.join(", ")})` : `Sub-composition timelines did not become ready within ${timeoutMs}ms${pendingSuffix}. This can be intentional: a composition driven by CSS animations or rAF never registers window.__timelines[id], and marking its host with data-no-timeline skips the wait entirely. Otherwise, a composition that sets up asynchronously must register window.__timelines[id] once setup completes.`,
60924
+ details: {
60925
+ timeoutMs,
60926
+ sources: [...session.scriptLoadFailures],
60927
+ pendingCompositionIds: [...pending]
60928
+ }
60920
60929
  }
60921
60930
  ]);
60922
60931
  }
@@ -61105,7 +61114,11 @@ async function initializeSession(session) {
61105
61114
  page,
61106
61115
  pageReadyTimeout2,
61107
61116
  void 0,
61108
- () => session.scriptLoadFailures
61117
+ () => session.scriptLoadFailures,
61118
+ void 0,
61119
+ (ids) => {
61120
+ session.pendingTimelineIds = [...ids];
61121
+ }
61109
61122
  );
61110
61123
  logInitPhase(`pollSubCompositionTimelines complete (${session.subTimelineWaitOutcome})`);
61111
61124
  recordSubTimelineWarning(session, pageReadyTimeout2);
@@ -61219,7 +61232,11 @@ async function initializeSession(session) {
61219
61232
  page,
61220
61233
  pageReadyTimeout,
61221
61234
  void 0,
61222
- () => session.scriptLoadFailures
61235
+ () => session.scriptLoadFailures,
61236
+ void 0,
61237
+ (ids) => {
61238
+ session.pendingTimelineIds = [...ids];
61239
+ }
61223
61240
  );
61224
61241
  logInitPhase(`pollSubCompositionTimelines complete (${session.subTimelineWaitOutcome})`);
61225
61242
  recordSubTimelineWarning(session, pageReadyTimeout);
@@ -63808,13 +63825,42 @@ var init_ffprobe = __esm({
63808
63825
  });
63809
63826
 
63810
63827
  // ../engine/src/utils/renderProvenance.ts
63811
- import { createRequire } from "module";
63828
+ import { readFileSync as readFileSync3 } from "fs";
63829
+ import { dirname as dirname4, join as join7 } from "path";
63830
+ import { fileURLToPath as fileURLToPath2 } from "url";
63831
+ function resolveOwnVersionFrom(startDir) {
63832
+ let dir = startDir;
63833
+ for (let depth = 0; depth < MAX_WALK_DEPTH; depth++) {
63834
+ const candidate = join7(dir, "package.json");
63835
+ let pkg;
63836
+ try {
63837
+ pkg = JSON.parse(readFileSync3(candidate, "utf8"));
63838
+ } catch {
63839
+ pkg = void 0;
63840
+ }
63841
+ if (pkg && typeof pkg.name === "string" && OWN_PACKAGE_NAME.test(pkg.name)) {
63842
+ if (typeof pkg.version === "string" && pkg.version.length > 0) return pkg.version;
63843
+ reportUnresolved(`found ${pkg.name} at ${candidate} but it declares no version`);
63844
+ return UNRESOLVED_VERSION;
63845
+ }
63846
+ const parent = dirname4(dir);
63847
+ if (parent === dir) break;
63848
+ dir = parent;
63849
+ }
63850
+ reportUnresolved(`no package.json matching ${OWN_PACKAGE_NAME} within ${MAX_WALK_DEPTH} levels`);
63851
+ return UNRESOLVED_VERSION;
63852
+ }
63853
+ function reportUnresolved(reason) {
63854
+ console.warn(
63855
+ `[renderProvenance] could not resolve the engine version (${reason}); stamping ${PROVENANCE_VERSION_TAG}="${UNRESOLVED_VERSION}". This is a lookup failure, not a version - do not treat it as one.`
63856
+ );
63857
+ }
63812
63858
  function readEngineVersion() {
63813
63859
  try {
63814
- const version2 = createRequire(import.meta.url)("../../package.json").version;
63815
- return typeof version2 === "string" && version2.length > 0 ? version2 : UNKNOWN_VERSION;
63860
+ return resolveOwnVersionFrom(dirname4(fileURLToPath2(import.meta.url)));
63816
63861
  } catch {
63817
- return UNKNOWN_VERSION;
63862
+ reportUnresolved("import.meta.url is not a file URL");
63863
+ return UNRESOLVED_VERSION;
63818
63864
  }
63819
63865
  }
63820
63866
  function isMovFamilyContainer(outputPath) {
@@ -63841,7 +63887,7 @@ function readRenderProvenance(tags) {
63841
63887
  if (renderer === "") return null;
63842
63888
  return { renderer, version: readTagCI(tags, PROVENANCE_VERSION_TAG) };
63843
63889
  }
63844
- var PROVENANCE_RENDERER_TAG, PROVENANCE_VERSION_TAG, PROVENANCE_RENDERER_NAME, UNKNOWN_VERSION, PROVENANCE_VERSION;
63890
+ var PROVENANCE_RENDERER_TAG, PROVENANCE_VERSION_TAG, PROVENANCE_RENDERER_NAME, UNRESOLVED_VERSION, OWN_PACKAGE_NAME, MAX_WALK_DEPTH, PROVENANCE_VERSION;
63845
63891
  var init_renderProvenance = __esm({
63846
63892
  "../engine/src/utils/renderProvenance.ts"() {
63847
63893
  "use strict";
@@ -63849,7 +63895,9 @@ var init_renderProvenance = __esm({
63849
63895
  PROVENANCE_RENDERER_TAG = "hyperframes_renderer";
63850
63896
  PROVENANCE_VERSION_TAG = "hyperframes_version";
63851
63897
  PROVENANCE_RENDERER_NAME = "hyperframes";
63852
- UNKNOWN_VERSION = "0.0.0-dev";
63898
+ UNRESOLVED_VERSION = "unresolved";
63899
+ OWN_PACKAGE_NAME = /^(?:hyperframes|@hyperframes\/[^/]+)$/;
63900
+ MAX_WALK_DEPTH = 12;
63853
63901
  PROVENANCE_VERSION = readEngineVersion();
63854
63902
  }
63855
63903
  });
@@ -63863,13 +63911,13 @@ import {
63863
63911
  mkdirSync as mkdirSync2,
63864
63912
  mkdtempSync,
63865
63913
  openSync,
63866
- readFileSync as readFileSync3,
63914
+ readFileSync as readFileSync4,
63867
63915
  readdirSync as readdirSync2,
63868
63916
  statSync as statSync2,
63869
63917
  writeFileSync as writeFileSync2,
63870
63918
  writeSync
63871
63919
  } from "fs";
63872
- import { join as join7, dirname as dirname4, extname } from "path";
63920
+ import { join as join8, dirname as dirname5, extname } from "path";
63873
63921
  function appendEncodeTimeoutMessage(error, timedOut, timeoutMs) {
63874
63922
  if (!timedOut) return error;
63875
63923
  return `${error}
@@ -64110,7 +64158,7 @@ function buildEncoderArgs(options, inputArgs, outputPath, gpuEncoder = null) {
64110
64158
  }
64111
64159
  async function encodeFramesFromDir(framesDir, framePattern, outputPath, options, signal, config) {
64112
64160
  const startTime = Date.now();
64113
- const outputDir = dirname4(outputPath);
64161
+ const outputDir = dirname5(outputPath);
64114
64162
  if (!existsSync6(outputDir)) mkdirSync2(outputDir, { recursive: true });
64115
64163
  const files = readdirSync2(framesDir).filter((f) => f.match(/\.(jpg|jpeg|png)$/i));
64116
64164
  const frameCount = files.length;
@@ -64128,7 +64176,7 @@ async function encodeFramesFromDir(framesDir, framePattern, outputPath, options,
64128
64176
  if (options.useGpu) {
64129
64177
  gpuEncoder = await getCachedGpuEncoder();
64130
64178
  }
64131
- const inputPath = join7(framesDir, framePattern);
64179
+ const inputPath = join8(framesDir, framePattern);
64132
64180
  const inputArgs = ["-framerate", fpsToFfmpegArg(options.fps), "-i", inputPath];
64133
64181
  const args = buildEncoderArgs(options, inputArgs, outputPath, gpuEncoder);
64134
64182
  const encodeTimeout = config?.ffmpegEncodeTimeout ?? DEFAULT_CONFIG.ffmpegEncodeTimeout;
@@ -64175,7 +64223,7 @@ function buildConcatArgs(concatListPath, outputPath) {
64175
64223
  }
64176
64224
  function writeConcatList(dir, inputPaths) {
64177
64225
  concatListSeq += 1;
64178
- const listPath = join7(dir, `concat-list-${process.pid}-${concatListSeq}.txt`);
64226
+ const listPath = join8(dir, `concat-list-${process.pid}-${concatListSeq}.txt`);
64179
64227
  const body = inputPaths.map((p) => `file '${p.replace(/'/g, "'\\''")}'`).join("\n");
64180
64228
  writeFileSync2(listPath, body, "utf-8");
64181
64229
  return listPath;
@@ -64185,8 +64233,8 @@ async function concatVideoFiles(inputPaths, outputPath, signal, config) {
64185
64233
  if (firstInput === void 0) {
64186
64234
  return { success: false, error: "concatVideoFiles: no inputs", externalInterruption: false };
64187
64235
  }
64188
- mkdirSync2(dirname4(outputPath), { recursive: true });
64189
- const listPath = writeConcatList(dirname4(firstInput), inputPaths);
64236
+ mkdirSync2(dirname5(outputPath), { recursive: true });
64237
+ const listPath = writeConcatList(dirname5(firstInput), inputPaths);
64190
64238
  const encodeTimeout = config?.ffmpegEncodeTimeout ?? DEFAULT_CONFIG.ffmpegEncodeTimeout;
64191
64239
  const result = await runFfmpeg(buildConcatArgs(listPath, outputPath), {
64192
64240
  signal,
@@ -64218,8 +64266,8 @@ async function encodeFramesChunkedConcat(framesDir, framePattern, outputPath, op
64218
64266
  }
64219
64267
  const chunkSize = Math.max(30, Math.floor(chunkSizeFrames));
64220
64268
  const chunkCount = Math.ceil(files.length / chunkSize);
64221
- mkdirSync2(dirname4(outputPath), { recursive: true });
64222
- const chunkDir = mkdtempSync(join7(dirname4(outputPath), "chunk-encode-"));
64269
+ mkdirSync2(dirname5(outputPath), { recursive: true });
64270
+ const chunkDir = mkdtempSync(join8(dirname5(outputPath), "chunk-encode-"));
64223
64271
  const chunkPaths = [];
64224
64272
  for (let i = 0; i < chunkCount; i++) {
64225
64273
  if (signal?.aborted) {
@@ -64235,8 +64283,8 @@ async function encodeFramesChunkedConcat(framesDir, framePattern, outputPath, op
64235
64283
  const startNumber = i * chunkSize;
64236
64284
  const framesInChunk = Math.min(chunkSize, files.length - startNumber);
64237
64285
  const ext = outputPath.endsWith(".webm") ? ".webm" : outputPath.endsWith(".mov") ? ".mov" : ".mp4";
64238
- const chunkPath = join7(chunkDir, `chunk_${String(i).padStart(4, "0")}${ext}`);
64239
- const inputPath = join7(framesDir, framePattern);
64286
+ const chunkPath = join8(chunkDir, `chunk_${String(i).padStart(4, "0")}${ext}`);
64287
+ const inputPath = join8(framesDir, framePattern);
64240
64288
  const inputArgs = [
64241
64289
  "-framerate",
64242
64290
  fpsToFfmpegArg(options.fps),
@@ -64295,7 +64343,7 @@ async function encodeFramesChunkedConcat(framesDir, framePattern, outputPath, op
64295
64343
  };
64296
64344
  }
64297
64345
  async function muxVideoWithAudio(videoPath, audioPath, outputPath, signal, config, fps) {
64298
- const outputDir = dirname4(outputPath);
64346
+ const outputDir = dirname5(outputPath);
64299
64347
  if (!existsSync6(outputDir)) mkdirSync2(outputDir, { recursive: true });
64300
64348
  const isWebm = outputPath.endsWith(".webm");
64301
64349
  const isMov = outputPath.endsWith(".mov");
@@ -64384,14 +64432,14 @@ async function packageHls(videoPath, audioPath, outputDir, options) {
64384
64432
  "-master_pl_name",
64385
64433
  HLS_MASTER_PLAYLIST,
64386
64434
  "-hls_segment_filename",
64387
- join7(outputDir, "%v_%05d.ts"),
64435
+ join8(outputDir, "%v_%05d.ts"),
64388
64436
  // Without these the mpegts muxer starts the stream at PTS 1.4 s.
64389
64437
  "-muxdelay",
64390
64438
  "0",
64391
64439
  "-muxpreload",
64392
64440
  "0"
64393
64441
  );
64394
- args.push("-y", join7(outputDir, "%v.m3u8"));
64442
+ args.push("-y", join8(outputDir, "%v.m3u8"));
64395
64443
  const processTimeout = options.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
64396
64444
  const result = await runFfmpeg(args, { signal, timeout: processTimeout });
64397
64445
  if (signal?.aborted) {
@@ -64403,7 +64451,7 @@ async function packageHls(videoPath, audioPath, outputDir, options) {
64403
64451
  };
64404
64452
  }
64405
64453
  if (result.success && hasAudio) {
64406
- const masterPath = join7(outputDir, HLS_MASTER_PLAYLIST);
64454
+ const masterPath = join8(outputDir, HLS_MASTER_PLAYLIST);
64407
64455
  let master;
64408
64456
  try {
64409
64457
  master = openSync(masterPath, "r+", 384);
@@ -64412,7 +64460,7 @@ async function packageHls(videoPath, audioPath, outputDir, options) {
64412
64460
  }
64413
64461
  if (master !== void 0) {
64414
64462
  try {
64415
- const stripped = stripAudioOnlyVariants(readFileSync3(master, "utf-8"));
64463
+ const stripped = stripAudioOnlyVariants(readFileSync4(master, "utf-8"));
64416
64464
  ftruncateSync(master, 0);
64417
64465
  writeSync(master, stripped, 0, "utf-8");
64418
64466
  } finally {
@@ -64546,7 +64594,7 @@ var init_jpegInput = __esm({
64546
64594
  import { spawn as spawn4 } from "child_process";
64547
64595
  import { once } from "events";
64548
64596
  import { existsSync as existsSync7, mkdirSync as mkdirSync3, statSync as statSync3 } from "fs";
64549
- import { dirname as dirname5 } from "path";
64597
+ import { dirname as dirname6 } from "path";
64550
64598
  function createFrameReorderBuffer(startFrame, endFrame) {
64551
64599
  let cursor = startFrame;
64552
64600
  let aborted = null;
@@ -64788,7 +64836,7 @@ function buildStreamingArgs(options, outputPath, gpuEncoder = null) {
64788
64836
  return args;
64789
64837
  }
64790
64838
  async function spawnStreamingEncoder(outputPath, options, signal, config) {
64791
- const outputDir = dirname5(outputPath);
64839
+ const outputDir = dirname6(outputPath);
64792
64840
  if (!existsSync7(outputDir)) mkdirSync3(outputDir, { recursive: true });
64793
64841
  let gpuEncoder = null;
64794
64842
  if (options.useGpu) {
@@ -64950,7 +64998,7 @@ var init_streamingEncoder = __esm({
64950
64998
 
64951
64999
  // ../parsers/dist/assetResolution.js
64952
65000
  import { existsSync as existsSync8 } from "fs";
64953
- import { isAbsolute, join as join8, posix as posix2, relative, resolve as resolve5, sep as sep2 } from "path";
65001
+ import { isAbsolute, join as join9, posix as posix2, relative, resolve as resolve5, sep as sep2 } from "path";
64954
65002
  function decodeUrlPathVariants2(path) {
64955
65003
  const variants = [path];
64956
65004
  try {
@@ -64976,11 +65024,11 @@ function isWithinProjectRoot(projectDir, candidate, pathModule = { resolve: reso
64976
65024
  }
64977
65025
  function reanchoredCandidates(variant, baseDir, compiledDir) {
64978
65026
  const baseAbs = resolve5(baseDir);
64979
- const joinedAbs = resolve5(join8(baseDir, variant));
65027
+ const joinedAbs = resolve5(join9(baseDir, variant));
64980
65028
  if (joinedAbs === baseAbs || joinedAbs.startsWith(baseAbs + sep2)) return [];
64981
65029
  const stripped = posix2.normalize(variant.replace(/\\/g, "/")).replace(/^(\.\.\/)+/, "");
64982
65030
  if (!stripped || stripped === variant || stripped.startsWith("..")) return [];
64983
- return compiledDir ? [join8(compiledDir, stripped), join8(baseDir, stripped)] : [join8(baseDir, stripped)];
65031
+ return compiledDir ? [join9(compiledDir, stripped), join9(baseDir, stripped)] : [join9(baseDir, stripped)];
64984
65032
  }
64985
65033
  function resolveProjectRelativeSrc(src, baseDir, compiledDir) {
64986
65034
  const cleanSrc = cleanAssetUrl(src);
@@ -64990,10 +65038,10 @@ function resolveProjectRelativeSrc(src, baseDir, compiledDir) {
64990
65038
  for (const candidate of reanchoredCandidates(variant, baseDir, compiledDir)) {
64991
65039
  candidates.add(candidate);
64992
65040
  }
64993
- if (compiledDir) candidates.add(join8(compiledDir, variant));
64994
- candidates.add(join8(baseDir, variant));
65041
+ if (compiledDir) candidates.add(join9(compiledDir, variant));
65042
+ candidates.add(join9(baseDir, variant));
64995
65043
  }
64996
- return [...candidates].find(existsSync8) ?? join8(baseDir, cleanSrc);
65044
+ return [...candidates].find(existsSync8) ?? join9(baseDir, cleanSrc);
64997
65045
  }
64998
65046
  var init_assetResolution = __esm({
64999
65047
  "../parsers/dist/assetResolution.js"() {
@@ -65087,7 +65135,7 @@ import {
65087
65135
  } from "fs";
65088
65136
  import { createHash, randomUUID } from "crypto";
65089
65137
  import { BlockList, isIP } from "net";
65090
- import { dirname as dirname6, extname as extname2, join as join9 } from "path";
65138
+ import { dirname as dirname7, extname as extname2, join as join10 } from "path";
65091
65139
  import { Readable, Transform } from "stream";
65092
65140
  import { pipeline } from "stream/promises";
65093
65141
  function signalScopeKey(signal) {
@@ -65222,7 +65270,7 @@ function removeCacheLockDirectoryIfEmpty(lockPath) {
65222
65270
  }
65223
65271
  function releaseOwnedCachePathLock(lockPath, owner) {
65224
65272
  try {
65225
- rmdirSync(join9(lockPath, owner));
65273
+ rmdirSync(join10(lockPath, owner));
65226
65274
  } catch (error) {
65227
65275
  if (error.code === "ENOENT") return;
65228
65276
  throw error;
@@ -65263,12 +65311,12 @@ async function acquireCachePathLock(localPath, timeoutMs, signal) {
65263
65311
  if (createdLock) {
65264
65312
  const owner = `${CACHE_LOCK_OWNER_PREFIX}${randomUUID()}`;
65265
65313
  try {
65266
- mkdirSync4(join9(lockPath, owner));
65314
+ mkdirSync4(join10(lockPath, owner));
65267
65315
  const entries2 = readdirSync3(lockPath);
65268
65316
  if (entries2.length === 1 && entries2[0] === owner) {
65269
65317
  return () => releaseOwnedCachePathLock(lockPath, owner);
65270
65318
  }
65271
- rmdirSync(join9(lockPath, owner));
65319
+ rmdirSync(join10(lockPath, owner));
65272
65320
  removeCacheLockDirectoryIfEmpty(lockPath);
65273
65321
  continue;
65274
65322
  } catch (error) {
@@ -65286,7 +65334,7 @@ async function acquireCachePathLock(localPath, timeoutMs, signal) {
65286
65334
  if (Date.now() - observedLock.stats.mtimeMs > CACHE_LOCK_STALE_MS) {
65287
65335
  if (observedLock.owner) {
65288
65336
  try {
65289
- rmdirSync(join9(lockPath, observedLock.owner));
65337
+ rmdirSync(join10(lockPath, observedLock.owner));
65290
65338
  } catch (error) {
65291
65339
  if (error.code === "ENOENT") continue;
65292
65340
  throw error;
@@ -65294,7 +65342,7 @@ async function acquireCachePathLock(localPath, timeoutMs, signal) {
65294
65342
  removeCacheLockDirectoryIfEmpty(lockPath);
65295
65343
  continue;
65296
65344
  }
65297
- const reclaimPath = join9(lockPath, CACHE_LOCK_RECLAIM_NAME);
65345
+ const reclaimPath = join10(lockPath, CACHE_LOCK_RECLAIM_NAME);
65298
65346
  try {
65299
65347
  mkdirSync4(reclaimPath);
65300
65348
  } catch (error) {
@@ -65732,8 +65780,8 @@ function emitDownloadTelemetry(options, event) {
65732
65780
  }
65733
65781
  }
65734
65782
  async function runDownloadAttempt(url, localPath, timeoutMs, attempt, options, signal) {
65735
- const attemptDir = mkdtempSync2(join9(dirname6(localPath), ".hf-download-"));
65736
- const partialPath = join9(attemptDir, "payload");
65783
+ const attemptDir = mkdtempSync2(join10(dirname7(localPath), ".hf-download-"));
65784
+ const partialPath = join10(attemptDir, "payload");
65737
65785
  const controller = new AbortController();
65738
65786
  let timedOut = false;
65739
65787
  let callerAborted = signal?.aborted ?? false;
@@ -65969,7 +66017,7 @@ async function downloadToTemp(url, destDir, timeoutMs = 3e5, signal, onTransient
65969
66017
  mkdirSync4(destDir, { recursive: true });
65970
66018
  }
65971
66019
  const filename = getFilenameFromUrl(url, validationScope);
65972
- const localPath = join9(destDir, filename);
66020
+ const localPath = join10(destDir, filename);
65973
66021
  const downloadPromise = (async () => {
65974
66022
  const cacheStartedAt = Date.now();
65975
66023
  const reused = await reuseOrInvalidateCachedFile(
@@ -74067,6 +74115,80 @@ function rootClassStyledSelectors(styles, rootClasses) {
74067
74115
  }
74068
74116
  return offenders;
74069
74117
  }
74118
+ function isIdentityZoom(rawValue) {
74119
+ const value = rawValue.trim().replace(/!\s*important\s*$/i, "").trim().toLowerCase();
74120
+ return value === "" || value === "normal" || value === "unset" || value === "initial" || value === "revert" || value === "1" || value === "1.0" || value === "100%";
74121
+ }
74122
+ function firstRescalingZoom(css) {
74123
+ ZOOM_DECLARATION.lastIndex = 0;
74124
+ let match;
74125
+ while ((match = ZOOM_DECLARATION.exec(css)) !== null) {
74126
+ const value = (match[1] ?? "").trim();
74127
+ if (!isIdentityZoom(value)) return value.replace(/!\s*important\s*$/i, "").trim();
74128
+ }
74129
+ return null;
74130
+ }
74131
+ function targetsCanvasRoot(selector, rootId, rootClasses) {
74132
+ const leftmost = selector.trim().split(/[\s>+~]+/)[0] ?? "";
74133
+ const bare = leftmost.toLowerCase();
74134
+ if (bare === "html" || bare === "body" || bare === ":root" || bare === "*") return true;
74135
+ if (rootId && leftmostCompoundId(selector) === rootId) return true;
74136
+ return leftmostCompoundClasses(selector).some((cls) => rootClasses.includes(cls));
74137
+ }
74138
+ function inlineCanvasZoomHits(rootTag, tags) {
74139
+ const hits = [];
74140
+ const htmlTag = findHtmlTag(tags);
74141
+ const bodyTag = tags.find((tag) => tag.name.toLowerCase() === "body");
74142
+ for (const [label, tag] of [
74143
+ ["the root element's inline style", rootTag],
74144
+ ["<html>'s inline style", htmlTag],
74145
+ ["<body>'s inline style", bodyTag]
74146
+ ]) {
74147
+ if (!tag) continue;
74148
+ const inline = readAttr(tag.raw, "style");
74149
+ const value = inline ? firstRescalingZoom(inline) : null;
74150
+ if (value) hits.push({ where: label, value, snippet: truncateSnippet(tag.raw) });
74151
+ }
74152
+ return hits;
74153
+ }
74154
+ function firstCanvasSelector(header, rootId, rootClasses) {
74155
+ for (const selector of header.split(",")) {
74156
+ const trimmed = selector.trim();
74157
+ if (trimmed && targetsCanvasRoot(trimmed, rootId, rootClasses)) return trimmed;
74158
+ }
74159
+ return null;
74160
+ }
74161
+ function canvasZoomInRule(header, body, rootId, rootClasses) {
74162
+ const trimmedHeader = header.trim();
74163
+ if (!trimmedHeader || trimmedHeader.startsWith("@")) return null;
74164
+ const value = firstRescalingZoom(body);
74165
+ if (!value) return null;
74166
+ const selector = firstCanvasSelector(trimmedHeader, rootId, rootClasses);
74167
+ if (!selector) return null;
74168
+ return {
74169
+ where: `\`${selector}\``,
74170
+ value,
74171
+ snippet: truncateSnippet(`${selector} { zoom: ${value} }`)
74172
+ };
74173
+ }
74174
+ function stylesheetCanvasZoomHits(styles, rootId, rootClasses) {
74175
+ const hits = [];
74176
+ for (const style of styles) {
74177
+ const ruleWithBody = /([^{}]+)\{([^{}]*)\}/g;
74178
+ let match;
74179
+ while ((match = ruleWithBody.exec(stripCssComments(style.content))) !== null) {
74180
+ const hit = canvasZoomInRule(match[1] ?? "", match[2] ?? "", rootId, rootClasses);
74181
+ if (hit) hits.push(hit);
74182
+ }
74183
+ }
74184
+ return hits;
74185
+ }
74186
+ function canvasZoomHits(rootTag, tags, styles, rootId, rootClasses) {
74187
+ return [
74188
+ ...inlineCanvasZoomHits(rootTag, tags),
74189
+ ...stylesheetCanvasZoomHits(styles, rootId, rootClasses)
74190
+ ];
74191
+ }
74070
74192
  function collectDeclaredVariableIds(htmlTagRaw) {
74071
74193
  const declared = /* @__PURE__ */ new Set();
74072
74194
  const raw = readJsonAttr(htmlTagRaw, "data-composition-variables");
@@ -74105,6 +74227,28 @@ function isInsideInertTemplate(tag, tags) {
74105
74227
  (candidate) => candidate.name === "template" && candidate.closeIndex != null && tag.index > candidate.index && tag.index < candidate.closeIndex
74106
74228
  );
74107
74229
  }
74230
+ function cssOwnerSelector(content, matchIndex) {
74231
+ const blockStart = content.lastIndexOf("{", matchIndex);
74232
+ if (blockStart === -1) return void 0;
74233
+ const previousBlockEnd = content.lastIndexOf("}", blockStart);
74234
+ const lines = content.slice(previousBlockEnd + 1, blockStart).trim().split("\n");
74235
+ return lines[lines.length - 1]?.trim() || void 0;
74236
+ }
74237
+ function elementSelector(tag) {
74238
+ const elementId = readAttr(tag.raw, "id");
74239
+ return elementId ? `#${elementId}` : void 0;
74240
+ }
74241
+ function negativeZIndexFinding(match, selector) {
74242
+ const level = match[1] ?? "";
74243
+ return {
74244
+ code: "negative_z_index",
74245
+ severity: "warning",
74246
+ ...selector ? { selector } : {},
74247
+ message: `\`z-index: -${level}\` paints the element behind its nearest stacking context's own content. With no stacking-context ancestor that context is the composition root itself, so an opaque background there hides it entirely: in the DOM, laid out, and absent from the picture. A transparent root leaves it visible. Siblings at \`z-index: 0\` or above are unaffected.`,
74248
+ fixHint: "Give the element's parent a stacking context - `isolation: isolate` is the cheapest, and `transform`, `filter`, `opacity` below 1, `contain: paint` and `will-change` all work too. The negative-z child then paints above that parent's background and renders normally. Or express paint order through DOM order - an earlier sibling paints behind a later one - and raise the elements that should sit in front rather than lowering this one.",
74249
+ snippet: truncateSnippet(match[0])
74250
+ };
74251
+ }
74108
74252
  function deriveDurationFromClips(tags, rootTag) {
74109
74253
  const clipEnds = [];
74110
74254
  for (const tag of tags) {
@@ -75180,7 +75324,7 @@ async function lintHyperframeHtml(html, options = {}) {
75180
75324
  timings: { totalMs: performance.now() - startedAt, ...timings }
75181
75325
  };
75182
75326
  }
75183
- var import_postcss_selector_parser, COMPOSITION_ID_IN_CSS_PATTERN, TIMELINE_REGISTRY_INIT_PATTERN, TIMELINE_REGISTRY_OBJECT_LITERAL_PATTERN, TIMELINE_REGISTRY_ASSIGN_PATTERN, WINDOW_TIMELINE_ASSIGN_PATTERN, INVALID_SCRIPT_CLOSE_PATTERN, TIMELINE_REGISTRY_KEY_PATTERN, TIMELINE_REGISTRY_OBJECT_OPEN_PATTERN, TIMELINE_REGISTRY_OBJECT_ENTRY_PATTERN, REGEX_ALLOWED_BEFORE, REGEX_ALLOWED_KEYWORDS, WORD_CHAR, CodeContext, VISIBLE_MARKUP_COMMENT_PATTERN, VISIBLE_MARKUP_COMMENT_PROTECTED_BLOCK_PATTERN, coreRules, IMAGE_SRC_EXT, VIDEO_SRC_EXT, AUDIO_SRC_EXT, SRC_KIND_NOUN, mediaRules, AUDIO_GROUP_TIMING_ATTRS, callIndexes, MAX_COMPOSITION_LINES, MAX_TIMED_ELEMENTS_PER_TRACK, TRACK_DENSITY_EXEMPT_TAGS, CAPTION_CUE_TOKEN, HEAVY_OVERLAY_ELEMENT_COUNT_WARN, HEAVY_OVERLAY_EXEMPT_TAGS, HEAVY_OVERLAY_CSS_PATTERN, INLINE_STYLE_DISPLAY_NONE_PATTERN, compositionRules, CLIP_MEDIA_TAGS, SCENE_BOUNDARY_EPSILON_SECONDS, UNRESOLVED_TARGET, gsapWindowsCache, CONFLICTING_TRANSLATE_PROPS, CONFLICTING_SCALE_PROPS, RELATIVE_TWEEN_VALUE, TRANSFORM_SENSITIVE_READ, TRANSFORM_INVARIANT_READ, CALLBACK_MEASUREMENT_PATTERN, NUMBER_METHODS, gsapRules, captionRules, adapterRules, TEXTURE_BASE_CLASS, TEXTURE_CLASS_PREFIX, textureRules, GENERIC_FAMILIES, fontRules, slideshowRules, INLINE_TEXT_TAGS, OPAQUE_TAGS, NON_LAYOUT_TAGS, MEDIA_TAGS2, NODE_ATTRS, describe, structureRules, RULE_GROUPS, LINT_RULE_COUNT, LINT_RULE_GROUP_COUNTS;
75327
+ var import_postcss_selector_parser, COMPOSITION_ID_IN_CSS_PATTERN, TIMELINE_REGISTRY_INIT_PATTERN, TIMELINE_REGISTRY_OBJECT_LITERAL_PATTERN, TIMELINE_REGISTRY_ASSIGN_PATTERN, WINDOW_TIMELINE_ASSIGN_PATTERN, INVALID_SCRIPT_CLOSE_PATTERN, TIMELINE_REGISTRY_KEY_PATTERN, TIMELINE_REGISTRY_OBJECT_OPEN_PATTERN, TIMELINE_REGISTRY_OBJECT_ENTRY_PATTERN, REGEX_ALLOWED_BEFORE, REGEX_ALLOWED_KEYWORDS, WORD_CHAR, CodeContext, VISIBLE_MARKUP_COMMENT_PATTERN, VISIBLE_MARKUP_COMMENT_PROTECTED_BLOCK_PATTERN, coreRules, IMAGE_SRC_EXT, VIDEO_SRC_EXT, AUDIO_SRC_EXT, SRC_KIND_NOUN, mediaRules, AUDIO_GROUP_TIMING_ATTRS, callIndexes, INSPECTION_VIEWPORT_CAP, MAX_COMPOSITION_LINES, MAX_TIMED_ELEMENTS_PER_TRACK, TRACK_DENSITY_EXEMPT_TAGS, CAPTION_CUE_TOKEN, HEAVY_OVERLAY_ELEMENT_COUNT_WARN, HEAVY_OVERLAY_EXEMPT_TAGS, HEAVY_OVERLAY_CSS_PATTERN, INLINE_STYLE_DISPLAY_NONE_PATTERN, ZOOM_DECLARATION, NEGATIVE_Z_INDEX, compositionRules, CLIP_MEDIA_TAGS, SCENE_BOUNDARY_EPSILON_SECONDS, UNRESOLVED_TARGET, gsapWindowsCache, CONFLICTING_TRANSLATE_PROPS, CONFLICTING_SCALE_PROPS, RELATIVE_TWEEN_VALUE, TRANSFORM_SENSITIVE_READ, TRANSFORM_INVARIANT_READ, CALLBACK_MEASUREMENT_PATTERN, NUMBER_METHODS, gsapRules, captionRules, adapterRules, TEXTURE_BASE_CLASS, TEXTURE_CLASS_PREFIX, textureRules, GENERIC_FAMILIES, fontRules, slideshowRules, INLINE_TEXT_TAGS, OPAQUE_TAGS, NON_LAYOUT_TAGS, MEDIA_TAGS2, NODE_ATTRS, describe, structureRules, RULE_GROUPS, LINT_RULE_COUNT, LINT_RULE_GROUP_COUNTS;
75184
75328
  var init_dist3 = __esm({
75185
75329
  "../lint/dist/index.js"() {
75186
75330
  "use strict";
@@ -76061,6 +76205,7 @@ var init_dist3 = __esm({
76061
76205
  ];
76062
76206
  AUDIO_GROUP_TIMING_ATTRS = ["data-start", "data-duration", "data-track-index"];
76063
76207
  callIndexes = /* @__PURE__ */ new WeakMap();
76208
+ INSPECTION_VIEWPORT_CAP = 4096;
76064
76209
  MAX_COMPOSITION_LINES = 300;
76065
76210
  MAX_TIMED_ELEMENTS_PER_TRACK = 3;
76066
76211
  TRACK_DENSITY_EXEMPT_TAGS = /* @__PURE__ */ new Set(["audio", "script", "style", "video"]);
@@ -76086,6 +76231,8 @@ var init_dist3 = __esm({
76086
76231
  ]);
76087
76232
  HEAVY_OVERLAY_CSS_PATTERN = /(?:filter\s*:[^;}]*\bblur\s*\()|(?:clip-path\s*:(?!\s*(?:none|inherit|initial|unset)\b)\s*[^;}]+)|(?:radial-gradient\s*\()/i;
76088
76233
  INLINE_STYLE_DISPLAY_NONE_PATTERN = /(?:^|;)\s*display\s*:\s*none\b/i;
76234
+ ZOOM_DECLARATION = /(?<![\w-])zoom\s*:\s*([^;}]+)/gi;
76235
+ NEGATIVE_Z_INDEX = /(?<![\w-])z-index\s*:\s*-(?!0(?:\s*[;}]|\s*$))([\d.]+)/g;
76089
76236
  compositionRules = [
76090
76237
  // duplicate_composition_id catches meta-tag/root collisions that create duplicate composition entries.
76091
76238
  ({ tags }) => {
@@ -76376,6 +76523,59 @@ var init_dist3 = __esm({
76376
76523
  }
76377
76524
  ];
76378
76525
  },
76526
+ // negative_z_index
76527
+ // An element at a negative z-index is silently absent from both `snapshot`
76528
+ // and `render`, while siblings differing only in the sign of z-index render
76529
+ // exactly (heygen-com/hyperframes#4366). lint, validate and render all exit 0
76530
+ // and report nothing, so the first suspicion falls on the author's own CSS.
76531
+ // NOT A RENDERER DEFECT -- ORDINARY CSS PAINTING ORDER, measured at 0.8.72.
76532
+ // The element is PAINTED; it is simply painted beneath something opaque. Remove
76533
+ // every opaque background above it and the same `z-index: -1` band renders at
76534
+ // full coverage, identically to the same band with `z-index` deleted. A negative-z
76535
+ // descendant paints at step 2 of its nearest stacking context -- above that
76536
+ // context root's own background, but below the context's positioned in-flow
76537
+ // content -- so a `position: relative` composition root with an opaque background
76538
+ // paints over it. That is the shape #4366 reports; nothing is dropped and the
76539
+ // renderer has no say in it.
76540
+ //
76541
+ // Kept as a warning because authors hit it and nothing explains why: the element
76542
+ // is in the DOM, laid out, and invisible. The message therefore names the CAUSE
76543
+ // and the remedy rather than implying the tool failed.
76544
+ //
76545
+ // THE CONDITION IS LOAD-BEARING AND THE MESSAGE STATES IT. The element is only
76546
+ // dropped when its nearest ancestor stacking context is the composition root,
76547
+ // which is the shape #4366 reports. Give any ancestor a stacking context and it
76548
+ // renders correctly: measured at 0.8.72 on ONE frame carrying the same
76549
+ // `z-index: -1` band under six triggers -- isolation:isolate, transform,
76550
+ // opacity below 1, filter, contain:paint, will-change -- all six PRESENT at full
76551
+ // coverage, against the no-stacking-context control ABSENT at zero coverage.
76552
+ // That is ordinary CSS painting order: a negative-z child paints above its
76553
+ // stacking context root's own background, so only the root case is hidden.
76554
+ //
76555
+ // This rule matches CSS TEXT and does not resolve the cascade, so it cannot know
76556
+ // whether an ancestor forms a stacking context and fires on both shapes. That is
76557
+ // why the message is CONDITIONAL rather than an assertion of absence: an
76558
+ // unconditional "silently dropped" is false for every isolated case, and a lint
76559
+ // message that overclaims is how authors learn to disregard the rule.
76560
+ ({ tags, styles }) => {
76561
+ const findings = [];
76562
+ for (const style of styles) {
76563
+ const content = stripCssComments(style.content);
76564
+ NEGATIVE_Z_INDEX.lastIndex = 0;
76565
+ let match;
76566
+ while ((match = NEGATIVE_Z_INDEX.exec(content)) !== null) {
76567
+ findings.push(negativeZIndexFinding(match, cssOwnerSelector(content, match.index)));
76568
+ }
76569
+ }
76570
+ for (const tag of tags) {
76571
+ const inline = readAttr(tag.raw, "style");
76572
+ if (!inline) continue;
76573
+ NEGATIVE_Z_INDEX.lastIndex = 0;
76574
+ const match = NEGATIVE_Z_INDEX.exec(inline);
76575
+ if (match) findings.push(negativeZIndexFinding(match, elementSelector(tag)));
76576
+ }
76577
+ return findings;
76578
+ },
76379
76579
  // requestanimationframe_in_composition
76380
76580
  ({ scripts, rawSource, options }) => {
76381
76581
  if (isRegistrySourceFile(options.filePath) || isRegistryInstalledFile(rawSource)) return [];
@@ -76795,6 +76995,96 @@ ${allInlineStyles}`.replace(/\/\*[\s\S]*?\*\//g, "");
76795
76995
  fixHint: `${splitTarget} and concat the pieces (FFmpeg or the runtime's slideshow) so each capture only sees a small subset of heavy overlays at once. Even hidden overlays (opacity:0 / visibility:hidden) contribute \u2014 either remove truly unused ones from the source or scope them into their own per-transition sub-composition. If an overlay is genuinely inert for the whole clip, use display:none so it never enters the render tree. Field ref ts=1784040753 (#hyperframes-cli-feedback).`
76796
76996
  }
76797
76997
  ];
76998
+ },
76999
+ // root_zoom_rescales_a_fixed_canvas
77000
+ //
77001
+ // The capture frame is sized from the root's data-width/data-height, which are
77002
+ // LAYOUT pixels. CSS `zoom` on the canvas itself (the root, or html/body above
77003
+ // it) rescales the painted content inside that frame without changing the frame,
77004
+ // so the two disagree and the author gets neither of the two things they might
77005
+ // have meant.
77006
+ //
77007
+ // Measured at 0.8.71 on an 800x400 composition holding two 100x100 boxes at
77008
+ // left:100 and left:600, rendered to a PNG sequence and the boxes located by
77009
+ // colour:
77010
+ //
77011
+ // root zoom:0.5 canvas stays 800x400; boxes paint at (50,25) and (300,25),
77012
+ // each 50x50 -- the composition occupies the top-left quarter
77013
+ // and the rest of every frame is dead space.
77014
+ // root zoom:2 canvas stays 800x400; the left:100 box paints at (200,100)
77015
+ // at 200x200, and the left:600 box renders ZERO PIXELS --
77016
+ // scaled to x=1200, outside a frame that is still 800 wide.
77017
+ //
77018
+ // The second case is the one worth an error: content that is inside the declared
77019
+ // composition silently does not exist in the output, with nothing else in lint,
77020
+ // check or the render log naming it.
77021
+ //
77022
+ // Deliberately NOT flagged: `zoom` on a descendant. Measured in the same run --
77023
+ // a child at left:100 with zoom:2 paints at (200,100) at 200x200, which is
77024
+ // exactly what CSS `zoom` specifies. It is honoured, not ignored, so a rule that
77025
+ // fired on every `zoom` would be flagging correct authoring.
77026
+ ({ rootTag, tags, styles }) => {
77027
+ if (!rootTag) return [];
77028
+ const rootId = readAttr(rootTag.raw, "id");
77029
+ const rootClasses = (readAttr(rootTag.raw, "class") || "").split(/\s+/).filter(Boolean);
77030
+ const hits = canvasZoomHits(rootTag, tags, styles, rootId, rootClasses);
77031
+ const hit = hits[0];
77032
+ if (!hit) return [];
77033
+ const enlarging = !hit.value.startsWith("-") && parseFloat(hit.value) > (hit.value.includes("%") ? 100 : 1);
77034
+ return [
77035
+ {
77036
+ code: "root_zoom_rescales_a_fixed_canvas",
77037
+ severity: "error",
77038
+ message: `\`zoom: ${hit.value}\` on ${hit.where} rescales the painted composition inside a frame that does not rescale with it. The capture frame is sized from the root's data-width/data-height in LAYOUT pixels, and \`zoom\` changes only what is painted inside it, so ` + (enlarging ? `content past the frame's edge renders zero pixels \u2014 it is inside the declared composition and absent from the output, with nothing else reporting it.` : `the composition paints into part of the frame and the remainder of every output frame is dead space.`),
77039
+ fixHint: `Author the composition at its real size \u2014 set data-width/data-height (and the root's width/height) to the dimensions you want \u2014 and drop the canvas-level \`zoom\`. To scale the OUTPUT without changing layout, pass \`--output-resolution\` to render, which supersamples. \`zoom\` on descendants is fine and is not flagged: it is honoured exactly as specified.`,
77040
+ snippet: hit.snippet
77041
+ }
77042
+ ];
77043
+ },
77044
+ // composition_exceeds_inspection_viewport_cap
77045
+ //
77046
+ // packages/cli/src/utils/compositionViewport.ts caps a parsed data-width /
77047
+ // data-height at MAX_VIEWPORT_DIMENSION (4096) with a plain Math.min and no
77048
+ // warning. captureCompositionFrame resolves its viewport through that helper,
77049
+ // and check, validate, snapshot, compare and layout all capture through it;
77050
+ // layout and motionShot carry their own independent Math.min(..., 4096).
77051
+ //
77052
+ // `render` does NOT go through it, and that asymmetry is the whole finding.
77053
+ // Measured at 0.8.71 on a 5000x400 composition with 100x100 boxes at left:100
77054
+ // and left:4500:
77055
+ //
77056
+ // render -> 5000x400 output, both boxes present.
77057
+ // snapshot -> 4096x400 frame, the left:4500 box ABSENT.
77058
+ //
77059
+ // So the video is correct and the tools an author would reach for to check it
77060
+ // silently cannot see the last 904 px. The failure direction is the awkward
77061
+ // one: `check` comes back clean on a region it never rendered, and someone
77062
+ // debugging a missing element through `snapshot` chases a difference that
77063
+ // exists only in the instrument.
77064
+ //
77065
+ // A warning, not an error: the deliverable is fine, and a composition wider
77066
+ // than 4096 can be entirely deliberate.
77067
+ ({ rootTag }) => {
77068
+ if (!rootTag) return [];
77069
+ const over = [];
77070
+ for (const attr of ["data-width", "data-height"]) {
77071
+ const raw = readAttr(rootTag.raw, attr);
77072
+ if (!raw) continue;
77073
+ const value = Number.parseInt(raw, 10);
77074
+ if (Number.isFinite(value) && value > INSPECTION_VIEWPORT_CAP) {
77075
+ over.push(`${attr}=${value}`);
77076
+ }
77077
+ }
77078
+ if (over.length === 0) return [];
77079
+ return [
77080
+ {
77081
+ code: "composition_exceeds_inspection_viewport_cap",
77082
+ severity: "warning",
77083
+ message: `${over.join(" and ")} exceeds the ${INSPECTION_VIEWPORT_CAP}px viewport cap that check, validate, snapshot, compare and layout clamp to. render is unaffected and produces the full size, so the video is correct \u2014 but every inspection command captures a ${INSPECTION_VIEWPORT_CAP}px-wide frame, and anything beyond that is missing from what they report. Measured at 0.8.71: a 5000x400 composition renders 5000x400 with all content, while snapshot returns 4096x400 with the element at left:4500 absent.`,
77084
+ fixHint: `Keep the authored size if the output needs it, and verify the region past ${INSPECTION_VIEWPORT_CAP}px from a render rather than from check/snapshot/compare \u2014 a clean inspection result does not cover it. If the large canvas is only there to gain resolution, author at the layout size and pass \`--output-resolution\` to render instead, which supersamples without changing layout.`,
77085
+ snippet: truncateSnippet(rootTag.raw)
77086
+ }
77087
+ ];
76798
77088
  }
76799
77089
  ];
76800
77090
  CLIP_MEDIA_TAGS = /* @__PURE__ */ new Set(["img", "video", "audio"]);
@@ -78907,7 +79197,7 @@ var init_htmlTemplate = __esm({
78907
79197
 
78908
79198
  // ../engine/src/services/extractedFrameIndex.ts
78909
79199
  import { readdirSync as readdirSync4 } from "fs";
78910
- import { join as join10 } from "path";
79200
+ import { join as join11 } from "path";
78911
79201
  function extractedFrameIndex(file, format) {
78912
79202
  const match = new RegExp(`^${FRAME_FILENAME_PREFIX}(\\d+)\\.${format}$`).exec(file);
78913
79203
  if (!match) {
@@ -78930,7 +79220,7 @@ function framePathsFromDirectory(outputDir, format) {
78930
79220
  `Duplicate extracted frame index ${index}: ${indexed.get(index)} and ${file}`
78931
79221
  );
78932
79222
  }
78933
- indexed.set(index, join10(outputDir, file));
79223
+ indexed.set(index, join11(outputDir, file));
78934
79224
  }
78935
79225
  const ordered = /* @__PURE__ */ new Map();
78936
79226
  for (let index = 0; index < indexed.size; index += 1) {
@@ -78971,7 +79261,7 @@ import {
78971
79261
  utimesSync,
78972
79262
  writeFileSync as writeFileSync3
78973
79263
  } from "fs";
78974
- import { join as join11 } from "path";
79264
+ import { join as join12 } from "path";
78975
79265
  function readKeyStat(videoPath) {
78976
79266
  try {
78977
79267
  const stat = statSync5(videoPath);
@@ -79009,8 +79299,8 @@ function hasFrameFiles(dir) {
79009
79299
  }
79010
79300
  function lookupCacheEntry(rootDir, input) {
79011
79301
  const keyHash = computeCacheKey(input);
79012
- const dir = join11(rootDir, cacheEntryDirName(keyHash));
79013
- const complete = existsSync10(join11(dir, COMPLETE_SENTINEL)) && hasFrameFiles(dir);
79302
+ const dir = join12(rootDir, cacheEntryDirName(keyHash));
79303
+ const complete = existsSync10(join12(dir, COMPLETE_SENTINEL)) && hasFrameFiles(dir);
79014
79304
  return { entry: { dir, keyHash }, hit: complete };
79015
79305
  }
79016
79306
  function partialCacheEntryDir(entry) {
@@ -79021,13 +79311,13 @@ function isTargetExistsRenameError(err) {
79021
79311
  return code === "EEXIST" || code === "ENOTEMPTY" || code === "EPERM";
79022
79312
  }
79023
79313
  function adoptPublishedWinner(entry, partialDir) {
79024
- if (!existsSync10(join11(entry.dir, COMPLETE_SENTINEL))) return null;
79314
+ if (!existsSync10(join12(entry.dir, COMPLETE_SENTINEL))) return null;
79025
79315
  removeDir(partialDir);
79026
79316
  return { dir: entry.dir, published: true };
79027
79317
  }
79028
79318
  function publishCacheEntry(entry, partialDir) {
79029
79319
  try {
79030
- writeFileSync3(join11(partialDir, COMPLETE_SENTINEL), "", "utf-8");
79320
+ writeFileSync3(join12(partialDir, COMPLETE_SENTINEL), "", "utf-8");
79031
79321
  } catch {
79032
79322
  return { dir: partialDir, published: false };
79033
79323
  }
@@ -79058,7 +79348,7 @@ function touchCacheDir(dir) {
79058
79348
  } catch {
79059
79349
  }
79060
79350
  try {
79061
- utimesSync(join11(dir, COMPLETE_SENTINEL), now, now);
79351
+ utimesSync(join12(dir, COMPLETE_SENTINEL), now, now);
79062
79352
  } catch {
79063
79353
  }
79064
79354
  }
@@ -79086,7 +79376,7 @@ function directorySizeBytes(path) {
79086
79376
  return 0;
79087
79377
  }
79088
79378
  for (const child of children) {
79089
- const childPath = join11(path, child);
79379
+ const childPath = join12(path, child);
79090
79380
  try {
79091
79381
  const stat = lstatSync3(childPath);
79092
79382
  if (stat.isDirectory()) {
@@ -79115,7 +79405,7 @@ function collectGcEntry(dir, name, now, minAgeMs, stats) {
79115
79405
  }
79116
79406
  let lastUseMs = dirStat.mtimeMs;
79117
79407
  try {
79118
- lastUseMs = statSync5(join11(dir, COMPLETE_SENTINEL)).mtimeMs;
79408
+ lastUseMs = statSync5(join12(dir, COMPLETE_SENTINEL)).mtimeMs;
79119
79409
  } catch {
79120
79410
  }
79121
79411
  return { dir, size: directorySizeBytes(dir), lastUseMs, ageMs: now - lastUseMs };
@@ -79125,7 +79415,7 @@ function collectGcEntry(dir, name, now, minAgeMs, stats) {
79125
79415
  }
79126
79416
  function gcSweepDue(rootDir, maxAgeMs) {
79127
79417
  try {
79128
- return Date.now() - statSync5(join11(rootDir, GC_MARKER)).mtimeMs > maxAgeMs;
79418
+ return Date.now() - statSync5(join12(rootDir, GC_MARKER)).mtimeMs > maxAgeMs;
79129
79419
  } catch {
79130
79420
  return true;
79131
79421
  }
@@ -79133,7 +79423,7 @@ function gcSweepDue(rootDir, maxAgeMs) {
79133
79423
  function gcExtractionCache(rootDir, opts) {
79134
79424
  const stats = { evictedEntries: 0, evictedBytes: 0, agedPartialsRemoved: 0 };
79135
79425
  try {
79136
- writeFileSync3(join11(rootDir, GC_MARKER), "", "utf-8");
79426
+ writeFileSync3(join12(rootDir, GC_MARKER), "", "utf-8");
79137
79427
  } catch {
79138
79428
  }
79139
79429
  try {
@@ -79142,7 +79432,7 @@ function gcExtractionCache(rootDir, opts) {
79142
79432
  for (const child of readdirSync5(rootDir, { withFileTypes: true })) {
79143
79433
  if (!child.isDirectory() || !isCacheLikeChild(child.name)) continue;
79144
79434
  const entry = collectGcEntry(
79145
- join11(rootDir, child.name),
79435
+ join12(rootDir, child.name),
79146
79436
  child.name,
79147
79437
  now,
79148
79438
  opts.minAgeMs,
@@ -79195,7 +79485,7 @@ var init_extractionCache = __esm({
79195
79485
 
79196
79486
  // ../engine/src/services/videoFrameExtractor.ts
79197
79487
  import { copyFileSync as copyFileSync2, existsSync as existsSync11, linkSync as linkSync2, mkdirSync as mkdirSync6, rmSync as rmSync3 } from "fs";
79198
- import { join as join12 } from "path";
79488
+ import { join as join13 } from "path";
79199
79489
  function isVideoFrameFormat(value) {
79200
79490
  return typeof value === "string" && VIDEO_FRAME_FORMATS.includes(value);
79201
79491
  }
@@ -79541,7 +79831,7 @@ async function extractVideoFramesRange(videoPath, videoId, startTime, duration,
79541
79831
  const normalizedFps = toFps(options.fps);
79542
79832
  const fps = fpsToNumber(normalizedFps);
79543
79833
  const ffmpegFps = fpsToFfmpegArg(normalizedFps);
79544
- const videoOutputDir = outputDirOverride ?? join12(outputDir, videoId);
79834
+ const videoOutputDir = outputDirOverride ?? join13(outputDir, videoId);
79545
79835
  if (!existsSync11(videoOutputDir)) mkdirSync6(videoOutputDir, { recursive: true });
79546
79836
  let metadata;
79547
79837
  try {
@@ -79568,7 +79858,7 @@ async function extractVideoFramesRange(videoPath, videoId, startTime, duration,
79568
79858
  }
79569
79859
  const format = resolveFrameFormat(metadata, options.format);
79570
79860
  const framePattern = `${FRAME_FILENAME_PREFIX}%05d.${format}`;
79571
- const outputPattern = join12(videoOutputDir, framePattern);
79861
+ const outputPattern = join13(videoOutputDir, framePattern);
79572
79862
  const isHdr = isHdrColorSpace(metadata.colorSpace);
79573
79863
  const isMacOS = process.platform === "darwin";
79574
79864
  const args = [];
@@ -80001,7 +80291,7 @@ function sliceSupersetMember(member, superset, outputDir, fps, configuredFps) {
80001
80291
  for (let i = 0; i < frameCount; i += 1) {
80002
80292
  const sourceFrame = superset.framePaths.get(member.offsetFrames + i);
80003
80293
  if (!sourceFrame) throw new Error(`superset frame ${member.offsetFrames + i} missing`);
80004
- linkOrCopyFrame(sourceFrame, join12(outputDir, frameFileName(i + 1, work.format)));
80294
+ linkOrCopyFrame(sourceFrame, join13(outputDir, frameFileName(i + 1, work.format)));
80005
80295
  }
80006
80296
  return extractedFramesFromDirectory(work, outputDir, work.videoPath, fps);
80007
80297
  }
@@ -80050,7 +80340,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
80050
80340
  videoPath = resolveProjectRelativeSrc(video.src, baseDir, compiledDir);
80051
80341
  }
80052
80342
  if (isHttpUrl(videoPath)) {
80053
- const downloadDir = join12(options.outputDir, "_downloads");
80343
+ const downloadDir = join13(options.outputDir, "_downloads");
80054
80344
  mkdirSync6(downloadDir, { recursive: true });
80055
80345
  videoPath = await downloadToTemp(
80056
80346
  videoPath,
@@ -80261,7 +80551,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
80261
80551
  async function extractDirectMiss(miss, maxTransientRetries = options.maxTransientRetries ?? 0) {
80262
80552
  const { work, cacheTarget } = miss;
80263
80553
  if (!cacheTarget) {
80264
- const outputDir = join12(options.outputDir, work.video.id);
80554
+ const outputDir = join13(options.outputDir, work.video.id);
80265
80555
  const attempted2 = await runVideoExtractionWithRetry(
80266
80556
  () => extractVideoFramesRange(
80267
80557
  work.videoPath,
@@ -80329,7 +80619,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
80329
80619
  return sliceSupersetMember(
80330
80620
  member,
80331
80621
  superset,
80332
- join12(options.outputDir, work.video.id),
80622
+ join13(options.outputDir, work.video.id),
80333
80623
  fps,
80334
80624
  configuredFps
80335
80625
  );
@@ -80346,7 +80636,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
80346
80636
  async function executeSupersetGroup(group) {
80347
80637
  const first = group.members[0]?.miss.work;
80348
80638
  if (!first) return [];
80349
- const tempDir = cacheRootDir ? join12(cacheRootDir, `${group.groupId}.partial-${process.pid}`) : join12(options.outputDir, group.groupId);
80639
+ const tempDir = cacheRootDir ? join13(cacheRootDir, `${group.groupId}.partial-${process.pid}`) : join13(options.outputDir, group.groupId);
80350
80640
  try {
80351
80641
  rmSync3(tempDir, { recursive: true, force: true });
80352
80642
  const superset = await extractVideoFramesRange(
@@ -80726,7 +81016,7 @@ var init_videoFrameExtractor = __esm({
80726
81016
 
80727
81017
  // ../engine/src/services/videoFrameInjector.ts
80728
81018
  import { promises as fs } from "fs";
80729
- import { dirname as dirname7 } from "path";
81019
+ import { dirname as dirname8 } from "path";
80730
81020
  function createFrameSourceCache(entryLimit, bytesLimit, frameSrcResolver) {
80731
81021
  const cache2 = /* @__PURE__ */ new Map();
80732
81022
  const inFlight = /* @__PURE__ */ new Map();
@@ -80808,7 +81098,7 @@ function createVideoFrameInjector(frameLookup, config) {
80808
81098
  const lastInjectedFrameByVideo = /* @__PURE__ */ new Map();
80809
81099
  const lastCacheTouchByDir = /* @__PURE__ */ new Map();
80810
81100
  function renewCacheLease(framePath) {
80811
- const cacheDir = dirname7(framePath);
81101
+ const cacheDir = dirname8(framePath);
80812
81102
  const now = Date.now();
80813
81103
  const lastTouch = lastCacheTouchByDir.get(cacheDir);
80814
81104
  if (lastTouch !== void 0 && now - lastTouch < CACHE_TOUCH_THROTTLE_MS) return;
@@ -81351,8 +81641,8 @@ var init_wavChunks = __esm({
81351
81641
  });
81352
81642
 
81353
81643
  // ../engine/src/services/audioVolumeEnvelope.ts
81354
- import { mkdtempSync as mkdtempSync3, readFileSync as readFileSync4, renameSync as renameSync2, rmSync as rmSync4, writeFileSync as writeFileSync4 } from "fs";
81355
- import { dirname as dirname8, join as join13 } from "path";
81644
+ import { mkdtempSync as mkdtempSync3, readFileSync as readFileSync5, renameSync as renameSync2, rmSync as rmSync4, writeFileSync as writeFileSync4 } from "fs";
81645
+ import { dirname as dirname9, join as join14 } from "path";
81356
81646
  function readFmtChunk(buffer, body, size) {
81357
81647
  const format = wavFormatTag(buffer, body, size);
81358
81648
  const bits = buffer.readUInt16LE(body + 14);
@@ -81420,12 +81710,12 @@ function applyVolumeEnvelopeToWav(wavPath, keyframes, trackStart, baseVolume) {
81420
81710
  if (!gainAt) return false;
81421
81711
  let stagingDir;
81422
81712
  try {
81423
- const buffer = readFileSync4(wavPath);
81713
+ const buffer = readFileSync5(wavPath);
81424
81714
  const layout2 = parseWavLayout(buffer);
81425
81715
  if (!layout2) return false;
81426
81716
  scaleSamples(buffer, layout2, gainAt);
81427
- stagingDir = mkdtempSync3(join13(dirname8(wavPath), ".hf-volume-"));
81428
- const tempPath = join13(stagingDir, "audio.wav");
81717
+ stagingDir = mkdtempSync3(join14(dirname9(wavPath), ".hf-volume-"));
81718
+ const tempPath = join14(stagingDir, "audio.wav");
81429
81719
  writeFileSync4(tempPath, buffer, { flag: "wx" });
81430
81720
  renameSync2(tempPath, wavPath);
81431
81721
  return true;
@@ -81526,9 +81816,9 @@ var init_audio_fx_runtime_inline = __esm({
81526
81816
  });
81527
81817
 
81528
81818
  // ../engine/src/services/audioFxRender.ts
81529
- import { existsSync as existsSync12, mkdtempSync as mkdtempSync4, readFileSync as readFileSync5, rmSync as rmSync5, writeFileSync as writeFileSync5 } from "fs";
81819
+ import { existsSync as existsSync12, mkdtempSync as mkdtempSync4, readFileSync as readFileSync6, rmSync as rmSync5, writeFileSync as writeFileSync5 } from "fs";
81530
81820
  import { tmpdir as tmpdir2 } from "os";
81531
- import { join as join14 } from "path";
81821
+ import { join as join15 } from "path";
81532
81822
  import { pathToFileURL } from "url";
81533
81823
  function readWavChunks(buf) {
81534
81824
  const head = { format: 1, channels: 1, sampleRate: 48e3, bits: 16 };
@@ -81549,7 +81839,7 @@ function readWavChunks(buf) {
81549
81839
  return { ...head, data: data2 };
81550
81840
  }
81551
81841
  function readWav(path) {
81552
- const buf = readFileSync5(path);
81842
+ const buf = readFileSync6(path);
81553
81843
  if (buf.length < 44 || buf.toString("ascii", 0, 4) !== "RIFF") {
81554
81844
  throw new AudioFxRenderError(`Not a WAV file: ${path}`);
81555
81845
  }
@@ -81643,7 +81933,7 @@ async function applyAudioFxChain(inputWav, chain, outputWav, options) {
81643
81933
  const { samples, sampleRate, channels, float } = readWav(inputWav);
81644
81934
  const planes = deinterleave(samples, channels);
81645
81935
  if ((planes[0]?.length ?? 0) === 0) return { path: inputWav, envelopeBaked: false };
81646
- const hostDir = mkdtempSync4(join14(tmpdir2(), "hf-fx-host-"));
81936
+ const hostDir = mkdtempSync4(join15(tmpdir2(), "hf-fx-host-"));
81647
81937
  let lease = null;
81648
81938
  try {
81649
81939
  if (options.signal?.aborted) {
@@ -81652,7 +81942,7 @@ async function applyAudioFxChain(inputWav, chain, outputWav, options) {
81652
81942
  lease = await acquireBrowser(["--no-sandbox", "--autoplay-policy=no-user-gesture-required"]);
81653
81943
  const page = await lease.browser.newPage();
81654
81944
  try {
81655
- const hostPage = join14(hostDir, "audio-fx.html");
81945
+ const hostPage = join15(hostDir, "audio-fx.html");
81656
81946
  writeFileSync5(hostPage, "<!doctype html><meta charset=utf-8><title>audio fx</title>");
81657
81947
  await page.goto(pathToFileURL(hostPage).href, { waitUntil: "domcontentloaded" });
81658
81948
  await page.addScriptTag({ content: getAudioFxRuntimeScript() });
@@ -81789,7 +82079,7 @@ var init_audioFxRender = __esm({
81789
82079
 
81790
82080
  // ../engine/src/services/audioMixer.ts
81791
82081
  import { closeSync as closeSync3, existsSync as existsSync13, mkdirSync as mkdirSync7, mkdtempSync as mkdtempSync5, openSync as openSync3, rmSync as rmSync6, writeFileSync as writeFileSync6 } from "fs";
81792
- import { join as join15, dirname as dirname9, isAbsolute as isAbsolute2, relative as relative2 } from "path";
82082
+ import { join as join16, dirname as dirname10, isAbsolute as isAbsolute2, relative as relative2 } from "path";
81793
82083
  function memberGroupKey(el) {
81794
82084
  return el.getAttribute(AUDIO_GROUP_RENDER_ID_ATTR) ?? el.getAttribute(HF_AUDIO_GROUP_ATTR);
81795
82085
  }
@@ -82146,7 +82436,7 @@ function parseAudioElements(html) {
82146
82436
  }
82147
82437
  async function extractAudioFromVideo(videoPath, outputPath, options, signal, config) {
82148
82438
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
82149
- const outputDir = dirname9(outputPath);
82439
+ const outputDir = dirname10(outputPath);
82150
82440
  if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
82151
82441
  const playbackRate = normalizeRateSpec(options?.playbackRate);
82152
82442
  const args = [];
@@ -82192,7 +82482,7 @@ async function extractAudioFromVideo(videoPath, outputPath, options, signal, con
82192
82482
  }
82193
82483
  async function prepareAudioTrack(srcPath, outputPath, mediaStart, duration, playbackRate = 1, signal, config) {
82194
82484
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
82195
- const outputDir = dirname9(outputPath);
82485
+ const outputDir = dirname10(outputPath);
82196
82486
  if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
82197
82487
  const normalizedPlaybackRate = normalizeRateSpec(playbackRate);
82198
82488
  const outputArgs = await preparedAudioOutputArgs(srcPath, normalizedPlaybackRate, duration);
@@ -82239,7 +82529,7 @@ async function prepareAudioTrack(srcPath, outputPath, mediaStart, duration, play
82239
82529
  }
82240
82530
  async function generateSilence(outputPath, duration, signal, config) {
82241
82531
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
82242
- const outputDir = dirname9(outputPath);
82532
+ const outputDir = dirname10(outputPath);
82243
82533
  if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
82244
82534
  const args = [
82245
82535
  "-f",
@@ -82293,7 +82583,7 @@ async function mixAudioTracks(tracks, outputPath, totalDuration, signal, config)
82293
82583
  failures: result2.failure ? [result2.failure] : void 0
82294
82584
  };
82295
82585
  }
82296
- const outputDir = dirname9(outputPath);
82586
+ const outputDir = dirname10(outputPath);
82297
82587
  if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
82298
82588
  const buildFilterComplex = (ignoreAutomation) => {
82299
82589
  const filterParts = [];
@@ -82310,8 +82600,8 @@ async function mixAudioTracks(tracks, outputPath, totalDuration, signal, config)
82310
82600
  const runMix = async (ignoreAutomation) => {
82311
82601
  const inputs = [];
82312
82602
  tracks.forEach((track) => inputs.push("-i", track.srcPath));
82313
- const scriptDir = mkdtempSync5(join15(outputDir, ".filter-complex-"));
82314
- const scriptPath = join15(scriptDir, "graph.txt");
82603
+ const scriptDir = mkdtempSync5(join16(outputDir, ".filter-complex-"));
82604
+ const scriptPath = join16(scriptDir, "graph.txt");
82315
82605
  const fd = openSync3(scriptPath, "wx", 384);
82316
82606
  try {
82317
82607
  writeFileSync6(fd, buildFilterComplex(ignoreAutomation));
@@ -82397,7 +82687,7 @@ function groupNormalizeOptionUnsupported(stderr) {
82397
82687
  }
82398
82688
  async function mixGroupMembers(memberTracks, outputPath, totalDuration, signal, config) {
82399
82689
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
82400
- const outputDir = dirname9(outputPath);
82690
+ const outputDir = dirname10(outputPath);
82401
82691
  if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
82402
82692
  const buildInputFilters = (ignoreKeyframes) => memberTracks.map((track, i) => {
82403
82693
  const volumeFilter = buildVolumeExpression(track, ignoreKeyframes);
@@ -82415,8 +82705,8 @@ async function mixGroupMembers(memberTracks, outputPath, totalDuration, signal,
82415
82705
  `${mixInputs}amix=inputs=${memberTracks.length}:duration=longest:dropout_transition=0[mixed];[mixed]volume=${formatFilterNumber(memberTracks.length)}[out]`
82416
82706
  );
82417
82707
  const filterComplex = [...inputFilters, mixFilter].join(";");
82418
- const scriptDir = mkdtempSync5(join15(outputDir, ".group-filter-complex-"));
82419
- const scriptPath = join15(scriptDir, "graph.txt");
82708
+ const scriptDir = mkdtempSync5(join16(outputDir, ".group-filter-complex-"));
82709
+ const scriptPath = join16(scriptDir, "graph.txt");
82420
82710
  const fd = openSync3(scriptPath, "wx", 384);
82421
82711
  try {
82422
82712
  writeFileSync6(fd, filterComplex);
@@ -82569,7 +82859,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
82569
82859
  }
82570
82860
  let audioSrcPath = srcPath;
82571
82861
  if (element.type === "video") {
82572
- const extractedPath = join15(workDir, `${element.id}-extracted.wav`);
82862
+ const extractedPath = join16(workDir, `${element.id}-extracted.wav`);
82573
82863
  const extractResult = await extractAudioFromVideo(
82574
82864
  srcPath,
82575
82865
  extractedPath,
@@ -82596,7 +82886,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
82596
82886
  }
82597
82887
  audioSrcPath = extractedPath;
82598
82888
  } else {
82599
- const trimmedPath = join15(workDir, `${element.id}-trimmed.wav`);
82889
+ const trimmedPath = join16(workDir, `${element.id}-trimmed.wav`);
82600
82890
  const prepResult = await prepareAudioTrack(
82601
82891
  srcPath,
82602
82892
  trimmedPath,
@@ -82640,7 +82930,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
82640
82930
  const fxResult = await applyAudioFxChain(
82641
82931
  audioSrcPath,
82642
82932
  chain,
82643
- join15(workDir, `${element.id}-fx.wav`),
82933
+ join16(workDir, `${element.id}-fx.wav`),
82644
82934
  {
82645
82935
  trackId: element.id,
82646
82936
  signal: effectiveSignal,
@@ -82733,7 +83023,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
82733
83023
  const meta = groupMeta.get(groupId);
82734
83024
  if (!meta) continue;
82735
83025
  const pathId = safePathSegment(groupId, groupIndex);
82736
- const groupWavPath = join15(workDir, `group-${pathId}.wav`);
83026
+ const groupWavPath = join16(workDir, `group-${pathId}.wav`);
82737
83027
  try {
82738
83028
  const subMix = await mixGroupMembers(
82739
83029
  memberTracks,
@@ -82769,7 +83059,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
82769
83059
  const fxResult = await applyAudioFxChain(
82770
83060
  groupSrcPath,
82771
83061
  chain,
82772
- join15(workDir, `group-${pathId}-fx.wav`),
83062
+ join16(workDir, `group-${pathId}-fx.wav`),
82773
83063
  {
82774
83064
  trackId: groupId,
82775
83065
  signal: effectiveSignal,
@@ -82870,14 +83160,14 @@ var init_audioMixer = __esm({
82870
83160
  import { execFile as execFile3 } from "child_process";
82871
83161
  import { mkdtemp, rm, writeFile } from "fs/promises";
82872
83162
  import { tmpdir as tmpdir3 } from "os";
82873
- import { join as join16 } from "path";
83163
+ import { join as join17 } from "path";
82874
83164
  import { promisify as promisify3 } from "util";
82875
83165
  async function psnrDb(a, b) {
82876
83166
  const execFileP = promisify3(execFile3);
82877
- const dir = await mkdtemp(join16(tmpdir3(), "hf-de-verify-"));
83167
+ const dir = await mkdtemp(join17(tmpdir3(), "hf-de-verify-"));
82878
83168
  try {
82879
- const pa = join16(dir, "a.jpg");
82880
- const pb = join16(dir, "b.jpg");
83169
+ const pa = join17(dir, "a.jpg");
83170
+ const pb = join17(dir, "b.jpg");
82881
83171
  await Promise.all([writeFile(pa, a), writeFile(pb, b)]);
82882
83172
  const { stderr } = await execFileP(
82883
83173
  getFfmpegBinary(),
@@ -82988,7 +83278,7 @@ var init_readWebGlVendorInfoFromCanvas = __esm({
82988
83278
  import { cpus, freemem } from "os";
82989
83279
  import { existsSync as existsSync14, mkdirSync as mkdirSync8, readdirSync as readdirSync6 } from "fs";
82990
83280
  import { copyFile, readFile as readFile2, rename } from "fs/promises";
82991
- import { join as join17 } from "path";
83281
+ import { join as join18 } from "path";
82992
83282
  import { getHeapStatistics } from "v8";
82993
83283
  function defaultSafeMaxWorkers() {
82994
83284
  return Math.max(6, Math.min(16, Math.floor(cpus().length / 8)));
@@ -83117,7 +83407,7 @@ function distributeFrames(totalFrames, workerCount, workDir, rangeStart = 0) {
83117
83407
  workerId: i,
83118
83408
  startFrame,
83119
83409
  endFrame,
83120
- outputDir: join17(workDir, `worker-${i}`),
83410
+ outputDir: join18(workDir, `worker-${i}`),
83121
83411
  outputFrameOffset: rangeStart
83122
83412
  });
83123
83413
  }
@@ -83131,7 +83421,7 @@ function distributeFramesInterleaved(totalFrames, workerCount, workDir, rangeSta
83131
83421
  startFrame: rangeStart + i,
83132
83422
  endFrame: rangeStart + totalFrames,
83133
83423
  frameStride: workerCount,
83134
- outputDir: join17(workDir, `worker-${i}`),
83424
+ outputDir: join18(workDir, `worker-${i}`),
83135
83425
  outputFrameOffset: rangeStart
83136
83426
  });
83137
83427
  }
@@ -83330,7 +83620,7 @@ async function verifyDiskDrawElementSamples(session, task, streaming) {
83330
83620
  for (const idx of selectVerifySampleIndicesForTask(truths.keys(), task)) {
83331
83621
  const truth = truths.get(idx);
83332
83622
  if (!truth) continue;
83333
- const framePath = join17(task.outputDir, `frame_${String(idx - offset3).padStart(6, "0")}.${ext}`);
83623
+ const framePath = join18(task.outputDir, `frame_${String(idx - offset3).padStart(6, "0")}.${ext}`);
83334
83624
  const db = await psnrForDiskSample(framePath, truth, task.workerId, idx);
83335
83625
  if (db === null) continue;
83336
83626
  assertDiskSampleAboveFloor(db, verifyMinDb, idx, task.workerId);
@@ -83567,8 +83857,8 @@ async function mergeWorkerFrames(workDir, tasks, outputDir) {
83567
83857
  }
83568
83858
  const files = readdirSync6(task.outputDir).filter((f) => f.startsWith("frame_") && (f.endsWith(".jpg") || f.endsWith(".png"))).sort();
83569
83859
  const copyTasks = files.map(async (file) => {
83570
- const sourcePath = join17(task.outputDir, file);
83571
- const targetPath = join17(outputDir, file);
83860
+ const sourcePath = join18(task.outputDir, file);
83861
+ const targetPath = join18(outputDir, file);
83572
83862
  try {
83573
83863
  await rename(sourcePath, targetPath);
83574
83864
  } catch {
@@ -83613,8 +83903,8 @@ var init_parallelCoordinator = __esm({
83613
83903
  // ../engine/src/services/fileServer.ts
83614
83904
  import { Hono } from "hono";
83615
83905
  import { serve } from "@hono/node-server";
83616
- import { readFileSync as readFileSync6, openSync as openSync4, fstatSync, closeSync as closeSync4, statSync as statSync6, constants as constants2 } from "fs";
83617
- import { join as join18, extname as extname3 } from "path";
83906
+ import { readFileSync as readFileSync7, openSync as openSync4, fstatSync, closeSync as closeSync4, statSync as statSync6, constants as constants2 } from "fs";
83907
+ import { join as join19, extname as extname3 } from "path";
83618
83908
  function readRegularFile(filePath) {
83619
83909
  let fd;
83620
83910
  try {
@@ -83627,16 +83917,16 @@ function readRegularFile(filePath) {
83627
83917
  }
83628
83918
  try {
83629
83919
  if (!fstatSync(fd).isFile()) return null;
83630
- return readFileSync6(fd);
83920
+ return readFileSync7(fd);
83631
83921
  } finally {
83632
83922
  closeSync4(fd);
83633
83923
  }
83634
83924
  }
83635
83925
  function resolveContainedPaths(projectDir, compiledDir, relativePath) {
83636
- const projectPath = join18(projectDir, relativePath);
83926
+ const projectPath = join19(projectDir, relativePath);
83637
83927
  if (!isWithinProjectRoot(projectDir, projectPath)) return null;
83638
83928
  if (!compiledDir) return { projectPath, compiledPath: null };
83639
- const compiledPath = join18(compiledDir, relativePath);
83929
+ const compiledPath = join19(compiledDir, relativePath);
83640
83930
  if (!isWithinProjectRoot(compiledDir, compiledPath)) return null;
83641
83931
  return { projectPath, compiledPath };
83642
83932
  }
@@ -84550,7 +84840,7 @@ var init_shaderTransitions = __esm({
84550
84840
 
84551
84841
  // ../engine/src/services/hdrCapture.ts
84552
84842
  import { existsSync as existsSync15, readdirSync as readdirSync7 } from "fs";
84553
- import { join as join19 } from "path";
84843
+ import { join as join20 } from "path";
84554
84844
  import { homedir as homedir2 } from "os";
84555
84845
  function linearToPQ(L) {
84556
84846
  const Lp = Math.max(0, L * SDR_NITS / PQ_MAX_NITS);
@@ -84666,12 +84956,12 @@ function float16ToPqRgb(rawBuffer, bytesPerRow, width, height) {
84666
84956
  return output;
84667
84957
  }
84668
84958
  function resolveHeadedChromePath() {
84669
- const baseDir = join19(homedir2(), ".cache", "puppeteer", "chrome");
84959
+ const baseDir = join20(homedir2(), ".cache", "puppeteer", "chrome");
84670
84960
  if (!existsSync15(baseDir)) return void 0;
84671
84961
  const versions = readdirSync7(baseDir).sort().reverse();
84672
84962
  for (const version2 of versions) {
84673
84963
  const candidates = [
84674
- join19(
84964
+ join20(
84675
84965
  baseDir,
84676
84966
  version2,
84677
84967
  "chrome-mac-arm64",
@@ -84680,7 +84970,7 @@ function resolveHeadedChromePath() {
84680
84970
  "MacOS",
84681
84971
  "Google Chrome for Testing"
84682
84972
  ),
84683
- join19(
84973
+ join20(
84684
84974
  baseDir,
84685
84975
  version2,
84686
84976
  "chrome-mac-x64",
@@ -84689,8 +84979,8 @@ function resolveHeadedChromePath() {
84689
84979
  "MacOS",
84690
84980
  "Google Chrome for Testing"
84691
84981
  ),
84692
- join19(baseDir, version2, "chrome-linux64", "chrome"),
84693
- join19(baseDir, version2, "chrome-win64", "chrome.exe")
84982
+ join20(baseDir, version2, "chrome-linux64", "chrome"),
84983
+ join20(baseDir, version2, "chrome-win64", "chrome.exe")
84694
84984
  ];
84695
84985
  for (const binary of candidates) {
84696
84986
  if (existsSync15(binary)) return binary;
@@ -88196,13 +88486,13 @@ import {
88196
88486
  existsSync as existsSync23,
88197
88487
  mkdirSync as mkdirSync13,
88198
88488
  mkdtempSync as mkdtempSync8,
88199
- readFileSync as readFileSync10,
88489
+ readFileSync as readFileSync11,
88200
88490
  renameSync as renameSync5,
88201
88491
  rmSync as rmSync11,
88202
88492
  writeFileSync as writeFileSync9
88203
88493
  } from "fs";
88204
88494
  import { homedir as homedir4, tmpdir as tmpdir5 } from "os";
88205
- import { dirname as dirname13, join as join31 } from "path";
88495
+ import { dirname as dirname14, join as join32 } from "path";
88206
88496
  async function compressToWoff2(input) {
88207
88497
  return Buffer.from(await compress(input));
88208
88498
  }
@@ -88210,17 +88500,17 @@ function rawMimeType(format) {
88210
88500
  return RAW_MIME_TYPES[format] ?? "font/ttf";
88211
88501
  }
88212
88502
  function defaultCacheDir() {
88213
- const root = process.env.HYPERFRAMES_FONT_CACHE_DIR ?? (process.env.AWS_LAMBDA_FUNCTION_NAME ? join31(tmpdir5(), "hyperframes", "fonts") : join31(homedir4(), ".cache", "hyperframes", "fonts"));
88214
- return join31(root, "local-compression-v1");
88503
+ const root = process.env.HYPERFRAMES_FONT_CACHE_DIR ?? (process.env.AWS_LAMBDA_FUNCTION_NAME ? join32(tmpdir5(), "hyperframes", "fonts") : join32(homedir4(), ".cache", "hyperframes", "fonts"));
88504
+ return join32(root, "local-compression-v1");
88215
88505
  }
88216
88506
  function cachedCompressionPath(input, originalFormat, cacheDir) {
88217
88507
  const digest = createHash7("sha256").update("hyperframes-local-font-compression-v1\0").update(originalFormat).update("\0").update(input).digest("hex");
88218
- return join31(cacheDir, `${digest}.woff2`);
88508
+ return join32(cacheDir, `${digest}.woff2`);
88219
88509
  }
88220
88510
  function readCachedCompression(path) {
88221
88511
  try {
88222
88512
  if (!existsSync23(path)) return null;
88223
- const cached2 = readFileSync10(path);
88513
+ const cached2 = readFileSync11(path);
88224
88514
  return cached2.length > 0 ? cached2 : null;
88225
88515
  } catch {
88226
88516
  return null;
@@ -88229,9 +88519,9 @@ function readCachedCompression(path) {
88229
88519
  function cacheCompression(path, compressed) {
88230
88520
  let tempDir;
88231
88521
  try {
88232
- mkdirSync13(dirname13(path), { recursive: true });
88233
- tempDir = mkdtempSync8(join31(dirname13(path), ".compression-"));
88234
- const tmpPath = join31(tempDir, "font.woff2");
88522
+ mkdirSync13(dirname14(path), { recursive: true });
88523
+ tempDir = mkdtempSync8(join32(dirname14(path), ".compression-"));
88524
+ const tmpPath = join32(tempDir, "font.woff2");
88235
88525
  writeFileSync9(tmpPath, compressed, { flag: "wx", mode: 420 });
88236
88526
  renameSync5(tmpPath, path);
88237
88527
  } catch {
@@ -88290,7 +88580,7 @@ import {
88290
88580
  existsSync as existsSync33,
88291
88581
  mkdirSync as mkdirSync19,
88292
88582
  mkdtempSync as mkdtempSync11,
88293
- readFileSync as readFileSync14,
88583
+ readFileSync as readFileSync15,
88294
88584
  readdirSync as readdirSync12,
88295
88585
  rmSync as rmSync15,
88296
88586
  statSync as statSync12,
@@ -88299,10 +88589,10 @@ import {
88299
88589
  appendFileSync
88300
88590
  } from "fs";
88301
88591
  import { tmpdir as tmpdir7 } from "os";
88302
- import { join as join47, dirname as dirname19, resolve as resolve13 } from "path";
88592
+ import { join as join48, dirname as dirname20, resolve as resolve13 } from "path";
88303
88593
  import { totalmem as totalmem3 } from "os";
88304
88594
  import { randomUUID as randomUUID3 } from "crypto";
88305
- import { fileURLToPath as fileURLToPath5 } from "url";
88595
+ import { fileURLToPath as fileURLToPath6 } from "url";
88306
88596
 
88307
88597
  // ../producer/src/services/fileServer.ts
88308
88598
  init_compiler();
@@ -88322,14 +88612,14 @@ import {
88322
88612
  } from "fs";
88323
88613
  import { promisify as promisify4 } from "util";
88324
88614
  import { Readable as Readable2 } from "stream";
88325
- import { join as join20, extname as extname4, resolve as resolve7, sep as sep3 } from "path";
88615
+ import { join as join21, extname as extname4, resolve as resolve7, sep as sep3 } from "path";
88326
88616
 
88327
88617
  // ../producer/src/services/hyperframeRuntimeLoader.ts
88328
88618
  import { createHash as createHash4 } from "crypto";
88329
- import { existsSync as existsSync16, readFileSync as readFileSync7 } from "fs";
88330
- import { dirname as dirname10, resolve as resolve6 } from "path";
88331
- import { fileURLToPath as fileURLToPath2 } from "url";
88332
- var PRODUCER_DIR = dirname10(fileURLToPath2(import.meta.url));
88619
+ import { existsSync as existsSync16, readFileSync as readFileSync8 } from "fs";
88620
+ import { dirname as dirname11, resolve as resolve6 } from "path";
88621
+ import { fileURLToPath as fileURLToPath3 } from "url";
88622
+ var PRODUCER_DIR = dirname11(fileURLToPath3(import.meta.url));
88333
88623
  var SIBLING_MANIFEST_PATH = resolve6(PRODUCER_DIR, "hyperframe.manifest.json");
88334
88624
  var MODULE_RELATIVE_MANIFEST_PATH = resolve6(
88335
88625
  PRODUCER_DIR,
@@ -88364,7 +88654,7 @@ function resolveVerifiedHyperframeRuntime() {
88364
88654
  `[HyperframeRuntimeLoader] Missing manifest. Tried: ${tried}. Searched from cwd=${process.cwd()}. Build core runtime artifacts before rendering.`
88365
88655
  );
88366
88656
  }
88367
- const manifestRaw = readFileSync7(manifestPath, "utf8");
88657
+ const manifestRaw = readFileSync8(manifestPath, "utf8");
88368
88658
  const manifest = JSON.parse(manifestRaw);
88369
88659
  const runtimeFileName = manifest.artifacts?.iife;
88370
88660
  if (!runtimeFileName || !manifest.sha256) {
@@ -88372,11 +88662,11 @@ function resolveVerifiedHyperframeRuntime() {
88372
88662
  `[HyperframeRuntimeLoader] Invalid manifest at ${manifestPath}; missing iife artifact or sha256.`
88373
88663
  );
88374
88664
  }
88375
- const runtimePath = resolve6(dirname10(manifestPath), runtimeFileName);
88665
+ const runtimePath = resolve6(dirname11(manifestPath), runtimeFileName);
88376
88666
  if (!existsSync16(runtimePath)) {
88377
88667
  throw new Error(`[HyperframeRuntimeLoader] Missing runtime artifact at ${runtimePath}.`);
88378
88668
  }
88379
- const runtimeSource = readFileSync7(runtimePath, "utf8");
88669
+ const runtimeSource = readFileSync8(runtimePath, "utf8");
88380
88670
  const runtimeSha = createHash4("sha256").update(runtimeSource, "utf8").digest("hex");
88381
88671
  if (runtimeSha !== manifest.sha256) {
88382
88672
  throw new Error(
@@ -88938,7 +89228,7 @@ function createFileServer2(options) {
88938
89228
  }).join("/");
88939
89229
  let file = null;
88940
89230
  for (const root of compiledDir ? [compiledDir, projectDir] : [projectDir]) {
88941
- const candidate = join20(root, relativePath);
89231
+ const candidate = join21(root, relativePath);
88942
89232
  if (isPathInside2(candidate, root)) file = openRegularFile(candidate);
88943
89233
  if (file) break;
88944
89234
  }
@@ -89085,20 +89375,20 @@ import {
89085
89375
  symlinkSync,
89086
89376
  writeFileSync as writeFileSync7
89087
89377
  } from "fs";
89088
- import { basename as basename4, dirname as dirname11, isAbsolute as isAbsolute3, join as join22, relative as relative3, resolve as resolve8 } from "path";
89378
+ import { basename as basename4, dirname as dirname12, isAbsolute as isAbsolute3, join as join23, relative as relative3, resolve as resolve8 } from "path";
89089
89379
 
89090
89380
  // ../producer/src/utils/paths.ts
89091
89381
  import {
89092
89382
  basename as basename3,
89093
- join as join21,
89383
+ join as join22,
89094
89384
  resolve as nodeResolve,
89095
89385
  relative as nodeRelative,
89096
89386
  isAbsolute as nodeIsAbsolute
89097
89387
  } from "path";
89098
- import { fileURLToPath as fileURLToPath3 } from "url";
89388
+ import { fileURLToPath as fileURLToPath4 } from "url";
89099
89389
  var DEFAULT_RENDERS_DIR = process.env.PRODUCER_RENDERS_DIR ?? // fileURLToPath (not URL.pathname): on Windows .pathname is "/D:/..." which
89100
89390
  // resolves to a bogus renders dir.
89101
- nodeResolve(fileURLToPath3(import.meta.url), "../../..", "renders");
89391
+ nodeResolve(fileURLToPath4(import.meta.url), "../../..", "renders");
89102
89392
  function isPathInside3(childPath, parentPath, options = {}) {
89103
89393
  const resolvePath = options.pathModule?.resolve ?? nodeResolve;
89104
89394
  const relativePath = options.pathModule?.relative ?? nodeRelative;
@@ -89128,7 +89418,7 @@ function formatExportFrameName(index, ext) {
89128
89418
  function resolveRenderPaths(projectDir, outputPath, rendersDir = DEFAULT_RENDERS_DIR) {
89129
89419
  const absoluteProjectDir = nodeResolve(projectDir);
89130
89420
  const projectName = basename3(absoluteProjectDir);
89131
- const resolvedOutputPath = outputPath ?? join21(rendersDir, `${projectName}.mp4`);
89421
+ const resolvedOutputPath = outputPath ?? join22(rendersDir, `${projectName}.mp4`);
89132
89422
  const absoluteOutputPath = nodeResolve(resolvedOutputPath);
89133
89423
  return { absoluteProjectDir, absoluteOutputPath };
89134
89424
  }
@@ -89165,21 +89455,21 @@ function resolveDeviceScaleFactor(input) {
89165
89455
  return target.width / input.compositionWidth;
89166
89456
  }
89167
89457
  function writeCompiledArtifacts(compiled, workDir, includeSummary) {
89168
- const compileDir = join22(workDir, "compiled");
89458
+ const compileDir = join23(workDir, "compiled");
89169
89459
  mkdirSync9(compileDir, { recursive: true });
89170
- writeFileSync7(join22(compileDir, "index.html"), compiled.html, "utf-8");
89460
+ writeFileSync7(join23(compileDir, "index.html"), compiled.html, "utf-8");
89171
89461
  for (const [srcPath, html] of compiled.subCompositions) {
89172
- const outPath = join22(compileDir, srcPath);
89173
- mkdirSync9(dirname11(outPath), { recursive: true });
89462
+ const outPath = join23(compileDir, srcPath);
89463
+ mkdirSync9(dirname12(outPath), { recursive: true });
89174
89464
  writeFileSync7(outPath, html, "utf-8");
89175
89465
  }
89176
89466
  for (const [relativePath, absolutePath] of compiled.externalAssets) {
89177
- const outPath = resolve8(join22(compileDir, relativePath));
89467
+ const outPath = resolve8(join23(compileDir, relativePath));
89178
89468
  if (!isPathInside3(outPath, compileDir)) {
89179
89469
  console.warn(`[Render] Skipping external asset with unsafe path: ${relativePath}`);
89180
89470
  continue;
89181
89471
  }
89182
- mkdirSync9(dirname11(outPath), { recursive: true });
89472
+ mkdirSync9(dirname12(outPath), { recursive: true });
89183
89473
  copyFileSync3(absolutePath, outPath);
89184
89474
  }
89185
89475
  if (includeSummary) {
@@ -89205,7 +89495,7 @@ function writeCompiledArtifacts(compiled, workDir, includeSummary) {
89205
89495
  renderModeHints: compiled.renderModeHints,
89206
89496
  hasShaderTransitions: compiled.hasShaderTransitions
89207
89497
  };
89208
- writeFileSync7(join22(compileDir, "summary.json"), JSON.stringify(summary, null, 2), "utf-8");
89498
+ writeFileSync7(join23(compileDir, "summary.json"), JSON.stringify(summary, null, 2), "utf-8");
89209
89499
  }
89210
89500
  }
89211
89501
  function applyRenderModeHints(alreadyForced, compiled, log = defaultLogger) {
@@ -89264,8 +89554,8 @@ function reportWorkerStartup(job, progress, onProgress) {
89264
89554
  }
89265
89555
  var materializePathModule = {
89266
89556
  resolve: resolve8,
89267
- join: join22,
89268
- dirname: dirname11,
89557
+ join: join23,
89558
+ dirname: dirname12,
89269
89559
  basename: basename4,
89270
89560
  relative: relative3,
89271
89561
  isAbsolute: isAbsolute3
@@ -89568,7 +89858,7 @@ import {
89568
89858
  renameSync as renameSync3,
89569
89859
  rmSync as rmSync8
89570
89860
  } from "fs";
89571
- import { basename as basename5, dirname as dirname12, extname as extname5, join as join23, resolve as resolve9 } from "path";
89861
+ import { basename as basename5, dirname as dirname13, extname as extname5, join as join24, resolve as resolve9 } from "path";
89572
89862
 
89573
89863
  // ../producer/src/utils/ffprobe.ts
89574
89864
  init_src();
@@ -89602,10 +89892,10 @@ function buildArtifactExpectation(input) {
89602
89892
  };
89603
89893
  }
89604
89894
  function createSiblingTransactionDirectory(destination) {
89605
- const parent = dirname12(destination);
89895
+ const parent = dirname13(destination);
89606
89896
  const extension = extname5(destination);
89607
89897
  const stem = extension ? basename5(destination, extension) : basename5(destination);
89608
- return mkdtempSync6(join23(parent, `.${stem}.hf-transaction-`));
89898
+ return mkdtempSync6(join24(parent, `.${stem}.hf-transaction-`));
89609
89899
  }
89610
89900
  function assertReadableNonEmptyFile(path) {
89611
89901
  const fd = openSync6(path, "r");
@@ -89623,7 +89913,7 @@ function collectDirectoryFiles(root) {
89623
89913
  const files = [];
89624
89914
  const visit = (directory) => {
89625
89915
  for (const entry of readdirSync8(directory, { withFileTypes: true })) {
89626
- const path = join23(directory, entry.name);
89916
+ const path = join24(directory, entry.name);
89627
89917
  if (entry.isDirectory()) visit(path);
89628
89918
  else if (entry.isFile()) files.push(path);
89629
89919
  }
@@ -89666,8 +89956,8 @@ var ArtifactTransaction = class {
89666
89956
  this.fileSystem = fileSystem;
89667
89957
  this.destinationPath = resolve9(destinationPath);
89668
89958
  this.transactionDirectory = createSiblingTransactionDirectory(this.destinationPath);
89669
- this.stagingPath = join23(this.transactionDirectory, basename5(this.destinationPath));
89670
- this.backupPath = join23(this.transactionDirectory, "backup");
89959
+ this.stagingPath = join24(this.transactionDirectory, basename5(this.destinationPath));
89960
+ this.backupPath = join24(this.transactionDirectory, "backup");
89671
89961
  this.durationProbe = durationProbe;
89672
89962
  }
89673
89963
  kind;
@@ -89708,14 +89998,14 @@ var ArtifactTransaction = class {
89708
89998
  */
89709
89999
  async assertDirectoryExpectation(expected) {
89710
90000
  for (const required of expected.requiredFiles ?? []) {
89711
- const path = join23(this.stagingPath, required);
90001
+ const path = join24(this.stagingPath, required);
89712
90002
  if (!existsSync19(path)) {
89713
90003
  throw new Error(`Render artifact directory is missing ${required}: ${this.stagingPath}`);
89714
90004
  }
89715
90005
  assertReadableNonEmptyFile(path);
89716
90006
  }
89717
90007
  if (expected.probeTarget === void 0) return;
89718
- await this.assertArtifactDuration(expected, join23(this.stagingPath, expected.probeTarget));
90008
+ await this.assertArtifactDuration(expected, join24(this.stagingPath, expected.probeTarget));
89719
90009
  }
89720
90010
  async assertArtifactDuration(expected, probePath = this.stagingPath) {
89721
90011
  const expectedSeconds = expected.expectedDurationSeconds;
@@ -89929,7 +90219,7 @@ function replanAfterFailure(plan2, failure) {
89929
90219
  // ../producer/src/services/render/stages/captureSegmentedStage.ts
89930
90220
  init_src();
89931
90221
  import { existsSync as existsSync20, mkdirSync as mkdirSync11, rmSync as rmSync10, statSync as statSync8 } from "fs";
89932
- import { join as join27 } from "path";
90222
+ import { join as join28 } from "path";
89933
90223
 
89934
90224
  // ../producer/src/services/render/captureStageError.ts
89935
90225
  init_src();
@@ -89965,7 +90255,7 @@ init_src();
89965
90255
  // ../producer/src/services/hdrCompositor.ts
89966
90256
  init_src();
89967
90257
  import { readSync as readSync2, closeSync as closeSync7 } from "fs";
89968
- import { join as join24 } from "path";
90258
+ import { join as join25 } from "path";
89969
90259
 
89970
90260
  // ../producer/src/services/render/hdrPerf.ts
89971
90261
  function createHdrPerfCollector() {
@@ -90477,7 +90767,7 @@ async function compositeHdrFrame(ctx, canvas, time, fullStacking, elementFilter,
90477
90767
  if (shouldLog && debugDumpDir) {
90478
90768
  const after2 = countNonZeroRgb48(canvas);
90479
90769
  const dumpName = `frame_${String(debugFrameIndex).padStart(4, "0")}_layer_${String(layerIdx).padStart(2, "0")}_dom.png`;
90480
- const dumpPath = join24(debugDumpDir, dumpName);
90770
+ const dumpPath = join25(debugDumpDir, dumpName);
90481
90771
  writeFileExclusiveSync(dumpPath, domPng);
90482
90772
  log.info("[diag] dom layer blit", {
90483
90773
  frame: debugFrameIndex,
@@ -90521,11 +90811,11 @@ import {
90521
90811
  mkdirSync as mkdirSync10,
90522
90812
  mkdtempSync as mkdtempSync7,
90523
90813
  openSync as openSync7,
90524
- readFileSync as readFileSync8,
90814
+ readFileSync as readFileSync9,
90525
90815
  rmSync as rmSync9,
90526
90816
  statfsSync
90527
90817
  } from "fs";
90528
- import { join as join25 } from "path";
90818
+ import { join as join26 } from "path";
90529
90819
  var NO_FOLLOW_FLAG = constants4.O_NOFOLLOW ?? 0;
90530
90820
  function tempDirSafePrefix(id) {
90531
90821
  const safe = id.replace(/[^A-Za-z0-9_.-]/g, "_").slice(0, 80);
@@ -90769,10 +91059,10 @@ async function extractHdrVideoFrames(args) {
90769
91059
  const window3 = extractionWindows.get(videoId);
90770
91060
  if (!video || !window3) continue;
90771
91061
  mkdirSync10(framesDir, { recursive: true });
90772
- const frameDir = mkdtempSync7(join25(framesDir, `hdr_${tempDirSafePrefix(videoId)}-`));
91062
+ const frameDir = mkdtempSync7(join26(framesDir, `hdr_${tempDirSafePrefix(videoId)}-`));
90773
91063
  createdFrameDirs.add(frameDir);
90774
91064
  const dims = prep.hdrExtractionDims.get(videoId) ?? { width, height };
90775
- const rawPath = join25(frameDir, "frames.rgb48le");
91065
+ const rawPath = join26(frameDir, "frames.rgb48le");
90776
91066
  const extractionStart = String(window3.extractionMediaStart ?? window3.mediaStart);
90777
91067
  const ffmpegArgs = [];
90778
91068
  if (window3.finalFrameOnly) {
@@ -90858,7 +91148,7 @@ function decodeHdrImageBuffers(args) {
90858
91148
  const out = /* @__PURE__ */ new Map();
90859
91149
  for (const [imageId, srcPath] of hdrImageSrcPaths) {
90860
91150
  try {
90861
- const decoded = decodePngToRgb48le(readFileSync8(srcPath));
91151
+ const decoded = decodePngToRgb48le(readFileSync9(srcPath));
90862
91152
  const layout2 = prep.hdrExtractionDims.get(imageId);
90863
91153
  const fitInfo = prep.hdrImageFitInfo.get(imageId);
90864
91154
  if (layout2 && (layout2.width !== decoded.width || layout2.height !== decoded.height)) {
@@ -91187,7 +91477,7 @@ function isTargetLossError(error) {
91187
91477
  init_src();
91188
91478
  import { mkdtemp as mkdtemp2, writeFile as writeFile2 } from "fs/promises";
91189
91479
  import { tmpdir as tmpdir4 } from "os";
91190
- import { join as join26 } from "path";
91480
+ import { join as join27 } from "path";
91191
91481
 
91192
91482
  // ../producer/src/services/render/perfSummary.ts
91193
91483
  init_dist2();
@@ -91535,11 +91825,11 @@ function createDrainFrameGuard(args) {
91535
91825
  return buf;
91536
91826
  }
91537
91827
  if (db < verifyMinDb) {
91538
- const dumpDir = await mkdtemp2(join26(tmpdir4(), "hf-de-verify-fail-")).catch(() => null);
91828
+ const dumpDir = await mkdtemp2(join27(tmpdir4(), "hf-de-verify-fail-")).catch(() => null);
91539
91829
  if (dumpDir) {
91540
91830
  await Promise.all([
91541
- writeFile2(join26(dumpDir, `frame-${idx}-de.jpg`), buf),
91542
- writeFile2(join26(dumpDir, `frame-${idx}-truth.jpg`), truth)
91831
+ writeFile2(join27(dumpDir, `frame-${idx}-de.jpg`), buf),
91832
+ writeFile2(join27(dumpDir, `frame-${idx}-truth.jpg`), truth)
91543
91833
  ]).catch(() => {
91544
91834
  });
91545
91835
  }
@@ -91977,7 +92267,7 @@ async function runCaptureStreamingStage(input) {
91977
92267
 
91978
92268
  // ../producer/src/services/render/stages/captureSegmentedStage.ts
91979
92269
  function segmentOutputPath(segmentDir, index) {
91980
- return join27(segmentDir, `segment_${String(index).padStart(5, "0")}.mp4`);
92270
+ return join28(segmentDir, `segment_${String(index).padStart(5, "0")}.mp4`);
91981
92271
  }
91982
92272
  function segmentEncoderOptions(base2, segment) {
91983
92273
  return {
@@ -92223,7 +92513,7 @@ async function runCaptureSegmentedStage(input) {
92223
92513
  const { log, dedupPerfs, assertNotAborted } = input;
92224
92514
  const deps = { ...DEFAULT_DEPS, ...input.deps };
92225
92515
  const segments = planSegments(input.totalFrames, input.segmentFrames);
92226
- const segmentDir = input.segmentDir ?? join27(input.workDir, "segments");
92516
+ const segmentDir = input.segmentDir ?? join28(input.workDir, "segments");
92227
92517
  mkdirSync11(segmentDir, { recursive: true });
92228
92518
  const skip = input.completedSegments ?? /* @__PURE__ */ new Set();
92229
92519
  const pending = segments.filter((s) => !skip.has(s.index));
@@ -92295,8 +92585,8 @@ async function runCaptureSegmentedStage(input) {
92295
92585
 
92296
92586
  // ../producer/src/services/render/segmentManifest.ts
92297
92587
  import { createHash as createHash5 } from "crypto";
92298
- import { existsSync as existsSync21, mkdirSync as mkdirSync12, readFileSync as readFileSync9, renameSync as renameSync4, statSync as statSync9, writeFileSync as writeFileSync8 } from "fs";
92299
- import { join as join28 } from "path";
92588
+ import { existsSync as existsSync21, mkdirSync as mkdirSync12, readFileSync as readFileSync10, renameSync as renameSync4, statSync as statSync9, writeFileSync as writeFileSync8 } from "fs";
92589
+ import { join as join29 } from "path";
92300
92590
  var MANIFEST_FILENAME = "segments.json";
92301
92591
  function computeSegmentPlanHash(input) {
92302
92592
  const ordered = [
@@ -92319,7 +92609,7 @@ function computeSegmentPlanHash(input) {
92319
92609
  return createHash5("sha256").update(ordered).digest("hex").slice(0, 16);
92320
92610
  }
92321
92611
  function segmentDirFor(projectRendersDir, planHash) {
92322
- return join28(projectRendersDir, ".hf-segments", planHash);
92612
+ return join29(projectRendersDir, ".hf-segments", planHash);
92323
92613
  }
92324
92614
  function hasNumber(value, key2) {
92325
92615
  return key2 in value && typeof Reflect.get(value, key2) === "number";
@@ -92337,10 +92627,10 @@ function isManifest2(value) {
92337
92627
  return Reflect.get(value, "version") === 1 && hasString(value, "planHash") && hasNumber(value, "totalFrames") && hasNumber(value, "segmentFrames") && Array.isArray(completed) && completed.every(isEntry);
92338
92628
  }
92339
92629
  function readSegmentManifest(segmentDir) {
92340
- const path = join28(segmentDir, MANIFEST_FILENAME);
92630
+ const path = join29(segmentDir, MANIFEST_FILENAME);
92341
92631
  if (!existsSync21(path)) return null;
92342
92632
  try {
92343
- const parsed = JSON.parse(readFileSync9(path, "utf-8"));
92633
+ const parsed = JSON.parse(readFileSync10(path, "utf-8"));
92344
92634
  return isManifest2(parsed) ? parsed : null;
92345
92635
  } catch {
92346
92636
  return null;
@@ -92348,9 +92638,9 @@ function readSegmentManifest(segmentDir) {
92348
92638
  }
92349
92639
  function writeSegmentManifest(segmentDir, manifest) {
92350
92640
  mkdirSync12(segmentDir, { recursive: true });
92351
- const tmp = join28(segmentDir, `${MANIFEST_FILENAME}.${process.pid}.tmp`);
92641
+ const tmp = join29(segmentDir, `${MANIFEST_FILENAME}.${process.pid}.tmp`);
92352
92642
  writeFileSync8(tmp, JSON.stringify(manifest, null, 2), "utf-8");
92353
- renameSync4(tmp, join28(segmentDir, MANIFEST_FILENAME));
92643
+ renameSync4(tmp, join29(segmentDir, MANIFEST_FILENAME));
92354
92644
  }
92355
92645
  async function probeSegmentFrameCount(path, probe2) {
92356
92646
  try {
@@ -92458,7 +92748,7 @@ function resolveVideoCaptureBeyondViewport(videoCount) {
92458
92748
  // ../producer/src/services/render/captureCost.ts
92459
92749
  init_dist2();
92460
92750
  init_src();
92461
- import { join as join29 } from "path";
92751
+ import { join as join30 } from "path";
92462
92752
  var CAPTURE_CALIBRATION_TARGET_MS = 600;
92463
92753
  var MAX_MEASURED_CAPTURE_COST_MULTIPLIER = 8;
92464
92754
  var CAPTURE_CALIBRATION_PROTOCOL_TIMEOUT_MS = 3e4;
@@ -92694,7 +92984,7 @@ async function runCaptureCalibration(input) {
92694
92984
  });
92695
92985
  let calibration;
92696
92986
  try {
92697
- calibration = await runOneCalibration(join29(workDir, "capture-calibration"), calibrationCfg);
92987
+ calibration = await runOneCalibration(join30(workDir, "capture-calibration"), calibrationCfg);
92698
92988
  } catch (error) {
92699
92989
  const shouldFallback = !forceScreenshot && shouldFallbackToScreenshotAfterCalibrationError(error);
92700
92990
  if (!shouldFallback) {
@@ -92727,7 +93017,7 @@ async function runCaptureCalibration(input) {
92727
93017
  const screenshotCfg = createCaptureCalibrationConfig({ ...cfg, forceScreenshot: true });
92728
93018
  try {
92729
93019
  calibration = await runOneCalibration(
92730
- join29(workDir, "capture-calibration-screenshot"),
93020
+ join30(workDir, "capture-calibration-screenshot"),
92731
93021
  screenshotCfg
92732
93022
  );
92733
93023
  } catch (fallbackError) {
@@ -93152,7 +93442,7 @@ function countAuthoredTimedClips(html) {
93152
93442
 
93153
93443
  // ../producer/src/services/render/stages/compileStage.ts
93154
93444
  init_dist2();
93155
- import { join as join35 } from "path";
93445
+ import { join as join36 } from "path";
93156
93446
 
93157
93447
  // ../producer/src/services/htmlCompiler.ts
93158
93448
  init_esm10();
@@ -93162,8 +93452,8 @@ init_compiler();
93162
93452
  init_subCompositionValidity();
93163
93453
  init_assetResolution();
93164
93454
  import { createHash as createHash10 } from "crypto";
93165
- import { createReadStream as createReadStream4, existsSync as existsSync27, mkdirSync as mkdirSync16, readFileSync as readFileSync13 } from "fs";
93166
- import { join as join34, dirname as dirname15, resolve as resolve12, basename as basename6, relative as relative4 } from "path";
93455
+ import { createReadStream as createReadStream4, existsSync as existsSync27, mkdirSync as mkdirSync16, readFileSync as readFileSync14 } from "fs";
93456
+ import { join as join35, dirname as dirname16, resolve as resolve12, basename as basename6, relative as relative4 } from "path";
93167
93457
 
93168
93458
  // ../producer/src/services/renderMediaCollector.ts
93169
93459
  init_esm10();
@@ -93266,9 +93556,9 @@ init_src();
93266
93556
 
93267
93557
  // ../producer/src/services/deterministicFonts.ts
93268
93558
  import { createHash as createHash8 } from "crypto";
93269
- import { existsSync as existsSync24, mkdirSync as mkdirSync14, mkdtempSync as mkdtempSync9, readFileSync as readFileSync11, writeFileSync as writeFileSync10 } from "fs";
93559
+ import { existsSync as existsSync24, mkdirSync as mkdirSync14, mkdtempSync as mkdtempSync9, readFileSync as readFileSync12, writeFileSync as writeFileSync10 } from "fs";
93270
93560
  import { homedir as homedir5, tmpdir as tmpdir6 } from "os";
93271
- import { join as join32 } from "path";
93561
+ import { join as join33 } from "path";
93272
93562
 
93273
93563
  // ../core/dist/fonts/aliases.js
93274
93564
  init_dist();
@@ -93277,7 +93567,7 @@ init_dist();
93277
93567
  import { execFileSync as execFileSync2 } from "child_process";
93278
93568
  import { existsSync as existsSync22, lstatSync as lstatSync4, readdirSync as readdirSync9, realpathSync as realpathSync3 } from "fs";
93279
93569
  import { homedir as homedir3, platform as platform2 } from "os";
93280
- import { join as join30, resolve as resolve10 } from "path";
93570
+ import { join as join31, resolve as resolve10 } from "path";
93281
93571
  var SYSTEM_FONT_SIZE_LIMIT = 5 * 1024 * 1024;
93282
93572
  var PROFILER_TIMEOUT_MS = 5e3;
93283
93573
  var FONT_EXT_RE = /\.(otf|ttf|ttc|woff2?)$/i;
@@ -93374,7 +93664,7 @@ function fontDirectories() {
93374
93664
  const home = homedir3();
93375
93665
  if (platform2() === "darwin") {
93376
93666
  return [
93377
- join30(home, "Library", "Fonts"),
93667
+ join31(home, "Library", "Fonts"),
93378
93668
  "/Library/Fonts",
93379
93669
  "/System/Library/Fonts",
93380
93670
  "/System/Library/Fonts/Supplemental"
@@ -93382,13 +93672,13 @@ function fontDirectories() {
93382
93672
  }
93383
93673
  if (platform2() === "win32") {
93384
93674
  return [
93385
- join30(process.env.WINDIR || "C:\\Windows", "Fonts"),
93386
- join30(process.env.LOCALAPPDATA || join30(homedir3(), "AppData", "Local"), "Microsoft", "Windows", "Fonts")
93675
+ join31(process.env.WINDIR || "C:\\Windows", "Fonts"),
93676
+ join31(process.env.LOCALAPPDATA || join31(homedir3(), "AppData", "Local"), "Microsoft", "Windows", "Fonts")
93387
93677
  ];
93388
93678
  }
93389
93679
  return [
93390
- join30(home, ".fonts"),
93391
- join30(home, ".local", "share", "fonts"),
93680
+ join31(home, ".fonts"),
93681
+ join31(home, ".local", "share", "fonts"),
93392
93682
  "/usr/local/share/fonts",
93393
93683
  "/usr/share/fonts"
93394
93684
  ];
@@ -93399,7 +93689,7 @@ function collectFontFileEntries(dir, depth = 0) {
93399
93689
  const entries2 = [];
93400
93690
  try {
93401
93691
  for (const entry of readdirSync9(dir, { withFileTypes: true })) {
93402
- const fullPath = join30(dir, entry.name);
93692
+ const fullPath = join31(dir, entry.name);
93403
93693
  if (entry.isDirectory()) {
93404
93694
  entries2.push(...collectFontFileEntries(fullPath, depth + 1));
93405
93695
  continue;
@@ -94026,7 +94316,7 @@ async function buildFontFaceCss(requestedFamilies, options, fontText) {
94026
94316
  if (variants.length > 0) {
94027
94317
  let totalBytes = 0;
94028
94318
  for (const variant of variants) {
94029
- const fontBuffer = readFileSync11(variant.path);
94319
+ const fontBuffer = readFileSync12(variant.path);
94030
94320
  totalBytes += fontBuffer.length;
94031
94321
  const dataUri = await fontToDataUri(fontBuffer, variant.format);
94032
94322
  rules.push(buildFontFaceRule(originalCaseFamily, dataUri, variant.weight, variant.style));
@@ -94072,10 +94362,10 @@ function resolveFontCacheRoot() {
94072
94362
  return process.env.HYPERFRAMES_FONT_CACHE_DIR;
94073
94363
  }
94074
94364
  if (process.env.AWS_LAMBDA_FUNCTION_NAME) {
94075
- lambdaFontCacheRoot ??= mkdtempSync9(join32(tmpdir6(), "hyperframes-fonts-"));
94365
+ lambdaFontCacheRoot ??= mkdtempSync9(join33(tmpdir6(), "hyperframes-fonts-"));
94076
94366
  return lambdaFontCacheRoot;
94077
94367
  }
94078
- return join32(homedir5(), ".cache", "hyperframes", "fonts");
94368
+ return join33(homedir5(), ".cache", "hyperframes", "fonts");
94079
94369
  }
94080
94370
  var WOFF2_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36";
94081
94371
  function fontSlug(familyName) {
@@ -94083,14 +94373,14 @@ function fontSlug(familyName) {
94083
94373
  }
94084
94374
  var ephemeralFontCacheRoot;
94085
94375
  function fontCacheDir(slug) {
94086
- const dir = join32(resolveFontCacheRoot(), slug);
94376
+ const dir = join33(resolveFontCacheRoot(), slug);
94087
94377
  if (!existsSync24(dir)) {
94088
94378
  try {
94089
94379
  mkdirSync14(dir, { recursive: true });
94090
94380
  } catch {
94091
94381
  const firstFallback = ephemeralFontCacheRoot === void 0;
94092
- ephemeralFontCacheRoot ??= mkdtempSync9(join32(tmpdir6(), "hyperframes-fonts-"));
94093
- const fallback = join32(ephemeralFontCacheRoot, slug);
94382
+ ephemeralFontCacheRoot ??= mkdtempSync9(join33(tmpdir6(), "hyperframes-fonts-"));
94383
+ const fallback = join33(ephemeralFontCacheRoot, slug);
94094
94384
  mkdirSync14(fallback, { recursive: true });
94095
94385
  if (firstFallback) {
94096
94386
  defaultLogger.warn(
@@ -94106,7 +94396,7 @@ function subsetToken(woff2Url) {
94106
94396
  return createHash8("sha1").update(woff2Url).digest("hex").slice(0, 12);
94107
94397
  }
94108
94398
  function cachedWoff2Path(slug, weight, style, subset) {
94109
- return join32(fontCacheDir(slug), `${weight}-${style}-${subset}.woff2`);
94399
+ return join33(fontCacheDir(slug), `${weight}-${style}-${subset}.woff2`);
94110
94400
  }
94111
94401
  var FONT_FETCH_FAILED = "FONT_FETCH_FAILED";
94112
94402
  var FONT_FETCH_UNAVAILABLE = "FONT_FETCH_UNAVAILABLE";
@@ -94233,7 +94523,7 @@ async function fetchFontResource(url, init, readBody, familyName, what, options)
94233
94523
  }
94234
94524
  async function ensureWoff2DataUri(cachePath, woff2Url, familyName, weight, style, options) {
94235
94525
  try {
94236
- return `data:font/woff2;base64,${readFileSync11(cachePath).toString("base64")}`;
94526
+ return `data:font/woff2;base64,${readFileSync12(cachePath).toString("base64")}`;
94237
94527
  } catch {
94238
94528
  }
94239
94529
  const woff2What = `Google Fonts woff2 (${weight}/${style})`;
@@ -94258,7 +94548,7 @@ async function ensureWoff2DataUri(cachePath, woff2Url, familyName, weight, style
94258
94548
  return null;
94259
94549
  }
94260
94550
  }
94261
- return `data:font/woff2;base64,${readFileSync11(cachePath).toString("base64")}`;
94551
+ return `data:font/woff2;base64,${readFileSync12(cachePath).toString("base64")}`;
94262
94552
  }
94263
94553
  var googleFontCssCache = /* @__PURE__ */ new Map();
94264
94554
  function raceAgainstAbort(promise, signal) {
@@ -94539,12 +94829,12 @@ import {
94539
94829
  copyFileSync as copyFileSync4,
94540
94830
  existsSync as existsSync25,
94541
94831
  mkdirSync as mkdirSync15,
94542
- readFileSync as readFileSync12,
94832
+ readFileSync as readFileSync13,
94543
94833
  renameSync as renameSync6,
94544
94834
  rmSync as rmSync12,
94545
94835
  statSync as statSync10
94546
94836
  } from "fs";
94547
- import { dirname as dirname14, isAbsolute as isAbsolute4, join as join33, resolve as resolve11 } from "path";
94837
+ import { dirname as dirname15, isAbsolute as isAbsolute4, join as join34, resolve as resolve11 } from "path";
94548
94838
  var PREPARED_GIF_SUBDIR = "_animated_gif";
94549
94839
  var CACHE_SCHEMA = "hfgif-v1";
94550
94840
  function splitUrlSuffix(src) {
@@ -94697,11 +94987,11 @@ async function runAnimatedGifTranscode(request) {
94697
94987
  throw result.error ?? new Error(`Animated GIF transcode failed (${result.exitCode}): ${result.stderr.slice(-500)}`);
94698
94988
  }
94699
94989
  async function ensurePreparedWebm(input) {
94700
- if (!existsSync25(dirname14(input.cachePath))) {
94701
- mkdirSync15(dirname14(input.cachePath), { recursive: true });
94990
+ if (!existsSync25(dirname15(input.cachePath))) {
94991
+ mkdirSync15(dirname15(input.cachePath), { recursive: true });
94702
94992
  }
94703
- if (!existsSync25(dirname14(input.outputPath))) {
94704
- mkdirSync15(dirname14(input.outputPath), { recursive: true });
94993
+ if (!existsSync25(dirname15(input.outputPath))) {
94994
+ mkdirSync15(dirname15(input.outputPath), { recursive: true });
94705
94995
  }
94706
94996
  if (!isUsableFile(input.cachePath)) {
94707
94997
  const tmpPath = `${input.cachePath}.tmp-${process.pid}-${Date.now()}`;
@@ -94784,7 +95074,7 @@ function replaceImageWithVideo(input) {
94784
95074
  return video;
94785
95075
  }
94786
95076
  async function prepareAnimatedGifInputs(html, options) {
94787
- const outputDir = options.outputDir ?? join33(options.downloadDir, PREPARED_GIF_SUBDIR);
95077
+ const outputDir = options.outputDir ?? join34(options.downloadDir, PREPARED_GIF_SUBDIR);
94788
95078
  const outputSrcPrefix = normalizeRelPath(options.outputSrcPrefix ?? PREPARED_GIF_SUBDIR);
94789
95079
  const cacheDir = options.cacheDir ?? outputDir;
94790
95080
  const { document: document2 } = parseHTML(html);
@@ -94798,7 +95088,7 @@ async function prepareAnimatedGifInputs(html, options) {
94798
95088
  if (!hasGifExtension(src)) continue;
94799
95089
  const sourcePath = resolveGifSourcePath(src, options);
94800
95090
  if (!sourcePath) continue;
94801
- const bytes = readFileSync12(sourcePath);
95091
+ const bytes = readFileSync13(sourcePath);
94802
95092
  const metadata = parseAnimatedGifMetadata(bytes);
94803
95093
  if (!metadata?.animated) continue;
94804
95094
  const loop = resolveLoop(metadata, readLoopOverride(img));
@@ -94806,8 +95096,8 @@ async function prepareAnimatedGifInputs(html, options) {
94806
95096
  const { loopIterations, padSeconds } = resolvePreparedPlayback(metadata, loop, windowSeconds);
94807
95097
  const hash2 = computePreparedGifHash(bytes, loopIterations, padSeconds);
94808
95098
  const filename = `${CACHE_SCHEMA}-${hash2.slice(0, 24)}.webm`;
94809
- const cachePath = join33(cacheDir, filename);
94810
- const outputPath = join33(outputDir, filename);
95099
+ const cachePath = join34(cacheDir, filename);
95100
+ const outputPath = join34(outputDir, filename);
94811
95101
  const outputSrc = `${outputSrcPrefix}/${filename}`;
94812
95102
  await ensurePreparedWebm({
94813
95103
  sourcePath,
@@ -95338,7 +95628,7 @@ function assertSubCompositionsUsable(html, projectDir, visited = /* @__PURE__ */
95338
95628
  problems.push({ srcPath, detail: "the file does not exist" });
95339
95629
  continue;
95340
95630
  }
95341
- const fileHtml = readFileSync13(filePath, "utf-8");
95631
+ const fileHtml = readFileSync14(filePath, "utf-8");
95342
95632
  const validity = checkSubCompositionUsability(fileHtml, parseSubCompHtmlForValidity);
95343
95633
  if (!validity.ok) {
95344
95634
  problems.push({
@@ -95477,7 +95767,7 @@ async function resolveMediaDuration2(src, mediaStart, playbackRate, baseDir, dow
95477
95767
  return { duration: null, resolvedPath: src };
95478
95768
  }
95479
95769
  } else if (!filePath.startsWith("/")) {
95480
- filePath = join34(baseDir, filePath);
95770
+ filePath = join35(baseDir, filePath);
95481
95771
  }
95482
95772
  if (!existsSync27(filePath)) {
95483
95773
  return { duration: null, resolvedPath: filePath };
@@ -95615,7 +95905,7 @@ async function parseSubCompositions(html, projectDir, downloadDir, visited = /*
95615
95905
  if (!existsSync27(filePath)) {
95616
95906
  continue;
95617
95907
  }
95618
- const rawSubHtml = readFileSync13(filePath, "utf-8");
95908
+ const rawSubHtml = readFileSync14(filePath, "utf-8");
95619
95909
  const nestedVisited = new Set(visited);
95620
95910
  nestedVisited.add(filePath);
95621
95911
  workItems.push({ srcPath, filePath, rawSubHtml, nestedVisited });
@@ -95624,7 +95914,7 @@ async function parseSubCompositions(html, projectDir, downloadDir, visited = /*
95624
95914
  workItems.map(async (item) => {
95625
95915
  const { html: compiledSub } = await compileHtmlFile(
95626
95916
  item.rawSubHtml,
95627
- dirname15(item.filePath),
95917
+ dirname16(item.filePath),
95628
95918
  downloadDir
95629
95919
  );
95630
95920
  const nested = await parseSubCompositions(
@@ -95799,7 +96089,7 @@ function inlineSubCompositions2(html, subCompositions, projectDir, variableOverr
95799
96089
  if (!compHtml) {
95800
96090
  const filePath = resolve12(projectDir, srcPath);
95801
96091
  if (existsSync27(filePath)) {
95802
- compHtml = readFileSync13(filePath, "utf-8");
96092
+ compHtml = readFileSync14(filePath, "utf-8");
95803
96093
  }
95804
96094
  }
95805
96095
  return compHtml;
@@ -95856,17 +96146,33 @@ function inlineSubCompositions2(html, subCompositions, projectDir, variableOverr
95856
96146
  styleEl.textContent = result.styles.join("\n\n");
95857
96147
  head.appendChild(styleEl);
95858
96148
  }
96149
+ const isHoisted = (item) => Boolean(item.integrity?.trim()) || isNonRelativeUrl(item.src);
95859
96150
  if (body) {
95860
96151
  for (const item of result.scriptItems) {
95861
- if (item.kind === "external") ensureExternalScriptTag(document2, item.src, item);
96152
+ if (item.kind === "external" && isHoisted(item)) {
96153
+ ensureExternalScriptTag(document2, item.src, item);
96154
+ }
95862
96155
  }
95863
96156
  }
95864
96157
  const variablesByCompScript = buildVariablesByCompScript(result.variablesByComp);
95865
- const inlineScripts = variablesByCompScript ? [variablesByCompScript, ...result.scripts] : result.scripts;
95866
- if (inlineScripts.length && body) {
95867
- const scriptEl = document2.createElement("script");
95868
- scriptEl.textContent = inlineScripts.join("\n;\n");
95869
- body.appendChild(scriptEl);
96158
+ if (body) {
96159
+ let pending = variablesByCompScript ? [variablesByCompScript] : [];
96160
+ const flushInline = () => {
96161
+ if (!pending.length) return;
96162
+ const scriptEl = document2.createElement("script");
96163
+ scriptEl.textContent = pending.join("\n;\n");
96164
+ body.appendChild(scriptEl);
96165
+ pending = [];
96166
+ };
96167
+ for (const item of result.scriptItems) {
96168
+ if (item.kind === "inline") {
96169
+ pending.push(item.content);
96170
+ } else if (!isHoisted(item)) {
96171
+ flushInline();
96172
+ ensureExternalScriptTag(document2, item.src, item);
96173
+ }
96174
+ }
96175
+ flushInline();
95870
96176
  }
95871
96177
  emitRootCompositionVariableStyles(
95872
96178
  document2,
@@ -96079,7 +96385,7 @@ async function localizeRemoteMediaSources(html, downloadDir) {
96079
96385
  return downloadAndRewriteUrls(
96080
96386
  urlSet,
96081
96387
  html,
96082
- join34(downloadDir, REMOTE_MEDIA_SUBDIR),
96388
+ join35(downloadDir, REMOTE_MEDIA_SUBDIR),
96083
96389
  "Remote media download failed",
96084
96390
  "Localized remote media source(s)"
96085
96391
  );
@@ -96094,7 +96400,7 @@ async function localizeRemoteImageSources(html, downloadDir) {
96094
96400
  return downloadAndRewriteUrls(
96095
96401
  urlSet,
96096
96402
  html,
96097
- join34(downloadDir, REMOTE_MEDIA_SUBDIR),
96403
+ join35(downloadDir, REMOTE_MEDIA_SUBDIR),
96098
96404
  "Remote image download failed",
96099
96405
  "Localized remote image source(s)"
96100
96406
  );
@@ -96110,7 +96416,7 @@ async function localizeRemoteBackgroundImages(html, downloadDir) {
96110
96416
  return downloadAndRewriteUrls(
96111
96417
  urlSet,
96112
96418
  html,
96113
- join34(downloadDir, REMOTE_MEDIA_SUBDIR),
96419
+ join35(downloadDir, REMOTE_MEDIA_SUBDIR),
96114
96420
  "Remote background-image download failed",
96115
96421
  "Localized remote background-image(s)",
96116
96422
  // Quoted url('..')/url("..") are rewritten by downloadAndRewriteUrls' default
@@ -96245,7 +96551,7 @@ async function localizeRemoteFontFaces(html, downloadDir) {
96245
96551
  return downloadAndRewriteUrls(
96246
96552
  urlSet,
96247
96553
  processed,
96248
- join34(downloadDir, REMOTE_MEDIA_SUBDIR),
96554
+ join35(downloadDir, REMOTE_MEDIA_SUBDIR),
96249
96555
  "Remote font download failed",
96250
96556
  "Localized remote font face(s)",
96251
96557
  (h, url, relPath) => h.replaceAll(`url(${url})`, `url("${relPath}")`)
@@ -96369,7 +96675,7 @@ function rebaseDirectEntryAssetPaths(html, projectDir, htmlPath) {
96369
96675
  }
96370
96676
  async function compileForRender(projectDir, htmlPath, downloadDir, options = {}) {
96371
96677
  const entryHtml = rebaseDirectEntryAssetPaths(
96372
- readFileSync13(htmlPath, "utf-8"),
96678
+ readFileSync14(htmlPath, "utf-8"),
96373
96679
  projectDir,
96374
96680
  htmlPath
96375
96681
  );
@@ -96860,13 +97166,13 @@ async function runCompileStage(input) {
96860
97166
  abortSignal
96861
97167
  } = input;
96862
97168
  const compileStart = Date.now();
96863
- const compiled = await compileForRender(projectDir, htmlPath, join35(workDir, "downloads"), {
97169
+ const compiled = await compileForRender(projectDir, htmlPath, join36(workDir, "downloads"), {
96864
97170
  log,
96865
97171
  failClosedFontFetch: failClosedFontFetch === true,
96866
97172
  allowSystemFontCapture,
96867
97173
  abortSignal,
96868
97174
  variables: input.variables,
96869
- animatedGifCacheDir: cfg.extractCacheDir ? join35(cfg.extractCacheDir, "animated-gif") : void 0,
97175
+ animatedGifCacheDir: cfg.extractCacheDir ? join36(cfg.extractCacheDir, "animated-gif") : void 0,
96870
97176
  ffmpegProcessTimeout: cfg.ffmpegProcessTimeout
96871
97177
  });
96872
97178
  assertNotAborted();
@@ -96928,7 +97234,7 @@ async function runCompileStage(input) {
96928
97234
  };
96929
97235
  await preflightCompositionAssetMediaTypes({
96930
97236
  projectDir,
96931
- compiledDir: join35(workDir, "compiled"),
97237
+ compiledDir: join36(workDir, "compiled"),
96932
97238
  composition,
96933
97239
  signal: abortSignal
96934
97240
  });
@@ -96977,7 +97283,7 @@ init_esm10();
96977
97283
  init_src();
96978
97284
  init_dist2();
96979
97285
  init_dist();
96980
- import { join as join36 } from "path";
97286
+ import { join as join37 } from "path";
96981
97287
 
96982
97288
  // ../producer/src/services/render/stages/probeFailures.ts
96983
97289
  var NETWORK_FAILURE_PATTERN = /404|ERR_NAME_NOT_RESOLVED|ERR_CONNECTION_REFUSED|net::ERR_/i;
@@ -97110,7 +97416,7 @@ async function runProbeStage(input) {
97110
97416
  });
97111
97417
  fileServer = await createFileServer2({
97112
97418
  projectDir,
97113
- compiledDir: join36(workDir, "compiled"),
97419
+ compiledDir: join37(workDir, "compiled"),
97114
97420
  port: 0,
97115
97421
  preHeadScripts: [VIRTUAL_TIME_SHIM],
97116
97422
  fps: job.config.fps
@@ -97136,7 +97442,7 @@ async function runProbeStage(input) {
97136
97442
  log.info("Creating capture session...", { attempt, maxAttempts: PROBE_MAX_ATTEMPTS });
97137
97443
  probeSession = await createCaptureSession(
97138
97444
  fileServer.url,
97139
- join36(workDir, "probe"),
97445
+ join37(workDir, "probe"),
97140
97446
  captureOpts,
97141
97447
  null,
97142
97448
  probeCfg
@@ -97221,7 +97527,7 @@ async function runProbeStage(input) {
97221
97527
  });
97222
97528
  probeSession = await createCaptureSession(
97223
97529
  fileServer.url,
97224
- join36(workDir, "probe-screenshot"),
97530
+ join37(workDir, "probe-screenshot"),
97225
97531
  captureOpts,
97226
97532
  null,
97227
97533
  { ...probeCfg, forceScreenshot: true }
@@ -97257,7 +97563,7 @@ async function runProbeStage(input) {
97257
97563
  compiled,
97258
97564
  resolutions,
97259
97565
  projectDir,
97260
- join36(workDir, "downloads")
97566
+ join37(workDir, "downloads")
97261
97567
  );
97262
97568
  assertNotAborted();
97263
97569
  composition.videos = compiled.videos;
@@ -97436,7 +97742,7 @@ async function runProbeStage(input) {
97436
97742
  try {
97437
97743
  await preflightCompositionAssetMediaTypes({
97438
97744
  projectDir,
97439
- compiledDir: join36(workDir, "compiled"),
97745
+ compiledDir: join37(workDir, "compiled"),
97440
97746
  composition,
97441
97747
  signal: abortSignal
97442
97748
  });
@@ -97564,7 +97870,7 @@ function validateRenderDuration(input) {
97564
97870
  // ../producer/src/services/render/stages/extractVideosStage.ts
97565
97871
  init_src();
97566
97872
  import { existsSync as existsSync28 } from "fs";
97567
- import { join as join37 } from "path";
97873
+ import { join as join38 } from "path";
97568
97874
 
97569
97875
  // ../producer/src/services/render/extractionFailureMetadata.ts
97570
97876
  function stringOrEmpty(value) {
@@ -97857,7 +98163,7 @@ async function runExtractVideosStage(input) {
97857
98163
  // because short boundary counts can differ by one frame.
97858
98164
  {
97859
98165
  fps: job.config.fps,
97860
- outputDir: join37(compiledDir, "__hyperframes_video_frames"),
98166
+ outputDir: join38(compiledDir, "__hyperframes_video_frames"),
97861
98167
  format: job.config.videoFrameFormat ?? "auto",
97862
98168
  toneMapHdrToSdr: job.config.hdrMode === "force-sdr",
97863
98169
  timelineEnd: composition.duration,
@@ -97923,7 +98229,7 @@ function appendAutoDetectedVideoAudio(composition, extracted) {
97923
98229
 
97924
98230
  // ../producer/src/services/render/stages/audioStage.ts
97925
98231
  init_src();
97926
- import { join as join38 } from "path";
98232
+ import { join as join39 } from "path";
97927
98233
  async function runAudioStage(input) {
97928
98234
  const {
97929
98235
  projectDir,
@@ -97938,7 +98244,7 @@ async function runAudioStage(input) {
97938
98244
  log
97939
98245
  } = input;
97940
98246
  const stage3Start = Date.now();
97941
- const audioOutputPath = join38(workDir, MIXED_AUDIO_FILENAME);
98247
+ const audioOutputPath = join39(workDir, MIXED_AUDIO_FILENAME);
97942
98248
  let hasAudio = false;
97943
98249
  let audioError;
97944
98250
  let audioFailures;
@@ -97948,7 +98254,7 @@ async function runAudioStage(input) {
97948
98254
  audioResult = await processCompositionAudio(
97949
98255
  audios,
97950
98256
  projectDir,
97951
- join38(workDir, "audio-work"),
98257
+ join39(workDir, "audio-work"),
97952
98258
  audioOutputPath,
97953
98259
  duration,
97954
98260
  abortSignal,
@@ -98020,7 +98326,7 @@ async function runAudioStage(input) {
98020
98326
  // ../producer/src/services/render/stages/captureStage.ts
98021
98327
  init_src();
98022
98328
  import { existsSync as existsSync29, readdirSync as readdirSync10, statfsSync as statfsSync2 } from "fs";
98023
- import { join as join39 } from "path";
98329
+ import { join as join40 } from "path";
98024
98330
  function shouldAllowAdaptiveCaptureRetry(workerCount, _explicitlyConfigured) {
98025
98331
  return workerCount > 1;
98026
98332
  }
@@ -98075,13 +98381,13 @@ function measureCaptureFrameBytes(workDir, framesDir) {
98075
98381
  if (!existsSync29(workDir)) return total;
98076
98382
  for (const attempt of readdirSync10(workDir)) {
98077
98383
  if (/^retry-\d+-batch-\d+-worker-\d+$/.test(attempt)) {
98078
- total += sampleDirectoryBytes(join39(workDir, attempt));
98384
+ total += sampleDirectoryBytes(join40(workDir, attempt));
98079
98385
  continue;
98080
98386
  }
98081
98387
  if (!/^capture-attempt-\d+$/.test(attempt)) continue;
98082
- const attemptDir = join39(workDir, attempt);
98388
+ const attemptDir = join40(workDir, attempt);
98083
98389
  for (const name of readdirSync10(attemptDir)) {
98084
- if (/^worker-\d+$/.test(name)) total += sampleDirectoryBytes(join39(attemptDir, name));
98390
+ if (/^worker-\d+$/.test(name)) total += sampleDirectoryBytes(join40(attemptDir, name));
98085
98391
  }
98086
98392
  }
98087
98393
  return total;
@@ -98358,7 +98664,7 @@ async function captureSessionFrames(session, { input, rangeStart, rangeEnd, resu
98358
98664
  init_src();
98359
98665
  init_dist2();
98360
98666
  import { existsSync as existsSync31, mkdirSync as mkdirSync17 } from "fs";
98361
- import { join as join43 } from "path";
98667
+ import { join as join44 } from "path";
98362
98668
 
98363
98669
  // ../producer/src/services/hdrImageTransferCache.ts
98364
98670
  init_src();
@@ -98422,7 +98728,7 @@ function createHdrImageTransferCache(options = {}) {
98422
98728
 
98423
98729
  // ../producer/src/services/render/stages/captureHdrSequentialLoop.ts
98424
98730
  init_src();
98425
- import { join as join40 } from "path";
98731
+ import { join as join41 } from "path";
98426
98732
  async function runSequentialLayeredFrameLoop(input) {
98427
98733
  const {
98428
98734
  job,
@@ -98543,7 +98849,7 @@ async function runSequentialLayeredFrameLoop(input) {
98543
98849
  );
98544
98850
  if (debugDumpEnabled && debugDumpDir && i % 30 === 0) {
98545
98851
  writeFileExclusiveSync(
98546
- join40(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
98852
+ join41(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
98547
98853
  normalCanvas
98548
98854
  );
98549
98855
  }
@@ -98575,13 +98881,13 @@ async function runSequentialLayeredFrameLoop(input) {
98575
98881
 
98576
98882
  // ../producer/src/services/render/stages/captureHdrHybridLoop.ts
98577
98883
  init_src();
98578
- import { join as join42 } from "path";
98884
+ import { join as join43 } from "path";
98579
98885
 
98580
98886
  // ../producer/src/services/shaderTransitionWorkerPool.ts
98581
98887
  import { Worker as Worker2 } from "worker_threads";
98582
- import { fileURLToPath as fileURLToPath4, pathToFileURL as pathToFileURL2 } from "url";
98583
- import { dirname as dirname16, join as join41 } from "path";
98584
- import { createRequire as createRequire2 } from "module";
98888
+ import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL2 } from "url";
98889
+ import { dirname as dirname17, join as join42 } from "path";
98890
+ import { createRequire } from "module";
98585
98891
  import { existsSync as existsSync30 } from "fs";
98586
98892
  import { cpus as cpus3 } from "os";
98587
98893
  function resolveWorkerEntry(explicit) {
@@ -98593,10 +98899,10 @@ function resolveWorkerEntry(explicit) {
98593
98899
  const isTs = override.endsWith(".ts");
98594
98900
  return { path: override, isTs };
98595
98901
  }
98596
- const moduleDir = dirname16(fileURLToPath4(import.meta.url));
98597
- const jsPath = join41(moduleDir, "shaderTransitionWorker.js");
98902
+ const moduleDir = dirname17(fileURLToPath5(import.meta.url));
98903
+ const jsPath = join42(moduleDir, "shaderTransitionWorker.js");
98598
98904
  if (existsSync30(jsPath)) return { path: jsPath, isTs: false };
98599
- const tsPath = join41(moduleDir, "shaderTransitionWorker.ts");
98905
+ const tsPath = join42(moduleDir, "shaderTransitionWorker.ts");
98600
98906
  return { path: tsPath, isTs: true };
98601
98907
  }
98602
98908
  function buildExecArgv(entryIsTs) {
@@ -98607,7 +98913,7 @@ function buildExecArgv(entryIsTs) {
98607
98913
  );
98608
98914
  if (hasLoader) return inherited;
98609
98915
  try {
98610
- const require2 = createRequire2(import.meta.url);
98916
+ const require2 = createRequire(import.meta.url);
98611
98917
  const tsxEsm = require2.resolve("tsx/esm");
98612
98918
  inherited.push("--import", pathToFileURL2(tsxEsm).href);
98613
98919
  } catch {
@@ -98963,7 +99269,7 @@ async function runHybridLayeredFrameLoop(input) {
98963
99269
  );
98964
99270
  if (debugDumpEnabled && debugDumpDir && i % 30 === 0) {
98965
99271
  writeFileExclusiveSync(
98966
- join42(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
99272
+ join43(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
98967
99273
  canvas
98968
99274
  );
98969
99275
  }
@@ -99149,7 +99455,7 @@ async function runCaptureHdrStage(input) {
99149
99455
  if (hdrVideoFrameSources.has(v.id)) hdrVideoEndTimes.set(v.id, v.end);
99150
99456
  }
99151
99457
  const debugDumpEnabled = process.env.KEEP_TEMP === "1";
99152
- const debugDumpDir = debugDumpEnabled ? join43(framesDir, "debug-composite") : null;
99458
+ const debugDumpDir = debugDumpEnabled ? join44(framesDir, "debug-composite") : null;
99153
99459
  if (debugDumpDir && !existsSync31(debugDumpDir)) {
99154
99460
  mkdirSync17(debugDumpDir, { recursive: true });
99155
99461
  }
@@ -99301,10 +99607,10 @@ async function runCaptureHdrStage(input) {
99301
99607
  // ../producer/src/services/render/stages/encodeStage.ts
99302
99608
  init_src();
99303
99609
  import { copyFileSync as copyFileSync5, existsSync as existsSync32, mkdirSync as mkdirSync18, readdirSync as readdirSync11, rmSync as rmSync13, statSync as statSync11 } from "fs";
99304
- import { dirname as dirname17, join as join45 } from "path";
99610
+ import { dirname as dirname18, join as join46 } from "path";
99305
99611
 
99306
99612
  // ../producer/src/services/render/stages/gifEncodeArgs.ts
99307
- import { join as join44 } from "path";
99613
+ import { join as join45 } from "path";
99308
99614
  function fpsToFfmpegArg2(fps) {
99309
99615
  return fps.den === 1 ? String(fps.num) : `${fps.num}/${fps.den}`;
99310
99616
  }
@@ -99316,7 +99622,7 @@ function buildGifPalettegenArgs(input) {
99316
99622
  "-framerate",
99317
99623
  fpsArg,
99318
99624
  "-i",
99319
- join44(input.framesDir, input.framePattern),
99625
+ join45(input.framesDir, input.framePattern),
99320
99626
  "-vf",
99321
99627
  `fps=${fpsArg},palettegen=stats_mode=diff${transparency}`,
99322
99628
  input.palettePath
@@ -99330,7 +99636,7 @@ function buildGifPaletteuseArgs(input) {
99330
99636
  "-framerate",
99331
99637
  fpsArg,
99332
99638
  "-i",
99333
- join44(input.framesDir, input.framePattern),
99639
+ join45(input.framesDir, input.framePattern),
99334
99640
  "-i",
99335
99641
  input.palettePath,
99336
99642
  "-lavfi",
@@ -99450,11 +99756,11 @@ async function runEncodeStage(input) {
99450
99756
  );
99451
99757
  }
99452
99758
  captured.forEach((name, i) => {
99453
- const dst = join45(outputPath, formatExportFrameName(i, "png"));
99454
- copyFileSync5(join45(framesDir, name), dst);
99759
+ const dst = join46(outputPath, formatExportFrameName(i, "png"));
99760
+ copyFileSync5(join46(framesDir, name), dst);
99455
99761
  });
99456
99762
  if (hasAudio && audioOutputPath && existsSync32(audioOutputPath)) {
99457
- copyFileSync5(audioOutputPath, join45(outputPath, MIXED_AUDIO_FILENAME));
99763
+ copyFileSync5(audioOutputPath, join46(outputPath, MIXED_AUDIO_FILENAME));
99458
99764
  log.info(
99459
99765
  `[Render] png-sequence: ${MIXED_AUDIO_FILENAME} sidecar written to ${outputPath}/${MIXED_AUDIO_FILENAME}`
99460
99766
  );
@@ -99473,7 +99779,7 @@ async function runEncodeStage(input) {
99473
99779
  const encodeResult2 = await encodeGifFromDir(framesDir, framePattern2, outputPath, {
99474
99780
  fps: job.config.fps,
99475
99781
  loop,
99476
- palettePath: join45(dirname17(videoOnlyPath), "gif-palette.png"),
99782
+ palettePath: join46(dirname18(videoOnlyPath), "gif-palette.png"),
99477
99783
  preserveAlpha: needsAlpha,
99478
99784
  signal: abortSignal,
99479
99785
  timeout: engineCfg.ffmpegEncodeTimeout
@@ -99540,7 +99846,7 @@ init_src();
99540
99846
  init_dist2();
99541
99847
  import { spawn as spawn5 } from "child_process";
99542
99848
  import { mkdtempSync as mkdtempSync10, renameSync as renameSync7, rmSync as rmSync14 } from "fs";
99543
- import { dirname as dirname18, join as join46 } from "path";
99849
+ import { dirname as dirname19, join as join47 } from "path";
99544
99850
  var AUDIO_DURATION_TOLERANCE_SECONDS = 1e-3;
99545
99851
  var AAC_DELIVERY_TRUE_PEAK_DBFS = -1;
99546
99852
  var AAC_TRUE_PEAK_CORRECTION_HEADROOM_DB = 0.5;
@@ -99741,8 +100047,8 @@ async function padOrTrimAudioToVideoFrameCount(input) {
99741
100047
  async function enforceAacTruePeak(input) {
99742
100048
  let scratchDir;
99743
100049
  try {
99744
- scratchDir = mkdtempSync10(join46(dirname18(input.audioPath), ".true-peak-"));
99745
- const correctedPath = join46(scratchDir, "audio.m4a");
100050
+ scratchDir = mkdtempSync10(join47(dirname19(input.audioPath), ".true-peak-"));
100051
+ const correctedPath = join47(scratchDir, "audio.m4a");
99746
100052
  const correctionTargetDbfs = AAC_DELIVERY_TRUE_PEAK_DBFS - AAC_TRUE_PEAK_CORRECTION_HEADROOM_DB;
99747
100053
  const measurements = [];
99748
100054
  let attenuationDb = 0;
@@ -100045,7 +100351,7 @@ function sampleDirectoryBytes(dir) {
100045
100351
  continue;
100046
100352
  }
100047
100353
  for (const name of entries2) {
100048
- const full2 = join47(current2, name);
100354
+ const full2 = join48(current2, name);
100049
100355
  try {
100050
100356
  const st = statSync12(full2);
100051
100357
  if (st.isDirectory()) {
@@ -100194,7 +100500,7 @@ function findMissingFrameRanges(totalFrames, framesDir, frameExt) {
100194
100500
  const ranges = [];
100195
100501
  let rangeStart = null;
100196
100502
  for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
100197
- const framePath = join47(framesDir, formatCaptureFrameName(frameIndex, frameExt));
100503
+ const framePath = join48(framesDir, formatCaptureFrameName(frameIndex, frameExt));
100198
100504
  const missing = !existsSync33(framePath) || statSync12(framePath).size <= 8;
100199
100505
  if (missing && rangeStart === null) {
100200
100506
  rangeStart = frameIndex;
@@ -100217,7 +100523,7 @@ function buildMissingFrameRetryBatches(ranges, maxWorkers, workDir, attempt, ran
100217
100523
  workerId,
100218
100524
  startFrame: rangeStart + range.startFrame,
100219
100525
  endFrame: rangeStart + range.endFrame,
100220
- outputDir: join47(workDir, `retry-${attempt}-batch-${batchIndex}-worker-${workerId}`),
100526
+ outputDir: join48(workDir, `retry-${attempt}-batch-${batchIndex}-worker-${workerId}`),
100221
100527
  outputFrameOffset: rangeStart
100222
100528
  }));
100223
100529
  batches.push(batch);
@@ -100245,8 +100551,8 @@ function getNextRetryWorkerCount(currentWorkers) {
100245
100551
  return Math.max(1, Math.floor(currentWorkers / 2));
100246
100552
  }
100247
100553
  function resolveRenderWorkDirPrefix(outputPath, jobId, platform3 = process.platform, systemTempDir = tmpdir7()) {
100248
- if (platform3 === "win32") return join47(systemTempDir, "hf-render-");
100249
- return join47(dirname19(outputPath), `work-${jobId}-`);
100554
+ if (platform3 === "win32") return join48(systemTempDir, "hf-render-");
100555
+ return join48(dirname20(outputPath), `work-${jobId}-`);
100250
100556
  }
100251
100557
  var MAX_TRANSIENT_CAPTURE_RETRIES = 1;
100252
100558
  function isTransientCaptureRetryEligible(failureKind, missing, retriesUsed) {
@@ -100278,7 +100584,7 @@ The composition is too large for the available memory. To reduce memory pressure
100278
100584
  function countCapturedFrames(totalFrames, framesDir, frameExt) {
100279
100585
  let captured = 0;
100280
100586
  for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
100281
- const framePath = join47(framesDir, formatCaptureFrameName(frameIndex, frameExt));
100587
+ const framePath = join48(framesDir, formatCaptureFrameName(frameIndex, frameExt));
100282
100588
  if (existsSync33(framePath)) captured++;
100283
100589
  }
100284
100590
  return captured;
@@ -100304,7 +100610,7 @@ async function executeDiskCaptureWithAdaptiveRetry(options) {
100304
100610
  reason: attempt === 0 ? "initial" : pendingTransientRetry ? "transient-retry" : "retry"
100305
100611
  });
100306
100612
  pendingTransientRetry = false;
100307
- const attemptWorkDir = join47(options.workDir, `capture-attempt-${attempt}`);
100613
+ const attemptWorkDir = join48(options.workDir, `capture-attempt-${attempt}`);
100308
100614
  const batches = missingRanges ? buildMissingFrameRetryBatches(
100309
100615
  missingRanges,
100310
100616
  currentWorkers,
@@ -100918,15 +101224,15 @@ function deVerifyFallbackTelemetry(err) {
100918
101224
  }
100919
101225
  async function executeRenderJob(job, projectDir, outputPath, progressSink, abortSignal, assertRenderActive) {
100920
101226
  validateHlsRenderConfig(job.config);
100921
- const moduleDir = dirname19(fileURLToPath5(import.meta.url));
101227
+ const moduleDir = dirname20(fileURLToPath6(import.meta.url));
100922
101228
  const producerRoot = process.env.PRODUCER_RENDERS_DIR ? resolve13(process.env.PRODUCER_RENDERS_DIR, "..") : resolve13(moduleDir, "../..");
100923
- const debugDir = join47(producerRoot, ".debug");
100924
- const outputDir = dirname19(outputPath);
101229
+ const debugDir = join48(producerRoot, ".debug");
101230
+ const outputDir = dirname20(outputPath);
100925
101231
  if (!existsSync33(outputDir)) mkdirSync19(outputDir, { recursive: true });
100926
- const workDir = job.config.debug ? join47(debugDir, job.id) : mkdtempSync11(resolveRenderWorkDirPrefix(outputPath, job.id));
101232
+ const workDir = job.config.debug ? join48(debugDir, job.id) : mkdtempSync11(resolveRenderWorkDirPrefix(outputPath, job.id));
100927
101233
  const pipelineStart = Date.now();
100928
101234
  const baseLog = job.config.logger ?? defaultLogger;
100929
- const logPath = job.config.debug ? join47(workDir, "render.log") : null;
101235
+ const logPath = job.config.debug ? join48(workDir, "render.log") : null;
100930
101236
  const execution = new RenderExecutionContext({
100931
101237
  request: { renderJobId: job.id, projectDir, outputPath },
100932
101238
  logger: logPath ? createRenderFileLogger(logPath, baseLog) : baseLog,
@@ -100984,7 +101290,7 @@ async function executeRenderPipeline(input) {
100984
101290
  imageDecodeFailures: 0
100985
101291
  };
100986
101292
  let hdrPerf;
100987
- const perfOutputPath = join47(workDir, "perf-summary.json");
101293
+ const perfOutputPath = join48(workDir, "perf-summary.json");
100988
101294
  const cfg = { ...job.config.producerConfig ?? resolveConfig() };
100989
101295
  const observability = new RenderObservabilityRecorder({
100990
101296
  pipelineStartMs: pipelineStart,
@@ -101083,22 +101389,22 @@ async function executeRenderPipeline(input) {
101083
101389
  requestedWorkers: job.config.workers ?? "auto"
101084
101390
  });
101085
101391
  const entryFile = job.config.entryFile || "index.html";
101086
- let htmlPath = join47(projectDir, entryFile);
101392
+ let htmlPath = join48(projectDir, entryFile);
101087
101393
  if (!existsSync33(htmlPath)) {
101088
101394
  throw new Error(`Entry file not found: ${htmlPath}`);
101089
101395
  }
101090
101396
  assertNotAborted();
101091
- const rawEntry = readFileSync14(htmlPath, "utf-8");
101397
+ const rawEntry = readFileSync15(htmlPath, "utf-8");
101092
101398
  if (entryFile !== "index.html" && rawEntry.trimStart().startsWith("<template")) {
101093
- const wrapperPath = join47(workDir, "standalone-entry.html");
101094
- const projectIndexPath = join47(projectDir, "index.html");
101399
+ const wrapperPath = join48(workDir, "standalone-entry.html");
101400
+ const projectIndexPath = join48(projectDir, "index.html");
101095
101401
  if (!existsSync33(projectIndexPath)) {
101096
101402
  throw new Error(
101097
101403
  `Template entry file "${entryFile}" requires a project index.html to extract its render shell.`
101098
101404
  );
101099
101405
  }
101100
101406
  const standaloneHtml = extractStandaloneEntryFromIndex(
101101
- readFileSync14(projectIndexPath, "utf-8"),
101407
+ readFileSync15(projectIndexPath, "utf-8"),
101102
101408
  entryFile,
101103
101409
  rawEntry
101104
101410
  );
@@ -101247,7 +101553,7 @@ async function executeRenderPipeline(input) {
101247
101553
  beginFrameStalled: probeResult.beginFrameStalled
101248
101554
  });
101249
101555
  updateJobStatus(job, "preprocessing", "Extracting video frames", 10, onProgress);
101250
- const compiledDir = join47(workDir, "compiled");
101556
+ const compiledDir = join48(workDir, "compiled");
101251
101557
  const extractResult = await observeRenderStage(
101252
101558
  observability,
101253
101559
  "video_extract",
@@ -101373,7 +101679,7 @@ async function executeRenderPipeline(input) {
101373
101679
  try {
101374
101680
  fileServer = await createFileServer2({
101375
101681
  projectDir,
101376
- compiledDir: join47(workDir, "compiled"),
101682
+ compiledDir: join48(workDir, "compiled"),
101377
101683
  port: 0,
101378
101684
  preHeadScripts: [VIRTUAL_TIME_SHIM],
101379
101685
  fps: job.config.fps
@@ -101391,7 +101697,7 @@ async function executeRenderPipeline(input) {
101391
101697
  if (!activeFileServer) {
101392
101698
  throw new Error("File server failed to initialize before frame capture");
101393
101699
  }
101394
- const framesDir = join47(workDir, "captured-frames");
101700
+ const framesDir = join48(workDir, "captured-frames");
101395
101701
  if (!existsSync33(framesDir)) mkdirSync19(framesDir, { recursive: true });
101396
101702
  updateJobStatus(job, "rendering", "Checking browser GPU", 25, onProgress);
101397
101703
  const resolvedBrowserGpuMode = await resolveBrowserGpuMode(cfg.browserGpuMode, {
@@ -101802,7 +102108,7 @@ async function executeRenderPipeline(input) {
101802
102108
  hls: ".mp4"
101803
102109
  };
101804
102110
  const videoExt = FORMAT_EXT[outputFormat] ?? ".mp4";
101805
- const videoOnlyPath = join47(workDir, `video-only${videoExt}`);
102111
+ const videoOnlyPath = join48(workDir, `video-only${videoExt}`);
101806
102112
  const usePageSideCompositingForTransitions = (cfg.enablePageSideCompositing || isGif) && compiled.hasShaderTransitions && !hasHdrContent && outputSupportsPageSideShaderCompositing(outputFormat);
101807
102113
  if (usePageSideCompositingForTransitions) {
101808
102114
  activeFileServer.addPreHeadScript(HF_PAGE_SIDE_COMPOSITING_STUB);
@@ -102044,7 +102350,7 @@ async function executeRenderPipeline(input) {
102044
102350
  outputHeight: captureCompositionHeight ?? height,
102045
102351
  motionBlur: job.config.motionBlur ? JSON.stringify(job.config.motionBlur) : ""
102046
102352
  });
102047
- const segmentDir = segmentDirFor(join47(projectDir, "renders"), segmentPlanHash);
102353
+ const segmentDir = segmentDirFor(join48(projectDir, "renders"), segmentPlanHash);
102048
102354
  let completedSegments = /* @__PURE__ */ new Set();
102049
102355
  if (job.config.resumeSegments === true) {
102050
102356
  const existing = readSegmentManifest(segmentDir);
@@ -102591,7 +102897,7 @@ async function executeRenderPipeline(input) {
102591
102897
  }
102592
102898
  if (job.config.debug) {
102593
102899
  if (!isPngSequence && !isHls && existsSync33(stagedOutputPath)) {
102594
- const debugOutput = join47(workDir, `output${videoExt}`);
102900
+ const debugOutput = join48(workDir, `output${videoExt}`);
102595
102901
  copyFileSync6(stagedOutputPath, debugOutput);
102596
102902
  }
102597
102903
  }
@@ -102938,7 +103244,7 @@ import {
102938
103244
  rmSync as rmSync16,
102939
103245
  createReadStream as createReadStream5
102940
103246
  } from "fs";
102941
- import { resolve as resolve15, dirname as dirname21, join as join50 } from "path";
103247
+ import { resolve as resolve15, dirname as dirname22, join as join51 } from "path";
102942
103248
  import { tmpdir as tmpdir8 } from "os";
102943
103249
  import { parseArgs } from "util";
102944
103250
  import crypto from "crypto";
@@ -102950,14 +103256,14 @@ import { serve as serve3 } from "@hono/node-server";
102950
103256
  init_dist3();
102951
103257
  import {
102952
103258
  existsSync as existsSync34,
102953
- readFileSync as readFileSync15,
103259
+ readFileSync as readFileSync16,
102954
103260
  statSync as statSync13,
102955
103261
  openSync as openSync8,
102956
103262
  fstatSync as fstatSync5,
102957
103263
  closeSync as closeSync9,
102958
103264
  constants as constants5
102959
103265
  } from "fs";
102960
- import { resolve as resolve14, join as join48, relative as relative5, isAbsolute as isAbsolute5, sep as sep4 } from "path";
103266
+ import { resolve as resolve14, join as join49, relative as relative5, isAbsolute as isAbsolute5, sep as sep4 } from "path";
102961
103267
  function isStringRecord(value) {
102962
103268
  if (!value || typeof value !== "object" || Array.isArray(value)) {
102963
103269
  return false;
@@ -102995,7 +103301,7 @@ function readEntryHtml(filePath) {
102995
103301
  }
102996
103302
  try {
102997
103303
  if (!fstatSync5(fd).isFile()) return null;
102998
- return readFileSync15(fd, "utf-8");
103304
+ return readFileSync16(fd, "utf-8");
102999
103305
  } finally {
103000
103306
  closeSync9(fd);
103001
103307
  }
@@ -103024,7 +103330,7 @@ function readProjectEntryFile(projectDir, preferredEntryFile) {
103024
103330
  }
103025
103331
  }
103026
103332
  return {
103027
- error: `No HTML entry file found in project directory: ${join48(absProjectDir, preferredEntryFile || "index.html")}`
103333
+ error: `No HTML entry file found in project directory: ${join49(absProjectDir, preferredEntryFile || "index.html")}`
103028
103334
  };
103029
103335
  }
103030
103336
  function prepareHyperframeLintBody(body) {
@@ -103066,8 +103372,8 @@ async function runHyperframeLint(prepared) {
103066
103372
 
103067
103373
  // ../producer/src/services/healthWorker.ts
103068
103374
  import { Worker as Worker3 } from "worker_threads";
103069
- import { fileURLToPath as fileURLToPath6 } from "url";
103070
- import { dirname as dirname20, join as join49 } from "path";
103375
+ import { fileURLToPath as fileURLToPath7 } from "url";
103376
+ import { dirname as dirname21, join as join50 } from "path";
103071
103377
  import { existsSync as existsSync35 } from "fs";
103072
103378
  var DEFAULT_HEALTH_PORT = 9848;
103073
103379
  async function startHealthWorker(options = {}) {
@@ -103142,8 +103448,8 @@ function defaultLogger2() {
103142
103448
  };
103143
103449
  }
103144
103450
  function resolveWorkerEntry2() {
103145
- const here = dirname20(fileURLToPath6(import.meta.url));
103146
- const candidates = [join49(here, "healthWorkerThread.js"), join49(here, "healthWorkerThread.ts")];
103451
+ const here = dirname21(fileURLToPath7(import.meta.url));
103452
+ const candidates = [join50(here, "healthWorkerThread.js"), join50(here, "healthWorkerThread.ts")];
103147
103453
  for (const candidate of candidates) {
103148
103454
  if (existsSync35(candidate)) return candidate;
103149
103455
  }
@@ -103280,7 +103586,7 @@ function buildRenderJobConfig(input, outputPath, log) {
103280
103586
  function resolvePreparedRenderOutput(prepared, rendersDir, log) {
103281
103587
  const { input, cleanupProjectDir } = prepared;
103282
103588
  const absoluteOutputPath = resolveOutputPath(input.projectDir, input.outputPath, rendersDir, log);
103283
- const outputDir = dirname21(absoluteOutputPath);
103589
+ const outputDir = dirname22(absoluteOutputPath);
103284
103590
  if (!existsSync36(outputDir)) mkdirSync20(outputDir, { recursive: true });
103285
103591
  return { input, cleanupProjectDir, absoluteOutputPath };
103286
103592
  }
@@ -103348,8 +103654,8 @@ async function resolveInlineRenderHtml(body) {
103348
103654
  }
103349
103655
  function materializeInlineProject(html, options) {
103350
103656
  const tempRoot = process.env.PRODUCER_TMP_PROJECT_DIR || tmpdir8();
103351
- const tempProjectDir = mkdtempSync12(join50(tempRoot, "producer-project-"));
103352
- writeFileSync12(join50(tempProjectDir, "index.html"), html, "utf-8");
103657
+ const tempProjectDir = mkdtempSync12(join51(tempRoot, "producer-project-"));
103658
+ writeFileSync12(join51(tempProjectDir, "index.html"), html, "utf-8");
103353
103659
  return {
103354
103660
  prepared: {
103355
103661
  input: { projectDir: tempProjectDir, ...options },
@@ -103800,11 +104106,11 @@ init_src();
103800
104106
  init_dist2();
103801
104107
  init_src();
103802
104108
  import { cpSync as cpSync2, existsSync as existsSync39, mkdirSync as mkdirSync22, renameSync as renameSync8, rmSync as rmSync17, writeFileSync as writeFileSync14 } from "fs";
103803
- import { join as join54, relative as relative8, sep as sep5 } from "path";
104109
+ import { join as join55, relative as relative8, sep as sep5 } from "path";
103804
104110
 
103805
104111
  // ../producer/src/services/render/stages/freezePlan.ts
103806
- import { existsSync as existsSync37, mkdirSync as mkdirSync21, readFileSync as readFileSync16, readdirSync as readdirSync13, writeFileSync as writeFileSync13 } from "fs";
103807
- import { join as join51, relative as relative6, resolve as resolve16 } from "path";
104112
+ import { existsSync as existsSync37, mkdirSync as mkdirSync21, readFileSync as readFileSync17, readdirSync as readdirSync13, writeFileSync as writeFileSync13 } from "fs";
104113
+ import { join as join52, relative as relative6, resolve as resolve16 } from "path";
103808
104114
 
103809
104115
  // ../producer/src/services/distributed/planProtocol.ts
103810
104116
  var PLAN_SCHEMA_VERSION = 1;
@@ -103846,9 +104152,9 @@ var FIELD_DELIMITER = Buffer.from([0]);
103846
104152
  // ../producer/src/services/distributed/shared.ts
103847
104153
  init_src();
103848
104154
  import { execFile as execFileCallback } from "child_process";
103849
- import { dirname as dirname22, join as join52 } from "path";
103850
- import { existsSync as existsSync38, readFileSync as readFileSync17 } from "fs";
103851
- import { fileURLToPath as fileURLToPath7 } from "url";
104155
+ import { dirname as dirname23, join as join53 } from "path";
104156
+ import { existsSync as existsSync38, readFileSync as readFileSync18 } from "fs";
104157
+ import { fileURLToPath as fileURLToPath8 } from "url";
103852
104158
  import { promisify as promisify5 } from "util";
103853
104159
  var PLAN_AUDIO_RELATIVE_PATH = MIXED_AUDIO_FILENAME;
103854
104160
  var execFile4 = promisify5(execFileCallback);
@@ -103856,7 +104162,7 @@ var execFile4 = promisify5(execFileCallback);
103856
104162
  // ../producer/src/services/distributed/planSize.ts
103857
104163
  import { createHash as createHash12 } from "crypto";
103858
104164
  import { lstatSync as lstatSync5, readdirSync as readdirSync14 } from "fs";
103859
- import { extname as extname7, join as join53, relative as relative7 } from "path";
104165
+ import { extname as extname7, join as join54, relative as relative7 } from "path";
103860
104166
  var PLAN_ROOT_CATEGORY = {
103861
104167
  compiled: "compiled",
103862
104168
  [PLAN_AUDIO_RELATIVE_PATH]: "audio",
@@ -103868,9 +104174,9 @@ var PLAN_ROOT_CATEGORY = {
103868
104174
  var PLAN_DIR_SIZE_LIMIT_BYTES = 2 * 1024 * 1024 * 1024;
103869
104175
  var FREEZE_OWNED_PLAN_FILES = [
103870
104176
  "plan.json",
103871
- join54("meta", "composition.json"),
103872
- join54("meta", "encoder.json"),
103873
- join54("meta", "chunks.json")
104177
+ join55("meta", "composition.json"),
104178
+ join55("meta", "encoder.json"),
104179
+ join55("meta", "chunks.json")
103874
104180
  ];
103875
104181
 
103876
104182
  // ../producer/src/services/distributed/planV2.ts
@@ -103883,7 +104189,7 @@ import {
103883
104189
  mkdirSync as mkdirSync24,
103884
104190
  mkdtempSync as mkdtempSync14,
103885
104191
  openSync as openSync9,
103886
- readFileSync as readFileSync18,
104192
+ readFileSync as readFileSync19,
103887
104193
  readSync as readSync3,
103888
104194
  readdirSync as readdirSync15,
103889
104195
  renameSync as renameSync10,
@@ -103893,7 +104199,7 @@ import {
103893
104199
  } from "fs";
103894
104200
  import { createHash as createHash13 } from "crypto";
103895
104201
  import { tmpdir as tmpdir9 } from "os";
103896
- import { dirname as dirname24, isAbsolute as isAbsolute6, join as join57, relative as relative9, resolve as resolve17, sep as sep6 } from "path";
104202
+ import { dirname as dirname25, isAbsolute as isAbsolute6, join as join58, relative as relative9, resolve as resolve17, sep as sep6 } from "path";
103897
104203
 
103898
104204
  // ../producer/src/services/distributed/planV2Publisher.ts
103899
104205
  import {
@@ -103907,15 +104213,15 @@ import {
103907
104213
  statSync as statSync15,
103908
104214
  writeFileSync as writeFileSync15
103909
104215
  } from "fs";
103910
- import { dirname as dirname23, join as join56 } from "path";
104216
+ import { dirname as dirname24, join as join57 } from "path";
103911
104217
 
103912
104218
  // ../producer/src/services/distributed/planV2Layout.ts
103913
- import { join as join55 } from "path";
104219
+ import { join as join56 } from "path";
103914
104220
 
103915
104221
  // ../producer/src/services/distributed/planV2Execution.ts
103916
104222
  import { mkdtempSync as mkdtempSync16, rmSync as rmSync22 } from "fs";
103917
104223
  import { tmpdir as tmpdir10 } from "os";
103918
- import { join as join60 } from "path";
104224
+ import { join as join61 } from "path";
103919
104225
 
103920
104226
  // ../producer/src/services/distributed/assemble.ts
103921
104227
  init_src();
@@ -103925,25 +104231,25 @@ import {
103925
104231
  existsSync as existsSync42,
103926
104232
  mkdirSync as mkdirSync25,
103927
104233
  mkdtempSync as mkdtempSync15,
103928
- readFileSync as readFileSync19,
104234
+ readFileSync as readFileSync20,
103929
104235
  readdirSync as readdirSync16,
103930
104236
  rmSync as rmSync20,
103931
104237
  statSync as statSync17,
103932
104238
  writeFileSync as writeFileSync17
103933
104239
  } from "fs";
103934
- import { dirname as dirname25, join as join58 } from "path";
104240
+ import { dirname as dirname26, join as join59 } from "path";
103935
104241
 
103936
104242
  // ../producer/src/services/distributed/renderChunk.ts
103937
104243
  init_src();
103938
104244
  import { randomBytes } from "crypto";
103939
- import { existsSync as existsSync43, mkdirSync as mkdirSync26, readFileSync as readFileSync20, readdirSync as readdirSync17, rmSync as rmSync21, writeFileSync as writeFileSync18 } from "fs";
103940
- import { extname as extname8, join as join59 } from "path";
104245
+ import { existsSync as existsSync43, mkdirSync as mkdirSync26, readFileSync as readFileSync21, readdirSync as readdirSync17, rmSync as rmSync21, writeFileSync as writeFileSync18 } from "fs";
104246
+ import { extname as extname8, join as join60 } from "path";
103941
104247
  init_src();
103942
104248
 
103943
104249
  // ../producer/src/services/distributed/projectHash.ts
103944
- import { readdirSync as readdirSync18, readFileSync as readFileSync21 } from "fs";
104250
+ import { readdirSync as readdirSync18, readFileSync as readFileSync22 } from "fs";
103945
104251
  import { createHash as createHash14 } from "crypto";
103946
- import { join as join61, relative as relative10 } from "path";
104252
+ import { join as join62, relative as relative10 } from "path";
103947
104253
 
103948
104254
  // src/fontLocalize.ts
103949
104255
  function safeVersion(version2) {
@@ -103984,8 +104290,8 @@ async function runFontLocalize(io, localize) {
103984
104290
  }
103985
104291
 
103986
104292
  // src/version.ts
103987
- var VERSION = true ? "0.8.73" : "0.0.0-dev";
103988
- var PRODUCER_VERSION = true ? "0.8.73" : "0.0.0-dev";
104293
+ var VERSION = true ? "0.8.74" : "0.0.0-dev";
104294
+ var PRODUCER_VERSION = true ? "0.8.74" : "0.0.0-dev";
103989
104295
 
103990
104296
  // src/fontLocalizeCli.ts
103991
104297
  async function readStdin() {