@jackuait/blok 0.16.1 → 0.17.0
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/blok.cjs +1 -1
- package/dist/blok.iife.js +4 -4
- package/dist/blok.mjs +2 -2
- package/dist/blok.umd.js +4 -4
- package/dist/chunks/{blok-DEVVs3xk.cjs → blok-BPd65xOj.cjs} +11 -11
- package/dist/chunks/{blok-D1e9swtF.mjs → blok-D4ApwnD7.mjs} +776 -780
- package/dist/chunks/constants-C3wBsvmH.cjs +606 -0
- package/dist/chunks/{constants-DfGAwzgk.mjs → constants-DObdf8NU.mjs} +274 -274
- package/dist/chunks/{i18next-loader-BH_a6G9t.mjs → i18next-loader-BMhspWFn.mjs} +1 -1
- package/dist/chunks/{i18next-loader-BID4jAFG.cjs → i18next-loader-CNLosgId.cjs} +1 -1
- package/dist/chunks/{lightweight-i18n-Clk37huC.cjs → lightweight-i18n-ByswFbdt.cjs} +1 -1
- package/dist/chunks/{lightweight-i18n-B0VO8Rft.mjs → lightweight-i18n-Ck1HlVxq.mjs} +32 -0
- package/dist/chunks/{messages-BGoPxZ5n.mjs → messages--uPFKcl3.mjs} +33 -1
- package/dist/{messages-BmKhZE7I.mjs → chunks/messages-0ZOxg81Y.mjs} +33 -1
- package/dist/chunks/{messages-BxhJFFrR.mjs → messages-1H2SY5H1.mjs} +33 -1
- package/dist/chunks/{messages-px_8gpHT.cjs → messages-1bAMgAsO.cjs} +1 -1
- package/dist/chunks/{messages-CO_hj1x6.cjs → messages-3B44ZmLZ.cjs} +1 -1
- package/dist/chunks/{messages-5tb-mSXS.cjs → messages-3iZ6jJ6e.cjs} +1 -1
- package/dist/chunks/{messages-BVuodJIJ.cjs → messages-5Rp1xyL4.cjs} +1 -1
- package/dist/chunks/{messages-CgGwGZs22.cjs → messages-5Vbzn-DL2.cjs} +1 -1
- package/dist/chunks/{messages-De0Fkl0K.mjs → messages-61uWTg1y.mjs} +33 -1
- package/dist/chunks/messages-6lqZ4lhc2.cjs +1 -0
- package/dist/chunks/messages-795D2ldP2.cjs +1 -0
- package/dist/chunks/{messages-CUxk6xrQ.cjs → messages-79WWudxY.cjs} +1 -1
- package/dist/chunks/{messages-B-3_M44j.cjs → messages-8uD5ctYP.cjs} +1 -1
- package/dist/{messages-Z8HMjhe9.mjs → chunks/messages-9gvi5jul.mjs} +33 -1
- package/dist/chunks/{messages-BDNdC6-X.cjs → messages-B0o3rVBB.cjs} +1 -1
- package/dist/chunks/messages-B1h0nDQW.cjs +1 -0
- package/dist/chunks/{messages-BPYQEADI.cjs → messages-B37vUkBi.cjs} +1 -1
- package/dist/{messages-BrkXHD2D2.mjs → chunks/messages-B4BvJtlu.mjs} +33 -1
- package/dist/{messages-CsHwUgSZ.mjs → chunks/messages-BChCPw99.mjs} +33 -1
- package/dist/chunks/{messages-DkINYHo4.cjs → messages-BDs_gdD_.cjs} +1 -1
- package/dist/chunks/{messages-Cz7AbEFm.cjs → messages-BE6rW2R-.cjs} +1 -1
- package/dist/{messages-DFKu1WGX2.mjs → chunks/messages-BFGgLdIA2.mjs} +33 -1
- package/dist/{messages-D1jUHOKr.mjs → chunks/messages-BFcq7wsx.mjs} +33 -1
- package/dist/{messages-BbFJ2r9p.mjs → chunks/messages-BGaAuDRS.mjs} +33 -1
- package/dist/chunks/{messages-Dml6u25s2.cjs → messages-BGoJHXUk2.cjs} +1 -1
- package/dist/chunks/{messages-DDnB1EFE2.mjs → messages-BIHeeP7X2.mjs} +33 -1
- package/dist/{messages-6RcfJ59a.mjs → chunks/messages-BIQ2VT8X2.mjs} +33 -1
- package/dist/chunks/{messages-Bnm45Rmp.mjs → messages-BK32XCpH.mjs} +33 -1
- package/dist/{messages-BkNVOuvO2.mjs → chunks/messages-BKSDnjOs.mjs} +33 -1
- package/dist/chunks/{messages-CdOX6JHb2.mjs → messages-BMNmXaC8.mjs} +33 -1
- package/dist/{messages-Cg3w36Bc.mjs → chunks/messages-BNuGVAEy.mjs} +33 -1
- package/dist/chunks/{messages-C62iC79d2.mjs → messages-BQEh67Mi2.mjs} +33 -1
- package/dist/chunks/{messages-BG1Tn41d.cjs → messages-BQOx3XGd.cjs} +1 -1
- package/dist/{messages-DaoTSrJW.mjs → chunks/messages-BQUzqXIO.mjs} +33 -1
- package/dist/chunks/{messages-DuOkV5T_.mjs → messages-BTKPcoLu.mjs} +33 -1
- package/dist/chunks/messages-BXgTHDIw.cjs +1 -0
- package/dist/chunks/{messages-BItPVbHx.cjs → messages-BXvKhyQH.cjs} +1 -1
- package/dist/chunks/{messages-98gouyMa.cjs → messages-BYW-U0iT.cjs} +1 -1
- package/dist/chunks/{messages-Bs9JOJDc.cjs → messages-B_lkWkPQ.cjs} +1 -1
- package/dist/chunks/{messages-Bq7pLz_h2.mjs → messages-BaWaLwcn2.mjs} +33 -1
- package/dist/chunks/{messages-DsWTIuli2.cjs → messages-BeTQxvmX2.cjs} +1 -1
- package/dist/chunks/{messages-BSyXBvUi2.cjs → messages-BfWGa4V82.cjs} +1 -1
- package/dist/{messages-GUgmAfdB.mjs → chunks/messages-Bgzyr5Lh.mjs} +33 -1
- package/dist/chunks/{messages-UoKgx7_8.cjs → messages-BjFB8sow.cjs} +1 -1
- package/dist/chunks/messages-Bjmg_8lv2.cjs +1 -0
- package/dist/chunks/{messages-CVHSfosB.cjs → messages-BlOVJtaj.cjs} +1 -1
- package/dist/{messages-CSVEbRhT.mjs → chunks/messages-BnW_Fwro.mjs} +33 -1
- package/dist/chunks/{messages-BdjiMHzU2.cjs → messages-Bpvja9xW2.cjs} +1 -1
- package/dist/chunks/{messages-BSxgqWqe.cjs → messages-BtMQ6v_L.cjs} +1 -1
- package/dist/chunks/{messages-Cx1kdFH_2.cjs → messages-BvChjyuU2.cjs} +1 -1
- package/dist/chunks/{messages-BSstxb1m2.mjs → messages-Bvge__AJ2.mjs} +33 -1
- package/dist/chunks/{messages-BhTV7PCN.mjs → messages-BwxzN2q3.mjs} +33 -1
- package/dist/chunks/{messages-DubJ63UL.mjs → messages-Byntrl2c.mjs} +33 -1
- package/dist/{messages-BfGAGIg-2.mjs → chunks/messages-C3B8l3Hy.mjs} +33 -1
- package/dist/chunks/{messages-CZQuqbNz2.cjs → messages-C3fAHxfE2.cjs} +1 -1
- package/dist/{messages-BOEP2ly_.mjs → chunks/messages-C56BTPcC.mjs} +33 -1
- package/dist/chunks/{messages-BXmg4Rer2.mjs → messages-C6vijVZv2.mjs} +33 -1
- package/dist/{messages-zoHZbvbe.mjs → chunks/messages-C79Ef9MU.mjs} +33 -1
- package/dist/{messages-CzabNeP5.mjs → chunks/messages-C93gDUHr.mjs} +33 -1
- package/dist/chunks/messages-CAix8jdZ.cjs +1 -0
- package/dist/chunks/{messages-BHE1mg5A2.mjs → messages-CEUDK26P2.mjs} +33 -1
- package/dist/chunks/{messages-D2nTfhRa2.cjs → messages-CEZ528TO2.cjs} +1 -1
- package/dist/chunks/{messages-Ced9OY9X.mjs → messages-CHx6m_Bo.mjs} +33 -1
- package/dist/chunks/{messages-Ck6jEhXV.cjs → messages-CKiWXTe1.cjs} +1 -1
- package/dist/{messages-DfnSbN512.mjs → chunks/messages-CMFcaa9C.mjs} +33 -1
- package/dist/chunks/{messages-jAgR8EPP.cjs → messages-CO4J7Nns.cjs} +1 -1
- package/dist/chunks/messages-COTP4ZJ_2.cjs +1 -0
- package/dist/{messages-TfPmsrxh.mjs → chunks/messages-CV3U2Vsm.mjs} +33 -1
- package/dist/chunks/{messages-BClegbPD.mjs → messages-CYOersvL.mjs} +33 -1
- package/dist/chunks/{messages-B3xnntgx2.mjs → messages-C_s-wv1r2.mjs} +33 -1
- package/dist/{messages-DSmNNjPb.mjs → chunks/messages-CbdaJSfC2.mjs} +33 -1
- package/dist/chunks/{messages-CxVi9cnz.mjs → messages-Ccng4hJ2.mjs} +33 -1
- package/dist/chunks/{messages-CpJW0LBR.cjs → messages-Cgph4q9d.cjs} +1 -1
- package/dist/chunks/{messages-DNYtMplL2.cjs → messages-Cp7wFDrY2.cjs} +1 -1
- package/dist/chunks/{messages-Bttb4o0k.cjs → messages-CpZneXUI.cjs} +1 -1
- package/dist/chunks/{messages-C2-v6HdR.cjs → messages-CpbireNX.cjs} +1 -1
- package/dist/{messages-C5sc4wjR.mjs → chunks/messages-CpcZgGYg.mjs} +33 -1
- package/dist/chunks/{messages-Cd-FaIr_2.mjs → messages-CqhQuuRo2.mjs} +33 -1
- package/dist/{messages-B8BXCJBA.mjs → chunks/messages-CrFIbrXr2.mjs} +33 -1
- package/dist/chunks/{messages-DB6z9ybS.cjs → messages-CrwZs1Gq.cjs} +1 -1
- package/dist/chunks/{messages-DQb9YRoO2.mjs → messages-D0_Mxuh62.mjs} +33 -1
- package/dist/{messages-2jeEK-EB.mjs → chunks/messages-D1q601Wg.mjs} +33 -1
- package/dist/{messages-BCGyLzFB2.mjs → chunks/messages-D3kC7iDa2.mjs} +33 -1
- package/dist/chunks/{messages-DwU7qOBO2.mjs → messages-D4UnR6e52.mjs} +33 -1
- package/dist/chunks/{messages-f1NcMMTR2.cjs → messages-D5CeQW1e2.cjs} +1 -1
- package/dist/chunks/messages-D8UH8jc6.cjs +1 -0
- package/dist/chunks/{messages-BJ7clJXu2.cjs → messages-DAmOTPVW2.cjs} +1 -1
- package/dist/{messages-DPZsygzY.mjs → chunks/messages-DBPkzBZO2.mjs} +33 -1
- package/dist/chunks/{messages-o3omNKfH.cjs → messages-DEduQerF.cjs} +1 -1
- package/dist/chunks/{messages-Beh905t72.mjs → messages-DFA5OVrs2.mjs} +33 -1
- package/dist/chunks/{messages-poLdFEEs2.cjs → messages-DHah-frn.cjs} +1 -1
- package/dist/chunks/messages-DI1ZLPxM.cjs +1 -0
- package/dist/chunks/{messages-BqM6l_JM2.mjs → messages-DKJ5CX9h2.mjs} +33 -1
- package/dist/chunks/{messages-s9I-JHCa.cjs → messages-DKjhx7Y3.cjs} +1 -1
- package/dist/chunks/{messages-GXQbRrHa2.mjs → messages-DR5DyRRY2.mjs} +33 -1
- package/dist/chunks/{messages-B94JmzMj.mjs → messages-DWjHAdb3.mjs} +33 -1
- package/dist/chunks/{messages-Cn0B5LU1.mjs → messages-DYsO5SIA.mjs} +33 -1
- package/dist/chunks/{messages-M2lNlKhI2.mjs → messages-DZwozMZD2.mjs} +33 -1
- package/dist/{messages-DGwIRpOH2.mjs → chunks/messages-Db_L5RNl.mjs} +33 -1
- package/dist/chunks/{messages-Bi3snvmH2.cjs → messages-DeXUZcFn2.cjs} +1 -1
- package/dist/chunks/messages-Dgp7Wk4H.cjs +1 -0
- package/dist/chunks/{messages-Cg6qicee.cjs → messages-DhnCZQEY.cjs} +1 -1
- package/dist/chunks/{messages-Ckej-nnJ.cjs → messages-DjU1jbKf.cjs} +1 -1
- package/dist/{messages-CJsMZvUv.mjs → chunks/messages-DkqiXPS7.mjs} +33 -1
- package/dist/chunks/{messages-p5w1kuc5.cjs → messages-Dl6VC9Q9.cjs} +1 -1
- package/dist/chunks/{messages-DG8Lmqf52.cjs → messages-Dlc1DdZ22.cjs} +1 -1
- package/dist/chunks/{messages-D8qYNZ_T.mjs → messages-Dna-8bQq.mjs} +33 -1
- package/dist/chunks/{messages-DgSRzW-Y.mjs → messages-DtTgOx9a.mjs} +33 -1
- package/dist/chunks/{messages-h43rfIyt2.mjs → messages-Duj8jpve2.mjs} +33 -1
- package/dist/chunks/{messages-XM0y9kXy2.cjs → messages-DvxZjb5g2.cjs} +1 -1
- package/dist/chunks/{messages-DWeyV2N3.cjs → messages-Dz8AmvFq.cjs} +1 -1
- package/dist/chunks/messages-DzarYc1J2.cjs +1 -0
- package/dist/{messages-BXs-Zwhx.mjs → chunks/messages-FIgYAomz2.mjs} +33 -1
- package/dist/chunks/{messages-04T5j1ww2.cjs → messages-FM0KHIkQ2.cjs} +1 -1
- package/dist/chunks/{messages-BtEDKVO7.cjs → messages-JsmKjXPZ.cjs} +1 -1
- package/dist/{messages-DvSC5JGC2.mjs → chunks/messages-LW9Kd-vn.mjs} +33 -1
- package/dist/chunks/{messages-LWyC-1ol.mjs → messages-R2RH1RLt.mjs} +33 -1
- package/dist/chunks/{messages-0OyEWZDW.cjs → messages-RWVOHsZu.cjs} +1 -1
- package/dist/chunks/{messages-DwAl9zoh2.mjs → messages-X90YfYzG2.mjs} +33 -1
- package/dist/chunks/{messages-BxRX_hY12.cjs → messages-YhmR1nl02.cjs} +1 -1
- package/dist/chunks/{messages-CT025FgD2.cjs → messages-Ywb6VdfO2.cjs} +1 -1
- package/dist/{messages-qjir1Zx9.mjs → chunks/messages-ZPOc6IQC.mjs} +33 -1
- package/dist/chunks/{messages-C-N1XBvh2.cjs → messages-_ECIn1VC2.cjs} +1 -1
- package/dist/chunks/{messages-Cf5mu1AT.cjs → messages-cYjlWqco.cjs} +1 -1
- package/dist/{messages-CS6vG53A.mjs → chunks/messages-dp4NwDVM.mjs} +33 -1
- package/dist/chunks/{messages-Bz_fTG46.mjs → messages-hhT3Vii-.mjs} +33 -1
- package/dist/chunks/messages-iwzDjgrP.cjs +1 -0
- package/dist/chunks/{messages-B5eo-pGw.mjs → messages-k4Do3gkF.mjs} +33 -1
- package/dist/chunks/{messages-BfYWRC3o.cjs → messages-l0nKmGOV.cjs} +1 -1
- package/dist/chunks/{messages-BtevAuQS2.cjs → messages-l7DqwqOu2.cjs} +1 -1
- package/dist/{messages-C9XTx39w2.mjs → chunks/messages-oLqnmqJf2.mjs} +33 -1
- package/dist/chunks/{messages-Vbqmvxs1.cjs → messages-sLVwrcar.cjs} +1 -1
- package/dist/chunks/{messages-DFUn1PHK2.mjs → messages-yGQn67fw2.mjs} +33 -1
- package/dist/chunks/{messages-CXlSU8cQ2.cjs → messages-zkunMjZf2.cjs} +1 -1
- package/dist/chunks/{tools-vX3wCW3a.mjs → tools-CM6aPuR4.mjs} +3442 -2226
- package/dist/chunks/tools-kfoXLTzY.cjs +208 -0
- package/dist/chunks/webm-muxer-CC98PYSV.cjs +5 -0
- package/dist/chunks/webm-muxer-CUUz719e.mjs +864 -0
- package/dist/full.cjs +1 -1
- package/dist/full.mjs +13 -13
- package/dist/locales.mjs +99 -67
- package/dist/{messages-iJKNW8hW2.mjs → messages-1ZSVxDYN2.mjs} +33 -1
- package/dist/{chunks/messages-dZdV8VYV.mjs → messages-AK_9q2yu.mjs} +33 -1
- package/dist/{messages-eFz25q1T.mjs → messages-B0Gc0lBw.mjs} +33 -1
- package/dist/{messages-ChivLKDg2.mjs → messages-B5THTOwb2.mjs} +33 -1
- package/dist/{messages-Bd2Q-tnQ.mjs → messages-B5xy5hCa.mjs} +33 -1
- package/dist/{chunks/messages-CSc7Lh_3.mjs → messages-B6J8l1aF.mjs} +33 -1
- package/dist/{messages-tcfLP2b2.mjs → messages-B7E1zFAv.mjs} +33 -1
- package/dist/{messages-gJWgJtGo.mjs → messages-B87GXoqt.mjs} +33 -1
- package/dist/{chunks/messages-8vGF8iWb.mjs → messages-B95smO_C.mjs} +33 -1
- package/dist/{messages-Dw7P8bMa2.mjs → messages-B9h-mKVO2.mjs} +33 -1
- package/dist/{chunks/messages-D1gz17wt.mjs → messages-BBb_hXxm.mjs} +33 -1
- package/dist/{messages-kb2GSl-V.mjs → messages-BDJfFuXR.mjs} +33 -1
- package/dist/{messages-C1d7I7f_2.mjs → messages-BH5AKf_i2.mjs} +33 -1
- package/dist/{chunks/messages-CZ4Jcn6y.mjs → messages-BLslMhf-.mjs} +33 -1
- package/dist/{chunks/messages-PtDEkfSR2.mjs → messages-BPsdJnwT.mjs} +33 -1
- package/dist/{chunks/messages-BQKWm9xB.mjs → messages-BTrok9K8.mjs} +33 -1
- package/dist/{messages-B0n-WDK72.mjs → messages-BctWdAZP2.mjs} +33 -1
- package/dist/{messages-CX2ioEBc2.mjs → messages-BhGHyHKC2.mjs} +33 -1
- package/dist/{messages-CWdh59uz2.mjs → messages-BlInN8XP2.mjs} +33 -1
- package/dist/{chunks/messages-xMrks-Gg.mjs → messages-Bn19MGza.mjs} +33 -1
- package/dist/{chunks/messages-Cc56SxY7.mjs → messages-BqFRlEJE2.mjs} +33 -1
- package/dist/{messages-DMH0zRig2.mjs → messages-Bt5Sbl952.mjs} +33 -1
- package/dist/{chunks/messages-CHizzxUv.mjs → messages-Bumbqs6s.mjs} +33 -1
- package/dist/{messages-BytEaMMs.mjs → messages-BvwVDbII.mjs} +33 -1
- package/dist/{chunks/messages-DzZZDveu.mjs → messages-Bwese2OQ.mjs} +33 -1
- package/dist/{chunks/messages-Vdmc6CaN.mjs → messages-Bx5KWmyJ.mjs} +33 -1
- package/dist/{chunks/messages-BzC8TVYC.mjs → messages-ByntluqZ.mjs} +33 -1
- package/dist/{messages-C2pz0mJs2.mjs → messages-C-8BMvSp2.mjs} +33 -1
- package/dist/{messages-BInBVzW42.mjs → messages-C-ytN6Dz2.mjs} +33 -1
- package/dist/{messages-CUsdyCrN2.mjs → messages-C8QB980F2.mjs} +33 -1
- package/dist/{chunks/messages-ID7kZQyc.mjs → messages-CCdDP2DE.mjs} +33 -1
- package/dist/{chunks/messages-Cx_kyYnf2.mjs → messages-CCgDqF-e.mjs} +33 -1
- package/dist/{chunks/messages-DyuKfskv.mjs → messages-CLkbvdRh2.mjs} +33 -1
- package/dist/{messages-DPzZM5FG.mjs → messages-CQ6A0zI9.mjs} +33 -1
- package/dist/{chunks/messages-DjSuzS2m2.mjs → messages-CQnz6pXD2.mjs} +33 -1
- package/dist/{messages-CWWIbebM2.mjs → messages-CQotju8u2.mjs} +33 -1
- package/dist/{chunks/messages-C4Wacagz.mjs → messages-CRL2ecWR.mjs} +33 -1
- package/dist/{chunks/messages-CkRbSW3z2.mjs → messages-CRhhyqEy2.mjs} +33 -1
- package/dist/{chunks/messages-CZfG1cmA2.mjs → messages-CSf1g9n_.mjs} +33 -1
- package/dist/{messages-Ck7HWiG_.mjs → messages-CYuTyoK6.mjs} +33 -1
- package/dist/{messages-BEnINcno2.mjs → messages-Co2GV7rA2.mjs} +33 -1
- package/dist/{chunks/messages-CpC5Cv_s.mjs → messages-CqtZ_gtb.mjs} +33 -1
- package/dist/{chunks/messages-Dp5C7vWz.mjs → messages-CxK_Vgra.mjs} +33 -1
- package/dist/{messages-2pXizYBd.mjs → messages-D08TSj5Q.mjs} +33 -1
- package/dist/{chunks/messages-n1T_9w-Z.mjs → messages-DFDw0nkI.mjs} +33 -1
- package/dist/{messages-S8uz2_bw2.mjs → messages-DKoeDmZV2.mjs} +33 -1
- package/dist/{chunks/messages-EI0ZLMIG.mjs → messages-DLKTwtBI.mjs} +33 -1
- package/dist/{chunks/messages-CcvcAZOt.mjs → messages-DQaDNQat2.mjs} +33 -1
- package/dist/{messages-B4cc5O5K.mjs → messages-DZlYqaxx.mjs} +33 -1
- package/dist/{messages-CdmaH2dA2.mjs → messages-D_ql7LL-2.mjs} +33 -1
- package/dist/{messages-CoSj68Ef2.mjs → messages-Da09byG42.mjs} +33 -1
- package/dist/{messages-BXgGBpmY.mjs → messages-DaKjx7Gh.mjs} +33 -1
- package/dist/{messages-C-XKbE2c.mjs → messages-Dc1aAz5V.mjs} +33 -1
- package/dist/{chunks/messages-CEslBsO62.mjs → messages-DlxBkSUv.mjs} +33 -1
- package/dist/{messages-BYyRYlTQ2.mjs → messages-DoahmNMI2.mjs} +33 -1
- package/dist/{messages-CGZPFOEr.mjs → messages-DpbHfnge.mjs} +33 -1
- package/dist/{chunks/messages-m_zk_AR3.mjs → messages-DrjZz7u9.mjs} +33 -1
- package/dist/{chunks/messages-DaqNOQ8p.mjs → messages-DrwEVbKk2.mjs} +33 -1
- package/dist/{messages-B_XoP1A3.mjs → messages-DvIPbDsq.mjs} +33 -1
- package/dist/{messages-BWzRZ5Un.mjs → messages-Dy3mYP_n.mjs} +33 -1
- package/dist/{chunks/messages-Dp5SW9D-.mjs → messages-STUXoPH72.mjs} +33 -1
- package/dist/{messages-BCeeFrNO.mjs → messages-Vfl9lWod.mjs} +33 -1
- package/dist/{messages-Nbssq1-N.mjs → messages-YPF71WjJ.mjs} +33 -1
- package/dist/{chunks/messages-14GzwdH92.mjs → messages-aPBlKHzr.mjs} +33 -1
- package/dist/{messages-Bj8K6_bv.mjs → messages-bCZW7LiC.mjs} +33 -1
- package/dist/{chunks/messages-Bh3E53-f2.mjs → messages-kjO2WeG-2.mjs} +33 -1
- package/dist/{chunks/messages-S_Bmo_Qc.mjs → messages-un7M6YZC2.mjs} +33 -1
- package/dist/react.cjs +1 -1
- package/dist/react.mjs +1 -1
- package/dist/tools.cjs +1 -1
- package/dist/tools.mjs +3 -3
- package/dist/vendor.LICENSE.txt +35 -0
- package/package.json +2 -1
- package/src/components/i18n/locales/am/messages.json +33 -1
- package/src/components/i18n/locales/ar/messages.json +33 -1
- package/src/components/i18n/locales/az/messages.json +33 -1
- package/src/components/i18n/locales/bg/messages.json +33 -1
- package/src/components/i18n/locales/bn/messages.json +33 -1
- package/src/components/i18n/locales/bs/messages.json +33 -1
- package/src/components/i18n/locales/cs/messages.json +33 -1
- package/src/components/i18n/locales/da/messages.json +33 -1
- package/src/components/i18n/locales/de/messages.json +33 -1
- package/src/components/i18n/locales/dv/messages.json +33 -1
- package/src/components/i18n/locales/el/messages.json +33 -1
- package/src/components/i18n/locales/en/messages.json +32 -0
- package/src/components/i18n/locales/es/messages.json +33 -1
- package/src/components/i18n/locales/et/messages.json +33 -1
- package/src/components/i18n/locales/fa/messages.json +33 -1
- package/src/components/i18n/locales/fi/messages.json +33 -1
- package/src/components/i18n/locales/fil/messages.json +33 -1
- package/src/components/i18n/locales/fr/messages.json +33 -1
- package/src/components/i18n/locales/gu/messages.json +33 -1
- package/src/components/i18n/locales/he/messages.json +33 -1
- package/src/components/i18n/locales/hi/messages.json +33 -1
- package/src/components/i18n/locales/hr/messages.json +33 -1
- package/src/components/i18n/locales/hu/messages.json +33 -1
- package/src/components/i18n/locales/hy/messages.json +33 -1
- package/src/components/i18n/locales/id/messages.json +33 -1
- package/src/components/i18n/locales/it/messages.json +33 -1
- package/src/components/i18n/locales/ja/messages.json +33 -1
- package/src/components/i18n/locales/ka/messages.json +33 -1
- package/src/components/i18n/locales/km/messages.json +33 -1
- package/src/components/i18n/locales/kn/messages.json +33 -1
- package/src/components/i18n/locales/ko/messages.json +33 -1
- package/src/components/i18n/locales/ku/messages.json +33 -1
- package/src/components/i18n/locales/lo/messages.json +33 -1
- package/src/components/i18n/locales/lt/messages.json +33 -1
- package/src/components/i18n/locales/lv/messages.json +33 -1
- package/src/components/i18n/locales/mk/messages.json +33 -1
- package/src/components/i18n/locales/ml/messages.json +33 -1
- package/src/components/i18n/locales/mn/messages.json +33 -1
- package/src/components/i18n/locales/mr/messages.json +33 -1
- package/src/components/i18n/locales/ms/messages.json +33 -1
- package/src/components/i18n/locales/my/messages.json +33 -1
- package/src/components/i18n/locales/ne/messages.json +33 -1
- package/src/components/i18n/locales/nl/messages.json +33 -1
- package/src/components/i18n/locales/no/messages.json +33 -1
- package/src/components/i18n/locales/pa/messages.json +33 -1
- package/src/components/i18n/locales/pl/messages.json +33 -1
- package/src/components/i18n/locales/ps/messages.json +33 -1
- package/src/components/i18n/locales/pt/messages.json +33 -1
- package/src/components/i18n/locales/ro/messages.json +33 -1
- package/src/components/i18n/locales/ru/messages.json +33 -1
- package/src/components/i18n/locales/sd/messages.json +33 -1
- package/src/components/i18n/locales/si/messages.json +33 -1
- package/src/components/i18n/locales/sk/messages.json +33 -1
- package/src/components/i18n/locales/sl/messages.json +33 -1
- package/src/components/i18n/locales/sq/messages.json +33 -1
- package/src/components/i18n/locales/sr/messages.json +33 -1
- package/src/components/i18n/locales/sv/messages.json +33 -1
- package/src/components/i18n/locales/sw/messages.json +33 -1
- package/src/components/i18n/locales/ta/messages.json +33 -1
- package/src/components/i18n/locales/te/messages.json +33 -1
- package/src/components/i18n/locales/th/messages.json +33 -1
- package/src/components/i18n/locales/tr/messages.json +33 -1
- package/src/components/i18n/locales/ug/messages.json +33 -1
- package/src/components/i18n/locales/uk/messages.json +33 -1
- package/src/components/i18n/locales/ur/messages.json +33 -1
- package/src/components/i18n/locales/vi/messages.json +33 -1
- package/src/components/i18n/locales/yi/messages.json +33 -1
- package/src/components/i18n/locales/zh/messages.json +33 -1
- package/src/components/icons/index.ts +106 -0
- package/src/components/modules/paste/handlers/pattern-handler.ts +4 -7
- package/src/components/utils/format-bytes.ts +15 -0
- package/src/components/utils/max-size.ts +36 -0
- package/src/components/utils/media-empty-state.ts +1 -11
- package/src/components/utils/upload-error-message.ts +43 -0
- package/src/styles/colors.css +31 -0
- package/src/styles/keyframes.css +8 -0
- package/src/styles/main.css +2 -0
- package/src/styles/resize-cue.css +26 -0
- package/src/styles/video.css +1221 -0
- package/src/tools/file/constants.ts +3 -0
- package/src/tools/file/index.ts +45 -4
- package/src/tools/file/uploader.ts +5 -2
- package/src/tools/image/constants.ts +1 -1
- package/src/tools/image/converted-uploader.ts +30 -0
- package/src/tools/image/gif-to-webm.ts +170 -0
- package/src/tools/image/index.ts +125 -3
- package/src/tools/image/resizer.ts +39 -6
- package/src/tools/image/uploader.ts +2 -1
- package/src/tools/image/uploading-state.ts +2 -1
- package/src/tools/index.ts +2 -0
- package/src/tools/video/constants.ts +22 -0
- package/src/tools/video/controls.ts +1448 -0
- package/src/tools/video/empty-state.ts +45 -0
- package/src/tools/video/i18n.ts +13 -0
- package/src/tools/video/index.ts +521 -0
- package/src/tools/video/ui.ts +83 -0
- package/src/tools/video/uploader.ts +75 -0
- package/types/configs/blok-config.d.ts +2 -9
- package/types/tools/file.d.ts +9 -3
- package/types/tools/image.d.ts +11 -2
- package/types/tools/max-size.d.ts +12 -0
- package/types/tools/video.d.ts +72 -0
- package/dist/chunks/constants-B2Lcd7Kk.cjs +0 -539
- package/dist/chunks/messages-3iHkF7Vy.cjs +0 -1
- package/dist/chunks/messages-BAgSlZpS.cjs +0 -1
- package/dist/chunks/messages-Br3ERe172.cjs +0 -1
- package/dist/chunks/messages-C6Xc3L-B2.cjs +0 -1
- package/dist/chunks/messages-CEquPedm.cjs +0 -1
- package/dist/chunks/messages-CFo-pG-t2.cjs +0 -1
- package/dist/chunks/messages-Cf8u0aln2.cjs +0 -1
- package/dist/chunks/messages-Cgg1HHSo.cjs +0 -1
- package/dist/chunks/messages-DOBcfgRF.cjs +0 -1
- package/dist/chunks/messages-JLj0J5so.cjs +0 -1
- package/dist/chunks/messages-p-1X5oFM2.cjs +0 -1
- package/dist/chunks/messages-vdupz5T0.cjs +0 -1
- package/dist/chunks/tools-DiTb45BS.cjs +0 -208
- /package/dist/chunks/{am-B37aLxvu.cjs → am-BA02TqF9.cjs} +0 -0
- /package/dist/chunks/{am-D7yfVqJS.mjs → am-C9_6r8HY.mjs} +0 -0
- /package/dist/chunks/{ar-D00SixXA.mjs → ar-BM96nSXF.mjs} +0 -0
- /package/dist/chunks/{ar-ySo_KDqd.cjs → ar-CB4IsGCa.cjs} +0 -0
- /package/dist/chunks/{az-BmIwKcoq.mjs → az-DnZSY5ok.mjs} +0 -0
- /package/dist/chunks/{az-nCoWuGBd.cjs → az-FykE_aDi.cjs} +0 -0
- /package/dist/chunks/{bg-BTZaB21W.mjs → bg-BplUvPeX.mjs} +0 -0
- /package/dist/chunks/{bg-BKB8_J3v.cjs → bg-D6r90gqH.cjs} +0 -0
- /package/dist/chunks/{bn-BQiBKtpR.cjs → bn-B7w2dbK4.cjs} +0 -0
- /package/dist/chunks/{bn-BVpf0XL6.mjs → bn-CdP9lnfr.mjs} +0 -0
- /package/dist/chunks/{bs-BSz4cPth.mjs → bs-BtX-qLsk.mjs} +0 -0
- /package/dist/chunks/{bs-D_lekdEb.cjs → bs-DztHHorM.cjs} +0 -0
- /package/dist/chunks/{cs-Dv8Jg_Fa.cjs → cs-CLMsCdIt.cjs} +0 -0
- /package/dist/chunks/{cs-p5s4GudH.mjs → cs-NcDYS-aU.mjs} +0 -0
- /package/dist/chunks/{da-BqJa8BMd.mjs → da-ANg6gK3-.mjs} +0 -0
- /package/dist/chunks/{da-D33rjz-t.cjs → da-sJ7EsHcO.cjs} +0 -0
- /package/dist/chunks/{de-BDDktkfI.mjs → de-CTxvRxuE.mjs} +0 -0
- /package/dist/chunks/{de-I8YFq0Ej.cjs → de-CxMqLKhy.cjs} +0 -0
- /package/dist/chunks/{el-BInM0nQo.cjs → el-Bg6QXLt5.cjs} +0 -0
- /package/dist/chunks/{el-R63G08P0.mjs → el-CgOoJaXB.mjs} +0 -0
- /package/dist/chunks/{es-Cj_AHhb9.cjs → es-7zUbslPJ.cjs} +0 -0
- /package/dist/chunks/{es-BleH_dHg.mjs → es-D5YDFRu-.mjs} +0 -0
- /package/dist/chunks/{et-BuISCVFl.mjs → et-57a7ees8.mjs} +0 -0
- /package/dist/chunks/{et-BkMzN_qG.cjs → et-D_rhRdDD.cjs} +0 -0
- /package/dist/chunks/{fa-CI9f3My0.mjs → fa-Dp_BXnBP.mjs} +0 -0
- /package/dist/chunks/{fa-C3VQIfEJ.cjs → fa-JBr2zsfI.cjs} +0 -0
- /package/dist/chunks/{fi-p8xxtchQ.cjs → fi-DjbYN6MA.cjs} +0 -0
- /package/dist/chunks/{fi-C0_Jyps9.mjs → fi-at45xjOS.mjs} +0 -0
- /package/dist/chunks/{fil-BZsJ4YZG.mjs → fil-D_HT2vGt.mjs} +0 -0
- /package/dist/chunks/{fil-DC8VTmfd.cjs → fil-dcVBIQoi.cjs} +0 -0
- /package/dist/chunks/{fr-BjeioA2N.mjs → fr-ByR9PLTE.mjs} +0 -0
- /package/dist/chunks/{fr-Cbstr5ii.cjs → fr-Ch4zj1rM.cjs} +0 -0
- /package/dist/chunks/{gu-DpPoUPem.cjs → gu-CoLW5Saq.cjs} +0 -0
- /package/dist/chunks/{gu-CNi9WnhQ.mjs → gu-CvfPvH3Y.mjs} +0 -0
- /package/dist/chunks/{he-Rlv-PVKK.cjs → he-2wS2DK0D.cjs} +0 -0
- /package/dist/chunks/{he-bU_Id5XQ.mjs → he-Bmqypvkq.mjs} +0 -0
- /package/dist/chunks/{hi-CYYjJgoQ.mjs → hi-DbcN0x64.mjs} +0 -0
- /package/dist/chunks/{hi-CfLaLKZL.cjs → hi-f4gshON3.cjs} +0 -0
- /package/dist/chunks/{hr-CerKCstu.mjs → hr-D5mydeyn.mjs} +0 -0
- /package/dist/chunks/{hr-B6eFd_4M.cjs → hr-DMExeWwd.cjs} +0 -0
- /package/dist/chunks/{hu-DQcisouf.cjs → hu-COmlHkse.cjs} +0 -0
- /package/dist/chunks/{hu-DNYoHMic.mjs → hu-DVCPn8un.mjs} +0 -0
- /package/dist/chunks/{hy-x9QOWTT6.cjs → hy-BoBSSiJc.cjs} +0 -0
- /package/dist/chunks/{hy-N0XBqVv_.mjs → hy-CP6oqcK_.mjs} +0 -0
- /package/dist/chunks/{id-dmUIQB07.mjs → id-COwan-Bb.mjs} +0 -0
- /package/dist/chunks/{id-G7ASv812.cjs → id-Dk2AQ6-R.cjs} +0 -0
- /package/dist/chunks/{it-DXDwm7Aj.cjs → it-BCmU3zOg.cjs} +0 -0
- /package/dist/chunks/{it-G9Rg2LaN.mjs → it-DJqN-zLs.mjs} +0 -0
- /package/dist/chunks/{ja-C1Nou_k5.mjs → ja-CvoLNAXS.mjs} +0 -0
- /package/dist/chunks/{ja-DHMurrnk.cjs → ja-DcMqJvnV.cjs} +0 -0
- /package/dist/chunks/{ka-P0_q1_oW.cjs → ka-BdyjQFkv.cjs} +0 -0
- /package/dist/chunks/{ka-9rtmTdhq.mjs → ka-BsqbDXqr.mjs} +0 -0
- /package/dist/chunks/{km-DedsOdPY.cjs → km-BShH0mB9.cjs} +0 -0
- /package/dist/chunks/{km-T8J0lGcC.mjs → km-C9FxSKv0.mjs} +0 -0
- /package/dist/chunks/{kn-CMb5Cv2d.mjs → kn-BKTm-E-A.mjs} +0 -0
- /package/dist/chunks/{kn-CAGP6H3x.cjs → kn-bNx6e6NK.cjs} +0 -0
- /package/dist/chunks/{ko-DulVmkjC.mjs → ko-BLEDr4t_.mjs} +0 -0
- /package/dist/chunks/{ko-3D0kPtnu.cjs → ko-LmGjEODJ.cjs} +0 -0
- /package/dist/chunks/{ku-BYzD3GnU.cjs → ku-BekLwcHQ.cjs} +0 -0
- /package/dist/chunks/{ku-C5mlSVfC.mjs → ku-DGpIv9vX.mjs} +0 -0
- /package/dist/chunks/{lo-Cw2hfj84.mjs → lo-C3wsS73b.mjs} +0 -0
- /package/dist/chunks/{lo-D9ixPNJD.cjs → lo-YgZPFD63.cjs} +0 -0
- /package/dist/chunks/{lt-CzfEJdVd.cjs → lt-CIvBJk2h.cjs} +0 -0
- /package/dist/chunks/{lt-Ceg9NAdI.mjs → lt-DWWjfR4Z.mjs} +0 -0
- /package/dist/chunks/{lv-DWyBbTHI.cjs → lv-B6Djmvjl.cjs} +0 -0
- /package/dist/chunks/{lv-3CXzQoic.mjs → lv-D4nb-9oK.mjs} +0 -0
- /package/dist/chunks/{mk-CEbNT0Oe.mjs → mk-BPUvDORf.mjs} +0 -0
- /package/dist/chunks/{mk-Anl5AUSU.cjs → mk-Ck56Emvp.cjs} +0 -0
- /package/dist/chunks/{ml-B1QmnbTX.cjs → ml-DsibsgSA.cjs} +0 -0
- /package/dist/chunks/{ml-DaF_zn1h.mjs → ml-qo0n1JHs.mjs} +0 -0
- /package/dist/chunks/{mn-DLpgZmIl.mjs → mn-BAQnLAOv.mjs} +0 -0
- /package/dist/chunks/{mn-DM3AWPQI.cjs → mn-Db0fVNYE.cjs} +0 -0
- /package/dist/chunks/{mr-CPCMiBsx.cjs → mr-BTz5VL4u.cjs} +0 -0
- /package/dist/chunks/{mr-C-d3CWSD.mjs → mr-CFEPrQYy.mjs} +0 -0
- /package/dist/chunks/{ms-D3Zil5Dz.mjs → ms-C9p2_6EB.mjs} +0 -0
- /package/dist/chunks/{ms-BKg5zJ6g.cjs → ms-ItzWfmiu.cjs} +0 -0
- /package/dist/chunks/{my-HzQdQq6H.mjs → my-BQhcHK_d.mjs} +0 -0
- /package/dist/chunks/{my-BhrbZPAE.cjs → my-Bq1EPoFX.cjs} +0 -0
- /package/dist/chunks/{ne-Dw6kUPkS.mjs → ne-Cf4GpHyI.mjs} +0 -0
- /package/dist/chunks/{ne-BsEUv3Vp.cjs → ne-Mog3kAWt.cjs} +0 -0
- /package/dist/chunks/{nl-D8QQ6wmJ.mjs → nl-7DE7AKK5.mjs} +0 -0
- /package/dist/chunks/{nl-C1jFx32v.cjs → nl-Do9Y1u3F.cjs} +0 -0
- /package/dist/chunks/{no-BWEOGeAo.cjs → no-DNuo9wW6.cjs} +0 -0
- /package/dist/chunks/{no-Rg2uuKdV.mjs → no-J4jj2fW7.mjs} +0 -0
- /package/dist/chunks/{notifier-CEnelp-K.mjs → notifier-BDNwSr07.mjs} +0 -0
- /package/dist/chunks/{notifier-BOB8o7IG.cjs → notifier-BW5H3Ctc.cjs} +0 -0
- /package/dist/chunks/{pa-BitCteAA.cjs → pa-BVCDv2EV.cjs} +0 -0
- /package/dist/chunks/{pa-BSwIZvA0.mjs → pa-DMuUOUxa.mjs} +0 -0
- /package/dist/chunks/{pl-CbCrHaA6.cjs → pl-Ct8v4d8V.cjs} +0 -0
- /package/dist/chunks/{pl-FhXomIGp.mjs → pl-DIZm5XzV.mjs} +0 -0
- /package/dist/chunks/{ps-4sPZuv3g.cjs → ps-DT4DAHOy.cjs} +0 -0
- /package/dist/chunks/{ps-BoBtbrB6.mjs → ps-X3--6pS3.mjs} +0 -0
- /package/dist/chunks/{pt-BYA5NOw_.mjs → pt-BMT2BIpj.mjs} +0 -0
- /package/dist/chunks/{pt-CSzjho-V.cjs → pt-Dwe6Dinw.cjs} +0 -0
- /package/dist/chunks/{ro-C9tN3AFF.cjs → ro-CoHEUo3b.cjs} +0 -0
- /package/dist/chunks/{ro-mtobtMpD.mjs → ro-Ndh2J4Fv.mjs} +0 -0
- /package/dist/chunks/{ru-B791LPq3.mjs → ru-DEoON4H0.mjs} +0 -0
- /package/dist/chunks/{ru-BYPO5wNO.cjs → ru-Pmgo28Kt.cjs} +0 -0
- /package/dist/chunks/{sd-C8ngG92I.mjs → sd-B46KwBlt.mjs} +0 -0
- /package/dist/chunks/{sd-BWuglgs_.cjs → sd-DxSmw84d.cjs} +0 -0
- /package/dist/chunks/{si-C_q8DxVt.mjs → si-CEX6-_X4.mjs} +0 -0
- /package/dist/chunks/{si-IX2P_DGB.cjs → si-attpuQg-.cjs} +0 -0
- /package/dist/chunks/{sk-HJJlM9uq.mjs → sk-Crsvi9aQ.mjs} +0 -0
- /package/dist/chunks/{sk-CxtyIOlr.cjs → sk-CvkpO0ti.cjs} +0 -0
- /package/dist/chunks/{sl-CPjYG80u.cjs → sl-BT19lhkA.cjs} +0 -0
- /package/dist/chunks/{sl-kB1f5rPn.mjs → sl-Cqe1IKhE.mjs} +0 -0
- /package/dist/chunks/{sq-CD0W0D6z.mjs → sq-BOQb1hx9.mjs} +0 -0
- /package/dist/chunks/{sq-Do6UyHn9.cjs → sq-rY2-arjV.cjs} +0 -0
- /package/dist/chunks/{sr-lLJu9TsT.mjs → sr-WVqhi-MV.mjs} +0 -0
- /package/dist/chunks/{sr-BcyT-MWS.cjs → sr-jnkxoHkR.cjs} +0 -0
- /package/dist/chunks/{sv-Bsz7ersx.cjs → sv-BiWSYdw7.cjs} +0 -0
- /package/dist/chunks/{sv-C3GL-a0k.mjs → sv-cjssSK3x.mjs} +0 -0
- /package/dist/chunks/{sw-D6-DZ14-.mjs → sw-BNNAgQNn.mjs} +0 -0
- /package/dist/chunks/{sw-CUElHZxL.cjs → sw-DFyk62c4.cjs} +0 -0
- /package/dist/chunks/{ta-D0DQba-y.cjs → ta-DowDx1bh.cjs} +0 -0
- /package/dist/chunks/{ta-BZy78kBk.mjs → ta-jg4mBsL9.mjs} +0 -0
- /package/dist/chunks/{te-vigCVKdg.mjs → te-BiLupA2T.mjs} +0 -0
- /package/dist/chunks/{te-DPMvJyXg.cjs → te-G0buJU1V.cjs} +0 -0
- /package/dist/chunks/{th-DtcrIt9J.cjs → th-DsjA6OWh.cjs} +0 -0
- /package/dist/chunks/{th-CGc0RLWB.mjs → th-Dtb_u833.mjs} +0 -0
- /package/dist/chunks/{tr-Cgkf5aJo.mjs → tr-01MbT9-l.mjs} +0 -0
- /package/dist/chunks/{tr-BrEFaVNA.cjs → tr-DN1xdxQn.cjs} +0 -0
- /package/dist/chunks/{ug-BVK7qBs4.mjs → ug-BFlA2VRZ.mjs} +0 -0
- /package/dist/chunks/{ug-CqZXfhXi.cjs → ug-DEJ9cNGH.cjs} +0 -0
- /package/dist/chunks/{uk-DgReWEge.cjs → uk-Bv6aB1Nd.cjs} +0 -0
- /package/dist/chunks/{uk-CSPaCalw.mjs → uk-DY7rBPyo.mjs} +0 -0
- /package/dist/chunks/{ur-ByrwJnY1.cjs → ur-C3CFfx9s.cjs} +0 -0
- /package/dist/chunks/{ur-VpFFsATs.mjs → ur-DHfULZeF.mjs} +0 -0
- /package/dist/chunks/{vi-CWQtvATS.mjs → vi-BFuaq2Tk.mjs} +0 -0
- /package/dist/chunks/{vi-lUD3w7gP.cjs → vi-DQrrRkmq.cjs} +0 -0
- /package/dist/chunks/{zh-fSp1qOne.cjs → zh-5rdSdLkR.cjs} +0 -0
- /package/dist/chunks/{zh-akJj2cdF.mjs → zh-BGpl7x7W.mjs} +0 -0
|
@@ -0,0 +1,864 @@
|
|
|
1
|
+
import { t as e } from "./objectSpread2-jlBcdYeb.mjs";
|
|
2
|
+
//#region node_modules/webm-muxer/build/webm-muxer.mjs
|
|
3
|
+
var t = (e, t, n) => {
|
|
4
|
+
if (!t.has(e)) throw TypeError("Cannot " + n);
|
|
5
|
+
}, n = (e, n, r) => (t(e, n, "read from private field"), r ? r.call(e) : n.get(e)), r = (e, t, n) => {
|
|
6
|
+
if (t.has(e)) throw TypeError("Cannot add the same private member more than once");
|
|
7
|
+
t instanceof WeakSet ? t.add(e) : t.set(e, n);
|
|
8
|
+
}, i = (e, n, r, i) => (t(e, n, "write to private field"), i ? i.call(e, r) : n.set(e, r), r), a = (e, n, r) => (t(e, n, "access private method"), r), o = class {
|
|
9
|
+
constructor(e) {
|
|
10
|
+
this.value = e;
|
|
11
|
+
}
|
|
12
|
+
}, s = class {
|
|
13
|
+
constructor(e) {
|
|
14
|
+
this.value = e;
|
|
15
|
+
}
|
|
16
|
+
}, ee = (e) => e < 256 ? 1 : e < 65536 ? 2 : e < 1 << 24 ? 3 : e < 2 ** 32 ? 4 : e < 2 ** 40 ? 5 : 6, te = (e) => {
|
|
17
|
+
if (e < 127) return 1;
|
|
18
|
+
if (e < 16383) return 2;
|
|
19
|
+
if (e < (1 << 21) - 1) return 3;
|
|
20
|
+
if (e < (1 << 28) - 1) return 4;
|
|
21
|
+
if (e < 2 ** 35 - 1) return 5;
|
|
22
|
+
if (e < 2 ** 42 - 1) return 6;
|
|
23
|
+
throw Error("EBML VINT size not supported " + e);
|
|
24
|
+
}, c = (e, t, n) => {
|
|
25
|
+
let r = 0;
|
|
26
|
+
for (let i = t; i < n; i++) {
|
|
27
|
+
let t = e[Math.floor(i / 8)], n = 7 - (i & 7), a = (t & 1 << n) >> n;
|
|
28
|
+
r <<= 1, r |= a;
|
|
29
|
+
}
|
|
30
|
+
return r;
|
|
31
|
+
}, ne = (e, t, n, r) => {
|
|
32
|
+
for (let i = t; i < n; i++) {
|
|
33
|
+
let t = Math.floor(i / 8), a = e[t], o = 7 - (i & 7);
|
|
34
|
+
a &= ~(1 << o), a |= (r & 1 << n - i - 1) >> n - i - 1 << o, e[t] = a;
|
|
35
|
+
}
|
|
36
|
+
}, re = class {}, ie = class extends re {
|
|
37
|
+
constructor() {
|
|
38
|
+
super(...arguments), this.buffer = null;
|
|
39
|
+
}
|
|
40
|
+
}, ae = class extends re {
|
|
41
|
+
constructor(e) {
|
|
42
|
+
if (super(), this.options = e, typeof e != "object") throw TypeError("StreamTarget requires an options object to be passed to its constructor.");
|
|
43
|
+
if (e.onData) {
|
|
44
|
+
if (typeof e.onData != "function") throw TypeError("options.onData, when provided, must be a function.");
|
|
45
|
+
if (e.onData.length < 2) throw TypeError("options.onData, when provided, must be a function that takes in at least two arguments (data and position). Ignoring the position argument, which specifies the byte offset at which the data is to be written, can lead to broken outputs.");
|
|
46
|
+
}
|
|
47
|
+
if (e.onHeader && typeof e.onHeader != "function") throw TypeError("options.onHeader, when provided, must be a function.");
|
|
48
|
+
if (e.onCluster && typeof e.onCluster != "function") throw TypeError("options.onCluster, when provided, must be a function.");
|
|
49
|
+
if (e.chunked !== void 0 && typeof e.chunked != "boolean") throw TypeError("options.chunked, when provided, must be a boolean.");
|
|
50
|
+
if (e.chunkSize !== void 0 && (!Number.isInteger(e.chunkSize) || e.chunkSize < 1024)) throw TypeError("options.chunkSize, when provided, must be an integer and not smaller than 1024.");
|
|
51
|
+
}
|
|
52
|
+
}, oe = class extends re {
|
|
53
|
+
constructor(e, t) {
|
|
54
|
+
if (super(), this.stream = e, this.options = t, !(e instanceof FileSystemWritableFileStream)) throw TypeError("FileSystemWritableFileStreamTarget requires a FileSystemWritableFileStream instance.");
|
|
55
|
+
if (t !== void 0 && typeof t != "object") throw TypeError("FileSystemWritableFileStreamTarget's options, when provided, must be an object.");
|
|
56
|
+
if (t && t.chunkSize !== void 0 && (!Number.isInteger(t.chunkSize) || t.chunkSize <= 0)) throw TypeError("options.chunkSize, when provided, must be a positive integer");
|
|
57
|
+
}
|
|
58
|
+
}, l, u, se, ce, le, ue, de, fe, pe, me, he, ge, _e = class {
|
|
59
|
+
constructor() {
|
|
60
|
+
r(this, se), r(this, le), r(this, de), r(this, pe), r(this, he), this.pos = 0, r(this, l, new Uint8Array(8)), r(this, u, new DataView(n(this, l).buffer)), this.offsets = /* @__PURE__ */ new WeakMap(), this.dataOffsets = /* @__PURE__ */ new WeakMap();
|
|
61
|
+
}
|
|
62
|
+
seek(e) {
|
|
63
|
+
this.pos = e;
|
|
64
|
+
}
|
|
65
|
+
writeEBMLVarInt(e, t = te(e)) {
|
|
66
|
+
let r = 0;
|
|
67
|
+
switch (t) {
|
|
68
|
+
case 1:
|
|
69
|
+
n(this, u).setUint8(r++, 128 | e);
|
|
70
|
+
break;
|
|
71
|
+
case 2:
|
|
72
|
+
n(this, u).setUint8(r++, 64 | e >> 8), n(this, u).setUint8(r++, e);
|
|
73
|
+
break;
|
|
74
|
+
case 3:
|
|
75
|
+
n(this, u).setUint8(r++, 32 | e >> 16), n(this, u).setUint8(r++, e >> 8), n(this, u).setUint8(r++, e);
|
|
76
|
+
break;
|
|
77
|
+
case 4:
|
|
78
|
+
n(this, u).setUint8(r++, 16 | e >> 24), n(this, u).setUint8(r++, e >> 16), n(this, u).setUint8(r++, e >> 8), n(this, u).setUint8(r++, e);
|
|
79
|
+
break;
|
|
80
|
+
case 5:
|
|
81
|
+
n(this, u).setUint8(r++, 8 | e / 2 ** 32 & 7), n(this, u).setUint8(r++, e >> 24), n(this, u).setUint8(r++, e >> 16), n(this, u).setUint8(r++, e >> 8), n(this, u).setUint8(r++, e);
|
|
82
|
+
break;
|
|
83
|
+
case 6:
|
|
84
|
+
n(this, u).setUint8(r++, 4 | e / 2 ** 40 & 3), n(this, u).setUint8(r++, e / 2 ** 32 | 0), n(this, u).setUint8(r++, e >> 24), n(this, u).setUint8(r++, e >> 16), n(this, u).setUint8(r++, e >> 8), n(this, u).setUint8(r++, e);
|
|
85
|
+
break;
|
|
86
|
+
default: throw Error("Bad EBML VINT size " + t);
|
|
87
|
+
}
|
|
88
|
+
this.write(n(this, l).subarray(0, r));
|
|
89
|
+
}
|
|
90
|
+
writeEBML(e) {
|
|
91
|
+
if (e !== null) if (e instanceof Uint8Array) this.write(e);
|
|
92
|
+
else if (Array.isArray(e)) for (let t of e) this.writeEBML(t);
|
|
93
|
+
else if (this.offsets.set(e, this.pos), a(this, pe, me).call(this, e.id), Array.isArray(e.data)) {
|
|
94
|
+
var t;
|
|
95
|
+
let n = this.pos, r = e.size === -1 ? 1 : (t = e.size) == null ? 4 : t;
|
|
96
|
+
e.size === -1 ? a(this, se, ce).call(this, 255) : this.seek(this.pos + r);
|
|
97
|
+
let i = this.pos;
|
|
98
|
+
if (this.dataOffsets.set(e, i), this.writeEBML(e.data), e.size !== -1) {
|
|
99
|
+
let e = this.pos - i, t = this.pos;
|
|
100
|
+
this.seek(n), this.writeEBMLVarInt(e, r), this.seek(t);
|
|
101
|
+
}
|
|
102
|
+
} else if (typeof e.data == "number") {
|
|
103
|
+
var n;
|
|
104
|
+
let t = (n = e.size) == null ? ee(e.data) : n;
|
|
105
|
+
this.writeEBMLVarInt(t), a(this, pe, me).call(this, e.data, t);
|
|
106
|
+
} else typeof e.data == "string" ? (this.writeEBMLVarInt(e.data.length), a(this, he, ge).call(this, e.data)) : e.data instanceof Uint8Array ? (this.writeEBMLVarInt(e.data.byteLength, e.size), this.write(e.data)) : e.data instanceof o ? (this.writeEBMLVarInt(4), a(this, le, ue).call(this, e.data.value)) : e.data instanceof s && (this.writeEBMLVarInt(8), a(this, de, fe).call(this, e.data.value));
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakSet(), ce = function(e) {
|
|
110
|
+
n(this, u).setUint8(0, e), this.write(n(this, l).subarray(0, 1));
|
|
111
|
+
}, le = /* @__PURE__ */ new WeakSet(), ue = function(e) {
|
|
112
|
+
n(this, u).setFloat32(0, e, !1), this.write(n(this, l).subarray(0, 4));
|
|
113
|
+
}, de = /* @__PURE__ */ new WeakSet(), fe = function(e) {
|
|
114
|
+
n(this, u).setFloat64(0, e, !1), this.write(n(this, l));
|
|
115
|
+
}, pe = /* @__PURE__ */ new WeakSet(), me = function(e, t = ee(e)) {
|
|
116
|
+
let r = 0;
|
|
117
|
+
switch (t) {
|
|
118
|
+
case 6: n(this, u).setUint8(r++, e / 2 ** 40 | 0);
|
|
119
|
+
case 5: n(this, u).setUint8(r++, e / 2 ** 32 | 0);
|
|
120
|
+
case 4: n(this, u).setUint8(r++, e >> 24);
|
|
121
|
+
case 3: n(this, u).setUint8(r++, e >> 16);
|
|
122
|
+
case 2: n(this, u).setUint8(r++, e >> 8);
|
|
123
|
+
case 1:
|
|
124
|
+
n(this, u).setUint8(r++, e);
|
|
125
|
+
break;
|
|
126
|
+
default: throw Error("Bad UINT size " + t);
|
|
127
|
+
}
|
|
128
|
+
this.write(n(this, l).subarray(0, r));
|
|
129
|
+
}, he = /* @__PURE__ */ new WeakSet(), ge = function(e) {
|
|
130
|
+
this.write(new Uint8Array(e.split("").map((e) => e.charCodeAt(0))));
|
|
131
|
+
};
|
|
132
|
+
var ve, d, f, ye, be, xe = class extends _e {
|
|
133
|
+
constructor(e) {
|
|
134
|
+
super(), r(this, ye), r(this, ve, void 0), r(this, d, /* @__PURE__ */ new ArrayBuffer(2 ** 16)), r(this, f, new Uint8Array(n(this, d))), i(this, ve, e);
|
|
135
|
+
}
|
|
136
|
+
write(e) {
|
|
137
|
+
a(this, ye, be).call(this, this.pos + e.byteLength), n(this, f).set(e, this.pos), this.pos += e.byteLength;
|
|
138
|
+
}
|
|
139
|
+
finalize() {
|
|
140
|
+
a(this, ye, be).call(this, this.pos), n(this, ve).buffer = n(this, d).slice(0, this.pos);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
ve = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakSet(), be = function(e) {
|
|
144
|
+
let t = n(this, d).byteLength;
|
|
145
|
+
for (; t < e;) t *= 2;
|
|
146
|
+
if (t === n(this, d).byteLength) return;
|
|
147
|
+
let r = new ArrayBuffer(t), a = new Uint8Array(r);
|
|
148
|
+
a.set(n(this, f), 0), i(this, d, r), i(this, f, a);
|
|
149
|
+
};
|
|
150
|
+
var p, m, h, g, _ = class extends _e {
|
|
151
|
+
constructor(e) {
|
|
152
|
+
super(), this.target = e, r(this, p, !1), r(this, m, void 0), r(this, h, void 0), r(this, g, void 0);
|
|
153
|
+
}
|
|
154
|
+
write(e) {
|
|
155
|
+
if (!n(this, p)) return;
|
|
156
|
+
let t = this.pos;
|
|
157
|
+
if (t < n(this, h)) {
|
|
158
|
+
if (t + e.byteLength <= n(this, h)) return;
|
|
159
|
+
e = e.subarray(n(this, h) - t), t = 0;
|
|
160
|
+
}
|
|
161
|
+
let r = t + e.byteLength - n(this, h), a = n(this, m).byteLength;
|
|
162
|
+
for (; a < r;) a *= 2;
|
|
163
|
+
if (a !== n(this, m).byteLength) {
|
|
164
|
+
let e = new Uint8Array(a);
|
|
165
|
+
e.set(n(this, m), 0), i(this, m, e);
|
|
166
|
+
}
|
|
167
|
+
n(this, m).set(e, t - n(this, h)), i(this, g, Math.max(n(this, g), t + e.byteLength));
|
|
168
|
+
}
|
|
169
|
+
startTrackingWrites() {
|
|
170
|
+
i(this, p, !0), i(this, m, new Uint8Array(2 ** 10)), i(this, h, this.pos), i(this, g, this.pos);
|
|
171
|
+
}
|
|
172
|
+
getTrackedWrites() {
|
|
173
|
+
if (!n(this, p)) throw Error("Can't get tracked writes since nothing was tracked.");
|
|
174
|
+
let e = {
|
|
175
|
+
data: n(this, m).subarray(0, n(this, g) - n(this, h)),
|
|
176
|
+
start: n(this, h),
|
|
177
|
+
end: n(this, g)
|
|
178
|
+
};
|
|
179
|
+
return i(this, m, void 0), i(this, p, !1), e;
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
p = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap();
|
|
183
|
+
var Se = 2 ** 24, Ce = 2, v, y, b, x, S, C, we, Te, Ee, De, Oe, ke, w, Ae, je = class extends _ {
|
|
184
|
+
constructor(e, t) {
|
|
185
|
+
var n, a, o, s;
|
|
186
|
+
super(e), r(this, we), r(this, Ee), r(this, Oe), r(this, w), r(this, v, []), r(this, y, 0), r(this, b, void 0), r(this, x, void 0), r(this, S, void 0), r(this, C, []), i(this, b, t), i(this, x, (n = (a = e.options) == null ? void 0 : a.chunked) == null ? !1 : n), i(this, S, (o = (s = e.options) == null ? void 0 : s.chunkSize) == null ? Se : o);
|
|
187
|
+
}
|
|
188
|
+
write(e) {
|
|
189
|
+
super.write(e), n(this, v).push({
|
|
190
|
+
data: e.slice(),
|
|
191
|
+
start: this.pos
|
|
192
|
+
}), this.pos += e.byteLength;
|
|
193
|
+
}
|
|
194
|
+
flush() {
|
|
195
|
+
if (n(this, v).length === 0) return;
|
|
196
|
+
let e = [], t = [...n(this, v)].sort((e, t) => e.start - t.start);
|
|
197
|
+
e.push({
|
|
198
|
+
start: t[0].start,
|
|
199
|
+
size: t[0].data.byteLength
|
|
200
|
+
});
|
|
201
|
+
for (let n = 1; n < t.length; n++) {
|
|
202
|
+
let r = e[e.length - 1], i = t[n];
|
|
203
|
+
i.start <= r.start + r.size ? r.size = Math.max(r.size, i.start + i.data.byteLength - r.start) : e.push({
|
|
204
|
+
start: i.start,
|
|
205
|
+
size: i.data.byteLength
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
for (let t of e) {
|
|
209
|
+
t.data = new Uint8Array(t.size);
|
|
210
|
+
for (let e of n(this, v)) t.start <= e.start && e.start < t.start + t.size && t.data.set(e.data, e.start - t.start);
|
|
211
|
+
if (n(this, x)) a(this, we, Te).call(this, t.data, t.start), a(this, w, Ae).call(this);
|
|
212
|
+
else {
|
|
213
|
+
var r, o;
|
|
214
|
+
if (n(this, b) && t.start < n(this, y)) throw Error("Internal error: Monotonicity violation.");
|
|
215
|
+
(r = (o = this.target.options).onData) == null || r.call(o, t.data, t.start), i(this, y, t.start + t.data.byteLength);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
n(this, v).length = 0;
|
|
219
|
+
}
|
|
220
|
+
finalize() {
|
|
221
|
+
n(this, x) && a(this, w, Ae).call(this, !0);
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakSet(), Te = function(e, t) {
|
|
225
|
+
let r = n(this, C).findIndex((e) => e.start <= t && t < e.start + n(this, S));
|
|
226
|
+
r === -1 && (r = a(this, Oe, ke).call(this, t));
|
|
227
|
+
let i = n(this, C)[r], o = t - i.start, s = e.subarray(0, Math.min(n(this, S) - o, e.byteLength));
|
|
228
|
+
i.data.set(s, o);
|
|
229
|
+
let ee = {
|
|
230
|
+
start: o,
|
|
231
|
+
end: o + s.byteLength
|
|
232
|
+
};
|
|
233
|
+
if (a(this, Ee, De).call(this, i, ee), i.written[0].start === 0 && i.written[0].end === n(this, S) && (i.shouldFlush = !0), n(this, C).length > Ce) {
|
|
234
|
+
for (let e = 0; e < n(this, C).length - 1; e++) n(this, C)[e].shouldFlush = !0;
|
|
235
|
+
a(this, w, Ae).call(this);
|
|
236
|
+
}
|
|
237
|
+
s.byteLength < e.byteLength && a(this, we, Te).call(this, e.subarray(s.byteLength), t + s.byteLength);
|
|
238
|
+
}, Ee = /* @__PURE__ */ new WeakSet(), De = function(e, t) {
|
|
239
|
+
let n = 0, r = e.written.length - 1, i = -1;
|
|
240
|
+
for (; n <= r;) {
|
|
241
|
+
let a = Math.floor(n + (r - n + 1) / 2);
|
|
242
|
+
e.written[a].start <= t.start ? (n = a + 1, i = a) : r = a - 1;
|
|
243
|
+
}
|
|
244
|
+
for (e.written.splice(i + 1, 0, t), (i === -1 || e.written[i].end < t.start) && i++; i < e.written.length - 1 && e.written[i].end >= e.written[i + 1].start;) e.written[i].end = Math.max(e.written[i].end, e.written[i + 1].end), e.written.splice(i + 1, 1);
|
|
245
|
+
}, Oe = /* @__PURE__ */ new WeakSet(), ke = function(e) {
|
|
246
|
+
let t = {
|
|
247
|
+
start: Math.floor(e / n(this, S)) * n(this, S),
|
|
248
|
+
data: new Uint8Array(n(this, S)),
|
|
249
|
+
written: [],
|
|
250
|
+
shouldFlush: !1
|
|
251
|
+
};
|
|
252
|
+
return n(this, C).push(t), n(this, C).sort((e, t) => e.start - t.start), n(this, C).indexOf(t);
|
|
253
|
+
}, w = /* @__PURE__ */ new WeakSet(), Ae = function(e = !1) {
|
|
254
|
+
for (let a = 0; a < n(this, C).length; a++) {
|
|
255
|
+
let o = n(this, C)[a];
|
|
256
|
+
if (!(!o.shouldFlush && !e)) {
|
|
257
|
+
for (let e of o.written) {
|
|
258
|
+
var t, r;
|
|
259
|
+
if (n(this, b) && o.start + e.start < n(this, y)) throw Error("Internal error: Monotonicity violation.");
|
|
260
|
+
(t = (r = this.target.options).onData) == null || t.call(r, o.data.subarray(e.start, e.end), o.start + e.start), i(this, y, o.start + e.end);
|
|
261
|
+
}
|
|
262
|
+
n(this, C).splice(a--, 1);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
var Me = class extends je {
|
|
267
|
+
constructor(e, t) {
|
|
268
|
+
var n;
|
|
269
|
+
super(new ae({
|
|
270
|
+
onData: (t, n) => e.stream.write({
|
|
271
|
+
type: "write",
|
|
272
|
+
data: t,
|
|
273
|
+
position: n
|
|
274
|
+
}),
|
|
275
|
+
chunked: !0,
|
|
276
|
+
chunkSize: (n = e.options) == null ? void 0 : n.chunkSize
|
|
277
|
+
}), t);
|
|
278
|
+
}
|
|
279
|
+
}, T = 1, E = 2, Ne = 3, Pe = 1, Fe = 2, Ie = 17, Le = 2 ** 15, D = 2 ** 13, Re = "https://github.com/Vanilagy/webm-muxer", ze = 6, Be = 5, Ve = [
|
|
280
|
+
"strict",
|
|
281
|
+
"offset",
|
|
282
|
+
"permissive"
|
|
283
|
+
], O, k, He, Ue, A, j, M, N, P, F, I, L, R, z, B, V, H, U, W, We, G, K, Ge, Ke, qe, Je, Ye, Xe, Ze, Qe, $e, et, tt, nt, rt, it, at, ot, st, ct, lt, ut, dt, ft, pt, q, J, Y, X, mt, ht, gt, _t, vt, yt, bt, xt, St, Ct, Z, Q, $, wt, Tt, Et, Dt, Ot, kt, At, jt, Mt, Nt = class {
|
|
284
|
+
constructor(t) {
|
|
285
|
+
r(this, Je), r(this, Xe), r(this, Qe), r(this, et), r(this, nt), r(this, it), r(this, ot), r(this, ct), r(this, ut), r(this, ft), r(this, q), r(this, Y), r(this, mt), r(this, gt), r(this, vt), r(this, bt), r(this, St), r(this, Z), r(this, $), r(this, Tt), r(this, Dt), r(this, kt), r(this, jt), r(this, O, void 0), r(this, k, void 0), r(this, He, void 0), r(this, Ue, void 0), r(this, A, void 0), r(this, j, void 0), r(this, M, void 0), r(this, N, void 0), r(this, P, void 0), r(this, F, void 0), r(this, I, void 0), r(this, L, void 0), r(this, R, void 0), r(this, z, void 0), r(this, B, 0), r(this, V, []), r(this, H, []), r(this, U, []), r(this, W, void 0), r(this, We, void 0), r(this, G, -1), r(this, K, -1), r(this, Ge, -1), r(this, Ke, void 0), r(this, qe, !1), a(this, Je, Ye).call(this, t), i(this, O, e({
|
|
286
|
+
type: "webm",
|
|
287
|
+
firstTimestampBehavior: "strict"
|
|
288
|
+
}, t)), this.target = t.target;
|
|
289
|
+
let o = !!n(this, O).streaming;
|
|
290
|
+
if (t.target instanceof ie) i(this, k, new xe(t.target));
|
|
291
|
+
else if (t.target instanceof ae) i(this, k, new je(t.target, o));
|
|
292
|
+
else if (t.target instanceof oe) i(this, k, new Me(t.target, o));
|
|
293
|
+
else throw Error(`Invalid target: ${t.target}`);
|
|
294
|
+
a(this, Xe, Ze).call(this);
|
|
295
|
+
}
|
|
296
|
+
addVideoChunk(e, t, n) {
|
|
297
|
+
if (!(e instanceof EncodedVideoChunk)) throw TypeError("addVideoChunk's first argument (chunk) must be of type EncodedVideoChunk.");
|
|
298
|
+
if (t && typeof t != "object") throw TypeError("addVideoChunk's second argument (meta), when provided, must be an object.");
|
|
299
|
+
if (n !== void 0 && (!Number.isFinite(n) || n < 0)) throw TypeError("addVideoChunk's third argument (timestamp), when provided, must be a non-negative real number.");
|
|
300
|
+
let r = new Uint8Array(e.byteLength);
|
|
301
|
+
e.copyTo(r), this.addVideoChunkRaw(r, e.type, n == null ? e.timestamp : n, t);
|
|
302
|
+
}
|
|
303
|
+
addVideoChunkRaw(e, t, r, o) {
|
|
304
|
+
if (!(e instanceof Uint8Array)) throw TypeError("addVideoChunkRaw's first argument (data) must be an instance of Uint8Array.");
|
|
305
|
+
if (t !== "key" && t !== "delta") throw TypeError("addVideoChunkRaw's second argument (type) must be either 'key' or 'delta'.");
|
|
306
|
+
if (!Number.isFinite(r) || r < 0) throw TypeError("addVideoChunkRaw's third argument (timestamp) must be a non-negative real number.");
|
|
307
|
+
if (o && typeof o != "object") throw TypeError("addVideoChunkRaw's fourth argument (meta), when provided, must be an object.");
|
|
308
|
+
if (a(this, jt, Mt).call(this), !n(this, O).video) throw Error("No video track declared.");
|
|
309
|
+
n(this, W) === void 0 && i(this, W, r), o && a(this, mt, ht).call(this, o);
|
|
310
|
+
let s = a(this, bt, xt).call(this, e, t, r, T);
|
|
311
|
+
for (n(this, O).video.codec === "V_VP9" && a(this, gt, _t).call(this, s), i(this, G, s.timestamp); n(this, H).length > 0 && n(this, H)[0].timestamp <= s.timestamp;) {
|
|
312
|
+
let e = n(this, H).shift();
|
|
313
|
+
a(this, Z, Q).call(this, e, !1);
|
|
314
|
+
}
|
|
315
|
+
!n(this, O).audio || s.timestamp <= n(this, K) ? a(this, Z, Q).call(this, s, !0) : n(this, V).push(s), a(this, vt, yt).call(this), a(this, q, J).call(this);
|
|
316
|
+
}
|
|
317
|
+
addAudioChunk(e, t, n) {
|
|
318
|
+
if (!(e instanceof EncodedAudioChunk)) throw TypeError("addAudioChunk's first argument (chunk) must be of type EncodedAudioChunk.");
|
|
319
|
+
if (t && typeof t != "object") throw TypeError("addAudioChunk's second argument (meta), when provided, must be an object.");
|
|
320
|
+
if (n !== void 0 && (!Number.isFinite(n) || n < 0)) throw TypeError("addAudioChunk's third argument (timestamp), when provided, must be a non-negative real number.");
|
|
321
|
+
let r = new Uint8Array(e.byteLength);
|
|
322
|
+
e.copyTo(r), this.addAudioChunkRaw(r, e.type, n == null ? e.timestamp : n, t);
|
|
323
|
+
}
|
|
324
|
+
addAudioChunkRaw(e, t, r, o) {
|
|
325
|
+
if (!(e instanceof Uint8Array)) throw TypeError("addAudioChunkRaw's first argument (data) must be an instance of Uint8Array.");
|
|
326
|
+
if (t !== "key" && t !== "delta") throw TypeError("addAudioChunkRaw's second argument (type) must be either 'key' or 'delta'.");
|
|
327
|
+
if (!Number.isFinite(r) || r < 0) throw TypeError("addAudioChunkRaw's third argument (timestamp) must be a non-negative real number.");
|
|
328
|
+
if (o && typeof o != "object") throw TypeError("addAudioChunkRaw's fourth argument (meta), when provided, must be an object.");
|
|
329
|
+
if (a(this, jt, Mt).call(this), !n(this, O).audio) throw Error("No audio track declared.");
|
|
330
|
+
n(this, We) === void 0 && i(this, We, r), o != null && o.decoderConfig && (n(this, O).streaming ? i(this, F, a(this, $, wt).call(this, o.decoderConfig.description)) : a(this, Tt, Et).call(this, n(this, F), o.decoderConfig.description));
|
|
331
|
+
let s = a(this, bt, xt).call(this, e, t, r, E);
|
|
332
|
+
for (i(this, K, s.timestamp); n(this, V).length > 0 && n(this, V)[0].timestamp <= s.timestamp;) {
|
|
333
|
+
let e = n(this, V).shift();
|
|
334
|
+
a(this, Z, Q).call(this, e, !0);
|
|
335
|
+
}
|
|
336
|
+
!n(this, O).video || s.timestamp <= n(this, G) ? a(this, Z, Q).call(this, s, !n(this, O).video) : n(this, H).push(s), a(this, vt, yt).call(this), a(this, q, J).call(this);
|
|
337
|
+
}
|
|
338
|
+
addSubtitleChunk(e, t, r) {
|
|
339
|
+
if (typeof e != "object" || !e) throw TypeError("addSubtitleChunk's first argument (chunk) must be an object.");
|
|
340
|
+
if (!(e.body instanceof Uint8Array)) throw TypeError("body must be an instance of Uint8Array.");
|
|
341
|
+
if (!Number.isFinite(e.timestamp) || e.timestamp < 0) throw TypeError("timestamp must be a non-negative real number.");
|
|
342
|
+
if (!Number.isFinite(e.duration) || e.duration < 0) throw TypeError("duration must be a non-negative real number.");
|
|
343
|
+
if (e.additions && !(e.additions instanceof Uint8Array)) throw TypeError("additions, when present, must be an instance of Uint8Array.");
|
|
344
|
+
if (typeof t != "object") throw TypeError("addSubtitleChunk's second argument (meta) must be an object.");
|
|
345
|
+
if (a(this, jt, Mt).call(this), !n(this, O).subtitles) throw Error("No subtitle track declared.");
|
|
346
|
+
t != null && t.decoderConfig && (n(this, O).streaming ? i(this, I, a(this, $, wt).call(this, t.decoderConfig.description)) : a(this, Tt, Et).call(this, n(this, I), t.decoderConfig.description));
|
|
347
|
+
let o = a(this, bt, xt).call(this, e.body, "key", r == null ? e.timestamp : r, Ne, e.duration, e.additions);
|
|
348
|
+
i(this, Ge, o.timestamp), n(this, U).push(o), a(this, vt, yt).call(this), a(this, q, J).call(this);
|
|
349
|
+
}
|
|
350
|
+
finalize() {
|
|
351
|
+
if (n(this, qe)) throw Error("Cannot finalize a muxer more than once.");
|
|
352
|
+
for (; n(this, V).length > 0;) a(this, Z, Q).call(this, n(this, V).shift(), !0);
|
|
353
|
+
for (; n(this, H).length > 0;) a(this, Z, Q).call(this, n(this, H).shift(), !0);
|
|
354
|
+
for (; n(this, U).length > 0 && n(this, U)[0].timestamp <= n(this, B);) a(this, Z, Q).call(this, n(this, U).shift(), !1);
|
|
355
|
+
if (n(this, R) && a(this, kt, At).call(this), n(this, k).writeEBML(n(this, L)), !n(this, O).streaming) {
|
|
356
|
+
let e = n(this, k).pos, t = n(this, k).pos - n(this, Y, X);
|
|
357
|
+
n(this, k).seek(n(this, k).offsets.get(n(this, He)) + 4), n(this, k).writeEBMLVarInt(t, ze), n(this, M).data = new s(n(this, B)), n(this, k).seek(n(this, k).offsets.get(n(this, M))), n(this, k).writeEBML(n(this, M)), n(this, A).data[0].data[1].data = n(this, k).offsets.get(n(this, L)) - n(this, Y, X), n(this, A).data[1].data[1].data = n(this, k).offsets.get(n(this, Ue)) - n(this, Y, X), n(this, A).data[2].data[1].data = n(this, k).offsets.get(n(this, j)) - n(this, Y, X), n(this, k).seek(n(this, k).offsets.get(n(this, A))), n(this, k).writeEBML(n(this, A)), n(this, k).seek(e);
|
|
358
|
+
}
|
|
359
|
+
a(this, q, J).call(this), n(this, k).finalize(), i(this, qe, !0);
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
O = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), qe = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakSet(), Ye = function(e) {
|
|
363
|
+
if (typeof e != "object") throw TypeError("The muxer requires an options object to be passed to its constructor.");
|
|
364
|
+
if (!(e.target instanceof re)) throw TypeError("The target must be provided and an instance of Target.");
|
|
365
|
+
if (e.video) {
|
|
366
|
+
if (typeof e.video.codec != "string") throw TypeError(`Invalid video codec: ${e.video.codec}. Must be a string.`);
|
|
367
|
+
if (!Number.isInteger(e.video.width) || e.video.width <= 0) throw TypeError(`Invalid video width: ${e.video.width}. Must be a positive integer.`);
|
|
368
|
+
if (!Number.isInteger(e.video.height) || e.video.height <= 0) throw TypeError(`Invalid video height: ${e.video.height}. Must be a positive integer.`);
|
|
369
|
+
if (e.video.frameRate !== void 0 && (!Number.isFinite(e.video.frameRate) || e.video.frameRate <= 0)) throw TypeError(`Invalid video frame rate: ${e.video.frameRate}. Must be a positive number.`);
|
|
370
|
+
if (e.video.alpha !== void 0 && typeof e.video.alpha != "boolean") throw TypeError(`Invalid video alpha: ${e.video.alpha}. Must be a boolean.`);
|
|
371
|
+
}
|
|
372
|
+
if (e.audio) {
|
|
373
|
+
if (typeof e.audio.codec != "string") throw TypeError(`Invalid audio codec: ${e.audio.codec}. Must be a string.`);
|
|
374
|
+
if (!Number.isInteger(e.audio.numberOfChannels) || e.audio.numberOfChannels <= 0) throw TypeError(`Invalid number of audio channels: ${e.audio.numberOfChannels}. Must be a positive integer.`);
|
|
375
|
+
if (!Number.isInteger(e.audio.sampleRate) || e.audio.sampleRate <= 0) throw TypeError(`Invalid audio sample rate: ${e.audio.sampleRate}. Must be a positive integer.`);
|
|
376
|
+
if (e.audio.bitDepth !== void 0 && (!Number.isInteger(e.audio.bitDepth) || e.audio.bitDepth <= 0)) throw TypeError(`Invalid audio bit depth: ${e.audio.bitDepth}. Must be a positive integer.`);
|
|
377
|
+
}
|
|
378
|
+
if (e.subtitles && typeof e.subtitles.codec != "string") throw TypeError(`Invalid subtitles codec: ${e.subtitles.codec}. Must be a string.`);
|
|
379
|
+
if (e.type !== void 0 && !["webm", "matroska"].includes(e.type)) throw TypeError(`Invalid type: ${e.type}. Must be 'webm' or 'matroska'.`);
|
|
380
|
+
if (e.firstTimestampBehavior && !Ve.includes(e.firstTimestampBehavior)) throw TypeError(`Invalid first timestamp behavior: ${e.firstTimestampBehavior}`);
|
|
381
|
+
if (e.streaming !== void 0 && typeof e.streaming != "boolean") throw TypeError(`Invalid streaming option: ${e.streaming}. Must be a boolean.`);
|
|
382
|
+
}, Xe = /* @__PURE__ */ new WeakSet(), Ze = function() {
|
|
383
|
+
n(this, k) instanceof _ && n(this, k).target.options.onHeader && n(this, k).startTrackingWrites(), a(this, Qe, $e).call(this), n(this, O).streaming || a(this, it, at).call(this), a(this, ot, st).call(this), a(this, et, tt).call(this), a(this, nt, rt).call(this), n(this, O).streaming || (a(this, ct, lt).call(this), a(this, ut, dt).call(this)), a(this, ft, pt).call(this), a(this, q, J).call(this);
|
|
384
|
+
}, Qe = /* @__PURE__ */ new WeakSet(), $e = function() {
|
|
385
|
+
var e;
|
|
386
|
+
let t = {
|
|
387
|
+
id: 440786851,
|
|
388
|
+
data: [
|
|
389
|
+
{
|
|
390
|
+
id: 17030,
|
|
391
|
+
data: 1
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
id: 17143,
|
|
395
|
+
data: 1
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
id: 17138,
|
|
399
|
+
data: 4
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
id: 17139,
|
|
403
|
+
data: 8
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
id: 17026,
|
|
407
|
+
data: (e = n(this, O).type) == null ? "webm" : e
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
id: 17031,
|
|
411
|
+
data: 2
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
id: 17029,
|
|
415
|
+
data: 2
|
|
416
|
+
}
|
|
417
|
+
]
|
|
418
|
+
};
|
|
419
|
+
n(this, k).writeEBML(t);
|
|
420
|
+
}, et = /* @__PURE__ */ new WeakSet(), tt = function() {
|
|
421
|
+
i(this, P, {
|
|
422
|
+
id: 236,
|
|
423
|
+
size: 4,
|
|
424
|
+
data: new Uint8Array(D)
|
|
425
|
+
}), i(this, F, {
|
|
426
|
+
id: 236,
|
|
427
|
+
size: 4,
|
|
428
|
+
data: new Uint8Array(D)
|
|
429
|
+
}), i(this, I, {
|
|
430
|
+
id: 236,
|
|
431
|
+
size: 4,
|
|
432
|
+
data: new Uint8Array(D)
|
|
433
|
+
});
|
|
434
|
+
}, nt = /* @__PURE__ */ new WeakSet(), rt = function() {
|
|
435
|
+
i(this, N, {
|
|
436
|
+
id: 21936,
|
|
437
|
+
data: [
|
|
438
|
+
{
|
|
439
|
+
id: 21937,
|
|
440
|
+
data: 2
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
id: 21946,
|
|
444
|
+
data: 2
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
id: 21947,
|
|
448
|
+
data: 2
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
id: 21945,
|
|
452
|
+
data: 0
|
|
453
|
+
}
|
|
454
|
+
]
|
|
455
|
+
});
|
|
456
|
+
}, it = /* @__PURE__ */ new WeakSet(), at = function() {
|
|
457
|
+
let e = new Uint8Array([
|
|
458
|
+
28,
|
|
459
|
+
83,
|
|
460
|
+
187,
|
|
461
|
+
107
|
|
462
|
+
]), t = new Uint8Array([
|
|
463
|
+
21,
|
|
464
|
+
73,
|
|
465
|
+
169,
|
|
466
|
+
102
|
|
467
|
+
]), n = new Uint8Array([
|
|
468
|
+
22,
|
|
469
|
+
84,
|
|
470
|
+
174,
|
|
471
|
+
107
|
|
472
|
+
]), r = {
|
|
473
|
+
id: 290298740,
|
|
474
|
+
data: [
|
|
475
|
+
{
|
|
476
|
+
id: 19899,
|
|
477
|
+
data: [{
|
|
478
|
+
id: 21419,
|
|
479
|
+
data: e
|
|
480
|
+
}, {
|
|
481
|
+
id: 21420,
|
|
482
|
+
size: 5,
|
|
483
|
+
data: 0
|
|
484
|
+
}]
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
id: 19899,
|
|
488
|
+
data: [{
|
|
489
|
+
id: 21419,
|
|
490
|
+
data: t
|
|
491
|
+
}, {
|
|
492
|
+
id: 21420,
|
|
493
|
+
size: 5,
|
|
494
|
+
data: 0
|
|
495
|
+
}]
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
id: 19899,
|
|
499
|
+
data: [{
|
|
500
|
+
id: 21419,
|
|
501
|
+
data: n
|
|
502
|
+
}, {
|
|
503
|
+
id: 21420,
|
|
504
|
+
size: 5,
|
|
505
|
+
data: 0
|
|
506
|
+
}]
|
|
507
|
+
}
|
|
508
|
+
]
|
|
509
|
+
};
|
|
510
|
+
i(this, A, r);
|
|
511
|
+
}, ot = /* @__PURE__ */ new WeakSet(), st = function() {
|
|
512
|
+
let e = {
|
|
513
|
+
id: 17545,
|
|
514
|
+
data: new s(0)
|
|
515
|
+
};
|
|
516
|
+
i(this, M, e);
|
|
517
|
+
let t = {
|
|
518
|
+
id: 357149030,
|
|
519
|
+
data: [
|
|
520
|
+
{
|
|
521
|
+
id: 2807729,
|
|
522
|
+
data: 1e6
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
id: 19840,
|
|
526
|
+
data: Re
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
id: 22337,
|
|
530
|
+
data: Re
|
|
531
|
+
},
|
|
532
|
+
n(this, O).streaming ? null : e
|
|
533
|
+
]
|
|
534
|
+
};
|
|
535
|
+
i(this, Ue, t);
|
|
536
|
+
}, ct = /* @__PURE__ */ new WeakSet(), lt = function() {
|
|
537
|
+
let e = {
|
|
538
|
+
id: 374648427,
|
|
539
|
+
data: []
|
|
540
|
+
};
|
|
541
|
+
i(this, j, e), n(this, O).video && e.data.push({
|
|
542
|
+
id: 174,
|
|
543
|
+
data: [
|
|
544
|
+
{
|
|
545
|
+
id: 215,
|
|
546
|
+
data: T
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
id: 29637,
|
|
550
|
+
data: T
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
id: 131,
|
|
554
|
+
data: Pe
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
id: 134,
|
|
558
|
+
data: n(this, O).video.codec
|
|
559
|
+
},
|
|
560
|
+
n(this, P),
|
|
561
|
+
n(this, O).video.frameRate ? {
|
|
562
|
+
id: 2352003,
|
|
563
|
+
data: 1e9 / n(this, O).video.frameRate
|
|
564
|
+
} : null,
|
|
565
|
+
{
|
|
566
|
+
id: 224,
|
|
567
|
+
data: [
|
|
568
|
+
{
|
|
569
|
+
id: 176,
|
|
570
|
+
data: n(this, O).video.width
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
id: 186,
|
|
574
|
+
data: n(this, O).video.height
|
|
575
|
+
},
|
|
576
|
+
n(this, O).video.alpha ? {
|
|
577
|
+
id: 21440,
|
|
578
|
+
data: 1
|
|
579
|
+
} : null,
|
|
580
|
+
n(this, N)
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
]
|
|
584
|
+
}), n(this, O).audio && (i(this, F, n(this, O).streaming ? n(this, F) || null : {
|
|
585
|
+
id: 236,
|
|
586
|
+
size: 4,
|
|
587
|
+
data: new Uint8Array(D)
|
|
588
|
+
}), e.data.push({
|
|
589
|
+
id: 174,
|
|
590
|
+
data: [
|
|
591
|
+
{
|
|
592
|
+
id: 215,
|
|
593
|
+
data: E
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
id: 29637,
|
|
597
|
+
data: E
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
id: 131,
|
|
601
|
+
data: Fe
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
id: 134,
|
|
605
|
+
data: n(this, O).audio.codec
|
|
606
|
+
},
|
|
607
|
+
n(this, F),
|
|
608
|
+
{
|
|
609
|
+
id: 225,
|
|
610
|
+
data: [
|
|
611
|
+
{
|
|
612
|
+
id: 181,
|
|
613
|
+
data: new o(n(this, O).audio.sampleRate)
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
id: 159,
|
|
617
|
+
data: n(this, O).audio.numberOfChannels
|
|
618
|
+
},
|
|
619
|
+
n(this, O).audio.bitDepth ? {
|
|
620
|
+
id: 25188,
|
|
621
|
+
data: n(this, O).audio.bitDepth
|
|
622
|
+
} : null
|
|
623
|
+
]
|
|
624
|
+
}
|
|
625
|
+
]
|
|
626
|
+
})), n(this, O).subtitles && e.data.push({
|
|
627
|
+
id: 174,
|
|
628
|
+
data: [
|
|
629
|
+
{
|
|
630
|
+
id: 215,
|
|
631
|
+
data: Ne
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
id: 29637,
|
|
635
|
+
data: Ne
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
id: 131,
|
|
639
|
+
data: Ie
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
id: 134,
|
|
643
|
+
data: n(this, O).subtitles.codec
|
|
644
|
+
},
|
|
645
|
+
n(this, I)
|
|
646
|
+
]
|
|
647
|
+
});
|
|
648
|
+
}, ut = /* @__PURE__ */ new WeakSet(), dt = function() {
|
|
649
|
+
let e = {
|
|
650
|
+
id: 408125543,
|
|
651
|
+
size: n(this, O).streaming ? -1 : ze,
|
|
652
|
+
data: [
|
|
653
|
+
n(this, O).streaming ? null : n(this, A),
|
|
654
|
+
n(this, Ue),
|
|
655
|
+
n(this, j)
|
|
656
|
+
]
|
|
657
|
+
};
|
|
658
|
+
if (i(this, He, e), n(this, k).writeEBML(e), n(this, k) instanceof _ && n(this, k).target.options.onHeader) {
|
|
659
|
+
let { data: e, start: t } = n(this, k).getTrackedWrites();
|
|
660
|
+
n(this, k).target.options.onHeader(e, t);
|
|
661
|
+
}
|
|
662
|
+
}, ft = /* @__PURE__ */ new WeakSet(), pt = function() {
|
|
663
|
+
i(this, L, {
|
|
664
|
+
id: 475249515,
|
|
665
|
+
data: []
|
|
666
|
+
});
|
|
667
|
+
}, q = /* @__PURE__ */ new WeakSet(), J = function() {
|
|
668
|
+
n(this, k) instanceof je && n(this, k).flush();
|
|
669
|
+
}, Y = /* @__PURE__ */ new WeakSet(), X = function() {
|
|
670
|
+
return n(this, k).dataOffsets.get(n(this, He));
|
|
671
|
+
}, mt = /* @__PURE__ */ new WeakSet(), ht = function(e) {
|
|
672
|
+
if (e.decoderConfig) {
|
|
673
|
+
if (e.decoderConfig.colorSpace) {
|
|
674
|
+
let t = e.decoderConfig.colorSpace;
|
|
675
|
+
if (i(this, Ke, t), n(this, N).data = [
|
|
676
|
+
{
|
|
677
|
+
id: 21937,
|
|
678
|
+
data: {
|
|
679
|
+
rgb: 1,
|
|
680
|
+
bt709: 1,
|
|
681
|
+
bt470bg: 5,
|
|
682
|
+
smpte170m: 6
|
|
683
|
+
}[t.matrix]
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
id: 21946,
|
|
687
|
+
data: {
|
|
688
|
+
bt709: 1,
|
|
689
|
+
smpte170m: 6,
|
|
690
|
+
"iec61966-2-1": 13
|
|
691
|
+
}[t.transfer]
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
id: 21947,
|
|
695
|
+
data: {
|
|
696
|
+
bt709: 1,
|
|
697
|
+
bt470bg: 5,
|
|
698
|
+
smpte170m: 6
|
|
699
|
+
}[t.primaries]
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
id: 21945,
|
|
703
|
+
data: [1, 2][Number(t.fullRange)]
|
|
704
|
+
}
|
|
705
|
+
], !n(this, O).streaming) {
|
|
706
|
+
let e = n(this, k).pos;
|
|
707
|
+
n(this, k).seek(n(this, k).offsets.get(n(this, N))), n(this, k).writeEBML(n(this, N)), n(this, k).seek(e);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
e.decoderConfig.description && (n(this, O).streaming ? i(this, P, a(this, $, wt).call(this, e.decoderConfig.description)) : a(this, Tt, Et).call(this, n(this, P), e.decoderConfig.description));
|
|
711
|
+
}
|
|
712
|
+
}, gt = /* @__PURE__ */ new WeakSet(), _t = function(e) {
|
|
713
|
+
if (e.type !== "key" || !n(this, Ke)) return;
|
|
714
|
+
let t = 0;
|
|
715
|
+
if (c(e.data, 0, 2) !== 2) return;
|
|
716
|
+
t += 2;
|
|
717
|
+
let r = (c(e.data, t + 1, t + 2) << 1) + c(e.data, t + 0, t + 1);
|
|
718
|
+
t += 2, r === 3 && t++;
|
|
719
|
+
let i = c(e.data, t + 0, t + 1);
|
|
720
|
+
if (t++, i) return;
|
|
721
|
+
let a = c(e.data, t + 0, t + 1);
|
|
722
|
+
if (t++, a !== 0) return;
|
|
723
|
+
t += 2;
|
|
724
|
+
let o = c(e.data, t + 0, t + 24);
|
|
725
|
+
if (t += 24, o !== 4817730) return;
|
|
726
|
+
r >= 2 && t++;
|
|
727
|
+
let s = {
|
|
728
|
+
rgb: 7,
|
|
729
|
+
bt709: 2,
|
|
730
|
+
bt470bg: 1,
|
|
731
|
+
smpte170m: 3
|
|
732
|
+
}[n(this, Ke).matrix];
|
|
733
|
+
ne(e.data, t + 0, t + 3, s);
|
|
734
|
+
}, vt = /* @__PURE__ */ new WeakSet(), yt = function() {
|
|
735
|
+
let e = Math.min(n(this, O).video ? n(this, G) : Infinity, n(this, O).audio ? n(this, K) : Infinity), t = n(this, U);
|
|
736
|
+
for (; t.length > 0 && t[0].timestamp <= e;) a(this, Z, Q).call(this, t.shift(), !n(this, O).video && !n(this, O).audio);
|
|
737
|
+
}, bt = /* @__PURE__ */ new WeakSet(), xt = function(e, t, n, r, i, o) {
|
|
738
|
+
return {
|
|
739
|
+
data: e,
|
|
740
|
+
additions: o,
|
|
741
|
+
type: t,
|
|
742
|
+
timestamp: a(this, St, Ct).call(this, n, r),
|
|
743
|
+
duration: i,
|
|
744
|
+
trackNumber: r
|
|
745
|
+
};
|
|
746
|
+
}, St = /* @__PURE__ */ new WeakSet(), Ct = function(e, t) {
|
|
747
|
+
let r = t === T ? n(this, G) : t === E ? n(this, K) : n(this, Ge);
|
|
748
|
+
if (t !== Ne) {
|
|
749
|
+
let i = t === T ? n(this, W) : n(this, We);
|
|
750
|
+
if (n(this, O).firstTimestampBehavior === "strict" && r === -1 && e !== 0) throw Error(`The first chunk for your media track must have a timestamp of 0 (received ${e}). Non-zero first timestamps are often caused by directly piping frames or audio data from a MediaStreamTrack into the encoder. Their timestamps are typically relative to the age of the document, which is probably what you want.
|
|
751
|
+
|
|
752
|
+
If you want to offset all timestamps of a track such that the first one is zero, set firstTimestampBehavior: 'offset' in the options.
|
|
753
|
+
If you want to allow non-zero first timestamps, set firstTimestampBehavior: 'permissive'.
|
|
754
|
+
`);
|
|
755
|
+
n(this, O).firstTimestampBehavior === "offset" && (e -= i);
|
|
756
|
+
}
|
|
757
|
+
if (e < r) throw Error(`Timestamps must be monotonically increasing (went from ${r} to ${e}).`);
|
|
758
|
+
if (e < 0) throw Error(`Timestamps must be non-negative (received ${e}).`);
|
|
759
|
+
return e;
|
|
760
|
+
}, Z = /* @__PURE__ */ new WeakSet(), Q = function(e, t) {
|
|
761
|
+
n(this, O).streaming && !n(this, j) && (a(this, ct, lt).call(this), a(this, ut, dt).call(this));
|
|
762
|
+
let r = Math.floor(e.timestamp / 1e3), o = r - n(this, z), s = t && e.type === "key" && o >= 1e3, ee = o >= Le;
|
|
763
|
+
if ((!n(this, R) || s || ee) && (a(this, Dt, Ot).call(this, r), o = 0), o < 0) return;
|
|
764
|
+
let te = new Uint8Array(4), c = new DataView(te.buffer);
|
|
765
|
+
if (c.setUint8(0, 128 | e.trackNumber), c.setInt16(1, o, !1), e.duration === void 0 && !e.additions) {
|
|
766
|
+
c.setUint8(3, Number(e.type === "key") << 7);
|
|
767
|
+
let t = {
|
|
768
|
+
id: 163,
|
|
769
|
+
data: [te, e.data]
|
|
770
|
+
};
|
|
771
|
+
n(this, k).writeEBML(t);
|
|
772
|
+
} else {
|
|
773
|
+
let t = Math.floor(e.duration / 1e3), r = {
|
|
774
|
+
id: 160,
|
|
775
|
+
data: [
|
|
776
|
+
{
|
|
777
|
+
id: 161,
|
|
778
|
+
data: [te, e.data]
|
|
779
|
+
},
|
|
780
|
+
e.duration === void 0 ? null : {
|
|
781
|
+
id: 155,
|
|
782
|
+
data: t
|
|
783
|
+
},
|
|
784
|
+
e.additions ? {
|
|
785
|
+
id: 30113,
|
|
786
|
+
data: e.additions
|
|
787
|
+
} : null
|
|
788
|
+
]
|
|
789
|
+
};
|
|
790
|
+
n(this, k).writeEBML(r);
|
|
791
|
+
}
|
|
792
|
+
i(this, B, Math.max(n(this, B), r));
|
|
793
|
+
}, $ = /* @__PURE__ */ new WeakSet(), wt = function(e) {
|
|
794
|
+
return {
|
|
795
|
+
id: 25506,
|
|
796
|
+
size: 4,
|
|
797
|
+
data: new Uint8Array(e)
|
|
798
|
+
};
|
|
799
|
+
}, Tt = /* @__PURE__ */ new WeakSet(), Et = function(e, t) {
|
|
800
|
+
let r = n(this, k).pos;
|
|
801
|
+
n(this, k).seek(n(this, k).offsets.get(e));
|
|
802
|
+
let i = D - (6 + t.byteLength);
|
|
803
|
+
if (i < 0) {
|
|
804
|
+
let e = t.byteLength + i;
|
|
805
|
+
t = t instanceof ArrayBuffer ? t.slice(0, e) : t.buffer.slice(0, e), i = 0;
|
|
806
|
+
}
|
|
807
|
+
e = [a(this, $, wt).call(this, t), {
|
|
808
|
+
id: 236,
|
|
809
|
+
size: 4,
|
|
810
|
+
data: new Uint8Array(i)
|
|
811
|
+
}], n(this, k).writeEBML(e), n(this, k).seek(r);
|
|
812
|
+
}, Dt = /* @__PURE__ */ new WeakSet(), Ot = function(e) {
|
|
813
|
+
n(this, R) && a(this, kt, At).call(this), n(this, k) instanceof _ && n(this, k).target.options.onCluster && n(this, k).startTrackingWrites(), i(this, R, {
|
|
814
|
+
id: 524531317,
|
|
815
|
+
size: n(this, O).streaming ? -1 : Be,
|
|
816
|
+
data: [{
|
|
817
|
+
id: 231,
|
|
818
|
+
data: e
|
|
819
|
+
}]
|
|
820
|
+
}), n(this, k).writeEBML(n(this, R)), i(this, z, e);
|
|
821
|
+
let t = n(this, k).offsets.get(n(this, R)) - n(this, Y, X);
|
|
822
|
+
n(this, L).data.push({
|
|
823
|
+
id: 187,
|
|
824
|
+
data: [
|
|
825
|
+
{
|
|
826
|
+
id: 179,
|
|
827
|
+
data: e
|
|
828
|
+
},
|
|
829
|
+
n(this, O).video ? {
|
|
830
|
+
id: 183,
|
|
831
|
+
data: [{
|
|
832
|
+
id: 247,
|
|
833
|
+
data: T
|
|
834
|
+
}, {
|
|
835
|
+
id: 241,
|
|
836
|
+
data: t
|
|
837
|
+
}]
|
|
838
|
+
} : null,
|
|
839
|
+
n(this, O).audio ? {
|
|
840
|
+
id: 183,
|
|
841
|
+
data: [{
|
|
842
|
+
id: 247,
|
|
843
|
+
data: E
|
|
844
|
+
}, {
|
|
845
|
+
id: 241,
|
|
846
|
+
data: t
|
|
847
|
+
}]
|
|
848
|
+
} : null
|
|
849
|
+
]
|
|
850
|
+
});
|
|
851
|
+
}, kt = /* @__PURE__ */ new WeakSet(), At = function() {
|
|
852
|
+
if (!n(this, O).streaming) {
|
|
853
|
+
let e = n(this, k).pos - n(this, k).dataOffsets.get(n(this, R)), t = n(this, k).pos;
|
|
854
|
+
n(this, k).seek(n(this, k).offsets.get(n(this, R)) + 4), n(this, k).writeEBMLVarInt(e, Be), n(this, k).seek(t);
|
|
855
|
+
}
|
|
856
|
+
if (n(this, k) instanceof _ && n(this, k).target.options.onCluster) {
|
|
857
|
+
let { data: e, start: t } = n(this, k).getTrackedWrites();
|
|
858
|
+
n(this, k).target.options.onCluster(e, t, n(this, z));
|
|
859
|
+
}
|
|
860
|
+
}, jt = /* @__PURE__ */ new WeakSet(), Mt = function() {
|
|
861
|
+
if (n(this, qe)) throw Error("Cannot add new video or audio chunks after the file has been finalized.");
|
|
862
|
+
}, new TextEncoder();
|
|
863
|
+
//#endregion
|
|
864
|
+
export { ie as ArrayBufferTarget, Nt as Muxer };
|