hyperframes 0.8.222 → 0.8.224
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.
- package/dist/{add-6MPLIWVP.js → add-JEPKJ2F4.js} +15 -15
- package/dist/{agentPromptGenerator-X7SQPCXZ.js → agentPromptGenerator-ZBNWLX5D.js} +7 -7
- package/dist/{animatedGifPrep-ESOJ4FQ7.js → animatedGifPrep-43LLMTN5.js} +7 -7
- package/dist/api.d.ts +5 -3
- package/dist/api.js +33 -22
- package/dist/{asset-Y735VQV6.js → asset-M6SH6PUW.js} +5 -5
- package/dist/{assetCataloger-AOJAUEZW.js → assetCataloger-BLQ7UVJ5.js} +8 -8
- package/dist/{audio-VMMCGPOV.js → audio-J3QREJK4.js} +150 -1158
- package/dist/{auth-BD5NHYRA.js → auth-7TRCBCKA.js} +5 -5
- package/dist/{autoUpdate-VTMNHOAJ.js → autoUpdate-WTFSYLTK.js} +4 -4
- package/dist/{backgroundChecks-SUDYQZSW.js → backgroundChecks-YZW7AMMJ.js} +5 -5
- package/dist/backgroundChecksWorker.js +5 -5
- package/dist/{batchRender-4NR7RMT7.js → batchRender-LDZ6NO2X.js} +11 -11
- package/dist/{beats-PKEHQHBY.js → beats-JWUADKHV.js} +14 -14
- package/dist/{benchmark-K55DDFHG.js → benchmark-QOQZ7UGD.js} +13 -13
- package/dist/billing-3GVNEE56.js +86 -0
- package/dist/{browser-G2WFWJJ3.js → browser-4HNCSPUR.js} +8 -8
- package/dist/{bundleWithLocalizedFonts-MNG2UVH3.js → bundleWithLocalizedFonts-GTKHB45M.js} +2 -2
- package/dist/{capture-24PIC3TZ.js → capture-5OYZNIOR.js} +31 -31
- package/dist/{capture-U3EEAPI6.js → capture-XSRWYHAM.js} +7 -7
- package/dist/{captureCompositionFrame-KL4V6ORD.js → captureCompositionFrame-4F7PPQKB.js} +17 -17
- package/dist/{captureTimeout-RIMG6IYH.js → captureTimeout-7Y2RUBCU.js} +3 -1
- package/dist/{catalog-J3BU4TFW.js → catalog-4FVQSID5.js} +16 -16
- package/dist/{catch-up-LDGNMEGL.js → catch-up-KQVK2QZC.js} +8 -8
- package/dist/{check-J6HG6EKE.js → check-3YHLB6FM.js} +47 -46
- package/dist/{checkAudio-MAX7JUYG.js → checkAudio-7ZSZVBSJ.js} +15 -15
- package/dist/{checkBrowser-3W74WJ26.js → checkBrowser-VX5CHNQS.js} +40 -39
- package/dist/{chunk-L55LAERP.js → chunk-2KDHJCH2.js} +2 -2
- package/dist/{chunk-CVY6OIKN.js → chunk-2M6B2JKZ.js} +73 -39
- package/dist/{chunk-OROHGC7W.js → chunk-2QQO3J3B.js} +7 -7
- package/dist/chunk-2WVQ3CCN.js +113 -0
- package/dist/{chunk-RRPO44PE.js → chunk-34GAW4GO.js} +5 -5
- package/dist/{chunk-WWT6ETQA.js → chunk-35NDLXHZ.js} +50 -55
- package/dist/{chunk-YHL4CVTF.js → chunk-3NHCTTLP.js} +15 -15
- package/dist/chunk-3ZDOAVZM.js +570 -0
- package/dist/{chunk-6ZLDIMPL.js → chunk-4H4DR36N.js} +2 -2
- package/dist/{chunk-IB7UYGXR.js → chunk-4ZAOAPWP.js} +17 -11
- package/dist/{chunk-GOWU3NCE.js → chunk-52B3AOIV.js} +1 -1
- package/dist/{chunk-F6QV5N3A.js → chunk-53JEHQBW.js} +2 -2
- package/dist/{chunk-YEKJOA47.js → chunk-53TKUWDX.js} +3 -3
- package/dist/{chunk-6MUI2H6P.js → chunk-54Q3H2UQ.js} +5 -2
- package/dist/chunk-5KAGTSLY.js +205 -0
- package/dist/{chunk-5ZBMHUY2.js → chunk-5LOZWO2M.js} +1 -1
- package/dist/{chunk-DSHFKKSZ.js → chunk-5N5FYE5K.js} +2 -2
- package/dist/{chunk-ZBNK6X5O.js → chunk-652ERUZD.js} +2 -2
- package/dist/{chunk-DP5LF7GF.js → chunk-66W5IWLO.js} +12 -0
- package/dist/{chunk-JQWITWVC.js → chunk-6QIYQ43G.js} +2 -2
- package/dist/chunk-6UWSEXQ3.js +5030 -0
- package/dist/{chunk-35JKCWYI.js → chunk-7HSV5SJ4.js} +3 -3
- package/dist/{chunk-3RXZZIDQ.js → chunk-7RTPHNOO.js} +2 -2
- package/dist/{chunk-6CFBFWLF.js → chunk-A25SCSOK.js} +1 -1
- package/dist/{chunk-SJGE5I5F.js → chunk-ADVVQX4I.js} +1 -1
- package/dist/{chunk-GHEYGMKD.js → chunk-AMQFGICP.js} +1 -1
- package/dist/chunk-BAXL3U3T.js +312 -0
- package/dist/{chunk-YSTBSLWY.js → chunk-BEMGUGGJ.js} +1 -1
- package/dist/chunk-BTK3T4HJ.js +250 -0
- package/dist/{chunk-UBDO4EHA.js → chunk-C5JKRCSG.js} +1 -1
- package/dist/{chunk-ZLXWRYOO.js → chunk-CGX4EOGT.js} +3 -3
- package/dist/{chunk-ZPTNLDOB.js → chunk-D4M37ATV.js} +2 -2
- package/dist/chunk-DY7PQLIE.js +248 -0
- package/dist/{chunk-DNTPNSH5.js → chunk-E2ZY4GWH.js} +5 -5
- package/dist/{chunk-QYRMR45H.js → chunk-E47ZWDMH.js} +1 -1
- package/dist/{chunk-EGJ4UECR.js → chunk-EHZESMRB.js} +8 -2
- package/dist/{chunk-VJVVWYP6.js → chunk-EQFDOQTG.js} +1 -1
- package/dist/{chunk-42Q3VX34.js → chunk-F34GYYXO.js} +5 -5
- package/dist/{chunk-7IH3RSSG.js → chunk-F3CTUCFD.js} +12 -12
- package/dist/chunk-F7T57BZZ.js +95 -0
- package/dist/{chunk-BDZSH6P3.js → chunk-FJ3KUOUZ.js} +1 -1
- package/dist/{chunk-7KBS6ZLB.js → chunk-FPR57WRR.js} +2 -2
- package/dist/{chunk-BPIY5LB3.js → chunk-G45NYKSM.js} +39 -4
- package/dist/{chunk-AXVTL7B6.js → chunk-GE4ABM5K.js} +2 -2
- package/dist/{chunk-HQDHMAUI.js → chunk-GLTSINRP.js} +1 -1
- package/dist/chunk-GQ2QER6M.js +70 -0
- package/dist/{chunk-Y7IV5MAK.js → chunk-H6APAFKE.js} +2 -2
- package/dist/{chunk-5GSEM63G.js → chunk-HANNA5JJ.js} +1 -1
- package/dist/{chunk-RIGSGNDQ.js → chunk-HDPW7THH.js} +30 -21
- package/dist/{chunk-L37AZWB2.js → chunk-HIPW4JXL.js} +3 -3
- package/dist/{chunk-VQMHDS2V.js → chunk-HT3D5AKG.js} +52 -12
- package/dist/{chunk-K5UCRKUK.js → chunk-IORJ42GY.js} +2 -2
- package/dist/{chunk-OAXWHPNS.js → chunk-IYYQRNIZ.js} +1 -1
- package/dist/{chunk-G675S644.js → chunk-J7FVF73D.js} +33 -31
- package/dist/{chunk-S2HWGG5O.js → chunk-JHOPRAJN.js} +1 -1
- package/dist/{chunk-WJYFJGYT.js → chunk-JIF347PW.js} +3 -3
- package/dist/{chunk-XHD7RKEZ.js → chunk-JK2KNL6F.js} +2 -2
- package/dist/{chunk-CZOC7WY7.js → chunk-JKLWWGE6.js} +1 -1
- package/dist/{chunk-SKCS4SUZ.js → chunk-JMP52GTN.js} +44 -19
- package/dist/chunk-JUF43Q7Q.js +59 -0
- package/dist/chunk-K3QT232E.js +71 -0
- package/dist/chunk-KEDN4LSV.js +1048 -0
- package/dist/{chunk-G2EY3MVW.js → chunk-L4ULTWCD.js} +1 -1
- package/dist/{chunk-7D2LTSNV.js → chunk-LRS4FV5W.js} +3 -3
- package/dist/{chunk-VMRQDPFL.js → chunk-M336YVCP.js} +1 -1
- package/dist/{chunk-6W3DY5BP.js → chunk-MA5AQK7T.js} +2 -2
- package/dist/{chunk-EQGKUPBJ.js → chunk-MCDNAIFF.js} +1 -1
- package/dist/{chunk-EOUKB53E.js → chunk-MOXNAVCW.js} +1 -1
- package/dist/{chunk-AIXH3V5A.js → chunk-NFUR6NNT.js} +20 -5
- package/dist/{chunk-AN4USOFT.js → chunk-NI35PAVN.js} +2 -2
- package/dist/{chunk-E5IIR67Q.js → chunk-O2VKGYSK.js} +1 -1
- package/dist/chunk-ODJ2WBZX.js +288 -0
- package/dist/{chunk-52VXA3SC.js → chunk-OZMZFJDW.js} +1 -1
- package/dist/{chunk-EE7YWKDY.js → chunk-PKMAWQUI.js} +4 -4
- package/dist/{chunk-D6LGD472.js → chunk-POOLZTMZ.js} +6 -4
- package/dist/chunk-QK6ZNEBW.js +46 -0
- package/dist/{chunk-NUE44RN2.js → chunk-QOI46C6F.js} +17 -4
- package/dist/{chunk-MESSJFK3.js → chunk-QOYZ3U6G.js} +39 -29
- package/dist/{chunk-ZAJQFY5Q.js → chunk-QU5OYMTB.js} +15 -2
- package/dist/{chunk-HOTXWVVP.js → chunk-R2C5EON5.js} +2 -6
- package/dist/{chunk-FMKI7ZLM.js → chunk-RR5QE7DB.js} +2 -2
- package/dist/{chunk-OQLYKDL5.js → chunk-RU7KMDFL.js} +1 -1
- package/dist/{chunk-ONMTNYGR.js → chunk-RXJUMVCA.js} +1 -1
- package/dist/chunk-RZ6CXJ56.js +24 -0
- package/dist/{chunk-GODT7QDZ.js → chunk-SGMCQAYU.js} +3 -3
- package/dist/{chunk-QOZPWIYV.js → chunk-THL3N377.js} +19 -16
- package/dist/{chunk-IGBOFU2Y.js → chunk-UCPEABYK.js} +2 -2
- package/dist/{chunk-AOHG22HQ.js → chunk-UZ5AWZCA.js} +6 -6
- package/dist/{chunk-4VEXJTUT.js → chunk-VCJE7IMY.js} +2 -2
- package/dist/{chunk-Z5VQBRU2.js → chunk-VPMHRLJH.js} +3 -3
- package/dist/{chunk-FT3CNACL.js → chunk-VXRBPWVW.js} +144 -41
- package/dist/{chunk-537WSYHU.js → chunk-W7MJPKBJ.js} +1 -1
- package/dist/{chunk-26AQTUU4.js → chunk-WJD3GVAA.js} +1 -1
- package/dist/{chunk-DS372VSV.js → chunk-WW7Z2W73.js} +2 -2
- package/dist/{chunk-DC26QLB7.js → chunk-X5BSSPC2.js} +1 -1
- package/dist/{chunk-DIXTEVWQ.js → chunk-Y5HVDK7X.js} +3 -3
- package/dist/{chunk-EHSBBBR2.js → chunk-YGGZ23BB.js} +2 -0
- package/dist/{chunk-NHXGFQWQ.js → chunk-Z7GIHPAZ.js} +1 -1
- package/dist/{chunk-XC3BGWCJ.js → chunk-ZFQSXMX6.js} +1 -1
- package/dist/{chunk-P5M3AXEP.js → chunk-ZGQC6IU7.js} +1 -1
- package/dist/{chunk-KEY2VA65.js → chunk-ZLZXGJ63.js} +6 -20
- package/dist/{clean-K6IM3LC4.js → clean-SXEI6FT4.js} +24 -24
- package/dist/cli.js +73 -63
- package/dist/{cloud-OV7EA4BJ.js → cloud-SKN6FWAZ.js} +4 -4
- package/dist/{cloudrun-ZEMODIOP.js → cloudrun-RHPVVXCR.js} +9 -9
- package/dist/{compare-MJZ3D3HA.js → compare-RTXF2NSK.js} +36 -36
- package/dist/{compiler-6KKETX77.js → compiler-SKRY6FPA.js} +4 -4
- package/dist/{component-EVXMYIP3.js → component-2NPF5PA6.js} +6 -6
- package/dist/{compositions-PZ7FQ7WN.js → compositions-AZRVHGBT.js} +17 -17
- package/dist/curve-QSFEGBUH.js +329 -0
- package/dist/cuts-6AWEJH2H.js +123 -0
- package/dist/{delete-DL3XA4QV.js → delete-NOHFVICL.js} +9 -9
- package/dist/{deploy-VEYP3IP5.js → deploy-UFRADJOA.js} +10 -10
- package/dist/describeProject-F43LI3YQ.js +56 -0
- package/dist/{destroy-BQ5R7LUF.js → destroy-IQLGADZM.js} +6 -6
- package/dist/diff-3WS6NMSE.js +1825 -0
- package/dist/{dist-SHMQOKMF.js → dist-24QQO5IL.js} +2 -2
- package/dist/{dist-M77KFAYW.js → dist-YEYUGCOR.js} +2 -2
- package/dist/{docs-VAF5NM5B.js → docs-IB3KETC6.js} +1 -1
- package/dist/{doctor-JM2WHH7Y.js → doctor-F4VJYQXC.js} +13 -13
- package/dist/energy-BN3QD6Y7.js +134 -0
- package/dist/events-5W7ETFWR.js +221 -0
- package/dist/{events-GW5I5RCG.js → events-PZH4C7VA.js} +5 -5
- package/dist/{events-S7KVBRSL.js → events-YJ3XSIPL.js} +6 -6
- package/dist/extract-S34DWGAD.js +309 -0
- package/dist/face-3SCJADG4.js +171 -0
- package/dist/{feedback-7OR5FVTX.js → feedback-3K6NSKIC.js} +16 -16
- package/dist/{ffmpeg-A7CSIX3U.js → ffmpeg-2RBDDMHU.js} +7 -7
- package/dist/{figma-444HKFX5.js → figma-NWAJYMAI.js} +3 -3
- package/dist/fontLocalizeCli.js +10 -10
- package/dist/frames-6UARLPLK.js +352 -0
- package/dist/generate-KBVWFVXN.js +74 -0
- package/dist/{get-6UTF3225.js → get-SEZZMLQ3.js} +8 -8
- package/dist/{gpuPolicy-ORPUS5Z2.js → gpuPolicy-VIZAJ3GY.js} +7 -7
- package/dist/{grade-compare-UCTAYN3B.js → grade-compare-PMAK4PJD.js} +40 -37
- package/dist/{heifImagePrep-ED6V6RFN.js → heifImagePrep-6NYIR7WN.js} +8 -8
- package/dist/{help-HZR32XWP.js → help-4UPSHWI2.js} +7 -1
- package/dist/{history-TQ56MZIA.js → history-VNAZEQDE.js} +11 -11
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +70 -70
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/index-gen-OPMQ5WSN.js +61 -0
- package/dist/{info-RPIIP7RN.js → info-OREET5PM.js} +11 -11
- package/dist/{init-ONAWKHFW.js → init-K7AEJBAL.js} +33 -32
- package/dist/{inspect-A75PYOWJ.js → inspect-STME5DNY.js} +37 -36
- package/dist/{installer-ISMCCFBZ.js → installer-NQA4KXRP.js} +4 -4
- package/dist/{keyframes-2I75DP3O.js → keyframes-JQWZ235Q.js} +10 -10
- package/dist/{lambda-4QIHGPGJ.js → lambda-RJNLW2EO.js} +21 -21
- package/dist/{layout-GW7WE7RT.js → layout-MTZWBPNZ.js} +37 -36
- package/dist/{lint-OWP72OZQ.js → lint-AQWTSL75.js} +12 -12
- package/dist/{lintProject-XYQ5L7RQ.js → lintProject-6H64SX3V.js} +2 -2
- package/dist/{list-WVK7ZCPW.js → list-ZEBZ5DB5.js} +9 -9
- package/dist/{localPage-IQWHN7BH.js → localPage-CQ3H4N2N.js} +7 -7
- package/dist/{login-Q5CNHYWU.js → login-VHCZHENV.js} +17 -11
- package/dist/{logout-6VFJ7WMW.js → logout-LHTQV2BZ.js} +3 -3
- package/dist/look-25TSRPSV.js +180 -0
- package/dist/{manager-JCYVNEWH.js → manager-57SX7D5G.js} +9 -8
- package/dist/manifest-QSJYVERU.js +49 -0
- package/dist/measure-Y2R3G5OJ.js +46 -0
- package/dist/{media-treatment-M5IUP7H4.js → media-treatment-3G2IVS64.js} +20 -20
- package/dist/{media-use-ZNTB7W6N.js → media-use-LUAOZJNV.js} +10 -6
- package/dist/{models-CFXKDYZ3.js → models-NT56FKRG.js} +15 -15
- package/dist/{motionShot-CWUEI4ZM.js → motionShot-P4NTFKYS.js} +20 -20
- package/dist/{normalize-QJVXFMWO.js → normalize-MBNGRVQA.js} +2 -1
- package/dist/{normalize-audio-FASY33LR.js → normalize-audio-2DUTZ6QK.js} +12 -12
- package/dist/{open-KOVVESYN.js → open-OATYOOR7.js} +15 -15
- package/dist/{parakeetRunner-E4IP5SL4.js → parakeetRunner-UASHW3A4.js} +13 -12
- package/dist/{pipeline-C6EZVV43.js → pipeline-GGAYP5Q6.js} +11 -11
- package/dist/{play-MZJI6SMH.js → play-GHXBJS3T.js} +28 -28
- package/dist/{policies-J5BWAZHM.js → policies-EERREOZJ.js} +6 -4
- package/dist/{preflight-K4SPUWXP.js → preflight-6VOP3IOI.js} +8 -8
- package/dist/{present-7L7ZTG7F.js → present-M7UYHVEZ.js} +23 -23
- package/dist/{preview-QGDVMR3X.js → preview-YWT5WA3W.js} +26 -26
- package/dist/probe-CQAGZJLP.js +178 -0
- package/dist/{producer-EJPNNY3E.js → producer-OU2BCMLY.js} +1 -1
- package/dist/{progress-X3QFO3FE.js → progress-STSH2JRY.js} +2 -2
- package/dist/{projectConfig-EEF6OPXO.js → projectConfig-UI4NZDN7.js} +6 -6
- package/dist/{prompts-VAO7RDKX.js → prompts-ZEVFT7US.js} +2 -2
- package/dist/{publication-5KF44AKQ.js → publication-VPJZQCLA.js} +2 -2
- package/dist/{publish-SSKWZ5TE.js → publish-7RA2MK2M.js} +18 -18
- package/dist/{refresh-I6ITGHKL.js → refresh-AM2ULRRV.js} +3 -3
- package/dist/{remove-background-PCL6I5SZ.js → remove-background-A5KJUH6W.js} +14 -14
- package/dist/{render-UPRWOGLS.js → render-EMW4I6C6.js} +45 -45
- package/dist/{render-DH4UA7KW.js → render-IYV73CG6.js} +10 -10
- package/dist/{render-DRWQ6F37.js → render-Z5IS4AUP.js} +39 -39
- package/dist/{render-batch-EBW5WHB5.js → render-batch-IN2ZXPS7.js} +10 -10
- package/dist/renderSetupWorker.js +2 -2
- package/dist/{resolver-ZSZXNRFP.js → resolver-DIXFK5ZR.js} +4 -4
- package/dist/run-MCVU7AZX.js +31 -0
- package/dist/{sam-QA7JT7IM.js → sam-EGFXZF56.js} +2 -2
- package/dist/{screenshotCapture-4THETOMD.js → screenshotCapture-RUDON2HB.js} +2 -2
- package/dist/{sherpa-IKVUCBOW.js → sherpa-SAY3I7PK.js} +12 -11
- package/dist/{sites-MTLVMYJ6.js → sites-EAGXQOKI.js} +2 -2
- package/dist/skills/hyperframes-cli/SKILL.md +4 -4
- package/dist/skills/hyperframes-cli/references/cloud.md +3 -1
- package/dist/skills/hyperframes-cli/references/preview-render.md +1 -1
- package/dist/skills/media-use/SKILL.md +20 -21
- package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +26 -1
- package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +33 -0
- package/dist/skills/media-use/references/heygen.md +58 -0
- package/dist/skills/media-use/references/operations.md +9 -6
- package/dist/skills/media-use/references/setup-providers.md +11 -12
- package/dist/skills/media-use/scripts/lib/index-gen.d.mts +1 -0
- package/dist/skills/media-use/scripts/lib/manifest.d.mts +21 -0
- package/dist/{skills-ZREHX3TU.js → skills-YWQ5XKH6.js} +9 -9
- package/dist/{skillsUpdateCheck-PPJ5NGAL.js → skillsUpdateCheck-ST5ZFEET.js} +5 -5
- package/dist/{snapshot-KPFLZNEL.js → snapshot-57YYYE5J.js} +43 -42
- package/dist/{src-QRV3466B.js → src-7MEBCSTP.js} +9 -9
- package/dist/{src-EPOGDJTT.js → src-LNSJHD25.js} +10 -6
- package/dist/{state-6QHNNHDA.js → state-W3AS6O2J.js} +2 -2
- package/dist/{staticProjectServer-ERKLMZVM.js → staticProjectServer-TTJSAB2Q.js} +19 -19
- package/dist/{status-4AAPTTRW.js → status-FGXBUX2T.js} +36 -11
- package/dist/studio/assets/hyperframes-player-Bzcd9O2g.js +478 -0
- package/dist/studio/assets/{index-C8VIUiGz.js → index-CZI-XmnO.js} +119 -119
- package/dist/studio/assets/{index-CVPNbydK.js → index-LW6kxYVF.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-7WFZIIPL.js → studio-api-57E36S5N.js} +15 -15
- package/dist/{studioServer-3XZTLI26.js → studioServer-2AIRUNBA.js} +55 -55
- package/dist/sync-52GUXEYZ.js +115 -0
- package/dist/{telemetry-BMLI4TMC.js → telemetry-RVY6RSCD.js} +6 -6
- package/dist/{telemetry-QHYJJAJU.js → telemetry-T73TKZOL.js} +1 -1
- package/dist/{timeline-EDCDO2ZR.js → timeline-MMZF4AX3.js} +31 -27
- package/dist/{tokens-2ZFLFO3K.js → tokens-WGWCYFTY.js} +5 -5
- package/dist/{transcribe-Y2LPBT7I.js → transcribe-6BF5FFPV.js} +39 -22
- package/dist/{transcribe-3WMH62HH.js → transcribe-YYDHXRQW.js} +11 -10
- package/dist/{tts-BVTJEP72.js → tts-ZLNNIS6W.js} +5 -5
- package/dist/{updateCheck-5LFZGC3P.js → updateCheck-AAR5LLUF.js} +4 -4
- package/dist/{upgrade-X7QVSEKP.js → upgrade-Y7CIRL4B.js} +5 -5
- package/dist/{urlDownloader-TYD6ROKL.js → urlDownloader-KZOD7EWX.js} +6 -6
- package/dist/{validate-26KQ5VX7.js → validate-K3PHAA2E.js} +30 -30
- package/dist/{video-BPKLZIJK.js → video-Z6EBVCAT.js} +9 -9
- package/dist/warmCheck.js +47 -46
- package/package.json +1 -1
- package/dist/chunk-LL3VMDAC.js +0 -5013
- package/dist/studio/assets/hyperframes-player-Dka6e1BG.js +0 -478
- package/dist/{chunk-NOH32H42.js → chunk-HBAUU3IK.js} +124 -124
- package/dist/{synthesize-4JC74JW5.js → synthesize-DIT2SR3D.js} +5 -5
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
forceRefreshCredentials,
|
|
13
13
|
resolveCloudAuthHeaders,
|
|
14
14
|
resolveCloudBaseUrl
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BEMGUGGJ.js";
|
|
16
16
|
import {
|
|
17
17
|
errorBox
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5LOZWO2M.js";
|
|
19
19
|
import {
|
|
20
20
|
failCommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-66W5IWLO.js";
|
|
22
22
|
|
|
23
23
|
// src/cloud/poll.ts
|
|
24
24
|
var DEFAULT_POLL_INTERVAL_MS = 2e3;
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
warnUnknownEnumValues,
|
|
59
59
|
wrapInlineScriptWithErrorBoundary,
|
|
60
60
|
wrapScopedCompositionScript
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-6UWSEXQ3.js";
|
|
62
62
|
import {
|
|
63
63
|
cssVariableName
|
|
64
64
|
} from "./chunk-VC76R6W2.js";
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
import {
|
|
70
70
|
collectExternalStyles,
|
|
71
71
|
lintHyperframeHtml
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-HT3D5AKG.js";
|
|
73
73
|
import {
|
|
74
74
|
CSS_URL_RE,
|
|
75
75
|
checkSubCompositionUsability,
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
findCompositionDimensions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OZMZFJDW.js";
|
|
10
10
|
import {
|
|
11
11
|
outputResolutionForSize
|
|
12
12
|
} from "./chunk-T5ELONXY.js";
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
+
var require = __hf_createRequire(import.meta.url);
|
|
5
|
+
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
findCuts
|
|
9
|
+
} from "./chunk-K3QT232E.js";
|
|
10
|
+
import {
|
|
11
|
+
grey,
|
|
12
|
+
readClip,
|
|
13
|
+
round,
|
|
14
|
+
videoClip,
|
|
15
|
+
writeImage
|
|
16
|
+
} from "./chunk-BTK3T4HJ.js";
|
|
17
|
+
|
|
18
|
+
// src/measure/events.ts
|
|
19
|
+
var EVENT_W = 160;
|
|
20
|
+
var CUT_SHARE = 0.7;
|
|
21
|
+
var CUT_GRID = 4;
|
|
22
|
+
var HOLD_S = 0.3;
|
|
23
|
+
var STEP_MAX_S = 0.5;
|
|
24
|
+
var FLASH_FRAMES = 2;
|
|
25
|
+
var STRIP_MAX = 24;
|
|
26
|
+
var STRIP_W = 1200;
|
|
27
|
+
var WINDOW_GAP_S = 0.25;
|
|
28
|
+
var WINDOW_MAX_S = 1.5;
|
|
29
|
+
function cells(cols, rows, w, h) {
|
|
30
|
+
return Array.from({ length: rows * cols }, (_, i) => {
|
|
31
|
+
const [r, c] = [Math.floor(i / cols), i % cols];
|
|
32
|
+
return {
|
|
33
|
+
name: `r${r}c${c}`,
|
|
34
|
+
rect: [
|
|
35
|
+
Math.floor(c * w / cols),
|
|
36
|
+
Math.floor(r * h / rows),
|
|
37
|
+
Math.floor((c + 1) * w / cols),
|
|
38
|
+
Math.floor((r + 1) * h / rows)
|
|
39
|
+
]
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function diff(a, b, w, [x0, y0, x1, y1]) {
|
|
44
|
+
let s = 0;
|
|
45
|
+
for (let y = y0; y < y1; y++)
|
|
46
|
+
for (let x = x0; x < x1; x++) s += Math.abs(a[y * w + x] - b[y * w + x]);
|
|
47
|
+
return s / Math.max(1, (x1 - x0) * (y1 - y0));
|
|
48
|
+
}
|
|
49
|
+
function level(f, w, [x0, y0, x1, y1]) {
|
|
50
|
+
let [s, s2] = [0, 0];
|
|
51
|
+
for (let y = y0; y < y1; y++)
|
|
52
|
+
for (let x = x0; x < x1; x++) {
|
|
53
|
+
s += f[y * w + x];
|
|
54
|
+
s2 += f[y * w + x] ** 2;
|
|
55
|
+
}
|
|
56
|
+
const n = Math.max(1, (x1 - x0) * (y1 - y0));
|
|
57
|
+
return { mean: s / n, std: Math.sqrt(Math.max(0, s2 / n - (s / n) ** 2)) };
|
|
58
|
+
}
|
|
59
|
+
var changes = (g, w, rect) => g.map((f, i) => i ? diff(f, g[i - 1], w, rect) : 0);
|
|
60
|
+
function bursts(d) {
|
|
61
|
+
const q = d.slice(1).sort((a, b) => a - b);
|
|
62
|
+
const act = Math.max(2, 2 * (q[Math.floor(q.length / 4)] ?? 0));
|
|
63
|
+
const out = [];
|
|
64
|
+
for (let i = 1; i < d.length; i++) {
|
|
65
|
+
if (d[i] <= act) continue;
|
|
66
|
+
const last = out.at(-1);
|
|
67
|
+
if (last && i - last[1] <= 2) last[1] = i;
|
|
68
|
+
else out.push([i, i]);
|
|
69
|
+
}
|
|
70
|
+
return out;
|
|
71
|
+
}
|
|
72
|
+
function stills(d, fps) {
|
|
73
|
+
const q = d.slice(1).sort((a, b) => a - b);
|
|
74
|
+
const floor = Math.min(1.5, Math.max(0.5, 2 * (q[Math.floor(q.length / 10)] ?? 0)));
|
|
75
|
+
const out = [];
|
|
76
|
+
for (let i = 1, run = 0; i <= d.length; i++) {
|
|
77
|
+
if (i < d.length && d[i] <= floor) run++;
|
|
78
|
+
else {
|
|
79
|
+
if (run + 1 >= HOLD_S * fps) out.push([i - run - 1, run + 1]);
|
|
80
|
+
run = 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return out;
|
|
84
|
+
}
|
|
85
|
+
function groups(items, near) {
|
|
86
|
+
const root = items.map((_, i) => i);
|
|
87
|
+
const find = (i) => root[i] === i ? i : root[i] = find(root[i]);
|
|
88
|
+
for (let i = 0; i < items.length; i++)
|
|
89
|
+
for (let j = i + 1; j < items.length; j++)
|
|
90
|
+
if (near(items[i], items[j])) root[find(i)] = find(j);
|
|
91
|
+
const out = /* @__PURE__ */ new Map();
|
|
92
|
+
items.forEach((it, i) => out.set(find(i), [...out.get(find(i)) ?? [], it]));
|
|
93
|
+
return [...out.values()];
|
|
94
|
+
}
|
|
95
|
+
function cutFrames(g, w, cutCells, thr) {
|
|
96
|
+
const d = cutCells.map((c) => changes(g, w, c.rect));
|
|
97
|
+
const hits = g.map((_, i) => i).filter((i) => i > 0 && d.filter((x) => x[i] >= thr).length >= CUT_SHARE * cutCells.length);
|
|
98
|
+
const cuts = [];
|
|
99
|
+
const flashes = [];
|
|
100
|
+
for (let k = 0; k < hits.length; k++) {
|
|
101
|
+
const [i, j] = [hits[k], hits[k + 1]];
|
|
102
|
+
const last = cuts.at(-1);
|
|
103
|
+
if (j !== void 0 && j - i <= FLASH_FRAMES && diff(g[j], g[i - 1], w, [0, 0, w, g[0].length / w]) < thr) {
|
|
104
|
+
flashes.push([i, j - 1]);
|
|
105
|
+
k++;
|
|
106
|
+
} else if (last && i === last[1] + 1)
|
|
107
|
+
last[1] = i;
|
|
108
|
+
else cuts.push([i, i]);
|
|
109
|
+
}
|
|
110
|
+
return { cuts, flashes, d };
|
|
111
|
+
}
|
|
112
|
+
function bursting(g, w, regions, skip, thr, fps) {
|
|
113
|
+
const settle = Math.round(HOLD_S * fps);
|
|
114
|
+
const steps = [];
|
|
115
|
+
const flashes = [];
|
|
116
|
+
const moves = [];
|
|
117
|
+
for (const [ci, c] of regions.entries()) {
|
|
118
|
+
const d = changes(g, w, c.rect);
|
|
119
|
+
for (const [a, b] of bursts(d)) {
|
|
120
|
+
if (skip(a, b)) continue;
|
|
121
|
+
const net = diff(g[b], g[a - 1], w, c.rect);
|
|
122
|
+
const peak = Math.max(...d.slice(a, b + 1));
|
|
123
|
+
const burst = { ci, c, a, b, net, peak };
|
|
124
|
+
if (b - a + 1 <= FLASH_FRAMES && peak >= 2 * thr && b + 1 < g.length && diff(g[b + 1], g[a - 1], w, c.rect) < thr) {
|
|
125
|
+
flashes.push(burst);
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
const was = diff(g[a - 1], g[Math.max(0, a - 1 - settle)], w, c.rect);
|
|
129
|
+
const now = diff(g[b], g[Math.min(g.length - 1, b + settle)], w, c.rect);
|
|
130
|
+
const step = net >= thr && b - a + 1 <= STEP_MAX_S * fps && Math.max(was, now) <= net / 3;
|
|
131
|
+
(step ? steps : moves).push(burst);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return { steps, flashes, moves };
|
|
135
|
+
}
|
|
136
|
+
function detectEvents(opts) {
|
|
137
|
+
const { info, start, end, roi, grid } = opts;
|
|
138
|
+
const thr = opts.thr ?? 5;
|
|
139
|
+
const fps = info.fps;
|
|
140
|
+
const whole = [0, 0, info.width, info.height];
|
|
141
|
+
const sameAsWhole = roi.every((v, i) => v === whole[i]);
|
|
142
|
+
const clip = videoClip(info.path, start, end - start, info);
|
|
143
|
+
const { frames: rgb, w, h } = readClip(clip, { roi, width: EVENT_W });
|
|
144
|
+
const g = rgb.map(grey);
|
|
145
|
+
const wholeG = sameAsWhole ? g : readClip(clip, { width: EVENT_W, gray: true }).frames;
|
|
146
|
+
const wholeH = wholeG[0] ? wholeG[0].length / EVENT_W : h;
|
|
147
|
+
const f0 = Math.ceil(start * fps - 1e-6);
|
|
148
|
+
const at = (i) => ({ frame: f0 + i, t: round((f0 + i) / fps, 3) });
|
|
149
|
+
if (g.length < 3) return { fps, frames: g.length, events: [], rgb, w, h, shown: [] };
|
|
150
|
+
const cutCells = cells(grid?.cols ?? CUT_GRID, grid?.rows ?? CUT_GRID, EVENT_W, wholeH);
|
|
151
|
+
const cut = cutFrames(wholeG, EVENT_W, cutCells, thr);
|
|
152
|
+
const real = new Set(
|
|
153
|
+
findCuts(wholeG).flatMap((c) => Array.from({ length: c.frames }, (_, i) => c.frame + i))
|
|
154
|
+
);
|
|
155
|
+
const alone = ([i, j]) => j === i && cut.cuts.every(([a, b]) => a === i && b === j || b < i - 3 || a > j + 3);
|
|
156
|
+
cut.cuts = cut.cuts.filter((c) => real.has(c[0]) || alone(c));
|
|
157
|
+
const single = { name: "roi", rect: [0, 0, w, h] };
|
|
158
|
+
const regions = grid ? cells(grid.cols, grid.rows, w, h) : [single];
|
|
159
|
+
const covered = (a, b) => [...cut.cuts, ...cut.flashes].some(([x, y]) => x <= b && a <= y);
|
|
160
|
+
const { steps, flashes, moves } = bursting(g, w, regions, covered, thr, fps);
|
|
161
|
+
const cols = grid?.cols ?? 1;
|
|
162
|
+
const touching = (s, o) => Math.abs(Math.floor(s.ci / cols) - Math.floor(o.ci / cols)) <= 1 && Math.abs(s.ci % cols - o.ci % cols) <= 1;
|
|
163
|
+
const overlap = (s, o) => s.a <= o.b + 2 && o.a <= s.b + 2;
|
|
164
|
+
const [kx, ky] = [roi[2] / w, roi[3] / h];
|
|
165
|
+
const event = (grp, type, size) => {
|
|
166
|
+
const [a, b] = [Math.min(...grp.map((s) => s.a)), Math.max(...grp.map((s) => s.b))];
|
|
167
|
+
const rect = [0, 1, 2, 3].map(
|
|
168
|
+
(k) => (k < 2 ? Math.min : Math.max)(...grp.map((s) => s.c.rect[k]))
|
|
169
|
+
);
|
|
170
|
+
const where = grid ? {
|
|
171
|
+
cells: [...new Set(grp.map((s) => s.c.name))].sort(),
|
|
172
|
+
roi: [
|
|
173
|
+
rect[0] * kx + roi[0],
|
|
174
|
+
rect[1] * ky + roi[1],
|
|
175
|
+
(rect[2] - rect[0]) * kx,
|
|
176
|
+
(rect[3] - rect[1]) * ky
|
|
177
|
+
].map(Math.round)
|
|
178
|
+
} : {};
|
|
179
|
+
return {
|
|
180
|
+
type,
|
|
181
|
+
...at(a),
|
|
182
|
+
frames: b - a + 1,
|
|
183
|
+
...where,
|
|
184
|
+
magnitude: round(size, 1),
|
|
185
|
+
before: a - 1,
|
|
186
|
+
after: b,
|
|
187
|
+
rect: grid ? rect : null
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
const stepEvents = groups(steps, (s, o) => overlap(s, o) && touching(s, o)).map((grp) => {
|
|
191
|
+
const e = event(grp, "change", grp.reduce((m, s) => m + s.net, 0) / grp.length);
|
|
192
|
+
const box = e.rect ?? [0, 0, w, h];
|
|
193
|
+
const [was, now] = [level(g[e.before], w, box), level(g[e.after], w, box)];
|
|
194
|
+
const up = Math.abs(now.std - was.std) >= 2 ? now.std > was.std : now.mean > was.mean;
|
|
195
|
+
return { ...e, type: up ? "appear" : "disappear" };
|
|
196
|
+
});
|
|
197
|
+
const flashEvents = [
|
|
198
|
+
...groups(flashes, (s, o) => overlap(s, o) && touching(s, o)).map(
|
|
199
|
+
(grp) => event(grp, "flash", Math.max(...grp.map((s) => s.peak)))
|
|
200
|
+
),
|
|
201
|
+
...cut.flashes.map(([i, j]) => ({
|
|
202
|
+
type: "flash",
|
|
203
|
+
...at(i),
|
|
204
|
+
frames: j - i + 1,
|
|
205
|
+
magnitude: round(cut.d.reduce((m, d) => m + d[i], 0) / cut.d.length, 1),
|
|
206
|
+
before: i - 1,
|
|
207
|
+
after: i,
|
|
208
|
+
rect: null
|
|
209
|
+
}))
|
|
210
|
+
];
|
|
211
|
+
const moveEvents = groups(moves, overlap).map(
|
|
212
|
+
(grp) => event(grp, "change", Math.max(...grp.map((s) => s.peak)))
|
|
213
|
+
);
|
|
214
|
+
const cutEvents = cut.cuts.map(([i, j]) => ({
|
|
215
|
+
type: "cut",
|
|
216
|
+
...at(i),
|
|
217
|
+
...j > i ? { frames: j - i + 1 } : {},
|
|
218
|
+
magnitude: round(cut.d.reduce((m, d) => m + d[i], 0) / cut.d.length, 1),
|
|
219
|
+
before: i - 1,
|
|
220
|
+
after: j,
|
|
221
|
+
rect: null
|
|
222
|
+
}));
|
|
223
|
+
const still = changes(grid ? wholeG : g, EVENT_W, [0, 0, EVENT_W, grid ? wholeH : h]);
|
|
224
|
+
const held = stills(still, fps).map(([i, n]) => ({
|
|
225
|
+
type: "hold",
|
|
226
|
+
...at(i),
|
|
227
|
+
seconds: round(n / fps, 2)
|
|
228
|
+
}));
|
|
229
|
+
const weight = (e) => (e.cells?.length ?? 1) * (e.magnitude ?? 0);
|
|
230
|
+
const order = (x, y) => x.frame - y.frame;
|
|
231
|
+
const shown = [
|
|
232
|
+
...cutEvents,
|
|
233
|
+
...flashEvents,
|
|
234
|
+
...[...stepEvents].sort((x, y) => weight(y) - weight(x)),
|
|
235
|
+
...[...moveEvents].sort((x, y) => (y.magnitude ?? 0) - (x.magnitude ?? 0))
|
|
236
|
+
].slice(0, STRIP_MAX).sort(order);
|
|
237
|
+
const plain = ({ before: _b, after: _a, rect: _r, ...e }) => e;
|
|
238
|
+
const events = [...cutEvents, ...flashEvents, ...stepEvents, ...moveEvents].map(plain);
|
|
239
|
+
return { fps, frames: g.length, events: [...events, ...held].sort(order), rgb, w, h, shown };
|
|
240
|
+
}
|
|
241
|
+
function drawStrip(d, out) {
|
|
242
|
+
const { rgb, w, h, shown } = d;
|
|
243
|
+
const per = Math.max(1, Math.floor(STRIP_W / (2 * w + 12)));
|
|
244
|
+
const cw = per * (2 * w + 12);
|
|
245
|
+
const ch = Math.ceil(shown.length / per) * (h + 8);
|
|
246
|
+
const px = new Uint8Array(cw * ch * 3).fill(255);
|
|
247
|
+
shown.forEach((e, k) => {
|
|
248
|
+
const [ox, oy] = [k % per * (2 * w + 12), Math.floor(k / per) * (h + 8)];
|
|
249
|
+
[e.before, e.after].forEach((f, side) => {
|
|
250
|
+
const x0 = ox + side * (w + 2);
|
|
251
|
+
for (let y = 0; y < h; y++)
|
|
252
|
+
px.set(rgb[f].subarray(y * w * 3, (y + 1) * w * 3), ((oy + y) * cw + x0) * 3);
|
|
253
|
+
if (!e.rect) return;
|
|
254
|
+
const [rx0, ry0, rx1, ry1] = e.rect;
|
|
255
|
+
for (let y = ry0; y < ry1; y++)
|
|
256
|
+
for (let x = rx0; x < rx1; x++)
|
|
257
|
+
if (y === ry0 || y === ry1 - 1 || x === rx0 || x === rx1 - 1)
|
|
258
|
+
px.set([255, 0, 0], ((oy + y) * cw + x0 + x) * 3);
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
return writeImage(out, px, cw, ch);
|
|
262
|
+
}
|
|
263
|
+
function lookWindows(events, fps, onsets = []) {
|
|
264
|
+
const pad = 2 / fps;
|
|
265
|
+
const spans = events.filter((e) => e.type !== "hold").map((e) => {
|
|
266
|
+
const where = e.cells ? ` ${e.cells.join(",")}` : "";
|
|
267
|
+
const len = e.type === "flash" ? ` ${e.frames}f` : "";
|
|
268
|
+
return {
|
|
269
|
+
a: e.t - pad,
|
|
270
|
+
b: e.t + ((e.frames ?? 1) - 1) / fps + pad,
|
|
271
|
+
what: `${e.type}${where}${len}`,
|
|
272
|
+
frame: e.frame
|
|
273
|
+
};
|
|
274
|
+
}).sort((x, y) => x.a - y.a);
|
|
275
|
+
const out = [];
|
|
276
|
+
for (const s of spans) {
|
|
277
|
+
const last = out.at(-1);
|
|
278
|
+
if (last && s.a - last.end <= WINDOW_GAP_S && s.b - last.start <= WINDOW_MAX_S) {
|
|
279
|
+
last.end = Math.max(last.end, s.b);
|
|
280
|
+
last.what.push(s.what);
|
|
281
|
+
last.onset_frames.push(s.frame);
|
|
282
|
+
} else out.push({ start: s.a, end: s.b, what: [s.what], onset_frames: [s.frame] });
|
|
283
|
+
}
|
|
284
|
+
return out.map((wnd) => {
|
|
285
|
+
const hits = onsets.filter((t) => t >= wnd.start && t <= wnd.end);
|
|
286
|
+
return {
|
|
287
|
+
start: round(Math.max(0, wnd.start), 3),
|
|
288
|
+
end: round(wnd.end, 3),
|
|
289
|
+
what: wnd.what,
|
|
290
|
+
...hits.length ? { onsets: hits.map((t) => round(t, 3)) } : {},
|
|
291
|
+
onset_frames: [...new Set(wnd.onset_frames)].sort((x, y) => x - y)
|
|
292
|
+
};
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
function countEvents(events) {
|
|
296
|
+
const count = (type) => events.filter((e) => e.type === type).length;
|
|
297
|
+
return {
|
|
298
|
+
cut: count("cut"),
|
|
299
|
+
flash: count("flash"),
|
|
300
|
+
appear: count("appear"),
|
|
301
|
+
disappear: count("disappear"),
|
|
302
|
+
change: count("change"),
|
|
303
|
+
hold: count("hold")
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export {
|
|
308
|
+
detectEvents,
|
|
309
|
+
drawStrip,
|
|
310
|
+
lookWindows,
|
|
311
|
+
countEvents
|
|
312
|
+
};
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
+
var require = __hf_createRequire(import.meta.url);
|
|
5
|
+
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
findFFmpeg,
|
|
9
|
+
findFFprobe,
|
|
10
|
+
getFFmpegInstallHint
|
|
11
|
+
} from "./chunk-HANNA5JJ.js";
|
|
12
|
+
|
|
13
|
+
// src/measure/media.ts
|
|
14
|
+
import { execFileSync } from "child_process";
|
|
15
|
+
import { existsSync, mkdirSync } from "fs";
|
|
16
|
+
import { join, resolve } from "path";
|
|
17
|
+
var MAX_BUFFER = 1 << 30;
|
|
18
|
+
var FFMPEG_QUIET = ["-nostdin", "-v", "error"];
|
|
19
|
+
var Fix = class extends Error {
|
|
20
|
+
constructor(problem, fix) {
|
|
21
|
+
super(problem);
|
|
22
|
+
this.fix = fix;
|
|
23
|
+
this.name = "Fix";
|
|
24
|
+
}
|
|
25
|
+
fix;
|
|
26
|
+
};
|
|
27
|
+
function ffmpegBin() {
|
|
28
|
+
const bin = findFFmpeg();
|
|
29
|
+
if (!bin) throw new Fix("ffmpeg is not installed", getFFmpegInstallHint());
|
|
30
|
+
return bin;
|
|
31
|
+
}
|
|
32
|
+
function ffprobeBin() {
|
|
33
|
+
const bin = findFFprobe();
|
|
34
|
+
if (!bin) throw new Fix("ffprobe is not installed", getFFmpegInstallHint());
|
|
35
|
+
return bin;
|
|
36
|
+
}
|
|
37
|
+
function runFfmpeg(args, input, cwd) {
|
|
38
|
+
return execFileSync(ffmpegBin(), [...FFMPEG_QUIET, ...args], {
|
|
39
|
+
maxBuffer: MAX_BUFFER,
|
|
40
|
+
windowsHide: true,
|
|
41
|
+
...input ? { input } : {},
|
|
42
|
+
...cwd ? { cwd } : {}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
var rate = (text) => {
|
|
46
|
+
const [a, b] = String(text ?? "0/1").split("/").map(Number);
|
|
47
|
+
return b ? (a ?? 0) / b : a ?? 0;
|
|
48
|
+
};
|
|
49
|
+
function probeVideo(path) {
|
|
50
|
+
if (!existsSync(path))
|
|
51
|
+
throw new Fix(`no file at ${path}`, "pass the video's path from the project folder");
|
|
52
|
+
let json;
|
|
53
|
+
try {
|
|
54
|
+
json = JSON.parse(
|
|
55
|
+
execFileSync(
|
|
56
|
+
ffprobeBin(),
|
|
57
|
+
["-v", "error", "-show_streams", "-show_format", "-of", "json", "--", path],
|
|
58
|
+
{ maxBuffer: MAX_BUFFER, windowsHide: true }
|
|
59
|
+
).toString()
|
|
60
|
+
);
|
|
61
|
+
} catch {
|
|
62
|
+
throw new Fix(`ffprobe cannot read ${path}`, "pass a video file (mp4, mov, webm)");
|
|
63
|
+
}
|
|
64
|
+
const streams = json.streams ?? [];
|
|
65
|
+
const video = streams.find((s) => s.codec_type === "video");
|
|
66
|
+
if (!video) throw new Fix(`${path} has no video stream`, "pass a video file, not audio");
|
|
67
|
+
const rotation = Math.abs(
|
|
68
|
+
Number(video.side_data_list?.find((d) => d.rotation !== void 0)?.rotation ?? 0) || Number(video.tags?.rotate ?? 0)
|
|
69
|
+
);
|
|
70
|
+
const turned = rotation % 180 === 90;
|
|
71
|
+
const fpsText = video.r_frame_rate && video.r_frame_rate !== "0/0" ? video.r_frame_rate : "30/1";
|
|
72
|
+
const fps = rate(fpsText);
|
|
73
|
+
const avg = rate(video.avg_frame_rate);
|
|
74
|
+
const duration = Number(json.format?.duration ?? video.duration ?? 0);
|
|
75
|
+
const counted = Number(video.nb_frames ?? 0);
|
|
76
|
+
const sound = streams.find((s) => s.codec_type === "audio");
|
|
77
|
+
const frames = counted > 0 ? counted : Math.round(duration * fps);
|
|
78
|
+
return {
|
|
79
|
+
path,
|
|
80
|
+
width: (turned ? video.height : video.width) ?? 0,
|
|
81
|
+
height: (turned ? video.width : video.height) ?? 0,
|
|
82
|
+
fps,
|
|
83
|
+
fpsText: fpsText.endsWith("/1") ? fpsText.slice(0, -2) : fpsText,
|
|
84
|
+
duration,
|
|
85
|
+
pictureDuration: Number(video.duration ?? 0) || frames / (avg || fps),
|
|
86
|
+
frames,
|
|
87
|
+
audio: Boolean(sound),
|
|
88
|
+
audioStart: Math.max(0, Number(sound?.start_time ?? 0) - Number(video.start_time ?? 0) || 0),
|
|
89
|
+
avgFps: avg || fps,
|
|
90
|
+
vfr: avg > 0 && Math.abs(avg - fps) / fps > 0.01,
|
|
91
|
+
hdr: /smpte2084|arib-std-b67/.test(video.color_transfer ?? ""),
|
|
92
|
+
codec: video.codec_name ?? ""
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function videoClip(path, start = 0, seconds, info = probeVideo(path)) {
|
|
96
|
+
return {
|
|
97
|
+
input: [
|
|
98
|
+
...start > 0 ? ["-ss", String(start)] : [],
|
|
99
|
+
"-i",
|
|
100
|
+
path,
|
|
101
|
+
...seconds !== void 0 ? ["-t", String(seconds)] : []
|
|
102
|
+
],
|
|
103
|
+
filters: [],
|
|
104
|
+
width: info.width,
|
|
105
|
+
height: info.height,
|
|
106
|
+
fps: info.fps
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function readClip(clip, opts = {}) {
|
|
110
|
+
const { roi, width = 0, gray = false, fps = 0, limit } = opts;
|
|
111
|
+
const filters = [...clip.filters];
|
|
112
|
+
if (fps) filters.push(`fps=${fps}`);
|
|
113
|
+
let [w, h] = [clip.width, clip.height];
|
|
114
|
+
if (roi) {
|
|
115
|
+
filters.push(`crop=${roi[2]}:${roi[3]}:${roi[0]}:${roi[1]}`);
|
|
116
|
+
[w, h] = [roi[2], roi[3]];
|
|
117
|
+
}
|
|
118
|
+
if (width && width !== w) {
|
|
119
|
+
const outH = Math.max(2, Math.round(h * width / w / 2) * 2);
|
|
120
|
+
filters.push(`scale=${width}:${outH}`);
|
|
121
|
+
[w, h] = [width, outH];
|
|
122
|
+
}
|
|
123
|
+
return decode(clip.input, filters, w, h, gray, limit);
|
|
124
|
+
}
|
|
125
|
+
function readFrameAt(info, t, opts = {}) {
|
|
126
|
+
const k = Math.min(info.frames - 1, frameAt(t, info.fps));
|
|
127
|
+
return readClip(
|
|
128
|
+
{ ...videoClip(info.path, 0, void 0, info), filters: [`select=eq(n\\,${k})`] },
|
|
129
|
+
{ ...opts, limit: 1 }
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
function readFrames(path, opts = {}) {
|
|
133
|
+
return readClip(videoClip(path, opts.start, opts.seconds), opts);
|
|
134
|
+
}
|
|
135
|
+
function decode(input, filters, w, h, gray = false, limit) {
|
|
136
|
+
const raw = runFfmpeg([
|
|
137
|
+
...input,
|
|
138
|
+
"-an",
|
|
139
|
+
"-vf",
|
|
140
|
+
[...filters, `format=${gray ? "gray" : "rgb24"}`].join(","),
|
|
141
|
+
...limit ? ["-frames:v", String(limit)] : [],
|
|
142
|
+
"-f",
|
|
143
|
+
"rawvideo",
|
|
144
|
+
"-"
|
|
145
|
+
]);
|
|
146
|
+
const size = w * h * (gray ? 1 : 3);
|
|
147
|
+
const frames = [];
|
|
148
|
+
for (let i = 0; i + size <= raw.length; i += size) frames.push(raw.subarray(i, i + size));
|
|
149
|
+
return { frames, w, h };
|
|
150
|
+
}
|
|
151
|
+
function grey(rgb) {
|
|
152
|
+
const out = new Uint8Array(rgb.length / 3);
|
|
153
|
+
for (let i = 0; i < out.length; i++)
|
|
154
|
+
out[i] = 77 * rgb[3 * i] + 150 * rgb[3 * i + 1] + 29 * rgb[3 * i + 2] >> 8;
|
|
155
|
+
return out;
|
|
156
|
+
}
|
|
157
|
+
function meanAbsDiff(a, b) {
|
|
158
|
+
let s = 0;
|
|
159
|
+
for (let i = 0; i < a.length; i++) s += Math.abs(a[i] - b[i]);
|
|
160
|
+
return s / (a.length || 1);
|
|
161
|
+
}
|
|
162
|
+
function writeImage(path, px, w, h, gray = false) {
|
|
163
|
+
const header = Buffer.from(`${gray ? "P5" : "P6"}
|
|
164
|
+
${w} ${h}
|
|
165
|
+
255
|
|
166
|
+
`);
|
|
167
|
+
runFfmpeg(
|
|
168
|
+
["-y", "-f", gray ? "pgm_pipe" : "ppm_pipe", "-i", "-", "-frames:v", "1", path],
|
|
169
|
+
Buffer.concat([header, Buffer.from(px.buffer, px.byteOffset, px.byteLength)])
|
|
170
|
+
);
|
|
171
|
+
return path;
|
|
172
|
+
}
|
|
173
|
+
var round = (n, d = 3) => Math.round(n * 10 ** d) / 10 ** d;
|
|
174
|
+
var ratioOf = (yours, ref, floor) => yours < floor && ref < floor ? 1 : yours / (ref || 1e-9);
|
|
175
|
+
function parseNumbers(text, flag) {
|
|
176
|
+
const out = String(text ?? "").split(",").filter((s) => s.trim() !== "").map(Number);
|
|
177
|
+
if (!out.length || out.some((n) => !Number.isFinite(n)))
|
|
178
|
+
throw new Fix(
|
|
179
|
+
`${flag} must be numbers separated by commas, got "${String(text)}"`,
|
|
180
|
+
`${flag} 1.2,3.4`
|
|
181
|
+
);
|
|
182
|
+
return out;
|
|
183
|
+
}
|
|
184
|
+
function parseRange(text, flag = "--range") {
|
|
185
|
+
const v = parseNumbers(text, flag);
|
|
186
|
+
if (v.length !== 2 || v[0] < 0 || v[1] <= v[0])
|
|
187
|
+
throw new Fix(
|
|
188
|
+
`${flag} must be start,end seconds with start < end, got "${String(text)}"`,
|
|
189
|
+
`${flag} 2.1,4.5`
|
|
190
|
+
);
|
|
191
|
+
return [v[0], v[1]];
|
|
192
|
+
}
|
|
193
|
+
function parseRoi(text, width, height) {
|
|
194
|
+
const v = parseNumbers(text, "--roi").map(Math.round);
|
|
195
|
+
if (v.length !== 4 || v[2] <= 0 || v[3] <= 0)
|
|
196
|
+
throw new Fix(
|
|
197
|
+
`--roi must be x,y,w,h with a positive size, got "${String(text)}"`,
|
|
198
|
+
"--roi 100,200,400,300"
|
|
199
|
+
);
|
|
200
|
+
const roi = [v[0], v[1], v[2], v[3]];
|
|
201
|
+
if (width && height && (roi[0] < 0 || roi[1] < 0 || roi[0] + roi[2] > width || roi[1] + roi[3] > height))
|
|
202
|
+
throw new Fix(
|
|
203
|
+
`--roi ${roi.join(",")} runs past the ${width}x${height} frame`,
|
|
204
|
+
`keep it inside 0,0,${width},${height}`
|
|
205
|
+
);
|
|
206
|
+
return roi;
|
|
207
|
+
}
|
|
208
|
+
function outDir(out, tool) {
|
|
209
|
+
const dir = typeof out === "string" && out ? resolve(out) : resolve(join(".hyperframes", tool));
|
|
210
|
+
mkdirSync(dir, { recursive: true });
|
|
211
|
+
return dir;
|
|
212
|
+
}
|
|
213
|
+
var frameAt = (t, fps) => Math.max(0, Math.floor((t + 5e-4) * fps + 1e-6));
|
|
214
|
+
var formatJson = (value) => JSON.stringify(value, null, 1).replace(/[[{][^[\]{}]*[\]}]/g, (m) => m.replace(/\n\s*/g, " "));
|
|
215
|
+
function pearson(a, b) {
|
|
216
|
+
const n = Math.min(a.length, b.length);
|
|
217
|
+
const ma = a.slice(0, n).reduce((s, v) => s + v, 0) / n;
|
|
218
|
+
const mb = b.slice(0, n).reduce((s, v) => s + v, 0) / n;
|
|
219
|
+
let [num, da, db] = [0, 0, 0];
|
|
220
|
+
for (let i = 0; i < n; i++) {
|
|
221
|
+
num += (a[i] - ma) * (b[i] - mb);
|
|
222
|
+
da += (a[i] - ma) ** 2;
|
|
223
|
+
db += (b[i] - mb) ** 2;
|
|
224
|
+
}
|
|
225
|
+
return da && db ? num / Math.sqrt(da * db) : null;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export {
|
|
229
|
+
Fix,
|
|
230
|
+
ffmpegBin,
|
|
231
|
+
runFfmpeg,
|
|
232
|
+
probeVideo,
|
|
233
|
+
videoClip,
|
|
234
|
+
readClip,
|
|
235
|
+
readFrameAt,
|
|
236
|
+
readFrames,
|
|
237
|
+
decode,
|
|
238
|
+
grey,
|
|
239
|
+
meanAbsDiff,
|
|
240
|
+
writeImage,
|
|
241
|
+
round,
|
|
242
|
+
ratioOf,
|
|
243
|
+
parseNumbers,
|
|
244
|
+
parseRange,
|
|
245
|
+
parseRoi,
|
|
246
|
+
outDir,
|
|
247
|
+
frameAt,
|
|
248
|
+
formatJson,
|
|
249
|
+
pearson
|
|
250
|
+
};
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
sanitizeSuccessfulExitCode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-66W5IWLO.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/render-success-state.ts
|
|
12
12
|
var renderSucceeded = false;
|
|
@@ -6,13 +6,13 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
getMimeType
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-35NDLXHZ.js";
|
|
10
10
|
import {
|
|
11
11
|
stripSdrPngColourTags
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7RTPHNOO.js";
|
|
13
13
|
import {
|
|
14
14
|
injectTagsAtHeadStart
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6UWSEXQ3.js";
|
|
16
16
|
|
|
17
17
|
// src/utils/compositionServer.ts
|
|
18
18
|
import { createHash } from "crypto";
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
DEFAULT_VP9_CPU_USED,
|
|
9
9
|
isHttpUrl,
|
|
10
10
|
runFfmpeg
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NFUR6NNT.js";
|
|
12
12
|
import {
|
|
13
13
|
renameWithRetry
|
|
14
14
|
} from "./chunk-YWRUQ7XZ.js";
|
|
15
15
|
import {
|
|
16
16
|
parseAnimatedGifMetadata
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FJ3KUOUZ.js";
|
|
18
18
|
import {
|
|
19
19
|
parseHTML
|
|
20
20
|
} from "./chunk-GWTIFRF5.js";
|