function h(a,c){const{filename:l,extension:d="xlsx",onSuccess:n,onError:o}=c;return a.then(t=>{const b=new Blob([t]),e=document.createElement("a");e.href=URL.createObjectURL(b),e.download=`${l}.${d}`,e.style.display="none",document.body.appendChild(e),e.click(),e.remove(),URL.revokeObjectURL(e.href),n==null||n()}).catch(t=>{throw o==null||o(t),t})}export{h as e};
