hyperframes 0.9.67 → 0.9.68

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.
Files changed (289) hide show
  1. package/dist/{add-2FYFE3ZX.js → add-C4WVIZBM.js} +14 -14
  2. package/dist/{agentPromptGenerator-5YFPYST7.js → agentPromptGenerator-6LLQYHZV.js} +9 -9
  3. package/dist/{animatedGifPrep-SIL3ADIS.js → animatedGifPrep-3VMWRGRQ.js} +9 -9
  4. package/dist/api.js +39 -39
  5. package/dist/{asset-D5BXLEK4.js → asset-WIUPYC6I.js} +4 -4
  6. package/dist/{assetCataloger-7UREFLWJ.js → assetCataloger-35EEYGRW.js} +10 -10
  7. package/dist/{audio-NGQW5Z7O.js → audio-X6U5EPJC.js} +24 -24
  8. package/dist/{auth-L2MGMG62.js → auth-6YJJF7JO.js} +4 -4
  9. package/dist/{autoUpdate-FKWV43U5.js → autoUpdate-5RW6OSP5.js} +4 -4
  10. package/dist/{avatars-SM7BUIVL.js → avatars-3TUWVA5L.js} +18 -18
  11. package/dist/{backgroundChecks-XGOO6ETM.js → backgroundChecks-NFDJJ3A7.js} +5 -5
  12. package/dist/backgroundChecksWorker.js +5 -5
  13. package/dist/{batchRender-LK46EDAZ.js → batchRender-RD2SC67M.js} +6 -5
  14. package/dist/{beats-FPJEEBO2.js → beats-SEZBR7ZB.js} +12 -12
  15. package/dist/{benchmark-BMM3E56O.js → benchmark-HIHHSXWJ.js} +14 -14
  16. package/dist/{billing-S37OJE6G.js → billing-KOAEFBSV.js} +23 -19
  17. package/dist/{browser-ACTTU67A.js → browser-CMQWPJW3.js} +9 -9
  18. package/dist/{bundleWithLocalizedFonts-H2UJUDSF.js → bundleWithLocalizedFonts-54M62O3L.js} +1 -1
  19. package/dist/{capture-N24KHG3V.js → capture-M627KANC.js} +19 -19
  20. package/dist/{capture-V4ATIGRR.js → capture-WG3M26CA.js} +6 -6
  21. package/dist/{captureCompositionFrame-Y2GGNU43.js → captureCompositionFrame-2MMKTYGJ.js} +16 -16
  22. package/dist/{captureProxy-4K3J652A.js → captureProxy-ZKHJ6HRI.js} +1 -1
  23. package/dist/{catalog-4FAP2CFF.js → catalog-PNNNRYGW.js} +14 -14
  24. package/dist/{catch-up-6RCTMCTI.js → catch-up-LV2JRFEP.js} +9 -9
  25. package/dist/{check-P6XW2CX7.js → check-MNVZU53N.js} +46 -46
  26. package/dist/{checkAudio-R7ZSNHPD.js → checkAudio-ZI7CKTSP.js} +13 -13
  27. package/dist/{checkBrowser-ZTEBVQMM.js → checkBrowser-ZFRZGSZO.js} +39 -38
  28. package/dist/{chunk-TNO5EVXS.js → chunk-2EF7PBIL.js} +5 -5
  29. package/dist/{chunk-3XS35R5E.js → chunk-2J5U5T4U.js} +14 -14
  30. package/dist/{chunk-HPENBBIH.js → chunk-2LA5EFA7.js} +1 -1
  31. package/dist/{chunk-L7YERJVL.js → chunk-2QY74XCK.js} +448 -380
  32. package/dist/{chunk-O3ENZQHQ.js → chunk-2TSEYJEW.js} +2 -2
  33. package/dist/{chunk-IFC533NZ.js → chunk-2ZRRIDLB.js} +2 -2
  34. package/dist/{chunk-PJQVJSMG.js → chunk-33JUCUTM.js} +7 -2
  35. package/dist/{chunk-FXQRMULT.js → chunk-35JN6DUV.js} +2 -2
  36. package/dist/{chunk-JOW7SA7F.js → chunk-3DU5M4RZ.js} +2 -2
  37. package/dist/{chunk-T73BVHZ5.js → chunk-3PXYJAP2.js} +5 -5
  38. package/dist/{chunk-4E3AKTSD.js → chunk-42D2JWAH.js} +1 -1
  39. package/dist/{chunk-P6WWZ4ZZ.js → chunk-44YM6GQW.js} +2 -2
  40. package/dist/{chunk-3NPAQ5FV.js → chunk-4M5C3543.js} +2 -2
  41. package/dist/{chunk-2SE62YIX.js → chunk-52ZPRSRR.js} +5 -5
  42. package/dist/{chunk-KNRZBLQH.js → chunk-5JFK2MZE.js} +2 -2
  43. package/dist/{chunk-BAL7FD4W.js → chunk-667DGYQF.js} +2 -2
  44. package/dist/{chunk-NYJ4OV4H.js → chunk-6KS7MRXE.js} +2 -2
  45. package/dist/{chunk-JK2WTAKR.js → chunk-6YQL5U3X.js} +3 -3
  46. package/dist/{chunk-77SURLKL.js → chunk-7HTUIFCU.js} +3 -3
  47. package/dist/{chunk-ITBQLYIV.js → chunk-7KOPWRBA.js} +3 -3
  48. package/dist/{chunk-DKEP2QM5.js → chunk-7YFT3XBE.js} +6 -6
  49. package/dist/{chunk-UN5SNMRS.js → chunk-A6MOPSB7.js} +10 -10
  50. package/dist/{chunk-PHBS5KEY.js → chunk-ACLEARJ5.js} +1 -1
  51. package/dist/{chunk-MIPRIUWU.js → chunk-APV4EGPC.js} +6 -6
  52. package/dist/{chunk-PAKYOFVJ.js → chunk-AYE5S3LS.js} +1 -1
  53. package/dist/{chunk-2FKIIF2W.js → chunk-BBEPJIL6.js} +2 -2
  54. package/dist/{chunk-IRW7AWIC.js → chunk-BDEXAT2A.js} +4 -4
  55. package/dist/{chunk-IUUEMVZV.js → chunk-BFR4Z6XZ.js} +2 -2
  56. package/dist/{chunk-JXUDMAKX.js → chunk-BIS25FPH.js} +2 -2
  57. package/dist/{chunk-FZT7QWVE.js → chunk-BQ42ZSDC.js} +2 -2
  58. package/dist/{chunk-VW733NCS.js → chunk-BX4EUXTT.js} +13 -13
  59. package/dist/{chunk-EMUKI7UB.js → chunk-C4KEZBFB.js} +1 -1
  60. package/dist/{chunk-2FEZFXKE.js → chunk-CHEMP247.js} +1 -1
  61. package/dist/{chunk-JYFQXM2E.js → chunk-CJAUHCIH.js} +1 -1
  62. package/dist/{chunk-AQYZW46G.js → chunk-CJGEN3HQ.js} +9 -9
  63. package/dist/{chunk-U6ZR7GBQ.js → chunk-CJGFAAQM.js} +11 -7
  64. package/dist/{chunk-X2VXJFX2.js → chunk-CUQRPA5X.js} +1 -1
  65. package/dist/{chunk-4SBR3ZP7.js → chunk-D4V3A66O.js} +1 -1
  66. package/dist/{chunk-VQ72HDX3.js → chunk-DN2WT7UF.js} +76 -45
  67. package/dist/{chunk-XNBVJAL4.js → chunk-DXPKV74K.js} +11 -11
  68. package/dist/{chunk-5U4QTHAS.js → chunk-ERM6VZH5.js} +2 -2
  69. package/dist/{chunk-2F2HLVI5.js → chunk-F266JN4O.js} +6 -6
  70. package/dist/{chunk-Q3OZGUZ4.js → chunk-F3W2XNVF.js} +6 -6
  71. package/dist/{chunk-BHOQKOW3.js → chunk-FGBIIVLD.js} +1 -1
  72. package/dist/{chunk-GXKCFOMR.js → chunk-GDPNIGCY.js} +1 -1
  73. package/dist/{chunk-A5ZULLJX.js → chunk-GIICVK4I.js} +1 -1
  74. package/dist/{chunk-6U5JJJFB.js → chunk-GJCRUFVA.js} +1 -1
  75. package/dist/{chunk-SW4TVGUR.js → chunk-GLPWQEIS.js} +2 -2
  76. package/dist/{chunk-PS26KCCH.js → chunk-HFMRAULK.js} +3 -3
  77. package/dist/{chunk-RF3DT4CS.js → chunk-HJXFRTK3.js} +1 -1
  78. package/dist/{chunk-5GUYYSVT.js → chunk-HY67LTYS.js} +1 -1
  79. package/dist/{chunk-AEBDHKTJ.js → chunk-ID6NFBRJ.js} +1 -1
  80. package/dist/{chunk-6QKW4E7D.js → chunk-IUMEFOOG.js} +12 -12
  81. package/dist/{chunk-FHSBI5MM.js → chunk-IWOK7S6W.js} +2 -2
  82. package/dist/{chunk-FLJ4S7NA.js → chunk-J3FUIWZX.js} +2 -2
  83. package/dist/{chunk-EYFZRI6U.js → chunk-JJOEC2AX.js} +1 -1
  84. package/dist/{chunk-ZTD6VXAE.js → chunk-JK5EXU2V.js} +1 -1
  85. package/dist/{chunk-ULR3HM3L.js → chunk-JL2QIL62.js} +2 -2
  86. package/dist/{chunk-B3HZTUCD.js → chunk-JLITKVAK.js} +3 -3
  87. package/dist/{chunk-MDFQC4J2.js → chunk-K3JLION2.js} +1 -1
  88. package/dist/{chunk-LHCQ4TMY.js → chunk-KI4QH2XR.js} +2 -2
  89. package/dist/{chunk-H3AH7NDI.js → chunk-KNHIVCWP.js} +8 -8
  90. package/dist/{chunk-YB2ZJJFJ.js → chunk-LMUPRQ3G.js} +1 -1
  91. package/dist/{chunk-RVQQUHIT.js → chunk-MG3X2IGB.js} +2 -2
  92. package/dist/{chunk-D7W642TJ.js → chunk-MHPVT4IR.js} +2 -2
  93. package/dist/{chunk-AMQBBQCF.js → chunk-MI3L5IN2.js} +4 -4
  94. package/dist/{chunk-YU4OCNWW.js → chunk-MK2V4GOX.js} +8 -8
  95. package/dist/{chunk-U4BP54JI.js → chunk-MNWXPKEP.js} +1 -1
  96. package/dist/chunk-MOIJOTXX.js +25 -0
  97. package/dist/{chunk-MDWOXUEU.js → chunk-MPYCCFGC.js} +5 -5
  98. package/dist/{chunk-PEXUCK6Y.js → chunk-N2IQL7QC.js} +3 -3
  99. package/dist/{chunk-3DENR37V.js → chunk-N2NX5H6U.js} +3 -3
  100. package/dist/{chunk-4ORH2OXS.js → chunk-NKRVZC5S.js} +1 -1
  101. package/dist/{chunk-A4USKCUY.js → chunk-NXTKZZGR.js} +1 -1
  102. package/dist/{chunk-STUDSWGR.js → chunk-OWWIJYV3.js} +1 -1
  103. package/dist/{chunk-U55SJQPA.js → chunk-P63PBGBD.js} +2 -2
  104. package/dist/{chunk-WMUBDXHG.js → chunk-PDCJFCXJ.js} +73 -24
  105. package/dist/{chunk-W742C6SA.js → chunk-PTDAEAQY.js} +1 -1
  106. package/dist/{chunk-XOXWJAWW.js → chunk-PXUG4MJS.js} +4 -4
  107. package/dist/{chunk-K7VV4XSD.js → chunk-Q6ECHIJY.js} +2 -2
  108. package/dist/{chunk-OMLJTCNR.js → chunk-QA2QMK2I.js} +2 -2
  109. package/dist/{chunk-QTLKOGK4.js → chunk-QEKCHUUA.js} +2 -2
  110. package/dist/{chunk-SIVDQSNV.js → chunk-QFO7O6CB.js} +26 -23
  111. package/dist/{chunk-BLPMKSO7.js → chunk-QK2QVBVK.js} +1 -1
  112. package/dist/{chunk-3F7MJNGG.js → chunk-QQMYKUIG.js} +1 -1
  113. package/dist/{chunk-2U6Z7QH5.js → chunk-RAOIICTD.js} +10 -10
  114. package/dist/{chunk-SDIQEPAR.js → chunk-RWDZPTDG.js} +1 -1
  115. package/dist/{chunk-A4AMJI7L.js → chunk-S6WLGGFS.js} +1 -1
  116. package/dist/{chunk-NK2UW3WR.js → chunk-SDOVSUQP.js} +1 -1
  117. package/dist/{chunk-JB7OF43L.js → chunk-SEZ6YFNG.js} +1 -1
  118. package/dist/{chunk-ERYGKPIR.js → chunk-SMLMTEV6.js} +1 -1
  119. package/dist/{chunk-AH4QO6YC.js → chunk-TDLDZZNW.js} +1 -1
  120. package/dist/{chunk-HUUPDIBE.js → chunk-TIAWLVUB.js} +3 -3
  121. package/dist/{chunk-KRRKEWWI.js → chunk-TQU327UC.js} +1 -1
  122. package/dist/{chunk-4MJCBHXI.js → chunk-TYBLBWNS.js} +1 -1
  123. package/dist/{chunk-BC24UT7V.js → chunk-U42FMHXX.js} +3 -3
  124. package/dist/{chunk-W7MKF4I2.js → chunk-UECOOH6G.js} +4 -4
  125. package/dist/{chunk-PI6ZYIGK.js → chunk-UV6U7GP5.js} +1 -1
  126. package/dist/{chunk-S36C2TEK.js → chunk-UZLN7NLA.js} +4 -4
  127. package/dist/{chunk-AWP277ZO.js → chunk-V3KCLOPE.js} +5 -2
  128. package/dist/{chunk-GHPPUALY.js → chunk-V7A3632C.js} +3 -3
  129. package/dist/{chunk-W3AUR4EP.js → chunk-VB3MY67J.js} +1 -1
  130. package/dist/{chunk-ZS2ROUIG.js → chunk-VBNZJYTW.js} +1 -1
  131. package/dist/{chunk-ZHNHAA6O.js → chunk-VWSXDENA.js} +4 -4
  132. package/dist/{chunk-TTG6TSI6.js → chunk-W3H5NVS7.js} +2 -2
  133. package/dist/{chunk-DNBMLRSA.js → chunk-WUNTVKJ5.js} +1 -1
  134. package/dist/{chunk-CGHKK2BY.js → chunk-WVAA6ZNR.js} +3 -3
  135. package/dist/{chunk-QOIEPOKY.js → chunk-X5DKQC4C.js} +1 -1
  136. package/dist/{chunk-3RUFJGIT.js → chunk-XBKJYNHG.js} +2 -2
  137. package/dist/{chunk-BO2FQEM4.js → chunk-XERF7LKH.js} +2 -2
  138. package/dist/{chunk-NNKKJ2MI.js → chunk-XTYAKH7L.js} +4 -4
  139. package/dist/chunk-Y2D2KZC2.js +5146 -0
  140. package/dist/{chunk-VM2VBJRC.js → chunk-Z67ELZGQ.js} +16 -0
  141. package/dist/{chunk-WU3JL3BC.js → chunk-ZBICCHYQ.js} +2 -2
  142. package/dist/{chunk-BANMRXAN.js → chunk-ZDM7GFKC.js} +2 -2
  143. package/dist/{chunk-XEP7ER4Z.js → chunk-ZDPZZNLV.js} +2 -2
  144. package/dist/{chunk-AJPSKAQ6.js → chunk-ZZMOJL4C.js} +13 -13
  145. package/dist/{clean-NP652D74.js → clean-TGMFBGYJ.js} +25 -24
  146. package/dist/cli.js +68 -68
  147. package/dist/{cloud-TNWRELD4.js → cloud-7RGF4WQT.js} +7 -7
  148. package/dist/{cloud-EBVLMT6V.js → cloud-TMGC6QCF.js} +4 -4
  149. package/dist/{cloudrun-NAQ26OGP.js → cloudrun-S6OJKIV4.js} +7 -7
  150. package/dist/{compare-NPK5WR6F.js → compare-UY4WUT4M.js} +41 -43
  151. package/dist/{compiler-TYKIETZY.js → compiler-B5OKYH72.js} +4 -4
  152. package/dist/{component-YTC25I6A.js → component-UNC53NZD.js} +5 -5
  153. package/dist/{compositions-A3WYG7XA.js → compositions-IHZGRDPY.js} +15 -15
  154. package/dist/{curve-HULZZNO2.js → curve-PY3IWSSS.js} +14 -14
  155. package/dist/{cuts-EEN2AJLR.js → cuts-QDZJTR4C.js} +15 -15
  156. package/dist/{delete-QBPY4DUZ.js → delete-NWSVGHB6.js} +11 -11
  157. package/dist/{deploy-ZOTTUJKO.js → deploy-46ZFBV7W.js} +6 -6
  158. package/dist/{describeProject-AT42RQAC.js → describeProject-FUNFO4CI.js} +10 -10
  159. package/dist/{destroy-72TCFGIU.js → destroy-MGSLIVVF.js} +6 -6
  160. package/dist/{diff-L76A3S3I.js → diff-KV5MIGRD.js} +37 -37
  161. package/dist/{dist-56QKGCNA.js → dist-CZNBPI6A.js} +11 -10
  162. package/dist/{dist-XRESUN6B.js → dist-XBACRUL3.js} +2 -2
  163. package/dist/{dist-FU3Y3LDE.js → dist-ZJCX2EDP.js} +2 -2
  164. package/dist/{doctor-MTSMQTIP.js → doctor-Y2HSNKRA.js} +18 -18
  165. package/dist/{dotEnv-NMTSGEYW.js → dotEnv-3XMUX3U6.js} +3 -3
  166. package/dist/{energy-Y7UZSF5R.js → energy-7OXUOWH5.js} +15 -15
  167. package/dist/{events-5IZJ6IG4.js → events-2NABTDY4.js} +5 -5
  168. package/dist/{events-RY7F26WJ.js → events-C6EY6OJ5.js} +8 -8
  169. package/dist/{events-NLBWWYJR.js → events-EFOWGVWG.js} +17 -17
  170. package/dist/{execute-X6GOJYI7.js → execute-3ZQSB2IX.js} +29 -28
  171. package/dist/{extract-PO4ERZG7.js → extract-V36OHCDI.js} +15 -15
  172. package/dist/{face-GS7FT77Y.js → face-27NDWNOT.js} +11 -11
  173. package/dist/{face-O7W6DN3E.js → face-UJ22O2MN.js} +15 -15
  174. package/dist/{feedback-OLPHMAVY.js → feedback-K6BSCEV7.js} +17 -17
  175. package/dist/{ffmpeg-6R5HYRLA.js → ffmpeg-YNZQRQCJ.js} +9 -9
  176. package/dist/{figma-3WLCHH7N.js → figma-LIWR7AJJ.js} +3 -3
  177. package/dist/fontLocalizeCli.js +14 -13
  178. package/dist/{frames-RELC7P5I.js → frames-4CSSTFJP.js} +16 -16
  179. package/dist/{generate-KDKHARPX.js → generate-4Q37PFXG.js} +29 -29
  180. package/dist/{get-Y4JVREKO.js → get-AV65OF23.js} +11 -11
  181. package/dist/{gpuPolicy-IJE7MB5Y.js → gpuPolicy-Y6OVUHUV.js} +9 -9
  182. package/dist/{grade-compare-T25JDQLV.js → grade-compare-MBA4VG7M.js} +36 -35
  183. package/dist/{hands-WXGO4FOI.js → hands-2I2HWDTL.js} +17 -17
  184. package/dist/hangReport.js +2 -2
  185. package/dist/{heifImagePrep-5X36VXGL.js → heifImagePrep-JC3TQ4IG.js} +10 -10
  186. package/dist/{help-N66Y52S7.js → help-JOQIPFII.js} +1 -1
  187. package/dist/{history-F7C2MXWT.js → history-TLE2CGTY.js} +13 -13
  188. package/dist/hyperframe.manifest.json +1 -1
  189. package/dist/hyperframe.runtime.iife.js +64 -64
  190. package/dist/hyperframes-player.global.js +1 -1
  191. package/dist/{info-IHOMN6HZ.js → info-3HMZZAAV.js} +17 -17
  192. package/dist/{init-S2SZ3YJW.js → init-Y7FGDZUZ.js} +31 -31
  193. package/dist/{ink-DMKCUCA4.js → ink-K4JHETG5.js} +15 -15
  194. package/dist/{inspect-ILBSFULF.js → inspect-STYYLKV6.js} +40 -39
  195. package/dist/{installer-5ZPAYISO.js → installer-SRPSC2X7.js} +4 -4
  196. package/dist/{keyframes-U4XFMXJ3.js → keyframes-S6RFXNAA.js} +15 -15
  197. package/dist/{lambda-DYOGW62Q.js → lambda-YDA3ROVC.js} +15 -15
  198. package/dist/{launch-D5BGD7YR.js → launch-5UBQEKDH.js} +10 -10
  199. package/dist/{layout-F7SIJYUI.js → layout-LVDEEUDY.js} +40 -39
  200. package/dist/{lint-3HQJQBVK.js → lint-4OELSC7I.js} +13 -13
  201. package/dist/{lintProject-55U44GOP.js → lintProject-FPQL3VUS.js} +2 -2
  202. package/dist/{list-JUPBF73K.js → list-5TBQYNHD.js} +11 -11
  203. package/dist/{localPage-SI4COAH7.js → localPage-NEVG3XFX.js} +9 -9
  204. package/dist/{login-H6EP7A3D.js → login-IWDL4RDU.js} +14 -12
  205. package/dist/{logout-S5JLGTKW.js → logout-ZTTDB46G.js} +6 -6
  206. package/dist/{look-X5LTWUIV.js → look-J5XK73IV.js} +15 -15
  207. package/dist/{manager-PXRZQDDT.js → manager-AA3ZNHAP.js} +4 -4
  208. package/dist/{manager-GGOPVDOZ.js → manager-SNMVD5EK.js} +10 -10
  209. package/dist/{measure-XUHMK2AU.js → measure-COGDPBLB.js} +12 -12
  210. package/dist/{media-YXE5MDL4.js → media-PYSX3S7F.js} +10 -10
  211. package/dist/{media-treatment-SJXT2VQM.js → media-treatment-HR3X5LCP.js} +17 -17
  212. package/dist/{media-use-VK62B4E2.js → media-use-RHUAYJ66.js} +10 -10
  213. package/dist/{models-GBAKNMXA.js → models-Z6RV3WVR.js} +14 -14
  214. package/dist/{motionShot-6DNYNDSA.js → motionShot-DFOO4EQ3.js} +20 -20
  215. package/dist/{normalize-audio-RWERSIGD.js → normalize-audio-DV3OPHTW.js} +11 -11
  216. package/dist/{oauth-RETRT7QD.js → oauth-EZ2ZQ4XR.js} +16 -1
  217. package/dist/{open-3YMOWNPY.js → open-UOR7EZ5U.js} +16 -16
  218. package/dist/{parakeetRunner-TVDHLBTI.js → parakeetRunner-DTHAZ5YS.js} +16 -16
  219. package/dist/{pipeline-WCH5HSYI.js → pipeline-IO437FLW.js} +12 -12
  220. package/dist/{plan-HVP3IH7H.js → plan-NJNZYLV3.js} +21 -21
  221. package/dist/{play-CQQ7HHSQ.js → play-S6G25SBX.js} +25 -24
  222. package/dist/{preflight-6B6A46GT.js → preflight-WQQIKPKE.js} +12 -12
  223. package/dist/{present-UB6UPVOL.js → present-KTL4QWTR.js} +21 -20
  224. package/dist/{preview-BVSDP4Z7.js → preview-T6HZZTTI.js} +23 -23
  225. package/dist/{privateProjectFile-NBXWYT2G.js → privateProjectFile-EPXXPIEV.js} +2 -2
  226. package/dist/{probe-BOCLZXCU.js → probe-QVXQWQGR.js} +15 -15
  227. package/dist/{producer-HKFKQO2J.js → producer-7YJ4HGWN.js} +1 -1
  228. package/dist/{projectConfig-S7ZS2Q7T.js → projectConfig-ORBFL2ON.js} +6 -6
  229. package/dist/{publicNetwork-66HWFKYG.js → publicNetwork-RUALPHQQ.js} +1 -1
  230. package/dist/{publication-A6ZCUXEK.js → publication-CFIXSMO5.js} +2 -2
  231. package/dist/{publish-UA5UUDMQ.js → publish-OLO5DOLH.js} +25 -24
  232. package/dist/{receivedRecordFollow-Y7JQ2W2O.js → receivedRecordFollow-K2WHSMQL.js} +5 -5
  233. package/dist/{refresh-T3APLU23.js → refresh-FYXJG2PX.js} +6 -6
  234. package/dist/{remove-background-YZ4FAKSD.js → remove-background-CGJDVLEN.js} +13 -13
  235. package/dist/{render-HZFDCEBU.js → render-JF4YUCUQ.js} +43 -41
  236. package/dist/{render-CTU3KQWD.js → render-ODVFUS2P.js} +69 -44
  237. package/dist/{render-POJSNMDW.js → render-U7GWG4G2.js} +5 -5
  238. package/dist/{render-batch-XUPWNAEB.js → render-batch-GFCU3E6Q.js} +5 -5
  239. package/dist/renderSetupWorker.js +6 -6
  240. package/dist/{resolver-XFJ2W7CE.js → resolver-7HNGNUD3.js} +4 -4
  241. package/dist/{reverse-DP3LTE2X.js → reverse-R4GX3IZN.js} +1 -1
  242. package/dist/{run-7YFWJGQA.js → run-JRDVPXZK.js} +10 -10
  243. package/dist/{sam-O7Y2CCK3.js → sam-PHMZPQBM.js} +4 -4
  244. package/dist/{screenshotCapture-XDIKLRCX.js → screenshotCapture-332Y4ROA.js} +11 -11
  245. package/dist/{service-BMH3KCG2.js → service-FB4AF4RM.js} +17 -17
  246. package/dist/{share-GNE5S6JA.js → share-YSLQ7PGY.js} +24 -23
  247. package/dist/{sherpa-2NMBO7EI.js → sherpa-7RMA3KRP.js} +15 -15
  248. package/dist/sherpaWorker.js +3 -3
  249. package/dist/skills/hyperframes/references/plugin-installation.md +1 -1
  250. package/dist/skills/hyperframes/scripts/plugin-cli.mjs +4 -4
  251. package/dist/{skills-SB465LBL.js → skills-F5S4ISKO.js} +13 -13
  252. package/dist/{skillsUpdateCheck-OO3QYY7I.js → skillsUpdateCheck-MAMDFQR5.js} +5 -5
  253. package/dist/{snapshot-YYE5X4D6.js → snapshot-3GN5M7A4.js} +45 -45
  254. package/dist/{snapshotHeldVideos-WKU5Q4NL.js → snapshotHeldVideos-NNAZHPYK.js} +10 -10
  255. package/dist/{src-UEZXRPFJ.js → src-SHRAI2Y4.js} +12 -11
  256. package/dist/{src-COKNEXLI.js → src-WKQLHMUG.js} +11 -9
  257. package/dist/{start-RXKU3NS3.js → start-XXU5LDBV.js} +27 -27
  258. package/dist/{staticProjectServer-PYOO5BKL.js → staticProjectServer-RBNNFU6T.js} +21 -20
  259. package/dist/{status-OO7JXNVG.js → status-CTL4EWQC.js} +20 -20
  260. package/dist/studio/assets/{hyperframes-player-DHYu0XuV.js → hyperframes-player-Dl0dFOXO.js} +1 -1
  261. package/dist/studio/assets/{index-BBKHfua5.js → index-DPzReVPd.js} +178 -178
  262. package/dist/studio/assets/{index-DqND4rHq.js → index-DbMtST5n.js} +1 -1
  263. package/dist/studio/assets/{pausedVideoDecoder-B1FNXBMe.js → pausedVideoDecoder-CCAL8jtm.js} +1 -1
  264. package/dist/studio/index.html +1 -1
  265. package/dist/{studio-api-3QHWJQ5S.js → studio-api-2AOIQOEV.js} +11 -10
  266. package/dist/{studioServer-DDL676LA.js → studioServer-R6ADUV52.js} +69 -69
  267. package/dist/subCompositionWorker.js +13 -18
  268. package/dist/{sync-JOQ6E5IN.js → sync-C4DLMXLD.js} +15 -15
  269. package/dist/{synthesize-JECKYUGO.js → synthesize-W7KYX6CI.js} +2 -2
  270. package/dist/{system-PKL4Y4MX.js → system-V6IZXVU4.js} +3 -3
  271. package/dist/{telemetry-PEPGYBEH.js → telemetry-PCNSNJZE.js} +8 -8
  272. package/dist/{templates-U3LTK3E6.js → templates-LPGMBERL.js} +17 -17
  273. package/dist/{textOverFace-665L5B6Q.js → textOverFace-WYPZHM6O.js} +3 -3
  274. package/dist/{timeline-5H5XHN2E.js → timeline-KTEBNLHM.js} +23 -22
  275. package/dist/{tokens-ZT2YAOJ2.js → tokens-WP5ZRTJ3.js} +4 -4
  276. package/dist/{transcribe-62GITMY3.js → transcribe-463K32RT.js} +13 -13
  277. package/dist/{transcribe-DVXDCZX7.js → transcribe-L65PBQ4S.js} +32 -32
  278. package/dist/{tts-V36EOYBQ.js → tts-DDVJVSD4.js} +3 -3
  279. package/dist/{update-QVKPG5CA.js → update-6HCOMJ7L.js} +14 -14
  280. package/dist/{updateCheck-X36OZADC.js → updateCheck-RFRITDJM.js} +4 -4
  281. package/dist/{upgrade-YE57GX33.js → upgrade-BOQF5LPW.js} +5 -5
  282. package/dist/{urlDownloader-UJ5T4WGL.js → urlDownloader-MNYASBMV.js} +8 -8
  283. package/dist/{validate-IXPYD4ZO.js → validate-RZNELWBT.js} +30 -29
  284. package/dist/{video-OX3ZLXXC.js → video-FEMS6YLC.js} +10 -10
  285. package/dist/{voices-ND6HWM5H.js → voices-LADMSNKC.js} +27 -27
  286. package/dist/warmCheck.js +46 -46
  287. package/dist/warmCheckClient.js +2 -2
  288. package/package.json +1 -1
  289. package/dist/chunk-S3IQW75Q.js +0 -5146
@@ -16,7 +16,7 @@ import {
16
16
  Semaphore,
17
17
  prepareHeifImageInputs,
18
18
  withMediaProbeSlot
19
- } from "./chunk-WU3JL3BC.js";
19
+ } from "./chunk-ZBICCHYQ.js";
20
20
  import {
21
21
  EncoderInterruptedError,
22
22
  encoderFailureError,
@@ -30,7 +30,7 @@ import {
30
30
  refusesOutsideLink,
31
31
  resolveRenderPaths,
32
32
  toExternalAssetKey
33
- } from "./chunk-KNRZBLQH.js";
33
+ } from "./chunk-5JFK2MZE.js";
34
34
  import {
35
35
  linksOutside
36
36
  } from "./chunk-6ACARSAZ.js";
@@ -39,6 +39,9 @@ import {
39
39
  openRangeEnd,
40
40
  parseEncoderOptions
41
41
  } from "./chunk-LD6JONPV.js";
42
+ import {
43
+ previewToken
44
+ } from "./chunk-HLVNKNSW.js";
42
45
  import {
43
46
  BROWSER_GPU_NOT_SOFTWARE,
44
47
  CaptureFailure,
@@ -212,10 +215,10 @@ import {
212
215
  withPublicOnlyProxy,
213
216
  writeCapturedFrame,
214
217
  writeUrlDownloadTelemetry
215
- } from "./chunk-WMUBDXHG.js";
218
+ } from "./chunk-PDCJFCXJ.js";
216
219
  import {
217
220
  settleOnBrowserSafePort
218
- } from "./chunk-PJQVJSMG.js";
221
+ } from "./chunk-33JUCUTM.js";
219
222
  import {
220
223
  TRANSITIONS,
221
224
  convertTransfer,
@@ -237,7 +240,7 @@ import {
237
240
  parsesAsScript,
238
241
  prepareFlattenedInnerRoot,
239
242
  stripSdrPngColourTags
240
- } from "./chunk-2FKIIF2W.js";
243
+ } from "./chunk-BBEPJIL6.js";
241
244
  import {
242
245
  RENDER_TEMP_DIR
243
246
  } from "./chunk-F6PI5O3H.js";
@@ -265,7 +268,7 @@ import {
265
268
  redactTelemetryString,
266
269
  resolveAuthoredTimingWindow,
267
270
  toFps
268
- } from "./chunk-STUDSWGR.js";
271
+ } from "./chunk-OWWIJYV3.js";
269
272
  import {
270
273
  CAPTURE_CANVAS_SELECTOR,
271
274
  COMPOSITION_SOURCE_URL,
@@ -302,7 +305,7 @@ import {
302
305
  sourceTimeAt,
303
306
  styleElementsFor,
304
307
  timeAtSourceTime
305
- } from "./chunk-S3IQW75Q.js";
308
+ } from "./chunk-Y2D2KZC2.js";
306
309
  import {
307
310
  isSafePath,
308
311
  terminalText
@@ -312,7 +315,7 @@ import {
312
315
  } from "./chunk-LWX5PI73.js";
313
316
  import {
314
317
  resolveReferencedStart
315
- } from "./chunk-GXKCFOMR.js";
318
+ } from "./chunk-GDPNIGCY.js";
316
319
  import {
317
320
  isUnresolvedAssetPlaceholder,
318
321
  namesAnotherNetworkRoot,
@@ -328,7 +331,7 @@ import {
328
331
  getSystemTotalMb,
329
332
  hostCpuCount,
330
333
  usableCpuCount
331
- } from "./chunk-5GUYYSVT.js";
334
+ } from "./chunk-HY67LTYS.js";
332
335
  import {
333
336
  MEDIA_START_BASIS_ATTR,
334
337
  checkSubCompositionUsability,
@@ -374,6 +377,9 @@ import {
374
377
  isPrivateFileUnder,
375
378
  isStudioPrivatePath
376
379
  } from "./chunk-NTGTWXAO.js";
380
+ import {
381
+ concatListInputArgs
382
+ } from "./chunk-Z67ELZGQ.js";
377
383
 
378
384
  // ../producer/src/services/renderOrchestrator.ts
379
385
  import {
@@ -381,7 +387,7 @@ import {
381
387
  mkdirSync as mkdirSync10,
382
388
  readdirSync as readdirSync6,
383
389
  rmSync as rmSync10,
384
- statSync as statSync8,
390
+ statSync as statSync7,
385
391
  writeFileSync as writeFileSync6,
386
392
  copyFileSync as copyFileSync3,
387
393
  appendFileSync
@@ -680,7 +686,7 @@ function firstCompositionIdTag(html) {
680
686
  }
681
687
 
682
688
  // ../producer/src/services/renderOrchestrator.ts
683
- import { join as join30, dirname as dirname12, resolve as resolve7 } from "path";
689
+ import { join as join31, dirname as dirname12, resolve as resolve7 } from "path";
684
690
  import { totalmem as totalmem2 } from "os";
685
691
  import { randomUUID } from "crypto";
686
692
  import { fileURLToPath as fileURLToPath3 } from "url";
@@ -2798,8 +2804,8 @@ function replanAfterFailure(plan2, failure) {
2798
2804
  }
2799
2805
 
2800
2806
  // ../producer/src/services/render/stages/captureSegmentedStage.ts
2801
- import { existsSync as existsSync7, mkdirSync as mkdirSync3, rmSync as rmSync6, statSync as statSync3 } from "fs";
2802
- import { join as join9 } from "path";
2807
+ import { existsSync as existsSync8, mkdirSync as mkdirSync4, rmSync as rmSync6, statSync as statSync3 } from "fs";
2808
+ import { join as join11 } from "path";
2803
2809
 
2804
2810
  // ../producer/src/services/render/perfSummary.ts
2805
2811
  import { arch, platform, totalmem } from "os";
@@ -4428,6 +4434,7 @@ function cleanupEndedHdrVideos(args) {
4428
4434
  }
4429
4435
 
4430
4436
  // ../producer/src/services/render/segmentPlan.ts
4437
+ import { join as join8 } from "path";
4431
4438
  var DEFAULT_SEGMENT_FRAMES = 3e3;
4432
4439
  var MIN_SEGMENT_FRAMES = 30;
4433
4440
  function assertPositiveInteger(name, value) {
@@ -4448,6 +4455,9 @@ function planSegments(totalFrames, segmentFrames) {
4448
4455
  }
4449
4456
  return slices;
4450
4457
  }
4458
+ function segmentOutputPath(segmentDir, index) {
4459
+ return join8(segmentDir, `segment_${String(index).padStart(5, "0")}.mp4`);
4460
+ }
4451
4461
  function resolveSegmentFrames(env) {
4452
4462
  const raw = env.HF_SEGMENT_FRAMES;
4453
4463
  if (raw === void 0 || raw.trim() === "") return DEFAULT_SEGMENT_FRAMES;
@@ -4465,6 +4475,142 @@ function createSegmentQueue(slices) {
4465
4475
  };
4466
4476
  }
4467
4477
 
4478
+ // ../producer/src/services/render/segmentManifest.ts
4479
+ import { createHash as createHash2, createHmac, timingSafeEqual } from "crypto";
4480
+ import {
4481
+ createReadStream as createReadStream2,
4482
+ existsSync as existsSync7,
4483
+ lstatSync as lstatSync3,
4484
+ mkdirSync as mkdirSync3,
4485
+ readFileSync as readFileSync4,
4486
+ writeFileSync as writeFileSync3
4487
+ } from "fs";
4488
+ import { join as join9 } from "path";
4489
+ var MANIFEST_FILENAME = "segments.json";
4490
+ function computeSegmentPlanHash(input) {
4491
+ const ordered = [
4492
+ input.compositionHash,
4493
+ input.cliVersion,
4494
+ String(input.totalFrames),
4495
+ String(input.segmentFrames),
4496
+ `${input.fps.num}/${input.fps.den}`,
4497
+ `${input.width}x${input.height}`,
4498
+ input.codec,
4499
+ input.preset,
4500
+ input.quality === void 0 ? "" : String(input.quality),
4501
+ input.bitrate ?? "",
4502
+ input.pixelFormat ?? "",
4503
+ input.imageFormat,
4504
+ input.useGpu ? "gpu" : "cpu",
4505
+ `${input.outputWidth}x${input.outputHeight}`,
4506
+ input.motionBlur,
4507
+ input.pageMotionBlur ?? "",
4508
+ input.captureQuality === void 0 ? "" : String(input.captureQuality)
4509
+ ];
4510
+ const delivery = [input.maxBitrate, input.bufferSize, input.gopSize].map((v) => v ?? "");
4511
+ if (delivery.some((v) => v !== "")) ordered.push(...delivery.map(String));
4512
+ return createHash2("sha256").update(ordered.join(" ")).digest("hex").slice(0, 16);
4513
+ }
4514
+ function segmentDirFor(projectRendersDir, planHash) {
4515
+ return join9(projectRendersDir, ".hf-segments", planHash);
4516
+ }
4517
+ function hasNumber(value, key) {
4518
+ return key in value && typeof Reflect.get(value, key) === "number";
4519
+ }
4520
+ function hasString(value, key) {
4521
+ return key in value && typeof Reflect.get(value, key) === "string";
4522
+ }
4523
+ function isEntry(value) {
4524
+ if (typeof value !== "object" || value === null) return false;
4525
+ return hasNumber(value, "index") && hasNumber(value, "startFrame") && hasNumber(value, "endFrame") && hasString(value, "path") && hasNumber(value, "bytes") && hasString(value, "sha256") && hasString(value, "completedAt");
4526
+ }
4527
+ function isManifest(value) {
4528
+ if (typeof value !== "object" || value === null) return false;
4529
+ const completed = Reflect.get(value, "completed");
4530
+ return Reflect.get(value, "version") === 1 && hasString(value, "planHash") && hasNumber(value, "totalFrames") && hasNumber(value, "segmentFrames") && Array.isArray(completed) && completed.every(isEntry);
4531
+ }
4532
+ function readSegmentManifest(segmentDir) {
4533
+ const path = join9(segmentDir, MANIFEST_FILENAME);
4534
+ if (!existsSync7(path)) return null;
4535
+ try {
4536
+ const parsed = JSON.parse(readFileSync4(path, "utf-8"));
4537
+ return isManifest(parsed) ? parsed : null;
4538
+ } catch {
4539
+ return null;
4540
+ }
4541
+ }
4542
+ function segmentManifestKey(token = previewToken()) {
4543
+ return token ? createHmac("sha256", token).update("segment-manifest").digest() : null;
4544
+ }
4545
+ function manifestMac(manifest, key) {
4546
+ const signed = [
4547
+ manifest.planHash,
4548
+ manifest.totalFrames,
4549
+ manifest.segmentFrames,
4550
+ manifest.completed.map((e) => [e.index, e.startFrame, e.endFrame, e.bytes, e.sha256])
4551
+ ];
4552
+ return createHmac("sha256", key).update(JSON.stringify(signed)).digest("hex");
4553
+ }
4554
+ function signSegmentManifest(manifest, key) {
4555
+ const { version, planHash, totalFrames, segmentFrames, completed } = manifest;
4556
+ const unsigned = { version, planHash, totalFrames, segmentFrames, completed };
4557
+ return key ? { ...unsigned, mac: manifestMac(unsigned, key) } : unsigned;
4558
+ }
4559
+ function hasValidMac(manifest, key) {
4560
+ if (!key || typeof manifest.mac !== "string") return false;
4561
+ const expected = Buffer.from(manifestMac(manifest, key), "hex");
4562
+ const actual = Buffer.from(manifest.mac, "hex");
4563
+ return actual.length === expected.length && timingSafeEqual(actual, expected);
4564
+ }
4565
+ async function hashSegmentFile(path) {
4566
+ const hash = createHash2("sha256");
4567
+ for await (const chunk of createReadStream2(path)) hash.update(chunk);
4568
+ return hash.digest("hex");
4569
+ }
4570
+ function writeSegmentManifest(segmentDir, manifest, key) {
4571
+ mkdirSync3(segmentDir, { recursive: true });
4572
+ const tmp = join9(segmentDir, `${MANIFEST_FILENAME}.${process.pid}.tmp`);
4573
+ writeFileSync3(tmp, JSON.stringify(signSegmentManifest(manifest, key), null, 2), "utf-8");
4574
+ renameWithRetry(tmp, join9(segmentDir, MANIFEST_FILENAME));
4575
+ }
4576
+ async function probeSegmentFrameCount(path, probe) {
4577
+ try {
4578
+ const meta = await probe(path);
4579
+ if (!Number.isFinite(meta.videoStreamDurationSeconds) || !Number.isFinite(meta.fps))
4580
+ return null;
4581
+ if (meta.fps <= 0) return null;
4582
+ return Math.round(meta.videoStreamDurationSeconds * meta.fps);
4583
+ } catch {
4584
+ return null;
4585
+ }
4586
+ }
4587
+ function plannedSlice(entry, plan2) {
4588
+ const slice = Number.isInteger(entry.index) ? plan2[entry.index] : void 0;
4589
+ if (!slice || slice.startFrame !== entry.startFrame || slice.endFrame !== entry.endFrame) {
4590
+ return void 0;
4591
+ }
4592
+ return slice;
4593
+ }
4594
+ function isPlainFileOfSize(path, bytes) {
4595
+ const stat = lstatSync3(path, { throwIfNoEntry: false });
4596
+ return stat !== void 0 && stat.isFile() && stat.size > 0 && stat.size === bytes;
4597
+ }
4598
+ async function validateCompletedSegments(manifest, check) {
4599
+ const ok = /* @__PURE__ */ new Set();
4600
+ if (manifest.planHash !== check.expectedHash || !hasValidMac(manifest, check.key)) return ok;
4601
+ for (const entry of manifest.completed) {
4602
+ const slice = plannedSlice(entry, check.plan);
4603
+ if (!slice) continue;
4604
+ const path = segmentOutputPath(check.segmentDir, slice.index);
4605
+ if (!isPlainFileOfSize(path, entry.bytes)) continue;
4606
+ if (await hashSegmentFile(path) !== entry.sha256) continue;
4607
+ const frames = await check.probeFrames(path);
4608
+ if (frames !== slice.endFrame - slice.startFrame) continue;
4609
+ ok.add(slice.index);
4610
+ }
4611
+ return ok;
4612
+ }
4613
+
4468
4614
  // ../producer/src/services/render/segmentRecycle.ts
4469
4615
  var DEFAULT_SEGMENT_BROWSER_RECYCLE = 3;
4470
4616
  function resolveSegmentBrowserRecycle(env) {
@@ -4482,7 +4628,7 @@ function isTargetLossError(error) {
4482
4628
  // ../producer/src/services/render/stages/captureStreamingStage.ts
4483
4629
  import { mkdtemp, writeFile } from "fs/promises";
4484
4630
  import { tmpdir as tmpdir2 } from "os";
4485
- import { join as join8 } from "path";
4631
+ import { join as join10 } from "path";
4486
4632
 
4487
4633
  // ../producer/src/services/render/stallClock.ts
4488
4634
  var SUSPEND_GAP_MS = 15e3;
@@ -4685,11 +4831,11 @@ async function verifyDrawElementSample(session, idx, buf, ctx) {
4685
4831
  return;
4686
4832
  }
4687
4833
  if (db < verifyMinDb) {
4688
- const dumpDir = await mkdtemp(join8(tmpdir2(), "hf-de-verify-fail-")).catch(() => null);
4834
+ const dumpDir = await mkdtemp(join10(tmpdir2(), "hf-de-verify-fail-")).catch(() => null);
4689
4835
  if (dumpDir) {
4690
4836
  await Promise.all([
4691
- writeFile(join8(dumpDir, `frame-${idx}-de.jpg`), buf),
4692
- writeFile(join8(dumpDir, `frame-${idx}-truth.jpg`), truth)
4837
+ writeFile(join10(dumpDir, `frame-${idx}-de.jpg`), buf),
4838
+ writeFile(join10(dumpDir, `frame-${idx}-truth.jpg`), truth)
4693
4839
  ]).catch(() => {
4694
4840
  });
4695
4841
  }
@@ -5259,9 +5405,6 @@ async function runCaptureStreamingStage(input) {
5259
5405
  }
5260
5406
 
5261
5407
  // ../producer/src/services/render/stages/captureSegmentedStage.ts
5262
- function segmentOutputPath(segmentDir, index) {
5263
- return join9(segmentDir, `segment_${String(index).padStart(5, "0")}.mp4`);
5264
- }
5265
5408
  function segmentEncoderOptions(base, segment) {
5266
5409
  return {
5267
5410
  ...base,
@@ -5359,7 +5502,8 @@ async function captureSegmentToEncoder(ctx, segment) {
5359
5502
  path: segmentPath,
5360
5503
  // Recorded so resume can prove the file on disk is the one that
5361
5504
  // finished; absent only in unit tests, whose fake encoder writes none.
5362
- bytes: existsSync7(segmentPath) ? statSync3(segmentPath).size : 0
5505
+ bytes: existsSync8(segmentPath) ? statSync3(segmentPath).size : 0,
5506
+ sha256: existsSync8(segmentPath) ? await hashSegmentFile(segmentPath) : ""
5363
5507
  });
5364
5508
  return encodeResult;
5365
5509
  } finally {
@@ -5593,8 +5737,8 @@ async function runCaptureSegmentedStage(input) {
5593
5737
  const { log, dedupPerfs, assertNotAborted } = input;
5594
5738
  const deps = { ...DEFAULT_DEPS, ...input.deps };
5595
5739
  const segments = planSegments(input.totalFrames, input.segmentFrames);
5596
- const segmentDir = input.segmentDir ?? join9(input.workDir, "segments");
5597
- mkdirSync3(segmentDir, { recursive: true });
5740
+ const segmentDir = input.segmentDir ?? join11(input.workDir, "segments");
5741
+ mkdirSync4(segmentDir, { recursive: true });
5598
5742
  const skip = input.completedSegments ?? /* @__PURE__ */ new Set();
5599
5743
  const pending = segments.filter((s) => !skip.has(s.index));
5600
5744
  for (const index of skip) log.info("[Render] segment skipped (resume)", { index });
@@ -5749,7 +5893,7 @@ function startRenderEtaGuard(options) {
5749
5893
  }
5750
5894
 
5751
5895
  // ../producer/src/services/render/captureCost.ts
5752
- import { join as join10 } from "path";
5896
+ import { join as join12 } from "path";
5753
5897
  var CAPTURE_CALIBRATION_TARGET_MS = 600;
5754
5898
  var MAX_MEASURED_CAPTURE_COST_MULTIPLIER = 8;
5755
5899
  var CAPTURE_CALIBRATION_PROTOCOL_TIMEOUT_MS = 3e4;
@@ -5993,7 +6137,7 @@ async function runCaptureCalibration(input) {
5993
6137
  });
5994
6138
  let calibration;
5995
6139
  try {
5996
- calibration = await runOneCalibration(join10(workDir, "capture-calibration"), calibrationCfg);
6140
+ calibration = await runOneCalibration(join12(workDir, "capture-calibration"), calibrationCfg);
5997
6141
  } catch (error) {
5998
6142
  const shouldFallback = !forceScreenshot && shouldFallbackToScreenshotAfterCalibrationError(error);
5999
6143
  if (!shouldFallback) {
@@ -6027,7 +6171,7 @@ async function runCaptureCalibration(input) {
6027
6171
  const screenshotCfg = createCaptureCalibrationConfig({ ...cfg, forceScreenshot: true });
6028
6172
  try {
6029
6173
  calibration = await runOneCalibration(
6030
- join10(workDir, "capture-calibration-screenshot"),
6174
+ join12(workDir, "capture-calibration-screenshot"),
6031
6175
  screenshotCfg
6032
6176
  );
6033
6177
  } catch (fallbackError) {
@@ -6091,8 +6235,8 @@ function checkPageNeverReady(input) {
6091
6235
  }
6092
6236
 
6093
6237
  // ../producer/src/services/render/deferredVideoFrames.ts
6094
- import { mkdirSync as mkdirSync4, rmSync as rmSync7 } from "fs";
6095
- import { dirname as dirname5, join as join11 } from "path";
6238
+ import { mkdirSync as mkdirSync5, rmSync as rmSync7 } from "fs";
6239
+ import { dirname as dirname5, join as join13 } from "path";
6096
6240
  function contiguousRuns(sortedIndexes) {
6097
6241
  const runs2 = [];
6098
6242
  for (const index of sortedIndexes) {
@@ -6131,7 +6275,7 @@ async function extractDeferredFrames(input) {
6131
6275
  const shown = shownDeferredFrameIndexes(input, input.frames, input.fps);
6132
6276
  return Promise.all(
6133
6277
  deferred.map(async (video) => {
6134
- const outputDir = join11(input.outputRoot, mediaIdPathSegment(video.videoId));
6278
+ const outputDir = join13(input.outputRoot, mediaIdPathSegment(video.videoId));
6135
6279
  const indexes = [...shown.get(video.videoId) ?? []].sort((a, b) => a - b);
6136
6280
  if (indexes.length === 0) {
6137
6281
  return { ...video, outputDir, framePaths: /* @__PURE__ */ new Map(), ownedByLookup: false };
@@ -6187,7 +6331,7 @@ async function extractAllDeferredFrames(extracted, input) {
6187
6331
  maxTransientRetries: input.maxTransientRetries,
6188
6332
  onRetry: () => {
6189
6333
  rmSync7(video.outputDir, { recursive: true, force: true });
6190
- mkdirSync4(video.outputDir, { recursive: true });
6334
+ mkdirSync5(video.outputDir, { recursive: true });
6191
6335
  }
6192
6336
  }
6193
6337
  );
@@ -6273,10 +6417,10 @@ async function measureLocalShownBoxes(page, videos, fps, duration, log) {
6273
6417
  }
6274
6418
 
6275
6419
  // ../producer/src/services/render/segmentVideoFrames.ts
6276
- import { mkdirSync as mkdirSync5, rmSync as rmSync8 } from "fs";
6277
- import { join as join12 } from "path";
6420
+ import { mkdirSync as mkdirSync6, rmSync as rmSync8 } from "fs";
6421
+ import { join as join14 } from "path";
6278
6422
  function segmentFramesDir(rootDir, index) {
6279
- return join12(rootDir, "segment-frames", `segment_${String(index).padStart(5, "0")}`);
6423
+ return join14(rootDir, "segment-frames", `segment_${String(index).padStart(5, "0")}`);
6280
6424
  }
6281
6425
  function createSegmentVideoFrames(input) {
6282
6426
  const extractFrames = input.extractFrames ?? extractDeferredFrames;
@@ -6307,7 +6451,7 @@ function createSegmentVideoFrames(input) {
6307
6451
  let onDemandCalls = 0;
6308
6452
  const onDemandHook = () => Object.assign(
6309
6453
  async (page, time, heldVideoTime) => {
6310
- const dir = join12(
6454
+ const dir = join14(
6311
6455
  input.rootDir,
6312
6456
  "segment-frames",
6313
6457
  `on-demand_${String(onDemandCalls++).padStart(5, "0")}`
@@ -6324,11 +6468,11 @@ function createSegmentVideoFrames(input) {
6324
6468
  );
6325
6469
  return {
6326
6470
  async forFrames(frames, name) {
6327
- const dir = join12(input.rootDir, "segment-frames", name);
6471
+ const dir = join14(input.rootDir, "segment-frames", name);
6328
6472
  const release = () => rmSync8(dir, { recursive: true, force: true });
6329
6473
  try {
6330
6474
  release();
6331
- mkdirSync5(dir, { recursive: true });
6475
+ mkdirSync6(dir, { recursive: true });
6332
6476
  const table = await tableFor([...frames], dir);
6333
6477
  return { injector: () => createVideoFrameInjector(table, input.injectorOptions), release };
6334
6478
  } catch (error) {
@@ -6357,7 +6501,7 @@ function createSegmentVideoFrames(input) {
6357
6501
  folder = dir;
6358
6502
  try {
6359
6503
  rmSync8(dir, { recursive: true, force: true });
6360
- mkdirSync5(dir, { recursive: true });
6504
+ mkdirSync6(dir, { recursive: true });
6361
6505
  injector = await injectorFor(
6362
6506
  Array.from(
6363
6507
  { length: segment.endFrame - segment.startFrame },
@@ -6377,7 +6521,7 @@ function createSegmentVideoFrames(input) {
6377
6521
 
6378
6522
  // ../producer/src/services/render/videoFrameWindow.ts
6379
6523
  import { readdirSync as readdirSync3, statSync as statSync4 } from "fs";
6380
- import { join as join13 } from "path";
6524
+ import { join as join15 } from "path";
6381
6525
  function shouldWindowVideoFrames(args) {
6382
6526
  return args.segmented && args.env.HF_VIDEO_FRAME_WINDOW?.trim().toLowerCase() === "true";
6383
6527
  }
@@ -6390,7 +6534,7 @@ function directoryBytes(path) {
6390
6534
  return 0;
6391
6535
  }
6392
6536
  for (const entry of entries) {
6393
- const child2 = join13(path, entry.name);
6537
+ const child2 = join15(path, entry.name);
6394
6538
  try {
6395
6539
  bytes += entry.isDirectory() ? directoryBytes(child2) : statSync4(child2).size;
6396
6540
  } catch {
@@ -6408,7 +6552,7 @@ function trackSegmentFramePeak(frames, rootDir, onPeak) {
6408
6552
  ...worker,
6409
6553
  async prepare(segment) {
6410
6554
  await worker.prepare(segment);
6411
- const held = directoryBytes(join13(rootDir, "segment-frames"));
6555
+ const held = directoryBytes(join15(rootDir, "segment-frames"));
6412
6556
  if (held > peak) {
6413
6557
  peak = held;
6414
6558
  onPeak(peak);
@@ -6419,94 +6563,6 @@ function trackSegmentFramePeak(frames, rootDir, onPeak) {
6419
6563
  };
6420
6564
  }
6421
6565
 
6422
- // ../producer/src/services/render/segmentManifest.ts
6423
- import { createHash as createHash2 } from "crypto";
6424
- import { existsSync as existsSync8, mkdirSync as mkdirSync6, readFileSync as readFileSync4, statSync as statSync5, writeFileSync as writeFileSync3 } from "fs";
6425
- import { join as join14 } from "path";
6426
- var MANIFEST_FILENAME = "segments.json";
6427
- function computeSegmentPlanHash(input) {
6428
- const ordered = [
6429
- input.compositionHash,
6430
- input.cliVersion,
6431
- String(input.totalFrames),
6432
- String(input.segmentFrames),
6433
- `${input.fps.num}/${input.fps.den}`,
6434
- `${input.width}x${input.height}`,
6435
- input.codec,
6436
- input.preset,
6437
- input.quality === void 0 ? "" : String(input.quality),
6438
- input.bitrate ?? "",
6439
- input.pixelFormat ?? "",
6440
- input.imageFormat,
6441
- input.useGpu ? "gpu" : "cpu",
6442
- `${input.outputWidth}x${input.outputHeight}`,
6443
- input.motionBlur,
6444
- input.pageMotionBlur ?? "",
6445
- input.captureQuality === void 0 ? "" : String(input.captureQuality)
6446
- ];
6447
- const delivery = [input.maxBitrate, input.bufferSize, input.gopSize].map((v) => v ?? "");
6448
- if (delivery.some((v) => v !== "")) ordered.push(...delivery.map(String));
6449
- return createHash2("sha256").update(ordered.join(" ")).digest("hex").slice(0, 16);
6450
- }
6451
- function segmentDirFor(projectRendersDir, planHash) {
6452
- return join14(projectRendersDir, ".hf-segments", planHash);
6453
- }
6454
- function hasNumber(value, key) {
6455
- return key in value && typeof Reflect.get(value, key) === "number";
6456
- }
6457
- function hasString(value, key) {
6458
- return key in value && typeof Reflect.get(value, key) === "string";
6459
- }
6460
- function isEntry(value) {
6461
- if (typeof value !== "object" || value === null) return false;
6462
- return hasNumber(value, "index") && hasNumber(value, "startFrame") && hasNumber(value, "endFrame") && hasString(value, "path") && hasNumber(value, "bytes") && hasString(value, "completedAt");
6463
- }
6464
- function isManifest(value) {
6465
- if (typeof value !== "object" || value === null) return false;
6466
- const completed = Reflect.get(value, "completed");
6467
- return Reflect.get(value, "version") === 1 && hasString(value, "planHash") && hasNumber(value, "totalFrames") && hasNumber(value, "segmentFrames") && Array.isArray(completed) && completed.every(isEntry);
6468
- }
6469
- function readSegmentManifest(segmentDir) {
6470
- const path = join14(segmentDir, MANIFEST_FILENAME);
6471
- if (!existsSync8(path)) return null;
6472
- try {
6473
- const parsed = JSON.parse(readFileSync4(path, "utf-8"));
6474
- return isManifest(parsed) ? parsed : null;
6475
- } catch {
6476
- return null;
6477
- }
6478
- }
6479
- function writeSegmentManifest(segmentDir, manifest) {
6480
- mkdirSync6(segmentDir, { recursive: true });
6481
- const tmp = join14(segmentDir, `${MANIFEST_FILENAME}.${process.pid}.tmp`);
6482
- writeFileSync3(tmp, JSON.stringify(manifest, null, 2), "utf-8");
6483
- renameWithRetry(tmp, join14(segmentDir, MANIFEST_FILENAME));
6484
- }
6485
- async function probeSegmentFrameCount(path, probe) {
6486
- try {
6487
- const meta = await probe(path);
6488
- if (!Number.isFinite(meta.videoStreamDurationSeconds) || !Number.isFinite(meta.fps))
6489
- return null;
6490
- if (meta.fps <= 0) return null;
6491
- return Math.round(meta.videoStreamDurationSeconds * meta.fps);
6492
- } catch {
6493
- return null;
6494
- }
6495
- }
6496
- async function validateCompletedSegments(manifest, expectedHash, probeFrames) {
6497
- const ok = /* @__PURE__ */ new Set();
6498
- if (manifest.planHash !== expectedHash) return ok;
6499
- for (const entry of manifest.completed) {
6500
- if (!existsSync8(entry.path)) continue;
6501
- const size = statSync5(entry.path).size;
6502
- if (size <= 0 || size !== entry.bytes) continue;
6503
- const frames = await probeFrames(entry.path);
6504
- if (frames !== entry.endFrame - entry.startFrame) continue;
6505
- ok.add(entry.index);
6506
- }
6507
- return ok;
6508
- }
6509
-
6510
6566
  // ../producer/src/services/render/hdrMode.ts
6511
6567
  function formatDowngradeWarning(outputFormat, forcedHdrWithoutSources) {
6512
6568
  const hdrSourceReason = forcedHdrWithoutSources ? "HDR was forced without detected HDR sources" : "HDR source detected";
@@ -7082,10 +7138,10 @@ function requireOutputDimensions(expected, width, height) {
7082
7138
 
7083
7139
  // ../producer/src/services/render/stages/compileStage.ts
7084
7140
  import { existsSync as existsSync12, writeFileSync as writeFileSync4 } from "fs";
7085
- import { join as join18, relative as relative4 } from "path";
7141
+ import { join as join19, relative as relative4 } from "path";
7086
7142
 
7087
7143
  // ../producer/src/services/compositionSizeLimit.ts
7088
- import { statSync as statSync6 } from "fs";
7144
+ import { statSync as statSync5 } from "fs";
7089
7145
  var MAX_COMPOSITION_HTML_BYTES = 16 * 1024 * 1024;
7090
7146
  var COMPOSITION_TOO_LARGE = "COMPOSITION_TOO_LARGE";
7091
7147
  var megabytes = (bytes) => `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
@@ -7161,7 +7217,7 @@ var CompositionExpansionBudget = class {
7161
7217
  function assertCompositionFileSize(path, file) {
7162
7218
  let bytes;
7163
7219
  try {
7164
- const stats = statSync6(path);
7220
+ const stats = statSync5(path);
7165
7221
  if (!stats.isFile()) return;
7166
7222
  bytes = stats.size;
7167
7223
  } catch {
@@ -7172,17 +7228,17 @@ function assertCompositionFileSize(path, file) {
7172
7228
 
7173
7229
  // ../producer/src/services/htmlCompiler.ts
7174
7230
  import { createHash as createHash4 } from "crypto";
7175
- import { createReadStream as createReadStream2, existsSync as existsSync11, mkdirSync as mkdirSync7, readFileSync as readFileSync6 } from "fs";
7176
- import { join as join17, dirname as dirname7, resolve as resolve6, basename as basename5, relative as relative3, sep as sep3 } from "path";
7231
+ import { createReadStream as createReadStream3, existsSync as existsSync11, mkdirSync as mkdirSync7, readFileSync as readFileSync6 } from "fs";
7232
+ import { join as join18, dirname as dirname7, resolve as resolve6, basename as basename5, relative as relative3, sep as sep3 } from "path";
7177
7233
 
7178
7234
  // ../producer/src/services/bundledScripts.ts
7179
7235
  import { existsSync as existsSync9, readFileSync as readFileSync5 } from "fs";
7180
- import { join as join15 } from "path";
7236
+ import { join as join16 } from "path";
7181
7237
  var GSAP_VENDOR_DIR_ENV = "HYPERFRAMES_GSAP_VENDOR_DIR";
7182
7238
  function bundledScript(url) {
7183
7239
  const dir = process.env[GSAP_VENDOR_DIR_ENV];
7184
7240
  if (!dir || url !== `${gsapCdnDist()}gsap.min.js`) return null;
7185
- const file = join15(dir, "gsap.min.js");
7241
+ const file = join16(dir, "gsap.min.js");
7186
7242
  return existsSync9(file) ? readFileSync5(file) : null;
7187
7243
  }
7188
7244
 
@@ -7334,7 +7390,7 @@ function getPositionEditsRenderScript() {
7334
7390
 
7335
7391
  // ../producer/src/services/assetMediaType.ts
7336
7392
  import { existsSync as existsSync10 } from "fs";
7337
- import { dirname as dirname6, join as join16 } from "path";
7393
+ import { dirname as dirname6, join as join17 } from "path";
7338
7394
  var ASSET_MEDIA_TYPE_MISMATCH = "ASSET_MEDIA_TYPE_MISMATCH";
7339
7395
  var AssetMediaTypeMismatchError = class extends Error {
7340
7396
  // fallow-ignore-next-line unused-class-member
@@ -7375,11 +7431,11 @@ function assertAssetMediaTypeProfile(expected, profile, elementIdentity) {
7375
7431
  ]);
7376
7432
  }
7377
7433
  function mediaAssetRoots(projectDir, compiledDir) {
7378
- return [projectDir, compiledDir, join16(dirname6(compiledDir), "downloads")];
7434
+ return [projectDir, compiledDir, join17(dirname6(compiledDir), "downloads")];
7379
7435
  }
7380
7436
  function dropMediaOutsideProject(input) {
7381
7437
  const { projectDir, workDir, composition, log } = input;
7382
- const compiledDir = join16(workDir, "compiled");
7438
+ const compiledDir = join17(workDir, "compiled");
7383
7439
  const roots = mediaAssetRoots(projectDir, compiledDir);
7384
7440
  const staysInside = ({ id, src }) => {
7385
7441
  if (!src || isHttpUrl(src)) return true;
@@ -7730,7 +7786,7 @@ function detectShaderTransitionUsage(html) {
7730
7786
  async function resolveMediaDuration(src, mediaStart, playbackRate, projectDir, baseDir, downloadDir, tagName, elementIdentity, log, urlByAbsentLocalPath, probes, assetRoot) {
7731
7787
  let filePath = src;
7732
7788
  if (isHttpUrl(src)) {
7733
- const remoteDir = join17(downloadDir, REMOTE_MEDIA_SUBDIR);
7789
+ const remoteDir = join18(downloadDir, REMOTE_MEDIA_SUBDIR);
7734
7790
  if (!existsSync11(remoteDir)) mkdirSync7(remoteDir, { recursive: true });
7735
7791
  try {
7736
7792
  filePath = await downloadToTemp(src, remoteDir, void 0, void 0, void 0, {
@@ -7741,7 +7797,7 @@ async function resolveMediaDuration(src, mediaStart, playbackRate, projectDir, b
7741
7797
  }
7742
7798
  } else {
7743
7799
  filePath = decodedUrlPath(src);
7744
- if (!filePath.startsWith("/")) filePath = join17(baseDir, filePath);
7800
+ if (!filePath.startsWith("/")) filePath = join18(baseDir, filePath);
7745
7801
  if (escapesAssetRoot(filePath, assetRoot) || isPrivateUnderAssetRoots(filePath, [projectDir, downloadDir])) {
7746
7802
  return { duration: null, resolvedPath: filePath };
7747
7803
  }
@@ -8475,7 +8531,7 @@ async function localizeRemoteMediaSources(html, downloadDir) {
8475
8531
  const localized = await downloadAndRewriteUrls(
8476
8532
  urlSet,
8477
8533
  html,
8478
- join17(downloadDir, REMOTE_MEDIA_SUBDIR),
8534
+ join18(downloadDir, REMOTE_MEDIA_SUBDIR),
8479
8535
  "Remote media download failed",
8480
8536
  "Localized remote media source(s)"
8481
8537
  );
@@ -8498,7 +8554,7 @@ async function localizeRemoteImageSources(html, downloadDir) {
8498
8554
  return downloadAndRewriteUrls(
8499
8555
  urlSet,
8500
8556
  html,
8501
- join17(downloadDir, REMOTE_MEDIA_SUBDIR),
8557
+ join18(downloadDir, REMOTE_MEDIA_SUBDIR),
8502
8558
  "Remote image download failed",
8503
8559
  "Localized remote image source(s)"
8504
8560
  );
@@ -8511,7 +8567,7 @@ async function localizeRemoteBackgroundImages(html, downloadDir) {
8511
8567
  return downloadAndRewriteUrls(
8512
8568
  urlSet,
8513
8569
  html,
8514
- join17(downloadDir, REMOTE_MEDIA_SUBDIR),
8570
+ join18(downloadDir, REMOTE_MEDIA_SUBDIR),
8515
8571
  "Remote background-image download failed",
8516
8572
  "Localized remote background-image(s)",
8517
8573
  // Quoted url('..')/url("..") are rewritten by downloadAndRewriteUrls' default
@@ -8667,7 +8723,7 @@ function localizeFontFaceUrls(html, downloadDir) {
8667
8723
  return downloadAndRewriteUrls(
8668
8724
  collectFontFaceUrls(html),
8669
8725
  html,
8670
- join17(downloadDir, REMOTE_MEDIA_SUBDIR),
8726
+ join18(downloadDir, REMOTE_MEDIA_SUBDIR),
8671
8727
  "Remote font download failed",
8672
8728
  "Localized remote font face(s)",
8673
8729
  (h, url, relPath) => h.replaceAll(`url(${url})`, `url("${relPath}")`)
@@ -8677,7 +8733,7 @@ var MAX_LOCAL_FONT_DATA_URI_BYTES = 5 * 1024 * 1024;
8677
8733
  async function readLocalFont(absPath) {
8678
8734
  const chunks = [];
8679
8735
  let totalBytes = 0;
8680
- for await (const chunk of createReadStream2(absPath)) {
8736
+ for await (const chunk of createReadStream3(absPath)) {
8681
8737
  const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
8682
8738
  totalBytes += buffer.length;
8683
8739
  if (totalBytes > MAX_LOCAL_FONT_DATA_URI_BYTES) {
@@ -9437,7 +9493,7 @@ async function recompileWithResolutions(compiled, resolutions, projectDir, downl
9437
9493
  function animatedGifCacheDir(extractCacheDir) {
9438
9494
  try {
9439
9495
  const root = extractCacheDir && privateCacheRoot(extractCacheDir);
9440
- return root ? join18(root, "animated-gif") : void 0;
9496
+ return root ? join19(root, "animated-gif") : void 0;
9441
9497
  } catch {
9442
9498
  return void 0;
9443
9499
  }
@@ -9465,10 +9521,10 @@ function resolveEntryHtmlPath(input) {
9465
9521
  assertCompositionFileSize(path, relative4(projectDir, path));
9466
9522
  return readTextFile(path);
9467
9523
  };
9468
- const htmlPath = join18(projectDir, entryFile);
9524
+ const htmlPath = join19(projectDir, entryFile);
9469
9525
  const rawEntry = readEntry(htmlPath);
9470
9526
  if (entryFile === "index.html" || !isTemplateEntry(rawEntry)) return htmlPath;
9471
- const projectIndexPath = join18(projectDir, "index.html");
9527
+ const projectIndexPath = join19(projectDir, "index.html");
9472
9528
  if (!existsSync12(projectIndexPath)) {
9473
9529
  throw new Error(
9474
9530
  `Template entry file "${entryFile}" requires a project index.html to extract its render shell.`
@@ -9484,7 +9540,7 @@ function resolveEntryHtmlPath(input) {
9484
9540
  `Entry file "${entryFile}" is not mounted from index.html via data-composition-src, so it cannot be rendered independently.`
9485
9541
  );
9486
9542
  }
9487
- const wrapperPath = join18(workDir, "standalone-entry.html");
9543
+ const wrapperPath = join19(workDir, "standalone-entry.html");
9488
9544
  writeFileSync4(wrapperPath, standaloneHtml, "utf-8");
9489
9545
  log.info("Extracted standalone entry from index.html host context", { entryFile });
9490
9546
  return wrapperPath;
@@ -9514,7 +9570,7 @@ async function runCompileStage(input) {
9514
9570
  const assetRoot = job.config.allowOutsideProjectAssets ? void 0 : projectDir;
9515
9571
  const htmlPath = resolveEntryHtmlPath({ projectDir, workDir, entryFile, log, assetRoot });
9516
9572
  const compileStart = Date.now();
9517
- const compiled = await compileForRender(projectDir, htmlPath, join18(workDir, "downloads"), {
9573
+ const compiled = await compileForRender(projectDir, htmlPath, join19(workDir, "downloads"), {
9518
9574
  log,
9519
9575
  failClosedFontFetch: failClosedFontFetch === true,
9520
9576
  allowSystemFontCapture,
@@ -9589,7 +9645,7 @@ async function runCompileStage(input) {
9589
9645
  });
9590
9646
  await preflightCompositionAssetMediaTypes({
9591
9647
  projectDir,
9592
- compiledDir: join18(workDir, "compiled"),
9648
+ compiledDir: join19(workDir, "compiled"),
9593
9649
  composition,
9594
9650
  signal: abortSignal
9595
9651
  });
@@ -9637,7 +9693,7 @@ async function runCompileStage(input) {
9637
9693
 
9638
9694
  // ../producer/src/services/render/stages/probeStage.ts
9639
9695
  import { createHash as createHash5 } from "crypto";
9640
- import { basename as basename6, join as join19 } from "path";
9696
+ import { basename as basename6, join as join20 } from "path";
9641
9697
 
9642
9698
  // ../producer/src/services/render/stages/probeFailures.ts
9643
9699
  var NETWORK_FAILURE_PATTERN = /404|ERR_NAME_NOT_RESOLVED|ERR_CONNECTION_REFUSED|net::ERR_/i;
@@ -9926,7 +9982,7 @@ async function runProbeStage(input) {
9926
9982
  });
9927
9983
  fileServer = await createFileServer({
9928
9984
  projectDir,
9929
- compiledDir: join19(workDir, "compiled"),
9985
+ compiledDir: join20(workDir, "compiled"),
9930
9986
  port: 0,
9931
9987
  preHeadScripts: [VIRTUAL_TIME_SHIM],
9932
9988
  fps: job.config.fps,
@@ -9963,7 +10019,7 @@ async function runProbeStage(input) {
9963
10019
  log.info("Creating capture session...", { attempt, maxAttempts: PROBE_MAX_ATTEMPTS });
9964
10020
  probeSession = await createCaptureSession(
9965
10021
  fileServer.url,
9966
- join19(workDir, "probe"),
10022
+ join20(workDir, "probe"),
9967
10023
  captureOpts,
9968
10024
  null,
9969
10025
  probeCfg
@@ -10048,7 +10104,7 @@ async function runProbeStage(input) {
10048
10104
  });
10049
10105
  probeSession = await createCaptureSession(
10050
10106
  fileServer.url,
10051
- join19(workDir, "probe-screenshot"),
10107
+ join20(workDir, "probe-screenshot"),
10052
10108
  captureOpts,
10053
10109
  null,
10054
10110
  { ...probeCfg, forceScreenshot: true }
@@ -10086,7 +10142,7 @@ async function runProbeStage(input) {
10086
10142
  compiled,
10087
10143
  resolutions,
10088
10144
  projectDir,
10089
- join19(workDir, "downloads"),
10145
+ join20(workDir, "downloads"),
10090
10146
  job.config.allowOutsideProjectAssets ? void 0 : projectDir,
10091
10147
  { includeScripts: job.config.includeOutsideScripts }
10092
10148
  );
@@ -10286,7 +10342,7 @@ async function runProbeStage(input) {
10286
10342
  });
10287
10343
  await preflightCompositionAssetMediaTypes({
10288
10344
  projectDir,
10289
- compiledDir: join19(workDir, "compiled"),
10345
+ compiledDir: join20(workDir, "compiled"),
10290
10346
  composition,
10291
10347
  signal: abortSignal
10292
10348
  });
@@ -10445,7 +10501,7 @@ function validateDistributedDuration(input) {
10445
10501
 
10446
10502
  // ../producer/src/services/render/stages/extractVideosStage.ts
10447
10503
  import { existsSync as existsSync13 } from "fs";
10448
- import { join as join20 } from "path";
10504
+ import { join as join21 } from "path";
10449
10505
 
10450
10506
  // ../producer/src/services/render/extractionFailureMetadata.ts
10451
10507
  function stringOrEmpty(value) {
@@ -10785,7 +10841,7 @@ async function runExtractVideosStage(input) {
10785
10841
  // because short boundary counts can differ by one frame.
10786
10842
  {
10787
10843
  fps: job.config.fps,
10788
- outputDir: join20(compiledDir, "__hyperframes_video_frames"),
10844
+ outputDir: join21(compiledDir, "__hyperframes_video_frames"),
10789
10845
  format: job.config.videoFrameFormat ?? "auto",
10790
10846
  toneMapHdrToSdr: rendersSdrOnly(job.config, composition),
10791
10847
  timelineEnd: composition.duration,
@@ -10793,7 +10849,7 @@ async function runExtractVideosStage(input) {
10793
10849
  collectProbeFailures: extractionPolicy.failureMode === "enforce",
10794
10850
  deferRangeExtraction,
10795
10851
  shownBoxes,
10796
- contentKeyedDirs: [join20(compiledDir, REMOTE_MEDIA_SUBDIR)],
10852
+ contentKeyedDirs: [join21(compiledDir, REMOTE_MEDIA_SUBDIR)],
10797
10853
  urlByAbsentLocalPath,
10798
10854
  assetRoots,
10799
10855
  onProgress: ({ planned = 0, done = 0 }) => {
@@ -10885,7 +10941,7 @@ async function remoteProbeSource(video, input) {
10885
10941
  if (!isPublicHttpsUrl(video.src)) return null;
10886
10942
  if (!resolveRestrictPageNetwork()) return video.src;
10887
10943
  if (!video.hasAudio || video.hidden) return null;
10888
- const downloadDir = input.downloadDir ?? join20(input.compiledDir, REMOTE_MEDIA_SUBDIR);
10944
+ const downloadDir = input.downloadDir ?? join21(input.compiledDir, REMOTE_MEDIA_SUBDIR);
10889
10945
  try {
10890
10946
  return await downloadToTemp(video.src, downloadDir, void 0, input.signal, void 0, {
10891
10947
  onTelemetry: writeUrlDownloadTelemetry
@@ -11004,15 +11060,15 @@ async function planVideoLayerPassthrough(input) {
11004
11060
 
11005
11061
  // ../producer/src/services/render/stages/audioStage.ts
11006
11062
  import { existsSync as existsSync16 } from "fs";
11007
- import { join as join23 } from "path";
11063
+ import { join as join24 } from "path";
11008
11064
 
11009
11065
  // ../producer/src/services/render/audioDeliveryLimit.ts
11010
11066
  import { existsSync as existsSync15 } from "fs";
11011
- import { dirname as dirname9, join as join22 } from "path";
11067
+ import { dirname as dirname9, join as join23 } from "path";
11012
11068
 
11013
11069
  // ../producer/src/services/render/audioPadTrim.ts
11014
11070
  import { spawn } from "child_process";
11015
- import { dirname as dirname8, join as join21 } from "path";
11071
+ import { dirname as dirname8, join as join22 } from "path";
11016
11072
 
11017
11073
  // ../producer/src/services/render/audioTruePeak.ts
11018
11074
  var toDbfs = (token) => token.toLowerCase() === "-inf" ? Number.NEGATIVE_INFINITY : Number(token);
@@ -11272,7 +11328,7 @@ async function constrainAacTruePeak(input) {
11272
11328
  }
11273
11329
  async function cutSource(input, scratchDir, attenuationDb) {
11274
11330
  if (!input.sourcePath || !input.rewriteSource) return true;
11275
- const cutPath = join21(scratchDir, "source.wav");
11331
+ const cutPath = join22(scratchDir, "source.wav");
11276
11332
  try {
11277
11333
  const result = await input.rewriteSource(input.sourcePath, cutPath, gainFilter(attenuationDb));
11278
11334
  if (!result.success) throw new Error(result.error);
@@ -11287,7 +11343,7 @@ async function enforceAacTruePeak(input) {
11287
11343
  let scratchDir;
11288
11344
  try {
11289
11345
  scratchDir = createStagingDir(dirname8(input.audioPath), ".true-peak-");
11290
- const correctedPath = join21(scratchDir, "audio.m4a");
11346
+ const correctedPath = join22(scratchDir, "audio.m4a");
11291
11347
  const measurements = [];
11292
11348
  let attenuationDb = 0;
11293
11349
  let sourcePeakDbfs;
@@ -11507,7 +11563,7 @@ async function limitDeliveryPeaks(input, deps = {
11507
11563
  const peak = await deps.measure(audioPath, { timeoutMs, signal });
11508
11564
  if (peak <= AAC_DELIVERY_TRUE_PEAK_DBFS) return { success: true };
11509
11565
  const alternating = ["a", "b"].map(
11510
- (k) => join22(dirname9(sourcePath), `audio-source-limited-${k}.wav`)
11566
+ (k) => join23(dirname9(sourcePath), `audio-source-limited-${k}.wav`)
11511
11567
  );
11512
11568
  let encodedFrom;
11513
11569
  let ceiling = AAC_DELIVERY_TRUE_PEAK_DBFS;
@@ -11580,7 +11636,7 @@ function runAudioStage(input) {
11580
11636
  }
11581
11637
  async function runAudioStageScoped(input) {
11582
11638
  const stageStart = Date.now();
11583
- const pcmSourcePath = join23(input.workDir, "audio-source.wav");
11639
+ const pcmSourcePath = join24(input.workDir, "audio-source.wav");
11584
11640
  const duration = input.totalFrames * input.fps.den / input.fps.num;
11585
11641
  let deliverySourcePath;
11586
11642
  try {
@@ -11645,7 +11701,7 @@ async function mixAudioForDelivery(input, duration, pcmSourcePath) {
11645
11701
  assertNotAborted,
11646
11702
  log
11647
11703
  } = input;
11648
- const audioOutputPath = join23(workDir, MIXED_AUDIO_FILENAME);
11704
+ const audioOutputPath = join24(workDir, MIXED_AUDIO_FILENAME);
11649
11705
  let hasAudio = false;
11650
11706
  let audioError;
11651
11707
  let audioFailures;
@@ -11726,7 +11782,7 @@ async function mixAudioForDelivery(input, duration, pcmSourcePath) {
11726
11782
 
11727
11783
  // ../producer/src/services/render/stages/captureStage.ts
11728
11784
  import { existsSync as existsSync17, readdirSync as readdirSync4, statfsSync as statfsSync2 } from "fs";
11729
- import { join as join24 } from "path";
11785
+ import { join as join25 } from "path";
11730
11786
  function shouldAllowAdaptiveCaptureRetry(workerCount, _explicitlyConfigured) {
11731
11787
  return workerCount > 1;
11732
11788
  }
@@ -11785,13 +11841,13 @@ function measureCaptureFrameBytes(workDir, framesDir) {
11785
11841
  if (!existsSync17(workDir)) return total;
11786
11842
  for (const attempt of readdirSync4(workDir)) {
11787
11843
  if (/^retry-\d+-batch-\d+-worker-\d+$/.test(attempt)) {
11788
- total += sampleDirectoryBytes(join24(workDir, attempt));
11844
+ total += sampleDirectoryBytes(join25(workDir, attempt));
11789
11845
  continue;
11790
11846
  }
11791
11847
  if (!/^capture-attempt-\d+$/.test(attempt)) continue;
11792
- const attemptDir = join24(workDir, attempt);
11848
+ const attemptDir = join25(workDir, attempt);
11793
11849
  for (const name of readdirSync4(attemptDir)) {
11794
- if (/^worker-\d+$/.test(name)) total += sampleDirectoryBytes(join24(attemptDir, name));
11850
+ if (/^worker-\d+$/.test(name)) total += sampleDirectoryBytes(join25(attemptDir, name));
11795
11851
  }
11796
11852
  }
11797
11853
  return total;
@@ -12090,7 +12146,7 @@ async function captureSessionFrames(session, { input, rangeStart, rangeEnd, resu
12090
12146
 
12091
12147
  // ../producer/src/services/render/stages/captureHdrStage.ts
12092
12148
  import { existsSync as existsSync19, mkdirSync as mkdirSync8 } from "fs";
12093
- import { join as join28 } from "path";
12149
+ import { join as join29 } from "path";
12094
12150
 
12095
12151
  // ../producer/src/services/hdrImageTransferCache.ts
12096
12152
  var DEFAULT_MAX_BYTES = 200 * 1024 * 1024;
@@ -12152,7 +12208,7 @@ function createHdrImageTransferCache(options = {}) {
12152
12208
  }
12153
12209
 
12154
12210
  // ../producer/src/services/render/stages/captureHdrSequentialLoop.ts
12155
- import { join as join25 } from "path";
12211
+ import { join as join26 } from "path";
12156
12212
  async function runSequentialLayeredFrameLoop(input) {
12157
12213
  const {
12158
12214
  job,
@@ -12273,7 +12329,7 @@ async function runSequentialLayeredFrameLoop(input) {
12273
12329
  );
12274
12330
  if (debugDumpEnabled && debugDumpDir && i % 30 === 0) {
12275
12331
  writeFileExclusiveSync(
12276
- join25(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
12332
+ join26(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
12277
12333
  normalCanvas
12278
12334
  );
12279
12335
  }
@@ -12305,12 +12361,12 @@ async function runSequentialLayeredFrameLoop(input) {
12305
12361
  }
12306
12362
 
12307
12363
  // ../producer/src/services/render/stages/captureHdrHybridLoop.ts
12308
- import { join as join27 } from "path";
12364
+ import { join as join28 } from "path";
12309
12365
 
12310
12366
  // ../producer/src/services/shaderTransitionWorkerPool.ts
12311
12367
  import { Worker } from "worker_threads";
12312
12368
  import { fileURLToPath as fileURLToPath2, pathToFileURL } from "url";
12313
- import { dirname as dirname10, join as join26 } from "path";
12369
+ import { dirname as dirname10, join as join27 } from "path";
12314
12370
  import { createRequire } from "module";
12315
12371
  import { existsSync as existsSync18 } from "fs";
12316
12372
  function resolveWorkerEntry(explicit) {
@@ -12323,9 +12379,9 @@ function resolveWorkerEntry(explicit) {
12323
12379
  return { path: override, isTs };
12324
12380
  }
12325
12381
  const moduleDir = dirname10(fileURLToPath2(import.meta.url));
12326
- const jsPath = join26(moduleDir, "shaderTransitionWorker.js");
12382
+ const jsPath = join27(moduleDir, "shaderTransitionWorker.js");
12327
12383
  if (existsSync18(jsPath)) return { path: jsPath, isTs: false };
12328
- const tsPath = join26(moduleDir, "shaderTransitionWorker.ts");
12384
+ const tsPath = join27(moduleDir, "shaderTransitionWorker.ts");
12329
12385
  return { path: tsPath, isTs: true };
12330
12386
  }
12331
12387
  function buildExecArgv(entryIsTs) {
@@ -12693,7 +12749,7 @@ async function runHybridLayeredFrameLoop(input) {
12693
12749
  );
12694
12750
  if (debugDumpEnabled && debugDumpDir && i % 30 === 0) {
12695
12751
  writeFileExclusiveSync(
12696
- join27(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
12752
+ join28(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
12697
12753
  canvas
12698
12754
  );
12699
12755
  }
@@ -12889,7 +12945,7 @@ async function runCaptureHdrStage(input) {
12889
12945
  if (hdrVideoFrameSources.has(v.id)) hdrVideoEndTimes.set(v.id, v.end);
12890
12946
  }
12891
12947
  const debugDumpEnabled = process.env.KEEP_TEMP === "1";
12892
- const debugDumpDir = debugDumpEnabled ? join28(framesDir, "debug-composite") : null;
12948
+ const debugDumpDir = debugDumpEnabled ? join29(framesDir, "debug-composite") : null;
12893
12949
  if (debugDumpDir && !existsSync19(debugDumpDir)) {
12894
12950
  mkdirSync8(debugDumpDir, { recursive: true });
12895
12951
  }
@@ -13054,11 +13110,11 @@ import {
13054
13110
  readdirSync as readdirSync5,
13055
13111
  readFileSync as readFileSync7,
13056
13112
  rmSync as rmSync9,
13057
- statSync as statSync7,
13113
+ statSync as statSync6,
13058
13114
  writeFileSync as writeFileSync5
13059
13115
  } from "fs";
13060
13116
  import { readFile as readFile2 } from "fs/promises";
13061
- import { dirname as dirname11, join as join29 } from "path";
13117
+ import { dirname as dirname11, join as join30 } from "path";
13062
13118
 
13063
13119
  // ../producer/src/services/render/stages/gifEncodeArgs.ts
13064
13120
  function fpsToFfmpegArg2(fps) {
@@ -13168,7 +13224,7 @@ async function encodeGifFromDir(framesDir, framePattern, outputPath, input) {
13168
13224
  const failure = await reencodeWithClearedWholeFrames(argsInput, run, startTime);
13169
13225
  if (failure) return failure;
13170
13226
  }
13171
- const fileSize = existsSync20(outputPath) ? statSync7(outputPath).size : 0;
13227
+ const fileSize = existsSync20(outputPath) ? statSync6(outputPath).size : 0;
13172
13228
  return {
13173
13229
  success: true,
13174
13230
  outputPath,
@@ -13262,7 +13318,7 @@ function encodeWhileCapturing(input, totalFrames, captureBudget) {
13262
13318
  await new Promise((resolve12) => wake = resolve12);
13263
13319
  }
13264
13320
  if (signal.aborted) return;
13265
- const mergedPath = join29(input.framesDir, formatCaptureFrameName(next, "jpg"));
13321
+ const mergedPath = join30(input.framesDir, formatCaptureFrameName(next, "jpg"));
13266
13322
  const frame = await readLandedFrame(landed.get(next), mergedPath);
13267
13323
  landed.delete(next);
13268
13324
  if (!await stream.writeFrame(frame)) {
@@ -13345,11 +13401,11 @@ async function runEncodeStage(input) {
13345
13401
  );
13346
13402
  }
13347
13403
  captured.forEach((name, i) => {
13348
- const dst = join29(outputPath, formatExportFrameName(i, "png"));
13349
- copyFileSync2(join29(framesDir, name), dst);
13404
+ const dst = join30(outputPath, formatExportFrameName(i, "png"));
13405
+ copyFileSync2(join30(framesDir, name), dst);
13350
13406
  });
13351
13407
  if (hasAudio && audioOutputPath && existsSync20(audioOutputPath)) {
13352
- copyFileSync2(audioOutputPath, join29(outputPath, MIXED_AUDIO_FILENAME));
13408
+ copyFileSync2(audioOutputPath, join30(outputPath, MIXED_AUDIO_FILENAME));
13353
13409
  log.info(
13354
13410
  `[Render] png-sequence: ${MIXED_AUDIO_FILENAME} sidecar written to ${outputPath}/${MIXED_AUDIO_FILENAME}`
13355
13411
  );
@@ -13369,7 +13425,7 @@ async function runEncodeStage(input) {
13369
13425
  const encodeResult2 = await encodeGifFromDir(framesDir, framePattern2, outputPath, {
13370
13426
  fps: job.config.fps,
13371
13427
  loop,
13372
- palettePath: join29(dirname11(videoOnlyPath), "gif-palette.png"),
13428
+ palettePath: join30(dirname11(videoOnlyPath), "gif-palette.png"),
13373
13429
  preserveAlpha: needsAlpha,
13374
13430
  signal: abortSignal,
13375
13431
  timeout: engineCfg.ffmpegEncodeTimeout
@@ -13579,9 +13635,9 @@ function sampleDirectoryBytes(dir) {
13579
13635
  continue;
13580
13636
  }
13581
13637
  for (const name of entries) {
13582
- const full = join30(current, name);
13638
+ const full = join31(current, name);
13583
13639
  try {
13584
- const st = statSync8(full);
13640
+ const st = statSync7(full);
13585
13641
  if (st.isDirectory()) {
13586
13642
  stack.push(full);
13587
13643
  } else if (st.isFile()) {
@@ -13737,8 +13793,8 @@ function findMissingFrameRanges(totalFrames, framesDir, frameExt) {
13737
13793
  const ranges = [];
13738
13794
  let rangeStart = null;
13739
13795
  for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
13740
- const framePath = join30(framesDir, formatCaptureFrameName(frameIndex, frameExt));
13741
- const missing = !existsSync21(framePath) || statSync8(framePath).size <= 8;
13796
+ const framePath = join31(framesDir, formatCaptureFrameName(frameIndex, frameExt));
13797
+ const missing = !existsSync21(framePath) || statSync7(framePath).size <= 8;
13742
13798
  if (missing && rangeStart === null) {
13743
13799
  rangeStart = frameIndex;
13744
13800
  } else if (!missing && rangeStart !== null) {
@@ -13754,7 +13810,7 @@ function findMissingFrameRanges(totalFrames, framesDir, frameExt) {
13754
13810
  function buildMissingFrameRetryBatches(ranges, maxWorkers, workDir, attempt, rangeStart = 0, stride = 1) {
13755
13811
  const workersPerBatch = Math.max(1, Math.floor(maxWorkers));
13756
13812
  const batches = [];
13757
- const outputDirFor = (batchIndex, workerId) => join30(workDir, `retry-${attempt}-batch-${batchIndex}-worker-${workerId}`);
13813
+ const outputDirFor = (batchIndex, workerId) => join31(workDir, `retry-${attempt}-batch-${batchIndex}-worker-${workerId}`);
13758
13814
  if (stride > 1) {
13759
13815
  const spans = /* @__PURE__ */ new Map();
13760
13816
  for (const range of ranges) {
@@ -13814,8 +13870,8 @@ function getNextRetryWorkerCount(currentWorkers) {
13814
13870
  return Math.max(1, Math.floor(currentWorkers / 2));
13815
13871
  }
13816
13872
  function resolveRenderWorkDirPrefix(outputPath, jobId, platform2 = process.platform, systemTempDir = tmpdir3()) {
13817
- if (platform2 === "win32" || platform2 === "darwin") return join30(systemTempDir, "hf-render-");
13818
- return join30(dirname12(outputPath), `work-${jobId}-`);
13873
+ if (platform2 === "win32" || platform2 === "darwin") return join31(systemTempDir, "hf-render-");
13874
+ return join31(dirname12(outputPath), `work-${jobId}-`);
13819
13875
  }
13820
13876
  var MAX_TRANSIENT_CAPTURE_RETRIES = 1;
13821
13877
  function isTransientCaptureRetryEligible(failureKind, missing, retriesUsed) {
@@ -13870,7 +13926,7 @@ The composition is too large for the available memory. To reduce memory pressure
13870
13926
  function countCapturedFrames(totalFrames, framesDir, frameExt) {
13871
13927
  let captured = 0;
13872
13928
  for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
13873
- const framePath = join30(framesDir, formatCaptureFrameName(frameIndex, frameExt));
13929
+ const framePath = join31(framesDir, formatCaptureFrameName(frameIndex, frameExt));
13874
13930
  if (existsSync21(framePath)) captured++;
13875
13931
  }
13876
13932
  return captured;
@@ -13896,7 +13952,7 @@ async function executeDiskCaptureWithAdaptiveRetry(options) {
13896
13952
  reason: attempt === 0 ? "initial" : pendingTransientRetry ? "transient-retry" : "retry"
13897
13953
  });
13898
13954
  pendingTransientRetry = false;
13899
- const attemptWorkDir = join30(options.workDir, `capture-attempt-${attempt}`);
13955
+ const attemptWorkDir = join31(options.workDir, `capture-attempt-${attempt}`);
13900
13956
  const batches = missingRanges ? buildMissingFrameRetryBatches(
13901
13957
  missingRanges,
13902
13958
  currentWorkers,
@@ -14544,7 +14600,7 @@ function deVerifyFallbackTelemetry(err) {
14544
14600
  }
14545
14601
  function resolveRenderDebugDir() {
14546
14602
  const producerRoot = process.env.PRODUCER_RENDERS_DIR ? resolve7(process.env.PRODUCER_RENDERS_DIR, "..") : resolve7(dirname12(fileURLToPath3(import.meta.url)), "../..");
14547
- return join30(producerRoot, ".debug");
14603
+ return join31(producerRoot, ".debug");
14548
14604
  }
14549
14605
  async function executeRenderJob(job, projectDir, outputPath, progressSink, abortSignal, assertRenderActive) {
14550
14606
  validateHlsRenderConfig(job.config);
@@ -14553,10 +14609,10 @@ async function executeRenderJob(job, projectDir, outputPath, progressSink, abort
14553
14609
  const debugDir = resolveRenderDebugDir();
14554
14610
  const outputDir = dirname12(outputPath);
14555
14611
  if (!existsSync21(outputDir)) mkdirSync10(outputDir, { recursive: true });
14556
- const workDir = job.config.debug ? join30(debugDir, job.id) : createRenderWorkDir(resolveRenderWorkDirPrefix(outputPath, job.id), outputDir);
14612
+ const workDir = job.config.debug ? join31(debugDir, job.id) : createRenderWorkDir(resolveRenderWorkDirPrefix(outputPath, job.id), outputDir);
14557
14613
  const pipelineStart = Date.now();
14558
14614
  const baseLog = job.config.logger ?? defaultLogger;
14559
- const logPath = job.config.debug ? join30(workDir, "render.log") : null;
14615
+ const logPath = job.config.debug ? join31(workDir, "render.log") : null;
14560
14616
  const execution = new RenderExecutionContext({
14561
14617
  request: { renderJobId: job.id, projectDir, outputPath },
14562
14618
  logger: logPath ? createRenderFileLogger(logPath, baseLog) : baseLog,
@@ -14587,6 +14643,15 @@ async function executeRenderJob(job, projectDir, outputPath, progressSink, abort
14587
14643
  await execution.dispose();
14588
14644
  }
14589
14645
  }
14646
+ function loadResumeKeyOrWarn(resume, log) {
14647
+ const key = segmentManifestKey();
14648
+ if (resume && !key) {
14649
+ log.warn(
14650
+ "[Render] --resume: no preview token could be read or created, so every segment will be captured again"
14651
+ );
14652
+ }
14653
+ return key;
14654
+ }
14590
14655
  async function executeRenderPipeline(input) {
14591
14656
  const {
14592
14657
  job,
@@ -14624,7 +14689,7 @@ async function executeRenderPipeline(input) {
14624
14689
  imageDecodeFailures: 0
14625
14690
  };
14626
14691
  let hdrPerf;
14627
- const perfOutputPath = join30(workDir, "perf-summary.json");
14692
+ const perfOutputPath = join31(workDir, "perf-summary.json");
14628
14693
  const cfg = { ...job.config.producerConfig ?? resolveConfig() };
14629
14694
  const observability = new RenderObservabilityRecorder({
14630
14695
  pipelineStartMs: pipelineStart,
@@ -14729,7 +14794,7 @@ async function executeRenderPipeline(input) {
14729
14794
  requestedWorkers: job.config.workers ?? "auto"
14730
14795
  });
14731
14796
  const entryFile = job.config.entryFile || "index.html";
14732
- const htmlPath = join30(projectDir, entryFile);
14797
+ const htmlPath = join31(projectDir, entryFile);
14733
14798
  if (!existsSync21(htmlPath)) {
14734
14799
  throw new Error(`Entry file not found: ${htmlPath}`);
14735
14800
  }
@@ -14826,7 +14891,7 @@ async function executeRenderPipeline(input) {
14826
14891
  const largerThanCanvas = await oversizedVideos(
14827
14892
  composition.videos,
14828
14893
  projectDir,
14829
- join30(workDir, "compiled"),
14894
+ join31(workDir, "compiled"),
14830
14895
  { width: outputWidth, height: outputHeight }
14831
14896
  );
14832
14897
  const probeResult = await observeRenderStage(
@@ -14923,7 +14988,7 @@ async function executeRenderPipeline(input) {
14923
14988
  canvas: { width, height },
14924
14989
  page: probeSession.page,
14925
14990
  projectDir,
14926
- compiledDir: join30(workDir, "compiled")
14991
+ compiledDir: join31(workDir, "compiled")
14927
14992
  });
14928
14993
  if (videoLayerPlan.videoId === void 0) {
14929
14994
  log.info(`[Render] Video layer passthrough off: ${videoLayerPlan.reason}`);
@@ -14941,7 +15006,7 @@ async function executeRenderPipeline(input) {
14941
15006
  updateJobStatus(job, "preprocessing", "Extracting video frames", 10, onProgress, {
14942
15007
  code: "extract_video"
14943
15008
  });
14944
- const compiledDir = join30(workDir, "compiled");
15009
+ const compiledDir = join31(workDir, "compiled");
14945
15010
  const segmentsCapture = (layeredOrEffectRoute) => shouldSegmentCapture({
14946
15011
  env: process.env,
14947
15012
  durationSeconds: probeResult.duration,
@@ -15077,7 +15142,7 @@ async function executeRenderPipeline(input) {
15077
15142
  try {
15078
15143
  fileServer = await createFileServer({
15079
15144
  projectDir,
15080
- compiledDir: join30(workDir, "compiled"),
15145
+ compiledDir: join31(workDir, "compiled"),
15081
15146
  port: 0,
15082
15147
  preHeadScripts: [VIRTUAL_TIME_SHIM],
15083
15148
  fps: job.config.fps,
@@ -15097,7 +15162,7 @@ async function executeRenderPipeline(input) {
15097
15162
  if (!activeFileServer) {
15098
15163
  throw new Error("File server failed to initialize before frame capture");
15099
15164
  }
15100
- const framesDir = join30(workDir, "captured-frames");
15165
+ const framesDir = join31(workDir, "captured-frames");
15101
15166
  if (!existsSync21(framesDir)) mkdirSync10(framesDir, { recursive: true });
15102
15167
  updateJobStatus(job, "rendering", "Checking browser GPU", 25, onProgress, {
15103
15168
  code: "start_browsers"
@@ -15678,7 +15743,7 @@ async function executeRenderPipeline(input) {
15678
15743
  hls: ".mp4"
15679
15744
  };
15680
15745
  const videoExt = FORMAT_EXT[outputFormat] ?? ".mp4";
15681
- const videoOnlyPath = join30(workDir, `video-only${videoExt}`);
15746
+ const videoOnlyPath = join31(workDir, `video-only${videoExt}`);
15682
15747
  let usePageSideCompositingForTransitions = (cfg.enablePageSideCompositing || isGif) && compiled.hasShaderTransitions && !hasHdrContent && outputSupportsPageSideShaderCompositing(outputFormat);
15683
15748
  if (usePageSideCompositingForTransitions) {
15684
15749
  activeFileServer.addPreHeadScript(HF_PAGE_SIDE_COMPOSITING_STUB);
@@ -15995,16 +16060,19 @@ async function executeRenderPipeline(input) {
15995
16060
  pageMotionBlur: job.config.pageMotionBlur,
15996
16061
  captureQuality: captureOptions.quality
15997
16062
  });
15998
- const segmentDir = segmentDirFor(join30(projectDir, "renders"), segmentPlanHash);
16063
+ const segmentDir = segmentDirFor(join31(projectDir, "renders"), segmentPlanHash);
16064
+ const manifestKey = loadResumeKeyOrWarn(job.config.resumeSegments === true, log);
15999
16065
  let completedSegments = /* @__PURE__ */ new Set();
16000
16066
  if (job.config.resumeSegments === true) {
16001
16067
  const existing = readSegmentManifest(segmentDir);
16002
16068
  if (existing) {
16003
- completedSegments = await validateCompletedSegments(
16004
- existing,
16005
- segmentPlanHash,
16006
- (path) => probeSegmentFrameCount(path, extractMediaMetadata)
16007
- );
16069
+ completedSegments = await validateCompletedSegments(existing, {
16070
+ expectedHash: segmentPlanHash,
16071
+ segmentDir,
16072
+ plan: planSegments(totalFrames, segmentFrames),
16073
+ key: manifestKey,
16074
+ probeFrames: (path) => probeSegmentFrameCount(path, extractMediaMetadata)
16075
+ });
16008
16076
  log.info(`[Render] resuming: ${completedSegments.size} segments complete`, {
16009
16077
  segmentDir
16010
16078
  });
@@ -16078,7 +16146,7 @@ async function executeRenderPipeline(input) {
16078
16146
  ...segmentManifest.completed.filter((e) => e.index !== entry.index),
16079
16147
  { ...entry, completedAt: (/* @__PURE__ */ new Date()).toISOString() }
16080
16148
  ];
16081
- writeSegmentManifest(segmentDir, segmentManifest);
16149
+ writeSegmentManifest(segmentDir, segmentManifest, manifestKey);
16082
16150
  },
16083
16151
  updateCaptureObservability
16084
16152
  })
@@ -16621,7 +16689,7 @@ async function executeRenderPipeline(input) {
16621
16689
  }
16622
16690
  if (job.config.debug) {
16623
16691
  if (!isPngSequence && !isHls && existsSync21(stagedOutputPath)) {
16624
- const debugOutput = join30(workDir, `output${videoExt}`);
16692
+ const debugOutput = join31(workDir, `output${videoExt}`);
16625
16693
  copyFileSync3(stagedOutputPath, debugOutput);
16626
16694
  }
16627
16695
  }
@@ -16736,13 +16804,13 @@ async function executeRenderPipeline(input) {
16736
16804
 
16737
16805
  // ../producer/src/services/distributed/renderSpan.ts
16738
16806
  import { mkdirSync as mkdirSync18, mkdtempSync, readFileSync as readFileSync13, rmSync as rmSync16 } from "fs";
16739
- import { join as join44 } from "path";
16807
+ import { join as join45 } from "path";
16740
16808
  import { tmpdir as tmpdir5 } from "os";
16741
16809
 
16742
16810
  // ../producer/src/services/distributed/mp4Stitch.ts
16743
- import { createReadStream as createReadStream3, createWriteStream, mkdirSync as mkdirSync11, rmSync as rmSync11 } from "fs";
16811
+ import { createReadStream as createReadStream4, createWriteStream, mkdirSync as mkdirSync11, rmSync as rmSync11 } from "fs";
16744
16812
  import { open } from "fs/promises";
16745
- import { basename as basename7, dirname as dirname13, join as join31 } from "path";
16813
+ import { basename as basename7, dirname as dirname13, join as join32 } from "path";
16746
16814
  import { finished, pipeline } from "stream/promises";
16747
16815
  function boxAt(src, off, at, limit) {
16748
16816
  let size = src.readUInt32BE(off);
@@ -17094,7 +17162,7 @@ function fileRange(path) {
17094
17162
  }
17095
17163
  async function copyPayload(path, layout, index, out) {
17096
17164
  const { payloadStart, payloadEnd } = layout;
17097
- const payload = createReadStream3(path, { start: payloadStart, end: payloadEnd - 1 });
17165
+ const payload = createReadStream4(path, { start: payloadStart, end: payloadEnd - 1 });
17098
17166
  await pipeline(payload, out, { end: false });
17099
17167
  if (payload.bytesRead !== payloadEnd - payloadStart) {
17100
17168
  throw new Error(
@@ -17108,13 +17176,13 @@ async function writeStitchedMp4(chunkPaths, outputPath, audioPath) {
17108
17176
  const header = audioPath ? buildStitchedHeader(layouts.slice(1), layouts[0]) : buildStitchedHeader(layouts);
17109
17177
  mkdirSync11(dirname13(outputPath), { recursive: true });
17110
17178
  const workDir = createStagingDir(dirname13(outputPath), `${basename7(outputPath)}.stitch-`);
17111
- const out = createWriteStream(join31(workDir, "out.mp4"));
17179
+ const out = createWriteStream(join32(workDir, "out.mp4"));
17112
17180
  try {
17113
17181
  out.write(header);
17114
17182
  for (const [i, path] of sourcePaths.entries()) await copyPayload(path, layouts[i], i, out);
17115
17183
  out.end();
17116
17184
  await finished(out);
17117
- renameWithRetry(join31(workDir, "out.mp4"), outputPath);
17185
+ renameWithRetry(join32(workDir, "out.mp4"), outputPath);
17118
17186
  } finally {
17119
17187
  out.destroy();
17120
17188
  rmSync11(workDir, { recursive: true, force: true });
@@ -17131,18 +17199,18 @@ import {
17131
17199
  rmSync as rmSync12,
17132
17200
  writeFileSync as writeFileSync9
17133
17201
  } from "fs";
17134
- import { extname as extname6, isAbsolute as isAbsolute3, join as join39, relative as relative7, sep as sep4 } from "path";
17202
+ import { extname as extname6, isAbsolute as isAbsolute3, join as join40, relative as relative7, sep as sep4 } from "path";
17135
17203
 
17136
17204
  // ../producer/src/services/distributed/planFrameCost.ts
17137
- import { join as join34 } from "path";
17205
+ import { join as join35 } from "path";
17138
17206
 
17139
17207
  // ../producer/src/services/distributed/chunkFrames.ts
17140
17208
  import { existsSync as existsSync23, readdirSync as readdirSync7 } from "fs";
17141
- import { extname as extname4, join as join33 } from "path";
17209
+ import { extname as extname4, join as join34 } from "path";
17142
17210
 
17143
17211
  // ../producer/src/services/distributed/shared.ts
17144
17212
  import { execFile as execFileCallback } from "child_process";
17145
- import { dirname as dirname14, join as join32 } from "path";
17213
+ import { dirname as dirname14, join as join33 } from "path";
17146
17214
  import { existsSync as existsSync22, readFileSync as readFileSync8 } from "fs";
17147
17215
  import { fileURLToPath as fileURLToPath4 } from "url";
17148
17216
  import { promisify as promisify2 } from "util";
@@ -17154,7 +17222,7 @@ function isPlanAudioArtifactPath(path) {
17154
17222
  }
17155
17223
  function resolvePlanAudioPath(planDir) {
17156
17224
  for (const name of [PLAN_AUDIO_RELATIVE_PATH, PLAN_AUDIO_LEGACY_RELATIVE_PATH]) {
17157
- const candidate = join32(planDir, name);
17225
+ const candidate = join33(planDir, name);
17158
17226
  if (existsSync22(candidate)) return candidate;
17159
17227
  }
17160
17228
  return null;
@@ -17419,7 +17487,7 @@ function readProducerVersion() {
17419
17487
  const startDir = dirname14(fileURLToPath4(import.meta.url));
17420
17488
  let current = startDir;
17421
17489
  for (let i = 0; i < 10; i++) {
17422
- const candidate = join32(current, "package.json");
17490
+ const candidate = join33(current, "package.json");
17423
17491
  if (existsSync22(candidate)) {
17424
17492
  try {
17425
17493
  const pkg = JSON.parse(readFileSync8(candidate, "utf-8"));
@@ -17474,7 +17542,7 @@ function frameNumberFromFileName(name) {
17474
17542
  function rebuildExtractedFramesFromPlanDir(planDir, videos, indexMode = "dense-v1") {
17475
17543
  const result = [];
17476
17544
  for (const v of videos) {
17477
- const outputDir = join33(planDir, "video-frames", mediaIdPathSegment(v.videoId));
17545
+ const outputDir = join34(planDir, "video-frames", mediaIdPathSegment(v.videoId));
17478
17546
  if (!existsSync23(outputDir)) {
17479
17547
  throw new Error(
17480
17548
  `[renderChunk] planDir missing extracted video frames for ${JSON.stringify(v.videoId)}: ${outputDir} not present. plan() should have written frames here; the planDir is malformed.`
@@ -17493,7 +17561,7 @@ function rebuildExtractedFramesFromPlanDir(planDir, videos, indexMode = "dense-v
17493
17561
  if (!frameName) continue;
17494
17562
  const frameNumber = indexMode === "sparse-v2" ? frameNumberFromFileName(frameName) : null;
17495
17563
  const frameIndex = frameNumber === null ? i : frameNumber - 1;
17496
- framePaths.set(frameIndex, join33(outputDir, frameName));
17564
+ framePaths.set(frameIndex, join34(outputDir, frameName));
17497
17565
  }
17498
17566
  result.push({
17499
17567
  videoId: v.videoId,
@@ -17573,7 +17641,7 @@ async function extractDeferredVideoFramesForChunk(input) {
17573
17641
  sourceOf: (video) => {
17574
17642
  const range = planned.get(video.videoId).deferredRange;
17575
17643
  const remoteUrl = remoteSources[range.sourcePath];
17576
- const sourcePath = remoteUrl ?? join33(input.planDir, ...range.sourcePath.split("/"));
17644
+ const sourcePath = remoteUrl ?? join34(input.planDir, ...range.sourcePath.split("/"));
17577
17645
  if (remoteUrl === void 0 && !existsSync23(sourcePath)) {
17578
17646
  throw new RenderChunkValidationError(
17579
17647
  MISSING_PLAN_ARTIFACT,
@@ -17604,12 +17672,12 @@ async function measurePlanSecondsPerFrame(input) {
17604
17672
  planVideos,
17605
17673
  frames: sampled,
17606
17674
  fps: fpsRatio,
17607
- outputRoot: join34(workDir, "frame-cost-video-frames"),
17675
+ outputRoot: join35(workDir, "frame-cost-video-frames"),
17608
17676
  cfg: input.cfg
17609
17677
  })
17610
17678
  ];
17611
17679
  const lookup = extracted.length > 0 ? createFrameLookupTable(planVideos.videos, extracted, resolveRenderFpsConfig(fpsRatio).value) : null;
17612
- const compiledDir = join34(planDir, "compiled");
17680
+ const compiledDir = join35(planDir, "compiled");
17613
17681
  const fileServer = await createFileServer({
17614
17682
  projectDir: compiledDir,
17615
17683
  compiledDir,
@@ -17621,7 +17689,7 @@ async function measurePlanSecondsPerFrame(input) {
17621
17689
  try {
17622
17690
  session = await createCaptureSession(
17623
17691
  fileServer.url,
17624
- join34(workDir, "frame-cost"),
17692
+ join35(workDir, "frame-cost"),
17625
17693
  buildChunkCaptureOptions({
17626
17694
  dimensions: { ...input, fpsNum: fps, fpsDen: 1 },
17627
17695
  encoder: input,
@@ -17717,21 +17785,21 @@ function buildWeightedChunkSlices(weights, chunkCount, minFrames, maxFrames) {
17717
17785
  }
17718
17786
 
17719
17787
  // ../producer/src/services/render/planReferenceBackground.ts
17720
- import { join as join35 } from "path";
17788
+ import { join as join36 } from "path";
17721
17789
  async function readPlanReferenceBackground(input) {
17722
17790
  let server;
17723
17791
  let session;
17724
17792
  try {
17725
17793
  server = await createFileServer({
17726
17794
  projectDir: input.projectDir,
17727
- compiledDir: join35(input.workDir, "compiled"),
17795
+ compiledDir: join36(input.workDir, "compiled"),
17728
17796
  port: 0,
17729
17797
  preHeadScripts: [VIRTUAL_TIME_SHIM],
17730
17798
  fps: input.options.fps
17731
17799
  });
17732
17800
  session = await createCaptureSession(
17733
17801
  server.url,
17734
- join35(input.workDir, "reference"),
17802
+ join36(input.workDir, "reference"),
17735
17803
  {
17736
17804
  ...input.options,
17737
17805
  requiresWebGpu: false
@@ -17768,7 +17836,7 @@ async function readPlanReferenceBackground(input) {
17768
17836
 
17769
17837
  // ../producer/src/services/render/stages/freezePlan.ts
17770
17838
  import { existsSync as existsSync24, mkdirSync as mkdirSync12, readFileSync as readFileSync9, readdirSync as readdirSync8, writeFileSync as writeFileSync7 } from "fs";
17771
- import { join as join36, relative as relative5, resolve as resolve8 } from "path";
17839
+ import { join as join37, relative as relative5, resolve as resolve8 } from "path";
17772
17840
 
17773
17841
  // ../producer/src/services/distributed/planProtocol.ts
17774
17842
  var PLAN_SCHEMA_VERSION = 1;
@@ -17863,7 +17931,7 @@ function readPlanProtocolV1(planJson, capabilities = DISTRIBUTED_RENDER_CAPABILI
17863
17931
 
17864
17932
  // ../producer/src/services/render/stages/planHash.ts
17865
17933
  import { createHash as createHash6 } from "crypto";
17866
- import { closeSync as closeSync4, createReadStream as createReadStream4, openSync as openSync4, readSync as readSync4 } from "fs";
17934
+ import { closeSync as closeSync4, createReadStream as createReadStream5, openSync as openSync4, readSync as readSync4 } from "fs";
17867
17935
  var PLAN_HASH_SCHEMA_PREFIX = "hyperframes-plan-hash-v1\0";
17868
17936
  var FIELD_DELIMITER = Buffer.from([0]);
17869
17937
  function computePlanHash(input) {
@@ -17935,7 +18003,7 @@ function sha256File(path) {
17935
18003
  }
17936
18004
  async function sha256FileAsync(path) {
17937
18005
  const hash = createHash6("sha256");
17938
- for await (const chunk of createReadStream4(path, { highWaterMark: 1024 * 1024 })) {
18006
+ for await (const chunk of createReadStream5(path, { highWaterMark: 1024 * 1024 })) {
17939
18007
  hash.update(chunk);
17940
18008
  }
17941
18009
  return hash.digest("hex");
@@ -17982,7 +18050,7 @@ function listPlanFiles(planDir) {
17982
18050
  function walk(dir) {
17983
18051
  const entries = readdirSync8(dir, { withFileTypes: true });
17984
18052
  for (const entry of entries) {
17985
- const full = join36(dir, entry.name);
18053
+ const full = join37(dir, entry.name);
17986
18054
  if (entry.isDirectory()) {
17987
18055
  walk(full);
17988
18056
  } else if (entry.isFile()) {
@@ -18023,15 +18091,15 @@ var PLAN_REMOTE_FILES_RELATIVE_PATH = "meta/remote-files.json";
18023
18091
  function writePlanRemoteFiles(planDir, files) {
18024
18092
  if (files.length === 0) return;
18025
18093
  const sorted = [...files].sort((a, b) => a.path < b.path ? -1 : 1);
18026
- writeFileSync7(join36(planDir, PLAN_REMOTE_FILES_RELATIVE_PATH), JSON.stringify(sorted), "utf-8");
18094
+ writeFileSync7(join37(planDir, PLAN_REMOTE_FILES_RELATIVE_PATH), JSON.stringify(sorted), "utf-8");
18027
18095
  }
18028
18096
  function readPlanRemoteFiles(planDir) {
18029
- const path = join36(planDir, PLAN_REMOTE_FILES_RELATIVE_PATH);
18097
+ const path = join37(planDir, PLAN_REMOTE_FILES_RELATIVE_PATH);
18030
18098
  return existsSync24(path) ? JSON.parse(readFileSync9(path, "utf-8")) : [];
18031
18099
  }
18032
18100
  function recomputePlanHashFromPlanDir(planDir, digests) {
18033
- const planJsonPath = join36(planDir, "plan.json");
18034
- const encoderJsonPath = join36(planDir, "meta", "encoder.json");
18101
+ const planJsonPath = join37(planDir, "plan.json");
18102
+ const encoderJsonPath = join37(planDir, "meta", "encoder.json");
18035
18103
  if (!existsSync24(planJsonPath)) {
18036
18104
  throw new Error(`[freezePlan] plan.json missing: ${planJsonPath}`);
18037
18105
  }
@@ -18068,18 +18136,18 @@ async function freezePlan(input) {
18068
18136
  if (!existsSync24(planDir)) {
18069
18137
  throw new Error(`[freezePlan] planDir does not exist: ${planDir}`);
18070
18138
  }
18071
- const metaDir = join36(planDir, "meta");
18139
+ const metaDir = join37(planDir, "meta");
18072
18140
  if (!existsSync24(metaDir)) mkdirSync12(metaDir, { recursive: true });
18073
18141
  writeFileSync7(
18074
- join36(metaDir, "composition.json"),
18142
+ join37(metaDir, "composition.json"),
18075
18143
  `${JSON.stringify(composition, null, 2)}
18076
18144
  `,
18077
18145
  "utf-8"
18078
18146
  );
18079
18147
  const encoderForCanonical = stripUndefined(encoder);
18080
18148
  const encoderConfigCanonicalJson = canonicalJsonStringify(encoderForCanonical);
18081
- writeFileSync7(join36(metaDir, "encoder.json"), encoderConfigCanonicalJson, "utf-8");
18082
- writeFileSync7(join36(metaDir, "chunks.json"), `${JSON.stringify(chunks, null, 2)}
18149
+ writeFileSync7(join37(metaDir, "encoder.json"), encoderConfigCanonicalJson, "utf-8");
18150
+ writeFileSync7(join37(metaDir, "chunks.json"), `${JSON.stringify(chunks, null, 2)}
18083
18151
  `, "utf-8");
18084
18152
  const { compositionHtml, assets } = collectPlanAssetShas(planDir, digests);
18085
18153
  const planHash = computePlanHash({
@@ -18104,7 +18172,7 @@ async function freezePlan(input) {
18104
18172
  duration: durationSeconds,
18105
18173
  hasAudio
18106
18174
  };
18107
- const planJsonPath = join36(planDir, "plan.json");
18175
+ const planJsonPath = join37(planDir, "plan.json");
18108
18176
  writeFileSync7(planJsonPath, `${JSON.stringify(planJson, null, 2)}
18109
18177
  `, "utf-8");
18110
18178
  return { planJsonPath, planHash };
@@ -18148,7 +18216,7 @@ function applyRuntimeEnvSnapshot(snapshot, env = process.env) {
18148
18216
  // ../producer/src/services/distributed/chunkAudio.ts
18149
18217
  import { closeSync as closeSync5, existsSync as existsSync25, ftruncateSync, mkdirSync as mkdirSync13, openSync as openSync5, readFileSync as readFileSync10 } from "fs";
18150
18218
  import { writeFileSync as writeFileSync8, writeSync } from "fs";
18151
- import { join as join37 } from "path";
18219
+ import { join as join38 } from "path";
18152
18220
  function audioCutForChunk(grid, chunks, index, fps) {
18153
18221
  const firstPacketAt = (frame) => Math.min(
18154
18222
  grid.packetCount,
@@ -18235,7 +18303,7 @@ async function writeChunkAudioSlices(input) {
18235
18303
  });
18236
18304
  const bytes = readFileSync10(input.audioPath);
18237
18305
  const layout = { sizeBytes: bytes.length, payloadStart, payloadEnd, partStarts: {} };
18238
- mkdirSync13(join37(input.planDir, SLICE_DIR), { recursive: true });
18306
+ mkdirSync13(join38(input.planDir, SLICE_DIR), { recursive: true });
18239
18307
  input.chunks.forEach((_, index) => {
18240
18308
  const cut = audioCutForChunk(grid, input.chunks, index, input.fps);
18241
18309
  if (!cut) return;
@@ -18243,17 +18311,17 @@ async function writeChunkAudioSlices(input) {
18243
18311
  const start = offsets[cut.firstPacket];
18244
18312
  layout.partStarts[index] = start;
18245
18313
  const end = offsets[last] + track.sizes[last];
18246
- writeFileSync8(join37(input.planDir, chunkAudioSlicePath(index)), bytes.subarray(start, end));
18314
+ writeFileSync8(join38(input.planDir, chunkAudioSlicePath(index)), bytes.subarray(start, end));
18247
18315
  });
18248
18316
  const frame = [bytes.subarray(0, payloadStart), bytes.subarray(payloadEnd)];
18249
- writeFileSync8(join37(input.planDir, SLICE_FRAME), Buffer.concat(frame));
18250
- writeFileSync8(join37(input.planDir, SLICE_LAYOUT), JSON.stringify(layout));
18317
+ writeFileSync8(join38(input.planDir, SLICE_FRAME), Buffer.concat(frame));
18318
+ writeFileSync8(join38(input.planDir, SLICE_LAYOUT), JSON.stringify(layout));
18251
18319
  }
18252
18320
  function chunkAudioSource(planDir, chunkIndex, scratchPath) {
18253
- const layoutPath = join37(planDir, SLICE_LAYOUT);
18321
+ const layoutPath = join38(planDir, SLICE_LAYOUT);
18254
18322
  if (!existsSync25(layoutPath)) return resolvePlanAudioPath(planDir);
18255
18323
  const layout = JSON.parse(readFileSync10(layoutPath, "utf-8"));
18256
- const frame = readFileSync10(join37(planDir, SLICE_FRAME));
18324
+ const frame = readFileSync10(join38(planDir, SLICE_FRAME));
18257
18325
  const fd = openSync5(scratchPath, "w");
18258
18326
  try {
18259
18327
  writeSync(fd, frame, 0, layout.payloadStart, 0);
@@ -18266,7 +18334,7 @@ function chunkAudioSource(planDir, chunkIndex, scratchPath) {
18266
18334
  );
18267
18335
  const start = layout.partStarts[chunkIndex];
18268
18336
  if (start !== void 0) {
18269
- const part = readFileSync10(join37(planDir, chunkAudioSlicePath(chunkIndex)));
18337
+ const part = readFileSync10(join38(planDir, chunkAudioSlicePath(chunkIndex)));
18270
18338
  writeSync(fd, part, 0, part.length, start);
18271
18339
  }
18272
18340
  ftruncateSync(fd, layout.sizeBytes);
@@ -18321,8 +18389,8 @@ async function muxChunkWithAudio(input) {
18321
18389
 
18322
18390
  // ../producer/src/services/distributed/planSize.ts
18323
18391
  import { createHash as createHash7 } from "crypto";
18324
- import { lstatSync as lstatSync3, readdirSync as readdirSync9 } from "fs";
18325
- import { extname as extname5, join as join38, relative as relative6 } from "path";
18392
+ import { lstatSync as lstatSync4, readdirSync as readdirSync9 } from "fs";
18393
+ import { extname as extname5, join as join39, relative as relative6 } from "path";
18326
18394
  var MAX_TOP_COMPONENTS = 10;
18327
18395
  var SOURCE_MEDIA_EXTENSIONS = /* @__PURE__ */ new Set([
18328
18396
  ".aac",
@@ -18405,7 +18473,7 @@ function addCategoryBytes(result, category, filePath, sizeBytes) {
18405
18473
  function recordFile(result, components, rootDir, rootKind, filePath) {
18406
18474
  let sizeBytes;
18407
18475
  try {
18408
- const stat = lstatSync3(filePath);
18476
+ const stat = lstatSync4(filePath);
18409
18477
  if (!stat.isFile()) return;
18410
18478
  sizeBytes = stat.size;
18411
18479
  } catch {
@@ -18434,7 +18502,7 @@ function walkRegularFiles(dir, visit) {
18434
18502
  return;
18435
18503
  }
18436
18504
  for (const entry of entries) {
18437
- const full = join38(dir, entry.name);
18505
+ const full = join39(dir, entry.name);
18438
18506
  if (entry.isDirectory()) {
18439
18507
  walkRegularFiles(full, visit);
18440
18508
  } else if (entry.isFile()) {
@@ -18650,13 +18718,13 @@ function assertPositiveInteger2(name, value) {
18650
18718
  }
18651
18719
  var FREEZE_OWNED_PLAN_FILES = [
18652
18720
  "plan.json",
18653
- join39("meta", "composition.json"),
18654
- join39("meta", "encoder.json"),
18655
- join39("meta", "chunks.json")
18721
+ join40("meta", "composition.json"),
18722
+ join40("meta", "encoder.json"),
18723
+ join40("meta", "chunks.json")
18656
18724
  ];
18657
18725
  function removeFreezeOwnedPlanFiles(planDir) {
18658
18726
  for (const relativePath of FREEZE_OWNED_PLAN_FILES) {
18659
- rmSync12(join39(planDir, relativePath), { force: true });
18727
+ rmSync12(join40(planDir, relativePath), { force: true });
18660
18728
  }
18661
18729
  }
18662
18730
  function buildChunkSlices(totalFrames, chunkCount, effectiveChunkSize) {
@@ -18814,19 +18882,19 @@ function createVideoSourceShipper(input) {
18814
18882
  const known = shipped.get(srcPath);
18815
18883
  if (known) return known;
18816
18884
  const stagedRel = pathInside(input.workVideoFramesDir, srcPath);
18817
- const current = stagedRel === null ? srcPath : join39(input.planDir, "video-frames", stagedRel);
18885
+ const current = stagedRel === null ? srcPath : join40(input.planDir, "video-frames", stagedRel);
18818
18886
  let result = null;
18819
18887
  for (const root of stagedRel === null ? [input.workCompiledDir, input.projectDir] : []) {
18820
18888
  const rel = pathInside(root, srcPath);
18821
- if (rel !== null && (existsSync26(join39(input.planDir, "compiled", rel)) || input.isRemote(srcPath))) {
18889
+ if (rel !== null && (existsSync26(join40(input.planDir, "compiled", rel)) || input.isRemote(srcPath))) {
18822
18890
  result = ["compiled", ...rel.split(sep4)].join("/");
18823
18891
  break;
18824
18892
  }
18825
18893
  }
18826
18894
  if (result === null) {
18827
18895
  result = `video-sources/${shipped.size}${extname6(current)}`;
18828
- const destination = join39(input.planDir, ...result.split("/"));
18829
- mkdirSync14(join39(input.planDir, "video-sources"), { recursive: true });
18896
+ const destination = join40(input.planDir, ...result.split("/"));
18897
+ mkdirSync14(join40(input.planDir, "video-sources"), { recursive: true });
18830
18898
  try {
18831
18899
  linkSync(current, destination);
18832
18900
  } catch {
@@ -18880,14 +18948,14 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
18880
18948
  includeOutsideScripts: options.includeOutsideScripts === true
18881
18949
  });
18882
18950
  const entryFile = config.entryFile ?? "index.html";
18883
- const htmlPath = join39(projectDir, entryFile);
18951
+ const htmlPath = join40(projectDir, entryFile);
18884
18952
  if (!existsSync26(htmlPath)) {
18885
18953
  throw new Error(`[plan] entry file not found: ${htmlPath}`);
18886
18954
  }
18887
- const workDir = join39(planDir, ".plan-work");
18955
+ const workDir = join40(planDir, ".plan-work");
18888
18956
  rmSync12(workDir, { recursive: true, force: true });
18889
18957
  mkdirSync14(workDir, { recursive: true });
18890
- const compiledDir = join39(workDir, "compiled");
18958
+ const compiledDir = join40(workDir, "compiled");
18891
18959
  mkdirSync14(compiledDir, { recursive: true });
18892
18960
  let stageStarted = Date.now();
18893
18961
  cpSync2(projectDir, compiledDir, {
@@ -18907,10 +18975,10 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
18907
18975
  }
18908
18976
  });
18909
18977
  logPlanStage(log, "copy", stageStarted);
18910
- const finalCompiledDir = join39(planDir, "compiled");
18978
+ const finalCompiledDir = join40(planDir, "compiled");
18911
18979
  const needsAlpha = outputNeedsAlpha(config.format);
18912
18980
  const remoteFiles = Object.entries(options.remoteFiles ?? {});
18913
- const remoteLocalPath = (rel) => join39(projectDir, ...rel.split("/"));
18981
+ const remoteLocalPath = (rel) => join40(projectDir, ...rel.split("/"));
18914
18982
  for (const [, file] of remoteFiles) {
18915
18983
  declareContentAddressedUrl(file.url, file.sha256);
18916
18984
  if (file.probeFactsUrl) declareProbeFactsUrl(file.url, file.probeFactsUrl);
@@ -19007,7 +19075,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
19007
19075
  if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
19008
19076
  if (probeResult.probeSession) {
19009
19077
  try {
19010
- const { closeCaptureSession: closeCaptureSession2 } = await import("./src-COKNEXLI.js");
19078
+ const { closeCaptureSession: closeCaptureSession2 } = await import("./src-WKQLHMUG.js");
19011
19079
  await closeCaptureSession2(probeResult.probeSession);
19012
19080
  } catch (err) {
19013
19081
  log.warn("[plan] probe session close failed", {
@@ -19115,10 +19183,10 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
19115
19183
  let stageStarted = Date.now();
19116
19184
  const extractResult = await extractPlanVideos(c, options.deferVideoExtraction);
19117
19185
  logPlanStage(log, "extract", stageStarted);
19118
- const stagedVideoFrames = join39(compiledDir, "__hyperframes_video_frames");
19119
- const videoFramesDst = join39(planDir, "video-frames");
19186
+ const stagedVideoFrames = join40(compiledDir, "__hyperframes_video_frames");
19187
+ const videoFramesDst = join40(planDir, "video-frames");
19120
19188
  if (existsSync26(videoFramesDst)) rmSync12(videoFramesDst, { recursive: true, force: true });
19121
- const videoSourcesDir = join39(planDir, "video-sources");
19189
+ const videoSourcesDir = join40(planDir, "video-sources");
19122
19190
  rmSync12(videoSourcesDir, { recursive: true, force: true });
19123
19191
  if (existsSync26(stagedVideoFrames)) {
19124
19192
  renameWithRetry(stagedVideoFrames, videoFramesDst);
@@ -19155,7 +19223,7 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
19155
19223
  };
19156
19224
  })
19157
19225
  });
19158
- mkdirSync14(join39(planDir, "meta"), { recursive: true });
19226
+ mkdirSync14(join40(planDir, "meta"), { recursive: true });
19159
19227
  writePlanRemoteFiles(
19160
19228
  planDir,
19161
19229
  remoteFiles.map(([rel, { sha256, sizeBytes }]) => ({
@@ -19165,7 +19233,7 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
19165
19233
  }))
19166
19234
  );
19167
19235
  writeFileSync9(
19168
- join39(planDir, PLAN_VIDEOS_META_RELATIVE_PATH),
19236
+ join40(planDir, PLAN_VIDEOS_META_RELATIVE_PATH),
19169
19237
  JSON.stringify(planVideosJson, null, 2),
19170
19238
  "utf-8"
19171
19239
  );
@@ -19245,7 +19313,7 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
19245
19313
  if (audioResult?.audioError) {
19246
19314
  applyDistributedAudioWarningPolicy(job, audioResult.audioError, audioResult.audioFailures, log);
19247
19315
  }
19248
- const planAudioPath = join39(planDir, PLAN_AUDIO_RELATIVE_PATH);
19316
+ const planAudioPath = join40(planDir, PLAN_AUDIO_RELATIVE_PATH);
19249
19317
  if (audioResult?.hasAudio && existsSync26(audioResult.audioOutputPath)) {
19250
19318
  renameWithRetry(audioResult.audioOutputPath, planAudioPath);
19251
19319
  }
@@ -19372,22 +19440,22 @@ async function plan(projectDir, config, planDir, options = {}) {
19372
19440
  // ../producer/src/services/distributed/renderChunk.ts
19373
19441
  import { randomBytes } from "crypto";
19374
19442
  import { existsSync as existsSync29, mkdirSync as mkdirSync17, readFileSync as readFileSync12, readdirSync as readdirSync11, rmSync as rmSync15, writeFileSync as writeFileSync12 } from "fs";
19375
- import { join as join43 } from "path";
19443
+ import { join as join44 } from "path";
19376
19444
 
19377
19445
  // ../producer/src/services/distributed/planV2.ts
19378
19446
  import {
19379
19447
  copyFileSync as copyFileSync6,
19380
19448
  existsSync as existsSync28,
19381
- lstatSync as lstatSync4,
19449
+ lstatSync as lstatSync5,
19382
19450
  mkdirSync as mkdirSync16,
19383
19451
  readFileSync as readFileSync11,
19384
19452
  readdirSync as readdirSync10,
19385
19453
  rmSync as rmSync14,
19386
- statSync as statSync10,
19454
+ statSync as statSync9,
19387
19455
  writeFileSync as writeFileSync11
19388
19456
  } from "fs";
19389
19457
  import { tmpdir as tmpdir4 } from "os";
19390
- import { dirname as dirname16, isAbsolute as isAbsolute4, join as join42, relative as relative8, resolve as resolve9, sep as sep5 } from "path";
19458
+ import { dirname as dirname16, isAbsolute as isAbsolute4, join as join43, relative as relative8, resolve as resolve9, sep as sep5 } from "path";
19391
19459
 
19392
19460
  // ../producer/src/services/distributed/planV2Publisher.ts
19393
19461
  import {
@@ -19396,10 +19464,10 @@ import {
19396
19464
  linkSync as linkSync2,
19397
19465
  mkdirSync as mkdirSync15,
19398
19466
  rmSync as rmSync13,
19399
- statSync as statSync9,
19467
+ statSync as statSync8,
19400
19468
  writeFileSync as writeFileSync10
19401
19469
  } from "fs";
19402
- import { dirname as dirname15, join as join41 } from "path";
19470
+ import { dirname as dirname15, join as join42 } from "path";
19403
19471
 
19404
19472
  // ../producer/src/services/distributed/planV2Errors.ts
19405
19473
  var PLAN_V2_INTEGRITY_UNRECOVERABLE = "PLAN_V2_INTEGRITY_UNRECOVERABLE";
@@ -19414,7 +19482,7 @@ var PlanV2IntegrityError = class extends Error {
19414
19482
  };
19415
19483
 
19416
19484
  // ../producer/src/services/distributed/planV2Layout.ts
19417
- import { join as join40 } from "path";
19485
+ import { join as join41 } from "path";
19418
19486
  var SHA256_PATTERN = /^[0-9a-f]{64}$/;
19419
19487
  function assertPlanV2Sha256(value, field) {
19420
19488
  if (typeof value !== "string" || !SHA256_PATTERN.test(value)) {
@@ -19424,7 +19492,7 @@ function assertPlanV2Sha256(value, field) {
19424
19492
  }
19425
19493
  function planV2BlobPath(root, sha256) {
19426
19494
  const digest = assertPlanV2Sha256(sha256, "artifact sha256");
19427
- return join40(root, "artifacts", "sha256", digest.slice(0, 2), digest);
19495
+ return join41(root, "artifacts", "sha256", digest.slice(0, 2), digest);
19428
19496
  }
19429
19497
 
19430
19498
  // ../producer/src/services/distributed/planV2Publisher.ts
@@ -19464,7 +19532,7 @@ var LocalPlanV2ArtifactPublisher = class {
19464
19532
  }
19465
19533
  async putBlob(blob) {
19466
19534
  const digest = assertPlanV2Sha256(blob.sha256, "published blob sha256");
19467
- const sourceSize = statSync9(blob.sourcePath).size;
19535
+ const sourceSize = statSync8(blob.sourcePath).size;
19468
19536
  if (sourceSize !== blob.sizeBytes) {
19469
19537
  throw new PlanV2IntegrityError(
19470
19538
  `published blob size changed for ${digest}: expected ${blob.sizeBytes}, got ${sourceSize}`
@@ -19474,7 +19542,7 @@ var LocalPlanV2ArtifactPublisher = class {
19474
19542
  if (existsSync27(destinationPath)) return;
19475
19543
  mkdirSync15(dirname15(destinationPath), { recursive: true });
19476
19544
  const stagingDir = createStagingDir(dirname15(destinationPath), ".plan-v2-blob-");
19477
- const temporaryPath = join41(stagingDir, "blob");
19545
+ const temporaryPath = join42(stagingDir, "blob");
19478
19546
  try {
19479
19547
  try {
19480
19548
  this.#linkFile(blob.sourcePath, temporaryPath);
@@ -19495,7 +19563,7 @@ var LocalPlanV2ArtifactPublisher = class {
19495
19563
  );
19496
19564
  }
19497
19565
  }
19498
- writeFileSync10(join41(this.temporaryDir, "plan.json"), manifestBytes, "utf-8");
19566
+ writeFileSync10(join42(this.temporaryDir, "plan.json"), manifestBytes, "utf-8");
19499
19567
  renameWithRetry(this.temporaryDir, this.destinationDir);
19500
19568
  this.#committed = true;
19501
19569
  }
@@ -19540,7 +19608,7 @@ function listFiles(root) {
19540
19608
  const rootResolved = resolve9(root);
19541
19609
  function walk(dir) {
19542
19610
  for (const entry of readdirSync10(dir, { withFileTypes: true })) {
19543
- const absolutePath = join42(dir, entry.name);
19611
+ const absolutePath = join43(dir, entry.name);
19544
19612
  if (entry.isDirectory()) {
19545
19613
  walk(absolutePath);
19546
19614
  } else if (entry.isFile()) {
@@ -19559,7 +19627,7 @@ function listFiles(root) {
19559
19627
  return files.sort((a, b) => a.path.localeCompare(b.path));
19560
19628
  }
19561
19629
  function assertValidExtractionCacheCompleteSentinel(path) {
19562
- const sentinel = lstatSync4(path);
19630
+ const sentinel = lstatSync5(path);
19563
19631
  if (!sentinel.isFile() || sentinel.size !== 0) {
19564
19632
  throw new PlanV2IntegrityError(
19565
19633
  `${EXTRACTION_CACHE_COMPLETE_SENTINEL} must be a zero-byte regular file`
@@ -19567,13 +19635,13 @@ function assertValidExtractionCacheCompleteSentinel(path) {
19567
19635
  }
19568
19636
  }
19569
19637
  function validateExtractionCacheCompleteSentinels(executionPlanDir) {
19570
- const videoRoot = join42(executionPlanDir, "video-frames");
19638
+ const videoRoot = join43(executionPlanDir, "video-frames");
19571
19639
  if (!existsSync28(videoRoot)) return;
19572
19640
  for (const videoEntry of readdirSync10(videoRoot, { withFileTypes: true })) {
19573
19641
  if (!videoEntry.isDirectory()) continue;
19574
- const videoDir = join42(videoRoot, videoEntry.name);
19642
+ const videoDir = join43(videoRoot, videoEntry.name);
19575
19643
  if (readdirSync10(videoDir).includes(EXTRACTION_CACHE_COMPLETE_SENTINEL)) {
19576
- const sentinelPath = join42(videoDir, EXTRACTION_CACHE_COMPLETE_SENTINEL);
19644
+ const sentinelPath = join43(videoDir, EXTRACTION_CACHE_COMPLETE_SENTINEL);
19577
19645
  assertValidExtractionCacheCompleteSentinel(sentinelPath);
19578
19646
  }
19579
19647
  }
@@ -19620,7 +19688,7 @@ function listVideoFramePaths(executionPlanDir, videos) {
19620
19688
  if (video.deferredRange) {
19621
19689
  const framePaths2 = /* @__PURE__ */ new Map();
19622
19690
  for (let index = 0; index < video.totalFrames; index++) {
19623
- framePaths2.set(index, join42(outputDir, String(index)));
19691
+ framePaths2.set(index, join43(outputDir, String(index)));
19624
19692
  }
19625
19693
  return { ...video, outputDir, framePaths: framePaths2, ownedByLookup: false };
19626
19694
  }
@@ -19628,7 +19696,7 @@ function listVideoFramePaths(executionPlanDir, videos) {
19628
19696
  const framePaths = /* @__PURE__ */ new Map();
19629
19697
  for (const frameName of frameNames) {
19630
19698
  if (frameName === EXTRACTION_CACHE_COMPLETE_SENTINEL) {
19631
- assertValidExtractionCacheCompleteSentinel(join42(outputDir, frameName));
19699
+ assertValidExtractionCacheCompleteSentinel(join43(outputDir, frameName));
19632
19700
  continue;
19633
19701
  }
19634
19702
  const match = /(\d+)(?=\.[^.]+$)/.exec(frameName);
@@ -19647,7 +19715,7 @@ function listVideoFramePaths(executionPlanDir, videos) {
19647
19715
  `duplicate extracted frame index ${frameIndex} in ${outputDir}`
19648
19716
  );
19649
19717
  }
19650
- framePaths.set(frameIndex, join42(outputDir, frameName));
19718
+ framePaths.set(frameIndex, join43(outputDir, frameName));
19651
19719
  }
19652
19720
  return {
19653
19721
  ...video,
@@ -19668,7 +19736,7 @@ function parsePlanVideosJson2(value) {
19668
19736
  }
19669
19737
  }
19670
19738
  function materializeExtractedVideoDirectories(planDir) {
19671
- const videosPath = join42(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
19739
+ const videosPath = join43(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
19672
19740
  if (!existsSync28(videosPath)) return;
19673
19741
  const videos = parsePlanVideosJson2(readJsonFile(videosPath, PLAN_VIDEOS_META_RELATIVE_PATH));
19674
19742
  for (const video of videos.extracted) {
@@ -19702,13 +19770,13 @@ function parseChunkSlices(value) {
19702
19770
  });
19703
19771
  }
19704
19772
  function buildVideoChunkDependencies(executionPlanDir, dimensions) {
19705
- const videoRoot = join42(executionPlanDir, "video-frames");
19773
+ const videoRoot = join43(executionPlanDir, "video-frames");
19706
19774
  const hasExtractedFrames = existsSync28(videoRoot) && listFiles(videoRoot).length > 0;
19707
- const videosPath = join42(executionPlanDir, PLAN_VIDEOS_META_RELATIVE_PATH);
19775
+ const videosPath = join43(executionPlanDir, PLAN_VIDEOS_META_RELATIVE_PATH);
19708
19776
  if (!existsSync28(videosPath)) {
19709
19777
  return hasExtractedFrames ? { mode: "full-source-pack", dependencies: null } : { mode: "exact-rendered-frames", dependencies: /* @__PURE__ */ new Map() };
19710
19778
  }
19711
- const chunksPath = join42(executionPlanDir, "meta", "chunks.json");
19779
+ const chunksPath = join43(executionPlanDir, "meta", "chunks.json");
19712
19780
  const videos = readJsonFile(videosPath, PLAN_VIDEOS_META_RELATIVE_PATH);
19713
19781
  const chunks = readJsonFile(chunksPath, "meta/chunks.json");
19714
19782
  const parsedVideos = parsePlanVideosJson2(videos);
@@ -19765,7 +19833,7 @@ function writeBlob(sourcePath, destinationPath) {
19765
19833
  if (existsSync28(destinationPath)) return;
19766
19834
  mkdirSync16(dirname16(destinationPath), { recursive: true });
19767
19835
  const temporaryDir = createStagingDir(dirname16(destinationPath), ".plan-v2-blob-");
19768
- const temporaryPath = join42(temporaryDir, "blob");
19836
+ const temporaryPath = join43(temporaryDir, "blob");
19769
19837
  try {
19770
19838
  copyFileSync6(sourcePath, temporaryPath);
19771
19839
  renameWithRetry(temporaryPath, destinationPath);
@@ -19777,7 +19845,7 @@ function publishBlobFor(absolutePath, digests) {
19777
19845
  return {
19778
19846
  sourcePath: absolutePath,
19779
19847
  sha256: planFileSha256(absolutePath, digests),
19780
- sizeBytes: statSync10(absolutePath).size
19848
+ sizeBytes: statSync9(absolutePath).size
19781
19849
  };
19782
19850
  }
19783
19851
  async function putBlobs(publisher, blobs) {
@@ -19801,7 +19869,7 @@ async function putTasks(tasks) {
19801
19869
  if (failure) throw failure.reason;
19802
19870
  }
19803
19871
  function buildPlanV2Publication(executionPlanDir, digests) {
19804
- const executionPlanPath = join42(executionPlanDir, "plan.json");
19872
+ const executionPlanPath = join43(executionPlanDir, "plan.json");
19805
19873
  if (!existsSync28(executionPlanPath)) {
19806
19874
  throw new PlanV2IntegrityError(`execution plan is missing plan.json: ${executionPlanPath}`);
19807
19875
  }
@@ -19829,7 +19897,7 @@ function buildPlanV2Publication(executionPlanDir, digests) {
19829
19897
  }
19830
19898
  validateExtractionCacheCompleteSentinels(executionPlanDir);
19831
19899
  const videoDependencyPlan = buildVideoChunkDependencies(executionPlanDir, dimensions);
19832
- const encoder = readJsonFile(join42(executionPlanDir, "meta", "encoder.json"), "meta/encoder.json");
19900
+ const encoder = readJsonFile(join43(executionPlanDir, "meta", "encoder.json"), "meta/encoder.json");
19833
19901
  const files = listFiles(executionPlanDir);
19834
19902
  const chunkAudio = !isRecord3(encoder) || encoder.chunksCarryAudio !== true ? "none" : files.some((file) => chunkAudioSliceTarget(file.path) !== null) ? "sliced" : "whole";
19835
19903
  for (const file of files) {
@@ -19896,7 +19964,7 @@ function createPlanV2FromExecutionPlan(executionPlanDir, planV2Dir) {
19896
19964
  writeBlob(blob.sourcePath, planV2BlobPath(tempDir, blob.sha256));
19897
19965
  }
19898
19966
  writeFileSync11(
19899
- join42(tempDir, "plan.json"),
19967
+ join43(tempDir, "plan.json"),
19900
19968
  canonicalJsonStringify(publication.manifest),
19901
19969
  "utf-8"
19902
19970
  );
@@ -19948,7 +20016,7 @@ async function planV2WithPublisher(projectDir, config, publisher, options = {})
19948
20016
  // artifactTargets ships every compiled/ file to all chunks, so each is in the manifest.
19949
20017
  whileAudioMixes: () => putBlobs(
19950
20018
  publisher,
19951
- listFiles(join42(stagingRoot, "compiled")).map(
20019
+ listFiles(join43(stagingRoot, "compiled")).map(
19952
20020
  (file) => publishBlobFor(file.absolutePath, digests)
19953
20021
  )
19954
20022
  ),
@@ -19989,7 +20057,7 @@ function resultFromManifest(planV2Dir, manifest) {
19989
20057
  isRecord3(executionPlan) ? executionPlan[REFERENCE_BACKGROUND_FIELD] : void 0
19990
20058
  ),
19991
20059
  planDir: planV2Dir,
19992
- manifestPath: join42(planV2Dir, "plan.json"),
20060
+ manifestPath: join43(planV2Dir, "plan.json"),
19993
20061
  planProtocol: PLAN_PROTOCOL_V2,
19994
20062
  planHash: manifest.planHash,
19995
20063
  sourcePlanV1Hash: getPlanV2ExecutionPlanHash(manifest),
@@ -20125,7 +20193,7 @@ function parsePlanV2Manifest(value) {
20125
20193
  return parsed;
20126
20194
  }
20127
20195
  function readPlanV2Manifest(planV2Dir) {
20128
- const manifestPath = join42(planV2Dir, "plan.json");
20196
+ const manifestPath = join43(planV2Dir, "plan.json");
20129
20197
  if (!existsSync28(manifestPath)) {
20130
20198
  throw new PlanV2IntegrityError(`missing v2 manifest: ${manifestPath}`);
20131
20199
  }
@@ -20148,7 +20216,7 @@ function verifyBlob(planV2Dir, artifact) {
20148
20216
  if (!existsSync28(sourcePath)) {
20149
20217
  throw new PlanV2IntegrityError(`missing content-addressed artifact ${artifact.sha256}`);
20150
20218
  }
20151
- const stats = statSync10(sourcePath);
20219
+ const stats = statSync9(sourcePath);
20152
20220
  if (!stats.isFile() || stats.size !== artifact.sizeBytes) {
20153
20221
  throw new PlanV2IntegrityError(`artifact size mismatch for ${artifact.path}`);
20154
20222
  }
@@ -20174,13 +20242,13 @@ function materializePlanV2Target(planV2Dir, target, destinationDir, options = {}
20174
20242
  const tempDir = createStagingDir(dirname16(destinationDir), ".plan-v2-materialize-");
20175
20243
  try {
20176
20244
  for (const { artifact, sourcePath } of verified) {
20177
- const destinationPath = join42(tempDir, ...artifact.path.split("/"));
20245
+ const destinationPath = join43(tempDir, ...artifact.path.split("/"));
20178
20246
  mkdirSync16(dirname16(destinationPath), { recursive: true });
20179
20247
  copyFileSync6(sourcePath, destinationPath);
20180
20248
  }
20181
20249
  if (target.role === "chunk") materializeExtractedVideoDirectories(tempDir);
20182
20250
  writeFileSync11(
20183
- join42(tempDir, PLAN_V2_MATERIALIZATION_MARKER),
20251
+ join43(tempDir, PLAN_V2_MATERIALIZATION_MARKER),
20184
20252
  canonicalJsonStringify({
20185
20253
  manifest,
20186
20254
  target,
@@ -20203,7 +20271,7 @@ function materializePlanV2Target(planV2Dir, target, destinationDir, options = {}
20203
20271
  // Join the artifact's OWN name, not the current constant: a plan written
20204
20272
  // before the container change carries the legacy name, and materializing it
20205
20273
  // under the new one would point at a file that was never written.
20206
- audioPath: target.role === "assembler" ? audioArtifact ? join42(destinationDir, audioArtifact.path) : null : null
20274
+ audioPath: target.role === "assembler" ? audioArtifact ? join43(destinationDir, audioArtifact.path) : null : null
20207
20275
  };
20208
20276
  }
20209
20277
  function assertRemoteSources(remoteSources, artifacts) {
@@ -20222,7 +20290,7 @@ function validatePlanV2MaterializedTarget(planDir, expectedTarget) {
20222
20290
  return readValidatedPlanV2Materialization(planDir, expectedTarget)?.manifest ?? null;
20223
20291
  }
20224
20292
  function readValidatedPlanV2Materialization(planDir, expectedTarget) {
20225
- const markerPath = join42(planDir, PLAN_V2_MATERIALIZATION_MARKER);
20293
+ const markerPath = join43(planDir, PLAN_V2_MATERIALIZATION_MARKER);
20226
20294
  if (!existsSync28(markerPath)) return null;
20227
20295
  const marker = readJsonFile(markerPath, "materialization marker");
20228
20296
  if (!isRecord3(marker) || !isRecord3(marker.manifest) || !isRecord3(marker.target)) {
@@ -20240,8 +20308,8 @@ function readValidatedPlanV2Materialization(planDir, expectedTarget) {
20240
20308
  assertRemoteSources(remoteSources, required);
20241
20309
  for (const artifact of required) {
20242
20310
  if (Object.hasOwn(remoteSources, artifact.path)) continue;
20243
- const path = join42(planDir, ...artifact.path.split("/"));
20244
- if (!existsSync28(path) || statSync10(path).size !== artifact.sizeBytes) {
20311
+ const path = join43(planDir, ...artifact.path.split("/"));
20312
+ if (!existsSync28(path) || statSync9(path).size !== artifact.sizeBytes) {
20245
20313
  throw new PlanV2IntegrityError(
20246
20314
  `materialized artifact missing or truncated: ${artifact.path}`
20247
20315
  );
@@ -20371,7 +20439,7 @@ function hashChunkOutput(outputPath, kind) {
20371
20439
  if (kind === "file") return sha256Hex(readFileSync12(outputPath));
20372
20440
  const entries = readdirSync11(outputPath).filter((name) => /\.(png|jpg|jpeg)$/i.test(name)).sort();
20373
20441
  const lines = entries.map(
20374
- (name) => `${name}\0${sha256Hex(readFileSync12(join43(outputPath, name)))}`
20442
+ (name) => `${name}\0${sha256Hex(readFileSync12(join44(outputPath, name)))}`
20375
20443
  );
20376
20444
  return sha256Hex(lines.join("\0"));
20377
20445
  }
@@ -20388,9 +20456,9 @@ function resolveLockedVp9CpuUsed(lockedEncoder) {
20388
20456
  async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
20389
20457
  const start = Date.now();
20390
20458
  const log = defaultLogger;
20391
- const planJsonPath = join43(planDir, "plan.json");
20392
- const encoderJsonPath = join43(planDir, "meta", "encoder.json");
20393
- const chunksJsonPath = join43(planDir, "meta", "chunks.json");
20459
+ const planJsonPath = join44(planDir, "plan.json");
20460
+ const encoderJsonPath = join44(planDir, "meta", "encoder.json");
20461
+ const chunksJsonPath = join44(planDir, "meta", "chunks.json");
20394
20462
  if (!existsSync29(planJsonPath)) {
20395
20463
  throw new RenderChunkValidationError(
20396
20464
  MISSING_PLAN_ARTIFACT,
@@ -20416,7 +20484,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
20416
20484
  }
20417
20485
  const encoder = JSON.parse(readFileSync12(encoderJsonPath, "utf-8"));
20418
20486
  const chunks = JSON.parse(readFileSync12(chunksJsonPath, "utf-8"));
20419
- const videosJsonPath = join43(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
20487
+ const videosJsonPath = join44(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
20420
20488
  let planVideos = null;
20421
20489
  if (existsSync29(videosJsonPath)) {
20422
20490
  try {
@@ -20448,7 +20516,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
20448
20516
  }
20449
20517
  const range = resolveChunkFrameRange(slice, chunkIndex, options?.frameRange);
20450
20518
  const framesInChunk = range.endFrame - range.startFrame;
20451
- const compiledDir = join43(planDir, "compiled");
20519
+ const compiledDir = join44(planDir, "compiled");
20452
20520
  if (!existsSync29(compiledDir)) {
20453
20521
  throw new RenderChunkValidationError(
20454
20522
  MISSING_PLAN_ARTIFACT,
@@ -20507,7 +20575,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
20507
20575
  };
20508
20576
  const workDir = `${outputChunkPath}.work.${process.pid}.${randomBytes(4).toString("hex")}`;
20509
20577
  mkdirSync17(workDir, { recursive: true });
20510
- const framesDir = join43(workDir, "captured-frames");
20578
+ const framesDir = join44(workDir, "captured-frames");
20511
20579
  mkdirSync17(framesDir, { recursive: true });
20512
20580
  const videoFramesDir = `${workDir}.video-frames`;
20513
20581
  const chunkFrameNumbers = Array.from({ length: framesInChunk }, (_, i) => range.startFrame + i);
@@ -20532,7 +20600,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
20532
20600
  dimensions: plan2.dimensions,
20533
20601
  encoder,
20534
20602
  videoCount: planVideos?.videos.length ?? 0,
20535
- html: readFileSync12(join43(compiledDir, "index.html"), "utf-8"),
20603
+ html: readFileSync12(join44(compiledDir, "index.html"), "utf-8"),
20536
20604
  // The plan ships a deferred source only to chunks that show it; don't wait on the rest.
20537
20605
  skipReadinessVideoIds: deferredVideos.filter(
20538
20606
  (video) => !shownFrames.get(video.videoId)?.size || remoteVideoIds.has(video.videoId)
@@ -20703,7 +20771,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
20703
20771
  if (isPngSequence) {
20704
20772
  if (!existsSync29(outputChunkPath)) mkdirSync17(outputChunkPath, { recursive: true });
20705
20773
  } else {
20706
- const outDir = join43(outputChunkPath, "..");
20774
+ const outDir = join44(outputChunkPath, "..");
20707
20775
  if (!existsSync29(outDir)) mkdirSync17(outDir, { recursive: true });
20708
20776
  }
20709
20777
  const encodeInput = {
@@ -20980,10 +21048,10 @@ async function renderSpan(projectDir, config, span, outputPath, options = {}) {
20980
21048
  if (config.cfr === true) {
20981
21049
  throw new RenderSpanUnsupportedError("--start/--end cannot be combined with a cfr re-encode.");
20982
21050
  }
20983
- const workDir = mkdtempSync(join44(tmpdir5(), "hf-render-span-"));
21051
+ const workDir = mkdtempSync(join45(tmpdir5(), "hf-render-span-"));
20984
21052
  try {
20985
- const planDir = join44(workDir, "plan");
20986
- const partsDir = join44(workDir, "parts");
21053
+ const planDir = join45(workDir, "plan");
21054
+ const partsDir = join45(workDir, "parts");
20987
21055
  mkdirSync18(partsDir, { recursive: true });
20988
21056
  const planned = await plan(
20989
21057
  projectDir,
@@ -21002,7 +21070,7 @@ async function renderSpan(projectDir, config, span, outputPath, options = {}) {
21002
21070
  planned.totalFrames
21003
21071
  );
21004
21072
  const slices = JSON.parse(
21005
- readFileSync13(join44(planDir, "meta", "chunks.json"), "utf-8")
21073
+ readFileSync13(join45(planDir, "meta", "chunks.json"), "utf-8")
21006
21074
  );
21007
21075
  const parts = [];
21008
21076
  for (const slice of slices) {
@@ -21012,7 +21080,7 @@ async function renderSpan(projectDir, config, span, outputPath, options = {}) {
21012
21080
  };
21013
21081
  if (range.endFrame <= range.startFrame) continue;
21014
21082
  throwIfAborted(config.abortSignal);
21015
- const part = join44(partsDir, `part-${String(parts.length).padStart(4, "0")}.mp4`);
21083
+ const part = join45(partsDir, `part-${String(parts.length).padStart(4, "0")}.mp4`);
21016
21084
  await renderChunk(planDir, slice.index, part, { frameRange: range });
21017
21085
  parts.push(part);
21018
21086
  }
@@ -21629,13 +21697,13 @@ function renderRequestFromDistributedConfig(input) {
21629
21697
  import {
21630
21698
  existsSync as existsSync32,
21631
21699
  mkdirSync as mkdirSync19,
21632
- statSync as statSync12,
21700
+ statSync as statSync11,
21633
21701
  mkdtempSync as mkdtempSync2,
21634
21702
  writeFileSync as writeFileSync13,
21635
21703
  rmSync as rmSync17,
21636
- createReadStream as createReadStream5
21704
+ createReadStream as createReadStream6
21637
21705
  } from "fs";
21638
- import { resolve as resolve11, dirname as dirname19, join as join47 } from "path";
21706
+ import { resolve as resolve11, dirname as dirname19, join as join48 } from "path";
21639
21707
  import { tmpdir as tmpdir6 } from "os";
21640
21708
  import { parseArgs } from "util";
21641
21709
  import { isIP } from "net";
@@ -21648,13 +21716,13 @@ import { serve as serve2 } from "@hono/node-server";
21648
21716
  import {
21649
21717
  existsSync as existsSync30,
21650
21718
  readFileSync as readFileSync14,
21651
- statSync as statSync11,
21719
+ statSync as statSync10,
21652
21720
  openSync as openSync6,
21653
21721
  fstatSync as fstatSync3,
21654
21722
  closeSync as closeSync6,
21655
21723
  constants as constants3
21656
21724
  } from "fs";
21657
- import { resolve as resolve10, join as join45, relative as relative9, isAbsolute as isAbsolute5, sep as sep6, dirname as dirname17 } from "path";
21725
+ import { resolve as resolve10, join as join46, relative as relative9, isAbsolute as isAbsolute5, sep as sep6, dirname as dirname17 } from "path";
21658
21726
  import { fileURLToPath as fileURLToPath5 } from "url";
21659
21727
  import { Worker as Worker2 } from "worker_threads";
21660
21728
  function isStringRecord(value) {
@@ -21689,7 +21757,7 @@ function readEntryHtml(filePath) {
21689
21757
  } catch (error) {
21690
21758
  if (error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ENOTDIR"))
21691
21759
  return null;
21692
- if (!statSync11(filePath, { throwIfNoEntry: false })?.isFile()) return null;
21760
+ if (!statSync10(filePath, { throwIfNoEntry: false })?.isFile()) return null;
21693
21761
  throw error;
21694
21762
  }
21695
21763
  try {
@@ -21705,7 +21773,7 @@ function leavesProject(absProjectDir, absoluteEntryPath, isAllowedEntry) {
21705
21773
  }
21706
21774
  function readProjectEntryFile(projectDir, preferredEntryFile, isAllowedEntry) {
21707
21775
  const absProjectDir = resolve10(projectDir);
21708
- if (!existsSync30(absProjectDir) || !statSync11(absProjectDir).isDirectory()) {
21776
+ if (!existsSync30(absProjectDir) || !statSync10(absProjectDir).isDirectory()) {
21709
21777
  return { error: `Project directory not found: ${absProjectDir}` };
21710
21778
  }
21711
21779
  const entryCandidates = [preferredEntryFile, "index.html", "src/index.html"].filter(
@@ -21726,7 +21794,7 @@ function readProjectEntryFile(projectDir, preferredEntryFile, isAllowedEntry) {
21726
21794
  }
21727
21795
  }
21728
21796
  return {
21729
- error: `No HTML entry file found in project directory: ${join45(absProjectDir, preferredEntryFile || "index.html")}`
21797
+ error: `No HTML entry file found in project directory: ${join46(absProjectDir, preferredEntryFile || "index.html")}`
21730
21798
  };
21731
21799
  }
21732
21800
  function prepareHyperframeLintBody(body, isAllowedEntry) {
@@ -21795,7 +21863,7 @@ function freeLintSlot() {
21795
21863
  function resolveLintWorkerEntry() {
21796
21864
  const here = dirname17(fileURLToPath5(import.meta.url));
21797
21865
  for (const name of ["hyperframeLintWorker.js", "hyperframeLintWorker.ts"]) {
21798
- const candidate = join45(here, name);
21866
+ const candidate = join46(here, name);
21799
21867
  if (existsSync30(candidate)) return candidate;
21800
21868
  }
21801
21869
  return void 0;
@@ -21866,7 +21934,7 @@ async function runHyperframeLint(prepared, options = {}) {
21866
21934
  // ../producer/src/services/healthWorker.ts
21867
21935
  import { Worker as Worker3 } from "worker_threads";
21868
21936
  import { fileURLToPath as fileURLToPath6 } from "url";
21869
- import { dirname as dirname18, join as join46 } from "path";
21937
+ import { dirname as dirname18, join as join47 } from "path";
21870
21938
  import { existsSync as existsSync31 } from "fs";
21871
21939
  var DEFAULT_HEALTH_PORT = 9848;
21872
21940
  async function startHealthWorker(options = {}) {
@@ -21942,7 +22010,7 @@ function defaultLogger2() {
21942
22010
  }
21943
22011
  function resolveWorkerEntry2() {
21944
22012
  const here = dirname18(fileURLToPath6(import.meta.url));
21945
- const candidates = [join46(here, "healthWorkerThread.js"), join46(here, "healthWorkerThread.ts")];
22013
+ const candidates = [join47(here, "healthWorkerThread.js"), join47(here, "healthWorkerThread.ts")];
21946
22014
  for (const candidate of candidates) {
21947
22015
  if (existsSync31(candidate)) return candidate;
21948
22016
  }
@@ -22186,7 +22254,7 @@ function prepareProjectDirectory(projectDir, options, policy) {
22186
22254
  if (!candidate) return null;
22187
22255
  const absProjectDir = policy ? resolve11(policy.projectsDir, candidate) : resolve11(candidate);
22188
22256
  const shown = policy ? candidate : absProjectDir;
22189
- if (policy && !isAllowedProjectPath(policy.projectsDir, absProjectDir) || !existsSync32(absProjectDir) || !statSync12(absProjectDir).isDirectory()) {
22257
+ if (policy && !isAllowedProjectPath(policy.projectsDir, absProjectDir) || !existsSync32(absProjectDir) || !statSync11(absProjectDir).isDirectory()) {
22190
22258
  return { error: `Project directory not found: ${shown}` };
22191
22259
  }
22192
22260
  const entry = options.entryFile || "index.html";
@@ -22212,8 +22280,8 @@ async function resolveInlineRenderHtml(body) {
22212
22280
  }
22213
22281
  function materializeInlineProject(html, options) {
22214
22282
  const tempRoot = process.env.PRODUCER_TMP_PROJECT_DIR || tmpdir6();
22215
- const tempProjectDir = mkdtempSync2(join47(tempRoot, "producer-project-"));
22216
- writeFileSync13(join47(tempProjectDir, "index.html"), html, "utf-8");
22283
+ const tempProjectDir = mkdtempSync2(join48(tempRoot, "producer-project-"));
22284
+ writeFileSync13(join48(tempProjectDir, "index.html"), html, "utf-8");
22217
22285
  return {
22218
22286
  prepared: {
22219
22287
  input: { projectDir: tempProjectDir, ...options },
@@ -22289,7 +22357,7 @@ function publicPerfSummary(job) {
22289
22357
  return job.perfSummary ? { ...job.perfSummary, renderId: void 0 } : null;
22290
22358
  }
22291
22359
  function outputFileSize(path) {
22292
- return existsSync32(path) ? statSync12(path).size : 0;
22360
+ return existsSync32(path) ? statSync11(path).size : 0;
22293
22361
  }
22294
22362
  function createBlockingProgressReporter(log, requestId) {
22295
22363
  let lastLoggedPct = -10;
@@ -22620,8 +22688,8 @@ function createRenderHandlers(options = {}) {
22620
22688
  store.delete(token);
22621
22689
  return c.json({ success: false, error: "Output artifact file missing" }, 404);
22622
22690
  }
22623
- const stats = statSync12(artifact.path);
22624
- return new Response(createReadStream5(artifact.path), {
22691
+ const stats = statSync11(artifact.path);
22692
+ return new Response(createReadStream6(artifact.path), {
22625
22693
  headers: {
22626
22694
  "content-type": "video/mp4",
22627
22695
  "content-length": String(stats.size),
@@ -22757,7 +22825,7 @@ function startServer(options = {}) {
22757
22825
  });
22758
22826
  async function shutdown(signal) {
22759
22827
  log.info(`Received ${signal}, shutting down`);
22760
- const { drainBrowserPool } = await import("./src-COKNEXLI.js");
22828
+ const { drainBrowserPool } = await import("./src-WKQLHMUG.js");
22761
22829
  await drainBrowserPool().catch(() => {
22762
22830
  });
22763
22831
  const handle = await Promise.race([
@@ -22795,7 +22863,7 @@ if (isPublicServerEntry) {
22795
22863
  // ../producer/src/services/distributed/planV2Execution.ts
22796
22864
  import { mkdtempSync as mkdtempSync3, rmSync as rmSync19 } from "fs";
22797
22865
  import { tmpdir as tmpdir7 } from "os";
22798
- import { join as join49 } from "path";
22866
+ import { join as join50 } from "path";
22799
22867
 
22800
22868
  // ../producer/src/services/distributed/assemble.ts
22801
22869
  import {
@@ -22805,10 +22873,10 @@ import {
22805
22873
  readFileSync as readFileSync15,
22806
22874
  readdirSync as readdirSync12,
22807
22875
  rmSync as rmSync18,
22808
- statSync as statSync13,
22876
+ statSync as statSync12,
22809
22877
  writeFileSync as writeFileSync14
22810
22878
  } from "fs";
22811
- import { basename as basename8, dirname as dirname20, join as join48 } from "path";
22879
+ import { basename as basename8, dirname as dirname20, join as join49 } from "path";
22812
22880
  function cfrRateControlArgs(locked) {
22813
22881
  const preset = getEncoderPreset(locked.quality ?? "standard", "mp4");
22814
22882
  if (locked.crf == null && locked.bitrate) {
@@ -22836,7 +22904,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
22836
22904
  outputPath,
22837
22905
  durationMs: Date.now() - start,
22838
22906
  framesEncoded: plan2.totalFrames,
22839
- fileSize: statSync13(outputPath).size
22907
+ fileSize: statSync12(outputPath).size
22840
22908
  };
22841
22909
  }
22842
22910
  const format = plan2.dimensions.format;
@@ -22864,7 +22932,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
22864
22932
  };
22865
22933
  try {
22866
22934
  const videoSources = cfrEncoder ? [await reencodeCfr(ctx, chunkPaths, cfrEncoder)] : chunkPaths;
22867
- const finalPath = join48(workDir, `output.${format}`);
22935
+ const finalPath = join49(workDir, `output.${format}`);
22868
22936
  const audio = audioPath !== null && existsSync33(audioPath) ? audioPath : null;
22869
22937
  await writeJoined(ctx, videoSources, audio, finalPath);
22870
22938
  renameWithRetry(finalPath, outputPath);
@@ -22883,7 +22951,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
22883
22951
  });
22884
22952
  }
22885
22953
  }
22886
- const fileSize = existsSync33(outputPath) ? statSync13(outputPath).size : 0;
22954
+ const fileSize = existsSync33(outputPath) ? statSync12(outputPath).size : 0;
22887
22955
  return {
22888
22956
  ...referenceBackgroundResult(plan2[REFERENCE_BACKGROUND_FIELD]),
22889
22957
  outputPath,
@@ -22893,8 +22961,8 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
22893
22961
  };
22894
22962
  }
22895
22963
  function readAssemblePlan(planDir, chunkPaths) {
22896
- const planJsonPath = join48(planDir, "plan.json");
22897
- const chunksJsonPath = join48(planDir, "meta", "chunks.json");
22964
+ const planJsonPath = join49(planDir, "plan.json");
22965
+ const chunksJsonPath = join49(planDir, "meta", "chunks.json");
22898
22966
  if (!existsSync33(planJsonPath)) {
22899
22967
  throw new Error(`[assemble] planDir missing plan.json: ${planJsonPath}`);
22900
22968
  }
@@ -22945,7 +23013,7 @@ function cfrEncodeArgs(inputArgs, encoder, fpsArg) {
22945
23013
  return args;
22946
23014
  }
22947
23015
  async function reencodeCfr(ctx, chunkPaths, encoder) {
22948
- const cfrOutputPath = join48(ctx.workDir, `cfr.${ctx.format}`);
23016
+ const cfrOutputPath = join49(ctx.workDir, `cfr.${ctx.format}`);
22949
23017
  const cfrArgs = cfrEncodeArgs(videoInputArgs(ctx, chunkPaths), encoder, ctx.fpsArg);
22950
23018
  appendRenderProvenanceArgs(cfrArgs, cfrOutputPath);
22951
23019
  cfrArgs.push("-y", cfrOutputPath);
@@ -22972,7 +23040,7 @@ async function writeJoined(ctx, videoSources, audioPath, finalPath) {
22972
23040
  );
22973
23041
  return;
22974
23042
  }
22975
- const paddedAudioPath = join48(ctx.workDir, "audio-padded.m4a");
23043
+ const paddedAudioPath = join49(ctx.workDir, "audio-padded.m4a");
22976
23044
  const padTrimResult = await ctx.timed(
22977
23045
  "audioMs",
22978
23046
  () => padOrTrimAudioToVideoFrameCount({
@@ -23012,11 +23080,11 @@ async function writeJoined(ctx, videoSources, audioPath, finalPath) {
23012
23080
  }
23013
23081
  }
23014
23082
  function concatDemuxerInput(chunkPaths, workDir, fpsArg) {
23015
- const listPath = join48(workDir, "concat-list.txt");
23083
+ const listPath = join49(workDir, "concat-list.txt");
23016
23084
  const body = chunkPaths.map((path) => `file '${path.replace(/'/g, "'\\''")}'`).join("\n");
23017
23085
  writeFileSync14(listPath, `${body}
23018
23086
  `, "utf-8");
23019
- return ["-r", fpsArg, "-f", "concat", "-safe", "0", "-i", listPath];
23087
+ return ["-r", fpsArg, ...concatListInputArgs(listPath)];
23020
23088
  }
23021
23089
  async function probeJoinedFrameInfo(videoPaths, fps, signal) {
23022
23090
  const infos = await Promise.all(
@@ -23050,11 +23118,11 @@ function stitchesSeparateAudio(planDir) {
23050
23118
  return lockedAudio(planDir).separateAudio === true;
23051
23119
  }
23052
23120
  function planFormat(planDir) {
23053
- const plan2 = JSON.parse(readFileSync15(join48(planDir, "plan.json"), "utf-8"));
23121
+ const plan2 = JSON.parse(readFileSync15(join49(planDir, "plan.json"), "utf-8"));
23054
23122
  return plan2.dimensions.format;
23055
23123
  }
23056
23124
  function lockedAudio(planDir) {
23057
- const encoderJsonPath = join48(planDir, "meta", "encoder.json");
23125
+ const encoderJsonPath = join49(planDir, "meta", "encoder.json");
23058
23126
  if (!existsSync33(encoderJsonPath)) return {};
23059
23127
  return JSON.parse(readFileSync15(encoderJsonPath, "utf-8"));
23060
23128
  }
@@ -23064,7 +23132,7 @@ function readCfrEncoder(planDir, format) {
23064
23132
  `[assemble] cfr=true is only supported for format="mp4" (got "${format}"). Stream-copy paths for webm and mov already produce exact avg_frame_rate; cfr re-encode is not needed.`
23065
23133
  );
23066
23134
  }
23067
- const encoderJsonPath = join48(planDir, "meta", "encoder.json");
23135
+ const encoderJsonPath = join49(planDir, "meta", "encoder.json");
23068
23136
  if (!existsSync33(encoderJsonPath)) {
23069
23137
  throw new Error(`[assemble] planDir missing meta/encoder.json: ${encoderJsonPath}`);
23070
23138
  }
@@ -23081,7 +23149,7 @@ function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, start
23081
23149
  mkdirSync20(outputPath, { recursive: true });
23082
23150
  let globalIdx = 0;
23083
23151
  for (const chunkDir of chunkPaths) {
23084
- if (!statSync13(chunkDir).isDirectory()) {
23152
+ if (!statSync12(chunkDir).isDirectory()) {
23085
23153
  throw new Error(
23086
23154
  `[assemble] png-sequence chunk must be a directory: ${chunkDir} (got a file)`
23087
23155
  );
@@ -23091,8 +23159,8 @@ function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, start
23091
23159
  throw new Error(`[assemble] png-sequence chunk has no frames: ${chunkDir}`);
23092
23160
  }
23093
23161
  for (const frame of frames) {
23094
- const dst = join48(outputPath, formatExportFrameName(globalIdx, "png"));
23095
- cpSync3(join48(chunkDir, frame), dst);
23162
+ const dst = join49(outputPath, formatExportFrameName(globalIdx, "png"));
23163
+ cpSync3(join49(chunkDir, frame), dst);
23096
23164
  globalIdx += 1;
23097
23165
  }
23098
23166
  }
@@ -23102,13 +23170,13 @@ function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, start
23102
23170
  );
23103
23171
  }
23104
23172
  if (audioPath !== null && existsSync33(audioPath)) {
23105
- const sidecar = join48(outputPath, MIXED_AUDIO_FILENAME);
23173
+ const sidecar = join49(outputPath, MIXED_AUDIO_FILENAME);
23106
23174
  cpSync3(audioPath, sidecar);
23107
23175
  }
23108
23176
  let fileSize = 0;
23109
23177
  for (const name of readdirSync12(outputPath)) {
23110
23178
  try {
23111
- fileSize += statSync13(join48(outputPath, name)).size;
23179
+ fileSize += statSync12(join49(outputPath, name)).size;
23112
23180
  } catch {
23113
23181
  }
23114
23182
  }
@@ -23122,8 +23190,8 @@ function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, start
23122
23190
 
23123
23191
  // ../producer/src/services/distributed/planV2Execution.ts
23124
23192
  async function renderChunkV2(planV2Dir, chunkIndex, outputChunkPath, options) {
23125
- const workRoot = mkdtempSync3(join49(tmpdir7(), "hf-plan-v2-chunk-"));
23126
- const materializedPlanDir = join49(workRoot, "plan");
23193
+ const workRoot = mkdtempSync3(join50(tmpdir7(), "hf-plan-v2-chunk-"));
23194
+ const materializedPlanDir = join50(workRoot, "plan");
23127
23195
  try {
23128
23196
  materializePlanV2Target(planV2Dir, { role: "chunk", chunkIndex }, materializedPlanDir);
23129
23197
  return await renderChunk(materializedPlanDir, chunkIndex, outputChunkPath, options);
@@ -23132,8 +23200,8 @@ async function renderChunkV2(planV2Dir, chunkIndex, outputChunkPath, options) {
23132
23200
  }
23133
23201
  }
23134
23202
  async function assembleV2(planV2Dir, chunkPaths, outputPath, options) {
23135
- const workRoot = mkdtempSync3(join49(tmpdir7(), "hf-plan-v2-assembler-"));
23136
- const materializedPlanDir = join49(workRoot, "plan");
23203
+ const workRoot = mkdtempSync3(join50(tmpdir7(), "hf-plan-v2-assembler-"));
23204
+ const materializedPlanDir = join50(workRoot, "plan");
23137
23205
  try {
23138
23206
  const materialized = materializePlanV2Target(
23139
23207
  planV2Dir,
@@ -23153,9 +23221,9 @@ async function assembleV2(planV2Dir, chunkPaths, outputPath, options) {
23153
23221
  }
23154
23222
 
23155
23223
  // ../producer/src/services/distributed/projectHash.ts
23156
- import { closeSync as closeSync7, openSync as openSync7, readdirSync as readdirSync13, readSync as readSync5, realpathSync as realpathSync2, statSync as statSync14 } from "fs";
23224
+ import { closeSync as closeSync7, openSync as openSync7, readdirSync as readdirSync13, readSync as readSync5, realpathSync as realpathSync2, statSync as statSync13 } from "fs";
23157
23225
  import { createHash as createHash8 } from "crypto";
23158
- import { join as join50, sep as sep7 } from "path";
23226
+ import { join as join51, sep as sep7 } from "path";
23159
23227
  var READ_CHUNK_BYTES = 256 * 1024;
23160
23228
 
23161
23229
  // ../producer/src/services/distributed/audioSidecar.ts