1var e=new Set([`jpg`,`jpeg`,`png`,`gif`,`bmp`,`webp`,`svg`,`ico`,`tiff`]),t=new Set([`mp3`,`wav`,`ogg`,`flac`,`aac`,`wma`,`m4a`,`amr`]),n=new Set([`mp4`,`avi`,`mov`,`wmv`,`flv`,`mkv`,`webm`,`mpeg`,`mpg`]),r=new Set([`zip`,`rar`,`7z`,`tar`,`gz`,`bz2`,`iso`,`rar5`]);function i(e){return String(e??``).trim().replace(/^\./,``).toLowerCase()}function a(a){let o=i(a);return e.has(o)?`image`:t.has(o)?`audio`:n.has(o)?`video`:r.has(o)?`archive`:`file`}function o(e,t,n){if(e)return e;if(a(n)===`image`&&t)return t}function s(e){if(typeof e!=`string`||!e.trim())return[];let t=e.trim();return(t.includes(`#`)?t.split(`#`).map(e=>e.trim()).filter(Boolean):t.split(/[,ï¼]/).map(e=>e.trim()).filter(Boolean)).slice(0,10)}function c(e){let t=Number(e);return!Number.isFinite(t)||t<=0?`0 B`:t<1024?`${t} B`:t<1048576?`${(t/1024).toFixed(+(t<10240))} KB`:t<1073741824?`${(t/1048576).toFixed(+(t<10485760))} MB`:`${(t/1073741824).toFixed(1)} GB`}function l(e){return e===1?`media.copyrightOriginal`:e===2?`media.copyrightRepost`:e===3?`media.copyrightOther`:`media.copyrightUnknown`}function u(e){return[...e].sort((e,t)=>e.isDirectory===t.isDirectory?e.name.localeCompare(t.name,`zh-CN`):e.isDirectory?-1:1).map(e=>({...e,children:u(e.children)}))}function d(e,t,n){let r=t.replace(/\\/g,`/`).split(`/`).filter(Boolean);if(r.length===0)return;let i=e;for(let e=0;e<r.length;e++){let t=r[e],a=e===r.length-1,o=i.find(e=>e.name===t);o||(o={name:t,path:r.slice(0,e+1).join(`/`),isDirectory:!a||n.isDirectory,children:[]},i.push(o)),a?(o.isDirectory=n.isDirectory,n.isDirectory||(o.fileSize=n.fileSize,o.compressedSize=n.compressedSize)):o.isDirectory=!0,i=o.children}}function f(e){if(!e?.trim())return[];try{let t=JSON.parse(e);if(!Array.isArray(t.file_list))return[];let n=[];for(let e of t.file_list){if(!e||typeof e!=`object`)continue;let t=e,r=String(t.filename??``).trim();r&&d(n,r,{isDirectory:t.is_directory===!0||t.is_directory===1,fileSize:Number(t.file_size)||void 0,compressedSize:Number(t.compressed_size)||void 0})}return u(n)}catch{return[]}}export{i as a,a as i,o as n,f as o,l as r,s,c as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.