hyperframes 0.9.53 → 0.9.55

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 (295) hide show
  1. package/dist/{add-TZFSLV5M.js → add-2LZ5XA27.js} +23 -23
  2. package/dist/{agentPromptGenerator-OPQZUVYC.js → agentPromptGenerator-RSFEFNFL.js} +12 -11
  3. package/dist/{animatedGifPrep-DEK4XZYT.js → animatedGifPrep-AX4MK2QD.js} +13 -12
  4. package/dist/api.d.ts +4 -2
  5. package/dist/api.js +51 -49
  6. package/dist/{appHistory-DK2XI4EZ.js → appHistory-T3ZLA7QN.js} +4 -3
  7. package/dist/{asset-3BIBG7LB.js → asset-XYQJVHR2.js} +2 -2
  8. package/dist/{assetCataloger-R4NWWO4P.js → assetCataloger-WTFR2Z5Q.js} +13 -12
  9. package/dist/{audio-N3DHNT3F.js → audio-U2OIHTUI.js} +93 -70
  10. package/dist/{auth-CBF2DVRT.js → auth-DXESNULL.js} +5 -5
  11. package/dist/{autoUpdate-UJB4MI4Z.js → autoUpdate-DWT4YYU2.js} +5 -5
  12. package/dist/{avatars-JVATTQYO.js → avatars-EL5RBI4P.js} +19 -18
  13. package/dist/{backgroundChecks-R7SFELIM.js → backgroundChecks-T2DL425O.js} +6 -6
  14. package/dist/backgroundChecksWorker.js +6 -6
  15. package/dist/{batchRender-D4VO4OCF.js → batchRender-CMG4SVBX.js} +4 -4
  16. package/dist/{beats-UCYZ7MKK.js → beats-HU756KUO.js} +14 -14
  17. package/dist/{benchmark-3NMJO5DK.js → benchmark-HBNCPXH5.js} +21 -20
  18. package/dist/{billing-76JTGOHN.js → billing-LGHM3LC7.js} +21 -21
  19. package/dist/{browser-5XXA4O25.js → browser-XIFUT5OB.js} +11 -11
  20. package/dist/{bundleWithLocalizedFonts-S7DIF43W.js → bundleWithLocalizedFonts-JPPBCCVV.js} +1 -1
  21. package/dist/{capture-JHMVFAUS.js → capture-B6DSZD2P.js} +4 -4
  22. package/dist/{capture-EV4G3SCY.js → capture-ZY7G3QSM.js} +30 -29
  23. package/dist/{captureCompositionFrame-3M3BFHZH.js → captureCompositionFrame-2WRG6SNW.js} +18 -17
  24. package/dist/{captureFile-R5JZ7WRA.js → captureFile-LXMDM5TD.js} +3 -3
  25. package/dist/{catalog-WVZJ6XYV.js → catalog-CUEOQ4PJ.js} +23 -23
  26. package/dist/{catch-up-FQ5KCZIH.js → catch-up-BAYJTXAL.js} +14 -13
  27. package/dist/{check-VTUVZWCF.js → check-KGXBQPRZ.js} +54 -53
  28. package/dist/{checkAudio-FYRBXK22.js → checkAudio-6PI7DJLP.js} +18 -17
  29. package/dist/{checkBrowser-EJQEWSIH.js → checkBrowser-4SGXUL27.js} +47 -46
  30. package/dist/{chunk-HY25JZQ2.js → chunk-26RTKW2U.js} +2 -2
  31. package/dist/{chunk-T3QK3VKM.js → chunk-27YDEBOP.js} +2 -2
  32. package/dist/{chunk-6CO6L3YP.js → chunk-2LQJHVI7.js} +2 -2
  33. package/dist/{chunk-KEZ7QIJN.js → chunk-2PASB3PC.js} +4 -4
  34. package/dist/{chunk-KKO4PRB5.js → chunk-2XZ76TF4.js} +1 -1
  35. package/dist/{chunk-FLPVKGBS.js → chunk-32IRBM3V.js} +3 -3
  36. package/dist/{chunk-BQRJZDSM.js → chunk-3ANC4SO2.js} +14 -14
  37. package/dist/{chunk-I7NTTMET.js → chunk-3USMIMBB.js} +97 -73
  38. package/dist/{chunk-XM7LOJBP.js → chunk-3WG7IC5Z.js} +1 -1
  39. package/dist/{chunk-FU2R6OVR.js → chunk-4IUOWNDS.js} +1 -1
  40. package/dist/{chunk-RH6UD7XI.js → chunk-4S53OP2C.js} +11 -11
  41. package/dist/{chunk-5SMHNPMW.js → chunk-4ZQG3Z3J.js} +2 -2
  42. package/dist/{chunk-SH6PAYUD.js → chunk-5BWIBP2F.js} +5 -5
  43. package/dist/{chunk-OLVZAALP.js → chunk-5HJZGP54.js} +2 -2
  44. package/dist/{chunk-ISVRNYE5.js → chunk-5LSMAWK5.js} +1 -1
  45. package/dist/{chunk-E3LZAM64.js → chunk-6BGTTCKN.js} +4 -4
  46. package/dist/{chunk-ZT7RB42S.js → chunk-6EG3W5AD.js} +16 -9
  47. package/dist/{chunk-QBDT7Z5D.js → chunk-7DJCG5ED.js} +10 -10
  48. package/dist/{chunk-N36NHUGP.js → chunk-7QFFS657.js} +1 -1
  49. package/dist/chunk-AGTBMLNM.js +42 -0
  50. package/dist/{chunk-7ELQHSEE.js → chunk-AHXRYOTC.js} +2 -2
  51. package/dist/{chunk-HJ2YUPBF.js → chunk-ATKA5KHE.js} +3 -3
  52. package/dist/{chunk-NCPSUM5A.js → chunk-AU4ZBCR3.js} +1 -1
  53. package/dist/{chunk-HZ2CD6RL.js → chunk-AYESPEPQ.js} +1 -1
  54. package/dist/{chunk-4FOHO7GC.js → chunk-B5HSHXE2.js} +2 -2
  55. package/dist/{chunk-4KRID4YV.js → chunk-BMJGWQ5X.js} +1 -1
  56. package/dist/{chunk-JNM4WG7C.js → chunk-BOEEHWDX.js} +1 -1
  57. package/dist/{chunk-GDWPLGHY.js → chunk-CAYQATCT.js} +1 -1
  58. package/dist/{chunk-FSBV6Z7E.js → chunk-CHQWDBUM.js} +23 -7
  59. package/dist/{chunk-4TJGOQER.js → chunk-CRRVULYR.js} +6 -4
  60. package/dist/{chunk-ES273AD6.js → chunk-DQHFS4AE.js} +4 -4
  61. package/dist/{chunk-HD5RVDL6.js → chunk-E2DHBP6C.js} +1 -1
  62. package/dist/{chunk-CTHG3WLB.js → chunk-E7GHBT2M.js} +4 -4
  63. package/dist/{chunk-BCJJ64JG.js → chunk-EKZ5FGV7.js} +1 -1
  64. package/dist/{chunk-SZGQU7EB.js → chunk-ER22SVLT.js} +1 -1
  65. package/dist/{chunk-2ODGEXNH.js → chunk-EUJSQHIL.js} +2 -2
  66. package/dist/{chunk-KCPIENND.js → chunk-EUP7ODOV.js} +1 -1
  67. package/dist/{chunk-UMRNTF3C.js → chunk-EXEX7TSU.js} +2 -2
  68. package/dist/{chunk-I2UMQAOQ.js → chunk-EXXIFMUX.js} +1 -1
  69. package/dist/{chunk-YT3LRZA3.js → chunk-F7B2YDPM.js} +7 -5
  70. package/dist/{chunk-TWI33YJP.js → chunk-FLHL32SV.js} +1 -1
  71. package/dist/{chunk-CYBOQOKO.js → chunk-FLQT2FVH.js} +1 -1
  72. package/dist/{chunk-346RTE74.js → chunk-FMYXLRJN.js} +3 -3
  73. package/dist/{chunk-SXZMJ7QJ.js → chunk-FOKS5HQ2.js} +4 -4
  74. package/dist/{chunk-3HQ4C4HI.js → chunk-FPRHOB5W.js} +3 -3
  75. package/dist/{chunk-XZZF6YBS.js → chunk-GKOF2RS3.js} +1 -1
  76. package/dist/{chunk-IU5DC4HP.js → chunk-GWSMTN55.js} +93 -23
  77. package/dist/{chunk-B3WRUPRS.js → chunk-HLDUHLYO.js} +4 -4
  78. package/dist/{chunk-43ILJV43.js → chunk-J424KJXV.js} +8 -8
  79. package/dist/{chunk-PCH55NAO.js → chunk-JAAIW4JR.js} +1 -1
  80. package/dist/{chunk-FM5JRUWL.js → chunk-JS7UI73E.js} +6 -6
  81. package/dist/{chunk-PUT3NPVE.js → chunk-JVA3SAGB.js} +4 -4
  82. package/dist/{chunk-TQKX3TA3.js → chunk-K2VFTUAA.js} +1 -1
  83. package/dist/{chunk-DE3JRSGT.js → chunk-KCF6Q54R.js} +1 -1
  84. package/dist/{chunk-LKWN2F7O.js → chunk-KD33HZPP.js} +2 -2
  85. package/dist/{chunk-ZK6BC3JM.js → chunk-KG24ATFM.js} +6 -6
  86. package/dist/{chunk-GVUG5VDL.js → chunk-KHEOHL5O.js} +1 -1
  87. package/dist/{chunk-FQMP2KFS.js → chunk-KVYHRUZX.js} +2 -2
  88. package/dist/{chunk-XWK2RSD5.js → chunk-KWTTELUY.js} +2 -2
  89. package/dist/{chunk-U3LWQGCD.js → chunk-L27Z3PZT.js} +1 -1
  90. package/dist/{chunk-YF34MK67.js → chunk-LGYCWN3Q.js} +14 -14
  91. package/dist/{chunk-ZFCK46UR.js → chunk-LKWWY6WN.js} +1 -1
  92. package/dist/{chunk-CBV4W4R3.js → chunk-MDOMSEK2.js} +2 -2
  93. package/dist/{chunk-RXJUMVCA.js → chunk-MDRLJ737.js} +5 -2
  94. package/dist/{chunk-TTP6JGIL.js → chunk-MO5NTFSC.js} +2 -2
  95. package/dist/{chunk-SRPPNXGX.js → chunk-MWTOYGIJ.js} +3 -3
  96. package/dist/{chunk-W6WVHIU7.js → chunk-N4CJSWTO.js} +2 -2
  97. package/dist/{chunk-PYOCEDTU.js → chunk-N7M2SNAF.js} +1 -1
  98. package/dist/{chunk-FZNH7SCB.js → chunk-NCSBBZQ5.js} +1 -1
  99. package/dist/{chunk-GZG2Z2O2.js → chunk-ND5SQJAB.js} +2 -2
  100. package/dist/{chunk-QXYR7LOO.js → chunk-NFLH3TQ5.js} +8 -8
  101. package/dist/{chunk-47IXIEBQ.js → chunk-NFNYYBD6.js} +1 -1
  102. package/dist/{chunk-7PBJR7WI.js → chunk-NHNFBLBM.js} +1 -1
  103. package/dist/{chunk-562X3KBJ.js → chunk-NISP57R3.js} +2 -2
  104. package/dist/{chunk-4Y5IDZOJ.js → chunk-NKAW4RVE.js} +4 -4
  105. package/dist/{chunk-2YSQU74C.js → chunk-NMQCIUBE.js} +5 -5
  106. package/dist/{chunk-35PKJPEI.js → chunk-NRGNEP3R.js} +1 -1
  107. package/dist/{chunk-G7GTO4YP.js → chunk-NUGAYGT3.js} +2 -2
  108. package/dist/{chunk-RCTY7VNK.js → chunk-O7TIBLSJ.js} +15 -101
  109. package/dist/{chunk-RUQ2VOD3.js → chunk-OAV5ESA6.js} +52 -17
  110. package/dist/{chunk-KPFJGQ6M.js → chunk-OIO7YMBP.js} +28 -30
  111. package/dist/{chunk-ZI3MSFSN.js → chunk-OM2WIZOR.js} +2 -2
  112. package/dist/{chunk-OUPWEFUM.js → chunk-ON3CGL3V.js} +1 -1
  113. package/dist/{chunk-IXUIJ7OL.js → chunk-OOWZ6M75.js} +3 -3
  114. package/dist/{chunk-5JOYZGHQ.js → chunk-OTWFSHYH.js} +3 -3
  115. package/dist/{chunk-KDDRDNEE.js → chunk-OWQWMQTY.js} +3 -2
  116. package/dist/{chunk-7FU5JCAK.js → chunk-OYEGPK3Q.js} +1 -1
  117. package/dist/{chunk-5A75E4OT.js → chunk-OZDELWQP.js} +2 -29
  118. package/dist/{chunk-XBPLO6CY.js → chunk-PCNNMAUX.js} +326 -95
  119. package/dist/{chunk-UAOL5PRX.js → chunk-PLFOZIEH.js} +1 -1
  120. package/dist/chunk-PXLGDX2S.js +104 -0
  121. package/dist/{chunk-G55B5LP6.js → chunk-Q42L7V5T.js} +1 -1
  122. package/dist/{chunk-BH5P5QZN.js → chunk-QGQYMSYM.js} +4 -4
  123. package/dist/{chunk-2ST2FAVH.js → chunk-QQLVSUO7.js} +2 -2
  124. package/dist/{chunk-Y6CLFCYX.js → chunk-QWBJABCA.js} +4 -4
  125. package/dist/{chunk-JCFOSR7Z.js → chunk-QX4TZ2RK.js} +86 -15
  126. package/dist/{chunk-WPG76RJZ.js → chunk-RBOKZ5ED.js} +1 -1
  127. package/dist/{chunk-IH56MGAB.js → chunk-RIAH7WEL.js} +9 -9
  128. package/dist/{chunk-7RHN6N5F.js → chunk-SDFGDNWV.js} +1 -1
  129. package/dist/{chunk-NFRKPLTJ.js → chunk-SEC76O65.js} +1 -1
  130. package/dist/{chunk-ZPPEZJVD.js → chunk-TEA4ZEHB.js} +71 -38
  131. package/dist/{chunk-G5FNJQER.js → chunk-TFVIXR6V.js} +26 -26
  132. package/dist/{chunk-IB5DXMAH.js → chunk-TMLKMCZK.js} +4 -4
  133. package/dist/{chunk-NVGB7L2M.js → chunk-TN3WGE3L.js} +3 -3
  134. package/dist/{chunk-FH6KC5EF.js → chunk-TPLO6NJI.js} +3 -3
  135. package/dist/{chunk-VCHJV7ZT.js → chunk-TULCSCC4.js} +67 -15
  136. package/dist/{chunk-Q5P7YJXO.js → chunk-UCLUH5AG.js} +2 -2
  137. package/dist/{chunk-H5K3FS4W.js → chunk-UHE44FC4.js} +3 -3
  138. package/dist/{chunk-3FL7MKQH.js → chunk-UHVB2TVW.js} +168 -127
  139. package/dist/{chunk-KLIVZ5VG.js → chunk-UHVKV5IF.js} +1 -1
  140. package/dist/{chunk-6F4ZVQUX.js → chunk-UV3I2TND.js} +1 -1
  141. package/dist/{chunk-5CRHNVJW.js → chunk-VPX4GVGQ.js} +3 -3
  142. package/dist/{chunk-N2YHCAFL.js → chunk-W2GXQ3CR.js} +10 -10
  143. package/dist/{chunk-4XETQ5LC.js → chunk-WPD7JH6F.js} +2 -2
  144. package/dist/{chunk-ZV3RIHRN.js → chunk-WQGQCSRY.js} +67 -27
  145. package/dist/{chunk-FRM4EM52.js → chunk-X4KIL5BW.js} +18 -18
  146. package/dist/{chunk-JHOCK3DG.js → chunk-XFF4XJZO.js} +11 -3
  147. package/dist/{chunk-BS36NRXV.js → chunk-XFSZ3IXC.js} +1 -1
  148. package/dist/chunk-XGEJPKRY.js +5069 -0
  149. package/dist/{chunk-I7SJBRVT.js → chunk-XLQUCTC2.js} +3 -3
  150. package/dist/{chunk-XJTFSMZK.js → chunk-YSN6HPD3.js} +2 -2
  151. package/dist/{chunk-6RPLXBZJ.js → chunk-YU5LSWA2.js} +1 -1
  152. package/dist/{chunk-4KS3GL5I.js → chunk-YVCPUVHV.js} +1 -1
  153. package/dist/chunk-YXX6CIHL.js +25 -0
  154. package/dist/{chunk-44OCDK5C.js → chunk-YY7ZJHL3.js} +14 -9
  155. package/dist/{chunk-365OGBQ2.js → chunk-ZLG2E7GC.js} +2 -2
  156. package/dist/{clean-KEVJGNES.js → clean-SXRW77YG.js} +29 -28
  157. package/dist/cli.js +67 -67
  158. package/dist/{cloud-EBJZO6ZY.js → cloud-LU4FVT33.js} +7 -7
  159. package/dist/{cloud-OR62JJDE.js → cloud-PUCWVAS2.js} +4 -4
  160. package/dist/{cloudrun-HPYJTM5N.js → cloudrun-SXXONVD6.js} +17 -6
  161. package/dist/{compare-353XZU2M.js → compare-K65FNAEA.js} +45 -44
  162. package/dist/{compiler-KPDUYBA5.js → compiler-QISQISFV.js} +5 -5
  163. package/dist/{component-5DZDY74T.js → component-YYCDOLP2.js} +3 -3
  164. package/dist/{compositions-VBICZHMF.js → compositions-LCQTIYIU.js} +20 -19
  165. package/dist/{contactSheet-O3FOOHOX.js → contactSheet-CCHQAZLA.js} +4 -4
  166. package/dist/{curve-KDRSQWHP.js → curve-T7JAY3EM.js} +17 -16
  167. package/dist/{cuts-ABAQKTF4.js → cuts-E54SOAWH.js} +18 -17
  168. package/dist/{delete-BXURHIL4.js → delete-GLQNSOWH.js} +12 -12
  169. package/dist/{deploy-4TBYCBNI.js → deploy-SPMSEG67.js} +10 -7
  170. package/dist/{describeProject-K62TKQLI.js → describeProject-YPTJWL3O.js} +12 -11
  171. package/dist/{destroy-FAJUHCW4.js → destroy-FMAAH4KQ.js} +9 -6
  172. package/dist/{deterministicFonts-XZIQ4PNP.js → deterministicFonts-OXGNMVJE.js} +3 -3
  173. package/dist/{diff-4O7ZCBM5.js → diff-OT5SHVFD.js} +46 -45
  174. package/dist/{dist-D67752QW.js → dist-EO7BILWH.js} +16 -15
  175. package/dist/{dist-F4T6FB7P.js → dist-RYTNYHMF.js} +2 -2
  176. package/dist/{dist-AAGJ6SXG.js → dist-T62DJJZX.js} +3 -3
  177. package/dist/{doctor-IEUIWBC5.js → doctor-L4SNKUBM.js} +21 -20
  178. package/dist/{energy-BJQTVGBO.js → energy-AXQGYZF6.js} +18 -17
  179. package/dist/{events-D3NBN44E.js → events-5T25R4EH.js} +6 -6
  180. package/dist/{events-M37XFHGJ.js → events-7QP5H6PW.js} +20 -19
  181. package/dist/{events-4UBI5WNS.js → events-EBA6KHJV.js} +10 -10
  182. package/dist/{execute-JCLM27KS.js → execute-PTHC7Y5Q.js} +35 -34
  183. package/dist/{extract-AYWY5PIN.js → extract-76UPXPJC.js} +18 -17
  184. package/dist/{face-TEHC6WYN.js → face-YZON2N2E.js} +19 -18
  185. package/dist/{feedback-JZDCB5N4.js → feedback-KAYKPPHI.js} +22 -21
  186. package/dist/{ffmpeg-JMPVMPDT.js → ffmpeg-T3KK5XKT.js} +11 -10
  187. package/dist/{figma-6MYT2VRV.js → figma-NJ6CAJGV.js} +3 -3
  188. package/dist/fontLocalizeCli.js +18 -17
  189. package/dist/{frames-NLFBDILH.js → frames-KNR4CSB4.js} +20 -19
  190. package/dist/{generate-YLPRVWHZ.js → generate-ISCPAKHT.js} +34 -33
  191. package/dist/{get-APCR6ZJE.js → get-X7QNC3PE.js} +12 -12
  192. package/dist/{gpuPolicy-YXBUP4AF.js → gpuPolicy-ZXN5S3HE.js} +11 -10
  193. package/dist/{grade-compare-VLWGCI4O.js → grade-compare-XD3IONCL.js} +44 -43
  194. package/dist/hangReport.js +2 -2
  195. package/dist/{heifImagePrep-UC2AV5LU.js → heifImagePrep-EFBHDH4Z.js} +14 -13
  196. package/dist/{help-YSBTU7WC.js → help-VUFIY5X4.js} +1 -1
  197. package/dist/{history-EPIGMZUN.js → history-OM3MHRB2.js} +17 -17
  198. package/dist/hyperframe.manifest.json +1 -1
  199. package/dist/hyperframe.runtime.iife.js +64 -64
  200. package/dist/hyperframes-player.global.js +1 -1
  201. package/dist/{info-6SF6E2T3.js → info-G64344ST.js} +22 -21
  202. package/dist/{init-BXS47X5W.js → init-2N6SDLZB.js} +37 -36
  203. package/dist/{ink-BWKWSIKA.js → ink-T5BJE4D2.js} +18 -17
  204. package/dist/{inspect-NUE2R2OF.js → inspect-6I4YSARX.js} +45 -44
  205. package/dist/{installer-T57TKMM6.js → installer-JNQKFCTN.js} +7 -7
  206. package/dist/{keyframes-WCRUYIOQ.js → keyframes-PT3H7WHD.js} +16 -16
  207. package/dist/{lambda-L2YNMAL5.js → lambda-NEQXIHUM.js} +17 -16
  208. package/dist/{layout-FXTXMDAL.js → layout-FRWUKOGX.js} +45 -44
  209. package/dist/{lint-IKRYTERJ.js → lint-GXPONOPU.js} +18 -18
  210. package/dist/{lintProject-2NDIJLD2.js → lintProject-J4YTLKPW.js} +2 -2
  211. package/dist/{list-BX5SCZEC.js → list-JO7WSM6Y.js} +12 -12
  212. package/dist/{localPage-HY3VMEYU.js → localPage-XDWFSE4K.js} +12 -11
  213. package/dist/{login-5IDR2M6C.js → login-XMFEIEXG.js} +5 -5
  214. package/dist/{logout-MTWA4BBI.js → logout-CCATTNTL.js} +1 -1
  215. package/dist/{look-7R4YJNX7.js → look-U77ADJ4V.js} +18 -17
  216. package/dist/{manager-PHCAZFHT.js → manager-RNMX2WTR.js} +12 -11
  217. package/dist/{manager-DBMIO5YG.js → manager-ZRETV4LQ.js} +4 -4
  218. package/dist/{measure-7CJ4RKSY.js → measure-JNJAPVVN.js} +11 -11
  219. package/dist/{media-treatment-HEW3RMDV.js → media-treatment-MFNKKPM7.js} +20 -19
  220. package/dist/{media-use-S5IJPK5G.js → media-use-ZKHL2IN2.js} +7 -6
  221. package/dist/{models-4UJY22Z3.js → models-PGO2ERAU.js} +16 -15
  222. package/dist/{motionShot-FLZQ75TM.js → motionShot-AG4LR5Q5.js} +22 -21
  223. package/dist/{normalize-audio-AN3KKSSK.js → normalize-audio-FO3JCPD3.js} +14 -14
  224. package/dist/{open-AHPOLDBY.js → open-ZI6KK3GM.js} +23 -22
  225. package/dist/{parakeetRunner-4URDK3H4.js → parakeetRunner-CBO3HRL6.js} +19 -18
  226. package/dist/{pipeline-O5UWLQDZ.js → pipeline-VWVNH5ZC.js} +14 -13
  227. package/dist/{plan-SUV7WBBJ.js → plan-UHZYW3K2.js} +27 -26
  228. package/dist/{play-LHMMHUUN.js → play-IVTXE4JW.js} +34 -33
  229. package/dist/{preflight-FLSEP55G.js → preflight-QJNKKMPE.js} +14 -13
  230. package/dist/{present-VEDXFFPZ.js → present-NB6DAJ6K.js} +28 -27
  231. package/dist/{preview-FXNPXOJL.js → preview-FIWAZ5PX.js} +37 -35
  232. package/dist/{probe-P6LUMX34.js → probe-VQJOUG65.js} +18 -17
  233. package/dist/{producer-SWV2GP4I.js → producer-NP6X5UBL.js} +1 -1
  234. package/dist/{projectConfig-EPOIXMHL.js → projectConfig-UVA26HJW.js} +11 -11
  235. package/dist/{publication-SIGMWEK3.js → publication-LYPU7NTZ.js} +5 -5
  236. package/dist/{publish-EVCYPK6H.js → publish-MRQ2K62E.js} +28 -28
  237. package/dist/{refresh-PIFEWEAL.js → refresh-X5ZLKQO5.js} +1 -1
  238. package/dist/{remove-background-AFXDE5YR.js → remove-background-RG6DCWOW.js} +15 -14
  239. package/dist/{render-MENZ6KS5.js → render-6B7YPN7H.js} +46 -42
  240. package/dist/{render-BCKSDBLK.js → render-CM4MCNVA.js} +6 -6
  241. package/dist/{render-DFUMSKVQ.js → render-XWBMMSC5.js} +60 -54
  242. package/dist/{render-batch-DPT67NDL.js → render-batch-Y3RRNDNJ.js} +7 -7
  243. package/dist/renderSetupWorker.js +6 -6
  244. package/dist/{resolver-EE3255VM.js → resolver-K6VAEZVH.js} +8 -8
  245. package/dist/{reverse-TA73U7V6.js → reverse-5RDRLKAP.js} +1 -1
  246. package/dist/{run-Y2ISHW5P.js → run-OQK3QU4I.js} +9 -6
  247. package/dist/{sam-EGFXZF56.js → sam-A4NXDWSU.js} +4 -1
  248. package/dist/{screenshotCapture-CEEBQ3FU.js → screenshotCapture-VDITRAK2.js} +14 -13
  249. package/dist/{service-6P6QVFNF.js → service-C3UT4LYP.js} +18 -17
  250. package/dist/{share-Q25X6AIX.js → share-JU3IDHUV.js} +23 -22
  251. package/dist/{sherpa-PPSJ23WI.js → sherpa-Z2Z4XLXV.js} +18 -17
  252. package/dist/sherpaWorker.js +3 -3
  253. package/dist/skills/hyperframes-cli/references/cloud.md +1 -1
  254. package/dist/skills/media-use/audio/references/requirements.md +7 -7
  255. package/dist/skills/media-use/audio/references/tts.md +6 -5
  256. package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +18 -72
  257. package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +51 -67
  258. package/dist/skills/media-use/references/heygen.md +1 -1
  259. package/dist/{skills-PVJJ3R2V.js → skills-24YEOJGP.js} +15 -14
  260. package/dist/{skillsUpdateCheck-L4TGSUN6.js → skillsUpdateCheck-5R4JJ27G.js} +6 -6
  261. package/dist/{snapshot-AIAJRR5C.js → snapshot-T4REEKFX.js} +72 -67
  262. package/dist/{src-O5P56HIK.js → src-EKGFNTTY.js} +18 -9
  263. package/dist/{src-UEH4H4UY.js → src-RMJVAEKT.js} +16 -15
  264. package/dist/{start-HY5WGCDN.js → start-E5RIH3KS.js} +32 -31
  265. package/dist/{staticProjectServer-WNKXSUBZ.js → staticProjectServer-LEM5W3S5.js} +28 -27
  266. package/dist/{status-AFDHSUGG.js → status-CSHJWWOP.js} +26 -26
  267. package/dist/studio/assets/{hyperframes-player-z7r-N5fm.js → hyperframes-player-BroIQA4E.js} +1 -1
  268. package/dist/studio/assets/{index-Dpo7Q_9-.js → index-Be7DZynj.js} +154 -154
  269. package/dist/studio/assets/{index-2QPHxCxy.js → index-CiF0D62S.js} +1 -1
  270. package/dist/studio/assets/{pausedVideoDecoder-BarDYEAf.js → pausedVideoDecoder-RXcvblHS.js} +1 -1
  271. package/dist/studio/index.html +1 -1
  272. package/dist/{studio-api-P72FA5XB.js → studio-api-COJYCMRI.js} +16 -15
  273. package/dist/{studioServer-RICH4NMX.js → studioServer-62ZTBLFM.js} +76 -73
  274. package/dist/{sync-J66DIXED.js → sync-CLRYHWYE.js} +18 -17
  275. package/dist/{synthesize-UKCQR7WW.js → synthesize-Z2H32QPU.js} +5 -5
  276. package/dist/{system-I5KGZTUG.js → system-2YOII5LZ.js} +3 -3
  277. package/dist/{telemetry-KOOKPGMR.js → telemetry-DWA36DFX.js} +10 -10
  278. package/dist/{templates-6DRGOTNH.js → templates-LXMQR35F.js} +22 -22
  279. package/dist/{timeline-UZX7366C.js → timeline-LMKTDKRT.js} +27 -26
  280. package/dist/{tokens-AU3BUE6U.js → tokens-VJ765KFG.js} +2 -2
  281. package/dist/{transcribe-OUTSVFRZ.js → transcribe-3WASFP7Z.js} +15 -14
  282. package/dist/{transcribe-CW5HK2OA.js → transcribe-TICRK4IY.js} +38 -37
  283. package/dist/{tts-X3MAUZ7E.js → tts-5YJV6UXX.js} +1 -1
  284. package/dist/{update-KRYJ6ACJ.js → update-Q26QGCBW.js} +17 -16
  285. package/dist/{updateCheck-WQVGQLCG.js → updateCheck-7R4S46TT.js} +5 -5
  286. package/dist/{upgrade-S54RPT3R.js → upgrade-76TFHAGI.js} +8 -8
  287. package/dist/{urlDownloader-MASRYSQX.js → urlDownloader-AE4UQI5A.js} +10 -9
  288. package/dist/{validate-4QVUHCYG.js → validate-BEYREWEL.js} +34 -33
  289. package/dist/{video-AEGOEGSP.js → video-47AVLNWM.js} +13 -12
  290. package/dist/{voices-T4U7EU5X.js → voices-5O6OAL6H.js} +31 -30
  291. package/dist/warmCheck.js +54 -53
  292. package/dist/warmCheckClient.js +2 -2
  293. package/package.json +1 -1
  294. package/dist/chunk-3FHPYC6X.js +0 -5069
  295. package/dist/privateProjectFile-NN7MTTEQ.js +0 -50
@@ -18,6 +18,9 @@ import {
18
18
  removeTreeBestEffort,
19
19
  removeTreeBestEffortAsync
20
20
  } from "./chunk-Z5J67X44.js";
21
+ import {
22
+ PREVIEW_FOR_ANOTHER_SITE_META
23
+ } from "./chunk-YXX6CIHL.js";
21
24
  import {
22
25
  alphaDecoderFor,
23
26
  pixelFormatHasAlpha,
@@ -33,7 +36,7 @@ import {
33
36
  removeScratch,
34
37
  renameWithRetry,
35
38
  renameWithRetryAsync
36
- } from "./chunk-DE3JRSGT.js";
39
+ } from "./chunk-KCF6Q54R.js";
37
40
  import {
38
41
  DISTRIBUTED_FPS,
39
42
  HF_COLOR_GROUP_ATTR,
@@ -63,7 +66,7 @@ import {
63
66
  resolveAuthoredTimingWindow,
64
67
  toFps,
65
68
  validateVariables
66
- } from "./chunk-FU2R6OVR.js";
69
+ } from "./chunk-4IUOWNDS.js";
67
70
  import {
68
71
  AUDIO_GROUP_RENDER_ID_ATTR,
69
72
  AUTHORED_SOURCE_BEGIN,
@@ -89,6 +92,7 @@ import {
89
92
  gainedVolumePoints,
90
93
  htmlInCanvasForm,
91
94
  injectScriptsIntoHtml,
95
+ injectTagsAtHeadStart,
92
96
  isAudibleVideoElement,
93
97
  isBentSegment,
94
98
  normalizeAudioFxParams,
@@ -107,11 +111,12 @@ import {
107
111
  sourceTimeAt,
108
112
  timeAtSourceTime,
109
113
  volumeSegmentSampleCount
110
- } from "./chunk-3FHPYC6X.js";
114
+ } from "./chunk-XGEJPKRY.js";
111
115
  import {
112
116
  isPrivateFileUnder,
113
- isVcsOrSecretPath
114
- } from "./chunk-XWK2RSD5.js";
117
+ isSafePath,
118
+ isStudioPrivatePath
119
+ } from "./chunk-KWTTELUY.js";
115
120
  import {
116
121
  browserPathFromEnv,
117
122
  buildChromeLaunchEnv,
@@ -123,7 +128,7 @@ import {
123
128
  } from "./chunk-LEIR7IDJ.js";
124
129
  import {
125
130
  resolveReferencedStart
126
- } from "./chunk-6F4ZVQUX.js";
131
+ } from "./chunk-UV3I2TND.js";
127
132
  import {
128
133
  isWithinProjectRoot,
129
134
  resolveProjectRelativeSrc
@@ -136,7 +141,7 @@ import {
136
141
  hostCpuCount,
137
142
  isLowMemorySystem,
138
143
  usableCpuCount
139
- } from "./chunk-U3LWQGCD.js";
144
+ } from "./chunk-L27Z3PZT.js";
140
145
  import {
141
146
  isPathInside
142
147
  } from "./chunk-IH2C53YV.js";
@@ -164,7 +169,7 @@ import {
164
169
  FFPROBE_PATH_ENV,
165
170
  findFfBinary,
166
171
  findTrustedExecutable
167
- } from "./chunk-IU5DC4HP.js";
172
+ } from "./chunk-GWSMTN55.js";
168
173
 
169
174
  // ../engine/src/services/referenceBackground.ts
170
175
  var REFERENCE_BACKGROUND_FIELD = "reference_background";
@@ -5503,6 +5508,9 @@ var CA_BUNDLES = [
5503
5508
  ];
5504
5509
  var RECONNECT_ARGS = ["-rw_timeout", "30000000", "-reconnect", "1", "-reconnect_delay_max", "2"];
5505
5510
  var SELF_CONTAINED_FORMATS = "mov,matroska,mxf,avi,mpeg,mpegts,mpegvideo,flv,asf,ogg,wav,mp3,aac,flac,aiff,gif,image2,png_pipe,jpeg_pipe,webp_pipe,bmp_pipe,tiff_pipe";
5511
+ function selfContainedFormatArgs() {
5512
+ return resolveRestrictPageNetwork() ? ["-format_whitelist", SELF_CONTAINED_FORMATS] : [];
5513
+ }
5506
5514
  function urlInputArgs(input, {
5507
5515
  tool = "ffmpeg",
5508
5516
  caBundles = CA_BUNDLES
@@ -5515,7 +5523,7 @@ function urlInputArgs(input, {
5515
5523
  );
5516
5524
  }
5517
5525
  const networkRetry = tool === "ffmpeg" ? ["-reconnect_on_network_error", "1"] : [];
5518
- const renderServiceLimits = resolveRestrictPageNetwork() ? ["-protocol_whitelist", "https,tls,tcp", "-format_whitelist", SELF_CONTAINED_FORMATS] : [];
5526
+ const renderServiceLimits = resolveRestrictPageNetwork() ? ["-protocol_whitelist", "https,tls,tcp", ...selfContainedFormatArgs()] : [];
5519
5527
  return [
5520
5528
  "-tls_verify",
5521
5529
  "1",
@@ -12415,7 +12423,7 @@ function isMemberGroupHidden(groupsById, el) {
12415
12423
  }
12416
12424
 
12417
12425
  // ../engine/src/services/videoFrameExtractor.ts
12418
- import { copyFileSync as copyFileSync2, existsSync as existsSync10, linkSync as linkSync2, mkdirSync as mkdirSync6, rmSync as rmSync5 } from "fs";
12426
+ import { copyFileSync as copyFileSync2, existsSync as existsSync11, linkSync as linkSync2, mkdirSync as mkdirSync6, rmSync as rmSync5 } from "fs";
12419
12427
  import { basename as basename2, isAbsolute as isAbsolute2, join as join13, normalize, relative as relative2, win32 } from "path";
12420
12428
 
12421
12429
  // ../engine/src/utils/concurrencyLimit.ts
@@ -12448,6 +12456,13 @@ function createConcurrencyLimit(limit) {
12448
12456
  };
12449
12457
  }
12450
12458
 
12459
+ // ../engine/src/utils/assetRoots.ts
12460
+ import { existsSync as existsSync8 } from "fs";
12461
+ function isInsideAssetRoots(path, roots) {
12462
+ if (roots.some((root) => isSafePath(root, path))) return true;
12463
+ return !existsSync8(path) && roots.some((root) => isWithinProjectRoot(root, path));
12464
+ }
12465
+
12451
12466
  // ../engine/src/services/mediaTimelineWindow.ts
12452
12467
  function isKnownInactiveTimelineWindow(element, resolvedStart) {
12453
12468
  const duration = parseStrictFiniteTimingNumber(element.getAttribute("data-duration"));
@@ -12509,29 +12524,6 @@ function inputAlphaOpaqueWarning(src) {
12509
12524
  `;
12510
12525
  }
12511
12526
 
12512
- // ../engine/src/utils/urlDownloader.ts
12513
- import {
12514
- closeSync as closeSync2,
12515
- createReadStream as createReadStream2,
12516
- createWriteStream,
12517
- existsSync as existsSync8,
12518
- fsyncSync,
12519
- linkSync,
12520
- mkdirSync as mkdirSync4,
12521
- lstatSync,
12522
- openSync as openSync2,
12523
- readdirSync as readdirSync4,
12524
- rmdirSync,
12525
- rmSync as rmSync3,
12526
- statSync as statSync5,
12527
- unlinkSync
12528
- } from "fs";
12529
- import { createHash as createHash2, randomUUID as randomUUID2 } from "crypto";
12530
- import dns from "dns";
12531
- import { dirname as dirname6, extname as extname2, join as join11 } from "path";
12532
- import { Readable, Transform } from "stream";
12533
- import { pipeline } from "stream/promises";
12534
-
12535
12527
  // ../engine/src/utils/notMediaPayload.ts
12536
12528
  import { createHash } from "crypto";
12537
12529
  import { constants } from "fs";
@@ -12605,13 +12597,51 @@ async function readHead(filePath) {
12605
12597
  const fh = await openRegular(filePath);
12606
12598
  if (!fh) return null;
12607
12599
  try {
12608
- return await readAt(fh, SNIFF_BYTES, 0);
12600
+ const { size } = await fh.stat();
12601
+ return { head: await readAt(fh, SNIFF_BYTES, 0), fileSize: size };
12609
12602
  } finally {
12610
12603
  await fh.close().catch(() => {
12611
12604
  });
12612
12605
  }
12613
12606
  }
12614
- function startsWithDocumentByte(head) {
12607
+ var FIRST_BOX_TYPES = /* @__PURE__ */ new Set([
12608
+ "ftyp",
12609
+ "styp",
12610
+ "free",
12611
+ "skip",
12612
+ "wide",
12613
+ "uuid",
12614
+ "pdin",
12615
+ "moov",
12616
+ "mdat",
12617
+ "moof"
12618
+ ]);
12619
+ var BOX_TYPE = /^[\x21-\x7e\xa9][\x21-\x7e]{3}$/;
12620
+ function boxLength(head, offset) {
12621
+ const size = head.readUInt32BE(offset);
12622
+ if (size !== 1) return size >= 8 ? size : -1;
12623
+ if (offset + 16 > head.length) return -1;
12624
+ const largeSize = Number(head.readBigUInt64BE(offset + 8));
12625
+ return largeSize >= 16 ? largeSize : -1;
12626
+ }
12627
+ function boxEnd(head, offset, fileSize) {
12628
+ if (offset + 8 > head.length || !BOX_TYPE.test(head.toString("latin1", offset + 4, offset + 8))) {
12629
+ return -1;
12630
+ }
12631
+ if (head.readUInt32BE(offset) === 0) return fileSize;
12632
+ const length = boxLength(head, offset);
12633
+ return length >= 0 && offset + length <= fileSize ? offset + length : -1;
12634
+ }
12635
+ function opensWithMediaBox(head, fileSize) {
12636
+ if (!FIRST_BOX_TYPES.has(head.toString("latin1", 4, 8))) return false;
12637
+ let offset = boxEnd(head, 0, fileSize);
12638
+ while (offset >= 0 && offset < fileSize && offset + 16 <= head.length) {
12639
+ offset = boxEnd(head, offset, fileSize);
12640
+ }
12641
+ return offset >= 0;
12642
+ }
12643
+ function startsWithDocumentByte(head, fileSize) {
12644
+ if (opensWithMediaBox(head, fileSize)) return false;
12615
12645
  for (let index = byteOrderMarkLength(head); index < head.length; index++) {
12616
12646
  const byte = head[index];
12617
12647
  if (byte === void 0) break;
@@ -12622,8 +12652,8 @@ function startsWithDocumentByte(head) {
12622
12652
  }
12623
12653
  async function isNotMediaPayload(filePath) {
12624
12654
  try {
12625
- const head = await readHead(filePath);
12626
- return !head || startsWithDocumentByte(head) || await playlistLeavesItsFolder(filePath);
12655
+ const sniffed = await readHead(filePath);
12656
+ return !sniffed || startsWithDocumentByte(sniffed.head, sniffed.fileSize) || await playlistLeavesItsFolder(filePath);
12627
12657
  } catch {
12628
12658
  return false;
12629
12659
  }
@@ -12786,6 +12816,28 @@ async function entryLeaves(entry, base, walk, depth) {
12786
12816
  }
12787
12817
 
12788
12818
  // ../engine/src/utils/urlDownloader.ts
12819
+ import {
12820
+ closeSync as closeSync2,
12821
+ createReadStream as createReadStream2,
12822
+ createWriteStream,
12823
+ existsSync as existsSync9,
12824
+ fsyncSync,
12825
+ linkSync,
12826
+ mkdirSync as mkdirSync4,
12827
+ lstatSync,
12828
+ openSync as openSync2,
12829
+ readdirSync as readdirSync4,
12830
+ rmdirSync,
12831
+ rmSync as rmSync3,
12832
+ statSync as statSync5,
12833
+ statfsSync,
12834
+ unlinkSync
12835
+ } from "fs";
12836
+ import { createHash as createHash2, randomUUID as randomUUID2 } from "crypto";
12837
+ import dns from "dns";
12838
+ import { dirname as dirname6, extname as extname2, join as join11 } from "path";
12839
+ import { Readable, Transform } from "stream";
12840
+ import { pipeline } from "stream/promises";
12789
12841
  var inFlightDownloads = /* @__PURE__ */ new Map();
12790
12842
  var signalScopes = /* @__PURE__ */ new WeakMap();
12791
12843
  var nextSignalScope = 1;
@@ -13343,7 +13395,10 @@ function checksumMismatchError(source, status, telemetry) {
13343
13395
  true
13344
13396
  );
13345
13397
  }
13346
- var DEFAULT_MAX_DOWNLOAD_BYTES = 20 * 1024 ** 3;
13398
+ var DEFAULT_MAX_DOWNLOAD_BYTES = 8 * 1024 ** 3;
13399
+ var DEFAULT_MAX_DOWNLOAD_MS = 30 * 60 * 1e3;
13400
+ var DEFAULT_DOWNLOAD_MIN_FREE_BYTES = 512 * 1024 ** 2;
13401
+ var FREE_SPACE_CHECK_INTERVAL_BYTES = 4 * 1024 ** 2;
13347
13402
  var DEFAULT_MIN_DOWNLOAD_BYTES_PER_SEC = 32 * 1024;
13348
13403
  var THROUGHPUT_WINDOW_SECONDS = 60;
13349
13404
  function integerFromEnv(name, fallback, minimum) {
@@ -13354,6 +13409,65 @@ function integerFromEnv(name, fallback, minimum) {
13354
13409
  }
13355
13410
  var maxDownloadBytes = () => integerFromEnv("HYPERFRAMES_MAX_DOWNLOAD_BYTES", DEFAULT_MAX_DOWNLOAD_BYTES, 1);
13356
13411
  var minDownloadBytesPerSec = () => integerFromEnv("HYPERFRAMES_MIN_DOWNLOAD_BYTES_PER_SEC", DEFAULT_MIN_DOWNLOAD_BYTES_PER_SEC, 0);
13412
+ var maxDownloadMs = () => integerFromEnv("HYPERFRAMES_MAX_DOWNLOAD_MS", DEFAULT_MAX_DOWNLOAD_MS, 1);
13413
+ var downloadMinFreeBytes = () => integerFromEnv("HYPERFRAMES_DOWNLOAD_MIN_FREE_BYTES", DEFAULT_DOWNLOAD_MIN_FREE_BYTES, 0);
13414
+ function freeDiskBytes(path) {
13415
+ try {
13416
+ const stat = statfsSync(path);
13417
+ return stat.bavail * stat.bsize;
13418
+ } catch {
13419
+ return null;
13420
+ }
13421
+ }
13422
+ var unreceivedBytesByDevice = /* @__PURE__ */ new Map();
13423
+ var DiskHeadroomGuard = class {
13424
+ constructor(dir, minFreeBytes) {
13425
+ this.dir = dir;
13426
+ this.minFreeBytes = minFreeBytes;
13427
+ }
13428
+ dir;
13429
+ minFreeBytes;
13430
+ unreceivedBytes = 0;
13431
+ bytesSinceCheck = 0;
13432
+ device = 0;
13433
+ claim(declaredBytes) {
13434
+ if (this.minFreeBytes === 0) return true;
13435
+ this.device = statSync5(this.dir).dev;
13436
+ this.adjustUnreceived(declaredBytes);
13437
+ return this.keepsMinimum();
13438
+ }
13439
+ receive(byteCount) {
13440
+ if (this.minFreeBytes === 0) return true;
13441
+ this.adjustUnreceived(-Math.min(byteCount, this.unreceivedBytes));
13442
+ this.bytesSinceCheck += byteCount;
13443
+ if (this.bytesSinceCheck < FREE_SPACE_CHECK_INTERVAL_BYTES) return true;
13444
+ this.bytesSinceCheck = 0;
13445
+ return this.keepsMinimum();
13446
+ }
13447
+ release() {
13448
+ this.adjustUnreceived(-this.unreceivedBytes);
13449
+ }
13450
+ keepsMinimum() {
13451
+ const free = freeDiskBytes(this.dir);
13452
+ if (free === null) return true;
13453
+ return free - (unreceivedBytesByDevice.get(this.device) ?? 0) >= this.minFreeBytes;
13454
+ }
13455
+ adjustUnreceived(delta) {
13456
+ this.unreceivedBytes += delta;
13457
+ const total = (unreceivedBytesByDevice.get(this.device) ?? 0) + delta;
13458
+ if (total > 0) unreceivedBytesByDevice.set(this.device, total);
13459
+ else unreceivedBytesByDevice.delete(this.device);
13460
+ }
13461
+ };
13462
+ function lowDiskSpaceError(minFreeBytes, status, telemetry) {
13463
+ return new UrlDownloadError(
13464
+ "filesystem",
13465
+ false,
13466
+ `Download stopped: it would leave less than ${minFreeBytes} bytes free on the download volume`,
13467
+ status,
13468
+ telemetry
13469
+ );
13470
+ }
13357
13471
  function isCompressedEncoding(contentEncoding) {
13358
13472
  const encoding = contentEncoding?.trim().toLowerCase();
13359
13473
  return Boolean(encoding) && encoding !== "identity";
@@ -13396,7 +13510,7 @@ var ThroughputWindow = class {
13396
13510
  this.currentSecond = Math.max(second, this.currentSecond);
13397
13511
  }
13398
13512
  };
13399
- async function fetchToPartial(url, partialPath, controller, options, onBodyBytes) {
13513
+ async function fetchToPartial(url, partialPath, controller, options, onBodyBytes, headroom) {
13400
13514
  const { response, finalUrl } = await fetchWithValidatedRedirects(url, controller);
13401
13515
  const finalIdentity = safeDownloadUrlIdentity(finalUrl);
13402
13516
  const rangeDisposition = classifyRangeDisposition(response);
@@ -13473,6 +13587,13 @@ async function fetchToPartial(url, partialPath, controller, options, onBodyBytes
13473
13587
  expectedBytes: declaredLength
13474
13588
  });
13475
13589
  }
13590
+ if (!headroom.claim(declaredLength ?? 0)) {
13591
+ await cancelResponseBody(response);
13592
+ throw lowDiskSpaceError(headroom.minFreeBytes, response.status, {
13593
+ ...responseTelemetry,
13594
+ expectedBytes: declaredLength
13595
+ });
13596
+ }
13476
13597
  const expectedBytes = declaredLength;
13477
13598
  let receivedBytes = 0;
13478
13599
  const sha256 = createHash2("sha256");
@@ -13494,6 +13615,16 @@ async function fetchToPartial(url, partialPath, controller, options, onBodyBytes
13494
13615
  );
13495
13616
  return;
13496
13617
  }
13618
+ if (!headroom.receive(bytes.length)) {
13619
+ callback(
13620
+ lowDiskSpaceError(headroom.minFreeBytes, response.status, {
13621
+ ...responseTelemetry,
13622
+ expectedBytes,
13623
+ receivedBytes
13624
+ })
13625
+ );
13626
+ return;
13627
+ }
13497
13628
  sha256.update(bytes);
13498
13629
  md5.update(bytes);
13499
13630
  if (prefixBytes < 1024) {
@@ -13643,6 +13774,12 @@ async function runDownloadAttempt(url, localPath, timeoutMs, attempt, options, s
13643
13774
  }, timeoutMs);
13644
13775
  };
13645
13776
  armTimeout();
13777
+ const deadlineMs = maxDownloadMs();
13778
+ let pastDeadline = false;
13779
+ const deadlineId = setTimeout(() => {
13780
+ pastDeadline = true;
13781
+ controller.abort();
13782
+ }, deadlineMs);
13646
13783
  let sizedBodyStarted = false;
13647
13784
  const extendTimeout = () => {
13648
13785
  sizedBodyStarted = true;
@@ -13670,11 +13807,20 @@ async function runDownloadAttempt(url, localPath, timeoutMs, attempt, options, s
13670
13807
  throughput.record(byteCount, Date.now());
13671
13808
  };
13672
13809
  const identity = safeDownloadUrlIdentity(url);
13810
+ const headroom = new DiskHeadroomGuard(attemptDir, downloadMinFreeBytes());
13673
13811
  try {
13674
13812
  if (callerAborted) {
13675
13813
  throw new UrlDownloadError("cancelled", false, "Download cancelled");
13676
13814
  }
13677
- const integrity = await fetchToPartial(url, partialPath, controller, options, onBodyBytes);
13815
+ const integrity = await fetchToPartial(
13816
+ url,
13817
+ partialPath,
13818
+ controller,
13819
+ options,
13820
+ onBodyBytes,
13821
+ headroom
13822
+ );
13823
+ clearTimeout(deadlineId);
13678
13824
  clearTimeout(floorCheckId);
13679
13825
  if (await playlistLeavesItsFolder(partialPath, localPath)) {
13680
13826
  throw new UrlDownloadError(
@@ -13728,48 +13874,30 @@ async function runDownloadAttempt(url, localPath, timeoutMs, attempt, options, s
13728
13874
  });
13729
13875
  return localPath;
13730
13876
  } catch (error) {
13877
+ let classified;
13731
13878
  if (callerAborted) {
13732
- const classified2 = new UrlDownloadError("cancelled", false, "Download cancelled");
13733
- emitDownloadTelemetry(options, {
13734
- urlFingerprint: identity.urlFingerprint,
13735
- initialHost: identity.host,
13736
- attempt,
13737
- outcome: "attempt_failed",
13738
- failureKind: classified2.kind
13739
- });
13740
- throw classified2;
13741
- }
13742
- if (timedOut) {
13743
- const classified2 = new UrlDownloadError(
13879
+ classified = new UrlDownloadError("cancelled", false, "Download cancelled");
13880
+ } else if (pastDeadline) {
13881
+ classified = new UrlDownloadError(
13882
+ "timeout",
13883
+ false,
13884
+ `Download exceeded the ${deadlineMs / 1e3}s time limit`
13885
+ );
13886
+ } else if (timedOut) {
13887
+ classified = new UrlDownloadError(
13744
13888
  "timeout",
13745
13889
  true,
13746
13890
  sizedBodyStarted ? `Download stalled: no data for ${timeoutMs / 1e3}s` : `Download timeout after ${timeoutMs / 1e3}s`
13747
13891
  );
13748
- emitDownloadTelemetry(options, {
13749
- urlFingerprint: identity.urlFingerprint,
13750
- initialHost: identity.host,
13751
- attempt,
13752
- outcome: "attempt_failed",
13753
- failureKind: classified2.kind
13754
- });
13755
- throw classified2;
13756
- }
13757
- if (tooSlow) {
13758
- const classified2 = new UrlDownloadError(
13892
+ } else if (tooSlow) {
13893
+ classified = new UrlDownloadError(
13759
13894
  "timeout",
13760
13895
  true,
13761
13896
  `Download too slow: under ${minBytesPerSec} bytes/s over the last ${THROUGHPUT_WINDOW_SECONDS}s`
13762
13897
  );
13763
- emitDownloadTelemetry(options, {
13764
- urlFingerprint: identity.urlFingerprint,
13765
- initialHost: identity.host,
13766
- attempt,
13767
- outcome: "attempt_failed",
13768
- failureKind: classified2.kind
13769
- });
13770
- throw classified2;
13898
+ } else {
13899
+ classified = classifyDownloadFailure(error);
13771
13900
  }
13772
- const classified = classifyDownloadFailure(error);
13773
13901
  emitDownloadTelemetry(options, {
13774
13902
  urlFingerprint: identity.urlFingerprint,
13775
13903
  initialHost: identity.host,
@@ -13781,7 +13909,9 @@ async function runDownloadAttempt(url, localPath, timeoutMs, attempt, options, s
13781
13909
  throw classified;
13782
13910
  } finally {
13783
13911
  clearTimeout(timeoutId);
13912
+ clearTimeout(deadlineId);
13784
13913
  clearTimeout(floorCheckId);
13914
+ headroom.release();
13785
13915
  signal?.removeEventListener("abort", onCallerAbort);
13786
13916
  controller.abort();
13787
13917
  rmSync3(attemptDir, { recursive: true, force: true });
@@ -13914,7 +14044,7 @@ async function downloadToTemp(url, destDir, timeoutMs = 3e5, signal, onTransient
13914
14044
  if (inFlight) {
13915
14045
  return inFlight;
13916
14046
  }
13917
- if (!existsSync8(destDir)) {
14047
+ if (!existsSync9(destDir)) {
13918
14048
  mkdirSync4(destDir, { recursive: true });
13919
14049
  }
13920
14050
  const filename = getFilenameFromUrl(url, validationScope);
@@ -14018,7 +14148,7 @@ import { createHash as createHash4, randomUUID as randomUUID3 } from "crypto";
14018
14148
  import {
14019
14149
  chmodSync,
14020
14150
  createReadStream as createReadStream3,
14021
- existsSync as existsSync9,
14151
+ existsSync as existsSync10,
14022
14152
  lstatSync as lstatSync2,
14023
14153
  mkdirSync as mkdirSync5,
14024
14154
  readdirSync as readdirSync5,
@@ -14087,7 +14217,7 @@ function hasFrameFiles(dir) {
14087
14217
  function lookupCacheEntry(rootDir, input) {
14088
14218
  const keyHash = computeCacheKey(input);
14089
14219
  const dir = join12(rootDir, cacheEntryDirName(keyHash));
14090
- const complete = existsSync9(join12(dir, COMPLETE_SENTINEL)) && hasFrameFiles(dir);
14220
+ const complete = existsSync10(join12(dir, COMPLETE_SENTINEL)) && hasFrameFiles(dir);
14091
14221
  return { entry: { dir, keyHash }, hit: complete };
14092
14222
  }
14093
14223
  function partialCacheEntryDir(entry) {
@@ -14098,7 +14228,7 @@ function isTargetExistsRenameError(err) {
14098
14228
  return code === "EEXIST" || code === "ENOTEMPTY" || code === "EPERM";
14099
14229
  }
14100
14230
  function adoptPublishedWinner(entry, partialDir) {
14101
- if (!existsSync9(join12(entry.dir, COMPLETE_SENTINEL)) || !hasFrameFiles(entry.dir)) return null;
14231
+ if (!existsSync10(join12(entry.dir, COMPLETE_SENTINEL)) || !hasFrameFiles(entry.dir)) return null;
14102
14232
  removeDir(partialDir);
14103
14233
  return { dir: entry.dir, published: true };
14104
14234
  }
@@ -14328,6 +14458,12 @@ function tailFramesFromFinalFrame(input) {
14328
14458
  return count > 0 ? count : null;
14329
14459
  }
14330
14460
  var DOWNLOAD_SUBDIR = "_downloads";
14461
+ async function assertDownloadedVideoIsMedia(path, videoId, signal) {
14462
+ await assertMediaPayload(path, videoId);
14463
+ const formatLimit = selfContainedFormatArgs();
14464
+ if (formatLimit.length === 0) return;
14465
+ await runFfprobe(path, [...formatLimit, "-show_entries", "format=format_name"], signal);
14466
+ }
14331
14467
  var EXTRACT_CACHE_MIN_AGE_MS = 60 * 60 * 1e3;
14332
14468
  var GC_STALENESS_MS = 24 * 60 * 60 * 1e3;
14333
14469
  var SDR_TO_HDR_COLORSPACE_FILTER = "colorspace=all=bt2020:iall=bt709:range=tv";
@@ -14494,6 +14630,14 @@ function classifyVideoExtractionError(error) {
14494
14630
  diagnostic
14495
14631
  );
14496
14632
  }
14633
+ if (error instanceof NotMediaPayloadError) {
14634
+ return new VideoSourceExtractionError(
14635
+ "invalid_media",
14636
+ false,
14637
+ "Video source is a text document, not media",
14638
+ diagnostic
14639
+ );
14640
+ }
14497
14641
  if (lowered.includes("cancelled") || lowered.includes("aborted")) {
14498
14642
  return new VideoSourceExtractionError(
14499
14643
  "cancelled",
@@ -14955,7 +15099,7 @@ async function extractVideoFramesRangeUnredacted(videoPath, videoId, startTime,
14955
15099
  const fps = fpsToNumber(normalizedFps);
14956
15100
  const ffmpegFps = fpsToFfmpegArg(normalizedFps);
14957
15101
  const videoOutputDir = outputDirOverride ?? join13(outputDir, mediaIdPathSegment(videoId));
14958
- if (!existsSync10(videoOutputDir)) mkdirSync6(videoOutputDir, { recursive: true });
15102
+ if (!existsSync11(videoOutputDir)) mkdirSync6(videoOutputDir, { recursive: true });
14959
15103
  let metadata;
14960
15104
  try {
14961
15105
  metadata = await extractMediaMetadata(videoPath);
@@ -15570,6 +15714,16 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
15570
15714
  resolvedVideos.push({ video, videoPath: remoteUrl });
15571
15715
  continue;
15572
15716
  }
15717
+ const roots = options.assetRoots;
15718
+ if (!isHttpUrl(videoPath) && roots && !isInsideAssetRoots(videoPath, roots)) {
15719
+ errors.push({
15720
+ videoId: video.id,
15721
+ kind: "source_missing",
15722
+ retryable: false,
15723
+ error: `Video source is outside the project folder: ${video.src}`
15724
+ });
15725
+ continue;
15726
+ }
15573
15727
  if (isHttpUrl(videoPath)) {
15574
15728
  const downloadDir = join13(options.outputDir, DOWNLOAD_SUBDIR);
15575
15729
  mkdirSync6(downloadDir, { recursive: true });
@@ -15581,8 +15735,9 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
15581
15735
  () => recordTransientRetries(1),
15582
15736
  { onTelemetry: writeUrlDownloadTelemetry }
15583
15737
  );
15738
+ await assertDownloadedVideoIsMedia(videoPath, video.id, signal);
15584
15739
  }
15585
- if (!existsSync10(videoPath)) {
15740
+ if (!existsSync11(videoPath)) {
15586
15741
  if (!warnedSrcs.has(video.src)) {
15587
15742
  warnedSrcs.add(video.src);
15588
15743
  process.stderr.write(
@@ -16323,7 +16478,7 @@ var FrameLookupTable = class {
16323
16478
  cleanup() {
16324
16479
  for (const video of this.videos.values()) {
16325
16480
  if (video.extracted.ownedByLookup) continue;
16326
- if (existsSync10(video.extracted.outputDir)) {
16481
+ if (existsSync11(video.extracted.outputDir)) {
16327
16482
  rmSync5(video.extracted.outputDir, { recursive: true, force: true });
16328
16483
  }
16329
16484
  }
@@ -16870,7 +17025,7 @@ async function queryElementStacking(page, nativeHdrIds) {
16870
17025
  }
16871
17026
 
16872
17027
  // ../engine/src/services/audioMixer.ts
16873
- import { closeSync as closeSync4, existsSync as existsSync12, mkdirSync as mkdirSync7, openSync as openSync4, rmSync as rmSync7, writeFileSync as writeFileSync7 } from "fs";
17028
+ import { closeSync as closeSync4, existsSync as existsSync13, mkdirSync as mkdirSync7, openSync as openSync4, rmSync as rmSync7, writeFileSync as writeFileSync7 } from "fs";
16874
17029
  import { join as join17, dirname as dirname9, isAbsolute as isAbsolute3, relative as relative3 } from "path";
16875
17030
 
16876
17031
  // ../core/dist/audioFade.js
@@ -17498,7 +17653,7 @@ function chainTailSeconds(chain, automation) {
17498
17653
  // ../engine/src/services/audioFxRender.ts
17499
17654
  import {
17500
17655
  closeSync as closeSync3,
17501
- existsSync as existsSync11,
17656
+ existsSync as existsSync12,
17502
17657
  mkdtempSync as mkdtempSync4,
17503
17658
  openSync as openSync3,
17504
17659
  readFileSync as readFileSync8,
@@ -17808,7 +17963,7 @@ async function renderInSegments(openPage, inputWav, header, chain, outputWav, op
17808
17963
  }
17809
17964
  async function applyAudioFxChain(inputWav, chain, outputWav, options) {
17810
17965
  if (enabledAudioFxNodes(chain).length === 0) return { path: inputWav, envelopeBaked: false };
17811
- if (!existsSync11(inputWav)) {
17966
+ if (!existsSync12(inputWav)) {
17812
17967
  throw new AudioFxRenderError(`Audio FX input is missing: ${inputWav}`);
17813
17968
  }
17814
17969
  const limits = { ...DEFAULT_STREAMING_LIMITS, ...options.streaming };
@@ -18345,7 +18500,7 @@ var SIDECAR_WARM_UP_SECONDS = 1;
18345
18500
  async function extractAudioSegment(srcPath, outputPath, stage, mediaStart, duration, playbackRate = 1, signal, config, audioSidecarUrl, options) {
18346
18501
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
18347
18502
  const outputDir = dirname9(outputPath);
18348
- if (!existsSync12(outputDir)) mkdirSync7(outputDir, { recursive: true });
18503
+ if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
18349
18504
  const normalizedPlaybackRate = normalizeRateSpec(playbackRate);
18350
18505
  const sourceDuration = sourceTimeAt(normalizedPlaybackRate, duration);
18351
18506
  const readsUrl = isHttpUrl(srcPath);
@@ -18491,7 +18646,7 @@ function isRemoteElement(element, baseDir, compiledDir, config) {
18491
18646
  async function generateSilence(outputPath, duration, signal, config) {
18492
18647
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
18493
18648
  const outputDir = dirname9(outputPath);
18494
- if (!existsSync12(outputDir)) mkdirSync7(outputDir, { recursive: true });
18649
+ if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
18495
18650
  const args = [
18496
18651
  "-f",
18497
18652
  "lavfi",
@@ -18545,7 +18700,7 @@ async function mixAudioTracksFlat(tracks, outputPath, totalDuration, signal, con
18545
18700
  };
18546
18701
  }
18547
18702
  const outputDir = dirname9(outputPath);
18548
- if (!existsSync12(outputDir)) mkdirSync7(outputDir, { recursive: true });
18703
+ if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
18549
18704
  const buildFilterComplex = (ignoreAutomation, useNormalize2) => {
18550
18705
  const filterParts = [];
18551
18706
  tracks.forEach((track, i) => {
@@ -18654,7 +18809,7 @@ function groupNormalizeOptionUnsupported(stderr) {
18654
18809
  async function mixGroupMembersFlat(memberTracks, outputPath, totalDuration, signal, config) {
18655
18810
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
18656
18811
  const outputDir = dirname9(outputPath);
18657
- if (!existsSync12(outputDir)) mkdirSync7(outputDir, { recursive: true });
18812
+ if (!existsSync13(outputDir)) mkdirSync7(outputDir, { recursive: true });
18658
18813
  const buildInputFilters = (ignoreKeyframes, padMembers) => memberTracks.map((track, i) => {
18659
18814
  const volumeFilter = buildVolumeExpression(track, ignoreKeyframes);
18660
18815
  return buildTrackInputFilter(track, i, volumeFilter, totalDuration, padMembers);
@@ -18881,7 +19036,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
18881
19036
  const failures = [];
18882
19037
  const groupTracks = /* @__PURE__ */ new Map();
18883
19038
  const groupMeta = /* @__PURE__ */ new Map();
18884
- if (!existsSync12(workDir)) mkdirSync7(workDir, { recursive: true });
19039
+ if (!existsSync13(workDir)) mkdirSync7(workDir, { recursive: true });
18885
19040
  const internalController = new AbortController();
18886
19041
  const effectiveSignal = internalController.signal;
18887
19042
  if (signal) {
@@ -18913,6 +19068,18 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
18913
19068
  audioSidecarUrl = config?.audioSidecarUrlByLocalPath?.get(srcPath);
18914
19069
  srcPath = remoteUrl;
18915
19070
  readInPlace = true;
19071
+ } else if (config?.assetRoots && !isInsideAssetRoots(srcPath, config.assetRoots)) {
19072
+ failures.push({
19073
+ stage: "source",
19074
+ reason: "source_not_found",
19075
+ owner: "user",
19076
+ retryable: false,
19077
+ elementId: element.id,
19078
+ detail: boundedDetail(
19079
+ `Audio element ${element.id} source is outside the project folder`
19080
+ )
19081
+ });
19082
+ return;
18916
19083
  }
18917
19084
  }
18918
19085
  if (isHttpUrl(srcPath) && !readInPlace) {
@@ -18932,7 +19099,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
18932
19099
  return;
18933
19100
  }
18934
19101
  }
18935
- if (!readInPlace && !existsSync12(srcPath)) {
19102
+ if (!readInPlace && !existsSync13(srcPath)) {
18936
19103
  failures.push({
18937
19104
  stage: "source",
18938
19105
  reason: "source_not_found",
@@ -19298,7 +19465,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
19298
19465
 
19299
19466
  // ../engine/src/services/parallelCoordinator.ts
19300
19467
  import { freemem } from "os";
19301
- import { existsSync as existsSync13, mkdirSync as mkdirSync8, readdirSync as readdirSync6 } from "fs";
19468
+ import { existsSync as existsSync14, mkdirSync as mkdirSync8, readdirSync as readdirSync6 } from "fs";
19302
19469
  import { copyFile, readFile as readFile2 } from "fs/promises";
19303
19470
  import { join as join19 } from "path";
19304
19471
  import { getHeapStatistics } from "v8";
@@ -19796,7 +19963,7 @@ async function verifyDiskDrawElementSamples(session, task, streaming) {
19796
19963
  async function executeWorkerTask(task, serverUrl, captureOptions, createBeforeCaptureHook, signal, onFrameCaptured, onFrameBuffer, config, parallel, onFailure, onWorkerPhase, onWorkerOperation, gate) {
19797
19964
  const startTime = Date.now();
19798
19965
  let framesCaptured = 0;
19799
- if (!existsSync13(task.outputDir)) mkdirSync8(task.outputDir, { recursive: true });
19966
+ if (!existsSync14(task.outputDir)) mkdirSync8(task.outputDir, { recursive: true });
19800
19967
  let session = null;
19801
19968
  let perf;
19802
19969
  const needsSeparateBrowsers = shouldDisableBrowserPoolForParallelWorker({ parallel });
@@ -20051,11 +20218,11 @@ async function executeParallelCapture(serverUrl, workDir, tasks, captureOptions,
20051
20218
  return results;
20052
20219
  }
20053
20220
  async function mergeWorkerFrames(workDir, tasks, outputDir) {
20054
- if (!existsSync13(outputDir)) mkdirSync8(outputDir, { recursive: true });
20221
+ if (!existsSync14(outputDir)) mkdirSync8(outputDir, { recursive: true });
20055
20222
  let totalFrames = 0;
20056
20223
  const sortedTasks = [...tasks].sort((a, b) => a.startFrame - b.startFrame);
20057
20224
  for (const task of sortedTasks) {
20058
- if (!existsSync13(task.outputDir)) {
20225
+ if (!existsSync14(task.outputDir)) {
20059
20226
  continue;
20060
20227
  }
20061
20228
  const files = readdirSync6(task.outputDir).filter((f) => f.startsWith("frame_") && (f.endsWith(".jpg") || f.endsWith(".png"))).sort();
@@ -20087,6 +20254,28 @@ import { Hono } from "hono";
20087
20254
  import { serve } from "@hono/node-server";
20088
20255
  import { readFileSync as readFileSync9, openSync as openSync5, fstatSync, closeSync as closeSync5, statSync as statSync8, constants as constants2 } from "fs";
20089
20256
  import { join as join20, extname as extname3 } from "path";
20257
+ import { hostname as machineName, networkInterfaces } from "os";
20258
+
20259
+ // ../engine/src/utils/loopbackOnly.ts
20260
+ function isOwnLoopbackHost(host, port) {
20261
+ const name = host?.toLowerCase();
20262
+ return name === `127.0.0.1:${port}` || name === `localhost:${port}` || name === `[::1]:${port}`;
20263
+ }
20264
+ var SAME_ORIGIN_FRAMING_HEADERS = {
20265
+ "Content-Security-Policy": "frame-ancestors 'self'",
20266
+ "X-Frame-Options": "SAMEORIGIN"
20267
+ };
20268
+ function answerOwnLoopbackHostOnly(app, boundPort) {
20269
+ app.use(async function refuseForeignHostAndFraming(c, next) {
20270
+ if (!isOwnLoopbackHost(c.req.header("host"), boundPort())) return c.text("Forbidden", 403);
20271
+ await next();
20272
+ for (const [name, value] of Object.entries(SAME_ORIGIN_FRAMING_HEADERS)) {
20273
+ c.res.headers.set(name, value);
20274
+ }
20275
+ });
20276
+ }
20277
+
20278
+ // ../engine/src/services/fileServer.ts
20090
20279
  var MIME_TYPES = {
20091
20280
  ".html": "text/html; charset=utf-8",
20092
20281
  ".css": "text/css; charset=utf-8",
@@ -20135,13 +20324,38 @@ function readRegularFile(filePath) {
20135
20324
  function resolveContainedPaths(projectDir, compiledDir, relativePath) {
20136
20325
  const projectPath = join20(projectDir, relativePath);
20137
20326
  if (!isWithinProjectRoot(projectDir, projectPath)) return null;
20138
- if (isPrivateFileUnder(projectDir, projectPath, isVcsOrSecretPath)) return null;
20327
+ if (isPrivateFileUnder(projectDir, projectPath, isStudioPrivatePath)) return null;
20139
20328
  if (!compiledDir) return { projectPath, compiledPath: null };
20140
20329
  const compiledPath = join20(compiledDir, relativePath);
20141
20330
  if (!isWithinProjectRoot(compiledDir, compiledPath)) return null;
20142
- if (isPrivateFileUnder(compiledDir, compiledPath, isVcsOrSecretPath)) return null;
20331
+ if (isPrivateFileUnder(compiledDir, compiledPath, isStudioPrivatePath)) return null;
20143
20332
  return { projectPath, compiledPath };
20144
20333
  }
20334
+ var OFFER_NO_FRAMING_SITE_AN_EDITING_PORT = `<meta name="${PREVIEW_FOR_ANOTHER_SITE_META}">`;
20335
+ function nameInHost(host) {
20336
+ const bracketed = /^\[([^\]]+)\]/.exec(host);
20337
+ return (bracketed ? bracketed[1] : host.split(":")[0])?.toLowerCase() ?? "";
20338
+ }
20339
+ function isLoopbackName(name) {
20340
+ return name === "localhost" || name === "::1" || /^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(name);
20341
+ }
20342
+ function thisMachinesNames() {
20343
+ const names = /* @__PURE__ */ new Set([machineName().toLowerCase()]);
20344
+ for (const entries of Object.values(networkInterfaces())) {
20345
+ for (const entry of entries ?? []) names.add(entry.address.toLowerCase());
20346
+ }
20347
+ return names;
20348
+ }
20349
+ function hostAllowedFor(bound) {
20350
+ const boundName = bound.replace(/^\[|\]$/g, "").toLowerCase();
20351
+ const wildcard = boundName === "0.0.0.0" || boundName === "::";
20352
+ return (host) => {
20353
+ const name = host ? nameInHost(host) : "";
20354
+ if (name === "") return false;
20355
+ if (isLoopbackName(name) || name === boundName) return true;
20356
+ return wildcard && thisMachinesNames().has(name);
20357
+ };
20358
+ }
20145
20359
  function createFileServer(options) {
20146
20360
  const {
20147
20361
  projectDir,
@@ -20153,6 +20367,16 @@ function createFileServer(options) {
20153
20367
  const headScripts = options.headScripts ?? [];
20154
20368
  const bodyScripts = options.bodyScripts ?? [];
20155
20369
  const app = new Hono();
20370
+ let listeningPort = -1;
20371
+ const boundToLoopbackOnly = ["127.0.0.1", "localhost", "::1"].includes(hostname);
20372
+ if (boundToLoopbackOnly) answerOwnLoopbackHostOnly(app, () => listeningPort);
20373
+ if (!boundToLoopbackOnly) {
20374
+ const hostAllowed = hostAllowedFor(hostname);
20375
+ app.use(async function refuseHostNotServedHere(c, next) {
20376
+ if (hostAllowed(c.req.header("host") ?? new URL(c.req.url).host)) return next();
20377
+ return c.text("Forbidden: unknown host", 403);
20378
+ });
20379
+ }
20156
20380
  app.get("/*", (c) => {
20157
20381
  let requestPath = c.req.path;
20158
20382
  if (requestPath === "/") requestPath = "/index.html";
@@ -20166,7 +20390,9 @@ function createFileServer(options) {
20166
20390
  if (ext === ".html") {
20167
20391
  const rawHtml = content.toString("utf-8");
20168
20392
  const html = relativePath === "index.html" ? injectScriptsIntoHtml(rawHtml, headScripts, bodyScripts, stripEmbeddedRuntime) : rawHtml;
20169
- return c.text(html, 200, { "Content-Type": contentType });
20393
+ return c.text(injectTagsAtHeadStart(html, OFFER_NO_FRAMING_SITE_AN_EDITING_PORT), 200, {
20394
+ "Content-Type": contentType
20395
+ });
20170
20396
  }
20171
20397
  return new Response(content, {
20172
20398
  status: 200,
@@ -20176,6 +20402,7 @@ function createFileServer(options) {
20176
20402
  return new Promise((resolve3) => {
20177
20403
  const server = serve({ fetch: app.fetch, port, hostname }, (info) => {
20178
20404
  const actualPort = info.port;
20405
+ listeningPort = actualPort;
20179
20406
  const url = `http://localhost:${actualPort}`;
20180
20407
  resolve3({
20181
20408
  url,
@@ -20696,6 +20923,7 @@ export {
20696
20923
  HF_AUDIO_GROUP_TAG,
20697
20924
  HF_AUDIO_GROUP_ATTR,
20698
20925
  isSelfOrAncestorHidden,
20926
+ isInsideAssetRoots,
20699
20927
  NOT_MEDIA_PAYLOAD,
20700
20928
  NotMediaPayloadError,
20701
20929
  fingerprintElementId,
@@ -20777,6 +21005,9 @@ export {
20777
21005
  executeParallelCapture,
20778
21006
  mergeWorkerFrames,
20779
21007
  getSystemResources,
21008
+ isOwnLoopbackHost,
21009
+ SAME_ORIGIN_FRAMING_HEADERS,
21010
+ answerOwnLoopbackHostOnly,
20780
21011
  createFileServer,
20781
21012
  groupIntoLayers,
20782
21013
  diffGpuParityFrames,