@jackuait/blok 0.17.0 → 0.19.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 +5 -5
- package/dist/blok.mjs +2 -2
- package/dist/blok.umd.js +4 -4
- package/dist/chunks/APEv2Parser-4KTzNuV0.cjs +1 -0
- package/dist/chunks/APEv2Parser-WvRvu4zL.mjs +187 -0
- package/dist/chunks/AbstractID3Parser-DM9acVTg.mjs +34 -0
- package/dist/chunks/AbstractID3Parser-o6LG6Iyj.cjs +1 -0
- package/dist/chunks/AiffParser-C_VaWeb5.mjs +109 -0
- package/dist/chunks/AiffParser-DVmZ6jG0.cjs +1 -0
- package/dist/chunks/AsfParser-CH5F_9Wp.mjs +419 -0
- package/dist/chunks/AsfParser-Dwm_MRPg.cjs +1 -0
- package/dist/chunks/BasicParser-BFTgNkp-.mjs +743 -0
- package/dist/chunks/BasicParser-CLAKKNEs.cjs +1 -0
- package/dist/chunks/DsdiffParser-BAdYwB7y.mjs +108 -0
- package/dist/chunks/DsdiffParser-DRFw1wX0.cjs +1 -0
- package/dist/chunks/DsfParser-DWMLfBH1.mjs +61 -0
- package/dist/chunks/DsfParser-DjS_tBuv.cjs +1 -0
- package/dist/chunks/FlacParser-BdKXrY7L.mjs +255 -0
- package/dist/chunks/FlacParser-CPQ0VqXv.cjs +1 -0
- package/dist/chunks/ID3v1Parser-CPjEHype.cjs +1 -0
- package/dist/chunks/ID3v1Parser-DoxlznrE.mjs +75 -0
- package/dist/chunks/ID3v2Parser-BIrxzjBm.mjs +518 -0
- package/dist/chunks/ID3v2Parser-CMd_Ayt7.cjs +1 -0
- package/dist/chunks/ID3v2Token-Cc901eYL.cjs +1 -0
- package/dist/chunks/ID3v2Token-D5v9lCfb.mjs +107 -0
- package/dist/chunks/MP4Parser-0KMJ-q2k.mjs +811 -0
- package/dist/chunks/MP4Parser-B8kU67Xi.cjs +1 -0
- package/dist/chunks/MatroskaParser-CzZTyUP-.cjs +1 -0
- package/dist/chunks/MatroskaParser-fxFuCddu.mjs +814 -0
- package/dist/chunks/MpegParser-DX5r4iE7.cjs +1 -0
- package/dist/chunks/MpegParser-R-6QiuhU.mjs +513 -0
- package/dist/chunks/MusepackParser-DFLoF47O.mjs +187 -0
- package/dist/chunks/MusepackParser-OgeWmD5G.cjs +1 -0
- package/dist/chunks/OggParser-C1qP2qC7.mjs +251 -0
- package/dist/chunks/OggParser-DjscM3J-.cjs +1 -0
- package/dist/chunks/Util-BL3wIJcu.cjs +1 -0
- package/dist/chunks/Util-DiBcLCh8.mjs +109 -0
- package/dist/chunks/WavPackParser-3J7J92gh.cjs +1 -0
- package/dist/chunks/WavPackParser-Ck8xXsNf.mjs +116 -0
- package/dist/chunks/WaveParser-CiNJ-5JL.cjs +1 -0
- package/dist/chunks/WaveParser-hxQlWijT.mjs +187 -0
- package/dist/chunks/{blok-BPd65xOj.cjs → blok-BosfCfPX.cjs} +4 -4
- package/dist/chunks/{blok-D4ApwnD7.mjs → blok-CXB-exXU.mjs} +99 -75
- package/dist/chunks/{constants-DObdf8NU.mjs → constants-BmCvHbkL.mjs} +2 -1
- package/dist/chunks/{constants-C3wBsvmH.cjs → constants-ChsAFZ8F.cjs} +1 -1
- package/dist/chunks/core-CqiEzfU3.mjs +292 -0
- package/dist/chunks/core-DdDpt2u7.mjs +3931 -0
- package/dist/chunks/core-YGVcFb_q.cjs +1 -0
- package/dist/chunks/core-uWDvHWK7.cjs +6 -0
- package/dist/chunks/{i18next-loader-CNLosgId.cjs → i18next-loader-BBPMegxc.cjs} +1 -1
- package/dist/chunks/{i18next-loader-BMhspWFn.mjs → i18next-loader-K-ir8UKk.mjs} +1 -1
- package/dist/chunks/{lightweight-i18n-Ck1HlVxq.mjs → lightweight-i18n-DJpMke7a.mjs} +27 -0
- package/dist/chunks/lightweight-i18n-LFW8S8u-.cjs +1 -0
- package/dist/chunks/{messages-1H2SY5H1.mjs → messages-3jkCmB_A.mjs} +28 -1
- package/dist/{messages-CSf1g9n_.mjs → chunks/messages-5339ApgH.mjs} +28 -1
- package/dist/{messages-BlInN8XP2.mjs → chunks/messages-7LWW3BVh.mjs} +28 -1
- package/dist/chunks/messages-9B1F-k48.cjs +1 -0
- package/dist/chunks/messages-Au1UpgkX.cjs +1 -0
- package/dist/chunks/messages-B-u5B7tY.cjs +1 -0
- package/dist/chunks/{messages-hhT3Vii-.mjs → messages-B01D7aHY.mjs} +28 -1
- package/dist/chunks/{messages-CbdaJSfC2.mjs → messages-B2iaIrIu.mjs} +28 -1
- package/dist/chunks/messages-B6794_2J.cjs +1 -0
- package/dist/chunks/{messages-B0o3rVBB.cjs → messages-B6dbtt1c.cjs} +1 -1
- package/dist/chunks/{messages-BlOVJtaj.cjs → messages-B6yMdb3B.cjs} +1 -1
- package/dist/chunks/{messages-D5CeQW1e2.cjs → messages-B7st3eF_.cjs} +1 -1
- package/dist/chunks/{messages-CEZ528TO2.cjs → messages-BHCepNsI.cjs} +1 -1
- package/dist/chunks/{messages-CrwZs1Gq.cjs → messages-BHdKd7pH.cjs} +1 -1
- package/dist/{messages-Dc1aAz5V.mjs → chunks/messages-BO-L5oN9.mjs} +28 -1
- package/dist/{messages-BhGHyHKC2.mjs → chunks/messages-BRTWvTAP.mjs} +28 -1
- package/dist/chunks/{messages-BMNmXaC8.mjs → messages-BUvlOqll.mjs} +28 -1
- package/dist/chunks/messages-BV22YIZ_.cjs +1 -0
- package/dist/chunks/messages-BXp_U3uS.cjs +1 -0
- package/dist/{messages-CLkbvdRh2.mjs → chunks/messages-BYCHzM7F.mjs} +28 -1
- package/dist/chunks/messages-B_cHWyWC.cjs +1 -0
- package/dist/{messages-B95smO_C.mjs → chunks/messages-B_d857cA.mjs} +28 -1
- package/dist/chunks/messages-BaVZgTrw.cjs +1 -0
- package/dist/chunks/{messages-BQUzqXIO.mjs → messages-Bb80Csl3.mjs} +28 -1
- package/dist/{messages-BH5AKf_i2.mjs → chunks/messages-BbZz_Anm.mjs} +28 -1
- package/dist/chunks/{messages-Dna-8bQq.mjs → messages-BdL8bmTL.mjs} +28 -1
- package/dist/chunks/{messages-CMFcaa9C.mjs → messages-BeS9EOEO.mjs} +28 -1
- package/dist/chunks/{messages-BQOx3XGd.cjs → messages-BjYhwRk7.cjs} +1 -1
- package/dist/chunks/{messages-79WWudxY.cjs → messages-BkgBVEiE.cjs} +1 -1
- package/dist/{messages-B5xy5hCa.mjs → chunks/messages-Bmq--WTx.mjs} +28 -1
- package/dist/{messages-BLslMhf-.mjs → chunks/messages-Bp0LdGKj.mjs} +28 -1
- package/dist/chunks/{messages-BaWaLwcn2.mjs → messages-BpMWMH9_.mjs} +28 -1
- package/dist/chunks/{messages-_ECIn1VC2.cjs → messages-BsTzdfZF.cjs} +1 -1
- package/dist/chunks/{messages-Dl6VC9Q9.cjs → messages-BveiGA2x.cjs} +1 -1
- package/dist/{messages-DFDw0nkI.mjs → chunks/messages-BwOUSDJR.mjs} +28 -1
- package/dist/chunks/messages-ByNR9m9W.cjs +1 -0
- package/dist/chunks/{messages-CrFIbrXr2.mjs → messages-Byn9-dhb2.mjs} +28 -1
- package/dist/chunks/{messages-B4BvJtlu.mjs → messages-C0swL9CY.mjs} +28 -1
- package/dist/chunks/{messages-3B44ZmLZ.cjs → messages-C2ptZOWh.cjs} +1 -1
- package/dist/chunks/{messages-CpcZgGYg.mjs → messages-C3rGCBi_.mjs} +28 -1
- package/dist/{messages-BvwVDbII.mjs → chunks/messages-C8_r3iTR2.mjs} +28 -1
- package/dist/{messages-STUXoPH72.mjs → chunks/messages-CATH_uz1.mjs} +28 -1
- package/dist/chunks/{messages-DeXUZcFn2.cjs → messages-CBbgEXuO.cjs} +1 -1
- package/dist/chunks/messages-CEySIig9.cjs +1 -0
- package/dist/chunks/messages-CGdCpNZ62.cjs +1 -0
- package/dist/chunks/{messages-Cgph4q9d.cjs → messages-CH9SBR-i.cjs} +1 -1
- package/dist/chunks/{messages-X90YfYzG2.mjs → messages-CI2W7P-j.mjs} +28 -1
- package/dist/{messages-Bumbqs6s.mjs → chunks/messages-CIBYzzFy.mjs} +28 -1
- package/dist/chunks/{messages-BE6rW2R-.cjs → messages-CJFSq8Fl.cjs} +1 -1
- package/dist/chunks/{messages-Dlc1DdZ22.cjs → messages-CM8uUnPx.cjs} +1 -1
- package/dist/chunks/{messages-cYjlWqco.cjs → messages-COx3hDcP.cjs} +1 -1
- package/dist/chunks/messages-CQT8TtiF.cjs +1 -0
- package/dist/chunks/{messages-Byntrl2c.mjs → messages-CRUb9o5k.mjs} +28 -1
- package/dist/chunks/messages-CT8djlV6.cjs +1 -0
- package/dist/chunks/{messages-k4Do3gkF.mjs → messages-CUPup5e3.mjs} +28 -1
- package/dist/chunks/{messages-BfWGa4V82.cjs → messages-CVrOxu3J.cjs} +1 -1
- package/dist/chunks/messages-CWFSMzug2.cjs +1 -0
- package/dist/{messages-DaKjx7Gh.mjs → chunks/messages-CX0tJpOb.mjs} +28 -1
- package/dist/chunks/{messages-BChCPw99.mjs → messages-CXk-iM-i.mjs} +28 -1
- package/dist/chunks/{messages-8uD5ctYP.cjs → messages-CZJZ-au3.cjs} +1 -1
- package/dist/chunks/messages-CZddldga.cjs +1 -0
- package/dist/chunks/{messages-0ZOxg81Y.mjs → messages-Ca9zIrBo.mjs} +28 -1
- package/dist/chunks/{messages-BFcq7wsx.mjs → messages-CbyVDo8y.mjs} +28 -1
- package/dist/chunks/{messages-C3fAHxfE2.cjs → messages-CcsM8Q7g.cjs} +1 -1
- package/dist/chunks/{messages-C_s-wv1r2.mjs → messages-CeIzWL_4.mjs} +28 -1
- package/dist/chunks/{messages-DBPkzBZO2.mjs → messages-CeLv1whu2.mjs} +28 -1
- package/dist/chunks/messages-Ciq5_PsP.cjs +1 -0
- package/dist/{messages-CRL2ecWR.mjs → chunks/messages-CjCn5IsF.mjs} +28 -1
- package/dist/chunks/messages-CjfEt9bg.cjs +1 -0
- package/dist/{messages-DKoeDmZV2.mjs → chunks/messages-Ck1-ddbo.mjs} +28 -1
- package/dist/chunks/{messages-C79Ef9MU.mjs → messages-CkosWGGH.mjs} +28 -1
- package/dist/chunks/{messages-oLqnmqJf2.mjs → messages-Cl_pM31G.mjs} +28 -1
- package/dist/chunks/messages-CmsAbu_A.cjs +1 -0
- package/dist/chunks/messages-CqRtDVFO.cjs +1 -0
- package/dist/chunks/{messages-CO4J7Nns.cjs → messages-CuMtymEs.cjs} +1 -1
- package/dist/{messages-B6J8l1aF.mjs → chunks/messages-Cvg_uTfy.mjs} +28 -1
- package/dist/chunks/messages-Cy-2_lIA.cjs +1 -0
- package/dist/{messages-DvIPbDsq.mjs → chunks/messages-D-QWtvWg.mjs} +28 -1
- package/dist/chunks/{messages-CV3U2Vsm.mjs → messages-D-p-omWy.mjs} +28 -1
- package/dist/{messages-bCZW7LiC.mjs → chunks/messages-D-s4_vnU.mjs} +28 -1
- package/dist/chunks/messages-D41fO84y.cjs +1 -0
- package/dist/chunks/{messages-FIgYAomz2.mjs → messages-D4u2PSQw.mjs} +28 -1
- package/dist/chunks/messages-D7H9JUDr.cjs +1 -0
- package/dist/chunks/{messages-CpZneXUI.cjs → messages-D7sU-NqL.cjs} +1 -1
- package/dist/chunks/{messages-BGoJHXUk2.cjs → messages-DCwrXfck.cjs} +1 -1
- package/dist/chunks/{messages-dp4NwDVM.mjs → messages-DDJkNbJy.mjs} +28 -1
- package/dist/{messages-Dy3mYP_n.mjs → chunks/messages-DDX6I6MX.mjs} +28 -1
- package/dist/chunks/messages-DEg5FAg1.cjs +1 -0
- package/dist/chunks/{messages-B_lkWkPQ.cjs → messages-DFHNw6PQ.cjs} +1 -1
- package/dist/chunks/{messages-DZwozMZD2.mjs → messages-DHv7knYB.mjs} +28 -1
- package/dist/chunks/{messages-YhmR1nl02.cjs → messages-DIFwztFo.cjs} +1 -1
- package/dist/chunks/{messages-BjFB8sow.cjs → messages-DIetNXTx.cjs} +1 -1
- package/dist/{messages-D_ql7LL-2.mjs → chunks/messages-DNtAzacv.mjs} +28 -1
- package/dist/chunks/messages-DOqJ6ogK.cjs +1 -0
- package/dist/chunks/messages-DQJcAz4s.cjs +1 -0
- package/dist/chunks/{messages-C93gDUHr.mjs → messages-DQfi2DoY.mjs} +28 -1
- package/dist/chunks/{messages-61uWTg1y.mjs → messages-DQr7bXMD.mjs} +28 -1
- package/dist/chunks/messages-DT-JnTnw.cjs +1 -0
- package/dist/chunks/{messages-CpbireNX.cjs → messages-DUWCkLYR.cjs} +1 -1
- package/dist/chunks/{messages-BXvKhyQH.cjs → messages-Da8yFc7l.cjs} +1 -1
- package/dist/{messages-ByntluqZ.mjs → chunks/messages-DgF8OkNr.mjs} +28 -1
- package/dist/chunks/{messages-DtTgOx9a.mjs → messages-DiODNXET.mjs} +28 -1
- package/dist/{messages-BBb_hXxm.mjs → chunks/messages-DjZoCJ00.mjs} +28 -1
- package/dist/chunks/messages-DjrfovG0.cjs +1 -0
- package/dist/chunks/messages-DmjccFHq.cjs +1 -0
- package/dist/chunks/{messages-sLVwrcar.cjs → messages-DpNmnBjK.cjs} +1 -1
- package/dist/chunks/messages-DtaPHADA.cjs +1 -0
- package/dist/chunks/{messages-BFGgLdIA2.mjs → messages-DuD4ut1b.mjs} +28 -1
- package/dist/chunks/{messages-DKJ5CX9h2.mjs → messages-DuHFGMCJ.mjs} +28 -1
- package/dist/{messages-B7E1zFAv.mjs → chunks/messages-Dwl878eS.mjs} +28 -1
- package/dist/chunks/{messages-5Rp1xyL4.cjs → messages-ETJ7tQ9O.cjs} +1 -1
- package/dist/chunks/messages-EsX3eikv.cjs +1 -0
- package/dist/chunks/{messages-BK32XCpH.mjs → messages-HJnG9r2l.mjs} +28 -1
- package/dist/chunks/{messages-DjU1jbKf.cjs → messages-Hfo6uCIC.cjs} +1 -1
- package/dist/chunks/{messages-Ywb6VdfO2.cjs → messages-IqNWRaNS.cjs} +1 -1
- package/dist/{messages-CQ6A0zI9.mjs → chunks/messages-MPe9FjYe.mjs} +28 -1
- package/dist/chunks/messages-NJAjMFXd.cjs +1 -0
- package/dist/{messages-BctWdAZP2.mjs → chunks/messages-QCaF3d92.mjs} +28 -1
- package/dist/chunks/messages-SozFksSf.cjs +1 -0
- package/dist/chunks/messages-UXS3zL9A2.cjs +1 -0
- package/dist/chunks/{messages-3iZ6jJ6e.cjs → messages-VeyvtTce.cjs} +1 -1
- package/dist/chunks/{messages--uPFKcl3.mjs → messages-Xh-c7d4C.mjs} +28 -1
- package/dist/chunks/{messages-l0nKmGOV.cjs → messages-Z4LYgfWc.cjs} +1 -1
- package/dist/{messages-CQnz6pXD2.mjs → chunks/messages-ZMG7qQ3D.mjs} +28 -1
- package/dist/chunks/{messages-R2RH1RLt.mjs → messages-cSBZ5qVe.mjs} +28 -1
- package/dist/chunks/{messages-DvxZjb5g2.cjs → messages-gh5G15J1.cjs} +1 -1
- package/dist/{messages-BqFRlEJE2.mjs → chunks/messages-jEbEE90_.mjs} +28 -1
- package/dist/{messages-CqtZ_gtb.mjs → chunks/messages-kqnzps-X.mjs} +28 -1
- package/dist/chunks/{messages-LW9Kd-vn.mjs → messages-m-A6ArIM.mjs} +28 -1
- package/dist/chunks/{messages-CEUDK26P2.mjs → messages-t26x8wxB.mjs} +28 -1
- package/dist/chunks/{messages-DKjhx7Y3.cjs → messages-tR0BdeVG.cjs} +1 -1
- package/dist/{messages-Vfl9lWod.mjs → chunks/messages-typO_i_k.mjs} +28 -1
- package/dist/{messages-Co2GV7rA2.mjs → chunks/messages-ypIHI9Fr.mjs} +28 -1
- package/dist/chunks/{messages-DR5DyRRY2.mjs → messages-zPUQsksJ.mjs} +28 -1
- package/dist/chunks/{tools-CM6aPuR4.mjs → tools-BdoYHyV0.mjs} +2625 -1873
- package/dist/chunks/tools-DmEzyrn3.cjs +208 -0
- package/dist/chunks/types-BNsalfLy.cjs +1 -0
- package/dist/chunks/types-gj36fzRQ.mjs +28 -0
- package/dist/full.cjs +1 -1
- package/dist/full.mjs +10 -10
- package/dist/locales.mjs +94 -67
- package/dist/{messages-aPBlKHzr.mjs → messages-4drvqPN8.mjs} +28 -1
- package/dist/{chunks/messages-BIQ2VT8X2.mjs → messages-8__-vX3U.mjs} +28 -1
- package/dist/{chunks/messages-C3B8l3Hy.mjs → messages-Ao2vCNAH2.mjs} +28 -1
- package/dist/{messages-B0Gc0lBw.mjs → messages-B13GEFFu.mjs} +28 -1
- package/dist/{messages-CxK_Vgra.mjs → messages-B2YnZIU2.mjs} +28 -1
- package/dist/{messages-AK_9q2yu.mjs → messages-BI5B9bxE.mjs} +28 -1
- package/dist/{chunks/messages-Db_L5RNl.mjs → messages-BIgvPd6I2.mjs} +28 -1
- package/dist/{chunks/messages-BwxzN2q3.mjs → messages-BKG0QHVl.mjs} +28 -1
- package/dist/{messages-un7M6YZC2.mjs → messages-BKGg4XYm2.mjs} +28 -1
- package/dist/{messages-DZlYqaxx.mjs → messages-BOWDzfkH.mjs} +28 -1
- package/dist/{chunks/messages-C56BTPcC.mjs → messages-BQaiScU1.mjs} +28 -1
- package/dist/{messages-B5THTOwb2.mjs → messages-BQhHthxq2.mjs} +28 -1
- package/dist/{messages-CCgDqF-e.mjs → messages-BRLWpOnP.mjs} +28 -1
- package/dist/{messages-C8QB980F2.mjs → messages-BarhGl2S2.mjs} +28 -1
- package/dist/{messages-BPsdJnwT.mjs → messages-BgPDPIkO.mjs} +28 -1
- package/dist/{messages-BTrok9K8.mjs → messages-BlvF3pot.mjs} +28 -1
- package/dist/{chunks/messages-ZPOc6IQC.mjs → messages-Bmu3rJwO.mjs} +28 -1
- package/dist/{chunks/messages-BQEh67Mi2.mjs → messages-BpwhHkFb2.mjs} +28 -1
- package/dist/{messages-DlxBkSUv.mjs → messages-BvutXmgt.mjs} +28 -1
- package/dist/{chunks/messages-D4UnR6e52.mjs → messages-BwCgJUdq.mjs} +28 -1
- package/dist/{chunks/messages-Ccng4hJ2.mjs → messages-C5IE9mXm.mjs} +28 -1
- package/dist/{messages-DLKTwtBI.mjs → messages-C6R0bzW5.mjs} +28 -1
- package/dist/{chunks/messages-9gvi5jul.mjs → messages-C9Kq8259.mjs} +28 -1
- package/dist/{messages-YPF71WjJ.mjs → messages-CAnOyxrm.mjs} +28 -1
- package/dist/{chunks/messages-D0_Mxuh62.mjs → messages-CDueJTe8.mjs} +28 -1
- package/dist/{chunks/messages-BNuGVAEy.mjs → messages-CEGqNXnP.mjs} +28 -1
- package/dist/{messages-CQotju8u2.mjs → messages-CF5MeYEt2.mjs} +28 -1
- package/dist/{messages-CCdDP2DE.mjs → messages-CGiVoFTi.mjs} +28 -1
- package/dist/{messages-DoahmNMI2.mjs → messages-CQzOV7VE2.mjs} +28 -1
- package/dist/{messages-D08TSj5Q.mjs → messages-CUFac9Qe.mjs} +28 -1
- package/dist/{messages-Bt5Sbl952.mjs → messages-CUcUO5bC2.mjs} +28 -1
- package/dist/{messages-DpbHfnge.mjs → messages-CcF4SO9W.mjs} +28 -1
- package/dist/{messages-B87GXoqt.mjs → messages-CeqpzGl9.mjs} +28 -1
- package/dist/{chunks/messages-DFA5OVrs2.mjs → messages-Cg6a88Bb2.mjs} +28 -1
- package/dist/{messages-CYuTyoK6.mjs → messages-Ch-SytN8.mjs} +28 -1
- package/dist/{messages-Bwese2OQ.mjs → messages-Cn3uvFq3.mjs} +28 -1
- package/dist/{messages-Da09byG42.mjs → messages-CqZgsrVP2.mjs} +28 -1
- package/dist/{messages-DrwEVbKk2.mjs → messages-CskLLTiG2.mjs} +28 -1
- package/dist/{chunks/messages-Bvge__AJ2.mjs → messages-CusWGsl42.mjs} +28 -1
- package/dist/{messages-C-ytN6Dz2.mjs → messages-Cvq2EFPT2.mjs} +28 -1
- package/dist/{messages-DQaDNQat2.mjs → messages-CwvHO8gp2.mjs} +28 -1
- package/dist/{chunks/messages-D3kC7iDa2.mjs → messages-D4dovFzY2.mjs} +28 -1
- package/dist/{chunks/messages-BKSDnjOs.mjs → messages-D9qgYMU82.mjs} +28 -1
- package/dist/{messages-BDJfFuXR.mjs → messages-DGAWjKQZ.mjs} +28 -1
- package/dist/{chunks/messages-Bgzyr5Lh.mjs → messages-DR2JBU-H.mjs} +28 -1
- package/dist/{messages-1ZSVxDYN2.mjs → messages-Da1woCgt2.mjs} +28 -1
- package/dist/{messages-B9h-mKVO2.mjs → messages-DbE-riR52.mjs} +28 -1
- package/dist/{chunks/messages-BGaAuDRS.mjs → messages-DcQNeoPB.mjs} +28 -1
- package/dist/{messages-C-8BMvSp2.mjs → messages-Dq_RdEny2.mjs} +28 -1
- package/dist/{messages-Bx5KWmyJ.mjs → messages-Grhv5SE_.mjs} +28 -1
- package/dist/{chunks/messages-BIHeeP7X2.mjs → messages-HVgCKIww2.mjs} +28 -1
- package/dist/{messages-kjO2WeG-2.mjs → messages-KyJQtOkh2.mjs} +28 -1
- package/dist/{chunks/messages-CqhQuuRo2.mjs → messages-L4sYfXpM.mjs} +28 -1
- package/dist/{chunks/messages-CHx6m_Bo.mjs → messages-P5B61L1J2.mjs} +28 -1
- package/dist/{messages-DrjZz7u9.mjs → messages-RXQKVFCJ.mjs} +28 -1
- package/dist/{chunks/messages-DWjHAdb3.mjs → messages-UJx6PvCL.mjs} +28 -1
- package/dist/{chunks/messages-DkqiXPS7.mjs → messages-VIQ8vjvS.mjs} +28 -1
- package/dist/{chunks/messages-CYOersvL.mjs → messages-bN4Zmk2m.mjs} +28 -1
- package/dist/{chunks/messages-BTKPcoLu.mjs → messages-fAEKzdUq.mjs} +28 -1
- package/dist/{chunks/messages-DYsO5SIA.mjs → messages-gTUy3xjb.mjs} +28 -1
- package/dist/{chunks/messages-BnW_Fwro.mjs → messages-hGop1gbF.mjs} +28 -1
- package/dist/{chunks/messages-yGQn67fw2.mjs → messages-jQsl7cga2.mjs} +28 -1
- package/dist/{chunks/messages-Duj8jpve2.mjs → messages-jsrzDVZy2.mjs} +28 -1
- package/dist/{chunks/messages-C6vijVZv2.mjs → messages-lnxRz5rM.mjs} +28 -1
- package/dist/{messages-CRhhyqEy2.mjs → messages-wmS6Z2m82.mjs} +28 -1
- package/dist/{chunks/messages-D1q601Wg.mjs → messages-yuNINyS1.mjs} +28 -1
- package/dist/{messages-Bn19MGza.mjs → messages-zOl6jpOa.mjs} +28 -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 +360 -1
- package/package.json +2 -1
- package/src/blok.ts +43 -1
- package/src/components/constants/data-attributes.ts +2 -0
- package/src/components/i18n/locales/am/messages.json +28 -1
- package/src/components/i18n/locales/ar/messages.json +28 -1
- package/src/components/i18n/locales/az/messages.json +28 -1
- package/src/components/i18n/locales/bg/messages.json +28 -1
- package/src/components/i18n/locales/bn/messages.json +28 -1
- package/src/components/i18n/locales/bs/messages.json +28 -1
- package/src/components/i18n/locales/cs/messages.json +28 -1
- package/src/components/i18n/locales/da/messages.json +28 -1
- package/src/components/i18n/locales/de/messages.json +28 -1
- package/src/components/i18n/locales/dv/messages.json +28 -1
- package/src/components/i18n/locales/el/messages.json +28 -1
- package/src/components/i18n/locales/en/messages.json +27 -0
- package/src/components/i18n/locales/es/messages.json +28 -1
- package/src/components/i18n/locales/et/messages.json +28 -1
- package/src/components/i18n/locales/fa/messages.json +28 -1
- package/src/components/i18n/locales/fi/messages.json +28 -1
- package/src/components/i18n/locales/fil/messages.json +28 -1
- package/src/components/i18n/locales/fr/messages.json +28 -1
- package/src/components/i18n/locales/gu/messages.json +28 -1
- package/src/components/i18n/locales/he/messages.json +28 -1
- package/src/components/i18n/locales/hi/messages.json +28 -1
- package/src/components/i18n/locales/hr/messages.json +28 -1
- package/src/components/i18n/locales/hu/messages.json +28 -1
- package/src/components/i18n/locales/hy/messages.json +28 -1
- package/src/components/i18n/locales/id/messages.json +28 -1
- package/src/components/i18n/locales/it/messages.json +28 -1
- package/src/components/i18n/locales/ja/messages.json +28 -1
- package/src/components/i18n/locales/ka/messages.json +28 -1
- package/src/components/i18n/locales/km/messages.json +28 -1
- package/src/components/i18n/locales/kn/messages.json +28 -1
- package/src/components/i18n/locales/ko/messages.json +28 -1
- package/src/components/i18n/locales/ku/messages.json +28 -1
- package/src/components/i18n/locales/lo/messages.json +28 -1
- package/src/components/i18n/locales/lt/messages.json +28 -1
- package/src/components/i18n/locales/lv/messages.json +28 -1
- package/src/components/i18n/locales/mk/messages.json +28 -1
- package/src/components/i18n/locales/ml/messages.json +28 -1
- package/src/components/i18n/locales/mn/messages.json +28 -1
- package/src/components/i18n/locales/mr/messages.json +28 -1
- package/src/components/i18n/locales/ms/messages.json +28 -1
- package/src/components/i18n/locales/my/messages.json +28 -1
- package/src/components/i18n/locales/ne/messages.json +28 -1
- package/src/components/i18n/locales/nl/messages.json +28 -1
- package/src/components/i18n/locales/no/messages.json +28 -1
- package/src/components/i18n/locales/pa/messages.json +28 -1
- package/src/components/i18n/locales/pl/messages.json +28 -1
- package/src/components/i18n/locales/ps/messages.json +28 -1
- package/src/components/i18n/locales/pt/messages.json +28 -1
- package/src/components/i18n/locales/ro/messages.json +28 -1
- package/src/components/i18n/locales/ru/messages.json +28 -1
- package/src/components/i18n/locales/sd/messages.json +28 -1
- package/src/components/i18n/locales/si/messages.json +28 -1
- package/src/components/i18n/locales/sk/messages.json +28 -1
- package/src/components/i18n/locales/sl/messages.json +28 -1
- package/src/components/i18n/locales/sq/messages.json +28 -1
- package/src/components/i18n/locales/sr/messages.json +28 -1
- package/src/components/i18n/locales/sv/messages.json +28 -1
- package/src/components/i18n/locales/sw/messages.json +28 -1
- package/src/components/i18n/locales/ta/messages.json +28 -1
- package/src/components/i18n/locales/te/messages.json +28 -1
- package/src/components/i18n/locales/th/messages.json +28 -1
- package/src/components/i18n/locales/tr/messages.json +28 -1
- package/src/components/i18n/locales/ug/messages.json +28 -1
- package/src/components/i18n/locales/uk/messages.json +28 -1
- package/src/components/i18n/locales/ur/messages.json +28 -1
- package/src/components/i18n/locales/vi/messages.json +28 -1
- package/src/components/i18n/locales/yi/messages.json +28 -1
- package/src/components/i18n/locales/zh/messages.json +28 -1
- package/src/components/modules/ui.ts +30 -0
- package/src/components/utils/media-empty-state.ts +3 -2
- package/src/components/utils/mime-match.ts +22 -0
- package/src/styles/audio.css +531 -0
- package/src/styles/main.css +12 -0
- package/src/tools/audio/constants.ts +21 -0
- package/src/tools/audio/controls.ts +416 -0
- package/src/tools/audio/empty-state.ts +45 -0
- package/src/tools/audio/i18n.ts +13 -0
- package/src/tools/audio/index.ts +482 -0
- package/src/tools/audio/liveliness.ts +136 -0
- package/src/tools/audio/metadata.ts +56 -0
- package/src/tools/audio/ui.ts +104 -0
- package/src/tools/audio/uploader.ts +76 -0
- package/src/tools/audio/waveform.ts +277 -0
- package/src/tools/file/constants.ts +2 -3
- package/src/tools/image/constants.ts +2 -7
- package/src/tools/image/uploader.ts +2 -1
- package/src/tools/index.ts +2 -0
- package/src/tools/video/constants.ts +2 -5
- package/src/tools/video/uploader.ts +2 -1
- package/types/api/index.d.ts +1 -0
- package/types/api/width.d.ts +31 -0
- package/types/data-attributes.d.ts +1 -0
- package/types/index.d.ts +5 -0
- package/types/tools/audio.d.ts +40 -0
- package/types/tools/image.d.ts +4 -1
- package/types/tools/video.d.ts +4 -1
- package/types/tools-entry.d.ts +9 -0
- package/dist/chunks/lightweight-i18n-ByswFbdt.cjs +0 -1
- package/dist/chunks/messages-1bAMgAsO.cjs +0 -1
- package/dist/chunks/messages-5Vbzn-DL2.cjs +0 -1
- package/dist/chunks/messages-6lqZ4lhc2.cjs +0 -1
- package/dist/chunks/messages-795D2ldP2.cjs +0 -1
- package/dist/chunks/messages-B1h0nDQW.cjs +0 -1
- package/dist/chunks/messages-B37vUkBi.cjs +0 -1
- package/dist/chunks/messages-BDs_gdD_.cjs +0 -1
- package/dist/chunks/messages-BXgTHDIw.cjs +0 -1
- package/dist/chunks/messages-BYW-U0iT.cjs +0 -1
- package/dist/chunks/messages-BeTQxvmX2.cjs +0 -1
- package/dist/chunks/messages-Bjmg_8lv2.cjs +0 -1
- package/dist/chunks/messages-Bpvja9xW2.cjs +0 -1
- package/dist/chunks/messages-BtMQ6v_L.cjs +0 -1
- package/dist/chunks/messages-BvChjyuU2.cjs +0 -1
- package/dist/chunks/messages-CAix8jdZ.cjs +0 -1
- package/dist/chunks/messages-CKiWXTe1.cjs +0 -1
- package/dist/chunks/messages-COTP4ZJ_2.cjs +0 -1
- package/dist/chunks/messages-Cp7wFDrY2.cjs +0 -1
- package/dist/chunks/messages-D8UH8jc6.cjs +0 -1
- package/dist/chunks/messages-DAmOTPVW2.cjs +0 -1
- package/dist/chunks/messages-DEduQerF.cjs +0 -1
- package/dist/chunks/messages-DHah-frn.cjs +0 -1
- package/dist/chunks/messages-DI1ZLPxM.cjs +0 -1
- package/dist/chunks/messages-Dgp7Wk4H.cjs +0 -1
- package/dist/chunks/messages-DhnCZQEY.cjs +0 -1
- package/dist/chunks/messages-Dz8AmvFq.cjs +0 -1
- package/dist/chunks/messages-DzarYc1J2.cjs +0 -1
- package/dist/chunks/messages-FM0KHIkQ2.cjs +0 -1
- package/dist/chunks/messages-JsmKjXPZ.cjs +0 -1
- package/dist/chunks/messages-RWVOHsZu.cjs +0 -1
- package/dist/chunks/messages-iwzDjgrP.cjs +0 -1
- package/dist/chunks/messages-l7DqwqOu2.cjs +0 -1
- package/dist/chunks/messages-zkunMjZf2.cjs +0 -1
- package/dist/chunks/tools-kfoXLTzY.cjs +0 -208
- /package/dist/chunks/{am-BA02TqF9.cjs → am-Dc8fykoi.cjs} +0 -0
- /package/dist/chunks/{am-C9_6r8HY.mjs → am-DyT_H_W5.mjs} +0 -0
- /package/dist/chunks/{ar-CB4IsGCa.cjs → ar-B4htcHv2.cjs} +0 -0
- /package/dist/chunks/{ar-BM96nSXF.mjs → ar-DxcVoX26.mjs} +0 -0
- /package/dist/chunks/{az-FykE_aDi.cjs → az-CddDVVCC.cjs} +0 -0
- /package/dist/chunks/{az-DnZSY5ok.mjs → az-Ck_jWtwp.mjs} +0 -0
- /package/dist/chunks/{bg-D6r90gqH.cjs → bg-BExJFlqx.cjs} +0 -0
- /package/dist/chunks/{bg-BplUvPeX.mjs → bg-C4_DlJ7m.mjs} +0 -0
- /package/dist/chunks/{bn-B7w2dbK4.cjs → bn-B3CWOlDr.cjs} +0 -0
- /package/dist/chunks/{bn-CdP9lnfr.mjs → bn-D0PWjX6h.mjs} +0 -0
- /package/dist/chunks/{bs-BtX-qLsk.mjs → bs-BjqCqh8B.mjs} +0 -0
- /package/dist/chunks/{bs-DztHHorM.cjs → bs-BylFYMjB.cjs} +0 -0
- /package/dist/chunks/{cs-CLMsCdIt.cjs → cs-BzXww59F.cjs} +0 -0
- /package/dist/chunks/{cs-NcDYS-aU.mjs → cs-R_vXAqRw.mjs} +0 -0
- /package/dist/chunks/{da-sJ7EsHcO.cjs → da-Be_YGjP-.cjs} +0 -0
- /package/dist/chunks/{da-ANg6gK3-.mjs → da-BuzQWEfl.mjs} +0 -0
- /package/dist/chunks/{de-CTxvRxuE.mjs → de-BuXrJCQB.mjs} +0 -0
- /package/dist/chunks/{de-CxMqLKhy.cjs → de-CuXVxRU3.cjs} +0 -0
- /package/dist/chunks/{el-Bg6QXLt5.cjs → el-CkLmGPX-.cjs} +0 -0
- /package/dist/chunks/{el-CgOoJaXB.mjs → el-d_XP5H44.mjs} +0 -0
- /package/dist/chunks/{es-7zUbslPJ.cjs → es-CpevBSzX.cjs} +0 -0
- /package/dist/chunks/{es-D5YDFRu-.mjs → es-D79FXk9q.mjs} +0 -0
- /package/dist/chunks/{et-57a7ees8.mjs → et-BmawyEOM.mjs} +0 -0
- /package/dist/chunks/{et-D_rhRdDD.cjs → et-Dm53D0Mw.cjs} +0 -0
- /package/dist/chunks/{fa-JBr2zsfI.cjs → fa-BLZQhg44.cjs} +0 -0
- /package/dist/chunks/{fa-Dp_BXnBP.mjs → fa-Cyzee-uD.mjs} +0 -0
- /package/dist/chunks/{fi-DjbYN6MA.cjs → fi-CktzJP0P.cjs} +0 -0
- /package/dist/chunks/{fi-at45xjOS.mjs → fi-zVk232gP.mjs} +0 -0
- /package/dist/chunks/{fil-dcVBIQoi.cjs → fil-BGEDSfA3.cjs} +0 -0
- /package/dist/chunks/{fil-D_HT2vGt.mjs → fil-DQcS9VcY.mjs} +0 -0
- /package/dist/chunks/{fr-ByR9PLTE.mjs → fr-CUoxzxMy.mjs} +0 -0
- /package/dist/chunks/{fr-Ch4zj1rM.cjs → fr-DRFIW1vC.cjs} +0 -0
- /package/dist/chunks/{gu-CvfPvH3Y.mjs → gu-BSL13JVA.mjs} +0 -0
- /package/dist/chunks/{gu-CoLW5Saq.cjs → gu-DCZgQPh1.cjs} +0 -0
- /package/dist/chunks/{he-Bmqypvkq.mjs → he-B4fsDXlD.mjs} +0 -0
- /package/dist/chunks/{he-2wS2DK0D.cjs → he-CrJki_kT.cjs} +0 -0
- /package/dist/chunks/{hi-f4gshON3.cjs → hi-B7MYHNXb.cjs} +0 -0
- /package/dist/chunks/{hi-DbcN0x64.mjs → hi-Df_jRvP-.mjs} +0 -0
- /package/dist/chunks/{hr-DMExeWwd.cjs → hr-CHeiPUjb.cjs} +0 -0
- /package/dist/chunks/{hr-D5mydeyn.mjs → hr-DC4ZNI8T.mjs} +0 -0
- /package/dist/chunks/{hu-DVCPn8un.mjs → hu-ClC3NxqC.mjs} +0 -0
- /package/dist/chunks/{hu-COmlHkse.cjs → hu-x4Ga7znM.cjs} +0 -0
- /package/dist/chunks/{hy-BoBSSiJc.cjs → hy-dXGxcAjA.cjs} +0 -0
- /package/dist/chunks/{hy-CP6oqcK_.mjs → hy-fpToCZeQ.mjs} +0 -0
- /package/dist/chunks/{id-Dk2AQ6-R.cjs → id-BETj6SOy.cjs} +0 -0
- /package/dist/chunks/{id-COwan-Bb.mjs → id-zXVZ_-tD.mjs} +0 -0
- /package/dist/chunks/{it-BCmU3zOg.cjs → it-CblE5NNx.cjs} +0 -0
- /package/dist/chunks/{it-DJqN-zLs.mjs → it-Cp7EdTdT.mjs} +0 -0
- /package/dist/chunks/{ja-DcMqJvnV.cjs → ja-D4CP2G3w.cjs} +0 -0
- /package/dist/chunks/{ja-CvoLNAXS.mjs → ja-DoaPxTyV.mjs} +0 -0
- /package/dist/chunks/{ka-BdyjQFkv.cjs → ka-C6DxbxxH.cjs} +0 -0
- /package/dist/chunks/{ka-BsqbDXqr.mjs → ka-CwoyhuWu.mjs} +0 -0
- /package/dist/chunks/{km-BShH0mB9.cjs → km-BdZJI-qn.cjs} +0 -0
- /package/dist/chunks/{km-C9FxSKv0.mjs → km-D8jrJ9sv.mjs} +0 -0
- /package/dist/chunks/{kn-bNx6e6NK.cjs → kn-DsGMDyW7.cjs} +0 -0
- /package/dist/chunks/{kn-BKTm-E-A.mjs → kn-IsuZc30u.mjs} +0 -0
- /package/dist/chunks/{ko-LmGjEODJ.cjs → ko-CFVvGmVE.cjs} +0 -0
- /package/dist/chunks/{ko-BLEDr4t_.mjs → ko-DxAtBe72.mjs} +0 -0
- /package/dist/chunks/{ku-BekLwcHQ.cjs → ku-B-43xPpS.cjs} +0 -0
- /package/dist/chunks/{ku-DGpIv9vX.mjs → ku-Da-1BcEg.mjs} +0 -0
- /package/dist/chunks/{lo-YgZPFD63.cjs → lo-DtVyNkq4.cjs} +0 -0
- /package/dist/chunks/{lo-C3wsS73b.mjs → lo-p9PUOxXA.mjs} +0 -0
- /package/dist/chunks/{lt-CIvBJk2h.cjs → lt-BaHJn9M4.cjs} +0 -0
- /package/dist/chunks/{lt-DWWjfR4Z.mjs → lt-C4lGuzQq.mjs} +0 -0
- /package/dist/chunks/{lv-D4nb-9oK.mjs → lv-B5Cp4JEf.mjs} +0 -0
- /package/dist/chunks/{lv-B6Djmvjl.cjs → lv-BHXmLxXV.cjs} +0 -0
- /package/dist/chunks/{mk-BPUvDORf.mjs → mk-B5rDdPUj.mjs} +0 -0
- /package/dist/chunks/{mk-Ck56Emvp.cjs → mk-BhwKijB_.cjs} +0 -0
- /package/dist/chunks/{ml-DsibsgSA.cjs → ml-DxZv3Mzc.cjs} +0 -0
- /package/dist/chunks/{ml-qo0n1JHs.mjs → ml-gamedfCk.mjs} +0 -0
- /package/dist/chunks/{mn-BAQnLAOv.mjs → mn-BbhhPusH.mjs} +0 -0
- /package/dist/chunks/{mn-Db0fVNYE.cjs → mn-Bzi4YTMA.cjs} +0 -0
- /package/dist/chunks/{mr-BTz5VL4u.cjs → mr-BENatxZg.cjs} +0 -0
- /package/dist/chunks/{mr-CFEPrQYy.mjs → mr-DO_kNyu7.mjs} +0 -0
- /package/dist/chunks/{ms-ItzWfmiu.cjs → ms-BVop2DJc.cjs} +0 -0
- /package/dist/chunks/{ms-C9p2_6EB.mjs → ms-eIjFVRpo.mjs} +0 -0
- /package/dist/chunks/{my-BQhcHK_d.mjs → my-nf0gvOOX.mjs} +0 -0
- /package/dist/chunks/{my-Bq1EPoFX.cjs → my-qLePPAWv.cjs} +0 -0
- /package/dist/chunks/{ne-Cf4GpHyI.mjs → ne-DOaubYly.mjs} +0 -0
- /package/dist/chunks/{ne-Mog3kAWt.cjs → ne-DfryA0M8.cjs} +0 -0
- /package/dist/chunks/{nl-Do9Y1u3F.cjs → nl-BehqWHBh.cjs} +0 -0
- /package/dist/chunks/{nl-7DE7AKK5.mjs → nl-VHkGK6MK.mjs} +0 -0
- /package/dist/chunks/{no-DNuo9wW6.cjs → no-CR9Fxz1X.cjs} +0 -0
- /package/dist/chunks/{no-J4jj2fW7.mjs → no-CdtSCHJr.mjs} +0 -0
- /package/dist/chunks/{notifier-BW5H3Ctc.cjs → notifier-CFYHvVe5.cjs} +0 -0
- /package/dist/chunks/{notifier-BDNwSr07.mjs → notifier-DJ3Shryh.mjs} +0 -0
- /package/dist/chunks/{pa-BVCDv2EV.cjs → pa-DgC4LF8q.cjs} +0 -0
- /package/dist/chunks/{pa-DMuUOUxa.mjs → pa-TMcUvGQV.mjs} +0 -0
- /package/dist/chunks/{pl-DIZm5XzV.mjs → pl-BfQYJ9y_.mjs} +0 -0
- /package/dist/chunks/{pl-Ct8v4d8V.cjs → pl-a2nheY_J.cjs} +0 -0
- /package/dist/chunks/{prism-bash-CZ6DBzIk.mjs → prism-bash-D4zr_u8t.mjs} +0 -0
- /package/dist/chunks/{prism-bash-qitAYJtY.cjs → prism-bash-DDQ2u01V.cjs} +0 -0
- /package/dist/chunks/{prism-c-nnJdAhPL.mjs → prism-c-CVyw1BOu.mjs} +0 -0
- /package/dist/chunks/{prism-c-BLyB6e2K.cjs → prism-c-DfVjTtJG.cjs} +0 -0
- /package/dist/chunks/{prism-cpp-DYNCFS3K.mjs → prism-cpp-CrBJjuu5.mjs} +0 -0
- /package/dist/chunks/{prism-cpp-OSmmdLuG.cjs → prism-cpp-DqxJDZfM.cjs} +0 -0
- /package/dist/chunks/{prism-csharp-16T9Ewqf.cjs → prism-csharp-BbJ6Sp-b.cjs} +0 -0
- /package/dist/chunks/{prism-csharp-Dxs2I4ua.mjs → prism-csharp-lrMxvYpL.mjs} +0 -0
- /package/dist/chunks/{prism-css-DwTbu-Ar.mjs → prism-css-VQTID_HR.mjs} +0 -0
- /package/dist/chunks/{prism-css-CMFNwvrI.cjs → prism-css-w2kan9uc.cjs} +0 -0
- /package/dist/chunks/{prism-dart-DX2YtTGt.cjs → prism-dart-B374T6OY.cjs} +0 -0
- /package/dist/chunks/{prism-dart-Cqhjl8Zt.mjs → prism-dart-Q-9Z_W9B.mjs} +0 -0
- /package/dist/chunks/{prism-docker-CF7dhvYh.mjs → prism-docker-DWAQ3dDD.mjs} +0 -0
- /package/dist/chunks/{prism-docker-CR4lKITl.cjs → prism-docker-DsFNc9i3.cjs} +0 -0
- /package/dist/chunks/{prism-go-DUV4QMTT.cjs → prism-go-C4e52XbO.cjs} +0 -0
- /package/dist/chunks/{prism-go-h9KLdAE9.mjs → prism-go-CrXe2RS9.mjs} +0 -0
- /package/dist/chunks/{prism-graphql-CaH0gD6e.mjs → prism-graphql-BG5mfdhd.mjs} +0 -0
- /package/dist/chunks/{prism-graphql-Cw4U0rOD.cjs → prism-graphql-DzWE15JS.cjs} +0 -0
- /package/dist/chunks/{prism-java-BpQ0ReAC.cjs → prism-java-Bth7ny8U.cjs} +0 -0
- /package/dist/chunks/{prism-java-DvKEtgSw.mjs → prism-java-_m72Vn1f.mjs} +0 -0
- /package/dist/chunks/{prism-javascript-D2ecWeeN.mjs → prism-javascript-B74it_3Q.mjs} +0 -0
- /package/dist/chunks/{prism-javascript-ELk9U7yv.cjs → prism-javascript-CZHuhUqG.cjs} +0 -0
- /package/dist/chunks/{prism-json-BdNUnMGb.cjs → prism-json-C7yjuPaa.cjs} +0 -0
- /package/dist/chunks/{prism-json-eqh92QZC.mjs → prism-json-CFsf0S_6.mjs} +0 -0
- /package/dist/chunks/{prism-kotlin-22Gr2SxK.mjs → prism-kotlin-BTT9anu1.mjs} +0 -0
- /package/dist/chunks/{prism-kotlin-WNUAhuoa.cjs → prism-kotlin-BwlhXHxp.cjs} +0 -0
- /package/dist/chunks/{prism-latex-DKge5vOJ.mjs → prism-latex-CL8zDJwm.mjs} +0 -0
- /package/dist/chunks/{prism-latex-BtyYjHKE.cjs → prism-latex-dRhujmiF.cjs} +0 -0
- /package/dist/chunks/{prism-lua-DhVb-IBs.cjs → prism-lua-CC8iHZy0.cjs} +0 -0
- /package/dist/chunks/{prism-lua-BySMQWvB.mjs → prism-lua-D6JJ7p-A.mjs} +0 -0
- /package/dist/chunks/{prism-markdown-Bvv1_ifb.mjs → prism-markdown-D6D8BprH.mjs} +0 -0
- /package/dist/chunks/{prism-markdown-DonI20ta.cjs → prism-markdown-DMW4QHo8.cjs} +0 -0
- /package/dist/chunks/{prism-markup-DaGlO8wQ.cjs → prism-markup-DmQlWhRx.cjs} +0 -0
- /package/dist/chunks/{prism-markup-DPDFrSBO.mjs → prism-markup-fK-1ADZ0.mjs} +0 -0
- /package/dist/chunks/{prism-markup-templating-DKZ_F63l.cjs → prism-markup-templating-CKDQaPgk.cjs} +0 -0
- /package/dist/chunks/{prism-markup-templating-B1u1wroF.mjs → prism-markup-templating-DfRjv0mn.mjs} +0 -0
- /package/dist/chunks/{prism-php-V_A4SMVC.cjs → prism-php-BJVLLh_W.cjs} +0 -0
- /package/dist/chunks/{prism-php-CjjweiQK.mjs → prism-php-DffX-wRi.mjs} +0 -0
- /package/dist/chunks/{prism-python-6eBEySe7.mjs → prism-python-2BrUkjbB.mjs} +0 -0
- /package/dist/chunks/{prism-python-DLqiSiAQ.cjs → prism-python-Bhf5rXub.cjs} +0 -0
- /package/dist/chunks/{prism-r-uOZv1a7d.mjs → prism-r-CU9se1Na.mjs} +0 -0
- /package/dist/chunks/{prism-r-zh9-I3-j.cjs → prism-r-ChFoLzAP.cjs} +0 -0
- /package/dist/chunks/{prism-ruby-M4mhoFF5.cjs → prism-ruby-BvGZJs6t.cjs} +0 -0
- /package/dist/chunks/{prism-ruby-Cr-3Y89S.mjs → prism-ruby-DuQ4syPd.mjs} +0 -0
- /package/dist/chunks/{prism-rust-g2dmV4wL.cjs → prism-rust-6eFXbDzh.cjs} +0 -0
- /package/dist/chunks/{prism-rust-DxlMe9N8.mjs → prism-rust-DRurCx4W.mjs} +0 -0
- /package/dist/chunks/{prism-scala-byYaK-Hs.mjs → prism-scala-CU8N2Vpe.mjs} +0 -0
- /package/dist/chunks/{prism-scala-DdSRpf_v.cjs → prism-scala-De4Tbjij.cjs} +0 -0
- /package/dist/chunks/{prism-sql-W4S9Ag3H.mjs → prism-sql-Au3VVcw1.mjs} +0 -0
- /package/dist/chunks/{prism-sql-BjDuRopl.cjs → prism-sql-_JMPMWu-.cjs} +0 -0
- /package/dist/chunks/{prism-swift-KjqbhTlS.mjs → prism-swift-B-r5qNUT.mjs} +0 -0
- /package/dist/chunks/{prism-swift-CqOmCgZp.cjs → prism-swift-DdWKYFH_.cjs} +0 -0
- /package/dist/chunks/{prism-typescript-CjqcJxVT.mjs → prism-typescript-BKj96rmj.mjs} +0 -0
- /package/dist/chunks/{prism-typescript-DGlZWX5K.cjs → prism-typescript-DYxN8s4t.cjs} +0 -0
- /package/dist/chunks/{prism-yaml-W11WcDBZ.mjs → prism-yaml-Bk31kvSd.mjs} +0 -0
- /package/dist/chunks/{prism-yaml-HqOYDhYZ.cjs → prism-yaml-CAlRa1Lr.cjs} +0 -0
- /package/dist/chunks/{ps-X3--6pS3.mjs → ps-Dv4lWz5A.mjs} +0 -0
- /package/dist/chunks/{ps-DT4DAHOy.cjs → ps-f5JFPQUh.cjs} +0 -0
- /package/dist/chunks/{pt-BMT2BIpj.mjs → pt-CtgGcY6X.mjs} +0 -0
- /package/dist/chunks/{pt-Dwe6Dinw.cjs → pt-I7qQ_R8a.cjs} +0 -0
- /package/dist/chunks/{ro-CoHEUo3b.cjs → ro-BNo9EVkV.cjs} +0 -0
- /package/dist/chunks/{ro-Ndh2J4Fv.mjs → ro-Dxs4TSRR.mjs} +0 -0
- /package/dist/chunks/{ru-DEoON4H0.mjs → ru-B5A2vGqQ.mjs} +0 -0
- /package/dist/chunks/{ru-Pmgo28Kt.cjs → ru-Q0YDL_7B.cjs} +0 -0
- /package/dist/chunks/{sd-DxSmw84d.cjs → sd-56aE3AgX.cjs} +0 -0
- /package/dist/chunks/{sd-B46KwBlt.mjs → sd-DcBvM0yY.mjs} +0 -0
- /package/dist/chunks/{si-attpuQg-.cjs → si-B1k5DPe9.cjs} +0 -0
- /package/dist/chunks/{si-CEX6-_X4.mjs → si-JTOFsZCj.mjs} +0 -0
- /package/dist/chunks/{sk-Crsvi9aQ.mjs → sk-B0LtwsAp.mjs} +0 -0
- /package/dist/chunks/{sk-CvkpO0ti.cjs → sk-DKWs0Fly.cjs} +0 -0
- /package/dist/chunks/{sl-BT19lhkA.cjs → sl-3aOunask.cjs} +0 -0
- /package/dist/chunks/{sl-Cqe1IKhE.mjs → sl-CE_B7j6P.mjs} +0 -0
- /package/dist/chunks/{sq-rY2-arjV.cjs → sq-BjtxgRqp.cjs} +0 -0
- /package/dist/chunks/{sq-BOQb1hx9.mjs → sq-DG9X-8jF.mjs} +0 -0
- /package/dist/chunks/{sr-jnkxoHkR.cjs → sr-DLHLW9qM.cjs} +0 -0
- /package/dist/chunks/{sr-WVqhi-MV.mjs → sr-LJKaTtNM.mjs} +0 -0
- /package/dist/chunks/{sv-cjssSK3x.mjs → sv-Cm3jSTt-.mjs} +0 -0
- /package/dist/chunks/{sv-BiWSYdw7.cjs → sv-DJ6Kywac.cjs} +0 -0
- /package/dist/chunks/{sw-DFyk62c4.cjs → sw-BnvydNkI.cjs} +0 -0
- /package/dist/chunks/{sw-BNNAgQNn.mjs → sw-C2rm3bwF.mjs} +0 -0
- /package/dist/chunks/{ta-jg4mBsL9.mjs → ta-5k36G0kU.mjs} +0 -0
- /package/dist/chunks/{ta-DowDx1bh.cjs → ta-e_T5Y_TH.cjs} +0 -0
- /package/dist/chunks/{te-G0buJU1V.cjs → te-DJd9mdke.cjs} +0 -0
- /package/dist/chunks/{te-BiLupA2T.mjs → te-Qw6ZgfXC.mjs} +0 -0
- /package/dist/chunks/{th-DsjA6OWh.cjs → th-BFvK-kez.cjs} +0 -0
- /package/dist/chunks/{th-Dtb_u833.mjs → th-DFCnkeU5.mjs} +0 -0
- /package/dist/chunks/{tr-DN1xdxQn.cjs → tr-Bio2iyuW.cjs} +0 -0
- /package/dist/chunks/{tr-01MbT9-l.mjs → tr-QoYDqZZE.mjs} +0 -0
- /package/dist/chunks/{ug-BFlA2VRZ.mjs → ug-CYVvHjDo.mjs} +0 -0
- /package/dist/chunks/{ug-DEJ9cNGH.cjs → ug-_E9uEBC5.cjs} +0 -0
- /package/dist/chunks/{uk-Bv6aB1Nd.cjs → uk-CiihPsrk.cjs} +0 -0
- /package/dist/chunks/{uk-DY7rBPyo.mjs → uk-KrD9Hdx7.mjs} +0 -0
- /package/dist/chunks/{ur-C3CFfx9s.cjs → ur-B9A13pT4.cjs} +0 -0
- /package/dist/chunks/{ur-DHfULZeF.mjs → ur-Bgtl4YGa.mjs} +0 -0
- /package/dist/chunks/{vi-BFuaq2Tk.mjs → vi-CwW9u4Ww.mjs} +0 -0
- /package/dist/chunks/{vi-DQrrRkmq.cjs → vi-l243K5Tb.cjs} +0 -0
- /package/dist/chunks/{webm-muxer-CC98PYSV.cjs → webm-muxer-BEeYNPIp.cjs} +0 -0
- /package/dist/chunks/{webm-muxer-CUUz719e.mjs → webm-muxer-Doy8JtlV.mjs} +0 -0
- /package/dist/chunks/{zh-BGpl7x7W.mjs → zh-BdCF4Hao.mjs} +0 -0
- /package/dist/chunks/{zh-5rdSdLkR.cjs → zh-DPZR_81P.cjs} +0 -0
|
@@ -0,0 +1,3931 @@
|
|
|
1
|
+
import { i as e, t } from "./chunk-5O_1xk2F.mjs";
|
|
2
|
+
import { n, t as r } from "./objectSpread2-jlBcdYeb.mjs";
|
|
3
|
+
import { A as i, C as a, D as o, E as s, a as c, b as l, c as u, i as d, n as f, p as ee, v as p, w as m, y as h } from "./BasicParser-BFTgNkp-.mjs";
|
|
4
|
+
import { i as g, n as te, r as ne, t as re } from "./core-CqiEzfU3.mjs";
|
|
5
|
+
import { d as _, l as ie, n as ae } from "./Util-DiBcLCh8.mjs";
|
|
6
|
+
import { c as oe, i as se } from "./ID3v2Token-D5v9lCfb.mjs";
|
|
7
|
+
import { t as ce } from "./APEv2Parser-WvRvu4zL.mjs";
|
|
8
|
+
import { r as le } from "./ID3v1Parser-DoxlznrE.mjs";
|
|
9
|
+
import { n as ue, r as de } from "./types-gj36fzRQ.mjs";
|
|
10
|
+
//#region node_modules/@tokenizer/inflate/lib/ZipToken.js
|
|
11
|
+
var v = /* @__PURE__ */ e(u(), 1), y = {
|
|
12
|
+
LocalFileHeader: 67324752,
|
|
13
|
+
DataDescriptor: 134695760,
|
|
14
|
+
CentralFileHeader: 33639248,
|
|
15
|
+
EndOfCentralDirectory: 101010256
|
|
16
|
+
}, fe = {
|
|
17
|
+
get(e) {
|
|
18
|
+
return {
|
|
19
|
+
signature: m.get(e, 0),
|
|
20
|
+
compressedSize: m.get(e, 8),
|
|
21
|
+
uncompressedSize: m.get(e, 12)
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
len: 16
|
|
25
|
+
}, pe = {
|
|
26
|
+
get(e) {
|
|
27
|
+
let t = l.get(e, 6);
|
|
28
|
+
return {
|
|
29
|
+
signature: m.get(e, 0),
|
|
30
|
+
minVersion: l.get(e, 4),
|
|
31
|
+
dataDescriptor: !!(t & 8),
|
|
32
|
+
compressedMethod: l.get(e, 8),
|
|
33
|
+
compressedSize: m.get(e, 18),
|
|
34
|
+
uncompressedSize: m.get(e, 22),
|
|
35
|
+
filenameLength: l.get(e, 26),
|
|
36
|
+
extraFieldLength: l.get(e, 28),
|
|
37
|
+
filename: null
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
len: 30
|
|
41
|
+
}, me = {
|
|
42
|
+
get(e) {
|
|
43
|
+
return {
|
|
44
|
+
signature: m.get(e, 0),
|
|
45
|
+
nrOfThisDisk: l.get(e, 4),
|
|
46
|
+
nrOfThisDiskWithTheStart: l.get(e, 6),
|
|
47
|
+
nrOfEntriesOnThisDisk: l.get(e, 8),
|
|
48
|
+
nrOfEntriesOfSize: l.get(e, 10),
|
|
49
|
+
sizeOfCd: m.get(e, 12),
|
|
50
|
+
offsetOfStartOfCd: m.get(e, 16),
|
|
51
|
+
zipFileCommentLength: l.get(e, 20)
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
len: 22
|
|
55
|
+
}, he = {
|
|
56
|
+
get(e) {
|
|
57
|
+
let t = l.get(e, 8);
|
|
58
|
+
return {
|
|
59
|
+
signature: m.get(e, 0),
|
|
60
|
+
minVersion: l.get(e, 6),
|
|
61
|
+
dataDescriptor: !!(t & 8),
|
|
62
|
+
compressedMethod: l.get(e, 10),
|
|
63
|
+
compressedSize: m.get(e, 20),
|
|
64
|
+
uncompressedSize: m.get(e, 24),
|
|
65
|
+
filenameLength: l.get(e, 28),
|
|
66
|
+
extraFieldLength: l.get(e, 30),
|
|
67
|
+
fileCommentLength: l.get(e, 32),
|
|
68
|
+
relativeOffsetOfLocalHeader: m.get(e, 42),
|
|
69
|
+
filename: null
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
len: 46
|
|
73
|
+
};
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region node_modules/@tokenizer/inflate/lib/ZipHandler.js
|
|
76
|
+
function b(e) {
|
|
77
|
+
let t = new Uint8Array(m.len);
|
|
78
|
+
return m.put(t, 0, e), t;
|
|
79
|
+
}
|
|
80
|
+
var x = (0, v.default)("tokenizer:inflate"), S = 256 * 1024, ge = b(y.DataDescriptor), C = b(y.EndOfCentralDirectory), w = class e {
|
|
81
|
+
constructor(e) {
|
|
82
|
+
this.tokenizer = e, this.syncBuffer = new Uint8Array(S);
|
|
83
|
+
}
|
|
84
|
+
async isZip() {
|
|
85
|
+
return await this.peekSignature() === y.LocalFileHeader;
|
|
86
|
+
}
|
|
87
|
+
peekSignature() {
|
|
88
|
+
return this.tokenizer.peekToken(m);
|
|
89
|
+
}
|
|
90
|
+
async findEndOfCentralDirectoryLocator() {
|
|
91
|
+
var e = this;
|
|
92
|
+
let t = e.tokenizer, n = Math.min(16 * 1024, t.fileInfo.size), r = e.syncBuffer.subarray(0, n);
|
|
93
|
+
await e.tokenizer.readBuffer(r, { position: t.fileInfo.size - n });
|
|
94
|
+
for (let e = r.length - 4; e >= 0; e--) if (r[e] === C[0] && r[e + 1] === C[1] && r[e + 2] === C[2] && r[e + 3] === C[3]) return t.fileInfo.size - n + e;
|
|
95
|
+
return -1;
|
|
96
|
+
}
|
|
97
|
+
async readCentralDirectory() {
|
|
98
|
+
var e = this;
|
|
99
|
+
if (!e.tokenizer.supportsRandomAccess()) {
|
|
100
|
+
x("Cannot reading central-directory without random-read support");
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
x("Reading central-directory...");
|
|
104
|
+
let t = e.tokenizer.position, n = await e.findEndOfCentralDirectoryLocator();
|
|
105
|
+
if (n > 0) {
|
|
106
|
+
x("Central-directory 32-bit signature found");
|
|
107
|
+
let r = await e.tokenizer.readToken(me, n), i = [];
|
|
108
|
+
e.tokenizer.setPosition(r.offsetOfStartOfCd);
|
|
109
|
+
for (let t = 0; t < r.nrOfEntriesOfSize; ++t) {
|
|
110
|
+
let n = await e.tokenizer.readToken(he);
|
|
111
|
+
if (n.signature !== y.CentralFileHeader) throw Error("Expected Central-File-Header signature");
|
|
112
|
+
n.filename = await e.tokenizer.readToken(new p(n.filenameLength, "utf-8")), await e.tokenizer.ignore(n.extraFieldLength), await e.tokenizer.ignore(n.fileCommentLength), i.push(n), x(`Add central-directory file-entry: n=${t + 1}/${i.length}: filename=${i[t].filename}`);
|
|
113
|
+
}
|
|
114
|
+
return e.tokenizer.setPosition(t), i;
|
|
115
|
+
}
|
|
116
|
+
e.tokenizer.setPosition(t);
|
|
117
|
+
}
|
|
118
|
+
async unzip(e) {
|
|
119
|
+
var t = this;
|
|
120
|
+
let n = await t.readCentralDirectory();
|
|
121
|
+
if (n) return t.iterateOverCentralDirectory(n, e);
|
|
122
|
+
let r = !1;
|
|
123
|
+
do {
|
|
124
|
+
let n = await t.readLocalFileHeader();
|
|
125
|
+
if (!n) break;
|
|
126
|
+
let i = e(n);
|
|
127
|
+
r = !!i.stop;
|
|
128
|
+
let a;
|
|
129
|
+
if (await t.tokenizer.ignore(n.extraFieldLength), n.dataDescriptor && n.compressedSize === 0) {
|
|
130
|
+
let e = [], r = S;
|
|
131
|
+
x("Compressed-file-size unknown, scanning for next data-descriptor-signature....");
|
|
132
|
+
let a = -1;
|
|
133
|
+
for (; a < 0 && r === S;) {
|
|
134
|
+
r = await t.tokenizer.peekBuffer(t.syncBuffer, { mayBeLess: !0 }), a = _e(t.syncBuffer.subarray(0, r), ge);
|
|
135
|
+
let n = a >= 0 ? a : r;
|
|
136
|
+
if (i.handler) {
|
|
137
|
+
let r = new Uint8Array(n);
|
|
138
|
+
await t.tokenizer.readBuffer(r), e.push(r);
|
|
139
|
+
} else await t.tokenizer.ignore(n);
|
|
140
|
+
}
|
|
141
|
+
x(`Found data-descriptor-signature at pos=${t.tokenizer.position}`), i.handler && await t.inflate(n, ve(e), i.handler);
|
|
142
|
+
} else i.handler ? (x(`Reading compressed-file-data: ${n.compressedSize} bytes`), a = new Uint8Array(n.compressedSize), await t.tokenizer.readBuffer(a), await t.inflate(n, a, i.handler)) : (x(`Ignoring compressed-file-data: ${n.compressedSize} bytes`), await t.tokenizer.ignore(n.compressedSize));
|
|
143
|
+
if (x(`Reading data-descriptor at pos=${t.tokenizer.position}`), n.dataDescriptor && (await t.tokenizer.readToken(fe)).signature !== 134695760) throw Error(`Expected data-descriptor-signature at position ${t.tokenizer.position - fe.len}`);
|
|
144
|
+
} while (!r);
|
|
145
|
+
}
|
|
146
|
+
async iterateOverCentralDirectory(e, t) {
|
|
147
|
+
var n = this;
|
|
148
|
+
for (let r of e) {
|
|
149
|
+
let e = t(r);
|
|
150
|
+
if (e.handler) {
|
|
151
|
+
n.tokenizer.setPosition(r.relativeOffsetOfLocalHeader);
|
|
152
|
+
let t = await n.readLocalFileHeader();
|
|
153
|
+
if (t) {
|
|
154
|
+
await n.tokenizer.ignore(t.extraFieldLength);
|
|
155
|
+
let i = new Uint8Array(r.compressedSize);
|
|
156
|
+
await n.tokenizer.readBuffer(i), await n.inflate(t, i, e.handler);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (e.stop) break;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
async inflate(t, n, r) {
|
|
163
|
+
if (t.compressedMethod === 0) return r(n);
|
|
164
|
+
if (t.compressedMethod !== 8) throw Error(`Unsupported ZIP compression method: ${t.compressedMethod}`);
|
|
165
|
+
return x(`Decompress filename=${t.filename}, compressed-size=${n.length}`), r(await e.decompressDeflateRaw(n));
|
|
166
|
+
}
|
|
167
|
+
static async decompressDeflateRaw(e) {
|
|
168
|
+
let t = new ReadableStream({ start(t) {
|
|
169
|
+
t.enqueue(e), t.close();
|
|
170
|
+
} }), n = new DecompressionStream("deflate-raw"), r = t.pipeThrough(n);
|
|
171
|
+
try {
|
|
172
|
+
let e = await new Response(r).arrayBuffer();
|
|
173
|
+
return new Uint8Array(e);
|
|
174
|
+
} catch (e) {
|
|
175
|
+
let t = e instanceof Error ? `Failed to deflate ZIP entry: ${e.message}` : "Unknown decompression error in ZIP entry";
|
|
176
|
+
throw TypeError(t);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
async readLocalFileHeader() {
|
|
180
|
+
var e = this;
|
|
181
|
+
let t = await e.tokenizer.peekToken(m);
|
|
182
|
+
if (t === y.LocalFileHeader) {
|
|
183
|
+
let t = await e.tokenizer.readToken(pe);
|
|
184
|
+
return t.filename = await e.tokenizer.readToken(new p(t.filenameLength, "utf-8")), t;
|
|
185
|
+
}
|
|
186
|
+
if (t === y.CentralFileHeader) return !1;
|
|
187
|
+
throw Error(t === 3759263696 ? "Encrypted ZIP" : "Unexpected signature");
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
function _e(e, t) {
|
|
191
|
+
let n = e.length, r = t.length;
|
|
192
|
+
if (r > n) return -1;
|
|
193
|
+
for (let i = 0; i <= n - r; i++) {
|
|
194
|
+
let n = !0;
|
|
195
|
+
for (let a = 0; a < r; a++) if (e[i + a] !== t[a]) {
|
|
196
|
+
n = !1;
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
if (n) return i;
|
|
200
|
+
}
|
|
201
|
+
return -1;
|
|
202
|
+
}
|
|
203
|
+
function ve(e) {
|
|
204
|
+
let t = e.reduce((e, t) => e + t.length, 0), n = new Uint8Array(t), r = 0;
|
|
205
|
+
for (let t of e) n.set(t, r), r += t.length;
|
|
206
|
+
return n;
|
|
207
|
+
}
|
|
208
|
+
//#endregion
|
|
209
|
+
//#region node_modules/@tokenizer/inflate/lib/GzipHandler.js
|
|
210
|
+
var ye = class {
|
|
211
|
+
constructor(e) {
|
|
212
|
+
this.tokenizer = e;
|
|
213
|
+
}
|
|
214
|
+
inflate() {
|
|
215
|
+
let e = this.tokenizer;
|
|
216
|
+
return new ReadableStream({ async pull(t) {
|
|
217
|
+
let n = new Uint8Array(1024), r = await e.readBuffer(n, { mayBeLess: !0 });
|
|
218
|
+
if (r === 0) {
|
|
219
|
+
t.close();
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
t.enqueue(n.subarray(0, r));
|
|
223
|
+
} }).pipeThrough(new DecompressionStream("gzip"));
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
//#endregion
|
|
227
|
+
//#region node_modules/file-type/util.js
|
|
228
|
+
function be(e, t) {
|
|
229
|
+
if (t === "utf-16le") {
|
|
230
|
+
let t = [];
|
|
231
|
+
for (let n = 0; n < e.length; n++) {
|
|
232
|
+
let r = e.charCodeAt(n);
|
|
233
|
+
t.push(r & 255, r >> 8 & 255);
|
|
234
|
+
}
|
|
235
|
+
return t;
|
|
236
|
+
}
|
|
237
|
+
if (t === "utf-16be") {
|
|
238
|
+
let t = [];
|
|
239
|
+
for (let n = 0; n < e.length; n++) {
|
|
240
|
+
let r = e.charCodeAt(n);
|
|
241
|
+
t.push(r >> 8 & 255, r & 255);
|
|
242
|
+
}
|
|
243
|
+
return t;
|
|
244
|
+
}
|
|
245
|
+
return [...e].map((e) => e.charCodeAt(0));
|
|
246
|
+
}
|
|
247
|
+
function xe(e, t = 0) {
|
|
248
|
+
let n = Number.parseInt(new p(6).get(e, 148).replace(/\0.*$/, "").trim(), 8);
|
|
249
|
+
if (Number.isNaN(n)) return !1;
|
|
250
|
+
let r = 256;
|
|
251
|
+
for (let n = t; n < t + 148; n++) r += e[n];
|
|
252
|
+
for (let n = t + 156; n < t + 512; n++) r += e[n];
|
|
253
|
+
return n === r;
|
|
254
|
+
}
|
|
255
|
+
var Se = {
|
|
256
|
+
get: (e, t) => e[t + 3] & 127 | e[t + 2] << 7 | e[t + 1] << 14 | e[t] << 21,
|
|
257
|
+
len: 4
|
|
258
|
+
}, Ce = /* @__PURE__ */ "jpg,png,apng,gif,webp,flif,xcf,cr2,cr3,orf,arw,dng,nef,rw2,raf,tif,bmp,icns,jxr,psd,indd,zip,tar,rar,gz,bz2,7z,dmg,mp4,mid,mkv,webm,mov,avi,mpg,mp2,mp3,m4a,oga,ogg,ogv,opus,flac,wav,spx,amr,pdf,epub,elf,macho,exe,swf,rtf,wasm,woff,woff2,eot,ttf,otf,ttc,ico,flv,ps,xz,sqlite,nes,crx,xpi,cab,deb,ar,rpm,Z,lz,cfb,mxf,mts,blend,bpg,docx,pptx,xlsx,3gp,3g2,j2c,jp2,jpm,jpx,mj2,aif,qcp,odt,ods,odp,xml,mobi,heic,cur,ktx,ape,wv,dcm,ics,glb,pcap,dsf,lnk,alias,voc,ac3,m4v,m4p,m4b,f4v,f4p,f4b,f4a,mie,asf,ogm,ogx,mpc,arrow,shp,aac,mp1,it,s3m,xm,skp,avif,eps,lzh,pgp,asar,stl,chm,3mf,zst,jxl,vcf,jls,pst,dwg,parquet,class,arj,cpio,ace,avro,icc,fbx,vsdx,vtt,apk,drc,lz4,potx,xltx,dotx,xltm,ott,ots,otp,odg,otg,xlsm,docm,dotm,potm,pptm,jar,jmp,rm,sav,ppsm,ppsx,tar.gz,reg,dat".split(","), we = /* @__PURE__ */ "image/jpeg,image/png,image/gif,image/webp,image/flif,image/x-xcf,image/x-canon-cr2,image/x-canon-cr3,image/tiff,image/bmp,image/vnd.ms-photo,image/vnd.adobe.photoshop,application/x-indesign,application/epub+zip,application/x-xpinstall,application/vnd.ms-powerpoint.slideshow.macroenabled.12,application/vnd.oasis.opendocument.text,application/vnd.oasis.opendocument.spreadsheet,application/vnd.oasis.opendocument.presentation,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.presentationml.slideshow,application/zip,application/x-tar,application/x-rar-compressed,application/gzip,application/x-bzip2,application/x-7z-compressed,application/x-apple-diskimage,application/vnd.apache.arrow.file,video/mp4,audio/midi,video/matroska,video/webm,video/quicktime,video/vnd.avi,audio/wav,audio/qcelp,audio/x-ms-asf,video/x-ms-asf,application/vnd.ms-asf,video/mpeg,video/3gpp,audio/mpeg,audio/mp4,video/ogg,audio/ogg,audio/ogg; codecs=opus,application/ogg,audio/flac,audio/ape,audio/wavpack,audio/amr,application/pdf,application/x-elf,application/x-mach-binary,application/x-msdownload,application/x-shockwave-flash,application/rtf,application/wasm,font/woff,font/woff2,application/vnd.ms-fontobject,font/ttf,font/otf,font/collection,image/x-icon,video/x-flv,application/postscript,application/eps,application/x-xz,application/x-sqlite3,application/x-nintendo-nes-rom,application/x-google-chrome-extension,application/vnd.ms-cab-compressed,application/x-deb,application/x-unix-archive,application/x-rpm,application/x-compress,application/x-lzip,application/x-cfb,application/x-mie,application/mxf,video/mp2t,application/x-blender,image/bpg,image/j2c,image/jp2,image/jpx,image/jpm,image/mj2,audio/aiff,application/xml,application/x-mobipocket-ebook,image/heif,image/heif-sequence,image/heic,image/heic-sequence,image/icns,image/ktx,application/dicom,audio/x-musepack,text/calendar,text/vcard,text/vtt,model/gltf-binary,application/vnd.tcpdump.pcap,audio/x-dsf,application/x.ms.shortcut,application/x.apple.alias,audio/x-voc,audio/vnd.dolby.dd-raw,audio/x-m4a,image/apng,image/x-olympus-orf,image/x-sony-arw,image/x-adobe-dng,image/x-nikon-nef,image/x-panasonic-rw2,image/x-fujifilm-raf,video/x-m4v,video/3gpp2,application/x-esri-shape,audio/aac,audio/x-it,audio/x-s3m,audio/x-xm,video/MP1S,video/MP2P,application/vnd.sketchup.skp,image/avif,application/x-lzh-compressed,application/pgp-encrypted,application/x-asar,model/stl,application/vnd.ms-htmlhelp,model/3mf,image/jxl,application/zstd,image/jls,application/vnd.ms-outlook,image/vnd.dwg,application/vnd.apache.parquet,application/java-vm,application/x-arj,application/x-cpio,application/x-ace-compressed,application/avro,application/vnd.iccprofile,application/x.autodesk.fbx,application/vnd.visio,application/vnd.android.package-archive,application/vnd.google.draco,application/x-lz4,application/vnd.openxmlformats-officedocument.presentationml.template,application/vnd.openxmlformats-officedocument.spreadsheetml.template,application/vnd.openxmlformats-officedocument.wordprocessingml.template,application/vnd.ms-excel.template.macroenabled.12,application/vnd.oasis.opendocument.text-template,application/vnd.oasis.opendocument.spreadsheet-template,application/vnd.oasis.opendocument.presentation-template,application/vnd.oasis.opendocument.graphics,application/vnd.oasis.opendocument.graphics-template,application/vnd.ms-excel.sheet.macroenabled.12,application/vnd.ms-word.document.macroenabled.12,application/vnd.ms-word.template.macroenabled.12,application/vnd.ms-powerpoint.template.macroenabled.12,application/vnd.ms-powerpoint.presentation.macroenabled.12,application/java-archive,application/vnd.rn-realmedia,application/x-spss-sav,application/x-ms-regedit,application/x-ft-windows-registry-hive,application/x-jmp-data".split(","), T = 4100, Te = T - 2, E = 1024 * 1024, Ee = 1024, De = 2 ** 31 - 1, D = 16 * 1024 * 1024, O = E, Oe = E, ke = D, Ae = 1, je = 100, k = D, A = 64, j = O, Me = 256, Ne = 512, Pe = D, Fe = 512, Ie = 512, M = 256, N = O, P = O, Le = O, F = D, Re = new Set([
|
|
259
|
+
"Unexpected signature",
|
|
260
|
+
"Encrypted ZIP",
|
|
261
|
+
"Expected Central-File-Header signature"
|
|
262
|
+
]), ze = [
|
|
263
|
+
"ZIP entry count exceeds ",
|
|
264
|
+
"Unsupported ZIP compression method:",
|
|
265
|
+
"ZIP entry compressed data exceeds ",
|
|
266
|
+
"ZIP entry decompressed data exceeds ",
|
|
267
|
+
"Expected data-descriptor-signature at position "
|
|
268
|
+
], Be = new Set([
|
|
269
|
+
"Z_BUF_ERROR",
|
|
270
|
+
"Z_DATA_ERROR",
|
|
271
|
+
"ERR_INVALID_STATE"
|
|
272
|
+
]), I = class extends Error {};
|
|
273
|
+
function Ve(e) {
|
|
274
|
+
var t;
|
|
275
|
+
let n = e == null ? void 0 : e.streamReader;
|
|
276
|
+
if ((n == null || (t = n.constructor) == null ? void 0 : t.name) !== "WebStreamByobReader") return e;
|
|
277
|
+
let { reader: r } = n, i = async () => {
|
|
278
|
+
await r.cancel(), r.releaseLock();
|
|
279
|
+
};
|
|
280
|
+
return n.close = i, n.abort = async () => {
|
|
281
|
+
n.interrupted = !0, await i();
|
|
282
|
+
}, e;
|
|
283
|
+
}
|
|
284
|
+
function L(e, t, n) {
|
|
285
|
+
if (!Number.isFinite(e) || e < 0 || e > t) throw new I(`${n} has invalid size ${e} (maximum ${t} bytes)`);
|
|
286
|
+
return e;
|
|
287
|
+
}
|
|
288
|
+
async function R(e, t, { maximumLength: n = D, reason: r = "skip" } = {}) {
|
|
289
|
+
let i = L(t, n, r);
|
|
290
|
+
await e.ignore(i);
|
|
291
|
+
}
|
|
292
|
+
async function z(e, t, n, { maximumLength: i = t.length, reason: a = "read" } = {}) {
|
|
293
|
+
var o;
|
|
294
|
+
let s = L((o = n == null ? void 0 : n.length) == null ? t.length : o, i, a);
|
|
295
|
+
return e.readBuffer(t, r(r({}, n), {}, { length: s }));
|
|
296
|
+
}
|
|
297
|
+
async function He(e, { maximumLength: t = E } = {}) {
|
|
298
|
+
let n = new ReadableStream({ start(t) {
|
|
299
|
+
t.enqueue(e), t.close();
|
|
300
|
+
} }).pipeThrough(new DecompressionStream("deflate-raw")).getReader(), r = [], i = 0;
|
|
301
|
+
try {
|
|
302
|
+
for (;;) {
|
|
303
|
+
let { done: e, value: a } = await n.read();
|
|
304
|
+
if (e) break;
|
|
305
|
+
if (i += a.length, i > t) throw await n.cancel(), Error(`ZIP entry decompressed data exceeds ${t} bytes`);
|
|
306
|
+
r.push(a);
|
|
307
|
+
}
|
|
308
|
+
} finally {
|
|
309
|
+
n.releaseLock();
|
|
310
|
+
}
|
|
311
|
+
let a = new Uint8Array(i), o = 0;
|
|
312
|
+
for (let e of r) a.set(e, o), o += e.length;
|
|
313
|
+
return a;
|
|
314
|
+
}
|
|
315
|
+
var B = 134695760, V = 16, Ue = V - 1;
|
|
316
|
+
function We(e, t) {
|
|
317
|
+
if (e.length < V) return -1;
|
|
318
|
+
let n = e.length - V;
|
|
319
|
+
for (let r = 0; r <= n; r++) if (m.get(e, r) === B && m.get(e, r + 8) === t + r) return r;
|
|
320
|
+
return -1;
|
|
321
|
+
}
|
|
322
|
+
function Ge(e) {
|
|
323
|
+
return (e.codePointAt(0) & 32) != 0;
|
|
324
|
+
}
|
|
325
|
+
function Ke(e, t) {
|
|
326
|
+
let n = new Uint8Array(t), r = 0;
|
|
327
|
+
for (let t of e) n.set(t, r), r += t.length;
|
|
328
|
+
return n;
|
|
329
|
+
}
|
|
330
|
+
async function qe(e, { shouldBuffer: t, maximumLength: n = E } = {}) {
|
|
331
|
+
let { syncBuffer: r } = e, { length: i } = r, a = [], o = 0;
|
|
332
|
+
for (;;) {
|
|
333
|
+
let s = await e.tokenizer.peekBuffer(r, { mayBeLess: !0 }), c = We(r.subarray(0, s), o), l = c >= 0 ? 0 : s === i ? Math.min(Ue, s - 1) : 0, u = c >= 0 ? c : s - l;
|
|
334
|
+
if (u === 0) break;
|
|
335
|
+
if (o += u, o > n) throw Error(`ZIP entry compressed data exceeds ${n} bytes`);
|
|
336
|
+
if (t) {
|
|
337
|
+
let t = new Uint8Array(u);
|
|
338
|
+
await e.tokenizer.readBuffer(t), a.push(t);
|
|
339
|
+
} else await e.tokenizer.ignore(u);
|
|
340
|
+
if (c >= 0) break;
|
|
341
|
+
}
|
|
342
|
+
if (G(e.tokenizer) || (e.knownSizeDescriptorScannedBytes += o), t) return Ke(a, o);
|
|
343
|
+
}
|
|
344
|
+
function Je(e, t) {
|
|
345
|
+
return G(e.tokenizer) ? Math.max(0, D - (e.tokenizer.position - t)) : Math.max(0, E - e.knownSizeDescriptorScannedBytes);
|
|
346
|
+
}
|
|
347
|
+
async function Ye(e, t, { shouldBuffer: n, maximumDescriptorLength: r = E } = {}) {
|
|
348
|
+
if (t.dataDescriptor && t.compressedSize === 0) return qe(e, {
|
|
349
|
+
shouldBuffer: n,
|
|
350
|
+
maximumLength: r
|
|
351
|
+
});
|
|
352
|
+
if (!n) {
|
|
353
|
+
await R(e.tokenizer, t.compressedSize, {
|
|
354
|
+
maximumLength: G(e.tokenizer) ? E : e.tokenizer.fileInfo.size,
|
|
355
|
+
reason: "ZIP entry compressed data"
|
|
356
|
+
});
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
let i = tt(e.tokenizer);
|
|
360
|
+
if (!Number.isFinite(t.compressedSize) || t.compressedSize < 0 || t.compressedSize > i) throw Error(`ZIP entry compressed data exceeds ${i} bytes`);
|
|
361
|
+
let a = new Uint8Array(t.compressedSize);
|
|
362
|
+
return await e.tokenizer.readBuffer(a), a;
|
|
363
|
+
}
|
|
364
|
+
w.prototype.inflate = async function(e, t, n) {
|
|
365
|
+
if (e.compressedMethod === 0) return n(t);
|
|
366
|
+
if (e.compressedMethod !== 8) throw Error(`Unsupported ZIP compression method: ${e.compressedMethod}`);
|
|
367
|
+
return n(await He(t, { maximumLength: E }));
|
|
368
|
+
}, w.prototype.unzip = async function(e) {
|
|
369
|
+
let t = !1, n = 0, r = this.tokenizer.position;
|
|
370
|
+
this.knownSizeDescriptorScannedBytes = 0;
|
|
371
|
+
do {
|
|
372
|
+
if (K(this.tokenizer, r, D)) throw new I(`ZIP stream probing exceeds ${D} bytes`);
|
|
373
|
+
let i = await this.readLocalFileHeader();
|
|
374
|
+
if (!i) break;
|
|
375
|
+
if (n++, n > Ee) throw Error(`ZIP entry count exceeds ${Ee}`);
|
|
376
|
+
let a = e(i);
|
|
377
|
+
t = !!a.stop, await this.tokenizer.ignore(i.extraFieldLength);
|
|
378
|
+
let o = await Ye(this, i, {
|
|
379
|
+
shouldBuffer: !!a.handler,
|
|
380
|
+
maximumDescriptorLength: Math.min(E, Je(this, r))
|
|
381
|
+
});
|
|
382
|
+
if (a.handler && await this.inflate(i, o, a.handler), i.dataDescriptor) {
|
|
383
|
+
let e = new Uint8Array(V);
|
|
384
|
+
if (await this.tokenizer.readBuffer(e), m.get(e, 0) !== B) throw Error(`Expected data-descriptor-signature at position ${this.tokenizer.position - e.length}`);
|
|
385
|
+
}
|
|
386
|
+
if (K(this.tokenizer, r, D)) throw new I(`ZIP stream probing exceeds ${D} bytes`);
|
|
387
|
+
} while (!t);
|
|
388
|
+
};
|
|
389
|
+
function Xe(e, t) {
|
|
390
|
+
let n = e.getReader(), r = 0, i = !1, a = !1, o = async (e) => {
|
|
391
|
+
i || a || (a = !0, await n.cancel(e));
|
|
392
|
+
};
|
|
393
|
+
return new ReadableStream({
|
|
394
|
+
async pull(e) {
|
|
395
|
+
if (r >= t) {
|
|
396
|
+
e.close(), await o();
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
let { done: a, value: s } = await n.read();
|
|
400
|
+
if (a || !s) {
|
|
401
|
+
i = !0, e.close();
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
let c = t - r;
|
|
405
|
+
if (s.length > c) {
|
|
406
|
+
e.enqueue(s.subarray(0, c)), r += c, e.close(), await o();
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
e.enqueue(s), r += s.length;
|
|
410
|
+
},
|
|
411
|
+
async cancel(e) {
|
|
412
|
+
await o(e);
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
async function H(e, t) {
|
|
417
|
+
return new ct(t).fromBuffer(e);
|
|
418
|
+
}
|
|
419
|
+
function U(e) {
|
|
420
|
+
switch (e = e.toLowerCase(), e) {
|
|
421
|
+
case "application/epub+zip": return {
|
|
422
|
+
ext: "epub",
|
|
423
|
+
mime: e
|
|
424
|
+
};
|
|
425
|
+
case "application/vnd.oasis.opendocument.text": return {
|
|
426
|
+
ext: "odt",
|
|
427
|
+
mime: e
|
|
428
|
+
};
|
|
429
|
+
case "application/vnd.oasis.opendocument.text-template": return {
|
|
430
|
+
ext: "ott",
|
|
431
|
+
mime: e
|
|
432
|
+
};
|
|
433
|
+
case "application/vnd.oasis.opendocument.spreadsheet": return {
|
|
434
|
+
ext: "ods",
|
|
435
|
+
mime: e
|
|
436
|
+
};
|
|
437
|
+
case "application/vnd.oasis.opendocument.spreadsheet-template": return {
|
|
438
|
+
ext: "ots",
|
|
439
|
+
mime: e
|
|
440
|
+
};
|
|
441
|
+
case "application/vnd.oasis.opendocument.presentation": return {
|
|
442
|
+
ext: "odp",
|
|
443
|
+
mime: e
|
|
444
|
+
};
|
|
445
|
+
case "application/vnd.oasis.opendocument.presentation-template": return {
|
|
446
|
+
ext: "otp",
|
|
447
|
+
mime: e
|
|
448
|
+
};
|
|
449
|
+
case "application/vnd.oasis.opendocument.graphics": return {
|
|
450
|
+
ext: "odg",
|
|
451
|
+
mime: e
|
|
452
|
+
};
|
|
453
|
+
case "application/vnd.oasis.opendocument.graphics-template": return {
|
|
454
|
+
ext: "otg",
|
|
455
|
+
mime: e
|
|
456
|
+
};
|
|
457
|
+
case "application/vnd.openxmlformats-officedocument.presentationml.slideshow": return {
|
|
458
|
+
ext: "ppsx",
|
|
459
|
+
mime: e
|
|
460
|
+
};
|
|
461
|
+
case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return {
|
|
462
|
+
ext: "xlsx",
|
|
463
|
+
mime: e
|
|
464
|
+
};
|
|
465
|
+
case "application/vnd.ms-excel.sheet.macroenabled": return {
|
|
466
|
+
ext: "xlsm",
|
|
467
|
+
mime: "application/vnd.ms-excel.sheet.macroenabled.12"
|
|
468
|
+
};
|
|
469
|
+
case "application/vnd.openxmlformats-officedocument.spreadsheetml.template": return {
|
|
470
|
+
ext: "xltx",
|
|
471
|
+
mime: e
|
|
472
|
+
};
|
|
473
|
+
case "application/vnd.ms-excel.template.macroenabled": return {
|
|
474
|
+
ext: "xltm",
|
|
475
|
+
mime: "application/vnd.ms-excel.template.macroenabled.12"
|
|
476
|
+
};
|
|
477
|
+
case "application/vnd.ms-powerpoint.slideshow.macroenabled": return {
|
|
478
|
+
ext: "ppsm",
|
|
479
|
+
mime: "application/vnd.ms-powerpoint.slideshow.macroenabled.12"
|
|
480
|
+
};
|
|
481
|
+
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return {
|
|
482
|
+
ext: "docx",
|
|
483
|
+
mime: e
|
|
484
|
+
};
|
|
485
|
+
case "application/vnd.ms-word.document.macroenabled": return {
|
|
486
|
+
ext: "docm",
|
|
487
|
+
mime: "application/vnd.ms-word.document.macroenabled.12"
|
|
488
|
+
};
|
|
489
|
+
case "application/vnd.openxmlformats-officedocument.wordprocessingml.template": return {
|
|
490
|
+
ext: "dotx",
|
|
491
|
+
mime: e
|
|
492
|
+
};
|
|
493
|
+
case "application/vnd.ms-word.template.macroenabledtemplate": return {
|
|
494
|
+
ext: "dotm",
|
|
495
|
+
mime: "application/vnd.ms-word.template.macroenabled.12"
|
|
496
|
+
};
|
|
497
|
+
case "application/vnd.openxmlformats-officedocument.presentationml.template": return {
|
|
498
|
+
ext: "potx",
|
|
499
|
+
mime: e
|
|
500
|
+
};
|
|
501
|
+
case "application/vnd.ms-powerpoint.template.macroenabled": return {
|
|
502
|
+
ext: "potm",
|
|
503
|
+
mime: "application/vnd.ms-powerpoint.template.macroenabled.12"
|
|
504
|
+
};
|
|
505
|
+
case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return {
|
|
506
|
+
ext: "pptx",
|
|
507
|
+
mime: e
|
|
508
|
+
};
|
|
509
|
+
case "application/vnd.ms-powerpoint.presentation.macroenabled": return {
|
|
510
|
+
ext: "pptm",
|
|
511
|
+
mime: "application/vnd.ms-powerpoint.presentation.macroenabled.12"
|
|
512
|
+
};
|
|
513
|
+
case "application/vnd.ms-visio.drawing": return {
|
|
514
|
+
ext: "vsdx",
|
|
515
|
+
mime: "application/vnd.visio"
|
|
516
|
+
};
|
|
517
|
+
case "application/vnd.ms-package.3dmanufacturing-3dmodel+xml": return {
|
|
518
|
+
ext: "3mf",
|
|
519
|
+
mime: "model/3mf"
|
|
520
|
+
};
|
|
521
|
+
default:
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
function W(e, t, n) {
|
|
525
|
+
n = r({ offset: 0 }, n);
|
|
526
|
+
for (let [r, i] of t.entries()) if (n.mask) {
|
|
527
|
+
if (i !== (n.mask[r] & e[r + n.offset])) return !1;
|
|
528
|
+
} else if (i !== e[r + n.offset]) return !1;
|
|
529
|
+
return !0;
|
|
530
|
+
}
|
|
531
|
+
function Ze(e) {
|
|
532
|
+
return Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : T;
|
|
533
|
+
}
|
|
534
|
+
function Qe(e, t, n) {
|
|
535
|
+
return n === void 0 ? e.read(t) : (n.throwIfAborted(), new Promise((r, i) => {
|
|
536
|
+
let a = () => {
|
|
537
|
+
n.removeEventListener("abort", o);
|
|
538
|
+
}, o = () => {
|
|
539
|
+
let t = n.reason;
|
|
540
|
+
a(), (async () => {
|
|
541
|
+
try {
|
|
542
|
+
await e.cancel(t);
|
|
543
|
+
} catch (e) {}
|
|
544
|
+
})(), i(t);
|
|
545
|
+
};
|
|
546
|
+
n.addEventListener("abort", o, { once: !0 }), (async () => {
|
|
547
|
+
try {
|
|
548
|
+
let n = await e.read(t);
|
|
549
|
+
a(), r(n);
|
|
550
|
+
} catch (e) {
|
|
551
|
+
a(), i(e);
|
|
552
|
+
}
|
|
553
|
+
})();
|
|
554
|
+
}));
|
|
555
|
+
}
|
|
556
|
+
function $e(e) {
|
|
557
|
+
return Number.isFinite(e) ? Math.max(0, Math.min(Te, Math.trunc(e))) : 0;
|
|
558
|
+
}
|
|
559
|
+
function et(e) {
|
|
560
|
+
return Number.isFinite(e) ? Math.max(0, e) : 2 ** 53 - 1;
|
|
561
|
+
}
|
|
562
|
+
function G(e) {
|
|
563
|
+
let t = e.fileInfo.size;
|
|
564
|
+
return !Number.isFinite(t) || t === 2 ** 53 - 1;
|
|
565
|
+
}
|
|
566
|
+
function K(e, t, n) {
|
|
567
|
+
return G(e) && e.position - t > n;
|
|
568
|
+
}
|
|
569
|
+
function tt(e) {
|
|
570
|
+
let t = e.fileInfo.size, n = Number.isFinite(t) ? Math.max(0, t - e.position) : 2 ** 53 - 1;
|
|
571
|
+
return Math.min(n, De);
|
|
572
|
+
}
|
|
573
|
+
function nt(e) {
|
|
574
|
+
if (e instanceof g || e instanceof I) return !0;
|
|
575
|
+
if (!(e instanceof Error)) return !1;
|
|
576
|
+
if (Re.has(e.message) || Be.has(e.code)) return !0;
|
|
577
|
+
for (let t of ze) if (e.message.startsWith(t)) return !0;
|
|
578
|
+
return !1;
|
|
579
|
+
}
|
|
580
|
+
function rt(e, t = E) {
|
|
581
|
+
let n = [e.compressedSize, e.uncompressedSize];
|
|
582
|
+
for (let e of n) if (!Number.isFinite(e) || e < 0 || e > t) return !1;
|
|
583
|
+
return !0;
|
|
584
|
+
}
|
|
585
|
+
function it() {
|
|
586
|
+
return {
|
|
587
|
+
hasContentTypesEntry: !1,
|
|
588
|
+
hasParsedContentTypesEntry: !1,
|
|
589
|
+
isParsingContentTypes: !1,
|
|
590
|
+
hasUnparseableContentTypes: !1,
|
|
591
|
+
hasWordDirectory: !1,
|
|
592
|
+
hasPresentationDirectory: !1,
|
|
593
|
+
hasSpreadsheetDirectory: !1,
|
|
594
|
+
hasThreeDimensionalModelEntry: !1
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
function at(e, t) {
|
|
598
|
+
t.startsWith("word/") && (e.hasWordDirectory = !0), t.startsWith("ppt/") && (e.hasPresentationDirectory = !0), t.startsWith("xl/") && (e.hasSpreadsheetDirectory = !0), t.startsWith("3D/") && t.endsWith(".model") && (e.hasThreeDimensionalModelEntry = !0);
|
|
599
|
+
}
|
|
600
|
+
function ot(e) {
|
|
601
|
+
if (!(!e.hasContentTypesEntry || e.hasUnparseableContentTypes || e.isParsingContentTypes || e.hasParsedContentTypesEntry)) {
|
|
602
|
+
if (e.hasWordDirectory) return {
|
|
603
|
+
ext: "docx",
|
|
604
|
+
mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
605
|
+
};
|
|
606
|
+
if (e.hasPresentationDirectory) return {
|
|
607
|
+
ext: "pptx",
|
|
608
|
+
mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
|
609
|
+
};
|
|
610
|
+
if (e.hasSpreadsheetDirectory) return {
|
|
611
|
+
ext: "xlsx",
|
|
612
|
+
mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
613
|
+
};
|
|
614
|
+
if (e.hasThreeDimensionalModelEntry) return {
|
|
615
|
+
ext: "3mf",
|
|
616
|
+
mime: "model/3mf"
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
function st(e) {
|
|
621
|
+
let t = e.indexOf(".main+xml\"");
|
|
622
|
+
if (t === -1) {
|
|
623
|
+
let t = "application/vnd.ms-package.3dmanufacturing-3dmodel+xml";
|
|
624
|
+
return e.includes(`ContentType="${t}"`) ? t : void 0;
|
|
625
|
+
}
|
|
626
|
+
let n = e.slice(0, t), r = n.lastIndexOf("\"");
|
|
627
|
+
return n.slice(r + 1);
|
|
628
|
+
}
|
|
629
|
+
var ct = class e {
|
|
630
|
+
constructor(e) {
|
|
631
|
+
var t = this, i;
|
|
632
|
+
n(this, "detectConfident", async (e) => {
|
|
633
|
+
if (t.buffer = new Uint8Array(T), e.fileInfo.size === void 0 && (e.fileInfo.size = 2 ** 53 - 1), t.tokenizer = e, G(e) && (await e.peekBuffer(t.buffer, {
|
|
634
|
+
length: 3,
|
|
635
|
+
mayBeLess: !0
|
|
636
|
+
}), t.check([
|
|
637
|
+
31,
|
|
638
|
+
139,
|
|
639
|
+
8
|
|
640
|
+
]))) return t.detectGzip(e);
|
|
641
|
+
if (await e.peekBuffer(t.buffer, {
|
|
642
|
+
length: 32,
|
|
643
|
+
mayBeLess: !0
|
|
644
|
+
}), t.check([66, 77])) return {
|
|
645
|
+
ext: "bmp",
|
|
646
|
+
mime: "image/bmp"
|
|
647
|
+
};
|
|
648
|
+
if (t.check([11, 119])) return {
|
|
649
|
+
ext: "ac3",
|
|
650
|
+
mime: "audio/vnd.dolby.dd-raw"
|
|
651
|
+
};
|
|
652
|
+
if (t.check([120, 1])) return {
|
|
653
|
+
ext: "dmg",
|
|
654
|
+
mime: "application/x-apple-diskimage"
|
|
655
|
+
};
|
|
656
|
+
if (t.check([77, 90])) return {
|
|
657
|
+
ext: "exe",
|
|
658
|
+
mime: "application/x-msdownload"
|
|
659
|
+
};
|
|
660
|
+
if (t.check([37, 33])) return await e.peekBuffer(t.buffer, {
|
|
661
|
+
length: 24,
|
|
662
|
+
mayBeLess: !0
|
|
663
|
+
}), t.checkString("PS-Adobe-", { offset: 2 }) && t.checkString(" EPSF-", { offset: 14 }) ? {
|
|
664
|
+
ext: "eps",
|
|
665
|
+
mime: "application/eps"
|
|
666
|
+
} : {
|
|
667
|
+
ext: "ps",
|
|
668
|
+
mime: "application/postscript"
|
|
669
|
+
};
|
|
670
|
+
if (t.check([31, 160]) || t.check([31, 157])) return {
|
|
671
|
+
ext: "Z",
|
|
672
|
+
mime: "application/x-compress"
|
|
673
|
+
};
|
|
674
|
+
if (t.check([199, 113])) return {
|
|
675
|
+
ext: "cpio",
|
|
676
|
+
mime: "application/x-cpio"
|
|
677
|
+
};
|
|
678
|
+
if (t.check([96, 234])) return {
|
|
679
|
+
ext: "arj",
|
|
680
|
+
mime: "application/x-arj"
|
|
681
|
+
};
|
|
682
|
+
if (t.check([
|
|
683
|
+
239,
|
|
684
|
+
187,
|
|
685
|
+
191
|
|
686
|
+
])) return t.detectionReentryCount >= M ? void 0 : (t.detectionReentryCount++, await t.tokenizer.ignore(3), t.detectConfident(e));
|
|
687
|
+
if (t.check([
|
|
688
|
+
71,
|
|
689
|
+
73,
|
|
690
|
+
70
|
|
691
|
+
])) return {
|
|
692
|
+
ext: "gif",
|
|
693
|
+
mime: "image/gif"
|
|
694
|
+
};
|
|
695
|
+
if (t.check([
|
|
696
|
+
73,
|
|
697
|
+
73,
|
|
698
|
+
188
|
|
699
|
+
])) return {
|
|
700
|
+
ext: "jxr",
|
|
701
|
+
mime: "image/vnd.ms-photo"
|
|
702
|
+
};
|
|
703
|
+
if (t.check([
|
|
704
|
+
31,
|
|
705
|
+
139,
|
|
706
|
+
8
|
|
707
|
+
])) return t.detectGzip(e);
|
|
708
|
+
if (t.check([
|
|
709
|
+
66,
|
|
710
|
+
90,
|
|
711
|
+
104
|
|
712
|
+
])) return {
|
|
713
|
+
ext: "bz2",
|
|
714
|
+
mime: "application/x-bzip2"
|
|
715
|
+
};
|
|
716
|
+
if (t.checkString("ID3")) {
|
|
717
|
+
await R(e, 6, {
|
|
718
|
+
maximumLength: 6,
|
|
719
|
+
reason: "ID3 header prefix"
|
|
720
|
+
});
|
|
721
|
+
let n = await e.readToken(Se), r = G(e);
|
|
722
|
+
if (!Number.isFinite(n) || n < 0 || r && (n > k || e.position + n > k)) return;
|
|
723
|
+
if (e.position + n > e.fileInfo.size) return r ? void 0 : {
|
|
724
|
+
ext: "mp3",
|
|
725
|
+
mime: "audio/mpeg"
|
|
726
|
+
};
|
|
727
|
+
try {
|
|
728
|
+
await R(e, n, {
|
|
729
|
+
maximumLength: r ? k : e.fileInfo.size,
|
|
730
|
+
reason: "ID3 payload"
|
|
731
|
+
});
|
|
732
|
+
} catch (e) {
|
|
733
|
+
if (e instanceof g) return;
|
|
734
|
+
throw e;
|
|
735
|
+
}
|
|
736
|
+
return t.detectionReentryCount >= M ? void 0 : (t.detectionReentryCount++, t.parseTokenizer(e, t.detectionReentryCount));
|
|
737
|
+
}
|
|
738
|
+
if (t.checkString("MP+")) return {
|
|
739
|
+
ext: "mpc",
|
|
740
|
+
mime: "audio/x-musepack"
|
|
741
|
+
};
|
|
742
|
+
if ((t.buffer[0] === 67 || t.buffer[0] === 70) && t.check([87, 83], { offset: 1 })) return {
|
|
743
|
+
ext: "swf",
|
|
744
|
+
mime: "application/x-shockwave-flash"
|
|
745
|
+
};
|
|
746
|
+
if (t.check([
|
|
747
|
+
255,
|
|
748
|
+
216,
|
|
749
|
+
255
|
|
750
|
+
])) return t.check([247], { offset: 3 }) ? {
|
|
751
|
+
ext: "jls",
|
|
752
|
+
mime: "image/jls"
|
|
753
|
+
} : {
|
|
754
|
+
ext: "jpg",
|
|
755
|
+
mime: "image/jpeg"
|
|
756
|
+
};
|
|
757
|
+
if (t.check([
|
|
758
|
+
79,
|
|
759
|
+
98,
|
|
760
|
+
106,
|
|
761
|
+
1
|
|
762
|
+
])) return {
|
|
763
|
+
ext: "avro",
|
|
764
|
+
mime: "application/avro"
|
|
765
|
+
};
|
|
766
|
+
if (t.checkString("FLIF")) return {
|
|
767
|
+
ext: "flif",
|
|
768
|
+
mime: "image/flif"
|
|
769
|
+
};
|
|
770
|
+
if (t.checkString("8BPS")) return {
|
|
771
|
+
ext: "psd",
|
|
772
|
+
mime: "image/vnd.adobe.photoshop"
|
|
773
|
+
};
|
|
774
|
+
if (t.checkString("MPCK")) return {
|
|
775
|
+
ext: "mpc",
|
|
776
|
+
mime: "audio/x-musepack"
|
|
777
|
+
};
|
|
778
|
+
if (t.checkString("FORM")) return {
|
|
779
|
+
ext: "aif",
|
|
780
|
+
mime: "audio/aiff"
|
|
781
|
+
};
|
|
782
|
+
if (t.checkString("icns", { offset: 0 })) return {
|
|
783
|
+
ext: "icns",
|
|
784
|
+
mime: "image/icns"
|
|
785
|
+
};
|
|
786
|
+
if (t.check([
|
|
787
|
+
80,
|
|
788
|
+
75,
|
|
789
|
+
3,
|
|
790
|
+
4
|
|
791
|
+
])) {
|
|
792
|
+
var n, r;
|
|
793
|
+
let t, i = it();
|
|
794
|
+
try {
|
|
795
|
+
await new w(e).unzip((e) => {
|
|
796
|
+
at(i, e.filename);
|
|
797
|
+
let n = e.filename === "[Content_Types].xml", r = ot(i);
|
|
798
|
+
if (!n && r) return t = r, { stop: !0 };
|
|
799
|
+
switch (e.filename) {
|
|
800
|
+
case "META-INF/mozilla.rsa": return t = {
|
|
801
|
+
ext: "xpi",
|
|
802
|
+
mime: "application/x-xpinstall"
|
|
803
|
+
}, { stop: !0 };
|
|
804
|
+
case "META-INF/MANIFEST.MF": return t = {
|
|
805
|
+
ext: "jar",
|
|
806
|
+
mime: "application/java-archive"
|
|
807
|
+
}, { stop: !0 };
|
|
808
|
+
case "mimetype": return rt(e, Oe) ? {
|
|
809
|
+
async handler(e) {
|
|
810
|
+
t = U(new TextDecoder("utf-8").decode(e).trim());
|
|
811
|
+
},
|
|
812
|
+
stop: !0
|
|
813
|
+
} : {};
|
|
814
|
+
case "[Content_Types].xml": return i.hasContentTypesEntry = !0, rt(e, Oe) ? (i.isParsingContentTypes = !0, {
|
|
815
|
+
async handler(e) {
|
|
816
|
+
let n = st(new TextDecoder("utf-8").decode(e));
|
|
817
|
+
n && (t = U(n)), i.hasParsedContentTypesEntry = !0, i.isParsingContentTypes = !1;
|
|
818
|
+
},
|
|
819
|
+
stop: !0
|
|
820
|
+
}) : (i.hasUnparseableContentTypes = !0, {});
|
|
821
|
+
default: return /classes\d*\.dex/.test(e.filename) ? (t = {
|
|
822
|
+
ext: "apk",
|
|
823
|
+
mime: "application/vnd.android.package-archive"
|
|
824
|
+
}, { stop: !0 }) : {};
|
|
825
|
+
}
|
|
826
|
+
});
|
|
827
|
+
} catch (e) {
|
|
828
|
+
if (!nt(e)) throw e;
|
|
829
|
+
i.isParsingContentTypes && (i.isParsingContentTypes = !1, i.hasUnparseableContentTypes = !0);
|
|
830
|
+
}
|
|
831
|
+
return (n = (r = t) == null ? ot(i) : r) == null ? {
|
|
832
|
+
ext: "zip",
|
|
833
|
+
mime: "application/zip"
|
|
834
|
+
} : n;
|
|
835
|
+
}
|
|
836
|
+
if (t.checkString("OggS")) {
|
|
837
|
+
await e.ignore(28);
|
|
838
|
+
let t = new Uint8Array(8);
|
|
839
|
+
return await e.readBuffer(t), W(t, [
|
|
840
|
+
79,
|
|
841
|
+
112,
|
|
842
|
+
117,
|
|
843
|
+
115,
|
|
844
|
+
72,
|
|
845
|
+
101,
|
|
846
|
+
97,
|
|
847
|
+
100
|
|
848
|
+
]) ? {
|
|
849
|
+
ext: "opus",
|
|
850
|
+
mime: "audio/ogg; codecs=opus"
|
|
851
|
+
} : W(t, [
|
|
852
|
+
128,
|
|
853
|
+
116,
|
|
854
|
+
104,
|
|
855
|
+
101,
|
|
856
|
+
111,
|
|
857
|
+
114,
|
|
858
|
+
97
|
|
859
|
+
]) ? {
|
|
860
|
+
ext: "ogv",
|
|
861
|
+
mime: "video/ogg"
|
|
862
|
+
} : W(t, [
|
|
863
|
+
1,
|
|
864
|
+
118,
|
|
865
|
+
105,
|
|
866
|
+
100,
|
|
867
|
+
101,
|
|
868
|
+
111,
|
|
869
|
+
0
|
|
870
|
+
]) ? {
|
|
871
|
+
ext: "ogm",
|
|
872
|
+
mime: "video/ogg"
|
|
873
|
+
} : W(t, [
|
|
874
|
+
127,
|
|
875
|
+
70,
|
|
876
|
+
76,
|
|
877
|
+
65,
|
|
878
|
+
67
|
|
879
|
+
]) ? {
|
|
880
|
+
ext: "oga",
|
|
881
|
+
mime: "audio/ogg"
|
|
882
|
+
} : W(t, [
|
|
883
|
+
83,
|
|
884
|
+
112,
|
|
885
|
+
101,
|
|
886
|
+
101,
|
|
887
|
+
120,
|
|
888
|
+
32,
|
|
889
|
+
32
|
|
890
|
+
]) ? {
|
|
891
|
+
ext: "spx",
|
|
892
|
+
mime: "audio/ogg"
|
|
893
|
+
} : W(t, [
|
|
894
|
+
1,
|
|
895
|
+
118,
|
|
896
|
+
111,
|
|
897
|
+
114,
|
|
898
|
+
98,
|
|
899
|
+
105,
|
|
900
|
+
115
|
|
901
|
+
]) ? {
|
|
902
|
+
ext: "ogg",
|
|
903
|
+
mime: "audio/ogg"
|
|
904
|
+
} : {
|
|
905
|
+
ext: "ogx",
|
|
906
|
+
mime: "application/ogg"
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
if (t.check([80, 75]) && (t.buffer[2] === 3 || t.buffer[2] === 5 || t.buffer[2] === 7) && (t.buffer[3] === 4 || t.buffer[3] === 6 || t.buffer[3] === 8)) return {
|
|
910
|
+
ext: "zip",
|
|
911
|
+
mime: "application/zip"
|
|
912
|
+
};
|
|
913
|
+
if (t.checkString("MThd")) return {
|
|
914
|
+
ext: "mid",
|
|
915
|
+
mime: "audio/midi"
|
|
916
|
+
};
|
|
917
|
+
if (t.checkString("wOFF") && (t.check([
|
|
918
|
+
0,
|
|
919
|
+
1,
|
|
920
|
+
0,
|
|
921
|
+
0
|
|
922
|
+
], { offset: 4 }) || t.checkString("OTTO", { offset: 4 }))) return {
|
|
923
|
+
ext: "woff",
|
|
924
|
+
mime: "font/woff"
|
|
925
|
+
};
|
|
926
|
+
if (t.checkString("wOF2") && (t.check([
|
|
927
|
+
0,
|
|
928
|
+
1,
|
|
929
|
+
0,
|
|
930
|
+
0
|
|
931
|
+
], { offset: 4 }) || t.checkString("OTTO", { offset: 4 }))) return {
|
|
932
|
+
ext: "woff2",
|
|
933
|
+
mime: "font/woff2"
|
|
934
|
+
};
|
|
935
|
+
if (t.check([
|
|
936
|
+
212,
|
|
937
|
+
195,
|
|
938
|
+
178,
|
|
939
|
+
161
|
|
940
|
+
]) || t.check([
|
|
941
|
+
161,
|
|
942
|
+
178,
|
|
943
|
+
195,
|
|
944
|
+
212
|
|
945
|
+
])) return {
|
|
946
|
+
ext: "pcap",
|
|
947
|
+
mime: "application/vnd.tcpdump.pcap"
|
|
948
|
+
};
|
|
949
|
+
if (t.checkString("DSD ")) return {
|
|
950
|
+
ext: "dsf",
|
|
951
|
+
mime: "audio/x-dsf"
|
|
952
|
+
};
|
|
953
|
+
if (t.checkString("LZIP")) return {
|
|
954
|
+
ext: "lz",
|
|
955
|
+
mime: "application/x-lzip"
|
|
956
|
+
};
|
|
957
|
+
if (t.checkString("fLaC")) return {
|
|
958
|
+
ext: "flac",
|
|
959
|
+
mime: "audio/flac"
|
|
960
|
+
};
|
|
961
|
+
if (t.check([
|
|
962
|
+
66,
|
|
963
|
+
80,
|
|
964
|
+
71,
|
|
965
|
+
251
|
|
966
|
+
])) return {
|
|
967
|
+
ext: "bpg",
|
|
968
|
+
mime: "image/bpg"
|
|
969
|
+
};
|
|
970
|
+
if (t.checkString("wvpk")) return {
|
|
971
|
+
ext: "wv",
|
|
972
|
+
mime: "audio/wavpack"
|
|
973
|
+
};
|
|
974
|
+
if (t.checkString("%PDF")) return {
|
|
975
|
+
ext: "pdf",
|
|
976
|
+
mime: "application/pdf"
|
|
977
|
+
};
|
|
978
|
+
if (t.check([
|
|
979
|
+
0,
|
|
980
|
+
97,
|
|
981
|
+
115,
|
|
982
|
+
109
|
|
983
|
+
])) return {
|
|
984
|
+
ext: "wasm",
|
|
985
|
+
mime: "application/wasm"
|
|
986
|
+
};
|
|
987
|
+
if (t.check([73, 73])) {
|
|
988
|
+
let e = await t.readTiffHeader(!1);
|
|
989
|
+
if (e) return e;
|
|
990
|
+
}
|
|
991
|
+
if (t.check([77, 77])) {
|
|
992
|
+
let e = await t.readTiffHeader(!0);
|
|
993
|
+
if (e) return e;
|
|
994
|
+
}
|
|
995
|
+
if (t.checkString("MAC ")) return {
|
|
996
|
+
ext: "ape",
|
|
997
|
+
mime: "audio/ape"
|
|
998
|
+
};
|
|
999
|
+
if (t.check([
|
|
1000
|
+
26,
|
|
1001
|
+
69,
|
|
1002
|
+
223,
|
|
1003
|
+
163
|
|
1004
|
+
])) {
|
|
1005
|
+
async function t() {
|
|
1006
|
+
let t = await e.peekNumber(o), n = 128, r = 0;
|
|
1007
|
+
for (; (t & n) === 0 && n !== 0;) ++r, n >>= 1;
|
|
1008
|
+
let i = new Uint8Array(r + 1);
|
|
1009
|
+
return await z(e, i, void 0, {
|
|
1010
|
+
maximumLength: i.length,
|
|
1011
|
+
reason: "EBML field"
|
|
1012
|
+
}), i;
|
|
1013
|
+
}
|
|
1014
|
+
async function n() {
|
|
1015
|
+
let e = await t(), n = await t();
|
|
1016
|
+
n[0] ^= 128 >> n.length - 1;
|
|
1017
|
+
let r = Math.min(6, n.length), i = new DataView(e.buffer), a = new DataView(n.buffer, n.length - r, r);
|
|
1018
|
+
return {
|
|
1019
|
+
id: _(i),
|
|
1020
|
+
len: _(a)
|
|
1021
|
+
};
|
|
1022
|
+
}
|
|
1023
|
+
async function r(t) {
|
|
1024
|
+
let r = 0;
|
|
1025
|
+
for (; t > 0;) {
|
|
1026
|
+
if (r++, r > Me || K(e, a, D)) return;
|
|
1027
|
+
let i = e.position, o = await n();
|
|
1028
|
+
if (o.id === 17026) {
|
|
1029
|
+
if (o.len > A) return;
|
|
1030
|
+
let t = L(o.len, A, "EBML DocType");
|
|
1031
|
+
return (await e.readToken(new p(t))).replaceAll(/\00.*$/g, "");
|
|
1032
|
+
}
|
|
1033
|
+
if (G(e) && (!Number.isFinite(o.len) || o.len < 0 || o.len > j) || (await R(e, o.len, {
|
|
1034
|
+
maximumLength: G(e) ? j : e.fileInfo.size,
|
|
1035
|
+
reason: "EBML payload"
|
|
1036
|
+
}), --t, e.position <= i)) return;
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
let i = await n(), a = e.position;
|
|
1040
|
+
switch (await r(i.len)) {
|
|
1041
|
+
case "webm": return {
|
|
1042
|
+
ext: "webm",
|
|
1043
|
+
mime: "video/webm"
|
|
1044
|
+
};
|
|
1045
|
+
case "matroska": return {
|
|
1046
|
+
ext: "mkv",
|
|
1047
|
+
mime: "video/matroska"
|
|
1048
|
+
};
|
|
1049
|
+
default: return;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
if (t.checkString("SQLi")) return {
|
|
1053
|
+
ext: "sqlite",
|
|
1054
|
+
mime: "application/x-sqlite3"
|
|
1055
|
+
};
|
|
1056
|
+
if (t.check([
|
|
1057
|
+
78,
|
|
1058
|
+
69,
|
|
1059
|
+
83,
|
|
1060
|
+
26
|
|
1061
|
+
])) return {
|
|
1062
|
+
ext: "nes",
|
|
1063
|
+
mime: "application/x-nintendo-nes-rom"
|
|
1064
|
+
};
|
|
1065
|
+
if (t.checkString("Cr24")) return {
|
|
1066
|
+
ext: "crx",
|
|
1067
|
+
mime: "application/x-google-chrome-extension"
|
|
1068
|
+
};
|
|
1069
|
+
if (t.checkString("MSCF") || t.checkString("ISc(")) return {
|
|
1070
|
+
ext: "cab",
|
|
1071
|
+
mime: "application/vnd.ms-cab-compressed"
|
|
1072
|
+
};
|
|
1073
|
+
if (t.check([
|
|
1074
|
+
237,
|
|
1075
|
+
171,
|
|
1076
|
+
238,
|
|
1077
|
+
219
|
|
1078
|
+
])) return {
|
|
1079
|
+
ext: "rpm",
|
|
1080
|
+
mime: "application/x-rpm"
|
|
1081
|
+
};
|
|
1082
|
+
if (t.check([
|
|
1083
|
+
197,
|
|
1084
|
+
208,
|
|
1085
|
+
211,
|
|
1086
|
+
198
|
|
1087
|
+
])) return {
|
|
1088
|
+
ext: "eps",
|
|
1089
|
+
mime: "application/eps"
|
|
1090
|
+
};
|
|
1091
|
+
if (t.check([
|
|
1092
|
+
40,
|
|
1093
|
+
181,
|
|
1094
|
+
47,
|
|
1095
|
+
253
|
|
1096
|
+
])) return {
|
|
1097
|
+
ext: "zst",
|
|
1098
|
+
mime: "application/zstd"
|
|
1099
|
+
};
|
|
1100
|
+
if (t.check([
|
|
1101
|
+
127,
|
|
1102
|
+
69,
|
|
1103
|
+
76,
|
|
1104
|
+
70
|
|
1105
|
+
])) return {
|
|
1106
|
+
ext: "elf",
|
|
1107
|
+
mime: "application/x-elf"
|
|
1108
|
+
};
|
|
1109
|
+
if (t.check([
|
|
1110
|
+
33,
|
|
1111
|
+
66,
|
|
1112
|
+
68,
|
|
1113
|
+
78
|
|
1114
|
+
])) return {
|
|
1115
|
+
ext: "pst",
|
|
1116
|
+
mime: "application/vnd.ms-outlook"
|
|
1117
|
+
};
|
|
1118
|
+
if (t.checkString("PAR1") || t.checkString("PARE")) return {
|
|
1119
|
+
ext: "parquet",
|
|
1120
|
+
mime: "application/vnd.apache.parquet"
|
|
1121
|
+
};
|
|
1122
|
+
if (t.checkString("ttcf")) return {
|
|
1123
|
+
ext: "ttc",
|
|
1124
|
+
mime: "font/collection"
|
|
1125
|
+
};
|
|
1126
|
+
if (t.check([
|
|
1127
|
+
254,
|
|
1128
|
+
237,
|
|
1129
|
+
250,
|
|
1130
|
+
206
|
|
1131
|
+
]) || t.check([
|
|
1132
|
+
254,
|
|
1133
|
+
237,
|
|
1134
|
+
250,
|
|
1135
|
+
207
|
|
1136
|
+
]) || t.check([
|
|
1137
|
+
206,
|
|
1138
|
+
250,
|
|
1139
|
+
237,
|
|
1140
|
+
254
|
|
1141
|
+
]) || t.check([
|
|
1142
|
+
207,
|
|
1143
|
+
250,
|
|
1144
|
+
237,
|
|
1145
|
+
254
|
|
1146
|
+
])) return {
|
|
1147
|
+
ext: "macho",
|
|
1148
|
+
mime: "application/x-mach-binary"
|
|
1149
|
+
};
|
|
1150
|
+
if (t.check([
|
|
1151
|
+
4,
|
|
1152
|
+
34,
|
|
1153
|
+
77,
|
|
1154
|
+
24
|
|
1155
|
+
])) return {
|
|
1156
|
+
ext: "lz4",
|
|
1157
|
+
mime: "application/x-lz4"
|
|
1158
|
+
};
|
|
1159
|
+
if (t.checkString("regf")) return {
|
|
1160
|
+
ext: "dat",
|
|
1161
|
+
mime: "application/x-ft-windows-registry-hive"
|
|
1162
|
+
};
|
|
1163
|
+
if (t.checkString("$FL2") || t.checkString("$FL3")) return {
|
|
1164
|
+
ext: "sav",
|
|
1165
|
+
mime: "application/x-spss-sav"
|
|
1166
|
+
};
|
|
1167
|
+
if (t.check([
|
|
1168
|
+
79,
|
|
1169
|
+
84,
|
|
1170
|
+
84,
|
|
1171
|
+
79,
|
|
1172
|
+
0
|
|
1173
|
+
])) return {
|
|
1174
|
+
ext: "otf",
|
|
1175
|
+
mime: "font/otf"
|
|
1176
|
+
};
|
|
1177
|
+
if (t.checkString("#!AMR")) return {
|
|
1178
|
+
ext: "amr",
|
|
1179
|
+
mime: "audio/amr"
|
|
1180
|
+
};
|
|
1181
|
+
if (t.checkString("{\\rtf")) return {
|
|
1182
|
+
ext: "rtf",
|
|
1183
|
+
mime: "application/rtf"
|
|
1184
|
+
};
|
|
1185
|
+
if (t.check([
|
|
1186
|
+
70,
|
|
1187
|
+
76,
|
|
1188
|
+
86,
|
|
1189
|
+
1
|
|
1190
|
+
])) return {
|
|
1191
|
+
ext: "flv",
|
|
1192
|
+
mime: "video/x-flv"
|
|
1193
|
+
};
|
|
1194
|
+
if (t.checkString("IMPM")) return {
|
|
1195
|
+
ext: "it",
|
|
1196
|
+
mime: "audio/x-it"
|
|
1197
|
+
};
|
|
1198
|
+
if (t.checkString("-lh0-", { offset: 2 }) || t.checkString("-lh1-", { offset: 2 }) || t.checkString("-lh2-", { offset: 2 }) || t.checkString("-lh3-", { offset: 2 }) || t.checkString("-lh4-", { offset: 2 }) || t.checkString("-lh5-", { offset: 2 }) || t.checkString("-lh6-", { offset: 2 }) || t.checkString("-lh7-", { offset: 2 }) || t.checkString("-lzs-", { offset: 2 }) || t.checkString("-lz4-", { offset: 2 }) || t.checkString("-lz5-", { offset: 2 }) || t.checkString("-lhd-", { offset: 2 })) return {
|
|
1199
|
+
ext: "lzh",
|
|
1200
|
+
mime: "application/x-lzh-compressed"
|
|
1201
|
+
};
|
|
1202
|
+
if (t.check([
|
|
1203
|
+
0,
|
|
1204
|
+
0,
|
|
1205
|
+
1,
|
|
1206
|
+
186
|
|
1207
|
+
])) {
|
|
1208
|
+
if (t.check([33], {
|
|
1209
|
+
offset: 4,
|
|
1210
|
+
mask: [241]
|
|
1211
|
+
})) return {
|
|
1212
|
+
ext: "mpg",
|
|
1213
|
+
mime: "video/MP1S"
|
|
1214
|
+
};
|
|
1215
|
+
if (t.check([68], {
|
|
1216
|
+
offset: 4,
|
|
1217
|
+
mask: [196]
|
|
1218
|
+
})) return {
|
|
1219
|
+
ext: "mpg",
|
|
1220
|
+
mime: "video/MP2P"
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
if (t.checkString("ITSF")) return {
|
|
1224
|
+
ext: "chm",
|
|
1225
|
+
mime: "application/vnd.ms-htmlhelp"
|
|
1226
|
+
};
|
|
1227
|
+
if (t.check([
|
|
1228
|
+
202,
|
|
1229
|
+
254,
|
|
1230
|
+
186,
|
|
1231
|
+
190
|
|
1232
|
+
])) {
|
|
1233
|
+
let e = a.get(t.buffer, 4), n = h.get(t.buffer, 6);
|
|
1234
|
+
if (e > 0 && e <= 30) return {
|
|
1235
|
+
ext: "macho",
|
|
1236
|
+
mime: "application/x-mach-binary"
|
|
1237
|
+
};
|
|
1238
|
+
if (n > 30) return {
|
|
1239
|
+
ext: "class",
|
|
1240
|
+
mime: "application/java-vm"
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
if (t.checkString(".RMF")) return {
|
|
1244
|
+
ext: "rm",
|
|
1245
|
+
mime: "application/vnd.rn-realmedia"
|
|
1246
|
+
};
|
|
1247
|
+
if (t.checkString("DRACO")) return {
|
|
1248
|
+
ext: "drc",
|
|
1249
|
+
mime: "application/vnd.google.draco"
|
|
1250
|
+
};
|
|
1251
|
+
if (t.check([
|
|
1252
|
+
253,
|
|
1253
|
+
55,
|
|
1254
|
+
122,
|
|
1255
|
+
88,
|
|
1256
|
+
90,
|
|
1257
|
+
0
|
|
1258
|
+
])) return {
|
|
1259
|
+
ext: "xz",
|
|
1260
|
+
mime: "application/x-xz"
|
|
1261
|
+
};
|
|
1262
|
+
if (t.checkString("<?xml ")) return {
|
|
1263
|
+
ext: "xml",
|
|
1264
|
+
mime: "application/xml"
|
|
1265
|
+
};
|
|
1266
|
+
if (t.check([
|
|
1267
|
+
55,
|
|
1268
|
+
122,
|
|
1269
|
+
188,
|
|
1270
|
+
175,
|
|
1271
|
+
39,
|
|
1272
|
+
28
|
|
1273
|
+
])) return {
|
|
1274
|
+
ext: "7z",
|
|
1275
|
+
mime: "application/x-7z-compressed"
|
|
1276
|
+
};
|
|
1277
|
+
if (t.check([
|
|
1278
|
+
82,
|
|
1279
|
+
97,
|
|
1280
|
+
114,
|
|
1281
|
+
33,
|
|
1282
|
+
26,
|
|
1283
|
+
7
|
|
1284
|
+
]) && (t.buffer[6] === 0 || t.buffer[6] === 1)) return {
|
|
1285
|
+
ext: "rar",
|
|
1286
|
+
mime: "application/x-rar-compressed"
|
|
1287
|
+
};
|
|
1288
|
+
if (t.checkString("solid ")) return {
|
|
1289
|
+
ext: "stl",
|
|
1290
|
+
mime: "model/stl"
|
|
1291
|
+
};
|
|
1292
|
+
if (t.checkString("AC")) {
|
|
1293
|
+
let e = new p(4, "latin1").get(t.buffer, 2);
|
|
1294
|
+
if (e.match("^d*") && e >= 1e3 && e <= 1050) return {
|
|
1295
|
+
ext: "dwg",
|
|
1296
|
+
mime: "image/vnd.dwg"
|
|
1297
|
+
};
|
|
1298
|
+
}
|
|
1299
|
+
if (t.checkString("070707")) return {
|
|
1300
|
+
ext: "cpio",
|
|
1301
|
+
mime: "application/x-cpio"
|
|
1302
|
+
};
|
|
1303
|
+
if (t.checkString("BLENDER")) return {
|
|
1304
|
+
ext: "blend",
|
|
1305
|
+
mime: "application/x-blender"
|
|
1306
|
+
};
|
|
1307
|
+
if (t.checkString("!<arch>")) return await e.ignore(8), await e.readToken(new p(13, "ascii")) === "debian-binary" ? {
|
|
1308
|
+
ext: "deb",
|
|
1309
|
+
mime: "application/x-deb"
|
|
1310
|
+
} : {
|
|
1311
|
+
ext: "ar",
|
|
1312
|
+
mime: "application/x-unix-archive"
|
|
1313
|
+
};
|
|
1314
|
+
if (t.checkString("WEBVTT") && [
|
|
1315
|
+
"\n",
|
|
1316
|
+
"\r",
|
|
1317
|
+
" ",
|
|
1318
|
+
" ",
|
|
1319
|
+
"\0"
|
|
1320
|
+
].some((e) => t.checkString(e, { offset: 6 }))) return {
|
|
1321
|
+
ext: "vtt",
|
|
1322
|
+
mime: "text/vtt"
|
|
1323
|
+
};
|
|
1324
|
+
if (t.check([
|
|
1325
|
+
137,
|
|
1326
|
+
80,
|
|
1327
|
+
78,
|
|
1328
|
+
71,
|
|
1329
|
+
13,
|
|
1330
|
+
10,
|
|
1331
|
+
26,
|
|
1332
|
+
10
|
|
1333
|
+
])) {
|
|
1334
|
+
let t = {
|
|
1335
|
+
ext: "png",
|
|
1336
|
+
mime: "image/png"
|
|
1337
|
+
}, n = {
|
|
1338
|
+
ext: "apng",
|
|
1339
|
+
mime: "image/apng"
|
|
1340
|
+
};
|
|
1341
|
+
await e.ignore(8);
|
|
1342
|
+
async function r() {
|
|
1343
|
+
return {
|
|
1344
|
+
length: await e.readToken(ee),
|
|
1345
|
+
type: await e.readToken(new p(4, "latin1"))
|
|
1346
|
+
};
|
|
1347
|
+
}
|
|
1348
|
+
let i = G(e), a = e.position, o = 0, s = !1;
|
|
1349
|
+
do {
|
|
1350
|
+
if (o++, o > Ne || K(e, a, Pe)) break;
|
|
1351
|
+
let c = e.position, l = await r();
|
|
1352
|
+
if (l.length < 0) return;
|
|
1353
|
+
if (l.type === "IHDR") {
|
|
1354
|
+
if (l.length !== 13) return;
|
|
1355
|
+
s = !0;
|
|
1356
|
+
}
|
|
1357
|
+
switch (l.type) {
|
|
1358
|
+
case "IDAT": return t;
|
|
1359
|
+
case "acTL": return n;
|
|
1360
|
+
default:
|
|
1361
|
+
if (!s && l.type !== "CgBI") return;
|
|
1362
|
+
if (i && l.length > N) return s && Ge(l.type) ? t : void 0;
|
|
1363
|
+
try {
|
|
1364
|
+
await R(e, l.length + 4, {
|
|
1365
|
+
maximumLength: i ? N + 4 : e.fileInfo.size,
|
|
1366
|
+
reason: "PNG chunk payload"
|
|
1367
|
+
});
|
|
1368
|
+
} catch (e) {
|
|
1369
|
+
if (!i && (e instanceof I || e instanceof g)) return t;
|
|
1370
|
+
throw e;
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
if (e.position <= c) break;
|
|
1374
|
+
} while (e.position + 8 < e.fileInfo.size);
|
|
1375
|
+
return t;
|
|
1376
|
+
}
|
|
1377
|
+
if (t.check([
|
|
1378
|
+
65,
|
|
1379
|
+
82,
|
|
1380
|
+
82,
|
|
1381
|
+
79,
|
|
1382
|
+
87,
|
|
1383
|
+
49,
|
|
1384
|
+
0,
|
|
1385
|
+
0
|
|
1386
|
+
])) return {
|
|
1387
|
+
ext: "arrow",
|
|
1388
|
+
mime: "application/vnd.apache.arrow.file"
|
|
1389
|
+
};
|
|
1390
|
+
if (t.check([
|
|
1391
|
+
103,
|
|
1392
|
+
108,
|
|
1393
|
+
84,
|
|
1394
|
+
70,
|
|
1395
|
+
2,
|
|
1396
|
+
0,
|
|
1397
|
+
0,
|
|
1398
|
+
0
|
|
1399
|
+
])) return {
|
|
1400
|
+
ext: "glb",
|
|
1401
|
+
mime: "model/gltf-binary"
|
|
1402
|
+
};
|
|
1403
|
+
if (t.check([
|
|
1404
|
+
102,
|
|
1405
|
+
114,
|
|
1406
|
+
101,
|
|
1407
|
+
101
|
|
1408
|
+
], { offset: 4 }) || t.check([
|
|
1409
|
+
109,
|
|
1410
|
+
100,
|
|
1411
|
+
97,
|
|
1412
|
+
116
|
|
1413
|
+
], { offset: 4 }) || t.check([
|
|
1414
|
+
109,
|
|
1415
|
+
111,
|
|
1416
|
+
111,
|
|
1417
|
+
118
|
|
1418
|
+
], { offset: 4 }) || t.check([
|
|
1419
|
+
119,
|
|
1420
|
+
105,
|
|
1421
|
+
100,
|
|
1422
|
+
101
|
|
1423
|
+
], { offset: 4 })) return {
|
|
1424
|
+
ext: "mov",
|
|
1425
|
+
mime: "video/quicktime"
|
|
1426
|
+
};
|
|
1427
|
+
if (t.check([
|
|
1428
|
+
73,
|
|
1429
|
+
73,
|
|
1430
|
+
82,
|
|
1431
|
+
79,
|
|
1432
|
+
8,
|
|
1433
|
+
0,
|
|
1434
|
+
0,
|
|
1435
|
+
0,
|
|
1436
|
+
24
|
|
1437
|
+
])) return {
|
|
1438
|
+
ext: "orf",
|
|
1439
|
+
mime: "image/x-olympus-orf"
|
|
1440
|
+
};
|
|
1441
|
+
if (t.checkString("gimp xcf ")) return {
|
|
1442
|
+
ext: "xcf",
|
|
1443
|
+
mime: "image/x-xcf"
|
|
1444
|
+
};
|
|
1445
|
+
if (t.checkString("ftyp", { offset: 4 }) && t.buffer[8] & 96) {
|
|
1446
|
+
let e = new p(4, "latin1").get(t.buffer, 8).replace("\0", " ").trim();
|
|
1447
|
+
switch (e) {
|
|
1448
|
+
case "avif":
|
|
1449
|
+
case "avis": return {
|
|
1450
|
+
ext: "avif",
|
|
1451
|
+
mime: "image/avif"
|
|
1452
|
+
};
|
|
1453
|
+
case "mif1": return {
|
|
1454
|
+
ext: "heic",
|
|
1455
|
+
mime: "image/heif"
|
|
1456
|
+
};
|
|
1457
|
+
case "msf1": return {
|
|
1458
|
+
ext: "heic",
|
|
1459
|
+
mime: "image/heif-sequence"
|
|
1460
|
+
};
|
|
1461
|
+
case "heic":
|
|
1462
|
+
case "heix": return {
|
|
1463
|
+
ext: "heic",
|
|
1464
|
+
mime: "image/heic"
|
|
1465
|
+
};
|
|
1466
|
+
case "hevc":
|
|
1467
|
+
case "hevx": return {
|
|
1468
|
+
ext: "heic",
|
|
1469
|
+
mime: "image/heic-sequence"
|
|
1470
|
+
};
|
|
1471
|
+
case "qt": return {
|
|
1472
|
+
ext: "mov",
|
|
1473
|
+
mime: "video/quicktime"
|
|
1474
|
+
};
|
|
1475
|
+
case "M4V":
|
|
1476
|
+
case "M4VH":
|
|
1477
|
+
case "M4VP": return {
|
|
1478
|
+
ext: "m4v",
|
|
1479
|
+
mime: "video/x-m4v"
|
|
1480
|
+
};
|
|
1481
|
+
case "M4P": return {
|
|
1482
|
+
ext: "m4p",
|
|
1483
|
+
mime: "video/mp4"
|
|
1484
|
+
};
|
|
1485
|
+
case "M4B": return {
|
|
1486
|
+
ext: "m4b",
|
|
1487
|
+
mime: "audio/mp4"
|
|
1488
|
+
};
|
|
1489
|
+
case "M4A": return {
|
|
1490
|
+
ext: "m4a",
|
|
1491
|
+
mime: "audio/x-m4a"
|
|
1492
|
+
};
|
|
1493
|
+
case "F4V": return {
|
|
1494
|
+
ext: "f4v",
|
|
1495
|
+
mime: "video/mp4"
|
|
1496
|
+
};
|
|
1497
|
+
case "F4P": return {
|
|
1498
|
+
ext: "f4p",
|
|
1499
|
+
mime: "video/mp4"
|
|
1500
|
+
};
|
|
1501
|
+
case "F4A": return {
|
|
1502
|
+
ext: "f4a",
|
|
1503
|
+
mime: "audio/mp4"
|
|
1504
|
+
};
|
|
1505
|
+
case "F4B": return {
|
|
1506
|
+
ext: "f4b",
|
|
1507
|
+
mime: "audio/mp4"
|
|
1508
|
+
};
|
|
1509
|
+
case "crx": return {
|
|
1510
|
+
ext: "cr3",
|
|
1511
|
+
mime: "image/x-canon-cr3"
|
|
1512
|
+
};
|
|
1513
|
+
default: return e.startsWith("3g") ? e.startsWith("3g2") ? {
|
|
1514
|
+
ext: "3g2",
|
|
1515
|
+
mime: "video/3gpp2"
|
|
1516
|
+
} : {
|
|
1517
|
+
ext: "3gp",
|
|
1518
|
+
mime: "video/3gpp"
|
|
1519
|
+
} : {
|
|
1520
|
+
ext: "mp4",
|
|
1521
|
+
mime: "video/mp4"
|
|
1522
|
+
};
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
if (t.checkString("REGEDIT4\r\n")) return {
|
|
1526
|
+
ext: "reg",
|
|
1527
|
+
mime: "application/x-ms-regedit"
|
|
1528
|
+
};
|
|
1529
|
+
if (t.check([
|
|
1530
|
+
82,
|
|
1531
|
+
73,
|
|
1532
|
+
70,
|
|
1533
|
+
70
|
|
1534
|
+
])) {
|
|
1535
|
+
if (t.checkString("WEBP", { offset: 8 })) return {
|
|
1536
|
+
ext: "webp",
|
|
1537
|
+
mime: "image/webp"
|
|
1538
|
+
};
|
|
1539
|
+
if (t.check([
|
|
1540
|
+
65,
|
|
1541
|
+
86,
|
|
1542
|
+
73
|
|
1543
|
+
], { offset: 8 })) return {
|
|
1544
|
+
ext: "avi",
|
|
1545
|
+
mime: "video/vnd.avi"
|
|
1546
|
+
};
|
|
1547
|
+
if (t.check([
|
|
1548
|
+
87,
|
|
1549
|
+
65,
|
|
1550
|
+
86,
|
|
1551
|
+
69
|
|
1552
|
+
], { offset: 8 })) return {
|
|
1553
|
+
ext: "wav",
|
|
1554
|
+
mime: "audio/wav"
|
|
1555
|
+
};
|
|
1556
|
+
if (t.check([
|
|
1557
|
+
81,
|
|
1558
|
+
76,
|
|
1559
|
+
67,
|
|
1560
|
+
77
|
|
1561
|
+
], { offset: 8 })) return {
|
|
1562
|
+
ext: "qcp",
|
|
1563
|
+
mime: "audio/qcelp"
|
|
1564
|
+
};
|
|
1565
|
+
}
|
|
1566
|
+
if (t.check([
|
|
1567
|
+
73,
|
|
1568
|
+
73,
|
|
1569
|
+
85,
|
|
1570
|
+
0,
|
|
1571
|
+
24,
|
|
1572
|
+
0,
|
|
1573
|
+
0,
|
|
1574
|
+
0,
|
|
1575
|
+
136,
|
|
1576
|
+
231,
|
|
1577
|
+
116,
|
|
1578
|
+
216
|
|
1579
|
+
])) return {
|
|
1580
|
+
ext: "rw2",
|
|
1581
|
+
mime: "image/x-panasonic-rw2"
|
|
1582
|
+
};
|
|
1583
|
+
if (t.check([
|
|
1584
|
+
48,
|
|
1585
|
+
38,
|
|
1586
|
+
178,
|
|
1587
|
+
117,
|
|
1588
|
+
142,
|
|
1589
|
+
102,
|
|
1590
|
+
207,
|
|
1591
|
+
17,
|
|
1592
|
+
166,
|
|
1593
|
+
217
|
|
1594
|
+
])) {
|
|
1595
|
+
let t = !1;
|
|
1596
|
+
try {
|
|
1597
|
+
async function n() {
|
|
1598
|
+
let t = new Uint8Array(16);
|
|
1599
|
+
return await z(e, t, void 0, {
|
|
1600
|
+
maximumLength: t.length,
|
|
1601
|
+
reason: "ASF header GUID"
|
|
1602
|
+
}), {
|
|
1603
|
+
id: t,
|
|
1604
|
+
size: Number(await e.readToken(s))
|
|
1605
|
+
};
|
|
1606
|
+
}
|
|
1607
|
+
await R(e, 30, {
|
|
1608
|
+
maximumLength: 30,
|
|
1609
|
+
reason: "ASF header prelude"
|
|
1610
|
+
});
|
|
1611
|
+
let r = G(e), i = e.position, a = 0;
|
|
1612
|
+
for (; e.position + 24 < e.fileInfo.size && (a++, !(a > Fe || K(e, i, D)));) {
|
|
1613
|
+
let i = e.position, a = await n(), o = a.size - 24;
|
|
1614
|
+
if (!Number.isFinite(o) || o < 0) {
|
|
1615
|
+
t = !0;
|
|
1616
|
+
break;
|
|
1617
|
+
}
|
|
1618
|
+
if (W(a.id, [
|
|
1619
|
+
145,
|
|
1620
|
+
7,
|
|
1621
|
+
220,
|
|
1622
|
+
183,
|
|
1623
|
+
183,
|
|
1624
|
+
169,
|
|
1625
|
+
207,
|
|
1626
|
+
17,
|
|
1627
|
+
142,
|
|
1628
|
+
230,
|
|
1629
|
+
0,
|
|
1630
|
+
192,
|
|
1631
|
+
12,
|
|
1632
|
+
32,
|
|
1633
|
+
83,
|
|
1634
|
+
101
|
|
1635
|
+
])) {
|
|
1636
|
+
let t = new Uint8Array(16);
|
|
1637
|
+
if (o -= await z(e, t, void 0, {
|
|
1638
|
+
maximumLength: t.length,
|
|
1639
|
+
reason: "ASF stream type GUID"
|
|
1640
|
+
}), W(t, [
|
|
1641
|
+
64,
|
|
1642
|
+
158,
|
|
1643
|
+
105,
|
|
1644
|
+
248,
|
|
1645
|
+
77,
|
|
1646
|
+
91,
|
|
1647
|
+
207,
|
|
1648
|
+
17,
|
|
1649
|
+
168,
|
|
1650
|
+
253,
|
|
1651
|
+
0,
|
|
1652
|
+
128,
|
|
1653
|
+
95,
|
|
1654
|
+
92,
|
|
1655
|
+
68,
|
|
1656
|
+
43
|
|
1657
|
+
])) return {
|
|
1658
|
+
ext: "asf",
|
|
1659
|
+
mime: "audio/x-ms-asf"
|
|
1660
|
+
};
|
|
1661
|
+
if (W(t, [
|
|
1662
|
+
192,
|
|
1663
|
+
239,
|
|
1664
|
+
25,
|
|
1665
|
+
188,
|
|
1666
|
+
77,
|
|
1667
|
+
91,
|
|
1668
|
+
207,
|
|
1669
|
+
17,
|
|
1670
|
+
168,
|
|
1671
|
+
253,
|
|
1672
|
+
0,
|
|
1673
|
+
128,
|
|
1674
|
+
95,
|
|
1675
|
+
92,
|
|
1676
|
+
68,
|
|
1677
|
+
43
|
|
1678
|
+
])) return {
|
|
1679
|
+
ext: "asf",
|
|
1680
|
+
mime: "video/x-ms-asf"
|
|
1681
|
+
};
|
|
1682
|
+
break;
|
|
1683
|
+
}
|
|
1684
|
+
if (r && o > P) {
|
|
1685
|
+
t = !0;
|
|
1686
|
+
break;
|
|
1687
|
+
}
|
|
1688
|
+
if (await R(e, o, {
|
|
1689
|
+
maximumLength: r ? P : e.fileInfo.size,
|
|
1690
|
+
reason: "ASF header payload"
|
|
1691
|
+
}), e.position <= i) {
|
|
1692
|
+
t = !0;
|
|
1693
|
+
break;
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
} catch (n) {
|
|
1697
|
+
if (n instanceof g || n instanceof I) G(e) && (t = !0);
|
|
1698
|
+
else throw n;
|
|
1699
|
+
}
|
|
1700
|
+
return t ? void 0 : {
|
|
1701
|
+
ext: "asf",
|
|
1702
|
+
mime: "application/vnd.ms-asf"
|
|
1703
|
+
};
|
|
1704
|
+
}
|
|
1705
|
+
if (t.check([
|
|
1706
|
+
171,
|
|
1707
|
+
75,
|
|
1708
|
+
84,
|
|
1709
|
+
88,
|
|
1710
|
+
32,
|
|
1711
|
+
49,
|
|
1712
|
+
49,
|
|
1713
|
+
187,
|
|
1714
|
+
13,
|
|
1715
|
+
10,
|
|
1716
|
+
26,
|
|
1717
|
+
10
|
|
1718
|
+
])) return {
|
|
1719
|
+
ext: "ktx",
|
|
1720
|
+
mime: "image/ktx"
|
|
1721
|
+
};
|
|
1722
|
+
if ((t.check([
|
|
1723
|
+
126,
|
|
1724
|
+
16,
|
|
1725
|
+
4
|
|
1726
|
+
]) || t.check([
|
|
1727
|
+
126,
|
|
1728
|
+
24,
|
|
1729
|
+
4
|
|
1730
|
+
])) && t.check([
|
|
1731
|
+
48,
|
|
1732
|
+
77,
|
|
1733
|
+
73,
|
|
1734
|
+
69
|
|
1735
|
+
], { offset: 4 })) return {
|
|
1736
|
+
ext: "mie",
|
|
1737
|
+
mime: "application/x-mie"
|
|
1738
|
+
};
|
|
1739
|
+
if (t.check([
|
|
1740
|
+
39,
|
|
1741
|
+
10,
|
|
1742
|
+
0,
|
|
1743
|
+
0,
|
|
1744
|
+
0,
|
|
1745
|
+
0,
|
|
1746
|
+
0,
|
|
1747
|
+
0,
|
|
1748
|
+
0,
|
|
1749
|
+
0,
|
|
1750
|
+
0,
|
|
1751
|
+
0
|
|
1752
|
+
], { offset: 2 })) return {
|
|
1753
|
+
ext: "shp",
|
|
1754
|
+
mime: "application/x-esri-shape"
|
|
1755
|
+
};
|
|
1756
|
+
if (t.check([
|
|
1757
|
+
255,
|
|
1758
|
+
79,
|
|
1759
|
+
255,
|
|
1760
|
+
81
|
|
1761
|
+
])) return {
|
|
1762
|
+
ext: "j2c",
|
|
1763
|
+
mime: "image/j2c"
|
|
1764
|
+
};
|
|
1765
|
+
if (t.check([
|
|
1766
|
+
0,
|
|
1767
|
+
0,
|
|
1768
|
+
0,
|
|
1769
|
+
12,
|
|
1770
|
+
106,
|
|
1771
|
+
80,
|
|
1772
|
+
32,
|
|
1773
|
+
32,
|
|
1774
|
+
13,
|
|
1775
|
+
10,
|
|
1776
|
+
135,
|
|
1777
|
+
10
|
|
1778
|
+
])) switch (await e.ignore(20), await e.readToken(new p(4, "ascii"))) {
|
|
1779
|
+
case "jp2 ": return {
|
|
1780
|
+
ext: "jp2",
|
|
1781
|
+
mime: "image/jp2"
|
|
1782
|
+
};
|
|
1783
|
+
case "jpx ": return {
|
|
1784
|
+
ext: "jpx",
|
|
1785
|
+
mime: "image/jpx"
|
|
1786
|
+
};
|
|
1787
|
+
case "jpm ": return {
|
|
1788
|
+
ext: "jpm",
|
|
1789
|
+
mime: "image/jpm"
|
|
1790
|
+
};
|
|
1791
|
+
case "mjp2": return {
|
|
1792
|
+
ext: "mj2",
|
|
1793
|
+
mime: "image/mj2"
|
|
1794
|
+
};
|
|
1795
|
+
default: return;
|
|
1796
|
+
}
|
|
1797
|
+
if (t.check([255, 10]) || t.check([
|
|
1798
|
+
0,
|
|
1799
|
+
0,
|
|
1800
|
+
0,
|
|
1801
|
+
12,
|
|
1802
|
+
74,
|
|
1803
|
+
88,
|
|
1804
|
+
76,
|
|
1805
|
+
32,
|
|
1806
|
+
13,
|
|
1807
|
+
10,
|
|
1808
|
+
135,
|
|
1809
|
+
10
|
|
1810
|
+
])) return {
|
|
1811
|
+
ext: "jxl",
|
|
1812
|
+
mime: "image/jxl"
|
|
1813
|
+
};
|
|
1814
|
+
if (t.check([254, 255])) return t.checkString("<?xml ", {
|
|
1815
|
+
offset: 2,
|
|
1816
|
+
encoding: "utf-16be"
|
|
1817
|
+
}) ? {
|
|
1818
|
+
ext: "xml",
|
|
1819
|
+
mime: "application/xml"
|
|
1820
|
+
} : void 0;
|
|
1821
|
+
if (t.check([
|
|
1822
|
+
208,
|
|
1823
|
+
207,
|
|
1824
|
+
17,
|
|
1825
|
+
224,
|
|
1826
|
+
161,
|
|
1827
|
+
177,
|
|
1828
|
+
26,
|
|
1829
|
+
225
|
|
1830
|
+
])) return {
|
|
1831
|
+
ext: "cfb",
|
|
1832
|
+
mime: "application/x-cfb"
|
|
1833
|
+
};
|
|
1834
|
+
if (await e.peekBuffer(t.buffer, {
|
|
1835
|
+
length: Math.min(256, e.fileInfo.size),
|
|
1836
|
+
mayBeLess: !0
|
|
1837
|
+
}), t.check([
|
|
1838
|
+
97,
|
|
1839
|
+
99,
|
|
1840
|
+
115,
|
|
1841
|
+
112
|
|
1842
|
+
], { offset: 36 })) return {
|
|
1843
|
+
ext: "icc",
|
|
1844
|
+
mime: "application/vnd.iccprofile"
|
|
1845
|
+
};
|
|
1846
|
+
if (t.checkString("**ACE", { offset: 7 }) && t.checkString("**", { offset: 12 })) return {
|
|
1847
|
+
ext: "ace",
|
|
1848
|
+
mime: "application/x-ace-compressed"
|
|
1849
|
+
};
|
|
1850
|
+
if (t.checkString("BEGIN:")) {
|
|
1851
|
+
if (t.checkString("VCARD", { offset: 6 })) return {
|
|
1852
|
+
ext: "vcf",
|
|
1853
|
+
mime: "text/vcard"
|
|
1854
|
+
};
|
|
1855
|
+
if (t.checkString("VCALENDAR", { offset: 6 })) return {
|
|
1856
|
+
ext: "ics",
|
|
1857
|
+
mime: "text/calendar"
|
|
1858
|
+
};
|
|
1859
|
+
}
|
|
1860
|
+
if (t.checkString("FUJIFILMCCD-RAW")) return {
|
|
1861
|
+
ext: "raf",
|
|
1862
|
+
mime: "image/x-fujifilm-raf"
|
|
1863
|
+
};
|
|
1864
|
+
if (t.checkString("Extended Module:")) return {
|
|
1865
|
+
ext: "xm",
|
|
1866
|
+
mime: "audio/x-xm"
|
|
1867
|
+
};
|
|
1868
|
+
if (t.checkString("Creative Voice File")) return {
|
|
1869
|
+
ext: "voc",
|
|
1870
|
+
mime: "audio/x-voc"
|
|
1871
|
+
};
|
|
1872
|
+
if (t.check([
|
|
1873
|
+
4,
|
|
1874
|
+
0,
|
|
1875
|
+
0,
|
|
1876
|
+
0
|
|
1877
|
+
]) && t.buffer.length >= 16) {
|
|
1878
|
+
let e = new DataView(t.buffer.buffer).getUint32(12, !0);
|
|
1879
|
+
if (e > 12 && t.buffer.length >= e + 16) try {
|
|
1880
|
+
let n = new TextDecoder().decode(t.buffer.subarray(16, e + 16));
|
|
1881
|
+
if (JSON.parse(n).files) return {
|
|
1882
|
+
ext: "asar",
|
|
1883
|
+
mime: "application/x-asar"
|
|
1884
|
+
};
|
|
1885
|
+
} catch (e) {}
|
|
1886
|
+
}
|
|
1887
|
+
if (t.check([
|
|
1888
|
+
6,
|
|
1889
|
+
14,
|
|
1890
|
+
43,
|
|
1891
|
+
52,
|
|
1892
|
+
2,
|
|
1893
|
+
5,
|
|
1894
|
+
1,
|
|
1895
|
+
1,
|
|
1896
|
+
13,
|
|
1897
|
+
1,
|
|
1898
|
+
2,
|
|
1899
|
+
1,
|
|
1900
|
+
1,
|
|
1901
|
+
2
|
|
1902
|
+
])) return {
|
|
1903
|
+
ext: "mxf",
|
|
1904
|
+
mime: "application/mxf"
|
|
1905
|
+
};
|
|
1906
|
+
if (t.checkString("SCRM", { offset: 44 })) return {
|
|
1907
|
+
ext: "s3m",
|
|
1908
|
+
mime: "audio/x-s3m"
|
|
1909
|
+
};
|
|
1910
|
+
if (t.check([71]) && t.check([71], { offset: 188 }) || t.check([71], { offset: 4 }) && t.check([71], { offset: 196 })) return {
|
|
1911
|
+
ext: "mts",
|
|
1912
|
+
mime: "video/mp2t"
|
|
1913
|
+
};
|
|
1914
|
+
if (t.check([
|
|
1915
|
+
66,
|
|
1916
|
+
79,
|
|
1917
|
+
79,
|
|
1918
|
+
75,
|
|
1919
|
+
77,
|
|
1920
|
+
79,
|
|
1921
|
+
66,
|
|
1922
|
+
73
|
|
1923
|
+
], { offset: 60 })) return {
|
|
1924
|
+
ext: "mobi",
|
|
1925
|
+
mime: "application/x-mobipocket-ebook"
|
|
1926
|
+
};
|
|
1927
|
+
if (t.check([
|
|
1928
|
+
68,
|
|
1929
|
+
73,
|
|
1930
|
+
67,
|
|
1931
|
+
77
|
|
1932
|
+
], { offset: 128 })) return {
|
|
1933
|
+
ext: "dcm",
|
|
1934
|
+
mime: "application/dicom"
|
|
1935
|
+
};
|
|
1936
|
+
if (t.check([
|
|
1937
|
+
76,
|
|
1938
|
+
0,
|
|
1939
|
+
0,
|
|
1940
|
+
0,
|
|
1941
|
+
1,
|
|
1942
|
+
20,
|
|
1943
|
+
2,
|
|
1944
|
+
0,
|
|
1945
|
+
0,
|
|
1946
|
+
0,
|
|
1947
|
+
0,
|
|
1948
|
+
0,
|
|
1949
|
+
192,
|
|
1950
|
+
0,
|
|
1951
|
+
0,
|
|
1952
|
+
0,
|
|
1953
|
+
0,
|
|
1954
|
+
0,
|
|
1955
|
+
0,
|
|
1956
|
+
70
|
|
1957
|
+
])) return {
|
|
1958
|
+
ext: "lnk",
|
|
1959
|
+
mime: "application/x.ms.shortcut"
|
|
1960
|
+
};
|
|
1961
|
+
if (t.check([
|
|
1962
|
+
98,
|
|
1963
|
+
111,
|
|
1964
|
+
111,
|
|
1965
|
+
107,
|
|
1966
|
+
0,
|
|
1967
|
+
0,
|
|
1968
|
+
0,
|
|
1969
|
+
0,
|
|
1970
|
+
109,
|
|
1971
|
+
97,
|
|
1972
|
+
114,
|
|
1973
|
+
107,
|
|
1974
|
+
0,
|
|
1975
|
+
0,
|
|
1976
|
+
0,
|
|
1977
|
+
0
|
|
1978
|
+
])) return {
|
|
1979
|
+
ext: "alias",
|
|
1980
|
+
mime: "application/x.apple.alias"
|
|
1981
|
+
};
|
|
1982
|
+
if (t.checkString("Kaydara FBX Binary \0")) return {
|
|
1983
|
+
ext: "fbx",
|
|
1984
|
+
mime: "application/x.autodesk.fbx"
|
|
1985
|
+
};
|
|
1986
|
+
if (t.check([76, 80], { offset: 34 }) && (t.check([
|
|
1987
|
+
0,
|
|
1988
|
+
0,
|
|
1989
|
+
1
|
|
1990
|
+
], { offset: 8 }) || t.check([
|
|
1991
|
+
1,
|
|
1992
|
+
0,
|
|
1993
|
+
2
|
|
1994
|
+
], { offset: 8 }) || t.check([
|
|
1995
|
+
2,
|
|
1996
|
+
0,
|
|
1997
|
+
2
|
|
1998
|
+
], { offset: 8 }))) return {
|
|
1999
|
+
ext: "eot",
|
|
2000
|
+
mime: "application/vnd.ms-fontobject"
|
|
2001
|
+
};
|
|
2002
|
+
if (t.check([
|
|
2003
|
+
6,
|
|
2004
|
+
6,
|
|
2005
|
+
237,
|
|
2006
|
+
245,
|
|
2007
|
+
216,
|
|
2008
|
+
29,
|
|
2009
|
+
70,
|
|
2010
|
+
229,
|
|
2011
|
+
189,
|
|
2012
|
+
49,
|
|
2013
|
+
239,
|
|
2014
|
+
231,
|
|
2015
|
+
254,
|
|
2016
|
+
116,
|
|
2017
|
+
183,
|
|
2018
|
+
29
|
|
2019
|
+
])) return {
|
|
2020
|
+
ext: "indd",
|
|
2021
|
+
mime: "application/x-indesign"
|
|
2022
|
+
};
|
|
2023
|
+
if (t.check([
|
|
2024
|
+
255,
|
|
2025
|
+
255,
|
|
2026
|
+
0,
|
|
2027
|
+
0,
|
|
2028
|
+
7,
|
|
2029
|
+
0,
|
|
2030
|
+
0,
|
|
2031
|
+
0,
|
|
2032
|
+
4,
|
|
2033
|
+
0,
|
|
2034
|
+
0,
|
|
2035
|
+
0,
|
|
2036
|
+
1,
|
|
2037
|
+
0,
|
|
2038
|
+
1,
|
|
2039
|
+
0
|
|
2040
|
+
]) || t.check([
|
|
2041
|
+
0,
|
|
2042
|
+
0,
|
|
2043
|
+
255,
|
|
2044
|
+
255,
|
|
2045
|
+
0,
|
|
2046
|
+
0,
|
|
2047
|
+
0,
|
|
2048
|
+
7,
|
|
2049
|
+
0,
|
|
2050
|
+
0,
|
|
2051
|
+
0,
|
|
2052
|
+
4,
|
|
2053
|
+
0,
|
|
2054
|
+
1,
|
|
2055
|
+
0,
|
|
2056
|
+
1
|
|
2057
|
+
])) return {
|
|
2058
|
+
ext: "jmp",
|
|
2059
|
+
mime: "application/x-jmp-data"
|
|
2060
|
+
};
|
|
2061
|
+
if (await e.peekBuffer(t.buffer, {
|
|
2062
|
+
length: Math.min(512, e.fileInfo.size),
|
|
2063
|
+
mayBeLess: !0
|
|
2064
|
+
}), t.checkString("ustar", { offset: 257 }) && (t.checkString("\0", { offset: 262 }) || t.checkString(" ", { offset: 262 })) || t.check([
|
|
2065
|
+
0,
|
|
2066
|
+
0,
|
|
2067
|
+
0,
|
|
2068
|
+
0,
|
|
2069
|
+
0,
|
|
2070
|
+
0
|
|
2071
|
+
], { offset: 257 }) && xe(t.buffer)) return {
|
|
2072
|
+
ext: "tar",
|
|
2073
|
+
mime: "application/x-tar"
|
|
2074
|
+
};
|
|
2075
|
+
if (t.check([255, 254])) {
|
|
2076
|
+
let e = "utf-16le";
|
|
2077
|
+
return t.checkString("<?xml ", {
|
|
2078
|
+
offset: 2,
|
|
2079
|
+
encoding: e
|
|
2080
|
+
}) ? {
|
|
2081
|
+
ext: "xml",
|
|
2082
|
+
mime: "application/xml"
|
|
2083
|
+
} : t.check([255, 14], { offset: 2 }) && t.checkString("SketchUp Model", {
|
|
2084
|
+
offset: 4,
|
|
2085
|
+
encoding: e
|
|
2086
|
+
}) ? {
|
|
2087
|
+
ext: "skp",
|
|
2088
|
+
mime: "application/vnd.sketchup.skp"
|
|
2089
|
+
} : t.checkString("Windows Registry Editor Version 5.00\r\n", {
|
|
2090
|
+
offset: 2,
|
|
2091
|
+
encoding: e
|
|
2092
|
+
}) ? {
|
|
2093
|
+
ext: "reg",
|
|
2094
|
+
mime: "application/x-ms-regedit"
|
|
2095
|
+
} : void 0;
|
|
2096
|
+
}
|
|
2097
|
+
if (t.checkString("-----BEGIN PGP MESSAGE-----")) return {
|
|
2098
|
+
ext: "pgp",
|
|
2099
|
+
mime: "application/pgp-encrypted"
|
|
2100
|
+
};
|
|
2101
|
+
}), n(this, "detectImprecise", async (e) => {
|
|
2102
|
+
t.buffer = new Uint8Array(T);
|
|
2103
|
+
let n = et(e.fileInfo.size);
|
|
2104
|
+
if (await e.peekBuffer(t.buffer, {
|
|
2105
|
+
length: Math.min(8, n),
|
|
2106
|
+
mayBeLess: !0
|
|
2107
|
+
}), t.check([
|
|
2108
|
+
0,
|
|
2109
|
+
0,
|
|
2110
|
+
1,
|
|
2111
|
+
186
|
|
2112
|
+
]) || t.check([
|
|
2113
|
+
0,
|
|
2114
|
+
0,
|
|
2115
|
+
1,
|
|
2116
|
+
179
|
|
2117
|
+
])) return {
|
|
2118
|
+
ext: "mpg",
|
|
2119
|
+
mime: "video/mpeg"
|
|
2120
|
+
};
|
|
2121
|
+
if (t.check([
|
|
2122
|
+
0,
|
|
2123
|
+
1,
|
|
2124
|
+
0,
|
|
2125
|
+
0,
|
|
2126
|
+
0
|
|
2127
|
+
])) return {
|
|
2128
|
+
ext: "ttf",
|
|
2129
|
+
mime: "font/ttf"
|
|
2130
|
+
};
|
|
2131
|
+
if (t.check([
|
|
2132
|
+
0,
|
|
2133
|
+
0,
|
|
2134
|
+
1,
|
|
2135
|
+
0
|
|
2136
|
+
])) return {
|
|
2137
|
+
ext: "ico",
|
|
2138
|
+
mime: "image/x-icon"
|
|
2139
|
+
};
|
|
2140
|
+
if (t.check([
|
|
2141
|
+
0,
|
|
2142
|
+
0,
|
|
2143
|
+
2,
|
|
2144
|
+
0
|
|
2145
|
+
])) return {
|
|
2146
|
+
ext: "cur",
|
|
2147
|
+
mime: "image/x-icon"
|
|
2148
|
+
};
|
|
2149
|
+
if (await e.peekBuffer(t.buffer, {
|
|
2150
|
+
length: Math.min(2 + t.options.mpegOffsetTolerance, n),
|
|
2151
|
+
mayBeLess: !0
|
|
2152
|
+
}), t.buffer.length >= 2 + t.options.mpegOffsetTolerance) for (let e = 0; e <= t.options.mpegOffsetTolerance; ++e) {
|
|
2153
|
+
let n = t.scanMpeg(e);
|
|
2154
|
+
if (n) return n;
|
|
2155
|
+
}
|
|
2156
|
+
});
|
|
2157
|
+
let c = $e(e == null ? void 0 : e.mpegOffsetTolerance);
|
|
2158
|
+
this.options = r(r({}, e), {}, { mpegOffsetTolerance: c }), this.detectors = [
|
|
2159
|
+
...(i = this.options.customDetectors) == null ? [] : i,
|
|
2160
|
+
{
|
|
2161
|
+
id: "core",
|
|
2162
|
+
detect: this.detectConfident
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
id: "core.imprecise",
|
|
2166
|
+
detect: this.detectImprecise
|
|
2167
|
+
}
|
|
2168
|
+
], this.tokenizerOptions = { abortSignal: this.options.signal }, this.gzipProbeDepth = 0;
|
|
2169
|
+
}
|
|
2170
|
+
getTokenizerOptions() {
|
|
2171
|
+
return r({}, this.tokenizerOptions);
|
|
2172
|
+
}
|
|
2173
|
+
createTokenizerFromWebStream(e) {
|
|
2174
|
+
return Ve(ne(e, this.getTokenizerOptions()));
|
|
2175
|
+
}
|
|
2176
|
+
async parseTokenizer(e, t = 0) {
|
|
2177
|
+
var n = this;
|
|
2178
|
+
n.detectionReentryCount = t;
|
|
2179
|
+
let r = e.position;
|
|
2180
|
+
for (let t of n.detectors) {
|
|
2181
|
+
let n;
|
|
2182
|
+
try {
|
|
2183
|
+
n = await t.detect(e);
|
|
2184
|
+
} catch (e) {
|
|
2185
|
+
if (e instanceof g || e instanceof I) return;
|
|
2186
|
+
throw e;
|
|
2187
|
+
}
|
|
2188
|
+
if (n) return n;
|
|
2189
|
+
if (r !== e.position) return;
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
async fromTokenizer(e) {
|
|
2193
|
+
var t = this;
|
|
2194
|
+
try {
|
|
2195
|
+
return await t.parseTokenizer(e);
|
|
2196
|
+
} finally {
|
|
2197
|
+
await e.close();
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2200
|
+
async fromBuffer(e) {
|
|
2201
|
+
var t = this;
|
|
2202
|
+
if (!(e instanceof Uint8Array || e instanceof ArrayBuffer)) throw TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``);
|
|
2203
|
+
let n = e instanceof Uint8Array ? e : new Uint8Array(e);
|
|
2204
|
+
if ((n == null ? void 0 : n.length) > 1) return t.fromTokenizer(te(n, t.getTokenizerOptions()));
|
|
2205
|
+
}
|
|
2206
|
+
async fromBlob(e) {
|
|
2207
|
+
var t = this, n;
|
|
2208
|
+
(n = t.options.signal) == null || n.throwIfAborted();
|
|
2209
|
+
let r = re(e, t.getTokenizerOptions());
|
|
2210
|
+
return t.fromTokenizer(r);
|
|
2211
|
+
}
|
|
2212
|
+
async fromStream(e) {
|
|
2213
|
+
var t = this, n;
|
|
2214
|
+
(n = t.options.signal) == null || n.throwIfAborted();
|
|
2215
|
+
let r = t.createTokenizerFromWebStream(e);
|
|
2216
|
+
return t.fromTokenizer(r);
|
|
2217
|
+
}
|
|
2218
|
+
async toDetectionStream(e, t) {
|
|
2219
|
+
var n = this, r;
|
|
2220
|
+
let i = Ze((r = t == null ? void 0 : t.sampleSize) == null ? T : r), a, o, s = e.getReader({ mode: "byob" });
|
|
2221
|
+
try {
|
|
2222
|
+
let { value: e, done: t } = await Qe(s, new Uint8Array(i), n.options.signal);
|
|
2223
|
+
if (o = e, !t && e) try {
|
|
2224
|
+
a = await n.fromBuffer(e.subarray(0, i));
|
|
2225
|
+
} catch (e) {
|
|
2226
|
+
if (!(e instanceof g)) throw e;
|
|
2227
|
+
a = void 0;
|
|
2228
|
+
}
|
|
2229
|
+
o = e;
|
|
2230
|
+
} finally {
|
|
2231
|
+
s.releaseLock();
|
|
2232
|
+
}
|
|
2233
|
+
let c = new TransformStream({
|
|
2234
|
+
async start(e) {
|
|
2235
|
+
e.enqueue(o);
|
|
2236
|
+
},
|
|
2237
|
+
transform(e, t) {
|
|
2238
|
+
t.enqueue(e);
|
|
2239
|
+
}
|
|
2240
|
+
}), l = e.pipeThrough(c);
|
|
2241
|
+
return l.fileType = a, l;
|
|
2242
|
+
}
|
|
2243
|
+
async detectGzip(t) {
|
|
2244
|
+
var n = this;
|
|
2245
|
+
if (n.gzipProbeDepth >= Ae) return {
|
|
2246
|
+
ext: "gz",
|
|
2247
|
+
mime: "application/gzip"
|
|
2248
|
+
};
|
|
2249
|
+
let i = Xe(new ye(t).inflate(), ke), a = G(t), o, s, c, l;
|
|
2250
|
+
if (a) {
|
|
2251
|
+
let t = new AbortController();
|
|
2252
|
+
o = setTimeout(() => {
|
|
2253
|
+
t.abort(new DOMException(`Operation timed out after ${je} ms`, "TimeoutError"));
|
|
2254
|
+
}, je), s = n.options.signal === void 0 ? t.signal : AbortSignal.any([n.options.signal, t.signal]), c = new e(r(r({}, n.options), {}, { signal: s })), c.gzipProbeDepth = n.gzipProbeDepth + 1;
|
|
2255
|
+
} else n.gzipProbeDepth++;
|
|
2256
|
+
try {
|
|
2257
|
+
var u;
|
|
2258
|
+
l = await ((u = c) == null ? n : u).fromStream(i);
|
|
2259
|
+
} catch (e) {
|
|
2260
|
+
var d;
|
|
2261
|
+
if ((e == null ? void 0 : e.name) === "AbortError" && (s == null || (d = s.reason) == null ? void 0 : d.name) !== "TimeoutError") throw e;
|
|
2262
|
+
} finally {
|
|
2263
|
+
clearTimeout(o), a || n.gzipProbeDepth--;
|
|
2264
|
+
}
|
|
2265
|
+
return (l == null ? void 0 : l.ext) === "tar" ? {
|
|
2266
|
+
ext: "tar.gz",
|
|
2267
|
+
mime: "application/gzip"
|
|
2268
|
+
} : {
|
|
2269
|
+
ext: "gz",
|
|
2270
|
+
mime: "application/gzip"
|
|
2271
|
+
};
|
|
2272
|
+
}
|
|
2273
|
+
check(e, t) {
|
|
2274
|
+
return W(this.buffer, e, t);
|
|
2275
|
+
}
|
|
2276
|
+
checkString(e, t) {
|
|
2277
|
+
return this.check(be(e, t == null ? void 0 : t.encoding), t);
|
|
2278
|
+
}
|
|
2279
|
+
async readTiffTag(e) {
|
|
2280
|
+
var t = this;
|
|
2281
|
+
let n = await t.tokenizer.readToken(e ? h : l);
|
|
2282
|
+
switch (await t.tokenizer.ignore(10), n) {
|
|
2283
|
+
case 50341: return {
|
|
2284
|
+
ext: "arw",
|
|
2285
|
+
mime: "image/x-sony-arw"
|
|
2286
|
+
};
|
|
2287
|
+
case 50706: return {
|
|
2288
|
+
ext: "dng",
|
|
2289
|
+
mime: "image/x-adobe-dng"
|
|
2290
|
+
};
|
|
2291
|
+
default:
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
async readTiffIFD(e) {
|
|
2295
|
+
var t = this;
|
|
2296
|
+
let n = await t.tokenizer.readToken(e ? h : l);
|
|
2297
|
+
if (!(n > Ie) && !(G(t.tokenizer) && 2 + n * 12 > F)) for (let r = 0; r < n; ++r) {
|
|
2298
|
+
let n = await t.readTiffTag(e);
|
|
2299
|
+
if (n) return n;
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
async readTiffHeader(e) {
|
|
2303
|
+
var t = this;
|
|
2304
|
+
let n = {
|
|
2305
|
+
ext: "tif",
|
|
2306
|
+
mime: "image/tiff"
|
|
2307
|
+
}, r = (e ? h : l).get(t.buffer, 2), i = (e ? a : m).get(t.buffer, 4);
|
|
2308
|
+
if (r === 42) {
|
|
2309
|
+
var o;
|
|
2310
|
+
if (i >= 6) {
|
|
2311
|
+
if (t.checkString("CR", { offset: 8 })) return {
|
|
2312
|
+
ext: "cr2",
|
|
2313
|
+
mime: "image/x-canon-cr2"
|
|
2314
|
+
};
|
|
2315
|
+
if (i >= 8) {
|
|
2316
|
+
let n = (e ? h : l).get(t.buffer, 8), r = (e ? h : l).get(t.buffer, 10);
|
|
2317
|
+
if (n === 28 && r === 254 || n === 31 && r === 11) return {
|
|
2318
|
+
ext: "nef",
|
|
2319
|
+
mime: "image/x-nikon-nef"
|
|
2320
|
+
};
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
if (G(t.tokenizer) && i > Le) return n;
|
|
2324
|
+
let r = G(t.tokenizer) ? F : t.tokenizer.fileInfo.size;
|
|
2325
|
+
try {
|
|
2326
|
+
await R(t.tokenizer, i, {
|
|
2327
|
+
maximumLength: r,
|
|
2328
|
+
reason: "TIFF IFD offset"
|
|
2329
|
+
});
|
|
2330
|
+
} catch (e) {
|
|
2331
|
+
if (e instanceof g) return;
|
|
2332
|
+
throw e;
|
|
2333
|
+
}
|
|
2334
|
+
let a;
|
|
2335
|
+
try {
|
|
2336
|
+
a = await t.readTiffIFD(e);
|
|
2337
|
+
} catch (e) {
|
|
2338
|
+
if (e instanceof g) return;
|
|
2339
|
+
throw e;
|
|
2340
|
+
}
|
|
2341
|
+
return (o = a) == null ? n : o;
|
|
2342
|
+
}
|
|
2343
|
+
if (r === 43) return n;
|
|
2344
|
+
}
|
|
2345
|
+
scanMpeg(e) {
|
|
2346
|
+
if (this.check([255, 224], {
|
|
2347
|
+
offset: e,
|
|
2348
|
+
mask: [255, 224]
|
|
2349
|
+
})) {
|
|
2350
|
+
if (this.check([16], {
|
|
2351
|
+
offset: e + 1,
|
|
2352
|
+
mask: [22]
|
|
2353
|
+
})) return this.check([8], {
|
|
2354
|
+
offset: e + 1,
|
|
2355
|
+
mask: [8]
|
|
2356
|
+
}), {
|
|
2357
|
+
ext: "aac",
|
|
2358
|
+
mime: "audio/aac"
|
|
2359
|
+
};
|
|
2360
|
+
if (this.check([2], {
|
|
2361
|
+
offset: e + 1,
|
|
2362
|
+
mask: [6]
|
|
2363
|
+
})) return {
|
|
2364
|
+
ext: "mp3",
|
|
2365
|
+
mime: "audio/mpeg"
|
|
2366
|
+
};
|
|
2367
|
+
if (this.check([4], {
|
|
2368
|
+
offset: e + 1,
|
|
2369
|
+
mask: [6]
|
|
2370
|
+
})) return {
|
|
2371
|
+
ext: "mp2",
|
|
2372
|
+
mime: "audio/mpeg"
|
|
2373
|
+
};
|
|
2374
|
+
if (this.check([6], {
|
|
2375
|
+
offset: e + 1,
|
|
2376
|
+
mask: [6]
|
|
2377
|
+
})) return {
|
|
2378
|
+
ext: "mp1",
|
|
2379
|
+
mime: "audio/mpeg"
|
|
2380
|
+
};
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
};
|
|
2384
|
+
new Set(Ce), new Set(we);
|
|
2385
|
+
//#endregion
|
|
2386
|
+
//#region node_modules/media-typer/dist/index.js
|
|
2387
|
+
var lt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e) => {
|
|
2388
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.parse = n;
|
|
2389
|
+
var t = /* @__PURE__ */ (() => {
|
|
2390
|
+
let e = function() {};
|
|
2391
|
+
return e.prototype = Object.create(null), e;
|
|
2392
|
+
})();
|
|
2393
|
+
function n(e, n) {
|
|
2394
|
+
let r = e.length, i = d(e, 0, r), a = i;
|
|
2395
|
+
i = u(e, i, r);
|
|
2396
|
+
let o = f(e, a, i);
|
|
2397
|
+
return {
|
|
2398
|
+
type: e.slice(a, o).toLowerCase(),
|
|
2399
|
+
parameters: (n == null ? void 0 : n.parameters) === !1 ? new t() : l(e, i, r)
|
|
2400
|
+
};
|
|
2401
|
+
}
|
|
2402
|
+
var r = 32, i = 9, a = 59, o = 61, s = 34, c = 92;
|
|
2403
|
+
function l(e, n, r) {
|
|
2404
|
+
let i = new t();
|
|
2405
|
+
parameter: for (; n < r;) {
|
|
2406
|
+
n = d(e, n + 1, r);
|
|
2407
|
+
let t = n;
|
|
2408
|
+
for (; n < r;) {
|
|
2409
|
+
let l = e.charCodeAt(n);
|
|
2410
|
+
if (l === a) continue parameter;
|
|
2411
|
+
if (l === o) {
|
|
2412
|
+
let a = f(e, t, n), o = e.slice(t, a).toLowerCase();
|
|
2413
|
+
if (n = d(e, n + 1, r), n < r && e.charCodeAt(n) === s) {
|
|
2414
|
+
n++;
|
|
2415
|
+
let t = "";
|
|
2416
|
+
for (; n < r;) {
|
|
2417
|
+
let a = e.charCodeAt(n++);
|
|
2418
|
+
if (a === s) {
|
|
2419
|
+
n = u(e, n, r), i[o] === void 0 && (i[o] = t);
|
|
2420
|
+
break;
|
|
2421
|
+
}
|
|
2422
|
+
if (a === c && n < r) {
|
|
2423
|
+
t += e[n++];
|
|
2424
|
+
continue;
|
|
2425
|
+
}
|
|
2426
|
+
t += String.fromCharCode(a);
|
|
2427
|
+
}
|
|
2428
|
+
continue parameter;
|
|
2429
|
+
}
|
|
2430
|
+
let l = n;
|
|
2431
|
+
if (n = u(e, n, r), i[o] === void 0) {
|
|
2432
|
+
let t = f(e, l, n);
|
|
2433
|
+
i[o] = e.slice(l, t);
|
|
2434
|
+
}
|
|
2435
|
+
continue parameter;
|
|
2436
|
+
}
|
|
2437
|
+
n++;
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
return i;
|
|
2441
|
+
}
|
|
2442
|
+
function u(e, t, n) {
|
|
2443
|
+
for (; t < n && e.charCodeAt(t) !== a;) t++;
|
|
2444
|
+
return t;
|
|
2445
|
+
}
|
|
2446
|
+
function d(e, t, n) {
|
|
2447
|
+
for (; t < n;) {
|
|
2448
|
+
let n = e.charCodeAt(t);
|
|
2449
|
+
if (n !== r && n !== i) break;
|
|
2450
|
+
t++;
|
|
2451
|
+
}
|
|
2452
|
+
return t;
|
|
2453
|
+
}
|
|
2454
|
+
function f(e, t, n) {
|
|
2455
|
+
for (; n > t;) {
|
|
2456
|
+
let t = e.charCodeAt(n - 1);
|
|
2457
|
+
if (t !== r && t !== i) break;
|
|
2458
|
+
n--;
|
|
2459
|
+
}
|
|
2460
|
+
return n;
|
|
2461
|
+
}
|
|
2462
|
+
})))(), 1), ut = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$/;
|
|
2463
|
+
function dt(e) {
|
|
2464
|
+
if (!ut.test(e)) throw TypeError(`Invalid media type: ${e}`);
|
|
2465
|
+
let t = e.indexOf("/"), n = e.slice(0, t).toLowerCase(), r = e.slice(t + 1).toLowerCase(), i, a = r.lastIndexOf("+");
|
|
2466
|
+
return a !== -1 && (i = r.slice(a + 1), r = r.slice(0, a)), {
|
|
2467
|
+
type: n,
|
|
2468
|
+
subtype: r,
|
|
2469
|
+
suffix: i
|
|
2470
|
+
};
|
|
2471
|
+
}
|
|
2472
|
+
//#endregion
|
|
2473
|
+
//#region node_modules/music-metadata/lib/common/GenericTagTypes.js
|
|
2474
|
+
var q = { multiple: !1 }, J = {
|
|
2475
|
+
year: q,
|
|
2476
|
+
track: q,
|
|
2477
|
+
disk: q,
|
|
2478
|
+
title: q,
|
|
2479
|
+
artist: q,
|
|
2480
|
+
artists: {
|
|
2481
|
+
multiple: !0,
|
|
2482
|
+
unique: !0
|
|
2483
|
+
},
|
|
2484
|
+
albumartist: q,
|
|
2485
|
+
albumartists: {
|
|
2486
|
+
multiple: !0,
|
|
2487
|
+
unique: !0
|
|
2488
|
+
},
|
|
2489
|
+
album: q,
|
|
2490
|
+
date: q,
|
|
2491
|
+
originaldate: q,
|
|
2492
|
+
originalyear: q,
|
|
2493
|
+
releasedate: q,
|
|
2494
|
+
comment: {
|
|
2495
|
+
multiple: !0,
|
|
2496
|
+
unique: !1
|
|
2497
|
+
},
|
|
2498
|
+
genre: {
|
|
2499
|
+
multiple: !0,
|
|
2500
|
+
unique: !0
|
|
2501
|
+
},
|
|
2502
|
+
picture: {
|
|
2503
|
+
multiple: !0,
|
|
2504
|
+
unique: !0
|
|
2505
|
+
},
|
|
2506
|
+
composer: {
|
|
2507
|
+
multiple: !0,
|
|
2508
|
+
unique: !0
|
|
2509
|
+
},
|
|
2510
|
+
lyrics: {
|
|
2511
|
+
multiple: !0,
|
|
2512
|
+
unique: !1
|
|
2513
|
+
},
|
|
2514
|
+
albumsort: {
|
|
2515
|
+
multiple: !1,
|
|
2516
|
+
unique: !0
|
|
2517
|
+
},
|
|
2518
|
+
titlesort: {
|
|
2519
|
+
multiple: !1,
|
|
2520
|
+
unique: !0
|
|
2521
|
+
},
|
|
2522
|
+
work: {
|
|
2523
|
+
multiple: !1,
|
|
2524
|
+
unique: !0
|
|
2525
|
+
},
|
|
2526
|
+
artistsort: {
|
|
2527
|
+
multiple: !1,
|
|
2528
|
+
unique: !0
|
|
2529
|
+
},
|
|
2530
|
+
albumartistsort: {
|
|
2531
|
+
multiple: !1,
|
|
2532
|
+
unique: !0
|
|
2533
|
+
},
|
|
2534
|
+
composersort: {
|
|
2535
|
+
multiple: !1,
|
|
2536
|
+
unique: !0
|
|
2537
|
+
},
|
|
2538
|
+
lyricist: {
|
|
2539
|
+
multiple: !0,
|
|
2540
|
+
unique: !0
|
|
2541
|
+
},
|
|
2542
|
+
writer: {
|
|
2543
|
+
multiple: !0,
|
|
2544
|
+
unique: !0
|
|
2545
|
+
},
|
|
2546
|
+
conductor: {
|
|
2547
|
+
multiple: !0,
|
|
2548
|
+
unique: !0
|
|
2549
|
+
},
|
|
2550
|
+
remixer: {
|
|
2551
|
+
multiple: !0,
|
|
2552
|
+
unique: !0
|
|
2553
|
+
},
|
|
2554
|
+
arranger: {
|
|
2555
|
+
multiple: !0,
|
|
2556
|
+
unique: !0
|
|
2557
|
+
},
|
|
2558
|
+
engineer: {
|
|
2559
|
+
multiple: !0,
|
|
2560
|
+
unique: !0
|
|
2561
|
+
},
|
|
2562
|
+
producer: {
|
|
2563
|
+
multiple: !0,
|
|
2564
|
+
unique: !0
|
|
2565
|
+
},
|
|
2566
|
+
technician: {
|
|
2567
|
+
multiple: !0,
|
|
2568
|
+
unique: !0
|
|
2569
|
+
},
|
|
2570
|
+
djmixer: {
|
|
2571
|
+
multiple: !0,
|
|
2572
|
+
unique: !0
|
|
2573
|
+
},
|
|
2574
|
+
mixer: {
|
|
2575
|
+
multiple: !0,
|
|
2576
|
+
unique: !0
|
|
2577
|
+
},
|
|
2578
|
+
label: {
|
|
2579
|
+
multiple: !0,
|
|
2580
|
+
unique: !0
|
|
2581
|
+
},
|
|
2582
|
+
grouping: q,
|
|
2583
|
+
subtitle: { multiple: !0 },
|
|
2584
|
+
discsubtitle: q,
|
|
2585
|
+
totaltracks: q,
|
|
2586
|
+
totaldiscs: q,
|
|
2587
|
+
compilation: q,
|
|
2588
|
+
rating: { multiple: !0 },
|
|
2589
|
+
bpm: q,
|
|
2590
|
+
mood: q,
|
|
2591
|
+
media: q,
|
|
2592
|
+
catalognumber: {
|
|
2593
|
+
multiple: !0,
|
|
2594
|
+
unique: !0
|
|
2595
|
+
},
|
|
2596
|
+
tvShow: q,
|
|
2597
|
+
tvShowSort: q,
|
|
2598
|
+
tvSeason: q,
|
|
2599
|
+
tvEpisode: q,
|
|
2600
|
+
tvEpisodeId: q,
|
|
2601
|
+
tvNetwork: q,
|
|
2602
|
+
podcast: q,
|
|
2603
|
+
podcasturl: q,
|
|
2604
|
+
releasestatus: q,
|
|
2605
|
+
releasetype: { multiple: !0 },
|
|
2606
|
+
releasecountry: q,
|
|
2607
|
+
script: q,
|
|
2608
|
+
language: q,
|
|
2609
|
+
copyright: q,
|
|
2610
|
+
license: q,
|
|
2611
|
+
encodedby: q,
|
|
2612
|
+
encodersettings: q,
|
|
2613
|
+
gapless: q,
|
|
2614
|
+
barcode: q,
|
|
2615
|
+
isrc: { multiple: !0 },
|
|
2616
|
+
asin: q,
|
|
2617
|
+
musicbrainz_recordingid: q,
|
|
2618
|
+
musicbrainz_trackid: q,
|
|
2619
|
+
musicbrainz_albumid: q,
|
|
2620
|
+
musicbrainz_artistid: { multiple: !0 },
|
|
2621
|
+
musicbrainz_albumartistid: { multiple: !0 },
|
|
2622
|
+
musicbrainz_releasegroupid: q,
|
|
2623
|
+
musicbrainz_workid: q,
|
|
2624
|
+
musicbrainz_trmid: q,
|
|
2625
|
+
musicbrainz_discid: q,
|
|
2626
|
+
acoustid_id: q,
|
|
2627
|
+
acoustid_fingerprint: q,
|
|
2628
|
+
musicip_puid: q,
|
|
2629
|
+
musicip_fingerprint: q,
|
|
2630
|
+
website: q,
|
|
2631
|
+
"performer:instrument": {
|
|
2632
|
+
multiple: !0,
|
|
2633
|
+
unique: !0
|
|
2634
|
+
},
|
|
2635
|
+
averageLevel: q,
|
|
2636
|
+
peakLevel: q,
|
|
2637
|
+
notes: {
|
|
2638
|
+
multiple: !0,
|
|
2639
|
+
unique: !1
|
|
2640
|
+
},
|
|
2641
|
+
key: q,
|
|
2642
|
+
originalalbum: q,
|
|
2643
|
+
originalartist: q,
|
|
2644
|
+
discogs_artist_id: {
|
|
2645
|
+
multiple: !0,
|
|
2646
|
+
unique: !0
|
|
2647
|
+
},
|
|
2648
|
+
discogs_release_id: q,
|
|
2649
|
+
discogs_label_id: q,
|
|
2650
|
+
discogs_master_release_id: q,
|
|
2651
|
+
discogs_votes: q,
|
|
2652
|
+
discogs_rating: q,
|
|
2653
|
+
replaygain_track_peak: q,
|
|
2654
|
+
replaygain_track_gain: q,
|
|
2655
|
+
replaygain_album_peak: q,
|
|
2656
|
+
replaygain_album_gain: q,
|
|
2657
|
+
replaygain_track_minmax: q,
|
|
2658
|
+
replaygain_album_minmax: q,
|
|
2659
|
+
replaygain_undo: q,
|
|
2660
|
+
description: { multiple: !0 },
|
|
2661
|
+
longDescription: q,
|
|
2662
|
+
category: { multiple: !0 },
|
|
2663
|
+
hdVideo: q,
|
|
2664
|
+
keywords: { multiple: !0 },
|
|
2665
|
+
movement: q,
|
|
2666
|
+
movementIndex: q,
|
|
2667
|
+
movementTotal: q,
|
|
2668
|
+
podcastId: q,
|
|
2669
|
+
showMovement: q,
|
|
2670
|
+
stik: q,
|
|
2671
|
+
playCounter: q
|
|
2672
|
+
};
|
|
2673
|
+
function ft(e) {
|
|
2674
|
+
return J[e] && !J[e].multiple;
|
|
2675
|
+
}
|
|
2676
|
+
function pt(e) {
|
|
2677
|
+
return !J[e].multiple || J[e].unique || !1;
|
|
2678
|
+
}
|
|
2679
|
+
//#endregion
|
|
2680
|
+
//#region node_modules/music-metadata/lib/common/GenericTagMapper.js
|
|
2681
|
+
var Y = class {
|
|
2682
|
+
static toIntOrNull(e) {
|
|
2683
|
+
let t = Number.parseInt(e, 10);
|
|
2684
|
+
return Number.isNaN(t) ? null : t;
|
|
2685
|
+
}
|
|
2686
|
+
static normalizeTrack(e) {
|
|
2687
|
+
let t = e.toString().split("/");
|
|
2688
|
+
return {
|
|
2689
|
+
no: Number.parseInt(t[0], 10) || null,
|
|
2690
|
+
of: Number.parseInt(t[1], 10) || null
|
|
2691
|
+
};
|
|
2692
|
+
}
|
|
2693
|
+
constructor(e, t) {
|
|
2694
|
+
this.tagTypes = e, this.tagMap = t;
|
|
2695
|
+
}
|
|
2696
|
+
mapGenericTag(e, t) {
|
|
2697
|
+
e = {
|
|
2698
|
+
id: e.id,
|
|
2699
|
+
value: e.value
|
|
2700
|
+
}, this.postMap(e, t);
|
|
2701
|
+
let n = this.getCommonName(e.id);
|
|
2702
|
+
return n ? {
|
|
2703
|
+
id: n,
|
|
2704
|
+
value: e.value
|
|
2705
|
+
} : null;
|
|
2706
|
+
}
|
|
2707
|
+
getCommonName(e) {
|
|
2708
|
+
return this.tagMap[e];
|
|
2709
|
+
}
|
|
2710
|
+
postMap(e, t) {}
|
|
2711
|
+
};
|
|
2712
|
+
Y.maxRatingScore = 1;
|
|
2713
|
+
//#endregion
|
|
2714
|
+
//#region node_modules/music-metadata/lib/id3v1/ID3v1TagMap.js
|
|
2715
|
+
var mt = {
|
|
2716
|
+
title: "title",
|
|
2717
|
+
artist: "artist",
|
|
2718
|
+
album: "album",
|
|
2719
|
+
year: "year",
|
|
2720
|
+
comment: "comment",
|
|
2721
|
+
track: "track",
|
|
2722
|
+
genre: "genre"
|
|
2723
|
+
}, ht = class extends Y {
|
|
2724
|
+
constructor() {
|
|
2725
|
+
super(["ID3v1"], mt);
|
|
2726
|
+
}
|
|
2727
|
+
}, X = class extends Y {
|
|
2728
|
+
constructor(e, t) {
|
|
2729
|
+
let n = {};
|
|
2730
|
+
for (let e of Object.keys(t)) n[e.toUpperCase()] = t[e];
|
|
2731
|
+
super(e, n);
|
|
2732
|
+
}
|
|
2733
|
+
getCommonName(e) {
|
|
2734
|
+
return this.tagMap[e.toUpperCase()];
|
|
2735
|
+
}
|
|
2736
|
+
}, gt = {
|
|
2737
|
+
TIT2: "title",
|
|
2738
|
+
TPE1: "artist",
|
|
2739
|
+
"TXXX:Artists": "artists",
|
|
2740
|
+
TPE2: "albumartist",
|
|
2741
|
+
TALB: "album",
|
|
2742
|
+
TDRV: "date",
|
|
2743
|
+
TORY: "originalyear",
|
|
2744
|
+
TPOS: "disk",
|
|
2745
|
+
TCON: "genre",
|
|
2746
|
+
APIC: "picture",
|
|
2747
|
+
TCOM: "composer",
|
|
2748
|
+
USLT: "lyrics",
|
|
2749
|
+
TSOA: "albumsort",
|
|
2750
|
+
TSOT: "titlesort",
|
|
2751
|
+
TOAL: "originalalbum",
|
|
2752
|
+
TSOP: "artistsort",
|
|
2753
|
+
TSO2: "albumartistsort",
|
|
2754
|
+
TSOC: "composersort",
|
|
2755
|
+
TEXT: "lyricist",
|
|
2756
|
+
"TXXX:Writer": "writer",
|
|
2757
|
+
TPE3: "conductor",
|
|
2758
|
+
TPE4: "remixer",
|
|
2759
|
+
"IPLS:arranger": "arranger",
|
|
2760
|
+
"IPLS:engineer": "engineer",
|
|
2761
|
+
"IPLS:producer": "producer",
|
|
2762
|
+
"IPLS:DJ-mix": "djmixer",
|
|
2763
|
+
"IPLS:mix": "mixer",
|
|
2764
|
+
TPUB: "label",
|
|
2765
|
+
TIT1: "grouping",
|
|
2766
|
+
TIT3: "subtitle",
|
|
2767
|
+
TRCK: "track",
|
|
2768
|
+
TCMP: "compilation",
|
|
2769
|
+
POPM: "rating",
|
|
2770
|
+
TBPM: "bpm",
|
|
2771
|
+
TMED: "media",
|
|
2772
|
+
"TXXX:CATALOGNUMBER": "catalognumber",
|
|
2773
|
+
"TXXX:MusicBrainz Album Status": "releasestatus",
|
|
2774
|
+
"TXXX:MusicBrainz Album Type": "releasetype",
|
|
2775
|
+
"TXXX:MusicBrainz Album Release Country": "releasecountry",
|
|
2776
|
+
"TXXX:RELEASECOUNTRY": "releasecountry",
|
|
2777
|
+
"TXXX:SCRIPT": "script",
|
|
2778
|
+
TLAN: "language",
|
|
2779
|
+
TCOP: "copyright",
|
|
2780
|
+
WCOP: "license",
|
|
2781
|
+
TENC: "encodedby",
|
|
2782
|
+
TSSE: "encodersettings",
|
|
2783
|
+
"TXXX:BARCODE": "barcode",
|
|
2784
|
+
"TXXX:ISRC": "isrc",
|
|
2785
|
+
TSRC: "isrc",
|
|
2786
|
+
"TXXX:ASIN": "asin",
|
|
2787
|
+
"TXXX:originalyear": "originalyear",
|
|
2788
|
+
"UFID:http://musicbrainz.org": "musicbrainz_recordingid",
|
|
2789
|
+
"TXXX:MusicBrainz Release Track Id": "musicbrainz_trackid",
|
|
2790
|
+
"TXXX:MusicBrainz Album Id": "musicbrainz_albumid",
|
|
2791
|
+
"TXXX:MusicBrainz Artist Id": "musicbrainz_artistid",
|
|
2792
|
+
"TXXX:MusicBrainz Album Artist Id": "musicbrainz_albumartistid",
|
|
2793
|
+
"TXXX:MusicBrainz Release Group Id": "musicbrainz_releasegroupid",
|
|
2794
|
+
"TXXX:MusicBrainz Work Id": "musicbrainz_workid",
|
|
2795
|
+
"TXXX:MusicBrainz TRM Id": "musicbrainz_trmid",
|
|
2796
|
+
"TXXX:MusicBrainz Disc Id": "musicbrainz_discid",
|
|
2797
|
+
"TXXX:ACOUSTID_ID": "acoustid_id",
|
|
2798
|
+
"TXXX:Acoustid Id": "acoustid_id",
|
|
2799
|
+
"TXXX:Acoustid Fingerprint": "acoustid_fingerprint",
|
|
2800
|
+
"TXXX:MusicIP PUID": "musicip_puid",
|
|
2801
|
+
"TXXX:MusicMagic Fingerprint": "musicip_fingerprint",
|
|
2802
|
+
WOAR: "website",
|
|
2803
|
+
TDRC: "date",
|
|
2804
|
+
TYER: "year",
|
|
2805
|
+
TDOR: "originaldate",
|
|
2806
|
+
"TIPL:arranger": "arranger",
|
|
2807
|
+
"TIPL:engineer": "engineer",
|
|
2808
|
+
"TIPL:producer": "producer",
|
|
2809
|
+
"TIPL:DJ-mix": "djmixer",
|
|
2810
|
+
"TIPL:mix": "mixer",
|
|
2811
|
+
TMOO: "mood",
|
|
2812
|
+
SYLT: "lyrics",
|
|
2813
|
+
TSST: "discsubtitle",
|
|
2814
|
+
TKEY: "key",
|
|
2815
|
+
COMM: "comment",
|
|
2816
|
+
TOPE: "originalartist",
|
|
2817
|
+
"PRIV:AverageLevel": "averageLevel",
|
|
2818
|
+
"PRIV:PeakLevel": "peakLevel",
|
|
2819
|
+
"TXXX:DISCOGS_ARTIST_ID": "discogs_artist_id",
|
|
2820
|
+
"TXXX:DISCOGS_ARTISTS": "artists",
|
|
2821
|
+
"TXXX:DISCOGS_ARTIST_NAME": "artists",
|
|
2822
|
+
"TXXX:DISCOGS_ALBUM_ARTISTS": "albumartist",
|
|
2823
|
+
"TXXX:DISCOGS_CATALOG": "catalognumber",
|
|
2824
|
+
"TXXX:DISCOGS_COUNTRY": "releasecountry",
|
|
2825
|
+
"TXXX:DISCOGS_DATE": "originaldate",
|
|
2826
|
+
"TXXX:DISCOGS_LABEL": "label",
|
|
2827
|
+
"TXXX:DISCOGS_LABEL_ID": "discogs_label_id",
|
|
2828
|
+
"TXXX:DISCOGS_MASTER_RELEASE_ID": "discogs_master_release_id",
|
|
2829
|
+
"TXXX:DISCOGS_RATING": "discogs_rating",
|
|
2830
|
+
"TXXX:DISCOGS_RELEASED": "date",
|
|
2831
|
+
"TXXX:DISCOGS_RELEASE_ID": "discogs_release_id",
|
|
2832
|
+
"TXXX:DISCOGS_VOTES": "discogs_votes",
|
|
2833
|
+
"TXXX:CATALOGID": "catalognumber",
|
|
2834
|
+
"TXXX:STYLE": "genre",
|
|
2835
|
+
"TXXX:REPLAYGAIN_TRACK_PEAK": "replaygain_track_peak",
|
|
2836
|
+
"TXXX:REPLAYGAIN_TRACK_GAIN": "replaygain_track_gain",
|
|
2837
|
+
"TXXX:REPLAYGAIN_ALBUM_PEAK": "replaygain_album_peak",
|
|
2838
|
+
"TXXX:REPLAYGAIN_ALBUM_GAIN": "replaygain_album_gain",
|
|
2839
|
+
"TXXX:MP3GAIN_MINMAX": "replaygain_track_minmax",
|
|
2840
|
+
"TXXX:MP3GAIN_ALBUM_MINMAX": "replaygain_album_minmax",
|
|
2841
|
+
"TXXX:MP3GAIN_UNDO": "replaygain_undo",
|
|
2842
|
+
MVNM: "movement",
|
|
2843
|
+
MVIN: "movementIndex",
|
|
2844
|
+
PCST: "podcast",
|
|
2845
|
+
TCAT: "category",
|
|
2846
|
+
TDES: "description",
|
|
2847
|
+
TDRL: "releasedate",
|
|
2848
|
+
TGID: "podcastId",
|
|
2849
|
+
TKWD: "keywords",
|
|
2850
|
+
WFED: "podcasturl",
|
|
2851
|
+
GRP1: "grouping",
|
|
2852
|
+
PCNT: "playCounter"
|
|
2853
|
+
}, _t = class e extends X {
|
|
2854
|
+
static toRating(e) {
|
|
2855
|
+
return {
|
|
2856
|
+
source: e.email,
|
|
2857
|
+
rating: e.rating > 0 ? (e.rating - 1) / 254 * Y.maxRatingScore : void 0
|
|
2858
|
+
};
|
|
2859
|
+
}
|
|
2860
|
+
constructor() {
|
|
2861
|
+
super(["ID3v2.3", "ID3v2.4"], gt);
|
|
2862
|
+
}
|
|
2863
|
+
postMap(t, n) {
|
|
2864
|
+
switch (t.id) {
|
|
2865
|
+
case "UFID":
|
|
2866
|
+
{
|
|
2867
|
+
let e = t.value;
|
|
2868
|
+
e.owner_identifier === "http://musicbrainz.org" && (t.id += `:${e.owner_identifier}`, t.value = ae(e.identifier, "latin1"));
|
|
2869
|
+
}
|
|
2870
|
+
break;
|
|
2871
|
+
case "PRIV":
|
|
2872
|
+
{
|
|
2873
|
+
let e = t.value;
|
|
2874
|
+
switch (e.owner_identifier) {
|
|
2875
|
+
case "AverageLevel":
|
|
2876
|
+
case "PeakValue":
|
|
2877
|
+
t.id += `:${e.owner_identifier}`, t.value = e.data.length === 4 ? m.get(e.data, 0) : null, t.value === null && n.addWarning("Failed to parse PRIV:PeakValue");
|
|
2878
|
+
break;
|
|
2879
|
+
default: n.addWarning(`Unknown PRIV owner-identifier: ${e.data}`);
|
|
2880
|
+
}
|
|
2881
|
+
}
|
|
2882
|
+
break;
|
|
2883
|
+
case "POPM":
|
|
2884
|
+
t.value = e.toRating(t.value);
|
|
2885
|
+
break;
|
|
2886
|
+
default: break;
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
}, vt = {
|
|
2890
|
+
Title: "title",
|
|
2891
|
+
Author: "artist",
|
|
2892
|
+
"WM/AlbumArtist": "albumartist",
|
|
2893
|
+
"WM/AlbumTitle": "album",
|
|
2894
|
+
"WM/Year": "date",
|
|
2895
|
+
"WM/OriginalReleaseTime": "originaldate",
|
|
2896
|
+
"WM/OriginalReleaseYear": "originalyear",
|
|
2897
|
+
Description: "comment",
|
|
2898
|
+
"WM/TrackNumber": "track",
|
|
2899
|
+
"WM/PartOfSet": "disk",
|
|
2900
|
+
"WM/Genre": "genre",
|
|
2901
|
+
"WM/Composer": "composer",
|
|
2902
|
+
"WM/Lyrics": "lyrics",
|
|
2903
|
+
"WM/AlbumSortOrder": "albumsort",
|
|
2904
|
+
"WM/TitleSortOrder": "titlesort",
|
|
2905
|
+
"WM/ArtistSortOrder": "artistsort",
|
|
2906
|
+
"WM/AlbumArtistSortOrder": "albumartistsort",
|
|
2907
|
+
"WM/ComposerSortOrder": "composersort",
|
|
2908
|
+
"WM/Writer": "lyricist",
|
|
2909
|
+
"WM/Conductor": "conductor",
|
|
2910
|
+
"WM/ModifiedBy": "remixer",
|
|
2911
|
+
"WM/Engineer": "engineer",
|
|
2912
|
+
"WM/Producer": "producer",
|
|
2913
|
+
"WM/DJMixer": "djmixer",
|
|
2914
|
+
"WM/Mixer": "mixer",
|
|
2915
|
+
"WM/Publisher": "label",
|
|
2916
|
+
"WM/ContentGroupDescription": "grouping",
|
|
2917
|
+
"WM/SubTitle": "subtitle",
|
|
2918
|
+
"WM/SetSubTitle": "discsubtitle",
|
|
2919
|
+
"WM/IsCompilation": "compilation",
|
|
2920
|
+
"WM/SharedUserRating": "rating",
|
|
2921
|
+
"WM/BeatsPerMinute": "bpm",
|
|
2922
|
+
"WM/Mood": "mood",
|
|
2923
|
+
"WM/Media": "media",
|
|
2924
|
+
"WM/CatalogNo": "catalognumber",
|
|
2925
|
+
"MusicBrainz/Album Status": "releasestatus",
|
|
2926
|
+
"MusicBrainz/Album Type": "releasetype",
|
|
2927
|
+
"MusicBrainz/Album Release Country": "releasecountry",
|
|
2928
|
+
"WM/Script": "script",
|
|
2929
|
+
"WM/Language": "language",
|
|
2930
|
+
Copyright: "copyright",
|
|
2931
|
+
LICENSE: "license",
|
|
2932
|
+
"WM/EncodedBy": "encodedby",
|
|
2933
|
+
"WM/EncodingSettings": "encodersettings",
|
|
2934
|
+
"WM/Barcode": "barcode",
|
|
2935
|
+
"WM/ISRC": "isrc",
|
|
2936
|
+
"MusicBrainz/Track Id": "musicbrainz_recordingid",
|
|
2937
|
+
"MusicBrainz/Release Track Id": "musicbrainz_trackid",
|
|
2938
|
+
"MusicBrainz/Album Id": "musicbrainz_albumid",
|
|
2939
|
+
"MusicBrainz/Artist Id": "musicbrainz_artistid",
|
|
2940
|
+
"MusicBrainz/Album Artist Id": "musicbrainz_albumartistid",
|
|
2941
|
+
"MusicBrainz/Release Group Id": "musicbrainz_releasegroupid",
|
|
2942
|
+
"MusicBrainz/Work Id": "musicbrainz_workid",
|
|
2943
|
+
"MusicBrainz/TRM Id": "musicbrainz_trmid",
|
|
2944
|
+
"MusicBrainz/Disc Id": "musicbrainz_discid",
|
|
2945
|
+
"Acoustid/Id": "acoustid_id",
|
|
2946
|
+
"Acoustid/Fingerprint": "acoustid_fingerprint",
|
|
2947
|
+
"MusicIP/PUID": "musicip_puid",
|
|
2948
|
+
"WM/ARTISTS": "artists",
|
|
2949
|
+
"WM/InitialKey": "key",
|
|
2950
|
+
ASIN: "asin",
|
|
2951
|
+
"WM/Work": "work",
|
|
2952
|
+
"WM/AuthorURL": "website",
|
|
2953
|
+
"WM/Picture": "picture"
|
|
2954
|
+
}, yt = class e extends Y {
|
|
2955
|
+
static toRating(e) {
|
|
2956
|
+
return { rating: Number.parseFloat(e + 1) / 5 };
|
|
2957
|
+
}
|
|
2958
|
+
constructor() {
|
|
2959
|
+
super(["asf"], vt);
|
|
2960
|
+
}
|
|
2961
|
+
postMap(t) {
|
|
2962
|
+
switch (t.id) {
|
|
2963
|
+
case "WM/SharedUserRating": {
|
|
2964
|
+
let n = t.id.split(":");
|
|
2965
|
+
t.value = e.toRating(t.value), t.id = n[0];
|
|
2966
|
+
break;
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
}
|
|
2970
|
+
}, bt = {
|
|
2971
|
+
TT2: "title",
|
|
2972
|
+
TP1: "artist",
|
|
2973
|
+
TP2: "albumartist",
|
|
2974
|
+
TAL: "album",
|
|
2975
|
+
TYE: "year",
|
|
2976
|
+
COM: "comment",
|
|
2977
|
+
TRK: "track",
|
|
2978
|
+
TPA: "disk",
|
|
2979
|
+
TCO: "genre",
|
|
2980
|
+
PIC: "picture",
|
|
2981
|
+
TCM: "composer",
|
|
2982
|
+
TOR: "originaldate",
|
|
2983
|
+
TOT: "originalalbum",
|
|
2984
|
+
TXT: "lyricist",
|
|
2985
|
+
TP3: "conductor",
|
|
2986
|
+
TPB: "label",
|
|
2987
|
+
TT1: "grouping",
|
|
2988
|
+
TT3: "subtitle",
|
|
2989
|
+
TLA: "language",
|
|
2990
|
+
TCR: "copyright",
|
|
2991
|
+
WCP: "license",
|
|
2992
|
+
TEN: "encodedby",
|
|
2993
|
+
TSS: "encodersettings",
|
|
2994
|
+
WAR: "website",
|
|
2995
|
+
PCS: "podcast",
|
|
2996
|
+
TCP: "compilation",
|
|
2997
|
+
TDR: "date",
|
|
2998
|
+
TS2: "albumartistsort",
|
|
2999
|
+
TSA: "albumsort",
|
|
3000
|
+
TSC: "composersort",
|
|
3001
|
+
TSP: "artistsort",
|
|
3002
|
+
TST: "titlesort",
|
|
3003
|
+
WFD: "podcasturl",
|
|
3004
|
+
TBP: "bpm",
|
|
3005
|
+
GP1: "grouping"
|
|
3006
|
+
}, xt = class extends X {
|
|
3007
|
+
constructor() {
|
|
3008
|
+
super(["ID3v2.2"], bt);
|
|
3009
|
+
}
|
|
3010
|
+
}, St = {
|
|
3011
|
+
Title: "title",
|
|
3012
|
+
Artist: "artist",
|
|
3013
|
+
Artists: "artists",
|
|
3014
|
+
"Album Artist": "albumartist",
|
|
3015
|
+
Album: "album",
|
|
3016
|
+
Year: "date",
|
|
3017
|
+
Originalyear: "originalyear",
|
|
3018
|
+
Originaldate: "originaldate",
|
|
3019
|
+
Releasedate: "releasedate",
|
|
3020
|
+
Comment: "comment",
|
|
3021
|
+
Track: "track",
|
|
3022
|
+
Disc: "disk",
|
|
3023
|
+
DISCNUMBER: "disk",
|
|
3024
|
+
Genre: "genre",
|
|
3025
|
+
"Cover Art (Front)": "picture",
|
|
3026
|
+
"Cover Art (Back)": "picture",
|
|
3027
|
+
Composer: "composer",
|
|
3028
|
+
Lyrics: "lyrics",
|
|
3029
|
+
ALBUMSORT: "albumsort",
|
|
3030
|
+
TITLESORT: "titlesort",
|
|
3031
|
+
WORK: "work",
|
|
3032
|
+
ARTISTSORT: "artistsort",
|
|
3033
|
+
ALBUMARTISTSORT: "albumartistsort",
|
|
3034
|
+
COMPOSERSORT: "composersort",
|
|
3035
|
+
Lyricist: "lyricist",
|
|
3036
|
+
Writer: "writer",
|
|
3037
|
+
Conductor: "conductor",
|
|
3038
|
+
MixArtist: "remixer",
|
|
3039
|
+
Arranger: "arranger",
|
|
3040
|
+
Engineer: "engineer",
|
|
3041
|
+
Producer: "producer",
|
|
3042
|
+
DJMixer: "djmixer",
|
|
3043
|
+
Mixer: "mixer",
|
|
3044
|
+
Label: "label",
|
|
3045
|
+
Grouping: "grouping",
|
|
3046
|
+
Subtitle: "subtitle",
|
|
3047
|
+
DiscSubtitle: "discsubtitle",
|
|
3048
|
+
Compilation: "compilation",
|
|
3049
|
+
BPM: "bpm",
|
|
3050
|
+
Mood: "mood",
|
|
3051
|
+
Media: "media",
|
|
3052
|
+
CatalogNumber: "catalognumber",
|
|
3053
|
+
MUSICBRAINZ_ALBUMSTATUS: "releasestatus",
|
|
3054
|
+
MUSICBRAINZ_ALBUMTYPE: "releasetype",
|
|
3055
|
+
RELEASECOUNTRY: "releasecountry",
|
|
3056
|
+
Script: "script",
|
|
3057
|
+
Language: "language",
|
|
3058
|
+
Copyright: "copyright",
|
|
3059
|
+
LICENSE: "license",
|
|
3060
|
+
EncodedBy: "encodedby",
|
|
3061
|
+
EncoderSettings: "encodersettings",
|
|
3062
|
+
Barcode: "barcode",
|
|
3063
|
+
ISRC: "isrc",
|
|
3064
|
+
ASIN: "asin",
|
|
3065
|
+
musicbrainz_trackid: "musicbrainz_recordingid",
|
|
3066
|
+
musicbrainz_releasetrackid: "musicbrainz_trackid",
|
|
3067
|
+
MUSICBRAINZ_ALBUMID: "musicbrainz_albumid",
|
|
3068
|
+
MUSICBRAINZ_ARTISTID: "musicbrainz_artistid",
|
|
3069
|
+
MUSICBRAINZ_ALBUMARTISTID: "musicbrainz_albumartistid",
|
|
3070
|
+
MUSICBRAINZ_RELEASEGROUPID: "musicbrainz_releasegroupid",
|
|
3071
|
+
MUSICBRAINZ_WORKID: "musicbrainz_workid",
|
|
3072
|
+
MUSICBRAINZ_TRMID: "musicbrainz_trmid",
|
|
3073
|
+
MUSICBRAINZ_DISCID: "musicbrainz_discid",
|
|
3074
|
+
Acoustid_Id: "acoustid_id",
|
|
3075
|
+
ACOUSTID_FINGERPRINT: "acoustid_fingerprint",
|
|
3076
|
+
MUSICIP_PUID: "musicip_puid",
|
|
3077
|
+
Weblink: "website",
|
|
3078
|
+
REPLAYGAIN_TRACK_GAIN: "replaygain_track_gain",
|
|
3079
|
+
REPLAYGAIN_TRACK_PEAK: "replaygain_track_peak",
|
|
3080
|
+
MP3GAIN_MINMAX: "replaygain_track_minmax",
|
|
3081
|
+
MP3GAIN_UNDO: "replaygain_undo"
|
|
3082
|
+
}, Ct = class extends X {
|
|
3083
|
+
constructor() {
|
|
3084
|
+
super(["APEv2"], St);
|
|
3085
|
+
}
|
|
3086
|
+
}, wt = {
|
|
3087
|
+
"©nam": "title",
|
|
3088
|
+
"©ART": "artist",
|
|
3089
|
+
aART: "albumartist",
|
|
3090
|
+
"----:com.apple.iTunes:Band": "albumartist",
|
|
3091
|
+
"©alb": "album",
|
|
3092
|
+
"©day": "date",
|
|
3093
|
+
"©cmt": "comment",
|
|
3094
|
+
"©com": "comment",
|
|
3095
|
+
trkn: "track",
|
|
3096
|
+
disk: "disk",
|
|
3097
|
+
"©gen": "genre",
|
|
3098
|
+
covr: "picture",
|
|
3099
|
+
"©wrt": "composer",
|
|
3100
|
+
"©lyr": "lyrics",
|
|
3101
|
+
soal: "albumsort",
|
|
3102
|
+
sonm: "titlesort",
|
|
3103
|
+
soar: "artistsort",
|
|
3104
|
+
soaa: "albumartistsort",
|
|
3105
|
+
soco: "composersort",
|
|
3106
|
+
"----:com.apple.iTunes:LYRICIST": "lyricist",
|
|
3107
|
+
"----:com.apple.iTunes:CONDUCTOR": "conductor",
|
|
3108
|
+
"----:com.apple.iTunes:REMIXER": "remixer",
|
|
3109
|
+
"----:com.apple.iTunes:ENGINEER": "engineer",
|
|
3110
|
+
"----:com.apple.iTunes:PRODUCER": "producer",
|
|
3111
|
+
"----:com.apple.iTunes:DJMIXER": "djmixer",
|
|
3112
|
+
"----:com.apple.iTunes:MIXER": "mixer",
|
|
3113
|
+
"----:com.apple.iTunes:LABEL": "label",
|
|
3114
|
+
"©grp": "grouping",
|
|
3115
|
+
"----:com.apple.iTunes:SUBTITLE": "subtitle",
|
|
3116
|
+
"----:com.apple.iTunes:DISCSUBTITLE": "discsubtitle",
|
|
3117
|
+
cpil: "compilation",
|
|
3118
|
+
tmpo: "bpm",
|
|
3119
|
+
"----:com.apple.iTunes:MOOD": "mood",
|
|
3120
|
+
"----:com.apple.iTunes:MEDIA": "media",
|
|
3121
|
+
"----:com.apple.iTunes:CATALOGNUMBER": "catalognumber",
|
|
3122
|
+
tvsh: "tvShow",
|
|
3123
|
+
tvsn: "tvSeason",
|
|
3124
|
+
tves: "tvEpisode",
|
|
3125
|
+
sosn: "tvShowSort",
|
|
3126
|
+
tven: "tvEpisodeId",
|
|
3127
|
+
tvnn: "tvNetwork",
|
|
3128
|
+
pcst: "podcast",
|
|
3129
|
+
purl: "podcasturl",
|
|
3130
|
+
"----:com.apple.iTunes:MusicBrainz Album Status": "releasestatus",
|
|
3131
|
+
"----:com.apple.iTunes:MusicBrainz Album Type": "releasetype",
|
|
3132
|
+
"----:com.apple.iTunes:MusicBrainz Album Release Country": "releasecountry",
|
|
3133
|
+
"----:com.apple.iTunes:SCRIPT": "script",
|
|
3134
|
+
"----:com.apple.iTunes:LANGUAGE": "language",
|
|
3135
|
+
cprt: "copyright",
|
|
3136
|
+
"©cpy": "copyright",
|
|
3137
|
+
"----:com.apple.iTunes:LICENSE": "license",
|
|
3138
|
+
"©too": "encodedby",
|
|
3139
|
+
pgap: "gapless",
|
|
3140
|
+
"----:com.apple.iTunes:BARCODE": "barcode",
|
|
3141
|
+
"----:com.apple.iTunes:ISRC": "isrc",
|
|
3142
|
+
"----:com.apple.iTunes:ASIN": "asin",
|
|
3143
|
+
"----:com.apple.iTunes:NOTES": "comment",
|
|
3144
|
+
"----:com.apple.iTunes:MusicBrainz Track Id": "musicbrainz_recordingid",
|
|
3145
|
+
"----:com.apple.iTunes:MusicBrainz Release Track Id": "musicbrainz_trackid",
|
|
3146
|
+
"----:com.apple.iTunes:MusicBrainz Album Id": "musicbrainz_albumid",
|
|
3147
|
+
"----:com.apple.iTunes:MusicBrainz Artist Id": "musicbrainz_artistid",
|
|
3148
|
+
"----:com.apple.iTunes:MusicBrainz Album Artist Id": "musicbrainz_albumartistid",
|
|
3149
|
+
"----:com.apple.iTunes:MusicBrainz Release Group Id": "musicbrainz_releasegroupid",
|
|
3150
|
+
"----:com.apple.iTunes:MusicBrainz Work Id": "musicbrainz_workid",
|
|
3151
|
+
"----:com.apple.iTunes:MusicBrainz TRM Id": "musicbrainz_trmid",
|
|
3152
|
+
"----:com.apple.iTunes:MusicBrainz Disc Id": "musicbrainz_discid",
|
|
3153
|
+
"----:com.apple.iTunes:Acoustid Id": "acoustid_id",
|
|
3154
|
+
"----:com.apple.iTunes:Acoustid Fingerprint": "acoustid_fingerprint",
|
|
3155
|
+
"----:com.apple.iTunes:MusicIP PUID": "musicip_puid",
|
|
3156
|
+
"----:com.apple.iTunes:fingerprint": "musicip_fingerprint",
|
|
3157
|
+
"----:com.apple.iTunes:replaygain_track_gain": "replaygain_track_gain",
|
|
3158
|
+
"----:com.apple.iTunes:replaygain_track_peak": "replaygain_track_peak",
|
|
3159
|
+
"----:com.apple.iTunes:replaygain_album_gain": "replaygain_album_gain",
|
|
3160
|
+
"----:com.apple.iTunes:replaygain_album_peak": "replaygain_album_peak",
|
|
3161
|
+
"----:com.apple.iTunes:replaygain_track_minmax": "replaygain_track_minmax",
|
|
3162
|
+
"----:com.apple.iTunes:replaygain_album_minmax": "replaygain_album_minmax",
|
|
3163
|
+
"----:com.apple.iTunes:replaygain_undo": "replaygain_undo",
|
|
3164
|
+
gnre: "genre",
|
|
3165
|
+
"----:com.apple.iTunes:ALBUMARTISTSORT": "albumartistsort",
|
|
3166
|
+
"----:com.apple.iTunes:ARTISTS": "artists",
|
|
3167
|
+
"----:com.apple.iTunes:ORIGINALDATE": "originaldate",
|
|
3168
|
+
"----:com.apple.iTunes:ORIGINALYEAR": "originalyear",
|
|
3169
|
+
"----:com.apple.iTunes:RELEASEDATE": "releasedate",
|
|
3170
|
+
desc: "description",
|
|
3171
|
+
ldes: "longDescription",
|
|
3172
|
+
"©mvn": "movement",
|
|
3173
|
+
"©mvi": "movementIndex",
|
|
3174
|
+
"©mvc": "movementTotal",
|
|
3175
|
+
"©wrk": "work",
|
|
3176
|
+
catg: "category",
|
|
3177
|
+
egid: "podcastId",
|
|
3178
|
+
hdvd: "hdVideo",
|
|
3179
|
+
keyw: "keywords",
|
|
3180
|
+
shwm: "showMovement",
|
|
3181
|
+
stik: "stik",
|
|
3182
|
+
rate: "rating"
|
|
3183
|
+
}, Tt = "iTunes", Et = class extends X {
|
|
3184
|
+
constructor() {
|
|
3185
|
+
super([Tt], wt);
|
|
3186
|
+
}
|
|
3187
|
+
postMap(e, t) {
|
|
3188
|
+
switch (e.id) {
|
|
3189
|
+
case "rate":
|
|
3190
|
+
e.value = {
|
|
3191
|
+
source: void 0,
|
|
3192
|
+
rating: Number.parseFloat(e.value) / 100
|
|
3193
|
+
};
|
|
3194
|
+
break;
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3197
|
+
}, Dt = {
|
|
3198
|
+
TITLE: "title",
|
|
3199
|
+
ARTIST: "artist",
|
|
3200
|
+
ARTISTS: "artists",
|
|
3201
|
+
ALBUMARTIST: "albumartist",
|
|
3202
|
+
"ALBUM ARTIST": "albumartist",
|
|
3203
|
+
ALBUM: "album",
|
|
3204
|
+
DATE: "date",
|
|
3205
|
+
ORIGINALDATE: "originaldate",
|
|
3206
|
+
ORIGINALYEAR: "originalyear",
|
|
3207
|
+
RELEASEDATE: "releasedate",
|
|
3208
|
+
COMMENT: "comment",
|
|
3209
|
+
TRACKNUMBER: "track",
|
|
3210
|
+
DISCNUMBER: "disk",
|
|
3211
|
+
GENRE: "genre",
|
|
3212
|
+
METADATA_BLOCK_PICTURE: "picture",
|
|
3213
|
+
COMPOSER: "composer",
|
|
3214
|
+
LYRICS: "lyrics",
|
|
3215
|
+
ALBUMSORT: "albumsort",
|
|
3216
|
+
TITLESORT: "titlesort",
|
|
3217
|
+
WORK: "work",
|
|
3218
|
+
ARTISTSORT: "artistsort",
|
|
3219
|
+
ALBUMARTISTSORT: "albumartistsort",
|
|
3220
|
+
COMPOSERSORT: "composersort",
|
|
3221
|
+
LYRICIST: "lyricist",
|
|
3222
|
+
WRITER: "writer",
|
|
3223
|
+
CONDUCTOR: "conductor",
|
|
3224
|
+
REMIXER: "remixer",
|
|
3225
|
+
ARRANGER: "arranger",
|
|
3226
|
+
ENGINEER: "engineer",
|
|
3227
|
+
PRODUCER: "producer",
|
|
3228
|
+
DJMIXER: "djmixer",
|
|
3229
|
+
MIXER: "mixer",
|
|
3230
|
+
LABEL: "label",
|
|
3231
|
+
GROUPING: "grouping",
|
|
3232
|
+
SUBTITLE: "subtitle",
|
|
3233
|
+
DISCSUBTITLE: "discsubtitle",
|
|
3234
|
+
TRACKTOTAL: "totaltracks",
|
|
3235
|
+
DISCTOTAL: "totaldiscs",
|
|
3236
|
+
COMPILATION: "compilation",
|
|
3237
|
+
RATING: "rating",
|
|
3238
|
+
BPM: "bpm",
|
|
3239
|
+
KEY: "key",
|
|
3240
|
+
MOOD: "mood",
|
|
3241
|
+
MEDIA: "media",
|
|
3242
|
+
CATALOGNUMBER: "catalognumber",
|
|
3243
|
+
RELEASESTATUS: "releasestatus",
|
|
3244
|
+
RELEASETYPE: "releasetype",
|
|
3245
|
+
RELEASECOUNTRY: "releasecountry",
|
|
3246
|
+
SCRIPT: "script",
|
|
3247
|
+
LANGUAGE: "language",
|
|
3248
|
+
COPYRIGHT: "copyright",
|
|
3249
|
+
LICENSE: "license",
|
|
3250
|
+
ENCODEDBY: "encodedby",
|
|
3251
|
+
ENCODERSETTINGS: "encodersettings",
|
|
3252
|
+
BARCODE: "barcode",
|
|
3253
|
+
ISRC: "isrc",
|
|
3254
|
+
ASIN: "asin",
|
|
3255
|
+
MUSICBRAINZ_TRACKID: "musicbrainz_recordingid",
|
|
3256
|
+
MUSICBRAINZ_RELEASETRACKID: "musicbrainz_trackid",
|
|
3257
|
+
MUSICBRAINZ_ALBUMID: "musicbrainz_albumid",
|
|
3258
|
+
MUSICBRAINZ_ARTISTID: "musicbrainz_artistid",
|
|
3259
|
+
MUSICBRAINZ_ALBUMARTISTID: "musicbrainz_albumartistid",
|
|
3260
|
+
MUSICBRAINZ_RELEASEGROUPID: "musicbrainz_releasegroupid",
|
|
3261
|
+
MUSICBRAINZ_WORKID: "musicbrainz_workid",
|
|
3262
|
+
MUSICBRAINZ_TRMID: "musicbrainz_trmid",
|
|
3263
|
+
MUSICBRAINZ_DISCID: "musicbrainz_discid",
|
|
3264
|
+
ACOUSTID_ID: "acoustid_id",
|
|
3265
|
+
ACOUSTID_ID_FINGERPRINT: "acoustid_fingerprint",
|
|
3266
|
+
MUSICIP_PUID: "musicip_puid",
|
|
3267
|
+
WEBSITE: "website",
|
|
3268
|
+
NOTES: "notes",
|
|
3269
|
+
TOTALTRACKS: "totaltracks",
|
|
3270
|
+
TOTALDISCS: "totaldiscs",
|
|
3271
|
+
DISCOGS_ARTIST_ID: "discogs_artist_id",
|
|
3272
|
+
DISCOGS_ARTISTS: "artists",
|
|
3273
|
+
DISCOGS_ARTIST_NAME: "artists",
|
|
3274
|
+
DISCOGS_ALBUM_ARTISTS: "albumartist",
|
|
3275
|
+
DISCOGS_CATALOG: "catalognumber",
|
|
3276
|
+
DISCOGS_COUNTRY: "releasecountry",
|
|
3277
|
+
DISCOGS_DATE: "originaldate",
|
|
3278
|
+
DISCOGS_LABEL: "label",
|
|
3279
|
+
DISCOGS_LABEL_ID: "discogs_label_id",
|
|
3280
|
+
DISCOGS_MASTER_RELEASE_ID: "discogs_master_release_id",
|
|
3281
|
+
DISCOGS_RATING: "discogs_rating",
|
|
3282
|
+
DISCOGS_RELEASED: "date",
|
|
3283
|
+
DISCOGS_RELEASE_ID: "discogs_release_id",
|
|
3284
|
+
DISCOGS_VOTES: "discogs_votes",
|
|
3285
|
+
CATALOGID: "catalognumber",
|
|
3286
|
+
STYLE: "genre",
|
|
3287
|
+
REPLAYGAIN_TRACK_GAIN: "replaygain_track_gain",
|
|
3288
|
+
REPLAYGAIN_TRACK_PEAK: "replaygain_track_peak",
|
|
3289
|
+
REPLAYGAIN_ALBUM_GAIN: "replaygain_album_gain",
|
|
3290
|
+
REPLAYGAIN_ALBUM_PEAK: "replaygain_album_peak",
|
|
3291
|
+
REPLAYGAIN_MINMAX: "replaygain_track_minmax",
|
|
3292
|
+
REPLAYGAIN_ALBUM_MINMAX: "replaygain_album_minmax",
|
|
3293
|
+
REPLAYGAIN_UNDO: "replaygain_undo"
|
|
3294
|
+
}, Ot = class e extends Y {
|
|
3295
|
+
static toRating(e, t, n) {
|
|
3296
|
+
return {
|
|
3297
|
+
source: e ? e.toLowerCase() : void 0,
|
|
3298
|
+
rating: Number.parseFloat(t) / n * Y.maxRatingScore
|
|
3299
|
+
};
|
|
3300
|
+
}
|
|
3301
|
+
constructor() {
|
|
3302
|
+
super(["vorbis"], Dt);
|
|
3303
|
+
}
|
|
3304
|
+
postMap(t) {
|
|
3305
|
+
if (t.id === "RATING") t.value = e.toRating(void 0, t.value, 100);
|
|
3306
|
+
else if (t.id.indexOf("RATING:") === 0) {
|
|
3307
|
+
let n = t.id.split(":");
|
|
3308
|
+
t.value = e.toRating(n[1], t.value, 1), t.id = n[0];
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3311
|
+
}, kt = {
|
|
3312
|
+
IART: "artist",
|
|
3313
|
+
ICRD: "date",
|
|
3314
|
+
INAM: "title",
|
|
3315
|
+
TITL: "title",
|
|
3316
|
+
IPRD: "album",
|
|
3317
|
+
ITRK: "track",
|
|
3318
|
+
IPRT: "track",
|
|
3319
|
+
COMM: "comment",
|
|
3320
|
+
ICMT: "comment",
|
|
3321
|
+
ICNT: "releasecountry",
|
|
3322
|
+
GNRE: "genre",
|
|
3323
|
+
IWRI: "writer",
|
|
3324
|
+
RATE: "rating",
|
|
3325
|
+
YEAR: "year",
|
|
3326
|
+
ISFT: "encodedby",
|
|
3327
|
+
CODE: "encodedby",
|
|
3328
|
+
TURL: "website",
|
|
3329
|
+
IGNR: "genre",
|
|
3330
|
+
IENG: "engineer",
|
|
3331
|
+
ITCH: "technician",
|
|
3332
|
+
IMED: "media",
|
|
3333
|
+
IRPD: "album"
|
|
3334
|
+
}, At = class extends Y {
|
|
3335
|
+
constructor() {
|
|
3336
|
+
super(["exif"], kt);
|
|
3337
|
+
}
|
|
3338
|
+
}, jt = {
|
|
3339
|
+
"segment:title": "title",
|
|
3340
|
+
"album:ARTIST": "albumartist",
|
|
3341
|
+
"album:ARTISTSORT": "albumartistsort",
|
|
3342
|
+
"album:TITLE": "album",
|
|
3343
|
+
"album:DATE_RECORDED": "originaldate",
|
|
3344
|
+
"album:DATE_RELEASED": "releasedate",
|
|
3345
|
+
"album:PART_NUMBER": "disk",
|
|
3346
|
+
"album:TOTAL_PARTS": "totaltracks",
|
|
3347
|
+
"track:ARTIST": "artist",
|
|
3348
|
+
"track:ARTISTSORT": "artistsort",
|
|
3349
|
+
"track:TITLE": "title",
|
|
3350
|
+
"track:PART_NUMBER": "track",
|
|
3351
|
+
"track:MUSICBRAINZ_TRACKID": "musicbrainz_recordingid",
|
|
3352
|
+
"track:MUSICBRAINZ_ALBUMID": "musicbrainz_albumid",
|
|
3353
|
+
"track:MUSICBRAINZ_ARTISTID": "musicbrainz_artistid",
|
|
3354
|
+
"track:PUBLISHER": "label",
|
|
3355
|
+
"track:GENRE": "genre",
|
|
3356
|
+
"track:ENCODER": "encodedby",
|
|
3357
|
+
"track:ENCODER_OPTIONS": "encodersettings",
|
|
3358
|
+
"edition:TOTAL_PARTS": "totaldiscs",
|
|
3359
|
+
picture: "picture"
|
|
3360
|
+
}, Mt = class extends X {
|
|
3361
|
+
constructor() {
|
|
3362
|
+
super(["matroska"], jt);
|
|
3363
|
+
}
|
|
3364
|
+
}, Nt = {
|
|
3365
|
+
NAME: "title",
|
|
3366
|
+
AUTH: "artist",
|
|
3367
|
+
"(c) ": "copyright",
|
|
3368
|
+
ANNO: "comment"
|
|
3369
|
+
}, Pt = class extends Y {
|
|
3370
|
+
constructor() {
|
|
3371
|
+
super(["AIFF"], Nt);
|
|
3372
|
+
}
|
|
3373
|
+
}, Ft = class {
|
|
3374
|
+
constructor() {
|
|
3375
|
+
this.tagMappers = {}, [
|
|
3376
|
+
new ht(),
|
|
3377
|
+
new xt(),
|
|
3378
|
+
new _t(),
|
|
3379
|
+
new Et(),
|
|
3380
|
+
new Et(),
|
|
3381
|
+
new Ot(),
|
|
3382
|
+
new Ct(),
|
|
3383
|
+
new yt(),
|
|
3384
|
+
new At(),
|
|
3385
|
+
new Mt(),
|
|
3386
|
+
new Pt()
|
|
3387
|
+
].forEach((e) => {
|
|
3388
|
+
this.registerTagMapper(e);
|
|
3389
|
+
});
|
|
3390
|
+
}
|
|
3391
|
+
mapTag(e, t, n) {
|
|
3392
|
+
if (this.tagMappers[e]) return this.tagMappers[e].mapGenericTag(t, n);
|
|
3393
|
+
throw new d(`No generic tag mapper defined for tag-format: ${e}`);
|
|
3394
|
+
}
|
|
3395
|
+
registerTagMapper(e) {
|
|
3396
|
+
for (let t of e.tagTypes) this.tagMappers[t] = e;
|
|
3397
|
+
}
|
|
3398
|
+
}, Z = /\[(\d{2}):(\d{2})\.(\d{2,3})]/;
|
|
3399
|
+
function It(e) {
|
|
3400
|
+
return Z.test(e) ? Rt(e) : Lt(e);
|
|
3401
|
+
}
|
|
3402
|
+
function Lt(e) {
|
|
3403
|
+
return {
|
|
3404
|
+
contentType: se.lyrics,
|
|
3405
|
+
timeStampFormat: oe.notSynchronized,
|
|
3406
|
+
text: e.trim(),
|
|
3407
|
+
syncText: []
|
|
3408
|
+
};
|
|
3409
|
+
}
|
|
3410
|
+
function Rt(e) {
|
|
3411
|
+
let t = e.split("\n"), n = [];
|
|
3412
|
+
for (let e of t) {
|
|
3413
|
+
let t = e.match(Z);
|
|
3414
|
+
if (t) {
|
|
3415
|
+
let r = Number.parseInt(t[1], 10), i = Number.parseInt(t[2], 10), a = t[3].length === 3 ? Number.parseInt(t[3], 10) : Number.parseInt(t[3], 10) * 10, o = (r * 60 + i) * 1e3 + a, s = e.replace(Z, "").trim();
|
|
3416
|
+
n.push({
|
|
3417
|
+
timestamp: o,
|
|
3418
|
+
text: s
|
|
3419
|
+
});
|
|
3420
|
+
}
|
|
3421
|
+
}
|
|
3422
|
+
return {
|
|
3423
|
+
contentType: se.lyrics,
|
|
3424
|
+
timeStampFormat: oe.milliseconds,
|
|
3425
|
+
text: n.map((e) => e.text).join("\n"),
|
|
3426
|
+
syncText: n
|
|
3427
|
+
};
|
|
3428
|
+
}
|
|
3429
|
+
//#endregion
|
|
3430
|
+
//#region node_modules/music-metadata/lib/common/MetadataCollector.js
|
|
3431
|
+
var Q = (0, v.default)("music-metadata:collector"), zt = [
|
|
3432
|
+
"matroska",
|
|
3433
|
+
"APEv2",
|
|
3434
|
+
"vorbis",
|
|
3435
|
+
"ID3v2.4",
|
|
3436
|
+
"ID3v2.3",
|
|
3437
|
+
"ID3v2.2",
|
|
3438
|
+
"exif",
|
|
3439
|
+
"asf",
|
|
3440
|
+
"iTunes",
|
|
3441
|
+
"AIFF",
|
|
3442
|
+
"ID3v1"
|
|
3443
|
+
], Bt = class {
|
|
3444
|
+
constructor(e) {
|
|
3445
|
+
this.format = {
|
|
3446
|
+
tagTypes: [],
|
|
3447
|
+
trackInfo: []
|
|
3448
|
+
}, this.native = {}, this.common = {
|
|
3449
|
+
track: {
|
|
3450
|
+
no: null,
|
|
3451
|
+
of: null
|
|
3452
|
+
},
|
|
3453
|
+
disk: {
|
|
3454
|
+
no: null,
|
|
3455
|
+
of: null
|
|
3456
|
+
},
|
|
3457
|
+
movementIndex: {
|
|
3458
|
+
no: null,
|
|
3459
|
+
of: null
|
|
3460
|
+
}
|
|
3461
|
+
}, this.quality = { warnings: [] }, this.commonOrigin = {}, this.originPriority = {}, this.tagMapper = new Ft(), this.opts = e;
|
|
3462
|
+
let t = 1;
|
|
3463
|
+
for (let e of zt) this.originPriority[e] = t++;
|
|
3464
|
+
this.originPriority.artificial = 500, this.originPriority.id3v1 = 600;
|
|
3465
|
+
}
|
|
3466
|
+
hasAny() {
|
|
3467
|
+
return Object.keys(this.native).length > 0;
|
|
3468
|
+
}
|
|
3469
|
+
addStreamInfo(e) {
|
|
3470
|
+
Q(`streamInfo: type=${e.type ? de[e.type] : "?"}, codec=${e.codecName}`), this.format.trackInfo.push(e);
|
|
3471
|
+
}
|
|
3472
|
+
setFormat(e, t) {
|
|
3473
|
+
var n;
|
|
3474
|
+
Q(`format: ${e} = ${t}`), this.format[e] = t, (n = this.opts) != null && n.observer && this.opts.observer({
|
|
3475
|
+
metadata: this,
|
|
3476
|
+
tag: {
|
|
3477
|
+
type: "format",
|
|
3478
|
+
id: e,
|
|
3479
|
+
value: t
|
|
3480
|
+
}
|
|
3481
|
+
});
|
|
3482
|
+
}
|
|
3483
|
+
setAudioOnly() {
|
|
3484
|
+
this.setFormat("hasAudio", !0), this.setFormat("hasVideo", !1);
|
|
3485
|
+
}
|
|
3486
|
+
async addTag(e, t, n) {
|
|
3487
|
+
var r = this;
|
|
3488
|
+
Q(`tag ${e}.${t} = ${n}`), r.native[e] || (r.format.tagTypes.push(e), r.native[e] = []), r.native[e].push({
|
|
3489
|
+
id: t,
|
|
3490
|
+
value: n
|
|
3491
|
+
}), await r.toCommon(e, t, n);
|
|
3492
|
+
}
|
|
3493
|
+
addWarning(e) {
|
|
3494
|
+
this.quality.warnings.push({ message: e });
|
|
3495
|
+
}
|
|
3496
|
+
async postMap(e, t) {
|
|
3497
|
+
var n = this;
|
|
3498
|
+
switch (t.id) {
|
|
3499
|
+
case "artist": return n.handleSingularArtistTag(e, t, "artist", "artists");
|
|
3500
|
+
case "albumartist": return n.handleSingularArtistTag(e, t, "albumartist", "albumartists");
|
|
3501
|
+
case "artists": return n.handlePluralArtistTag(e, t, "artist", "artists");
|
|
3502
|
+
case "albumartists": return n.handlePluralArtistTag(e, t, "albumartist", "albumartists");
|
|
3503
|
+
case "picture": return n.postFixPicture(t.value).then((r) => {
|
|
3504
|
+
r !== null && (t.value = r, n.setGenericTag(e, t));
|
|
3505
|
+
});
|
|
3506
|
+
case "totaltracks":
|
|
3507
|
+
n.common.track.of = Y.toIntOrNull(t.value);
|
|
3508
|
+
return;
|
|
3509
|
+
case "totaldiscs":
|
|
3510
|
+
n.common.disk.of = Y.toIntOrNull(t.value);
|
|
3511
|
+
return;
|
|
3512
|
+
case "movementTotal":
|
|
3513
|
+
n.common.movementIndex.of = Y.toIntOrNull(t.value);
|
|
3514
|
+
return;
|
|
3515
|
+
case "track":
|
|
3516
|
+
case "disk":
|
|
3517
|
+
case "movementIndex": {
|
|
3518
|
+
let e = n.common[t.id].of;
|
|
3519
|
+
n.common[t.id] = Y.normalizeTrack(t.value), n.common[t.id].of = e == null ? n.common[t.id].of : e;
|
|
3520
|
+
return;
|
|
3521
|
+
}
|
|
3522
|
+
case "bpm":
|
|
3523
|
+
case "year":
|
|
3524
|
+
case "originalyear":
|
|
3525
|
+
t.value = Number.parseInt(t.value, 10);
|
|
3526
|
+
break;
|
|
3527
|
+
case "date": {
|
|
3528
|
+
let e = Number.parseInt(t.value.substr(0, 4), 10);
|
|
3529
|
+
Number.isNaN(e) || (n.common.year = e);
|
|
3530
|
+
break;
|
|
3531
|
+
}
|
|
3532
|
+
case "discogs_label_id":
|
|
3533
|
+
case "discogs_release_id":
|
|
3534
|
+
case "discogs_master_release_id":
|
|
3535
|
+
case "discogs_artist_id":
|
|
3536
|
+
case "discogs_votes":
|
|
3537
|
+
t.value = typeof t.value == "string" ? Number.parseInt(t.value, 10) : t.value;
|
|
3538
|
+
break;
|
|
3539
|
+
case "replaygain_track_gain":
|
|
3540
|
+
case "replaygain_track_peak":
|
|
3541
|
+
case "replaygain_album_gain":
|
|
3542
|
+
case "replaygain_album_peak":
|
|
3543
|
+
t.value = ie(t.value);
|
|
3544
|
+
break;
|
|
3545
|
+
case "replaygain_track_minmax":
|
|
3546
|
+
t.value = t.value.split(",").map((e) => Number.parseInt(e, 10));
|
|
3547
|
+
break;
|
|
3548
|
+
case "replaygain_undo": {
|
|
3549
|
+
let e = t.value.split(",").map((e) => Number.parseInt(e, 10));
|
|
3550
|
+
t.value = {
|
|
3551
|
+
leftChannel: e[0],
|
|
3552
|
+
rightChannel: e[1]
|
|
3553
|
+
};
|
|
3554
|
+
break;
|
|
3555
|
+
}
|
|
3556
|
+
case "gapless":
|
|
3557
|
+
case "compilation":
|
|
3558
|
+
case "podcast":
|
|
3559
|
+
case "showMovement":
|
|
3560
|
+
t.value = t.value === "1" || t.value === 1;
|
|
3561
|
+
break;
|
|
3562
|
+
case "isrc": {
|
|
3563
|
+
let e = n.common[t.id];
|
|
3564
|
+
if (e && e.indexOf(t.value) !== -1) return;
|
|
3565
|
+
break;
|
|
3566
|
+
}
|
|
3567
|
+
case "comment":
|
|
3568
|
+
typeof t.value == "string" && (t.value = { text: t.value }), t.value.descriptor === "iTunPGAP" && n.setGenericTag(e, {
|
|
3569
|
+
id: "gapless",
|
|
3570
|
+
value: t.value.text === "1"
|
|
3571
|
+
});
|
|
3572
|
+
break;
|
|
3573
|
+
case "lyrics":
|
|
3574
|
+
typeof t.value == "string" && (t.value = It(t.value));
|
|
3575
|
+
break;
|
|
3576
|
+
default:
|
|
3577
|
+
}
|
|
3578
|
+
t.value !== null && n.setGenericTag(e, t);
|
|
3579
|
+
}
|
|
3580
|
+
toCommonMetadata() {
|
|
3581
|
+
return {
|
|
3582
|
+
format: this.format,
|
|
3583
|
+
native: this.native,
|
|
3584
|
+
quality: this.quality,
|
|
3585
|
+
common: this.common
|
|
3586
|
+
};
|
|
3587
|
+
}
|
|
3588
|
+
handleSingularArtistTag(e, t, n, r) {
|
|
3589
|
+
if (this.commonOrigin[n] === this.originPriority[e]) return this.postMap("artificial", {
|
|
3590
|
+
id: r,
|
|
3591
|
+
value: t.value
|
|
3592
|
+
});
|
|
3593
|
+
this.common[r] || this.setGenericTag("artificial", {
|
|
3594
|
+
id: r,
|
|
3595
|
+
value: t.value
|
|
3596
|
+
}), this.setGenericTag(e, t);
|
|
3597
|
+
}
|
|
3598
|
+
handlePluralArtistTag(e, t, n, r) {
|
|
3599
|
+
if ((!this.common[n] || this.commonOrigin[n] === this.originPriority.artificial) && (!this.common[r] || this.common[r].indexOf(t.value) === -1)) {
|
|
3600
|
+
let e = Vt((this.common[r] || []).concat([t.value]));
|
|
3601
|
+
this.setGenericTag("artificial", {
|
|
3602
|
+
id: n,
|
|
3603
|
+
value: e
|
|
3604
|
+
});
|
|
3605
|
+
}
|
|
3606
|
+
this.setGenericTag(e, t);
|
|
3607
|
+
}
|
|
3608
|
+
async postFixPicture(e) {
|
|
3609
|
+
var t = this;
|
|
3610
|
+
if (e.data && e.data.length > 0) {
|
|
3611
|
+
if (!e.format) {
|
|
3612
|
+
let t = await H(Uint8Array.from(e.data));
|
|
3613
|
+
if (t) e.format = t.mime;
|
|
3614
|
+
else return null;
|
|
3615
|
+
}
|
|
3616
|
+
switch (e.format = e.format.toLocaleLowerCase(), e.format) {
|
|
3617
|
+
case "image/jpg": e.format = "image/jpeg";
|
|
3618
|
+
}
|
|
3619
|
+
return e;
|
|
3620
|
+
}
|
|
3621
|
+
return t.addWarning("Empty picture tag found"), null;
|
|
3622
|
+
}
|
|
3623
|
+
async toCommon(e, t, n) {
|
|
3624
|
+
var r = this;
|
|
3625
|
+
let i = {
|
|
3626
|
+
id: t,
|
|
3627
|
+
value: n
|
|
3628
|
+
}, a = r.tagMapper.mapTag(e, i, r);
|
|
3629
|
+
a && await r.postMap(e, a);
|
|
3630
|
+
}
|
|
3631
|
+
setGenericTag(e, t) {
|
|
3632
|
+
var n;
|
|
3633
|
+
Q(`common.${t.id} = ${t.value}`);
|
|
3634
|
+
let r = this.commonOrigin[t.id] || 1e3, i = this.originPriority[e];
|
|
3635
|
+
if (ft(t.id)) if (i <= r) this.common[t.id] = t.value, this.commonOrigin[t.id] = i;
|
|
3636
|
+
else return Q(`Ignore native tag (singleton): ${e}.${t.id} = ${t.value}`);
|
|
3637
|
+
else if (i === r) !pt(t.id) || this.common[t.id].indexOf(t.value) === -1 ? this.common[t.id].push(t.value) : Q(`Ignore duplicate value: ${e}.${t.id} = ${t.value}`);
|
|
3638
|
+
else if (i < r) this.common[t.id] = [t.value], this.commonOrigin[t.id] = i;
|
|
3639
|
+
else return Q(`Ignore native tag (list): ${e}.${t.id} = ${t.value}`);
|
|
3640
|
+
(n = this.opts) != null && n.observer && this.opts.observer({
|
|
3641
|
+
metadata: this,
|
|
3642
|
+
tag: {
|
|
3643
|
+
type: "common",
|
|
3644
|
+
id: t.id,
|
|
3645
|
+
value: t.value
|
|
3646
|
+
}
|
|
3647
|
+
});
|
|
3648
|
+
}
|
|
3649
|
+
};
|
|
3650
|
+
function Vt(e) {
|
|
3651
|
+
return e.length > 2 ? `${e.slice(0, e.length - 1).join(", ")} & ${e[e.length - 1]}` : e.join(" & ");
|
|
3652
|
+
}
|
|
3653
|
+
//#endregion
|
|
3654
|
+
//#region node_modules/music-metadata/lib/mpeg/MpegLoader.js
|
|
3655
|
+
var Ht = {
|
|
3656
|
+
parserType: "mpeg",
|
|
3657
|
+
extensions: [
|
|
3658
|
+
".mp2",
|
|
3659
|
+
".mp3",
|
|
3660
|
+
".m2a",
|
|
3661
|
+
".aac",
|
|
3662
|
+
"aacp"
|
|
3663
|
+
],
|
|
3664
|
+
mimeTypes: [
|
|
3665
|
+
"audio/mpeg",
|
|
3666
|
+
"audio/mp3",
|
|
3667
|
+
"audio/aacs",
|
|
3668
|
+
"audio/aacp"
|
|
3669
|
+
],
|
|
3670
|
+
async load() {
|
|
3671
|
+
return (await import("./MpegParser-R-6QiuhU.mjs")).MpegParser;
|
|
3672
|
+
}
|
|
3673
|
+
}, Ut = {
|
|
3674
|
+
parserType: "apev2",
|
|
3675
|
+
extensions: [".ape"],
|
|
3676
|
+
mimeTypes: ["audio/ape", "audio/monkeys-audio"],
|
|
3677
|
+
async load() {
|
|
3678
|
+
return (await import("./APEv2Parser-WvRvu4zL.mjs").then((e) => e.n)).APEv2Parser;
|
|
3679
|
+
}
|
|
3680
|
+
}, Wt = {
|
|
3681
|
+
parserType: "asf",
|
|
3682
|
+
extensions: [
|
|
3683
|
+
".asf",
|
|
3684
|
+
".wma",
|
|
3685
|
+
".wmv"
|
|
3686
|
+
],
|
|
3687
|
+
mimeTypes: [
|
|
3688
|
+
"audio/ms-wma",
|
|
3689
|
+
"video/ms-wmv",
|
|
3690
|
+
"audio/ms-asf",
|
|
3691
|
+
"video/ms-asf",
|
|
3692
|
+
"application/vnd.ms-asf"
|
|
3693
|
+
],
|
|
3694
|
+
async load() {
|
|
3695
|
+
return (await import("./AsfParser-CH5F_9Wp.mjs")).AsfParser;
|
|
3696
|
+
}
|
|
3697
|
+
}, Gt = {
|
|
3698
|
+
parserType: "dsdiff",
|
|
3699
|
+
extensions: [".dff"],
|
|
3700
|
+
mimeTypes: ["audio/dsf", "audio/dsd"],
|
|
3701
|
+
async load() {
|
|
3702
|
+
return (await import("./DsdiffParser-BAdYwB7y.mjs")).DsdiffParser;
|
|
3703
|
+
}
|
|
3704
|
+
}, Kt = {
|
|
3705
|
+
parserType: "aiff",
|
|
3706
|
+
extensions: [
|
|
3707
|
+
".aif",
|
|
3708
|
+
"aiff",
|
|
3709
|
+
"aifc"
|
|
3710
|
+
],
|
|
3711
|
+
mimeTypes: [
|
|
3712
|
+
"audio/aiff",
|
|
3713
|
+
"audio/aif",
|
|
3714
|
+
"audio/aifc",
|
|
3715
|
+
"application/aiff"
|
|
3716
|
+
],
|
|
3717
|
+
async load() {
|
|
3718
|
+
return (await import("./AiffParser-C_VaWeb5.mjs")).AIFFParser;
|
|
3719
|
+
}
|
|
3720
|
+
}, qt = {
|
|
3721
|
+
parserType: "dsf",
|
|
3722
|
+
extensions: [".dsf"],
|
|
3723
|
+
mimeTypes: ["audio/dsf"],
|
|
3724
|
+
async load() {
|
|
3725
|
+
return (await import("./DsfParser-DWMLfBH1.mjs")).DsfParser;
|
|
3726
|
+
}
|
|
3727
|
+
}, Jt = {
|
|
3728
|
+
parserType: "flac",
|
|
3729
|
+
extensions: [".flac"],
|
|
3730
|
+
mimeTypes: ["audio/flac"],
|
|
3731
|
+
async load() {
|
|
3732
|
+
return (await import("./FlacParser-BdKXrY7L.mjs").then((e) => e.n)).FlacParser;
|
|
3733
|
+
}
|
|
3734
|
+
}, Yt = {
|
|
3735
|
+
parserType: "matroska",
|
|
3736
|
+
extensions: [
|
|
3737
|
+
".mka",
|
|
3738
|
+
".mkv",
|
|
3739
|
+
".mk3d",
|
|
3740
|
+
".mks",
|
|
3741
|
+
"webm"
|
|
3742
|
+
],
|
|
3743
|
+
mimeTypes: [
|
|
3744
|
+
"audio/matroska",
|
|
3745
|
+
"video/matroska",
|
|
3746
|
+
"audio/webm",
|
|
3747
|
+
"video/webm"
|
|
3748
|
+
],
|
|
3749
|
+
async load() {
|
|
3750
|
+
return (await import("./MatroskaParser-fxFuCddu.mjs")).MatroskaParser;
|
|
3751
|
+
}
|
|
3752
|
+
}, Xt = {
|
|
3753
|
+
parserType: "mp4",
|
|
3754
|
+
extensions: [
|
|
3755
|
+
".mp4",
|
|
3756
|
+
".m4a",
|
|
3757
|
+
".m4b",
|
|
3758
|
+
".m4pa",
|
|
3759
|
+
"m4v",
|
|
3760
|
+
"m4r",
|
|
3761
|
+
"3gp",
|
|
3762
|
+
".mov",
|
|
3763
|
+
".movie",
|
|
3764
|
+
".qt"
|
|
3765
|
+
],
|
|
3766
|
+
mimeTypes: [
|
|
3767
|
+
"audio/mp4",
|
|
3768
|
+
"audio/m4a",
|
|
3769
|
+
"video/m4v",
|
|
3770
|
+
"video/mp4",
|
|
3771
|
+
"video/quicktime"
|
|
3772
|
+
],
|
|
3773
|
+
async load() {
|
|
3774
|
+
return (await import("./MP4Parser-0KMJ-q2k.mjs")).MP4Parser;
|
|
3775
|
+
}
|
|
3776
|
+
}, Zt = {
|
|
3777
|
+
parserType: "musepack",
|
|
3778
|
+
extensions: [".mpc"],
|
|
3779
|
+
mimeTypes: ["audio/musepack"],
|
|
3780
|
+
async load() {
|
|
3781
|
+
return (await import("./MusepackParser-DFLoF47O.mjs")).MusepackParser;
|
|
3782
|
+
}
|
|
3783
|
+
}, Qt = {
|
|
3784
|
+
parserType: "ogg",
|
|
3785
|
+
extensions: [
|
|
3786
|
+
".ogg",
|
|
3787
|
+
".ogv",
|
|
3788
|
+
".oga",
|
|
3789
|
+
".ogm",
|
|
3790
|
+
".ogx",
|
|
3791
|
+
".opus",
|
|
3792
|
+
".spx"
|
|
3793
|
+
],
|
|
3794
|
+
mimeTypes: [
|
|
3795
|
+
"audio/ogg",
|
|
3796
|
+
"audio/opus",
|
|
3797
|
+
"audio/speex",
|
|
3798
|
+
"video/ogg"
|
|
3799
|
+
],
|
|
3800
|
+
async load() {
|
|
3801
|
+
return (await import("./OggParser-C1qP2qC7.mjs")).OggParser;
|
|
3802
|
+
}
|
|
3803
|
+
}, $t = {
|
|
3804
|
+
parserType: "wavpack",
|
|
3805
|
+
extensions: [".wv", ".wvp"],
|
|
3806
|
+
mimeTypes: ["audio/wavpack"],
|
|
3807
|
+
async load() {
|
|
3808
|
+
return (await import("./WavPackParser-Ck8xXsNf.mjs")).WavPackParser;
|
|
3809
|
+
}
|
|
3810
|
+
}, en = {
|
|
3811
|
+
parserType: "riff",
|
|
3812
|
+
extensions: [
|
|
3813
|
+
".wav",
|
|
3814
|
+
"wave",
|
|
3815
|
+
".bwf"
|
|
3816
|
+
],
|
|
3817
|
+
mimeTypes: [
|
|
3818
|
+
"audio/vnd.wave",
|
|
3819
|
+
"audio/wav",
|
|
3820
|
+
"audio/wave"
|
|
3821
|
+
],
|
|
3822
|
+
async load() {
|
|
3823
|
+
return (await import("./WaveParser-hxQlWijT.mjs")).WaveParser;
|
|
3824
|
+
}
|
|
3825
|
+
}, $ = (0, v.default)("music-metadata:parser:factory");
|
|
3826
|
+
function tn(e) {
|
|
3827
|
+
let t = lt.parse(e), n = dt(t.type);
|
|
3828
|
+
return {
|
|
3829
|
+
type: n.type,
|
|
3830
|
+
subtype: n.subtype,
|
|
3831
|
+
suffix: n.suffix,
|
|
3832
|
+
parameters: t.parameters
|
|
3833
|
+
};
|
|
3834
|
+
}
|
|
3835
|
+
var nn = class {
|
|
3836
|
+
constructor() {
|
|
3837
|
+
this.parsers = [], [
|
|
3838
|
+
Jt,
|
|
3839
|
+
Ht,
|
|
3840
|
+
Ut,
|
|
3841
|
+
Xt,
|
|
3842
|
+
Yt,
|
|
3843
|
+
en,
|
|
3844
|
+
Qt,
|
|
3845
|
+
Wt,
|
|
3846
|
+
Kt,
|
|
3847
|
+
$t,
|
|
3848
|
+
Zt,
|
|
3849
|
+
qt,
|
|
3850
|
+
Gt
|
|
3851
|
+
].forEach((e) => {
|
|
3852
|
+
this.registerParser(e);
|
|
3853
|
+
});
|
|
3854
|
+
}
|
|
3855
|
+
registerParser(e) {
|
|
3856
|
+
this.parsers.push(e);
|
|
3857
|
+
}
|
|
3858
|
+
async parse(e, t, n) {
|
|
3859
|
+
var r = this;
|
|
3860
|
+
if (e.supportsRandomAccess() ? ($("tokenizer supports random-access, scanning for appending headers"), await cn(e, n)) : $("tokenizer does not support random-access, cannot scan for appending headers"), !t) {
|
|
3861
|
+
let n = new Uint8Array(4100);
|
|
3862
|
+
if (e.fileInfo.mimeType && (t = r.findLoaderForContentType(e.fileInfo.mimeType)), !t && e.fileInfo.path && (t = r.findLoaderForExtension(e.fileInfo.path)), !t) {
|
|
3863
|
+
$("Guess parser on content..."), await e.peekBuffer(n, { mayBeLess: !0 });
|
|
3864
|
+
let i = await H(n, { mpegOffsetTolerance: 10 });
|
|
3865
|
+
if (!i || !i.mime) throw new f("Failed to determine audio format");
|
|
3866
|
+
if ($(`Guessed file type is mime=${i.mime}, extension=${i.ext}`), t = r.findLoaderForContentType(i.mime), !t) throw new c(`Guessed MIME-type not supported: ${i.mime}`);
|
|
3867
|
+
}
|
|
3868
|
+
}
|
|
3869
|
+
$(`Loading ${t.parserType} parser...`);
|
|
3870
|
+
let i = new Bt(n), a = new (await (t.load()))(i, e, n == null ? {} : n);
|
|
3871
|
+
return $(`Parser ${t.parserType} loaded`), await a.parse(), i.format.trackInfo && (i.format.hasAudio === void 0 && i.setFormat("hasAudio", !!i.format.trackInfo.find((e) => e.type === ue.audio)), i.format.hasVideo === void 0 && i.setFormat("hasVideo", !!i.format.trackInfo.find((e) => e.type === ue.video))), i.toCommonMetadata();
|
|
3872
|
+
}
|
|
3873
|
+
findLoaderForExtension(e) {
|
|
3874
|
+
if (!e) return;
|
|
3875
|
+
let t = rn(e).toLocaleLowerCase() || e;
|
|
3876
|
+
return this.parsers.find((e) => e.extensions.indexOf(t) !== -1);
|
|
3877
|
+
}
|
|
3878
|
+
findLoaderForContentType(e) {
|
|
3879
|
+
let t;
|
|
3880
|
+
if (!e) return;
|
|
3881
|
+
try {
|
|
3882
|
+
t = tn(e);
|
|
3883
|
+
} catch (t) {
|
|
3884
|
+
$(`Invalid HTTP Content-Type header value: ${e}`);
|
|
3885
|
+
return;
|
|
3886
|
+
}
|
|
3887
|
+
let n = t.subtype.indexOf("x-") === 0 ? t.subtype.substring(2) : t.subtype;
|
|
3888
|
+
return this.parsers.find((e) => e.mimeTypes.find((e) => e.indexOf(`${t.type}/${n}`) !== -1));
|
|
3889
|
+
}
|
|
3890
|
+
getSupportedMimeTypes() {
|
|
3891
|
+
let e = /* @__PURE__ */ new Set();
|
|
3892
|
+
return this.parsers.forEach((t) => {
|
|
3893
|
+
t.mimeTypes.forEach((t) => {
|
|
3894
|
+
e.add(t), e.add(t.replace("/", "/x-"));
|
|
3895
|
+
});
|
|
3896
|
+
}), Array.from(e);
|
|
3897
|
+
}
|
|
3898
|
+
};
|
|
3899
|
+
function rn(e) {
|
|
3900
|
+
let t = e.lastIndexOf(".");
|
|
3901
|
+
return t === -1 ? "" : e.substring(t);
|
|
3902
|
+
}
|
|
3903
|
+
async function an(e) {
|
|
3904
|
+
let t = e.fileInfo.size;
|
|
3905
|
+
if (t >= 143) {
|
|
3906
|
+
let n = new Uint8Array(15), r = e.position;
|
|
3907
|
+
await e.readBuffer(n, { position: t - 143 }), e.setPosition(r);
|
|
3908
|
+
let a = i(n, "latin1");
|
|
3909
|
+
if (a.substring(6) === "LYRICS200") return Number.parseInt(a.substring(0, 6), 10) + 15;
|
|
3910
|
+
}
|
|
3911
|
+
return 0;
|
|
3912
|
+
}
|
|
3913
|
+
//#endregion
|
|
3914
|
+
//#region node_modules/music-metadata/lib/core.js
|
|
3915
|
+
async function on(e, t, n = {}) {
|
|
3916
|
+
return sn(te(e, { fileInfo: typeof t == "string" ? { mimeType: t } : t }), n);
|
|
3917
|
+
}
|
|
3918
|
+
function sn(e, t) {
|
|
3919
|
+
return new nn().parse(e, void 0, t);
|
|
3920
|
+
}
|
|
3921
|
+
async function cn(e, t = {}) {
|
|
3922
|
+
let n = e.fileInfo.size;
|
|
3923
|
+
if (await le(e)) {
|
|
3924
|
+
n -= 128;
|
|
3925
|
+
let t = await an(e);
|
|
3926
|
+
n -= t;
|
|
3927
|
+
}
|
|
3928
|
+
t.apeHeader = await ce.findApeFooterOffset(e, n);
|
|
3929
|
+
}
|
|
3930
|
+
//#endregion
|
|
3931
|
+
export { on as parseBuffer };
|