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