hyperframes 0.8.222 → 0.8.223
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-PBLOPJHC.js} +12 -12
- package/dist/{agentPromptGenerator-X7SQPCXZ.js → agentPromptGenerator-OD74HKYZ.js} +7 -7
- package/dist/{animatedGifPrep-ESOJ4FQ7.js → animatedGifPrep-QCG2BTDC.js} +7 -7
- package/dist/api.d.ts +5 -3
- package/dist/api.js +32 -21
- package/dist/{asset-Y735VQV6.js → asset-KHXCO4OR.js} +2 -2
- package/dist/{assetCataloger-AOJAUEZW.js → assetCataloger-ZX5WZTDQ.js} +8 -8
- package/dist/{audio-VMMCGPOV.js → audio-7AH2C6PB.js} +145 -1153
- package/dist/{auth-BD5NHYRA.js → auth-DJWMGXQB.js} +5 -5
- package/dist/{autoUpdate-VTMNHOAJ.js → autoUpdate-KJMLYSHE.js} +2 -2
- package/dist/{backgroundChecks-SUDYQZSW.js → backgroundChecks-XLVQMMXY.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-4NR7RMT7.js → batchRender-UR67LI4H.js} +8 -8
- package/dist/{beats-PKEHQHBY.js → beats-ISWSYNN6.js} +10 -10
- package/dist/{benchmark-K55DDFHG.js → benchmark-7JUATINH.js} +8 -8
- package/dist/billing-VGKY3FMX.js +86 -0
- package/dist/{browser-G2WFWJJ3.js → browser-HNGQB47C.js} +3 -3
- package/dist/{bundleWithLocalizedFonts-MNG2UVH3.js → bundleWithLocalizedFonts-4XWX2XPS.js} +2 -2
- package/dist/{capture-U3EEAPI6.js → capture-GFDP5THL.js} +3 -3
- package/dist/{capture-24PIC3TZ.js → capture-LBEGVQTJ.js} +25 -25
- package/dist/{captureCompositionFrame-KL4V6ORD.js → captureCompositionFrame-5L3J4MZ4.js} +12 -12
- package/dist/{catalog-J3BU4TFW.js → catalog-SNUTPI57.js} +12 -12
- package/dist/{catch-up-LDGNMEGL.js → catch-up-FE3HDMLJ.js} +4 -4
- package/dist/{check-J6HG6EKE.js → check-MQCBMOKA.js} +40 -39
- package/dist/{checkAudio-MAX7JUYG.js → checkAudio-6VPMLIY6.js} +15 -15
- package/dist/{checkBrowser-3W74WJ26.js → checkBrowser-SHUVFQ4S.js} +34 -33
- package/dist/{chunk-P5M3AXEP.js → chunk-2GMHYOV3.js} +1 -1
- package/dist/{chunk-7D2LTSNV.js → chunk-2HBB5U52.js} +1 -1
- package/dist/{chunk-G675S644.js → chunk-3FGEDDSA.js} +26 -26
- package/dist/{chunk-D6LGD472.js → chunk-44IPXXSK.js} +6 -4
- package/dist/{chunk-FT3CNACL.js → chunk-44YG42L5.js} +144 -41
- package/dist/{chunk-NUE44RN2.js → chunk-45UOXUUH.js} +16 -3
- package/dist/chunk-4JRFMRCQ.js +288 -0
- package/dist/{chunk-AIXH3V5A.js → chunk-4XQQQ4KN.js} +3 -3
- package/dist/{chunk-6MUI2H6P.js → chunk-54Q3H2UQ.js} +5 -2
- package/dist/{chunk-YEKJOA47.js → chunk-664JAO7C.js} +1 -1
- package/dist/{chunk-QOZPWIYV.js → chunk-6LE7K3YM.js} +16 -13
- package/dist/{chunk-DC26QLB7.js → chunk-7LKEHM2R.js} +1 -1
- package/dist/{chunk-CZOC7WY7.js → chunk-7XWCCFYW.js} +1 -1
- package/dist/{chunk-G2EY3MVW.js → chunk-A2KNKY4Z.js} +1 -1
- package/dist/{chunk-OAXWHPNS.js → chunk-A5WWEW6U.js} +1 -1
- package/dist/{chunk-Y7IV5MAK.js → chunk-AKTI2SHL.js} +2 -2
- package/dist/chunk-AW7UW2Z7.js +312 -0
- package/dist/{chunk-F6QV5N3A.js → chunk-B5HFCGI7.js} +2 -2
- package/dist/{chunk-K5UCRKUK.js → chunk-B6F33PUK.js} +2 -2
- package/dist/{chunk-HQDHMAUI.js → chunk-BDEBKAD2.js} +1 -1
- package/dist/{chunk-DNTPNSH5.js → chunk-BN75GXZM.js} +3 -3
- package/dist/{chunk-BPIY5LB3.js → chunk-C466I3DT.js} +3 -3
- package/dist/{chunk-KEY2VA65.js → chunk-CXEU6XNL.js} +6 -20
- package/dist/{chunk-JQWITWVC.js → chunk-CYE2NNFF.js} +2 -2
- package/dist/{chunk-RRPO44PE.js → chunk-DFK4RMNE.js} +5 -5
- package/dist/chunk-DY7PQLIE.js +248 -0
- package/dist/chunk-EF735J3K.js +59 -0
- package/dist/{chunk-EGJ4UECR.js → chunk-EHZESMRB.js} +8 -2
- package/dist/chunk-EJOFIHX4.js +46 -0
- package/dist/{chunk-SKCS4SUZ.js → chunk-EX75C5HT.js} +13 -9
- package/dist/{chunk-3RXZZIDQ.js → chunk-FKBWONRY.js} +2 -2
- package/dist/{chunk-CVY6OIKN.js → chunk-FORV75JT.js} +26 -14
- package/dist/{chunk-WWT6ETQA.js → chunk-G5KX4X6W.js} +26 -26
- package/dist/{chunk-VQMHDS2V.js → chunk-HT3D5AKG.js} +52 -12
- package/dist/{chunk-35JKCWYI.js → chunk-I6OY5MS6.js} +1 -1
- package/dist/{chunk-VJVVWYP6.js → chunk-IJI2JNN7.js} +1 -1
- package/dist/{chunk-IGBOFU2Y.js → chunk-IQ7FABPU.js} +2 -2
- package/dist/{chunk-ZPTNLDOB.js → chunk-JNQCM6CR.js} +2 -2
- package/dist/{chunk-IB7UYGXR.js → chunk-JO4LHFFP.js} +9 -9
- package/dist/chunk-JTZHDD63.js +70 -0
- package/dist/{chunk-L55LAERP.js → chunk-K5GMPWMG.js} +1 -1
- package/dist/{chunk-ZBNK6X5O.js → chunk-KCDWRMTC.js} +2 -2
- package/dist/{chunk-GOWU3NCE.js → chunk-KJGYQVFD.js} +1 -1
- package/dist/{chunk-7IH3RSSG.js → chunk-KT2WLSX5.js} +10 -10
- package/dist/{chunk-AOHG22HQ.js → chunk-KWYK65GR.js} +5 -5
- package/dist/{chunk-AN4USOFT.js → chunk-LAIGIOEA.js} +1 -1
- package/dist/{chunk-E5IIR67Q.js → chunk-LV5AVW6U.js} +1 -1
- package/dist/{chunk-GHEYGMKD.js → chunk-M4UVOUWC.js} +1 -1
- package/dist/{chunk-DIXTEVWQ.js → chunk-M7HNGAWN.js} +3 -3
- package/dist/{chunk-EOUKB53E.js → chunk-MTVL7FWZ.js} +1 -1
- package/dist/{chunk-6CFBFWLF.js → chunk-MUHOFRGW.js} +1 -1
- package/dist/{chunk-OROHGC7W.js → chunk-N6XKBBT5.js} +7 -7
- package/dist/{chunk-4VEXJTUT.js → chunk-NLWG5TU7.js} +2 -2
- package/dist/chunk-NZZQCWUC.js +205 -0
- package/dist/{chunk-42Q3VX34.js → chunk-OL2C3ODS.js} +5 -5
- package/dist/{chunk-ZLXWRYOO.js → chunk-OVINGNLQ.js} +3 -3
- package/dist/{chunk-BDZSH6P3.js → chunk-OWFSGDQS.js} +1 -1
- package/dist/chunk-OZM6VLD7.js +71 -0
- package/dist/{chunk-6W3DY5BP.js → chunk-P5QGZMGC.js} +2 -2
- package/dist/{chunk-52VXA3SC.js → chunk-PBPHKD56.js} +1 -1
- package/dist/chunk-PHEPL7OX.js +1048 -0
- package/dist/{chunk-537WSYHU.js → chunk-PX7Y4HMM.js} +1 -1
- package/dist/{chunk-XHD7RKEZ.js → chunk-QNLHDYYO.js} +2 -2
- package/dist/{chunk-ZAJQFY5Q.js → chunk-QU5OYMTB.js} +15 -2
- package/dist/chunk-QZGKKQ77.js +570 -0
- package/dist/{chunk-WJYFJGYT.js → chunk-RKVKFXYB.js} +3 -3
- package/dist/{chunk-OQLYKDL5.js → chunk-RORIFIUW.js} +1 -1
- package/dist/{chunk-MESSJFK3.js → chunk-RWSVSCOP.js} +38 -28
- package/dist/chunk-RZ6CXJ56.js +24 -0
- package/dist/chunk-SDBVVDBW.js +113 -0
- package/dist/{chunk-Z5VQBRU2.js → chunk-SNFVQDKE.js} +1 -1
- package/dist/{chunk-EE7YWKDY.js → chunk-SX7ESVCQ.js} +4 -4
- package/dist/{chunk-AXVTL7B6.js → chunk-UFYWGUUV.js} +2 -2
- package/dist/{chunk-DSHFKKSZ.js → chunk-UGUWSAJT.js} +2 -2
- package/dist/chunk-UQECNXFA.js +5013 -0
- package/dist/{chunk-QYRMR45H.js → chunk-UQVAAEPQ.js} +1 -1
- package/dist/{chunk-NHXGFQWQ.js → chunk-UVF4U3ZF.js} +1 -1
- package/dist/{chunk-YSTBSLWY.js → chunk-VBCBHDIW.js} +1 -1
- package/dist/chunk-VJM6NX54.js +250 -0
- package/dist/chunk-WGOIJN57.js +95 -0
- package/dist/{chunk-GODT7QDZ.js → chunk-WQLTKHPP.js} +3 -3
- package/dist/{chunk-RIGSGNDQ.js → chunk-WUXDIF5D.js} +20 -19
- package/dist/{chunk-5GSEM63G.js → chunk-WWOHLNFO.js} +1 -1
- package/dist/{chunk-L37AZWB2.js → chunk-XZEHFUQF.js} +2 -2
- package/dist/{chunk-FMKI7ZLM.js → chunk-Y4INSXS7.js} +2 -2
- package/dist/{chunk-YHL4CVTF.js → chunk-ZEKV5T3I.js} +13 -13
- package/dist/{clean-K6IM3LC4.js → clean-JZOPMJMV.js} +21 -21
- package/dist/cli.js +58 -55
- package/dist/{cloud-OV7EA4BJ.js → cloud-VMPF2KMA.js} +4 -4
- package/dist/{cloudrun-ZEMODIOP.js → cloudrun-LA2FKS2F.js} +5 -5
- package/dist/{compare-MJZ3D3HA.js → compare-IQCFSC5Z.js} +30 -30
- package/dist/{compiler-6KKETX77.js → compiler-J7OZQIPD.js} +4 -4
- package/dist/{component-EVXMYIP3.js → component-TRGBVFCI.js} +3 -3
- package/dist/{compositions-PZ7FQ7WN.js → compositions-FOC2CAZX.js} +13 -13
- package/dist/curve-ID3Z522S.js +329 -0
- package/dist/cuts-MWHQSE2Z.js +123 -0
- package/dist/{delete-DL3XA4QV.js → delete-47KZ7PLI.js} +5 -5
- package/dist/{deploy-VEYP3IP5.js → deploy-NTNEO4TI.js} +8 -8
- package/dist/describeProject-WWREIVQV.js +56 -0
- package/dist/diff-GH4KCQGQ.js +1825 -0
- package/dist/{dist-SHMQOKMF.js → dist-24QQO5IL.js} +2 -2
- package/dist/{dist-M77KFAYW.js → dist-XW7FATO6.js} +2 -2
- package/dist/{doctor-JM2WHH7Y.js → doctor-4ZH7WFU6.js} +11 -11
- package/dist/energy-2C65KXBH.js +134 -0
- package/dist/{events-S7KVBRSL.js → events-FUFFA55P.js} +3 -3
- package/dist/{events-GW5I5RCG.js → events-Q3EBOW2Y.js} +2 -2
- package/dist/events-QO5G2VCC.js +221 -0
- package/dist/extract-Z6TLBM5B.js +309 -0
- package/dist/face-WI6BPPUG.js +171 -0
- package/dist/{feedback-7OR5FVTX.js → feedback-M5GZWDXP.js} +12 -12
- package/dist/{ffmpeg-A7CSIX3U.js → ffmpeg-27H6P7ZU.js} +7 -7
- package/dist/{figma-444HKFX5.js → figma-AI6TSWVO.js} +3 -3
- package/dist/fontLocalizeCli.js +10 -10
- package/dist/frames-WUTLVZIR.js +352 -0
- package/dist/generate-3CJREF5U.js +74 -0
- package/dist/{get-6UTF3225.js → get-KTDRE33B.js} +5 -5
- package/dist/{gpuPolicy-ORPUS5Z2.js → gpuPolicy-Z4MM64HY.js} +7 -7
- package/dist/{grade-compare-UCTAYN3B.js → grade-compare-IM7Z7HWI.js} +34 -31
- package/dist/{heifImagePrep-ED6V6RFN.js → heifImagePrep-CXI2ZMUX.js} +8 -8
- package/dist/{help-HZR32XWP.js → help-5FR6BRLR.js} +7 -1
- package/dist/{history-TQ56MZIA.js → history-5P5YVP5H.js} +7 -7
- 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-5ZGNJJVA.js} +7 -7
- package/dist/{init-ONAWKHFW.js → init-NWIAEYSX.js} +29 -28
- package/dist/{inspect-A75PYOWJ.js → inspect-HBLAVW5C.js} +31 -30
- package/dist/{installer-ISMCCFBZ.js → installer-KVFTBZZ5.js} +4 -4
- package/dist/{keyframes-2I75DP3O.js → keyframes-LFCLUY2R.js} +6 -6
- package/dist/{lambda-4QIHGPGJ.js → lambda-RFWTTMLU.js} +13 -13
- package/dist/{layout-GW7WE7RT.js → layout-WOG2Y5ND.js} +31 -30
- package/dist/{lint-OWP72OZQ.js → lint-7MALXMMF.js} +8 -8
- package/dist/{lintProject-XYQ5L7RQ.js → lintProject-6H64SX3V.js} +2 -2
- package/dist/{list-WVK7ZCPW.js → list-XRYAT24W.js} +5 -5
- package/dist/{localPage-IQWHN7BH.js → localPage-IN36JVJU.js} +7 -7
- package/dist/{login-Q5CNHYWU.js → login-32WGVGTM.js} +15 -9
- package/dist/{logout-6VFJ7WMW.js → logout-SLI6YTHI.js} +2 -2
- package/dist/look-ZWVE6JO3.js +180 -0
- package/dist/{manager-JCYVNEWH.js → manager-SFL6GLYX.js} +9 -8
- package/dist/manifest-QSJYVERU.js +49 -0
- package/dist/measure-Q74BJTRQ.js +46 -0
- package/dist/{media-treatment-M5IUP7H4.js → media-treatment-3R6DYEAZ.js} +16 -16
- package/dist/{media-use-ZNTB7W6N.js → media-use-ZM2WCRQC.js} +9 -5
- package/dist/{models-CFXKDYZ3.js → models-NNC53UPU.js} +11 -11
- package/dist/{motionShot-CWUEI4ZM.js → motionShot-5BI5JFUP.js} +15 -15
- package/dist/{normalize-QJVXFMWO.js → normalize-MBNGRVQA.js} +2 -1
- package/dist/{normalize-audio-FASY33LR.js → normalize-audio-6Z2WN56Q.js} +8 -8
- package/dist/{open-KOVVESYN.js → open-5NCEN6RC.js} +11 -11
- package/dist/{parakeetRunner-E4IP5SL4.js → parakeetRunner-DH3XKR3C.js} +13 -12
- package/dist/{pipeline-C6EZVV43.js → pipeline-CGEGQAPH.js} +10 -10
- package/dist/{play-MZJI6SMH.js → play-K37BN736.js} +23 -23
- package/dist/{policies-J5BWAZHM.js → policies-U4PFXF5E.js} +4 -2
- package/dist/{preflight-K4SPUWXP.js → preflight-CG7H3D5B.js} +8 -8
- package/dist/{present-7L7ZTG7F.js → present-KQ53DOHA.js} +18 -18
- package/dist/{preview-QGDVMR3X.js → preview-V7CYHL6U.js} +21 -21
- package/dist/probe-JVW2MPY3.js +178 -0
- package/dist/{producer-EJPNNY3E.js → producer-UD32S7PX.js} +1 -1
- package/dist/{projectConfig-EEF6OPXO.js → projectConfig-WXCB5AZE.js} +6 -6
- package/dist/{publication-5KF44AKQ.js → publication-KG4UDZRM.js} +2 -2
- package/dist/{publish-SSKWZ5TE.js → publish-MEQB543T.js} +16 -16
- package/dist/{refresh-I6ITGHKL.js → refresh-2LU4XDL7.js} +2 -2
- package/dist/{remove-background-PCL6I5SZ.js → remove-background-FSV5KQK3.js} +11 -11
- package/dist/{render-DH4UA7KW.js → render-O4S4SURS.js} +6 -6
- package/dist/{render-UPRWOGLS.js → render-SQXZAGPQ.js} +37 -37
- package/dist/{render-DRWQ6F37.js → render-SY4AXKXC.js} +33 -33
- package/dist/{render-batch-EBW5WHB5.js → render-batch-GTZQUB3H.js} +6 -6
- package/dist/renderSetupWorker.js +2 -2
- package/dist/{resolver-ZSZXNRFP.js → resolver-BQZNCVJS.js} +4 -4
- package/dist/run-67OPNJGD.js +31 -0
- package/dist/{sherpa-IKVUCBOW.js → sherpa-KH3PJAUG.js} +12 -11
- 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-FTZZJGAB.js} +5 -5
- package/dist/{skillsUpdateCheck-PPJ5NGAL.js → skillsUpdateCheck-LZPD2CZI.js} +3 -3
- package/dist/{snapshot-KPFLZNEL.js → snapshot-4BORZ3ED.js} +37 -36
- package/dist/{src-QRV3466B.js → src-6ZOFAM3F.js} +9 -9
- package/dist/{src-EPOGDJTT.js → src-D7AO7PGH.js} +6 -6
- package/dist/{staticProjectServer-ERKLMZVM.js → staticProjectServer-Q23A6XU2.js} +19 -19
- package/dist/{status-4AAPTTRW.js → status-VIJRZ4ZK.js} +34 -9
- package/dist/studio/assets/hyperframes-player-D0W1SNqK.js +478 -0
- package/dist/studio/assets/{index-C8VIUiGz.js → index-DD9KJoEr.js} +119 -119
- package/dist/studio/assets/{index-CVPNbydK.js → index-mbwAH5iR.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-7WFZIIPL.js → studio-api-XVVJZ7YT.js} +15 -15
- package/dist/{studioServer-3XZTLI26.js → studioServer-6HG3AMTW.js} +49 -49
- package/dist/sync-Q5SRIL7V.js +115 -0
- package/dist/{telemetry-BMLI4TMC.js → telemetry-VXPSJ3X3.js} +3 -3
- package/dist/{timeline-EDCDO2ZR.js → timeline-6477OWFA.js} +25 -21
- package/dist/{tokens-2ZFLFO3K.js → tokens-ZUUNEDKT.js} +2 -2
- package/dist/{transcribe-3WMH62HH.js → transcribe-HA4UGLKO.js} +11 -10
- package/dist/{transcribe-Y2LPBT7I.js → transcribe-ITVANIDK.js} +35 -18
- package/dist/{tts-BVTJEP72.js → tts-KMZPHG3K.js} +1 -1
- package/dist/{updateCheck-5LFZGC3P.js → updateCheck-SVADAQ43.js} +2 -2
- package/dist/{upgrade-X7QVSEKP.js → upgrade-WKW4FDNF.js} +2 -2
- package/dist/{urlDownloader-TYD6ROKL.js → urlDownloader-VWHCESDD.js} +6 -6
- package/dist/{validate-26KQ5VX7.js → validate-7VG2RLP2.js} +24 -24
- package/dist/{video-BPKLZIJK.js → video-LM3FYHGG.js} +8 -8
- package/dist/warmCheck.js +40 -39
- 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/{destroy-BQ5R7LUF.js → destroy-6NWJMQX2.js} +4 -4
- package/dist/{synthesize-4JC74JW5.js → synthesize-DIT2SR3D.js} +5 -5
|
@@ -0,0 +1,205 @@
|
|
|
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
|
+
pageUrl
|
|
9
|
+
} from "./chunk-EF735J3K.js";
|
|
10
|
+
import {
|
|
11
|
+
Fix
|
|
12
|
+
} from "./chunk-VJM6NX54.js";
|
|
13
|
+
import {
|
|
14
|
+
refreshIfNeeded,
|
|
15
|
+
resolveCloudAuthHeaders,
|
|
16
|
+
resolveCloudBaseUrl
|
|
17
|
+
} from "./chunk-VBCBHDIW.js";
|
|
18
|
+
import {
|
|
19
|
+
AuthClient,
|
|
20
|
+
buildAuthHeaders,
|
|
21
|
+
resolveCredential
|
|
22
|
+
} from "./chunk-RWSVSCOP.js";
|
|
23
|
+
import {
|
|
24
|
+
configDir
|
|
25
|
+
} from "./chunk-VLA6UJGH.js";
|
|
26
|
+
|
|
27
|
+
// src/heygen/v3.ts
|
|
28
|
+
import { createHash } from "crypto";
|
|
29
|
+
import { appendFileSync, existsSync, mkdirSync, readFileSync } from "fs";
|
|
30
|
+
import { join } from "path";
|
|
31
|
+
var RUNNING = /* @__PURE__ */ new Set(["pending", "processing", "queued", "running", "waiting", "in_progress"]);
|
|
32
|
+
var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
33
|
+
function idempotencyKey(route, parts) {
|
|
34
|
+
const h = createHash("sha256").update(route);
|
|
35
|
+
for (const p of parts) h.update(p).update("\0");
|
|
36
|
+
return `hf-${h.digest("hex").slice(0, 40)}`;
|
|
37
|
+
}
|
|
38
|
+
var Refused = class extends Fix {
|
|
39
|
+
status = 0;
|
|
40
|
+
};
|
|
41
|
+
var KEEPS_KEY = /* @__PURE__ */ new Set([401, 403, 408, 409, 425, 429]);
|
|
42
|
+
var failedKeysFile = () => join(configDir(), "heygen-failed-keys");
|
|
43
|
+
var noSignIn = () => {
|
|
44
|
+
throw new Fix("no HeyGen sign-in on this machine", "npx hyperframes auth login");
|
|
45
|
+
};
|
|
46
|
+
async function jobSender() {
|
|
47
|
+
const credential = await resolveCredential().then(refreshIfNeeded).catch(noSignIn);
|
|
48
|
+
const who = credential.type === "api_key" ? credential.key : await new AuthClient().getCurrentUser(credential).then(
|
|
49
|
+
(user) => user.username ?? user.email,
|
|
50
|
+
() => void 0
|
|
51
|
+
);
|
|
52
|
+
const scope = who ? createHash("sha256").update(`${resolveCloudBaseUrl()}\0${who}`).digest("hex").slice(0, 16) : null;
|
|
53
|
+
return { auth: buildAuthHeaders(credential), scope };
|
|
54
|
+
}
|
|
55
|
+
function failedKeys(scope) {
|
|
56
|
+
const file = failedKeysFile();
|
|
57
|
+
const lines = existsSync(file) ? readFileSync(file, "utf8").split("\n") : [];
|
|
58
|
+
return new Set(
|
|
59
|
+
lines.filter((l) => l.startsWith(`${scope} `)).map((l) => l.slice(scope.length + 1))
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
function markFailed(key, scope) {
|
|
63
|
+
if (!scope) return;
|
|
64
|
+
mkdirSync(configDir(), { recursive: true });
|
|
65
|
+
appendFileSync(failedKeysFile(), `${scope} ${key}
|
|
66
|
+
`);
|
|
67
|
+
}
|
|
68
|
+
function liveKey(key, scope) {
|
|
69
|
+
const failed = scope ? failedKeys(scope) : /* @__PURE__ */ new Set();
|
|
70
|
+
let sent = key;
|
|
71
|
+
for (let n = 1; failed.has(sent); n++) sent = `${key}-${n}`;
|
|
72
|
+
return sent;
|
|
73
|
+
}
|
|
74
|
+
function refusal(status, body, estimate) {
|
|
75
|
+
const err = isRecord(body) && isRecord(body.error) ? body.error : isRecord(body) ? body : {};
|
|
76
|
+
const code = String(err.code ?? err.failure_code ?? "");
|
|
77
|
+
const message = String(err.message ?? err.failure_message ?? "").slice(0, 300);
|
|
78
|
+
const url = typeof err.url === "string" ? err.url : void 0;
|
|
79
|
+
const given = Number(err.needed_credits) || void 0;
|
|
80
|
+
const needed = given ?? (estimate || void 0);
|
|
81
|
+
const needs = given ? `${given} in total` : needed ? `about ${needed} in total` : "more";
|
|
82
|
+
const balance = err.balance === void 0 ? "" : `, balance ${String(err.balance)}`;
|
|
83
|
+
if (/hf_subscription_required/i.test(code))
|
|
84
|
+
return new Refused(
|
|
85
|
+
`this is a HyperFrames Pro feature; nothing was charged. Run \`npx hyperframes billing subscribe\`: it opens the page and waits`,
|
|
86
|
+
`Subscribe: ${url ?? pageUrl("plans", { needed })}`
|
|
87
|
+
);
|
|
88
|
+
if (/hf_usage_exhausted/i.test(code))
|
|
89
|
+
return new Refused(
|
|
90
|
+
`out of HyperFrames credits (this step needs ${needs}${balance}); nothing was charged. Run \`npx hyperframes billing top-up${needed ? ` --needed ${needed}` : ""}\`: it opens the page and waits`,
|
|
91
|
+
`Add credits: ${url ?? pageUrl("credits", { needed })}`
|
|
92
|
+
);
|
|
93
|
+
if (/api_key_required/i.test(code))
|
|
94
|
+
return new Refused(
|
|
95
|
+
"this HeyGen feature is not available with this sign-in yet; nothing was charged",
|
|
96
|
+
"continue without this step"
|
|
97
|
+
);
|
|
98
|
+
if (status === 401 || status === 403)
|
|
99
|
+
return new Refused(
|
|
100
|
+
`HeyGen refused the credential (${status}${message ? `: ${message}` : ""})`,
|
|
101
|
+
"npx hyperframes auth login"
|
|
102
|
+
);
|
|
103
|
+
if (status === 402 || /insufficient|credit|usage_exhausted|quota/i.test(code))
|
|
104
|
+
return new Refused(
|
|
105
|
+
`HeyGen says there is not enough credit (${code || status})`,
|
|
106
|
+
"top up at https://app.heygen.com, or sign in with npx hyperframes auth login to use the plan's allowance"
|
|
107
|
+
);
|
|
108
|
+
if (/content_policy/i.test(code))
|
|
109
|
+
return new Refused(
|
|
110
|
+
`HeyGen declined the content: ${message || code}`,
|
|
111
|
+
"reword the prompt once without the flagged part"
|
|
112
|
+
);
|
|
113
|
+
return new Refused(
|
|
114
|
+
`HeyGen ${status}${code ? ` ${code}` : ""}: ${message || "request refused"}`,
|
|
115
|
+
"fix the request it names, then run again"
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
async function call(method, route, body, key, estimate, auth) {
|
|
119
|
+
const headers = {
|
|
120
|
+
...auth ?? await resolveCloudAuthHeaders().catch(noSignIn),
|
|
121
|
+
accept: "application/json"
|
|
122
|
+
};
|
|
123
|
+
if (body !== void 0) headers["content-type"] = "application/json";
|
|
124
|
+
if (key) headers["Idempotency-Key"] = key;
|
|
125
|
+
let res;
|
|
126
|
+
try {
|
|
127
|
+
res = await fetch(`${resolveCloudBaseUrl()}${route}`, {
|
|
128
|
+
method,
|
|
129
|
+
headers,
|
|
130
|
+
...body !== void 0 ? { body: JSON.stringify(body) } : {},
|
|
131
|
+
signal: AbortSignal.timeout(method === "POST" ? 18e4 : 3e4)
|
|
132
|
+
});
|
|
133
|
+
} catch (err) {
|
|
134
|
+
throw new Fix(
|
|
135
|
+
`no answer from HeyGen for ${route} (${err instanceof Error ? err.message : String(err)})`,
|
|
136
|
+
"run the same command again: it resumes the same job"
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
const value = await res.json().catch(() => null);
|
|
140
|
+
if (res.status >= 500 || value === null)
|
|
141
|
+
throw new Fix(
|
|
142
|
+
`HeyGen ${res.status} for ${route} with no readable answer`,
|
|
143
|
+
"run the same command again: it resumes the same job"
|
|
144
|
+
);
|
|
145
|
+
if (!res.ok) {
|
|
146
|
+
const refused = refusal(res.status, value, estimate);
|
|
147
|
+
refused.status = res.status;
|
|
148
|
+
throw refused;
|
|
149
|
+
}
|
|
150
|
+
const data = isRecord(value) && isRecord(value.data) ? value.data : value;
|
|
151
|
+
if (!isRecord(data))
|
|
152
|
+
throw new Fix(`HeyGen answered ${route} with no job`, "run the same command again");
|
|
153
|
+
const id = data.id ?? data.job_id ?? data.video_id ?? data.generation_id;
|
|
154
|
+
return {
|
|
155
|
+
...data,
|
|
156
|
+
id: typeof id === "string" ? id : "",
|
|
157
|
+
status: String(data.status ?? (id ? "pending" : "completed"))
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
function log(entry, record) {
|
|
161
|
+
if (!entry.projectDir) return;
|
|
162
|
+
const dir = join(entry.projectDir, ".hyperframes");
|
|
163
|
+
mkdirSync(dir, { recursive: true });
|
|
164
|
+
appendFileSync(
|
|
165
|
+
join(dir, "heygen-jobs.jsonl"),
|
|
166
|
+
`${JSON.stringify({ at: (/* @__PURE__ */ new Date()).toISOString(), what: entry.what, ...record })}
|
|
167
|
+
`
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
async function runJob(route, body, key, pollRoute, opts = {}) {
|
|
171
|
+
const started = Date.now();
|
|
172
|
+
const { auth, scope } = await jobSender();
|
|
173
|
+
const sent = liveKey(key, scope);
|
|
174
|
+
let job;
|
|
175
|
+
try {
|
|
176
|
+
job = await call("POST", route, body, sent, opts.credits, auth);
|
|
177
|
+
} catch (err) {
|
|
178
|
+
if (err instanceof Refused && !KEEPS_KEY.has(err.status)) markFailed(sent, scope);
|
|
179
|
+
throw err;
|
|
180
|
+
}
|
|
181
|
+
if (opts.log) log(opts.log, { route, id: job.id, key: sent, status: job.status });
|
|
182
|
+
while (RUNNING.has(job.status.toLowerCase())) {
|
|
183
|
+
if (Date.now() - started > (opts.timeoutMs ?? 15 * 6e4))
|
|
184
|
+
throw new Fix(
|
|
185
|
+
`HeyGen job ${job.id} is still ${job.status}`,
|
|
186
|
+
"run the same command again later: it picks up this job"
|
|
187
|
+
);
|
|
188
|
+
opts.onWait?.(job);
|
|
189
|
+
await new Promise((r) => setTimeout(r, opts.intervalMs ?? 5e3));
|
|
190
|
+
job = await call("GET", pollRoute(job.id));
|
|
191
|
+
}
|
|
192
|
+
if (opts.log) log(opts.log, { route, id: job.id, key: sent, status: job.status });
|
|
193
|
+
if (!/^(completed|succeeded|success|done)$/i.test(job.status)) {
|
|
194
|
+
markFailed(sent, scope);
|
|
195
|
+
throw refusal(422, {
|
|
196
|
+
error: { code: job.failure_code ?? job.status, message: job.failure_message ?? "" }
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return job;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export {
|
|
203
|
+
idempotencyKey,
|
|
204
|
+
runJob
|
|
205
|
+
};
|
|
@@ -14,28 +14,28 @@ import {
|
|
|
14
14
|
} from "./chunk-AW3XJY4S.js";
|
|
15
15
|
import {
|
|
16
16
|
readCompositionFps
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7LKEHM2R.js";
|
|
18
18
|
import {
|
|
19
19
|
HF_AUDIO_GROUP_ATTR,
|
|
20
20
|
extractAudioMetadata,
|
|
21
21
|
extractMediaMetadata
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-4XQQQ4KN.js";
|
|
23
23
|
import {
|
|
24
24
|
byStart,
|
|
25
25
|
fpsToNumber,
|
|
26
26
|
parseFpsWithDefault
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-OWFSGDQS.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-
|
|
34
|
+
} from "./chunk-UQECNXFA.js";
|
|
35
35
|
import {
|
|
36
36
|
resolveReferencedDuration,
|
|
37
37
|
resolveReferencedStart
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-HT3D5AKG.js";
|
|
39
39
|
import {
|
|
40
40
|
resolveAuthoredAssetFile
|
|
41
41
|
} from "./chunk-AKMY4QVI.js";
|
|
@@ -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-G5KX4X6W.js";
|
|
10
10
|
import {
|
|
11
11
|
stripSdrPngColourTags
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FKBWONRY.js";
|
|
13
13
|
import {
|
|
14
14
|
injectTagsAtHeadStart
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UQECNXFA.js";
|
|
16
16
|
|
|
17
17
|
// src/utils/compositionServer.ts
|
|
18
18
|
import { createHash } from "crypto";
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
decode,
|
|
9
|
+
meanAbsDiff
|
|
10
|
+
} from "./chunk-VJM6NX54.js";
|
|
11
|
+
|
|
12
|
+
// src/measure/cuts.ts
|
|
13
|
+
var SIG_W = 64;
|
|
14
|
+
var SIG_H = 36;
|
|
15
|
+
var CUT_LEVEL = 12;
|
|
16
|
+
var CUT_RATIO = 4;
|
|
17
|
+
var SOFT_LEVEL = 10;
|
|
18
|
+
var SOFT_RATIO = 8;
|
|
19
|
+
var SOFT_ALONE = 4;
|
|
20
|
+
var CONFIRM_LEVEL = 6;
|
|
21
|
+
var CONFIRM_SHARE = 0.5;
|
|
22
|
+
var NEIGHBOURS = 12;
|
|
23
|
+
function signatures(input, filters = []) {
|
|
24
|
+
return decode(input, [...filters, `scale=${SIG_W}:${SIG_H}:flags=area`], SIG_W, SIG_H, true);
|
|
25
|
+
}
|
|
26
|
+
var median = (values) => {
|
|
27
|
+
const sorted = [...values].sort((x, y) => x - y);
|
|
28
|
+
return sorted[Math.floor(sorted.length / 2)] ?? 0;
|
|
29
|
+
};
|
|
30
|
+
function frameChanges(frames) {
|
|
31
|
+
return frames.map((f, i) => i ? meanAbsDiff(frames[i - 1], f) : 0);
|
|
32
|
+
}
|
|
33
|
+
var neighbours = (diffs, i) => diffs.slice(Math.max(1, i - NEIGHBOURS), i).concat(diffs.slice(i + 1, i + NEIGHBOURS + 1));
|
|
34
|
+
function cutsIn(diffs) {
|
|
35
|
+
const hits = diffs.flatMap((d, i) => {
|
|
36
|
+
if (i === 0) return [];
|
|
37
|
+
const around = neighbours(diffs, i);
|
|
38
|
+
const typical = Math.max(1, median(around));
|
|
39
|
+
if (d >= CUT_LEVEL && d >= CUT_RATIO * typical) return [{ frame: i, change: d }];
|
|
40
|
+
const alone = d >= SOFT_ALONE * Math.max(0, ...around);
|
|
41
|
+
return d >= SOFT_LEVEL && d >= SOFT_RATIO * typical && alone ? [{ frame: i, change: d, soft: true }] : [];
|
|
42
|
+
});
|
|
43
|
+
const out = [];
|
|
44
|
+
for (const { soft, ...h } of hits) {
|
|
45
|
+
const last = out.at(-1);
|
|
46
|
+
if (last && h.frame === last.frame + last.frames) {
|
|
47
|
+
last.frames++;
|
|
48
|
+
last.change = Math.max(last.change, h.change);
|
|
49
|
+
if (!soft) delete last.soft;
|
|
50
|
+
} else out.push({ ...h, frames: 1, ...soft ? { soft } : {} });
|
|
51
|
+
}
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
function findCuts(frames) {
|
|
55
|
+
return cutsIn(frameChanges(frames));
|
|
56
|
+
}
|
|
57
|
+
function confirmsCut(diffs, cut) {
|
|
58
|
+
return [cut.frame - 1, cut.frame, cut.frame + 1].some((i) => {
|
|
59
|
+
const d = diffs[i];
|
|
60
|
+
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)));
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export {
|
|
66
|
+
signatures,
|
|
67
|
+
frameChanges,
|
|
68
|
+
cutsIn,
|
|
69
|
+
findCuts,
|
|
70
|
+
confirmsCut
|
|
71
|
+
};
|
|
@@ -6,8 +6,8 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
|
|
8
8
|
// src/version.ts
|
|
9
|
-
var VERSION = true ? "0.8.
|
|
10
|
-
var PRODUCER_VERSION = true ? "0.8.
|
|
9
|
+
var VERSION = true ? "0.8.223" : "0.0.0-dev";
|
|
10
|
+
var PRODUCER_VERSION = true ? "0.8.223" : "0.0.0-dev";
|
|
11
11
|
|
|
12
12
|
export {
|
|
13
13
|
VERSION,
|