text: var dou,__extends=this&&this.__extends||function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}();Array.from||(Array.from=function(){function u(t){return"function"==typeof t||"[object Function]"===e.call(t)}function h(t){var e=function(t){var e=Number(t);return isNaN(e)?0:0!==e&&isFinite(e)?(0<e?1:-1)*Math.floor(Math.abs(e)):e}(t);return Math.min(Math.max(e,0),n)}var e=Object.prototype.toString,n=Math.pow(2,53)-1;return function(t){var e=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n,i=1<arguments.length?arguments[1]:void 0;if(void 0!==i){if(!u(i))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(n=arguments[2])}for(var r,o=h(e.length),s=u(this)?Object(new this(o)):new Array(o),a=0;a<o;)r=e[a],s[a]=i?void 0===n?i(r,a):i.call(n,r,a):r,a+=1;return s.length=o,s}}()),Array.prototype.fill||Object.defineProperty(Array.prototype,"fill",{value:function(t){if(null==this)throw new TypeError("this is null or not defined");for(var e=Object(this),n=e.length>>>0,i=arguments[1]>>0,r=i<0?Math.max(n+i,0):Math.min(i,n),o=arguments[2],s=void 0===o?n:o>>0,a=s<0?Math.max(n+s,0):Math.min(s,n);r<a;)e[r]=t,r++;return e}}),String.prototype.startsWith||Object.defineProperty(Array.prototype,"startsWith",{value:function(t,e){return this.substr(!e||e<0?0:+e,t.length)===t}}),String.prototype.endsWith||Object.defineProperty(Array.prototype,"endsWith",{value:function(t,e){return(void 0===e||e>this.length)&&(e=this.length),this.substring(e-t.length,e)===t}}),function(){var t,e;e=Object.prototype,Object.defineProperties(e,{getPropertyDescriptor:{value:function(t){var e=Object.getOwnPropertyDescriptor(this,t);if(e)return e;var n=Object.getPrototypeOf(this);return n?n.getPropertyDescriptor(t):void 0},enumerable:!1},shallowClone:{value:function(){var t={};return this.shallowCloneTo(t),t},enumerable:!1},shallowCloneTo:{value:function(t){for(var e in this)if(e in t){var n=t.getPropertyDescriptor(e);n&&(n.set||n.writable)&&(t[e]=this[e])}else t[e]=this[e]},enumerable:!1},deepClone:{value:function(){var t=JSON.stringify(this);return JSON.parse(t)},enumerable:!1},deepCloneTo:{value:function(t){var e=this.deepClone();for(var n in e)if(n in t){var i=t.getPropertyDescriptor(n);i&&(i.set||i.writable)&&(t[n]=e[n])}else t[n]=e[n]},enumerable:!1},clearAllProperty:{value:function(){for(var t in this)delete this[t]},enumerable:!1}}),e=String.prototype,Object.defineProperties(e,{splitNum:{value:function(t,e){for(var n=this.split(t,e),i=0,r=n.length;i<r;i++)n[i]=parseFloat(n[i]);return n},enumerable:!1}}),(t=Array).NORMAL=0,t.CASEINSENSITIVE=1,t.DESCENDING=2,t.RETURNINDEXEDARRAY=4,t.NUMERIC=8,e=Array.prototype,Object.defineProperties(e,{contains:{value:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t;n<i.length;n++){var r=i[n];if(-1==this.indexOf(r))return!1}return!0},enumerable:!1},pushUnique:{value:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t;n<i.length;n++){var r=i[n];-1==this.indexOf(r)&&(this[this.length]=r)}return this.length},enumerable:!1},sortOn:{value:function(t,n){var e=this;Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]),t.length!==n.length&&(n=new Array(t.length).fill(0));var i=n[0]&Array.RETURNINDEXEDARRAY;i&&(e=Array.from(e));var r=t.map(function(t,e){return function(t,e){e=e||0;var n=[];t&&n.push(function(){return this[t]});n.push(e&Array.NUMERIC?function(){return parseFloat(this)}:function(){return"string"==typeof this&&this||"number"==typeof this&&""+this||this&&this.toString()||this}),e&Array.CASEINSENSITIVE&&n.push(String.prototype.toLowerCase);n.apply=Array.prototype.reduce.bind(n,function(t,e){return e.apply(t)});var i=e&Array.DESCENDING?-1:1,r=-i;return function(t,e){return t=n.apply(t),(e=n.apply(e))<t||null!=t&&null==e?i:t<e||null==t&&null!=e?r:0}}(t,n[e])}),o=e.sort(function(n,i){return r.reduce(function(t,e){return t||e(n,i)},0)});return i?o:void 0},enumerable:!1},remove:{value:function(t){var e=this.indexOf(t);return-1<e&&(this.splice(e,1),!0)},enumerable:!1},shuffle:{value:function(){for(var t=0,e=this.length;t<e;t++){var n=Math.round(Math.random()*(e-1)),i=this[t];this[t]=this[n],this[n]=i}return this},enumerable:!1}}),e=Date.prototype,Object.defineProperties(e,{format:{value:function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var n in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),e)new RegExp("("+n+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[n]:("00"+e[n]).substr((""+e[n]).length)));return t},enumerable:!1}})}(),function(e){e.hashCount=1;var t=function(){function t(){this._hashCode=e.hashCount++}return Object.defineProperty(t.prototype,"hashCode",{get:function(){return this._hashCode},enumerable:!0,configurable:!0}),t}();e.HashObject=t}(dou||(dou={})),function(n){var t=function(){function t(){this._lastTimeStamp=0,this._paused=!1,t.$startTime=Date.now(),this._frameRateList=[60,30,20,15,12,10,6,5,4,3,2,1],this.frameRate=60}return Object.defineProperty(t.prototype,"frameRate",{get:function(){return this._frameRate},set:function(t){this.setFrameRate(t),this._frameCount=60/this._frameRate,this._lastCount=0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paused",{get:function(){return this._paused},enumerable:!0,configurable:!0}),t.prototype.setFrameRate=function(t){t=+t||0;for(var e=0,n=this._frameRateList.length;e<n;e++){var i=this._frameRateList[e];if(i<=t)return void(this._frameRate=i)}this._frameRate=1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.update=function(){if(!this._paused&&(this._lastCount++,this._lastCount>=this._frameCount)){this._lastCount=0;var t=n.getTimer(),e=t-this._lastTimeStamp;this._lastTimeStamp=t,this.updateLogic(e)}},t.$startTime=0,t}();n.TickerBase=t}(dou||(dou={})),function(p){var t=function(e){function t(){var t=e.call(this)||this;return t.$map={},t}return __extends(t,e),t.prototype.on=function(t,e,n){this.$addEvent(t,e,n,!1)},t.prototype.once=function(t,e,n){this.$addEvent(t,e,n,!0)},t.prototype.$addEvent=function(t,e,n,i){var r=this.$map;r.hasOwnProperty(t)||(r[t]=[]);for(var o=r[t],s=0,a=o.length;s<a;s++){var u=o[s];if(u.listener==e&&u.thisObj==n)return!1}var h=p.recyclable(c);return h.listener=e,h.thisObj=n,h.once=i,o.push(h),!0},t.prototype.has=function(t){return this.$map.hasOwnProperty(t)&&0<this.$map[t].length},t.prototype.dispatchEvent=function(t){var e=this.$map;if(!e.hasOwnProperty(t.type))return!0;var n=e[t.type];if(0==n.length)return!0;t.setTarget(this);for(var i=0,r=0,o=n.length;r<o;r++){var s=n[r];if(s){var a=s.listener,u=s.thisObj;s.once?(s.recycle(),n[r]=null):(i!=r&&(n[i]=s,n[r]=null),i++),a.call(u,t)}}if(i!=r){for(length=n.length;r<length;)n[i++]=n[r++];n.length=i}return t.setTarget(null),!t.isDefaultPrevented},t.prototype.dispatch=function(t,e,n){var i=p.recyclable(p.Event);i.init(t,e,n);var r=this.dispatchEvent(i);return i.recycle(),r},t.prototype.off=function(t,e,n){var i=this.$map;if(i.hasOwnProperty(t))for(var r=i[event.type],o=0,s=r.length;o<s;o++){var a=r[o];if(a&&a.listener==e&&a.thisObj==n){a.recycle(),r[o]=null;break}}},t}(p.HashObject);p.EventDispatcher=t;var c=function(){function t(){}return t.prototype.onRecycle=function(){this.listener=this.thisObj=this.once=null},t}()}(dou||(dou={})),function(t){var e=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isDefaultPrevented=!1,t}return __extends(t,e),t.prototype.init=function(t,e,n){this._type=t,this._data=e,this._cancelable=n},Object.defineProperty(t.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cancelable",{get:function(){return this._cancelable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),t.prototype.setTarget=function(t){this._target=t},t.prototype.preventDefault=function(){this._cancelable&&(this._isDefaultPrevented=!0)},t.prototype.isDefaultPrevented=function(){return this._isDefaultPrevented},t.prototype.onRecycle=function(){this._type=null,this._data=null,this._cancelable=null,this._isDefaultPrevented=!1,this._target=null},t.OPEN="open",t.CHANGE="change",t.COMPLETE="complete",t.MESSAGE="message",t.CLOSE="close",t}(t.HashObject);t.Event=e}(dou||(dou={})),function(a){var t=function(t){function s(){return null!==t&&t.apply(this,arguments)||this}return __extends(s,t),s.dispatch=function(t,e,n,i){var r=a.recyclable(s);r.initEvent(e,n,i);var o=t.dispatchEvent(r);return r.recycle(),o},Object.defineProperty(s.prototype,"msg",{get:function(){return this._msg},enumerable:!0,configurable:!0}),s.prototype.initEvent=function(t,e,n){this.init(t,null,n),this._msg=e},s.prototype.onRecycle=function(){t.prototype.onRecycle.call(this),this._msg=null},s.IO_ERROR="ioError",s}(a.Event);a.IOErrorEvent=t}(dou||(dou={})),function(u){var t=function(t){function a(){return null!==t&&t.apply(this,arguments)||this}return __extends(a,t),a.dispatch=function(t,e,n,i,r){var o=u.recyclable(a);o.initEvent(e,n,i,r);var s=t.dispatchEvent(o);return o.recycle(),s},Object.defineProperty(a.prototype,"loaded",{get:function(){return this._loaded},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"total",{get:function(){return this._total},enumerable:!0,configurable:!0}),a.prototype.initEvent=function(t,e,n,i){this.init(t,null,i),this._loaded=e,this._total=n},a.prototype.onRecycle=function(){t.prototype.onRecycle.call(this),this._loaded=null,this._total=null},a.PROGRESS="progress",a}(u.Event);u.ProgressEvent=t}(dou||(dou={})),function(s){var t=function(){function t(){}return t.prototype.load=function(e,n,i){var r=this,o=new s.HttpRequest;o.responseType=this.getResponseType(),o.on(s.Event.COMPLETE,function(t){n.call(i,e,r.dataAnalyze(o.response))},this),o.on(s.IOErrorEvent.IO_ERROR,function(t){n.call(i,e)},this),o.open(e,s.HttpMethod.GET),o.send()},t.prototype.release=function(t){return!0},t}();s.RequestAnalyzerBase=t}(dou||(dou={})),function(n){var t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.getResponseType=function(){return n.HttpResponseType.text},e.prototype.dataAnalyze=function(t){return t},e}(n.RequestAnalyzerBase);n.TextAnalyzer=t}(dou||(dou={})),function(n){var t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.getResponseType=function(){return n.HttpResponseType.text},e.prototype.dataAnalyze=function(t){return JSON.parse(t)},e}(n.RequestAnalyzerBase);n.JsonAnalyzer=t}(dou||(dou={})),function(n){var t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.getResponseType=function(){return n.HttpResponseType.arraybuffer},e.prototype.dataAnalyze=function(t){return new n.ByteArray(t)},e}(n.RequestAnalyzerBase);n.BytesAnalyzer=t}(dou||(dou={})),function(t){var e=function(){function t(){this._maxLoadingThread=5,this._resourceRoot="",this._nowLoadingThread=0,this._analyzerMap={},this._extensionMap={},this._priorityList=[],this._priorityMap={},this._keyMap={},this._loadingMap={},this._cacheTypeMap={},this._cacheDataMap={}}return Object.defineProperty(t,"instance",{get:function(){return t._instance||(t._instance=new t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxLoadingThread",{get:function(){return this._maxLoadingThread},set:function(t){this._maxLoadingThread=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"resourceRoot",{get:function(){return this._resourceRoot},set:function(t){this._resourceRoot=t||""},enumerable:!0,configurable:!0}),t.prototype.registerAnalyzer=function(t,e){this._analyzerMap[t]=e},t.prototype.registerExtension=function(t,e){this._extensionMap[t]=e},t.prototype.load=function(t,e,n,i,r,o){if(void 0===r&&(r=0),void 0===o&&(o=!0),this.isLoaded(t))e.call(n,this.get(t),t);else if(i||(i=this.getDefaultType(t)),this._analyzerMap[i]){var s={url:t,type:i,priority:r,cache:o,callback:e,thisObj:n};this._priorityMap[r]||(this._priorityList.push(r),this._priorityList.sort(this.sortFunc),this._priorityMap[r]=[]),this._priorityMap[r].push(s),this._keyMap[s.url]||(this._keyMap[s.url]=[]),this._keyMap[s.url].push(s),this.loadNext()}else console.error('Can not find resource type: "'+i+'"')},t.prototype.getDefaultType=function(t){var e,n=/\.(\w+)\?|\.(\w+)$/.exec(t);return n&&(e=n[1]||n[2]),this._extensionMap.hasOwnProperty(e)?this._extensionMap[e]:e},t.prototype.sortFunc=function(t,e){return e-t},t.prototype.loadNext=function(){var u=this;if(!(this._nowLoadingThread>=this._maxLoadingThread)){for(var t,e=0,n=this._priorityList;e<n.length;e++){var i=n[e],r=this._priorityMap[i];if(0<r.length){t=r.shift();break}}if(t)if(this._loadingMap[t.url])this.loadNext();else this._nowLoadingThread++,this._loadingMap[t.url]=!0,this._analyzerMap[t.type].load(this._resourceRoot+t.url,function(t,e){u._nowLoadingThread--,delete u._loadingMap[t];var n=u._keyMap[t];if(n&&0<n.length){for(var i=0,r=n;i<r.length;i++){var o=r[i];if(u._priorityMap[o.priority]){var s=u._priorityMap[o.priority],a=s.indexOf(o);-1!=a&&s.splice(a,1)}o.cache&&e&&(u._cacheTypeMap[o.url]=o.type,u._cacheDataMap[o.url]=e),o.callback&&o.callback.call(o.thisObj,e,t)}delete u._keyMap[t]}u.loadNext()},this)}},t.prototype.loadAsync=function(t,e,r,o){var s=this;return void 0===r&&(r=0),void 0===o&&(o=!0),new Promise(function(n,i){s.load(t,function(t,e){e?n(e):i("Load Error: "+t)},s,e,r,o)})},t.prototype.loadGroup=function(t,n,i){function e(t,e){r++,n.call(i,r,o,t,e)}for(var r=0,o=t.length,s=0,a=t;s<a.length;s++){var u=a[s];this.load(u.url,e,this,u.type,u.priority,u.cache)}},t.prototype.loadGroupAsync=function(e){var n=this;return new Promise(function(r,t){n.loadGroup(e,function(t,e,n,i){t==e&&r()},n)})},t.prototype.isLoaded=function(t){return this._cacheDataMap.hasOwnProperty(t)},t.prototype.get=function(t){return this._cacheDataMap[t]},t.prototype.release=function(t){if(this.isLoaded(t)){var e=this._cacheTypeMap[t],n=this._analyzerMap[e];if(!n)return!1;var i=this._cacheDataMap[t],r=n.release(i);return r&&(delete this._cacheTypeMap[t],delete this._cacheDataMap[t]),r}return!1},t}();t.LoadManager=e,t.loader=e.instance}(dou||(dou={})),function(t){var e;(e=t.HttpMethod||(t.HttpMethod={}))[e.GET=0]="GET",e[e.POST=1]="POST"}(dou||(dou={})),function(t){var e;(e=t.HttpResponseType||(t.HttpResponseType={}))[e.arraybuffer=1]="arraybuffer",e[e.blob=2]="blob",e[e.document=3]="document",e[e.json=4]="json",e[e.text=5]="text"}(dou||(dou={})),function(r){var t=function(t){function e(){return t.call(this)||this}return __extends(e,t),Object.defineProperty(e.prototype,"responseType",{get:function(){return this._responseType},set:function(t){this._responseType=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"withCredentials",{get:function(){return this._withCredentials},set:function(t){this._withCredentials=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._xhr?this._xhr.response:null},enumerable:!0,configurable:!0}),e.prototype.setRequestHeader=function(t,e){this._headerMap||(this._headerMap={}),this._headerMap[t]=e},e.prototype.getResponseHeader=function(t){return this._headerMap[t]},e.prototype.getAllResponseHeaders=function(){return this._headerMap},e.prototype.open=function(t,e){void 0===e&&(e=r.HttpMethod.GET),this._url=t,this._method=e,this._xhr&&(this._xhr.abort(),this._xhr=null),this._xhr=new XMLHttpRequest,this._xhr.onreadystatechange=this.onReadyStateChange.bind(this),this._xhr.onprogress=this.updateProgress.bind(this),this._xhr.open(r.HttpMethod[this._method],this._url,!0)},e.prototype.send=function(t){if(this._responseType&&(this._xhr.responseType=r.HttpResponseType[this._responseType]),this._withCredentials&&(this._xhr.withCredentials=!0),this._headerMap)for(var e in this._headerMap)this._xhr.setRequestHeader(e,this._headerMap[e]);this._xhr.send(t)},e.prototype.onReadyStateChange=function(t){var e=this,n=this._xhr;if(4==n.readyState){var i=400<=n.status||0==n.status;setTimeout(function(){i?r.IOErrorEvent.dispatch(e,r.IOErrorEvent.IO_ERROR,"Request Error: "+e._url):e.dispatch(r.Event.COMPLETE)},0)}},e.prototype.updateProgress=function(t){t.lengthComputable&&r.ProgressEvent.dispatch(this,r.ProgressEvent.PROGRESS,t.loaded,t.total)},e.prototype.abort=function(){this._xhr&&(this._xhr.abort(),this._xhr=null),this._url=null,this._method=null},e}(r.EventDispatcher);r.HttpRequest=t}(dou||(dou={})),function(i){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"crossOrigin",{get:function(){return this._crossOrigin},set:function(t){this._crossOrigin=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),n.prototype.load=function(t){this._data=null;var e=this._currentImage=new Image;null!==this._crossOrigin?this._crossOrigin&&(e.crossOrigin="anonymous"):n.crossOrigin&&(e.crossOrigin="anonymous"),e.onload=this.onLoad.bind(this),e.onerror=this.onError.bind(this),e.src=t},n.prototype.getImage=function(t){return t.onload=t.onerror=null,this._currentImage===t?(this._data=t,this._currentImage=null,t):null},n.prototype.onLoad=function(t){var e=this;this.getImage(t.target)&&setTimeout(function(){e.dispatch(i.Event.COMPLETE)},0)},n.prototype.onError=function(t){var e=this,n=this.getImage(t.target);n&&setTimeout(function(){i.IOErrorEvent.dispatch(e,i.IOErrorEvent.IO_ERROR,"Image load error: "+n.src)},0)},n.crossOrigin=!1,n}(i.EventDispatcher);i.ImageLoader=t}(dou||(dou={})),function(i){var t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),Object.defineProperty(e.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),e.prototype.load=function(t){this._data=null;var e=this._currentAudio=new Audio(t);e.addEventListener("canplaythrough",this.onLoaded.bind(this)),e.addEventListener("error",this.onError.bind(this)),e.load()},e.prototype.getAudio=function(t){return this._currentAudio===t?(this._data=t,this._currentAudio=null,t):null},e.prototype.onLoaded=function(t){var e=this;this.getAudio(t.target)&&setTimeout(function(){e.dispatch(i.Event.COMPLETE)},0)},e.prototype.onError=function(t){var e=this,n=this.getAudio(t.target);n&&setTimeout(function(){i.IOErrorEvent.dispatch(e,i.IOErrorEvent.IO_ERROR,"Sound load error: "+n.src)},0)},e}(i.EventDispatcher);i.SoundLoader=t}(dou||(dou={})),function(r){var t=function(i){function t(t,e){var n=i.call(this)||this;return n._endian=1,n._connected=!1,n._cacheInput=!0,n._addInputPosition=0,t&&0<e&&e<65535&&n.connect(t,e),n}return __extends(t,i),Object.defineProperty(t.prototype,"endian",{get:function(){return this._endian},set:function(t){this._endian=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"input",{get:function(){return this._input},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._output},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this._url},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"connected",{get:function(){return this._connected},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cacheInput",{get:function(){return this._cacheInput},set:function(t){this._cacheInput=t},enumerable:!0,configurable:!0}),t.prototype.connect=function(t,e){var n;n="https:"==window.location.protocol?"wss://"+t+":"+e:"ws://"+t+":"+e,this.connectByUrl(n)},t.prototype.connectByUrl=function(t){var e=this;this._webSocket&&this.close(),this._url=t,this._webSocket=new WebSocket(t),this._webSocket.binaryType="arraybuffer",this._input=new r.ByteArray,this._input.endian=this.endian,this._output=new r.ByteArray,this._output.endian=this.endian,this._addInputPosition=0,this._webSocket.onopen=function(t){e.onOpen(t)},this._webSocket.onmessage=function(t){e.onMessage(t)},this._webSocket.onclose=function(t){e.onClose(t)},this._webSocket.onerror=function(t){e.onError(t)}},t.prototype.onOpen=function(t){this._connected=!0,this.dispatch(r.Event.OPEN)},t.prototype.onMessage=function(t){if(t&&t.data){var e=t.data;if(this._cacheInput||!e){0<this._input.length&&this._input.bytesAvailable<1&&(this._input.clear(),this._addInputPosition=0);var n=this._input.position;this._addInputPosition||(this._addInputPosition=0),this._input.position=this._addInputPosition,e&&("string"==typeof e?this._input.writeUTFBytes(e):this._input.writeUint8Array(new Uint8Array(e)),this._addInputPosition=this._input.position,this._input.position=n),this.dispatch(r.Event.MESSAGE,e)}else this.dispatch(r.Event.MESSAGE,e)}},t.prototype.onClose=function(t){this._connected=!1,this.dispatch(r.Event.CLOSE)},t.prototype.onError=function(t){r.IOErrorEvent.dispatch(this,r.IOErrorEvent.IO_ERROR,"Socket connect error: "+this._url)},t.prototype.send=function(t){this._webSocket.send(t)},t.prototype.flush=function(){if(this._output&&0<this._output.length){var e=void 0;try{this._webSocket&&this._webSocket.send(this._output.buffer)}catch(t){e=t}this._output.endian=this.endian,this._output.clear(),e&&r.IOErrorEvent.dispatch(this,r.IOErrorEvent.IO_ERROR,"Socket connect error: "+this._url)}},t.prototype.close=function(){this._webSocket&&this.cleanSocket()},t.prototype.cleanSocket=function(){this._webSocket.close(),this._connected=!1,this._webSocket.onopen=null,this._webSocket.onmessage=null,this._webSocket.onclose=null,this._webSocket.onerror=null,this._webSocket=null,this._url=null},t}(r.EventDispatcher);r.Socket=t}(dou||(dou={})),function(t){!function(t){function e(e){return function(t){return Math.pow(t,e)}}function n(e){return function(t){return 1-Math.pow(1-t,e)}}function i(e){return function(t){return(t*=2)<1?.5*Math.pow(t,e):1-.5*Math.abs(Math.pow(2-t,e))}}var r,o,s,a,u,h,p,c,f,l,d,_;function y(t){return 1-v(1-t)}function v(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}t.quadIn=e(2),t.quadOut=n(2),t.quadInOut=i(2),t.cubicIn=e(3),t.cubicOut=n(3),t.cubicInOut=i(3),t.quartIn=e(4),t.quartOut=n(4),t.quartInOut=i(4),t.quintIn=e(5),t.quintOut=n(5),t.quintInOut=i(5),t.sineIn=function(t){return 1-Math.cos(t*Math.PI/2)},t.sineOut=function(t){return Math.sin(t*Math.PI/2)},t.sineInOut=function(t){return-.5*(Math.cos(Math.PI*t)-1)},t.backIn=(r=1.7,function(t){return t*t*((r+1)*t-r)}),t.backOut=(o=1.7,function(t){return--t*t*((o+1)*t+o)+1}),t.backInOut=(s=1.7,s*=1.525,function(t){return(t*=2)<1?t*t*((s+1)*t-s)*.5:.5*((t-=2)*t*((s+1)*t+s)+2)}),t.circIn=function(t){return-(Math.sqrt(1-t*t)-1)},t.circOut=function(t){return Math.sqrt(1- --t*t)},t.circInOut=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},t.bounceIn=y,t.bounceOut=v,t.bounceInOut=function(t){return t<.5?.5*y(2*t):.5*v(2*t-1)+.5},t.elasticIn=(a=1,u=.3,h=2*Math.PI,function(t){if(0==t||1==t)return t;var e=u/h*Math.asin(1/a);return-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*h/u)}),t.elasticOut=(p=1,c=.3,f=2*Math.PI,function(t){if(0==t||1==t)return t;var e=c/f*Math.asin(1/p);return p*Math.pow(2,-10*t)*Math.sin((t-e)*f/c)+1}),t.elasticInOut=(l=1,d=.3*1.5,_=2*Math.PI,function(t){var e=d/_*Math.asin(1/l);return(t*=2)<1?l*Math.pow(2,10*(t-=1))*Math.sin((t-e)*_/d)*-.5:l*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*_/d)*.5+1})}(t.Ease||(t.Ease={}))}(dou||(dou={})),function(p){var t=function(i){function o(t,e){var n=i.call(this)||this;return n._useTicks=!1,n._ignoreGlobalPause=!1,n._loop=!1,n._paused=!1,n._duration=0,n._prevPos=-1,n._prevPosition=0,n._stepPosition=0,n._passive=!1,n.initialize(t,e),n}return __extends(o,i),o.tick=function(t,e){void 0===e&&(e=!1);for(var n=o._tweens.concat(),i=n.length-1;0<=i;i--){var r=n[i];e&&!r._ignoreGlobalPause||r._paused||r.$tick(r._useTicks?1:t)}},o.get=function(t,e,n){return void 0===n&&(n=!1),n&&o.removeTweens(t),new o(t,e)},o.pauseTweens=function(t){if(t.tween_count)for(var e=o._tweens,n=e.length-1;0<=n;n--)e[n]._target==t&&(e[n]._paused=!0)},o.resumeTweens=function(t){if(t.tween_count)for(var e=o._tweens,n=e.length-1;0<=n;n--)e[n]._target==t&&(e[n]._paused=!1)},o.removeTweens=function(t){if(t.tween_count){for(var e=o._tweens,n=e.length-1;0<=n;n--)e[n]._target==t&&(e[n]._paused=!0,e.splice(n,1));t.tween_count=0}},o.removeAllTweens=function(){for(var t=o._tweens,e=0,n=t.length;e<n;e++){var i=t[e];i._paused=!0,i._target.tween_count=0}t.length=0},o._register=function(t,e){var n=t._target,i=o._tweens;if(e)n&&(n.tween_count=0<n.tween_count?n.tween_count+1:1),i.push(t);else{n&&n.tween_count--;for(var r=i.length;r--;)if(i[r]==t)return void i.splice(r,1)}},o.prototype.initialize=function(t,e){this._target=t,e&&(this._useTicks=e.useTicks,this._ignoreGlobalPause=e.ignoreGlobalPause,this._loop=e.loop,e.onChange&&this.on(p.Event.CHANGE,e.onChange,e.onChangeObj),e.override&&o.removeTweens(t)),this._curQueueProps={},this._initQueueProps={},this._steps=[],e&&e.paused?this._paused=!0:o._register(this,!0),e&&e.position&&this.setPosition(e.position,o.NONE)},o.prototype.setPaused=function(t){return this._paused==t||(this._paused=t,o._register(this,!t)),this},o.prototype.wait=function(t,e){if(null==t||t<=0)return this;var n=this._cloneProps(this._curQueueProps);return this._addStep({d:t,p0:n,p1:n,v:e})},o.prototype.to=function(t,e,n){return(isNaN(e)||e<0)&&(e=0),this._addStep({d:e||0,p0:this._cloneProps(this._curQueueProps),e:n,p1:this._cloneProps(this._appendQueueProps(t))}),this.set(t)},o.prototype.call=function(t,e,n){return this._addAction({f:t,p:n||[],o:e||this._target})},o.prototype.set=function(t,e){return this._appendQueueProps(t),this._addAction({f:this._set,o:this,p:[t,e||this._target]})},o.prototype.play=function(t){return t||(t=this),this.call(t.setPaused,t,[!1])},o.prototype.pause=function(t){return t||(t=this),this.call(t.setPaused,t,[!0])},o.prototype.$tick=function(t){this._paused||this.setPosition(this._prevPosition+t)},o.prototype.setPosition=function(t,e){void 0===e&&(e=1),t<0&&(t=0);var n=t,i=!1;if(n>=this._duration)if(this._loop){var r=n%this._duration;n=0<n&&0==r?this._duration:r}else n=this._duration,i=!0;if(n==this._prevPos)return i;i&&this.setPaused(!0);var o=this._prevPos;if(this._position=this._prevPos=n,this._prevPosition=t,this._target&&0<this._steps.length){for(var s=this._steps.length,a=-1,u=0;u<s&&!("step"==this._steps[u].type&&(a=u,this._steps[u].t<=n&&this._steps[u].t+this._steps[u].d>=n));u++);for(u=0;u<s;u++)if("action"==this._steps[u].type)0!=e&&(this._useTicks?this._runAction(this._steps[u],n,n):1==e&&n<o?(o!=this._duration&&this._runAction(this._steps[u],o,this._duration),this._runAction(this._steps[u],0,n,!0)):this._runAction(this._steps[u],o,n));else if("step"==this._steps[u].type&&a==u){var h=this._steps[a];this._updateTargetProps(h,Math.min((this._stepPosition=n-h.t)/h.d,1))}}return this.dispatch(p.Event.CHANGE),i},o.prototype._runAction=function(t,e,n,i){void 0===i&&(i=!1);var r=e,o=n;n<e&&(r=n,o=e);var s=t.t;(s==o||r<s&&s<o||i&&s==e)&&t.f.apply(t.o,t.p)},o.prototype._updateTargetProps=function(t,e){var n,i,r,o,s;if(t||1!=e){if(this._passive=!!t.v,this._passive)return;t.e&&(e=t.e(e,0,1,1)),n=t.p0,i=t.p1}else this._passive=!1,n=i=this._curQueueProps;for(var a in this._initQueueProps)null==(r=n[a])&&(n[a]=r=this._initQueueProps[a]),null==(o=i[a])&&(i[a]=o=r),s=r==o||0==e||1==e||"number"!=typeof r?1==e?o:r:r+(o-r)*e,this._target[a]=s},o.prototype._cloneProps=function(t){var e={};for(var n in t)e[n]=t[n];return e},o.prototype._addStep=function(t){return 0<t.d&&(t.type="step",this._steps.push(t),t.t=this._duration,this._duration+=t.d),this},o.prototype._appendQueueProps=function(t){var e;for(var n in t)void 0===this._initQueueProps[n]?(e=this._target[n],this._initQueueProps[n]=this._curQueueProps[n]=void 0===e?null:e):e=this._curQueueProps[n];for(var n in t)e=this._curQueueProps[n],this._curQueueProps[n]=t[n];return this._curQueueProps},o.prototype._addAction=function(t){return t.t=this._duration,t.type="action",this._steps.push(t),this},o.prototype._set=function(t,e){for(var n in t)e[n]=t[n]},o.NONE=0,o.LOOP=1,o.REVERSE=2,o._tweens=[],o}(p.EventDispatcher);p.Tween=t}(dou||(dou={})),function(t){t.getTimer=function(){return Date.now()-t.TickerBase.$startTime}}(dou||(dou={})),function(t){var e=function(){function t(t,e){void 0===e&&(e=50),this._creator=t,this._maxCount=e,this._list=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this._list.length},enumerable:!0,configurable:!0}),t.prototype.join=function(t){"function"==typeof t.onRecycle&&t.onRecycle(),this._list.length<this._maxCount&&-1==this._list.indexOf(t)&&this._list.push(t)},t.prototype.take=function(){var t;return 0==this._list.length?t=new this._creator:"function"==typeof(t=this._list.pop()).onReuse&&t.onReuse(),t},t.prototype.clear=function(){this._list.length=0},t}();t.ObjectPool=e}(dou||(dou={})),function(r){r.recyclable=function(t){var e;if(t.hasOwnProperty("__pool"))e=t.__pool;else{var n=t.prototype.constructor.__cacheMaxCount||50;e=new r.ObjectPool(t,n);var i=t.prototype;i.hasOwnProperty("recycle")||(i.recycle=function(){e.join(this)}),t.__pool=e}return e.take()},r.deployPool=function(t,e){t.prototype.constructor.__cacheMaxCount=e}}(dou||(dou={})),function(t){var e=function(){function t(t,e){void 0===e&&(e=0),this._bufferExtSize=0,this._eofByte=-1,this._eofCodePoint=-1,e<0&&(e=0),this._bufferExtSize=e;var n,i=0;if(t){var r=void 0;if(t instanceof Uint8Array?i=(r=t).length:(i=t.byteLength,r=new Uint8Array(t)),0==e)n=new Uint8Array(i);else n=new Uint8Array((1+(i/e|0))*e);n.set(r)}else n=new Uint8Array(e);this._writePosition=i,this._position=0,this._bytes=n,this._data=new DataView(n.buffer),this._endian=1}return Object.defineProperty(t.prototype,"endian",{get:function(){return this._endian},set:function(t){this._endian=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"readAvailable",{get:function(){return this._writePosition-this._position},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buffer",{get:function(){return this._data.buffer.slice(0,this._writePosition)},set:function(t){var e,n=t.byteLength,i=new Uint8Array(t),r=this._bufferExtSize;0==r?e=new Uint8Array(n):e=new Uint8Array((1+(n/r|0))*r);e.set(i),this._writePosition=n,this._bytes=e,this._data=new DataView(e.buffer)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rawBuffer",{get:function(){return this._data.buffer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bytes",{get:function(){return this._bytes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataView",{get:function(){return this._data},set:function(t){this.buffer=t.buffer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bufferOffset",{get:function(){return this._data.byteOffset},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(t){(this._position=t)>this._writePosition&&(this._writePosition=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._writePosition},set:function(t){this._writePosition=t,this._data.byteLength>t&&(this._position=t),this.validateBuffer(t)},enumerable:!0,configurable:!0}),t.prototype.validateBuffer=function(t){if(this._data.byteLength<t){var e=this._bufferExtSize,n=void 0;if(0==e)n=new Uint8Array(t);else n=new Uint8Array((1+(t/e>>0))*e);n.set(this._bytes),this._bytes=n,this._data=new DataView(n.buffer)}},Object.defineProperty(t.prototype,"bytesAvailable",{get:function(){return this._data.byteLength-this._position},enumerable:!0,configurable:!0}),t.prototype.validate=function(t){var e=this._bytes.length;if(0<e&&this._position+t<=e)return!0;console.error("End of the file")},t.prototype.validateBuffer2=function(t){this._writePosition=t>this._writePosition?t:this._writePosition,t+=this._position,this.validateBuffer(t)},t.prototype.readBoolean=function(){if(this.validate(1))return!!this._bytes[this.position++]},t.prototype.readByte=function(){if(this.validate(1))return this._data.getInt8(this.position++)},t.prototype.readUnsignedByte=function(){if(this.validate(1))return this._bytes[this.position++]},t.prototype.readShort=function(){if(this.validate(2)){var t=this._data.getInt16(this._position,0==this._endian);return this.position+=2,t}},t.prototype.readUnsignedShort=function(){if(this.validate(2)){var t=this._data.getUint16(this._position,0==this._endian);return this.position+=2,t}},t.prototype.readInt=function(){if(this.validate(4)){var t=this._data.getInt32(this._position,0==this._endian);return this.position+=4,t}},t.prototype.readUnsignedInt=function(){if(this.validate(4)){var t=this._data.getUint32(this._position,0==this._endian);return this.position+=4,t}},t.prototype.readFloat=function(){if(this.validate(4)){var t=this._data.getFloat32(this._position,0==this._endian);return this.position+=4,t}},t.prototype.readDouble=function(){if(this.validate(8)){var t=this._data.getFloat64(this._position,0==this._endian);return this.position+=8,t}},t.prototype.readBytes=function(t,e,n){if(void 0===e&&(e=0),void 0===n&&(n=0),t){var i=this._position,r=this._writePosition-i;if(r<0)console.error("End of the file");else{if(0==n)n=r;else if(r<n)return void console.error("End of the file");var o=t._position;t._position=0,t.validateBuffer2(e+n),t._position=o,t._bytes.set(this._bytes.subarray(i,i+n),e),this.position+=n}}},t.prototype.readUTF=function(){var t=this.readUnsignedShort();return 0<t?this.readUTFBytes(t):""},t.prototype.readUTFBytes=function(t){if(this.validate(t)){var e=this._data,n=new Uint8Array(e.buffer,e.byteOffset+this._position,t);return this.position+=t,this.decodeUTF8(n)}},t.prototype.decodeUTF8=function(t){for(var e,n=0,i="",r=0,o=0,s=0,a=0;t.length>n;){var u=t[n++];if(u==this._eofByte)e=0!=o?this.decoderError(!1):this._eofCodePoint;else if(0==o)e=this.inRange(u,0,127)?u:(this.inRange(u,194,223)?(o=1,a=128,r=u-192):this.inRange(u,224,239)?(o=2,a=2048,r=u-224):this.inRange(u,240,244)?(o=3,a=65536,r=u-240):this.decoderError(!1),r*=Math.pow(64,o),null);else if(this.inRange(u,128,191))if(s+=1,r+=(u-128)*Math.pow(64,o-s),s!==o)e=null;else{var h=r,p=a;a=s=o=r=0,e=this.inRange(h,p,1114111)&&!this.inRange(h,55296,57343)?h:this.decoderError(!1,u)}else a=s=o=r=0,n--,e=this.decoderError(!1,u);null!==e&&e!==this._eofCodePoint&&(e<=65535?0<e&&(i+=String.fromCharCode(e)):(e-=65536,i+=String.fromCharCode(55296+(e>>10&1023)),i+=String.fromCharCode(56320+(1023&e))))}return i},t.prototype.inRange=function(t,e,n){return e<=t&&t<=n},t.prototype.decoderError=function(t,e){return t&&console.error("Decoding error"),e||65533},t.prototype.writeBoolean=function(t){this.validateBuffer2(1),this._bytes[this.position++]=+t},t.prototype.writeByte=function(t){this.validateBuffer2(1),this._bytes[this.position++]=255&t},t.prototype.writeShort=function(t){this.validateBuffer2(2),this._data.setInt16(this._position,t,0==this._endian),this.position+=2},t.prototype.writeUnsignedShort=function(t){this.validateBuffer2(2),this._data.setUint16(this._position,t,0==this._endian),this.position+=2},t.prototype.writeInt=function(t){this.validateBuffer2(4),this._data.setInt32(this._position,t,0==this._endian),this.position+=4},t.prototype.writeUnsignedInt=function(t){this.validateBuffer2(4),this._data.setUint32(this._position,t,0==this._endian),this.position+=4},t.prototype.writeFloat=function(t){this.validateBuffer2(4),this._data.setFloat32(this._position,t,0==this._endian),this.position+=4},t.prototype.writeDouble=function(t){this.validateBuffer2(8),this._data.setFloat64(this._position,t,0==this._endian),this.position+=8},t.prototype.writeBytes=function(t,e,n){var i;void 0===e&&(e=0),void 0===n&&(n=0),e<0||n<0||0<(i=0==n?t.length-e:Math.min(t.length-e,n))&&(this.validateBuffer2(i),this._bytes.set(t._bytes.subarray(e,e+i),this._position),this.position=this._position+i)},t.prototype.writeUTF=function(t){var e=this.encodeUTF8(t),n=e.length;this.validateBuffer2(2+n),this._data.setUint16(this._position,n,0==this._endian),this.position+=2,this.writeUint8Array(e,!1)},t.prototype.writeUTFBytes=function(t){this.writeUint8Array(this.encodeUTF8(t))},t.prototype.encodeUTF8=function(t){for(var e=0,n=this.stringToCodePoints(t),i=[];n.length>e;){var r=n[e++];if(this.inRange(r,55296,57343))console.error("EncodingError The code point "+r+" could not be encoded");else if(this.inRange(r,0,127))i.push(r);else{var o=void 0,s=void 0;for(this.inRange(r,128,2047)?(o=1,s=192):this.inRange(r,2048,65535)?(o=2,s=224):this.inRange(r,65536,1114111)&&(o=3,s=240),i.push(this.div(r,Math.pow(64,o))+s);0<o;){var a=this.div(r,Math.pow(64,o-1));i.push(128+a%64),o-=1}}}return new Uint8Array(i)},t.prototype.stringToCodePoints=function(t){for(var e=[],n=0,i=t.length;n<t.length;){var r=t.charCodeAt(n);if(this.inRange(r,55296,57343))if(this.inRange(r,56320,57343))e.push(65533);else if(n==i-1)e.push(65533);else{var o=t.charCodeAt(n+1);if(this.inRange(o,56320,57343)){var s=1023&r,a=1023&o;n+=1,e.push(65536+(s<<10)+a)}else e.push(65533)}else e.push(r);n+=1}return e},t.prototype.writeUint8Array=function(t,e){void 0===e&&(e=!0);var n=this._position,i=n+t.length;e&&this.validateBuffer2(i),this.bytes.set(t,n),this.position=i},t.prototype.div=function(t,e){return Math.floor(t/e)},t.prototype.clear=function(){var t=new ArrayBuffer(this._bufferExtSize);this._data=new DataView(t),this._bytes=new Uint8Array(t),this._position=0,this._writePosition=0},t.prototype.toString=function(){return"[ByteArray] length:"+this.length+", bytesAvailable:"+this.bytesAvailable},t}();t.ByteArray=e}(dou||(dou={})),function(e){var t=function(){function t(t){this._map=t||{},this._keyMap={},this._size=0}return Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),t.prototype.getKey=function(t){return t instanceof e.HashObject?t.hashCode.toString():t.toString()},t.prototype.add=function(t,e){var n=this.getKey(t);this._map.hasOwnProperty(n)||++this._size,this._map[n]=e,this._keyMap[n]=t},t.prototype.has=function(t){var e=this.getKey(t);return this._map.hasOwnProperty(e)},t.prototype.get=function(t){var e=this.getKey(t);return this._map[e]},t.prototype.forEach=function(t,e){for(var n in this._map)this._map.hasOwnProperty(n)&&t.call(e,this._map[n],this._keyMap[n],this)},t.prototype.remove=function(t){var e=this.getKey(t);return!!this._map.hasOwnProperty(e)&&(delete this._map[e],delete this._keyMap[e],--this._size,!0)},t.prototype.clear=function(){this._map={},this._keyMap={},this._size=0},t.prototype.toString=function(){var t=[];for(var e in this._map)this._map.hasOwnProperty(e)&&t.push("{key:"+this._keyMap[e]+", value:"+this._map[e]+"}");return"{"+t.join(", ")+"}"},t.prototype.keyOf=function(){return this._keyMap},t.prototype.valueOf=function(){return this._map},t}();e.Dictionary=t}(dou||(dou={})),function(t){!function(t){function s(t,e,n,i,r,o,s){var a=new XMLHttpRequest;switch(a.onreadystatechange=function(){4==a.readyState&&(400<=a.status||0==a.status?o&&o.call(s,a.status):i&&i.call(r,a.response))},a.open(t,e,!0),typeof n){case"string":break;case"object":n=JSON.stringify(n);break;default:n=""+n}a.send(n)}t.addParamToUrl=function(t,e){if(e){for(var n in e)t+="&"+n+"="+e[n];-1==t.indexOf("?")&&(t=t.replace("&","?"))}return t},t.get=function(t,e,n,i,r){s("GET",t,null,e,n,i,r)},t.post=function(t,e,n,i,r,o){s("POST",t,e,n,i,r,o)}}(t.HttpUtil||(t.HttpUtil={}))}(dou||(dou={})),function(t){var e;(e=t.ScriptUtil||(t.ScriptUtil={})).loadJSSync=function(t){document.write('<script type="text/javascript" src="'+t+'"><\/script>')},e.loadJSAsync=function(t){var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("src",t),document.getElementsByTagName("head")[0].appendChild(e)},e.loadJS=function(t,e,n,i){for(var r=[],o=4;o<arguments.length;o++)r[o-4]=arguments[o];var s=document.createElement("script");s.async=!1,s.src=t,e&&(s.crossOrigin="anonymous"),s.addEventListener("load",function(){s.parentNode.removeChild(s),s.removeEventListener("load",arguments.callee,!1),n.apply(i,r)},!1),document.body.appendChild(s)}}(dou||(dou={})),function(t){var e;(e=t.BitUtil||(t.BitUtil={})).setBit=function(t,e,n){return n?t|=1<<e:t&=~(1<<e),t},e.getBit=function(t,e){return t==(t|1<<e)},e.switchBit32=function(t,e){return t^=1<<e}}(dou||(dou={}));