hyperframes 0.8.224 → 0.8.226

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 (224) hide show
  1. package/dist/{add-JEPKJ2F4.js → add-3NBOSGKQ.js} +12 -12
  2. package/dist/{agentPromptGenerator-ZBNWLX5D.js → agentPromptGenerator-GQSDTAV5.js} +7 -7
  3. package/dist/{animatedGifPrep-43LLMTN5.js → animatedGifPrep-UXFFDGA7.js} +7 -7
  4. package/dist/api.js +23 -23
  5. package/dist/{asset-M6SH6PUW.js → asset-VQVAYC7E.js} +2 -2
  6. package/dist/{assetCataloger-BLQ7UVJ5.js → assetCataloger-C6KNE2IQ.js} +8 -8
  7. package/dist/{audio-J3QREJK4.js → audio-2KULGXHA.js} +17 -17
  8. package/dist/{auth-7TRCBCKA.js → auth-QNMLPJOW.js} +5 -5
  9. package/dist/{autoUpdate-WTFSYLTK.js → autoUpdate-VFQQ47UD.js} +2 -2
  10. package/dist/{backgroundChecks-YZW7AMMJ.js → backgroundChecks-SSQ2U3ZY.js} +3 -3
  11. package/dist/backgroundChecksWorker.js +3 -3
  12. package/dist/{batchRender-LDZ6NO2X.js → batchRender-Y45PZC3Q.js} +3 -3
  13. package/dist/{beats-JWUADKHV.js → beats-YSJT4NUG.js} +10 -10
  14. package/dist/{benchmark-QOQZ7UGD.js → benchmark-6UOMMUXF.js} +9 -9
  15. package/dist/{billing-3GVNEE56.js → billing-WNOAP6KO.js} +4 -4
  16. package/dist/{browser-4HNCSPUR.js → browser-GM4ZTCRQ.js} +4 -4
  17. package/dist/{bundleWithLocalizedFonts-GTKHB45M.js → bundleWithLocalizedFonts-CUTSKVRK.js} +2 -2
  18. package/dist/{capture-5OYZNIOR.js → capture-J24XSJTZ.js} +17 -17
  19. package/dist/{capture-XSRWYHAM.js → capture-SZ65WG5Z.js} +3 -3
  20. package/dist/{captureCompositionFrame-4F7PPQKB.js → captureCompositionFrame-5UUXIOF2.js} +13 -12
  21. package/dist/{catalog-4FVQSID5.js → catalog-5EQFE3BC.js} +12 -12
  22. package/dist/{catch-up-KQVK2QZC.js → catch-up-ASBRKHDL.js} +5 -5
  23. package/dist/{check-3YHLB6FM.js → check-BA4SSXPY.js} +39 -38
  24. package/dist/{checkAudio-7ZSZVBSJ.js → checkAudio-TU4GPHIR.js} +10 -10
  25. package/dist/{checkBrowser-VX5CHNQS.js → checkBrowser-27SFNNPD.js} +33 -32
  26. package/dist/chunk-262C25DQ.js +31 -0
  27. package/dist/{chunk-AKMY4QVI.js → chunk-2GTFW4MK.js} +9 -1
  28. package/dist/{chunk-2QQO3J3B.js → chunk-2IQONCMF.js} +7 -7
  29. package/dist/{chunk-OZMZFJDW.js → chunk-2JBCK6DX.js} +1 -1
  30. package/dist/{chunk-K3QT232E.js → chunk-35LAWHTD.js} +23 -6
  31. package/dist/{chunk-GLTSINRP.js → chunk-37PS2IPO.js} +1 -1
  32. package/dist/{chunk-2WVQ3CCN.js → chunk-3V3XMQEF.js} +1 -1
  33. package/dist/{chunk-7RTPHNOO.js → chunk-3XYDZQJF.js} +7 -4
  34. package/dist/{chunk-BEMGUGGJ.js → chunk-3ZWUNOTS.js} +1 -1
  35. package/dist/{chunk-RR5QE7DB.js → chunk-4XYLQYUE.js} +18 -14
  36. package/dist/{chunk-Z7GIHPAZ.js → chunk-53ZOVLGJ.js} +2 -2
  37. package/dist/{chunk-F34GYYXO.js → chunk-5TXYCG4M.js} +6 -6
  38. package/dist/{chunk-BTK3T4HJ.js → chunk-5X65O5WM.js} +10 -3
  39. package/dist/{chunk-QOI46C6F.js → chunk-6AEHVBMX.js} +2 -2
  40. package/dist/{chunk-3ZDOAVZM.js → chunk-6CU2ZQGW.js} +147 -22
  41. package/dist/{chunk-L4ULTWCD.js → chunk-6EQSJ7MT.js} +1 -1
  42. package/dist/{chunk-VLA6UJGH.js → chunk-6NJVSTSY.js} +5 -6
  43. package/dist/{chunk-HDPW7THH.js → chunk-76N526VX.js} +13 -13
  44. package/dist/{chunk-3NHCTTLP.js → chunk-7LUZ4RQX.js} +13 -13
  45. package/dist/{chunk-NFUR6NNT.js → chunk-7UKRCWBO.js} +310 -134
  46. package/dist/{chunk-GE4ABM5K.js → chunk-7WNPWUJP.js} +3 -3
  47. package/dist/{chunk-RU7KMDFL.js → chunk-A23K6P7L.js} +1 -1
  48. package/dist/{chunk-MOXNAVCW.js → chunk-ABNPD4NF.js} +1 -1
  49. package/dist/{chunk-THL3N377.js → chunk-AMTAKSKJ.js} +9 -9
  50. package/dist/{chunk-UCPEABYK.js → chunk-APCGOECM.js} +2 -2
  51. package/dist/{chunk-CGX4EOGT.js → chunk-B243Y7MM.js} +3 -3
  52. package/dist/{chunk-A25SCSOK.js → chunk-B52P2FU2.js} +1 -1
  53. package/dist/{chunk-2KDHJCH2.js → chunk-B7OI3WAR.js} +1 -1
  54. package/dist/{chunk-J7FVF73D.js → chunk-BD2CQDXP.js} +18 -18
  55. package/dist/{chunk-JMP52GTN.js → chunk-BJ3Q3XK7.js} +313 -149
  56. package/dist/{chunk-H6APAFKE.js → chunk-CRIVUWLA.js} +2 -2
  57. package/dist/{chunk-5KAGTSLY.js → chunk-CU3SVSKX.js} +5 -5
  58. package/dist/{chunk-ZLZXGJ63.js → chunk-DGQOBTFQ.js} +1 -1
  59. package/dist/{chunk-53JEHQBW.js → chunk-DW7W4J7D.js} +2 -2
  60. package/dist/{chunk-GQ2QER6M.js → chunk-EJEHDDVX.js} +1 -1
  61. package/dist/{chunk-35NDLXHZ.js → chunk-EQGBGOQQ.js} +9 -9
  62. package/dist/{chunk-JKLWWGE6.js → chunk-ETH6WXKZ.js} +1 -1
  63. package/dist/{chunk-F3CTUCFD.js → chunk-EYDV3MHA.js} +7 -7
  64. package/dist/{chunk-HIPW4JXL.js → chunk-GADKBSZ5.js} +2 -2
  65. package/dist/{chunk-HT3D5AKG.js → chunk-GR2T3BOX.js} +6 -5
  66. package/dist/{chunk-X5BSSPC2.js → chunk-GUJ45PRX.js} +1 -1
  67. package/dist/chunk-HSXV7QPC.js +177 -0
  68. package/dist/{chunk-AMQFGICP.js → chunk-HYB3WSJL.js} +1 -1
  69. package/dist/{chunk-JIF347PW.js → chunk-JE5ZPFN2.js} +3 -3
  70. package/dist/{chunk-52B3AOIV.js → chunk-JIYNPDH6.js} +1 -1
  71. package/dist/{chunk-4ZAOAPWP.js → chunk-KQARKGEJ.js} +16 -11
  72. package/dist/{chunk-G45NYKSM.js → chunk-LVV5EUSO.js} +3 -3
  73. package/dist/{chunk-5N5FYE5K.js → chunk-MF6KVPWF.js} +3 -3
  74. package/dist/{chunk-6QIYQ43G.js → chunk-MWQNQA77.js} +2 -2
  75. package/dist/{chunk-F7T57BZZ.js → chunk-OMT75FQI.js} +3 -2
  76. package/dist/{chunk-VPMHRLJH.js → chunk-OQYGHP3E.js} +1 -1
  77. package/dist/{chunk-EQFDOQTG.js → chunk-OSCRZUEB.js} +1 -1
  78. package/dist/{chunk-E47ZWDMH.js → chunk-P7TDUSPH.js} +1 -1
  79. package/dist/{chunk-34GAW4GO.js → chunk-PCH3O6I6.js} +5 -5
  80. package/dist/{chunk-IYYQRNIZ.js → chunk-PHUTMTHB.js} +1 -1
  81. package/dist/{chunk-POOLZTMZ.js → chunk-PVBSCPZI.js} +3 -3
  82. package/dist/{chunk-MA5AQK7T.js → chunk-PWHOMCFB.js} +2 -2
  83. package/dist/{chunk-PKMAWQUI.js → chunk-PXSCN6X5.js} +4 -4
  84. package/dist/{chunk-HANNA5JJ.js → chunk-PZ6VVOOE.js} +1 -1
  85. package/dist/{chunk-JUF43Q7Q.js → chunk-QSWUM7WR.js} +3 -6
  86. package/dist/{chunk-O2VKGYSK.js → chunk-RBYSMHB7.js} +1 -1
  87. package/dist/{chunk-UZ5AWZCA.js → chunk-RKDMYKGL.js} +1 -1
  88. package/dist/{chunk-QK6ZNEBW.js → chunk-RRT5S42U.js} +1 -1
  89. package/dist/{chunk-SGMCQAYU.js → chunk-S4UDVFAN.js} +3 -3
  90. package/dist/{chunk-KEDN4LSV.js → chunk-TFJSU4IV.js} +2 -2
  91. package/dist/{chunk-W7MJPKBJ.js → chunk-U6LQ4BTL.js} +1 -1
  92. package/dist/{chunk-VCJE7IMY.js → chunk-UIJLEBHQ.js} +1 -1
  93. package/dist/{chunk-ODJ2WBZX.js → chunk-UXHGYMX4.js} +1 -1
  94. package/dist/{chunk-VXRBPWVW.js → chunk-V2N747YM.js} +7 -7
  95. package/dist/{chunk-QOYZ3U6G.js → chunk-V4SD6HQ6.js} +2 -3
  96. package/dist/{chunk-53TKUWDX.js → chunk-VB77RRT7.js} +1 -1
  97. package/dist/{chunk-IORJ42GY.js → chunk-VUDMPRZN.js} +5 -6
  98. package/dist/{chunk-E2ZY4GWH.js → chunk-WESIEW2M.js} +3 -25
  99. package/dist/{chunk-D4M37ATV.js → chunk-WGVREWKN.js} +2 -2
  100. package/dist/{chunk-FJ3KUOUZ.js → chunk-XCGPPU32.js} +1 -1
  101. package/dist/{chunk-2M6B2JKZ.js → chunk-XDTRM4OS.js} +4 -4
  102. package/dist/{chunk-JK2KNL6F.js → chunk-XH7SSJSQ.js} +1 -1
  103. package/dist/chunk-XINVBLXA.js +5030 -0
  104. package/dist/{chunk-7HSV5SJ4.js → chunk-XOFJZ3UG.js} +1 -1
  105. package/dist/{chunk-BAXL3U3T.js → chunk-Y2NSHQVE.js} +2 -2
  106. package/dist/{chunk-NI35PAVN.js → chunk-YTQSLNIA.js} +1 -1
  107. package/dist/{chunk-LRS4FV5W.js → chunk-Z257R7TN.js} +1 -1
  108. package/dist/{chunk-ZGQC6IU7.js → chunk-ZI64CTVC.js} +1 -1
  109. package/dist/{chunk-Y5HVDK7X.js → chunk-ZJE2XWQC.js} +2 -2
  110. package/dist/{chunk-652ERUZD.js → chunk-ZNXUM4D2.js} +2 -2
  111. package/dist/{clean-SXEI6FT4.js → clean-X5VL4ILR.js} +17 -17
  112. package/dist/cli.js +57 -57
  113. package/dist/{cloud-SKN6FWAZ.js → cloud-4GUUYRD3.js} +4 -4
  114. package/dist/{cloudrun-RHPVVXCR.js → cloudrun-KPL32MBI.js} +4 -4
  115. package/dist/{compare-RTXF2NSK.js → compare-CVEB5SQC.js} +30 -29
  116. package/dist/{compiler-SKRY6FPA.js → compiler-RRTQNBUH.js} +4 -4
  117. package/dist/{component-2NPF5PA6.js → component-TZ2SIYOX.js} +3 -3
  118. package/dist/{compositions-AZRVHGBT.js → compositions-KRTRDV72.js} +12 -12
  119. package/dist/{curve-QSFEGBUH.js → curve-ZXUAGU4T.js} +11 -11
  120. package/dist/{cuts-6AWEJH2H.js → cuts-GY2K2CTK.js} +20 -15
  121. package/dist/{delete-NOHFVICL.js → delete-ZT4FCUX2.js} +6 -6
  122. package/dist/{deploy-UFRADJOA.js → deploy-DVKSQTC7.js} +1 -1
  123. package/dist/{describeProject-F43LI3YQ.js → describeProject-L4ZW5CI7.js} +8 -8
  124. package/dist/{diff-3WS6NMSE.js → diff-AFOP2B3Y.js} +89 -229
  125. package/dist/{dist-24QQO5IL.js → dist-DCP77RWC.js} +2 -2
  126. package/dist/{dist-YEYUGCOR.js → dist-DPOLFG5U.js} +2 -2
  127. package/dist/{doctor-F4VJYQXC.js → doctor-Y7YVL34W.js} +11 -11
  128. package/dist/{energy-BN3QD6Y7.js → energy-YFLFELFX.js} +12 -12
  129. package/dist/{events-PZH4C7VA.js → events-C5QV2MQG.js} +3 -3
  130. package/dist/{events-5W7ETFWR.js → events-THASMGN6.js} +14 -14
  131. package/dist/{events-YJ3XSIPL.js → events-VL7JKI2K.js} +4 -4
  132. package/dist/{extract-S34DWGAD.js → extract-GTNBVQ63.js} +15 -19
  133. package/dist/{face-3SCJADG4.js → face-BSRKCB5W.js} +12 -12
  134. package/dist/{feedback-3K6NSKIC.js → feedback-MCQ2FKCC.js} +11 -11
  135. package/dist/{ffmpeg-2RBDDMHU.js → ffmpeg-3QNN3TQ5.js} +7 -7
  136. package/dist/{figma-NWAJYMAI.js → figma-IGXE3KWU.js} +3 -3
  137. package/dist/fontLocalizeCli.js +10 -10
  138. package/dist/{frames-6UARLPLK.js → frames-XIFLB5KC.js} +13 -13
  139. package/dist/{generate-KBVWFVXN.js → generate-55FZPR3J.js} +18 -18
  140. package/dist/{get-SEZZMLQ3.js → get-2MHD7XFA.js} +6 -6
  141. package/dist/{gpuPolicy-VIZAJ3GY.js → gpuPolicy-REJFNHWD.js} +7 -7
  142. package/dist/{grade-compare-PMAK4PJD.js → grade-compare-CM45H7CR.js} +31 -30
  143. package/dist/{heifImagePrep-6NYIR7WN.js → heifImagePrep-O3UZHGWR.js} +8 -8
  144. package/dist/{help-4UPSHWI2.js → help-V2GGIKP2.js} +1 -1
  145. package/dist/{history-VNAZEQDE.js → history-NUOQVUNY.js} +7 -7
  146. package/dist/hyperframe.manifest.json +1 -1
  147. package/dist/hyperframe.runtime.iife.js +67 -67
  148. package/dist/hyperframes-player.global.js +3 -3
  149. package/dist/{info-OREET5PM.js → info-5CMRZEJA.js} +8 -8
  150. package/dist/{init-K7AEJBAL.js → init-JNL5R27I.js} +28 -28
  151. package/dist/ink-HGQUC6L3.js +148 -0
  152. package/dist/{inspect-STME5DNY.js → inspect-GGOCM324.js} +31 -30
  153. package/dist/{installer-NQA4KXRP.js → installer-BBY3T5MJ.js} +4 -4
  154. package/dist/{keyframes-JQWZ235Q.js → keyframes-2D4ZS6HE.js} +8 -8
  155. package/dist/{lambda-RJNLW2EO.js → lambda-TY2ZCPEN.js} +11 -11
  156. package/dist/{layout-MTZWBPNZ.js → layout-X5GT4O2L.js} +31 -30
  157. package/dist/{lint-AQWTSL75.js → lint-NVOUXE2L.js} +9 -9
  158. package/dist/{lintProject-6H64SX3V.js → lintProject-54CNQ4HT.js} +2 -2
  159. package/dist/{list-ZEBZ5DB5.js → list-CB4UDTID.js} +6 -6
  160. package/dist/{localPage-CQ3H4N2N.js → localPage-EYPZRIGY.js} +7 -7
  161. package/dist/{login-VHCZHENV.js → login-L7JTVKV5.js} +7 -7
  162. package/dist/{logout-LHTQV2BZ.js → logout-6CEIH4HW.js} +3 -3
  163. package/dist/{look-25TSRPSV.js → look-VHQA2JSS.js} +12 -12
  164. package/dist/{manager-57SX7D5G.js → manager-FGQKQMI7.js} +8 -8
  165. package/dist/{measure-Y2R3G5OJ.js → measure-5F7QZLO5.js} +12 -11
  166. package/dist/{media-treatment-3G2IVS64.js → media-treatment-RRFIZKSA.js} +14 -14
  167. package/dist/{media-use-LUAOZJNV.js → media-use-5YGFOFKI.js} +3 -3
  168. package/dist/{models-NT56FKRG.js → models-5B2RGGBT.js} +11 -11
  169. package/dist/{motionShot-P4NTFKYS.js → motionShot-JJBQLYCC.js} +16 -15
  170. package/dist/{normalize-audio-2DUTZ6QK.js → normalize-audio-LWTNZWDJ.js} +10 -10
  171. package/dist/{open-OATYOOR7.js → open-PGRJXREV.js} +12 -12
  172. package/dist/{parakeetRunner-UASHW3A4.js → parakeetRunner-OV4NSPB3.js} +12 -12
  173. package/dist/{pipeline-GGAYP5Q6.js → pipeline-HXGPFQZC.js} +10 -10
  174. package/dist/{play-GHXBJS3T.js → play-JONX6CIM.js} +21 -21
  175. package/dist/{preflight-6VOP3IOI.js → preflight-7OKMMUWG.js} +8 -8
  176. package/dist/{present-M7UYHVEZ.js → present-EHU52MSU.js} +17 -17
  177. package/dist/{preview-YWT5WA3W.js → preview-DCEIITM6.js} +19 -19
  178. package/dist/{probe-CQAGZJLP.js → probe-EA4N3WOT.js} +11 -11
  179. package/dist/{producer-OU2BCMLY.js → producer-FGAOUR7O.js} +1 -1
  180. package/dist/{projectConfig-UI4NZDN7.js → projectConfig-N3ZRVJKB.js} +6 -6
  181. package/dist/{publication-VPJZQCLA.js → publication-ZKY2LVN5.js} +2 -2
  182. package/dist/{publish-7RA2MK2M.js → publish-RZVDFTBX.js} +15 -15
  183. package/dist/{refresh-AM2ULRRV.js → refresh-MQTO43RB.js} +3 -3
  184. package/dist/{remove-background-A5KJUH6W.js → remove-background-V5UXYPJS.js} +11 -11
  185. package/dist/{render-EMW4I6C6.js → render-NEZLBRAY.js} +37 -35
  186. package/dist/{render-IYV73CG6.js → render-UJCPQXGB.js} +5 -5
  187. package/dist/{render-Z5IS4AUP.js → render-YZSDHP3U.js} +60 -27
  188. package/dist/{render-batch-IN2ZXPS7.js → render-batch-KPGYARDI.js} +5 -5
  189. package/dist/renderSetupWorker.js +2 -2
  190. package/dist/{resolver-DIXFK5ZR.js → resolver-HWNPLSXK.js} +4 -4
  191. package/dist/{run-MCVU7AZX.js → run-OJ2GBYKB.js} +4 -4
  192. package/dist/{sherpa-SAY3I7PK.js → sherpa-HSBYKUQC.js} +11 -11
  193. package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +3 -9
  194. package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +6 -4
  195. package/dist/skills/media-use/scripts/lib/logo-provider.mjs +8 -3
  196. package/dist/skills/media-use/scripts/lib/logo-provider.test.mjs +14 -0
  197. package/dist/skills/media-use/scripts/resolve.mjs +11 -5
  198. package/dist/{skills-YWQ5XKH6.js → skills-CW23U675.js} +6 -6
  199. package/dist/{skillsUpdateCheck-ST5ZFEET.js → skillsUpdateCheck-LGBNNYLI.js} +3 -3
  200. package/dist/{snapshot-57YYYE5J.js → snapshot-RK7ED6DW.js} +47 -38
  201. package/dist/{src-LNSJHD25.js → src-KORQVG7O.js} +10 -6
  202. package/dist/{src-7MEBCSTP.js → src-ZDLQFZ4B.js} +9 -9
  203. package/dist/{staticProjectServer-TTJSAB2Q.js → staticProjectServer-TFWT5G2L.js} +18 -18
  204. package/dist/{status-FGXBUX2T.js → status-6WAZ5EBM.js} +5 -5
  205. package/dist/studio/assets/{hyperframes-player-Bzcd9O2g.js → hyperframes-player-qeY0knUZ.js} +3 -3
  206. package/dist/studio/assets/{index-LW6kxYVF.js → index-B9O4nOYD.js} +1 -1
  207. package/dist/studio/assets/{index-CZI-XmnO.js → index-BhZkOhf2.js} +174 -174
  208. package/dist/studio/index.html +1 -1
  209. package/dist/{studio-api-57E36S5N.js → studio-api-OIZEPWHS.js} +10 -10
  210. package/dist/{studioServer-2AIRUNBA.js → studioServer-62MG7LJR.js} +50 -49
  211. package/dist/{sync-52GUXEYZ.js → sync-Q3XYLXTX.js} +12 -12
  212. package/dist/{telemetry-RVY6RSCD.js → telemetry-3YDPEGQK.js} +4 -4
  213. package/dist/{timeline-MMZF4AX3.js → timeline-VDLKFZZ7.js} +19 -19
  214. package/dist/{tokens-WGWCYFTY.js → tokens-ZZ4G2VKC.js} +2 -2
  215. package/dist/{transcribe-YYDHXRQW.js → transcribe-2D6UIVAE.js} +10 -10
  216. package/dist/{transcribe-6BF5FFPV.js → transcribe-OYRCZUZM.js} +22 -22
  217. package/dist/{updateCheck-AAR5LLUF.js → updateCheck-ZRG5DR74.js} +2 -2
  218. package/dist/{upgrade-Y7CIRL4B.js → upgrade-ZU6BHCTC.js} +2 -2
  219. package/dist/{urlDownloader-KZOD7EWX.js → urlDownloader-5WPUC6C6.js} +6 -6
  220. package/dist/{validate-K3PHAA2E.js → validate-OZRPF6YZ.js} +25 -24
  221. package/dist/{video-Z6EBVCAT.js → video-N2KXXYS3.js} +8 -8
  222. package/dist/warmCheck.js +39 -38
  223. package/package.json +1 -1
  224. package/dist/chunk-6UWSEXQ3.js +0 -5030
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getMimeType,
9
9
  injectMediaCodecMapIntoHtml
10
- } from "./chunk-35NDLXHZ.js";
10
+ } from "./chunk-EQGBGOQQ.js";
11
11
  import {
12
12
  PROXY_VARIANT_CONFIG,
13
13
  ProxyCapacityError,
@@ -18,23 +18,23 @@ import {
18
18
  recordProxyRequest,
19
19
  resolveProxy,
20
20
  resolveProxyVariantRequest
21
- } from "./chunk-GE4ABM5K.js";
21
+ } from "./chunk-7WNPWUJP.js";
22
22
  import {
23
23
  findStageProxyBox
24
- } from "./chunk-OZMZFJDW.js";
24
+ } from "./chunk-2JBCK6DX.js";
25
25
  import {
26
26
  resolveAutoProxy
27
- } from "./chunk-ZGQC6IU7.js";
27
+ } from "./chunk-ZI64CTVC.js";
28
28
  import {
29
29
  listenOnBrowserSafePort
30
- } from "./chunk-NFUR6NNT.js";
30
+ } from "./chunk-7UKRCWBO.js";
31
31
  import {
32
32
  stripSdrPngColourTags
33
- } from "./chunk-7RTPHNOO.js";
33
+ } from "./chunk-3XYDZQJF.js";
34
34
  import {
35
35
  PREVIEW_PROXY_BOX_PARAM,
36
36
  parsePreviewProxyBox
37
- } from "./chunk-FJ3KUOUZ.js";
37
+ } from "./chunk-XCGPPU32.js";
38
38
  import {
39
39
  decodeWellFormedEscapes
40
40
  } from "./chunk-C2KEGBR3.js";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  quantizePreviewProxyBox
9
- } from "./chunk-FJ3KUOUZ.js";
9
+ } from "./chunk-XCGPPU32.js";
10
10
  import {
11
11
  parseHTML
12
12
  } from "./chunk-GWTIFRF5.js";
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  decode,
9
9
  meanAbsDiff
10
- } from "./chunk-BTK3T4HJ.js";
10
+ } from "./chunk-5X65O5WM.js";
11
11
 
12
12
  // src/measure/cuts.ts
13
13
  var SIG_W = 64;
@@ -20,6 +20,11 @@ var SOFT_ALONE = 4;
20
20
  var CONFIRM_LEVEL = 6;
21
21
  var CONFIRM_SHARE = 0.5;
22
22
  var NEIGHBOURS = 12;
23
+ var HELD_CHANGE = 0.5;
24
+ var MIN_MOVING_NEIGHBOURS = 4;
25
+ var MAX_CUT_FRAMES = 3;
26
+ var FLASH_FRAMES = 4;
27
+ var RETURNED = 0.4;
23
28
  function signatures(input, filters = []) {
24
29
  return decode(input, [...filters, `scale=${SIG_W}:${SIG_H}:flags=area`], SIG_W, SIG_H, true);
25
30
  }
@@ -30,12 +35,13 @@ var median = (values) => {
30
35
  function frameChanges(frames) {
31
36
  return frames.map((f, i) => i ? meanAbsDiff(frames[i - 1], f) : 0);
32
37
  }
33
- var neighbours = (diffs, i) => diffs.slice(Math.max(1, i - NEIGHBOURS), i).concat(diffs.slice(i + 1, i + NEIGHBOURS + 1));
38
+ var typicalOf = (around) => around.length >= MIN_MOVING_NEIGHBOURS ? Math.max(1, median(around)) : 1;
39
+ var neighbours = (diffs, i) => diffs.slice(Math.max(1, i - NEIGHBOURS), i).concat(diffs.slice(i + 1, i + NEIGHBOURS + 1)).filter((d) => d >= HELD_CHANGE);
34
40
  function cutsIn(diffs) {
35
41
  const hits = diffs.flatMap((d, i) => {
36
42
  if (i === 0) return [];
37
43
  const around = neighbours(diffs, i);
38
- const typical = Math.max(1, median(around));
44
+ const typical = typicalOf(around);
39
45
  if (d >= CUT_LEVEL && d >= CUT_RATIO * typical) return [{ frame: i, change: d }];
40
46
  const alone = d >= SOFT_ALONE * Math.max(0, ...around);
41
47
  return d >= SOFT_LEVEL && d >= SOFT_RATIO * typical && alone ? [{ frame: i, change: d, soft: true }] : [];
@@ -51,21 +57,32 @@ function cutsIn(diffs) {
51
57
  }
52
58
  return out;
53
59
  }
60
+ function classifiedCuts(frames) {
61
+ return cutsIn(frameChanges(frames)).map((c) => {
62
+ const end = c.frame + c.frames;
63
+ const back = (a, b) => frames[a] && frames[b] ? meanAbsDiff(frames[a], frames[b]) < RETURNED * c.change : false;
64
+ if (c.frames > MAX_CUT_FRAMES) return { ...c, kind: "fast" };
65
+ const returns = Array.from({ length: FLASH_FRAMES }, (_, k) => k + 1).some(
66
+ (k) => back(c.frame - 1, end - 1 + k) || back(c.frame - k, end)
67
+ );
68
+ return returns ? { ...c, kind: "flash" } : c;
69
+ });
70
+ }
54
71
  function findCuts(frames) {
55
- return cutsIn(frameChanges(frames));
72
+ return classifiedCuts(frames).filter((c) => !c.kind);
56
73
  }
57
74
  function confirmsCut(diffs, cut) {
58
75
  return [cut.frame - 1, cut.frame, cut.frame + 1].some((i) => {
59
76
  const d = diffs[i];
60
77
  if (i < 1 || d === void 0) return false;
61
- return d >= Math.max(CONFIRM_LEVEL, CONFIRM_SHARE * cut.change) && d >= CUT_RATIO * Math.max(1, median(neighbours(diffs, i)));
78
+ return d >= Math.max(CONFIRM_LEVEL, CONFIRM_SHARE * cut.change) && d >= CUT_RATIO * typicalOf(neighbours(diffs, i));
62
79
  });
63
80
  }
64
81
 
65
82
  export {
66
83
  signatures,
67
84
  frameChanges,
68
- cutsIn,
85
+ classifiedCuts,
69
86
  findCuts,
70
87
  confirmsCut
71
88
  };
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  VERSION
9
- } from "./chunk-MA5AQK7T.js";
9
+ } from "./chunk-PWHOMCFB.js";
10
10
 
11
11
  // src/registry/compatibility.ts
12
12
  import { compareVersions } from "compare-versions";
@@ -11,7 +11,7 @@ import {
11
11
  round,
12
12
  runFfmpeg,
13
13
  videoClip
14
- } from "./chunk-BTK3T4HJ.js";
14
+ } from "./chunk-5X65O5WM.js";
15
15
 
16
16
  // src/measure/sync.ts
17
17
  var RATE = 16e3;
@@ -58,7 +58,7 @@ import {
58
58
  warnUnknownEnumValues,
59
59
  wrapInlineScriptWithErrorBoundary,
60
60
  wrapScopedCompositionScript
61
- } from "./chunk-6UWSEXQ3.js";
61
+ } from "./chunk-XINVBLXA.js";
62
62
  import {
63
63
  cssVariableName
64
64
  } from "./chunk-VC76R6W2.js";
@@ -69,7 +69,10 @@ import {
69
69
  import {
70
70
  collectExternalStyles,
71
71
  lintHyperframeHtml
72
- } from "./chunk-HT3D5AKG.js";
72
+ } from "./chunk-GR2T3BOX.js";
73
+ import {
74
+ readTextFile
75
+ } from "./chunk-2GTFW4MK.js";
73
76
  import {
74
77
  CSS_URL_RE,
75
78
  checkSubCompositionUsability,
@@ -1504,7 +1507,7 @@ function safeReadFile(filePath) {
1504
1507
  if (!existsSync(filePath))
1505
1508
  return null;
1506
1509
  try {
1507
- return readFileSync(filePath, "utf-8");
1510
+ return readTextFile(filePath);
1508
1511
  } catch {
1509
1512
  return null;
1510
1513
  }
@@ -2193,7 +2196,7 @@ async function bundleProject(projectDir, options) {
2193
2196
  throw new Error(`${entryFile} not found in project directory`);
2194
2197
  }
2195
2198
  noteRead(indexPath);
2196
- const entryHtml = readFileSync(indexPath, "utf-8");
2199
+ const entryHtml = readTextFile(indexPath);
2197
2200
  const mountedShell = readMountedSceneShell(projectDir, entryFile, entryHtml);
2198
2201
  const sourceDir = mountedShell ? projectDir : dirname(indexPath);
2199
2202
  const safePaths = /* @__PURE__ */ new Map();
@@ -9,7 +9,7 @@ import {
9
9
  buildAuthHeaders,
10
10
  refreshTokens,
11
11
  resolveCredential
12
- } from "./chunk-QOYZ3U6G.js";
12
+ } from "./chunk-V4SD6HQ6.js";
13
13
 
14
14
  // src/cloud/auth.ts
15
15
  async function resolveCloudAuthHeaders() {
@@ -13,19 +13,23 @@ import {
13
13
  } from "./chunk-XQ26I3PL.js";
14
14
  import {
15
15
  createProjectConfig
16
- } from "./chunk-ZGQC6IU7.js";
16
+ } from "./chunk-ZI64CTVC.js";
17
17
  import {
18
18
  isHyperframesProject
19
- } from "./chunk-FJ3KUOUZ.js";
19
+ } from "./chunk-XCGPPU32.js";
20
20
 
21
21
  // src/utils/desktopApp.ts
22
22
  import { spawn, spawnSync } from "child_process";
23
23
  import { existsSync, readdirSync, readFileSync } from "fs";
24
24
  import { homedir } from "os";
25
25
  import { basename, isAbsolute, join, relative, win32 } from "path";
26
- var DESKTOP_BUNDLE_IDS = ["dev.hyperframes.desktop", "dev.hyperframes.desktop.canary"];
27
- var DESKTOP_APP_NAMES = ["HyperFrames.app", "HyperFrames Canary.app"];
28
- var APP_NAMES = ["HyperFrames", "HyperFrames Canary"];
26
+ var list = (name) => (process.env[name] ?? "").split(",").map((item) => item.trim()).filter(Boolean);
27
+ var bundleIds = () => [
28
+ "dev.hyperframes.desktop",
29
+ ...list("HYPERFRAMES_DESKTOP_BUNDLE_IDS")
30
+ ];
31
+ var appNames = () => ["HyperFrames", ...list("HYPERFRAMES_DESKTOP_APP_NAMES")];
32
+ var DEFAULT_APP = "the HyperFrames desktop app";
29
33
  var STUDIO_PAGE = "https://hyperframes.studio/studio";
30
34
  var DOWNLOADS = {
31
35
  darwin: `${STUDIO_PAGE}/download`,
@@ -90,9 +94,9 @@ function desktopApps({
90
94
  const appImage = launcherAppImage(read(join(config, name, "launcher.json")));
91
95
  return appImage && isAbsolute(appImage) ? appImage : null;
92
96
  };
93
- return APP_NAMES.flatMap((name, i) => {
97
+ return appNames().flatMap((name, i) => {
94
98
  const executable = where(name);
95
- return executable && exists(executable) ? [{ executable, canary: i === 1 }] : [];
99
+ return executable && exists(executable) ? [{ executable, name: i === 0 ? DEFAULT_APP : name }] : [];
96
100
  });
97
101
  }
98
102
  function leaveHandoff(dir, session) {
@@ -131,26 +135,26 @@ function openInDesktop(dir, {
131
135
  reason,
132
136
  downloadUrl: desktopDownloadUrl(platform, src) ?? STUDIO_PAGE
133
137
  });
134
- const opened = (canary) => {
138
+ const opened = (app2) => {
135
139
  if (cta) writeRecord(dir, DESKTOP_CTA_RECORD, JSON.stringify({ cta, at: Date.now() }));
136
140
  return {
137
141
  opened: true,
138
- app: canary ? "HyperFrames Canary" : "the HyperFrames desktop app",
142
+ app: app2,
139
143
  handedOver: leaveHandoff(dir, agentSession(env))
140
144
  };
141
145
  };
142
146
  if (!ready) return notOpened("handoff-unavailable");
143
147
  markBareIndexAsProject(dir);
144
148
  if (platform === "darwin") {
145
- const bundleId = DESKTOP_BUNDLE_IDS.find((id) => open(id, dir));
149
+ const bundleId = bundleIds().find((id) => open(id, dir));
146
150
  if (!bundleId) return notOpened(installed() ? "open-failed" : "not-installed");
147
- return opened(bundleId.endsWith(".canary"));
151
+ return opened(bundleId === bundleIds()[0] ? DEFAULT_APP : bundleId);
148
152
  }
149
153
  const apps = desktopApps({ platform, env, ...where });
150
154
  if (!apps) return notOpened("unsupported-platform");
151
155
  if (!apps.length) return notOpened("not-installed");
152
156
  const app = apps.find(({ executable }) => launch(executable, dir));
153
- return app ? opened(app.canary) : notOpened("open-failed");
157
+ return app ? opened(app.name) : notOpened("open-failed");
154
158
  }
155
159
  function openCommandFor(dir, cwd = process.cwd()) {
156
160
  const shown = relative(cwd, dir) || ".";
@@ -164,9 +168,9 @@ function desktopInstalled({
164
168
  const { platform = process.platform, home = homedir(), exists = existsSync } = where;
165
169
  if (platform !== "darwin") return (desktopApps(where)?.length ?? 0) > 0;
166
170
  const folders = ["/Applications", join(home, "Applications")];
167
- if (folders.some((folder) => DESKTOP_APP_NAMES.some((name) => exists(join(folder, name)))))
171
+ if (folders.some((folder) => appNames().some((name) => exists(join(folder, `${name}.app`)))))
168
172
  return true;
169
- return DESKTOP_BUNDLE_IDS.some(spotlight);
173
+ return bundleIds().some(spotlight);
170
174
  }
171
175
  function insideHostApp(env = process.env) {
172
176
  return Boolean(env.HYPERFRAMES_DESKTOP_PROJECT);
@@ -9,10 +9,10 @@ import {
9
9
  hasPreservedUnknownData,
10
10
  readStore,
11
11
  writeStore
12
- } from "./chunk-QOYZ3U6G.js";
12
+ } from "./chunk-V4SD6HQ6.js";
13
13
  import {
14
14
  credentialPath
15
- } from "./chunk-VLA6UJGH.js";
15
+ } from "./chunk-6NJVSTSY.js";
16
16
 
17
17
  // src/auth/user.ts
18
18
  function isUserInfoEmpty(u) {
@@ -14,31 +14,31 @@ import {
14
14
  } from "./chunk-AW3XJY4S.js";
15
15
  import {
16
16
  readCompositionFps
17
- } from "./chunk-X5BSSPC2.js";
17
+ } from "./chunk-GUJ45PRX.js";
18
18
  import {
19
19
  HF_AUDIO_GROUP_ATTR,
20
20
  extractAudioMetadata,
21
21
  extractMediaMetadata
22
- } from "./chunk-NFUR6NNT.js";
22
+ } from "./chunk-7UKRCWBO.js";
23
23
  import {
24
24
  byStart,
25
25
  fpsToNumber,
26
26
  parseFpsWithDefault
27
- } from "./chunk-FJ3KUOUZ.js";
27
+ } from "./chunk-XCGPPU32.js";
28
28
  import {
29
29
  HF_AUDIO_AUTOMATION_ATTR,
30
30
  HF_AUDIO_FX_ATTR,
31
31
  parseAudioFxChain,
32
32
  parseAutomation,
33
33
  resolveAutomation
34
- } from "./chunk-6UWSEXQ3.js";
34
+ } from "./chunk-XINVBLXA.js";
35
35
  import {
36
36
  resolveReferencedDuration,
37
37
  resolveReferencedStart
38
- } from "./chunk-HT3D5AKG.js";
38
+ } from "./chunk-GR2T3BOX.js";
39
39
  import {
40
40
  resolveAuthoredAssetFile
41
- } from "./chunk-AKMY4QVI.js";
41
+ } from "./chunk-2GTFW4MK.js";
42
42
  import {
43
43
  compositionOriginSeconds,
44
44
  cutToHostSlots,
@@ -8,12 +8,12 @@ import {
8
8
  findFFmpeg,
9
9
  findFFprobe,
10
10
  getFFmpegInstallHint
11
- } from "./chunk-HANNA5JJ.js";
11
+ } from "./chunk-PZ6VVOOE.js";
12
12
 
13
13
  // src/measure/media.ts
14
14
  import { execFileSync } from "child_process";
15
15
  import { existsSync, mkdirSync } from "fs";
16
- import { join, resolve } from "path";
16
+ import { dirname, join, resolve } from "path";
17
17
  var MAX_BUFFER = 1 << 30;
18
18
  var FFMPEG_QUIET = ["-nostdin", "-v", "error"];
19
19
  var Fix = class extends Error {
@@ -224,6 +224,12 @@ function pearson(a, b) {
224
224
  }
225
225
  return da && db ? num / Math.sqrt(da * db) : null;
226
226
  }
227
+ function projectOf(from) {
228
+ for (let dir = resolve(from); ; dir = dirname(dir)) {
229
+ if (existsSync(join(dir, "index.html"))) return dir;
230
+ if (dirname(dir) === dir) return null;
231
+ }
232
+ }
227
233
 
228
234
  export {
229
235
  Fix,
@@ -246,5 +252,6 @@ export {
246
252
  outDir,
247
253
  frameAt,
248
254
  formatJson,
249
- pearson
255
+ pearson,
256
+ projectOf
250
257
  };
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-MCDNAIFF.js";
13
13
  import {
14
14
  credentialPath
15
- } from "./chunk-VLA6UJGH.js";
15
+ } from "./chunk-6NJVSTSY.js";
16
16
  import {
17
17
  getInvocationId
18
18
  } from "./chunk-54HJ63Q2.js";
@@ -43,7 +43,7 @@ import {
43
43
  } from "./chunk-BLBMPEBX.js";
44
44
  import {
45
45
  VERSION
46
- } from "./chunk-MA5AQK7T.js";
46
+ } from "./chunk-PWHOMCFB.js";
47
47
 
48
48
  // src/telemetry/transport.ts
49
49
  import { spawn } from "child_process";
@@ -7,29 +7,38 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  findCuts,
9
9
  signatures
10
- } from "./chunk-K3QT232E.js";
10
+ } from "./chunk-35LAWHTD.js";
11
11
  import {
12
12
  jsonArg,
13
13
  num,
14
14
  runMeasure
15
- } from "./chunk-F7T57BZZ.js";
15
+ } from "./chunk-OMT75FQI.js";
16
16
  import {
17
17
  idempotencyKey,
18
18
  runJob
19
- } from "./chunk-5KAGTSLY.js";
19
+ } from "./chunk-CU3SVSKX.js";
20
20
  import {
21
21
  Fix,
22
22
  probeVideo,
23
+ projectOf,
23
24
  round,
24
25
  runFfmpeg,
25
26
  videoClip
26
- } from "./chunk-BTK3T4HJ.js";
27
+ } from "./chunk-5X65O5WM.js";
27
28
  import {
28
29
  defineCommand
29
30
  } from "./chunk-DL4OD7IA.js";
30
31
 
31
32
  // src/heygen/generate.ts
32
- import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "fs";
33
+ import {
34
+ existsSync,
35
+ mkdirSync,
36
+ mkdtempSync,
37
+ readFileSync,
38
+ renameSync,
39
+ rmSync,
40
+ writeFileSync
41
+ } from "fs";
33
42
  import { tmpdir } from "os";
34
43
  import { dirname, extname, join, relative, resolve } from "path";
35
44
  var GENERATE_TYPES = [
@@ -48,14 +57,38 @@ function parseMask(text) {
48
57
  const box = [Number(m[1]), Number(m[2]), Number(m[3]), Number(m[4])];
49
58
  return m[5] ? { box, window: [Number(m[5]), Number(m[6])] } : { box };
50
59
  }
51
- function maskFilters(masks, width, height) {
60
+ function delogoFilters(masks, width, height) {
52
61
  return masks.flatMap(({ box: [x, y, w, h], window }) => {
53
62
  const [x0, y0] = [Math.max(1, x), Math.max(1, y)];
54
63
  const [x1, y1] = [Math.min(width - 2, x + w), Math.min(height - 2, y + h)];
55
64
  if (x1 - x0 < 1 || y1 - y0 < 1) return [];
56
65
  const when = window ? `:enable='between(t,${window[0]},${window[1]})'` : "";
57
66
  return [`delogo=x=${x0}:y=${y0}:w=${x1 - x0}:h=${y1 - y0}${when}`];
67
+ }).join(",");
68
+ }
69
+ function maskFilters(masks, fps) {
70
+ const radius = Math.min(127, Math.max(2, Math.round(fps)));
71
+ const steps = masks.map(({ box: [x, y, w, h], window }, i) => {
72
+ const when = window ? `:enable='between(t,${window[0]},${window[1]})'` : "";
73
+ const [w2, h2] = [w - w % 2, h - h % 2];
74
+ return `[v${i}]split[a${i}][b${i}];[b${i}]crop=${w2}:${h2}:${x}:${y},tmedian=radius=${radius}[m${i}];[a${i}][m${i}]overlay=${x}:${y}${when}[v${i + 1}]`;
58
75
  });
76
+ return `[0:v]null[v0];${steps.join(";")}`;
77
+ }
78
+ function structureRatio(gray, width, box) {
79
+ const height = gray.length / width;
80
+ const [x0, y0, x1, y1] = [box[0], box[1], box[0] + box[2], box[1] + box[3]];
81
+ const pad = Math.max(box[2], box[3]) >> 1;
82
+ const sum = [0, 0];
83
+ const n = [0, 0];
84
+ for (let y = Math.max(0, y0 - pad); y < Math.min(height - 1, y1 + pad); y++)
85
+ for (let x = Math.max(0, x0 - pad); x < Math.min(width - 1, x1 + pad); x++) {
86
+ const k = x >= x0 && x < x1 && y >= y0 && y < y1 ? 0 : 1;
87
+ const i = y * width + x;
88
+ sum[k] += Math.abs(gray[i] - gray[i + 1]) + Math.abs(gray[i] - gray[i + width]);
89
+ n[k]++;
90
+ }
91
+ return { inside: sum[0] / (n[0] || 1), ring: sum[1] / (n[1] || 1) };
59
92
  }
60
93
  var DEFAULTS = { image: "nano-banana-2", video: "heygen-video-1", music: "lyria-3-pro" };
61
94
  var VIDEO_RESOLUTION = "768p";
@@ -194,13 +227,10 @@ function inline(work, masks = []) {
194
227
  else if (kind === "audio")
195
228
  runFfmpeg(["-y", "-i", path, "-vn", "-ac", "1", "-c:a", "libmp3lame", "-b:a", "128k", out]);
196
229
  else {
197
- const { width, height } = masks.length ? probeVideo(path) : { width: 0, height: 0 };
198
- const filters = [
199
- ...maskFilters(masks, width, height),
200
- "scale='if(gt(iw,ih),min(720,iw),-2)':'if(gt(iw,ih),-2,min(720,ih))'"
201
- ];
230
+ const guide = masks.length ? fillMasks(path, masks, work) : path;
231
+ const scale = "scale='if(gt(iw,ih),min(720,iw),-2)':'if(gt(iw,ih),-2,min(720,ih))'";
202
232
  runFfmpeg([
203
- ...["-y", "-i", path, "-t", "15", "-an", "-vf", filters.join(",")],
233
+ ...["-y", "-i", guide, "-t", "15", "-an", "-vf", scale],
204
234
  ...["-c:v", "libx264", "-crf", "28", "-preset", "veryfast", "-pix_fmt", "yuv420p", out]
205
235
  ]);
206
236
  }
@@ -218,10 +248,85 @@ function cutsInside(path, seconds) {
218
248
  const cuts = findCuts(frames).filter((c) => c.frame > 1 && c.frame < frames.length - 1).map((c) => round(c.frame / info.fps, 3));
219
249
  return { cuts, length: round(frames.length / info.fps, 3) };
220
250
  }
251
+ function structured(clip, guide, masks) {
252
+ const { width: w, height: h } = probeVideo(clip);
253
+ const gray = runFfmpeg(["-i", clip, "-vf", "fps=2", "-pix_fmt", "gray", "-f", "rawvideo", "-"]);
254
+ const [kx, ky] = [w / guide.width, h / guide.height];
255
+ return masks.flatMap((mask) => {
256
+ const [bx, by, bw, bh] = mask.box;
257
+ const box = [bx * kx, by * ky, bw * kx, bh * ky].map(Math.round);
258
+ let worst = 0;
259
+ for (let i = 0; (i + 1) * w * h <= gray.length; i++) {
260
+ if (mask.window && (i / 2 < mask.window[0] || i / 2 > mask.window[1])) continue;
261
+ const { inside, ring } = structureRatio(gray.subarray(i * w * h, (i + 1) * w * h), w, box);
262
+ if (inside > 6 && inside > 1.5 * ring) worst = Math.max(worst, inside / (ring || 1));
263
+ }
264
+ return worst ? [{ mask, worst }] : [];
265
+ });
266
+ }
267
+ function fillMasks(path, masks, work) {
268
+ const info = probeVideo(path);
269
+ const encode = (from, name, filter) => {
270
+ const out = join(work, name);
271
+ runFfmpeg([
272
+ ...["-y", "-i", from, "-an"],
273
+ ...filter,
274
+ ...["-crf", "14", "-pix_fmt", "yuv420p", out]
275
+ ]);
276
+ return out;
277
+ };
278
+ const median = encode(path, "median.mp4", [
279
+ ...["-t", "15", "-filter_complex", maskFilters(masks, info.fps)],
280
+ ...["-map", `[v${masks.length}]`]
281
+ ]);
282
+ const left = structured(median, info, masks).map((s) => s.mask);
283
+ if (!left.length) return median;
284
+ return encode(median, "delogo.mp4", ["-vf", delogoFilters(left, info.width, info.height)]);
285
+ }
286
+ function fitAspect(out, aspect) {
287
+ const [aw, ah] = aspect.split(":").map(Number);
288
+ if (!aw || !ah) return;
289
+ const { width, height } = probeVideo(out);
290
+ const want = aw / ah;
291
+ if (Math.abs(width / height - want) / want < 2e-3) return;
292
+ const even = (n) => n - n % 2;
293
+ const [w, h] = width / height > want ? [even(height * want), height] : [width, even(width / want)];
294
+ const fitted = `${out}.fit${extname(out)}`;
295
+ runFfmpeg([
296
+ ...[
297
+ "-y",
298
+ "-i",
299
+ out,
300
+ "-vf",
301
+ `crop=${w}:${h}`,
302
+ "-c:v",
303
+ "libx264",
304
+ "-crf",
305
+ "12",
306
+ "-preset",
307
+ "slow"
308
+ ],
309
+ ...["-pix_fmt", "yuv420p", "-c:a", "copy", fitted]
310
+ ]);
311
+ renameSync(fitted, out);
312
+ return `HeyGen returned ${width}x${height} for ${aspect}; cropped to ${w}x${h} (centre), not stretched`;
313
+ }
314
+ var MIN_SHOT_S = 0.5;
315
+ function foldShort(cuts, length) {
316
+ const kept = [...cuts];
317
+ for (; ; ) {
318
+ const edges = [0, ...kept, length];
319
+ const short = edges.slice(1).findIndex((e, i) => e - edges[i] < MIN_SHOT_S);
320
+ if (short < 0 || !kept.length) return kept;
321
+ kept.splice(short ? short - 1 : 0, 1);
322
+ }
323
+ }
221
324
  var COUNT = ["", "one", "two", "three", "four", "five", "six"];
222
325
  function checkGuide(r) {
223
- if (!r.motion) return;
224
- const { cuts, length } = cutsInside(r.motion, GUIDE_MAX_S);
326
+ if (!r.motion || r.allowCuts) return;
327
+ const found = cutsInside(r.motion, GUIDE_MAX_S);
328
+ const { length } = found;
329
+ const cuts = foldShort(found.cuts, length);
225
330
  if (!cuts.length) return;
226
331
  const s = (t) => t.toFixed(2);
227
332
  const and = (items) => `${items.slice(0, -1).join(", ")} and ${items.at(-1)}`;
@@ -230,7 +335,7 @@ function checkGuide(r) {
230
335
  const shots = edges.slice(1).map((e, i) => `${i ? s(edges[i]) : "0"}\u2013${s(e)} s`);
231
336
  throw new Fix(
232
337
  `--motion ${r.motion} has ${at2}`,
233
- `guide has ${at2}: generate ${and(shots)} as ${COUNT[shots.length] ?? shots.length} shots, each with its own --motion clip`
338
+ `guide has ${at2}: generate ${and(shots)} as ${COUNT[shots.length] ?? shots.length} shots, each with its own --motion clip, or pass --allow-cuts for a guide you have checked`
234
339
  );
235
340
  }
236
341
  function checkRequest(r) {
@@ -245,12 +350,6 @@ function checkRequest(r) {
245
350
  });
246
351
  checkGuide(r);
247
352
  }
248
- function projectOf(from) {
249
- for (let dir = resolve(from); ; dir = dirname(dir)) {
250
- if (existsSync(join(dir, "index.html"))) return dir;
251
- if (dirname(dir) === dir) return null;
252
- }
253
- }
254
353
  async function generate(r, onWait, credits) {
255
354
  checkRequest(r);
256
355
  const route = ROUTES[r.type];
@@ -290,6 +389,25 @@ async function generate(r, onWait, credits) {
290
389
  } catch {
291
390
  cuts = null;
292
391
  }
392
+ const notes = [];
393
+ if (r.type === "video" && (r.aspect || !r.firstFrame))
394
+ try {
395
+ const note = fitAspect(out, r.aspect ?? "16:9");
396
+ if (note) notes.push(note);
397
+ } catch (e) {
398
+ notes.push(
399
+ `kept HeyGen's size, could not crop to ${r.aspect ?? "16:9"}: ${e instanceof Error ? e.message : e}`
400
+ );
401
+ }
402
+ if (r.masks?.length && r.motion)
403
+ try {
404
+ for (const { mask, worst } of structured(out, probeVideo(r.motion), r.masks))
405
+ notes.push(
406
+ `mask ${mask.box.join(",")} still shows structure in the result (${worst.toFixed(1)}x its surroundings): the text may have come back, regenerate without the guide`
407
+ );
408
+ } catch {
409
+ notes.push("could not check the masked boxes of the result");
410
+ }
293
411
  let ledger;
294
412
  if (project) {
295
413
  const { recordInPlace } = await import("./manifest-QSJYVERU.js");
@@ -324,7 +442,8 @@ async function generate(r, onWait, credits) {
324
442
  job: job.id,
325
443
  route: route.path,
326
444
  ...ledger ? { ledger } : {},
327
- ...cuts !== void 0 ? { cuts_inside: cuts } : {}
445
+ ...cuts !== void 0 ? { cuts_inside: cuts } : {},
446
+ ...notes.length ? { notes } : {}
328
447
  };
329
448
  } finally {
330
449
  rmSync(work, { recursive: true, force: true });
@@ -481,6 +600,11 @@ var generate_default = defineCommand({
481
600
  type: "string",
482
601
  description: "video: a clip whose camera and body motion the shot follows (up to 15 s)"
483
602
  },
603
+ "allow-cuts": {
604
+ type: "boolean",
605
+ description: "video: send a --motion clip that reads as several shots (one you have checked)",
606
+ default: false
607
+ },
484
608
  mask: {
485
609
  type: "string",
486
610
  description: "video: x,y,w,h[,a-b] of the --motion clip to blank before sending (its drawn text; a-b in the clip's seconds); repeat for more"
@@ -528,6 +652,7 @@ var generate_default = defineCommand({
528
652
  firstFrame: args["first-frame"],
529
653
  audio: args.audio,
530
654
  motion: args.motion,
655
+ allowCuts: args["allow-cuts"],
531
656
  masks: repeated(rawArgs, "--mask").map(parseMask),
532
657
  photo: args.photo,
533
658
  script: args.script,
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  updateCheckDisabled
9
- } from "./chunk-2KDHJCH2.js";
9
+ } from "./chunk-B7OI3WAR.js";
10
10
  import {
11
11
  hostAnswers
12
12
  } from "./chunk-BR2JQQC5.js";