var egret;(function(c){var d=function(){function b(){this._hashCode=b.hashCount++}Object.defineProperty(b.prototype,"hashCode",{get:function(){return this._hashCode},enumerable:!0,configurable:!0});b.hashCount=1;return b}();c.HashObject=d;d.prototype.__class__="egret.HashObject"})(egret||(egret={}));var __extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(e){void 0===e&&(e=300);b.call(this);this.objectPool=[];this._length=0;1>e&&(e=1);this.autoDisposeTime=e;this.frameCount=0}__extends(a,b);a.prototype._checkFrame=function(){this.frameCount--;0>=this.frameCount&&this.dispose()};Object.defineProperty(a.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0});a.prototype.push=function(e){var l=this.objectPool;-1==l.indexOf(e)&&(l.push(e),this._length++,0==this.frameCount&&(this.frameCount= this.autoDisposeTime,a._callBackList.push(this)))};a.prototype.pop=function(){if(0==this._length)return null;this._length--;return this.objectPool.pop()};a.prototype.dispose=function(){0=this._maxDeltaTime){a=(this._preDrawCount-1).toString();var e=Math.ceil(this._logicPerformanceCost).toString()+","+Math.ceil(this._updateTransformPerformanceCost).toString()+","+Math.ceil(this._renderPerformanceCost).toString()+ ","+Math.ceil(c.MainContext.instance.rendererContext.renderCost).toString();this._txt.text="draw:"+a+"\ncost:"+e+"\nFPS:"+Math.floor(1E3*this._tick/this._totalDeltaTime).toString();this._tick=this._totalDeltaTime=0}this._preDrawCount=0};b.prototype.onDrawImage=function(){this._preDrawCount++};return b}();c.Profiler=d;d.prototype.__class__="egret.Profiler"})(egret||(egret={})); __extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(){b.apply(this,arguments);this._timeScale=1;this._paused=!1;this.callBackList=[]}__extends(a,b);a.prototype.run=function(){c.__START_TIME=(new Date).getTime();c.MainContext.instance.deviceContext.executeMainLoop(this.update,this)};a.prototype.update=function(e){var a=this.callBackList.concat(),b=a.length;e*=this._timeScale;e*=this._timeScale;for(var c=0;cthis.delay&&(this.lastTime=e,this._currentCount++,c.TimerEvent.dispatchTimerEvent(this,c.TimerEvent.TIMER),0=this.repeatCount&&(this.stop(),c.TimerEvent.dispatchTimerEvent(this,c.TimerEvent.TIMER_COMPLETE)))}; return a}(c.EventDispatcher);c.Timer=d;d.prototype.__class__="egret.Timer"})(egret||(egret={})); (function(c){function d(b){b=b.prototype?b.prototype:b.__proto__;if(b.hasOwnProperty("__class__"))return b.__class__;var a=b.constructor.toString(),e=a.indexOf("("),a=a.substring(9,e);Object.defineProperty(b,"__class__",{value:a,enumerable:!1,writable:!0});return a}c.getQualifiedClassName=d;c.getQualifiedSuperclassName=function(b){b=b.prototype?b.prototype:b.__proto__;if(b.hasOwnProperty("__superclass__"))return b.__superclass__;var a=Object.getPrototypeOf(b);if(null==a)return null;a=d(a.constructor); if(!a)return null;Object.defineProperty(b,"__superclass__",{value:a,enumerable:!1,writable:!0});return a}})(egret||(egret={}));(function(c){var d={};c.getDefinitionByName=function(b){if(!b)return null;var a=d[b];if(a)return a;for(var e=b.split("."),l=e.length,a=__global,c=0;c=c.delay&&(c.listener.apply(c.thisObject,c.params),delete b[a])}}var b={},a=0;c.setTimeout=function(e,l,q){for(var h=[],g=3;gc)c=0;16777215c.length;)c="0"+c;return"#"+c}})(egret||(egret={}));__extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(e,a,c,d,g,f){void 0===e&&(e=1);void 0===a&&(a=0);void 0===c&&(c=0);void 0===d&&(d=1);void 0===g&&(g=0);void 0===f&&(f=0);b.call(this);this.a=e;this.b=a;this.c=c;this.d=d;this.tx=g;this.ty=f}__extends(a,b);a.prototype.prepend=function(e,a,b,c,d,f){var k=this.tx;if(1!=e||0!=a||0!=b||1!=c){var m=this.a,n=this.c;this.a=m*e+this.b*b;this.b=m*a+this.b*c;this.c=n*e+this.d*b;this.d=n*a+this.d*c}this.tx=k*e+this.ty*b+d;this.ty=k*a+this.ty*c+f;return this};a.prototype.append= function(e,a,b,c,d,f){var k=this.a,m=this.b,n=this.c,p=this.d;if(1!=e||0!=a||0!=b||1!=c)this.a=e*k+a*n,this.b=e*m+a*p,this.c=b*k+c*n,this.d=b*m+c*p;this.tx=d*k+f*n+this.tx;this.ty=d*m+f*p+this.ty;return this};a.prototype.prependTransform=function(e,l,b,c,d,f,k,m,n){if(d%360){var p=d*a.DEG_TO_RAD;d=Math.cos(p);p=Math.sin(p)}else d=1,p=0;if(m||n)this.tx-=m,this.ty-=n;f||k?(f*=a.DEG_TO_RAD,k*=a.DEG_TO_RAD,this.prepend(d*b,p*b,-p*c,d*c,0,0),this.prepend(Math.cos(k),Math.sin(k),-Math.sin(f),Math.cos(f), e,l)):this.prepend(d*b,p*b,-p*c,d*c,e,l);return this};a.prototype.appendTransform=function(e,l,b,c,d,f,k,m,n){if(d%360){var p=d*a.DEG_TO_RAD;d=Math.cos(p);p=Math.sin(p)}else d=1,p=0;f||k?(f*=a.DEG_TO_RAD,k*=a.DEG_TO_RAD,this.append(Math.cos(k),Math.sin(k),-Math.sin(f),Math.cos(f),e,l),this.append(d*b,p*b,-p*c,d*c,0,0)):this.append(d*b,p*b,-p*c,d*c,e,l);if(m||n)this.tx-=m*this.a+n*this.c,this.ty-=m*this.b+n*this.d;return this};a.prototype.rotate=function(e){var a=Math.cos(e);e=Math.sin(e);var b=this.a, c=this.c,d=this.tx;this.a=b*a-this.b*e;this.b=b*e+this.b*a;this.c=c*a-this.d*e;this.d=c*e+this.d*a;this.tx=d*a-this.ty*e;this.ty=d*e+this.ty*a;return this};a.prototype.skew=function(e,l){e*=a.DEG_TO_RAD;l*=a.DEG_TO_RAD;this.append(Math.cos(l),Math.sin(l),-Math.sin(e),Math.cos(e),0,0);return this};a.prototype.scale=function(e,a){this.a*=e;this.d*=a;this.c*=e;this.b*=a;this.tx*=e;this.ty*=a;return this};a.prototype.translate=function(e,a){this.tx+=e;this.ty+=a;return this};a.prototype.identity=function(){this.a= this.d=1;this.b=this.c=this.tx=this.ty=0;return this};a.prototype.identityMatrix=function(e){this.a=e.a;this.b=e.b;this.c=e.c;this.d=e.d;this.tx=e.tx;this.ty=e.ty;return this};a.prototype.invert=function(){var e=this.a,a=this.b,b=this.c,c=this.d,d=this.tx,f=e*c-a*b;this.a=c/f;this.b=-a/f;this.c=-b/f;this.d=e/f;this.tx=(b*this.ty-c*d)/f;this.ty=-(e*this.ty-a*d)/f;return this};a.transformCoords=function(e,a,b){var d=c.Point.identity;d.x=e.a*a+e.c*b+e.tx;d.y=e.d*b+e.b*a+e.ty;return d};a.prototype.toArray= function(e){this.array||(this.array=new Float32Array(9));e?(this.array[0]=this.a,this.array[1]=this.b,this.array[2]=0,this.array[3]=this.c,this.array[4]=this.d,this.array[5]=0,this.array[6]=this.tx,this.array[7]=this.ty):(this.array[0]=this.a,this.array[1]=this.b,this.array[2]=this.tx,this.array[3]=this.c,this.array[4]=this.d,this.array[5]=this.ty,this.array[6]=0,this.array[7]=0);this.array[8]=1;return this.array};a.identity=new a;a.DEG_TO_RAD=Math.PI/180;return a}(c.HashObject);c.Matrix=d;d.prototype.__class__= "egret.Matrix"})(egret||(egret={}));__extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(e,a){void 0===e&&(e=0);void 0===a&&(a=0);b.call(this);this.x=e;this.y=a}__extends(a,b);a.prototype.clone=function(){return new a(this.x,this.y)};a.prototype.equals=function(e){return this.x==e.x&&this.y==e.y};a.distance=function(e,a){return Math.sqrt((e.x-a.x)*(e.x-a.x)+(e.y-a.y)*(e.y-a.y))};a.identity=new a(0,0);return a}(c.HashObject);c.Point=d;d.prototype.__class__="egret.Point"})(egret||(egret={})); __extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(e,a,c,d){void 0===e&&(e=0);void 0===a&&(a=0);void 0===c&&(c=0);void 0===d&&(d=0);b.call(this);this.x=e;this.y=a;this.width=c;this.height=d}__extends(a,b);Object.defineProperty(a.prototype,"right",{get:function(){return this.x+this.width},set:function(e){this.width=e-this.x},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"bottom",{get:function(){return this.y+this.height},set:function(e){this.height=e-this.y},enumerable:!0,configurable:!0}); a.prototype.initialize=function(e,a,b,c){this.x=e;this.y=a;this.width=b;this.height=c;return this};a.prototype.contains=function(e,a){return this.x<=e&&this.x+this.width>=e&&this.y<=a&&this.y+this.height>=a};a.prototype.intersects=function(e){var a=e.right,b=e.bottom,c=this.right,d=this.bottom;return this.contains(e.x,e.y)||this.contains(e.x,b)||this.contains(a,e.y)||this.contains(a,b)||e.contains(this.x,this.y)||e.contains(this.x,d)||e.contains(c,this.y)||e.contains(c,d)?!0:!1};a.prototype.clone= function(){return new a(this.x,this.y,this.width,this.height)};a.prototype.containsPoint=function(e){return this.xe.x&&this.ye.y?!0:!1};a.identity=new a(0,0,0,0);return a}(c.HashObject);c.Rectangle=d;d.prototype.__class__="egret.Rectangle"})(egret||(egret={})); (function(c){var d=function(){function b(){}b.fatal=function(a,e){void 0===e&&(e=null);c.Logger.traceToConsole("Fatal",a,e);throw Error(c.Logger.getTraceCode("Fatal",a,e));};b.info=function(a,e){void 0===e&&(e=null);c.Logger.traceToConsole("Info",a,e)};b.warning=function(a,e){void 0===e&&(e=null);c.Logger.traceToConsole("Warning",a,e)};b.traceToConsole=function(a,e,l){console.log(c.Logger.getTraceCode(a,e,l))};b.getTraceCode=function(a,e,l){return"["+a+"]"+e+":"+(null==l?"":l)};return b}();c.Logger= d;d.prototype.__class__="egret.Logger"})(egret||(egret={}));__extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(){b.call(this);this._isSupportDOMParser=this._xmlDict=this._parser=null;this._xmlDict={};window.DOMParser?(this._isSupportDOMParser=!0,this._parser=new DOMParser):this._isSupportDOMParser=!1}__extends(a,b);a.getInstance=function(){a._instance||(a._instance=new a);return a._instance};a.prototype.parserXML=function(e){for(var a=0;"\n"==e.charAt(a)||"\t"==e.charAt(a)||"\r"==e.charAt(a)||" "==e.charAt(a);)a++;0!=a&&(e=e.substring(a,e.length));this._isSupportDOMParser? a=this._parser.parseFromString(e,"text/xml"):(a=new ActiveXObject("Microsoft.XMLDOM"),a.async="false",a.loadXML(e));null==a&&c.Logger.info("xml not found!");return a};a._instance=null;return a}(c.HashObject);c.SAXParser=d;d.prototype.__class__="egret.SAXParser"})(egret||(egret={}));__extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(e){function l(){e.call(this);this._designHeight=this._designWidth=0;this._scaleY=this._scaleX=1;this._stageHeight=this._stageWidth=this._offSetY=0}__extends(l,e);l.getInstance=function(){null==l.instance&&(a.initialize(),l.instance=new l);return l.instance};l.prototype.setDesignSize=function(e,a,l){this._designWidth=e;this._designHeight=a;l&&(c.Logger.warning("\u8be5\u65b9\u6cd5\u76ee\u524d\u4e0d\u5e94\u4f20\u5165 resolutionPolicy \u53c2\u6570\uff0c\u8bf7\u5728 docs/1.0_Final_ReleaseNote\u4e2d\u67e5\u770b\u5982\u4f55\u5347\u7ea7"), this._setResolutionPolicy(l))};l.prototype._setResolutionPolicy=function(e){this._resolutionPolicy=e;e.init(this);e._apply(this,this._designWidth,this._designHeight)};l.prototype.getScaleX=function(){return this._scaleX};l.prototype.getScaleY=function(){return this._scaleY};l.prototype.getOffSetY=function(){return this._offSetY};l.canvas_name="egretCanvas";l.canvas_div_name="gameDiv";return l}(c.HashObject);c.StageDelegate=d;d.prototype.__class__="egret.StageDelegate";var b=function(){function e(a, l){this._containerStrategy=a;this._contentStrategy=l}e.prototype.init=function(e){this._containerStrategy.init(e);this._contentStrategy.init(e)};e.prototype._apply=function(e,a,l){this._containerStrategy._apply(e,a,l);this._contentStrategy._apply(e,a,l)};return e}();c.ResolutionPolicy=b;b.prototype.__class__="egret.ResolutionPolicy";var a=function(){function a(){}a.initialize=function(){a.EQUAL_TO_FRAME=new e};a.prototype.init=function(e){};a.prototype._apply=function(e,a,l){};a.prototype._setupContainer= function(){var e=document.body,a;e&&(a=e.style)&&(a.paddingTop=a.paddingTop||"0px",a.paddingRight=a.paddingRight||"0px",a.paddingBottom=a.paddingBottom||"0px",a.paddingLeft=a.paddingLeft||"0px",a.borderTop=a.borderTop||"0px",a.borderRight=a.borderRight||"0px",a.borderBottom=a.borderBottom||"0px",a.borderLeft=a.borderLeft||"0px",a.marginTop=a.marginTop||"0px",a.marginRight=a.marginRight||"0px",a.marginBottom=a.marginBottom||"0px",a.marginLeft=a.marginLeft||"0px")};return a}();c.ContainerStrategy=a; a.prototype.__class__="egret.ContainerStrategy";var e=function(e){function a(){e.apply(this,arguments)}__extends(a,e);a.prototype._apply=function(e){this._setupContainer()};return a}(a);c.EqualToFrame=e;e.prototype.__class__="egret.EqualToFrame";b=function(){function e(){}e.prototype.init=function(e){};e.prototype._apply=function(e,a,l){};e.prototype.setEgretSize=function(e,a,l,b,q,n){void 0===n&&(n=0);c.StageDelegate.getInstance()._stageWidth=Math.round(e);c.StageDelegate.getInstance()._stageHeight= Math.round(a);e=document.getElementById(d.canvas_div_name);e.style.width=l+"px";e.style.height=b+"px";e.style.top=n+"px"};e.prototype._getClientWidth=function(){return document.documentElement.clientWidth};e.prototype._getClientHeight=function(){return document.documentElement.clientHeight};return e}();c.ContentStrategy=b;b.prototype.__class__="egret.ContentStrategy";var l=function(e){function a(l){void 0===l&&(l=0);e.call(this);this.minWidth=l}__extends(a,e);a.prototype._apply=function(e,a,l){a= this._getClientWidth();var b=this._getClientHeight(),c=b/l,q=a/c,d=1;0!=this.minWidth&&(d=Math.min(1,q/this.minWidth));this.setEgretSize(q/d,l,a,b*d);e._scaleX=c*d;e._scaleY=c*d};return a}(b);c.FixedHeight=l;l.prototype.__class__="egret.FixedHeight";l=function(e){function a(l){void 0===l&&(l=0);e.call(this);this.minHeight=l}__extends(a,e);a.prototype._apply=function(e,a,l){l=this._getClientWidth();var b=this._getClientHeight(),c=l/a,q=b/c,d=1;0!=this.minHeight&&(d=Math.min(1,q/this.minHeight));this.setEgretSize(a, q/d,l*d,b,l*(1-d)/2);e._scaleX=c*d;e._scaleY=c*d};return a}(b);c.FixedWidth=l;l.prototype.__class__="egret.FixedWidth";l=function(e){function a(l,b){e.call(this);this.width=l;this.height=b}__extends(a,e);a.prototype._apply=function(e,a,l){l=this.width;var b=this.height,c=l/a;this.setEgretSize(a,b/c,l,b);e._scaleX=c;e._scaleY=c};return a}(b);c.FixedSize=l;l.prototype.__class__="egret.FixedSize";l=function(e){function a(){e.call(this)}__extends(a,e);a.prototype._apply=function(e,a,l){this.setEgretSize(a, l,a,l,Math.floor((a-a)/2));e._scaleX=1;e._scaleY=1};return a}(b);c.NoScale=l;l.prototype.__class__="egret.NoScale";l=function(e){function a(){e.call(this)}__extends(a,e);a.prototype._apply=function(e,a,l){var b=this._getClientWidth(),c=this._getClientHeight(),q=b,d=c,h=q/a=a.x+a.width||d.y+d.height+c<=a.y||d.y+c>=a.y+a.height?!0:!1};a.prototype.getDrawAreaList=function(){var e;0==this._drawAreaList.length?(this._defaultDrawAreaList||(this._defaultDrawAreaList=[new c.Rectangle(0,0,c.MainContext.instance.stage.stageWidth,c.MainContext.instance.stage.stageHeight)],c.MainContext.instance.stage.addEventListener(c.Event.RESIZE, this.onResize,this)),e=this._defaultDrawAreaList):e=this._drawAreaList;return e};a.prototype.onResize=function(){c.MainContext.instance.stage.removeEventListener(c.Event.RESIZE,this.onResize,this);this._defaultDrawAreaList=null};return a}(c.HashObject);c.RenderFilter=d;d.prototype.__class__="egret.RenderFilter"})(egret||(egret={})); (function(c){var d=function(){function b(){}b.mapClass=function(a,e,l){void 0===l&&(l="");a=this.getKey(a)+"#"+l;this.mapClassDic[a]=e};b.getKey=function(a){return"string"==typeof a?a:c.getQualifiedClassName(a)};b.mapValue=function(a,e,l){void 0===l&&(l="");a=this.getKey(a)+"#"+l;this.mapValueDic[a]=e};b.hasMapRule=function(a,e){void 0===e&&(e="");var l=this.getKey(a)+"#"+e;return this.mapValueDic[l]||this.mapClassDic[l]?!0:!1};b.getInstance=function(a,e){void 0===e&&(e="");var l=this.getKey(a)+"#"+ e;if(this.mapValueDic[l])return this.mapValueDic[l];var b=this.mapClassDic[l];if(b)return b=new b,this.mapValueDic[l]=b,delete this.mapClassDic[l],b;throw Error("\u8c03\u7528\u4e86\u672a\u914d\u7f6e\u7684\u6ce8\u5165\u89c4\u5219:"+l+"\u3002 \u8bf7\u5148\u5728\u9879\u76ee\u521d\u59cb\u5316\u91cc\u914d\u7f6e\u6307\u5b9a\u7684\u6ce8\u5165\u89c4\u5219\uff0c\u518d\u8c03\u7528\u5bf9\u5e94\u5355\u4f8b\u3002");};b.mapClassDic={};b.mapValueDic={};return b}();c.Injector=d;d.prototype.__class__="egret.Injector"})(egret|| (egret={}));(function(c){var d=function(){function b(){}b.NORMAL="normal";b.ADD="add";return b}();c.BlendMode=d;d.prototype.__class__="egret.BlendMode"})(egret||(egret={}));__extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(){b.call(this);this.__hack_local_matrix=null;this._sizeDirty=this._normalDirty=!0;this._parent=this._texture_to_render=null;this._y=this._x=0;this._scaleY=this._scaleX=1;this._anchorY=this._anchorX=this._anchorOffsetY=this._anchorOffsetX=0;this._visible=!0;this._rotation=0;this._alpha=1;this._skewY=this._skewX=0;this._touchEnabled=!1;this._scrollRect=this.blendMode=null;this._hasHeightSet=this._hasWidthSet=!1;this._worldBounds=this.mask=null;this.worldAlpha= 1;this._rectH=this._rectW=0;this._stage=null;this._cacheDirty=this._cacheAsBitmap=!1;this._colorTransform=null;this._worldTransform=new c.Matrix;this._worldBounds=new c.Rectangle(0,0,0,0);this._cacheBounds=new c.Rectangle(0,0,0,0)}__extends(a,b);a.prototype._setDirty=function(){this._normalDirty=!0};a.prototype.getDirty=function(){return this._normalDirty||this._sizeDirty};a.prototype._setParentSizeDirty=function(){var e=this._parent;!e||e._hasWidthSet||e._hasHeightSet||e._setSizeDirty()};a.prototype._setSizeDirty= function(){this._sizeDirty||(this._sizeDirty=!0,this._setDirty(),this._setCacheDirty(),this._setParentSizeDirty())};a.prototype._clearDirty=function(){this._normalDirty=!1};a.prototype._clearSizeDirty=function(){this._sizeDirty=!1};Object.defineProperty(a.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0});a.prototype._parentChanged=function(e){this._parent=e};Object.defineProperty(a.prototype,"x",{get:function(){return this._x},set:function(e){this._setX(e)},enumerable:!0, configurable:!0});a.prototype._setX=function(e){c.NumberUtils.isNumber(e)&&this._x!=e&&(this._x=e,this._setDirty(),this._setParentSizeDirty())};Object.defineProperty(a.prototype,"y",{get:function(){return this._y},set:function(e){this._setY(e)},enumerable:!0,configurable:!0});a.prototype._setY=function(e){c.NumberUtils.isNumber(e)&&this._y!=e&&(this._y=e,this._setDirty(),this._setParentSizeDirty())};Object.defineProperty(a.prototype,"scaleX",{get:function(){return this._scaleX},set:function(e){c.NumberUtils.isNumber(e)&& this._scaleX!=e&&(this._scaleX=e,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"scaleY",{get:function(){return this._scaleY},set:function(e){c.NumberUtils.isNumber(e)&&this._scaleY!=e&&(this._scaleY=e,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorOffsetX",{get:function(){return this._anchorOffsetX},set:function(e){c.NumberUtils.isNumber(e)&&this._anchorOffsetX!= e&&(this._anchorOffsetX=e,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorOffsetY",{get:function(){return this._anchorOffsetY},set:function(e){c.NumberUtils.isNumber(e)&&this._anchorOffsetY!=e&&(this._anchorOffsetY=e,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorX",{get:function(){return this._anchorX},set:function(e){this._setAnchorX(e)},enumerable:!0,configurable:!0}); a.prototype._setAnchorX=function(e){c.NumberUtils.isNumber(e)&&this._anchorX!=e&&(this._anchorX=e,this._setDirty(),this._setParentSizeDirty())};Object.defineProperty(a.prototype,"anchorY",{get:function(){return this._anchorY},set:function(e){this._setAnchorY(e)},enumerable:!0,configurable:!0});a.prototype._setAnchorY=function(e){c.NumberUtils.isNumber(e)&&this._anchorY!=e&&(this._anchorY=e,this._setDirty(),this._setParentSizeDirty())};Object.defineProperty(a.prototype,"visible",{get:function(){return this._visible}, set:function(e){this._setVisible(e)},enumerable:!0,configurable:!0});a.prototype._setVisible=function(e){this._visible!=e&&(this._visible=e,this._setSizeDirty())};Object.defineProperty(a.prototype,"rotation",{get:function(){return this._rotation},set:function(e){c.NumberUtils.isNumber(e)&&this._rotation!=e&&(this._rotation=e,this._setSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"alpha",{get:function(){return this._alpha},set:function(e){c.NumberUtils.isNumber(e)&& this._alpha!=e&&(this._alpha=e,this._setDirty(),this._setCacheDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"skewX",{get:function(){return this._skewX},set:function(e){c.NumberUtils.isNumber(e)&&this._skewX!=e&&(this._skewX=e,this._setSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"skewY",{get:function(){return this._skewY},set:function(e){c.NumberUtils.isNumber(e)&&this._skewY!=e&&(this._skewY=e,this._setSizeDirty())},enumerable:!0,configurable:!0}); Object.defineProperty(a.prototype,"touchEnabled",{get:function(){return this._touchEnabled},set:function(e){this._setTouchEnabled(e)},enumerable:!0,configurable:!0});a.prototype._setTouchEnabled=function(e){this._touchEnabled=e};Object.defineProperty(a.prototype,"scrollRect",{get:function(){return this._scrollRect},set:function(e){this._setScrollRect(e)},enumerable:!0,configurable:!0});a.prototype._setScrollRect=function(e){this._scrollRect=e;this._setSizeDirty()};Object.defineProperty(a.prototype, "measuredWidth",{get:function(){return this._measureBounds().width},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"measuredHeight",{get:function(){return this._measureBounds().height},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"explicitWidth",{get:function(){return this._explicitWidth},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"explicitHeight",{get:function(){return this._explicitHeight},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype, "width",{get:function(){return this._getSize(c.Rectangle.identity).width},set:function(e){this._setWidth(e)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"height",{get:function(){return this._getSize(c.Rectangle.identity).height},set:function(e){this._setHeight(e)},enumerable:!0,configurable:!0});a.prototype._setWidth=function(e){this._setSizeDirty();this._setCacheDirty();this._explicitWidth=e;this._hasWidthSet=c.NumberUtils.isNumber(e)};a.prototype._setHeight=function(e){this._setSizeDirty(); this._setCacheDirty();this._explicitHeight=e;this._hasHeightSet=c.NumberUtils.isNumber(e)};a.prototype._draw=function(e){if(this._visible&&!this.drawCacheTexture(e)){this._colorTransform&&e.setGlobalColorTransform(this._colorTransform.matrix);e.setAlpha(this.worldAlpha,this.blendMode);e.setTransform(this._worldTransform);var a=this.mask||this._scrollRect;a&&e.pushMask(a);this._render(e);a&&e.popMask();this._colorTransform&&e.setGlobalColorTransform(null)}this.destroyCacheBounds()};a.prototype.drawCacheTexture= function(e){if(!1==this._cacheAsBitmap)return!1;if(this._cacheDirty||null==this._texture_to_render||Math.round(this.width)!=Math.round(this._texture_to_render._sourceWidth)||Math.round(this.height)!=Math.round(this._texture_to_render._sourceHeight))this._cacheDirty=!this._makeBitmapCache();if(null==this._texture_to_render)return!1;var a=this._texture_to_render,b=a._offsetX,d=a._offsetY,g=a._textureWidth,a=a._textureHeight;this._updateTransform();e.setAlpha(this.worldAlpha,this.blendMode);e.setTransform(this._worldTransform); var f=c.MainContext.instance.rendererContext.texture_scale_factor;c.RenderFilter.getInstance().drawImage(e,this,0,0,g*f,a*f,b,d,g,a);return!0};a.prototype._updateTransform=function(){this._calculateWorldTransform()};a.prototype._calculateWorldTransform=function(){var e=this._worldTransform,a=this._parent;e.identityMatrix(a._worldTransform);this._getMatrix(e);var b=this._scrollRect;b&&e.append(1,0,0,1,-b.x,-b.y);this.worldAlpha=a.worldAlpha*this._alpha};a.prototype._render=function(e){};a.prototype.getBounds= function(e,a){void 0===a&&(a=!0);var b=this._measureBounds(),d=this._hasWidthSet?this._explicitWidth:b.width,g=this._hasHeightSet?this._explicitHeight:b.height;this._rectW=b.width;this._rectH=b.height;this._clearSizeDirty();var f=b.x,b=b.y,k=0,m=0;a&&(0!=this._anchorX||0!=this._anchorY?(k=d*this._anchorX,m=g*this._anchorY):(k=this._anchorOffsetX,m=this._anchorOffsetY));this._cacheBounds.initialize(f-k,b-m,d,g);d=this._cacheBounds;e||(e=new c.Rectangle);return e.initialize(d.x,d.y,d.width,d.height)}; a.prototype.destroyCacheBounds=function(){this._cacheBounds.x=0;this._cacheBounds.y=0;this._cacheBounds.width=0;this._cacheBounds.height=0};a.prototype._getConcatenatedMatrix=function(){for(var e=a.identityMatrixForGetConcatenated.identity(),l=this;null!=l;){if(0!=l._anchorX||0!=l._anchorY){var b=l._getSize(c.Rectangle.identity);e.prependTransform(l._x,l._y,l._scaleX,l._scaleY,l._rotation,l._skewX,l._skewY,b.width*l._anchorX,b.height*l._anchorY)}else e.prependTransform(l._x,l._y,l._scaleX,l._scaleY, l._rotation,l._skewX,l._skewY,l._anchorOffsetX,l._anchorOffsetY);l=l._parent}return e};a.prototype.localToGlobal=function(e,a,b){void 0===e&&(e=0);void 0===a&&(a=0);var d=this._getConcatenatedMatrix();d.append(1,0,0,1,e,a);b||(b=new c.Point);b.x=d.tx;b.y=d.ty;return b};a.prototype.globalToLocal=function(e,a,b){void 0===e&&(e=0);void 0===a&&(a=0);var d=this._getConcatenatedMatrix();d.invert();d.append(1,0,0,1,e,a);b||(b=new c.Point);b.x=d.tx;b.y=d.ty;return b};a.prototype.hitTest=function(e,a,b){void 0=== b&&(b=!1);if(!this._visible||!b&&!this._touchEnabled)return null;b=this._getSize(c.Rectangle.identity);return 0<=e&&ethis._scrollRect.x&&a>this._scrollRect.y&&es&&(s=b);(b=k+m+n)s&&(s=b);(b=m+n)s&&(s=b);(c=d+p)u&&(u=c);(c=d+f+p)u&&(u=c);(c=f+p)u&&(u=c);return e.initialize(r,t,s-r,u-t)};Object.defineProperty(a.prototype,"colorTransform",{get:function(){return this._colorTransform},set:function(e){this._colorTransform= e},enumerable:!0,configurable:!0});a.identityMatrixForGetConcatenated=new c.Matrix;a._enterFrameCallBackList=[];a._renderCallBackList=[];return a}(c.EventDispatcher);c.DisplayObject=d;d.prototype.__class__="egret.DisplayObject";d=function(){function b(){this.matrix=null}b.prototype.updateColor=function(a,e,b,c,d,g,f,k){};return b}();c.ColorTransform=d;d.prototype.__class__="egret.ColorTransform"})(egret||(egret={})); __extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(){b.call(this);this._touchChildren=!0;this._children=[]}__extends(a,b);Object.defineProperty(a.prototype,"touchChildren",{get:function(){return this._touchChildren},set:function(e){this._touchChildren=e},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"numChildren",{get:function(){return this._children.length},enumerable:!0,configurable:!0});a.prototype.setChildIndex=function(e,a){this.doSetChildIndex(e,a)};a.prototype.doSetChildIndex=function(e, a){var b=this._children.indexOf(e);0>b&&c.Logger.fatal("child\u4e0d\u5728\u5f53\u524d\u5bb9\u5668\u5185");this._children.splice(b,1);0>a||this._children.length<=a?this._children.push(e):this._children.splice(a,0,e)};a.prototype.addChild=function(e){var a=this._children.length;e._parent==this&&a--;return this._doAddChild(e,a)};a.prototype.addChildAt=function(e,a){return this._doAddChild(e,a)};a.prototype._doAddChild=function(e,b,d){void 0===d&&(d=!0);if(e==this)return e;if(0>b||b>this._children.length)return c.Logger.fatal("\u63d0\u4f9b\u7684\u7d22\u5f15\u8d85\u51fa\u8303\u56f4"), e;var h=e._parent;if(h==this)return this.doSetChildIndex(e,b),e;h&&(b=h._children.indexOf(e),0<=b&&h._doRemoveChild(b));this._children.splice(b,0,e);e._parentChanged(this);d&&e.dispatchEventWith(c.Event.ADDED,!0);if(this._stage)for(e._onAddToStage(),b=a.__EVENT__ADD_TO_STAGE_LIST;0a||0==f)a=r;if(pd||0==f)d=k}}return c.Rectangle.identity.initialize(e,b,a-e,d-b)};a.prototype.hitTest=function(e,a,d){void 0===d&&(d=!1);var h;if(!this._visible)return null;if(this._scrollRect){if(ethis._scrollRect.x+this._scrollRect.width||a>this._scrollRect.y+this._scrollRect.height)return null}else if(this.mask&&(this.mask.x>e||e>this.mask.x+this.mask.width||this.mask.y> a||a>this.mask.y+this.mask.height))return null;for(var g=this._children,f=this._touchChildren,k=g.length-1;0<=k;k--){var m=g[k],n=m._getMatrix(),p=m._scrollRect;p&&n.append(1,0,0,1,-p.x,-p.y);n.invert();n=c.Matrix.transformCoords(n,e,a);if(m=m.hitTest(n.x,n.y,!0)){if(!f)return this;if(m._touchEnabled&&f)return m;h=this}}return h?h:this._texture_to_render||this.graphics?b.prototype.hitTest.call(this,e,a,d):null};a.prototype._onAddToStage=function(){b.prototype._onAddToStage.call(this);for(var e=this._children.length, a=0;aa||a>this.getMaxScrollTop():0>b||b>this.getMaxScrollLeft()};a.prototype._validatePosition=function(e,a){void 0===e&&(e=!1);void 0===a&&(a=!1);if(e){var b=this.height,c=this._getContentHeight();this._scrollTop=Math.max(this._scrollTop,(0-b)/2);this._scrollTop=Math.min(this._scrollTop,c>b?c-b/2:c/2)}a&&(b=this.width,c=this._getContentWidth(),this._scrollLeft=Math.max(this._scrollLeft,(0-b)/2),this._scrollLeft=Math.min(this._scrollLeft,c>b?c-b/2:c/2))};a.prototype._setWidth=function(e){this._explicitWidth!= e&&(b.prototype._setWidth.call(this,e),this._updateContentPosition())};a.prototype._setHeight=function(e){this._explicitHeight!=e&&(b.prototype._setHeight.call(this,e),this._updateContentPosition())};a.prototype._updateContentPosition=function(){var e=this.getBounds(c.Rectangle.identity);this.scrollRect=new c.Rectangle(this._scrollLeft,this._scrollTop,e.width,e.height);this.dispatchEvent(new c.Event(c.Event.CHANGE))};a.prototype._checkScrollPolicy=function(){var e=this.__checkScrollPolicy(this._horizontalScrollPolicy, this._getContentWidth(),this.width);this._hCanScroll=e;var a=this.__checkScrollPolicy(this._verticalScrollPolicy,this._getContentHeight(),this.height);this._vCanScroll=a;return e||a};a.prototype.__checkScrollPolicy=function(e,a,b){return"on"==e?!0:"off"==e?!1:a>b};a.prototype._addEvents=function(){this.addEventListener(c.TouchEvent.TOUCH_BEGIN,this._onTouchBegin,this);this.addEventListener(c.TouchEvent.TOUCH_BEGIN,this._onTouchBeginCapture,this,!0);this.addEventListener(c.TouchEvent.TOUCH_END,this._onTouchEndCapture, this,!0)};a.prototype._removeEvents=function(){this.removeEventListener(c.TouchEvent.TOUCH_BEGIN,this._onTouchBegin,this);this.removeEventListener(c.TouchEvent.TOUCH_BEGIN,this._onTouchBeginCapture,this,!0);this.removeEventListener(c.TouchEvent.TOUCH_END,this._onTouchEndCapture,this,!0)};a.prototype._onTouchBegin=function(e){e._isDefaultPrevented||(c.Tween.removeTweens(this),this.stage.addEventListener(c.TouchEvent.TOUCH_MOVE,this._onTouchMove,this),this.stage.addEventListener(c.TouchEvent.TOUCH_END, this._onTouchEnd,this),this.stage.addEventListener(c.TouchEvent.LEAVE_STAGE,this._onTouchEnd,this),this.addEventListener(c.Event.ENTER_FRAME,this._onEnterFrame,this),this._logTouchEvent(e),e.preventDefault())};a.prototype._onTouchBeginCapture=function(e){var b=this._checkScrollPolicy();if(b){for(var d=e.target;d!=this;){if(d instanceof a&&(b=d._checkScrollPolicy()))return;d=d.parent}e.stopPropagation();this.delayTouchBeginEvent=this.cloneTouchEvent(e);this.touchBeginTimer||(this.touchBeginTimer=new c.Timer(100, 1),this.touchBeginTimer.addEventListener(c.TimerEvent.TIMER_COMPLETE,this._onTouchBeginTimer,this));this.touchBeginTimer.start();this._onTouchBegin(e)}};a.prototype._onTouchEndCapture=function(e){this.delayTouchBeginEvent&&this._onTouchBeginTimer()};a.prototype._onTouchBeginTimer=function(){this.touchBeginTimer.stop();var e=this.delayTouchBeginEvent;this.delayTouchBeginEvent=null;this.dispatchPropagationEvent(e)};a.prototype.dispatchPropagationEvent=function(e){for(var a=[],b=e._target;b;)a.push(b), b=b.parent;for(var c=this._content,d=1;;d+=2){b=a[d];if(!b||b===c)break;a.unshift(b)}this._dispatchPropagationEvent(e,a)};a.prototype._dispatchPropagationEvent=function(e,a,b){for(var c=a.length,d=0;de-this._lastTouchTime&&this._calcVelocitys(this._lastTouchEvent)};a.prototype._logTouchEvent=function(e){this._lastTouchPosition.x=e.stageX;this._lastTouchPosition.y=e.stageY;this._lastTouchEvent=this.cloneTouchEvent(e);this._lastTouchTime=c.getTimer()};a.prototype._getPointChange=function(e){return{x:!1=== this._hCanScroll?0:this._lastTouchPosition.x-e.stageX,y:!1===this._vCanScroll?0:this._lastTouchPosition.y-e.stageY}};a.prototype._calcVelocitys=function(e){var a=c.getTimer();if(0==this._lastTouchTime)this._lastTouchTime=a;else{var b=this._getPointChange(e),a=a-this._lastTouchTime;b.x/=a;b.y/=a;this._velocitys.push(b);5f||f>b)for(f= a;Infinity!=Math.abs(e)&&0.02f||f>b?0.998*e*0.95:0.998*e,d++;else d=500*-Math.log(0.02/c);return{position:Math.min(b+50,Math.max(f,-50)),duration:d}};a.prototype.cloneTouchEvent=function(e){var a=new c.TouchEvent(e._type,e._bubbles,e.cancelable);a.touchPointID=e.touchPointID;a._stageX=e._stageX;a._stageY=e._stageY;a.ctrlKey=e.ctrlKey;a.altKey=e.altKey;a.shiftKey=e.shiftKey;a.touchDown=e.touchDown;a._isDefaultPrevented=!1;a._target=e._target;return a};a.prototype.throwNotSupportedError= function(){throw Error("\u6b64\u65b9\u6cd5\u5728ScrollView\u5185\u4e0d\u53ef\u7528!");};a.prototype.addChild=function(a){this.throwNotSupportedError();return null};a.prototype.addChildAt=function(a,b){this.throwNotSupportedError();return null};a.prototype.removeChild=function(a){this.throwNotSupportedError();return null};a.prototype.removeChildAt=function(a){this.throwNotSupportedError();return null};a.prototype.setChildIndex=function(a,b){this.throwNotSupportedError()};a.prototype.swapChildren=function(a, b){this.throwNotSupportedError()};a.prototype.swapChildrenAt=function(a,b){this.throwNotSupportedError()};a.weight=[1,1.33,1.66,2,2.33];return a}(c.DisplayObjectContainer);c.ScrollView=d;d.prototype.__class__="egret.ScrollView"})(egret||(egret={}));__extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(a,l,d){void 0===l&&(l=NaN);void 0===d&&(d=NaN);b.call(this,a);this.content=a;this.width=NaN==l?this._getContentWidth():l;this.height=NaN==d?this._getContentHeight():d;c.Logger.warning("egret.Scroller\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528egret.ScrollView")}__extends(a,b);Object.defineProperty(a.prototype,"scrollXEnabled",{get:function(){return"off"!=this.horizontalScrollPolicy},set:function(a){c.Logger.warning("egret.Scroller\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528egret.ScrollView"); this.horizontalScrollPolicy=a?"auto":"off"},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"scrollYEnabled",{get:function(){return"off"!=this.verticalScrollPolicy},set:function(a){c.Logger.warning("egret.Scroller\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528egret.ScrollView");this.verticalScrollPolicy=a?"auto":"off"},enumerable:!0,configurable:!0});return a}(c.ScrollView);c.Scroller=d;d.prototype.__class__="egret.Scroller"})(egret||(egret={})); (function(c){var d=function(){function b(){}b.REPEAT="repeat";b.SCALE="scale";return b}();c.BitmapFillMode=d;d.prototype.__class__="egret.BitmapFillMode"})(egret||(egret={}));__extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(a){b.call(this);this.debug=1;this.debugColor=16711680;this.scale9Grid=null;this.fillMode="scale";a&&(this._texture=a,this._setSizeDirty())}__extends(a,b);Object.defineProperty(a.prototype,"texture",{get:function(){return this._texture},set:function(a){a!=this._texture&&(this._setSizeDirty(),this._texture=a)},enumerable:!0,configurable:!0});a.prototype._render=function(e){var b=this._texture;b?(this._texture_to_render=b,a._drawBitmap(e,this._hasWidthSet?this._explicitWidth: b._textureWidth,this._hasHeightSet?this._explicitHeight:b._textureHeight,this)):this._texture_to_render=null};a._drawBitmap=function(e,b,c,d){var g=d._texture_to_render;if(g){var f=g._textureWidth,k=g._textureHeight;if("scale"==d.fillMode){var m=d.scale9Grid||g.scale9Grid;if(m&&f-m.widthb&&(b=k+f._textureHeight)}}this._textChanged=!1;return c.Rectangle.identity.initialize(0,0, a,b)};a.prototype._measureBounds=function(){return this._renderText(!0)};return a}(c.DisplayObjectContainer);c.BitmapText=d;d.prototype.__class__="egret.BitmapText"})(egret||(egret={})); (function(c){var d=function(){function b(){this._lastY=this._lastX=this._maxY=this._maxX=this._minY=this._minX=0;this.commandQueue=[]}b.prototype.beginFill=function(a,e){};b.prototype._setStyle=function(a){};b.prototype.drawRect=function(a,e,b,c){this.checkRect(a,e,b,c)};b.prototype.drawCircle=function(a,e,b){this.checkRect(a-b,e-b,2*b,2*b)};b.prototype.drawRoundRect=function(a,e,b,c,d,g){this.checkRect(a,e,b,c)};b.prototype.drawEllipse=function(a,e,b,c){this.checkRect(a-b,e-c,2*b,2*c)};b.prototype.lineStyle= function(a,e,b,c,d,g,f,k){};b.prototype.lineTo=function(a,e){this.checkPoint(a,e)};b.prototype.curveTo=function(a,e,b,c){this.checkPoint(a,e);this.checkPoint(b,c)};b.prototype.moveTo=function(a,e){this.checkPoint(a,e)};b.prototype.clear=function(){this._maxY=this._maxX=this._minY=this._minX=0};b.prototype.endFill=function(){};b.prototype._draw=function(a){};b.prototype.checkRect=function(a,e,b,c){this._minX=Math.min(this._minX,a);this._minY=Math.min(this._minY,e);this._maxX=Math.max(this._maxX,a+ b);this._maxY=Math.max(this._maxY,e+c)};b.prototype.checkPoint=function(a,e){this._minX=Math.min(this._minX,a);this._minY=Math.min(this._minY,e);this._maxX=Math.max(this._maxX,a);this._maxY=Math.max(this._maxY,e);this._lastX=a;this._lastY=e};return b}();c.Graphics=d;d.prototype.__class__="egret.Graphics";(function(){return function(b,a,e){this.method=b;this.thisObject=a;this.args=e}})().prototype.__class__="egret.Command"})(egret||(egret={})); __extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(){b.call(this)}__extends(a,b);Object.defineProperty(a.prototype,"graphics",{get:function(){this._graphics||(this._graphics=new c.Graphics);return this._graphics},enumerable:!0,configurable:!0});a.prototype._render=function(a){this._graphics&&this._graphics._draw(a)};return a}(c.DisplayObject);c.Shape=d;d.prototype.__class__="egret.Shape"})(egret||(egret={})); __extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(){b.call(this)}__extends(a,b);Object.defineProperty(a.prototype,"graphics",{get:function(){this._graphics||(this._graphics=new c.Graphics);return this._graphics},enumerable:!0,configurable:!0});a.prototype._render=function(a){this._graphics&&this._graphics._draw(a);b.prototype._render.call(this,a)};return a}(c.DisplayObjectContainer);c.Sprite=d;d.prototype.__class__="egret.Sprite"})(egret||(egret={})); __extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(){b.call(this);this._inputEnabled=!1;this._text=this._type="";this._displayAsPassword=!1;this._fontFamily=a.default_fontFamily;this._size=30;this._textColorString="#FFFFFF";this._textColor=16777215;this._strokeColorString="#000000";this._stroke=this._strokeColor=0;this._textAlign="left";this._verticalAlign="top";this._maxChars=0;this._scrollV=-1;this._numLines=this._lineSpacing=this._maxScrollV=0;this._isFlow=this._multiline=!1;this._textArr=[];this._isArrayChanged= !1;this._textMaxHeight=this._textMaxWidth=0;this._linesArr=[]}__extends(a,b);a.prototype.isInput=function(){return this._type==c.TextFieldType.INPUT};a.prototype._setTouchEnabled=function(a){b.prototype._setTouchEnabled.call(this,a);this.isInput()&&(this._inputEnabled=!0)};Object.defineProperty(a.prototype,"type",{get:function(){return this._type},set:function(a){this._setType(a)},enumerable:!0,configurable:!0});a.prototype._setType=function(a){this._type!=a&&(this._type=a,this._type==c.TextFieldType.INPUT? (this._hasWidthSet||this._setWidth(100),this._hasHeightSet||this._setHeight(30),null==this._inputUtils&&(this._inputUtils=new c.InputController),this._inputUtils.init(this),this._setDirty(),this._stage&&this._inputUtils._addStageText()):this._inputUtils&&(this._inputUtils._removeStageText(),this._inputUtils=null))};Object.defineProperty(a.prototype,"text",{get:function(){return this._getText()},set:function(a){this._setText(a)},enumerable:!0,configurable:!0});a.prototype._getText=function(){return this._type== c.TextFieldType.INPUT?this._inputUtils._getText():this._text};a.prototype._setSizeDirty=function(){b.prototype._setSizeDirty.call(this);this._isArrayChanged=!0};a.prototype._setTextDirty=function(){this._setSizeDirty()};a.prototype._setBaseText=function(a){null==a&&(a="");this._isFlow=!1;if(this._text!=a||this._displayAsPassword)this._setTextDirty(),this._text=a,a="",a=this._displayAsPassword?this.changeToPassText(this._text):this._text,this.setMiddleStyle([{text:a}])};a.prototype._setText=function(a){null== a&&(a="");this._setBaseText(a);this._inputUtils&&this._inputUtils._setText(this._text)};Object.defineProperty(a.prototype,"displayAsPassword",{get:function(){return this._displayAsPassword},set:function(a){this._setDisplayAsPassword(a)},enumerable:!0,configurable:!0});a.prototype._setDisplayAsPassword=function(a){this._displayAsPassword!=a&&(this._displayAsPassword=a,this._setText(this._text))};Object.defineProperty(a.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(a){this._setFontFamily(a)}, enumerable:!0,configurable:!0});a.prototype._setFontFamily=function(a){this._fontFamily!=a&&(this._setTextDirty(),this._fontFamily=a)};Object.defineProperty(a.prototype,"size",{get:function(){return this._size},set:function(a){this._setSize(a)},enumerable:!0,configurable:!0});a.prototype._setSize=function(a){this._size!=a&&(this._setTextDirty(),this._size=a)};Object.defineProperty(a.prototype,"italic",{get:function(){return this._italic},set:function(a){this._setItalic(a)},enumerable:!0,configurable:!0}); a.prototype._setItalic=function(a){this._italic!=a&&(this._setTextDirty(),this._italic=a)};Object.defineProperty(a.prototype,"bold",{get:function(){return this._bold},set:function(a){this._setBold(a)},enumerable:!0,configurable:!0});a.prototype._setBold=function(a){this._bold!=a&&(this._setTextDirty(),this._bold=a)};Object.defineProperty(a.prototype,"textColor",{get:function(){return this._textColor},set:function(a){this._setTextColor(a)},enumerable:!0,configurable:!0});a.prototype._setTextColor= function(a){this._textColor!=a&&(this._setTextDirty(),this._textColor=a,this._textColorString=c.toColorString(a))};Object.defineProperty(a.prototype,"strokeColor",{get:function(){return this._strokeColor},set:function(a){this._setStrokeColor(a)},enumerable:!0,configurable:!0});a.prototype._setStrokeColor=function(a){this._strokeColor!=a&&(this._setTextDirty(),this._strokeColor=a,this._strokeColorString=c.toColorString(a))};Object.defineProperty(a.prototype,"stroke",{get:function(){return this._stroke}, set:function(a){this._setStroke(a)},enumerable:!0,configurable:!0});a.prototype._setStroke=function(a){this._stroke!=a&&(this._setTextDirty(),this._stroke=a)};Object.defineProperty(a.prototype,"textAlign",{get:function(){return this._textAlign},set:function(a){this._setTextAlign(a)},enumerable:!0,configurable:!0});a.prototype._setTextAlign=function(a){this._textAlign!=a&&(this._setTextDirty(),this._textAlign=a)};Object.defineProperty(a.prototype,"verticalAlign",{get:function(){return this._verticalAlign}, set:function(a){this._setVerticalAlign(a)},enumerable:!0,configurable:!0});a.prototype._setVerticalAlign=function(a){this._verticalAlign!=a&&(this._setTextDirty(),this._verticalAlign=a)};Object.defineProperty(a.prototype,"maxChars",{get:function(){return this._maxChars},set:function(a){this._setMaxChars(a)},enumerable:!0,configurable:!0});a.prototype._setMaxChars=function(a){this._maxChars!=a&&(this._maxChars=a)};Object.defineProperty(a.prototype,"scrollV",{set:function(a){this._scrollV=a;this._setDirty()}, enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"maxScrollV",{get:function(){return this._maxScrollV},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"selectionBeginIndex",{get:function(){return 0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"selectionEndIndex",{get:function(){return 0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"caretIndex",{get:function(){return 0},enumerable:!0,configurable:!0});a.prototype._setSelection= function(a,b){};Object.defineProperty(a.prototype,"lineSpacing",{get:function(){return this._lineSpacing},set:function(a){this._setLineSpacing(a)},enumerable:!0,configurable:!0});a.prototype._setLineSpacing=function(a){this._lineSpacing!=a&&(this._setTextDirty(),this._lineSpacing=a)};a.prototype._getLineHeight=function(){return this._lineSpacing+this._size};Object.defineProperty(a.prototype,"numLines",{get:function(){return this._numLines},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype, "multiline",{get:function(){return this._multiline},set:function(a){this._setMultiline(a)},enumerable:!0,configurable:!0});a.prototype._setMultiline=function(a){this._multiline=a;this._setDirty()};a.prototype.setFocus=function(){c.Logger.warning("TextField.setFocus \u6ca1\u6709\u5b9e\u73b0")};a.prototype._onRemoveFromStage=function(){b.prototype._onRemoveFromStage.call(this);this._type==c.TextFieldType.INPUT&&this._inputUtils._removeStageText()};a.prototype._onAddToStage=function(){b.prototype._onAddToStage.call(this); this._type==c.TextFieldType.INPUT&&this._inputUtils._addStageText()};a.prototype._updateBaseTransform=function(){b.prototype._updateTransform.call(this)};a.prototype._updateTransform=function(){this._type==c.TextFieldType.INPUT?this._normalDirty?(this._clearDirty(),this._inputUtils._updateProperties()):this._inputUtils._updateTransform():this._updateBaseTransform()};a.prototype._render=function(a){this.drawText(a);this._clearDirty()};a.prototype._measureBounds=function(){return this.measureText()}; Object.defineProperty(a.prototype,"textFlow",{set:function(a){this._isFlow=!0;for(var b="",c=0;cthis._explicitWidth)break;u+=s;h+=s}0this._explicitHeight&& (f=Math.max(this._scrollV-1,0),f=Math.min(this._numLines-1,f));g=Math.round(g);h=0;this._textAlign==c.HorizontalAlign.CENTER?h=0.5:this._textAlign==c.HorizontalAlign.RIGHT&&(h=1);for(k=0;fthis._explicitHeight)break;for(var k=Math.round((d-m.width)*h),p=0;pc?(this.addToResultArr(a.substring(e)),e=b):(this.addToResultArr(a.substring(e,c)),e=a.indexOf(">",c),"/"==a.charAt(c+1)?this.stackArray.pop():this.addToArray(a.substring(c+1,e)),e+=1)}return this.resutlArr};b.prototype.addToResultArr=function(a){if(""!=a){var e=[];e.push(["<","<"]);e.push([">",">"]);e.push(["&", "&"]);e.push([""",'"']);e.push(["';","'"]);for(var b=0;bthis.maxlength){a=a+255&-256;var b=new ArrayBuffer(a),c=new Uint8Array(this.arraybytes,0,this.length);(new Uint8Array(b,0,this.length)).set(c);this.arraybytes=b;this.maxlength=a}};a.prototype.writeByte=function(a){this.ensureWriteableSpace(1);(new Int8Array(this.arraybytes))[this.position++]=~~a;this.position>this.length&&(this.length=this.position)};a.prototype.readByte=function(){if(this.position>=this.length)throw"ByteArray out of bounds read. Positon="+ this.position+", Length="+this.length;return(new Int8Array(this.arraybytes))[this.position++]};a.prototype.readBytes=function(a,b,c){void 0===b&&(b=0);void 0===c&&(c=0);null==c&&(c=a.length);a.ensureWriteableSpace(b+c);var d=new Int8Array(a.arraybytes),g=new Int8Array(this.arraybytes);d.set(g.subarray(this.position,this.position+c),b);this.position+=c;c+b>a.length&&(a.length+=c+b-a.length)};a.prototype.writeUnsignedByte=function(a){this.ensureWriteableSpace(1);(new Uint8Array(this.arraybytes))[this.position++]= ~~a&255;this.position>this.length&&(this.length=this.position)};a.prototype.readUnsignedByte=function(){if(this.position>=this.length)throw"ByteArray out of bounds read. Positon="+this.position+", Length="+this.length;return(new Uint8Array(this.arraybytes))[this.position++]};a.prototype.writeUnsignedShort=function(a){this.ensureWriteableSpace(2);if(0==(this.position&1)){var b=new Uint16Array(this.arraybytes);b[this.position>>1]=~~a&65535}else b=new Uint16Array(this.unalignedarraybytestemp,0,1),b[0]= ~~a&65535,a=new Uint8Array(this.arraybytes,this.position,2),b=new Uint8Array(this.unalignedarraybytestemp,0,2),a.set(b);this.position+=2;this.position>this.length&&(this.length=this.position)};a.prototype.readUTFBytes=function(a){var b="";a=this.position+a;for(var c=new DataView(this.arraybytes);this.positiond){if(0==d)break;b+=String.fromCharCode(d)}else if(224>d)b+=String.fromCharCode((d&63)<<6|c.getUint8(this.position++)&127);else if(240>d)var g=c.getUint8(this.position++), b=b+String.fromCharCode((d&31)<<12|(g&127)<<6|c.getUint8(this.position++)&127);else var g=c.getUint8(this.position++),f=c.getUint8(this.position++),b=b+String.fromCharCode((d&15)<<18|(g&127)<<12|f<<6&127|c.getUint8(this.position++)&127)}return b};a.prototype.readInt=function(){var a=(new DataView(this.arraybytes)).getInt32(this.position,this.isLittleEndian);this.position+=4;return a};a.prototype.readShort=function(){var a=(new DataView(this.arraybytes)).getInt16(this.position,this.isLittleEndian); this.position+=2;return a};a.prototype.readDouble=function(){var a=(new DataView(this.arraybytes)).getFloat64(this.position,this.isLittleEndian);this.position+=8;return a};a.prototype.readUnsignedShort=function(){if(this.position>this.length+2)throw"ByteArray out of bounds read. Position="+this.position+", Length="+this.length;if(0==(this.position&1)){var a=new Uint16Array(this.arraybytes),b=this.position>>1;this.position+=2;return a[b]}a=new Uint16Array(this.unalignedarraybytestemp,0,1);b=new Uint8Array(this.arraybytes, this.position,2);(new Uint8Array(this.unalignedarraybytestemp,0,2)).set(b);this.position+=2;return a[0]};a.prototype.writeUnsignedInt=function(a){this.ensureWriteableSpace(4);if(0==(this.position&3)){var b=new Uint32Array(this.arraybytes);b[this.position>>2]=~~a&4294967295}else b=new Uint32Array(this.unalignedarraybytestemp,0,1),b[0]=~~a&4294967295,a=new Uint8Array(this.arraybytes,this.position,4),b=new Uint8Array(this.unalignedarraybytestemp,0,4),a.set(b);this.position+=4;this.position>this.length&& (this.length=this.position)};a.prototype.readUnsignedInt=function(){if(this.position>this.length+4)throw"ByteArray out of bounds read. Position="+this.position+", Length="+this.length;if(0==(this.position&3)){var a=new Uint32Array(this.arraybytes),b=this.position>>2;this.position+=4;return a[b]}a=new Uint32Array(this.unalignedarraybytestemp,0,1);b=new Uint8Array(this.arraybytes,this.position,4);(new Uint8Array(this.unalignedarraybytestemp,0,4)).set(b);this.position+=4;return a[0]};a.prototype.writeFloat= function(a){this.ensureWriteableSpace(4);if(0==(this.position&3)){var b=new Float32Array(this.arraybytes);b[this.position>>2]=a}else b=new Float32Array(this.unalignedarraybytestemp,0,1),b[0]=a,a=new Uint8Array(this.arraybytes,this.position,4),b=new Uint8Array(this.unalignedarraybytestemp,0,4),a.set(b);this.position+=4;this.position>this.length&&(this.length=this.position)};a.prototype.readFloat=function(){if(this.position>this.length+4)throw"ByteArray out of bounds read. Positon="+this.position+", Length="+ this.length;if(0==(this.position&3)){var a=new Float32Array(this.arraybytes),b=this.position>>2;this.position+=4;return a[b]}a=new Float32Array(this.unalignedarraybytestemp,0,1);b=new Uint8Array(this.arraybytes,this.position,4);(new Uint8Array(this.unalignedarraybytestemp,0,4)).set(b);this.position+=4;return a[0]};a.DEFAULT_ENDIAN=d.BIG_ENDIAN;return a}();c.ByteArray=b;b.prototype.__class__="egret.ByteArray"})(egret||(egret={})); __extends=this.__extends||function(c,d){function b(){this.constructor=c}for(var a in d)d.hasOwnProperty(a)&&(c[a]=d[a]);b.prototype=d.prototype;c.prototype=new b}; (function(c){var d=function(b){function a(a,c,d){b.call(this);this._target=null;this.loop=this.ignoreGlobalPause=this._useTicks=!1;this._actions=this._steps=this.pluginData=null;this.paused=!1;this.duration=0;this._prevPos=-1;this.position=null;this._stepPosition=this._prevPosition=0;this.passive=!1;this.initialize(a,c,d)}__extends(a,b);a.get=function(e,b,c,d){void 0===b&&(b=null);void 0===c&&(c=null);void 0===d&&(d=!1);d&&a.removeTweens(e);return new a(e,b,c)};a.removeTweens=function(e){if(e.tween_count){for(var b= a._tweens,c=b.length-1;0<=c;c--)b[c]._target==e&&(b[c].paused=!0,b.splice(c,1));e.tween_count=0}};a.pauseTweens=function(a){if(a.tween_count)for(var b=c.Tween._tweens,d=b.length-1;0<=d;d--)b[d]._target==a&&(b[d].paused=!0)};a.resumeTweens=function(a){if(a.tween_count)for(var b=c.Tween._tweens,d=b.length-1;0<=d;d--)b[d]._target==a&&(b[d].paused=!1)};a.tick=function(e,b){void 0===b&&(b=!1);for(var c=a._tweens.concat(),d=c.length-1;0<=d;d--){var g=c[d];b&&!g.ignoreGlobalPause||g.paused||g.tick(g._useTicks? 1:e)}};a._register=function(e,b){var d=e._target,h=a._tweens;if(b)d&&(d.tween_count=d.tween_count?d.tween_count+1:1),h.push(e),a._inited||(c.Ticker.getInstance().register(a.tick,null),a._inited=!0);else for(d&&d.tween_count--,d=h.length;d--;)if(h[d]==e){h.splice(d,1);break}};a.removeAllTweens=function(){for(var e=a._tweens,b=0,c=e.length;ba&&(a=0);var c=a,d=!1;c>=this.duration&&(this.loop?c%=this.duration:(c=this.duration,d=!0));if(c==this._prevPos)return d; var g=this._prevPos;this.position=this._prevPos=c;this._prevPosition=a;if(this._target)if(d)this._updateTargetProps(null,1);else if(0c);f++);f=this._steps[f-1];this._updateTargetProps(f,(this._stepPosition=c-f.t)/f.d)}0!=b&&0b&&(d=b,g=a,f=k,k=m=-1);for(;(f+=m)!=k;){b=this._actions[f];var n=b.t;(n==g||n>d&&n=a)return this;var c=this._cloneProps(this._curQueueProps);return this._addStep({d:a,p0:c,p1:c,v:b})};a.prototype.to=function(a,b,c){void 0===c&&(c=void 0);if(isNaN(b)||0>b)b=0;return this._addStep({d:b||0,p0:this._cloneProps(this._curQueueProps),e:c,p1:this._cloneProps(this._appendQueueProps(a))})};a.prototype.call=function(a,b,c){void 0===b&&(b=void 0); void 0===c&&(c=void 0);return this._addAction({f:a,p:c?c:[],o:b?b:this._target})};a.prototype.set=function(a,b){void 0===b&&(b=null);return this._addAction({f:this._set,o:this,p:[a,b?b:this._target]})};a.prototype.play=function(a){a||(a=this);return this.call(a.setPaused,a,[!1])};a.prototype.pause=function(a){a||(a=this);return this.call(a.setPaused,a,[!0])};a.prototype.tick=function(a){this.paused||this.setPosition(this._prevPosition+a)};a.NONE=0;a.LOOP=1;a.REVERSE=2;a._tweens=[];a.IGNORE={};a._plugins= {};a._inited=!1;return a}(c.EventDispatcher);c.Tween=d;d.prototype.__class__="egret.Tween"})(egret||(egret={}));