const d=t=>{const o=new XMLHttpRequest;return o.open("HEAD",t,!1),o.send(),o.status!==404},r=(t,o=2)=>{if(t===0)return"0 Bytes";const e=1024,s=o<0?0:o,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.floor(Math.log(t)/Math.log(e));return parseFloat((t/Math.pow(e,n)).toFixed(s))+" "+a[n]},c=(t,o)=>{const e=document.createElement("a");e.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(o)),e.setAttribute("download",t),e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e)},l=t=>t.split(".").pop();export{d as a,c as d,r as f,l as g};
