(function(){function p(k){var b=k.util=k.util||{},l=k.jsustoolkitErrCode=k.jsustoolkitErrCode||{};b.ByteBuffer=function(a){this.data=a||"";this.read=0};b.ByteBuffer.prototype.length=function(){return this.data.length-this.read};b.ByteBuffer.prototype.isEmpty=function(){return 0===this.data.length-this.read};b.ByteBuffer.prototype.putByte=function(a){this.data+=String.fromCharCode(a)};b.ByteBuffer.prototype.fillWithByte=function(a,c){a=String.fromCharCode(a);for(var d=this.data;0>>= 1,0>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};b.ByteBuffer.prototype.putBuffer=function(a){this.data+=a.getBytes()};b.ByteBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};b.ByteBuffer.prototype.getInt32= function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a<<32>>>32};b.ByteBuffer.prototype.getInt=function(a){var c=0;do c=(c<d&&(a+="0");a+=d.toString(16)}return a}; b.ByteBuffer.prototype.toBinaryString=function(){for(var a="",c=this.read;cd&&(a+="0000");a+=d.toString(2)}return a};b.ByteBuffer.prototype.toSubHex=function(a){for(var c="",d=this.read;db&&(c+="0");c+=b.toString(16)}return c};b.ByteBuffer.prototype.toString=function(){return b.decodeUtf8(this.bytes())};b.createBuffer=function(a,c){void 0!==a&&"utf8"===(c||"raw")&&(a=b.encodeUtf8(a));return new b.ByteBuffer(a)}; b.fillString=function(a,c){for(var d="";0>>=1,0>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var q=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];b.encode64=function(a,c){for(var d="",b="",g,e,h,l=0;l>2),d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&3)<<4|e>>4),isNaN(e)?d+="==":(d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&15)<<2|h>>6),d+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),c&&d.length>c&&(b+=d.substr(0,c)+"\r\n",d=d.substr(c));return b+d};b.decode64=function(a){if(null==a||"undefined"== typeof a)throw{code:"119005",message:l["119005"]};a=a.replace(/[^A-Za-z0-9\+\/=]/g,"");for(var c="",d,b,g,e,h=0;h>4),64!==g&&(c+=String.fromCharCode((b&15)<<4|g>>2),64!==e&&(c+=String.fromCharCode((g&3)<<6|e)));return c};b.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};b.decodeUtf8=function(a){return decodeURIComponent(escape(a))};b.deflate= function(a,c,d){c=b.decode64(a.deflate(b.encode64(c)).rval);d&&(a=2,c.charCodeAt(1)&32&&(a=6),c=c.substring(a,c.length-4));return c};b.inflate=function(a,c,d){a=a.inflate(b.encode64(c)).rval;return null===a?null:b.decode64(a)};b.trim=function(a){return a.replace(/^\s*|\s*$/g,"")};var m=function(a,c,d){if(!a)throw{code:"119001",message:l["119001"]};null===d?a=a.removeItem(c):(d=b.encode64(JSON.stringify(d)),a=a.setItem(c,d));if("undefined"!==typeof a&&!0!==a.rval)throw{code:"119002",message:l["119002"]+ a.error};},u=function(a,c){if(!a)throw{code:"119003",message:l["119003"]};c=a.getItem(c);if(a.init)if(null===c.rval){if(c.error)throw c.error;c=null}else c=c.rval;null!==c&&(c=JSON.parse(b.decode64(c)));return c},n=function(a,c,d,b){var f=u(a,c);null===f&&(f={});f[d]=b;m(a,c,f)},p=function(a,c,d){a=u(a,c);null!==a&&(a=d in a?a[d]:null);return a},t=function(a,c,d){var b=u(a,c);if(null!==b&&d in b){delete b[d];d=!0;for(var g in b){d=!1;break}d&&(b=null);m(a,c,b)}},w=function(a,c){m(a,c,null)},r=function(a, c,b){var d=null;"undefined"===typeof b&&(b=["web","flash"]);var g=!1,e=null,h;for(h in b){var k=b[h];try{if("flash"===k||"both"===k){if(null===c[0])throw{code:"119004",message:l["119004"]};d=a.apply(this,c);g="flash"===k}if("web"===k||"both"===k)c[0]=localStorage,d=a.apply(this,c),g=!0}catch(x){e=x}if(g)break}if(!g)throw e;return d};b.setItem=function(a,c,b,f,g){r(n,arguments,g)};b.getItem=function(a,c,b,f){return r(p,arguments,f)};b.removeItem=function(a,c,b,f){r(t,arguments,f)};b.clearItems=function(a, c,b){r(w,arguments,b)};b.parseUrl=function(a){var c=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;c.lastIndex=0;c=c.exec(a);if(a=null===c?null:{full:a,scheme:c[1],host:c[2],port:c[3],path:c[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var v=null;b.getQueryVariables=function(a){var c=function(a){var c={}; a=a.split("&");for(var b=0;b");break;case "%":e.push("%");break;default:e.push("<%"+b+"?>")}e.push(a.substring(f));return e.join("")};b.formatNumber=function(a, c,b,f){var d=isNaN(c=Math.abs(c))?2:c;c=void 0===b?",":b;f=void 0===f?".":f;b=0>a?"-":"";var e=parseInt(a=Math.abs(+a||0).toFixed(d),10)+"",h=3