hyperframes 0.8.181 → 0.8.184

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 (218) hide show
  1. package/bin/hyperframes.mjs +3 -1
  2. package/dist/{add-AWQ2EGBU.js → add-5ZTD3MUZ.js} +22 -22
  3. package/dist/{animatedGifPrep-SENXJ7TN.js → animatedGifPrep-AGASIWVA.js} +14 -13
  4. package/dist/api.js +29 -28
  5. package/dist/{asset-XBH3MN3Y.js → asset-LSTEMPIB.js} +3 -3
  6. package/dist/{assetCataloger-KH4X2CRO.js → assetCataloger-BKBMNL3A.js} +16 -13
  7. package/dist/{audio-Q7I473UN.js → audio-KGK44XE4.js} +31 -30
  8. package/dist/{auth-I7CBTEUS.js → auth-MJWKYK77.js} +4 -4
  9. package/dist/{autoUpdate-KY5TLSN7.js → autoUpdate-2GGDKYR2.js} +2 -2
  10. package/dist/{backgroundChecks-4Q3VVK5W.js → backgroundChecks-7GRX5VQY.js} +3 -3
  11. package/dist/backgroundChecksWorker.js +3 -3
  12. package/dist/{batchRender-3AYDQRBI.js → batchRender-BCV2LELR.js} +7 -7
  13. package/dist/{beats-P4LENNVT.js → beats-7BCFRBAL.js} +12 -12
  14. package/dist/{benchmark-AXOAECN3.js → benchmark-2R6CN5MQ.js} +24 -24
  15. package/dist/{browser-XZKB5HGJ.js → browser-6AFGOI7G.js} +20 -20
  16. package/dist/{bundleWithLocalizedFonts-2WCR57IN.js → bundleWithLocalizedFonts-2EGPA5ZO.js} +2 -2
  17. package/dist/{capture-NWARHRHR.js → capture-HA2UHLIU.js} +8 -5
  18. package/dist/{capture-4RN4APDF.js → capture-HOIAW6MO.js} +50 -41
  19. package/dist/{captureCompositionFrame-QOF5BRF4.js → captureCompositionFrame-4236FVWJ.js} +22 -20
  20. package/dist/{captureTimeout-K2JNVVCI.js → captureTimeout-RIMG6IYH.js} +1 -1
  21. package/dist/{catalog-CRPOPVD5.js → catalog-A6CZAWW4.js} +42 -42
  22. package/dist/{catch-up-MHWGUQ42.js → catch-up-TNA4DJOA.js} +15 -15
  23. package/dist/check-5E5U2EQZ.js +117 -0
  24. package/dist/checkBrowser-FNINXBMZ.js +118 -0
  25. package/dist/{chunk-OJTDUF4W.js → chunk-2PVE4WS2.js} +1 -1
  26. package/dist/{checkBrowser-VES2NF3K.js → chunk-2ULXZ4PG.js} +187 -114
  27. package/dist/{chunk-WITHUCCB.js → chunk-2XA7KXQO.js} +2 -2
  28. package/dist/{chunk-HODBPO4A.js → chunk-3MDJIWOV.js} +626 -328
  29. package/dist/{chunk-JBCU6NR5.js → chunk-3QVMJ7GX.js} +56 -55
  30. package/dist/{chunk-OR5WCFWZ.js → chunk-3TXNNBI2.js} +2 -2
  31. package/dist/{chunk-IZM562YJ.js → chunk-4KKKBEP3.js} +4 -4
  32. package/dist/{chunk-XEWHUPFS.js → chunk-4N4P3ZWL.js} +2 -2
  33. package/dist/{chunk-537IYAEE.js → chunk-4UMPIPCQ.js} +9 -1
  34. package/dist/{chunk-J4L5TPLS.js → chunk-5UDRPPN2.js} +48 -6
  35. package/dist/{chunk-L3YOGIPG.js → chunk-66LREXGS.js} +1 -1
  36. package/dist/{chunk-6I7V6Q7F.js → chunk-74JMKLVU.js} +103 -20
  37. package/dist/{chunk-3PULCIY5.js → chunk-7HJALUIO.js} +5 -5
  38. package/dist/{chunk-GZVP4TWN.js → chunk-7JAD4MEW.js} +1 -1
  39. package/dist/{chunk-NAMGMP3R.js → chunk-7KVVNF7B.js} +1 -1
  40. package/dist/{chunk-TO6JNTML.js → chunk-7MB2ZAQF.js} +13 -8
  41. package/dist/{chunk-55IG255C.js → chunk-7NRI7HYX.js} +1 -1
  42. package/dist/{chunk-VAJIPSN6.js → chunk-ABZYYUUH.js} +1 -1
  43. package/dist/{chunk-GK2FIKIQ.js → chunk-ADDHW2FS.js} +214 -37
  44. package/dist/{chunk-ZUOSILUE.js → chunk-BCHSTE7U.js} +1 -1
  45. package/dist/{chunk-AOWDVB2T.js → chunk-CXABAXB3.js} +1 -1
  46. package/dist/{chunk-E24HSMZV.js → chunk-CYBXXSC4.js} +65 -14
  47. package/dist/{chunk-NZZYJOMJ.js → chunk-CZUAX3BV.js} +6 -5
  48. package/dist/{chunk-GV5R5B7Q.js → chunk-DGECWPTL.js} +1 -1
  49. package/dist/{chunk-BRHI7EIA.js → chunk-DKPNNYBZ.js} +4 -0
  50. package/dist/{chunk-UIDZRCBG.js → chunk-DWUGKEHR.js} +1 -1
  51. package/dist/{chunk-D3ZWBHZP.js → chunk-DYAPHNV6.js} +3 -2
  52. package/dist/{chunk-T7UHTUUE.js → chunk-E32ZQ2WO.js} +9 -9
  53. package/dist/{chunk-RGHQID2E.js → chunk-EHSBBBR2.js} +5 -3
  54. package/dist/{chunk-DJJ7SK4F.js → chunk-EM7C7H7S.js} +8 -8
  55. package/dist/{chunk-XSRUVMXK.js → chunk-ES426XRJ.js} +4 -4
  56. package/dist/chunk-FG4BBFZI.js +122 -0
  57. package/dist/{chunk-JMFJI26U.js → chunk-FGJEUV4S.js} +2 -2
  58. package/dist/{check-DJCUOUDI.js → chunk-GDEV42FA.js} +198 -142
  59. package/dist/{chunk-RXQHSGAQ.js → chunk-HR23IKLZ.js} +2 -2
  60. package/dist/{chunk-KMAAOHLO.js → chunk-HRPWRZGF.js} +1 -1
  61. package/dist/{chunk-UPFUC4DB.js → chunk-HTIUNMTP.js} +1 -1
  62. package/dist/{chunk-V2UNZ7QP.js → chunk-ICJEAFPD.js} +25 -14
  63. package/dist/{chunk-EOADENKV.js → chunk-IWTNTUPQ.js} +16 -14
  64. package/dist/chunk-IZCW2NKT.js +29 -0
  65. package/dist/{chunk-XFCLWWL3.js → chunk-J36JVBLR.js} +11 -4
  66. package/dist/{chunk-LBQFLUIY.js → chunk-J3QM7AHP.js} +9 -49
  67. package/dist/{chunk-DUN63LHY.js → chunk-JB6ARMQS.js} +2 -2
  68. package/dist/{chunk-5E5EYPZO.js → chunk-JIUTXKWA.js} +7 -7
  69. package/dist/{chunk-YJDB4FLT.js → chunk-JQYJXUJW.js} +1 -1
  70. package/dist/{chunk-PBN6GBJE.js → chunk-JVBRJMOP.js} +14 -1
  71. package/dist/{chunk-RHWJKSGH.js → chunk-KANNRHY7.js} +1 -1
  72. package/dist/{chunk-IL3GTCQY.js → chunk-KN46TGHV.js} +72 -140
  73. package/dist/{chunk-OFY6JTZC.js → chunk-LLC4CS6I.js} +2 -2
  74. package/dist/{chunk-OJDXABUF.js → chunk-LRGYPXHF.js} +2 -2
  75. package/dist/{chunk-GNE57O7U.js → chunk-MFAETWIF.js} +1 -1
  76. package/dist/{chunk-32GKETR7.js → chunk-MMQ52NIZ.js} +74 -0
  77. package/dist/chunk-MOEGCMKI.js +180 -0
  78. package/dist/{chunk-E6RPWJVC.js → chunk-NAUKCKCJ.js} +5 -1
  79. package/dist/{chunk-B4VT6YU2.js → chunk-OLZENUPI.js} +50 -7
  80. package/dist/{chunk-H4YZZ2VQ.js → chunk-PFD25NAC.js} +1 -1
  81. package/dist/{chunk-XH262OWN.js → chunk-PFYWVUHA.js} +1 -1
  82. package/dist/{chunk-S3RYRF3W.js → chunk-PSKEKWVU.js} +1 -1
  83. package/dist/{chunk-N5SXQCJL.js → chunk-Q33P4EAC.js} +3 -3
  84. package/dist/{chunk-3DKN5WKL.js → chunk-QH3T4WI2.js} +77 -6
  85. package/dist/{chunk-O5AE7HOP.js → chunk-QL2PNIXC.js} +37 -33
  86. package/dist/{chunk-WUUCEFL5.js → chunk-R2BFTECP.js} +5 -5
  87. package/dist/chunk-R2SQBPMH.js +3805 -0
  88. package/dist/{chunk-YPBIAONI.js → chunk-RGXVEYHI.js} +230 -162
  89. package/dist/{chunk-YMS6CJCD.js → chunk-SAX7HQ5E.js} +1 -1
  90. package/dist/{chunk-KIO3R4QN.js → chunk-SN7KI5JA.js} +27 -14
  91. package/dist/{chunk-4USWWI2Y.js → chunk-TE427YID.js} +2 -2
  92. package/dist/{chunk-ICMXC3MI.js → chunk-U6RXZNZE.js} +31 -18
  93. package/dist/{chunk-X7CCSMRR.js → chunk-UJKUB2LH.js} +16 -16
  94. package/dist/{chunk-K26FR4SM.js → chunk-UKOTVJFV.js} +12 -12
  95. package/dist/{chunk-4OT3FWVV.js → chunk-UNNXFKVG.js} +2 -2
  96. package/dist/{chunk-PF7OWVTL.js → chunk-VDM3FEDP.js} +2 -2
  97. package/dist/{chunk-Y5GY6Y7A.js → chunk-VNVQGDPC.js} +2 -2
  98. package/dist/{chunk-22QHO26F.js → chunk-W64L7IFS.js} +1 -1
  99. package/dist/{chunk-Y2RXRPL2.js → chunk-WHPN2TIT.js} +5 -5
  100. package/dist/{chunk-65WIUIHL.js → chunk-WTFUDNW2.js} +7 -15
  101. package/dist/{chunk-3XDOGSRD.js → chunk-X3CG5YQA.js} +3 -3
  102. package/dist/{chunk-UZOZ2W2E.js → chunk-XGHHVYC7.js} +96 -34
  103. package/dist/{chunk-4IEH6EAC.js → chunk-YALM6XN4.js} +203 -58
  104. package/dist/{chunk-B6JLCPT3.js → chunk-YOZPQCSR.js} +6 -6
  105. package/dist/{chunk-5JMZLQT6.js → chunk-YWHCXIMD.js} +16 -16
  106. package/dist/{chunk-UVEQLDKB.js → chunk-YWNJTZGN.js} +3 -2
  107. package/dist/{chunk-WUQUR33W.js → chunk-ZOCHDXDG.js} +1 -1
  108. package/dist/{chunk-IWTRHPTP.js → chunk-ZRHO6YMM.js} +8 -8
  109. package/dist/{clean-GJNDVVDI.js → clean-HGASSMWI.js} +41 -40
  110. package/dist/cli.js +68 -64
  111. package/dist/{cloud-JCWNMKXC.js → cloud-JPDVNXHN.js} +4 -4
  112. package/dist/{cloudrun-2BKGY53X.js → cloudrun-AMMGSDRP.js} +8 -8
  113. package/dist/commands/layout-audit.browser.js +15 -4
  114. package/dist/commands/motion-signature.browser.js +52 -0
  115. package/dist/{compare-XWM7FAYM.js → compare-LHHVHUN3.js} +51 -47
  116. package/dist/{compiler-U3W6CJW7.js → compiler-Q3N6QXMT.js} +6 -6
  117. package/dist/{component-CBRAE325.js → component-D72J32Q7.js} +4 -4
  118. package/dist/{compositions-EZYJEHQ3.js → compositions-UQRJ5ROG.js} +29 -29
  119. package/dist/{contactSheet-27SRU7A4.js → contactSheet-CAGMKI3E.js} +3 -1
  120. package/dist/{delete-JWWMOITI.js → delete-P42VIDDA.js} +9 -9
  121. package/dist/{deploy-UGOV76OH.js → deploy-WZTH57O4.js} +11 -11
  122. package/dist/{destroy-QBLMYDBF.js → destroy-4B5HW5FH.js} +5 -5
  123. package/dist/{deterministicFonts-L7YEEFGI.js → deterministicFonts-VQ5UBMXY.js} +2 -2
  124. package/dist/{dist-VO7OXOFK.js → dist-DYS24AMA.js} +5 -5
  125. package/dist/{dist-2FMTAVGL.js → dist-SENYPQGW.js} +4 -4
  126. package/dist/{docs-MPOM3PHH.js → docs-UEWLIP6D.js} +1 -1
  127. package/dist/{doctor-XSKSZRR7.js → doctor-KEJIG2SK.js} +28 -27
  128. package/dist/{events-RGS4MAH4.js → events-CYKSNR7N.js} +6 -6
  129. package/dist/{events-AIZODZMP.js → events-UZXFQPMT.js} +9 -9
  130. package/dist/{feedback-GE3VDZOH.js → feedback-LXNQF7CA.js} +35 -35
  131. package/dist/{ffmpeg-SCXZTR6X.js → ffmpeg-BYHON577.js} +16 -15
  132. package/dist/{figma-3R4XST4Y.js → figma-EIQ35PS6.js} +3 -3
  133. package/dist/fontLocalizeCli.js +24 -23
  134. package/dist/{get-4FKJP6IM.js → get-CC2YL7QO.js} +9 -9
  135. package/dist/{gpuPolicy-4NNXESM7.js → gpuPolicy-VFSACUQV.js} +14 -13
  136. package/dist/{grade-compare-FAYVPXUR.js → grade-compare-TUQL7IV2.js} +56 -50
  137. package/dist/{help-C3UQMYXK.js → help-ROROO5K6.js} +1 -1
  138. package/dist/{history-LDGQ2IZJ.js → history-PNELYLXX.js} +15 -15
  139. package/dist/hyperframe.manifest.json +1 -1
  140. package/dist/hyperframe.runtime.iife.js +59 -59
  141. package/dist/hyperframes-player.global.js +8 -3
  142. package/dist/{info-KMXFLD3Q.js → info-4FZTH6AS.js} +20 -20
  143. package/dist/{init-D7GYHSX5.js → init-I43GHHVP.js} +69 -68
  144. package/dist/{inspect-CUKWHCGS.js → inspect-IT4TYIZ3.js} +46 -44
  145. package/dist/{installer-EPRSH6QI.js → installer-CWOJVK5K.js} +7 -7
  146. package/dist/{keyframes-XCUPHBW3.js → keyframes-3FBOGVD4.js} +16 -16
  147. package/dist/{lambda-IMORFJHN.js → lambda-H3V32I7M.js} +15 -15
  148. package/dist/{layout-JD2IOBMS.js → layout-BZ5LYJ5C.js} +46 -44
  149. package/dist/{lint-FHLER36Y.js → lint-ZTNSGP2S.js} +23 -23
  150. package/dist/{lintProject-ARKJXDQF.js → lintProject-C2ONSH2U.js} +4 -4
  151. package/dist/{list-MGCFG5MA.js → list-XM4GWJYY.js} +10 -10
  152. package/dist/{login-QX6M4UTR.js → login-H6HYKMWX.js} +7 -7
  153. package/dist/{logout-DKJANASY.js → logout-DDC4QLVK.js} +3 -3
  154. package/dist/{manager-IETAVBZS.js → manager-TWVDSJXO.js} +17 -16
  155. package/dist/{manager-V2QCCPOJ.js → manager-UHWEKPXC.js} +8 -3
  156. package/dist/{media-treatment-MDAQRITV.js → media-treatment-N7MY5NXB.js} +34 -33
  157. package/dist/{media-use-4XXGABIL.js → media-use-JBN57JE3.js} +1 -1
  158. package/dist/{models-NZAOSI5A.js → models-WEMIMYBD.js} +25 -24
  159. package/dist/{motionShot-6ZDUM2K4.js → motionShot-RHICTVPU.js} +29 -26
  160. package/dist/{normalize-audio-7PRYX6QM.js → normalize-audio-ZFUZCJE3.js} +12 -12
  161. package/dist/{open-I254NY5J.js → open-IBJ4FL3G.js} +24 -24
  162. package/dist/{parakeetRunner-TL3TOGUS.js → parakeetRunner-XXO4WSLR.js} +26 -25
  163. package/dist/{pipeline-YPERVOQM.js → pipeline-6ML3LUVK.js} +19 -18
  164. package/dist/{play-MYI7BYKS.js → play-RV4NAVF5.js} +40 -38
  165. package/dist/{policies-5NTZOHJA.js → policies-XXNGXWHV.js} +1 -1
  166. package/dist/{preflight-HRCSZ52D.js → preflight-R3DEFMLA.js} +19 -18
  167. package/dist/{present-WYXQDV4Q.js → present-5TBJGE6B.js} +34 -33
  168. package/dist/{preview-535HTWQO.js → preview-FLKZ5CXJ.js} +56 -55
  169. package/dist/{producer-C76CRJ5O.js → producer-7XYSPVKH.js} +1 -1
  170. package/dist/{progress-I37JB7R4.js → progress-NHJIHAAG.js} +2 -2
  171. package/dist/{projectConfig-5QCNTGQT.js → projectConfig-TBU2VWZX.js} +9 -9
  172. package/dist/{publication-2QT7VVE2.js → publication-CWWUJYJ5.js} +5 -5
  173. package/dist/{publish-53EBL7OO.js → publish-FSNE4FEB.js} +28 -27
  174. package/dist/{refresh-MGCVWX56.js → refresh-RXTOPRBB.js} +3 -3
  175. package/dist/{remove-background-OBYHMPD4.js → remove-background-MDFWRWCT.js} +32 -31
  176. package/dist/render-DBGQZAZT.js +1516 -0
  177. package/dist/{render-3MELF6Y3.js → render-F4JQ553X.js} +102 -96
  178. package/dist/{render-75CRB3BW.js → render-LWZKXCLY.js} +8 -8
  179. package/dist/{render-batch-CEVWUYBP.js → render-batch-PU7NMLIJ.js} +8 -8
  180. package/dist/renderSetupWorker.js +12 -9
  181. package/dist/{resolver-4ICE2AT6.js → resolver-RUBGFXPC.js} +7 -7
  182. package/dist/{screenshotCapture-HXEZ3TNJ.js → screenshotCapture-UBY6TT75.js} +33 -6
  183. package/dist/{sherpa-L4UACXT3.js → sherpa-X2TBNO6P.js} +25 -24
  184. package/dist/{sites-3ZBYB5X4.js → sites-MAVH57MO.js} +2 -2
  185. package/dist/skills/hyperframes/references/review-loop.md +1 -1
  186. package/dist/{skills-DXTQPCAO.js → skills-WHKMWO2D.js} +17 -17
  187. package/dist/{skillsUpdateCheck-ULXRGLDU.js → skillsUpdateCheck-XQGZGJJG.js} +3 -3
  188. package/dist/{snapshot-PWFHQU5E.js → snapshot-M4NUUSNU.js} +73 -71
  189. package/dist/{src-RDSWHMJS.js → src-4UYM2K3S.js} +34 -26
  190. package/dist/{src-S7NVL5VF.js → src-6MSC62U2.js} +23 -19
  191. package/dist/{state-KAXGHF77.js → state-ORRPOLMQ.js} +2 -2
  192. package/dist/{staticProjectServer-GYPUQGI7.js → staticProjectServer-ERDTFP45.js} +21 -20
  193. package/dist/{status-BV7QAUQD.js → status-CM7IQTU2.js} +6 -6
  194. package/dist/studio/assets/{hyperframes-player-DcD3NXpX.js → hyperframes-player-DEncBxR7.js} +7 -2
  195. package/dist/studio/assets/{index-CFrZAwKo.js → index-BABXr78Q.js} +4 -4
  196. package/dist/studio/assets/{index-BIDKYk0h.js → index-Cc22mgvY.js} +1 -1
  197. package/dist/studio/index.html +1 -1
  198. package/dist/{studio-api-IXGX5ZFI.js → studio-api-SAKD3VKC.js} +18 -17
  199. package/dist/{studioServer-LA5Z7RSS.js → studioServer-IRI7EVOM.js} +91 -84
  200. package/dist/{telemetry-STEMAMAX.js → telemetry-F4XADVAF.js} +10 -10
  201. package/dist/{telemetry-CQYHCCPL.js → telemetry-QG5AANZ4.js} +1 -1
  202. package/dist/{timeline-KLD24EN6.js → timeline-5I444RRE.js} +42 -41
  203. package/dist/{tokens-ICLORAA4.js → tokens-LRRYM35A.js} +3 -3
  204. package/dist/{transcribe-A6IKK7VS.js → transcribe-44XDFNVU.js} +48 -47
  205. package/dist/{transcribe-CTHZLRXF.js → transcribe-WHYHWAB2.js} +20 -19
  206. package/dist/{tts-EDK3QS7M.js → tts-A2WILYGN.js} +6 -6
  207. package/dist/{updateCheck-FHCAAAXA.js → updateCheck-7CPH3CAZ.js} +2 -2
  208. package/dist/{upgrade-7EV4F2R7.js → upgrade-WW4GQ2RI.js} +3 -3
  209. package/dist/{urlDownloader-MIMGVASJ.js → urlDownloader-OHLLP45A.js} +13 -12
  210. package/dist/{validate-LZF46W3V.js → validate-VNCDH2LW.js} +40 -38
  211. package/dist/{video-ZC47NFOL.js → video-5OHTLL2D.js} +17 -14
  212. package/dist/warmCheck.js +228 -0
  213. package/dist/warmCheckClient.js +139 -0
  214. package/package.json +4 -2
  215. package/dist/chunk-BAZ5LCR3.js +0 -3805
  216. package/dist/hyperframe-runtime.js +0 -1125
  217. package/dist/render-5BXTEEG7.js +0 -719
  218. package/dist/{synthesize-I2C24XJ5.js → synthesize-PKTB5ATG.js} +1 -1
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-GMECXFAN.js";
28
28
  import {
29
29
  ITEM_TYPE_DIRS
30
- } from "./chunk-LBQFLUIY.js";
30
+ } from "./chunk-J3QM7AHP.js";
31
31
  import {
32
32
  realProjectRoot
33
33
  } from "./chunk-OFQWTKPW.js";
@@ -2428,8 +2428,8 @@ var require_json_schema_2020_12 = __commonJS({
2428
2428
  with$data(this, validation)
2429
2429
  ].forEach((sch) => this.addMetaSchema(sch, void 0, false));
2430
2430
  return this;
2431
- function with$data(ajv2, sch) {
2432
- return $data ? ajv2.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;
2431
+ function with$data(ajv, sch) {
2432
+ return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;
2433
2433
  }
2434
2434
  }
2435
2435
  exports.default = addMetaSchema2020;
@@ -2734,17 +2734,22 @@ var registry_item_default = {
2734
2734
  };
2735
2735
 
2736
2736
  // src/registry/validation.ts
2737
- var ajv = new import__.Ajv2020({ strict: false, validateFormats: false });
2738
- var manifestShape = ajv.compile(registry_default);
2739
- var itemShape = ajv.compile(registry_item_default);
2737
+ function compileShapes() {
2738
+ const ajv = new import__.Ajv2020({ strict: false, validateFormats: false });
2739
+ return {
2740
+ manifest: ajv.compile(registry_default),
2741
+ item: ajv.compile(registry_item_default)
2742
+ };
2743
+ }
2744
+ var shapesCompiledOnFirstUse;
2740
2745
  function validRegistryName(name) {
2741
2746
  return name.length <= 128 && /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(name);
2742
2747
  }
2743
2748
  function validRegistryManifest(value) {
2744
- return manifestShape(value) && value.items.length <= 1e4 && value.items.every((item) => validRegistryName(item.name));
2749
+ return (shapesCompiledOnFirstUse ??= compileShapes()).manifest(value) && value.items.length <= 1e4 && value.items.every((item) => validRegistryName(item.name));
2745
2750
  }
2746
2751
  function validRegistryItem(value, name, type) {
2747
- return itemShape(value) && value.name === name && value.type === type && validRegistryName(value.name) && value.files.length <= 1e3;
2752
+ return (shapesCompiledOnFirstUse ??= compileShapes()).item(value) && value.name === name && value.type === type && validRegistryName(value.name) && value.files.length <= 1e3;
2748
2753
  }
2749
2754
 
2750
2755
  // src/registry/boundedFile.ts
@@ -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-R2BFTECP.js";
11
11
  import {
12
12
  findParakeet
13
13
  } from "./chunk-JZIEZCQM.js";
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-ISN5GRYI.js";
18
18
  import {
19
19
  VERSION
20
- } from "./chunk-XEWHUPFS.js";
20
+ } from "./chunk-4N4P3ZWL.js";
21
21
 
22
22
  // src/utils/updateCheck.ts
23
23
  import { existsSync, readFileSync } from "fs";
@@ -4,6 +4,9 @@ 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
+ findFfBinary
9
+ } from "./chunk-VAS6HQX3.js";
7
10
  import {
8
11
  cleanAssetUrl,
9
12
  collectSubCompositionSrcs,
@@ -16,9 +19,6 @@ import {
16
19
  resolveLocalAssetCandidates,
17
20
  resolveProjectRelativeSrc
18
21
  } from "./chunk-6BNTGNGD.js";
19
- import {
20
- findFfBinary
21
- } from "./chunk-VAS6HQX3.js";
22
22
  import {
23
23
  COMPOSITION_VARIABLE_TYPES,
24
24
  FONT_ALIAS_KEYS,
@@ -32,12 +32,16 @@ import {
32
32
  import {
33
33
  COLOR_GRADING_SOURCE_TAGS,
34
34
  COMPOSITION_ATTRIBUTES,
35
+ MEDIA_START_BASIS_ATTR,
35
36
  checkSubCompositionUsability,
37
+ compositionOriginSeconds,
38
+ cutToHostSlots,
36
39
  parseNumeric,
37
40
  readClipTiming,
41
+ resolveMediaStartSeconds,
38
42
  spansOverlap,
39
43
  validateColorGradingContract
40
- } from "./chunk-32GKETR7.js";
44
+ } from "./chunk-MMQ52NIZ.js";
41
45
  import {
42
46
  readAuthoredDurationSeconds,
43
47
  readDataDurationSeconds,
@@ -48,16 +52,16 @@ import {
48
52
  Parser,
49
53
  parseHTML
50
54
  } from "./chunk-SDYDNHEE.js";
51
- import {
52
- parse,
53
- parseExpressionAt,
54
- simple
55
- } from "./chunk-TYXH3EKP.js";
56
55
  import {
57
56
  isSceneLikeCompositionId,
58
57
  parseSlideshowManifest,
59
58
  resolveSlideshow
60
59
  } from "./chunk-IXLUTE6N.js";
60
+ import {
61
+ parse,
62
+ parseExpressionAt,
63
+ simple
64
+ } from "./chunk-TYXH3EKP.js";
61
65
  import {
62
66
  __commonJS,
63
67
  __require,
@@ -3767,6 +3771,128 @@ function trackKindOf(node) {
3767
3771
  import { createHash } from "crypto";
3768
3772
  import { existsSync as existsSync2, readFileSync, readdirSync } from "fs";
3769
3773
  import { dirname as dirname2, extname, join as join3, relative as relative2, resolve } from "path";
3774
+
3775
+ // ../parsers/dist/referenceResolver.js
3776
+ var COMPOSITION_ATTRIBUTES2 = Object.freeze({
3777
+ start: "data-start",
3778
+ duration: "data-duration",
3779
+ trackIndex: "data-track-index",
3780
+ derivedEnd: "data-end",
3781
+ legacyTrack: "data-layer"
3782
+ });
3783
+ var CANONICAL_AUTHORED_TIMING_ATTRIBUTES = Object.freeze([
3784
+ COMPOSITION_ATTRIBUTES2.start,
3785
+ COMPOSITION_ATTRIBUTES2.duration,
3786
+ COMPOSITION_ATTRIBUTES2.trackIndex
3787
+ ]);
3788
+ var DERIVED_TIMING_ATTRIBUTES = Object.freeze([
3789
+ COMPOSITION_ATTRIBUTES2.derivedEnd
3790
+ ]);
3791
+ var LEGACY_TIMING_ATTRIBUTES = Object.freeze([
3792
+ COMPOSITION_ATTRIBUTES2.derivedEnd,
3793
+ COMPOSITION_ATTRIBUTES2.legacyTrack
3794
+ ]);
3795
+ function parseNumeric2(value) {
3796
+ if (value == null || value.trim() === "") return null;
3797
+ const parsed = Number(value);
3798
+ return Number.isFinite(parsed) ? parsed : null;
3799
+ }
3800
+ var REFERENCE_ID_PATTERN = /^[A-Za-z0-9_.:-]+$/;
3801
+ function isAsciiDigitAt(value, index) {
3802
+ const code = value.charCodeAt(index);
3803
+ return code >= 48 && code <= 57;
3804
+ }
3805
+ function skipDigitsLeft(value, start) {
3806
+ let cursor = start;
3807
+ while (cursor >= 0 && isAsciiDigitAt(value, cursor)) cursor--;
3808
+ return cursor;
3809
+ }
3810
+ function skipWhitespaceLeft(value, start) {
3811
+ let cursor = start;
3812
+ while (cursor >= 0 && (value[cursor] ?? "").trim() === "") cursor--;
3813
+ return cursor;
3814
+ }
3815
+ function findMagnitudeStart(value) {
3816
+ const last = value.length - 1;
3817
+ if (!isAsciiDigitAt(value, last)) return null;
3818
+ let cursor = skipDigitsLeft(value, last);
3819
+ if (value[cursor] === ".") cursor = skipDigitsLeft(value, cursor - 1);
3820
+ return cursor + 1;
3821
+ }
3822
+ function parseReferenceOffset(value) {
3823
+ const magnitudeStart = findMagnitudeStart(value);
3824
+ if (magnitudeStart == null) return null;
3825
+ const operatorIndex = skipWhitespaceLeft(value, magnitudeStart - 1);
3826
+ const operator = value[operatorIndex];
3827
+ if (operator !== "+" && operator !== "-") return null;
3828
+ const refId = value.slice(0, operatorIndex).trim();
3829
+ if (!REFERENCE_ID_PATTERN.test(refId)) return null;
3830
+ const magnitude = Number(value.slice(magnitudeStart));
3831
+ if (!Number.isFinite(magnitude)) return null;
3832
+ return { refId, operator, magnitude };
3833
+ }
3834
+ function parseStartExpression(raw) {
3835
+ const normalized2 = (raw ?? "").trim();
3836
+ if (!normalized2) return null;
3837
+ const absolute = parseNumeric2(normalized2);
3838
+ if (absolute != null) return { kind: "absolute", value: absolute };
3839
+ if (REFERENCE_ID_PATTERN.test(normalized2)) {
3840
+ return { kind: "reference", refId: normalized2, offset: 0 };
3841
+ }
3842
+ const reference = parseReferenceOffset(normalized2);
3843
+ if (!reference) return null;
3844
+ return {
3845
+ kind: "reference",
3846
+ refId: reference.refId,
3847
+ offset: reference.operator === "-" ? -reference.magnitude : reference.magnitude
3848
+ };
3849
+ }
3850
+ function findReferenceTargetEl(doc, refId) {
3851
+ return doc.getElementById(refId) ?? doc.querySelector(`[data-composition-id="${refId}"]`);
3852
+ }
3853
+ function resolveReferencedStart(doc, el, startCache, visiting) {
3854
+ const cached = startCache.get(el);
3855
+ if (cached !== void 0) return cached;
3856
+ if (visiting.has(el)) return 0;
3857
+ visiting.add(el);
3858
+ try {
3859
+ const expression = parseStartExpression(el.getAttribute("data-start"));
3860
+ if (!expression) {
3861
+ startCache.set(el, 0);
3862
+ return 0;
3863
+ }
3864
+ if (expression.kind === "absolute") {
3865
+ const value = Math.max(0, expression.value);
3866
+ startCache.set(el, value);
3867
+ return value;
3868
+ }
3869
+ const target = findReferenceTargetEl(doc, expression.refId);
3870
+ if (!target) {
3871
+ startCache.set(el, 0);
3872
+ return 0;
3873
+ }
3874
+ const targetStart = resolveReferencedStart(doc, target, startCache, visiting);
3875
+ const targetDuration = resolveReferencedDuration(doc, target, startCache, visiting);
3876
+ const resolved = targetDuration != null && targetDuration > 0 ? Math.max(0, targetStart + targetDuration + expression.offset) : Math.max(0, targetStart + expression.offset);
3877
+ startCache.set(el, resolved);
3878
+ return resolved;
3879
+ } finally {
3880
+ visiting.delete(el);
3881
+ }
3882
+ }
3883
+ function resolveReferencedDuration(doc, el, startCache, visiting) {
3884
+ const durationAttr = parseNumeric2(el.getAttribute("data-duration"));
3885
+ if (durationAttr != null && durationAttr > 0) return durationAttr;
3886
+ const endAttr = parseNumeric2(el.getAttribute("data-end"));
3887
+ if (endAttr != null) {
3888
+ const start = resolveReferencedStart(doc, el, startCache, visiting);
3889
+ const delta = endAttr - start;
3890
+ if (Number.isFinite(delta) && delta > 0) return delta;
3891
+ }
3892
+ return null;
3893
+ }
3894
+
3895
+ // ../lint/dist/index.js
3770
3896
  import { execFile } from "child_process";
3771
3897
  import { existsSync } from "fs";
3772
3898
  import { join } from "path";
@@ -3883,11 +4009,13 @@ function readAttr(tagSource, attr) {
3883
4009
  function hasAttrName(tagSource, attr) {
3884
4010
  return readDecodedAttr(tagSource, attr) !== null;
3885
4011
  }
4012
+ function isAudibleVideo(attr) {
4013
+ if (attr("muted") !== null) return false;
4014
+ const declared = attr("data-has-audio");
4015
+ return declared === null || declared === "true";
4016
+ }
3886
4017
  function isAudibleVideoTag(tagSource) {
3887
- if (hasAttrName(tagSource, "muted")) return false;
3888
- if (!hasAttrName(tagSource, "data-has-audio")) return true;
3889
- const declared = readAttr(tagSource, "data-has-audio");
3890
- return declared === "true";
4018
+ return isAudibleVideo((name) => readDecodedAttr(tagSource, name));
3891
4019
  }
3892
4020
  function mediaTimeWindow(tagSource) {
3893
4021
  const start = Number(readAttr(tagSource, "data-start"));
@@ -10752,7 +10880,7 @@ async function lintProject(projectDir, entryFile, hostOptions = {}) {
10752
10880
  ...lintTextureMaskAssetNotFound(projectDir, allHtmlSources),
10753
10881
  ...!entryFile ? lintMultipleRootCompositions(projectDir) : [],
10754
10882
  ...!entryFile ? lintBlankRootWithStandaloneComposition(rootHtml, allHtmlSources) : [],
10755
- ...lintDuplicateAudioTracks(allHtmlSources),
10883
+ ...lintDuplicateAudioTracks(projectDir, rootHtml),
10756
10884
  ...lintMissingOrEmptySubComposition(projectDir, rootHtml),
10757
10885
  ...await lintVideoMediaStartPastEof(projectDir, allHtmlSources),
10758
10886
  ...await lintHevcPreviewCodec(collectLocalVideoCandidates(projectDir, allHtmlSources))
@@ -10961,30 +11089,77 @@ function lintMultipleRootCompositions(projectDir) {
10961
11089
  }
10962
11090
  return findings;
10963
11091
  }
10964
- function lintDuplicateAudioTracks(htmlSources) {
10965
- const findings = [];
10966
- const tracks = [];
10967
- const seen = /* @__PURE__ */ new Set();
10968
- for (const { html } of htmlSources) {
10969
- const soundTagRe = /<(?:audio|video)\b[^>]*>/gi;
10970
- let match;
10971
- while ((match = soundTagRe.exec(html)) !== null) {
10972
- const tag = match[0];
10973
- if (/^<video/i.test(tag) && !isAudibleVideoTag(tag)) continue;
10974
- const trackStr = readAttr(tag, "data-track-index");
10975
- const startStr = readAttr(tag, "data-start");
10976
- const durStr = readAttr(tag, "data-duration");
10977
- const src = readDecodedAttr(tag, "src") || "unknown";
10978
- if (!trackStr || !startStr) continue;
10979
- const trackIndex = parseInt(trackStr, 10);
10980
- const start = parseFloat(startStr);
10981
- const duration = durStr ? parseFloat(durStr) : Infinity;
10982
- const key = `${src}:${start}:${duration}:${trackIndex}`;
10983
- if (seen.has(key)) continue;
10984
- seen.add(key);
10985
- tracks.push({ trackIndex, start, end: start + duration, src });
11092
+ var timingFile = (doc) => ({ doc, starts: /* @__PURE__ */ new Map() });
11093
+ var localStart = (file, el) => resolveReferencedStart(file.doc, el, file.starts, /* @__PURE__ */ new Set());
11094
+ var localDuration = (file, el) => resolveReferencedDuration(file.doc, el, file.starts, /* @__PURE__ */ new Set());
11095
+ function collectMainTimelineAudio(projectDir, rootHtml) {
11096
+ const spans = [];
11097
+ const mount = (html, at) => {
11098
+ const { document: document2 } = parseHTML(html);
11099
+ const root = querySelectorAllIncludingTemplates(document2, "[data-composition-id]")[0];
11100
+ if (root) visit(root, { ...at, file: timingFile(document2) });
11101
+ };
11102
+ const visit = (parent, at) => {
11103
+ for (const el of parent.children) {
11104
+ if (el.tagName === "TEMPLATE") {
11105
+ visit(el.content, at);
11106
+ continue;
11107
+ }
11108
+ const span = audioSpanOf(el, at.file, at.origin, at.slots);
11109
+ if (span) spans.push(span);
11110
+ const scope = nestedScopeOf(el, at.file, at.origin, at.slots);
11111
+ if (!scope) {
11112
+ visit(el, at);
11113
+ continue;
11114
+ }
11115
+ const inner = { ...at, ...scope };
11116
+ const src = el.getAttribute("data-composition-src")?.trim();
11117
+ const file = src && !isUnresolvedAssetPlaceholder(src) && !isRemoteOrInlineUrl(src);
11118
+ const filePath = file ? resolve(projectDir, src) : null;
11119
+ if (filePath && !at.mounting.includes(filePath)) {
11120
+ const read = readProjectFile(filePath);
11121
+ if (read.kind === "file")
11122
+ mount(read.text, { ...inner, mounting: [...at.mounting, filePath] });
11123
+ }
11124
+ visit(el, inner);
10986
11125
  }
11126
+ };
11127
+ const { document } = parseHTML(rootHtml);
11128
+ visit(document, { file: timingFile(document), origin: 0, slots: [], mounting: [] });
11129
+ return spans;
11130
+ }
11131
+ function nestedScopeOf(el, file, origin, slots) {
11132
+ if (!el.hasAttribute("data-composition-id") && !el.hasAttribute("data-composition-src")) {
11133
+ return null;
10987
11134
  }
11135
+ const start = origin + localStart(file, el);
11136
+ const duration = localDuration(file, el);
11137
+ const window = duration === null ? [] : [{ start, end: start + duration }];
11138
+ return { origin: compositionOriginSeconds(start, el), slots: [...slots, ...window] };
11139
+ }
11140
+ function audioSpanOf(el, file, origin, slots) {
11141
+ const tag = el.tagName.toLowerCase();
11142
+ if (tag !== "audio" && !(tag === "video" && isAudibleVideo((name) => el.getAttribute(name)))) {
11143
+ return null;
11144
+ }
11145
+ const trackStr = el.getAttribute("data-track-index");
11146
+ if (!trackStr || !el.hasAttribute("data-start")) return null;
11147
+ const start = resolveMediaStartSeconds({
11148
+ authoredStart: parseNumeric(el.getAttribute("data-start")),
11149
+ hostStart: origin,
11150
+ hasAutoStart: el.hasAttribute("data-hf-auto-start"),
11151
+ basis: el.getAttribute(MEDIA_START_BASIS_ATTR),
11152
+ ordinaryStart: () => origin + localStart(file, el)
11153
+ });
11154
+ const duration = parseNumeric(el.getAttribute("data-duration")) ?? localDuration(file, el);
11155
+ const kept = cutToHostSlots({ start, end: start + (duration ?? Infinity) }, slots);
11156
+ if (kept.end <= kept.start) return null;
11157
+ return { trackIndex: parseInt(trackStr, 10), ...kept, src: el.getAttribute("src") || "unknown" };
11158
+ }
11159
+ var formatSeconds = (t) => Number.isFinite(t) ? String(Number(t.toFixed(2))) : "end";
11160
+ function lintDuplicateAudioTracks(projectDir, rootHtml) {
11161
+ const findings = [];
11162
+ const tracks = collectMainTimelineAudio(projectDir, rootHtml);
10988
11163
  for (let i = 0; i < tracks.length; i++) {
10989
11164
  for (let j = i + 1; j < tracks.length; j++) {
10990
11165
  const a = tracks[i];
@@ -10994,7 +11169,7 @@ function lintDuplicateAudioTracks(htmlSources) {
10994
11169
  findings.push({
10995
11170
  code: "duplicate_audio_track",
10996
11171
  severity: "warning",
10997
- message: `Multiple audible <audio>/<video> elements on track ${a.trackIndex} overlap (${a.src} at ${a.start}-${Number.isFinite(a.end) ? a.end.toFixed(1) : "end"}s, ${b.src} at ${b.start}-${Number.isFinite(b.end) ? b.end.toFixed(1) : "end"}s). This causes layered audio playback.`,
11172
+ message: `Multiple audible <audio>/<video> elements on track ${a.trackIndex} overlap (${a.src} at ${formatSeconds(a.start)}-${formatSeconds(a.end)}s, ${b.src} at ${formatSeconds(b.start)}-${formatSeconds(b.end)}s). This causes layered audio playback.`,
10998
11173
  fixHint: "Use non-overlapping time windows or different track indices."
10999
11174
  });
11000
11175
  }
@@ -11060,6 +11235,8 @@ function isSnippetFragment(html) {
11060
11235
  }
11061
11236
 
11062
11237
  export {
11238
+ resolveReferencedStart,
11239
+ resolveReferencedDuration,
11063
11240
  require_dist,
11064
11241
  resolveCompositionDuration,
11065
11242
  LINT_RULE_COUNT,
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
 
8
8
  // src/utils/producer.ts
9
9
  async function loadProducer() {
10
- return await import("./src-S7NVL5VF.js");
10
+ return await import("./src-6MSC62U2.js");
11
11
  }
12
12
 
13
13
  export {
@@ -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-UKOTVJFV.js";
10
10
 
11
11
  // src/telemetry/renderObservability.ts
12
12
  function renderObservabilityTelemetryPayload(observability) {
@@ -5,12 +5,17 @@ var require = __hf_createRequire(import.meta.url);
5
5
  var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
+ runCancellableProcess,
8
9
  runRenderSetupWorker
9
- } from "./chunk-D3ZWBHZP.js";
10
+ } from "./chunk-DYAPHNV6.js";
10
11
  import {
12
+ getFreeDiskMb
13
+ } from "./chunk-T6AGUTZJ.js";
14
+ import {
15
+ browserPathFromEnv,
11
16
  managedChromeVersion,
12
17
  pickSharedShell
13
- } from "./chunk-537IYAEE.js";
18
+ } from "./chunk-4UMPIPCQ.js";
14
19
  import {
15
20
  normalizeErrorMessage
16
21
  } from "./chunk-KNU5COPB.js";
@@ -31,7 +36,33 @@ import {
31
36
  } from "fs";
32
37
  import { homedir } from "os";
33
38
  import { debuglog } from "util";
34
- import { basename, dirname, join, relative } from "path";
39
+ import { basename, dirname as dirname2, join, relative } from "path";
40
+
41
+ // src/browser/unzipArchive.ts
42
+ import { mkdir } from "fs/promises";
43
+ import { dirname } from "path";
44
+ var UNZIP_DISK_FULL_STATUS = 50;
45
+ async function unzipArchive(archivePath, folderPath) {
46
+ await mkdir(dirname(folderPath), { recursive: true });
47
+ try {
48
+ await runCancellableProcess("unzip", ["-q", "-o", archivePath, "-d", folderPath], {
49
+ detached: false
50
+ });
51
+ return true;
52
+ } catch (err) {
53
+ if (err.code === "ENOENT") return false;
54
+ if (err.status === UNZIP_DISK_FULL_STATUS) {
55
+ throw new Error(
56
+ "Extraction failed: the disk filled up while unpacking Chrome. Free disk space, then retry.",
57
+ { cause: err }
58
+ );
59
+ }
60
+ const said = err.stderr?.trim();
61
+ throw new Error(`Extraction failed: ${said || err.message}`, { cause: err });
62
+ }
63
+ }
64
+
65
+ // src/browser/manager.ts
35
66
  async function loadPuppeteerBrowsers() {
36
67
  try {
37
68
  return await import("@puppeteer/browsers");
@@ -45,6 +76,7 @@ Fix: run \`npm install\` or \`bun install\` to restore missing packages, then re
45
76
  }
46
77
  var CACHE_ROOT_DIR = join(homedir(), ".cache", "hyperframes");
47
78
  var CACHE_DIR = join(homedir(), ".cache", "hyperframes", "chrome");
79
+ var ARCHIVE_PLUS_UNPACKED_SHELL_MB = 512;
48
80
  var PUPPETEER_CACHE_DIR = join(homedir(), ".cache", "puppeteer", "chrome-headless-shell");
49
81
  var INSTALL_LOCK_DIR = join(CACHE_ROOT_DIR, ".chrome.install.lock");
50
82
  var INSTALL_RECLAIM_LOCK_DIR = join(CACHE_ROOT_DIR, ".chrome.install.reclaim.lock");
@@ -206,7 +238,7 @@ function whichBinary(name) {
206
238
  }
207
239
  }
208
240
  function findFromEnv() {
209
- const envPath = process.env["HYPERFRAMES_BROWSER_PATH"] ?? process.env["PRODUCER_HEADLESS_SHELL_PATH"];
241
+ const envPath = browserPathFromEnv()?.path;
210
242
  if (envPath && existsSync(envPath)) {
211
243
  return { executablePath: envPath, source: "env" };
212
244
  }
@@ -458,21 +490,28 @@ async function downloadBrowser(options) {
458
490
  if (isLinuxArm()) {
459
491
  return ensureLinuxArmBrowser(options);
460
492
  }
461
- const { Browser, detectBrowserPlatform, install } = await loadPuppeteerBrowsers();
493
+ removeInstallLeftovers();
494
+ const freeMb = getFreeDiskMb(CACHE_ROOT_DIR);
495
+ if (freeMb !== null && freeMb < ARCHIVE_PLUS_UNPACKED_SHELL_MB) {
496
+ throw new Error(
497
+ `Low disk space: Chrome Headless Shell needs about ${ARCHIVE_PLUS_UNPACKED_SHELL_MB} MB to download, ${freeMb} MB free at ${CACHE_ROOT_DIR}. Free disk space, then retry.`
498
+ );
499
+ }
500
+ const { Browser, Cache, detectBrowserPlatform, install } = await loadPuppeteerBrowsers();
462
501
  const platform = detectBrowserPlatform();
463
502
  if (!platform) {
464
503
  throw new Error(`Unsupported platform: ${process.platform} ${process.arch}`);
465
504
  }
466
- removeInstallLeftovers();
467
505
  const stagingDir = join(CACHE_ROOT_DIR, `${STAGING_PREFIX}${randomUUID()}`);
468
506
  const clearStaging = () => rmSync(stagingDir, { recursive: true, force: true });
469
507
  let unzipLog = [];
470
- const runInstall = () => {
508
+ const buildId = managedChromeVersion();
509
+ const runInstall = async () => {
471
510
  unzipLog = [];
472
- return install({
511
+ const installOptions = {
473
512
  cacheDir: stagingDir,
474
513
  browser: Browser.CHROMEHEADLESSSHELL,
475
- buildId: managedChromeVersion(),
514
+ buildId,
476
515
  platform,
477
516
  downloadProgressCallback: options?.onProgress,
478
517
  logger: (prefix) => {
@@ -485,7 +524,14 @@ async function downloadBrowser(options) {
485
524
  if (debug.enabled) debug(line);
486
525
  };
487
526
  }
488
- });
527
+ };
528
+ const unzipMayAskOnInput = process.platform !== "win32";
529
+ if (unzipMayAskOnInput) {
530
+ const archive = await install({ ...installOptions, unpack: false });
531
+ const into = new Cache(stagingDir).installationDir(installOptions.browser, platform, buildId);
532
+ await unzipArchive(archive, into);
533
+ }
534
+ return install(installOptions);
489
535
  };
490
536
  try {
491
537
  const staged = await installWithCorruptArchiveRecovery(
@@ -527,7 +573,7 @@ function assertExecutableUnpacked(stagingDir, executablePath) {
527
573
  function moveStagedInstallIntoCache(stagingDir, staged) {
528
574
  const target = join(CACHE_DIR, relative(stagingDir, staged.path));
529
575
  const aside = join(CACHE_ROOT_DIR, `${REPLACED_PREFIX}${randomUUID()}`);
530
- mkdirSync(dirname(target), { recursive: true });
576
+ mkdirSync(dirname2(target), { recursive: true });
531
577
  let replaced = false;
532
578
  try {
533
579
  renameSync(target, aside);
@@ -546,6 +592,7 @@ function moveStagedInstallIntoCache(stagingDir, staged) {
546
592
  }
547
593
  var STAGING_PREFIX = ".chrome-staging-";
548
594
  var REPLACED_PREFIX = ".chrome-replaced-";
595
+ var isInstallLeftover = (name) => name.startsWith(STAGING_PREFIX) || name.startsWith(REPLACED_PREFIX);
549
596
  function removeInstallLeftovers() {
550
597
  let names;
551
598
  try {
@@ -554,13 +601,16 @@ function removeInstallLeftovers() {
554
601
  if (isErrno(err, "ENOENT")) return false;
555
602
  throw err;
556
603
  }
557
- const leftovers = names.filter(
558
- (name) => name.startsWith(STAGING_PREFIX) || name.startsWith(REPLACED_PREFIX)
559
- );
604
+ const leftovers = names.filter(isInstallLeftover);
560
605
  for (const name of leftovers)
561
606
  rmSync(join(CACHE_ROOT_DIR, name), { recursive: true, force: true });
562
607
  return leftovers.length > 0;
563
608
  }
609
+ async function sweepKilledInstalls() {
610
+ const names = existsSync(CACHE_ROOT_DIR) ? readdirSync(CACHE_ROOT_DIR) : [];
611
+ if (!names.some(isInstallLeftover)) return;
612
+ await withInstallLock(async () => removeInstallLeftovers());
613
+ }
564
614
  function clearBrowser() {
565
615
  const removedLeftovers = removeInstallLeftovers();
566
616
  if (!existsSync(CACHE_DIR)) return removedLeftovers;
@@ -581,6 +631,7 @@ export {
581
631
  ensureBrowser,
582
632
  isCorruptArchiveError,
583
633
  installWithCorruptArchiveRecovery,
634
+ sweepKilledInstalls,
584
635
  clearBrowser,
585
636
  isLinuxArm
586
637
  };
@@ -18,10 +18,11 @@ var CONNECTIONS = 8;
18
18
  var RETRIES = 3;
19
19
  async function downloadToFile(url, destPath, options = {}) {
20
20
  const fetchImpl = options.fetchImpl ?? fetch;
21
+ const partBytes = options.partBytes ?? PART_BYTES;
21
22
  const failFast = new AbortController();
22
23
  const signal = options.signal ? AbortSignal.any([options.signal, failFast.signal]) : failFast.signal;
23
24
  const get = async (range) => fetchImpl(url, { signal, headers: range ? { range } : {} });
24
- let first = await get(`bytes=0-${PART_BYTES - 1}`);
25
+ let first = await get(`bytes=0-${partBytes - 1}`);
25
26
  if (first.status === 416 || first.status === 206 && contentRangeTotal(first) === void 0) {
26
27
  await first.body?.cancel();
27
28
  first = await get();
@@ -74,10 +75,10 @@ async function downloadToFile(url, destPath, options = {}) {
74
75
  };
75
76
  const parts = [];
76
77
  if (ranged && total !== void 0) {
77
- parts.push(fetchRange(0, Math.min(PART_BYTES, total) - 1, first));
78
- const rest = total - PART_BYTES;
79
- const size = Math.ceil(rest / Math.min(CONNECTIONS - 1, Math.ceil(rest / PART_BYTES)));
80
- for (let start = PART_BYTES; start < total; start += size) {
78
+ parts.push(fetchRange(0, Math.min(partBytes, total) - 1, first));
79
+ const rest = total - partBytes;
80
+ const size = Math.ceil(rest / Math.min(CONNECTIONS - 1, Math.ceil(rest / partBytes)));
81
+ for (let start = partBytes; start < total; start += size) {
81
82
  parts.push(fetchRange(start, Math.min(start + size, total) - 1));
82
83
  }
83
84
  } else {
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-K2FLNJVB.js";
10
10
  import {
11
11
  failUsage
12
- } from "./chunk-PBN6GBJE.js";
12
+ } from "./chunk-JVBRJMOP.js";
13
13
 
14
14
  // src/cloud/parsing.ts
15
15
  var INTEGER_RE = /^-?\d+$/;
@@ -12,6 +12,9 @@ var CPU_COMPOSITING = "--disable-gpu-compositing";
12
12
  function machServiceDenied(errorMessage) {
13
13
  return MACH_SERVICE_DENIED.test(errorMessage);
14
14
  }
15
+ function pipeLaunchClosedOnMac(error, platform = process.platform) {
16
+ return platform === "darwin" && error instanceof Error && error.name === "TargetCloseError";
17
+ }
15
18
  function inAgentSandbox(env = process.env, platform = process.platform) {
16
19
  return platform === "darwin" && env.CODEX_SANDBOX === "seatbelt";
17
20
  }
@@ -33,6 +36,7 @@ function sandboxDeniedRemediation(errorMessage) {
33
36
 
34
37
  export {
35
38
  machServiceDenied,
39
+ pipeLaunchClosedOnMac,
36
40
  inAgentSandbox,
37
41
  oneProcessOverPipe,
38
42
  isOneProcessOverPipe,
@@ -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-4N4P3ZWL.js";
10
10
 
11
11
  // src/registry/compatibility.ts
12
12
  import { compareVersions } from "compare-versions";