https://github.com/beatgammit/base64-js/blob/master/base64js.min.js