var transcode_image=function(t){function e(t){const e=512;const n=atob(t);const r=[];for(let t=0;t<n.length;t+=e){const o=n.slice(t,t+e);const c=new Array(o.length);for(let t=0;t<o.length;t++){c[t]=o.charCodeAt(t)}r.push(new Uint8Array(c))}return new Blob(r)}function n(t){return new Promise(((e,n)=>{t.arrayBuffer().then((t=>{const n=new Uint8Array(t);let r="";for(let t=0;t<n.length;t++){r+=String.fromCharCode(n[t])}e(btoa(r))}),n)}))}function r(t,r,o,c,a){return new Promise(((i,s)=>{const h=document.createElement("img");h.addEventListener("load",(t=>{const e=document.createElement("canvas");e.width=o??h.width;e.height=c??h.height;const d=e.getContext("2d");d.drawImage(h,0,0,e.width,e.height);e.toBlob((t=>{n(t).then(i,s)}),r,a)}));h.addEventListener("error",s);h.src=URL.createObjectURL(e(t))}))}t.transcodeImage=r;return t}({});