hyperframes 0.8.181 → 0.8.183

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/bin/hyperframes.mjs +3 -1
  2. package/dist/{add-AWQ2EGBU.js → add-HW3ZGR36.js} +22 -22
  3. package/dist/{animatedGifPrep-SENXJ7TN.js → animatedGifPrep-EPLN37ZN.js} +13 -13
  4. package/dist/api.js +28 -28
  5. package/dist/{asset-XBH3MN3Y.js → asset-TOASKL3Z.js} +3 -3
  6. package/dist/{assetCataloger-KH4X2CRO.js → assetCataloger-PZN5HYG2.js} +15 -13
  7. package/dist/{audio-Q7I473UN.js → audio-F5OIQVJO.js} +29 -29
  8. package/dist/{auth-I7CBTEUS.js → auth-YVQLRS3T.js} +4 -4
  9. package/dist/{autoUpdate-KY5TLSN7.js → autoUpdate-EG4ZFW4D.js} +2 -2
  10. package/dist/{backgroundChecks-4Q3VVK5W.js → backgroundChecks-WINNQVR2.js} +3 -3
  11. package/dist/backgroundChecksWorker.js +3 -3
  12. package/dist/{batchRender-3AYDQRBI.js → batchRender-PASZTMEE.js} +7 -7
  13. package/dist/{beats-P4LENNVT.js → beats-KGIOEBLW.js} +12 -12
  14. package/dist/{benchmark-AXOAECN3.js → benchmark-ZNY2L7HN.js} +24 -24
  15. package/dist/{browser-XZKB5HGJ.js → browser-REAO7RU4.js} +20 -20
  16. package/dist/{bundleWithLocalizedFonts-2WCR57IN.js → bundleWithLocalizedFonts-OAYLYC4W.js} +2 -2
  17. package/dist/{capture-NWARHRHR.js → capture-IK6GWQDD.js} +8 -5
  18. package/dist/{capture-4RN4APDF.js → capture-WOSF276U.js} +49 -41
  19. package/dist/{captureCompositionFrame-QOF5BRF4.js → captureCompositionFrame-DDZNKYRE.js} +21 -20
  20. package/dist/{captureTimeout-K2JNVVCI.js → captureTimeout-RIMG6IYH.js} +1 -1
  21. package/dist/{catalog-CRPOPVD5.js → catalog-AKTXS7OJ.js} +42 -42
  22. package/dist/{catch-up-MHWGUQ42.js → catch-up-O3VZMPVE.js} +15 -15
  23. package/dist/check-6E46NIWI.js +116 -0
  24. package/dist/checkBrowser-UNZHQFNH.js +117 -0
  25. package/dist/{chunk-Y2RXRPL2.js → chunk-3BA2GP4H.js} +5 -5
  26. package/dist/{chunk-N5SXQCJL.js → chunk-3OLIGYWN.js} +3 -3
  27. package/dist/{chunk-OR5WCFWZ.js → chunk-3Q47QC46.js} +2 -2
  28. package/dist/{chunk-EOADENKV.js → chunk-4FQKS7BJ.js} +16 -14
  29. package/dist/{chunk-HODBPO4A.js → chunk-4UFJWRHG.js} +461 -275
  30. package/dist/{chunk-537IYAEE.js → chunk-4UMPIPCQ.js} +9 -1
  31. package/dist/{chunk-OJTDUF4W.js → chunk-5MBLWFLM.js} +1 -1
  32. package/dist/{chunk-UVEQLDKB.js → chunk-5OGDBU4G.js} +3 -2
  33. package/dist/{chunk-L3YOGIPG.js → chunk-66LREXGS.js} +1 -1
  34. package/dist/{chunk-YPBIAONI.js → chunk-73LTCCZI.js} +218 -150
  35. package/dist/{chunk-GZVP4TWN.js → chunk-7JAD4MEW.js} +1 -1
  36. package/dist/{chunk-NAMGMP3R.js → chunk-7KVVNF7B.js} +1 -1
  37. package/dist/{chunk-GK2FIKIQ.js → chunk-ADDHW2FS.js} +214 -37
  38. package/dist/{chunk-WUQUR33W.js → chunk-AKFADCMS.js} +1 -1
  39. package/dist/{chunk-VAJIPSN6.js → chunk-ANR6WOC3.js} +1 -1
  40. package/dist/{chunk-4USWWI2Y.js → chunk-ATMDOUNN.js} +2 -2
  41. package/dist/{chunk-XSRUVMXK.js → chunk-B2SZZFWW.js} +4 -4
  42. package/dist/{chunk-TO6JNTML.js → chunk-BP4VNTZL.js} +13 -8
  43. package/dist/{chunk-DJJ7SK4F.js → chunk-CAHTO62O.js} +8 -8
  44. package/dist/{chunk-GNE57O7U.js → chunk-CGK4XZ2J.js} +1 -1
  45. package/dist/{chunk-O5AE7HOP.js → chunk-CJYAJ3QM.js} +37 -33
  46. package/dist/{chunk-5JMZLQT6.js → chunk-COTLNID2.js} +16 -16
  47. package/dist/{chunk-E24HSMZV.js → chunk-CYBXXSC4.js} +65 -14
  48. package/dist/{chunk-NZZYJOMJ.js → chunk-CZUAX3BV.js} +6 -5
  49. package/dist/{chunk-K26FR4SM.js → chunk-DEORFAWP.js} +12 -12
  50. package/dist/{chunk-GV5R5B7Q.js → chunk-DGECWPTL.js} +1 -1
  51. package/dist/{chunk-BRHI7EIA.js → chunk-DKPNNYBZ.js} +4 -0
  52. package/dist/{chunk-5E5EYPZO.js → chunk-DLC2FICN.js} +7 -7
  53. package/dist/{chunk-D3ZWBHZP.js → chunk-DYAPHNV6.js} +3 -2
  54. package/dist/{chunk-RGHQID2E.js → chunk-EHSBBBR2.js} +5 -3
  55. package/dist/{chunk-IWTRHPTP.js → chunk-EVAQPW6O.js} +8 -8
  56. package/dist/{chunk-S3RYRF3W.js → chunk-F6WHPHLF.js} +1 -1
  57. package/dist/chunk-FG4BBFZI.js +122 -0
  58. package/dist/{chunk-WITHUCCB.js → chunk-GAGMLVCV.js} +2 -2
  59. package/dist/chunk-GMNHAOMJ.js +3805 -0
  60. package/dist/{chunk-KIO3R4QN.js → chunk-GPE3WWTO.js} +16 -6
  61. package/dist/{chunk-IL3GTCQY.js → chunk-GTE5WZAM.js} +72 -140
  62. package/dist/{chunk-55IG255C.js → chunk-HLBODNGW.js} +1 -1
  63. package/dist/{chunk-KMAAOHLO.js → chunk-HRPWRZGF.js} +1 -1
  64. package/dist/{chunk-UPFUC4DB.js → chunk-HTIUNMTP.js} +1 -1
  65. package/dist/{chunk-WUUCEFL5.js → chunk-IC2WYONA.js} +5 -5
  66. package/dist/{chunk-DUN63LHY.js → chunk-ITSLKUQM.js} +2 -2
  67. package/dist/{chunk-YJDB4FLT.js → chunk-JQYJXUJW.js} +1 -1
  68. package/dist/{chunk-PBN6GBJE.js → chunk-JVBRJMOP.js} +14 -1
  69. package/dist/{chunk-XH262OWN.js → chunk-K2Z5DZBS.js} +1 -1
  70. package/dist/{chunk-RHWJKSGH.js → chunk-KANNRHY7.js} +1 -1
  71. package/dist/{chunk-AOWDVB2T.js → chunk-KRFAX5JK.js} +1 -1
  72. package/dist/{chunk-UIDZRCBG.js → chunk-LBWRQ4XA.js} +1 -1
  73. package/dist/{chunk-T7UHTUUE.js → chunk-MIZDJVPZ.js} +9 -9
  74. package/dist/{chunk-32GKETR7.js → chunk-MMQ52NIZ.js} +74 -0
  75. package/dist/chunk-MOEGCMKI.js +180 -0
  76. package/dist/{chunk-E6RPWJVC.js → chunk-NAUKCKCJ.js} +5 -1
  77. package/dist/{chunk-JBCU6NR5.js → chunk-NZ3BE2QE.js} +56 -55
  78. package/dist/{chunk-JMFJI26U.js → chunk-O7N3A7PE.js} +2 -2
  79. package/dist/{chunk-3PULCIY5.js → chunk-OH56PXFH.js} +5 -5
  80. package/dist/{chunk-H4YZZ2VQ.js → chunk-PFD25NAC.js} +1 -1
  81. package/dist/{check-DJCUOUDI.js → chunk-Q6UYKWBG.js} +198 -142
  82. package/dist/{chunk-3DKN5WKL.js → chunk-QH3T4WI2.js} +77 -6
  83. package/dist/{chunk-Y5GY6Y7A.js → chunk-QX4GGPMY.js} +2 -2
  84. package/dist/{chunk-B6JLCPT3.js → chunk-R6OV4J4K.js} +6 -6
  85. package/dist/{chunk-XEWHUPFS.js → chunk-RZXUQR42.js} +2 -2
  86. package/dist/{chunk-YMS6CJCD.js → chunk-SAQYJLI6.js} +1 -1
  87. package/dist/{chunk-OJDXABUF.js → chunk-TJB4GAV6.js} +2 -2
  88. package/dist/{checkBrowser-VES2NF3K.js → chunk-TOHA5NAU.js} +187 -114
  89. package/dist/{chunk-RXQHSGAQ.js → chunk-TXGZZKDF.js} +2 -2
  90. package/dist/{chunk-3XDOGSRD.js → chunk-U5YVWG5W.js} +3 -3
  91. package/dist/{chunk-ICMXC3MI.js → chunk-U6RXZNZE.js} +31 -18
  92. package/dist/{chunk-PF7OWVTL.js → chunk-UNOSCGBG.js} +2 -2
  93. package/dist/{chunk-X7CCSMRR.js → chunk-VAK7A2N6.js} +16 -16
  94. package/dist/{chunk-OFY6JTZC.js → chunk-VDJO4DJ7.js} +2 -2
  95. package/dist/{chunk-LBQFLUIY.js → chunk-VFBAKPRC.js} +9 -49
  96. package/dist/{chunk-ZUOSILUE.js → chunk-VH5KESLX.js} +1 -1
  97. package/dist/{chunk-22QHO26F.js → chunk-W64L7IFS.js} +1 -1
  98. package/dist/{chunk-4IEH6EAC.js → chunk-WT4PYV2J.js} +4 -6
  99. package/dist/{chunk-XFCLWWL3.js → chunk-X3IA5RYH.js} +2 -2
  100. package/dist/{chunk-UZOZ2W2E.js → chunk-XAQDR5Y5.js} +2 -2
  101. package/dist/{chunk-6I7V6Q7F.js → chunk-XJHKJXT4.js} +103 -20
  102. package/dist/{chunk-V2UNZ7QP.js → chunk-XOVHO3TT.js} +25 -14
  103. package/dist/{chunk-65WIUIHL.js → chunk-XR5BSEUF.js} +7 -15
  104. package/dist/{chunk-IZM562YJ.js → chunk-Z4R35NJS.js} +4 -4
  105. package/dist/{chunk-4OT3FWVV.js → chunk-ZFO3A3QL.js} +2 -2
  106. package/dist/{clean-GJNDVVDI.js → clean-WNEIVBF3.js} +40 -40
  107. package/dist/cli.js +68 -64
  108. package/dist/{cloud-JCWNMKXC.js → cloud-6GSSDCJL.js} +4 -4
  109. package/dist/{cloudrun-2BKGY53X.js → cloudrun-4NEJRE4T.js} +8 -8
  110. package/dist/commands/layout-audit.browser.js +15 -4
  111. package/dist/commands/motion-signature.browser.js +52 -0
  112. package/dist/{compare-XWM7FAYM.js → compare-2JWQ5ABA.js} +50 -47
  113. package/dist/{compiler-U3W6CJW7.js → compiler-27KQD7KW.js} +6 -6
  114. package/dist/{component-CBRAE325.js → component-HCRET3MH.js} +4 -4
  115. package/dist/{compositions-EZYJEHQ3.js → compositions-HTSQ6SUJ.js} +28 -29
  116. package/dist/{contactSheet-27SRU7A4.js → contactSheet-CAGMKI3E.js} +3 -1
  117. package/dist/{delete-JWWMOITI.js → delete-GHQ5UYM7.js} +9 -9
  118. package/dist/{deploy-UGOV76OH.js → deploy-I3Z3NAVA.js} +11 -11
  119. package/dist/{destroy-QBLMYDBF.js → destroy-4B5HW5FH.js} +5 -5
  120. package/dist/{deterministicFonts-L7YEEFGI.js → deterministicFonts-JFLSSKRB.js} +2 -2
  121. package/dist/{dist-2FMTAVGL.js → dist-SENYPQGW.js} +4 -4
  122. package/dist/{dist-VO7OXOFK.js → dist-WRDLWRMS.js} +5 -5
  123. package/dist/{docs-MPOM3PHH.js → docs-UEWLIP6D.js} +1 -1
  124. package/dist/{doctor-XSKSZRR7.js → doctor-UGFVQZHI.js} +27 -27
  125. package/dist/{events-AIZODZMP.js → events-BLJGWMNP.js} +9 -9
  126. package/dist/{events-RGS4MAH4.js → events-YS4OVX3I.js} +6 -6
  127. package/dist/{feedback-GE3VDZOH.js → feedback-AZ3SJ5HF.js} +35 -35
  128. package/dist/{ffmpeg-SCXZTR6X.js → ffmpeg-2AECXG7V.js} +15 -15
  129. package/dist/{figma-3R4XST4Y.js → figma-DRYIJQHV.js} +3 -3
  130. package/dist/fontLocalizeCli.js +23 -23
  131. package/dist/{get-4FKJP6IM.js → get-DDEAOFPB.js} +9 -9
  132. package/dist/{gpuPolicy-4NNXESM7.js → gpuPolicy-UDJT2MQK.js} +13 -13
  133. package/dist/{grade-compare-FAYVPXUR.js → grade-compare-LJKK5NSY.js} +55 -50
  134. package/dist/{help-C3UQMYXK.js → help-TQBGYOID.js} +1 -1
  135. package/dist/{history-LDGQ2IZJ.js → history-5TOOCF2Y.js} +15 -15
  136. package/dist/hyperframe.manifest.json +1 -1
  137. package/dist/hyperframe.runtime.iife.js +17 -17
  138. package/dist/hyperframes-player.global.js +8 -3
  139. package/dist/{info-KMXFLD3Q.js → info-ENI5MP4W.js} +20 -20
  140. package/dist/{init-D7GYHSX5.js → init-JXPXWV3G.js} +68 -68
  141. package/dist/{inspect-CUKWHCGS.js → inspect-WZNYQ5AB.js} +45 -44
  142. package/dist/{installer-EPRSH6QI.js → installer-3SGRBLJW.js} +7 -7
  143. package/dist/{keyframes-XCUPHBW3.js → keyframes-HEOC4CT4.js} +16 -16
  144. package/dist/{lambda-IMORFJHN.js → lambda-2VHQ4AL2.js} +15 -15
  145. package/dist/{layout-JD2IOBMS.js → layout-7WEUNO6T.js} +45 -44
  146. package/dist/{lint-FHLER36Y.js → lint-5YMAF3L7.js} +23 -23
  147. package/dist/{lintProject-ARKJXDQF.js → lintProject-C2ONSH2U.js} +4 -4
  148. package/dist/{list-MGCFG5MA.js → list-BIE3X7CO.js} +10 -10
  149. package/dist/{login-QX6M4UTR.js → login-YDIGJWCG.js} +7 -7
  150. package/dist/{logout-DKJANASY.js → logout-DDC4QLVK.js} +3 -3
  151. package/dist/{manager-IETAVBZS.js → manager-D2UV6RDQ.js} +16 -16
  152. package/dist/{manager-V2QCCPOJ.js → manager-UHWEKPXC.js} +8 -3
  153. package/dist/{media-treatment-MDAQRITV.js → media-treatment-FSKHPMWA.js} +33 -33
  154. package/dist/{media-use-4XXGABIL.js → media-use-JBN57JE3.js} +1 -1
  155. package/dist/{models-NZAOSI5A.js → models-COEK6LXG.js} +24 -24
  156. package/dist/{motionShot-6ZDUM2K4.js → motionShot-HYZ2ZGJQ.js} +28 -26
  157. package/dist/{normalize-audio-7PRYX6QM.js → normalize-audio-UXR6WQ7Q.js} +12 -12
  158. package/dist/{open-I254NY5J.js → open-OFT2GIDG.js} +24 -24
  159. package/dist/{parakeetRunner-TL3TOGUS.js → parakeetRunner-4NZ3QXS3.js} +25 -25
  160. package/dist/{pipeline-YPERVOQM.js → pipeline-ZKE54JMG.js} +18 -18
  161. package/dist/{play-MYI7BYKS.js → play-2VG77FT6.js} +39 -38
  162. package/dist/{policies-5NTZOHJA.js → policies-XXNGXWHV.js} +1 -1
  163. package/dist/{preflight-HRCSZ52D.js → preflight-QTWDIM5C.js} +18 -18
  164. package/dist/{present-WYXQDV4Q.js → present-OONXQLJG.js} +33 -33
  165. package/dist/{preview-535HTWQO.js → preview-6RZJFU76.js} +49 -49
  166. package/dist/{producer-C76CRJ5O.js → producer-6YM3UH3B.js} +1 -1
  167. package/dist/{progress-I37JB7R4.js → progress-NHJIHAAG.js} +2 -2
  168. package/dist/{projectConfig-5QCNTGQT.js → projectConfig-YMW4P2X6.js} +9 -9
  169. package/dist/{publication-2QT7VVE2.js → publication-SEINUAPZ.js} +5 -5
  170. package/dist/{publish-53EBL7OO.js → publish-KZBTBWFO.js} +27 -27
  171. package/dist/{refresh-MGCVWX56.js → refresh-RXTOPRBB.js} +3 -3
  172. package/dist/{remove-background-OBYHMPD4.js → remove-background-BIQNMIR7.js} +31 -31
  173. package/dist/{render-5BXTEEG7.js → render-65K3K6SD.js} +31 -31
  174. package/dist/{render-3MELF6Y3.js → render-FIH37HJA.js} +101 -96
  175. package/dist/{render-75CRB3BW.js → render-LW76HOMJ.js} +8 -8
  176. package/dist/{render-batch-CEVWUYBP.js → render-batch-POLEEYD4.js} +8 -8
  177. package/dist/renderSetupWorker.js +12 -9
  178. package/dist/{resolver-4ICE2AT6.js → resolver-O2SED3XB.js} +7 -7
  179. package/dist/{screenshotCapture-HXEZ3TNJ.js → screenshotCapture-UBY6TT75.js} +33 -6
  180. package/dist/{sherpa-L4UACXT3.js → sherpa-HTFFFTVQ.js} +24 -24
  181. package/dist/{sites-3ZBYB5X4.js → sites-MAVH57MO.js} +2 -2
  182. package/dist/skills/hyperframes/references/review-loop.md +1 -1
  183. package/dist/{skills-DXTQPCAO.js → skills-J6MBGS5O.js} +17 -17
  184. package/dist/{skillsUpdateCheck-ULXRGLDU.js → skillsUpdateCheck-ZAXNLBF3.js} +3 -3
  185. package/dist/{snapshot-PWFHQU5E.js → snapshot-TL7TTFS6.js} +72 -71
  186. package/dist/{src-RDSWHMJS.js → src-EL6HGIS4.js} +33 -26
  187. package/dist/{src-S7NVL5VF.js → src-Z5H5N5T4.js} +19 -19
  188. package/dist/{state-KAXGHF77.js → state-ORRPOLMQ.js} +2 -2
  189. package/dist/{staticProjectServer-GYPUQGI7.js → staticProjectServer-EO7X7RAY.js} +20 -20
  190. package/dist/{status-BV7QAUQD.js → status-CM7IQTU2.js} +6 -6
  191. package/dist/studio/assets/{hyperframes-player-DcD3NXpX.js → hyperframes-player-hz_VqxBZ.js} +7 -2
  192. package/dist/studio/assets/{index-BIDKYk0h.js → index-CV_ojgp5.js} +1 -1
  193. package/dist/studio/assets/{index-CFrZAwKo.js → index-S1ceEagc.js} +4 -4
  194. package/dist/studio/index.html +1 -1
  195. package/dist/{studio-api-IXGX5ZFI.js → studio-api-CUZDC5B3.js} +17 -17
  196. package/dist/{studioServer-LA5Z7RSS.js → studioServer-EZPRV43Y.js} +90 -84
  197. package/dist/{telemetry-STEMAMAX.js → telemetry-LFUVHARP.js} +10 -10
  198. package/dist/{telemetry-CQYHCCPL.js → telemetry-QG5AANZ4.js} +1 -1
  199. package/dist/{timeline-KLD24EN6.js → timeline-GSH743JE.js} +41 -41
  200. package/dist/{tokens-ICLORAA4.js → tokens-3ZMPSH7B.js} +3 -3
  201. package/dist/{transcribe-A6IKK7VS.js → transcribe-4SHNDPWW.js} +47 -47
  202. package/dist/{transcribe-CTHZLRXF.js → transcribe-TV7JBZQS.js} +19 -19
  203. package/dist/{tts-EDK3QS7M.js → tts-A2WILYGN.js} +6 -6
  204. package/dist/{updateCheck-FHCAAAXA.js → updateCheck-W7FTFOQF.js} +2 -2
  205. package/dist/{upgrade-7EV4F2R7.js → upgrade-7YYYNAPF.js} +3 -3
  206. package/dist/{urlDownloader-MIMGVASJ.js → urlDownloader-PQSUS2CP.js} +12 -12
  207. package/dist/{validate-LZF46W3V.js → validate-GCHAEVXM.js} +39 -38
  208. package/dist/{video-ZC47NFOL.js → video-KGN7NJS5.js} +16 -14
  209. package/dist/warmCheck.js +227 -0
  210. package/dist/warmCheckClient.js +139 -0
  211. package/package.json +4 -2
  212. package/dist/chunk-BAZ5LCR3.js +0 -3805
  213. package/dist/hyperframe-runtime.js +0 -1125
  214. package/dist/{chunk-B4VT6YU2.js → chunk-QGOYNPQT.js} +3 -3
  215. package/dist/{synthesize-I2C24XJ5.js → synthesize-PKTB5ATG.js} +1 -1
@@ -9,7 +9,7 @@ import {
9
9
  formatPreviewProxyBox,
10
10
  hdrToSdrToneMapFilter,
11
11
  parseFirstFrameColour
12
- } from "./chunk-LBQFLUIY.js";
12
+ } from "./chunk-VFBAKPRC.js";
13
13
  import {
14
14
  decodeAuthoredAttribute,
15
15
  scanHtmlOpeningTags
@@ -19,15 +19,15 @@ import {
19
19
  realProjectRoot,
20
20
  realpath
21
21
  } from "./chunk-OFQWTKPW.js";
22
+ import {
23
+ findFfBinary
24
+ } from "./chunk-VAS6HQX3.js";
22
25
  import {
23
26
  cleanAssetUrl,
24
27
  isRemoteOrInlineUrl,
25
28
  isUnresolvedAssetPlaceholder,
26
29
  resolveExistingLocalAsset
27
30
  } from "./chunk-6BNTGNGD.js";
28
- import {
29
- findFfBinary
30
- } from "./chunk-VAS6HQX3.js";
31
31
  import {
32
32
  rewriteAssetPath
33
33
  } from "./chunk-BSQ7XANM.js";
@@ -337,7 +337,7 @@ async function scanProjectMediaCodecMap(projectDir, htmlSources, options = {}) {
337
337
  return map;
338
338
  }
339
339
 
340
- // ../studio-server/dist/chunk-QFJR3NIL.js
340
+ // ../studio-server/dist/chunk-D5RQMNZQ.js
341
341
  import { spawn } from "child_process";
342
342
  import { createHash, randomUUID } from "crypto";
343
343
  import { existsSync as existsSync2, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, utimesSync } from "fs";
@@ -549,6 +549,13 @@ function getCanonicalProxyCachePath(source, variant, box) {
549
549
  `${key}${PROXY_VARIANT_CONFIG[variant].extension}`
550
550
  );
551
551
  }
552
+ function getProxyCachePath(projectDir, absoluteSourcePath, variant = "h264", box) {
553
+ return getCanonicalProxyCachePath(
554
+ canonicalizeProxySource(projectDir, absoluteSourcePath),
555
+ variant,
556
+ box
557
+ );
558
+ }
552
559
  var ProxyDroppedError = class extends ProxyTranscodeError {
553
560
  constructor() {
554
561
  super("media proxy copy dropped: every caller left", null, "");
@@ -864,7 +871,8 @@ async function resolveProxy(projectDir, absoluteSourcePath, variant = "h264", bo
864
871
  if (options.priority) prioritize(entry.job);
865
872
  return joinJob(entry.promise, entry.job, options.signal);
866
873
  }
867
- async function resolveProxies(projectDir, sources) {
874
+ async function resolveProxies(projectDir, sources, onSettled = () => {
875
+ }) {
868
876
  const results = [];
869
877
  let next = 0;
870
878
  const worker = async () => {
@@ -877,6 +885,7 @@ async function resolveProxies(projectDir, sources) {
877
885
  (value) => ({ status: "fulfilled", value }),
878
886
  (reason) => ({ status: "rejected", reason })
879
887
  );
888
+ onSettled();
880
889
  }
881
890
  };
882
891
  const workers = Math.min(MAX_CONCURRENT_TRANSCODES, sources.length);
@@ -918,6 +927,7 @@ export {
918
927
  ProxyCapacityError,
919
928
  ProxyWaitTimeoutError,
920
929
  waitForProxy,
930
+ getProxyCachePath,
921
931
  proxyActivityMark,
922
932
  resolveProxy,
923
933
  resolveProxies
@@ -9,18 +9,15 @@ import {
9
9
  isOneProcessOverPipe,
10
10
  machServiceDenied,
11
11
  oneProcessOverPipe,
12
+ pipeLaunchClosedOnMac,
12
13
  sandboxDeniedRemediation
13
- } from "./chunk-BRHI7EIA.js";
14
+ } from "./chunk-DKPNNYBZ.js";
14
15
  import {
15
16
  resolveCaptureBrowserGpuMode
16
- } from "./chunk-4OT3FWVV.js";
17
- import {
18
- isNavigationTimeoutError,
19
- withRemainingBudget
20
- } from "./chunk-RGHQID2E.js";
17
+ } from "./chunk-ZFO3A3QL.js";
21
18
  import {
22
19
  requestCliExit
23
- } from "./chunk-PBN6GBJE.js";
20
+ } from "./chunk-JVBRJMOP.js";
24
21
  import {
25
22
  normalizeErrorMessage
26
23
  } from "./chunk-KNU5COPB.js";
@@ -28,11 +25,61 @@ import {
28
25
  processIsAlive
29
26
  } from "./chunk-KGPLIH7B.js";
30
27
 
28
+ // src/browser/windowsChromeWatchdog.ts
29
+ import { spawn } from "child_process";
30
+ import { realpathSync } from "fs";
31
+ var SWEEP = `$b=[int]$env:HF_CHROME_PID; $x=$env:HF_CHROME_EXE; $t=[DateTimeOffset]::FromUnixTimeMilliseconds([int64]$env:HF_CHROME_SINCE).UtcDateTime; Get-CimInstance Win32_Process | Where-Object { ($_.ProcessId -eq $b -or $_.ParentProcessId -eq $b) -and $_.ExecutablePath -eq $x -and $_.CreationDate.ToUniversalTime() -ge $t } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }`;
32
+ var WATCHDOG = `let clean = false;
33
+ const done = () => {
34
+ if (!clean) require("node:child_process").spawnSync("powershell.exe", ["-NoProfile", "-NonInteractive", "-Command", ${JSON.stringify(SWEEP)}], { windowsHide: true, timeout: 20000 });
35
+ process.exit(0);
36
+ };
37
+ process.stdin.on("data", (data) => { clean ||= String(data).includes("clean"); });
38
+ process.stdin.on("end", done);
39
+ process.stdin.on("error", done);`;
40
+ function executableOf(chrome) {
41
+ try {
42
+ return realpathSync.native(chrome.spawnfile);
43
+ } catch {
44
+ return void 0;
45
+ }
46
+ }
47
+ function watchChromeTree(chrome, launchedAt) {
48
+ const executable = process.platform === "win32" ? executableOf(chrome) : void 0;
49
+ if (!executable || chrome.pid === void 0) return void 0;
50
+ const watchdog = spawn(process.execPath, ["-e", WATCHDOG], {
51
+ detached: true,
52
+ env: {
53
+ ...process.env,
54
+ HF_CHROME_PID: String(chrome.pid),
55
+ HF_CHROME_EXE: executable,
56
+ HF_CHROME_SINCE: String(launchedAt)
57
+ },
58
+ stdio: ["pipe", "ignore", "ignore"],
59
+ windowsHide: true
60
+ });
61
+ watchdog.on("error", () => {
62
+ });
63
+ watchdog.stdin?.on("error", () => {
64
+ });
65
+ watchdog.unref();
66
+ watchdog.stdin?.unref?.();
67
+ let released = false;
68
+ return {
69
+ release(clean) {
70
+ if (released) return;
71
+ released = true;
72
+ watchdog.stdin?.end(clean ? "clean" : "");
73
+ }
74
+ };
75
+ }
76
+
31
77
  // src/browser/launch.ts
32
78
  var BrowserCleanupError = class extends AggregateError {
33
79
  };
34
80
  var browsers = /* @__PURE__ */ new Set();
35
81
  var closing = /* @__PURE__ */ new WeakMap();
82
+ var watchdogs = /* @__PURE__ */ new WeakMap();
36
83
  var pending = /* @__PURE__ */ new Map();
37
84
  var sessionCleanups = /* @__PURE__ */ new Set();
38
85
  var CLOSE_GRACE_MS = 1e3;
@@ -83,7 +130,7 @@ async function launchManagedBrowser(puppeteer, options) {
83
130
  try {
84
131
  return await launchOwnedBrowser(puppeteer, sandboxed ? oneProcessOverPipe(options) : options);
85
132
  } catch (error) {
86
- const unnamedSeatbelt = !sandboxed && machServiceDenied(normalizeErrorMessage(error));
133
+ const unnamedSeatbelt = !sandboxed && (machServiceDenied(normalizeErrorMessage(error)) || pipeLaunchClosedOnMac(error));
87
134
  if (!unnamedSeatbelt) throw withRemediation(error);
88
135
  return launchOwnedBrowser(puppeteer, oneProcessOverPipe(options)).catch(
89
136
  (retryError) => {
@@ -101,8 +148,9 @@ async function launchOwnedBrowser(puppeteer, options) {
101
148
  ownSignals();
102
149
  const abort = new AbortController();
103
150
  const signal = options.signal ? AbortSignal.any([options.signal, abort.signal]) : abort.signal;
151
+ const launchedAt = Date.now();
104
152
  const launch = untilLaunchOrAbort(
105
- puppeteer.launch({ ...options, signal, handleSIGINT: false, handleSIGTERM: false }),
153
+ puppeteer.launch({ ...options, pipe: true, signal, handleSIGINT: false, handleSIGTERM: false }),
106
154
  signal
107
155
  );
108
156
  const limit = options.timeout ?? LAUNCH_TIMEOUT_MS;
@@ -116,6 +164,8 @@ async function launchOwnedBrowser(puppeteer, options) {
116
164
  const child = browser.process();
117
165
  if (!child) throw new Error("A launched browser has no owned process.");
118
166
  browsers.add(browser);
167
+ const watchdog = watchChromeTree(child, launchedAt);
168
+ if (watchdog) watchdogs.set(browser, watchdog);
119
169
  child.once("exit", () => browsers.delete(browser));
120
170
  return browser;
121
171
  } finally {
@@ -166,9 +216,17 @@ async function rethrowAfterBrowserCleanup(browser, error) {
166
216
  throw error;
167
217
  }
168
218
  async function closeBrowser(browser) {
219
+ let clean = false;
220
+ try {
221
+ clean = await closedWithoutKill(browser);
222
+ } finally {
223
+ watchdogs.get(browser)?.release(clean);
224
+ }
225
+ }
226
+ async function closedWithoutKill(browser) {
169
227
  const child = browser.process();
170
228
  if (!child) throw new Error("A managed browser lost its owned process.");
171
- if (child.exitCode !== null || child.signalCode !== null) return;
229
+ if (child.exitCode !== null || child.signalCode !== null) return false;
172
230
  const exited = new Promise((resolve) => child.once("exit", () => resolve()));
173
231
  let timer;
174
232
  let poll;
@@ -180,7 +238,8 @@ async function closeBrowser(browser) {
180
238
  browser.close().catch((error) => console.warn("Browser close failed:", error)),
181
239
  grace
182
240
  ]);
183
- if (child.exitCode === null && child.signalCode === null) child.kill("SIGKILL");
241
+ const clean = child.exitCode !== null || child.signalCode !== null;
242
+ if (!clean) child.kill("SIGKILL");
184
243
  clearTimeout(timer);
185
244
  const exitLimit = new Promise((_, reject) => {
186
245
  timer = setTimeout(
@@ -194,145 +253,18 @@ async function closeBrowser(browser) {
194
253
  }, EXIT_POLL_MS);
195
254
  });
196
255
  await Promise.race([exited, goneBeforeExitEvent, exitLimit]);
256
+ return clean;
197
257
  } finally {
198
258
  clearTimeout(timer);
199
259
  clearInterval(poll);
200
260
  }
201
261
  }
202
262
 
203
- // src/capture/navigateForCapture.ts
204
- import { TimeoutError } from "puppeteer-core";
205
- var NETWORK_IDLE_ATTEMPT_MS = 3e4;
206
- function networkIdleAttemptTimeoutMs(totalTimeoutMs) {
207
- return Math.min(NETWORK_IDLE_ATTEMPT_MS, Math.max(0, totalTimeoutMs));
208
- }
209
- async function navigateForCapture(page, url, totalTimeoutMs) {
210
- const networkIdleTimeoutMs = networkIdleAttemptTimeoutMs(totalTimeoutMs);
211
- try {
212
- const response2 = await page.goto(url, {
213
- waitUntil: "networkidle2",
214
- timeout: networkIdleTimeoutMs
215
- });
216
- return {
217
- response: response2,
218
- waitUntil: "networkidle2",
219
- networkIdleTimeoutMs,
220
- fellBackFromNetworkIdle: false
221
- };
222
- } catch (err) {
223
- if (!isNavigationTimeoutError(err) || networkIdleTimeoutMs >= totalTimeoutMs) {
224
- throw err;
225
- }
226
- }
227
- const fallbackTimeoutMs = totalTimeoutMs - networkIdleTimeoutMs;
228
- const response = await page.goto(url, {
229
- waitUntil: "domcontentloaded",
230
- timeout: fallbackTimeoutMs
231
- });
232
- return {
233
- response,
234
- waitUntil: "domcontentloaded",
235
- networkIdleTimeoutMs,
236
- fellBackFromNetworkIdle: true
237
- };
238
- }
239
- var PUPPETEER_LAUNCH_DEFAULT_TIMEOUT_MS = 3e4;
240
- var PAGE_LOAD_BLOCKING_TYPES = /* @__PURE__ */ new Set(["Document", "Script", "Stylesheet"]);
241
- var NAMED_BLOCKING_REQUESTS = 3;
242
- var SENT_OR_ANSWERED_WITHOUT_NETWORK = [
243
- "Network.requestWillBeSentExtraInfo",
244
- "Network.responseReceived"
245
- ];
246
- async function gotoWhenSent(page, url, timeoutMs, coldChromeFirstRequestTimeoutMs = PUPPETEER_LAUNCH_DEFAULT_TIMEOUT_MS) {
247
- const cdp = await page.createCDPSession();
248
- try {
249
- await cdp.send("Network.enable");
250
- const sent = documentRequestSent(cdp);
251
- const unfinished = unfinishedPageLoadRequests(cdp);
252
- const navigation = page.goto(url, { waitUntil: "domcontentloaded", timeout: 0 });
253
- const navigationAwaitedBelow = navigation.catch(() => void 0);
254
- await withRemainingBudget(
255
- Promise.race([sent, navigationAwaitedBelow]),
256
- coldChromeFirstRequestTimeoutMs,
257
- "sending the page request",
258
- () => new TimeoutError(
259
- `Navigation timeout: Chrome did not send the page request within ${coldChromeFirstRequestTimeoutMs} ms`
260
- )
261
- );
262
- return await withRemainingBudget(
263
- navigation,
264
- timeoutMs,
265
- "loading the page",
266
- () => new TimeoutError(pageLoadTimeoutMessage(timeoutMs, url, unfinished()))
267
- );
268
- } finally {
269
- await cdp.detach().catch(() => void 0);
270
- }
271
- }
272
- function documentRequestSent(cdp) {
273
- const documents = /* @__PURE__ */ new Set();
274
- const sent = /* @__PURE__ */ new Set();
275
- return new Promise((resolve) => {
276
- const settle = (requestId) => {
277
- if (documents.has(requestId) && sent.has(requestId)) resolve();
278
- };
279
- cdp.on("Network.requestWillBeSent", ({ requestId, type }) => {
280
- if (type === "Document") documents.add(requestId);
281
- settle(requestId);
282
- });
283
- for (const event of SENT_OR_ANSWERED_WITHOUT_NETWORK) {
284
- cdp.on(event, ({ requestId }) => {
285
- sent.add(requestId);
286
- settle(requestId);
287
- });
288
- }
289
- });
290
- }
291
- function unfinishedPageLoadRequests(cdp) {
292
- const unfinished = /* @__PURE__ */ new Map();
293
- cdp.on("Network.requestWillBeSent", ({ requestId, request, type }) => {
294
- if (type && PAGE_LOAD_BLOCKING_TYPES.has(type)) unfinished.set(requestId, request.url);
295
- });
296
- for (const event of ["Network.loadingFinished", "Network.loadingFailed"]) {
297
- cdp.on(event, ({ requestId }) => unfinished.delete(requestId));
298
- }
299
- return () => [...unfinished.values()];
300
- }
301
- function urlWithoutSecrets(raw) {
302
- try {
303
- const url = new URL(raw);
304
- if (url.protocol !== "http:" && url.protocol !== "https:") return `${url.protocol}\u2026`;
305
- return `${url.origin}${url.pathname}${url.search ? "?\u2026" : ""}`;
306
- } catch {
307
- return "(unreadable URL)";
308
- }
309
- }
310
- function originOf(raw) {
311
- try {
312
- return new URL(raw).origin;
313
- } catch {
314
- return null;
315
- }
316
- }
317
- function pageLoadTimeoutMessage(timeoutMs, pageUrl, waitingOn) {
318
- const exceeded = `Navigation timeout of ${timeoutMs} ms exceeded`;
319
- if (waitingOn.length === 0) return exceeded;
320
- const named = waitingOn.slice(0, NAMED_BLOCKING_REQUESTS).map(urlWithoutSecrets).join(", ");
321
- const unnamed = waitingOn.length - NAMED_BLOCKING_REQUESTS;
322
- const more = unnamed > 0 ? ` and ${unnamed} more` : "";
323
- const pageOrigin = new URL(pageUrl).origin;
324
- const fromAnotherServer = waitingOn.some((request) => originOf(request) !== pageOrigin);
325
- const advice = fromAnotherServer ? " A <script> or stylesheet from another server holds the page until it arrives; serve it from the project instead." : "";
326
- return `${exceeded} while the page was still loading ${named}${more}.${advice}`;
327
- }
328
-
329
263
  export {
330
264
  BrowserCleanupError,
331
265
  resolveManagedGpuMode,
332
266
  launchManagedBrowser,
333
267
  registerBrowserSessionCleanup,
334
268
  closeManagedBrowser,
335
- rethrowAfterBrowserCleanup,
336
- navigateForCapture,
337
- gotoWhenSent
269
+ rethrowAfterBrowserCleanup
338
270
  };
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  sherpaParakeetInstalled,
9
9
  sherpaUnsupportedReason
10
- } from "./chunk-WUUCEFL5.js";
10
+ } from "./chunk-IC2WYONA.js";
11
11
  import {
12
12
  findParakeet
13
13
  } from "./chunk-JZIEZCQM.js";
@@ -9,7 +9,7 @@ import {
9
9
  buildAuthHeaders,
10
10
  refreshTokens,
11
11
  resolveCredential
12
- } from "./chunk-NAMGMP3R.js";
12
+ } from "./chunk-7KVVNF7B.js";
13
13
 
14
14
  // src/cloud/auth.ts
15
15
  async function resolveCloudAuthHeaders() {
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  CliUsageError
9
- } from "./chunk-PBN6GBJE.js";
9
+ } from "./chunk-JVBRJMOP.js";
10
10
  import {
11
11
  c
12
12
  } from "./chunk-ZTZA4UWZ.js";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  downloadToFile
9
- } from "./chunk-NZZYJOMJ.js";
9
+ } from "./chunk-CZUAX3BV.js";
10
10
  import {
11
11
  CACHE_DIR,
12
12
  PINNED_PACKAGES,
@@ -16,18 +16,18 @@ import {
16
16
  pinnedPackageBesideCli,
17
17
  runNpm,
18
18
  sweepStaleStaging
19
- } from "./chunk-3DKN5WKL.js";
19
+ } from "./chunk-QH3T4WI2.js";
20
20
  import {
21
21
  emitWords,
22
22
  getPreparedWavDurationSeconds,
23
23
  prepareWav
24
- } from "./chunk-3XDOGSRD.js";
24
+ } from "./chunk-U5YVWG5W.js";
25
25
  import {
26
26
  stoppedByCancelSignal
27
- } from "./chunk-Y5GY6Y7A.js";
27
+ } from "./chunk-QX4GGPMY.js";
28
28
  import {
29
29
  verifies
30
- } from "./chunk-YMS6CJCD.js";
30
+ } from "./chunk-SAQYJLI6.js";
31
31
  import {
32
32
  PARAKEET_MODEL_LABEL,
33
33
  SHERPA_ERROR_PREFIX,
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-K2FLNJVB.js";
10
10
  import {
11
11
  failCommand
12
- } from "./chunk-PBN6GBJE.js";
12
+ } from "./chunk-JVBRJMOP.js";
13
13
  import {
14
14
  cssVariableName,
15
15
  slugify
@@ -1278,7 +1278,7 @@ async function withFigmaErrors(command, fn) {
1278
1278
  } catch (err) {
1279
1279
  if (err instanceof Error) {
1280
1280
  try {
1281
- const { trackCommandFailure } = await import("./events-AIZODZMP.js");
1281
+ const { trackCommandFailure } = await import("./events-BLJGWMNP.js");
1282
1282
  trackCommandFailure(
1283
1283
  command,
1284
1284
  err,
@@ -10,7 +10,7 @@ import {
10
10
  hasPreservedUnknownData,
11
11
  readStore,
12
12
  writeStore
13
- } from "./chunk-NAMGMP3R.js";
13
+ } from "./chunk-7KVVNF7B.js";
14
14
 
15
15
  // src/auth/user.ts
16
16
  function isUserInfoEmpty(u) {
@@ -80,6 +80,10 @@ function registerRootExitCodeSanitizer(sanitizer) {
80
80
  function sanitizeSuccessfulExitCode() {
81
81
  rootExitCodeSanitizer?.();
82
82
  }
83
+ async function outputWritten() {
84
+ const written = (stream) => new Promise((resolve) => stream.write("", () => resolve()));
85
+ await Promise.all([written(process.stdout), written(process.stderr)]);
86
+ }
83
87
  function requestCliExit(exitCode = 0) {
84
88
  if (!rootExitRequester) {
85
89
  setCommandResult({
@@ -91,6 +95,13 @@ function requestCliExit(exitCode = 0) {
91
95
  }
92
96
  rootExitRequester(exitCode);
93
97
  }
98
+ function isUnrefableTimer(timer) {
99
+ return typeof timer === "object" && timer !== null && "unref" in timer && typeof timer.unref === "function";
100
+ }
101
+ function scheduleCliExit(exitCode = 0) {
102
+ const timer = setTimeout(() => requestCliExit(exitCode), 100);
103
+ if (isUnrefableTimer(timer)) timer.unref();
104
+ }
94
105
 
95
106
  export {
96
107
  CliUsageError,
@@ -104,5 +115,7 @@ export {
104
115
  registerRootExitRequester,
105
116
  registerRootExitCodeSanitizer,
106
117
  sanitizeSuccessfulExitCode,
107
- requestCliExit
118
+ outputWritten,
119
+ requestCliExit,
120
+ scheduleCliExit
108
121
  };
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-HVW7ABXD.js";
13
13
  import {
14
14
  DEFAULT_REGISTRY_URL
15
- } from "./chunk-TO6JNTML.js";
15
+ } from "./chunk-BP4VNTZL.js";
16
16
 
17
17
  // src/utils/projectConfig.ts
18
18
  import { readFileSync, writeFileSync } from "fs";
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  artifactDirectory,
9
9
  finishSnapshotRun
10
- } from "./chunk-ICMXC3MI.js";
10
+ } from "./chunk-U6RXZNZE.js";
11
11
 
12
12
  // src/utils/checkSnapshotDirectory.ts
13
13
  import { resolve } from "path";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  shouldTrack
9
- } from "./chunk-K26FR4SM.js";
9
+ } from "./chunk-DEORFAWP.js";
10
10
 
11
11
  // src/telemetry/renderObservability.ts
12
12
  function renderObservabilityTelemetryPayload(observability) {
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  VERSION
9
- } from "./chunk-XEWHUPFS.js";
9
+ } from "./chunk-RZXUQR42.js";
10
10
 
11
11
  // src/registry/compatibility.ts
12
12
  import { compareVersions } from "compare-versions";
@@ -4,13 +4,6 @@ import { dirname as __hf_dirname } from "node:path";
4
4
  var require = __hf_createRequire(import.meta.url);
5
5
  var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
- import {
8
- getFreeDiskMb
9
- } from "./chunk-T6AGUTZJ.js";
10
- import {
11
- ensureBrowser,
12
- findBrowser
13
- } from "./chunk-E24HSMZV.js";
14
7
  import {
15
8
  FIRST_LAUNCH_TIMEOUT_MS,
16
9
  chromeDepsInstallCommand,
@@ -18,10 +11,17 @@ import {
18
11
  distroLabel,
19
12
  getFFmpegInstallHint,
20
13
  parseLddMissingLibs
21
- } from "./chunk-3PULCIY5.js";
14
+ } from "./chunk-OH56PXFH.js";
15
+ import {
16
+ ensureBrowser,
17
+ findBrowser
18
+ } from "./chunk-CYBXXSC4.js";
22
19
  import {
23
20
  runCancellableProcess
24
- } from "./chunk-D3ZWBHZP.js";
21
+ } from "./chunk-DYAPHNV6.js";
22
+ import {
23
+ getFreeDiskMb
24
+ } from "./chunk-T6AGUTZJ.js";
25
25
  import {
26
26
  FFMPEG_PATH_ENV,
27
27
  FFPROBE_PATH_ENV,
@@ -830,6 +830,72 @@ function validateColorGradingContract(value) {
830
830
  return issues;
831
831
  }
832
832
 
833
+ // ../parsers/dist/mediaTiming.js
834
+ var COMPOSITION_ATTRIBUTES2 = Object.freeze({
835
+ start: "data-start",
836
+ duration: "data-duration",
837
+ trackIndex: "data-track-index",
838
+ derivedEnd: "data-end",
839
+ legacyTrack: "data-layer"
840
+ });
841
+ var CANONICAL_AUTHORED_TIMING_ATTRIBUTES2 = Object.freeze([
842
+ COMPOSITION_ATTRIBUTES2.start,
843
+ COMPOSITION_ATTRIBUTES2.duration,
844
+ COMPOSITION_ATTRIBUTES2.trackIndex
845
+ ]);
846
+ var DERIVED_TIMING_ATTRIBUTES2 = Object.freeze([
847
+ COMPOSITION_ATTRIBUTES2.derivedEnd
848
+ ]);
849
+ var LEGACY_TIMING_ATTRIBUTES2 = Object.freeze([
850
+ COMPOSITION_ATTRIBUTES2.derivedEnd,
851
+ COMPOSITION_ATTRIBUTES2.legacyTrack
852
+ ]);
853
+ function parseNumeric2(value) {
854
+ if (value == null || value.trim() === "") return null;
855
+ const parsed = Number(value);
856
+ return Number.isFinite(parsed) ? parsed : null;
857
+ }
858
+ var nonNegative = (raw) => {
859
+ const value = parseNumeric2(raw);
860
+ return value !== null && value >= 0 ? value : null;
861
+ };
862
+ function readMediaOffsetSeconds(getAttr) {
863
+ return nonNegative(getAttr("data-playback-start")) ?? nonNegative(getAttr("data-media-start")) ?? 0;
864
+ }
865
+ var MEDIA_START_BASIS_ATTR = "data-hf-media-start-basis";
866
+ function readMediaStartBasis(value) {
867
+ return value?.trim().toLowerCase() === "global" ? "global" : "local";
868
+ }
869
+ function resolveAbsoluteMediaStartSeconds(input) {
870
+ return readMediaStartBasis(input.basis) === "global" ? input.authoredStart : input.hostStart + input.authoredStart;
871
+ }
872
+ function resolveMediaStartSeconds(input) {
873
+ if (!hasLiteralNestedStart(input)) return input.ordinaryStart();
874
+ return resolveAbsoluteMediaStartSeconds({
875
+ authoredStart: input.authoredStart,
876
+ hostStart: input.hostStart,
877
+ basis: input.basis
878
+ });
879
+ }
880
+ function isRootGlobalMediaStart(input) {
881
+ return hasLiteralNestedStart(input) && readMediaStartBasis(input.basis) === "global";
882
+ }
883
+ function hasLiteralNestedStart(input) {
884
+ return !input.hasAutoStart && input.authoredStart != null && input.hostStart !== 0;
885
+ }
886
+ function hostInPointSeconds(host) {
887
+ return readMediaOffsetSeconds((name) => host.getAttribute(name));
888
+ }
889
+ function compositionOriginSeconds(hostStart, host) {
890
+ return hostStart - hostInPointSeconds(host);
891
+ }
892
+ function cutToHostSlots(span, hosts) {
893
+ return hosts.reduce((kept, host) => {
894
+ const start = Math.max(kept.start, host.start);
895
+ return { start, end: Math.max(start, Math.min(kept.end, host.end)) };
896
+ }, span);
897
+ }
898
+
833
899
  // ../parsers/dist/timeSpans.js
834
900
  var instantTolerance = (time) => 4 * Number.EPSILON * Math.max(1, Math.abs(time));
835
901
  function sameInstant(a, b) {
@@ -875,6 +941,14 @@ export {
875
941
  COLOR_GRADING_LUT_KEYS,
876
942
  isColorGradingVariableRef,
877
943
  validateColorGradingContract,
944
+ MEDIA_START_BASIS_ATTR,
945
+ readMediaStartBasis,
946
+ resolveAbsoluteMediaStartSeconds,
947
+ resolveMediaStartSeconds,
948
+ isRootGlobalMediaStart,
949
+ hostInPointSeconds,
950
+ compositionOriginSeconds,
951
+ cutToHostSlots,
878
952
  sameInstant,
879
953
  spansOverlap,
880
954
  spansShareTime,