PageSourceSearch

https://conversiontab.com/build/assets/compress-files-page-bxlgyA3f.js

js conversiontab.com collected 2026-09-24 10:07:22 UTC 20,199 bytes, 10 lines download raw bytes

1import{J as et}from"./jszip.min-BDbxEQgs.js";import{saveResultFile as tt}from"./ctResultAccessAd-Dk9whJZs.js";import{d as nt}from"./ctMediaProgressUi-wz6CtyvX.js";import{s as it,f as rt}from"./jszipArchiveProgress-1iM3A8_N.js";import{M as $e}from"./app-gOHIPY12.js";import{a as _e}from"./transientNotice-Ds_di7lD.js";import"./_commonjsHelpers-BosuxZz1.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./FileSaver.min-BR20wtAe.js";import"./ctFullscreenAd-CL-AA_Ul.js";const pe="selected_files",ot=300*1024*1024,at='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="ct-zip-row__icon flex-shrink-0" viewBox="0 0 16 16" aria-hidden="true"><path d="M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z"/></svg>',st='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="ct-zip-row__icon flex-shrink-0 text-warning" viewBox="0 0 16 16" aria-hidden="true"><path d="M.54 3.87.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3h3.982a2 2 0 0 1 1.992 2.181l-.637 7A2 2 0 0 1 13.174 14H2.825a2 2 0 0 1-1.991-1.819l-.637-7a1.99 1.99 0 0 1 .342-1.31zM2.19 4a1 1 0 0 0-.996 1.09l.637 7a1 1 0 0 0 .995.91h10.348a1 1 0 0 0 .995-.91l.637-7A1 1 0 0 0 13.81 4H2.19z"/></svg>',lt='<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" class="ct-zip-crumbs__sep flex-shrink-0 mx-1 opacity-50" viewB
1ox="0 0 16 16" aria-hidden="true"><path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/></svg>';function D(o){_e(o,{variant:"warning"})}function Fe(o){_e(o,{variant:"info"})}function Ze(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`f_${Date.now()}_${Math.random().toString(16).slice(2)}`}function f(o){return String(o).trim().replace(/\\/g,"/").replace(/^\/+/,"").replace(/\/{2,}/g,"/")}function _(o,s){const p=f(s);return o?f(`${o}/${p}`):p}function Ae(o){const s=f(o).split("/").filter(Boolean);return s.pop(),s.join("/")}function N(o){return o.kind==="dir"||o.ctEmptyDir===!0}function ct(o){let s=String(o||"").trim().replace(/[\\/:*?"<>|]+/g,"-").replace(/\s+/g,"_");return s=s.replace(/\.(zip|7z|rar|gz|bz2|tar\.gz)$/i,""),s||pe}function Me(o){switch(String(o)){case"zip":return"zip";case"7-Zip":return"7z";case"Rar":return"rar";case"GZip":return"gz";case"Tar.gz":return"tar.gz";case"Bzip2":return"bz2";default:return"zip"}}function dt(o,s,p){const u=f(p).split("/").filter(Boolean);if(u.length===0)return;const b=u.pop();let y=o;for(const g of u)y=y.folder(g);y.file(b,s)}function ft(o,s){const h=f(s).split("/").filter(Boolean);if(h.length===0)return;let u=o;for(const b of h)u=u.folder(b)}function pt(o){return new Promise((s,p)=>{const h=[],u=()=>{o.readEntries(b=>{b.length?(h.push(...b),u()):s(h)},b=>p(b))};u()})}async function ue(o,s){if(o.isFile){const p=await new Promise((h,u)=>{o.file(h,u)});return[{file:p,path:f(s+p.name)}]}if(o.isDirectory){const p=o,h=p.createReader(),u=await pt(h),b=s+p.name+"/",y=[];for(const g of u)y.push(...await ue(g,b));return y}return[]}function K(o,s){const p=f(o),h=new Set,u=[];for(const g of s){const k=f(g.path);let E;if(p==="")E=k;else{const w=`${p}/`;if(k.length<=w.length||!k.startsWith(w))continue;E=k.slice(w.length)}if(!E)continue;const R=E.indexOf("/");R===-1?N(g)?h.add(E):u.push({...g,name:E}):h.add(E.slice(0,R))}const b=[...h].map(g=>({type:"dir",name:g})),y=u.map(g=>({type:"file",name:g.name,item:g}));return{dirs:b,files:y}}function Te(o,s){return o.localeCompare(s,void 0,{sensitivity:"base",numeric:!0})}function ut(o,s){const h=`${f(o)}/`;let u=0;for(const b of s)f(b.path).startsWith(h)&&(u+=b.file.size);return u}function xt(){const o=document.getElementById("ct-compress-files-root");if(!o||o.dataset.ctCompressBound==="1")return;o.dataset.ctCompressBound="1";const s=document.getElementById("ctZipDrop"),p=document.getElementById("ctZipDropWrap"),h=document.getElementById("ctZipBrowseModal"),u=document.getElementById("ctZipModalPickFiles"),b=document.getElementById("ctZipModalPickFolder"),y=document.getElementById("ctZipFiles"),g=document.getElementById("ctZipFolder"),k=document.getElementById("ctZipFormat"),E=document.getElementById("ctZipFilename"),R=document.getElementById("ctZipFilenameExt"),w=document.getElementById("ctZipBtn"),me=document.getElementById("ctZipBtnText"),Q=w==null?void 0:w.querySelector(".ct-zip-btn-label"),he=w==null?void 0:w.querySelector(".ct-zip-btn-spinner"),W=document.getElementById("ctZipClr"),Z=document.getElementById("ctZipReset"),ge=document.getElementById("ctZipExplorerBar"),X=document.getElementById("ctZipNavBack"),ee=document.getElementById("ctZipNavHome"),S=document.getElementById("ctZipCrumbs"),C=document.getElementById("ctZipList"),be=document.getElementById("ctZipCount"),te=document.getElementById("ctZipDeleteModal"),ye=document.getElementById("ctZipDeleteModalBody"),ve=document.getElementById("ctZipDeleteConfirm"),V=document.getElementById("ctZipNewFolderBtn"),ne=document.getElementById("ctZipNewFolderRow"),F=document.getElementById("ctZipNewFolderInput"),ie=document.getElementById("ctZipNewFolderOk"),re=document.getElementById("ctZipNewFolderCancel"),A=document.getElementById("ctZipProgressWrap"),v=nt({barId:"ctZipProgBar",labelId:"ctZipProgLabel",percentId:"ctZipProgPct",detailId:"ctZipProgDetail"});if(!s||!p||!h||!u||!b||!y||!g||!k||!E||!w||!S||!C||!be||!ge||!X||!ee||!W||!Z||!te||!ye||!ve||!V||!ne||!F||!ie||!re)return;const we=$e.getOrCreateInstance(h),oe=$e.getOrCreateInstance(te);let M=null,q=!1;function Ne(){if(!M)return;const e=M;if(M=null,e.kind==="file"){const t=a.find(n=>n.id===e.id);t&&$.delete(t.path),a=a.filter(n=>n.id!==e.id)}else if(e.kind==="dir"){const t=f(e.path),n=`${t}/`;He(i=>i.path===t||i.path.startsWith(n))}else e.kind==="clear_all"?(a=[],$.clear(),l=""):e.kind==="reset_all"&&(a=[],$.clear(),l="",k.value="zip",E.value=pe,y.value="",g.value="",J());U(!1),T(),x()}function G(e){M=e.kind==="file"?{kind:"file",id:e.id}:e.kind==="dir"?{kind:"dir",path:e.path}:e.kind==="clear_all"?{kind:"clear_all"}:{kind:"reset_all"},ye.innerHTML=`<strong>${I(e.title)}</strong><br><span class="text-body-secondary">${I(e.detail)}</span>`,q=!1,oe.show()}ve.addEventListener("click",()=>{if(!M){oe.hide();return}q=!0,Ne(),oe.hide()}),te.addEventListener("hidden.bs.modal",()=>{q||(M=null),q=!1});let a=[];const $=new Set,j=new Set;let l="";function Ee(){return a.reduce((e,t)=>
1e+t.file.size,0)}function Y(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(2)} MB`}function I(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function ze(e){return I(e).replace(/'/g,"&#39;")}function P(){return a.length===0&&k.value==="zip"&&E.value.trim()===pe}function ke(){const e=a.length;w.disabled=e===0,W.disabled=e===0,Z.disabled=P(),be.textContent=e===0?"No files selected":`${e} item(s) · ${Y(Ee())} total`}function J(){me&&(me.textContent="Compress & download"),R&&(R.textContent=`.${Me(k.value)}`)}function Re(){j.clear();for(const e of a){const t=f(e.path);N(e)&&j.add(t)}}function T(){if(Re(),a.length===0){l="";return}for(;l;){const{dirs:e,files:t}=K(l,a);if(e.length+t.length>0)break;const n=f(l);if(j.has(n))break;l=Ae(l)}}function xe(){if(a.length===0){S.innerHTML="";return}if(!l){S.innerHTML='<span class="text-body-secondary fw-medium">Archive root</span>';return}const e=l.split("/").filter(Boolean),t=[];t.push('<button type="button" class="btn btn-link btn-sm p-0 ct-zip-crumb" data-ct-zip-crumb="">Archive root</button>');for(let n=0;n<e.length;n+=1){const i=e.slice(0,n+1).join("/"),r=I(e[n]),c=encodeURIComponent(i);t.push(lt),n===e.length-1?t.push(`<span class="fw-medium text-body" aria-current="page">${r}</span>`):t.push(`<button type="button" class="btn btn-link btn-sm p-0 ct-zip-crumb" data-ct-zip-crumb="${c}">${r}</button>`)}S.innerHTML=`<div class="d-flex flex-wrap align-items-center">${t.join("")}</div>`}function Se(){const e=a.length>0;ge.classList.toggle("d-none",!e),X.disabled=!l,ee.disabled=!l}const Pe=`
2        <div class="ct-app-file-empty">
3            <div class="ct-app-file-empty__icon" aria-hidden="true">
4                <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" viewBox="0 0 16 16" focusable="false">
5                    <path d="M.54 3.87.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3h3.982a2 2 0 0 1 1.992 2.181l-.637 7A2 2 0 0 1 13.174 14H2.825a2 2 0 0 1-1.991-1.819l-.637-7a1.99 1.99 0 0 1 .342-1.31zM2.19 4a1 1 0 0 0-.996 1.09l.637 7a1 1 0 0 0 .995.91h10.348a1 1 0 0 0 .995-.91l.637-7A1 1 0 0 0 13.81 4H2.19z"/>
6                </svg>
7            </div>
8            <p class="ct-app-file-empty__title mb-1">Your archive is empty</p>
9            <p class="ct-app-file-empty__hint small text-body-secondary mb-0">Use the upload bar above to drop files or folders, or click it to browse.</p>
10        </div>`;function x(){if(ke(),J(),T(),Se(),a.length===0){C.innerHTML=Pe,xe();return}xe();const{dirs:e,files:t}=K(l,a),n=[...e].sort((m,L)=>Te(m.name,L.name)),i=[...t].sort((m,L)=>Te(m.name,L.name));if(n.length+i.length===0){const m=f(l);if(j.has(m)){const L=m.includes("/")?m.slice(m.lastIndexOf("/")+1):m;C.innerHTML=`<div class="ct-zip-empty-folder px-3 py-4 text-center"><p class="mb-2 small text-body-secondary">You are inside <strong class="text-body">${I(L)}</strong>. This folder is empty.</p><p class="mb-0 small text-body-secondary">Use <strong>New folder</strong> above or add files while this folder is open in the path bar.</p></div>`}else C.innerHTML='<div class="text-body-secondary small px-3 py-4 text-center">This folder is empty.</div>';return}const r='<thead class="ct-zip-table-head table-light"><tr><th scope="col" class="ct-zip-col-name">Name</th><th scope="col" class="d-none d-md-table-cell ct-zip-col-type">Type</th><th scope="col" class="text-end ct-zip-col-size">Size</th><th scope="col" class="text-end ct-zip-col-action">Actions</th></tr></thead>',c=m=>{const L=_(l,m.name),fe=ut(L,a),Ke=encodeURIComponent(m.name),Qe=encodeURIComponent(L),Xe=I(m.name);return`<tr class="ct-zip-tr ct-zip-tr--dir" tabindex="0" role="button" data-ct-zip-enter="${Ke}" aria-label="Open folder ${ze(m.name)}"><td class="ct-zip-col-name"><span class="d-flex align-items-center gap-2 min-w-0">${st}<span class="text-truncate fw-medium">${Xe}</span></span></td><td class="d-none d-md-table-cell text-body-secondary small">File folder</td><td class="text-end text-body-secondary small text-nowrap">${I(Y(fe))}</td><td class="text-end"><button type="button" class="btn btn-sm btn-outline-danger ct-zip-del-btn" data-ct-zip-rm-dir="${Qe}" title="Delete folder and contents">Delete</button></td></tr>`},d=m=>{const L=m.item,fe=I(m.name);return`<tr class="ct-zip-tr"><td class="ct-zip-col-name"><span class="d-flex align-items-center gap-2 min-w-0">${at}<span class="text-truncate font-monospace small" title="${ze(L.path)}">${fe}</span></span></td><td class="d-none d-md-table-cell text-body-secondary small">File</td><td class="text-end text-body-secondary small text-nowrap">${I(Y(L.file.size))}</td><td class="text-end"><button type="button" class="btn btn-sm btn-outline-danger ct-zip-del-btn" data-ct-zip-rm="${L.id}" title="Remove file">Delete</button></td></tr>`},B=[];for(const m of n)B.push(c(m));for(const m of i)B.push(d(m));const z=B.join("");C.innerHTML=`<div class="table-responsive"><table class="table table-hover table-sm align-middle mb-0 ct-zip-explorer-table">${r}<tbody>${z}</tbody></table></div>`}function He(e){for(const t of a)e(t)&&$.delete(t.path);a=a.filter(t=>!e(t))}C.addEventListener("click",e=>{const t=e.target,n=t.closest("[data-ct-zip-rm-dir]");if(n){const c=n.getAttribute("data-ct-zip-rm-dir");if(c==null||c==="")return;const d=f(decodeURIComponent(c)),B=a.filter(z=>z.path===d||z.path.startsWith(`${d}/`)).length;G({kind:"dir",path:d,title:"Delete folder?",detail:`Remove folder "${d}" and ${B} item(s) inside it from the archive?`});return}const i=t.closest("[data-ct-zip-rm]");if(i){const c=i.getAttribute("data-ct-zip-rm");if(!c)return;const d=a.find(B=>B.id===c);if(!d)return;G({kind:"file",id:c,title:"Delete file?",detail:`Remove "${d.path}" from the archive?`});return}const r=t.closest("tr[data-ct-zip-enter]");if(r){const c=r.getAttribute("data-ct-zip-enter");if(c==null)return;const d=decodeURIComponent(c);l=f(_(l,d)),x()}},!0),C.addEventListener("dblclick",e=>{const t=e.target.closest("tr[data-ct-zip-enter]");if(!t||e.target.closest("[data-ct-zip-rm], [data-ct-zip-rm-dir]"))return;const n=t.getAttribute("data-ct-zip-enter");n!=null&&(l=f(_(l,decodeURIComponent(n))),x())}),C.addEventListener("keydown",e=>{if(e.key!=="Enter")return;const t=e.target.closest("tr[data-ct-zip-enter]");if(!t)return;e.preventDefault();const n=t.getAttribute("data-ct-zip-enter");n!=null&&(l=f(_(l,decodeURIComponent(n))),x())}),S.addEventListener("click",e=>{const t=e.target.closest("[data-ct-zip-crumb]");if(!t)return;const n=t.getAttribute("data-ct-zip-crumb");l=n===null||n===""?"":f(decodeURIComponent(n)),x()}),X.addEventListener("click",()=>{l=Ae(l),x()}),ee.addEventListener("click",()=>{l="",x()}),k.addEventListener("change",()=>{J(),Z.disabled=P()}),E.addEventListener("input",()=>{Z.disabled=P()});function ae(e){const t=f(e);return l?_(l,t):t}function Oe(e){const t=String(e).trim();return!(!t||t.includes("/")||t.includes("\\")||t==="."||t==="..")}function se(e,t){const n=f(t);if(!n)return!1;if($.has(n))return D(`A file with this path is already in the list: ${n}`),!1;for(const i of a){const r=f(i.path);if(n.startsWith(`${r}/`)&&!N(i))return D(`Cannot add "${n}" because "${r}" is already a file in the archive.`),!1}for(const i of a){const r=f(i.path);if(r.startsWith(`${n}/`)&&!N(i))return D(`Cannot add "${n}" as a file because a path inside it already exists (e.g. "${r}").`),!1}return $.add(n),a.push({id:Ze(),file:e,path:n}),!0}function Ue(e){const t=String(e).trim();if(!Oe(t))return D('Enter a valid folder name (no slashes, not "." or "..").'),!1;const n=f(_(l,t));
10if(!n)return D("Enter a valid folder name."),!1;if($.has(n))return D(`Something already exists at "${n}".`),!1;const{dirs:i,files:r}=K(l,a);if(i.some(d=>d.name===t))return D("A folder with that name already exists here."),!1;if(r.some(d=>d.name===t))return D("A file with that name already exists here."),!1;$.add(n);const c=new File([],t,{type:"application/octet-stream"});return a.push({id:Ze(),file:c,path:n,kind:"dir",ctEmptyDir:!0}),!0}function We(){const e=new Set,t=K(l,a);for(const r of t.dirs)e.add(r.name);for(const r of t.files)e.add(r.name);const n="New folder";if(!e.has(n))return n;let i=2;for(;e.has(`${n} (${i})`);)i+=1;return`${n} (${i})`}function le(e){const t=Array.from(e);if(t.length===0){D("That folder is empty. Choose a folder that contains at least one file.");return}let n=0;for(const i of t){const r=i.webkitRelativePath&&i.webkitRelativePath.length>0?i.webkitRelativePath:i.name;se(i,ae(r))&&(n+=1)}if(n===0){D("Could not add any files from that selection. The folder may only contain empty subfolders, or paths may conflict with items already in the list.");return}T(),x()}let ce=0,H=0;function Ve(){we.hide()}function Be(){Date.now()<H||we.show()}let de=null;function Le(e){de=e,H=Date.now()+1e3,Ve()}h.addEventListener("hidden.bs.modal",()=>{const e=de;de=null,e&&(H=Date.now()+1e3,window.setTimeout(()=>{e==="files"?y.click():g.click()},0))}),p.addEventListener("click",e=>{if(e.target!==y){if(Date.now()-ce<600||Date.now()<H){e.preventDefault(),e.stopPropagation();return}Be()}},!0),s.addEventListener("keydown",e=>{if(!(e.key!=="Enter"&&e.key!==" ")){if(Date.now()-ce<600||Date.now()<H){e.preventDefault();return}e.preventDefault(),Be()}}),u.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),Le("files")}),b.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),Le("folder")}),y.addEventListener("change",()=>{var e;(e=y.files)!=null&&e.length&&le(y.files),y.value=""}),g.addEventListener("change",()=>{var e;(e=g.files)!=null&&e.length&&le(g.files),g.value=""});function qe(e){var i,r,c;const t=(i=e.files)!=null&&i.length?Array.from(e.files):[],n=[];if((r=e.items)!=null&&r.length&&typeof e.items[0].webkitGetAsEntry=="function")for(const d of Array.from(e.items)){if(d.kind!=="file")continue;const B=(c=d.webkitGetAsEntry)==null?void 0:c.call(d);B&&n.push(B)}return{files:t,entries:n}}async function Ge(e,t){if(t.some(i=>i.isDirectory)&&t.length){const i=[];for(const r of t)i.push(...await ue(r,""));if(i.length){let r=0;for(const{file:c,path:d}of i)se(c,ae(d))&&(r+=1);r&&(T(),x());return}}if(e.length){le(e);return}if(t.length){const i=[];for(const r of t)i.push(...await ue(r,""));if(i.length){let r=0;for(const{file:c,path:d}of i)se(c,ae(d))&&(r+=1);r&&(T(),x())}}}let O=0;p.addEventListener("dragenter",e=>{e.preventDefault(),O+=1,s.classList.add("ct-zip-drop--active")}),p.addEventListener("dragover",e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy",s.classList.add("ct-zip-drop--active")}),p.addEventListener("dragleave",e=>{e.preventDefault(),O=Math.max(0,O-1),O===0&&s.classList.remove("ct-zip-drop--active")}),p.addEventListener("drop",e=>{O=0,ce=Date.now(),e.preventDefault(),s.classList.remove("ct-zip-drop--active");const t=e.dataTransfer;if(!t)return;const n=qe(t);Ge(n.files,n.entries)}),W.addEventListener("click",()=>{a.length!==0&&G({kind:"clear_all",title:"Clear all items?",detail:`Remove all ${a.length} item(s) from the archive list?`})}),Z.addEventListener("click",()=>{P()||G({kind:"reset_all",title:"Reset everything?",detail:"Clear the file list, format, and file inputs."})});function U(e){ne.classList.toggle("d-none",!e),ne.classList.toggle("d-flex",e),V.classList.toggle("d-none",e),e&&(F.value=We(),queueMicrotask(()=>{F.focus(),F.select()}
10))}function De(e){w.disabled=e||a.length===0,w.classList.toggle("is-loading",e),w.setAttribute("aria-busy",e?"true":"false"),Q&&(Q.classList.toggle("invisible",e),Q.setAttribute("aria-hidden",e?"true":"false")),he&&he.classList.toggle("d-none",!e),V.disabled=e,ie.disabled=e,re.disabled=e,F.disabled=e,k.disabled=e,E.disabled=e,W.disabled=e||a.length===0,Z.disabled=e||P()}function je(){A&&(A.classList.add("is-active"),A.setAttribute("aria-hidden","false")),v==null||v.beginEncoding("Preparing archive…")}function Ye(){A&&(A.classList.remove("is-active"),A.setAttribute("aria-hidden","false")),v==null||v.hardReset("Ready")}let Ie=[];function Je(e){const{pct:t,label:n,detail:i,detailTitle:r}=rt(e,{verb:"Compressing",pathOrder:Ie});v==null||v.setEncoding(t,n,void 0,i,r)}V.addEventListener("click",()=>{U(!0)}),re.addEventListener("click",()=>{U(!1)});function Ce(){Ue(F.value)&&(U(!1),T(),x())}ie.addEventListener("click",()=>{Ce()}),F.addEventListener("keydown",e=>{e.key==="Enter"&&(e.preventDefault(),Ce()),e.key==="Escape"&&(e.preventDefault(),U(!1))}),w.addEventListener("click",async()=>{if(a.length===0){D("Please add at least one file or folder to compress.");return}const e=k.value,t=Ee();t>ot&&Fe(`Compressing ${Y(t)} in your browser may take a while and needs enough free memory on this device.`),De(!0),je();try{const n=new et;Ie=a.filter(z=>!N(z)).map(z=>f(z.path));for(const z of a)N(z)?ft(n,z.path):dt(n,z.file,z.path);const i=e==="zip"||e==="GZip"?{type:"blob",compression:"DEFLATE",compressionOptions:{level:6}}:{type:"blob"};let r=await n.generateAsync(i,Je),c=Me(e),d="Archive downloaded.";e==="GZip"&&(typeof CompressionStream<"u"?(v==null||v.setEncoding(it(88,99,50),"Applying GZIP wrapper…"),r=await new Response(r.stream().pipeThrough(new CompressionStream("gzip"))).blob(),c="gz"):(c="zip",d="Archive downloaded as .zip (gzip wrap needs a newer browser; content is still a ZIP you can open here).")),v==null||v.setDone("Done — download started");const B=`${ct(E.value)}.${c}`;tt(r,B),Fe(d)}catch(n){v==null||v.setState({pct:0,labelText:"Compression failed",phase:"error"}),D(n instanceof Error?n.message:"Could not build archive.")}finally{De(!1),ke(),Ye()}}),J(),x()}export{xt as initCompressFilesPage};

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.