var Base64={_basekey:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",decode:function(d,c){if(!d){return""}var a="";var l,j,g;var k,h,f,e;var b=0;d=d.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(b<d.length){k=this._basekey.indexOf(d.charAt(b++));h=this._basekey.indexOf(d.charAt(b++));f=this._basekey.indexOf(d.charAt(b++));e=this._basekey.indexOf(d.charAt(b++));l=(k<<2)|(h>>4);j=((h&15)<<4)|(f>>2);g=((f&3)<<6)|e;a=a+String.fromCharCode(l);if(f!=64){a=a+String.fromCharCode(j)}if(e!=64){a=a+String.fromCharCode(g)}}if(!c){a=Base64._utf8_decode(a)}return a},encode:function(d,c){if(!d){return""}var a="";var l,j,g,k,h,f,e;var b=0;if(!c){d=Base64._utf8_encode(d)}while(b<d.length){l=d.charCodeAt(b++);j=d.charCodeAt(b++);g=d.charCodeAt(b++);k=l>>2;h=((l&3)<<4)|(j>>4);f=((j&15)<<2)|(g>>6);e=g&63;if(isNaN(j)){f=e=64}else{if(isNaN(g)){e=64}}a=a+this._basekey.charAt(k)+this._basekey.charAt(h)+this._basekey.charAt(f)+this._basekey.charAt(e)}return a},_utf8_decode:function(a){var b="";var e=0;var g=0;var f=0;var d=0;while(e<a.length){g=a.charCodeAt(e);if(g<128){b+=String.fromCharCode(g);e++}else{if((g>191)&&(g<224)){d=a.charCodeAt(e+1);b+=String.fromCharCode(((g&31)<<6)|(d&63));e+=2}else{d=a.charCodeAt(e+1);c3=a.charCodeAt(e+2);b+=String.fromCharCode(((g&15)<<12)|((d&63)<<6)|(c3&63));e+=3}}}return b},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e<b.length;e++){var d=b.charCodeAt(e);if(d<128){a+=String.fromCharCode(d)}else{if((d>127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128)}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128)}}}return a}};