@poe-platform/safe-bash 0.1.817 → 0.1.818
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/image-ast/index.js +2 -2
- package/dist/mp4-ast/index.d.ts +2 -1
- package/dist/mp4-ast/mp4-metadata-source.d.ts +10 -0
- package/dist/mp4-ast/mp4-packets-source.d.ts +8 -1
- package/dist/mp4-ast/types.d.ts +21 -3
- package/dist/pdf-ast/ast.d.ts +2 -0
- package/dist/pdf-ast/content/evaluator.d.ts +7 -0
- package/dist/pdf-ast/content/retained-evaluator.d.ts +2 -2
- package/dist/pdf-ast/content/retained-page.d.ts +2 -2
- package/dist/pdf-ast/extract/html-text-stream.d.ts +14 -0
- package/dist/pdf-ast/extract/logical-text-stream.d.ts +14 -0
- package/dist/pdf-ast/extract/raw-text-index.d.ts +18 -4
- package/dist/pdf-ast/extract/retained-color.d.ts +6 -6
- package/dist/pdf-ast/extract/retained-decoded-image.d.ts +2 -2
- package/dist/pdf-ast/extract/stored-text-glyphs.d.ts +8 -0
- package/dist/pdf-ast/fonts/retained.d.ts +2 -2
- package/dist/pdf-ast/image.d.ts +2 -0
- package/dist/pdf-ast/image.js +19 -0
- package/dist/pdf-ast/index.d.ts +3 -0
- package/dist/pdf-ast/index.js +264 -66852
- package/dist/pdf-ast/render/postscript.d.ts +6 -0
- package/dist/pdf-ast/render/raster.d.ts +21 -1
- package/dist/pdf-ast/retained-document.d.ts +16 -95
- package/dist/pdf-ast/retained-reader.d.ts +109 -0
- package/dist/safe-bash/command-chunks/biff-AYJZR2YV-JPESBEOO.js +5741 -0
- package/dist/safe-bash/command-chunks/{chunk-SL4LD25A.js → chunk-232N24HE.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-ALD53QFL.js → chunk-2C4QMQQD.js} +42 -12
- package/dist/safe-bash/command-chunks/{chunk-3PM46VWH.js → chunk-2FEMMALH.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-QDV2NIFR.js → chunk-2TMTGVJR.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ARE267HR.js → chunk-2WTDP3TP.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-FSG6UC2N.js → chunk-2XR7B6DY.js} +420 -167
- package/dist/safe-bash/command-chunks/{chunk-EY3UE26F.js → chunk-2YC6MWQB.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-UPWLHHZ2.js → chunk-37KBCKDF.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-DOVWHVHI.js → chunk-3B6554G6.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-FB2WPI3M.js → chunk-3ZGO24WG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-GR4ONCQ5.js → chunk-424NYO35.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-MQE77MEQ.js → chunk-45GTHPL5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-AF2IO57Q.js → chunk-4OHTYYNU.js} +8 -136
- package/dist/safe-bash/command-chunks/{chunk-ICJH6A73.js → chunk-4PMMJ45F.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-57PK2QFX.js → chunk-4SFX6YGC.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-G3LUT475.js → chunk-4WHTTCKY.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-UYZ6EFZE.js → chunk-4Z7PBIMP.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-A4P37F3P.js → chunk-57SKL76U.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-J6FNSVHT.js → chunk-5GP4A3TD.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-OFONWWEZ.js → chunk-5IHJWBDR.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-A2L3U7DW.js → chunk-5OS4Q3AX.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-FUYZUETI.js → chunk-5PMLTSQ5.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-TXU7MMHN.js → chunk-5RDS6CNQ.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-FR63MJSO.js → chunk-5UGQGB5Y.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-UKAGRRLZ.js → chunk-5VY5O37W.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-5WS6DXYE.js +68444 -0
- package/dist/safe-bash/command-chunks/{chunk-2ALHVXEM.js → chunk-6EK76ERE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4772DJKS.js → chunk-6GCK2KSL.js} +61 -26
- package/dist/safe-bash/command-chunks/{chunk-T5OQ53XS.js → chunk-6IID5HTY.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-EZDWPTYB.js → chunk-6LOAJOWK.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-WMBELKPP.js → chunk-6PE2L522.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-ZAYTFXUX.js → chunk-73KY3MZ3.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-BOVDUJ3A.js → chunk-77WBFVZQ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-3DWFXESW.js → chunk-7GJJDM2F.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-WIW3KDBS.js → chunk-7NFICYRU.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-35DU6I2M.js → chunk-7ZEGARPB.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-A5SPMSKD.js → chunk-A32PUWYE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-KYIGYYEY.js → chunk-A32ZROH5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-IOXMGD2H.js → chunk-ADVQZLLE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-CGJ7GMHO.js → chunk-AEZU6NZE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-KDDXLHN7.js → chunk-ATHU53C2.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-R7LF4XQV.js → chunk-B6T2526I.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-PPN53PX3.js → chunk-BB7HBO56.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-ZM7HMBAJ.js → chunk-BDGNKRY4.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-VMZIAFVJ.js → chunk-BFRSYJUC.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-X42MJT2J.js → chunk-BJL7AGA5.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-VZTVR3JI.js → chunk-C2QUG7IP.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-IVKAFEPO.js → chunk-C34RLMAC.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-5O45KGW5.js → chunk-C5VUJOUQ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LQDANF2B.js → chunk-CCNOZKAK.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-FEBTT5NH.js → chunk-CEHICGP6.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-SICTBSLW.js → chunk-CODJMTSA.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-LJ3UYESS.js → chunk-CP5EO5TT.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-45DKGZYO.js → chunk-CSS5KXQC.js} +329 -152
- package/dist/safe-bash/command-chunks/{chunk-6RLWPB44.js → chunk-CZSLXQU2.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3ZWFE4CK.js → chunk-D2ZT2UUT.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WH624PKJ.js → chunk-D5XSGHXN.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-NDALIHKK.js → chunk-D7UFAIBS.js} +18 -18
- package/dist/safe-bash/command-chunks/{chunk-ISFGPCED.js → chunk-DCKAY6HV.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-LNAZ3E4Q.js → chunk-DGCJVZW6.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LFSWLJPR.js → chunk-DJB5RB6U.js} +288 -32
- package/dist/safe-bash/command-chunks/{chunk-FGHSE3RZ.js → chunk-DZ4ELL34.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LQX7RAF7.js → chunk-EBKKYRQJ.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-QNETPOMH.js → chunk-EDBNI7WE.js} +14 -14
- package/dist/safe-bash/command-chunks/{chunk-5GDF5FAS.js → chunk-EEJ3YXVO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-RTHYAGKI.js → chunk-ETN25WCR.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-ET6LMDEX.js → chunk-EV3DPRWE.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-3MUFXGA2.js → chunk-F2JUB7JI.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-345YBIHP.js → chunk-F42WV2YO.js} +19 -19
- package/dist/safe-bash/command-chunks/{chunk-FTZFCMVI.js → chunk-FAVWWMFW.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-XBWD6SI3.js → chunk-FDRE535F.js} +16 -16
- package/dist/safe-bash/command-chunks/{chunk-WMV5224N.js → chunk-FILE5PBI.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-XPQUUFQD.js → chunk-FPOM47UA.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-QMBMZSJF.js → chunk-FQ2WRT4Q.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-H56BSMFQ.js → chunk-FVAFISPY.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-2QZUAZTH.js → chunk-GIQUIF6E.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-2TWXRJPB.js → chunk-GNORF6RY.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-ABL2DPJI.js → chunk-GPLN6JV2.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-DZOKH5BL.js → chunk-GQ7BD75U.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-N4HWOLGZ.js → chunk-GY2C555A.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-N32AP43V.js → chunk-GZNX5SS4.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-YPG55QTP.js → chunk-HCJWEB6P.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4ABR3KGK.js → chunk-HNY7LZ5P.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-P462JTNT.js → chunk-HOBXZX23.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-5KZMR6AJ.js → chunk-HW3IOXT6.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-3VGQTLO6.js → chunk-HX7QQNWS.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-TXWDR2P4.js → chunk-IBT3OWXB.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-OHEZQ4QA.js → chunk-IFBLXBBM.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-HOJ7WDTS.js → chunk-IJZUUXLL.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-BZRWZ6GO.js → chunk-IKU7ZBF3.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-CKIXC7AO.js → chunk-IPKYPADE.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-IWVANZWH.js → chunk-JLPBGKVC.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-6M3JTPKE.js → chunk-JNRX5EFF.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-5YL453ZF.js → chunk-JSX5CFZY.js} +36 -36
- package/dist/safe-bash/command-chunks/{chunk-V6JPIZUW.js → chunk-JT656DKZ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-DM5WURQL.js → chunk-JY2T3KV2.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-IZ3SD5S2.js → chunk-K2NV6H7E.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-62RG3GHF.js → chunk-K6E56LND.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-FLSXHLJG.js → chunk-KADQKXZE.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-URQSUMMJ.js → chunk-KFFV7HBL.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-ONQP4FNV.js → chunk-KZICRCQ7.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-N35IJXBK.js → chunk-L6X4EEN6.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-SHLT5R64.js → chunk-LF7YJ5VQ.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-GMBUOYTN.js → chunk-LNHTLWIL.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-A6OTPNNI.js → chunk-LPKMNCC5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-MUTARE5I.js → chunk-LSKA4IR4.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-N3ZH4YYH.js → chunk-LTWX23FS.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-JA36YOZI.js → chunk-LUJUYUOG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4X2MPZXW.js → chunk-M42GCI5F.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-AYQPJQJR.js → chunk-M5BFAMXD.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-OFDJJRAD.js → chunk-M7DZ7COK.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-E64ZI2YB.js → chunk-MMSKDYK6.js} +224 -115
- package/dist/safe-bash/command-chunks/{chunk-NKK76B4V.js → chunk-MN7EEK6Y.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-OBIXFO25.js → chunk-MOJQT6RW.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-HOKPYTHQ.js → chunk-MPRUGL4W.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-CORUUCS2.js → chunk-MRBX4KEP.js} +3 -3
- package/dist/safe-bash/command-chunks/chunk-MTWFSBNG.js +137 -0
- package/dist/safe-bash/command-chunks/{chunk-RRAQII52.js → chunk-MURNTGDL.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-KDBU5Q2N.js → chunk-MWVELMXZ.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-PRO7JOIH.js → chunk-N3MAYM6Y.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-E22EAYJN.js → chunk-NFWLZDMY.js} +177 -34
- package/dist/safe-bash/command-chunks/{chunk-GAROGIVU.js → chunk-NP2QXF2X.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-SNA2LVBX.js → chunk-NPVOYY2A.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ENMJHB2C.js → chunk-NTXRKJPZ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-3K5CVXUV.js → chunk-NZF56C25.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-5MNQTHED.js → chunk-OA4MEWTN.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-SWIF6BBY.js → chunk-OL75SBZL.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-LT2YCGC5.js → chunk-OVQSILY3.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-WDVPHDBH.js → chunk-P57V45F2.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-OWCBX5M2.js → chunk-PAY4ULWY.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-CHZE6FNT.js → chunk-PFUZPAXQ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-NLCUQD7Y.js → chunk-PX6E5MHY.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-POGVOCOB.js → chunk-QCN7MRRU.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-ZZERSKAR.js → chunk-QLE6JUR7.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-LZY46GYY.js → chunk-QMWBKR4C.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-BIJW6QWB.js → chunk-QNLX3CZH.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-MDFNUNK5.js → chunk-QWX5IERU.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-WOL3LBXE.js → chunk-R2N3E267.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ZNCPIZCN.js → chunk-R6X63VAO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-FGARVKAX.js → chunk-RNIFPFGC.js} +13 -11
- package/dist/safe-bash/command-chunks/{chunk-OIHQXURE.js → chunk-ROE6KD4C.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-BKK4MS3V.js → chunk-RR6XG2I6.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ZHHALBM7.js → chunk-RYOHOS2I.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-U42WHQRH.js → chunk-TTTNFKT6.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-EWC56JNI.js → chunk-TTVJJZOM.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-TY7JXEWI.js → chunk-UBX5I5HY.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-QOKFSYD5.js → chunk-UE34SQET.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-DXOXUKQB.js → chunk-UH4CQIU3.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-VNNNVT4C.js → chunk-UZZ2WJQV.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-QNX5LZBK.js → chunk-V6NZVM7C.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-KLAC2MIZ.js → chunk-VEZULAIA.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-OCV5ZU35.js → chunk-VSTAHYCV.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-UFLMOU3B.js → chunk-VUJCVXD4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-5V7WIQ2D.js → chunk-VW67MA53.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-2IMIKROX.js → chunk-WI5NEHPD.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-SBXS4S6Y.js → chunk-WJSU2UVG.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-VVWHFNHD.js → chunk-WPEIOUJN.js} +415 -25
- package/dist/safe-bash/command-chunks/{chunk-YKODRSGT.js → chunk-WRCYZJNO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-TID5TSQW.js → chunk-WRJV7OVO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-T4SEQU66.js → chunk-X4TWJNW7.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-CKA7ZROU.js → chunk-X6KFCAWZ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-ROQ3VNVX.js → chunk-X6KO7D6R.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-S5ER73EA.js → chunk-XB5ZZHFD.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-FHQOFEQK.js → chunk-XLFOLLUZ.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-UJYXSLM6.js → chunk-XLPEPCQC.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-UT5X6QRU.js → chunk-XQFEP43Y.js} +5 -5
- package/dist/safe-bash/command-chunks/chunk-Y7XL6CWB.js +771 -0
- package/dist/safe-bash/command-chunks/{chunk-RVWIEXR7.js → chunk-YKEMSPJZ.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-ERWIJYCS.js → chunk-YN3OEJAZ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-6YF2QADH.js → chunk-YOYK2I4N.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-26JE5JEB.js → chunk-YS5ZKMRJ.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-LMLBQSAM.js → chunk-YW7WU7W2.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-YXR4JE4U.js → chunk-Z33YS3DW.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-T2FRXSQT.js → chunk-ZBXUAM34.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-VVV45NLY.js → chunk-ZJUU5IAS.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-7OCTMVYJ.js → chunk-ZNABMTV3.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-6JGICYHP.js → chunk-ZSF2T5D4.js} +1 -1
- package/dist/safe-bash/command-chunks/{command-engine-2QXVRRH3.js → command-engine-PFYHL7GS.js} +10 -4
- package/dist/safe-bash/command-chunks/{engine-T4GP6QOK-ECFKMR5V.js → engine-5AVSKFBI-D7Q5VPUN.js} +1 -1
- package/dist/safe-bash/command-chunks/model-store-IIWQHSEZ.js +54 -0
- package/dist/safe-bash-command-awk/awk-inspection.js +2 -2
- package/dist/safe-bash-command-awk/awk.js +5 -5
- package/dist/safe-bash-command-awk/index.js +5 -5
- package/dist/safe-bash-command-cp/index.js +4 -4
- package/dist/safe-bash-command-diff/diff.js +2 -2
- package/dist/safe-bash-command-diff/index.js +2 -2
- package/dist/safe-bash-command-ffmpeg/index.js +1 -1
- package/dist/safe-bash-command-ffprobe/index.js +2 -2
- package/dist/safe-bash-command-ffprobe/media.js +2 -2
- package/dist/safe-bash-command-node/commands/node/browser.js +6 -6
- package/dist/safe-bash-command-node/commands/node/default-runtime.js +6 -6
- package/dist/safe-bash-command-node/commands/node/filesystem.js +2 -2
- package/dist/safe-bash-command-node/commands/node/safejs.js +6 -6
- package/dist/safe-bash-command-node/commands/node/timers.js +2 -2
- package/dist/safe-bash-command-patch/index.js +3 -3
- package/dist/safe-bash-command-patch/patch-formats.js +2 -2
- package/dist/safe-bash-command-patch/patch.js +3 -3
- package/dist/safe-bash-command-patch/unified.js +1 -1
- package/dist/safe-bash-command-pdftoppm/index.js +89 -124
- package/dist/safe-bash-command-pdftotext/index.d.ts +1 -1
- package/dist/safe-bash-command-pdftotext/index.js +538 -379
- package/dist/safe-bash-command-playwright-cli/index.js +19 -19
- package/dist/safe-bash-command-playwright-cli/playwright/abilities.js +6 -6
- package/dist/safe-bash-command-playwright-cli/playwright/adapter.js +3 -3
- package/dist/safe-bash-command-playwright-cli/playwright/controller.js +13 -13
- package/dist/safe-bash-command-playwright-cli/playwright/index.js +19 -19
- package/dist/safe-bash-command-playwright-cli/playwright/native-storage-replacement.js +2 -2
- package/dist/safe-bash-command-playwright-cli/playwright/open-options.js +2 -2
- package/dist/safe-bash-command-playwright-cli/playwright/profile.js +5 -5
- package/dist/safe-bash-command-playwright-cli/playwright/standard-capabilities.js +4 -4
- package/dist/safe-bash-command-playwright-cli/playwright/storage-capabilities.js +3 -3
- package/dist/safe-bash-command-pptx/engine.js +1 -1
- package/dist/safe-bash-command-python/executor.js +10 -10
- package/dist/safe-bash-command-python/index.js +10 -10
- package/dist/safe-bash-command-python/jspi.js +2 -2
- package/dist/safe-bash-command-safejs/index.js +2 -2
- package/dist/safe-bash-command-safejs/runtime.js +2 -2
- package/dist/safe-bash-command-ssconvert/index.js +13 -13
- package/dist/safe-bash-command-unzip/index.js +4 -4
- package/dist/safe-bash-docx-engine/ancillary-resources.js +10 -10
- package/dist/safe-bash-docx-engine/batch-operations.js +67 -67
- package/dist/safe-bash-docx-engine/batch-result-schema.js +79 -79
- package/dist/safe-bash-docx-engine/batch.js +78 -78
- package/dist/safe-bash-docx-engine/bookmarks.js +18 -18
- package/dist/safe-bash-docx-engine/charts.js +11 -11
- package/dist/safe-bash-docx-engine/command-option-rules.js +6 -6
- package/dist/safe-bash-docx-engine/command-properties.js +3 -3
- package/dist/safe-bash-docx-engine/comments.js +26 -26
- package/dist/safe-bash-docx-engine/control-bindings.js +21 -21
- package/dist/safe-bash-docx-engine/control-repeat.js +21 -21
- package/dist/safe-bash-docx-engine/controls.js +19 -19
- package/dist/safe-bash-docx-engine/create.js +11 -11
- package/dist/safe-bash-docx-engine/diagrams.js +11 -11
- package/dist/safe-bash-docx-engine/diff.js +13 -13
- package/dist/safe-bash-docx-engine/document-properties.js +16 -16
- package/dist/safe-bash-docx-engine/equations.js +17 -17
- package/dist/safe-bash-docx-engine/extract.js +14 -14
- package/dist/safe-bash-docx-engine/fields.js +23 -23
- package/dist/safe-bash-docx-engine/font-inventory.js +18 -18
- package/dist/safe-bash-docx-engine/font-resources.js +6 -6
- package/dist/safe-bash-docx-engine/image-batch-operations.js +14 -14
- package/dist/safe-bash-docx-engine/image-insertion.js +21 -21
- package/dist/safe-bash-docx-engine/image-layout.js +19 -19
- package/dist/safe-bash-docx-engine/image-replacement.js +22 -22
- package/dist/safe-bash-docx-engine/images.js +19 -19
- package/dist/safe-bash-docx-engine/index.js +111 -111
- package/dist/safe-bash-docx-engine/inspection.js +20 -20
- package/dist/safe-bash-docx-engine/invocation.js +9 -9
- package/dist/safe-bash-docx-engine/io.js +9 -9
- package/dist/safe-bash-docx-engine/links.js +21 -21
- package/dist/safe-bash-docx-engine/lists.js +20 -20
- package/dist/safe-bash-docx-engine/locations.js +15 -15
- package/dist/safe-bash-docx-engine/notes.js +22 -22
- package/dist/safe-bash-docx-engine/objects.js +19 -19
- package/dist/safe-bash-docx-engine/operation-json-schema.js +3 -3
- package/dist/safe-bash-docx-engine/operation-schema.js +2 -2
- package/dist/safe-bash-docx-engine/pack.js +14 -14
- package/dist/safe-bash-docx-engine/package-view-batch-operations.js +22 -22
- package/dist/safe-bash-docx-engine/pandoc-adapter.js +29 -29
- package/dist/safe-bash-docx-engine/paragraph-edit.js +25 -25
- package/dist/safe-bash-docx-engine/part-provider.js +3 -3
- package/dist/safe-bash-docx-engine/property-values.js +3 -3
- package/dist/safe-bash-docx-engine/publication.js +9 -9
- package/dist/safe-bash-docx-engine/removal.js +21 -21
- package/dist/safe-bash-docx-engine/revision-decisions.js +22 -22
- package/dist/safe-bash-docx-engine/revision-edit.js +20 -20
- package/dist/safe-bash-docx-engine/revisions.js +18 -18
- package/dist/safe-bash-docx-engine/run-format.js +20 -20
- package/dist/safe-bash-docx-engine/sanitize.js +34 -34
- package/dist/safe-bash-docx-engine/sections.js +19 -19
- package/dist/safe-bash-docx-engine/settings.js +11 -11
- package/dist/safe-bash-docx-engine/shape-edit.js +21 -21
- package/dist/safe-bash-docx-engine/signatures.js +15 -15
- package/dist/safe-bash-docx-engine/stories.js +22 -22
- package/dist/safe-bash-docx-engine/structure-model-batch-operations.js +38 -38
- package/dist/safe-bash-docx-engine/style-model-batch-operations.js +27 -27
- package/dist/safe-bash-docx-engine/style-model-result-schema.js +44 -44
- package/dist/safe-bash-docx-engine/styles.js +18 -18
- package/dist/safe-bash-docx-engine/table-edit.js +27 -27
- package/dist/safe-bash-docx-engine/table-read.js +16 -16
- package/dist/safe-bash-docx-engine/template.js +22 -22
- package/dist/safe-bash-docx-engine/text-replace.js +20 -20
- package/dist/safe-bash-docx-engine/text-resource-read.js +16 -16
- package/dist/safe-bash-docx-engine/text.js +16 -16
- package/dist/safe-bash-docx-engine/validation.js +7 -7
- package/dist/safe-bash-docx-engine/xml-parts.js +22 -22
- package/dist/safe-bash-network-engine/index.js +4 -4
- package/dist/safe-bash-network-engine/transfer.js +12 -12
- package/dist/safe-bash-presentation-engine/accessibility.js +15 -15
- package/dist/safe-bash-presentation-engine/animation-editing.js +5 -5
- package/dist/safe-bash-presentation-engine/animations.js +5 -5
- package/dist/safe-bash-presentation-engine/backgrounds.js +6 -6
- package/dist/safe-bash-presentation-engine/chart-editing.js +18 -18
- package/dist/safe-bash-presentation-engine/chart-object-operations.js +12 -12
- package/dist/safe-bash-presentation-engine/charts.js +15 -15
- package/dist/safe-bash-presentation-engine/command-placeholder.js +39 -38
- package/dist/safe-bash-presentation-engine/comments.js +6 -6
- package/dist/safe-bash-presentation-engine/connector-operations.js +16 -16
- package/dist/safe-bash-presentation-engine/connectors.js +13 -13
- package/dist/safe-bash-presentation-engine/diff.js +21 -20
- package/dist/safe-bash-presentation-engine/drawing-format.js +7 -7
- package/dist/safe-bash-presentation-engine/drawing-operations.js +15 -15
- package/dist/safe-bash-presentation-engine/drawing-schema.js +8 -8
- package/dist/safe-bash-presentation-engine/equations.js +6 -6
- package/dist/safe-bash-presentation-engine/fields.js +6 -6
- package/dist/safe-bash-presentation-engine/image-extraction.js +7 -7
- package/dist/safe-bash-presentation-engine/image-formatting.js +16 -16
- package/dist/safe-bash-presentation-engine/image-insertion.js +6 -6
- package/dist/safe-bash-presentation-engine/image-replacement.js +7 -7
- package/dist/safe-bash-presentation-engine/images.js +6 -6
- package/dist/safe-bash-presentation-engine/index.js +96 -95
- package/dist/safe-bash-presentation-engine/layouts.js +5 -5
- package/dist/safe-bash-presentation-engine/links.js +5 -5
- package/dist/safe-bash-presentation-engine/masters.js +4 -4
- package/dist/safe-bash-presentation-engine/media-editing.js +10 -10
- package/dist/safe-bash-presentation-engine/media-extraction.js +6 -6
- package/dist/safe-bash-presentation-engine/media.js +5 -5
- package/dist/safe-bash-presentation-engine/memberships.d.ts +1 -0
- package/dist/safe-bash-presentation-engine/memberships.js +12 -6
- package/dist/safe-bash-presentation-engine/notes.js +6 -6
- package/dist/safe-bash-presentation-engine/ole-insertion.js +6 -6
- package/dist/safe-bash-presentation-engine/opaque-objects.js +2 -2
- package/dist/safe-bash-presentation-engine/package-tools.js +6 -6
- package/dist/safe-bash-presentation-engine/presentation-model.js +38 -37
- package/dist/safe-bash-presentation-engine/presentation-settings.d.ts +1 -0
- package/dist/safe-bash-presentation-engine/presentation-settings.js +12 -5
- package/dist/safe-bash-presentation-engine/properties.js +7 -6
- package/dist/safe-bash-presentation-engine/retained-inspection.js +3 -3
- package/dist/safe-bash-presentation-engine/retained-memberships.d.ts +25 -0
- package/dist/safe-bash-presentation-engine/retained-presentation-settings.d.ts +25 -0
- package/dist/safe-bash-presentation-engine/retained-text.d.ts +24 -4
- package/dist/safe-bash-presentation-engine/retained-text.js +17 -15
- package/dist/safe-bash-presentation-engine/sanitize.js +8 -7
- package/dist/safe-bash-presentation-engine/selectors.js +2 -2
- package/dist/safe-bash-presentation-engine/shape-groups.js +15 -15
- package/dist/safe-bash-presentation-engine/shape-operations.js +14 -14
- package/dist/safe-bash-presentation-engine/shape-path-operations.js +16 -16
- package/dist/safe-bash-presentation-engine/shape-paths.js +5 -5
- package/dist/safe-bash-presentation-engine/shape-selection.js +15 -15
- package/dist/safe-bash-presentation-engine/shape-transforms.js +5 -5
- package/dist/safe-bash-presentation-engine/shapes.js +11 -11
- package/dist/safe-bash-presentation-engine/slide-copy.js +7 -5
- package/dist/safe-bash-presentation-engine/slide-import.js +6 -6
- package/dist/safe-bash-presentation-engine/slide-merge-split.js +8 -8
- package/dist/safe-bash-presentation-engine/slide-model.js +24 -24
- package/dist/safe-bash-presentation-engine/slide-removal.js +7 -7
- package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +2 -2
- package/dist/safe-bash-presentation-engine/slides.js +5 -5
- package/dist/safe-bash-presentation-engine/table-operations.js +17 -17
- package/dist/safe-bash-presentation-engine/table-spans.js +16 -16
- package/dist/safe-bash-presentation-engine/tables.js +15 -15
- package/dist/safe-bash-presentation-engine/tags.js +6 -6
- package/dist/safe-bash-presentation-engine/template-bindings.js +16 -16
- package/dist/safe-bash-presentation-engine/template-repeat.js +24 -22
- package/dist/safe-bash-presentation-engine/text-fitting.js +11 -11
- package/dist/safe-bash-presentation-engine/text-frames.js +11 -11
- package/dist/safe-bash-presentation-engine/text-paragraphs.js +11 -11
- package/dist/safe-bash-presentation-engine/text-reading.js +3 -3
- package/dist/safe-bash-presentation-engine/text-replacement.js +6 -6
- package/dist/safe-bash-presentation-engine/text-runs.js +8 -8
- package/dist/safe-bash-presentation-engine/themes.js +5 -5
- package/dist/safe-bash-presentation-engine/transitions.js +5 -5
- package/dist/safe-bash-presentation-engine/validation.js +2 -2
- package/dist/safe-bash-presentation-engine/xml-parts.js +5 -5
- package/dist/safe-bash-xml-engine/document.js +2 -2
- package/dist/safe-bash-xml-engine/index.js +2 -2
- package/dist/safe-bash-xml-engine/recovery.d.ts +6 -2
- package/dist/safe-bash-xml-engine/stored-document.d.ts +2 -1
- package/dist/safe-bash-xml-engine/stored-document.js +1 -1
- package/dist/safe-bash-xml-engine/{stored-namespaces.d.ts → stored-map.d.ts} +6 -6
- package/dist/safe-bash-zip-engine/index.js +3 -3
- package/dist/safe-bash-zip-engine/zip/repair.js +3 -3
- package/dist/safe-bash-zip-engine/zip/sfx.js +3 -3
- package/dist/safe-bash-zip-engine/zip-format.js +3 -3
- package/dist/spreadsheet-engine/formatting/cell-text.js +1 -1
- package/dist/spreadsheet-engine/{rendering/print → formatting}/general-number.js +3 -3
- package/dist/spreadsheet-engine/formulas/functions/python-printf.js +9 -7
- package/dist/spreadsheet-engine/solver/program.js +3 -2
- package/dist/spreadsheet-engine/solver/run.js +8 -2
- package/dist/spreadsheet-engine/solver/sensitivity.d.ts +4 -2
- package/dist/spreadsheet-engine/solver/sensitivity.js +80 -42
- package/dist/spreadsheet-format-xls/biff-properties-merge.d.ts +2 -1
- package/dist/spreadsheet-format-xls/biff-properties-merge.js +35 -29
- package/dist/spreadsheet-format-xls/biff-properties-write.js +16 -7
- package/dist/spreadsheet-format-xls/biff-property-names.d.ts +3 -0
- package/dist/spreadsheet-format-xls/biff-property-names.js +44 -1
- package/dist/spreadsheet-format-xls/biff-property-observations.d.ts +33 -0
- package/dist/spreadsheet-format-xls/biff-property-observations.js +160 -0
- package/package.json +6 -4
- package/third-party/pdf-ast/THIRD_PARTY_NOTICES.md +15 -0
- package/third-party/pdf-ast/licenses/PYTHON-PSF.txt +254 -0
- package/third-party/pdf-ast/licenses/V8-BSD.txt +61 -0
- package/dist/safe-bash/command-chunks/biff-KLS4T7FP-UO3CXFFF.js +0 -5581
- package/dist/safe-bash/command-chunks/chunk-6EZWG56T.js +0 -455
- package/dist/safe-bash/command-chunks/model-store-I7YAWL5V.js +0 -54
- package/dist/safe-bash/command-chunks/{chunk-SRXARACJ.js → chunk-3TP4SSPS.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-NCNHJRIY.js → chunk-3W3HLPCX.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-P4OWVKMD.js → chunk-BQXKO3X7.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-OCOJMKDP.js → chunk-CVMHDJ7J.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-AV6N7DDA.js → chunk-DDYPQAXN.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-FEKECRJP.js → chunk-EBTKM7KX.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WVD5WZXD.js → chunk-FPNUGKCX.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-6W4RMBFH.js → chunk-N6VNHC3B.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-M3OXQXCU.js → chunk-NBRXQUK7.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-LECGQSQW.js → chunk-SF56V6QK.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-2ANW3FXH.js → chunk-U33GIOUY.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-5QXRIZSS.js → chunk-V3NKL42J.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-OEKLEUUW.js → chunk-YZE7BKHC.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WXW665TV.js → chunk-ZSHXZ3XG.js} +6 -6
- package/dist/safe-bash/command-chunks/{dif-BXKPQOCO-4KB3RC6G.js → dif-BXKPQOCO-FVJYYGYB.js} +4 -4
- package/dist/safe-bash/command-chunks/{pln-DFS7VLVS-OVOBS4QX.js → pln-DFS7VLVS-JATX6FS7.js} +3 -3
- package/dist/safe-bash/command-chunks/{psion-YBI6JEQI-GY4S6ZLC.js → psion-YBI6JEQI-6OMC2PGC.js} +3 -3
- package/dist/safe-bash/command-chunks/{sylk-25D7TL2Y-RU6ANKGT.js → sylk-25D7TL2Y-NJKBZZTF.js} +4 -4
- /package/dist/spreadsheet-engine/{rendering/print → formatting}/general-number.d.ts +0 -0
|
@@ -7,6 +7,13 @@ function encodeUtf8(text) {
|
|
|
7
7
|
function decodeUtf8(bytes) {
|
|
8
8
|
return TEXT_DECODER.decode(bytes);
|
|
9
9
|
}
|
|
10
|
+
function decodeLatin1(bytes) {
|
|
11
|
+
let out = "";
|
|
12
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
13
|
+
out += String.fromCharCode(bytes[i]);
|
|
14
|
+
}
|
|
15
|
+
return out;
|
|
16
|
+
}
|
|
10
17
|
function decodeFourCC(bytes, offset = 0) {
|
|
11
18
|
return String.fromCharCode(
|
|
12
19
|
bytes[offset] ?? 32,
|
|
@@ -332968,6 +332975,122 @@ function probeSampleFormat(type, codecName) {
|
|
|
332968
332975
|
}[codecName] ?? "fltp";
|
|
332969
332976
|
}
|
|
332970
332977
|
|
|
332978
|
+
// packages/mp4-ast/src/probe-stream.ts
|
|
332979
|
+
var CODEC_LONG_NAMES = {
|
|
332980
|
+
h264: "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
|
|
332981
|
+
hevc: "H.265 / HEVC (High Efficiency Video Coding)",
|
|
332982
|
+
av1: "Alliance for Open Media AV1",
|
|
332983
|
+
vp8: "On2 VP8",
|
|
332984
|
+
vp9: "Google VP9",
|
|
332985
|
+
mpeg4: "MPEG-4 part 2",
|
|
332986
|
+
mjpeg: "Motion JPEG",
|
|
332987
|
+
png: "PNG (Portable Network Graphics) image",
|
|
332988
|
+
gif: "GIF (Graphics Interchange Format)",
|
|
332989
|
+
webp: "WebP image",
|
|
332990
|
+
rawvideo: "raw video",
|
|
332991
|
+
aac: "AAC (Advanced Audio Coding)",
|
|
332992
|
+
mp3: "MP3 (MPEG audio layer 3)",
|
|
332993
|
+
opus: "Opus (Opus Interactive Audio Codec)",
|
|
332994
|
+
vorbis: "Vorbis",
|
|
332995
|
+
flac: "FLAC (Free Lossless Audio Codec)",
|
|
332996
|
+
alac: "ALAC (Apple Lossless Audio Codec)",
|
|
332997
|
+
pcm_s16le: "PCM signed 16-bit little-endian",
|
|
332998
|
+
pcm_s16be: "PCM signed 16-bit big-endian",
|
|
332999
|
+
mov_text: "3GPP Timed Text subtitle",
|
|
333000
|
+
webvtt: "WebVTT subtitle",
|
|
333001
|
+
subrip: "SubRip subtitle"
|
|
333002
|
+
};
|
|
333003
|
+
function buildProbeStream(track, desc, stats, idx, containerFormat) {
|
|
333004
|
+
const codecName = desc?.codecName ?? (track.type === "video" ? "h264" : "aac");
|
|
333005
|
+
const codecLongName = CODEC_LONG_NAMES[codecName] ?? codecName;
|
|
333006
|
+
const rawTag = desc?.formatFourCC ?? (track.type === "video" ? "avc1" : "mp4a");
|
|
333007
|
+
const tagFourCC = Array.from(rawTag).map((c) => c.charCodeAt(0) < 32 ? `[${c.charCodeAt(0)}]` : c).join("");
|
|
333008
|
+
const sampleFormat = probeSampleFormat(track.type, codecName);
|
|
333009
|
+
const tagHex = containerFormat === "wav" ? "0x" + (rawTag.charCodeAt(0) | rawTag.charCodeAt(1) << 8).toString(16).padStart(4, "0") : "0x" + Array.from(rawTag.padEnd(4, " ").slice(0, 4)).map((c) => c.charCodeAt(0).toString(16).padStart(2, "0")).join("");
|
|
333010
|
+
const durationSec = track.duration / Math.max(1, track.timescale);
|
|
333011
|
+
const totalBytes = stats.totalBytes;
|
|
333012
|
+
const bitRate = durationSec > 0 ? String(Math.round(totalBytes * 8 / durationSec)) : "0";
|
|
333013
|
+
const nbFrames = stats.count;
|
|
333014
|
+
const sampleTicks = stats.ticks;
|
|
333015
|
+
const fpsNum = nbFrames * track.timescale;
|
|
333016
|
+
const fpsGcd = gcd(fpsNum, sampleTicks || 1);
|
|
333017
|
+
const avgFrameRate = track.type === "video" && sampleTicks > 0 ? `${fpsNum / fpsGcd}/${sampleTicks / fpsGcd}` : "0/0";
|
|
333018
|
+
const w = track.width ?? desc?.width;
|
|
333019
|
+
const h = track.height ?? desc?.height;
|
|
333020
|
+
const darGcd = w && h ? gcd(w, h) : 1;
|
|
333021
|
+
const streamTags = {
|
|
333022
|
+
language: track.language || "und"
|
|
333023
|
+
};
|
|
333024
|
+
if (track.handlerName) streamTags.handler_name = track.handlerName;
|
|
333025
|
+
if (track.rotation) streamTags.rotate = String(track.rotation);
|
|
333026
|
+
return {
|
|
333027
|
+
index: idx,
|
|
333028
|
+
id: `0x${track.id.toString(16)}`,
|
|
333029
|
+
codec_name: codecName,
|
|
333030
|
+
codec_long_name: codecLongName,
|
|
333031
|
+
profile: desc?.profile,
|
|
333032
|
+
codec_type: track.type,
|
|
333033
|
+
codec_tag_string: tagFourCC,
|
|
333034
|
+
codec_tag: tagHex,
|
|
333035
|
+
width: w,
|
|
333036
|
+
height: h,
|
|
333037
|
+
coded_width: w ? Math.ceil(w / 16) * 16 : void 0,
|
|
333038
|
+
coded_height: h ? Math.ceil(h / 16) * 16 : void 0,
|
|
333039
|
+
has_b_frames: track.type === "video" ? stats.hasCts ? 1 : 0 : void 0,
|
|
333040
|
+
sample_aspect_ratio: track.type === "video" ? `${desc?.sarWidth ?? 1}:${desc?.sarHeight ?? 1}` : void 0,
|
|
333041
|
+
display_aspect_ratio: track.type === "video" && w && h ? `${w / darGcd}:${h / darGcd}` : void 0,
|
|
333042
|
+
pix_fmt: track.type === "video" ? desc?.pixFmt ?? "yuv420p" : void 0,
|
|
333043
|
+
level: desc?.level,
|
|
333044
|
+
color_range: track.type === "video" ? "tv" : void 0,
|
|
333045
|
+
color_space: track.type === "video" ? "bt709" : void 0,
|
|
333046
|
+
sample_fmt: sampleFormat,
|
|
333047
|
+
sample_rate: track.type === "audio" ? String(desc?.sampleRate ?? track.timescale) : void 0,
|
|
333048
|
+
channels: track.type === "audio" ? desc?.channels ?? 2 : void 0,
|
|
333049
|
+
channel_layout: track.type === "audio" ? (desc?.channels ?? 2) === 1 ? "mono" : "stereo" : void 0,
|
|
333050
|
+
bits_per_sample: track.type === "audio" ? desc?.bitsPerSample ?? 16 : void 0,
|
|
333051
|
+
r_frame_rate: avgFrameRate,
|
|
333052
|
+
avg_frame_rate: avgFrameRate,
|
|
333053
|
+
time_base: `1/${track.timescale}`,
|
|
333054
|
+
start_pts: stats.firstPts,
|
|
333055
|
+
start_time: (stats.firstPts / Math.max(1, track.timescale)).toFixed(6),
|
|
333056
|
+
duration_ts: track.duration,
|
|
333057
|
+
duration: durationSec.toFixed(6),
|
|
333058
|
+
bit_rate: bitRate,
|
|
333059
|
+
nb_frames: String(nbFrames),
|
|
333060
|
+
disposition: {
|
|
333061
|
+
default: track.enabled ? 1 : 0,
|
|
333062
|
+
dub: 0,
|
|
333063
|
+
original: 0,
|
|
333064
|
+
comment: 0,
|
|
333065
|
+
lyrics: 0,
|
|
333066
|
+
karaoke: 0,
|
|
333067
|
+
forced: 0,
|
|
333068
|
+
hearing_impaired: 0,
|
|
333069
|
+
visual_impaired: 0,
|
|
333070
|
+
clean_effects: 0,
|
|
333071
|
+
attached_pic: 0,
|
|
333072
|
+
timed_thumbnails: 0
|
|
333073
|
+
},
|
|
333074
|
+
tags: streamTags,
|
|
333075
|
+
side_data_list: track.rotation ? [{ side_data_type: "Display Matrix", rotation: -track.rotation }] : void 0
|
|
333076
|
+
};
|
|
333077
|
+
}
|
|
333078
|
+
|
|
333079
|
+
// packages/mp4-ast/src/mp4-metadata.ts
|
|
333080
|
+
var mp4TextMetadataKeys = {
|
|
333081
|
+
"\xA9nam": "title",
|
|
333082
|
+
"\xA9ART": "artist",
|
|
333083
|
+
aART: "albumArtist",
|
|
333084
|
+
"\xA9alb": "album",
|
|
333085
|
+
"\xA9day": "date",
|
|
333086
|
+
"\xA9cmt": "comment",
|
|
333087
|
+
"\xA9gen": "genre",
|
|
333088
|
+
"\xA9too": "encoder",
|
|
333089
|
+
desc: "description",
|
|
333090
|
+
cprt: "copyright"
|
|
333091
|
+
};
|
|
333092
|
+
var mp4ProbeMetadataKeys = ["title", "artist", "album", "date", "comment", "genre", "encoder"];
|
|
333093
|
+
|
|
332971
333094
|
// packages/mp4-ast/src/mp4-box-layout.ts
|
|
332972
333095
|
var containers = /* @__PURE__ */ new Set([
|
|
332973
333096
|
"moov",
|
|
@@ -333426,41 +333549,9 @@ function parseMetadataTags(moov) {
|
|
|
333426
333549
|
}
|
|
333427
333550
|
const text = decodeUtf8(valueBytes).replace(/\0+$/, "");
|
|
333428
333551
|
if (!text) continue;
|
|
333429
|
-
|
|
333430
|
-
|
|
333431
|
-
|
|
333432
|
-
break;
|
|
333433
|
-
case "\xA9ART":
|
|
333434
|
-
tags.artist = text;
|
|
333435
|
-
break;
|
|
333436
|
-
case "aART":
|
|
333437
|
-
tags.albumArtist = text;
|
|
333438
|
-
break;
|
|
333439
|
-
case "\xA9alb":
|
|
333440
|
-
tags.album = text;
|
|
333441
|
-
break;
|
|
333442
|
-
case "\xA9day":
|
|
333443
|
-
tags.date = text;
|
|
333444
|
-
break;
|
|
333445
|
-
case "\xA9cmt":
|
|
333446
|
-
tags.comment = text;
|
|
333447
|
-
break;
|
|
333448
|
-
case "\xA9gen":
|
|
333449
|
-
tags.genre = text;
|
|
333450
|
-
break;
|
|
333451
|
-
case "\xA9too":
|
|
333452
|
-
tags.encoder = text;
|
|
333453
|
-
break;
|
|
333454
|
-
case "desc":
|
|
333455
|
-
tags.description = text;
|
|
333456
|
-
break;
|
|
333457
|
-
case "cprt":
|
|
333458
|
-
tags.copyright = text;
|
|
333459
|
-
break;
|
|
333460
|
-
default:
|
|
333461
|
-
tags.custom[item.type] = text;
|
|
333462
|
-
break;
|
|
333463
|
-
}
|
|
333552
|
+
const key = mp4TextMetadataKeys[item.type];
|
|
333553
|
+
if (key) tags[key] = text;
|
|
333554
|
+
else tags.custom[item.type] = text;
|
|
333464
333555
|
}
|
|
333465
333556
|
return tags;
|
|
333466
333557
|
}
|
|
@@ -334840,30 +334931,6 @@ function* muxMp4Steps(sources, options = {}) {
|
|
|
334840
334931
|
function muxMp4(sources, options = {}) {
|
|
334841
334932
|
return drainWork(muxMp4Steps(sources, options));
|
|
334842
334933
|
}
|
|
334843
|
-
var CODEC_LONG_NAMES = {
|
|
334844
|
-
h264: "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
|
|
334845
|
-
hevc: "H.265 / HEVC (High Efficiency Video Coding)",
|
|
334846
|
-
av1: "Alliance for Open Media AV1",
|
|
334847
|
-
vp8: "On2 VP8",
|
|
334848
|
-
vp9: "Google VP9",
|
|
334849
|
-
mpeg4: "MPEG-4 part 2",
|
|
334850
|
-
mjpeg: "Motion JPEG",
|
|
334851
|
-
png: "PNG (Portable Network Graphics) image",
|
|
334852
|
-
gif: "GIF (Graphics Interchange Format)",
|
|
334853
|
-
webp: "WebP image",
|
|
334854
|
-
rawvideo: "raw video",
|
|
334855
|
-
aac: "AAC (Advanced Audio Coding)",
|
|
334856
|
-
mp3: "MP3 (MPEG audio layer 3)",
|
|
334857
|
-
opus: "Opus (Opus Interactive Audio Codec)",
|
|
334858
|
-
vorbis: "Vorbis",
|
|
334859
|
-
flac: "FLAC (Free Lossless Audio Codec)",
|
|
334860
|
-
alac: "ALAC (Apple Lossless Audio Codec)",
|
|
334861
|
-
pcm_s16le: "PCM signed 16-bit little-endian",
|
|
334862
|
-
pcm_s16be: "PCM signed 16-bit big-endian",
|
|
334863
|
-
mov_text: "3GPP Timed Text subtitle",
|
|
334864
|
-
webvtt: "WebVTT subtitle",
|
|
334865
|
-
subrip: "SubRip subtitle"
|
|
334866
|
-
};
|
|
334867
334934
|
function buildProbeResultFromDoc(doc, byteLength, filename = "input.mp4", options = {}) {
|
|
334868
334935
|
const streams = [];
|
|
334869
334936
|
const packets = [];
|
|
@@ -334872,79 +334939,15 @@ function buildProbeResultFromDoc(doc, byteLength, filename = "input.mp4", option
|
|
|
334872
334939
|
const track = doc.tracks[idx];
|
|
334873
334940
|
const materialized = materializeTrackSamples(track);
|
|
334874
334941
|
const desc = materialized.codecDescriptions[0];
|
|
334875
|
-
const
|
|
334876
|
-
|
|
334877
|
-
|
|
334878
|
-
|
|
334879
|
-
|
|
334880
|
-
|
|
334881
|
-
|
|
334882
|
-
|
|
334883
|
-
const
|
|
334884
|
-
const nbFrames = materialized.samples.length;
|
|
334885
|
-
const sampleTicks = materialized.samples.reduce((total, sample) => total + sample.duration, 0);
|
|
334886
|
-
const fpsNum = nbFrames * track.timescale;
|
|
334887
|
-
const fpsGcd = gcd(fpsNum, sampleTicks || 1);
|
|
334888
|
-
const avgFrameRate = track.type === "video" && sampleTicks > 0 ? `${fpsNum / fpsGcd}/${sampleTicks / fpsGcd}` : "0/0";
|
|
334889
|
-
const w = track.width ?? desc?.width;
|
|
334890
|
-
const h = track.height ?? desc?.height;
|
|
334891
|
-
const darGcd = w && h ? gcd(w, h) : 1;
|
|
334892
|
-
const streamTags = {
|
|
334893
|
-
language: track.language || "und"
|
|
334894
|
-
};
|
|
334895
|
-
if (track.handlerName) streamTags.handler_name = track.handlerName;
|
|
334896
|
-
if (track.rotation) streamTags.rotate = String(track.rotation);
|
|
334897
|
-
streams.push({
|
|
334898
|
-
index: idx,
|
|
334899
|
-
id: `0x${track.id.toString(16)}`,
|
|
334900
|
-
codec_name: codecName,
|
|
334901
|
-
codec_long_name: codecLongName,
|
|
334902
|
-
profile: desc?.profile,
|
|
334903
|
-
codec_type: track.type,
|
|
334904
|
-
codec_tag_string: tagFourCC,
|
|
334905
|
-
codec_tag: tagHex,
|
|
334906
|
-
width: w,
|
|
334907
|
-
height: h,
|
|
334908
|
-
coded_width: w ? Math.ceil(w / 16) * 16 : void 0,
|
|
334909
|
-
coded_height: h ? Math.ceil(h / 16) * 16 : void 0,
|
|
334910
|
-
has_b_frames: track.type === "video" ? materialized.samples.some((s) => s.cts !== 0) ? 1 : 0 : void 0,
|
|
334911
|
-
sample_aspect_ratio: track.type === "video" ? `${desc?.sarWidth ?? 1}:${desc?.sarHeight ?? 1}` : void 0,
|
|
334912
|
-
display_aspect_ratio: track.type === "video" && w && h ? `${w / darGcd}:${h / darGcd}` : void 0,
|
|
334913
|
-
pix_fmt: track.type === "video" ? desc?.pixFmt ?? "yuv420p" : void 0,
|
|
334914
|
-
level: desc?.level,
|
|
334915
|
-
color_range: track.type === "video" ? "tv" : void 0,
|
|
334916
|
-
color_space: track.type === "video" ? "bt709" : void 0,
|
|
334917
|
-
sample_fmt: sampleFormat,
|
|
334918
|
-
sample_rate: track.type === "audio" ? String(desc?.sampleRate ?? track.timescale) : void 0,
|
|
334919
|
-
channels: track.type === "audio" ? desc?.channels ?? 2 : void 0,
|
|
334920
|
-
channel_layout: track.type === "audio" ? (desc?.channels ?? 2) === 1 ? "mono" : "stereo" : void 0,
|
|
334921
|
-
bits_per_sample: track.type === "audio" ? desc?.bitsPerSample ?? 16 : void 0,
|
|
334922
|
-
r_frame_rate: avgFrameRate,
|
|
334923
|
-
avg_frame_rate: avgFrameRate,
|
|
334924
|
-
time_base: `1/${track.timescale}`,
|
|
334925
|
-
start_pts: materialized.samples[0]?.pts ?? 0,
|
|
334926
|
-
start_time: ((materialized.samples[0]?.pts ?? 0) / Math.max(1, track.timescale)).toFixed(6),
|
|
334927
|
-
duration_ts: track.duration,
|
|
334928
|
-
duration: durationSec.toFixed(6),
|
|
334929
|
-
bit_rate: bitRate,
|
|
334930
|
-
nb_frames: String(nbFrames),
|
|
334931
|
-
disposition: {
|
|
334932
|
-
default: track.enabled ? 1 : 0,
|
|
334933
|
-
dub: 0,
|
|
334934
|
-
original: 0,
|
|
334935
|
-
comment: 0,
|
|
334936
|
-
lyrics: 0,
|
|
334937
|
-
karaoke: 0,
|
|
334938
|
-
forced: 0,
|
|
334939
|
-
hearing_impaired: 0,
|
|
334940
|
-
visual_impaired: 0,
|
|
334941
|
-
clean_effects: 0,
|
|
334942
|
-
attached_pic: 0,
|
|
334943
|
-
timed_thumbnails: 0
|
|
334944
|
-
},
|
|
334945
|
-
tags: streamTags,
|
|
334946
|
-
side_data_list: track.rotation ? [{ side_data_type: "Display Matrix", rotation: -track.rotation }] : void 0
|
|
334947
|
-
});
|
|
334942
|
+
const stream = buildProbeStream(track, desc, {
|
|
334943
|
+
totalBytes: materialized.samples.reduce((total, sample) => total + sample.size, 0),
|
|
334944
|
+
count: materialized.samples.length,
|
|
334945
|
+
ticks: materialized.samples.reduce((total, sample) => total + sample.duration, 0),
|
|
334946
|
+
firstPts: materialized.samples[0]?.pts ?? 0,
|
|
334947
|
+
hasCts: materialized.samples.some((sample) => sample.cts !== 0)
|
|
334948
|
+
}, idx, doc.containerFormat);
|
|
334949
|
+
streams.push(stream);
|
|
334950
|
+
const w = stream.width, h = stream.height, sampleFormat = stream.sample_fmt;
|
|
334948
334951
|
if (options.showPackets || options.showFrames) {
|
|
334949
334952
|
let bytePos = 0;
|
|
334950
334953
|
for (const s of materialized.samples) {
|
|
@@ -334999,13 +335002,10 @@ function buildProbeResultFromDoc(doc, byteLength, filename = "input.mp4", option
|
|
|
334999
335002
|
if (doc.compatibleBrands && doc.compatibleBrands.length > 0) {
|
|
335000
335003
|
formatTags.compatible_brands = doc.compatibleBrands.join("");
|
|
335001
335004
|
}
|
|
335002
|
-
|
|
335003
|
-
|
|
335004
|
-
|
|
335005
|
-
|
|
335006
|
-
if (doc.metadata.comment) formatTags.comment = doc.metadata.comment;
|
|
335007
|
-
if (doc.metadata.genre) formatTags.genre = doc.metadata.genre;
|
|
335008
|
-
if (doc.metadata.encoder) formatTags.encoder = doc.metadata.encoder;
|
|
335005
|
+
for (const key of mp4ProbeMetadataKeys) {
|
|
335006
|
+
const value = doc.metadata[key];
|
|
335007
|
+
if (value) formatTags[key] = value;
|
|
335008
|
+
}
|
|
335009
335009
|
const overallBitRate = doc.durationSeconds > 0 ? String(Math.round(byteLength * 8 / doc.durationSeconds)) : "0";
|
|
335010
335010
|
return {
|
|
335011
335011
|
streams,
|
|
@@ -339594,6 +339594,112 @@ function createMediaAstRegistry(plugins) {
|
|
|
339594
339594
|
};
|
|
339595
339595
|
}
|
|
339596
339596
|
|
|
339597
|
+
// packages/mp4-ast/src/mp4-metadata-source.ts
|
|
339598
|
+
async function probeMp4MetadataSource(source, durationSeconds2, options = {}) {
|
|
339599
|
+
const work = { ...options, budget: options.budget ?? new MediaBudgetTracker() };
|
|
339600
|
+
work.signal?.throwIfAborted();
|
|
339601
|
+
work.budget.checkInputBytes(source.size);
|
|
339602
|
+
async function read(offset, length) {
|
|
339603
|
+
work.budget.checkCpu();
|
|
339604
|
+
return readMp4SampleRange(source, offset, length, work);
|
|
339605
|
+
}
|
|
339606
|
+
async function first(parent, type) {
|
|
339607
|
+
if (parent?.children) {
|
|
339608
|
+
for await (const box of scanMp4Boxes(source, { ...parent.children, ...work })) if (box.type === type) return box;
|
|
339609
|
+
}
|
|
339610
|
+
}
|
|
339611
|
+
let moov, ftyp, styp;
|
|
339612
|
+
for await (const box of scanMp4Boxes(source, work)) {
|
|
339613
|
+
if (box.type === "moov") moov ??= box;
|
|
339614
|
+
else if (box.type === "ftyp") ftyp ??= box;
|
|
339615
|
+
else if (box.type === "styp") styp ??= box;
|
|
339616
|
+
}
|
|
339617
|
+
if (!moov) throw new Error("Invalid MP4/ISOBMFF file: missing 'moov' atom");
|
|
339618
|
+
const tags = { major_brand: "isom", minor_version: "512" }, brands = ftyp ?? styp;
|
|
339619
|
+
if (brands && brands.payloadSize >= 8) {
|
|
339620
|
+
const prefix = new BinaryReader(await read(brands.payloadOffset, 8));
|
|
339621
|
+
tags.major_brand = prefix.readFourCC();
|
|
339622
|
+
tags.minor_version = String(prefix.readU32BE());
|
|
339623
|
+
const length = Math.floor((brands.payloadSize - 8) / 4) * 4;
|
|
339624
|
+
if (length) tags.compatible_brands = mp4SourceText(source, brands.payloadOffset + 8, length, work, true);
|
|
339625
|
+
}
|
|
339626
|
+
const udta = await first(moov, "udta"), meta = await first(udta, "meta") ?? await first(moov, "meta"), ilst = await first(meta, "ilst");
|
|
339627
|
+
const values = {};
|
|
339628
|
+
if (ilst?.children) for await (const item of scanMp4Boxes(source, { ...ilst.children, ...work })) {
|
|
339629
|
+
const key = mp4TextMetadataKeys[item.type];
|
|
339630
|
+
if (!key || !mp4ProbeMetadataKeys.some((name) => name === key)) continue;
|
|
339631
|
+
let data;
|
|
339632
|
+
for await (const box of scanMp4Boxes(source, { offset: item.payloadOffset, length: item.payloadSize, ...work })) if (box.type === "data") {
|
|
339633
|
+
data = box;
|
|
339634
|
+
break;
|
|
339635
|
+
}
|
|
339636
|
+
if (!data && item.payloadSize < 8) continue;
|
|
339637
|
+
const value = data ?? item, skip = data && data.payloadSize >= 8 ? 8 : 0;
|
|
339638
|
+
const offset = value.payloadOffset + skip;
|
|
339639
|
+
let length = value.payloadSize - skip;
|
|
339640
|
+
while (length) {
|
|
339641
|
+
const size = Math.min(16384, length), suffix = await read(offset + length - size, size);
|
|
339642
|
+
let end = suffix.length;
|
|
339643
|
+
while (end && suffix[end - 1] === 0) end--;
|
|
339644
|
+
length -= size - end;
|
|
339645
|
+
if (end) break;
|
|
339646
|
+
}
|
|
339647
|
+
if (!length) continue;
|
|
339648
|
+
if (length === 3) {
|
|
339649
|
+
const prefix = await read(offset, 3);
|
|
339650
|
+
if (prefix[0] === 239 && prefix[1] === 187 && prefix[2] === 191) continue;
|
|
339651
|
+
}
|
|
339652
|
+
values[key] = mp4SourceText(source, offset, length, work);
|
|
339653
|
+
}
|
|
339654
|
+
for (const key of mp4ProbeMetadataKeys) if (values[key]) tags[key] = values[key];
|
|
339655
|
+
const chpl = await first(udta, "chpl");
|
|
339656
|
+
async function* chapters() {
|
|
339657
|
+
work.signal?.throwIfAborted();
|
|
339658
|
+
if (!chpl || chpl.payloadSize < 9) return;
|
|
339659
|
+
const end = chpl.payloadOffset + chpl.payloadSize;
|
|
339660
|
+
let at = chpl.payloadOffset + 9, count = (await read(chpl.payloadOffset + 8, 1))[0];
|
|
339661
|
+
if (!count && end - at >= 4) {
|
|
339662
|
+
count = new BinaryReader(await read(at, 4)).readU32BE();
|
|
339663
|
+
at += 4;
|
|
339664
|
+
}
|
|
339665
|
+
let previous;
|
|
339666
|
+
const row = (chapter, finish) => ({ id: chapter.id, time_base: "1/1000", start: Math.round(chapter.start * 1e3), start_time: chapter.start.toFixed(6), end: Math.round(finish * 1e3), end_time: finish.toFixed(6), tags: { title: chapter.title } });
|
|
339667
|
+
for (let id = 0; id < count && end - at >= 9; id++) {
|
|
339668
|
+
const prefix = new BinaryReader(await read(at, 9));
|
|
339669
|
+
at += 9;
|
|
339670
|
+
const start = prefix.readU64BE() / 1e7, length = Math.min(prefix.readU8(), end - at);
|
|
339671
|
+
const title = decodeUtf8(await read(at, length));
|
|
339672
|
+
at += length;
|
|
339673
|
+
if (previous) yield row(previous, start);
|
|
339674
|
+
previous = { id, start, title };
|
|
339675
|
+
}
|
|
339676
|
+
if (previous) yield row(previous, Math.max(previous.start, durationSeconds2));
|
|
339677
|
+
}
|
|
339678
|
+
return { tags, chapters: { [Symbol.asyncIterator]: chapters } };
|
|
339679
|
+
}
|
|
339680
|
+
function mp4SourceText(source, offset, length, work, latin1 = false) {
|
|
339681
|
+
return { kind: "text", async *chunks() {
|
|
339682
|
+
work.signal?.throwIfAborted();
|
|
339683
|
+
work.budget?.allocateMemory(Math.min(length, 16384));
|
|
339684
|
+
try {
|
|
339685
|
+
const decoder = new TextDecoder();
|
|
339686
|
+
for (let used = 0; used < length; ) {
|
|
339687
|
+
work.budget?.checkCpu();
|
|
339688
|
+
const bytes = await readMp4SampleRange(source, offset + used, Math.min(16384, length - used), work);
|
|
339689
|
+
used += bytes.length;
|
|
339690
|
+
const chunk = latin1 ? decodeLatin1(bytes) : decoder.decode(bytes, { stream: true });
|
|
339691
|
+
if (chunk) yield chunk;
|
|
339692
|
+
}
|
|
339693
|
+
if (!latin1) {
|
|
339694
|
+
const tail = decoder.decode();
|
|
339695
|
+
if (tail) yield tail;
|
|
339696
|
+
}
|
|
339697
|
+
} finally {
|
|
339698
|
+
work.budget?.releaseMemory(Math.min(length, 16384));
|
|
339699
|
+
}
|
|
339700
|
+
} };
|
|
339701
|
+
}
|
|
339702
|
+
|
|
339597
339703
|
// packages/mp4-ast/src/esds-source.ts
|
|
339598
339704
|
async function probeEsdsSource(source, range, options = {}) {
|
|
339599
339705
|
options.signal?.throwIfAborted();
|
|
@@ -339664,13 +339770,17 @@ async function* scanMp4CodecDescriptions(source, range, options = {}) {
|
|
|
339664
339770
|
|
|
339665
339771
|
// packages/mp4-ast/src/mp4-packets-source.ts
|
|
339666
339772
|
async function* scanMp4Packets(source, options = {}) {
|
|
339667
|
-
for await (const
|
|
339773
|
+
for await (const record of scanProbeRecords(source, options, "packets")) {
|
|
339774
|
+
if (!("sample" in record)) continue;
|
|
339775
|
+
const { sample, track, bytePos } = record;
|
|
339668
339776
|
const scale = Math.max(1, track.timescale);
|
|
339669
339777
|
yield { codec_type: track.type, stream_index: track.index, pts: sample.pts, pts_time: (sample.pts / scale).toFixed(6), dts: sample.dts, dts_time: (sample.dts / scale).toFixed(6), duration: sample.duration, duration_time: (sample.duration / scale).toFixed(6), size: String(sample.size), pos: String(bytePos), flags: sample.isKeyframe ? "K_" : "__" };
|
|
339670
339778
|
}
|
|
339671
339779
|
}
|
|
339672
339780
|
async function* scanMp4Frames(source, options = {}) {
|
|
339673
|
-
for await (const
|
|
339781
|
+
for await (const record of scanProbeRecords(source, options, "frames")) {
|
|
339782
|
+
if (!("sample" in record)) continue;
|
|
339783
|
+
const { sample, track } = record;
|
|
339674
339784
|
const scale = Math.max(1, track.timescale), ptsTime = (sample.pts / scale).toFixed(6);
|
|
339675
339785
|
yield {
|
|
339676
339786
|
media_type: track.type,
|
|
@@ -339695,8 +339805,9 @@ async function* scanMp4Frames(source, options = {}) {
|
|
|
339695
339805
|
};
|
|
339696
339806
|
}
|
|
339697
339807
|
}
|
|
339698
|
-
async function*
|
|
339808
|
+
async function* scanProbeRecords(source, options, mode) {
|
|
339699
339809
|
options.signal?.throwIfAborted();
|
|
339810
|
+
const withCodec = mode === "frames" || mode === "streams";
|
|
339700
339811
|
const budget = options.budget ?? new MediaBudgetTracker(options.limits), work = { budget, ...options.signal ? { signal: options.signal } : {}, ...options.checkpoint ? { checkpoint: options.checkpoint } : {} };
|
|
339701
339812
|
budget.checkInputBytes(source.size);
|
|
339702
339813
|
const read = async (box, length) => new BinaryReader(box ? await readMp4SampleRange(source, box.payloadOffset, Math.min(length, box.payloadSize), work) : new Uint8Array());
|
|
@@ -339725,27 +339836,31 @@ async function* scanProbeSamples(source, options, withCodec) {
|
|
|
339725
339836
|
const index = trackIndex++;
|
|
339726
339837
|
budget.checkStreams(trackIndex);
|
|
339727
339838
|
const tkhd = await first(trak, "tkhd"), header = await read(tkhd, withCodec ? 96 : 36);
|
|
339728
|
-
let id = index + 1, headerDuration = 0, width, height;
|
|
339839
|
+
let id = index + 1, headerDuration = 0, width, height, enabled = true, rotation = 0;
|
|
339729
339840
|
if ((tkhd?.payloadSize ?? 0) >= 24) {
|
|
339730
339841
|
const version = header.readU8();
|
|
339731
|
-
header.
|
|
339842
|
+
enabled = (header.readU24BE() & 1) !== 0;
|
|
339843
|
+
header.skip(version === 1 ? 16 : 8);
|
|
339732
339844
|
id = header.readU32BE() || id;
|
|
339733
339845
|
header.skip(4);
|
|
339734
339846
|
headerDuration = version === 1 ? header.readU64BE() : header.readU32BE();
|
|
339735
339847
|
if (withCodec) {
|
|
339736
|
-
header.skip(
|
|
339848
|
+
header.skip(16);
|
|
339849
|
+
const matrix = Array.from({ length: 9 }, () => header.readI32BE());
|
|
339850
|
+
rotation = rotationFromMatrix(matrix);
|
|
339737
339851
|
const w = Math.round(header.readFixed16_16()), h = Math.round(header.readFixed16_16());
|
|
339738
339852
|
if (w > 0) width = w;
|
|
339739
339853
|
if (h > 0) height = h;
|
|
339740
339854
|
}
|
|
339741
339855
|
}
|
|
339742
|
-
const mdia = await first(trak, "mdia"), mdhd = await first(mdia, "mdhd"), media = await read(mdhd,
|
|
339743
|
-
let timescale = movieTimescale, declaredDuration = 0;
|
|
339856
|
+
const mdia = await first(trak, "mdia"), mdhd = await first(mdia, "mdhd"), media = await read(mdhd, 34);
|
|
339857
|
+
let timescale = movieTimescale, declaredDuration = 0, language = "und";
|
|
339744
339858
|
if ((mdhd?.payloadSize ?? 0) >= 20) {
|
|
339745
339859
|
const version = media.readU8();
|
|
339746
339860
|
media.skip(3 + (version === 1 ? 16 : 8));
|
|
339747
339861
|
timescale = media.readU32BE() || 1e3;
|
|
339748
339862
|
declaredDuration = version === 1 ? media.readU64BE() : media.readU32BE();
|
|
339863
|
+
language = unpackIsoLanguage(media.readU16BE());
|
|
339749
339864
|
}
|
|
339750
339865
|
const hdlr = await first(mdia, "hdlr"), handler = await read(hdlr, 12);
|
|
339751
339866
|
handler.skip(8);
|
|
@@ -339766,7 +339881,26 @@ async function* scanProbeSamples(source, options, withCodec) {
|
|
|
339766
339881
|
break;
|
|
339767
339882
|
}
|
|
339768
339883
|
}
|
|
339769
|
-
|
|
339884
|
+
let handlerName;
|
|
339885
|
+
if (mode === "streams" && hdlr && hdlr.payloadSize > 24) {
|
|
339886
|
+
const offset = hdlr.payloadOffset + 24;
|
|
339887
|
+
let length = hdlr.payloadSize - 24;
|
|
339888
|
+
for (let used = 0; used < length; ) {
|
|
339889
|
+
const bytes = await readMp4SampleRange(source, offset + used, Math.min(16384, length - used), work), nul = bytes.indexOf(0);
|
|
339890
|
+
budget.checkCpu();
|
|
339891
|
+
if (nul >= 0) {
|
|
339892
|
+
length = used + nul;
|
|
339893
|
+
break;
|
|
339894
|
+
}
|
|
339895
|
+
used += bytes.length;
|
|
339896
|
+
}
|
|
339897
|
+
const text = mp4SourceText(source, offset, length, work);
|
|
339898
|
+
for await (const chunk of text.chunks()) if (chunk) {
|
|
339899
|
+
handlerName = text;
|
|
339900
|
+
break;
|
|
339901
|
+
}
|
|
339902
|
+
}
|
|
339903
|
+
const track = { index, id, type, timescale, width: width ?? codec?.width, height: height ?? codec?.height, codec, enabled, rotation, language, handlerName };
|
|
339770
339904
|
let defaults = { defaultSampleDescriptionIndex: 1, defaultSampleDuration: type === "video" ? 3e3 : 1024, defaultSampleSize: 0, defaultSampleFlags: 0 };
|
|
339771
339905
|
if (mvex?.children) for await (const box of scanMp4Boxes(source, { ...mvex.children, ...work })) {
|
|
339772
339906
|
if (box.type !== "trex" || box.payloadSize < 24) continue;
|
|
@@ -339822,28 +339956,70 @@ async function* scanProbeSamples(source, options, withCodec) {
|
|
|
339822
339956
|
const trackDuration = result.value ?? (duration || declaredDuration || Math.round(headerDuration / Math.max(1, movieTimescale) * timescale));
|
|
339823
339957
|
maxDuration = Math.max(maxDuration, trackDuration / Math.max(1, timescale));
|
|
339824
339958
|
budget.checkDuration(maxDuration);
|
|
339959
|
+
if (mode === "summary") continue;
|
|
339825
339960
|
let bytePos = 0, cursor = 0;
|
|
339961
|
+
const stats = { totalBytes: 0, count: 0, ticks: 0, firstPts: 0, hasCts: false };
|
|
339826
339962
|
const packet = (sample) => {
|
|
339963
|
+
if (mode === "streams") {
|
|
339964
|
+
if (!stats.count) stats.firstPts = sample.pts;
|
|
339965
|
+
stats.count++;
|
|
339966
|
+
stats.totalBytes += sample.size;
|
|
339967
|
+
stats.ticks += sample.duration;
|
|
339968
|
+
stats.hasCts ||= sample.pts !== sample.dts;
|
|
339969
|
+
}
|
|
339827
339970
|
const record = { sample, track, bytePos };
|
|
339828
339971
|
bytePos += sample.size;
|
|
339829
339972
|
return record;
|
|
339830
339973
|
};
|
|
339831
339974
|
for await (const sample of samples()) {
|
|
339832
339975
|
if (type !== "subtitle" || !count || allPacked) {
|
|
339833
|
-
|
|
339976
|
+
const row2 = packet(sample);
|
|
339977
|
+
if (mode !== "streams") yield row2;
|
|
339834
339978
|
continue;
|
|
339835
339979
|
}
|
|
339836
339980
|
const start = Math.max(cursor, Math.round(sample.pts));
|
|
339837
339981
|
if (start > cursor) {
|
|
339838
|
-
|
|
339982
|
+
const row2 = packet({ pts: cursor, dts: cursor, duration: start - cursor, size: 2, isKeyframe: true });
|
|
339983
|
+
if (mode !== "streams") yield row2;
|
|
339839
339984
|
cursor = start;
|
|
339840
339985
|
}
|
|
339841
339986
|
const duration2 = Math.max(1, Math.round(sample.duration));
|
|
339842
|
-
|
|
339987
|
+
const row = packet({ pts: cursor, dts: cursor, duration: duration2, size: sample.size + 2, isKeyframe: true });
|
|
339988
|
+
if (mode !== "streams") yield row;
|
|
339843
339989
|
cursor += duration2;
|
|
339844
339990
|
}
|
|
339991
|
+
if (mode === "streams") yield buildProbeStream({ ...track, duration: trackDuration }, codec, stats, index, "mp4");
|
|
339845
339992
|
}
|
|
339846
339993
|
budget.checkDuration(maxDuration);
|
|
339994
|
+
return { duration: maxDuration, tracks: trackIndex };
|
|
339995
|
+
}
|
|
339996
|
+
async function probeMp4Source(source, options = {}) {
|
|
339997
|
+
const work = { ...options, budget: options.budget ?? new MediaBudgetTracker(options.limits) };
|
|
339998
|
+
const scan = scanProbeRecords(source, work, "summary"), summary = await scan.next();
|
|
339999
|
+
if (!summary.done) throw new Error("Unexpected MP4 summary row");
|
|
340000
|
+
const { duration, tracks } = summary.value, metadata = await probeMp4MetadataSource(source, duration, work);
|
|
340001
|
+
async function* streams() {
|
|
340002
|
+
for await (const row of scanProbeRecords(source, work, "streams")) if (!("sample" in row)) yield row;
|
|
340003
|
+
}
|
|
340004
|
+
return {
|
|
340005
|
+
streams: { [Symbol.asyncIterator]: streams },
|
|
340006
|
+
format: {
|
|
340007
|
+
filename: options.filename ?? "input.mp4",
|
|
340008
|
+
nb_streams: tracks,
|
|
340009
|
+
nb_programs: 0,
|
|
340010
|
+
format_name: "mov,mp4,m4a,3gp,3g2,mj2",
|
|
340011
|
+
format_long_name: "QuickTime / MOV",
|
|
340012
|
+
start_time: "0.000000",
|
|
340013
|
+
duration: duration.toFixed(6),
|
|
340014
|
+
size: String(source.size),
|
|
340015
|
+
bit_rate: duration > 0 ? String(Math.round(source.size * 8 / duration)) : "0",
|
|
340016
|
+
probe_score: 100,
|
|
340017
|
+
tags: metadata.tags
|
|
340018
|
+
},
|
|
340019
|
+
chapters: metadata.chapters,
|
|
340020
|
+
packets: options.showPackets ? scanMp4Packets(source, work) : void 0,
|
|
340021
|
+
frames: options.showFrames ? scanMp4Frames(source, work) : void 0
|
|
340022
|
+
};
|
|
339847
340023
|
}
|
|
339848
340024
|
|
|
339849
340025
|
export {
|
|
@@ -339872,7 +340048,8 @@ export {
|
|
|
339872
340048
|
allMediaAsts,
|
|
339873
340049
|
createMediaAstRegistry,
|
|
339874
340050
|
scanMp4Packets,
|
|
339875
|
-
scanMp4Frames
|
|
340051
|
+
scanMp4Frames,
|
|
340052
|
+
probeMp4Source
|
|
339876
340053
|
};
|
|
339877
340054
|
/*!
|
|
339878
340055
|
Generated portable media codecs.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readTextBodies,
|
|
3
3
|
validateTextReadingOptions
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WRCYZJNO.js";
|
|
5
5
|
import {
|
|
6
6
|
loadShared
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-A32PUWYE.js";
|
|
8
8
|
import {
|
|
9
9
|
SelectionError,
|
|
10
10
|
readSelectionIndex
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3W3HLPCX.js";
|
|
12
12
|
import {
|
|
13
13
|
readPackage
|
|
14
14
|
} from "./chunk-Q65GWGQR.js";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SourceError,
|
|
6
6
|
validateDocxInvocation
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BDGNKRY4.js";
|
|
8
8
|
import {
|
|
9
9
|
publishDocumentArchive
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LTWX23FS.js";
|
|
11
11
|
import {
|
|
12
12
|
PublicationError,
|
|
13
13
|
asPermissionError
|