function s(n){return new Promise((o,l)=>{let r=new FileReader;r.onload=e=>{var t;o((t=e.target)==null?void 0:t.result)},r.onerror=e=>{l(Error(`Failed to read blob: ${e.type}`))},r.readAsDataURL(n)})}function b(n){var d;let[o,l]=n.split(",",2),r=(d=/^data:(.+);base64$/.exec(o))==null?void 0:d[1],e=atob(l),t=e.length,i=new Uint8Array(t);for(let a=0;a<t;a++)i[a]=e.charCodeAt(a);return new Blob([i],{type:r})}export{s as n,b as t};
