PageSourceSearch

https://www.ihatepdf.cv/assets/Pdftoziptool-DRFHnzl0.js

js ihatepdf.cv collected 2026-09-30 17:26:20 UTC 23,557 bytes, 1 lines download raw bytes

1import{r,j as e}from"./react-vendor-D653VjAu.js";const m=({children:s,className:l="w-5 h-5",...t})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:l,...t,children:s}),Y=s=>e.jsxs(m,{...s,children:[e.jsx("path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5Z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"}),e.jsx("line",{x1:"10",y1:"12",x2:"14",y2:"12"}),e.jsx("line",{x1:"12",y1:"10",x2:"12",y2:"14"}),e.jsx("rect",{x:"9",y:"14",width:"6",height:"4",rx:"0.5"})]}),ue=s=>e.jsxs(m,{...s,children:[e.jsx("path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5Z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"}),e.jsx("line",{x1:"8",y1:"13",x2:"16",y2:"13"}),e.jsx("line",{x1:"8",y1:"17",x2:"16",y2:"17"}),e.jsx("line",{x1:"8",y1:"9",x2:"10",y2:"9"})]}),pe=s=>e.jsxs(m,{...s,children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"16"}),e.jsx("line",{x1:"8",y1:"12",x2:"16",y2:"12"})]}),H=s=>e.jsxs(m,{...s,children:[e.jsx("polyline",{points:"3 6 5 6 21 6"}),e.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),e.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4a2 2 0 0 1 2 2v2"})]}),V=s=>e.jsxs(m,{...s,children:[e.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),e.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}),ne=s=>e.jsx(m,{...s,children:e.jsx("polyline",{points:"20 6 9 17 4 12"})}),ie=s=>e.jsxs(m,{...s,children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),fe=s=>e.jsxs(m,{...s,children:[e.jsx("circle",{cx:"9",cy:"6",r:"1",fill:"currentColor",stroke:"none"}),e.jsx("circle",{cx:"15",cy:"6",r:"1",fill:"currentColor",stroke:"none"}),e.jsx("circle",{cx:"9",cy:"12",r:"1",fill:"currentColor",stroke:"none"}),e.jsx("circle",{cx:"15",cy:"12",r:"1",fill:"currentColor",stroke:"none"}),e.jsx("circle",{cx:"9",cy:"18",r:"1",fill:"currentColor",stroke:"none"}),e.jsx("circle",{cx:"15",cy:"18",r:"1",fill:"currentColor",stroke:"none"})]}),ee=s=>e.jsxs(m,{...s,children:[e.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.jsx("polyline",{points:"7 10 12 15 17 10"}),e.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),ge=s=>e.jsxs(m,{...s,children:[e.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),e.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),je=s=>e.jsx(m,{...s,children:e.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}),se=s=>e.jsxs(m,{...s,children:[e.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"5"}),e.jsx("polyline",{points:"5 12 12 5 19 12"})]}),te=s=>e.jsxs(m,{...s,children:[e.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.jsx("polyline",{points:"19 12 12 19 5 12"})]}),w=s=>s===0?"0 B":s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(2)} MB`,be=()=>new Promise((s,l)=>{if(window.JSZip)return s(window.JSZip);const t=document.createElement("script");t.src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js",t.onload=()=>s(window.JSZip),t.onerror=l,document.head.appendChild(t)}),ze=()=>Math.random().toString(36).slice(2),W=[{value:0,label:"None",sub:"No compression",dot:"#3f3f46"},{value:3,label:"Fast",sub:"Light compression",dot:"#71717a"},{value:6,label:"Balanced",sub:"Good ratio",dot:"#a1a1aa"},{value:9,label:"Max",sub:"Smallest file",dot:"#e4e4e7"}];function ve({pct:s,size:l=64,stroke:t=5}){const a=(l-t)/2,j=2*Math.PI*a,N=(100-s)/100*j;return e.jsxs("svg",{width:l,height:l,style:{transform:"rotate(-90deg)"},children:[e.jsx("circle",{cx:l/2,cy:l/2,r:a,fill:"none",stroke:"#27272a",strokeWidth:t}),e.jsx("circle",{cx:l/2,cy:l/2,r:a,fill:"none",stroke:"#d4d4d8",strokeWidth:t,strokeDasharray:j,strokeDashoffset:N,strokeLinecap:"round",style:{transition:"stroke-dashoffset 0.3s ease"}})]})}function S({label:s,value:l,bright:t=!1}){return e.jsxs("div",{className:`flex flex-col items-center justify-center gap-0.5 px-2 py-2.5 sm:px-4 sm:py-3 rounded-xl border ${t?"border-zinc-600 bg-zinc-800":"border-zinc-800 bg-zinc-900/40"}`,children:[e.jsx("span",{className:`text-base sm:text-lg font-bold tabular-nums truncate max-w-full px-1 ${t?"text-white":"text-zinc-200"}`,children:l}),e.jsx("span",{className:"text-[9px] sm:text-[10px] text-zinc-500 uppercase tracking-wider text-center",children:s})]})}function we({value:s,onChange:l}){return e.jsx("div",{className:"grid grid-cols-4 gap-1.5 sm:gap-2",children:W.map(t=>{const a=s===t.value;return e.jsxs("button",{onClick:()=>l(t.value),className:`flex flex-col items-center gap-1 p-2 sm:p-3 rounded-xl border transition-all duration-200 min-h-[56px] sm:min-h-0 ${a?"border-zinc-500 bg-zinc-800":"border-zinc-800 bg-zinc-900/40 hover:border-zinc-700 hover:bg-zinc-900/60"}`,children:[e.jsx("div",{className:"w-2 h-2 rounded-full transition-colors duration-200 flex-shrink-0",style:{background:a?t.dot:"#27272a"}}),e.jsx("span",{className:`text-xs font-bold transition-colors duration-200 leading-none ${a?"text-zinc-100":"text-zinc-600"}`,children:t.label}),e.jsx("span",{className:"text-[9px] text-zinc-600 text-center leading-tight hidden sm:block",children:t.sub})]},t.value)})})}function Ne({file:s,index:l,total:t,onRemove:a,onRename:j,onMoveUp:N,onMoveDown:p,isDragging:
1M,isOver:b}){const[z,f]=r.useState(!1),[F,h]=r.useState(s.alias),g=r.useRef(null);r.useEffect(()=>{z&&g.current?.focus()},[z]);const y=()=>{j(F.trim()||s.alias),f(!1)};return e.jsxs("div",{className:`relative flex items-center gap-2 sm:gap-3 px-3 sm:px-4 py-3 rounded-xl border transition-all duration-200 select-none ${M?"opacity-40 scale-[0.98]":b?"border-zinc-500 bg-zinc-800 shadow-lg":"border-zinc-800 bg-zinc-900/60 hover:border-zinc-700 hover:bg-zinc-900"}`,children:[e.jsx("div",{className:"hidden sm:block cursor-grab active:cursor-grabbing text-zinc-700 hover:text-zinc-500 transition-colors flex-shrink-0",children:e.jsx(fe,{className:"w-4 h-4"})}),e.jsx("div",{className:"hidden sm:flex w-6 h-6 rounded-md bg-zinc-800 items-center justify-center flex-shrink-0",children:e.jsx("span",{className:"text-[10px] font-bold text-zinc-500",children:l+1})}),e.jsx("div",{className:"w-8 h-8 sm:w-9 sm:h-9 rounded-lg flex items-center justify-center flex-shrink-0 bg-zinc-800 border border-zinc-700",children:e.jsx(ue,{className:"w-4 h-4 sm:w-5 sm:h-5 text-zinc-400"})}),e.jsx("div",{className:"flex-1 min-w-0",children:z?e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("input",{ref:g,value:F,onChange:u=>h(u.target.value),onKeyDown:u=>{u.key==="Enter"&&y(),u.key==="Escape"&&(h(s.alias),f(!1))},className:"flex-1 bg-zinc-800 border border-zinc-600 rounded-md px-2 py-1 text-sm text-white outline-none focus:border-zinc-400 transition-colors min-w-0",placeholder:"filename.pdf"}),e.jsx("button",{"aria-label":"Confirm",onClick:y,className:"text-zinc-300 hover:text-white transition-colors flex-shrink-0 p-1",children:e.jsx(ne,{className:"w-4 h-4"})}),e.jsx("button",{"aria-label":"Close",onClick:()=>{h(s.alias),f(!1)},className:"text-zinc-600 hover:text-zinc-400 transition-colors flex-shrink-0 p-1",children:e.jsx(ie,{className:"w-4 h-4"})})]}):e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-zinc-200 truncate",title:s.alias,children:s.alias}),e.jsx("p",{className:"text-xs text-zinc-600 mt-0.5",children:w(s.size)})]})}),!z&&e.jsxs("div",{className:"hidden sm:flex items-center gap-1 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity flex-shrink-0",children:[e.jsx("button",{onClick:N,disabled:l===0,className:"w-7 h-7 flex items-center justify-center rounded-md hover:bg-zinc-700 text-zinc-600 hover:text-zinc-300 transition-all disabled:opacity-20 disabled:cursor-not-allowed",title:"Move up",children:e.jsx(se,{className:"w-3.5 h-3.5"})}),e.jsx("button",{onClick:p,disabled:l===t-1,className:"w-7 h-7 flex items-center justify-center rounded-md hover:bg-zinc-700 text-zinc-600 hover:text-zinc-300 transition-all disabled:opacity-20 disabled:cursor-not-allowed",title:"Move down",children:e.jsx(te,{className:"w-3.5 h-3.5"})}),e.jsx("button",{onClick:()=>{h(s.alias),f(!0)},className:"w-7 h-7 flex items-center justify-center rounded-md hover:bg-zinc-700 text-zinc-600 hover:text-zinc-300 transition-all",title:"Rename",children:e.jsx(V,{className:"w-3.5 h-3.5"})}),e.jsx("button",{onClick:a,className:"w-7 h-7 flex items-center justify-center rounded-md hover:bg-zinc-700 text-zinc-600 hover:text-zinc-300 transition-all",title:"Remove",children:e.jsx(H,{className:"w-3.5 h-3.5"})})]}),!z&&e.jsxs("div",{className:"flex sm:hidden items-center gap-0.5 flex-shrink-0",children:[e.jsx("button",{"aria-label":"Move up",onClick:N,disabled:l===0,className:"w-8 h-8 flex items-center justify-center rounded-lg active:bg-zinc-700 text-zinc-600 active:text-zinc-300 transition-all disabled:opacity-20 disabled:cursor-not-allowed",children:e.jsx(se,{className:"w-4 h-4"})}),e.jsx("button",{"aria-label":"Move down",onClick:p,disabled:l===t-1,className:"w-8 h-8 flex items-center justify-center rounded-lg active:bg-zinc-700 text-zinc-600 active:text-zinc-300 transition-all disabled:opacity-20 disabled:cursor-not-allowed",children:e.jsx(te,{className:"w-4 h-4"})}),e.jsx("button",{"aria-label":"Edit",onClick:()=>{h(s.alias),f(!0)},className:"w-8 h-8 flex items-center justify-center rounded-lg active:bg-zinc-700 text-zinc-600 active:text-zinc-300 transition-all",children:e.jsx(V,{className:"w-4 h-4"})}),e.jsx("button",{"aria-label":"Delete",onClick:a,className:"w-8 h-8 flex items-center justify-center rounded-lg active:bg-zinc-700 text-zinc-600 active:text-zinc-300 transition-all",children:e.jsx(H,{className:"w-4 h-4"})})]})]})}function ke({showNotification:s,showDownloadDialog:l}){const[t,a]=r.useState([]),[j,N]=r.useState("my-documents"),[p,M]=r.useState(6),[b,z]=r.useState(!1),[f,F]=r.useState("PDFs"),[h,g]=r.useState("idle"),[y,u]=r.useState(0),[J,I]=r.useState(""),[v,R]=r.useState(null),[P,L]=r.useState(!1),[E,K]=r.useState(null),[$,G]=r.useState(null),X=r.useRef(null),Z=r.useRef(null),k=r.useMemo(()=>t.reduce((n,i)=>
1n+i.size,0),[t]),O=r.useCallback(n=>{const i=Array.from(n).filter(c=>c.type==="application/pdf"||c.name.toLowerCase().endsWith(".pdf"));if(!i.length){s("Only PDF files are accepted","error");return}const o=i.filter(c=>t.some(x=>x.name===c.name&&x.size===c.size));o.length&&s(`${o.length} duplicate(s) skipped`,"error");const d=i.filter(c=>!t.some(x=>x.name===c.name&&x.size===c.size));d.length&&(a(c=>[...c,...d.map(x=>({id:ze(),file:x,name:x.name,alias:x.name,size:x.size}))]),g("idle"),R(null),s(`${d.length} file${d.length>1?"s":""} added`,"success"))},[t,s]),le=r.useCallback(n=>{n.preventDefault(),L(!1),O(n.dataTransfer.files)},[O]),re=n=>{n.preventDefault(),L(!0)},ae=n=>{X.current?.contains(n.relatedTarget)||L(!1)},ce=n=>a(i=>i.filter(o=>o.id!==n)),oe=(n,i)=>a(o=>o.map(d=>d.id===n?{...d,alias:i}:d)),T=(n,i)=>{i<0||i>=t.length||a(o=>{const d=[...o],[c]=d.splice(n,1);return d.splice(i,0,c),d})},de=()=>{a([]),g("idle"),R(null),u(0)},xe=()=>{if(E!==null&&$!==null){const n=t.findIndex(i=>i.id===E);n!==-1&&n!==$&&T(n,$)}K(null),G(null)},_=async()=>{if(t.length){g("processing"),u(0);try{const n=await be(),i=new n,o=b?i.folder(f||"PDFs"):i,d=70/t.length;for(let C=0;C<t.length;C++){const{file:me,alias:Q}=t[C];I(`Reading ${Q}…`);const he=new Uint8Array(await me.arrayBuffer());let U=Q;U.toLowerCase().endsWith(".pdf")||(U+=".pdf"),o.file(U,he,{compression:p===0?"STORE":"DEFLATE",compressionOptions:{level:p}}),u(Math.round((C+1)*d))}I("Compressing archive…"),u(72);const c=await i.generateAsync({type:"blob",compression:p===0?"STORE":"DEFLATE",compressionOptions:{level:p}},C=>u(72+Math.round(C.percent*.28)));u(100),I("Done!"),R(c.size),g("done");const x=(j.trim()||"my-documents")+".zip",q=URL.createObjectURL(c),B=Object.assign(document.createElement("a"),{href:q,download:x});document.body.appendChild(B),B.click(),setTimeout(()=>{document.body.removeChild(B),URL.revokeObjectURL(q)},1e3),s(`${x} downloaded!`,"success"),l&&l(x,c.size)}catch(n){console.error(n),g("error"),I("Failed — "+(n.message||"unknown error")),s("ZIP creation failed: "+n.message,"error")}}},A=W.find(n=>n.value===p)||W[2],D=v&&k>0?Math.round((1-v/k)*100):null;return e.jsxs("div",{className:"max-w-3xl mx-auto space-y-4 sm:space-y-6 pb-20 sm:pb-16",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 sm:w-11 sm:h-11 rounded-xl bg-zinc-800 border border-zinc-700 flex items-center justify-center flex-shrink-0",children:e.jsx(Y,{className:"w-5 h-5 text-zinc-200"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-xl sm:text-2xl font-bold text-white tracking-tight leading-tight",children:"PDF to ZIP"}),e.jsx("p",{className:"text-xs sm:text-sm text-zinc-500 mt-0.5 leading-snug",children:"Bundle multiple PDFs into a single archive — 100 % local, zero uploads."})]})]}),e.jsxs("div",{ref:X,onDrop:le,onDragOver:re,onDragLeave:ae,onClick:()=>Z.current?.click(),role:"button",tabIndex:0,"aria-label":"Drop PDF files or tap to browse",onKeyDown:n=>n.key==="Enter"&&Z.current?.click(),className:`relative rounded-2xl border-2 border-dashed cursor-pointer transition-all duration-200 overflow-hidden ${P?"border-zinc-400 bg-zinc-800/50":t.length===0?"border-zinc-700 hover:border-zinc-600 active:border-zinc-500":"border-zinc-800 hover:border-zinc-700 bg-zinc-900/20"}`,style:{minHeight:t.length===0?"200px":"96px"},children:[e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-3 p-5 text-center pointer-events-none",children:[e.jsx("div",{className:`w-11 h-11 sm:w-12 sm:h-12 rounded-xl flex items-center justify-center transition-all duration-200 ${P?"bg-zinc-600 scale-110":"bg-zinc-800"}`,children:e.jsx(pe,{className:`w-5 h-5 sm:w-6 sm:h-6 transition-colors duration-200 ${P?"text-white":"text-zinc-500"}`})}),e.jsxs("div",{children:[e.jsx("p",{className:`font-semibold text-sm transition-colors duration-200 ${P?"text-white":"text-zinc-400"}`,children:t.length===0?"Tap to browse PDFs":"Tap to add more PDFs"}),e.jsx("p",{className:"text-xs text-zinc-600 mt-0.5 hidden sm:block",children:"or drag & drop · multiple files supported"})]}),t.length===0&&e.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-4 gap-y-1 text-[11px] text-zinc-700 px-2",children:["No size limit","Runs in browser","No data uploaded"].map(n=>e.jsxs("span",{className:"flex items-center gap-1.5 whitespace-nowrap",children:[e.jsx("span",{className:"w-1 h-1 rounded-full bg-zinc-700 inline-block"}),n]},n))})]}),e.jsx("input",{ref:Z,type:"file",accept:".pdf,application/pdf",multiple:!0,className:"sr-only",onChange:n=>{O(n.target.files),n.target.value=""}})]}),t.length>0&&e.jsxs("div",{className:"grid gap-2 grid-cols-2 sm:grid-cols-4",children:[e.jsx(S,{label:"Files",value:t.length}),e.jsx(S,{label:"Total size",value:w(k)}),v!==null?e.jsxs(e.Fragment,{children:[e.jsx(S,{label:"ZIP size",value:w(v),bright:!0}),e.jsx(S,{label:"Savings",value:D!==null?`${D}%`:"—",bright:!0})]}):e.jsxs(e.Fragment,{children:[e.jsx(S,{label:"Compression",value:A.label}),e.jsx(S,{label:"Format",value:"ZIP"})]})]}),t.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("h2",{className:"text-sm font-semibold text-zinc-400 flex items-center gap-2",children:[e.jsx(je,{className:"w-4 h-4 text-zinc-600 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:"Files in archive"}),e.jsx("span",{className:"px-1.5 py-0.5 rounded bg-zinc-800 text-xs text-zinc-500 font-normal flex-shrink-0",children:t.length})]}),e.jsxs("button",{onClick:de,className:"text-xs text-zinc-600 hover:text-zinc-300 active:text-zinc-200 transition-colors flex items-center gap-1 flex-shrink-0 ml-2 py-1",children:[e.jsx(H,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"hidden xs:inline sm:inline",children:"Clear all"})]})]}),e.jsx("p",{className:"text-[11px] text-zinc-700 mb-2 sm:hidden",children:"Use ↑ ↓ arrows to reorder files."}),e.jsx("div",{className:"space-y-2",onDragEnd:xe,children:t.map((n,i)=>e.jsx("div",{draggable:!0,onDragStart:()=>K(n.id),onDragEnter:()=>G(i),className:"group",children:e.jsx(Ne,{file:n,index:i,total:t.length,onRemove:()=>ce(n.id),onRename:o=>oe(n.id,o),onMoveUp:()=>T(i,i-1),onMoveDown:()=>T(i,i+1),isDragging:E===n.id,isOver:$===i&&E!==n.id})},n.id))})]}),t.length>0&&e.jsxs("div",{className:"rounded-2xl border border-zinc-800 bg-zinc-900/40 overflow-hidden",children:[e.jsx("div",{className:"px-4 sm:px-5 py-3 sm:py-4 border-b border-zinc-800",children:e.jsx("h2",{className:"text-sm font-semibold text-zinc-300",children:"Archive Settings"})}),e.jsxs("div",{className:"p-4 sm:p-5 space-y-5 sm:space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-xs font-medium text-zinc-500 uppercase tracking-wider block",children:"ZIP file name"}),e.jsxs("div",{className:"flex",children:[e.jsx("input",{value:j,onChange:n=>N(n.target.value),placeholder:"my-documents",style:{fontSize:"16px"},className:"flex-1 bg-zinc-800/60 border border-zinc-700 rounded-l-lg px-3 py-2.5 text-sm text-white outline-none focus:border-zinc-500 transition-colors min-w-0"}),e.jsx("span",{className:"bg-zinc-800 border border-l-0 border-zinc-700 rounded-r-lg px-3 py-2.5 text-sm text-zinc-500 flex-shrink-0",children:".zip"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[e.jsx("label",{className:"text-xs font-medium text-zinc-500 uppercase tracking-wider",children:"Compression"}),e.jsxs("span",{className:"px-2 py-0.5 rounded bg-zinc-800 text-[10px] font-bold text-zinc-300 whitespace-nowrap",children:[A.label," — ",A.sub]})]}),e.jsx(we,{value:p,onChange:M})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-zinc-200",children:"Wrap in a subfolder"}),e.jsx("p",{className:"text-xs text-zinc-600 mt-0.5 leading-snug",children:"Nest all files inside a named folder within the ZIP"})]}),e.jsx("button",{onClick:()=>z(n=>!n),"aria-pressed":b,className:`relative w-12 h-6 rounded-full transition-colors duration-200 flex-shrink-0 mt-0.5 ${b?"bg-zinc-400":"bg-zinc-700"}`,children:e.jsx("span",{className:`absolute top-0.5 left-0.5 w-
15 h-5 rounded-full shadow-sm transition-transform duration-200 ${b?"translate-x-6 bg-zinc-950":"translate-x-0 bg-zinc-400"}`})})]}),b&&e.jsx("input",{value:f,onChange:n=>F(n.target.value),placeholder:"PDFs",style:{fontSize:"16px"},className:"w-full bg-zinc-800/60 border border-zinc-700 rounded-lg px-3 py-2.5 text-sm text-white outline-none focus:border-zinc-500 transition-colors"})]})]})]}),h==="processing"&&e.jsx("div",{className:"rounded-2xl border border-zinc-800 bg-zinc-900/60 p-4 sm:p-6",children:e.jsxs("div",{className:"flex items-center gap-4 sm:gap-6",children:[e.jsxs("div",{className:"relative flex-shrink-0",children:[e.jsx(ve,{pct:y,size:64,stroke:5}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsxs("span",{className:"text-xs font-bold text-white tabular-nums",children:[y,"%"]})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-zinc-200 truncate",children:J}),e.jsx("div",{className:"mt-2.5 h-1.5 rounded-full bg-zinc-800 overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-zinc-300 transition-all duration-300",style:{width:`${y}%`}})}),e.jsxs("p",{className:"text-xs text-zinc-600 mt-1.5",children:[t.length," file",t.length!==1?"s":""," · ",w(k)]})]})]})}),h==="done"&&v!==null&&e.jsx("div",{className:"rounded-2xl border border-zinc-600 bg-zinc-800/50 p-4 sm:p-5",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-3 sm:gap-4",children:[e.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:"w-9 h-9 sm:w-10 sm:h-10 rounded-xl bg-zinc-700 flex items-center justify-center flex-shrink-0",children:e.jsx(ne,{className:"w-4 h-4 sm:w-5 sm:h-5 text-white"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-semibold text-white text-sm",children:"ZIP created successfully!"}),e.jsxs("p",{className:"text-xs text-zinc-400 mt-1 leading-snug",children:[t.length," PDFs · ",w(k)," → ",e.jsx("strong",{className:"text-zinc-200",children:w(v)}),D!==null&&D>0&&e.jsxs("span",{className:"ml-1 text-zinc-300",children:["(",D,"% smaller)"]})]})]})]}),e.jsxs("button",{onClick:_,className:"w-full sm:w-auto flex items-center justify-center gap-1.5 px-4 py-2 rounded-lg bg-zinc-700 hover:bg-zinc-600 active:bg-zinc-600 text-zinc-200 text-xs font-medium transition-colors flex-shrink-0",children:[e.jsx(ee,{className:"w-3.5 h-3.5"}),"Re-download"]})]})}),h==="error"&&e.jsxs("div",{className:"rounded-2xl border border-zinc-700 bg-zinc-900 p-4 flex items-start gap-3",children:[e.jsx(ie,{className:"w-5 h-5 text-zinc-400 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-zinc-200",children:"ZIP creation failed"}),e.jsx("p",{className:"text-xs text-zinc-500 mt-1 break-words",children:J})]})]}),t.length>0&&e.jsx("div",{className:"fixed sm:static bottom-0 left-0 right-0 sm:bottom-auto sm:left-auto sm:right-auto p-3 sm:p-0 bg-zinc-950/80 sm:bg-transparent backdrop-blur-sm sm:backdrop-blur-none border-t border-zinc-800 sm:border-0 z-30",children:e.jsx("button",{onClick:_,disabled:h==="processing",className:`w-full py-3.5 sm:py-4 rounded-xl sm:rounded-2xl font-bold text-sm sm:text-base tracking-wide transition-all duration-200 flex items-center justify-center gap-2 sm:gap-3 ${h==="processing"?"bg-zinc-800 text-zinc-600 cursor-not-allowed":"bg-white text-zinc-950 hover:bg-zinc-100 active:bg-zinc-200 active:scale-[0.99] shadow-lg shadow-black/40"}`,children:h==="processing"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"w-4 h-4 sm:w-5 sm:h-5 rounded-full border-2 border-zinc-600 border-t-zinc-300 animate-spin"}),"Creating ZIP…"]}):e.jsxs(e.Fragment,{children:[e.jsx(ee,{className:"w-4 h-4 sm:w-5 sm:h-5 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:"Create & Download ZIP"}),e.jsxs("span",{className:"text-xs font-normal opacity-40 hidden sm:inline whitespace-nowrap",children:["(",t.length," file",t.length!==1?"s":""," · ",w(k),")"]})]})})}),t.length===0&&e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2 sm:gap-3 pt-1",children:[{icon:ge,title:"100% Private",desc:"All processing happens in your browser. Nothing is ever uploaded."},{icon:Y,title:"Smart Compression",desc:"4 levels from no-compression store to maximum DEFLATE shrinkage."},{icon:V,title:"Full Control",desc:"Rename files, reorder them, wrap in a subfolder — all before zipping."}].map(({icon:n,title:i,desc:o})=>e.jsxs("div",{className:"rounded-xl sm:rounded-2xl border border-zinc-800 bg-zinc-900/40 p-3.5 sm:p-4 flex sm:flex-col items-start gap-3 sm:gap-0",children:[e.jsx(n,{className:"w-4 h-4 text-zinc-500 flex-shrink-0 sm:mb-3"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-zinc-300 sm:mb-1",children:i}),e.jsx("p",{className:"text-xs text-zinc-600 leading-relaxed hidden sm:block",children:o})]})]},i))})]})}export{ke as default};

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.