var c=class{static downloadResponseData(t,n){let e=document.createElement("a");e.href=URL.createObjectURL(n),e.setAttribute("type","hidden"),e.setAttribute("download",t),document.body.appendChild(e),e.click(),e.remove()}static downloadFile(t,n){if(!n){let a=t.split("/");n=a[a.length-1]}let e=document.createElement("a");e.href=t,e.setAttribute("type","hidden"),e.setAttribute("download",n),document.body.appendChild(e),e.click(),e.remove()}static getFilenameFromHeader(t){if(t&&t.indexOf("attachment")!==-1){let e=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(t);return e!=null&&e[1]?e[1].replace(/['"]/g,""):null}}};export{c as a};
