hyperframes 0.8.113 → 0.8.115
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-ILIGSLV4.js → add-ZSLFODRZ.js} +15 -14
- package/dist/{animatedGifPrep-U7FMC7DB.js → animatedGifPrep-72A45YER.js} +5 -5
- package/dist/{asset-OFDEIAGM.js → asset-SGDOHBBN.js} +2 -2
- package/dist/{assetCataloger-5LCGR5XU.js → assetCataloger-Q7BCDARF.js} +2 -2
- package/dist/{auth-5JDDEX2M.js → auth-5JGFN7SV.js} +2 -2
- package/dist/{autoUpdate-JXVZVJCV.js → autoUpdate-ZVTMYO7Z.js} +2 -2
- package/dist/{backgroundChecks-BBWGY3V6.js → backgroundChecks-IY3G5G2D.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-QVJ7NEUH.js → batchRender-QVLLL5DN.js} +3 -3
- package/dist/{beats-YEYVQMX6.js → beats-66KZIB5V.js} +14 -10
- package/dist/{benchmark-J2V46VWI.js → benchmark-AWFKSWQH.js} +11 -11
- package/dist/{browser-XBWASLD2.js → browser-J54EXMCE.js} +8 -8
- package/dist/{bundleWithLocalizedFonts-4CVITCYK.js → bundleWithLocalizedFonts-BLLHP2TO.js} +2 -2
- package/dist/{capture-GLHK4ST7.js → capture-D4HRSVSK.js} +2 -2
- package/dist/{capture-F2Y7TIHU.js → capture-SLI2I5BS.js} +16 -11
- package/dist/{catalog-3QDMTDK2.js → catalog-BUMLQU7L.js} +15 -14
- package/dist/{check-O3RR4NWI.js → check-HEZUK62C.js} +31 -29
- package/dist/{checkBrowser-K36DAG4S.js → checkBrowser-RVJM6IUO.js} +30 -28
- package/dist/{chunk-EMZF2TPA.js → chunk-2DX6JYL2.js} +2 -2
- package/dist/{chunk-BOUDTDBQ.js → chunk-2GWVY66H.js} +1 -1
- package/dist/{chunk-P3FGUSFK.js → chunk-2H37RGJ2.js} +7 -7
- package/dist/{chunk-7543YIMQ.js → chunk-3J4EBX5M.js} +1 -1
- package/dist/{chunk-3XPZJUKM.js → chunk-3R6P5BIG.js} +2 -2
- package/dist/{chunk-ZZIXIOK2.js → chunk-3YTWSGBV.js} +4 -4
- package/dist/{chunk-HYXL3VJA.js → chunk-4HIF3LI3.js} +5 -5
- package/dist/{chunk-HTQR7SUZ.js → chunk-4P2TOD7N.js} +1 -1
- package/dist/{chunk-G2T2X6FZ.js → chunk-5MXN7WM4.js} +2 -2
- package/dist/{chunk-2DBYGR4N.js → chunk-5YSA3YXO.js} +14 -18
- package/dist/{chunk-7CGIICLA.js → chunk-6SEUZGID.js} +3 -3
- package/dist/{chunk-VLC7JS4K.js → chunk-74RAXWDF.js} +1 -1
- package/dist/{chunk-ZYSS3JED.js → chunk-AXXK3LWL.js} +1 -1
- package/dist/chunk-BDNCUMZM.js +2961 -0
- package/dist/{chunk-E52XEEAA.js → chunk-BQG33YTI.js} +1 -1
- package/dist/{chunk-QPR4N2D4.js → chunk-CVBWF2MD.js} +1 -1
- package/dist/{chunk-R4NWAW35.js → chunk-HOBR4IHC.js} +7 -7
- package/dist/{chunk-XZM2I47O.js → chunk-HPWPLV5J.js} +2 -2
- package/dist/{chunk-FCEFKWPM.js → chunk-IEE7GIVX.js} +1 -1
- package/dist/{chunk-L5QASNBN.js → chunk-IOJAVV6J.js} +1 -1
- package/dist/{chunk-DDK22K3I.js → chunk-KLZ7OCHR.js} +3 -3
- package/dist/{chunk-OCNCK5FQ.js → chunk-M7XTMZF5.js} +1 -1
- package/dist/{chunk-GDJ74GHW.js → chunk-MPB7BQT7.js} +1 -1
- package/dist/{chunk-VIJ35BJ6.js → chunk-ORAISNGN.js} +14 -17
- package/dist/{chunk-IP3XINRB.js → chunk-P6LJ4Y32.js} +23 -2944
- package/dist/chunk-P73WQPSB.js +93 -0
- package/dist/{chunk-VTP4VSRP.js → chunk-PLP4K6WZ.js} +194 -52
- package/dist/{chunk-LMC46FK5.js → chunk-QMFCL2ZN.js} +1 -1
- package/dist/{chunk-DR7QW6C5.js → chunk-QXNRRMBQ.js} +2 -2
- package/dist/{chunk-C6AIZOQN.js → chunk-RRPJEHHW.js} +1 -1
- package/dist/{chunk-FXHVADV6.js → chunk-SAO3NQPF.js} +1 -1
- package/dist/{chunk-3IUSKIZW.js → chunk-SC7ICSIU.js} +1 -1
- package/dist/{chunk-FW7K32YT.js → chunk-SK53U3PF.js} +1 -1
- package/dist/{chunk-XXKBPGPJ.js → chunk-SOEQWMNS.js} +2 -2
- package/dist/{chunk-L5SYYW2P.js → chunk-SSZYJCAL.js} +2 -2
- package/dist/{chunk-U4VSY56O.js → chunk-T5HXGUM3.js} +1 -1
- package/dist/{chunk-ENHAGQEP.js → chunk-TMCJPHPP.js} +1 -1
- package/dist/{chunk-XFJXFNJF.js → chunk-TWJT2RGZ.js} +27 -12
- package/dist/{chunk-ZMMSMDCA.js → chunk-VDASTWUM.js} +1 -1
- package/dist/{chunk-T3NMEYGM.js → chunk-WZYHTXZY.js} +1 -1
- package/dist/{chunk-IRJBTYJF.js → chunk-XJQ7TRLG.js} +1 -1
- package/dist/{chunk-OEA2J2TF.js → chunk-Y2Y4LBJD.js} +3 -3
- package/dist/{chunk-SIN32SJB.js → chunk-YNHP6OFJ.js} +2 -2
- package/dist/{chunk-4KGMIOMY.js → chunk-ZBQP54CD.js} +10 -7
- package/dist/{clean-RPB34TT6.js → clean-X6Y252ZC.js} +14 -14
- package/dist/cli.js +53 -52
- package/dist/{cloud-QECFFPKC.js → cloud-EE4GALWR.js} +4 -4
- package/dist/{cloudrun-BML6ZG7K.js → cloudrun-Y6A42KHE.js} +3 -3
- package/dist/{compare-PF6WHQ4T.js → compare-K6XJZ3OC.js} +25 -23
- package/dist/{compiler-ZHVIEP26.js → compiler-DYACPLUW.js} +2 -2
- package/dist/{component-4ENCNLED.js → component-T6IYSCFP.js} +3 -3
- package/dist/{compositions-5UA33RSG.js → compositions-4KUTNS5L.js} +10 -10
- package/dist/{delete-SARS5LIK.js → delete-C64TWAPE.js} +2 -2
- package/dist/{dist-OKRUIHYU.js → dist-KNGSQALD.js} +2 -2
- package/dist/{doctor-TSAQGYP4.js → doctor-WJXZK5QN.js} +9 -9
- package/dist/{events-3HUO73ZE.js → events-FVG3Y6Q4.js} +8 -8
- package/dist/{events-SZ5NWYWD.js → events-QRWJBSV4.js} +7 -7
- package/dist/{feedback-42OTOFC6.js → feedback-NQHRUOZP.js} +9 -9
- package/dist/{figma-RYNFCYXB.js → figma-MEX4CSIM.js} +3 -3
- package/dist/fontLocalizeCli.js +7 -7
- package/dist/{get-IRHLG5OQ.js → get-CMJIHGSA.js} +2 -2
- package/dist/{gpuPolicy-LRMOZXFU.js → gpuPolicy-5S4OZDME.js} +5 -5
- package/dist/{grade-compare-KGJP5HV7.js → grade-compare-NIDMIUGZ.js} +25 -23
- package/dist/{help-C5HS56RZ.js → help-G6AWAWJW.js} +1 -1
- package/dist/{history-DFJNDM2T.js → history-ZBOK2JQF.js} +20 -18
- package/dist/hyperframe-runtime.js +36 -36
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +36 -36
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-26GTDTKN.js → info-2ORQZ6I2.js} +10 -10
- package/dist/{init-RXA6NI73.js → init-3PSKH6UR.js} +22 -21
- package/dist/{inspect-2S5GAZYC.js → inspect-NR54RMEE.js} +26 -24
- package/dist/{installer-DGYYDGWJ.js → installer-YQUWHYBZ.js} +5 -4
- package/dist/{keyframes-WBMAX7XZ.js → keyframes-KT7T4AEV.js} +11 -11
- package/dist/{lambda-OQBFCEFA.js → lambda-3FF4V3X3.js} +4 -4
- package/dist/{layout-ZRU7PXBG.js → layout-RB3M37ER.js} +26 -24
- package/dist/{lint-ATVNZ6FG.js → lint-HR57M5YP.js} +11 -11
- package/dist/{list-E2GHYPCQ.js → list-YDXYHXHF.js} +2 -2
- package/dist/{login-LOC4KA7H.js → login-N6UNRVYW.js} +4 -4
- package/dist/{media-treatment-L43MVH2V.js → media-treatment-UXJOTNRO.js} +11 -11
- package/dist/{models-JF5OOZ5A.js → models-Z3XFMGXB.js} +6 -6
- package/dist/{motionShot-BJ5CLYMN.js → motionShot-KQMCXJ77.js} +15 -12
- package/dist/{normalize-audio-K33FKGAF.js → normalize-audio-XJQMDWRV.js} +10 -10
- package/dist/{pipeline-IWPF5ZMK.js → pipeline-U3OISHWV.js} +5 -5
- package/dist/{play-PHHXYCQI.js → play-XP77PML5.js} +20 -19
- package/dist/{preflight-2GH2Z4GZ.js → preflight-CANFVC4Y.js} +6 -6
- package/dist/{present-KBFK2YVB.js → present-MWGA3O4S.js} +15 -15
- package/dist/{preview-T3E5TFDC.js → preview-X5GWZ3Q6.js} +31 -24
- package/dist/{producer-SL66UNEP.js → producer-B2IHU7MA.js} +1 -1
- package/dist/{projectConfig-7AKXZNNR.js → projectConfig-2A64YU5H.js} +7 -6
- package/dist/{publication-B2OERUY7.js → publication-CFYBPLRS.js} +2 -2
- package/dist/{publish-ZGKT7KED.js → publish-WE6AS77D.js} +8 -7
- package/dist/{remove-background-4LRTT6YL.js → remove-background-XSDOCVN5.js} +6 -6
- package/dist/{render-H6RSJF2V.js → render-5TMRIC73.js} +11 -11
- package/dist/{render-OKNPNMFS.js → render-HVZUCLYW.js} +21 -20
- package/dist/{render-TGCDBKMP.js → render-QX6AKB6Y.js} +3 -3
- package/dist/{render-batch-WRQFW4UC.js → render-batch-QJXFVTDE.js} +3 -3
- package/dist/{renderCancellation-BFCQYGVV.js → renderCancellation-WSSSHRFR.js} +5 -5
- package/dist/{resolver-37UOGAMT.js → resolver-WTXO6WXA.js} +5 -4
- package/dist/{sherpa-SDVKYXCX.js → sherpa-S6ZBBEFO.js} +6 -6
- package/dist/skills/hyperframes/SKILL.md +4 -0
- package/dist/skills/hyperframes-cli/SKILL.md +8 -0
- package/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +8 -0
- package/dist/skills/media-use/audio/scripts/audio.mjs +4 -1
- package/dist/skills/media-use/audio/scripts/audio.test.mjs +33 -0
- package/dist/skills/media-use/audio/scripts/lib/tts.mjs +1 -0
- package/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +44 -1
- package/dist/{skills-O25ZTFTO.js → skills-CDRSTETB.js} +10 -10
- package/dist/{skillsUpdateCheck-Y2V4OMMT.js → skillsUpdateCheck-FKREJXSF.js} +3 -3
- package/dist/{snapshot-KGM2HZIC.js → snapshot-T4PFSXTH.js} +142 -51
- package/dist/{src-PLWCT745.js → src-5BZDQAVN.js} +6 -6
- package/dist/{src-PJJ6NISA.js → src-IZMCUYK7.js} +4 -4
- package/dist/{staticProjectServer-OCE7GU5S.js → staticProjectServer-VN4ARAH4.js} +14 -13
- package/dist/{status-LENRPQS5.js → status-OJZWJB53.js} +5 -5
- package/dist/studio/assets/{hyperframes-player-DzJbtQVO.js → hyperframes-player-C-9N8nk0.js} +1 -1
- package/dist/studio/assets/{index-n5FUn1xv.js → index-BoUM6Xqb.js} +1 -1
- package/dist/studio/assets/{index-DRhF3v4Z.js → index-CAvZ0AA-.js} +204 -204
- package/dist/studio/assets/{index-DgwDQK5G.js → index-CVuorIMv.js} +1 -1
- package/dist/studio/assets/index-t1LH6H5H.css +1 -0
- package/dist/studio/{chunk-K47E2ZJA.js → chunk-5EKWJZLM.js} +504 -17
- package/dist/studio/chunk-5EKWJZLM.js.map +1 -0
- package/dist/studio/{chunk-VWT7STY3.js → chunk-J6Q572FA.js} +2 -2
- package/dist/studio/{chunk-BIUXP3PG.js → chunk-TXZMMOMA.js} +43 -276
- package/dist/studio/chunk-TXZMMOMA.js.map +1 -0
- package/dist/studio/{domEditingLayers-V67MS4WP.js → domEditingLayers-D7VYFJJD.js} +3 -5
- package/dist/studio/index.d.ts +46 -22
- package/dist/studio/index.html +2 -2
- package/dist/studio/index.js +3899 -3487
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/player.js +2 -2
- package/dist/studio/styles.css +1 -1
- package/dist/{studio-api-IEQ5BIHT.js → studio-api-CIO2NKK5.js} +9 -7
- package/dist/{studioServer-LXJ34MGN.js → studioServer-G5GNYWDI.js} +45 -45
- package/dist/{system-4KRSV2B7.js → system-PPNNGVIM.js} +5 -5
- package/dist/{telemetry-R3BPD6VK.js → telemetry-GMDMISOX.js} +8 -8
- package/dist/{timeline-N5UKVS2S.js → timeline-5LSQX4OS.js} +14 -14
- package/dist/{tokens-774UBF2R.js → tokens-VBXAT7CK.js} +2 -2
- package/dist/{transcribe-IP74EZLM.js → transcribe-GYCAIIEQ.js} +11 -11
- package/dist/{transcribe-3UXXEDXX.js → transcribe-VGYAWRXS.js} +6 -6
- package/dist/{updateCheck-EXHNAPKI.js → updateCheck-AZEREUQV.js} +2 -2
- package/dist/{upgrade-A4M3O2F2.js → upgrade-S63QN2LA.js} +2 -2
- package/dist/{urlDownloader-4KNER64L.js → urlDownloader-SM6ODN5O.js} +4 -4
- package/dist/usage-EC3KFUIJ.js +2139 -0
- package/dist/{validate-DV75GM6J.js → validate-7MNUK5MH.js} +15 -14
- package/dist/{video-GINAMW5I.js → video-JEOHARTC.js} +5 -5
- package/package.json +1 -1
- package/dist/studio/assets/index-DbfKVTId.css +0 -1
- package/dist/studio/chunk-BIUXP3PG.js.map +0 -1
- package/dist/studio/chunk-K47E2ZJA.js.map +0 -1
- /package/dist/studio/{chunk-VWT7STY3.js.map → chunk-J6Q572FA.js.map} +0 -0
- /package/dist/studio/{domEditingLayers-V67MS4WP.js.map → domEditingLayers-D7VYFJJD.js.map} +0 -0
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
} from "./chunk-KZI44OPA.js";
|
|
10
10
|
import {
|
|
11
11
|
serveStaticProjectHtml
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y2Y4LBJD.js";
|
|
13
13
|
import "./chunk-XUHOIDKG.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-SSZYJCAL.js";
|
|
15
15
|
import "./chunk-X7MTZ4T2.js";
|
|
16
16
|
import {
|
|
17
17
|
DEFAULT_ZOOM_SCALE,
|
|
@@ -21,48 +21,51 @@ import {
|
|
|
21
21
|
resolveCropRegion,
|
|
22
22
|
runFfmpegOnce,
|
|
23
23
|
seekCompositionTimeline
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ZBQP54CD.js";
|
|
25
25
|
import "./chunk-5Z63TBTX.js";
|
|
26
|
+
import "./chunk-P73WQPSB.js";
|
|
26
27
|
import "./chunk-262C25DQ.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-SC7ICSIU.js";
|
|
28
29
|
import "./chunk-YEIFI443.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-PLP4K6WZ.js";
|
|
31
|
+
import "./chunk-TWJT2RGZ.js";
|
|
31
32
|
import "./chunk-WEATBQTR.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-MPB7BQT7.js";
|
|
34
|
+
import "./chunk-QMFCL2ZN.js";
|
|
34
35
|
import {
|
|
35
36
|
resolveProject
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-XJQ7TRLG.js";
|
|
37
38
|
import {
|
|
38
39
|
formatLintFindings
|
|
39
40
|
} from "./chunk-6CSYCFQV.js";
|
|
40
41
|
import "./chunk-IHFUKJOR.js";
|
|
41
42
|
import {
|
|
42
43
|
resolveLocalBrowserGpuMode
|
|
43
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-WZYHTXZY.js";
|
|
44
45
|
import "./chunk-PFCFR3KZ.js";
|
|
45
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-2GWVY66H.js";
|
|
46
47
|
import "./chunk-XT7X6QCP.js";
|
|
47
48
|
import "./chunk-4YYJOFKS.js";
|
|
48
49
|
import "./chunk-HVW7ABXD.js";
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-TMCJPHPP.js";
|
|
51
|
+
import "./chunk-QXNRRMBQ.js";
|
|
52
|
+
import "./chunk-BDNCUMZM.js";
|
|
52
53
|
import "./chunk-AWDFDFI3.js";
|
|
54
|
+
import "./chunk-P6LJ4Y32.js";
|
|
53
55
|
import "./chunk-GMECXFAN.js";
|
|
54
56
|
import {
|
|
55
57
|
findFFmpeg,
|
|
58
|
+
findFFprobe,
|
|
56
59
|
getFFmpegInstallHint
|
|
57
60
|
} from "./chunk-TVCRUG2S.js";
|
|
58
61
|
import "./chunk-RDMAU7AJ.js";
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-6SEUZGID.js";
|
|
63
|
+
import "./chunk-KLZ7OCHR.js";
|
|
61
64
|
import "./chunk-VWG7OQKU.js";
|
|
62
65
|
import {
|
|
63
66
|
c
|
|
64
67
|
} from "./chunk-ZTZA4UWZ.js";
|
|
65
|
-
import "./chunk-
|
|
68
|
+
import "./chunk-IOJAVV6J.js";
|
|
66
69
|
import "./chunk-AMKC3AXA.js";
|
|
67
70
|
import {
|
|
68
71
|
defineCommand
|
|
@@ -73,26 +76,28 @@ import {
|
|
|
73
76
|
} from "./chunk-PBN6GBJE.js";
|
|
74
77
|
import "./chunk-KC5XXX3X.js";
|
|
75
78
|
import "./chunk-TJSTGSAW.js";
|
|
76
|
-
import "./chunk-
|
|
79
|
+
import "./chunk-5MXN7WM4.js";
|
|
77
80
|
import {
|
|
78
81
|
isClipVisibleAt,
|
|
79
82
|
isInClipWindow
|
|
80
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-IEE7GIVX.js";
|
|
81
84
|
import "./chunk-UUDQD62L.js";
|
|
82
85
|
import "./chunk-DPVXBVLL.js";
|
|
83
|
-
import "./chunk-
|
|
86
|
+
import "./chunk-M7XTMZF5.js";
|
|
84
87
|
import {
|
|
85
88
|
readElementRateSpec,
|
|
86
89
|
sourceTimeAt,
|
|
87
90
|
timeAtSourceTime
|
|
88
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-RRPJEHHW.js";
|
|
89
92
|
import "./chunk-VC76R6W2.js";
|
|
90
93
|
import "./chunk-OFQWTKPW.js";
|
|
91
94
|
import {
|
|
92
95
|
definitiveEntryMismatchComposition,
|
|
93
96
|
hasDefinitiveEntryMismatch
|
|
94
97
|
} from "./chunk-Q5X2B5WT.js";
|
|
95
|
-
import
|
|
98
|
+
import {
|
|
99
|
+
runCancellableProcess
|
|
100
|
+
} from "./chunk-LCSMOLGX.js";
|
|
96
101
|
import "./chunk-TWWSYAKJ.js";
|
|
97
102
|
import {
|
|
98
103
|
lintProject
|
|
@@ -106,7 +111,7 @@ import "./chunk-K4WIOZFP.js";
|
|
|
106
111
|
import "./chunk-XUXGIA7H.js";
|
|
107
112
|
import "./chunk-WERLJGIC.js";
|
|
108
113
|
import "./chunk-ISN5GRYI.js";
|
|
109
|
-
import "./chunk-
|
|
114
|
+
import "./chunk-3R6P5BIG.js";
|
|
110
115
|
import {
|
|
111
116
|
normalizeErrorMessage
|
|
112
117
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -195,35 +200,121 @@ async function recaptureSnapshotComposite(page) {
|
|
|
195
200
|
});
|
|
196
201
|
}
|
|
197
202
|
}
|
|
198
|
-
|
|
203
|
+
function containingSourceFrameIndex(timestamps, time) {
|
|
204
|
+
if (!Number.isFinite(time)) return -1;
|
|
205
|
+
const tolerance = 16 * Number.EPSILON * Math.max(1, Math.abs(time));
|
|
206
|
+
let index = -1;
|
|
207
|
+
for (const [i, timestamp] of timestamps.entries()) {
|
|
208
|
+
if (timestamp > time + tolerance) break;
|
|
209
|
+
index = i;
|
|
210
|
+
}
|
|
211
|
+
return index;
|
|
212
|
+
}
|
|
213
|
+
async function probeContainingSourceFrameSeek(videoPath, time, holdLastFrame) {
|
|
214
|
+
const ffprobe = findFFprobe();
|
|
215
|
+
if (!ffprobe) return { seek: time };
|
|
216
|
+
const probe = async (readIntervals, entries) => {
|
|
217
|
+
try {
|
|
218
|
+
const { stdout } = await runCancellableProcess(
|
|
219
|
+
ffprobe,
|
|
220
|
+
[
|
|
221
|
+
...["-v", "error", "-select_streams", "v:0", "-read_intervals", readIntervals],
|
|
222
|
+
...["-show_entries", entries, "-of", "json", "--", videoPath]
|
|
223
|
+
],
|
|
224
|
+
{ timeoutMs: FFMPEG_EXTRACT_TIMEOUT_MS, maxBufferBytes: 32 * 1024 * 1024 }
|
|
225
|
+
);
|
|
226
|
+
const parsed = JSON.parse(stdout);
|
|
227
|
+
return typeof parsed === "object" && parsed !== null ? parsed : null;
|
|
228
|
+
} catch {
|
|
229
|
+
return null;
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
const data = await probe("%+#1", "stream=time_base,start_pts:format=start_time,duration");
|
|
233
|
+
if (data === null || !Array.isArray(data.streams)) return null;
|
|
234
|
+
const stream = data.streams[0];
|
|
235
|
+
if (typeof stream !== "object" || stream === null || !("time_base" in stream) || typeof stream.time_base !== "string")
|
|
236
|
+
return null;
|
|
237
|
+
const [numerator, denominator] = stream.time_base.split("/");
|
|
238
|
+
const timeBase = Number(numerator) / Number(denominator);
|
|
239
|
+
if (!Number.isFinite(timeBase) || timeBase <= 0) return null;
|
|
240
|
+
const format = "format" in data ? data.format : null;
|
|
241
|
+
const start = typeof format === "object" && format !== null && "start_time" in format ? Number(format.start_time) : 0;
|
|
242
|
+
const duration = typeof format === "object" && format !== null && "duration" in format ? Number(format.duration) : NaN;
|
|
243
|
+
if (!holdLastFrame && Number.isFinite(duration) && time >= duration) return null;
|
|
244
|
+
const formatStart = Number.isFinite(start) ? start : 0;
|
|
245
|
+
const startPts = "start_pts" in stream && typeof stream.start_pts === "number" ? stream.start_pts : NaN;
|
|
246
|
+
const startTicks = Math.abs(startPts * timeBase - formatStart) <= 1e-6 ? startPts : formatStart / timeBase;
|
|
247
|
+
const packetData = await probe(`%${startTicks * timeBase + time + 1}`, "packet=pts,dts,flags");
|
|
248
|
+
if (packetData === null || !Array.isArray(packetData.packets)) return null;
|
|
249
|
+
const packets = [];
|
|
250
|
+
for (const packet of packetData.packets) {
|
|
251
|
+
if (typeof packet !== "object" || packet === null) return null;
|
|
252
|
+
const pts = "pts" in packet ? packet.pts : "dts" in packet ? packet.dts : void 0;
|
|
253
|
+
if (typeof pts !== "number") return null;
|
|
254
|
+
const dts = "dts" in packet && typeof packet.dts === "number" ? packet.dts : pts;
|
|
255
|
+
const key = "flags" in packet && typeof packet.flags === "string" && packet.flags.includes("K");
|
|
256
|
+
packets.push({ pts: (pts - startTicks) * timeBase, dts: (dts - startTicks) * timeBase, key });
|
|
257
|
+
}
|
|
258
|
+
const timestamps = packets.map((packet) => packet.pts).sort((a, b) => a - b);
|
|
259
|
+
const index = Math.max(0, containingSourceFrameIndex(timestamps, time));
|
|
260
|
+
if (timestamps.length === 0 || !Number.isFinite(time)) return null;
|
|
261
|
+
const frame = timestamps[index];
|
|
262
|
+
const previous = timestamps[index - 1] ?? frame - 1e-3;
|
|
263
|
+
const mid = (previous + frame) / 2;
|
|
264
|
+
const ffmpeg = findFFmpeg();
|
|
265
|
+
const landing = async (seek) => {
|
|
266
|
+
const raw = ffmpeg ? await probeSeekLanding(ffmpeg, videoPath, seek) : null;
|
|
267
|
+
return raw === null ? null : raw - startTicks * timeBase;
|
|
268
|
+
};
|
|
269
|
+
const candidates = packets.filter(
|
|
270
|
+
(packet) => packet.key && packet.pts > 0 && packet.pts <= frame
|
|
271
|
+
);
|
|
272
|
+
for (const candidate of candidates.reverse().slice(0, 3)) {
|
|
273
|
+
const landed = await landing(candidate.pts);
|
|
274
|
+
if (landed === null) break;
|
|
275
|
+
if (landed <= 0 || landed > frame) continue;
|
|
276
|
+
const again = Math.abs(landed - candidate.pts) < 1e-6 ? landed : await landing(landed);
|
|
277
|
+
if (again !== null && Math.abs(again - landed) < 1e-6)
|
|
278
|
+
return { seek: landed, select: mid - landed };
|
|
279
|
+
}
|
|
280
|
+
return { select: mid - (timestamps.find((t) => t >= 0) ?? frame) };
|
|
281
|
+
}
|
|
282
|
+
async function probeSeekLanding(ffmpeg, videoPath, seek) {
|
|
283
|
+
try {
|
|
284
|
+
const { stdout } = await runCancellableProcess(
|
|
285
|
+
ffmpeg,
|
|
286
|
+
[
|
|
287
|
+
...["-v", "error", "-copyts", "-noaccurate_seek", "-ss", String(seek), "-i", videoPath],
|
|
288
|
+
...["-map", "0:v:0", "-c", "copy", "-frames:v", "1", "-f", "framecrc", "-"]
|
|
289
|
+
],
|
|
290
|
+
{ timeoutMs: FFMPEG_EXTRACT_TIMEOUT_MS, maxBufferBytes: 1024 * 1024 }
|
|
291
|
+
);
|
|
292
|
+
const base = /^#tb 0: (\d+)\/(\d+)/m.exec(stdout);
|
|
293
|
+
const row = /^0,\s*-?\d+,\s*(-?\d+),/m.exec(stdout);
|
|
294
|
+
if (!base || !row) return null;
|
|
295
|
+
return Number(row[1]) * Number(base[1]) / Number(base[2]);
|
|
296
|
+
} catch {
|
|
297
|
+
return null;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
async function extractVideoFrameToBuffer(videoPath, timeSeconds, useVp9AlphaDecoder = false, holdLastFrame = false) {
|
|
199
301
|
const tmp = mkdtempSync(join(tmpdir(), "hf-snapshot-frame-"));
|
|
200
302
|
const outPath = join(tmp, "frame.png");
|
|
201
303
|
try {
|
|
202
304
|
const ffmpegPath = requireSnapshotFfmpeg(findFFmpeg());
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const decoderArgs = [...args];
|
|
208
|
-
const seek = ["-ss", String(Math.max(0, timeSeconds))];
|
|
209
|
-
args.push(
|
|
210
|
-
...accurateSeek ? ["-i", videoPath, ...seek] : [...seek, "-i", videoPath],
|
|
211
|
-
"-frames:v",
|
|
212
|
-
"1",
|
|
213
|
-
"-q:v",
|
|
214
|
-
"2",
|
|
215
|
-
"-y",
|
|
216
|
-
outPath
|
|
305
|
+
const seek = await probeContainingSourceFrameSeek(
|
|
306
|
+
videoPath,
|
|
307
|
+
Math.max(0, timeSeconds),
|
|
308
|
+
holdLastFrame
|
|
217
309
|
);
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
310
|
+
if (seek === null) return null;
|
|
311
|
+
const args = ["-hide_banner", "-loglevel", "error"];
|
|
312
|
+
if (useVp9AlphaDecoder) args.push("-c:v", "libvpx-vp9");
|
|
313
|
+
if (seek.seek !== void 0) args.push("-ss", String(seek.seek));
|
|
314
|
+
args.push("-i", videoPath, "-map", "0:v:0");
|
|
315
|
+
if (seek.select !== void 0) args.push("-vf", `select=gte(t-start_t\\,${seek.select})`);
|
|
316
|
+
args.push("-frames:v", "1", "-q:v", "2", "-y", outPath);
|
|
317
|
+
const result = await runFfmpegOnce(ffmpegPath, args, FFMPEG_EXTRACT_TIMEOUT_MS);
|
|
227
318
|
if (result.code !== 0 || result.timedOut || !existsSync(outPath)) return null;
|
|
228
319
|
return readFileSync(outPath);
|
|
229
320
|
} finally {
|
|
@@ -273,7 +364,7 @@ function computeSnapshotTimes(duration, opts) {
|
|
|
273
364
|
return { times: times.map(round), appendedTail: false };
|
|
274
365
|
}
|
|
275
366
|
async function captureSnapshots(projectDir, opts) {
|
|
276
|
-
const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-
|
|
367
|
+
const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-BLLHP2TO.js");
|
|
277
368
|
const numFrames = opts.frames ?? 5;
|
|
278
369
|
const html = await bundleWithLocalizedFonts(projectDir);
|
|
279
370
|
const server = await serveStaticProjectHtml(projectDir, html, void 0, [], opts.autoProxy);
|
|
@@ -346,7 +437,7 @@ async function captureSnapshots(projectDir, opts) {
|
|
|
346
437
|
let syncVideoFrameVisibility = null;
|
|
347
438
|
let extractMediaMetadata = null;
|
|
348
439
|
try {
|
|
349
|
-
const engine = await import("./src-
|
|
440
|
+
const engine = await import("./src-IZMCUYK7.js");
|
|
350
441
|
injectVideoFramesBatch = engine.injectVideoFramesBatch;
|
|
351
442
|
syncVideoFrameVisibility = engine.syncVideoFrameVisibility;
|
|
352
443
|
extractMediaMetadata = engine.extractMediaMetadata;
|
|
@@ -443,7 +534,6 @@ async function captureSnapshots(projectDir, opts) {
|
|
|
443
534
|
ffmpegInput,
|
|
444
535
|
Math.max(0, v.relTime),
|
|
445
536
|
useVp9AlphaDecoder,
|
|
446
|
-
false,
|
|
447
537
|
v.srcDuration > 0 && v.relTime >= v.srcDuration - 1
|
|
448
538
|
);
|
|
449
539
|
if (!png) continue;
|
|
@@ -499,7 +589,7 @@ async function captureSnapshots(projectDir, opts) {
|
|
|
499
589
|
await page.screenshot({ path: framePath, type: "png", omitBackground: true });
|
|
500
590
|
}
|
|
501
591
|
if (opts.against) {
|
|
502
|
-
const refPng = await extractVideoFrameToBuffer(opts.against, time
|
|
592
|
+
const refPng = await extractVideoFrameToBuffer(opts.against, time);
|
|
503
593
|
if (!refPng) {
|
|
504
594
|
console.error(
|
|
505
595
|
` ${c.warn("\u26A0")} --against has no frame at ${timeLabel} \u2014 reference pair skipped`
|
|
@@ -771,6 +861,7 @@ ${c.error("\u2717")} Snapshot failed: ${msg}`);
|
|
|
771
861
|
});
|
|
772
862
|
export {
|
|
773
863
|
computeSnapshotTimes,
|
|
864
|
+
containingSourceFrameIndex,
|
|
774
865
|
snapshot_default as default,
|
|
775
866
|
examples,
|
|
776
867
|
extractVideoFrameToBuffer,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
serializeRenderRequest,
|
|
68
68
|
startServer,
|
|
69
69
|
validatePlanV2MaterializedTarget
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-2H37RGJ2.js";
|
|
71
71
|
import {
|
|
72
72
|
FONT_FETCH_FAILED,
|
|
73
73
|
FONT_FETCH_UNAVAILABLE,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
defaultLogger,
|
|
78
78
|
injectDeterministicFontFaces
|
|
79
79
|
} from "./chunk-XMAL2A7Y.js";
|
|
80
|
-
import "./chunk-
|
|
80
|
+
import "./chunk-SOEQWMNS.js";
|
|
81
81
|
import "./chunk-KC5XXX3X.js";
|
|
82
82
|
import "./chunk-TJSTGSAW.js";
|
|
83
83
|
import "./chunk-BZ56MTDX.js";
|
|
@@ -96,14 +96,14 @@ import {
|
|
|
96
96
|
isTransientBrowserError,
|
|
97
97
|
prepareCaptureSessionForReuse,
|
|
98
98
|
resolveConfig
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-5MXN7WM4.js";
|
|
100
100
|
import {
|
|
101
101
|
quantizeTimeToFrame
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-IEE7GIVX.js";
|
|
103
103
|
import "./chunk-UUDQD62L.js";
|
|
104
104
|
import "./chunk-DPVXBVLL.js";
|
|
105
|
-
import "./chunk-
|
|
106
|
-
import "./chunk-
|
|
105
|
+
import "./chunk-M7XTMZF5.js";
|
|
106
|
+
import "./chunk-RRPJEHHW.js";
|
|
107
107
|
import "./chunk-VC76R6W2.js";
|
|
108
108
|
import "./chunk-OFQWTKPW.js";
|
|
109
109
|
import "./chunk-TWWSYAKJ.js";
|
|
@@ -212,15 +212,15 @@ import {
|
|
|
212
212
|
verifyGpuParity,
|
|
213
213
|
writeCapturedFrame,
|
|
214
214
|
writeUrlDownloadTelemetry
|
|
215
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-5MXN7WM4.js";
|
|
216
216
|
import {
|
|
217
217
|
MEDIA_VISUAL_STYLE_PROPERTIES,
|
|
218
218
|
quantizeTimeToFrame
|
|
219
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-IEE7GIVX.js";
|
|
220
220
|
import "./chunk-UUDQD62L.js";
|
|
221
221
|
import "./chunk-DPVXBVLL.js";
|
|
222
|
-
import "./chunk-
|
|
223
|
-
import "./chunk-
|
|
222
|
+
import "./chunk-M7XTMZF5.js";
|
|
223
|
+
import "./chunk-RRPJEHHW.js";
|
|
224
224
|
import "./chunk-VC76R6W2.js";
|
|
225
225
|
import "./chunk-OFQWTKPW.js";
|
|
226
226
|
import {
|
|
@@ -6,32 +6,33 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
serveStaticProjectHtml
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Y2Y4LBJD.js";
|
|
10
10
|
import "./chunk-XUHOIDKG.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-SSZYJCAL.js";
|
|
12
12
|
import "./chunk-X7MTZ4T2.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-PLP4K6WZ.js";
|
|
14
|
+
import "./chunk-TWJT2RGZ.js";
|
|
15
15
|
import "./chunk-WEATBQTR.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-MPB7BQT7.js";
|
|
17
|
+
import "./chunk-QMFCL2ZN.js";
|
|
18
|
+
import "./chunk-2GWVY66H.js";
|
|
19
19
|
import "./chunk-XT7X6QCP.js";
|
|
20
20
|
import "./chunk-4YYJOFKS.js";
|
|
21
21
|
import "./chunk-HVW7ABXD.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-TMCJPHPP.js";
|
|
23
|
+
import "./chunk-QXNRRMBQ.js";
|
|
24
|
+
import "./chunk-BDNCUMZM.js";
|
|
25
25
|
import "./chunk-AWDFDFI3.js";
|
|
26
|
+
import "./chunk-P6LJ4Y32.js";
|
|
26
27
|
import "./chunk-GMECXFAN.js";
|
|
27
28
|
import "./chunk-RDMAU7AJ.js";
|
|
28
29
|
import "./chunk-KC5XXX3X.js";
|
|
29
30
|
import "./chunk-TJSTGSAW.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-IEE7GIVX.js";
|
|
31
32
|
import "./chunk-UUDQD62L.js";
|
|
32
33
|
import "./chunk-DPVXBVLL.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-M7XTMZF5.js";
|
|
35
|
+
import "./chunk-RRPJEHHW.js";
|
|
35
36
|
import "./chunk-VC76R6W2.js";
|
|
36
37
|
import "./chunk-OFQWTKPW.js";
|
|
37
38
|
import "./chunk-YJEGT5L6.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-ZTZA4UWZ.js";
|
|
25
25
|
import {
|
|
26
26
|
getSystemMeta
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-IOJAVV6J.js";
|
|
28
28
|
import "./chunk-AMKC3AXA.js";
|
|
29
29
|
import {
|
|
30
30
|
defineCommand
|
|
@@ -33,12 +33,12 @@ import {
|
|
|
33
33
|
failCommand,
|
|
34
34
|
setCommandExitCode
|
|
35
35
|
} from "./chunk-PBN6GBJE.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-5MXN7WM4.js";
|
|
37
|
+
import "./chunk-IEE7GIVX.js";
|
|
38
38
|
import "./chunk-UUDQD62L.js";
|
|
39
39
|
import "./chunk-DPVXBVLL.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-M7XTMZF5.js";
|
|
41
|
+
import "./chunk-RRPJEHHW.js";
|
|
42
42
|
import "./chunk-VC76R6W2.js";
|
|
43
43
|
import "./chunk-OFQWTKPW.js";
|
|
44
44
|
import "./chunk-TWWSYAKJ.js";
|
package/dist/studio/assets/{hyperframes-player-DzJbtQVO.js → hyperframes-player-C-9N8nk0.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var xe=Object.defineProperty;var ke=(r,i,e)=>i in r?xe(r,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[i]=e;var h=(r,i,e)=>ke(r,typeof i!="symbol"?i+"":i,e);import{r as fe,i as Ie,a as w,b as _e,p as Oe,c as Ne,d as Fe,s as Ve,e as ge,F as ye}from"./index-
|
|
1
|
+
var xe=Object.defineProperty;var ke=(r,i,e)=>i in r?xe(r,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[i]=e;var h=(r,i,e)=>ke(r,typeof i!="symbol"?i+"":i,e);import{r as fe,i as Ie,a as w,b as _e,p as Oe,c as Ne,d as Fe,s as Ve,e as ge,F as ye}from"./index-CAvZ0AA-.js";function He(r){return r.hasRuntime||r.runtimeInjected?!1:!!(r.hasNestedCompositions||r.hasTimelines&&r.attempts>=5)}function z(r){return typeof r=="object"&&r!==null}function Ue(r){return z(r)&&typeof r.getDuration=="function"}function We(r){return z(r)&&typeof r.duration=="function"&&typeof r.time=="function"&&typeof r.seek=="function"&&typeof r.play=="function"&&typeof r.pause=="function"}function ze(r){if(!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(r))throw new Error(`Invalid HyperFrames runtime version: ${r}`);return`https://cdn.jsdelivr.net/npm/@hyperframes/core@${r}/dist/hyperframe.runtime.iife.js`}const U=typeof __HYPERFRAMES_RUNTIME_CDN_URL__=="string"?__HYPERFRAMES_RUNTIME_CDN_URL__:ze("0.0.0-dev");function $(r){if(r===null)return null;const i=Number.parseInt(r,10);return Number.isFinite(i)&&i>0?i:null}function $e(r){const i=(r==null?void 0:r.querySelector("[data-composition-id][data-width][data-height]"))??(r==null?void 0:r.querySelector("[data-width][data-height]"));if(!i)return null;const e=$(i.getAttribute("data-width")),t=$(i.getAttribute("data-height"));return e!==null&&t!==null?{width:e,height:t}:null}class je{constructor(i,e){h(this,"_interval",null);h(this,"_runtimeInjected",!1);this._iframe=i,this._callbacks=e}get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._runtimeInjected=!1;let i=0;this._interval=setInterval(()=>{var e;i++;try{const t=this._iframe.contentWindow;if(!t)return;const s=!!(t.__hf||t.__player),n=!!(t.__timelines&&Object.keys(t.__timelines).length>0),o=!!((e=this._iframe.contentDocument)!=null&&e.querySelector("[data-composition-src]"));if(He({hasRuntime:s,hasTimelines:n,hasNestedCompositions:o,runtimeInjected:this._runtimeInjected,attempts:i})){this._injectRuntime();return}if(this._runtimeInjected&&!s)return;const a=this._resolvePlaybackDurationAdapter(t);if(a&&a.getDuration()>0){this.stop();const c=$e(this._iframe.contentDocument);this._callbacks.onReady({duration:a.getDuration(),adapter:a,compositionSize:c});return}}catch{}i>=40&&(this.stop(),this._callbacks.onError("Composition timeline not found after 8s"))},200)}stop(){this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{const i=this._iframe.contentWindow;return i?this._resolveDirectTimelineAdapterFromWindow(i):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(i){return this._resolveDirectTimelineAdapterFromWindow(i)}hasRuntimeBridge(i){return Reflect.get(i,"__hf")!==void 0||z(Reflect.get(i,"__player"))}_injectRuntime(){var i,e;this._runtimeInjected=!0;try{const t=this._iframe.contentDocument;if(!t)return;const s=t.createElement("script");s.src=U,(t.head||t.documentElement).appendChild(s),(e=(i=this._callbacks).onRuntimeInjected)==null||e.call(i)}catch{}}_resolveDirectTimelineAdapterFromWindow(i){var a,c;if(this.hasRuntimeBridge(i))return null;const e=Reflect.get(i,"__timelines");if(!z(e))return null;const t=Object.keys(e);if(t.length===0)return null;const s=(c=(a=this._iframe.contentDocument)==null?void 0:a.querySelector("[data-composition-id]"))==null?void 0:c.getAttribute("data-composition-id"),n=s&&s in e?s:t[t.length-1],o=e[n];return We(o)?o:null}_resolvePlaybackDurationAdapter(i){const e=Reflect.get(i,"__player");if(Ue(e))return{kind:"runtime",getDuration:()=>e.getDuration()};const t=this._resolveDirectTimelineAdapterFromWindow(i);return t?{kind:"direct-timeline",timeline:t,getDuration:()=>t.duration()}:null}}const Be=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as P}from"./index-
|
|
1
|
+
import{g as P}from"./index-CAvZ0AA-.js";function j(c,d){for(var s=0;s<d.length;s++){const a=d[s];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in c)){const l=Object.getOwnPropertyDescriptor(a,i);l&&Object.defineProperty(c,i,l.get?l:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}var v={},w;function k(){if(w)return v;w=1,Object.defineProperty(v,"__esModule",{value:!0}),v.default=d;var c=window.OfflineAudioContext||window.webkitOfflineAudioContext;function d(e){var r=a(e);return r.start(0),[i,y,O(e.sampleRate),s].reduce(function(t,o){return o(t)},r.buffer.getChannelData(0))}function s(e){return e.sort(function(r,t){return t.count-r.count}).splice(0,5)[0].tempo}function a(e){var r=e.length,t=e.numberOfChannels,o=e.sampleRate,n=new c(t,r,o),u=n.createBufferSource();u.buffer=e;var f=n.createBiquadFilter();return f.type="lowpass",u.connect(f),f.connect(n.destination),u}function i(e){for(var r=[],t=.9,o=.3,n=15;r.length<n&&t>=o;)r=l(e,t),t-=.05;if(r.length<n)throw new Error("Could not find enough samples for a reliable detection.");return r}function l(e,r){for(var t=[],o=0,n=e.length;o<n;o+=1)e[o]>r&&(t.push(o),o+=1e4);return t}function y(e){var r=[];return e.forEach(function(t,o){for(var n=function(x){var g=e[o+x]-t,_=r.some(function(h){if(h.interval===g)return h.count+=1});_||r.push({interval:g,count:1})},u=0;u<10;u+=1)n(u)}),r}function O(e){return function(r){var t=[];return r.forEach(function(o){if(o.interval!==0){for(var n=60/(o.interval/e);n<90;)n*=2;for(;n>180;)n/=2;n=Math.round(n);var u=t.some(function(f){if(f.tempo===n)return f.count+=o.count});u||t.push({tempo:n,count:o.count})}}),t}}return v}var p,b;function q(){return b||(b=1,p=k().default),p}var m=q();const A=P(m),D=j({__proto__:null,default:A},[m]);export{D as i};
|