@nethesis/phone-island
Version:
NethVoice CTI Phone Island
3 lines (2 loc) • 628 B
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0});const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let r=0;r<64;r++)t[e.charCodeAt(r)]=r;exports.decode=e=>{let r,n,o,d,a,c=.75*e.length,h=e.length,A=0;"="===e[e.length-1]&&(c--,"="===e[e.length-2]&&c--);const l=new ArrayBuffer(c),f=new Uint8Array(l);for(r=0;r<h;r+=4)n=t[e.charCodeAt(r)],o=t[e.charCodeAt(r+1)],d=t[e.charCodeAt(r+2)],a=t[e.charCodeAt(r+3)],f[A++]=n<<2|o>>4,f[A++]=(15&o)<<4|d>>2,f[A++]=(3&d)<<6|63&a;return l};
//# sourceMappingURL=base64-arraybuffer.js.map