"use strict";var l=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var q=(e,t)=>{for(var i in t)l(e,i,{get:t[i],enumerable:!0})},j=(e,t,i,x)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of L(t))!R.call(e,n)&&n!==i&&l(e,n,{get:()=>t[n],enumerable:!(x=k(t,n))||x.enumerable});return e};var O=e=>j(l({},"__esModule",{value:!0}),e);var Z={};q(Z,{parse:()=>g});module.exports=O(Z);function s(e,t=0){return y(e,t,2).getUint16(0,!0)}function d(e,t=0){return y(e,t,4).getUint32(0,!0)}function f(e,t=0,i=e.byteLength){let x=e.slice(t,t+i);return D.decode(new Uint8Array(x))}function M(e,t=" "){return I.encode(e)}function E(e,t,i=0){let x=M(t);return c(e,x,i)}function u(e,t,i=0){return E(new Uint8Array(e.slice(i,t.length*8)),t)}function c(e,t,i=0){if(e.lengthu(e,i,8);return t("qt")?{ext:"mov",mime:"video/quicktime"}:t("heic")?{ext:"heic",mime:"image/heic"}:t("avif")?{ext:"avif",mime:"image/avif"}:t("M4V")?{ext:"m4v",mime:"video/x-m4v"}:{ext:"mp4",mime:"video/mp4"}}var m=[["db","application/vnd.sqlite3",[83,81,76,105,116,101,32,102,111,114,109,97,116,32,51,0]],["woff","font/woff",[119,79,70,70]],["woff2","font/woff2",[119,79,70,50]],["bmp","image/bmp",[66,77]],["gif","image/gif",[71,73,70,56,55,97]],["gif","image/gif",[71,73,70,56,57,97]],["heic","image/heic",[102,116,121,112,104,101,105],{offset:4}],["heic","image/heic",[102,116,121,112,109],{offset:4}],["ico","image/x-icon",[0,0,1,0]],["jpg","image/jpeg",[255,216,255]],["pdf","application/pdf",[37,80,68,70,45]],["png","image/png",[137,80,78,71,13,10,26,10]],["7z","application/x-7z-compressed",[55,122,188,175,39,28]],["rar","application/x-rar-compressed",[82,97,114,33,26,7,0]],["rar","application/x-rar-compressed",[82,97,114,33,26,7,1,0]],["rtf","application/rtf",[123,92,114,116,102,49]],["bz2","application/x-bzip2",[66,90,104]],["gz","application/gzip",[31,139]],["tar","application/x-tar",[117,115,116,97,114,0,48,48],{offset:257}],["tar","application/x-tar",[117,115,116,97,114,32,32,0],{offset:257}],["tif","image/tiff",[73,73,42,0]],["tiff","image/tiff",[77,77,0,42]],["zip","application/zip",[80,75,3,4],{exact:!1}],["zip","application/zip",[80,75,5,6]],["mp3","audio/mp3",[255,251]],["mp3","audio/mp3",[255,243]],["mp3","audio/mp3",[255,242]],["mp3","audio/mp3",[73,68,51]],["mp4","video/mp4",[102,116,121,112,105,115,111,109],{offset:4}],["avi","video/x-msvideo",[82,73,70,70,null,null,null,null,65,86,73,32]],["wav","audio/wav",[82,73,70,70,null,null,null,null,87,65,86,69]],["ogx","application/ogg",[79,103,103,83],{exact:!1},[["oga","audio/ogg",[127,70,76,65,67],{offset:28}],["ogg","audio/ogg",[1,118,111,114,98,105,115],{offset:28}],["ogm","video/ogg",[1,118,105,100,101,111,0],{offset:28}],["ogv","video/ogg",[128,116,104,101,111,114,97],{offset:28}]]],["webp","image/webp",[82,73,70,70,null,null,null,null,87,69,66,80]],["psd","image/vnd.adobe.photoshop",[56,66,80,83]],["flac","audio/x-flac",[102,76,97,67]],["wasm","application/wasm",[0,97,115,109]],["deb","application/x-deb",[33,60,97,114,99,104,62,10]],["exe","application/x-msdownload",[77,90]],["exe","application/x-msdownload",[90,77]],["class","application/java-vm",[202,254,186,190]],["parquet","application/vnd.apache.parquet",[80,65,82,49]],["mov","video/quicktime",[102,114,101,101],{offset:4}],["mov","video/quicktime",[109,100,97,116],{offset:4}],["mov","video/quicktime",[109,111,111,118],{offset:4}],["mov","video/quicktime",[119,105,100,101],{offset:4}]];function V(e){for(let t=0;tx.length+n).reduce((t,i)=>i>t?i:t,0)}function S(e){return e.flatMap(([t,i,x,n={},r=[]])=>[[t,i,x,n],...r])}function B(e,{ext:t,mime:i}){return t||i?S(e).filter(x=>x[0]===t||x[1]===i):[]}function b(e,t){let i=0;for(;i+300){let r=A(e,n);if(r!==void 0)return r}}if(u(e,"ftyp",4))return v(e);let x=A(e,m);if(x)return x;if(t)return P(e)}function A(e,t){let i=new Uint8Array(e.slice(0,N));for(let[x,n,r,{exact:p=!0,offset:o=0}={},a=[]]of t)if(c(i,r,o)){if(x==="zip"&&!p)return b(e,{ext:x,mime:n});if(!p&&a.length){for(let[U,z,F,{offset:T=0}={}]of a)if(c(i,F,T))return{ext:U,mime:z}}return{ext:x,mime:n}}}function P(e){return h(e)}0&&(module.exports={parse});