hyperframes 0.8.73 → 0.8.75

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(
@@ -66594,7 +66642,7 @@ function scopeCssToComposition(css, compositionId, scopeSelectorOverride, author
66594
66642
  function jsonScriptLiteral(value) {
66595
66643
  return JSON.stringify(value).replace(/</g, "\\u003c");
66596
66644
  }
66597
- function wrapScopedCompositionScript(source, compositionId, errorLabel = "[HyperFrames] composition script error:", scopeSelectorOverride, timelineCompositionId = compositionId, authoredRootId) {
66645
+ function wrapScopedCompositionScript(source, compositionId, errorLabel = "[HyperFrames] composition script error:", scopeSelectorOverride, timelineCompositionId = compositionId, authoredRootId, compositionSrc) {
66598
66646
  const compositionIdLiteral = jsonScriptLiteral(compositionId);
66599
66647
  const timelineCompositionIdLiteral = jsonScriptLiteral(timelineCompositionId);
66600
66648
  const errorLabelLiteral = jsonScriptLiteral(errorLabel);
@@ -66609,6 +66657,7 @@ function wrapScopedCompositionScript(source, compositionId, errorLabel = "[Hyper
66609
66657
  var __hfTimelineCompId = ${timelineCompositionIdLiteral};
66610
66658
  var __hfErrorLabel = ${errorLabelLiteral};
66611
66659
  var __hfAuthoredRootId = ${authoredRootIdLiteral};
66660
+ var __hfCompositionSrc = ${jsonScriptLiteral(compositionSrc?.trim() || null)};
66612
66661
  var __hfAuthoredRootAttr = ${jsonScriptLiteral(AUTHORED_ROOT_ID_ATTR)};
66613
66662
  var __hfEscapeAttr = function(value) {
66614
66663
  return (value + "").replace(/\\\\/g, "\\\\\\\\").replace(/"/g, "\\\\\\"");
@@ -66917,6 +66966,10 @@ function wrapScopedCompositionScript(source, compositionId, errorLabel = "[Hyper
66917
66966
  var __hfScopedHyperframes = !__hfBaseHyperframes
66918
66967
  ? __hfBaseHyperframes
66919
66968
  : Object.assign({}, __hfBaseHyperframes, {
66969
+ assetUrl: function(path) {
66970
+ var page = window.document.baseURI;
66971
+ return new URL(path, __hfCompositionSrc ? new URL(__hfCompositionSrc, page) : page).href;
66972
+ },
66920
66973
  getVariables: function() {
66921
66974
  var byComp = window.__hfVariablesByComp;
66922
66975
  var scoped = byComp && __hfTimelineCompId ? byComp[__hfTimelineCompId] : null;
@@ -74067,6 +74120,80 @@ function rootClassStyledSelectors(styles, rootClasses) {
74067
74120
  }
74068
74121
  return offenders;
74069
74122
  }
74123
+ function isIdentityZoom(rawValue) {
74124
+ const value = rawValue.trim().replace(/!\s*important\s*$/i, "").trim().toLowerCase();
74125
+ return value === "" || value === "normal" || value === "unset" || value === "initial" || value === "revert" || value === "1" || value === "1.0" || value === "100%";
74126
+ }
74127
+ function firstRescalingZoom(css) {
74128
+ ZOOM_DECLARATION.lastIndex = 0;
74129
+ let match;
74130
+ while ((match = ZOOM_DECLARATION.exec(css)) !== null) {
74131
+ const value = (match[1] ?? "").trim();
74132
+ if (!isIdentityZoom(value)) return value.replace(/!\s*important\s*$/i, "").trim();
74133
+ }
74134
+ return null;
74135
+ }
74136
+ function targetsCanvasRoot(selector, rootId, rootClasses) {
74137
+ const leftmost = selector.trim().split(/[\s>+~]+/)[0] ?? "";
74138
+ const bare = leftmost.toLowerCase();
74139
+ if (bare === "html" || bare === "body" || bare === ":root" || bare === "*") return true;
74140
+ if (rootId && leftmostCompoundId(selector) === rootId) return true;
74141
+ return leftmostCompoundClasses(selector).some((cls) => rootClasses.includes(cls));
74142
+ }
74143
+ function inlineCanvasZoomHits(rootTag, tags) {
74144
+ const hits = [];
74145
+ const htmlTag = findHtmlTag(tags);
74146
+ const bodyTag = tags.find((tag) => tag.name.toLowerCase() === "body");
74147
+ for (const [label, tag] of [
74148
+ ["the root element's inline style", rootTag],
74149
+ ["<html>'s inline style", htmlTag],
74150
+ ["<body>'s inline style", bodyTag]
74151
+ ]) {
74152
+ if (!tag) continue;
74153
+ const inline = readAttr(tag.raw, "style");
74154
+ const value = inline ? firstRescalingZoom(inline) : null;
74155
+ if (value) hits.push({ where: label, value, snippet: truncateSnippet(tag.raw) });
74156
+ }
74157
+ return hits;
74158
+ }
74159
+ function firstCanvasSelector(header, rootId, rootClasses) {
74160
+ for (const selector of header.split(",")) {
74161
+ const trimmed = selector.trim();
74162
+ if (trimmed && targetsCanvasRoot(trimmed, rootId, rootClasses)) return trimmed;
74163
+ }
74164
+ return null;
74165
+ }
74166
+ function canvasZoomInRule(header, body, rootId, rootClasses) {
74167
+ const trimmedHeader = header.trim();
74168
+ if (!trimmedHeader || trimmedHeader.startsWith("@")) return null;
74169
+ const value = firstRescalingZoom(body);
74170
+ if (!value) return null;
74171
+ const selector = firstCanvasSelector(trimmedHeader, rootId, rootClasses);
74172
+ if (!selector) return null;
74173
+ return {
74174
+ where: `\`${selector}\``,
74175
+ value,
74176
+ snippet: truncateSnippet(`${selector} { zoom: ${value} }`)
74177
+ };
74178
+ }
74179
+ function stylesheetCanvasZoomHits(styles, rootId, rootClasses) {
74180
+ const hits = [];
74181
+ for (const style of styles) {
74182
+ const ruleWithBody = /([^{}]+)\{([^{}]*)\}/g;
74183
+ let match;
74184
+ while ((match = ruleWithBody.exec(stripCssComments(style.content))) !== null) {
74185
+ const hit = canvasZoomInRule(match[1] ?? "", match[2] ?? "", rootId, rootClasses);
74186
+ if (hit) hits.push(hit);
74187
+ }
74188
+ }
74189
+ return hits;
74190
+ }
74191
+ function canvasZoomHits(rootTag, tags, styles, rootId, rootClasses) {
74192
+ return [
74193
+ ...inlineCanvasZoomHits(rootTag, tags),
74194
+ ...stylesheetCanvasZoomHits(styles, rootId, rootClasses)
74195
+ ];
74196
+ }
74070
74197
  function collectDeclaredVariableIds(htmlTagRaw) {
74071
74198
  const declared = /* @__PURE__ */ new Set();
74072
74199
  const raw = readJsonAttr(htmlTagRaw, "data-composition-variables");
@@ -74105,6 +74232,28 @@ function isInsideInertTemplate(tag, tags) {
74105
74232
  (candidate) => candidate.name === "template" && candidate.closeIndex != null && tag.index > candidate.index && tag.index < candidate.closeIndex
74106
74233
  );
74107
74234
  }
74235
+ function cssOwnerSelector(content, matchIndex) {
74236
+ const blockStart = content.lastIndexOf("{", matchIndex);
74237
+ if (blockStart === -1) return void 0;
74238
+ const previousBlockEnd = content.lastIndexOf("}", blockStart);
74239
+ const lines = content.slice(previousBlockEnd + 1, blockStart).trim().split("\n");
74240
+ return lines[lines.length - 1]?.trim() || void 0;
74241
+ }
74242
+ function elementSelector(tag) {
74243
+ const elementId = readAttr(tag.raw, "id");
74244
+ return elementId ? `#${elementId}` : void 0;
74245
+ }
74246
+ function negativeZIndexFinding(match, selector) {
74247
+ const level = match[1] ?? "";
74248
+ return {
74249
+ code: "negative_z_index",
74250
+ severity: "warning",
74251
+ ...selector ? { selector } : {},
74252
+ 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.`,
74253
+ 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.",
74254
+ snippet: truncateSnippet(match[0])
74255
+ };
74256
+ }
74108
74257
  function deriveDurationFromClips(tags, rootTag) {
74109
74258
  const clipEnds = [];
74110
74259
  for (const tag of tags) {
@@ -75180,7 +75329,7 @@ async function lintHyperframeHtml(html, options = {}) {
75180
75329
  timings: { totalMs: performance.now() - startedAt, ...timings }
75181
75330
  };
75182
75331
  }
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;
75332
+ 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
75333
  var init_dist3 = __esm({
75185
75334
  "../lint/dist/index.js"() {
75186
75335
  "use strict";
@@ -76061,6 +76210,7 @@ var init_dist3 = __esm({
76061
76210
  ];
76062
76211
  AUDIO_GROUP_TIMING_ATTRS = ["data-start", "data-duration", "data-track-index"];
76063
76212
  callIndexes = /* @__PURE__ */ new WeakMap();
76213
+ INSPECTION_VIEWPORT_CAP = 4096;
76064
76214
  MAX_COMPOSITION_LINES = 300;
76065
76215
  MAX_TIMED_ELEMENTS_PER_TRACK = 3;
76066
76216
  TRACK_DENSITY_EXEMPT_TAGS = /* @__PURE__ */ new Set(["audio", "script", "style", "video"]);
@@ -76086,6 +76236,8 @@ var init_dist3 = __esm({
76086
76236
  ]);
76087
76237
  HEAVY_OVERLAY_CSS_PATTERN = /(?:filter\s*:[^;}]*\bblur\s*\()|(?:clip-path\s*:(?!\s*(?:none|inherit|initial|unset)\b)\s*[^;}]+)|(?:radial-gradient\s*\()/i;
76088
76238
  INLINE_STYLE_DISPLAY_NONE_PATTERN = /(?:^|;)\s*display\s*:\s*none\b/i;
76239
+ ZOOM_DECLARATION = /(?<![\w-])zoom\s*:\s*([^;}]+)/gi;
76240
+ NEGATIVE_Z_INDEX = /(?<![\w-])z-index\s*:\s*-(?!0(?:\s*[;}]|\s*$))([\d.]+)/g;
76089
76241
  compositionRules = [
76090
76242
  // duplicate_composition_id catches meta-tag/root collisions that create duplicate composition entries.
76091
76243
  ({ tags }) => {
@@ -76376,6 +76528,59 @@ var init_dist3 = __esm({
76376
76528
  }
76377
76529
  ];
76378
76530
  },
76531
+ // negative_z_index
76532
+ // An element at a negative z-index is silently absent from both `snapshot`
76533
+ // and `render`, while siblings differing only in the sign of z-index render
76534
+ // exactly (heygen-com/hyperframes#4366). lint, validate and render all exit 0
76535
+ // and report nothing, so the first suspicion falls on the author's own CSS.
76536
+ // NOT A RENDERER DEFECT -- ORDINARY CSS PAINTING ORDER, measured at 0.8.72.
76537
+ // The element is PAINTED; it is simply painted beneath something opaque. Remove
76538
+ // every opaque background above it and the same `z-index: -1` band renders at
76539
+ // full coverage, identically to the same band with `z-index` deleted. A negative-z
76540
+ // descendant paints at step 2 of its nearest stacking context -- above that
76541
+ // context root's own background, but below the context's positioned in-flow
76542
+ // content -- so a `position: relative` composition root with an opaque background
76543
+ // paints over it. That is the shape #4366 reports; nothing is dropped and the
76544
+ // renderer has no say in it.
76545
+ //
76546
+ // Kept as a warning because authors hit it and nothing explains why: the element
76547
+ // is in the DOM, laid out, and invisible. The message therefore names the CAUSE
76548
+ // and the remedy rather than implying the tool failed.
76549
+ //
76550
+ // THE CONDITION IS LOAD-BEARING AND THE MESSAGE STATES IT. The element is only
76551
+ // dropped when its nearest ancestor stacking context is the composition root,
76552
+ // which is the shape #4366 reports. Give any ancestor a stacking context and it
76553
+ // renders correctly: measured at 0.8.72 on ONE frame carrying the same
76554
+ // `z-index: -1` band under six triggers -- isolation:isolate, transform,
76555
+ // opacity below 1, filter, contain:paint, will-change -- all six PRESENT at full
76556
+ // coverage, against the no-stacking-context control ABSENT at zero coverage.
76557
+ // That is ordinary CSS painting order: a negative-z child paints above its
76558
+ // stacking context root's own background, so only the root case is hidden.
76559
+ //
76560
+ // This rule matches CSS TEXT and does not resolve the cascade, so it cannot know
76561
+ // whether an ancestor forms a stacking context and fires on both shapes. That is
76562
+ // why the message is CONDITIONAL rather than an assertion of absence: an
76563
+ // unconditional "silently dropped" is false for every isolated case, and a lint
76564
+ // message that overclaims is how authors learn to disregard the rule.
76565
+ ({ tags, styles }) => {
76566
+ const findings = [];
76567
+ for (const style of styles) {
76568
+ const content = stripCssComments(style.content);
76569
+ NEGATIVE_Z_INDEX.lastIndex = 0;
76570
+ let match;
76571
+ while ((match = NEGATIVE_Z_INDEX.exec(content)) !== null) {
76572
+ findings.push(negativeZIndexFinding(match, cssOwnerSelector(content, match.index)));
76573
+ }
76574
+ }
76575
+ for (const tag of tags) {
76576
+ const inline = readAttr(tag.raw, "style");
76577
+ if (!inline) continue;
76578
+ NEGATIVE_Z_INDEX.lastIndex = 0;
76579
+ const match = NEGATIVE_Z_INDEX.exec(inline);
76580
+ if (match) findings.push(negativeZIndexFinding(match, elementSelector(tag)));
76581
+ }
76582
+ return findings;
76583
+ },
76379
76584
  // requestanimationframe_in_composition
76380
76585
  ({ scripts, rawSource, options }) => {
76381
76586
  if (isRegistrySourceFile(options.filePath) || isRegistryInstalledFile(rawSource)) return [];
@@ -76795,6 +77000,96 @@ ${allInlineStyles}`.replace(/\/\*[\s\S]*?\*\//g, "");
76795
77000
  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
77001
  }
76797
77002
  ];
77003
+ },
77004
+ // root_zoom_rescales_a_fixed_canvas
77005
+ //
77006
+ // The capture frame is sized from the root's data-width/data-height, which are
77007
+ // LAYOUT pixels. CSS `zoom` on the canvas itself (the root, or html/body above
77008
+ // it) rescales the painted content inside that frame without changing the frame,
77009
+ // so the two disagree and the author gets neither of the two things they might
77010
+ // have meant.
77011
+ //
77012
+ // Measured at 0.8.71 on an 800x400 composition holding two 100x100 boxes at
77013
+ // left:100 and left:600, rendered to a PNG sequence and the boxes located by
77014
+ // colour:
77015
+ //
77016
+ // root zoom:0.5 canvas stays 800x400; boxes paint at (50,25) and (300,25),
77017
+ // each 50x50 -- the composition occupies the top-left quarter
77018
+ // and the rest of every frame is dead space.
77019
+ // root zoom:2 canvas stays 800x400; the left:100 box paints at (200,100)
77020
+ // at 200x200, and the left:600 box renders ZERO PIXELS --
77021
+ // scaled to x=1200, outside a frame that is still 800 wide.
77022
+ //
77023
+ // The second case is the one worth an error: content that is inside the declared
77024
+ // composition silently does not exist in the output, with nothing else in lint,
77025
+ // check or the render log naming it.
77026
+ //
77027
+ // Deliberately NOT flagged: `zoom` on a descendant. Measured in the same run --
77028
+ // a child at left:100 with zoom:2 paints at (200,100) at 200x200, which is
77029
+ // exactly what CSS `zoom` specifies. It is honoured, not ignored, so a rule that
77030
+ // fired on every `zoom` would be flagging correct authoring.
77031
+ ({ rootTag, tags, styles }) => {
77032
+ if (!rootTag) return [];
77033
+ const rootId = readAttr(rootTag.raw, "id");
77034
+ const rootClasses = (readAttr(rootTag.raw, "class") || "").split(/\s+/).filter(Boolean);
77035
+ const hits = canvasZoomHits(rootTag, tags, styles, rootId, rootClasses);
77036
+ const hit = hits[0];
77037
+ if (!hit) return [];
77038
+ const enlarging = !hit.value.startsWith("-") && parseFloat(hit.value) > (hit.value.includes("%") ? 100 : 1);
77039
+ return [
77040
+ {
77041
+ code: "root_zoom_rescales_a_fixed_canvas",
77042
+ severity: "error",
77043
+ 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.`),
77044
+ 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.`,
77045
+ snippet: hit.snippet
77046
+ }
77047
+ ];
77048
+ },
77049
+ // composition_exceeds_inspection_viewport_cap
77050
+ //
77051
+ // packages/cli/src/utils/compositionViewport.ts caps a parsed data-width /
77052
+ // data-height at MAX_VIEWPORT_DIMENSION (4096) with a plain Math.min and no
77053
+ // warning. captureCompositionFrame resolves its viewport through that helper,
77054
+ // and check, validate, snapshot, compare and layout all capture through it;
77055
+ // layout and motionShot carry their own independent Math.min(..., 4096).
77056
+ //
77057
+ // `render` does NOT go through it, and that asymmetry is the whole finding.
77058
+ // Measured at 0.8.71 on a 5000x400 composition with 100x100 boxes at left:100
77059
+ // and left:4500:
77060
+ //
77061
+ // render -> 5000x400 output, both boxes present.
77062
+ // snapshot -> 4096x400 frame, the left:4500 box ABSENT.
77063
+ //
77064
+ // So the video is correct and the tools an author would reach for to check it
77065
+ // silently cannot see the last 904 px. The failure direction is the awkward
77066
+ // one: `check` comes back clean on a region it never rendered, and someone
77067
+ // debugging a missing element through `snapshot` chases a difference that
77068
+ // exists only in the instrument.
77069
+ //
77070
+ // A warning, not an error: the deliverable is fine, and a composition wider
77071
+ // than 4096 can be entirely deliberate.
77072
+ ({ rootTag }) => {
77073
+ if (!rootTag) return [];
77074
+ const over = [];
77075
+ for (const attr of ["data-width", "data-height"]) {
77076
+ const raw = readAttr(rootTag.raw, attr);
77077
+ if (!raw) continue;
77078
+ const value = Number.parseInt(raw, 10);
77079
+ if (Number.isFinite(value) && value > INSPECTION_VIEWPORT_CAP) {
77080
+ over.push(`${attr}=${value}`);
77081
+ }
77082
+ }
77083
+ if (over.length === 0) return [];
77084
+ return [
77085
+ {
77086
+ code: "composition_exceeds_inspection_viewport_cap",
77087
+ severity: "warning",
77088
+ 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.`,
77089
+ 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.`,
77090
+ snippet: truncateSnippet(rootTag.raw)
77091
+ }
77092
+ ];
76798
77093
  }
76799
77094
  ];
76800
77095
  CLIP_MEDIA_TAGS = /* @__PURE__ */ new Set(["img", "video", "audio"]);
@@ -78560,7 +78855,7 @@ function inlineSubCompositions(document2, hosts, options) {
78560
78855
  ...readExternalScriptAttributes(scriptEl)
78561
78856
  });
78562
78857
  } else {
78563
- const wrappedScript = scriptCompositionId ? wrapScopedCompositionScript(scriptEl.textContent || "", scriptCompositionId, scriptErrorLabel, runtimeScope || void 0, runtimeCompId || scopeCompId || scriptCompositionId, authoredRootId) : wrapInlineScriptWithErrorBoundary(scriptEl.textContent || "", scriptErrorLabel);
78858
+ const wrappedScript = scriptCompositionId ? wrapScopedCompositionScript(scriptEl.textContent || "", scriptCompositionId, scriptErrorLabel, runtimeScope || void 0, runtimeCompId || scopeCompId || scriptCompositionId, authoredRootId, src) : wrapInlineScriptWithErrorBoundary(scriptEl.textContent || "", scriptErrorLabel);
78564
78859
  scripts.push(wrappedScript);
78565
78860
  scriptItems.push({ kind: "inline", content: wrappedScript });
78566
78861
  }
@@ -78907,7 +79202,7 @@ var init_htmlTemplate = __esm({
78907
79202
 
78908
79203
  // ../engine/src/services/extractedFrameIndex.ts
78909
79204
  import { readdirSync as readdirSync4 } from "fs";
78910
- import { join as join10 } from "path";
79205
+ import { join as join11 } from "path";
78911
79206
  function extractedFrameIndex(file, format) {
78912
79207
  const match = new RegExp(`^${FRAME_FILENAME_PREFIX}(\\d+)\\.${format}$`).exec(file);
78913
79208
  if (!match) {
@@ -78930,7 +79225,7 @@ function framePathsFromDirectory(outputDir, format) {
78930
79225
  `Duplicate extracted frame index ${index}: ${indexed.get(index)} and ${file}`
78931
79226
  );
78932
79227
  }
78933
- indexed.set(index, join10(outputDir, file));
79228
+ indexed.set(index, join11(outputDir, file));
78934
79229
  }
78935
79230
  const ordered = /* @__PURE__ */ new Map();
78936
79231
  for (let index = 0; index < indexed.size; index += 1) {
@@ -78971,7 +79266,7 @@ import {
78971
79266
  utimesSync,
78972
79267
  writeFileSync as writeFileSync3
78973
79268
  } from "fs";
78974
- import { join as join11 } from "path";
79269
+ import { join as join12 } from "path";
78975
79270
  function readKeyStat(videoPath) {
78976
79271
  try {
78977
79272
  const stat = statSync5(videoPath);
@@ -79009,8 +79304,8 @@ function hasFrameFiles(dir) {
79009
79304
  }
79010
79305
  function lookupCacheEntry(rootDir, input) {
79011
79306
  const keyHash = computeCacheKey(input);
79012
- const dir = join11(rootDir, cacheEntryDirName(keyHash));
79013
- const complete = existsSync10(join11(dir, COMPLETE_SENTINEL)) && hasFrameFiles(dir);
79307
+ const dir = join12(rootDir, cacheEntryDirName(keyHash));
79308
+ const complete = existsSync10(join12(dir, COMPLETE_SENTINEL)) && hasFrameFiles(dir);
79014
79309
  return { entry: { dir, keyHash }, hit: complete };
79015
79310
  }
79016
79311
  function partialCacheEntryDir(entry) {
@@ -79021,13 +79316,13 @@ function isTargetExistsRenameError(err) {
79021
79316
  return code === "EEXIST" || code === "ENOTEMPTY" || code === "EPERM";
79022
79317
  }
79023
79318
  function adoptPublishedWinner(entry, partialDir) {
79024
- if (!existsSync10(join11(entry.dir, COMPLETE_SENTINEL))) return null;
79319
+ if (!existsSync10(join12(entry.dir, COMPLETE_SENTINEL))) return null;
79025
79320
  removeDir(partialDir);
79026
79321
  return { dir: entry.dir, published: true };
79027
79322
  }
79028
79323
  function publishCacheEntry(entry, partialDir) {
79029
79324
  try {
79030
- writeFileSync3(join11(partialDir, COMPLETE_SENTINEL), "", "utf-8");
79325
+ writeFileSync3(join12(partialDir, COMPLETE_SENTINEL), "", "utf-8");
79031
79326
  } catch {
79032
79327
  return { dir: partialDir, published: false };
79033
79328
  }
@@ -79058,7 +79353,7 @@ function touchCacheDir(dir) {
79058
79353
  } catch {
79059
79354
  }
79060
79355
  try {
79061
- utimesSync(join11(dir, COMPLETE_SENTINEL), now, now);
79356
+ utimesSync(join12(dir, COMPLETE_SENTINEL), now, now);
79062
79357
  } catch {
79063
79358
  }
79064
79359
  }
@@ -79086,7 +79381,7 @@ function directorySizeBytes(path) {
79086
79381
  return 0;
79087
79382
  }
79088
79383
  for (const child of children) {
79089
- const childPath = join11(path, child);
79384
+ const childPath = join12(path, child);
79090
79385
  try {
79091
79386
  const stat = lstatSync3(childPath);
79092
79387
  if (stat.isDirectory()) {
@@ -79115,7 +79410,7 @@ function collectGcEntry(dir, name, now, minAgeMs, stats) {
79115
79410
  }
79116
79411
  let lastUseMs = dirStat.mtimeMs;
79117
79412
  try {
79118
- lastUseMs = statSync5(join11(dir, COMPLETE_SENTINEL)).mtimeMs;
79413
+ lastUseMs = statSync5(join12(dir, COMPLETE_SENTINEL)).mtimeMs;
79119
79414
  } catch {
79120
79415
  }
79121
79416
  return { dir, size: directorySizeBytes(dir), lastUseMs, ageMs: now - lastUseMs };
@@ -79125,7 +79420,7 @@ function collectGcEntry(dir, name, now, minAgeMs, stats) {
79125
79420
  }
79126
79421
  function gcSweepDue(rootDir, maxAgeMs) {
79127
79422
  try {
79128
- return Date.now() - statSync5(join11(rootDir, GC_MARKER)).mtimeMs > maxAgeMs;
79423
+ return Date.now() - statSync5(join12(rootDir, GC_MARKER)).mtimeMs > maxAgeMs;
79129
79424
  } catch {
79130
79425
  return true;
79131
79426
  }
@@ -79133,7 +79428,7 @@ function gcSweepDue(rootDir, maxAgeMs) {
79133
79428
  function gcExtractionCache(rootDir, opts) {
79134
79429
  const stats = { evictedEntries: 0, evictedBytes: 0, agedPartialsRemoved: 0 };
79135
79430
  try {
79136
- writeFileSync3(join11(rootDir, GC_MARKER), "", "utf-8");
79431
+ writeFileSync3(join12(rootDir, GC_MARKER), "", "utf-8");
79137
79432
  } catch {
79138
79433
  }
79139
79434
  try {
@@ -79142,7 +79437,7 @@ function gcExtractionCache(rootDir, opts) {
79142
79437
  for (const child of readdirSync5(rootDir, { withFileTypes: true })) {
79143
79438
  if (!child.isDirectory() || !isCacheLikeChild(child.name)) continue;
79144
79439
  const entry = collectGcEntry(
79145
- join11(rootDir, child.name),
79440
+ join12(rootDir, child.name),
79146
79441
  child.name,
79147
79442
  now,
79148
79443
  opts.minAgeMs,
@@ -79195,7 +79490,7 @@ var init_extractionCache = __esm({
79195
79490
 
79196
79491
  // ../engine/src/services/videoFrameExtractor.ts
79197
79492
  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";
79493
+ import { join as join13 } from "path";
79199
79494
  function isVideoFrameFormat(value) {
79200
79495
  return typeof value === "string" && VIDEO_FRAME_FORMATS.includes(value);
79201
79496
  }
@@ -79541,7 +79836,7 @@ async function extractVideoFramesRange(videoPath, videoId, startTime, duration,
79541
79836
  const normalizedFps = toFps(options.fps);
79542
79837
  const fps = fpsToNumber(normalizedFps);
79543
79838
  const ffmpegFps = fpsToFfmpegArg(normalizedFps);
79544
- const videoOutputDir = outputDirOverride ?? join12(outputDir, videoId);
79839
+ const videoOutputDir = outputDirOverride ?? join13(outputDir, videoId);
79545
79840
  if (!existsSync11(videoOutputDir)) mkdirSync6(videoOutputDir, { recursive: true });
79546
79841
  let metadata;
79547
79842
  try {
@@ -79568,7 +79863,7 @@ async function extractVideoFramesRange(videoPath, videoId, startTime, duration,
79568
79863
  }
79569
79864
  const format = resolveFrameFormat(metadata, options.format);
79570
79865
  const framePattern = `${FRAME_FILENAME_PREFIX}%05d.${format}`;
79571
- const outputPattern = join12(videoOutputDir, framePattern);
79866
+ const outputPattern = join13(videoOutputDir, framePattern);
79572
79867
  const isHdr = isHdrColorSpace(metadata.colorSpace);
79573
79868
  const isMacOS = process.platform === "darwin";
79574
79869
  const args = [];
@@ -80001,7 +80296,7 @@ function sliceSupersetMember(member, superset, outputDir, fps, configuredFps) {
80001
80296
  for (let i = 0; i < frameCount; i += 1) {
80002
80297
  const sourceFrame = superset.framePaths.get(member.offsetFrames + i);
80003
80298
  if (!sourceFrame) throw new Error(`superset frame ${member.offsetFrames + i} missing`);
80004
- linkOrCopyFrame(sourceFrame, join12(outputDir, frameFileName(i + 1, work.format)));
80299
+ linkOrCopyFrame(sourceFrame, join13(outputDir, frameFileName(i + 1, work.format)));
80005
80300
  }
80006
80301
  return extractedFramesFromDirectory(work, outputDir, work.videoPath, fps);
80007
80302
  }
@@ -80050,7 +80345,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
80050
80345
  videoPath = resolveProjectRelativeSrc(video.src, baseDir, compiledDir);
80051
80346
  }
80052
80347
  if (isHttpUrl(videoPath)) {
80053
- const downloadDir = join12(options.outputDir, "_downloads");
80348
+ const downloadDir = join13(options.outputDir, "_downloads");
80054
80349
  mkdirSync6(downloadDir, { recursive: true });
80055
80350
  videoPath = await downloadToTemp(
80056
80351
  videoPath,
@@ -80261,7 +80556,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
80261
80556
  async function extractDirectMiss(miss, maxTransientRetries = options.maxTransientRetries ?? 0) {
80262
80557
  const { work, cacheTarget } = miss;
80263
80558
  if (!cacheTarget) {
80264
- const outputDir = join12(options.outputDir, work.video.id);
80559
+ const outputDir = join13(options.outputDir, work.video.id);
80265
80560
  const attempted2 = await runVideoExtractionWithRetry(
80266
80561
  () => extractVideoFramesRange(
80267
80562
  work.videoPath,
@@ -80329,7 +80624,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
80329
80624
  return sliceSupersetMember(
80330
80625
  member,
80331
80626
  superset,
80332
- join12(options.outputDir, work.video.id),
80627
+ join13(options.outputDir, work.video.id),
80333
80628
  fps,
80334
80629
  configuredFps
80335
80630
  );
@@ -80346,7 +80641,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
80346
80641
  async function executeSupersetGroup(group) {
80347
80642
  const first = group.members[0]?.miss.work;
80348
80643
  if (!first) return [];
80349
- const tempDir = cacheRootDir ? join12(cacheRootDir, `${group.groupId}.partial-${process.pid}`) : join12(options.outputDir, group.groupId);
80644
+ const tempDir = cacheRootDir ? join13(cacheRootDir, `${group.groupId}.partial-${process.pid}`) : join13(options.outputDir, group.groupId);
80350
80645
  try {
80351
80646
  rmSync3(tempDir, { recursive: true, force: true });
80352
80647
  const superset = await extractVideoFramesRange(
@@ -80726,7 +81021,7 @@ var init_videoFrameExtractor = __esm({
80726
81021
 
80727
81022
  // ../engine/src/services/videoFrameInjector.ts
80728
81023
  import { promises as fs } from "fs";
80729
- import { dirname as dirname7 } from "path";
81024
+ import { dirname as dirname8 } from "path";
80730
81025
  function createFrameSourceCache(entryLimit, bytesLimit, frameSrcResolver) {
80731
81026
  const cache2 = /* @__PURE__ */ new Map();
80732
81027
  const inFlight = /* @__PURE__ */ new Map();
@@ -80808,7 +81103,7 @@ function createVideoFrameInjector(frameLookup, config) {
80808
81103
  const lastInjectedFrameByVideo = /* @__PURE__ */ new Map();
80809
81104
  const lastCacheTouchByDir = /* @__PURE__ */ new Map();
80810
81105
  function renewCacheLease(framePath) {
80811
- const cacheDir = dirname7(framePath);
81106
+ const cacheDir = dirname8(framePath);
80812
81107
  const now = Date.now();
80813
81108
  const lastTouch = lastCacheTouchByDir.get(cacheDir);
80814
81109
  if (lastTouch !== void 0 && now - lastTouch < CACHE_TOUCH_THROTTLE_MS) return;
@@ -81351,8 +81646,8 @@ var init_wavChunks = __esm({
81351
81646
  });
81352
81647
 
81353
81648
  // ../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";
81649
+ import { mkdtempSync as mkdtempSync3, readFileSync as readFileSync5, renameSync as renameSync2, rmSync as rmSync4, writeFileSync as writeFileSync4 } from "fs";
81650
+ import { dirname as dirname9, join as join14 } from "path";
81356
81651
  function readFmtChunk(buffer, body, size) {
81357
81652
  const format = wavFormatTag(buffer, body, size);
81358
81653
  const bits = buffer.readUInt16LE(body + 14);
@@ -81420,12 +81715,12 @@ function applyVolumeEnvelopeToWav(wavPath, keyframes, trackStart, baseVolume) {
81420
81715
  if (!gainAt) return false;
81421
81716
  let stagingDir;
81422
81717
  try {
81423
- const buffer = readFileSync4(wavPath);
81718
+ const buffer = readFileSync5(wavPath);
81424
81719
  const layout2 = parseWavLayout(buffer);
81425
81720
  if (!layout2) return false;
81426
81721
  scaleSamples(buffer, layout2, gainAt);
81427
- stagingDir = mkdtempSync3(join13(dirname8(wavPath), ".hf-volume-"));
81428
- const tempPath = join13(stagingDir, "audio.wav");
81722
+ stagingDir = mkdtempSync3(join14(dirname9(wavPath), ".hf-volume-"));
81723
+ const tempPath = join14(stagingDir, "audio.wav");
81429
81724
  writeFileSync4(tempPath, buffer, { flag: "wx" });
81430
81725
  renameSync2(tempPath, wavPath);
81431
81726
  return true;
@@ -81526,9 +81821,9 @@ var init_audio_fx_runtime_inline = __esm({
81526
81821
  });
81527
81822
 
81528
81823
  // ../engine/src/services/audioFxRender.ts
81529
- import { existsSync as existsSync12, mkdtempSync as mkdtempSync4, readFileSync as readFileSync5, rmSync as rmSync5, writeFileSync as writeFileSync5 } from "fs";
81824
+ import { existsSync as existsSync12, mkdtempSync as mkdtempSync4, readFileSync as readFileSync6, rmSync as rmSync5, writeFileSync as writeFileSync5 } from "fs";
81530
81825
  import { tmpdir as tmpdir2 } from "os";
81531
- import { join as join14 } from "path";
81826
+ import { join as join15 } from "path";
81532
81827
  import { pathToFileURL } from "url";
81533
81828
  function readWavChunks(buf) {
81534
81829
  const head = { format: 1, channels: 1, sampleRate: 48e3, bits: 16 };
@@ -81549,7 +81844,7 @@ function readWavChunks(buf) {
81549
81844
  return { ...head, data: data2 };
81550
81845
  }
81551
81846
  function readWav(path) {
81552
- const buf = readFileSync5(path);
81847
+ const buf = readFileSync6(path);
81553
81848
  if (buf.length < 44 || buf.toString("ascii", 0, 4) !== "RIFF") {
81554
81849
  throw new AudioFxRenderError(`Not a WAV file: ${path}`);
81555
81850
  }
@@ -81643,7 +81938,7 @@ async function applyAudioFxChain(inputWav, chain, outputWav, options) {
81643
81938
  const { samples, sampleRate, channels, float } = readWav(inputWav);
81644
81939
  const planes = deinterleave(samples, channels);
81645
81940
  if ((planes[0]?.length ?? 0) === 0) return { path: inputWav, envelopeBaked: false };
81646
- const hostDir = mkdtempSync4(join14(tmpdir2(), "hf-fx-host-"));
81941
+ const hostDir = mkdtempSync4(join15(tmpdir2(), "hf-fx-host-"));
81647
81942
  let lease = null;
81648
81943
  try {
81649
81944
  if (options.signal?.aborted) {
@@ -81652,7 +81947,7 @@ async function applyAudioFxChain(inputWav, chain, outputWav, options) {
81652
81947
  lease = await acquireBrowser(["--no-sandbox", "--autoplay-policy=no-user-gesture-required"]);
81653
81948
  const page = await lease.browser.newPage();
81654
81949
  try {
81655
- const hostPage = join14(hostDir, "audio-fx.html");
81950
+ const hostPage = join15(hostDir, "audio-fx.html");
81656
81951
  writeFileSync5(hostPage, "<!doctype html><meta charset=utf-8><title>audio fx</title>");
81657
81952
  await page.goto(pathToFileURL(hostPage).href, { waitUntil: "domcontentloaded" });
81658
81953
  await page.addScriptTag({ content: getAudioFxRuntimeScript() });
@@ -81789,7 +82084,7 @@ var init_audioFxRender = __esm({
81789
82084
 
81790
82085
  // ../engine/src/services/audioMixer.ts
81791
82086
  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";
82087
+ import { join as join16, dirname as dirname10, isAbsolute as isAbsolute2, relative as relative2 } from "path";
81793
82088
  function memberGroupKey(el) {
81794
82089
  return el.getAttribute(AUDIO_GROUP_RENDER_ID_ATTR) ?? el.getAttribute(HF_AUDIO_GROUP_ATTR);
81795
82090
  }
@@ -82146,7 +82441,7 @@ function parseAudioElements(html) {
82146
82441
  }
82147
82442
  async function extractAudioFromVideo(videoPath, outputPath, options, signal, config) {
82148
82443
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
82149
- const outputDir = dirname9(outputPath);
82444
+ const outputDir = dirname10(outputPath);
82150
82445
  if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
82151
82446
  const playbackRate = normalizeRateSpec(options?.playbackRate);
82152
82447
  const args = [];
@@ -82192,7 +82487,7 @@ async function extractAudioFromVideo(videoPath, outputPath, options, signal, con
82192
82487
  }
82193
82488
  async function prepareAudioTrack(srcPath, outputPath, mediaStart, duration, playbackRate = 1, signal, config) {
82194
82489
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
82195
- const outputDir = dirname9(outputPath);
82490
+ const outputDir = dirname10(outputPath);
82196
82491
  if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
82197
82492
  const normalizedPlaybackRate = normalizeRateSpec(playbackRate);
82198
82493
  const outputArgs = await preparedAudioOutputArgs(srcPath, normalizedPlaybackRate, duration);
@@ -82239,7 +82534,7 @@ async function prepareAudioTrack(srcPath, outputPath, mediaStart, duration, play
82239
82534
  }
82240
82535
  async function generateSilence(outputPath, duration, signal, config) {
82241
82536
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
82242
- const outputDir = dirname9(outputPath);
82537
+ const outputDir = dirname10(outputPath);
82243
82538
  if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
82244
82539
  const args = [
82245
82540
  "-f",
@@ -82293,7 +82588,7 @@ async function mixAudioTracks(tracks, outputPath, totalDuration, signal, config)
82293
82588
  failures: result2.failure ? [result2.failure] : void 0
82294
82589
  };
82295
82590
  }
82296
- const outputDir = dirname9(outputPath);
82591
+ const outputDir = dirname10(outputPath);
82297
82592
  if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
82298
82593
  const buildFilterComplex = (ignoreAutomation) => {
82299
82594
  const filterParts = [];
@@ -82310,8 +82605,8 @@ async function mixAudioTracks(tracks, outputPath, totalDuration, signal, config)
82310
82605
  const runMix = async (ignoreAutomation) => {
82311
82606
  const inputs = [];
82312
82607
  tracks.forEach((track) => inputs.push("-i", track.srcPath));
82313
- const scriptDir = mkdtempSync5(join15(outputDir, ".filter-complex-"));
82314
- const scriptPath = join15(scriptDir, "graph.txt");
82608
+ const scriptDir = mkdtempSync5(join16(outputDir, ".filter-complex-"));
82609
+ const scriptPath = join16(scriptDir, "graph.txt");
82315
82610
  const fd = openSync3(scriptPath, "wx", 384);
82316
82611
  try {
82317
82612
  writeFileSync6(fd, buildFilterComplex(ignoreAutomation));
@@ -82397,7 +82692,7 @@ function groupNormalizeOptionUnsupported(stderr) {
82397
82692
  }
82398
82693
  async function mixGroupMembers(memberTracks, outputPath, totalDuration, signal, config) {
82399
82694
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
82400
- const outputDir = dirname9(outputPath);
82695
+ const outputDir = dirname10(outputPath);
82401
82696
  if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
82402
82697
  const buildInputFilters = (ignoreKeyframes) => memberTracks.map((track, i) => {
82403
82698
  const volumeFilter = buildVolumeExpression(track, ignoreKeyframes);
@@ -82415,8 +82710,8 @@ async function mixGroupMembers(memberTracks, outputPath, totalDuration, signal,
82415
82710
  `${mixInputs}amix=inputs=${memberTracks.length}:duration=longest:dropout_transition=0[mixed];[mixed]volume=${formatFilterNumber(memberTracks.length)}[out]`
82416
82711
  );
82417
82712
  const filterComplex = [...inputFilters, mixFilter].join(";");
82418
- const scriptDir = mkdtempSync5(join15(outputDir, ".group-filter-complex-"));
82419
- const scriptPath = join15(scriptDir, "graph.txt");
82713
+ const scriptDir = mkdtempSync5(join16(outputDir, ".group-filter-complex-"));
82714
+ const scriptPath = join16(scriptDir, "graph.txt");
82420
82715
  const fd = openSync3(scriptPath, "wx", 384);
82421
82716
  try {
82422
82717
  writeFileSync6(fd, filterComplex);
@@ -82569,7 +82864,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
82569
82864
  }
82570
82865
  let audioSrcPath = srcPath;
82571
82866
  if (element.type === "video") {
82572
- const extractedPath = join15(workDir, `${element.id}-extracted.wav`);
82867
+ const extractedPath = join16(workDir, `${element.id}-extracted.wav`);
82573
82868
  const extractResult = await extractAudioFromVideo(
82574
82869
  srcPath,
82575
82870
  extractedPath,
@@ -82596,7 +82891,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
82596
82891
  }
82597
82892
  audioSrcPath = extractedPath;
82598
82893
  } else {
82599
- const trimmedPath = join15(workDir, `${element.id}-trimmed.wav`);
82894
+ const trimmedPath = join16(workDir, `${element.id}-trimmed.wav`);
82600
82895
  const prepResult = await prepareAudioTrack(
82601
82896
  srcPath,
82602
82897
  trimmedPath,
@@ -82640,7 +82935,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
82640
82935
  const fxResult = await applyAudioFxChain(
82641
82936
  audioSrcPath,
82642
82937
  chain,
82643
- join15(workDir, `${element.id}-fx.wav`),
82938
+ join16(workDir, `${element.id}-fx.wav`),
82644
82939
  {
82645
82940
  trackId: element.id,
82646
82941
  signal: effectiveSignal,
@@ -82733,7 +83028,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
82733
83028
  const meta = groupMeta.get(groupId);
82734
83029
  if (!meta) continue;
82735
83030
  const pathId = safePathSegment(groupId, groupIndex);
82736
- const groupWavPath = join15(workDir, `group-${pathId}.wav`);
83031
+ const groupWavPath = join16(workDir, `group-${pathId}.wav`);
82737
83032
  try {
82738
83033
  const subMix = await mixGroupMembers(
82739
83034
  memberTracks,
@@ -82769,7 +83064,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
82769
83064
  const fxResult = await applyAudioFxChain(
82770
83065
  groupSrcPath,
82771
83066
  chain,
82772
- join15(workDir, `group-${pathId}-fx.wav`),
83067
+ join16(workDir, `group-${pathId}-fx.wav`),
82773
83068
  {
82774
83069
  trackId: groupId,
82775
83070
  signal: effectiveSignal,
@@ -82870,14 +83165,14 @@ var init_audioMixer = __esm({
82870
83165
  import { execFile as execFile3 } from "child_process";
82871
83166
  import { mkdtemp, rm, writeFile } from "fs/promises";
82872
83167
  import { tmpdir as tmpdir3 } from "os";
82873
- import { join as join16 } from "path";
83168
+ import { join as join17 } from "path";
82874
83169
  import { promisify as promisify3 } from "util";
82875
83170
  async function psnrDb(a, b) {
82876
83171
  const execFileP = promisify3(execFile3);
82877
- const dir = await mkdtemp(join16(tmpdir3(), "hf-de-verify-"));
83172
+ const dir = await mkdtemp(join17(tmpdir3(), "hf-de-verify-"));
82878
83173
  try {
82879
- const pa = join16(dir, "a.jpg");
82880
- const pb = join16(dir, "b.jpg");
83174
+ const pa = join17(dir, "a.jpg");
83175
+ const pb = join17(dir, "b.jpg");
82881
83176
  await Promise.all([writeFile(pa, a), writeFile(pb, b)]);
82882
83177
  const { stderr } = await execFileP(
82883
83178
  getFfmpegBinary(),
@@ -82988,7 +83283,7 @@ var init_readWebGlVendorInfoFromCanvas = __esm({
82988
83283
  import { cpus, freemem } from "os";
82989
83284
  import { existsSync as existsSync14, mkdirSync as mkdirSync8, readdirSync as readdirSync6 } from "fs";
82990
83285
  import { copyFile, readFile as readFile2, rename } from "fs/promises";
82991
- import { join as join17 } from "path";
83286
+ import { join as join18 } from "path";
82992
83287
  import { getHeapStatistics } from "v8";
82993
83288
  function defaultSafeMaxWorkers() {
82994
83289
  return Math.max(6, Math.min(16, Math.floor(cpus().length / 8)));
@@ -83117,7 +83412,7 @@ function distributeFrames(totalFrames, workerCount, workDir, rangeStart = 0) {
83117
83412
  workerId: i,
83118
83413
  startFrame,
83119
83414
  endFrame,
83120
- outputDir: join17(workDir, `worker-${i}`),
83415
+ outputDir: join18(workDir, `worker-${i}`),
83121
83416
  outputFrameOffset: rangeStart
83122
83417
  });
83123
83418
  }
@@ -83131,7 +83426,7 @@ function distributeFramesInterleaved(totalFrames, workerCount, workDir, rangeSta
83131
83426
  startFrame: rangeStart + i,
83132
83427
  endFrame: rangeStart + totalFrames,
83133
83428
  frameStride: workerCount,
83134
- outputDir: join17(workDir, `worker-${i}`),
83429
+ outputDir: join18(workDir, `worker-${i}`),
83135
83430
  outputFrameOffset: rangeStart
83136
83431
  });
83137
83432
  }
@@ -83330,7 +83625,7 @@ async function verifyDiskDrawElementSamples(session, task, streaming) {
83330
83625
  for (const idx of selectVerifySampleIndicesForTask(truths.keys(), task)) {
83331
83626
  const truth = truths.get(idx);
83332
83627
  if (!truth) continue;
83333
- const framePath = join17(task.outputDir, `frame_${String(idx - offset3).padStart(6, "0")}.${ext}`);
83628
+ const framePath = join18(task.outputDir, `frame_${String(idx - offset3).padStart(6, "0")}.${ext}`);
83334
83629
  const db = await psnrForDiskSample(framePath, truth, task.workerId, idx);
83335
83630
  if (db === null) continue;
83336
83631
  assertDiskSampleAboveFloor(db, verifyMinDb, idx, task.workerId);
@@ -83567,8 +83862,8 @@ async function mergeWorkerFrames(workDir, tasks, outputDir) {
83567
83862
  }
83568
83863
  const files = readdirSync6(task.outputDir).filter((f) => f.startsWith("frame_") && (f.endsWith(".jpg") || f.endsWith(".png"))).sort();
83569
83864
  const copyTasks = files.map(async (file) => {
83570
- const sourcePath = join17(task.outputDir, file);
83571
- const targetPath = join17(outputDir, file);
83865
+ const sourcePath = join18(task.outputDir, file);
83866
+ const targetPath = join18(outputDir, file);
83572
83867
  try {
83573
83868
  await rename(sourcePath, targetPath);
83574
83869
  } catch {
@@ -83613,8 +83908,8 @@ var init_parallelCoordinator = __esm({
83613
83908
  // ../engine/src/services/fileServer.ts
83614
83909
  import { Hono } from "hono";
83615
83910
  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";
83911
+ import { readFileSync as readFileSync7, openSync as openSync4, fstatSync, closeSync as closeSync4, statSync as statSync6, constants as constants2 } from "fs";
83912
+ import { join as join19, extname as extname3 } from "path";
83618
83913
  function readRegularFile(filePath) {
83619
83914
  let fd;
83620
83915
  try {
@@ -83627,16 +83922,16 @@ function readRegularFile(filePath) {
83627
83922
  }
83628
83923
  try {
83629
83924
  if (!fstatSync(fd).isFile()) return null;
83630
- return readFileSync6(fd);
83925
+ return readFileSync7(fd);
83631
83926
  } finally {
83632
83927
  closeSync4(fd);
83633
83928
  }
83634
83929
  }
83635
83930
  function resolveContainedPaths(projectDir, compiledDir, relativePath) {
83636
- const projectPath = join18(projectDir, relativePath);
83931
+ const projectPath = join19(projectDir, relativePath);
83637
83932
  if (!isWithinProjectRoot(projectDir, projectPath)) return null;
83638
83933
  if (!compiledDir) return { projectPath, compiledPath: null };
83639
- const compiledPath = join18(compiledDir, relativePath);
83934
+ const compiledPath = join19(compiledDir, relativePath);
83640
83935
  if (!isWithinProjectRoot(compiledDir, compiledPath)) return null;
83641
83936
  return { projectPath, compiledPath };
83642
83937
  }
@@ -84550,7 +84845,7 @@ var init_shaderTransitions = __esm({
84550
84845
 
84551
84846
  // ../engine/src/services/hdrCapture.ts
84552
84847
  import { existsSync as existsSync15, readdirSync as readdirSync7 } from "fs";
84553
- import { join as join19 } from "path";
84848
+ import { join as join20 } from "path";
84554
84849
  import { homedir as homedir2 } from "os";
84555
84850
  function linearToPQ(L) {
84556
84851
  const Lp = Math.max(0, L * SDR_NITS / PQ_MAX_NITS);
@@ -84666,12 +84961,12 @@ function float16ToPqRgb(rawBuffer, bytesPerRow, width, height) {
84666
84961
  return output;
84667
84962
  }
84668
84963
  function resolveHeadedChromePath() {
84669
- const baseDir = join19(homedir2(), ".cache", "puppeteer", "chrome");
84964
+ const baseDir = join20(homedir2(), ".cache", "puppeteer", "chrome");
84670
84965
  if (!existsSync15(baseDir)) return void 0;
84671
84966
  const versions = readdirSync7(baseDir).sort().reverse();
84672
84967
  for (const version2 of versions) {
84673
84968
  const candidates = [
84674
- join19(
84969
+ join20(
84675
84970
  baseDir,
84676
84971
  version2,
84677
84972
  "chrome-mac-arm64",
@@ -84680,7 +84975,7 @@ function resolveHeadedChromePath() {
84680
84975
  "MacOS",
84681
84976
  "Google Chrome for Testing"
84682
84977
  ),
84683
- join19(
84978
+ join20(
84684
84979
  baseDir,
84685
84980
  version2,
84686
84981
  "chrome-mac-x64",
@@ -84689,8 +84984,8 @@ function resolveHeadedChromePath() {
84689
84984
  "MacOS",
84690
84985
  "Google Chrome for Testing"
84691
84986
  ),
84692
- join19(baseDir, version2, "chrome-linux64", "chrome"),
84693
- join19(baseDir, version2, "chrome-win64", "chrome.exe")
84987
+ join20(baseDir, version2, "chrome-linux64", "chrome"),
84988
+ join20(baseDir, version2, "chrome-win64", "chrome.exe")
84694
84989
  ];
84695
84990
  for (const binary of candidates) {
84696
84991
  if (existsSync15(binary)) return binary;
@@ -88196,13 +88491,13 @@ import {
88196
88491
  existsSync as existsSync23,
88197
88492
  mkdirSync as mkdirSync13,
88198
88493
  mkdtempSync as mkdtempSync8,
88199
- readFileSync as readFileSync10,
88494
+ readFileSync as readFileSync11,
88200
88495
  renameSync as renameSync5,
88201
88496
  rmSync as rmSync11,
88202
88497
  writeFileSync as writeFileSync9
88203
88498
  } from "fs";
88204
88499
  import { homedir as homedir4, tmpdir as tmpdir5 } from "os";
88205
- import { dirname as dirname13, join as join31 } from "path";
88500
+ import { dirname as dirname14, join as join32 } from "path";
88206
88501
  async function compressToWoff2(input) {
88207
88502
  return Buffer.from(await compress(input));
88208
88503
  }
@@ -88210,17 +88505,17 @@ function rawMimeType(format) {
88210
88505
  return RAW_MIME_TYPES[format] ?? "font/ttf";
88211
88506
  }
88212
88507
  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");
88508
+ const root = process.env.HYPERFRAMES_FONT_CACHE_DIR ?? (process.env.AWS_LAMBDA_FUNCTION_NAME ? join32(tmpdir5(), "hyperframes", "fonts") : join32(homedir4(), ".cache", "hyperframes", "fonts"));
88509
+ return join32(root, "local-compression-v1");
88215
88510
  }
88216
88511
  function cachedCompressionPath(input, originalFormat, cacheDir) {
88217
88512
  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`);
88513
+ return join32(cacheDir, `${digest}.woff2`);
88219
88514
  }
88220
88515
  function readCachedCompression(path) {
88221
88516
  try {
88222
88517
  if (!existsSync23(path)) return null;
88223
- const cached2 = readFileSync10(path);
88518
+ const cached2 = readFileSync11(path);
88224
88519
  return cached2.length > 0 ? cached2 : null;
88225
88520
  } catch {
88226
88521
  return null;
@@ -88229,9 +88524,9 @@ function readCachedCompression(path) {
88229
88524
  function cacheCompression(path, compressed) {
88230
88525
  let tempDir;
88231
88526
  try {
88232
- mkdirSync13(dirname13(path), { recursive: true });
88233
- tempDir = mkdtempSync8(join31(dirname13(path), ".compression-"));
88234
- const tmpPath = join31(tempDir, "font.woff2");
88527
+ mkdirSync13(dirname14(path), { recursive: true });
88528
+ tempDir = mkdtempSync8(join32(dirname14(path), ".compression-"));
88529
+ const tmpPath = join32(tempDir, "font.woff2");
88235
88530
  writeFileSync9(tmpPath, compressed, { flag: "wx", mode: 420 });
88236
88531
  renameSync5(tmpPath, path);
88237
88532
  } catch {
@@ -88290,7 +88585,7 @@ import {
88290
88585
  existsSync as existsSync33,
88291
88586
  mkdirSync as mkdirSync19,
88292
88587
  mkdtempSync as mkdtempSync11,
88293
- readFileSync as readFileSync14,
88588
+ readFileSync as readFileSync15,
88294
88589
  readdirSync as readdirSync12,
88295
88590
  rmSync as rmSync15,
88296
88591
  statSync as statSync12,
@@ -88299,10 +88594,10 @@ import {
88299
88594
  appendFileSync
88300
88595
  } from "fs";
88301
88596
  import { tmpdir as tmpdir7 } from "os";
88302
- import { join as join47, dirname as dirname19, resolve as resolve13 } from "path";
88597
+ import { join as join48, dirname as dirname20, resolve as resolve13 } from "path";
88303
88598
  import { totalmem as totalmem3 } from "os";
88304
88599
  import { randomUUID as randomUUID3 } from "crypto";
88305
- import { fileURLToPath as fileURLToPath5 } from "url";
88600
+ import { fileURLToPath as fileURLToPath6 } from "url";
88306
88601
 
88307
88602
  // ../producer/src/services/fileServer.ts
88308
88603
  init_compiler();
@@ -88322,14 +88617,14 @@ import {
88322
88617
  } from "fs";
88323
88618
  import { promisify as promisify4 } from "util";
88324
88619
  import { Readable as Readable2 } from "stream";
88325
- import { join as join20, extname as extname4, resolve as resolve7, sep as sep3 } from "path";
88620
+ import { join as join21, extname as extname4, resolve as resolve7, sep as sep3 } from "path";
88326
88621
 
88327
88622
  // ../producer/src/services/hyperframeRuntimeLoader.ts
88328
88623
  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));
88624
+ import { existsSync as existsSync16, readFileSync as readFileSync8 } from "fs";
88625
+ import { dirname as dirname11, resolve as resolve6 } from "path";
88626
+ import { fileURLToPath as fileURLToPath3 } from "url";
88627
+ var PRODUCER_DIR = dirname11(fileURLToPath3(import.meta.url));
88333
88628
  var SIBLING_MANIFEST_PATH = resolve6(PRODUCER_DIR, "hyperframe.manifest.json");
88334
88629
  var MODULE_RELATIVE_MANIFEST_PATH = resolve6(
88335
88630
  PRODUCER_DIR,
@@ -88364,7 +88659,7 @@ function resolveVerifiedHyperframeRuntime() {
88364
88659
  `[HyperframeRuntimeLoader] Missing manifest. Tried: ${tried}. Searched from cwd=${process.cwd()}. Build core runtime artifacts before rendering.`
88365
88660
  );
88366
88661
  }
88367
- const manifestRaw = readFileSync7(manifestPath, "utf8");
88662
+ const manifestRaw = readFileSync8(manifestPath, "utf8");
88368
88663
  const manifest = JSON.parse(manifestRaw);
88369
88664
  const runtimeFileName = manifest.artifacts?.iife;
88370
88665
  if (!runtimeFileName || !manifest.sha256) {
@@ -88372,11 +88667,11 @@ function resolveVerifiedHyperframeRuntime() {
88372
88667
  `[HyperframeRuntimeLoader] Invalid manifest at ${manifestPath}; missing iife artifact or sha256.`
88373
88668
  );
88374
88669
  }
88375
- const runtimePath = resolve6(dirname10(manifestPath), runtimeFileName);
88670
+ const runtimePath = resolve6(dirname11(manifestPath), runtimeFileName);
88376
88671
  if (!existsSync16(runtimePath)) {
88377
88672
  throw new Error(`[HyperframeRuntimeLoader] Missing runtime artifact at ${runtimePath}.`);
88378
88673
  }
88379
- const runtimeSource = readFileSync7(runtimePath, "utf8");
88674
+ const runtimeSource = readFileSync8(runtimePath, "utf8");
88380
88675
  const runtimeSha = createHash4("sha256").update(runtimeSource, "utf8").digest("hex");
88381
88676
  if (runtimeSha !== manifest.sha256) {
88382
88677
  throw new Error(
@@ -88938,7 +89233,7 @@ function createFileServer2(options) {
88938
89233
  }).join("/");
88939
89234
  let file = null;
88940
89235
  for (const root of compiledDir ? [compiledDir, projectDir] : [projectDir]) {
88941
- const candidate = join20(root, relativePath);
89236
+ const candidate = join21(root, relativePath);
88942
89237
  if (isPathInside2(candidate, root)) file = openRegularFile(candidate);
88943
89238
  if (file) break;
88944
89239
  }
@@ -89085,20 +89380,20 @@ import {
89085
89380
  symlinkSync,
89086
89381
  writeFileSync as writeFileSync7
89087
89382
  } from "fs";
89088
- import { basename as basename4, dirname as dirname11, isAbsolute as isAbsolute3, join as join22, relative as relative3, resolve as resolve8 } from "path";
89383
+ import { basename as basename4, dirname as dirname12, isAbsolute as isAbsolute3, join as join23, relative as relative3, resolve as resolve8 } from "path";
89089
89384
 
89090
89385
  // ../producer/src/utils/paths.ts
89091
89386
  import {
89092
89387
  basename as basename3,
89093
- join as join21,
89388
+ join as join22,
89094
89389
  resolve as nodeResolve,
89095
89390
  relative as nodeRelative,
89096
89391
  isAbsolute as nodeIsAbsolute
89097
89392
  } from "path";
89098
- import { fileURLToPath as fileURLToPath3 } from "url";
89393
+ import { fileURLToPath as fileURLToPath4 } from "url";
89099
89394
  var DEFAULT_RENDERS_DIR = process.env.PRODUCER_RENDERS_DIR ?? // fileURLToPath (not URL.pathname): on Windows .pathname is "/D:/..." which
89100
89395
  // resolves to a bogus renders dir.
89101
- nodeResolve(fileURLToPath3(import.meta.url), "../../..", "renders");
89396
+ nodeResolve(fileURLToPath4(import.meta.url), "../../..", "renders");
89102
89397
  function isPathInside3(childPath, parentPath, options = {}) {
89103
89398
  const resolvePath = options.pathModule?.resolve ?? nodeResolve;
89104
89399
  const relativePath = options.pathModule?.relative ?? nodeRelative;
@@ -89128,7 +89423,7 @@ function formatExportFrameName(index, ext) {
89128
89423
  function resolveRenderPaths(projectDir, outputPath, rendersDir = DEFAULT_RENDERS_DIR) {
89129
89424
  const absoluteProjectDir = nodeResolve(projectDir);
89130
89425
  const projectName = basename3(absoluteProjectDir);
89131
- const resolvedOutputPath = outputPath ?? join21(rendersDir, `${projectName}.mp4`);
89426
+ const resolvedOutputPath = outputPath ?? join22(rendersDir, `${projectName}.mp4`);
89132
89427
  const absoluteOutputPath = nodeResolve(resolvedOutputPath);
89133
89428
  return { absoluteProjectDir, absoluteOutputPath };
89134
89429
  }
@@ -89165,21 +89460,21 @@ function resolveDeviceScaleFactor(input) {
89165
89460
  return target.width / input.compositionWidth;
89166
89461
  }
89167
89462
  function writeCompiledArtifacts(compiled, workDir, includeSummary) {
89168
- const compileDir = join22(workDir, "compiled");
89463
+ const compileDir = join23(workDir, "compiled");
89169
89464
  mkdirSync9(compileDir, { recursive: true });
89170
- writeFileSync7(join22(compileDir, "index.html"), compiled.html, "utf-8");
89465
+ writeFileSync7(join23(compileDir, "index.html"), compiled.html, "utf-8");
89171
89466
  for (const [srcPath, html] of compiled.subCompositions) {
89172
- const outPath = join22(compileDir, srcPath);
89173
- mkdirSync9(dirname11(outPath), { recursive: true });
89467
+ const outPath = join23(compileDir, srcPath);
89468
+ mkdirSync9(dirname12(outPath), { recursive: true });
89174
89469
  writeFileSync7(outPath, html, "utf-8");
89175
89470
  }
89176
89471
  for (const [relativePath, absolutePath] of compiled.externalAssets) {
89177
- const outPath = resolve8(join22(compileDir, relativePath));
89472
+ const outPath = resolve8(join23(compileDir, relativePath));
89178
89473
  if (!isPathInside3(outPath, compileDir)) {
89179
89474
  console.warn(`[Render] Skipping external asset with unsafe path: ${relativePath}`);
89180
89475
  continue;
89181
89476
  }
89182
- mkdirSync9(dirname11(outPath), { recursive: true });
89477
+ mkdirSync9(dirname12(outPath), { recursive: true });
89183
89478
  copyFileSync3(absolutePath, outPath);
89184
89479
  }
89185
89480
  if (includeSummary) {
@@ -89205,7 +89500,7 @@ function writeCompiledArtifacts(compiled, workDir, includeSummary) {
89205
89500
  renderModeHints: compiled.renderModeHints,
89206
89501
  hasShaderTransitions: compiled.hasShaderTransitions
89207
89502
  };
89208
- writeFileSync7(join22(compileDir, "summary.json"), JSON.stringify(summary, null, 2), "utf-8");
89503
+ writeFileSync7(join23(compileDir, "summary.json"), JSON.stringify(summary, null, 2), "utf-8");
89209
89504
  }
89210
89505
  }
89211
89506
  function applyRenderModeHints(alreadyForced, compiled, log = defaultLogger) {
@@ -89264,8 +89559,8 @@ function reportWorkerStartup(job, progress, onProgress) {
89264
89559
  }
89265
89560
  var materializePathModule = {
89266
89561
  resolve: resolve8,
89267
- join: join22,
89268
- dirname: dirname11,
89562
+ join: join23,
89563
+ dirname: dirname12,
89269
89564
  basename: basename4,
89270
89565
  relative: relative3,
89271
89566
  isAbsolute: isAbsolute3
@@ -89568,7 +89863,7 @@ import {
89568
89863
  renameSync as renameSync3,
89569
89864
  rmSync as rmSync8
89570
89865
  } from "fs";
89571
- import { basename as basename5, dirname as dirname12, extname as extname5, join as join23, resolve as resolve9 } from "path";
89866
+ import { basename as basename5, dirname as dirname13, extname as extname5, join as join24, resolve as resolve9 } from "path";
89572
89867
 
89573
89868
  // ../producer/src/utils/ffprobe.ts
89574
89869
  init_src();
@@ -89602,10 +89897,10 @@ function buildArtifactExpectation(input) {
89602
89897
  };
89603
89898
  }
89604
89899
  function createSiblingTransactionDirectory(destination) {
89605
- const parent = dirname12(destination);
89900
+ const parent = dirname13(destination);
89606
89901
  const extension = extname5(destination);
89607
89902
  const stem = extension ? basename5(destination, extension) : basename5(destination);
89608
- return mkdtempSync6(join23(parent, `.${stem}.hf-transaction-`));
89903
+ return mkdtempSync6(join24(parent, `.${stem}.hf-transaction-`));
89609
89904
  }
89610
89905
  function assertReadableNonEmptyFile(path) {
89611
89906
  const fd = openSync6(path, "r");
@@ -89623,7 +89918,7 @@ function collectDirectoryFiles(root) {
89623
89918
  const files = [];
89624
89919
  const visit = (directory) => {
89625
89920
  for (const entry of readdirSync8(directory, { withFileTypes: true })) {
89626
- const path = join23(directory, entry.name);
89921
+ const path = join24(directory, entry.name);
89627
89922
  if (entry.isDirectory()) visit(path);
89628
89923
  else if (entry.isFile()) files.push(path);
89629
89924
  }
@@ -89666,8 +89961,8 @@ var ArtifactTransaction = class {
89666
89961
  this.fileSystem = fileSystem;
89667
89962
  this.destinationPath = resolve9(destinationPath);
89668
89963
  this.transactionDirectory = createSiblingTransactionDirectory(this.destinationPath);
89669
- this.stagingPath = join23(this.transactionDirectory, basename5(this.destinationPath));
89670
- this.backupPath = join23(this.transactionDirectory, "backup");
89964
+ this.stagingPath = join24(this.transactionDirectory, basename5(this.destinationPath));
89965
+ this.backupPath = join24(this.transactionDirectory, "backup");
89671
89966
  this.durationProbe = durationProbe;
89672
89967
  }
89673
89968
  kind;
@@ -89708,14 +90003,14 @@ var ArtifactTransaction = class {
89708
90003
  */
89709
90004
  async assertDirectoryExpectation(expected) {
89710
90005
  for (const required of expected.requiredFiles ?? []) {
89711
- const path = join23(this.stagingPath, required);
90006
+ const path = join24(this.stagingPath, required);
89712
90007
  if (!existsSync19(path)) {
89713
90008
  throw new Error(`Render artifact directory is missing ${required}: ${this.stagingPath}`);
89714
90009
  }
89715
90010
  assertReadableNonEmptyFile(path);
89716
90011
  }
89717
90012
  if (expected.probeTarget === void 0) return;
89718
- await this.assertArtifactDuration(expected, join23(this.stagingPath, expected.probeTarget));
90013
+ await this.assertArtifactDuration(expected, join24(this.stagingPath, expected.probeTarget));
89719
90014
  }
89720
90015
  async assertArtifactDuration(expected, probePath = this.stagingPath) {
89721
90016
  const expectedSeconds = expected.expectedDurationSeconds;
@@ -89929,7 +90224,7 @@ function replanAfterFailure(plan2, failure) {
89929
90224
  // ../producer/src/services/render/stages/captureSegmentedStage.ts
89930
90225
  init_src();
89931
90226
  import { existsSync as existsSync20, mkdirSync as mkdirSync11, rmSync as rmSync10, statSync as statSync8 } from "fs";
89932
- import { join as join27 } from "path";
90227
+ import { join as join28 } from "path";
89933
90228
 
89934
90229
  // ../producer/src/services/render/captureStageError.ts
89935
90230
  init_src();
@@ -89965,7 +90260,7 @@ init_src();
89965
90260
  // ../producer/src/services/hdrCompositor.ts
89966
90261
  init_src();
89967
90262
  import { readSync as readSync2, closeSync as closeSync7 } from "fs";
89968
- import { join as join24 } from "path";
90263
+ import { join as join25 } from "path";
89969
90264
 
89970
90265
  // ../producer/src/services/render/hdrPerf.ts
89971
90266
  function createHdrPerfCollector() {
@@ -90477,7 +90772,7 @@ async function compositeHdrFrame(ctx, canvas, time, fullStacking, elementFilter,
90477
90772
  if (shouldLog && debugDumpDir) {
90478
90773
  const after2 = countNonZeroRgb48(canvas);
90479
90774
  const dumpName = `frame_${String(debugFrameIndex).padStart(4, "0")}_layer_${String(layerIdx).padStart(2, "0")}_dom.png`;
90480
- const dumpPath = join24(debugDumpDir, dumpName);
90775
+ const dumpPath = join25(debugDumpDir, dumpName);
90481
90776
  writeFileExclusiveSync(dumpPath, domPng);
90482
90777
  log.info("[diag] dom layer blit", {
90483
90778
  frame: debugFrameIndex,
@@ -90521,11 +90816,11 @@ import {
90521
90816
  mkdirSync as mkdirSync10,
90522
90817
  mkdtempSync as mkdtempSync7,
90523
90818
  openSync as openSync7,
90524
- readFileSync as readFileSync8,
90819
+ readFileSync as readFileSync9,
90525
90820
  rmSync as rmSync9,
90526
90821
  statfsSync
90527
90822
  } from "fs";
90528
- import { join as join25 } from "path";
90823
+ import { join as join26 } from "path";
90529
90824
  var NO_FOLLOW_FLAG = constants4.O_NOFOLLOW ?? 0;
90530
90825
  function tempDirSafePrefix(id) {
90531
90826
  const safe = id.replace(/[^A-Za-z0-9_.-]/g, "_").slice(0, 80);
@@ -90769,10 +91064,10 @@ async function extractHdrVideoFrames(args) {
90769
91064
  const window3 = extractionWindows.get(videoId);
90770
91065
  if (!video || !window3) continue;
90771
91066
  mkdirSync10(framesDir, { recursive: true });
90772
- const frameDir = mkdtempSync7(join25(framesDir, `hdr_${tempDirSafePrefix(videoId)}-`));
91067
+ const frameDir = mkdtempSync7(join26(framesDir, `hdr_${tempDirSafePrefix(videoId)}-`));
90773
91068
  createdFrameDirs.add(frameDir);
90774
91069
  const dims = prep.hdrExtractionDims.get(videoId) ?? { width, height };
90775
- const rawPath = join25(frameDir, "frames.rgb48le");
91070
+ const rawPath = join26(frameDir, "frames.rgb48le");
90776
91071
  const extractionStart = String(window3.extractionMediaStart ?? window3.mediaStart);
90777
91072
  const ffmpegArgs = [];
90778
91073
  if (window3.finalFrameOnly) {
@@ -90858,7 +91153,7 @@ function decodeHdrImageBuffers(args) {
90858
91153
  const out = /* @__PURE__ */ new Map();
90859
91154
  for (const [imageId, srcPath] of hdrImageSrcPaths) {
90860
91155
  try {
90861
- const decoded = decodePngToRgb48le(readFileSync8(srcPath));
91156
+ const decoded = decodePngToRgb48le(readFileSync9(srcPath));
90862
91157
  const layout2 = prep.hdrExtractionDims.get(imageId);
90863
91158
  const fitInfo = prep.hdrImageFitInfo.get(imageId);
90864
91159
  if (layout2 && (layout2.width !== decoded.width || layout2.height !== decoded.height)) {
@@ -91187,7 +91482,7 @@ function isTargetLossError(error) {
91187
91482
  init_src();
91188
91483
  import { mkdtemp as mkdtemp2, writeFile as writeFile2 } from "fs/promises";
91189
91484
  import { tmpdir as tmpdir4 } from "os";
91190
- import { join as join26 } from "path";
91485
+ import { join as join27 } from "path";
91191
91486
 
91192
91487
  // ../producer/src/services/render/perfSummary.ts
91193
91488
  init_dist2();
@@ -91535,11 +91830,11 @@ function createDrainFrameGuard(args) {
91535
91830
  return buf;
91536
91831
  }
91537
91832
  if (db < verifyMinDb) {
91538
- const dumpDir = await mkdtemp2(join26(tmpdir4(), "hf-de-verify-fail-")).catch(() => null);
91833
+ const dumpDir = await mkdtemp2(join27(tmpdir4(), "hf-de-verify-fail-")).catch(() => null);
91539
91834
  if (dumpDir) {
91540
91835
  await Promise.all([
91541
- writeFile2(join26(dumpDir, `frame-${idx}-de.jpg`), buf),
91542
- writeFile2(join26(dumpDir, `frame-${idx}-truth.jpg`), truth)
91836
+ writeFile2(join27(dumpDir, `frame-${idx}-de.jpg`), buf),
91837
+ writeFile2(join27(dumpDir, `frame-${idx}-truth.jpg`), truth)
91543
91838
  ]).catch(() => {
91544
91839
  });
91545
91840
  }
@@ -91977,7 +92272,7 @@ async function runCaptureStreamingStage(input) {
91977
92272
 
91978
92273
  // ../producer/src/services/render/stages/captureSegmentedStage.ts
91979
92274
  function segmentOutputPath(segmentDir, index) {
91980
- return join27(segmentDir, `segment_${String(index).padStart(5, "0")}.mp4`);
92275
+ return join28(segmentDir, `segment_${String(index).padStart(5, "0")}.mp4`);
91981
92276
  }
91982
92277
  function segmentEncoderOptions(base2, segment) {
91983
92278
  return {
@@ -92223,7 +92518,7 @@ async function runCaptureSegmentedStage(input) {
92223
92518
  const { log, dedupPerfs, assertNotAborted } = input;
92224
92519
  const deps = { ...DEFAULT_DEPS, ...input.deps };
92225
92520
  const segments = planSegments(input.totalFrames, input.segmentFrames);
92226
- const segmentDir = input.segmentDir ?? join27(input.workDir, "segments");
92521
+ const segmentDir = input.segmentDir ?? join28(input.workDir, "segments");
92227
92522
  mkdirSync11(segmentDir, { recursive: true });
92228
92523
  const skip = input.completedSegments ?? /* @__PURE__ */ new Set();
92229
92524
  const pending = segments.filter((s) => !skip.has(s.index));
@@ -92295,8 +92590,8 @@ async function runCaptureSegmentedStage(input) {
92295
92590
 
92296
92591
  // ../producer/src/services/render/segmentManifest.ts
92297
92592
  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";
92593
+ import { existsSync as existsSync21, mkdirSync as mkdirSync12, readFileSync as readFileSync10, renameSync as renameSync4, statSync as statSync9, writeFileSync as writeFileSync8 } from "fs";
92594
+ import { join as join29 } from "path";
92300
92595
  var MANIFEST_FILENAME = "segments.json";
92301
92596
  function computeSegmentPlanHash(input) {
92302
92597
  const ordered = [
@@ -92319,7 +92614,7 @@ function computeSegmentPlanHash(input) {
92319
92614
  return createHash5("sha256").update(ordered).digest("hex").slice(0, 16);
92320
92615
  }
92321
92616
  function segmentDirFor(projectRendersDir, planHash) {
92322
- return join28(projectRendersDir, ".hf-segments", planHash);
92617
+ return join29(projectRendersDir, ".hf-segments", planHash);
92323
92618
  }
92324
92619
  function hasNumber(value, key2) {
92325
92620
  return key2 in value && typeof Reflect.get(value, key2) === "number";
@@ -92337,10 +92632,10 @@ function isManifest2(value) {
92337
92632
  return Reflect.get(value, "version") === 1 && hasString(value, "planHash") && hasNumber(value, "totalFrames") && hasNumber(value, "segmentFrames") && Array.isArray(completed) && completed.every(isEntry);
92338
92633
  }
92339
92634
  function readSegmentManifest(segmentDir) {
92340
- const path = join28(segmentDir, MANIFEST_FILENAME);
92635
+ const path = join29(segmentDir, MANIFEST_FILENAME);
92341
92636
  if (!existsSync21(path)) return null;
92342
92637
  try {
92343
- const parsed = JSON.parse(readFileSync9(path, "utf-8"));
92638
+ const parsed = JSON.parse(readFileSync10(path, "utf-8"));
92344
92639
  return isManifest2(parsed) ? parsed : null;
92345
92640
  } catch {
92346
92641
  return null;
@@ -92348,9 +92643,9 @@ function readSegmentManifest(segmentDir) {
92348
92643
  }
92349
92644
  function writeSegmentManifest(segmentDir, manifest) {
92350
92645
  mkdirSync12(segmentDir, { recursive: true });
92351
- const tmp = join28(segmentDir, `${MANIFEST_FILENAME}.${process.pid}.tmp`);
92646
+ const tmp = join29(segmentDir, `${MANIFEST_FILENAME}.${process.pid}.tmp`);
92352
92647
  writeFileSync8(tmp, JSON.stringify(manifest, null, 2), "utf-8");
92353
- renameSync4(tmp, join28(segmentDir, MANIFEST_FILENAME));
92648
+ renameSync4(tmp, join29(segmentDir, MANIFEST_FILENAME));
92354
92649
  }
92355
92650
  async function probeSegmentFrameCount(path, probe2) {
92356
92651
  try {
@@ -92458,7 +92753,7 @@ function resolveVideoCaptureBeyondViewport(videoCount) {
92458
92753
  // ../producer/src/services/render/captureCost.ts
92459
92754
  init_dist2();
92460
92755
  init_src();
92461
- import { join as join29 } from "path";
92756
+ import { join as join30 } from "path";
92462
92757
  var CAPTURE_CALIBRATION_TARGET_MS = 600;
92463
92758
  var MAX_MEASURED_CAPTURE_COST_MULTIPLIER = 8;
92464
92759
  var CAPTURE_CALIBRATION_PROTOCOL_TIMEOUT_MS = 3e4;
@@ -92694,7 +92989,7 @@ async function runCaptureCalibration(input) {
92694
92989
  });
92695
92990
  let calibration;
92696
92991
  try {
92697
- calibration = await runOneCalibration(join29(workDir, "capture-calibration"), calibrationCfg);
92992
+ calibration = await runOneCalibration(join30(workDir, "capture-calibration"), calibrationCfg);
92698
92993
  } catch (error) {
92699
92994
  const shouldFallback = !forceScreenshot && shouldFallbackToScreenshotAfterCalibrationError(error);
92700
92995
  if (!shouldFallback) {
@@ -92727,7 +93022,7 @@ async function runCaptureCalibration(input) {
92727
93022
  const screenshotCfg = createCaptureCalibrationConfig({ ...cfg, forceScreenshot: true });
92728
93023
  try {
92729
93024
  calibration = await runOneCalibration(
92730
- join29(workDir, "capture-calibration-screenshot"),
93025
+ join30(workDir, "capture-calibration-screenshot"),
92731
93026
  screenshotCfg
92732
93027
  );
92733
93028
  } catch (fallbackError) {
@@ -93152,7 +93447,7 @@ function countAuthoredTimedClips(html) {
93152
93447
 
93153
93448
  // ../producer/src/services/render/stages/compileStage.ts
93154
93449
  init_dist2();
93155
- import { join as join35 } from "path";
93450
+ import { join as join36 } from "path";
93156
93451
 
93157
93452
  // ../producer/src/services/htmlCompiler.ts
93158
93453
  init_esm10();
@@ -93162,8 +93457,8 @@ init_compiler();
93162
93457
  init_subCompositionValidity();
93163
93458
  init_assetResolution();
93164
93459
  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";
93460
+ import { createReadStream as createReadStream4, existsSync as existsSync27, mkdirSync as mkdirSync16, readFileSync as readFileSync14 } from "fs";
93461
+ import { join as join35, dirname as dirname16, resolve as resolve12, basename as basename6, relative as relative4 } from "path";
93167
93462
 
93168
93463
  // ../producer/src/services/renderMediaCollector.ts
93169
93464
  init_esm10();
@@ -93266,9 +93561,9 @@ init_src();
93266
93561
 
93267
93562
  // ../producer/src/services/deterministicFonts.ts
93268
93563
  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";
93564
+ import { existsSync as existsSync24, mkdirSync as mkdirSync14, mkdtempSync as mkdtempSync9, readFileSync as readFileSync12, writeFileSync as writeFileSync10 } from "fs";
93270
93565
  import { homedir as homedir5, tmpdir as tmpdir6 } from "os";
93271
- import { join as join32 } from "path";
93566
+ import { join as join33 } from "path";
93272
93567
 
93273
93568
  // ../core/dist/fonts/aliases.js
93274
93569
  init_dist();
@@ -93277,7 +93572,7 @@ init_dist();
93277
93572
  import { execFileSync as execFileSync2 } from "child_process";
93278
93573
  import { existsSync as existsSync22, lstatSync as lstatSync4, readdirSync as readdirSync9, realpathSync as realpathSync3 } from "fs";
93279
93574
  import { homedir as homedir3, platform as platform2 } from "os";
93280
- import { join as join30, resolve as resolve10 } from "path";
93575
+ import { join as join31, resolve as resolve10 } from "path";
93281
93576
  var SYSTEM_FONT_SIZE_LIMIT = 5 * 1024 * 1024;
93282
93577
  var PROFILER_TIMEOUT_MS = 5e3;
93283
93578
  var FONT_EXT_RE = /\.(otf|ttf|ttc|woff2?)$/i;
@@ -93374,7 +93669,7 @@ function fontDirectories() {
93374
93669
  const home = homedir3();
93375
93670
  if (platform2() === "darwin") {
93376
93671
  return [
93377
- join30(home, "Library", "Fonts"),
93672
+ join31(home, "Library", "Fonts"),
93378
93673
  "/Library/Fonts",
93379
93674
  "/System/Library/Fonts",
93380
93675
  "/System/Library/Fonts/Supplemental"
@@ -93382,13 +93677,13 @@ function fontDirectories() {
93382
93677
  }
93383
93678
  if (platform2() === "win32") {
93384
93679
  return [
93385
- join30(process.env.WINDIR || "C:\\Windows", "Fonts"),
93386
- join30(process.env.LOCALAPPDATA || join30(homedir3(), "AppData", "Local"), "Microsoft", "Windows", "Fonts")
93680
+ join31(process.env.WINDIR || "C:\\Windows", "Fonts"),
93681
+ join31(process.env.LOCALAPPDATA || join31(homedir3(), "AppData", "Local"), "Microsoft", "Windows", "Fonts")
93387
93682
  ];
93388
93683
  }
93389
93684
  return [
93390
- join30(home, ".fonts"),
93391
- join30(home, ".local", "share", "fonts"),
93685
+ join31(home, ".fonts"),
93686
+ join31(home, ".local", "share", "fonts"),
93392
93687
  "/usr/local/share/fonts",
93393
93688
  "/usr/share/fonts"
93394
93689
  ];
@@ -93399,7 +93694,7 @@ function collectFontFileEntries(dir, depth = 0) {
93399
93694
  const entries2 = [];
93400
93695
  try {
93401
93696
  for (const entry of readdirSync9(dir, { withFileTypes: true })) {
93402
- const fullPath = join30(dir, entry.name);
93697
+ const fullPath = join31(dir, entry.name);
93403
93698
  if (entry.isDirectory()) {
93404
93699
  entries2.push(...collectFontFileEntries(fullPath, depth + 1));
93405
93700
  continue;
@@ -94026,7 +94321,7 @@ async function buildFontFaceCss(requestedFamilies, options, fontText) {
94026
94321
  if (variants.length > 0) {
94027
94322
  let totalBytes = 0;
94028
94323
  for (const variant of variants) {
94029
- const fontBuffer = readFileSync11(variant.path);
94324
+ const fontBuffer = readFileSync12(variant.path);
94030
94325
  totalBytes += fontBuffer.length;
94031
94326
  const dataUri = await fontToDataUri(fontBuffer, variant.format);
94032
94327
  rules.push(buildFontFaceRule(originalCaseFamily, dataUri, variant.weight, variant.style));
@@ -94072,10 +94367,10 @@ function resolveFontCacheRoot() {
94072
94367
  return process.env.HYPERFRAMES_FONT_CACHE_DIR;
94073
94368
  }
94074
94369
  if (process.env.AWS_LAMBDA_FUNCTION_NAME) {
94075
- lambdaFontCacheRoot ??= mkdtempSync9(join32(tmpdir6(), "hyperframes-fonts-"));
94370
+ lambdaFontCacheRoot ??= mkdtempSync9(join33(tmpdir6(), "hyperframes-fonts-"));
94076
94371
  return lambdaFontCacheRoot;
94077
94372
  }
94078
- return join32(homedir5(), ".cache", "hyperframes", "fonts");
94373
+ return join33(homedir5(), ".cache", "hyperframes", "fonts");
94079
94374
  }
94080
94375
  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
94376
  function fontSlug(familyName) {
@@ -94083,14 +94378,14 @@ function fontSlug(familyName) {
94083
94378
  }
94084
94379
  var ephemeralFontCacheRoot;
94085
94380
  function fontCacheDir(slug) {
94086
- const dir = join32(resolveFontCacheRoot(), slug);
94381
+ const dir = join33(resolveFontCacheRoot(), slug);
94087
94382
  if (!existsSync24(dir)) {
94088
94383
  try {
94089
94384
  mkdirSync14(dir, { recursive: true });
94090
94385
  } catch {
94091
94386
  const firstFallback = ephemeralFontCacheRoot === void 0;
94092
- ephemeralFontCacheRoot ??= mkdtempSync9(join32(tmpdir6(), "hyperframes-fonts-"));
94093
- const fallback = join32(ephemeralFontCacheRoot, slug);
94387
+ ephemeralFontCacheRoot ??= mkdtempSync9(join33(tmpdir6(), "hyperframes-fonts-"));
94388
+ const fallback = join33(ephemeralFontCacheRoot, slug);
94094
94389
  mkdirSync14(fallback, { recursive: true });
94095
94390
  if (firstFallback) {
94096
94391
  defaultLogger.warn(
@@ -94106,7 +94401,7 @@ function subsetToken(woff2Url) {
94106
94401
  return createHash8("sha1").update(woff2Url).digest("hex").slice(0, 12);
94107
94402
  }
94108
94403
  function cachedWoff2Path(slug, weight, style, subset) {
94109
- return join32(fontCacheDir(slug), `${weight}-${style}-${subset}.woff2`);
94404
+ return join33(fontCacheDir(slug), `${weight}-${style}-${subset}.woff2`);
94110
94405
  }
94111
94406
  var FONT_FETCH_FAILED = "FONT_FETCH_FAILED";
94112
94407
  var FONT_FETCH_UNAVAILABLE = "FONT_FETCH_UNAVAILABLE";
@@ -94233,7 +94528,7 @@ async function fetchFontResource(url, init, readBody, familyName, what, options)
94233
94528
  }
94234
94529
  async function ensureWoff2DataUri(cachePath, woff2Url, familyName, weight, style, options) {
94235
94530
  try {
94236
- return `data:font/woff2;base64,${readFileSync11(cachePath).toString("base64")}`;
94531
+ return `data:font/woff2;base64,${readFileSync12(cachePath).toString("base64")}`;
94237
94532
  } catch {
94238
94533
  }
94239
94534
  const woff2What = `Google Fonts woff2 (${weight}/${style})`;
@@ -94258,7 +94553,7 @@ async function ensureWoff2DataUri(cachePath, woff2Url, familyName, weight, style
94258
94553
  return null;
94259
94554
  }
94260
94555
  }
94261
- return `data:font/woff2;base64,${readFileSync11(cachePath).toString("base64")}`;
94556
+ return `data:font/woff2;base64,${readFileSync12(cachePath).toString("base64")}`;
94262
94557
  }
94263
94558
  var googleFontCssCache = /* @__PURE__ */ new Map();
94264
94559
  function raceAgainstAbort(promise, signal) {
@@ -94539,12 +94834,12 @@ import {
94539
94834
  copyFileSync as copyFileSync4,
94540
94835
  existsSync as existsSync25,
94541
94836
  mkdirSync as mkdirSync15,
94542
- readFileSync as readFileSync12,
94837
+ readFileSync as readFileSync13,
94543
94838
  renameSync as renameSync6,
94544
94839
  rmSync as rmSync12,
94545
94840
  statSync as statSync10
94546
94841
  } from "fs";
94547
- import { dirname as dirname14, isAbsolute as isAbsolute4, join as join33, resolve as resolve11 } from "path";
94842
+ import { dirname as dirname15, isAbsolute as isAbsolute4, join as join34, resolve as resolve11 } from "path";
94548
94843
  var PREPARED_GIF_SUBDIR = "_animated_gif";
94549
94844
  var CACHE_SCHEMA = "hfgif-v1";
94550
94845
  function splitUrlSuffix(src) {
@@ -94697,11 +94992,11 @@ async function runAnimatedGifTranscode(request) {
94697
94992
  throw result.error ?? new Error(`Animated GIF transcode failed (${result.exitCode}): ${result.stderr.slice(-500)}`);
94698
94993
  }
94699
94994
  async function ensurePreparedWebm(input) {
94700
- if (!existsSync25(dirname14(input.cachePath))) {
94701
- mkdirSync15(dirname14(input.cachePath), { recursive: true });
94995
+ if (!existsSync25(dirname15(input.cachePath))) {
94996
+ mkdirSync15(dirname15(input.cachePath), { recursive: true });
94702
94997
  }
94703
- if (!existsSync25(dirname14(input.outputPath))) {
94704
- mkdirSync15(dirname14(input.outputPath), { recursive: true });
94998
+ if (!existsSync25(dirname15(input.outputPath))) {
94999
+ mkdirSync15(dirname15(input.outputPath), { recursive: true });
94705
95000
  }
94706
95001
  if (!isUsableFile(input.cachePath)) {
94707
95002
  const tmpPath = `${input.cachePath}.tmp-${process.pid}-${Date.now()}`;
@@ -94784,7 +95079,7 @@ function replaceImageWithVideo(input) {
94784
95079
  return video;
94785
95080
  }
94786
95081
  async function prepareAnimatedGifInputs(html, options) {
94787
- const outputDir = options.outputDir ?? join33(options.downloadDir, PREPARED_GIF_SUBDIR);
95082
+ const outputDir = options.outputDir ?? join34(options.downloadDir, PREPARED_GIF_SUBDIR);
94788
95083
  const outputSrcPrefix = normalizeRelPath(options.outputSrcPrefix ?? PREPARED_GIF_SUBDIR);
94789
95084
  const cacheDir = options.cacheDir ?? outputDir;
94790
95085
  const { document: document2 } = parseHTML(html);
@@ -94798,7 +95093,7 @@ async function prepareAnimatedGifInputs(html, options) {
94798
95093
  if (!hasGifExtension(src)) continue;
94799
95094
  const sourcePath = resolveGifSourcePath(src, options);
94800
95095
  if (!sourcePath) continue;
94801
- const bytes = readFileSync12(sourcePath);
95096
+ const bytes = readFileSync13(sourcePath);
94802
95097
  const metadata = parseAnimatedGifMetadata(bytes);
94803
95098
  if (!metadata?.animated) continue;
94804
95099
  const loop = resolveLoop(metadata, readLoopOverride(img));
@@ -94806,8 +95101,8 @@ async function prepareAnimatedGifInputs(html, options) {
94806
95101
  const { loopIterations, padSeconds } = resolvePreparedPlayback(metadata, loop, windowSeconds);
94807
95102
  const hash2 = computePreparedGifHash(bytes, loopIterations, padSeconds);
94808
95103
  const filename = `${CACHE_SCHEMA}-${hash2.slice(0, 24)}.webm`;
94809
- const cachePath = join33(cacheDir, filename);
94810
- const outputPath = join33(outputDir, filename);
95104
+ const cachePath = join34(cacheDir, filename);
95105
+ const outputPath = join34(outputDir, filename);
94811
95106
  const outputSrc = `${outputSrcPrefix}/${filename}`;
94812
95107
  await ensurePreparedWebm({
94813
95108
  sourcePath,
@@ -95338,7 +95633,7 @@ function assertSubCompositionsUsable(html, projectDir, visited = /* @__PURE__ */
95338
95633
  problems.push({ srcPath, detail: "the file does not exist" });
95339
95634
  continue;
95340
95635
  }
95341
- const fileHtml = readFileSync13(filePath, "utf-8");
95636
+ const fileHtml = readFileSync14(filePath, "utf-8");
95342
95637
  const validity = checkSubCompositionUsability(fileHtml, parseSubCompHtmlForValidity);
95343
95638
  if (!validity.ok) {
95344
95639
  problems.push({
@@ -95477,7 +95772,7 @@ async function resolveMediaDuration2(src, mediaStart, playbackRate, baseDir, dow
95477
95772
  return { duration: null, resolvedPath: src };
95478
95773
  }
95479
95774
  } else if (!filePath.startsWith("/")) {
95480
- filePath = join34(baseDir, filePath);
95775
+ filePath = join35(baseDir, filePath);
95481
95776
  }
95482
95777
  if (!existsSync27(filePath)) {
95483
95778
  return { duration: null, resolvedPath: filePath };
@@ -95615,7 +95910,7 @@ async function parseSubCompositions(html, projectDir, downloadDir, visited = /*
95615
95910
  if (!existsSync27(filePath)) {
95616
95911
  continue;
95617
95912
  }
95618
- const rawSubHtml = readFileSync13(filePath, "utf-8");
95913
+ const rawSubHtml = readFileSync14(filePath, "utf-8");
95619
95914
  const nestedVisited = new Set(visited);
95620
95915
  nestedVisited.add(filePath);
95621
95916
  workItems.push({ srcPath, filePath, rawSubHtml, nestedVisited });
@@ -95624,7 +95919,7 @@ async function parseSubCompositions(html, projectDir, downloadDir, visited = /*
95624
95919
  workItems.map(async (item) => {
95625
95920
  const { html: compiledSub } = await compileHtmlFile(
95626
95921
  item.rawSubHtml,
95627
- dirname15(item.filePath),
95922
+ dirname16(item.filePath),
95628
95923
  downloadDir
95629
95924
  );
95630
95925
  const nested = await parseSubCompositions(
@@ -95799,7 +96094,7 @@ function inlineSubCompositions2(html, subCompositions, projectDir, variableOverr
95799
96094
  if (!compHtml) {
95800
96095
  const filePath = resolve12(projectDir, srcPath);
95801
96096
  if (existsSync27(filePath)) {
95802
- compHtml = readFileSync13(filePath, "utf-8");
96097
+ compHtml = readFileSync14(filePath, "utf-8");
95803
96098
  }
95804
96099
  }
95805
96100
  return compHtml;
@@ -95856,17 +96151,33 @@ function inlineSubCompositions2(html, subCompositions, projectDir, variableOverr
95856
96151
  styleEl.textContent = result.styles.join("\n\n");
95857
96152
  head.appendChild(styleEl);
95858
96153
  }
96154
+ const isHoisted = (item) => Boolean(item.integrity?.trim()) || isNonRelativeUrl(item.src);
95859
96155
  if (body) {
95860
96156
  for (const item of result.scriptItems) {
95861
- if (item.kind === "external") ensureExternalScriptTag(document2, item.src, item);
96157
+ if (item.kind === "external" && isHoisted(item)) {
96158
+ ensureExternalScriptTag(document2, item.src, item);
96159
+ }
95862
96160
  }
95863
96161
  }
95864
96162
  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);
96163
+ if (body) {
96164
+ let pending = variablesByCompScript ? [variablesByCompScript] : [];
96165
+ const flushInline = () => {
96166
+ if (!pending.length) return;
96167
+ const scriptEl = document2.createElement("script");
96168
+ scriptEl.textContent = pending.join("\n;\n");
96169
+ body.appendChild(scriptEl);
96170
+ pending = [];
96171
+ };
96172
+ for (const item of result.scriptItems) {
96173
+ if (item.kind === "inline") {
96174
+ pending.push(item.content);
96175
+ } else if (!isHoisted(item)) {
96176
+ flushInline();
96177
+ ensureExternalScriptTag(document2, item.src, item);
96178
+ }
96179
+ }
96180
+ flushInline();
95870
96181
  }
95871
96182
  emitRootCompositionVariableStyles(
95872
96183
  document2,
@@ -96079,7 +96390,7 @@ async function localizeRemoteMediaSources(html, downloadDir) {
96079
96390
  return downloadAndRewriteUrls(
96080
96391
  urlSet,
96081
96392
  html,
96082
- join34(downloadDir, REMOTE_MEDIA_SUBDIR),
96393
+ join35(downloadDir, REMOTE_MEDIA_SUBDIR),
96083
96394
  "Remote media download failed",
96084
96395
  "Localized remote media source(s)"
96085
96396
  );
@@ -96094,7 +96405,7 @@ async function localizeRemoteImageSources(html, downloadDir) {
96094
96405
  return downloadAndRewriteUrls(
96095
96406
  urlSet,
96096
96407
  html,
96097
- join34(downloadDir, REMOTE_MEDIA_SUBDIR),
96408
+ join35(downloadDir, REMOTE_MEDIA_SUBDIR),
96098
96409
  "Remote image download failed",
96099
96410
  "Localized remote image source(s)"
96100
96411
  );
@@ -96110,7 +96421,7 @@ async function localizeRemoteBackgroundImages(html, downloadDir) {
96110
96421
  return downloadAndRewriteUrls(
96111
96422
  urlSet,
96112
96423
  html,
96113
- join34(downloadDir, REMOTE_MEDIA_SUBDIR),
96424
+ join35(downloadDir, REMOTE_MEDIA_SUBDIR),
96114
96425
  "Remote background-image download failed",
96115
96426
  "Localized remote background-image(s)",
96116
96427
  // Quoted url('..')/url("..") are rewritten by downloadAndRewriteUrls' default
@@ -96245,7 +96556,7 @@ async function localizeRemoteFontFaces(html, downloadDir) {
96245
96556
  return downloadAndRewriteUrls(
96246
96557
  urlSet,
96247
96558
  processed,
96248
- join34(downloadDir, REMOTE_MEDIA_SUBDIR),
96559
+ join35(downloadDir, REMOTE_MEDIA_SUBDIR),
96249
96560
  "Remote font download failed",
96250
96561
  "Localized remote font face(s)",
96251
96562
  (h, url, relPath) => h.replaceAll(`url(${url})`, `url("${relPath}")`)
@@ -96369,7 +96680,7 @@ function rebaseDirectEntryAssetPaths(html, projectDir, htmlPath) {
96369
96680
  }
96370
96681
  async function compileForRender(projectDir, htmlPath, downloadDir, options = {}) {
96371
96682
  const entryHtml = rebaseDirectEntryAssetPaths(
96372
- readFileSync13(htmlPath, "utf-8"),
96683
+ readFileSync14(htmlPath, "utf-8"),
96373
96684
  projectDir,
96374
96685
  htmlPath
96375
96686
  );
@@ -96860,13 +97171,13 @@ async function runCompileStage(input) {
96860
97171
  abortSignal
96861
97172
  } = input;
96862
97173
  const compileStart = Date.now();
96863
- const compiled = await compileForRender(projectDir, htmlPath, join35(workDir, "downloads"), {
97174
+ const compiled = await compileForRender(projectDir, htmlPath, join36(workDir, "downloads"), {
96864
97175
  log,
96865
97176
  failClosedFontFetch: failClosedFontFetch === true,
96866
97177
  allowSystemFontCapture,
96867
97178
  abortSignal,
96868
97179
  variables: input.variables,
96869
- animatedGifCacheDir: cfg.extractCacheDir ? join35(cfg.extractCacheDir, "animated-gif") : void 0,
97180
+ animatedGifCacheDir: cfg.extractCacheDir ? join36(cfg.extractCacheDir, "animated-gif") : void 0,
96870
97181
  ffmpegProcessTimeout: cfg.ffmpegProcessTimeout
96871
97182
  });
96872
97183
  assertNotAborted();
@@ -96928,7 +97239,7 @@ async function runCompileStage(input) {
96928
97239
  };
96929
97240
  await preflightCompositionAssetMediaTypes({
96930
97241
  projectDir,
96931
- compiledDir: join35(workDir, "compiled"),
97242
+ compiledDir: join36(workDir, "compiled"),
96932
97243
  composition,
96933
97244
  signal: abortSignal
96934
97245
  });
@@ -96977,7 +97288,7 @@ init_esm10();
96977
97288
  init_src();
96978
97289
  init_dist2();
96979
97290
  init_dist();
96980
- import { join as join36 } from "path";
97291
+ import { join as join37 } from "path";
96981
97292
 
96982
97293
  // ../producer/src/services/render/stages/probeFailures.ts
96983
97294
  var NETWORK_FAILURE_PATTERN = /404|ERR_NAME_NOT_RESOLVED|ERR_CONNECTION_REFUSED|net::ERR_/i;
@@ -97110,7 +97421,7 @@ async function runProbeStage(input) {
97110
97421
  });
97111
97422
  fileServer = await createFileServer2({
97112
97423
  projectDir,
97113
- compiledDir: join36(workDir, "compiled"),
97424
+ compiledDir: join37(workDir, "compiled"),
97114
97425
  port: 0,
97115
97426
  preHeadScripts: [VIRTUAL_TIME_SHIM],
97116
97427
  fps: job.config.fps
@@ -97136,7 +97447,7 @@ async function runProbeStage(input) {
97136
97447
  log.info("Creating capture session...", { attempt, maxAttempts: PROBE_MAX_ATTEMPTS });
97137
97448
  probeSession = await createCaptureSession(
97138
97449
  fileServer.url,
97139
- join36(workDir, "probe"),
97450
+ join37(workDir, "probe"),
97140
97451
  captureOpts,
97141
97452
  null,
97142
97453
  probeCfg
@@ -97221,7 +97532,7 @@ async function runProbeStage(input) {
97221
97532
  });
97222
97533
  probeSession = await createCaptureSession(
97223
97534
  fileServer.url,
97224
- join36(workDir, "probe-screenshot"),
97535
+ join37(workDir, "probe-screenshot"),
97225
97536
  captureOpts,
97226
97537
  null,
97227
97538
  { ...probeCfg, forceScreenshot: true }
@@ -97257,7 +97568,7 @@ async function runProbeStage(input) {
97257
97568
  compiled,
97258
97569
  resolutions,
97259
97570
  projectDir,
97260
- join36(workDir, "downloads")
97571
+ join37(workDir, "downloads")
97261
97572
  );
97262
97573
  assertNotAborted();
97263
97574
  composition.videos = compiled.videos;
@@ -97436,7 +97747,7 @@ async function runProbeStage(input) {
97436
97747
  try {
97437
97748
  await preflightCompositionAssetMediaTypes({
97438
97749
  projectDir,
97439
- compiledDir: join36(workDir, "compiled"),
97750
+ compiledDir: join37(workDir, "compiled"),
97440
97751
  composition,
97441
97752
  signal: abortSignal
97442
97753
  });
@@ -97564,7 +97875,7 @@ function validateRenderDuration(input) {
97564
97875
  // ../producer/src/services/render/stages/extractVideosStage.ts
97565
97876
  init_src();
97566
97877
  import { existsSync as existsSync28 } from "fs";
97567
- import { join as join37 } from "path";
97878
+ import { join as join38 } from "path";
97568
97879
 
97569
97880
  // ../producer/src/services/render/extractionFailureMetadata.ts
97570
97881
  function stringOrEmpty(value) {
@@ -97857,7 +98168,7 @@ async function runExtractVideosStage(input) {
97857
98168
  // because short boundary counts can differ by one frame.
97858
98169
  {
97859
98170
  fps: job.config.fps,
97860
- outputDir: join37(compiledDir, "__hyperframes_video_frames"),
98171
+ outputDir: join38(compiledDir, "__hyperframes_video_frames"),
97861
98172
  format: job.config.videoFrameFormat ?? "auto",
97862
98173
  toneMapHdrToSdr: job.config.hdrMode === "force-sdr",
97863
98174
  timelineEnd: composition.duration,
@@ -97923,7 +98234,7 @@ function appendAutoDetectedVideoAudio(composition, extracted) {
97923
98234
 
97924
98235
  // ../producer/src/services/render/stages/audioStage.ts
97925
98236
  init_src();
97926
- import { join as join38 } from "path";
98237
+ import { join as join39 } from "path";
97927
98238
  async function runAudioStage(input) {
97928
98239
  const {
97929
98240
  projectDir,
@@ -97938,7 +98249,7 @@ async function runAudioStage(input) {
97938
98249
  log
97939
98250
  } = input;
97940
98251
  const stage3Start = Date.now();
97941
- const audioOutputPath = join38(workDir, MIXED_AUDIO_FILENAME);
98252
+ const audioOutputPath = join39(workDir, MIXED_AUDIO_FILENAME);
97942
98253
  let hasAudio = false;
97943
98254
  let audioError;
97944
98255
  let audioFailures;
@@ -97948,7 +98259,7 @@ async function runAudioStage(input) {
97948
98259
  audioResult = await processCompositionAudio(
97949
98260
  audios,
97950
98261
  projectDir,
97951
- join38(workDir, "audio-work"),
98262
+ join39(workDir, "audio-work"),
97952
98263
  audioOutputPath,
97953
98264
  duration,
97954
98265
  abortSignal,
@@ -98020,7 +98331,7 @@ async function runAudioStage(input) {
98020
98331
  // ../producer/src/services/render/stages/captureStage.ts
98021
98332
  init_src();
98022
98333
  import { existsSync as existsSync29, readdirSync as readdirSync10, statfsSync as statfsSync2 } from "fs";
98023
- import { join as join39 } from "path";
98334
+ import { join as join40 } from "path";
98024
98335
  function shouldAllowAdaptiveCaptureRetry(workerCount, _explicitlyConfigured) {
98025
98336
  return workerCount > 1;
98026
98337
  }
@@ -98075,13 +98386,13 @@ function measureCaptureFrameBytes(workDir, framesDir) {
98075
98386
  if (!existsSync29(workDir)) return total;
98076
98387
  for (const attempt of readdirSync10(workDir)) {
98077
98388
  if (/^retry-\d+-batch-\d+-worker-\d+$/.test(attempt)) {
98078
- total += sampleDirectoryBytes(join39(workDir, attempt));
98389
+ total += sampleDirectoryBytes(join40(workDir, attempt));
98079
98390
  continue;
98080
98391
  }
98081
98392
  if (!/^capture-attempt-\d+$/.test(attempt)) continue;
98082
- const attemptDir = join39(workDir, attempt);
98393
+ const attemptDir = join40(workDir, attempt);
98083
98394
  for (const name of readdirSync10(attemptDir)) {
98084
- if (/^worker-\d+$/.test(name)) total += sampleDirectoryBytes(join39(attemptDir, name));
98395
+ if (/^worker-\d+$/.test(name)) total += sampleDirectoryBytes(join40(attemptDir, name));
98085
98396
  }
98086
98397
  }
98087
98398
  return total;
@@ -98358,7 +98669,7 @@ async function captureSessionFrames(session, { input, rangeStart, rangeEnd, resu
98358
98669
  init_src();
98359
98670
  init_dist2();
98360
98671
  import { existsSync as existsSync31, mkdirSync as mkdirSync17 } from "fs";
98361
- import { join as join43 } from "path";
98672
+ import { join as join44 } from "path";
98362
98673
 
98363
98674
  // ../producer/src/services/hdrImageTransferCache.ts
98364
98675
  init_src();
@@ -98422,7 +98733,7 @@ function createHdrImageTransferCache(options = {}) {
98422
98733
 
98423
98734
  // ../producer/src/services/render/stages/captureHdrSequentialLoop.ts
98424
98735
  init_src();
98425
- import { join as join40 } from "path";
98736
+ import { join as join41 } from "path";
98426
98737
  async function runSequentialLayeredFrameLoop(input) {
98427
98738
  const {
98428
98739
  job,
@@ -98543,7 +98854,7 @@ async function runSequentialLayeredFrameLoop(input) {
98543
98854
  );
98544
98855
  if (debugDumpEnabled && debugDumpDir && i % 30 === 0) {
98545
98856
  writeFileExclusiveSync(
98546
- join40(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
98857
+ join41(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
98547
98858
  normalCanvas
98548
98859
  );
98549
98860
  }
@@ -98575,13 +98886,13 @@ async function runSequentialLayeredFrameLoop(input) {
98575
98886
 
98576
98887
  // ../producer/src/services/render/stages/captureHdrHybridLoop.ts
98577
98888
  init_src();
98578
- import { join as join42 } from "path";
98889
+ import { join as join43 } from "path";
98579
98890
 
98580
98891
  // ../producer/src/services/shaderTransitionWorkerPool.ts
98581
98892
  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";
98893
+ import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL2 } from "url";
98894
+ import { dirname as dirname17, join as join42 } from "path";
98895
+ import { createRequire } from "module";
98585
98896
  import { existsSync as existsSync30 } from "fs";
98586
98897
  import { cpus as cpus3 } from "os";
98587
98898
  function resolveWorkerEntry(explicit) {
@@ -98593,10 +98904,10 @@ function resolveWorkerEntry(explicit) {
98593
98904
  const isTs = override.endsWith(".ts");
98594
98905
  return { path: override, isTs };
98595
98906
  }
98596
- const moduleDir = dirname16(fileURLToPath4(import.meta.url));
98597
- const jsPath = join41(moduleDir, "shaderTransitionWorker.js");
98907
+ const moduleDir = dirname17(fileURLToPath5(import.meta.url));
98908
+ const jsPath = join42(moduleDir, "shaderTransitionWorker.js");
98598
98909
  if (existsSync30(jsPath)) return { path: jsPath, isTs: false };
98599
- const tsPath = join41(moduleDir, "shaderTransitionWorker.ts");
98910
+ const tsPath = join42(moduleDir, "shaderTransitionWorker.ts");
98600
98911
  return { path: tsPath, isTs: true };
98601
98912
  }
98602
98913
  function buildExecArgv(entryIsTs) {
@@ -98607,7 +98918,7 @@ function buildExecArgv(entryIsTs) {
98607
98918
  );
98608
98919
  if (hasLoader) return inherited;
98609
98920
  try {
98610
- const require2 = createRequire2(import.meta.url);
98921
+ const require2 = createRequire(import.meta.url);
98611
98922
  const tsxEsm = require2.resolve("tsx/esm");
98612
98923
  inherited.push("--import", pathToFileURL2(tsxEsm).href);
98613
98924
  } catch {
@@ -98963,7 +99274,7 @@ async function runHybridLayeredFrameLoop(input) {
98963
99274
  );
98964
99275
  if (debugDumpEnabled && debugDumpDir && i % 30 === 0) {
98965
99276
  writeFileExclusiveSync(
98966
- join42(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
99277
+ join43(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
98967
99278
  canvas
98968
99279
  );
98969
99280
  }
@@ -99149,7 +99460,7 @@ async function runCaptureHdrStage(input) {
99149
99460
  if (hdrVideoFrameSources.has(v.id)) hdrVideoEndTimes.set(v.id, v.end);
99150
99461
  }
99151
99462
  const debugDumpEnabled = process.env.KEEP_TEMP === "1";
99152
- const debugDumpDir = debugDumpEnabled ? join43(framesDir, "debug-composite") : null;
99463
+ const debugDumpDir = debugDumpEnabled ? join44(framesDir, "debug-composite") : null;
99153
99464
  if (debugDumpDir && !existsSync31(debugDumpDir)) {
99154
99465
  mkdirSync17(debugDumpDir, { recursive: true });
99155
99466
  }
@@ -99301,10 +99612,10 @@ async function runCaptureHdrStage(input) {
99301
99612
  // ../producer/src/services/render/stages/encodeStage.ts
99302
99613
  init_src();
99303
99614
  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";
99615
+ import { dirname as dirname18, join as join46 } from "path";
99305
99616
 
99306
99617
  // ../producer/src/services/render/stages/gifEncodeArgs.ts
99307
- import { join as join44 } from "path";
99618
+ import { join as join45 } from "path";
99308
99619
  function fpsToFfmpegArg2(fps) {
99309
99620
  return fps.den === 1 ? String(fps.num) : `${fps.num}/${fps.den}`;
99310
99621
  }
@@ -99316,7 +99627,7 @@ function buildGifPalettegenArgs(input) {
99316
99627
  "-framerate",
99317
99628
  fpsArg,
99318
99629
  "-i",
99319
- join44(input.framesDir, input.framePattern),
99630
+ join45(input.framesDir, input.framePattern),
99320
99631
  "-vf",
99321
99632
  `fps=${fpsArg},palettegen=stats_mode=diff${transparency}`,
99322
99633
  input.palettePath
@@ -99330,7 +99641,7 @@ function buildGifPaletteuseArgs(input) {
99330
99641
  "-framerate",
99331
99642
  fpsArg,
99332
99643
  "-i",
99333
- join44(input.framesDir, input.framePattern),
99644
+ join45(input.framesDir, input.framePattern),
99334
99645
  "-i",
99335
99646
  input.palettePath,
99336
99647
  "-lavfi",
@@ -99450,11 +99761,11 @@ async function runEncodeStage(input) {
99450
99761
  );
99451
99762
  }
99452
99763
  captured.forEach((name, i) => {
99453
- const dst = join45(outputPath, formatExportFrameName(i, "png"));
99454
- copyFileSync5(join45(framesDir, name), dst);
99764
+ const dst = join46(outputPath, formatExportFrameName(i, "png"));
99765
+ copyFileSync5(join46(framesDir, name), dst);
99455
99766
  });
99456
99767
  if (hasAudio && audioOutputPath && existsSync32(audioOutputPath)) {
99457
- copyFileSync5(audioOutputPath, join45(outputPath, MIXED_AUDIO_FILENAME));
99768
+ copyFileSync5(audioOutputPath, join46(outputPath, MIXED_AUDIO_FILENAME));
99458
99769
  log.info(
99459
99770
  `[Render] png-sequence: ${MIXED_AUDIO_FILENAME} sidecar written to ${outputPath}/${MIXED_AUDIO_FILENAME}`
99460
99771
  );
@@ -99473,7 +99784,7 @@ async function runEncodeStage(input) {
99473
99784
  const encodeResult2 = await encodeGifFromDir(framesDir, framePattern2, outputPath, {
99474
99785
  fps: job.config.fps,
99475
99786
  loop,
99476
- palettePath: join45(dirname17(videoOnlyPath), "gif-palette.png"),
99787
+ palettePath: join46(dirname18(videoOnlyPath), "gif-palette.png"),
99477
99788
  preserveAlpha: needsAlpha,
99478
99789
  signal: abortSignal,
99479
99790
  timeout: engineCfg.ffmpegEncodeTimeout
@@ -99540,7 +99851,7 @@ init_src();
99540
99851
  init_dist2();
99541
99852
  import { spawn as spawn5 } from "child_process";
99542
99853
  import { mkdtempSync as mkdtempSync10, renameSync as renameSync7, rmSync as rmSync14 } from "fs";
99543
- import { dirname as dirname18, join as join46 } from "path";
99854
+ import { dirname as dirname19, join as join47 } from "path";
99544
99855
  var AUDIO_DURATION_TOLERANCE_SECONDS = 1e-3;
99545
99856
  var AAC_DELIVERY_TRUE_PEAK_DBFS = -1;
99546
99857
  var AAC_TRUE_PEAK_CORRECTION_HEADROOM_DB = 0.5;
@@ -99741,8 +100052,8 @@ async function padOrTrimAudioToVideoFrameCount(input) {
99741
100052
  async function enforceAacTruePeak(input) {
99742
100053
  let scratchDir;
99743
100054
  try {
99744
- scratchDir = mkdtempSync10(join46(dirname18(input.audioPath), ".true-peak-"));
99745
- const correctedPath = join46(scratchDir, "audio.m4a");
100055
+ scratchDir = mkdtempSync10(join47(dirname19(input.audioPath), ".true-peak-"));
100056
+ const correctedPath = join47(scratchDir, "audio.m4a");
99746
100057
  const correctionTargetDbfs = AAC_DELIVERY_TRUE_PEAK_DBFS - AAC_TRUE_PEAK_CORRECTION_HEADROOM_DB;
99747
100058
  const measurements = [];
99748
100059
  let attenuationDb = 0;
@@ -100045,7 +100356,7 @@ function sampleDirectoryBytes(dir) {
100045
100356
  continue;
100046
100357
  }
100047
100358
  for (const name of entries2) {
100048
- const full2 = join47(current2, name);
100359
+ const full2 = join48(current2, name);
100049
100360
  try {
100050
100361
  const st = statSync12(full2);
100051
100362
  if (st.isDirectory()) {
@@ -100194,7 +100505,7 @@ function findMissingFrameRanges(totalFrames, framesDir, frameExt) {
100194
100505
  const ranges = [];
100195
100506
  let rangeStart = null;
100196
100507
  for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
100197
- const framePath = join47(framesDir, formatCaptureFrameName(frameIndex, frameExt));
100508
+ const framePath = join48(framesDir, formatCaptureFrameName(frameIndex, frameExt));
100198
100509
  const missing = !existsSync33(framePath) || statSync12(framePath).size <= 8;
100199
100510
  if (missing && rangeStart === null) {
100200
100511
  rangeStart = frameIndex;
@@ -100217,7 +100528,7 @@ function buildMissingFrameRetryBatches(ranges, maxWorkers, workDir, attempt, ran
100217
100528
  workerId,
100218
100529
  startFrame: rangeStart + range.startFrame,
100219
100530
  endFrame: rangeStart + range.endFrame,
100220
- outputDir: join47(workDir, `retry-${attempt}-batch-${batchIndex}-worker-${workerId}`),
100531
+ outputDir: join48(workDir, `retry-${attempt}-batch-${batchIndex}-worker-${workerId}`),
100221
100532
  outputFrameOffset: rangeStart
100222
100533
  }));
100223
100534
  batches.push(batch);
@@ -100245,8 +100556,8 @@ function getNextRetryWorkerCount(currentWorkers) {
100245
100556
  return Math.max(1, Math.floor(currentWorkers / 2));
100246
100557
  }
100247
100558
  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}-`);
100559
+ if (platform3 === "win32") return join48(systemTempDir, "hf-render-");
100560
+ return join48(dirname20(outputPath), `work-${jobId}-`);
100250
100561
  }
100251
100562
  var MAX_TRANSIENT_CAPTURE_RETRIES = 1;
100252
100563
  function isTransientCaptureRetryEligible(failureKind, missing, retriesUsed) {
@@ -100278,7 +100589,7 @@ The composition is too large for the available memory. To reduce memory pressure
100278
100589
  function countCapturedFrames(totalFrames, framesDir, frameExt) {
100279
100590
  let captured = 0;
100280
100591
  for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
100281
- const framePath = join47(framesDir, formatCaptureFrameName(frameIndex, frameExt));
100592
+ const framePath = join48(framesDir, formatCaptureFrameName(frameIndex, frameExt));
100282
100593
  if (existsSync33(framePath)) captured++;
100283
100594
  }
100284
100595
  return captured;
@@ -100304,7 +100615,7 @@ async function executeDiskCaptureWithAdaptiveRetry(options) {
100304
100615
  reason: attempt === 0 ? "initial" : pendingTransientRetry ? "transient-retry" : "retry"
100305
100616
  });
100306
100617
  pendingTransientRetry = false;
100307
- const attemptWorkDir = join47(options.workDir, `capture-attempt-${attempt}`);
100618
+ const attemptWorkDir = join48(options.workDir, `capture-attempt-${attempt}`);
100308
100619
  const batches = missingRanges ? buildMissingFrameRetryBatches(
100309
100620
  missingRanges,
100310
100621
  currentWorkers,
@@ -100918,15 +101229,15 @@ function deVerifyFallbackTelemetry(err) {
100918
101229
  }
100919
101230
  async function executeRenderJob(job, projectDir, outputPath, progressSink, abortSignal, assertRenderActive) {
100920
101231
  validateHlsRenderConfig(job.config);
100921
- const moduleDir = dirname19(fileURLToPath5(import.meta.url));
101232
+ const moduleDir = dirname20(fileURLToPath6(import.meta.url));
100922
101233
  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);
101234
+ const debugDir = join48(producerRoot, ".debug");
101235
+ const outputDir = dirname20(outputPath);
100925
101236
  if (!existsSync33(outputDir)) mkdirSync19(outputDir, { recursive: true });
100926
- const workDir = job.config.debug ? join47(debugDir, job.id) : mkdtempSync11(resolveRenderWorkDirPrefix(outputPath, job.id));
101237
+ const workDir = job.config.debug ? join48(debugDir, job.id) : mkdtempSync11(resolveRenderWorkDirPrefix(outputPath, job.id));
100927
101238
  const pipelineStart = Date.now();
100928
101239
  const baseLog = job.config.logger ?? defaultLogger;
100929
- const logPath = job.config.debug ? join47(workDir, "render.log") : null;
101240
+ const logPath = job.config.debug ? join48(workDir, "render.log") : null;
100930
101241
  const execution = new RenderExecutionContext({
100931
101242
  request: { renderJobId: job.id, projectDir, outputPath },
100932
101243
  logger: logPath ? createRenderFileLogger(logPath, baseLog) : baseLog,
@@ -100984,7 +101295,7 @@ async function executeRenderPipeline(input) {
100984
101295
  imageDecodeFailures: 0
100985
101296
  };
100986
101297
  let hdrPerf;
100987
- const perfOutputPath = join47(workDir, "perf-summary.json");
101298
+ const perfOutputPath = join48(workDir, "perf-summary.json");
100988
101299
  const cfg = { ...job.config.producerConfig ?? resolveConfig() };
100989
101300
  const observability = new RenderObservabilityRecorder({
100990
101301
  pipelineStartMs: pipelineStart,
@@ -101083,22 +101394,22 @@ async function executeRenderPipeline(input) {
101083
101394
  requestedWorkers: job.config.workers ?? "auto"
101084
101395
  });
101085
101396
  const entryFile = job.config.entryFile || "index.html";
101086
- let htmlPath = join47(projectDir, entryFile);
101397
+ let htmlPath = join48(projectDir, entryFile);
101087
101398
  if (!existsSync33(htmlPath)) {
101088
101399
  throw new Error(`Entry file not found: ${htmlPath}`);
101089
101400
  }
101090
101401
  assertNotAborted();
101091
- const rawEntry = readFileSync14(htmlPath, "utf-8");
101402
+ const rawEntry = readFileSync15(htmlPath, "utf-8");
101092
101403
  if (entryFile !== "index.html" && rawEntry.trimStart().startsWith("<template")) {
101093
- const wrapperPath = join47(workDir, "standalone-entry.html");
101094
- const projectIndexPath = join47(projectDir, "index.html");
101404
+ const wrapperPath = join48(workDir, "standalone-entry.html");
101405
+ const projectIndexPath = join48(projectDir, "index.html");
101095
101406
  if (!existsSync33(projectIndexPath)) {
101096
101407
  throw new Error(
101097
101408
  `Template entry file "${entryFile}" requires a project index.html to extract its render shell.`
101098
101409
  );
101099
101410
  }
101100
101411
  const standaloneHtml = extractStandaloneEntryFromIndex(
101101
- readFileSync14(projectIndexPath, "utf-8"),
101412
+ readFileSync15(projectIndexPath, "utf-8"),
101102
101413
  entryFile,
101103
101414
  rawEntry
101104
101415
  );
@@ -101247,7 +101558,7 @@ async function executeRenderPipeline(input) {
101247
101558
  beginFrameStalled: probeResult.beginFrameStalled
101248
101559
  });
101249
101560
  updateJobStatus(job, "preprocessing", "Extracting video frames", 10, onProgress);
101250
- const compiledDir = join47(workDir, "compiled");
101561
+ const compiledDir = join48(workDir, "compiled");
101251
101562
  const extractResult = await observeRenderStage(
101252
101563
  observability,
101253
101564
  "video_extract",
@@ -101373,7 +101684,7 @@ async function executeRenderPipeline(input) {
101373
101684
  try {
101374
101685
  fileServer = await createFileServer2({
101375
101686
  projectDir,
101376
- compiledDir: join47(workDir, "compiled"),
101687
+ compiledDir: join48(workDir, "compiled"),
101377
101688
  port: 0,
101378
101689
  preHeadScripts: [VIRTUAL_TIME_SHIM],
101379
101690
  fps: job.config.fps
@@ -101391,7 +101702,7 @@ async function executeRenderPipeline(input) {
101391
101702
  if (!activeFileServer) {
101392
101703
  throw new Error("File server failed to initialize before frame capture");
101393
101704
  }
101394
- const framesDir = join47(workDir, "captured-frames");
101705
+ const framesDir = join48(workDir, "captured-frames");
101395
101706
  if (!existsSync33(framesDir)) mkdirSync19(framesDir, { recursive: true });
101396
101707
  updateJobStatus(job, "rendering", "Checking browser GPU", 25, onProgress);
101397
101708
  const resolvedBrowserGpuMode = await resolveBrowserGpuMode(cfg.browserGpuMode, {
@@ -101802,7 +102113,7 @@ async function executeRenderPipeline(input) {
101802
102113
  hls: ".mp4"
101803
102114
  };
101804
102115
  const videoExt = FORMAT_EXT[outputFormat] ?? ".mp4";
101805
- const videoOnlyPath = join47(workDir, `video-only${videoExt}`);
102116
+ const videoOnlyPath = join48(workDir, `video-only${videoExt}`);
101806
102117
  const usePageSideCompositingForTransitions = (cfg.enablePageSideCompositing || isGif) && compiled.hasShaderTransitions && !hasHdrContent && outputSupportsPageSideShaderCompositing(outputFormat);
101807
102118
  if (usePageSideCompositingForTransitions) {
101808
102119
  activeFileServer.addPreHeadScript(HF_PAGE_SIDE_COMPOSITING_STUB);
@@ -102044,7 +102355,7 @@ async function executeRenderPipeline(input) {
102044
102355
  outputHeight: captureCompositionHeight ?? height,
102045
102356
  motionBlur: job.config.motionBlur ? JSON.stringify(job.config.motionBlur) : ""
102046
102357
  });
102047
- const segmentDir = segmentDirFor(join47(projectDir, "renders"), segmentPlanHash);
102358
+ const segmentDir = segmentDirFor(join48(projectDir, "renders"), segmentPlanHash);
102048
102359
  let completedSegments = /* @__PURE__ */ new Set();
102049
102360
  if (job.config.resumeSegments === true) {
102050
102361
  const existing = readSegmentManifest(segmentDir);
@@ -102591,7 +102902,7 @@ async function executeRenderPipeline(input) {
102591
102902
  }
102592
102903
  if (job.config.debug) {
102593
102904
  if (!isPngSequence && !isHls && existsSync33(stagedOutputPath)) {
102594
- const debugOutput = join47(workDir, `output${videoExt}`);
102905
+ const debugOutput = join48(workDir, `output${videoExt}`);
102595
102906
  copyFileSync6(stagedOutputPath, debugOutput);
102596
102907
  }
102597
102908
  }
@@ -102938,7 +103249,7 @@ import {
102938
103249
  rmSync as rmSync16,
102939
103250
  createReadStream as createReadStream5
102940
103251
  } from "fs";
102941
- import { resolve as resolve15, dirname as dirname21, join as join50 } from "path";
103252
+ import { resolve as resolve15, dirname as dirname22, join as join51 } from "path";
102942
103253
  import { tmpdir as tmpdir8 } from "os";
102943
103254
  import { parseArgs } from "util";
102944
103255
  import crypto from "crypto";
@@ -102950,14 +103261,14 @@ import { serve as serve3 } from "@hono/node-server";
102950
103261
  init_dist3();
102951
103262
  import {
102952
103263
  existsSync as existsSync34,
102953
- readFileSync as readFileSync15,
103264
+ readFileSync as readFileSync16,
102954
103265
  statSync as statSync13,
102955
103266
  openSync as openSync8,
102956
103267
  fstatSync as fstatSync5,
102957
103268
  closeSync as closeSync9,
102958
103269
  constants as constants5
102959
103270
  } from "fs";
102960
- import { resolve as resolve14, join as join48, relative as relative5, isAbsolute as isAbsolute5, sep as sep4 } from "path";
103271
+ import { resolve as resolve14, join as join49, relative as relative5, isAbsolute as isAbsolute5, sep as sep4 } from "path";
102961
103272
  function isStringRecord(value) {
102962
103273
  if (!value || typeof value !== "object" || Array.isArray(value)) {
102963
103274
  return false;
@@ -102995,7 +103306,7 @@ function readEntryHtml(filePath) {
102995
103306
  }
102996
103307
  try {
102997
103308
  if (!fstatSync5(fd).isFile()) return null;
102998
- return readFileSync15(fd, "utf-8");
103309
+ return readFileSync16(fd, "utf-8");
102999
103310
  } finally {
103000
103311
  closeSync9(fd);
103001
103312
  }
@@ -103024,7 +103335,7 @@ function readProjectEntryFile(projectDir, preferredEntryFile) {
103024
103335
  }
103025
103336
  }
103026
103337
  return {
103027
- error: `No HTML entry file found in project directory: ${join48(absProjectDir, preferredEntryFile || "index.html")}`
103338
+ error: `No HTML entry file found in project directory: ${join49(absProjectDir, preferredEntryFile || "index.html")}`
103028
103339
  };
103029
103340
  }
103030
103341
  function prepareHyperframeLintBody(body) {
@@ -103066,8 +103377,8 @@ async function runHyperframeLint(prepared) {
103066
103377
 
103067
103378
  // ../producer/src/services/healthWorker.ts
103068
103379
  import { Worker as Worker3 } from "worker_threads";
103069
- import { fileURLToPath as fileURLToPath6 } from "url";
103070
- import { dirname as dirname20, join as join49 } from "path";
103380
+ import { fileURLToPath as fileURLToPath7 } from "url";
103381
+ import { dirname as dirname21, join as join50 } from "path";
103071
103382
  import { existsSync as existsSync35 } from "fs";
103072
103383
  var DEFAULT_HEALTH_PORT = 9848;
103073
103384
  async function startHealthWorker(options = {}) {
@@ -103142,8 +103453,8 @@ function defaultLogger2() {
103142
103453
  };
103143
103454
  }
103144
103455
  function resolveWorkerEntry2() {
103145
- const here = dirname20(fileURLToPath6(import.meta.url));
103146
- const candidates = [join49(here, "healthWorkerThread.js"), join49(here, "healthWorkerThread.ts")];
103456
+ const here = dirname21(fileURLToPath7(import.meta.url));
103457
+ const candidates = [join50(here, "healthWorkerThread.js"), join50(here, "healthWorkerThread.ts")];
103147
103458
  for (const candidate of candidates) {
103148
103459
  if (existsSync35(candidate)) return candidate;
103149
103460
  }
@@ -103280,7 +103591,7 @@ function buildRenderJobConfig(input, outputPath, log) {
103280
103591
  function resolvePreparedRenderOutput(prepared, rendersDir, log) {
103281
103592
  const { input, cleanupProjectDir } = prepared;
103282
103593
  const absoluteOutputPath = resolveOutputPath(input.projectDir, input.outputPath, rendersDir, log);
103283
- const outputDir = dirname21(absoluteOutputPath);
103594
+ const outputDir = dirname22(absoluteOutputPath);
103284
103595
  if (!existsSync36(outputDir)) mkdirSync20(outputDir, { recursive: true });
103285
103596
  return { input, cleanupProjectDir, absoluteOutputPath };
103286
103597
  }
@@ -103348,8 +103659,8 @@ async function resolveInlineRenderHtml(body) {
103348
103659
  }
103349
103660
  function materializeInlineProject(html, options) {
103350
103661
  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");
103662
+ const tempProjectDir = mkdtempSync12(join51(tempRoot, "producer-project-"));
103663
+ writeFileSync12(join51(tempProjectDir, "index.html"), html, "utf-8");
103353
103664
  return {
103354
103665
  prepared: {
103355
103666
  input: { projectDir: tempProjectDir, ...options },
@@ -103800,11 +104111,11 @@ init_src();
103800
104111
  init_dist2();
103801
104112
  init_src();
103802
104113
  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";
104114
+ import { join as join55, relative as relative8, sep as sep5 } from "path";
103804
104115
 
103805
104116
  // ../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";
104117
+ import { existsSync as existsSync37, mkdirSync as mkdirSync21, readFileSync as readFileSync17, readdirSync as readdirSync13, writeFileSync as writeFileSync13 } from "fs";
104118
+ import { join as join52, relative as relative6, resolve as resolve16 } from "path";
103808
104119
 
103809
104120
  // ../producer/src/services/distributed/planProtocol.ts
103810
104121
  var PLAN_SCHEMA_VERSION = 1;
@@ -103846,9 +104157,9 @@ var FIELD_DELIMITER = Buffer.from([0]);
103846
104157
  // ../producer/src/services/distributed/shared.ts
103847
104158
  init_src();
103848
104159
  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";
104160
+ import { dirname as dirname23, join as join53 } from "path";
104161
+ import { existsSync as existsSync38, readFileSync as readFileSync18 } from "fs";
104162
+ import { fileURLToPath as fileURLToPath8 } from "url";
103852
104163
  import { promisify as promisify5 } from "util";
103853
104164
  var PLAN_AUDIO_RELATIVE_PATH = MIXED_AUDIO_FILENAME;
103854
104165
  var execFile4 = promisify5(execFileCallback);
@@ -103856,7 +104167,7 @@ var execFile4 = promisify5(execFileCallback);
103856
104167
  // ../producer/src/services/distributed/planSize.ts
103857
104168
  import { createHash as createHash12 } from "crypto";
103858
104169
  import { lstatSync as lstatSync5, readdirSync as readdirSync14 } from "fs";
103859
- import { extname as extname7, join as join53, relative as relative7 } from "path";
104170
+ import { extname as extname7, join as join54, relative as relative7 } from "path";
103860
104171
  var PLAN_ROOT_CATEGORY = {
103861
104172
  compiled: "compiled",
103862
104173
  [PLAN_AUDIO_RELATIVE_PATH]: "audio",
@@ -103868,9 +104179,9 @@ var PLAN_ROOT_CATEGORY = {
103868
104179
  var PLAN_DIR_SIZE_LIMIT_BYTES = 2 * 1024 * 1024 * 1024;
103869
104180
  var FREEZE_OWNED_PLAN_FILES = [
103870
104181
  "plan.json",
103871
- join54("meta", "composition.json"),
103872
- join54("meta", "encoder.json"),
103873
- join54("meta", "chunks.json")
104182
+ join55("meta", "composition.json"),
104183
+ join55("meta", "encoder.json"),
104184
+ join55("meta", "chunks.json")
103874
104185
  ];
103875
104186
 
103876
104187
  // ../producer/src/services/distributed/planV2.ts
@@ -103883,7 +104194,7 @@ import {
103883
104194
  mkdirSync as mkdirSync24,
103884
104195
  mkdtempSync as mkdtempSync14,
103885
104196
  openSync as openSync9,
103886
- readFileSync as readFileSync18,
104197
+ readFileSync as readFileSync19,
103887
104198
  readSync as readSync3,
103888
104199
  readdirSync as readdirSync15,
103889
104200
  renameSync as renameSync10,
@@ -103893,7 +104204,7 @@ import {
103893
104204
  } from "fs";
103894
104205
  import { createHash as createHash13 } from "crypto";
103895
104206
  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";
104207
+ import { dirname as dirname25, isAbsolute as isAbsolute6, join as join58, relative as relative9, resolve as resolve17, sep as sep6 } from "path";
103897
104208
 
103898
104209
  // ../producer/src/services/distributed/planV2Publisher.ts
103899
104210
  import {
@@ -103907,15 +104218,15 @@ import {
103907
104218
  statSync as statSync15,
103908
104219
  writeFileSync as writeFileSync15
103909
104220
  } from "fs";
103910
- import { dirname as dirname23, join as join56 } from "path";
104221
+ import { dirname as dirname24, join as join57 } from "path";
103911
104222
 
103912
104223
  // ../producer/src/services/distributed/planV2Layout.ts
103913
- import { join as join55 } from "path";
104224
+ import { join as join56 } from "path";
103914
104225
 
103915
104226
  // ../producer/src/services/distributed/planV2Execution.ts
103916
104227
  import { mkdtempSync as mkdtempSync16, rmSync as rmSync22 } from "fs";
103917
104228
  import { tmpdir as tmpdir10 } from "os";
103918
- import { join as join60 } from "path";
104229
+ import { join as join61 } from "path";
103919
104230
 
103920
104231
  // ../producer/src/services/distributed/assemble.ts
103921
104232
  init_src();
@@ -103925,25 +104236,25 @@ import {
103925
104236
  existsSync as existsSync42,
103926
104237
  mkdirSync as mkdirSync25,
103927
104238
  mkdtempSync as mkdtempSync15,
103928
- readFileSync as readFileSync19,
104239
+ readFileSync as readFileSync20,
103929
104240
  readdirSync as readdirSync16,
103930
104241
  rmSync as rmSync20,
103931
104242
  statSync as statSync17,
103932
104243
  writeFileSync as writeFileSync17
103933
104244
  } from "fs";
103934
- import { dirname as dirname25, join as join58 } from "path";
104245
+ import { dirname as dirname26, join as join59 } from "path";
103935
104246
 
103936
104247
  // ../producer/src/services/distributed/renderChunk.ts
103937
104248
  init_src();
103938
104249
  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";
104250
+ import { existsSync as existsSync43, mkdirSync as mkdirSync26, readFileSync as readFileSync21, readdirSync as readdirSync17, rmSync as rmSync21, writeFileSync as writeFileSync18 } from "fs";
104251
+ import { extname as extname8, join as join60 } from "path";
103941
104252
  init_src();
103942
104253
 
103943
104254
  // ../producer/src/services/distributed/projectHash.ts
103944
- import { readdirSync as readdirSync18, readFileSync as readFileSync21 } from "fs";
104255
+ import { readdirSync as readdirSync18, readFileSync as readFileSync22 } from "fs";
103945
104256
  import { createHash as createHash14 } from "crypto";
103946
- import { join as join61, relative as relative10 } from "path";
104257
+ import { join as join62, relative as relative10 } from "path";
103947
104258
 
103948
104259
  // src/fontLocalize.ts
103949
104260
  function safeVersion(version2) {
@@ -103984,8 +104295,8 @@ async function runFontLocalize(io, localize) {
103984
104295
  }
103985
104296
 
103986
104297
  // 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";
104298
+ var VERSION = true ? "0.8.75" : "0.0.0-dev";
104299
+ var PRODUCER_VERSION = true ? "0.8.75" : "0.0.0-dev";
103989
104300
 
103990
104301
  // src/fontLocalizeCli.ts
103991
104302
  async function readStdin() {