(function($hx_exports,$global){"use strict";$hx_exports["lime"]=$hx_exports["lime"]||{};var $hxClasses={},$estr=function(){return js_Boot.__string_rec(this,"")};function $extend(e,t){function s(){}s.prototype=e;var i=new s;for(var a in t)i[a]=t[a];if(t.toString!==Object.prototype.toString)i.toString=t.toString;return i}var lime_app_IModule=function(){};$hxClasses["lime.app.IModule"]=lime_app_IModule;lime_app_IModule.__name__=["lime","app","IModule"];lime_app_IModule.prototype={__registerLimeModule:null,__class__:lime_app_IModule};var lime_app_Module=function(){this.onExit=new lime_app__$Event_$Int_$Void};$hxClasses["lime.app.Module"]=lime_app_Module;lime_app_Module.__name__=["lime","app","Module"];lime_app_Module.__interfaces__=[lime_app_IModule];lime_app_Module.prototype={onExit:null,__registerLimeModule:function(e){},__class__:lime_app_Module};var lime__$internal_backend_html5_HTML5Application=function(e){this.gameDeviceCache=new haxe_ds_IntMap;this.parent=e;this.currentUpdate=0;this.lastUpdate=0;this.nextUpdate=0;this.framePeriod=-1;lime_media_AudioManager.init();this.accelerometer=lime_system_Sensor.registerSensor(lime_system_SensorType.ACCELEROMETER,0)};$hxClasses["lime._internal.backend.html5.HTML5Application"]=lime__$internal_backend_html5_HTML5Application;lime__$internal_backend_html5_HTML5Application.__name__=["lime","_internal","backend","html5","HTML5Application"];lime__$internal_backend_html5_HTML5Application.prototype={gameDeviceCache:null,accelerometer:null,currentUpdate:null,deltaTime:null,framePeriod:null,lastUpdate:null,nextUpdate:null,parent:null,convertKeyCode:function(e){if(e>=65&&e<=90){return e+32}switch(e){case 12:return 1073741980;case 16:return 1073742049;case 17:return 1073742048;case 18:return 1073742050;case 19:return 1073741896;case 20:return 1073741881;case 33:return 1073741899;case 34:return 1073741902;case 35:return 1073741901;case 36:return 1073741898;case 37:return 1073741904;case 38:return 1073741906;case 39:return 1073741903;case 40:return 1073741905;case 41:return 1073741943;case 43:return 1073741940;case 44:return 1073741894;case 45:return 1073741897;case 46:return 127;case 91:return 1073742051;case 92:return 1073742055;case 93:return 1073742055;case 95:return 1073742106;case 96:return 1073741922;case 97:return 1073741913;case 98:return 1073741914;case 99:return 1073741915;case 100:return 1073741916;case 101:return 1073741917;case 102:return 1073741918;case 103:return 1073741919;case 104:return 1073741920;case 105:return 1073741921;case 106:return 1073741909;case 107:return 1073741911;case 108:return 1073741923;case 109:return 1073741910;case 110:return 1073741923;case 111:return 1073741908;case 112:return 1073741882;case 113:return 1073741883;case 114:return 1073741884;case 115:return 1073741885;case 116:return 1073741886;case 117:return 1073741887;case 118:return 1073741888;case 119:return 1073741889;case 120:return 1073741890;case 121:return 1073741891;case 122:return 1073741892;case 123:return 1073741893;case 124:return 1073741928;case 125:return 1073741929;case 126:return 1073741930;case 127:return 1073741931;case 128:return 1073741932;case 129:return 1073741933;case 130:return 1073741934;case 131:return 1073741935;case 132:return 1073741936;case 133:return 1073741937;case 134:return 1073741938;case 135:return 1073741939;case 144:return 1073741907;case 145:return 1073741895;case 160:return 94;case 161:return 33;case 163:return 35;case 164:return 36;case 166:return 1073742094;case 167:return 1073742095;case 168:return 1073742097;case 169:return 41;case 170:return 42;case 171:return 96;case 172:return 1073741898;case 173:return 45;case 174:return 1073741953;case 175:return 1073741952;case 176:return 1073742082;case 177:return 1073742083;case 178:return 1073742084;case 179:return 1073742085;case 180:return 1073742089;case 181:return 1073742086;case 182:return 1073741953;case 183:return 1073741952;case 186:return 59;case 187:return 61;case 188:return 44;case 189:return 45;case 190:return 46;case 191:return 47;case 192:return 96;case 193:return 63;case 194:return 1073741923;case 219:return 91;case 220:return 92;case 221:return 93;case 222:return 39;case 223:return 96;case 224:return 1073742051;case 226:return 92}return e},exec:function(){window.addEventListener("keydown",$bind(this,this.handleKeyEvent),false);window.addEventListener("keyup",$bind(this,this.handleKeyEvent),false);window.addEventListener("focus",$bind(this,this.handleWindowEvent),false);window.addEventListener("blur",$bind(this,this.handleWindowEvent),false);window.addEventListener("resize",$bind(this,this.handleWindowEvent),false);window.addEventListener("beforeunload",$bind(this,this.handleWindowEvent),false);window.addEventListener("devicemotion",$bind(this,this.handleSensorEvent),false);if(!CanvasRenderingContext2D.prototype.isPointInStroke){CanvasRenderingContext2D.prototype.isPointInStroke=function(e,t,s){return false}}if(!CanvasRenderingContext2D.prototype.isPointInPath){CanvasRenderingContext2D.prototype.isPointInPath=function(e,t,s){return false}}if("performance"in window==false){window.performance={}}if("now"in window.performance==false){var t=Date.now();if(performance.timing&&performance.timing.navigationStart){t=performance.timing.navigationStart}window.performance.now=function e(){return Date.now()-t}}var r=0;var e=["ms","moz","webkit","o"];for(var s=0;s=this.nextUpdate){this.deltaTime=this.currentUpdate-this.lastUpdate;var a=0;var r=this.parent.__windows;while(a0){i.onButtonDown.dispatch(b)}else{i.onButtonUp.dispatch(b)}if(s!=null){switch(b){case 0:d=0;break;case 1:d=1;break;case 2:d=2;break;case 3:d=3;break;case 4:d=9;break;case 5:d=10;break;case 8:d=4;break;case 9:d=6;break;case 10:d=7;break;case 11:d=8;break;case 12:d=11;break;case 13:d=12;break;case 14:d=13;break;case 15:d=14;break;case 16:d=5;break;default:continue}if(g>0){s.onButtonDown.dispatch(d)}else{s.onButtonUp.dispatch(d)}}}r.buttons[b]=g}}var y=0;var x=a.axes.length;while(y0){var t=null;if(this.__inactiveObject0!=null){t=this.__inactiveObject0;this.__inactiveObject0=null}else if(this.__inactiveObject1!=null){t=this.__inactiveObject1;this.__inactiveObject1=null}else{t=this.__inactiveObjectList.pop();if(this.__inactiveObjectList.length>0){this.__inactiveObject0=this.__inactiveObjectList.pop()}if(this.__inactiveObjectList.length>0){this.__inactiveObject1=this.__inactiveObjectList.pop()}}this.inactiveObjects--;this.activeObjects++;e=t}else if(this.__size==null||this.activeObjectse){this.__removeInactive(t-e)}else if(e>t){var s;var i=0;var a=e-t;while(i=0){s=t[i];s.__update(true,false)}}return this.__worldTransform},__globalToLocal:function(e,t){this.__getRenderTransform();if(e==t){var s=this.__renderTransform;var i=s.a*s.d-s.b*s.c;if(i==0){e.x=-s.tx;e.y=-s.ty}else{var a=1/i*(s.c*(s.ty-e.y)+s.d*(e.x-s.tx));e.y=1/i*(s.a*(e.y-s.ty)+s.b*(s.tx-e.x));e.x=a}}else{var r=this.__renderTransform;var _=r.a*r.d-r.b*r.c;t.x=_==0?-r.tx:1/_*(r.c*(r.ty-e.y)+r.d*(e.x-r.tx));var n=this.__renderTransform;var o=n.a*n.d-n.b*n.c;t.y=o==0?-n.ty:1/o*(n.a*(e.y-n.ty)+n.b*(n.tx-e.x))}return t},__hitTest:function(e,t,s,i,a,r){if(this.__graphics!=null){if(!r.__visible||this.__isMask){return false}if(this.get_mask()!=null&&!this.get_mask().__hitTestMask(e,t)){return false}if(this.__graphics.__hitTest(e,t,s,this.__getRenderTransform())){if(i!=null&&!a){i.push(r)}return true}}return false},__hitTestMask:function(e,t){if(this.__graphics!=null){if(this.__graphics.__hitTest(e,t,true,this.__getRenderTransform())){return true}}return false},__renderCanvas:function(e){if(this.get_mask()==null||this.get_mask().get_width()>0&&this.get_mask().get_height()>0){this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){var t=this.__cacheBitmap;if(!!t.__renderable){var s=e.__getAlpha(t.__worldAlpha);if(s>0&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){var i=e.context;e.__setBlendMode(t.__worldBlendMode);e.__pushMaskObject(t,false);lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(t.__bitmapData.image);i.globalAlpha=s;var a=t.__scrollRect;e.setTransform(t.__renderTransform,i);if(!e.__allowSmoothing||!t.smoothing){i.imageSmoothingEnabled=false}if(a==null){i.drawImage(t.__bitmapData.image.get_src(),0,0,t.__bitmapData.image.width,t.__bitmapData.image.height)}else{i.drawImage(t.__bitmapData.image.get_src(),a.x,a.y,a.width,a.height)}if(!e.__allowSmoothing||!t.smoothing){i.imageSmoothingEnabled=true}e.__popMaskObject(t,false)}}}else if(!(this.opaqueBackground==null&&this.__graphics==null)){if(!!this.__renderable){var r=e.__getAlpha(this.__worldAlpha);if(!(r<=0)){if(this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var _=e.context;e.setTransform(this.__renderTransform,_);var n=this.opaqueBackground;_.fillStyle="rgb("+(n>>>16&255)+","+(n>>>8&255)+","+(n&255)+")";_.fillRect(0,0,this.get_width(),this.get_height());e.__popMaskObject(this)}if(this.__graphics!=null){if(!!this.__renderable){var o=e.__getAlpha(this.__worldAlpha);if(!(o<=0)){var l=this.__graphics;if(l!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(l,e);var h=l.__bounds;var c=l.__width;var u=l.__height;if(l.__canvas!=null){var f=e.context;var p=this.__scrollRect;if(c>0&&u>0&&(p==null||p.width>0&&p.height>0)){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);f.globalAlpha=o;e.setTransform(l.__worldTransform,f);if(e.__isDOM){var d=1/e.pixelRatio;f.scale(d,d)}f.drawImage(l.__canvas,0,0,c,u);e.__popMaskObject(this)}}}}}}}}}}this.__renderEvent(e)},__renderCanvasMask:function(e){if(this.__graphics!=null){openfl__$internal_renderer_canvas_CanvasGraphics.renderMask(this.__graphics,e)}},__renderDOM:function(e){this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){this.__renderDOMClear(e);this.__cacheBitmap.stage=this.stage;var t=this.__cacheBitmap;if(t.stage!=null&&t.__worldVisible&&t.__renderable&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){e.__pushMaskObject(t);if(t.__bitmapData.image.buffer.__srcImage!=null){openfl__$internal_renderer_dom_DOMBitmap.renderImage(t,e)}else{openfl__$internal_renderer_dom_DOMBitmap.renderCanvas(t,e)}e.__popMaskObject(t)}else{openfl__$internal_renderer_dom_DOMBitmap.clear(t,e)}}else{var s=this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0;var i=this.__graphics;if(this.stage!=null&&this.__worldVisible&&this.__renderable&&i!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(i,e.__canvasRenderer);if(i.__softwareDirty||this.__worldAlphaChanged||this.__canvas!=i.__canvas){if(i.__canvas!=null){if(this.__canvas!=i.__canvas){if(this.__canvas!=null){e.element.removeChild(this.__canvas)}this.__canvas=i.__canvas;this.__context=i.__context;e.__initializeElement(this,this.__canvas)}}else{openfl__$internal_renderer_dom_DOMShape.clear(this,e)}}if(this.__canvas!=null){e.__pushMaskObject(this);var a=this.__renderTransform;this.__renderTransform=i.__worldTransform;if(i.__transformDirty){i.__transformDirty=false;this.__renderTransformChanged=true}e.__updateClip(this);e.__applyStyle(this,true,true,true);this.__renderTransform=a;e.__popMaskObject(this)}}else{openfl__$internal_renderer_dom_DOMShape.clear(this,e)}}this.__renderEvent(e)},__renderDOMClear:function(e){openfl__$internal_renderer_dom_DOMDisplayObject.clear(this,e)},__renderEvent:function(e){if(this.__customRenderEvent!=null&&this.__renderable){this.__customRenderEvent.allowSmoothing=e.__allowSmoothing;this.__customRenderEvent.objectMatrix.copyFrom(this.__renderTransform);this.__customRenderEvent.objectColorTransform.__copyFrom(this.__worldColorTransform);this.__customRenderEvent.renderer=e;var t=e.__type;switch(t){case"cairo":this.__customRenderEvent.type="renderCairo";break;case"canvas":this.__customRenderEvent.type="renderCanvas";break;case"dom":if(this.stage!=null&&this.__worldVisible){this.__customRenderEvent.type="renderDOM"}else{this.__customRenderEvent.type="clearDOM"}break;case"opengl":if(!e.__cleared){e.__clear()}var s=e;s.setShader(this.__worldShader);s.__context3D.__flushGL();this.__customRenderEvent.type="renderOpenGL";break;default:return}e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);this.dispatchEvent(this.__customRenderEvent);e.__popMaskObject(this);if(e.__type=="opengl"){var i=e;i.setViewport()}}},__renderGL:function(e){this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){openfl__$internal_renderer_context3D_Context3DBitmap.render(this.__cacheBitmap,e)}else if(!(this.opaqueBackground==null&&this.__graphics==null)){if(!(!this.__renderable||this.__worldAlpha<=0)){if(this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var t=e.__context3D;var s=openfl_geom_Rectangle.__pool.get();s.setTo(0,0,this.get_width(),this.get_height());e.__pushMaskRect(s,this.__renderTransform);var i=this.opaqueBackground;t.clear((i>>>16&255)/255,(i>>>8&255)/255,(i&255)/255,1,0,0,1);e.__popMaskRect();e.__popMaskObject(this);openfl_geom_Rectangle.__pool.release(s)}if(this.__graphics!=null){openfl__$internal_renderer_context3D_Context3DShape.render(this,e)}}}this.__renderEvent(e)},__renderGLMask:function(e){if(this.__graphics!=null){openfl__$internal_renderer_context3D_Context3DShape.renderMask(this,e)}},__setParentRenderDirty:function(){var e=this.__renderParent!=null?this.__renderParent:this.parent;if(e!=null&&!e.__renderDirty){e.__renderDirty=true;e.__setParentRenderDirty()}},__setStageReference:function(e){this.stage=e},__setTransformDirty:function(){if(!this.__transformDirty){this.__transformDirty=true;this.__setWorldTransformInvalid();this.__setParentRenderDirty()}},__setWorldTransformInvalid:function(){this.__worldTransformInvalid=true},__shouldCacheHardware:function(e){if(e==true||this.__filters!=null){return true}if(e==false||this.__graphics!=null&&!openfl__$internal_renderer_context3D_Context3DGraphics.isCompatible(this.__graphics)){return false}return null},__update:function(e,t){var s=this.__renderParent!=null?this.__renderParent:this.parent;if(this.__isMask&&s==null){s=this.__maskTarget}this.__renderable=this.__visible&&this.__scaleX!=0&&this.__scaleY!=0&&!this.__isMask&&(s==null||!s.__isMask);this.__updateTransforms();this.__transformDirty=false;this.__worldTransformInvalid=false;if(!e){if(openfl_display_DisplayObject.__supportDOM){this.__renderTransformChanged=!this.__renderTransform.equals(this.__renderTransformCache);if(this.__renderTransformCache==null){this.__renderTransformCache=this.__renderTransform.clone()}else{this.__renderTransformCache.copyFrom(this.__renderTransform)}}if(s!=null){if(openfl_display_DisplayObject.__supportDOM){var i=s.__worldVisible&&this.__visible;this.__worldVisibleChanged=this.__worldVisible!=i;this.__worldVisible=i;var a=this.get_alpha()*s.__worldAlpha;this.__worldAlphaChanged=this.__worldAlpha!=a;this.__worldAlpha=a}else{this.__worldAlpha=this.get_alpha()*s.__worldAlpha}if(this.__objectTransform!=null){this.__worldColorTransform.__copyFrom(this.__objectTransform.get_colorTransform());this.__worldColorTransform.__combine(s.__worldColorTransform)}else{this.__worldColorTransform.__copyFrom(s.__worldColorTransform)}if(this.__blendMode==null||this.__blendMode==10){this.__worldBlendMode=s.__worldBlendMode}else{this.__worldBlendMode=this.__blendMode}if(this.__shader==null){this.__worldShader=s.__shader}else{this.__worldShader=this.__shader}}else{this.__worldAlpha=this.get_alpha();if(openfl_display_DisplayObject.__supportDOM){this.__worldVisibleChanged=this.__worldVisible!=this.__visible;this.__worldVisible=this.__visible;this.__worldAlphaChanged=this.__worldAlpha!=this.get_alpha()}if(this.__objectTransform!=null){this.__worldColorTransform.__copyFrom(this.__objectTransform.get_colorTransform())}else{this.__worldColorTransform.__identity()}}}if(t&&this.get_mask()!=null){this.get_mask().__update(e,true)}},__updateCacheBitmap:function(e,t){if(this.__isCacheBitmapRender){return false}var s=openfl_geom_ColorTransform.__pool.get();s.__copyFrom(this.__worldColorTransform);if(e.__worldColorTransform!=null){s.__combine(e.__worldColorTransform)}var i=false;if(this.get_cacheAsBitmap()||e.__type!="opengl"&&!s.__isDefault(true)){var a=null;var r=this.__cacheBitmap==null||this.__renderDirty&&(t||this.__children!=null&&this.__children.length>0)||this.opaqueBackground!=this.__cacheBitmapBackground;var _=r||this.__graphics!=null&&this.__graphics.__softwareDirty||!this.__cacheBitmapColorTransform.__equals(s,true);var n=r||this.__graphics!=null&&this.__graphics.__hardwareDirty;var o=e.__type;if(_||n){if(o=="opengl"){if(this.__shouldCacheHardware(null)==false){o="canvas"}}if(_&&(o=="canvas"||o=="cairo")){r=true}if(n&&o=="opengl"){r=true}}var l=r||!this.__cacheBitmap.__worldTransform.equals(this.__worldTransform);var h=this.__filters!=null;if(h&&!r){var c=0;var u=this.__filters;while(c0){b=Math.ceil(a.x)}else{b=Math.floor(a.x)}if(a.y>0){y=Math.ceil(a.y)}else{y=Math.floor(a.y)}if(this.__cacheBitmapData!=null){if(m>this.__cacheBitmapData.width||v>this.__cacheBitmapData.height){d=Math.ceil(Math.max(m*1.25,this.__cacheBitmapData.width));g=Math.ceil(Math.max(v*1.25,this.__cacheBitmapData.height));r=true}else{d=this.__cacheBitmapData.width;g=this.__cacheBitmapData.height}}else{d=m;g=v}}if(r){l=true;this.__cacheBitmapBackground=this.opaqueBackground;if(m>=.5&&v>=.5){var x=this.opaqueBackground!=null&&(d!=m||g!=v);var P=this.opaqueBackground!=null?-16777216|this.opaqueBackground:0;var k=x?0:P;var w=e.__type=="opengl";if(this.__cacheBitmapData==null||d>this.__cacheBitmapData.width||g>this.__cacheBitmapData.height){this.__cacheBitmapData=new openfl_display_BitmapData(d,g,true,k);if(this.__cacheBitmap==null){this.__cacheBitmap=new openfl_display_Bitmap}this.__cacheBitmap.__bitmapData=this.__cacheBitmapData;this.__cacheBitmapRenderer=null}else{this.__cacheBitmapData.__fillRect(this.__cacheBitmapData.rect,k,w)}if(x){a.setTo(0,0,m,v);this.__cacheBitmapData.__fillRect(a,P,w)}}else{openfl_geom_ColorTransform.__pool.release(s);this.__cacheBitmap=null;this.__cacheBitmapData=null;this.__cacheBitmapData2=null;this.__cacheBitmapData3=null;this.__cacheBitmapRenderer=null;return true}}else{this.__cacheBitmapData=this.__cacheBitmap.get_bitmapData();this.__cacheBitmapData2=null;this.__cacheBitmapData3=null}if(l||r){this.__cacheBitmap.__worldTransform.copyFrom(this.__worldTransform);if(p==this.__renderTransform){this.__cacheBitmap.__renderTransform.identity();this.__cacheBitmap.__renderTransform.tx=this.__renderTransform.tx+b;this.__cacheBitmap.__renderTransform.ty=this.__renderTransform.ty+y}else{this.__cacheBitmap.__renderTransform.copyFrom(this.__cacheBitmapMatrix);this.__cacheBitmap.__renderTransform.invert();this.__cacheBitmap.__renderTransform.concat(this.__renderTransform);this.__cacheBitmap.__renderTransform.tx+=b;this.__cacheBitmap.__renderTransform.ty+=y}}this.__cacheBitmap.smoothing=e.__allowSmoothing;this.__cacheBitmap.__renderable=this.__renderable;this.__cacheBitmap.__worldAlpha=this.__worldAlpha;this.__cacheBitmap.__worldBlendMode=this.__worldBlendMode;this.__cacheBitmap.__worldShader=this.__worldShader;this.__cacheBitmap.__scrollRect=this.__scrollRect;this.__cacheBitmap.set_mask(this.__mask);if(r){if(this.__cacheBitmapRenderer==null||o!=this.__cacheBitmapRenderer.__type){if(o=="opengl"){this.__cacheBitmapRenderer=new openfl_display_OpenGLRenderer(js_Boot.__cast(e,openfl_display_OpenGLRenderer).__context3D,this.__cacheBitmapData)}else{if(this.__cacheBitmapData.image==null){var C=this.opaqueBackground!=null?-16777216|this.opaqueBackground:0;this.__cacheBitmapData=new openfl_display_BitmapData(d,g,true,C);this.__cacheBitmap.__bitmapData=this.__cacheBitmapData}lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this.__cacheBitmapData.image);this.__cacheBitmapRenderer=new openfl_display_CanvasRenderer(this.__cacheBitmapData.image.buffer.__srcContext)}this.__cacheBitmapRenderer.__worldTransform=new openfl_geom_Matrix;this.__cacheBitmapRenderer.__worldColorTransform=new openfl_geom_ColorTransform}if(this.__cacheBitmapColorTransform==null){this.__cacheBitmapColorTransform=new openfl_geom_ColorTransform}this.__cacheBitmapRenderer.__stage=this.stage;this.__cacheBitmapRenderer.__allowSmoothing=e.__allowSmoothing;this.__cacheBitmapRenderer.__setBlendMode(10);this.__cacheBitmapRenderer.__worldAlpha=1/this.__worldAlpha;this.__cacheBitmapRenderer.__worldTransform.copyFrom(this.__renderTransform);this.__cacheBitmapRenderer.__worldTransform.invert();this.__cacheBitmapRenderer.__worldTransform.concat(this.__cacheBitmapMatrix);this.__cacheBitmapRenderer.__worldTransform.tx-=b;this.__cacheBitmapRenderer.__worldTransform.ty-=y;this.__cacheBitmapRenderer.__worldColorTransform.__copyFrom(s);this.__cacheBitmapRenderer.__worldColorTransform.__invert();this.__isCacheBitmapRender=true;if(this.__cacheBitmapRenderer.__type=="opengl"){var T=e;var S=this.__cacheBitmapRenderer;var M=S.__context3D;var $=M.__state.renderToTexture;var E=M.__state.renderToTextureDepthStencil;var B=M.__state.renderToTextureAntiAlias;var L=M.__state.renderToTextureSurfaceSelector;var R=T.__blendMode;T.__suspendClipAndMask();S.__copyShader(T);this.__cacheBitmapData.__setUVRect(M,0,0,m,v);S.__setRenderTarget(this.__cacheBitmapData);if(this.__cacheBitmapData.image!=null){this.__cacheBitmapData.__textureVersion=this.__cacheBitmapData.image.version+1}this.__cacheBitmapData.__drawGL(this,S);if(h){var A=true;var I=false;var D=0;var F=this.__filters;while(Dthis.__cacheBitmapData2.width||g>this.__cacheBitmapData2.height){this.__cacheBitmapData2=new openfl_display_BitmapData(d,g,true,0)}else{this.__cacheBitmapData2.fillRect(this.__cacheBitmapData2.rect,0);if(this.__cacheBitmapData2.image!=null){this.__cacheBitmapData2.__textureVersion=this.__cacheBitmapData2.image.version+1}}this.__cacheBitmapData2.__setUVRect(M,0,0,m,v);j=this.__cacheBitmapData2;if(I){if(this.__cacheBitmapData3==null||d>this.__cacheBitmapData3.width||g>this.__cacheBitmapData3.height){this.__cacheBitmapData3=new openfl_display_BitmapData(d,g,true,0)}else{this.__cacheBitmapData3.fillRect(this.__cacheBitmapData3.rect,0);if(this.__cacheBitmapData3.image!=null){this.__cacheBitmapData3.__textureVersion=this.__cacheBitmapData3.image.version+1}}this.__cacheBitmapData3.__setUVRect(M,0,0,m,v);H=this.__cacheBitmapData3}S.__setBlendMode(10);S.__worldAlpha=1;S.__worldTransform.identity();S.__worldColorTransform.__identity();var U;var N;var V=0;var W=this.__filters;while(Vthis.__cacheBitmapData2.width||g>this.__cacheBitmapData2.height){this.__cacheBitmapData2=new openfl_display_BitmapData(d,g,true,0)}else{this.__cacheBitmapData2.fillRect(this.__cacheBitmapData2.rect,0)}se=this.__cacheBitmapData2}else{se=te}if(J){if(this.__cacheBitmapData3==null||this.__cacheBitmapData3.image==null||d>this.__cacheBitmapData3.width||g>this.__cacheBitmapData3.height){this.__cacheBitmapData3=new openfl_display_BitmapData(d,g,true,0)}else{this.__cacheBitmapData3.fillRect(this.__cacheBitmapData3.rect,0)}ie=this.__cacheBitmapData3}if(this.__tempPoint==null){this.__tempPoint=new openfl_geom_Point}var ae=this.__tempPoint;var re;var _e;var ne=0;var oe=this.__filters;while(ne1){e=1}if(e<0){e=0}if(e!=this.__alpha&&!this.get_cacheAsBitmap()){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__alpha=e},set_blendMode:function(e){if(e==null){e=10}if(e!=this.__blendMode){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__blendMode=e},get_cacheAsBitmap:function(){if(this.__filters==null){return this.__cacheAsBitmap}else{return true}},set_cacheAsBitmap:function(e){if(e!=this.__cacheAsBitmap){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__cacheAsBitmap=e},get_filters:function(){if(this.__filters==null){return[]}else{return this.__filters.slice()}},set_filters:function(e){if(e!=null&&e.length>0){this.__filters=e;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}else if(this.__filters!=null){this.__filters=null;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return e},get_height:function(){var e=openfl_geom_Rectangle.__pool.get();this.__getLocalBounds(e);var t=e.height;openfl_geom_Rectangle.__pool.release(e);return t},set_height:function(e){var t=openfl_geom_Rectangle.__pool.get();var s=openfl_geom_Matrix.__pool.get();s.identity();this.__getBounds(t,s);if(e!=t.height){this.set_scaleY(e/t.height)}else{this.set_scaleY(1)}openfl_geom_Rectangle.__pool.release(t);openfl_geom_Matrix.__pool.release(s);return e},get_loaderInfo:function(){if(this.stage!=null){return openfl__$internal_Lib.current.__loaderInfo}return null},get_mask:function(){return this.__mask},set_mask:function(e){if(e==this.__mask){return e}if(e!=this.__mask){this.__setTransformDirty();if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}if(this.__mask!=null){this.__mask.__isMask=false;this.__mask.__maskTarget=null;this.__mask.__setTransformDirty();var t=this.__mask;if(!t.__renderDirty){t.__renderDirty=true;t.__setParentRenderDirty()}}if(e!=null){e.__isMask=true;e.__maskTarget=this;e.__setWorldTransformInvalid()}if(this.__cacheBitmap!=null&&this.__cacheBitmap.get_mask()!=e){this.__cacheBitmap.set_mask(e)}return this.__mask=e},get_mouseX:function(){var e=this.stage!=null?this.stage.__mouseX:openfl__$internal_Lib.current.stage.__mouseX;var t=this.stage!=null?this.stage.__mouseY:openfl__$internal_Lib.current.stage.__mouseY;var s=this.__getRenderTransform();var i=s.a*s.d-s.b*s.c;if(i==0){return-s.tx}else{return 1/i*(s.c*(s.ty-t)+s.d*(e-s.tx))}},get_mouseY:function(){var e=this.stage!=null?this.stage.__mouseX:openfl__$internal_Lib.current.stage.__mouseX;var t=this.stage!=null?this.stage.__mouseY:openfl__$internal_Lib.current.stage.__mouseY;var s=this.__getRenderTransform();var i=s.a*s.d-s.b*s.c;if(i==0){return-s.ty}else{return 1/i*(s.a*(t-s.ty)+s.b*(s.tx-e))}},get_name:function(){return this.__name},set_name:function(e){return this.__name=e},get_rotation:function(){return this.__rotation},set_rotation:function(e){if(e!=this.__rotation){this.__rotation=e;var t=this.__rotation*(Math.PI/180);this.__rotationSine=Math.sin(t);this.__rotationCosine=Math.cos(t);this.__transform.a=this.__rotationCosine*this.__scaleX;this.__transform.b=this.__rotationSine*this.__scaleX;this.__transform.c=-this.__rotationSine*this.__scaleY;this.__transform.d=this.__rotationCosine*this.__scaleY;this.__setTransformDirty()}return e},get_scaleX:function(){return this.__scaleX},set_scaleX:function(e){if(e!=this.__scaleX){this.__scaleX=e;if(this.__transform.b==0){if(e!=this.__transform.a){this.__setTransformDirty()}this.__transform.a=e}else{var t=this.__rotationCosine*e;var s=this.__rotationSine*e;if(this.__transform.a!=t||this.__transform.b!=s){this.__setTransformDirty()}this.__transform.a=t;this.__transform.b=s}}return e},get_scaleY:function(){return this.__scaleY},set_scaleY:function(e){if(e!=this.__scaleY){this.__scaleY=e;if(this.__transform.c==0){if(e!=this.__transform.d){this.__setTransformDirty()}this.__transform.d=e}else{var t=-this.__rotationSine*e;var s=this.__rotationCosine*e;if(this.__transform.d!=s||this.__transform.c!=t){this.__setTransformDirty()}this.__transform.c=t;this.__transform.d=s}}return e},get_transform:function(){if(this.__objectTransform==null){this.__objectTransform=new openfl_geom_Transform(this)}return this.__objectTransform},set_transform:function(e){if(e==null){throw new js__$Boot_HaxeError(new openfl_errors_TypeError("Parameter transform must be non-null."))}if(this.__objectTransform==null){this.__objectTransform=new openfl_geom_Transform(this)}this.__setTransformDirty();this.__objectTransform.set_matrix(e.get_matrix());if(!this.__objectTransform.get_colorTransform().__equals(e.get_colorTransform(),true)||!this.get_cacheAsBitmap()&&this.__objectTransform.get_colorTransform().alphaMultiplier!=e.get_colorTransform().alphaMultiplier){this.__objectTransform.get_colorTransform().__copyFrom(e.get_colorTransform());if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__objectTransform},get_visible:function(){return this.__visible},set_visible:function(e){if(e!=this.__visible){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__visible=e},get_width:function(){var e=openfl_geom_Rectangle.__pool.get();this.__getLocalBounds(e);var t=e.width;openfl_geom_Rectangle.__pool.release(e);return t},set_width:function(e){var t=openfl_geom_Rectangle.__pool.get();var s=openfl_geom_Matrix.__pool.get();s.identity();this.__getBounds(t,s);if(e!=t.width){this.set_scaleX(e/t.width)}else{this.set_scaleX(1)}openfl_geom_Rectangle.__pool.release(t);openfl_geom_Matrix.__pool.release(s);return e},get_x:function(){return this.__transform.tx},set_x:function(e){if(e!=this.__transform.tx){this.__setTransformDirty()}return this.__transform.tx=e},get_y:function(){return this.__transform.ty},set_y:function(e){if(e!=this.__transform.ty){this.__setTransformDirty()}return this.__transform.ty=e},__class__:openfl_display_DisplayObject,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",set_width:"set_width",get_width:"get_width",set_visible:"set_visible",get_visible:"get_visible",set_transform:"set_transform",get_transform:"get_transform",set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_rotation:"set_rotation",get_rotation:"get_rotation",set_name:"set_name",get_name:"get_name",get_mouseY:"get_mouseY",get_mouseX:"get_mouseX",set_mask:"set_mask",get_mask:"get_mask",get_loaderInfo:"get_loaderInfo",set_height:"set_height",get_height:"get_height",set_filters:"set_filters",get_filters:"get_filters",set_cacheAsBitmap:"set_cacheAsBitmap",get_cacheAsBitmap:"get_cacheAsBitmap",set_blendMode:"set_blendMode",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var openfl_display_InteractiveObject=function(){openfl_display_DisplayObject.call(this);this.doubleClickEnabled=false;this.mouseEnabled=true;this.needsSoftKeyboard=false;this.__tabEnabled=null;this.__tabIndex=-1};$hxClasses["openfl.display.InteractiveObject"]=openfl_display_InteractiveObject;openfl_display_InteractiveObject.__name__=["openfl","display","InteractiveObject"];openfl_display_InteractiveObject.__super__=openfl_display_DisplayObject;openfl_display_InteractiveObject.prototype=$extend(openfl_display_DisplayObject.prototype,{doubleClickEnabled:null,mouseEnabled:null,needsSoftKeyboard:null,__tabEnabled:null,__tabIndex:null,__allowMouseFocus:function(){return this.get_tabEnabled()},__getInteractive:function(e){if(e!=null){e.push(this);if(this.parent!=null){this.parent.__getInteractive(e)}}return true},__hitTest:function(e,t,s,i,a,r){if(!r.get_visible()||this.__isMask||a&&!this.mouseEnabled){return false}return openfl_display_DisplayObject.prototype.__hitTest.call(this,e,t,s,i,a,r)},__tabTest:function(e){if(this.get_tabEnabled()){e.push(this)}},get_tabEnabled:function(){if(this.__tabEnabled==true){return true}else{return false}},set_tabEnabled:function(e){if(this.__tabEnabled!=e){this.__tabEnabled=e;this.dispatchEvent(new openfl_events_Event("tabEnabledChange",true,false))}return this.__tabEnabled},get_tabIndex:function(){return this.__tabIndex},__class__:openfl_display_InteractiveObject,__properties__:$extend(openfl_display_DisplayObject.prototype.__properties__,{get_tabIndex:"get_tabIndex",set_tabEnabled:"set_tabEnabled",get_tabEnabled:"get_tabEnabled"})});var openfl_display_DisplayObjectContainer=function(){openfl_display_InteractiveObject.call(this);this.mouseChildren=true;this.__tabChildren=true;this.__children=[];this.__removedChildren=openfl__$Vector_Vector_$Impl_$.toObjectVector(null)};$hxClasses["openfl.display.DisplayObjectContainer"]=openfl_display_DisplayObjectContainer;openfl_display_DisplayObjectContainer.__name__=["openfl","display","DisplayObjectContainer"];openfl_display_DisplayObjectContainer.__super__=openfl_display_InteractiveObject;openfl_display_DisplayObjectContainer.prototype=$extend(openfl_display_InteractiveObject.prototype,{mouseChildren:null,__removedChildren:null,__tabChildren:null,addChild:function(e){return this.addChildAt(e,this.get_numChildren())},addChildAt:function(e,t){if(e==null){var s=new openfl_errors_TypeError("Error #2007: Parameter child must be non-null.");s.errorID=2007;throw new js__$Boot_HaxeError(s)}else if(e.stage==e){var i=new openfl_errors_ArgumentError("Error #3783: A Stage object cannot be added as the child of another object.");i.errorID=3783;throw new js__$Boot_HaxeError(i)}if(t>this.__children.length||t<0){throw new js__$Boot_HaxeError("Invalid index position "+t)}if(e.parent==this){if(this.__children[t]!=e){HxOverrides.remove(this.__children,e);this.__children.splice(t,0,e);if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}}else{if(e.parent!=null){e.parent.removeChild(e)}this.__children.splice(t,0,e);e.parent=this;var a=this.stage!=null&&e.stage==null;if(a){this.__setStageReference(this.stage)}e.__setTransformDirty();if(!e.__renderDirty){e.__renderDirty=true;e.__setParentRenderDirty()}if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}var r=new openfl_events_Event("added",true);r.target=e;e.__dispatchWithCapture(r);if(a){var _=new openfl_events_Event("addedToStage",false,false);e.__dispatchWithCapture(_);e.__dispatchChildren(_)}}return e},getChildAt:function(e){if(e>=0&&e=0&&ethis.__children.length-1){return}else if(tthis.__children.length){throw new js__$Boot_HaxeError(new openfl_errors_RangeError("The supplied index is out of bounds."))}var s=t-e;while(s>=0){this.removeChildAt(e);--s}},setChildIndex:function(e,t){if(t>=0&&t<=this.__children.length&&e.parent==this){HxOverrides.remove(this.__children,e);this.__children.splice(t,0,e)}},__cleanup:function(){openfl_display_InteractiveObject.prototype.__cleanup.call(this);var e=0;var t=this.__children;while(e=0)if(this.__children[h].__hitTest(e,t,s,null,true,this.__children[h])){if(i!=null){i.push(r)}return true}}else if(i!=null){var c=i.length;var u=false;var f=false;while(--h>=0){u=this.__children[h].__getInteractive(null);if(u||this.mouseEnabled&&!f){if(this.__children[h].__hitTest(e,t,s,i,true,this.__children[h])){f=true;if(u&&i.length>c){break}}}}if(f){i.splice(c,0,r);return true}}}else{var p=false;while(--h>=0)if(this.__children[h].__hitTest(e,t,s,i,false,this.__children[h])){p=true;if(i==null){break}}return p}return false},__hitTestMask:function(e,t){var s=this.__children.length;while(--s>=0)if(this.__children[s].__hitTestMask(e,t)){return true}return false},__renderCanvas:function(e){var t=0;var s=this.__removedChildren;while(t0){e.__pushMaskObject(this);if(e.__stage!=null){var a=0;var r=this.__children;while(a0){e.__popMaskObject(this)}},__renderGLMask:function(e){var t=0;var s=this.__removedChildren;while(t=0&&et){return 1}else{return-1}};Reflect.compareMethods=function(e,t){if(e==t){return true}if(!Reflect.isFunction(e)||!Reflect.isFunction(t)){return false}if(e.scope==t.scope&&e.method==t.method){return e.method!=null}else{return false}};Reflect.isObject=function(e){if(e==null){return false}var t=typeof e;if(!(t=="string"||t=="object"&&e.__enum__==null)){if(t=="function"){return(e.__name__||e.__ename__)!=null}else{return false}}else{return true}};Reflect.deleteField=function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t)){return false}delete e[t];return true};Reflect.copy=function(e){var t={};var s=0;var i=Reflect.fields(e);while(s").join(">");if(t){return e.split('"').join(""").split("'").join("'")}else{return e}};StringTools.htmlUnescape=function(e){return e.split(">").join(">").split("<").join("<").split(""").join('"').split("'").join("'").split("&").join("&")};StringTools.startsWith=function(e,t){if(e.length>=t.length){return HxOverrides.substr(e,0,t.length)==t}else{return false}};StringTools.endsWith=function(e,t){var s=t.length;var i=e.length;if(i>=s){return HxOverrides.substr(e,i-s,s)==t}else{return false}};StringTools.isSpace=function(e,t){var s=HxOverrides.cca(e,t);if(!(s>8&&s<14)){return s==32}else{return true}};StringTools.ltrim=function(e){var t=e.length;var s=0;while(s0){return HxOverrides.substr(e,s,t-s)}else{return e}};StringTools.rtrim=function(e){var t=e.length;var s=0;while(s0){return HxOverrides.substr(e,0,t-s)}else{return e}};StringTools.trim=function(e){return StringTools.ltrim(StringTools.rtrim(e))};StringTools.replace=function(e,t,s){return e.split(t).join(s)};StringTools.hex=function(e,t){var s="";var i="0123456789ABCDEF";while(true){s=i.charAt(e&15)+s;e>>>=4;if(!(e>0)){break}}if(t!=null){while(s.lengtht}};_$UInt_UInt_$Impl_$.gte=function(e,t){var s=e<0;var i=t<0;if(s!=i){return s}else{return e>=t}};_$UInt_UInt_$Impl_$.toFloat=function(e){var t=e;if(t<0){return 4294967296+t}else{return t+0}};var Xml=function(e){this.nodeType=e;this.children=[];this.attributeMap=new haxe_ds_StringMap};$hxClasses["Xml"]=Xml;Xml.__name__=["Xml"];Xml.parse=function(e){return haxe_xml_Parser.parse(e)};Xml.createElement=function(e){var t=new Xml(Xml.Element);if(t.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+t.nodeType)}t.nodeName=e;return t};Xml.createPCData=function(e){var t=new Xml(Xml.PCData);if(t.nodeType==Xml.Document||t.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+t.nodeType)}t.nodeValue=e;return t};Xml.createCData=function(e){var t=new Xml(Xml.CData);if(t.nodeType==Xml.Document||t.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+t.nodeType)}t.nodeValue=e;return t};Xml.createComment=function(e){var t=new Xml(Xml.Comment);if(t.nodeType==Xml.Document||t.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+t.nodeType)}t.nodeValue=e;return t};Xml.createDocType=function(e){var t=new Xml(Xml.DocType);if(t.nodeType==Xml.Document||t.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+t.nodeType)}t.nodeValue=e;return t};Xml.createProcessingInstruction=function(e){var t=new Xml(Xml.ProcessingInstruction);if(t.nodeType==Xml.Document||t.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+t.nodeType)}t.nodeValue=e;return t};Xml.createDocument=function(){return new Xml(Xml.Document)};Xml.prototype={nodeType:null,nodeName:null,nodeValue:null,parent:null,children:null,attributeMap:null,get:function(e){if(this.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+this.nodeType)}var t=this.attributeMap;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}},set:function(e,t){if(this.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+this.nodeType)}var s=this.attributeMap;if(__map_reserved[e]!=null){s.setReserved(e,t)}else{s.h[e]=t}},exists:function(e){if(this.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+this.nodeType)}var t=this.attributeMap;if(__map_reserved[e]!=null){return t.existsReserved(e)}else{return t.h.hasOwnProperty(e)}},attributes:function(){if(this.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+this.nodeType)}return this.attributeMap.keys()},elements:function(){if(this.nodeType!=Xml.Document&&this.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found "+this.nodeType)}var e=[];var t=0;var s=this.children;while(t0){this.snd=window.document.createElement("audio");this.snd.src=new openfl_net_URLRequest(e).url;this.snd.onended=$bind(this,this.onCom);flipbookMM_global_GetDivJs.getInstance().music.appendChild(this.snd);this.snd.style.display="none"}};$hxClasses["base.baseSprite.PlayMusicJS"]=base_baseSprite_PlayMusicJS;base_baseSprite_PlayMusicJS.__name__=["base","baseSprite","PlayMusicJS"];base_baseSprite_PlayMusicJS.prototype={snd:null,pausePosition:null,loopCount:null,play:function(e){if(e==null){e=1}if(this.snd==null){return}this.loopCount=e;if(this.loopCount==-1||this.loopCount>0){this.changeStatus(true)}},changeStatus:function(e){if(this.snd==null){return}if(e){this.snd.play()}else{this.pausePosition=this.snd.currentTime;this.snd.pause()}},ContinuePlay:function(){this.changeStatus(true)},stop:function(){this.changeStatus(false)},onCom:function(e){if(this.loopCount>0){this.loopCount-=1}if(this.loopCount==-1||this.loopCount>0){this.changeStatus(true)}},__class__:base_baseSprite_PlayMusicJS};var base_baseSprite_TextSprite=function(e,t){if(t==null){t=true}if(e==null){e=""}openfl_display_Sprite.call(this);this.format=new openfl_text_TextFormat;this.format.font="Arial";this.format.color=0;this.format.size=15*(window.devicePixelRatio|0);this.format.align=3;this.textField=new openfl_text_TextField;this.textField.set_defaultTextFormat(this.format);if(t){this.textField.set_autoSize(1);this.textField.set_multiline(false);this.textField.set_selectable(false)}this.textField.set_text(e);this.addChild(this.textField)};$hxClasses["base.baseSprite.TextSprite"]=base_baseSprite_TextSprite;base_baseSprite_TextSprite.__name__=["base","baseSprite","TextSprite"];base_baseSprite_TextSprite.__super__=openfl_display_Sprite;base_baseSprite_TextSprite.prototype=$extend(openfl_display_Sprite.prototype,{format:null,textField:null,set_text:function(e){this.textField.set_text(e);return e},set_textColor:function(e){this.textField.set_textColor(e);return e},__class__:base_baseSprite_TextSprite,__properties__:$extend(openfl_display_Sprite.prototype.__properties__,{set_textColor:"set_textColor",set_text:"set_text"})});var base_baseSprite_TouchSprite=function(){openfl_display_Sprite.call(this);this.init()};$hxClasses["base.baseSprite.TouchSprite"]=base_baseSprite_TouchSprite;base_baseSprite_TouchSprite.__name__=["base","baseSprite","TouchSprite"];base_baseSprite_TouchSprite.__super__=openfl_display_Sprite;base_baseSprite_TouchSprite.prototype=$extend(openfl_display_Sprite.prototype,{dotMap:null,timer:null,timeCount:null,initialDistance:null,currentDistance:null,firstDotId:null,secondDotId:null,curScale:null,firstDotPoint:null,isSlowMove:null,isZoomMode:null,init:function(){this.curScale=1;this.timeCount=0;this.isSlowMove=false;this.isZoomMode=false;this.dotMap=new haxe_ds_IntMap;this.timer=new openfl_utils_Timer(100);this.timer.addEventListener("timer",$bind(this,this.onTime));this.addEventListener("touchBegin",$bind(this,this.begin));this.addEventListener("touchMove",$bind(this,this.move));this.addEventListener("touchEnd",$bind(this,this.end))},begin:function(e){this.addData(e)},move:function(e){this.updateData(e);this.sendDragMove();this.sendZoomMove()},end:function(e){this.remove(null)},remove:function(e){this.sendSlide();this.sendDragEnd();this.sendZoomEnd();this.resetData()},addData:function(e){var t=base_baseUtils_MapUtil.$length(this.dotMap);if(t==0){this.firstDotId=e.touchPointID;this.dotMap.h[this.firstDotId]=e;this.firstDotPoint=new openfl_geom_Point(e.stageX,e.stageY);this.timer.start()}else if(t==1){if(this.dotMap.h.hasOwnProperty(e.touchPointID)){this.dotMap.h[this.firstDotId]=e}else{this.secondDotId=e.touchPointID;this.dotMap.h[this.secondDotId]=e;var s=this.dotMap.h[this.firstDotId].stageX-this.dotMap.h[this.secondDotId].stageX;var i=this.dotMap.h[this.firstDotId].stageY-this.dotMap.h[this.secondDotId].stageY;this.initialDistance=Math.sqrt(s*s+i*i)}}else if(t==2){if(this.dotMap.h.hasOwnProperty(e.touchPointID)){this.dotMap.h[e.touchPointID]=e}}},updateData:function(e){if(this.dotMap.h.hasOwnProperty(e.touchPointID)){this.dotMap.h[e.touchPointID]=e}},resetData:function(){var e=this.dotMap.keys();while(e.hasNext()){var t=e.next();this.dotMap.remove(t)}this.dotMap=null;this.dotMap=new haxe_ds_IntMap;this.firstDotPoint=null;if(this.timer.running){this.timer.stop()}this.timeCount=0;this.isSlowMove=false;this.isZoomMode=false;this.curScale=1},onTime:function(e){this.timeCount++},sendDragMove:function(){var e=base_baseUtils_MapUtil.$length(this.dotMap);if(e==1){var t=new openfl_geom_Point(this.dotMap.h[this.firstDotId].stageX,this.dotMap.h[this.firstDotId].stageY);var s=t.x-this.firstDotPoint.x;var i=t.y-this.firstDotPoint.y;var a=Math.sqrt(s*s+i*i);if(this.timeCount>1){this.isSlowMove=true}if(this.isSlowMove==true&&a!=0){var r=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_DRAG);r.set_touchScale(1);r.set_touchSlideSpeed(a);r.set_touchSlidePoint(new openfl_geom_Point(s,i));r.set_touchStartPoint(this.firstDotPoint);this.dispatchEvent(r);r=null}}},sendDragEnd:function(){if(this.isSlowMove){var e=new openfl_geom_Point(this.dotMap.h[this.firstDotId].stageX,this.dotMap.h[this.firstDotId].stageY);var t=e.x-this.firstDotPoint.x;var s=e.y-this.firstDotPoint.y;var i=Math.sqrt(t*t+s*s);var a=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_DRAG_END);a.set_touchScale(1);a.set_touchSlideSpeed(i);a.set_touchSlidePoint(new openfl_geom_Point(t,s));a.set_touchStartPoint(this.firstDotPoint);this.dispatchEvent(a);a=null;this.isSlowMove=false}},sendZoomMove:function(){var e=base_baseUtils_MapUtil.$length(this.dotMap);if(e==2){this.isZoomMode=true;var t=this.dotMap.h[this.firstDotId].stageX-this.dotMap.h[this.secondDotId].stageX;var s=this.dotMap.h[this.firstDotId].stageY-this.dotMap.h[this.secondDotId].stageY;this.currentDistance=Math.sqrt(t*t+s*s);this.curScale=this.currentDistance/this.initialDistance;var i=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM);i.set_touchScale(this.curScale);i.set_touchSlideSpeed(0);i.set_touchSlidePoint(new openfl_geom_Point(0,0));i.set_touchStartPoint(new openfl_geom_Point((this.dotMap.h[this.firstDotId].stageX+this.dotMap.h[this.secondDotId].stageX)/2,(this.dotMap.h[this.firstDotId].stageY+this.dotMap.h[this.secondDotId].stageY)/2));this.dispatchEvent(i);i=null}},sendZoomEnd:function(){if(this.isZoomMode){var e=this.dotMap.h[this.firstDotId].stageX-this.dotMap.h[this.secondDotId].stageX;var t=this.dotMap.h[this.firstDotId].stageY-this.dotMap.h[this.secondDotId].stageY;this.currentDistance=Math.sqrt(e*e+t*t);this.curScale=this.currentDistance/this.initialDistance;var s=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM_END);s.set_touchScale(this.curScale);s.set_touchSlideSpeed(0);s.set_touchSlidePoint(new openfl_geom_Point(0,0));s.set_touchStartPoint(new openfl_geom_Point((this.dotMap.h[this.firstDotId].stageX+this.dotMap.h[this.secondDotId].stageX)/2,(this.dotMap.h[this.firstDotId].stageY+this.dotMap.h[this.secondDotId].stageY)/2));this.dispatchEvent(s);s=null;this.isZoomMode=false}},sendSlide:function(){var e=base_baseUtils_MapUtil.$length(this.dotMap);if(e==1){var t=new openfl_geom_Point(this.dotMap.h[this.firstDotId].stageX,this.dotMap.h[this.firstDotId].stageY);var s=t.x-this.firstDotPoint.x;var i=t.y-this.firstDotPoint.y;var a=Math.sqrt(s*s+i*i);if(this.timeCount<=1&&a!=0){var r;if(Math.abs(s)>Math.abs(i)){if(s>0){r=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_RIGHT_SLIDE)}else{r=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_LEFT_SLIDE)}}else if(i>0){r=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_DOWN_SLIDE)}else{r=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_UP_SLIDE)}if(s+i<0){a=-a}r.set_touchScale(1);r.set_touchSlideSpeed(a);r.set_touchSlidePoint(new openfl_geom_Point(s,i));this.dispatchEvent(r);r=null}}},__class__:base_baseSprite_TouchSprite});var base_baseUtils_MapUtil=function(){};$hxClasses["base.baseUtils.MapUtil"]=base_baseUtils_MapUtil;base_baseUtils_MapUtil.__name__=["base","baseUtils","MapUtil"];base_baseUtils_MapUtil.$length=function(e){if(e==null){return 0}else{var t=0;var s=e.keys();while(s.hasNext()){var i=s.next();++t}return t}};base_baseUtils_MapUtil.strLength=function(e){var t=0;if(e!=null){var s=e.keys();while(s.hasNext()){var i=s.next();++t}}return t};var ffcrypt_FfcryptMain=function(e,t){this.ffcrpt=null;openfl_display_Sprite.call(this);this.format=new openfl_text_TextFormat;this.format.font="Verdana";this.format.color=0;this.format.size=15;this.format.align=3;this.lableStatus=new openfl_text_TextField;this.lableStatus.set_defaultTextFormat(this.format);this.lableStatus.set_multiline(false);this.lableStatus.set_selectable(false);this.lableStatus.set_backgroundColor(0);this.lableStatus.set_text("");this.lableStatus.set_autoSize(1);this.addChild(this.lableStatus);this.onComFun=t;this.ffcrpt=new ffcrypt_samples_TSBookBinParse(null,null,$bind(this,this.onLoadProgress),$bind(this,this.onIoError),$bind(this,this.onSecurityError));this.ffcrpt.startLoad(e,$bind(this,this.onBookBinParseOver))};$hxClasses["ffcrypt.FfcryptMain"]=ffcrypt_FfcryptMain;ffcrypt_FfcryptMain.__name__=["ffcrypt","FfcryptMain"];ffcrypt_FfcryptMain.__super__=openfl_display_Sprite;ffcrypt_FfcryptMain.prototype=$extend(openfl_display_Sprite.prototype,{ffcrpt:null,lableStatus:null,format:null,onComFun:null,onLoadProgress:function(e){var t=0;try{if(e!=null){t=e.progress*100}else{t=0}this.lableStatus.set_text(t==null?"null":""+t)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,openfl_errors_Error)){return}else throw e}},onIoError:function(e){this.lableStatus.set_textColor(16711680);this.lableStatus.set_text("failure, io error")},onSecurityError:function(e){this.lableStatus.set_textColor(16711680);this.lableStatus.set_text("failure, security error")},onBookBinParseOver:function(e){var t=this;if(e==null){return}if(this.ffcrpt!=e){return}var s=function(){t.lableStatus.set_textColor(16711680);t.lableStatus.set_text("loading book.bin... : failure, format error")};if(e.xmlString==null||e.xmlString.length<=0){s();return}this.onComFun(e.xmlString)},__class__:ffcrypt_FfcryptMain});var ffcrypt_FfcryptMainJs=function(e,t){this.ffParse=null;this.onComplete=null;if(e!=null&&e.length>0){if(t!=null){this.onComplete=t}this.ffParse=new ffcrypt_codes_FFBookBinParse(ffcrypt_FfcryptMainJs.BinTestKey);this.loadXmlJsFun(e)}};$hxClasses["ffcrypt.FfcryptMainJs"]=ffcrypt_FfcryptMainJs;ffcrypt_FfcryptMainJs.__name__=["ffcrypt","FfcryptMainJs"];ffcrypt_FfcryptMainJs.prototype={onComplete:null,ffParse:null,loadXmlJsFun:function(e){var n=this;var o=null;var t=function(){if(o!=null){if(o.readyState==4){if(n.onComplete!=null){if(o.response!=null){var e=new Uint8Array(o.response);var t=new openfl_utils_ByteArrayData(e.length);var s=t;var i=0;var a=e.length;while(is.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}var _=i.b;var n=s.b;var o=0;var l=r;while(o>>2&3;var T=v-1;while(T>=0){b=m[T>0?T-1:v-1];P=(b>>>5^y<<2)+(y>>>3^b<<4)^(C^y)+(l[T&3^k]^b);var S=m;var M=T;S[M]-=P;y=S[M];--T}C-=x}var $=[];var E=m.length;var B;var L;var R;var A;var I=0;var D=E;while(I>8;R=(m[F]&16711680)>>16;A=(m[F]&-16777216)>>24;if(A<0){A+=256}$[F*4]=B;$[F*4+1]=L;$[F*4+2]=R;$[F*4+3]=A}return $};var ffcrypt_samples_TSBaseLoader=function(e,t,s,i,a){this.isLoad=false;this.progress=0;this.loader=null;this.progress=0;this.loadType="";this.isLoad=false;this.onOpen=e;this.onProgress=s;this.onIoError=i;this.onHttpStatus=null;this.onSecurityError=a;this.onComplete=t;return};$hxClasses["ffcrypt.samples.TSBaseLoader"]=ffcrypt_samples_TSBaseLoader;ffcrypt_samples_TSBaseLoader.__name__=["ffcrypt","samples","TSBaseLoader"];ffcrypt_samples_TSBaseLoader.prototype={url:null,loader:null,loadType:null,progress:null,isLoad:null,onOpen:null,onComplete:null,onProgress:null,onHttpStatus:null,onSecurityError:null,onIoError:null,startLoad:function(e){if(e==null){e=""}if(e==null||e.length<=0){return false}this.url=e;this.progress=0;this.isLoad=false;this.loader=new openfl_net_URLLoader;this.loader.dataFormat=0;this.loadType=0;this.loader.addEventListener("complete",$bind(this,this.completeHandler));this.loader.addEventListener("open",$bind(this,this.openHandler));this.loader.addEventListener("progress",$bind(this,this.progressHandler));this.loader.addEventListener("securityError",$bind(this,this.securityErrorHandler));this.loader.addEventListener("httpStatus",$bind(this,this.httpStatusHandler));this.loader.addEventListener("ioError",$bind(this,this.ioErrorHandler));try{this.loader.load(new openfl_net_URLRequest(e))}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,openfl_errors_Error)){}else throw e}return true},openHandler:function(e){},ioErrorHandler:function(e){this.isLoad=false;if(this.onIoError!=null){this.onIoError(this)}},progressHandler:function(e){this.progress=e.bytesLoaded/e.bytesTotal;if(this.onProgress!=null){this.onProgress(this)}},httpStatusHandler:function(e){},securityErrorHandler:function(e){this.isLoad=false;if(this.onSecurityError!=null){this.onSecurityError(this)}},completeHandler:function(e){var t;try{t=js_Boot.__cast(e.target,openfl_net_URLLoader)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,openfl_errors_Error)){t=null}else throw e}if(t==null){this.isLoad=false;if(this.onComplete!=null){this.onComplete(this)}}else{this.isLoad=true;this.loadType=t.dataFormat;if(this.onComplete!=null){this.onComplete(this)}}return},__class__:ffcrypt_samples_TSBaseLoader};var ffcrypt_samples_TSBookBinParse=function(e,t,s,i,a){this.xmlString=null;this.progress=0;this.isLoaded=false;this.isError=false;this.base=new ffcrypt_samples_TSBaseLoader($bind(this,this.openHandler),$bind(this,this.completeHandler),$bind(this,this.progressHandler),$bind(this,this.ioErrorHandler),$bind(this,this.securityErrorHandler));this.isError=false;this.isLoaded=false;this.onOpen=e;this.onProgress=s;this.onIoError=i;this.onHttpStatus=null;this.onSecurityError=a;this.onComplete=t;return};$hxClasses["ffcrypt.samples.TSBookBinParse"]=ffcrypt_samples_TSBookBinParse;ffcrypt_samples_TSBookBinParse.__name__=["ffcrypt","samples","TSBookBinParse"];ffcrypt_samples_TSBookBinParse.prototype={isError:null,isLoaded:null,base:null,progress:null,xmlString:null,onOpen:null,onComplete:null,onProgress:null,onHttpStatus:null,onSecurityError:null,onIoError:null,onParseComplete:null,onCompleteToParse:function(e){var t;try{t=js_Boot.__cast(e,openfl_net_URLLoader)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,openfl_errors_Error)){t=null}else throw e}if(t==null){return}var s=t.data;var i=new ffcrypt_codes_FFBookBinParse(ffcrypt_samples_TSBookBinParse.BinTestKey);this.xmlString=i.parse(t.data);if(this.onParseComplete!=null){this.onParseComplete(this)}return},startLoad:function(e,t){if(e==null){e=""}this.progress=0;this.isError=false;this.isLoaded=false;this.onParseComplete=t;if(this.base!=null){return this.base.startLoad(e)}return false},openHandler:function(e){if(this.onOpen!=null){this.onOpen(this)}},ioErrorHandler:function(e){this.isError=true;if(this.onIoError!=null){this.onIoError(this)}},progressHandler:function(e){this.progress=e.progress;if(this.onProgress!=null){this.onProgress(this)}},securityErrorHandler:function(e){if(this.onSecurityError!=null){this.onSecurityError(this)}},completeHandler:function(e){if(e!=null){this.onCompleteToParse(e.isLoad!=false?e.loader:null)}if(this.onComplete!=null){this.onComplete(this)}return},__class__:ffcrypt_samples_TSBookBinParse};var flipbookMM_AppMain=function(e,t){this.isPC=true;openfl_display_Sprite.call(this);this.init(e,t)};$hxClasses["flipbookMM.AppMain"]=flipbookMM_AppMain;flipbookMM_AppMain.__name__=["flipbookMM","AppMain"];flipbookMM_AppMain.getInstance=function(e,t){if(t==null){t=0}if(e==null){e=0}if(flipbookMM_AppMain.instance==null){flipbookMM_AppMain.instance=new flipbookMM_AppMain(e,t)}return flipbookMM_AppMain.instance};flipbookMM_AppMain.__super__=openfl_display_Sprite;flipbookMM_AppMain.prototype=$extend(openfl_display_Sprite.prototype,{appWidth:null,appHeight:null,appLoader:null,ffcrptMain:null,ffcrptMainJs:null,book:null,background:null,toolBar:null,isConfigEncryption:null,isSupportNative:null,isPC:null,register:null,init:function(e,t){this.appWidth=e;this.appHeight=t;this.isConfigEncryption=true;this.isSupportNative=false;this.initConfig()},loadXmlJsFun:function(e){var t=this;var s=null;var i=function(){if(s!=null){if(s.readyState==4){t.loadConfig(s.responseText);var e=s.status==200}}};var a=function(e){s=null;if(window.XMLHttpRequest){s=new XMLHttpRequest}else if(window.ActiveXObject){s=new ActiveXObject("Microsoft.XMLHTTP")}if(s!=null){s.onreadystatechange=i;s.open("GET",e,true);s.send(null)}};a(e)},initConfig:function(){var t=this;if(this.isConfigEncryption){if(this.isSupportNative){if(this.isPC){this.ffcrptMainJs=new ffcrypt_FfcryptMainJs(flipbookMM_config_Resource.FLIPBOOKXML_PC_PATH_BIN,$bind(this,this.loadConfig))}else{this.ffcrptMainJs=new ffcrypt_FfcryptMainJs(flipbookMM_config_Resource.FLIPBOOKXML_PATH_BIN,$bind(this,this.loadConfig))}}else{if(this.isPC){this.ffcrptMain=new ffcrypt_FfcryptMain(flipbookMM_config_Resource.FLIPBOOKXML_PC_PATH_BIN,$bind(this,this.loadConfig))}else{this.ffcrptMain=new ffcrypt_FfcryptMain(flipbookMM_config_Resource.FLIPBOOKXML_PATH_BIN,$bind(this,this.loadConfig))}this.addChild(this.ffcrptMain)}}else if(this.isSupportNative){if(this.isPC){this.loadXmlJsFun(flipbookMM_config_Resource.FLIPBOOKXML_PC_PATH)}else{this.loadXmlJsFun(flipbookMM_config_Resource.FLIPBOOKXML_PATH)}}else{var e=function(e){t.loadConfig(e.target.data);t.appLoader.destroyMe();t.appLoader=null};if(this.isPC){this.appLoader=new base_baseLoad_LoadData(flipbookMM_config_Resource.FLIPBOOKXML_PC_PATH,e)}else{this.appLoader=new base_baseLoad_LoadData(flipbookMM_config_Resource.FLIPBOOKXML_PATH,e)}}},loadConfig:function(e){this.ffcrptMainJs=null;var t=new flipbookMM_config_ConfigInit(Xml.parse(e));this.isMobileDevice();this.initOtherParameter();this.loadBackground();this.loadBook()},loadBackground:function(){this.background=new flipbookMM_background_Background(this.appWidth,this.appHeight);this.addChild(this.background)},loadRegisterInfo:function(){this.register=new flipbookMM_market_RegisterJs;this.register.set_x(this.appWidth/2/window.devicePixelRatio);this.register.set_y(this.appHeight/2/window.devicePixelRatio)},loadBook:function(){var e=this;var t=flipbookMM_config_ConfigSetting.getInstance();var s;var i=t.get(flipbookMM_config_ConfigKey.DefaultBookStyle);if(i=="Flip"){s=1}else if(i=="Slide"){s=0}else if(i=="Flip:Hardcover"){s=1;t.set(flipbookMM_config_ConfigKey.IsHardCoverStyle,"Enable")}else if(i=="Slide:Double page"){s=2}else if(i=="Flip:3D"){s=3}else{s=1}t=null;if(s==3){var a=window.document.createElement("script");a.src="./three.js";a.onload=function(){e.initBook(3);e.loadToolBar();e.loadRegisterInfo()};var r=window.document.getElementsByTagName("script")[0];r.parentNode.insertBefore(a,r)}else{this.initBook(s);this.loadToolBar();this.loadRegisterInfo()}},initBook:function(e){var t=flipbookMM_config_ConfigSetting.getInstance();this.book=new flipbookMM_bookBox_BookBox(this.appWidth,this.appHeight,Std.parseInt(t.get(flipbookMM_config_ConfigKey.PageWidth)),Std.parseInt(t.get(flipbookMM_config_ConfigKey.PageHeight)),Std.parseInt(t.get(flipbookMM_config_ConfigKey.PageCount)),e,Std.parseInt(t.get(flipbookMM_config_ConfigKey.PageBackgroundColor)),this.getFisrtPageIndex(Std.parseInt(t.get(flipbookMM_config_ConfigKey.PageCount))));this.addChild(this.book);t=null},loadToolBar:function(){var e=flipbookMM_config_ConfigSetting.getInstance();this.toolBar=new flipbookMM_toolbar_ToolBarJs(this.appWidth,this.appHeight,this.getFisrtPageIndex(Std.parseInt(e.get(flipbookMM_config_ConfigKey.PageCount))));this.addChild(this.toolBar);e=null},isMobileDevice:function(){var e=function(){var e={versions:function(){var e=navigator.userAgent,t=navigator.appVersion;return{trident:e.indexOf("Trident")>-1,presto:e.indexOf("Presto")>-1,webKit:e.indexOf("AppleWebKit")>-1,gecko:e.indexOf("Gecko")>-1&&e.indexOf("KHTML")==-1,mobile:!!e.match(/AppleWebKit.*Mobile.*/),ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:e.indexOf("Android")>-1||e.indexOf("Linux")>-1,iPhone:e.indexOf("iPhone")>-1,iPad:e.indexOf("iPad")>-1,webApp:e.indexOf("Safari")==-1}}(),language:(navigator.browserLanguage||navigator.language).toLowerCase()};if(e.versions.mobile||e.versions.ios||e.versions.android||e.versions.iPhone||e.versions.iPad){return true}else{return false}};var t=flipbookMM_config_ConfigSetting.getInstance();if(e()){t.set(flipbookMM_config_ConfigKey.JS_mobile,"true")}else{t.set(flipbookMM_config_ConfigKey.JS_mobile,"false")}t=null},initOtherParameter:function(){var e=flipbookMM_config_ConfigSetting.getInstance();e.set(flipbookMM_config_ConfigKey.TopToolBarHeight,"50");e.set(flipbookMM_config_ConfigKey.BottomToolbarHeight,"50");e.set(flipbookMM_config_ConfigKey.ContentDisplayMarginTop,"20");e.set(flipbookMM_config_ConfigKey.ContentDisplayMarginBot,"20");e=null},getFisrtPageIndex:function(e){var t=1;var s=this.getUrlParam("pageIndex");if(s.length>0){t=Std.parseInt(s);if(t<=0||t>e){t=1}}return t},getUrlParam:function(e){var t=window.location.search;var s=t.split("?");if(s.length>1){var i=s[1].split("&");var a;var r=0;var _=i.length;while(r<_){var n=r++;a=i[n].split("=");if(a!=null&&a[0]==e){return a[1]}}return""}else{return""}},resize:function(e,t){this.appWidth=e;this.appHeight=t;if(this.background!=null){this.background.resize(this.appWidth,this.appHeight)}if(this.book!=null){this.book.resize(this.appWidth,this.appHeight)}if(this.toolBar!=null){this.toolBar.resize(this.appWidth,this.appHeight)}if(this.register!=null){this.register.set_x(this.appWidth/2/window.devicePixelRatio);this.register.set_y(this.appHeight/2/window.devicePixelRatio)}},__class__:flipbookMM_AppMain});var flipbookMM_background_Background=function(e,t){this.bgType=null;this.bgResLoader=null;this.bgResUrl=null;this.bgColor=0;this.bgAlpha=1;var s=this;openfl_display_Sprite.call(this);var i=flipbookMM_config_ConfigSetting.getInstance();if(i.hasKey(flipbookMM_config_ConfigKey.BackgroundAlpha)){this.bgAlpha=i.get(flipbookMM_config_ConfigKey.BackgroundAlpha)}if(i.hasKey(flipbookMM_config_ConfigKey.StageBackgroundColor)){this.bgColor=i.get(flipbookMM_config_ConfigKey.StageBackgroundColor)}if(i.hasKey(flipbookMM_config_ConfigKey.StageBackgroundImg)){var a=i.get(flipbookMM_config_ConfigKey.StageBackgroundImg);if(a.length>4){this.bgResUrl=a}}if(i.hasKey(flipbookMM_config_ConfigKey.StageBackgroundScene)){var r=i.get(flipbookMM_config_ConfigKey.StageBackgroundScene);if(r.length>4){this.bgResUrl=r}}if(i.yesOrNo(i.get(flipbookMM_config_ConfigKey.StageBackgroundMusicEnable))){var _=i.get(flipbookMM_config_ConfigKey.StageBackgroundMusicUrl);if(_!=null&&_.length>4){this.bgMusic=new base_baseSprite_PlayMusicJS(_);this.bgMusic.play(Std.parseInt(i.get(flipbookMM_config_ConfigKey.MusicLoopCount)));if(!i.yesOrNo(i.get(flipbookMM_config_ConfigKey.MusicAutoStart))){this.bgMusic.stop()}}}i=null;this.bgType=this.detectType(this.bgResUrl);this.resize(e,t);var n=flipbookMM_events_EventCenter.getInstance();n.addEventListener(flipbookMM_events_EventConst.SOUNDBTN_ON_OFF,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t!=null&&t.length>0){if(t=="on"){if(s.bgMusic!=null){s.bgMusic.ContinuePlay()}}else if(t=="off"){if(s.bgMusic!=null){s.bgMusic.stop()}}}});n=null};$hxClasses["flipbookMM.background.Background"]=flipbookMM_background_Background;flipbookMM_background_Background.__name__=["flipbookMM","background","Background"];flipbookMM_background_Background.__super__=openfl_display_Sprite;flipbookMM_background_Background.prototype=$extend(openfl_display_Sprite.prototype,{bgWidth:null,bgHeight:null,bgAlpha:null,bgColor:null,bgResUrl:null,bgResLoader:null,bgMusic:null,bgType:null,resize:function(e,t){var s=this;this.bgWidth=e;this.bgHeight=t;var i=this.bgType;if(i==null){this.get_graphics().clear();this.get_graphics().beginFill(this.bgColor);this.get_graphics().drawRect(0,0,this.bgWidth,this.bgHeight);this.get_graphics().endFill();this.set_alpha(this.bgAlpha)}else{switch(i){case"gif":if(this.bgResLoader==null){this.bgResLoader=new base_baseLoad_LoadGifJs(this.bgResUrl,this.bgWidth/window.devicePixelRatio|0,this.bgHeight/window.devicePixelRatio|0);var a=window.document.getElementsByTagName("canvas")[0];flipbookMM_global_GetDivJs.getInstance().openfl.insertBefore(this.bgResLoader.div,a)}else{js_Boot.__cast(this.bgResLoader,base_baseLoad_LoadGifJs).resize(this.bgWidth/window.devicePixelRatio|0,this.bgHeight/window.devicePixelRatio|0)}break;case"img":if(this.bgResLoader==null){this.bgResLoader=new base_baseLoad_LoadImg(this.bgResUrl,function(e){js_Boot.__cast(s.bgResLoader,base_baseLoad_LoadImg).resize(s.bgWidth,s.bgHeight)});this.addChild(this.bgResLoader)}else{js_Boot.__cast(this.bgResLoader,base_baseLoad_LoadImg).resize(this.bgWidth,this.bgHeight)}break;case"mp4":if(this.bgResLoader==null){this.bgResLoader=new base_baseLoad_LoadVideo(this.bgResUrl,this.bgWidth,this.bgHeight);this.addChild(this.bgResLoader)}else{js_Boot.__cast(this.bgResLoader,base_baseLoad_LoadVideo).resize(this.bgWidth,this.bgHeight)}break}}},detectType:function(e){var t=null;if(e==null||StringTools.trim(e).length==0){return t}var s=e.toLowerCase();if(s.indexOf(".jpg",0)>0||s.indexOf(".jpeg",0)>0||s.indexOf(".png",0)>0){t="img"}else if(s.indexOf(".gif",0)>0){t="gif"}else if(s.indexOf(".swf",0)>0){t="swf"}else if(s.indexOf(".mp4",0)>0){t="mp4"}else{t="data"}s=null;return t},__class__:flipbookMM_background_Background});var flipbookMM_bookBox_BookBox=function(e,t,s,i,a,r,_,n){if(n==null){n=1}if(r==null){r=0}this.doubleStatus=0;this.pageDefScale=1;openfl_display_Sprite.call(this);this.pageWidth=s;this.pageHeight=i;this.maxPageIndex=a;this.bookStyle=r;this.isZooming=false;this.isSlide=false;this.isDrag=false;this.doubleStatus=0;this.curPageIndex=0;this.tarPageIndex=0;var o=flipbookMM_config_ConfigSetting.getInstance();this.isMobile=o.yesOrNo(o.get(flipbookMM_config_ConfigKey.JS_mobile));this.topbarHeight=Std.parseInt(o.get(flipbookMM_config_ConfigKey.TopToolBarHeight));this.bottomBarHeight=Std.parseInt(o.get(flipbookMM_config_ConfigKey.BottomToolbarHeight));this.contentMarginTop=Std.parseInt(o.get(flipbookMM_config_ConfigKey.ContentDisplayMarginTop));this.contentMarginBot=Std.parseInt(o.get(flipbookMM_config_ConfigKey.ContentDisplayMarginBot));o=null;if(this.isMobile){this.pageDefPosiX=0;this.pageDefPosiY=0;this.doubleDefScale=2;this.maxZoomScale=2;this.pageStyleW=e;this.pageStyleH=t}else{this.pageDefPosiX=0;this.pageDefPosiY=this.topbarHeight+this.contentMarginTop;this.doubleDefScale=2;this.maxZoomScale=2;this.pageStyleW=e;this.pageStyleH=t-this.topbarHeight-this.bottomBarHeight-this.contentMarginTop-this.contentMarginBot}this.back=new openfl_display_Sprite;this.addChild(this.back);if(this.bookStyle==0){this.pageStyle=new flipbookMM_bookBox_style_SlideStyle(this.pageStyleW,this.pageStyleH,s,i,a,_,n)}else if(this.bookStyle==1){this.pageStyle=new flipbookMM_bookBox_style_FlipStyle(this.pageStyleW,this.pageStyleH,s,i,a,_,n)}else if(this.bookStyle==2){this.pageStyle=new flipbookMM_bookBox_style_SlideDoubleStyle(this.pageStyleW,this.pageStyleH,s,i,a,_,n)}else if(this.bookStyle==3){this.pageStyle=new flipbookMM_bookBox_style_ThreeStyle(this.pageStyleW,this.pageStyleH,s,i,a,_,n)}else{this.pageStyle=new flipbookMM_bookBox_style_FlipStyle(this.pageStyleW,this.pageStyleH,s,i,a,_,n)}this.addChild(this.pageStyle);this.pageStyle.set_x(this.pageDefPosiX);this.pageStyle.set_y(this.pageDefPosiY);this.pageStyle.set_scaleX(this.pageDefScale);this.pageStyle.set_scaleY(this.pageDefScale);this.currentPosition=new openfl_geom_Point;this.currentPosition.x=this.pageStyle.get_x();this.currentPosition.y=this.pageStyle.get_y();this.lastPosition=new openfl_geom_Point;this.lastPosition.x=this.currentPosition.x;this.lastPosition.y=this.currentPosition.y;this.currentScale=this.pageStyle.get_scaleY();this.lastScale=this.currentScale;this.resize(e,t);this.addListEvent()};$hxClasses["flipbookMM.bookBox.BookBox"]=flipbookMM_bookBox_BookBox;flipbookMM_bookBox_BookBox.__name__=["flipbookMM","bookBox","BookBox"];flipbookMM_bookBox_BookBox.__super__=openfl_display_Sprite;flipbookMM_bookBox_BookBox.prototype=$extend(openfl_display_Sprite.prototype,{bookBoxWidth:null,bookBoxHeight:null,pageStyleW:null,pageStyleH:null,LrNavigateWidth:null,bookStyle:null,isZooming:null,isSlide:null,isDrag:null,isMobile:null,curPageIndex:null,tarPageIndex:null,maxPageIndex:null,pageWidth:null,pageHeight:null,topbarHeight:null,bottomBarHeight:null,contentMarginTop:null,contentMarginBot:null,pageDefPosiX:null,pageDefPosiY:null,pageDefScale:null,back:null,pageStyle:null,doubleStatus:null,doubleDefScale:null,maxZoomScale:null,lastPosition:null,currentPosition:null,lastScale:null,currentScale:null,cofeX:null,cofeY:null,resize:function(e,t){this.bookBoxWidth=e;this.bookBoxHeight=t;if(this.isMobile){this.pageStyleW=this.bookBoxWidth;this.pageStyleH=this.bookBoxHeight}else{this.pageStyleW=this.bookBoxWidth;this.pageStyleH=this.bookBoxHeight-this.topbarHeight-this.bottomBarHeight-this.contentMarginTop-this.contentMarginBot}if(this.bookStyle==0){this.LrNavigateWidth=100}else if(this.bookStyle==1){this.LrNavigateWidth=100}else{this.LrNavigateWidth=100}this.back.get_graphics().clear();this.back.get_graphics().beginFill(0);this.back.get_graphics().drawRect(0,0,this.bookBoxWidth,this.bookBoxHeight);this.back.get_graphics().endFill();this.back.set_alpha(0);this.setPageDefault();if(this.pageStyle!=null){this.pageStyle.resize(this.pageStyleW,this.pageStyleH)}},addListEvent:function(){var n=this;var e=flipbookMM_events_EventCenter.getInstance();e.addEventListener(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,this,function(e){var t=js_Boot.__cast(e._data._object,Int);n.setPageDefault();n.pageStyle.gotoPage(t)});e.addEventListener(flipbookMM_events_EventConst.GO_TO_PAGE_NEXT,this,function(e){n.setPageDefault();n.pageStyle.gotoNextPage()});e.addEventListener(flipbookMM_events_EventConst.GO_TO_PAGE_PREVIOUS,this,function(e){n.setPageDefault();n.pageStyle.gotoPrePage()});e.addEventListener(flipbookMM_events_EventConst.SOUNDBTN_ON_OFF,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t!=null&&t.length>0){if(t=="on"){if(n.pageStyle!=null){n.pageStyle.setMuteMode(false)}}else if(t=="off"){if(n.pageStyle!=null){n.pageStyle.setMuteMode(true)}}}});e=null;if(this.isMobile){this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_LEFT_SLIDE,function(e){n.isSlide=true;n.pageStyle.gotoNextPage()});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_RIGHT_SLIDE,function(e){n.isSlide=true;n.pageStyle.gotoPrePage()});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG,function(e){if(n.pageStyle.get_scaleY()!=n.pageDefScale){n.isDrag=true;n.currentPosition.x=n.lastPosition.x+e.get_touchSlidePoint().x;n.currentPosition.y=n.lastPosition.y+e.get_touchSlidePoint().y;n.pageStyle.set_x(n.currentPosition.x);n.pageStyle.set_y(n.currentPosition.y)}});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG_END,function(e){if(n.pageStyle.get_scaleY()!=n.pageDefScale){n.currentPosition.x=n.lastPosition.x+e.get_touchSlidePoint().x;n.currentPosition.y=n.lastPosition.y+e.get_touchSlidePoint().y;n.pageStyle.set_x(n.currentPosition.x);n.pageStyle.set_y(n.currentPosition.y);n.lastPosition.x=n.currentPosition.x;n.lastPosition.y=n.currentPosition.y}});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM,function(e){if(n.isZooming==false){n.cofeX=n.pageStyle.getZoomCenterCoefX();n.cofeY=n.pageStyle.getZoomCenterCoefY()}n.isZooming=true;n.pageStyle.updateStyleStatus(true);var t=n.pageStyle.get_width();var s=n.pageStyle.get_height();var i=n.lastScale;var a=e.get_touchScale();n.currentScale=i*a;if(n.currentScale>n.maxZoomScale){n.currentScale=n.maxZoomScale}if(n.pageStyle.get_scaleY()==n.currentScale){return}n.pageStyle.set_scaleX(n.currentScale);n.pageStyle.set_scaleY(n.currentScale);var r=n.pageStyle.get_width();var _=n.pageStyle.get_height();n.pageStyle.set_x(n.pageStyle.get_x()+(t-r)/n.pageStyle.getZoomCoefX(n.cofeX));n.pageStyle.set_y(n.pageStyle.get_y()+(s-_)/n.pageStyle.getZoomCoefY(n.cofeY));n.lastPosition.x=n.pageStyle.get_x();n.lastPosition.y=n.pageStyle.get_y()});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM_END,function(e){var t=n.lastScale;var s=e.get_touchScale();n.currentScale=t*s;if(n.currentScale>n.maxZoomScale){n.currentScale=n.maxZoomScale}if(n.pageStyle.get_scaleX()<1){n.pageStyle.updateSvgContentSta(false);motion_Actuate.tween(n.pageStyle,.5,{x:n.pageDefPosiX,y:n.pageDefPosiY,scaleX:n.pageDefScale,scaleY:n.pageDefScale}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){n.currentPosition.x=n.pageStyle.get_x();n.currentPosition.y=n.pageStyle.get_y();n.lastPosition.x=n.currentPosition.x;n.lastPosition.y=n.currentPosition.y;n.currentScale=n.pageStyle.get_scaleY();n.lastScale=n.currentScale;n.pageStyle.updateStyleStatus(false)})}else{n.pageStyle.updateSvgContentSta(true);n.pageStyle.set_scaleX(n.currentScale);n.pageStyle.set_scaleY(n.currentScale);n.lastScale=n.currentScale}})}else{this.pageStyle.addEventListener("mouseDown",function(e){if(n.pageStyle.get_scaleY()!=n.pageDefScale){n.isDrag=true;n.pageStyle.startDrag();n.currentPosition.x=n.pageStyle.get_x();n.currentPosition.y=n.pageStyle.get_y();n.lastPosition.x=n.currentPosition.x;n.lastPosition.y=n.currentPosition.y}});this.pageStyle.addEventListener("mouseUp",function(e){if(n.pageStyle.get_scaleY()!=n.pageDefScale){n.pageStyle.stopDrag();n.currentPosition.x=n.pageStyle.get_x();n.currentPosition.y=n.pageStyle.get_y();n.lastPosition.x=n.currentPosition.x;n.lastPosition.y=n.currentPosition.y}})}this.addEventListener("click",function(e){var t=e.stageX;n.doubleStatus++;if(n.doubleStatus==1){haxe_Timer.delay(function(){if(n.doubleStatus==1){if(n.isMobile&&!n.isZooming&&!n.isSlide&&!n.isDrag){if(tn.bookBoxWidth-n.LrNavigateWidth*window.devicePixelRatio){n.setPageDefault();n.pageStyle.gotoNextPage()}else{var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.TOOL_BAR_ON_OFF,new flipbookMM_events_EventObject(n,null,null)));e=null}}}n.isSlide=false;n.isZooming=false;n.isDrag=false;n.doubleStatus=0},300)}else if(n.doubleStatus>=2){n.doubleStatus=0;n.isSlide=false;n.isZooming=false;n.isDrag=false;if(n.pageStyle.isPlaying){return}if(n.pageStyle.get_scaleY()!=n.pageDefScale){n.pageStyle.updateSvgContentSta(false);motion_Actuate.tween(n.pageStyle,.3,{x:n.pageDefPosiX,y:n.pageDefPosiY,scaleX:n.pageDefScale,scaleY:n.pageDefScale}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){n.currentPosition.x=n.pageStyle.get_x();n.currentPosition.y=n.pageStyle.get_y();n.lastPosition.x=n.currentPosition.x;n.lastPosition.y=n.currentPosition.y;n.currentScale=n.pageStyle.get_scaleY();n.lastScale=n.currentScale;n.pageStyle.updateStyleStatus(false)})}else{var s=n.doubleDefScale;var i=n.pageStyle.get_x()+n.pageStyle.get_width()*(n.pageStyle.get_scaleX()-s)/n.pageStyle.getZoomCoefX(.5);var a=n.pageStyle.get_y()+n.pageStyle.get_height()*(n.pageStyle.get_scaleY()-s)/n.pageStyle.getZoomCoefY(.5);n.pageStyle.updateStyleStatus(true);motion_Actuate.tween(n.pageStyle,.3,{x:i,y:a,scaleX:s,scaleY:s}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){n.currentPosition.x=n.pageStyle.get_x();n.currentPosition.y=n.pageStyle.get_y();n.lastPosition.x=n.currentPosition.x;n.lastPosition.y=n.currentPosition.y;n.currentScale=n.pageStyle.get_scaleY();n.lastScale=n.currentScale;n.pageStyle.updateSvgContentSta(true)})}}n.pageStyle.playBKMusic()});this.addEventListener("mouseWheel",function(e){if(e.delta>0){n.pageStyle.gotoNextPage()}else{n.pageStyle.gotoPrePage()}})},setPageDefault:function(){if(this.pageStyle!=null&&this.pageStyle.get_scaleY()!=this.pageDefScale){this.pageStyle.updateSvgContentSta(false);this.pageStyle.set_scaleX(this.pageDefScale);this.pageStyle.set_scaleY(this.pageDefScale);this.pageStyle.set_x(this.pageDefPosiX);this.pageStyle.set_y(this.pageDefPosiY);this.pageStyle.updateStyleStatus(false)}},__class__:flipbookMM_bookBox_BookBox});var flipbookMM_bookBox_ManagerBookLayer=function(e,t,s,i){this.pageWidth=e;this.pageHeight=t;this.maxPageIndex=s;this.pageBackColor=i;this.layerWidth=this.pageWidth;this.layerHeight=this.pageHeight;this.preloadInterval=1;this.layerList=new haxe_ds_IntMap};$hxClasses["flipbookMM.bookBox.ManagerBookLayer"]=flipbookMM_bookBox_ManagerBookLayer;flipbookMM_bookBox_ManagerBookLayer.__name__=["flipbookMM","bookBox","ManagerBookLayer"];flipbookMM_bookBox_ManagerBookLayer.getInstance=function(e,t,s,i){if(flipbookMM_bookBox_ManagerBookLayer.instance==null){flipbookMM_bookBox_ManagerBookLayer.instance=new flipbookMM_bookBox_ManagerBookLayer(e,t,s,i)}return flipbookMM_bookBox_ManagerBookLayer.instance};flipbookMM_bookBox_ManagerBookLayer.prototype={layerList:null,layerWidth:null,layerHeight:null,pageWidth:null,pageHeight:null,pageBackColor:null,maxPageIndex:null,preloadInterval:null,resize:function(e,t){this.layerWidth=e;this.layerHeight=t;var s=this.layerList.keys();while(s.hasNext()){var i=s.next();this.layerList.h[i].resize(this.layerWidth,this.layerHeight)}},updateBufferNum:function(e){this.preloadInterval=e},getLoadPage:function(e,t){if(t==null){t=false}if(e>0&&e<=this.maxPageIndex){var s=null;if(t){if(!this.layerList.h.hasOwnProperty(-e)){s=new flipbookMM_bookBox_PageLayer(this.layerWidth,this.layerHeight,this.pageWidth,this.pageHeight,9999,this.pageBackColor,true);this.layerList.h[-e]=s}else{s=this.layerList.h[-e]}}else if(!this.layerList.h.hasOwnProperty(e)){s=new flipbookMM_bookBox_PageLayer(this.layerWidth,this.layerHeight,this.pageWidth,this.pageHeight,e,this.pageBackColor,false);this.layerList.h[e]=s}else{s=this.layerList.h[e]}return s}else{var i=new flipbookMM_bookBox_PageLayer(this.layerWidth,this.layerHeight,this.pageWidth,this.pageHeight,0,this.pageBackColor,false);return i}},preloadPage:function(e,t){if(t==null){t=false}if(base_baseUtils_MapUtil.$length(this.layerList)>2*this.preloadInterval+1){var s=this.layerList.keys();while(s.hasNext()){var i=s.next();if(i>=0){if(Math.abs(i-e)>this.preloadInterval){js_Boot.__cast(this.layerList.h[i],flipbookMM_bookBox_PageLayer).destroyMe();this.layerList.remove(i);if(this.layerList.h.hasOwnProperty(-i)){js_Boot.__cast(this.layerList.h[-i],flipbookMM_bookBox_PageLayer).destroyMe();this.layerList.remove(-i)}}}}}var a=e-this.preloadInterval;var r=e+this.preloadInterval;if(a>0){a=a}else{a=1}if(r0){this.pageContent=new flipbookMM_bookBox_book_ImgPage(this.svgPngUrl,$bind(this,this.onCom))}else if(this.imgUrl.length>0){this.pageContent=new flipbookMM_bookBox_book_ImgPage(this.imgUrl,$bind(this,this.onCom))}else{return}n=null;this.pageLayerShell.addChild(this.pageContent)};$hxClasses["flipbookMM.bookBox.PageLayer"]=flipbookMM_bookBox_PageLayer;flipbookMM_bookBox_PageLayer.__name__=["flipbookMM","bookBox","PageLayer"];flipbookMM_bookBox_PageLayer.__super__=openfl_display_Sprite;flipbookMM_bookBox_PageLayer.prototype=$extend(openfl_display_Sprite.prototype,{pageLayerWidth:null,pageLayerHeight:null,pageOrginalW:null,pageOrginalH:null,pageRealW:null,pageRealH:null,pageIndex:null,loadOkFlag:null,layerCor:null,isMirror:null,back:null,pageLine:null,svgScaleContent:null,svgContent:null,pageContent:null,object:null,pageLink:null,highlightText:null,gray:null,loading:null,pageLayerShell:null,svgTxtUrl:null,svgPngUrl:null,imgUrl:null,onCom:function(e){if(this.loadOkFlag==false){if(this.loading!=null){this.removeChild(this.loading);this.loading.destroyMe();this.loading=null}this.pageRealW=this.pageContent.get_width();this.pageRealH=this.pageContent.get_height();var t=this.pageOrginalW/this.pageRealW;var s=this.pageOrginalH/this.pageRealH;var i=t0&&this.svgPngUrl.length>0){this.svgContent=new flipbookMM_bookBox_book_SvgPage(this.svgTxtUrl);this.pageContent.addChild(this.svgContent);this.svgScaleContent=new flipbookMM_bookBox_book_SvgPage(this.svgTxtUrl);this.pageContent.addChild(this.svgScaleContent)}this.pageLink=new flipbookMM_bookBox_pageLink_PageLink(this.pageRealW,this.pageRealH,this.pageIndex,16776960);this.pageContent.addChild(this.pageLink);this.object=new flipbookMM_bookBox_xObject_Object(this.pageIndex);this.pageLayerShell.addChild(this.object)}this.pageContent.set_scaleX(i);this.pageContent.set_scaleY(i);this.pageContent.set_x((this.pageOrginalW-this.pageContent.get_width())/2);this.pageContent.set_y((this.pageOrginalH-this.pageContent.get_height())/2);var a=this.pageLayerWidth/this.pageOrginalW;var r=this.pageLayerHeight/this.pageOrginalH;var _=a0){var t=0;var s=this.object._ffobjects;while(t0){var t=0;var s=this.object._ffobjects;while(t=0&&n.startArea<=3){var t=n.get_mouseX();var s=n.get_mouseY();n.flipPathUpdate(t,s)}}});var l=flipbookMM_events_EventCenter.getInstance();l.addEventListener(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t=="on"){n.isDisplayEmbedObject=true}else if(t=="off"){n.isDisplayEmbedObject=false}n.flipFinished()});l.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,this,function(e){n.isHighlightText=true;n.flipFinished()});l.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_CANCEL,this,function(e){n.isHighlightText=false;n.flipFinished()});l=null;haxe_Timer.delay(function(){if(n.isHScreen){n.pageList[3].changeObjectStatus(true);n.pageList[4].changeObjectStatus(true)}else{n.pageList[1].changeObjectStatus(true)}n.playBKMusic()},1e3)};$hxClasses["flipbookMM.bookBox.style.FlipStyle"]=flipbookMM_bookBox_style_FlipStyle;flipbookMM_bookBox_style_FlipStyle.__name__=["flipbookMM","bookBox","style","FlipStyle"];flipbookMM_bookBox_style_FlipStyle.__super__=flipbookMM_bookBox_style_BaseStyle;flipbookMM_bookBox_style_FlipStyle.prototype=$extend(flipbookMM_bookBox_style_BaseStyle.prototype,{isRefresh:null,isGoRight:null,hardCoverEnable:null,backSprite:null,backMask:null,curMask:null,moveContain:null,moveLayer:null,moveMask:null,shdowContain:null,shadowCur:null,shadowCurMask:null,shadowMove:null,shadowMoveMask:null,shadowEffect:null,flipPoint:null,currentPoint:null,originPoint:null,TLPoint:null,BLPoint:null,TRPoint:null,BRPoint:null,startArea:null,flipStance:null,manualFlipStatus:null,diagonalLen:null,resize:function(e,t){if(this.styleWidth==e&&this.styleHeight==t){return}this.styleWidth=e;this.styleHeight=t;this.backSprite.get_graphics().clear();this.backSprite.get_graphics().beginFill(0,0);this.backSprite.get_graphics().drawRect(0,0,this.styleWidth,this.styleHeight);this.backSprite.get_graphics().endFill();var s=0;if(this.styleWidth>this.styleHeight){s=this.styleWidth/2;if(this.isHScreen==false){this.tarPageIndex=this.tarPageIndex%2==0?this.tarPageIndex+1:this.tarPageIndex}this.isHScreen=true;this.pageStep=2}else{s=this.styleWidth;if(this.isHScreen==true){if(this.tarPageIndex>this.maxPageIndex){this.tarPageIndex=this.maxPageIndex}}this.isHScreen=false;this.pageStep=1}var i=s/this.pageWidth;var a=this.styleHeight/this.pageHeight;var r=ithis.curPageIndex){this.startArea=3;this.isGoRight=true}else{this.startArea=1;this.isGoRight=false}this.flipMoveInit();if(this.playSound!=null&&!this.isMute){this.playSound.play()}if(this.startArea==0){this.autoFlip(this.TLPoint,this.TRPoint.x)}else if(this.startArea==1){this.autoFlip(this.BLPoint,this.BRPoint.x)}else if(this.startArea==2){this.autoFlip(this.TRPoint,this.TLPoint.x)}else if(this.startArea==3){this.autoFlip(this.BRPoint,this.BLPoint.x)}}else{if(this.tarPageIndex>this.curPageIndex){this.startArea=3;this.isGoRight=true}else{this.startArea=3;this.isGoRight=false}this.flipMoveInit();if(this.playSound!=null&&!this.isMute){this.playSound.play()}if(this.startArea==2){if(this.isGoRight){this.autoFlip(this.TRPoint,this.TLPoint.x)}else{this.autoFlip(this.TLPoint,this.TRPoint.x)}}else if(this.startArea==3){if(this.isGoRight){this.autoFlip(this.BRPoint,this.BLPoint.x)}else{this.autoFlip(this.BLPoint,this.BRPoint.x)}}}}},gotoPrePage:function(){this.gotoPage(this.curPageIndex-this.pageStep)},gotoNextPage:function(){this.gotoPage(this.curPageIndex+this.pageStep)},isGoNormalPage:function(e){if(this.isHScreen){var t=this.maxPageIndex%2==1?this.maxPageIndex:this.maxPageIndex+1;if(e<0||e>t){return false}if((this.curPageIndex/2|0)==(e/2|0)){return false}if(this.isPlaying){return false}if(this.isZoom){return false}this.tarPageIndex=e%2==1?e:e+1}else{if(e<=0||e>this.maxPageIndex){return false}if(this.curPageIndex==e){return false}if(this.isPlaying){return false}if(this.isZoom){return false}this.tarPageIndex=e}return true},onTouchRelease:function(e){if(this.isHScreen){if(this.startArea==0||this.startArea==1){if(e0){this.containLayer.removeChildren(0)}var o=0;while(o<8){var l=o++;if(l==0||l==7){this.pageList[l]=this.pageLoad.getLoadPage(0)}else{this.pageList[l]=this.pageLoad.getLoadPage(this.tarPageIndex-4+l)}this.containLayer.addChild(this.pageList[l]);if((l/4|0)==0){this.pageList[l].set_x(this.styleWidth/2-this.layerWidth+e);this.pageList[l].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[l].set_rotation(0)}else{this.pageList[l].set_x(this.styleWidth/2-e);this.pageList[l].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[l].set_rotation(0)}}var h=0;while(h<8){var c=h++;if((c/4|0)==0){this.containLayer.setChildIndex(this.pageList[c],c)}else{this.containLayer.setChildIndex(this.pageList[c],8-c+3)}}var u=0;while(u<8){var f=u++;if(this.isDisplayEmbedObject){if(f==3||f==4){this.pageList[f].changeObjectStatus(true)}else{this.pageList[f].changeObjectStatus(false)}}else{this.pageList[f].changeObjectStatus(false)}if(this.isHighlightText){if(f==3||f==4){this.pageList[f].addHighlightText()}}else{this.pageList[f].removeHighlightText()}}if(this.tarPageIndex<=this.maxPageIndex){this.curPageIndex=this.tarPageIndex}else{this.curPageIndex=this.maxPageIndex}if(this.shadowEffect!=null){this.containLayer.addChild(this.shadowEffect)}this.pageLoad.preloadPage(this.curPageIndex)}else{if(this.moveLayer!=null){this.moveContain.removeChildren(0);this.moveLayer.set_mask(null);this.moveLayer=null}if(this.pageList!=null){var p=this.pageList.length;var d=0;var g=p;while(d0){this.containLayer.removeChildren(0)}var x=0;while(x<3){var P=x++;var k=this.tarPageIndex-1+P;if(k<0){k=0}this.pageList[P]=this.pageLoad.getLoadPage(k);this.containLayer.addChild(this.pageList[P]);if(P==0){this.pageList[P].set_x((this.styleWidth-this.layerWidth)/2-this.layerWidth);this.pageList[P].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[P].set_rotation(0)}else{this.pageList[P].set_x((this.styleWidth-this.layerWidth)/2);this.pageList[P].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[P].set_rotation(0)}}var w=0;while(w<3){var C=w++;this.containLayer.setChildIndex(this.pageList[C],2-C)}var T=0;while(T<3){var S=T++;if(this.isDisplayEmbedObject){if(S==1){this.pageList[S].changeObjectStatus(true)}else{this.pageList[S].changeObjectStatus(false)}}else{this.pageList[S].changeObjectStatus(false)}if(this.isHighlightText){if(S==1){this.pageList[S].addHighlightText()}}else{this.pageList[S].removeHighlightText()}}if(this.tarPageIndex<=this.maxPageIndex){this.curPageIndex=this.tarPageIndex}else{this.curPageIndex=this.maxPageIndex}if(this.shadowEffect!=null){this.containLayer.addChild(this.shadowEffect)}this.pageLoad.preloadPage(this.curPageIndex)}},updateStyleStatus:function(e){if(e==this.isZoom){return}this.isZoom=e;if(this.isZoom){var t=0;var s=this.pageList.length;while(t=this._Op.y-this._height/2){if(this.getDis(this._bPoint.x,this._bPoint.y,e,t)<=this._width){this._point.x=e;this._point.y=t}else{s=this.getAngleByPoint(this._bPoint.x,this._bPoint.y,e,t);this._point.x=Math.cos(s)*this._width+this._bPoint.x;this._point.y=Math.sin(s)*this._width+this._bPoint.y}}else if(this.getDis(this._tPoint.x,this._tPoint.y,e,t)<=this._dia){this._point.x=e;this._point.y=t}else{s=this.getAngleByPoint(this._tPoint.x,this._tPoint.y,e,t);this._point.x=Math.cos(s)*this._dia+this._tPoint.x;this._point.y=Math.sin(s)*this._dia+this._tPoint.y}if(this._point.xthis._Op.x+this._width){this._point.x=this._Op.x+this._width;if(this._isTop){this._point.y=this._Op.y-this._height/2}else{this._point.y=this._Op.y+this._height/2}}},__class__:flipbookMM_bookBox_style_LimitPoint};var flipbookMM_bookBox_style_SlideDoubleStyle=function(e,t,s,i,a,r,_){if(_==null){_=1}var n=this;flipbookMM_bookBox_style_BaseStyle.call(this,e,t,s,i,a,r,2);this.pageWidth=s;this.pageHeight=i;this.maxPageIndex=a;this.curPageIndex=-1;this.tarPageIndex=-1;this.isPlaying=false;this.isZoom=false;this.pageStep=1;this.offsetX=10;xeditor_objects_TrObject._fn_gotoPage=$bind(this,this.gotoPage);this.containLayer=new openfl_display_Sprite;this.addChild(this.containLayer);this.pageList=[];this.pageLoad=flipbookMM_bookBox_ManagerBookLayer.getInstance(s,i,a,r);var o=flipbookMM_config_ConfigSetting.getInstance();if(o.yesOrNo(o.get(flipbookMM_config_ConfigKey.PageSwitchSoundEnable))){this.playSound=new base_baseSprite_PlayMusicJS("./sounds/type1.mp3")}o=null;this.resize(e,t);this.gotoPage(_);this.playBKMusic();var l=flipbookMM_events_EventCenter.getInstance();l.addEventListener(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t=="on"){n.isDisplayEmbedObject=true}else if(t=="off"){n.isDisplayEmbedObject=false}n.flipFinished()});l.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,this,function(e){n.isHighlightText=true;n.flipFinished()});l.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_CANCEL,this,function(e){n.isHighlightText=false;n.flipFinished()});l=null};$hxClasses["flipbookMM.bookBox.style.SlideDoubleStyle"]=flipbookMM_bookBox_style_SlideDoubleStyle;flipbookMM_bookBox_style_SlideDoubleStyle.__name__=["flipbookMM","bookBox","style","SlideDoubleStyle"];flipbookMM_bookBox_style_SlideDoubleStyle.__super__=flipbookMM_bookBox_style_BaseStyle;flipbookMM_bookBox_style_SlideDoubleStyle.prototype=$extend(flipbookMM_bookBox_style_BaseStyle.prototype,{moveLayer:null,offsetX:null,backMask:null,resize:function(e,t){this.styleWidth=e;this.styleHeight=t;if(this.backMask==null){this.backMask=new openfl_display_Shape;this.addChild(this.backMask);this.set_mask(this.backMask)}this.backMask.get_graphics().clear();this.backMask.get_graphics().beginFill(61440,.5);this.backMask.get_graphics().drawRect(0,0,this.styleWidth,this.styleHeight);this.backMask.get_graphics().endFill();var s=0;if(this.styleWidth>this.styleHeight){s=this.styleWidth/2;if(this.isHScreen==false){this.tarPageIndex=this.tarPageIndex%2==0?this.tarPageIndex:this.tarPageIndex+1}this.isHScreen=true;this.pageStep=2}else{s=this.styleWidth;if(this.isHScreen==true){if(this.tarPageIndex>this.maxPageIndex){this.tarPageIndex=this.maxPageIndex}}this.isHScreen=false;this.pageStep=1}var i=this.pageWidth/this.pageHeight;var a=s/this.pageWidth;var r=this.styleHeight/this.pageHeight;var _=as){return}if(((this.curPageIndex-1)/2|0)==((e-1)/2|0)){return}if(this.isPlaying){return}this.tarPageIndex=e%2==0?e:e+1}else{if(e<=0||e>this.maxPageIndex){return}if(this.curPageIndex==e){return}if(this.isPlaying){return}else{this.isPlaying=true}this.tarPageIndex=e}if(this.playSound!=null&&!this.isMute){this.playSound.play()}if(this.isHScreen){if(this.curPageIndex0){this.containLayer.removeChildren(0);this.moveLayer=null}if(this.isHScreen){this.containLayer.set_x(0);var e=0;while(e<6){var t=e++;this.pageList[t]=this.pageLoad.getLoadPage(this.tarPageIndex-3+t);this.pageList[t].set_x(this.styleWidth*((t/2|0)-1)+(this.styleWidth-2*this.layerWidth)/2+t%2*this.layerWidth);this.pageList[t].set_y((this.styleHeight-this.layerHeight)/2);this.containLayer.addChild(this.pageList[t])}this.curPageIndex=this.tarPageIndex;var s=0;while(s<6){var i=s++;if(this.isDisplayEmbedObject){if(i==2||i==3){this.pageList[i].changeObjectStatus(true)}else{this.pageList[i].changeObjectStatus(false)}}else{this.pageList[i].changeObjectStatus(false)}if(this.isHighlightText){if(i==2||i==3){this.pageList[i].addHighlightText()}}else{this.pageList[i].removeHighlightText()}}this.pageLoad.preloadPage(this.curPageIndex)}else{this.containLayer.set_x(0);this.pageList[0]=this.pageLoad.getLoadPage(this.tarPageIndex-1);this.containLayer.addChild(this.pageList[0]);this.pageList[0].set_x(-this.layerWidth-this.offsetX);this.pageList[0].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[1]=this.pageLoad.getLoadPage(this.tarPageIndex);this.containLayer.addChild(this.pageList[1]);this.pageList[1].set_x((this.styleWidth-this.layerWidth)/2);this.pageList[1].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[2]=this.pageLoad.getLoadPage(this.tarPageIndex+1);this.containLayer.addChild(this.pageList[2]);this.pageList[2].set_x(this.styleWidth+this.offsetX);this.pageList[2].set_y((this.styleHeight-this.layerHeight)/2);this.curPageIndex=this.tarPageIndex;if(this.isDisplayEmbedObject){this.pageList[0].changeObjectStatus(false);this.pageList[1].changeObjectStatus(true);this.pageList[2].changeObjectStatus(false)}else{this.pageList[0].changeObjectStatus(false);this.pageList[1].changeObjectStatus(false);this.pageList[2].changeObjectStatus(false)}if(this.isHighlightText){this.pageList[1].addHighlightText()}else{this.pageList[0].removeHighlightText();this.pageList[1].removeHighlightText();this.pageList[2].removeHighlightText()}this.pageLoad.preloadPage(this.curPageIndex)}this.isPlaying=false;this.playBKMusic();if(this.curPageIndex>this.maxPageIndex){this.curPageIndex=this.maxPageIndex}var a=flipbookMM_events_EventCenter.getInstance();a.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_CURRENT,new flipbookMM_events_EventObject(this,this.curPageIndex,null)));a=null},gotoPrePage:function(){this.gotoPage(this.curPageIndex-this.pageStep)},gotoNextPage:function(){this.gotoPage(this.curPageIndex+this.pageStep)},updateStyleStatus:function(e){if(e==this.isZoom){return}this.isZoom=e;if(this.isZoom){var t=0;var s=this.pageList.length;while(ta){this.layerWidth=this.styleHeight*s;this.layerHeight=this.styleHeight}this.pageLoad.resize(this.layerWidth,this.layerHeight);this.pageLoad.updateBufferNum(1);var _=0;var n=this.pageList;while(_this.maxPageIndex){return}if(this.curPageIndex==e){return}if(this.isPlaying){return}else{this.isPlaying=true}this.tarPageIndex=e;if(this.playSound!=null&&!this.isMute){this.playSound.play()}if(this.curPageIndex0){this.containLayer.removeChildren(0);this.moveLayer=null}this.containLayer.set_x(0);this.pageList[0]=this.pageLoad.getLoadPage(this.tarPageIndex-1);this.containLayer.addChild(this.pageList[0]);this.pageList[0].set_x(-this.layerWidth-this.offsetX);this.pageList[0].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[1]=this.pageLoad.getLoadPage(this.tarPageIndex);this.containLayer.addChild(this.pageList[1]);this.pageList[1].set_x((this.styleWidth-this.layerWidth)/2);this.pageList[1].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[2]=this.pageLoad.getLoadPage(this.tarPageIndex+1);this.containLayer.addChild(this.pageList[2]);this.pageList[2].set_x(this.styleWidth+this.offsetX);this.pageList[2].set_y((this.styleHeight-this.layerHeight)/2);this.curPageIndex=this.tarPageIndex;if(this.isDisplayEmbedObject){this.pageList[0].changeObjectStatus(false);this.pageList[1].changeObjectStatus(true);this.pageList[2].changeObjectStatus(false)}else{this.pageList[0].changeObjectStatus(false);this.pageList[1].changeObjectStatus(false);this.pageList[2].changeObjectStatus(false)}if(this.isHighlightText){this.pageList[1].addHighlightText()}else{this.pageList[0].removeHighlightText();this.pageList[1].removeHighlightText();this.pageList[2].removeHighlightText()}this.pageLoad.preloadPage(this.curPageIndex);this.isPlaying=false;this.playBKMusic();var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_CURRENT,new flipbookMM_events_EventObject(this,this.curPageIndex,null)));e=null},gotoPrePage:function(){this.gotoPage(this.curPageIndex-this.pageStep)},gotoNextPage:function(){this.gotoPage(this.curPageIndex+this.pageStep)},updateStyleStatus:function(e){if(e==this.isZoom){return}this.isZoom=e;if(this.isZoom){var t=0;var s=this.pageList.length;while(t0){y=1}else{y=-1;n=-n+c}l=Math.abs(l);var x=0;var P=(c-1)*u/2;var k=0;var w=m;while(k=_[f]){if(f==0){i=o[0];a=l[0];r=n[0]}else{i=this.lineScale(_[f-1],o[f-1],_[f],o[f],e);a=this.lineScale(_[f-1],l[f-1],_[f],l[f],e);r=this.lineScale(_[f-1],n[f-1],_[f],n[f],e)}break}}return new flipbookMM_bookBox_style_Cone_$parameters(i,a,r,t)},paperDoubleParamesR:function(e,t){var s=!(Math.abs(e)<1.001&&Math.abs(t)<1.001);var i=0;var a=0;var r=0;var _=[1,.9,.5,0,-.5,-.75,-.9,-1];var n=[0,20,30,60,100,135,170,180];var o=[90,55,20,25,30,50,85,90];var l=[-200,-20,-5,-6,-7,-10,-20,-2e3];var h=_.length;var c=0;var u=h;while(c=_[f]){if(f==0){i=o[0];a=l[0];r=n[0]}else{i=this.lineScale(_[f-1],o[f-1],_[f],o[f],e);a=this.lineScale(_[f-1],l[f-1],_[f],l[f],e);r=this.lineScale(_[f-1],n[f-1],_[f],n[f],e)}break}}return new flipbookMM_bookBox_style_Cone_$parameters(i,a,r,t)},clearThreeStyle:function(){if(this._renderer!=null){this._renderer.dispose();this._renderer.clear();this._renderer.render(this._scene,this._camera)}},computeWH:function(e,t){var s=e>=t?e:t;var i=s;var a=8;while(a<14){var r=a++;i=Math.pow(2,r);if(s<=i){break}}return i|0},updateThreeStyle:function(e,t,s){if(this.turnDirection){var i=this.paperDoubleParamesR(e,t);this.curlPage(i,s)}else{var a=this.paperDoubleParamesL(e,t);this.curlPage(a,s)}this._coneCube=THREE.SceneUtils.createMultiMaterialObject(this._geometry,this._material);if(this.displayShadow){this._coneCube.traverse(function(e){if(e!=null&&e.type=="Mesh"){e.castShadow=true}})}this._scene.add(this._coneCube);this._renderer.render(this._scene,this._camera);this._scene.remove(this._coneCube);this._geometry.dispose();this._material[0].dispose();this._material[1].dispose();this._texture[0].dispose();this._texture[1].dispose();this._coneCube=null},resizeThreeStyle:function(e,t,s,i,a){if(this._renderer!=null){this.clearThreeStyle();window.document.getElementById("openfl-content").removeChild(this._renderer.domElement)}this.initThree(i,a);this._scene.position.set(e,t,s)},updateCanvasParamater:function(e,t,s,i,a){this.curPageW=e;this.curPageH=t;this.curPageM=s;this.curPageS=i;this.turnDirection=a},__class__:flipbookMM_bookBox_style_ThreeAlgo});var flipbookMM_bookBox_style_ThreeStyle=function(e,t,s,i,a,r,_){if(_==null){_=1}var n=this;flipbookMM_bookBox_style_BaseStyle.call(this,e,t,s,i,a,r,1);this.pageWidth=s;this.pageHeight=i;this.maxPageIndex=a;this.curPageIndex=0;this.tarPageIndex=0;this.isPlaying=false;this.isHScreen=true;this.isGoRight=false;this.isRefresh=false;this.isZoom=false;this.isAutoPlay=true;this.hardCoverEnable=false;var o=flipbookMM_config_ConfigSetting.getInstance();if(o.hasKey(flipbookMM_config_ConfigKey.FLipStyleHardEnable)){this.hardCoverEnable=o.yesOrNo(o.get(flipbookMM_config_ConfigKey.FLipStyleHardEnable))}if(o.yesOrNo(o.get(flipbookMM_config_ConfigKey.PageSwitchSoundEnable))){this.playSound=new base_baseSprite_PlayMusicJS("./sounds/type1.mp3")}o=null;xeditor_objects_TrObject._fn_gotoPage=$bind(this,this.gotoPage);this.backSprite=new openfl_display_Sprite;this.addChild(this.backSprite);this.backMask=new openfl_display_Shape;this.addChild(this.backMask);this.set_mask(this.backMask);this.containLayer=new openfl_display_Sprite;this.addChild(this.containLayer);this.shdowContain=new openfl_display_Sprite;this.addChild(this.shdowContain);this.pageList=[];this.pageLoad=flipbookMM_bookBox_ManagerBookLayer.getInstance(s,i,a,r);this.flipStance=new flipbookMM_bookBox_style_FlipStance;this.curPageIndex=_;this.tarPageIndex=this.curPageIndex;this.startArea=-1;this.manualFlipStatus=0;this.pageStep=0;this.resize(e,t);this.addEventListener("mouseDown",function(e){if(n.isPlaying){return}if(n.get_scaleY()!=1){return}var i=new openfl_geom_Point(n.get_mouseX(),n.get_mouseY());n.manualFlipStatus=1;var t=function(){if(n.manualFlipStatus==1){var e=0;if(n.isHScreen){if(i.x=0&&n.startArea<=3){if(n.isHScreen){var t=(n.get_mouseX()-n.layerWidth)/n.layerWidth;var s=n.layerHeight/2-n.get_mouseY();n.flipPathUpdate(t,s/(n.layerHeight/2))}else if(n.startArea==0||n.startArea==1){var i=(n.get_mouseX()+n.layerWidth-n.layerWidth)/n.layerWidth;var a=n.layerHeight/2-n.get_mouseY();n.flipPathUpdate(i,a/(n.layerHeight/2))}else{var r=(n.get_mouseX()+n.layerWidth-n.layerWidth)/n.layerWidth;var _=n.layerHeight/2-n.get_mouseY();n.flipPathUpdate(r,_/(n.layerHeight/2))}}}});var l=flipbookMM_events_EventCenter.getInstance();l.addEventListener(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t=="on"){n.isDisplayEmbedObject=true}else if(t=="off"){n.isDisplayEmbedObject=false}n.flipFinished()});l.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,this,function(e){n.isHighlightText=true;n.flipFinished()});l.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_CANCEL,this,function(e){n.isHighlightText=false;n.flipFinished()});l=null;haxe_Timer.delay(function(){if(n.isHScreen){n.pageList[3].changeObjectStatus(true);n.pageList[4].changeObjectStatus(true)}else{n.pageList[1].changeObjectStatus(true)}n.playBKMusic()},1e3)};$hxClasses["flipbookMM.bookBox.style.ThreeStyle"]=flipbookMM_bookBox_style_ThreeStyle;flipbookMM_bookBox_style_ThreeStyle.__name__=["flipbookMM","bookBox","style","ThreeStyle"];flipbookMM_bookBox_style_ThreeStyle.__super__=flipbookMM_bookBox_style_BaseStyle;flipbookMM_bookBox_style_ThreeStyle.prototype=$extend(flipbookMM_bookBox_style_BaseStyle.prototype,{isRefresh:null,isGoRight:null,hardCoverEnable:null,backSprite:null,backMask:null,shdowContain:null,shadowEffect:null,flipPoint:null,currentPoint:null,originPoint:null,TLPoint:null,BLPoint:null,TRPoint:null,BRPoint:null,startArea:null,flipStance:null,manualFlipStatus:null,diagonalLen:null,threeAlog:null,threeCanvas:null,resize:function(e,t){if(this.styleWidth==e&&this.styleHeight==t){return}this.styleWidth=e;this.styleHeight=t;this.backSprite.get_graphics().clear();this.backSprite.get_graphics().beginFill(0,0);this.backSprite.get_graphics().drawRect(0,0,this.styleWidth,this.styleHeight);this.backSprite.get_graphics().endFill();var s=0;if(this.styleWidth>this.styleHeight){s=this.styleWidth/2;if(this.isHScreen==false){this.tarPageIndex=this.tarPageIndex%2==0?this.tarPageIndex+1:this.tarPageIndex}this.isHScreen=true;this.pageStep=2}else{s=this.styleWidth;if(this.isHScreen==true){if(this.tarPageIndex>this.maxPageIndex){this.tarPageIndex=this.maxPageIndex}}this.isHScreen=false;this.pageStep=1}var i=s/this.pageWidth;var a=this.styleHeight/this.pageHeight;var r=ithis.curPageIndex){this.startArea=3;this.isGoRight=true}else{this.startArea=1;this.isGoRight=false}this.flipMoveInit();if(this.playSound!=null&&!this.isMute){this.playSound.play()}if(this.startArea==0){this.autoFlip(new openfl_geom_Point(0,0),2*this.layerWidth)}else if(this.startArea==1){this.autoFlip(new openfl_geom_Point(0,this.layerHeight),2*this.layerWidth)}else if(this.startArea==2){this.autoFlip(new openfl_geom_Point(2*this.layerWidth,0),0)}else if(this.startArea==3){this.autoFlip(new openfl_geom_Point(2*this.layerWidth,this.layerHeight),0)}}else{if(this.tarPageIndex>this.curPageIndex){this.startArea=3;this.isGoRight=true}else{this.startArea=3;this.isGoRight=false}this.flipMoveInit();if(this.playSound!=null&&!this.isMute){this.playSound.play()}if(this.startArea==2){if(this.isGoRight){this.autoFlip(new openfl_geom_Point(2*this.layerWidth,0),0)}else{this.autoFlip(new openfl_geom_Point(0,0),2*this.layerWidth)}}else if(this.startArea==3){if(this.isGoRight){this.autoFlip(new openfl_geom_Point(2*this.layerWidth,this.layerHeight),0)}else{this.autoFlip(new openfl_geom_Point(0,this.layerHeight),2*this.layerWidth)}}}}},gotoPrePage:function(){this.gotoPage(this.curPageIndex-this.pageStep)},gotoNextPage:function(){this.gotoPage(this.curPageIndex+this.pageStep)},isGoNormalPage:function(e){if(this.isHScreen){var t=this.maxPageIndex%2==1?this.maxPageIndex:this.maxPageIndex+1;if(e<0||e>t){return false}if((this.curPageIndex/2|0)==(e/2|0)){return false}if(this.isPlaying){return false}if(this.isZoom){return false}this.tarPageIndex=e%2==1?e:e+1}else{if(e<=0||e>this.maxPageIndex){return false}if(this.curPageIndex==e){return false}if(this.isPlaying){return false}if(this.isZoom){return false}this.tarPageIndex=e}return true},onTouchRelease:function(e,t){if(this.isHScreen){if(this.startArea==0||this.startArea==1){if(e1){s=1}else if(s<-1){s=-1}i*=1.5;if(i>1){i=1}else if(i<-1){i=-1}if(this.isGoRight){this.softFlipPathUpdate(s,-i)}else{this.softFlipPathUpdate(-s,-i)}this.isRefresh=false},flipFinished:function(){if(this.threeAlog!=null){this.threeAlog.clearThreeStyle()}this.softFlipFinished();var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_CURRENT,new flipbookMM_events_EventObject(this,this.curPageIndex,null)));e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_MOVE_END));e=null;this.isPlaying=false;this.playBKMusic()},softFlipFinished:function(){this.shdowContain.set_visible(false);this.setChildIndex(this.shdowContain,0);var e=0;if(this.isHScreen){if(this.pageList!=null){var t=this.pageList.length;var s=0;var i=t;while(s0){this.containLayer.removeChildren(0)}var o=0;while(o<8){var l=o++;if(l==0||l==7){this.pageList[l]=this.pageLoad.getLoadPage(0)}else{this.pageList[l]=this.pageLoad.getLoadPage(this.tarPageIndex-4+l)}this.containLayer.addChild(this.pageList[l]);if((l/4|0)==0){this.pageList[l].set_x(this.styleWidth/2-this.layerWidth+e);this.pageList[l].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[l].set_rotation(0)}else{this.pageList[l].set_x(this.styleWidth/2-e);this.pageList[l].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[l].set_rotation(0)}}var h=0;while(h<8){var c=h++;if((c/4|0)==0){this.containLayer.setChildIndex(this.pageList[c],c)}else{this.containLayer.setChildIndex(this.pageList[c],8-c+3)}}var u=0;while(u<8){var f=u++;if(this.isDisplayEmbedObject){if(f==3||f==4){this.pageList[f].changeObjectStatus(true)}else{this.pageList[f].changeObjectStatus(false)}}else{this.pageList[f].changeObjectStatus(false)}if(this.isHighlightText){if(f==3||f==4){this.pageList[f].addHighlightText()}}else{this.pageList[f].removeHighlightText()}}if(this.tarPageIndex<=this.maxPageIndex){this.curPageIndex=this.tarPageIndex}else{this.curPageIndex=this.maxPageIndex}if(this.shadowEffect!=null){this.containLayer.addChild(this.shadowEffect)}this.pageLoad.preloadPage(this.curPageIndex)}else{if(this.pageList!=null){var p=this.pageList.length;var d=0;var g=p;while(d0){this.containLayer.removeChildren(0)}var x=0;while(x<3){var P=x++;var k=this.tarPageIndex-1+P;if(k<0){k=0}this.pageList[P]=this.pageLoad.getLoadPage(k);this.containLayer.addChild(this.pageList[P]);if(P==0){this.pageList[P].set_x((this.styleWidth-this.layerWidth)/2-this.layerWidth);this.pageList[P].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[P].set_rotation(0)}else{this.pageList[P].set_x((this.styleWidth-this.layerWidth)/2);this.pageList[P].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[P].set_rotation(0)}}var w=0;while(w<3){var C=w++;this.containLayer.setChildIndex(this.pageList[C],2-C)}var T=0;while(T<3){var S=T++;if(this.isDisplayEmbedObject){if(S==1){this.pageList[S].changeObjectStatus(true)}else{this.pageList[S].changeObjectStatus(false)}}else{this.pageList[S].changeObjectStatus(false)}if(this.isHighlightText){if(S==1){this.pageList[S].addHighlightText()}}else{this.pageList[S].removeHighlightText()}}if(this.tarPageIndex<=this.maxPageIndex){this.curPageIndex=this.tarPageIndex}else{this.curPageIndex=this.maxPageIndex}if(this.shadowEffect!=null){this.containLayer.addChild(this.shadowEffect)}this.pageLoad.preloadPage(this.curPageIndex)}},updateStyleStatus:function(e){if(e==this.isZoom){return}this.isZoom=e;if(this.isZoom){var t=0;var s=this.pageList.length;while(t0){t.set(r.att.resolve("name"),r.get_innerData())}}}else if(i.get_name()=="pageobjects"){var _=flipbookMM_bookBox_ObjectConfigInit.getInstance();_.setXmlData(i.x);_=null;var n=xeditor_objects_VideoHtmlManage.getInstance();n.parseVideoXml(i.x);n.videoLoad();n=null}else if(i.get_name()=="bookmark"){var o=flipbookMM_toolbar_bookMark_BookMarkConfigInit.getInstance();o.setXmlData(i.x);o=null}else if(i.get_name()=="pages"){var l=flipbookMM_bookBox_PagesConfigGet.getInstance();l.setXmlData(i.x);l.getPagesConfig();l=null}}this.fast=null};$hxClasses["flipbookMM.config.ConfigInit"]=flipbookMM_config_ConfigInit;flipbookMM_config_ConfigInit.__name__=["flipbookMM","config","ConfigInit"];flipbookMM_config_ConfigInit.prototype={fast:null,__class__:flipbookMM_config_ConfigInit};var flipbookMM_config_ConfigKey=function(){};$hxClasses["flipbookMM.config.ConfigKey"]=flipbookMM_config_ConfigKey;flipbookMM_config_ConfigKey.__name__=["flipbookMM","config","ConfigKey"];var flipbookMM_config_ConfigSetting=function(){this.settings=null;this.settings=new haxe_ds_StringMap};$hxClasses["flipbookMM.config.ConfigSetting"]=flipbookMM_config_ConfigSetting;flipbookMM_config_ConfigSetting.__name__=["flipbookMM","config","ConfigSetting"];flipbookMM_config_ConfigSetting.getInstance=function(){if(flipbookMM_config_ConfigSetting.instance==null){flipbookMM_config_ConfigSetting.instance=new flipbookMM_config_ConfigSetting}return flipbookMM_config_ConfigSetting.instance};flipbookMM_config_ConfigSetting.prototype={settings:null,hasKey:function(e){var t=this.settings;if(__map_reserved[e]!=null){return t.existsReserved(e)}else{return t.h.hasOwnProperty(e)}},get:function(e){var t=this.settings;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}},set:function(e,t){var s=this.settings;var i=t;if(__map_reserved[e]!=null){s.setReserved(e,i)}else{s.h[e]=i}return},yesOrNo:function(e){if(e!=null&&e.length>0){var t=e.toLowerCase();if(t=="yes"||t=="enable"||t=="show"||t=="true"){return true}else{return false}}else{return false}},ColorTrans:function(e){var t=Std.string(StringTools.hex(e,16));t=HxOverrides.substr(t,t.length-6,null);t="#"+t;return t},__class__:flipbookMM_config_ConfigSetting};var flipbookMM_config_Resource=function(){};$hxClasses["flipbookMM.config.Resource"]=flipbookMM_config_Resource;flipbookMM_config_Resource.__name__=["flipbookMM","config","Resource"];var flipbookMM_events_EventAction=function(e,t){this.action=0;this.target=0;this.target=e;this.action=t};$hxClasses["flipbookMM.events.EventAction"]=flipbookMM_events_EventAction;flipbookMM_events_EventAction.__name__=["flipbookMM","events","EventAction"];flipbookMM_events_EventAction.prototype={target:null,action:null,__class__:flipbookMM_events_EventAction};var flipbookMM_events_EventCenter=function(){this._eventMode=false;this._eventSprite=null;this._eventMap=new haxe_ds_StringMap};$hxClasses["flipbookMM.events.EventCenter"]=flipbookMM_events_EventCenter;flipbookMM_events_EventCenter.__name__=["flipbookMM","events","EventCenter"];flipbookMM_events_EventCenter.getInstance=function(){if(flipbookMM_events_EventCenter.Instance==null){flipbookMM_events_EventCenter.Instance=new flipbookMM_events_EventCenter;flipbookMM_events_EventCenter.Instance.setEventMode(false)}return flipbookMM_events_EventCenter.Instance};flipbookMM_events_EventCenter.prototype={_eventMode:null,_eventSprite:null,_eventMap:null,setEventMode:function(e){this._eventMode=e;return e},getMap:function(){return this._eventMap},getNewEvent:function(e,t,s){var i=null;i=new flipbookMM_events_EventCenterEvent(e,t);i._action=s;return i},addEventListener:function(e,t,s){if(t==null||s==null||e==null){return false}if(this._eventMode==true&&this._eventSprite!=null){t.addEventListener(e,s)}var i=this.getMap();var a=null;a=__map_reserved[e]!=null?i.getReserved(e):i.h[e];if(a==null){a=[];if(__map_reserved[e]!=null){i.setReserved(e,a)}else{i.h[e]=a}}return this.helpAddTargetAction(a,t,s)},helpAddTargetAction:function(e,t,s){if(t==null||e==null){return false}var i=null;if(e.length==0){i=new flipbookMM_events_EventAction(t,s);e.push(i);return true}else{var a=0;while(a0){var n=null;n=this.getNewEvent(t,s,i);var o=0;while(o<_.length){var l=_[o];++o;if(l.action!=null){n.set_owner(l.target);l.action(n)}}n.destroy();n=null}return},__class__:flipbookMM_events_EventCenter};var flipbookMM_events_EventCenterEvent=function(e,t,s,i){if(i==null){i=false}if(s==null){s=false}openfl_events_Event.call(this,e,s,i);this._data=t;this._owner=null;this._action=null};$hxClasses["flipbookMM.events.EventCenterEvent"]=flipbookMM_events_EventCenterEvent;flipbookMM_events_EventCenterEvent.__name__=["flipbookMM","events","EventCenterEvent"];flipbookMM_events_EventCenterEvent.__super__=openfl_events_Event;flipbookMM_events_EventCenterEvent.prototype=$extend(openfl_events_Event.prototype,{_data:null,_owner:null,_action:null,destroy:function(){this._owner=null;if(this._data!=null){this._data.destroy();this._data=null}},set_owner:function(e){this._owner=e;return e},__class__:flipbookMM_events_EventCenterEvent,__properties__:{set_owner:"set_owner"}});var flipbookMM_events_EventConst=function(){};$hxClasses["flipbookMM.events.EventConst"]=flipbookMM_events_EventConst;flipbookMM_events_EventConst.__name__=["flipbookMM","events","EventConst"];var flipbookMM_events_EventObject=function(e,t,s){this._event=s;this._object=t;this._trigger=e};$hxClasses["flipbookMM.events.EventObject"]=flipbookMM_events_EventObject;flipbookMM_events_EventObject.__name__=["flipbookMM","events","EventObject"];flipbookMM_events_EventObject.prototype={_event:null,_object:null,_trigger:null,destroy:function(){this._event=null;this._object=null;this._trigger=null},__class__:flipbookMM_events_EventObject};var flipbookMM_global_GetDivJs=function(){this.body=window.document.body;this.openfl=window.document.getElementById(flipbookMM_global_GetDivJs.OpenflId);this.noOPenfl=window.document.createElement("div");this.noOPenfl.id=flipbookMM_global_GetDivJs.noOpenflId;this.body.appendChild(this.noOPenfl);this.video=window.document.createElement("div");this.openfl.appendChild(this.video);this.youtube=window.document.createElement("div");this.video.appendChild(this.youtube);this.vimeo=window.document.createElement("div");this.video.appendChild(this.vimeo);this.otherVideo=window.document.createElement("div");this.video.appendChild(this.otherVideo);this.music=window.document.createElement("div");this.openfl.appendChild(this.music);this.menuBar=window.document.createElement("div");this.noOPenfl.appendChild(this.menuBar);this.market=window.document.createElement("div");this.noOPenfl.appendChild(this.market)};$hxClasses["flipbookMM.global.GetDivJs"]=flipbookMM_global_GetDivJs;flipbookMM_global_GetDivJs.__name__=["flipbookMM","global","GetDivJs"];flipbookMM_global_GetDivJs.getInstance=function(){if(flipbookMM_global_GetDivJs.instance==null){flipbookMM_global_GetDivJs.instance=new flipbookMM_global_GetDivJs}return flipbookMM_global_GetDivJs.instance};flipbookMM_global_GetDivJs.prototype={youtube:null,vimeo:null,otherVideo:null,video:null,music:null,menuBar:null,market:null,body:null,openfl:null,noOPenfl:null,__class__:flipbookMM_global_GetDivJs};var flipbookMM_market_LogoJs=function(e,t,s,i,a,r,_,n){var o=this;base_baseSprite_SpriteJs.call(this);this.logWid=s;this.logHei=i;this.offWid=a;this.offHei=r;this.logUrl=_;if(this.logUrl!=null&&this.logUrl.length>0){this.log=window.document.createElement("img");this.log.style.position="absolute";this.log.style.display="block";this.log.src=this.logUrl;this.div.appendChild(this.log);this.log.onload=function(){o.log.onload=null;o.resize(e,t)};this.logNet=n;if(this.logNet!=null&&this.logNet.length>0){this.log.onclick=function(){openfl_Lib.getURL(new openfl_net_URLRequest(o.logNet),"_blank")}}}};$hxClasses["flipbookMM.market.LogoJs"]=flipbookMM_market_LogoJs;flipbookMM_market_LogoJs.__name__=["flipbookMM","market","LogoJs"];flipbookMM_market_LogoJs.__super__=base_baseSprite_SpriteJs;flipbookMM_market_LogoJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{log:null,logUrl:null,logNet:null,logWid:null,logHei:null,offWid:null,offHei:null,resize:function(e,t){if(this.log==null){return}var s=e/2-36-27;var i=t/3*2;var a=s/this.logWid;var r=i/this.logHei;var _=0;var n=0;if(a<=r){_=s;n=this.logHei*s/this.logWid}else{_=this.logWid*i/this.logHei;n=i}this.log.style.height=n+"px";this.log.style.width=_+"px";this.log.style.left=this.offWid+"px";this.log.style.top=this.offHei+(t-n)/2+"px";var o=flipbookMM_toolbar_bar_AutoLayout.getInstance();o.updateLogWidht(_);o=null},__class__:flipbookMM_market_LogoJs});var flipbookMM_market_RegisterJs=function(){var e=this;base_baseSprite_SpriteJs.call(this);var t=flipbookMM_config_ConfigSetting.getInstance();if(t.get(flipbookMM_config_ConfigKey.AppRegister)!="20120808"){var s=t.get(flipbookMM_config_ConfigKey.AppShowName);var i=t.get(flipbookMM_config_ConfigKey.AppLinkWebsite);var a;if(s.indexOf("Next")==0){a="./img/register_logo_next.png"}else{a="./img/register_logo_1st.png"}this.img=window.document.createElement("img");this.img.src=a;this.img.style.left=-141+"px";this.img.style.top=-31+"px";this.img.style.position="absolute";this.img.style.display="block";this.img.style.setProperty("-webkit-user-select","none");this.img.style.setProperty("-moz-user-select","none");this.img.style.setProperty("-ms-user-select","none");this.img.style.setProperty("user-select","none");this.img.onselect=function(){return false};this.img.onload=function(){e.img.onload=null;e.div.appendChild(e.img);e.name=new base_baseSprite_SpriteJs;e.name.set_x(-70);e.name.set_y(-20);e.name.set_width(200);e.div.appendChild(e.name.div);e.name.set_text(s);e.link=new base_baseSprite_SpriteJs;e.link.set_x(-70);e.link.set_y(0);e.link.set_textColor(255);e.link.set_text(i);e.div.appendChild(e.link.div)};flipbookMM_global_GetDivJs.getInstance().market.appendChild(this.div);this.div.onclick=function(){openfl_Lib.getURL(new openfl_net_URLRequest(i),"_blank")}}};$hxClasses["flipbookMM.market.RegisterJs"]=flipbookMM_market_RegisterJs;flipbookMM_market_RegisterJs.__name__=["flipbookMM","market","RegisterJs"];flipbookMM_market_RegisterJs.__super__=base_baseSprite_SpriteJs;flipbookMM_market_RegisterJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{img:null,name:null,link:null,__class__:flipbookMM_market_RegisterJs});var flipbookMM_toolbar_IconBtnSprite=function(e,t,s,i,a){if(a==null){a=36}if(i==null){i=36}if(s==null){s=0}if(t==null){t=16777215}var r=this;openfl_display_Sprite.call(this);this.backG=new openfl_display_Sprite;this.backG.get_graphics().beginFill(s);this.backG.get_graphics().drawRect(0,0,i,a);this.backG.get_graphics().endFill();this.backG.set_alpha(0);this.addChild(this.backG);this.loader=new base_baseLoad_LoadImg(e,function(e){r._bitmap=e.target.loader.content;r._bitmap.smoothing=true;r.drawColorTransform(t);r.loader.set_scaleX(window.devicePixelRatio);r.loader.set_scaleY(window.devicePixelRatio)});this.addChild(this.loader)};$hxClasses["flipbookMM.toolbar.IconBtnSprite"]=flipbookMM_toolbar_IconBtnSprite;flipbookMM_toolbar_IconBtnSprite.__name__=["flipbookMM","toolbar","IconBtnSprite"];flipbookMM_toolbar_IconBtnSprite.__super__=openfl_display_Sprite;flipbookMM_toolbar_IconBtnSprite.prototype=$extend(openfl_display_Sprite.prototype,{loader:null,backG:null,_bitmap:null,drawColorTransform:function(e,t){if(t==null){t=1}var s=e>>16&255;if(s<0){s=0}else{s=s}var i=e>>8&255;if(i<0){i=0}else{i=i}var a=e&255;if(a<0){a=0}else{a=a}if(this._bitmap==null){return}var r=0;var _=0;var n=0;var o=1;var l=this._bitmap.get_bitmapData();if(l==null){return}try{var h=0;var c=l.width;while(h>16&255;var r=e>>8&255;var _=e&255;var n=i.getImageData(0,0,this.iconW,this.iconH);var o=n.data.length/4|0;var l=0;var h=o;while(l0){t=js_Boot.__cast(e._data._object,Int)}else{var s=flipbookMM_toolbar_bar_AutoLayout.getInstance();var i=0;var a=s.leftExpandList;while(i0||i.lastCount==-1){var t=i.curPageIndex++;if(t<=i.maxPageIndex){var s=flipbookMM_events_EventCenter.getInstance();s.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(i,t,null)));s=null}else{if(i.lastCount>0){i.lastCount--}if(i.lastCount==-1||i.lastCount>0){i.curPageIndex=0;i.isPlaying=true;i.updateStatus()}else{i.curPageIndex=i.maxPageIndex;i.isPlaying=false;i.updateStatus()}}}});var r=flipbookMM_events_EventCenter.getInstance();r.addEventListener(flipbookMM_events_EventConst.PAGE_CURRENT,this,function(e){i.curPageIndex=js_Boot.__cast(e._data._object,Int)});r.addEventListener(flipbookMM_events_EventConst.AUTO_FLIP_PAGE_ON_OFF,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t=="on"){if(i.isPlaying==false){i.isPlaying=true;i.updateStatus()}}else if(t=="off"){if(i.isPlaying==true){i.isPlaying=false;i.updateStatus()}}});r=null;this.div.addEventListener("click",function(e){if(i.isPlaying){i.isPlaying=false}else{i.isPlaying=true}if(i.curPageIndex==i.maxPageIndex){i.curPageIndex=0}if(i.loopCount!=-1){i.lastCount=1}i.updateStatus()});this.updateStatus()};$hxClasses["flipbookMM.toolbar.autoPlay.AutoPlayJs"]=flipbookMM_toolbar_autoPlay_AutoPlayJs;flipbookMM_toolbar_autoPlay_AutoPlayJs.__name__=["flipbookMM","toolbar","autoPlay","AutoPlayJs"];flipbookMM_toolbar_autoPlay_AutoPlayJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_autoPlay_AutoPlayJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{playUrl:null,pauseUrl:null,playBtn:null,pauseBtn:null,isPlaying:null,timer:null,curPageIndex:null,maxPageIndex:null,intervalSecond:null,loopCount:null,lastCount:null,updateBgAlpha:function(e){this.playBtn.updateBgAlpha(e);this.pauseBtn.updateBgAlpha(e)},updateStatus:function(){if(this.isPlaying){this.pauseBtn.set_visible(true);this.playBtn.set_visible(false);this.timer.start()}else{this.pauseBtn.set_visible(false);this.playBtn.set_visible(true);this.timer.stop()}},__class__:flipbookMM_toolbar_autoPlay_AutoPlayJs});var flipbookMM_toolbar_bar_AutoLayout=function(){this.logHeight=0;this.allList=[];this.leftList=[];this.rightList=[];this.leftExpandList=[];this.rightExpandList=[];this.getEnabledItem()};$hxClasses["flipbookMM.toolbar.bar.AutoLayout"]=flipbookMM_toolbar_bar_AutoLayout;flipbookMM_toolbar_bar_AutoLayout.__name__=["flipbookMM","toolbar","bar","AutoLayout"];flipbookMM_toolbar_bar_AutoLayout.getInstance=function(){if(flipbookMM_toolbar_bar_AutoLayout.instance==null){flipbookMM_toolbar_bar_AutoLayout.instance=new flipbookMM_toolbar_bar_AutoLayout}return flipbookMM_toolbar_bar_AutoLayout.instance};flipbookMM_toolbar_bar_AutoLayout.prototype={layoutWidth:null,layoutHeight:null,allList:null,leftList:null,leftExpandList:null,rightList:null,rightExpandList:null,isLog:null,logWidth:null,logHeight:null,isThumbnail:null,isSearchText:null,getEnabledItem:function(){var e=flipbookMM_config_ConfigSetting.getInstance();if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.BookMarkButtonEnable))){this.allList.push(1)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.ThumbnailButtonEnable))){this.allList.push(2);this.isThumbnail=true}else{this.isThumbnail=false}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.SearchTextButtonEnable))){this.allList.push(3);this.isSearchText=true}else{this.isSearchText=false}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.SoundButtonEnable))){this.allList.push(4)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.NavigateFlipButtonEnable))){this.allList.push(6)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.AutoFlipButtonEnable))){this.allList.push(7)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.LogoEnable))){this.allList.push(8);this.isLog=true}else{this.isLog=false}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.DownloadEnable))){this.allList.push(9)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.PrintEnable))){this.allList.push(10)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.SocialShareButtonEnable))){this.allList.push(5)}},autoAssign:function(){var e=0;var t=0;var s=this.allList;while(t0){this.leftList.push(-1);if(this.isLog){this.leftList.push(8)}this.leftExpandList.push(0);var a=0;var r=this.allList;while(a0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;case 5:if(d>0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;case 7:if(d>0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;case 9:if(d>0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;case 10:if(d>0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;default:}}}},updateLogWidht:function(e){this.logWidth=e},resize:function(e,t){this.layoutWidth=e;this.layoutHeight=t;this.leftList.splice(0,this.leftList.length);this.leftExpandList.splice(0,this.leftExpandList.length);this.rightList.splice(0,this.rightList.length);this.rightExpandList.splice(0,this.rightExpandList.length);this.autoAssign()},__class__:flipbookMM_toolbar_bar_AutoLayout};var flipbookMM_toolbar_bar_BottomBarJs=function(e,t,s,i,a,r){if(r==null){r=1}base_baseSprite_SpriteJs.call(this);this.color=i;this.botAlp=a;this.pageTotalNum=s;this.isSending=true;this.back=new base_baseSprite_SpriteJs;this.div.appendChild(this.back.div);this.back.setBackgroundColor(this.color);this.line=new base_baseSprite_SpriteJs;this.div.appendChild(this.line.div);this.slide=new flipbookMM_toolbar_bar_SlideObjectJs(e,t,s,this.color,r);this.div.appendChild(this.slide.div);this.resize(e,t)};$hxClasses["flipbookMM.toolbar.bar.BottomBarJs"]=flipbookMM_toolbar_bar_BottomBarJs;flipbookMM_toolbar_bar_BottomBarJs.__name__=["flipbookMM","toolbar","bar","BottomBarJs"];flipbookMM_toolbar_bar_BottomBarJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_bar_BottomBarJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{bottomBarWidth:null,bottomBarHeight:null,color:null,botAlp:null,back:null,slide:null,isSending:null,pageTotalNum:null,line:null,resize:function(e,t){this.bottomBarWidth=e;this.bottomBarHeight=t;this.back.set_width(this.bottomBarWidth);this.back.set_height(this.bottomBarHeight);this.back.div.style.opacity=this.botAlp;this.line.set_width(this.bottomBarWidth);this.line.set_height(1);this.line.div.style.backgroundColor="#cccccc";this.slide.resize(this.bottomBarWidth,this.bottomBarHeight);this.slide.set_x(this.bottomBarWidth/6/2)},__class__:flipbookMM_toolbar_bar_BottomBarJs});var flipbookMM_toolbar_bar_LefeNavigationBarJs=function(){var t=this;base_baseSprite_SpriteJs.call(this);this.backW=79;this.backH=235.5;this.back=new base_baseSprite_SpriteJs;this.back.set_width(this.backW);this.back.set_height(this.backH);this.back.setBackgroundColor(8684676);this.back.div.style.borderRadius=5+"px";this.back.set_visible(true);this.back.div.style.opacity="0";this.set_width(this.backW);this.set_height(this.backH);this.div.appendChild(this.back.div);var e="./img/toolbarImg/big_navigation_left.png";this.nav=new flipbookMM_toolbar_IconBtnSpriteJs(e,11184810,0,$bind(this,this.loadCom));this.nav.updateBgAlpha(0);this.div.appendChild(this.nav.div);this.div.onclick=function(){var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_PREVIOUS,new flipbookMM_events_EventObject(t,null,null)));e=null};this.div.onmouseover=function(){t.back.div.style.opacity=Std.string(.5)};this.div.onmouseout=function(){t.back.div.style.opacity="0"}};$hxClasses["flipbookMM.toolbar.bar.LefeNavigationBarJs"]=flipbookMM_toolbar_bar_LefeNavigationBarJs;flipbookMM_toolbar_bar_LefeNavigationBarJs.__name__=["flipbookMM","toolbar","bar","LefeNavigationBarJs"];flipbookMM_toolbar_bar_LefeNavigationBarJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_bar_LefeNavigationBarJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{nav:null,backW:null,backH:null,back:null,loadCom:function(){this.nav.set_x((this.backW-this.nav.iconW)/2);this.nav.set_y((this.backH-this.nav.iconH)/2)},__class__:flipbookMM_toolbar_bar_LefeNavigationBarJs});var flipbookMM_toolbar_bar_RightNavigationBarJs=function(){var t=this;base_baseSprite_SpriteJs.call(this);this.backW=79;this.backH=235.5;this.back=new base_baseSprite_SpriteJs;this.back.set_width(this.backW);this.back.set_height(this.backH);this.back.setBackgroundColor(8684676);this.back.div.style.borderRadius=5+"px";this.back.set_visible(true);this.back.div.style.opacity="0";this.set_width(this.backW);this.set_height(this.backH);this.div.appendChild(this.back.div);var e="./img/toolbarImg/big_navigation_right.png";this.nav=new flipbookMM_toolbar_IconBtnSpriteJs(e,11184810,0,$bind(this,this.loadCom));this.nav.updateBgAlpha(0);this.div.appendChild(this.nav.div);this.div.onclick=function(){var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NEXT,new flipbookMM_events_EventObject(t,null,null)));e=null};this.div.onmouseover=function(){t.back.div.style.opacity=Std.string(.5)};this.div.onmouseout=function(){t.back.div.style.opacity="0"}};$hxClasses["flipbookMM.toolbar.bar.RightNavigationBarJs"]=flipbookMM_toolbar_bar_RightNavigationBarJs;flipbookMM_toolbar_bar_RightNavigationBarJs.__name__=["flipbookMM","toolbar","bar","RightNavigationBarJs"];flipbookMM_toolbar_bar_RightNavigationBarJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_bar_RightNavigationBarJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{nav:null,backW:null,backH:null,back:null,loadCom:function(){this.nav.set_x((this.backW-this.nav.iconW)/2);this.nav.set_y((this.backH-this.nav.iconH)/2)},__class__:flipbookMM_toolbar_bar_RightNavigationBarJs});var flipbookMM_toolbar_bar_SlideObjectJs=function(e,t,s,i,a){if(a==null){a=1}var r=this;base_baseSprite_SpriteJs.call(this);this.maxNum=s;this.progress=0;this.isRecord=false;this.maxRecentCount=10;if(this.maxRecentCount>this.maxNum){this.maxRecentCount=this.maxNum}this.curPageIndex=a;this.recentViewPage=[];this.recentViewPage.push(this.curPageIndex);this.curRecentIndex=0;var _=flipbookMM_config_ConfigSetting.getInstance();this.lineLeftColor=Std.parseInt(_.get(flipbookMM_config_ConfigKey.BottomSlideActionColor));this.lineRightColor=Std.parseInt(_.get(flipbookMM_config_ConfigKey.BottomSlideDefaultColor));this.circleColor=this.lineLeftColor;this.textActionColor=Std.parseInt(_.get(flipbookMM_config_ConfigKey.TextResponsivColor));this.textDisplayColor=Std.parseInt(_.get(flipbookMM_config_ConfigKey.TextDefaultColor));this.styleStr=_.get(flipbookMM_config_ConfigKey.DefaultBookStyle);_=null;this.rect=new base_baseSprite_SpriteJs;this.div.appendChild(this.rect.div);this.back=new base_baseSprite_SpriteJs;this.rect.div.appendChild(this.back.div);this.lineL=new base_baseSprite_SpriteJs;this.lineL.set_width(0);this.lineL.set_height(2);this.lineL.setBackgroundColor(this.lineLeftColor);this.rect.div.appendChild(this.lineL.div);this.lineR=new base_baseSprite_SpriteJs;this.lineR.set_width(0);this.lineR.set_height(2);this.lineR.setBackgroundColor(this.lineRightColor);this.rect.div.appendChild(this.lineR.div);this.circle=new base_baseSprite_SpriteJs;this.circle.set_width(10);this.circle.set_height(10);this.circle.div.style.borderRadius=5+"px";this.circle.setBackgroundColor(this.circleColor);this.rect.div.appendChild(this.circle.div);this.centerTag=new base_baseSprite_SpriteJs;this.centerTag.div.style.textAlign="center";this.centerTag.div.style.whiteSpace="nowrap";this.div.appendChild(this.centerTag.div);this.leftTag=new base_baseSprite_SpriteJs;this.leftTag.div.style.textAlign="left";this.div.appendChild(this.leftTag.div);this.leftTag.set_width(150);this.leftTag.div.addEventListener("click",function(e){if(r.curRecentIndex>0){r.isRecord=true;r.curRecentIndex--;var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(r,r.recentViewPage[r.curRecentIndex],null)));t=null}e.stopPropagation()});this.rightTag=new base_baseSprite_SpriteJs;this.rightTag.div.style.textAlign="right";this.div.appendChild(this.rightTag.div);this.rightTag.set_width(150);this.rightTag.div.addEventListener("click",function(e){if(r.curRecentIndex=0){r.isRecord=true;r.curRecentIndex++;var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(r,r.recentViewPage[r.curRecentIndex],null)));t=null}e.stopPropagation()});this.circleClickFlag=0;this.isSendGotoPage=false;this.resize(e,t);this.rect.div.onmousedown=function(e){r.circleClickFlag=1};this.rect.div.onmousedown=function(e){r.circleClickFlag=1};this.rect.div.onmouseup=function(e){if(r.circleClickFlag==1){r.circleClickFlag=2}if(r.circleClickFlag>=1){r.circleClickFlag=0;r.updateSlideBar(e.pageX-r.slideStartX);r.isSendGotoPage=true;var t=1+(r.progress*(r.maxNum-1)+.5|0);var s=flipbookMM_events_EventCenter.getInstance();s.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.THUMBNAIL_HIDE,new flipbookMM_events_EventObject(r,null,null)));s.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(r,t,null)));s=null}};this.rect.div.onmousemove=function(e){if(r.circleClickFlag==1){r.updateSlideBar(e.pageX-r.slideStartX);var t=1+(r.progress*(r.maxNum-1)+.5|0);var s=flipbookMM_events_EventCenter.getInstance();s.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.THUMBNAIL_DISPLAY,new flipbookMM_events_EventObject(r,t,null)));s=null}};this.rect.div.addEventListener("touchmove",function(e){var t=e.targetTouches[0].pageX;r.updateSlideBar(t-r.slideStartX);var s=1+(r.progress*(r.maxNum-1)+.5|0);var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.THUMBNAIL_DISPLAY,new flipbookMM_events_EventObject(r,s,null)));i=null},false);this.rect.div.addEventListener("touchend",function(e){var t=e.targetTouches[0];r.circleClickFlag=0;if(t!=null){r.updateSlideBar(t.pageX-r.slideStartX)}r.isSendGotoPage=true;var s=1+(r.progress*(r.maxNum-1)+.5|0);var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.THUMBNAIL_HIDE,new flipbookMM_events_EventObject(r,null,null)));i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(r,s,null)));i=null});var n=flipbookMM_events_EventCenter.getInstance();n.addEventListener(flipbookMM_events_EventConst.PAGE_CURRENT,this,function(e){r.curPageIndex=js_Boot.__cast(e._data._object,Int);if(r.isSendGotoPage==false){if(r.maxNum>1){r.upBarProgress((r.curPageIndex-1)/(r.maxNum-1))}else{r.upBarProgress(0)}}else{r.isSendGotoPage=false}if(r.isRecord){r.isRecord=false}else{r.recentViewPage.push(r.curPageIndex);if(r.recentViewPage.length>r.maxRecentCount){r.recentViewPage.shift()}r.curRecentIndex=r.recentViewPage.length-1}r.updateTextStatus()});n=null};$hxClasses["flipbookMM.toolbar.bar.SlideObjectJs"]=flipbookMM_toolbar_bar_SlideObjectJs;flipbookMM_toolbar_bar_SlideObjectJs.__name__=["flipbookMM","toolbar","bar","SlideObjectJs"];flipbookMM_toolbar_bar_SlideObjectJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_bar_SlideObjectJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{slideWidth:null,slideHeight:null,slideStartX:null,maxNum:null,curPageIndex:null,circle:null,lineL:null,lineR:null,rect:null,back:null,circleClickFlag:null,isSendGotoPage:null,centerTag:null,leftTag:null,rightTag:null,lineLeftColor:null,lineRightColor:null,circleColor:null,textActionColor:null,textDisplayColor:null,recentViewPage:null,maxRecentCount:null,curRecentIndex:null,isRecord:null,styleStr:null,progress:null,updateSlideBar:function(e){var t=e;if(t<0){t=0}else if(t>this.slideWidth){t=this.slideWidth}this.lineL.set_x(0);this.lineL.set_y(0);this.lineL.set_width(t);this.lineR.set_x(t);this.lineR.set_y(0);this.lineR.set_width(this.slideWidth-t);this.circle.set_x(t);this.progress=t/this.slideWidth},upBarProgress:function(e){this.progress=e;var t=this.slideWidth*this.progress;this.lineL.set_x(0);this.lineL.set_y(0);this.lineL.set_width(t);this.lineR.set_x(t);this.lineR.set_y(0);this.lineR.set_width(this.slideWidth-t);this.circle.set_x(t);this.circle.set_y(-4)},updateTextStatus:function(){if(this.curRecentIndex>0){this.leftTag.set_text("Back to page "+this.recentViewPage[this.curRecentIndex-1]);this.leftTag.set_textColor(this.textActionColor)}else{this.leftTag.set_text(" ");this.leftTag.set_textColor(this.textDisplayColor)}if(this.curRecentIndex0){this.rightTag.set_text("Go to page "+this.recentViewPage[this.curRecentIndex+1]);this.rightTag.set_textColor(this.textActionColor)}else{var e=this.maxNum-this.curPageIndex;var t;if(e>1){t=" pages left"}else{t=" page left"}this.rightTag.set_text(e+t);this.rightTag.set_textColor(this.textDisplayColor)}if(this.styleStr=="Flip"||this.styleStr=="Flip:Hardcover"||this.styleStr=="Flip:3D"){if(openfl_Lib.get_current().stage.stageWidth>=openfl_Lib.get_current().stage.stageHeight){if(this.curPageIndex==1){this.centerTag.set_text(this.curPageIndex+"/"+this.maxNum)}else if(this.curPageIndex=openfl_Lib.get_current().stage.stageHeight){if(this.curPageIndex==this.maxNum&&this.maxNum==1){this.centerTag.set_text(this.curPageIndex+"/"+this.maxNum)}else if(this.curPageIndex=0){this.data[i.parent].extend=true}}};$hxClasses["flipbookMM.toolbar.bookMark.BookMarkConfigDecode"]=flipbookMM_toolbar_bookMark_BookMarkConfigDecode;flipbookMM_toolbar_bookMark_BookMarkConfigDecode.__name__=["flipbookMM","toolbar","bookMark","BookMarkConfigDecode"];flipbookMM_toolbar_bookMark_BookMarkConfigDecode.prototype={fast:null,data:null,curOrder:null,xmlParse:function(e){var t=0;if(e.hasNode.resolve("node")!=false){t=this.curOrder-1}var s=e.get_elements();while(s.hasNext()){var i=s.next();if(i.get_name()=="node"&&i.get_innerHTML().length>0){var a=new flipbookMM_toolbar_bookMark_MarkDataType;var r=i.get_elements();while(r.hasNext()){var _=r.next();var n=_.get_name();switch(n){case"child":this.xmlParse(_);break;case"index":a.link=Std.parseInt(_.get_innerData());break;case"label":a.text=_.get_innerData();break;case"level":a.level=Std.parseInt(_.get_innerData());a.id=this.curOrder;a.parent=t;this.data.push(a);this.curOrder++;break;default:}}}}},__class__:flipbookMM_toolbar_bookMark_BookMarkConfigDecode};var flipbookMM_toolbar_bookMark_BookMarkConfigInit=function(){};$hxClasses["flipbookMM.toolbar.bookMark.BookMarkConfigInit"]=flipbookMM_toolbar_bookMark_BookMarkConfigInit;flipbookMM_toolbar_bookMark_BookMarkConfigInit.__name__=["flipbookMM","toolbar","bookMark","BookMarkConfigInit"];flipbookMM_toolbar_bookMark_BookMarkConfigInit.getInstance=function(){if(flipbookMM_toolbar_bookMark_BookMarkConfigInit.instance==null){flipbookMM_toolbar_bookMark_BookMarkConfigInit.instance=new flipbookMM_toolbar_bookMark_BookMarkConfigInit}return flipbookMM_toolbar_bookMark_BookMarkConfigInit.instance};flipbookMM_toolbar_bookMark_BookMarkConfigInit.prototype={markXml:null,setXmlData:function(e){this.markXml=e},getXmlData:function(){return this.markXml},__class__:flipbookMM_toolbar_bookMark_BookMarkConfigInit};var flipbookMM_toolbar_bookMark_BookMarkNode=function(e,t,s){openfl_display_Sprite.call(this);this.nodeData=s;this.extendStatus=false;this.selfStatus=false;this.extendShell=new openfl_display_Sprite;this.addChild(this.extendShell);this.extendStatus=true;this.clickFlag=0;this.offsetX=10;this.nodeContStyle=new openfl_display_Sprite;this.addChild(this.nodeContStyle);this.line=new openfl_display_Sprite;this.addChild(this.line);this.extendSHellBack=new openfl_display_Sprite;this.extendShell.addChild(this.extendSHellBack);this.extendMark=new openfl_display_Sprite;this.extendShell.addChild(this.extendMark);this.nodeContent=new openfl_display_Sprite;this.addChild(this.nodeContent);this.nodeContentBack=new openfl_display_Sprite;this.nodeContent.addChild(this.nodeContentBack);this.loadText();this.resize(e,t);this.addListEvent()};$hxClasses["flipbookMM.toolbar.bookMark.BookMarkNode"]=flipbookMM_toolbar_bookMark_BookMarkNode;flipbookMM_toolbar_bookMark_BookMarkNode.__name__=["flipbookMM","toolbar","bookMark","BookMarkNode"];flipbookMM_toolbar_bookMark_BookMarkNode.__super__=openfl_display_Sprite;flipbookMM_toolbar_bookMark_BookMarkNode.prototype=$extend(openfl_display_Sprite.prototype,{extendMark:null,extendShell:null,extendSHellBack:null,nodeText:null,pageNum:null,nodeContent:null,nodeContStyle:null,nodeContentBack:null,nodeTextMask:null,line:null,nodeWidth:null,nodeHeight:null,offsetX:null,nodeData:null,clickFlag:null,extendStatus:null,selfStatus:null,loadText:function(){this.nodeText=new base_baseSprite_TextSprite;if(this.nodeData.level==1){this.nodeText.format.bold=true;this.nodeText.textField.setTextFormat(this.nodeText.format)}this.nodeText.set_text(this.nodeData.text);this.nodeText.set_textColor(16777215);this.nodeContent.addChild(this.nodeText);this.pageNum=new base_baseSprite_TextSprite;this.pageNum.set_text(Std.string("page "+this.nodeData.link));this.pageNum.set_textColor(13421772);this.nodeContent.addChild(this.pageNum);this.nodeTextMask=new openfl_display_Shape;this.nodeText.addChild(this.nodeTextMask);this.nodeText.set_mask(this.nodeTextMask)},updateExtendShape:function(e){return},updatePosition:function(){this.extendMark.set_x(this.offsetX+this.nodeHeight*(this.nodeData.level-1));this.extendMark.set_y((this.nodeHeight-this.extendMark.get_height())/2);this.extendSHellBack.get_graphics().clear();this.extendSHellBack.get_graphics().beginFill(16777215);this.extendSHellBack.get_graphics().drawRect(0,0,this.extendMark.get_x()+this.extendMark.get_width(),this.nodeHeight);this.extendSHellBack.get_graphics().endFill();this.extendSHellBack.set_alpha(0);this.nodeContent.set_x(this.extendMark.get_width()+this.extendMark.get_x());this.nodeText.set_x(0);this.nodeText.set_y((this.nodeHeight-this.pageNum.get_height())/2);this.pageNum.set_x(this.nodeWidth-this.nodeContent.get_x()-this.offsetX-this.pageNum.get_width());this.pageNum.set_y((this.nodeHeight-this.pageNum.get_height())/2)},addListEvent:function(){var s=this;this.nodeData.extend=false;if(this.nodeData.extend){this.extendShell.addEventListener("click",function(e){e.stopPropagation();s.updateExtendShape(!s.extendStatus);var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.UPDATE_BOOK_MARK,new flipbookMM_events_EventObject(s,null,null)));t=null});this.extendShell.addEventListener("mouseDown",function(e){s.extendSHellBack.set_alpha(.5)});this.extendShell.addEventListener("mouseUp",function(e){s.extendSHellBack.set_alpha(0)});this.extendShell.addEventListener("mouseOut",function(e){s.extendSHellBack.set_alpha(0)})}this.addEventListener("click",function(e){e.stopPropagation()});this.addEventListener("mouseDown",function(e){s.clickFlag=1});this.addEventListener("mouseUp",function(e){if(s.clickFlag==1){e.stopPropagation();var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(s,s.nodeData.link,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(s,null,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(s,"on",null)));t=null}s.clickFlag=0});this.addEventListener("mouseOut",function(e){s.clickFlag=0})},resize:function(e,t){this.nodeWidth=e;this.nodeHeight=t;this.line.get_graphics().clear();this.line.get_graphics().beginFill(8947848);this.line.get_graphics().drawRect(0,0,this.nodeWidth,1);this.line.set_alpha(.3);this.line.set_x(0);this.line.set_y(this.nodeHeight);this.updateExtendShape(this.extendStatus);this.updatePosition();var s=this.nodeWidth-this.offsetX-this.nodeContent.get_x()-this.pageNum.get_width();this.nodeContentBack.get_graphics().clear();this.nodeContentBack.get_graphics().beginFill(255);this.nodeContentBack.get_graphics().drawRect(0,0,this.nodeWidth,this.nodeHeight);this.nodeContentBack.get_graphics().endFill();this.nodeContentBack.set_alpha(0);this.nodeTextMask.get_graphics().clear();this.nodeTextMask.get_graphics().beginFill(65280);this.nodeTextMask.get_graphics().drawRect(0,0,s-this.offsetX,this.nodeHeight);this.nodeTextMask.get_graphics().endFill();this.nodeTextMask.set_alpha(0);this.nodeContStyle.get_graphics().clear();this.nodeContStyle.get_graphics().beginFill(16777215);this.nodeContStyle.get_graphics().drawRect(0,0,this.nodeWidth,this.nodeHeight);this.nodeContStyle.get_graphics().endFill();this.nodeContStyle.set_alpha(.5);this.nodeContStyle.set_visible(false)},__class__:flipbookMM_toolbar_bookMark_BookMarkNode});var flipbookMM_toolbar_bookMark_BookMarkUI=function(e,t,s,i){base_baseSprite_TouchSprite.call(this);this.backColor=s;this.backALpha=i;this.back=new openfl_display_Sprite;this.addChild(this.back);this.bookMarkPanel=new openfl_display_Sprite;this.addChild(this.bookMarkPanel);this.tray=new openfl_display_Sprite;this.bookMarkPanel.addChild(this.tray);this.tableMask=new openfl_display_Shape;this.addChild(this.tableMask);this.bookMarkPanel.set_mask(this.tableMask);this.tableContent=[];this.displayNode=new haxe_ds_IntMap;this.bufferRow=1;this.displayHeight=0;this.preTrayPosition=new openfl_geom_Point;this.resize(e,t);this.initData();this.curRowNum=-1;this.updateShowData(0);this.addListEvent()};$hxClasses["flipbookMM.toolbar.bookMark.BookMarkUI"]=flipbookMM_toolbar_bookMark_BookMarkUI;flipbookMM_toolbar_bookMark_BookMarkUI.__name__=["flipbookMM","toolbar","bookMark","BookMarkUI"];flipbookMM_toolbar_bookMark_BookMarkUI.__super__=base_baseSprite_TouchSprite;flipbookMM_toolbar_bookMark_BookMarkUI.prototype=$extend(base_baseSprite_TouchSprite.prototype,{tableWidth:null,tableHeight:null,unitWidth:null,unitHeight:null,maxRow:null,bufferRow:null,displayHeight:null,curRowNum:null,displayNode:null,tray:null,bookMarkPanel:null,back:null,backColor:null,backALpha:null,tableMask:null,tableContent:null,markDecode:null,preTrayPosition:null,initData:function(){var e=flipbookMM_toolbar_bookMark_BookMarkConfigInit.getInstance();if(e.getXmlData()!=null){var t=new haxe_xml_Fast(e.getXmlData());this.markDecode=new flipbookMM_toolbar_bookMark_BookMarkConfigDecode(t);var s=0;var i=this.markDecode.data.length;while(s=this.bufferRow){s-=this.bufferRow}var i=s;var a=s+this.maxRow+this.bufferRow+1;while(i=0){if(!this.displayNode.h.hasOwnProperty(r)){this.displayNode.h[r]=this.tableContent[r];var _=this.displayNode.h[r];this.tray.addChild(_);_.set_x(0);_.set_y(r*this.unitHeight);_=null}}}var n=this.displayNode.keys();while(n.hasNext()){var o=n.next();if(os+this.maxRow+this.bufferRow){this.tray.removeChild(this.displayNode.h[o]);this.displayNode.remove(o)}}},resize:function(e,t){this.tableWidth=e;this.tableHeight=t;this.unitWidth=this.tableWidth;this.unitHeight=40*window.devicePixelRatio;this.maxRow=this.tableHeight/this.unitHeight|0;this.tableMask.get_graphics().clear();this.tableMask.get_graphics().beginFill(255);this.tableMask.get_graphics().drawRect(0,0,this.tableWidth,this.tableHeight);this.tableMask.get_graphics().endFill();this.back.get_graphics().clear();this.back.get_graphics().beginFill(this.backColor);this.back.get_graphics().drawRect(0,0,this.tableWidth,this.tableHeight);this.back.get_graphics().endFill();this.back.set_alpha(this.backALpha);var s=0;var i=this.tableContent;while(s0){this.tray.removeChildren();this.displayNode=null;this.displayNode=new haxe_ds_IntMap;var r=this.curRowNum;this.curRowNum=-1;this.updateShowData(r)}},addListEvent:function(){var i=this;var e=flipbookMM_events_EventCenter.getInstance();e.addEventListener(flipbookMM_events_EventConst.UPDATE_BOOK_MARK,this,function(e){});e=null;this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_UP_SLIDE,function(e){var t=i.tray.get_y();t+=e.get_touchSlidePoint().y*4;if(i.displayHeight<=i.tableHeight){t=0}else if(t0){t=0}motion_Actuate.tween(i.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-i.tray.get_y()/i.unitHeight|0;i.updateShowData(e)}).onComplete(function(){i.tray.set_y(t);i.updateShowData(-t/i.unitHeight|0)})});this.addEventListener("mouseDown",function(e){i.preTrayPosition.y=i.tray.get_y()});this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG,function(e){var t=i.preTrayPosition.y+e.get_touchSlidePoint().y;if(t>0||i.displayHeight<=i.tableHeight){i.tray.set_y(0)}else if(t0){t=0}}motion_Actuate.tween(i.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-i.tray.get_y()/i.unitHeight|0;i.updateShowData(e)}).onComplete(function(){i.tray.set_y(t);i.updateShowData(-t/i.unitHeight|0)})})},__class__:flipbookMM_toolbar_bookMark_BookMarkUI});var flipbookMM_toolbar_download_DownloadJs=function(e,t){var s="./img/toolbarImg/ic_file_download_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,s,e,t);this.div.onclick=function(){var e=flipbookMM_config_ConfigSetting.getInstance();var t=e.get(flipbookMM_config_ConfigKey.DownloadFileUrl);e=null;var s=encodeURI(t);openfl_Lib.getURL(new openfl_net_URLRequest(s),"_blank")}};$hxClasses["flipbookMM.toolbar.download.DownloadJs"]=flipbookMM_toolbar_download_DownloadJs;flipbookMM_toolbar_download_DownloadJs.__name__=["flipbookMM","toolbar","download","DownloadJs"];flipbookMM_toolbar_download_DownloadJs.__super__=flipbookMM_toolbar_IconBtnSpriteJs;flipbookMM_toolbar_download_DownloadJs.prototype=$extend(flipbookMM_toolbar_IconBtnSpriteJs.prototype,{__class__:flipbookMM_toolbar_download_DownloadJs});var flipbookMM_toolbar_menu_BackBtn=function(e,t){var s=this;var i="./img/toolbarImg/ic_keyboard_arrow_left_black_36dp.png";flipbookMM_toolbar_IconBtnSprite.call(this,i,e,t);this.addEventListener("click",function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(s,"on",null)));t=null})};$hxClasses["flipbookMM.toolbar.menu.BackBtn"]=flipbookMM_toolbar_menu_BackBtn;flipbookMM_toolbar_menu_BackBtn.__name__=["flipbookMM","toolbar","menu","BackBtn"];flipbookMM_toolbar_menu_BackBtn.__super__=flipbookMM_toolbar_IconBtnSprite;flipbookMM_toolbar_menu_BackBtn.prototype=$extend(flipbookMM_toolbar_IconBtnSprite.prototype,{__class__:flipbookMM_toolbar_menu_BackBtn});var flipbookMM_toolbar_menu_SwitchBtnJs=function(e,t){var s=this;var i="./img/toolbarImg/ic_menu_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,i,e,t);this.div.addEventListener("click",function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(s,null,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.AUTO_FLIP_PAGE_ON_OFF,new flipbookMM_events_EventObject(s,"off",null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(s,"off",null)));t=null})};$hxClasses["flipbookMM.toolbar.menu.SwitchBtnJs"]=flipbookMM_toolbar_menu_SwitchBtnJs;flipbookMM_toolbar_menu_SwitchBtnJs.__name__=["flipbookMM","toolbar","menu","SwitchBtnJs"];flipbookMM_toolbar_menu_SwitchBtnJs.__super__=flipbookMM_toolbar_IconBtnSpriteJs;flipbookMM_toolbar_menu_SwitchBtnJs.prototype=$extend(flipbookMM_toolbar_IconBtnSpriteJs.prototype,{__class__:flipbookMM_toolbar_menu_SwitchBtnJs});var flipbookMM_toolbar_menu_SwitchMenu=function(e,t,s,i,a,r){if(i==null){i=1}var _=this;openfl_display_Sprite.call(this);this.pageNum=s;this.swtColor=a;this.swtAlp=r;var n=flipbookMM_config_ConfigSetting.getInstance();this.topButDefCol=Std.parseInt(n.get(flipbookMM_config_ConfigKey.ButtonDefaultColor));this.topButActCol=Std.parseInt(n.get(flipbookMM_config_ConfigKey.ButtonResponsiveColor));n=null;this.curTitle=i;this.back=new openfl_display_Sprite;this.addChild(this.back);this.exitAction=new flipbookMM_toolbar_menu_BackBtn(this.topButDefCol,this.swtColor);this.addChild(this.exitAction);this.autoLayout=flipbookMM_toolbar_bar_AutoLayout.getInstance();this.resize(e,t);this.exitAction.addEventListener("click",function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(_,null,null)));t=null});if(this.bookmark!=null){this.bookmark.addEventListener("click",function(e){_.curTitle=1;_.updateMenuDisplay(_.curTitle)})}if(this.thumbnails!=null){this.thumbnails.addEventListener("click",function(e){_.curTitle=2;_.updateMenuDisplay(_.curTitle)})}if(this.searchText!=null){this.searchText.addEventListener("click",function(e){_.curTitle=3;_.updateMenuDisplay(_.curTitle)})}};$hxClasses["flipbookMM.toolbar.menu.SwitchMenu"]=flipbookMM_toolbar_menu_SwitchMenu;flipbookMM_toolbar_menu_SwitchMenu.__name__=["flipbookMM","toolbar","menu","SwitchMenu"];flipbookMM_toolbar_menu_SwitchMenu.__super__=openfl_display_Sprite;flipbookMM_toolbar_menu_SwitchMenu.prototype=$extend(openfl_display_Sprite.prototype,{swtBarWidth:null,swtBarHeight:null,titleHeight:null,swtColor:null,swtAlp:null,topButDefCol:null,topButActCol:null,pageNum:null,exitAction:null,back:null,bookmark:null,thumbnails:null,searchText:null,curTitle:null,switchUI:null,autoLayout:null,updateMenuDisplay:function(e){this.updateIconColor(e);this.switchUI.updateCurStatus(e)},setMenuVisible:function(e,t){if(t==null){t=-1}this.set_visible(e);if(e){if(t>0){this.updateMenuDisplay(t)}else{this.updateMenuDisplay(this.curTitle)}}else{this.switchUI.setUIVisible(e)}},updateIconColor:function(e){var t=this.autoLayout.leftExpandList.length;var s=1;var i=this.topButActCol;if(t>1){var a=0;var r=this.autoLayout.leftExpandList;while(a0&&d.length>0){var b=window.document.createElement("img");b.src=d;b.className="imgStyle";m.appendChild(b);v.style.position="absolute";v.style.left="0px";v.style.top="0px";v.src=g;v.className="imgStyle";v.onload=function(){o+=1;r.innerHTML="loading page "+o;if(o==l.pageList.length){a.noOPenfl.removeChild(t.div);t=null;window.print();haxe_Timer.delay(function(){a.body.removeChild(n);a=null;n=null;e.isloading=false},1e3)}};m.appendChild(v)}else{v.src=p;v.className="imgStyle";v.onload=function(){o+=1;r.innerHTML="loading page "+o;if(o==l.pageList.length){a.noOPenfl.removeChild(t.div);t=null;window.print();haxe_Timer.delay(function(){a.body.removeChild(n);a=null;n=null;e.isloading=false},1e3)}};m.appendChild(v)}n.appendChild(m)}},myPrint:function(){this.createPrintContent()},__class__:flipbookMM_toolbar_print_PrintJs});var flipbookMM_toolbar_searchText_InputContentJs=function(){var e=this;base_baseSprite_SpriteJs.call(this);this.input=window.document.createElement("input");this.div.appendChild(this.input);this.input.style.fontFamily="Arial";this.input.style.fontSize="15px";this.input.style.display="inline-block";this.input.style.setProperty("-web-kit-appearance","none");this.input.style.setProperty("-moz-appearance","none");this.input.style.setProperty("appearance","none");var t=flipbookMM_config_ConfigSetting.getInstance();var s=t.get(flipbookMM_config_ConfigKey.SearchTextBgColor);this.input.style.backgroundColor=t.ColorTrans(s);var i=t.get(flipbookMM_config_ConfigKey.ButtonDefaultColor);this.input.style.color=t.ColorTrans(i);var a=t.get(flipbookMM_config_ConfigKey.ButtonDefaultColor);this.input.style.borderColor=t.ColorTrans(a);this.input.style.borderRadius=5+"px";t=null;this.cancleBtn=window.document.createElement("img");this.cancleBtn.style.display="inline-block";this.cancleBtn.style.position="absolute";this.cancleBtn.src="./img/toolbarImg/ic_highlight_off_white_24dp.png";this.cancleBtn.onload=function(){e.cancleBtn.onload=null;e.div.appendChild(e.cancleBtn)};this.searchBtn=window.document.createElement("img");this.searchBtn.src="./img/toolbarImg/ic_search_white_24dp.png";this.searchBtn.style.display="inline-block";this.searchBtn.onload=function(){e.searchBtn.onload=null;e.div.appendChild(e.searchBtn)}};$hxClasses["flipbookMM.toolbar.searchText.InputContentJs"]=flipbookMM_toolbar_searchText_InputContentJs;flipbookMM_toolbar_searchText_InputContentJs.__name__=["flipbookMM","toolbar","searchText","InputContentJs"];flipbookMM_toolbar_searchText_InputContentJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_searchText_InputContentJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{input:null,searchBtn:null,cancleBtn:null,resize:function(e,t){this.input.style.width=e-60+"px";this.input.style.height=t+"px";this.input.style.lineHeight=t+"px";this.cancleBtn.style.top="6px";this.cancleBtn.style.right=45+"px";this.searchBtn.style.marginBottom="-8px";this.searchBtn.style.paddingLeft=10+"px"},__class__:flipbookMM_toolbar_searchText_InputContentJs});var flipbookMM_toolbar_searchText_SearchText=function(e,t){var s="./img/toolbarImg/ic_search_black_36dp.png";flipbookMM_toolbar_IconBtnSprite.call(this,s,e,t)};$hxClasses["flipbookMM.toolbar.searchText.SearchText"]=flipbookMM_toolbar_searchText_SearchText;flipbookMM_toolbar_searchText_SearchText.__name__=["flipbookMM","toolbar","searchText","SearchText"];flipbookMM_toolbar_searchText_SearchText.__super__=flipbookMM_toolbar_IconBtnSprite;flipbookMM_toolbar_searchText_SearchText.prototype=$extend(flipbookMM_toolbar_IconBtnSprite.prototype,{__class__:flipbookMM_toolbar_searchText_SearchText});var flipbookMM_toolbar_searchText_SearchTextType=function(){this.pageIndex=0;this.relativePosition=0;this.coreString=null;this.nearString=null};$hxClasses["flipbookMM.toolbar.searchText.SearchTextType"]=flipbookMM_toolbar_searchText_SearchTextType;flipbookMM_toolbar_searchText_SearchTextType.__name__=["flipbookMM","toolbar","searchText","SearchTextType"];flipbookMM_toolbar_searchText_SearchTextType.prototype={pageIndex:null,relativePosition:null,coreString:null,nearString:null,__class__:flipbookMM_toolbar_searchText_SearchTextType};var flipbookMM_toolbar_searchText_PageTextContentType=function(){this.index=0;this.content=null};$hxClasses["flipbookMM.toolbar.searchText.PageTextContentType"]=flipbookMM_toolbar_searchText_PageTextContentType;flipbookMM_toolbar_searchText_PageTextContentType.__name__=["flipbookMM","toolbar","searchText","PageTextContentType"];flipbookMM_toolbar_searchText_PageTextContentType.prototype={index:null,content:null,__class__:flipbookMM_toolbar_searchText_PageTextContentType};var flipbookMM_toolbar_searchText_CoreStrParameterType=function(){this.x=0;this.y=0;this.width=0;this.height=0};$hxClasses["flipbookMM.toolbar.searchText.CoreStrParameterType"]=flipbookMM_toolbar_searchText_CoreStrParameterType;flipbookMM_toolbar_searchText_CoreStrParameterType.__name__=["flipbookMM","toolbar","searchText","CoreStrParameterType"];flipbookMM_toolbar_searchText_CoreStrParameterType.prototype={x:null,y:null,width:null,height:null,__class__:flipbookMM_toolbar_searchText_CoreStrParameterType};var flipbookMM_toolbar_searchText_PageCoreStrPositonType=function(){this.positon=[];this.index=0};$hxClasses["flipbookMM.toolbar.searchText.PageCoreStrPositonType"]=flipbookMM_toolbar_searchText_PageCoreStrPositonType;flipbookMM_toolbar_searchText_PageCoreStrPositonType.__name__=["flipbookMM","toolbar","searchText","PageCoreStrPositonType"];flipbookMM_toolbar_searchText_PageCoreStrPositonType.prototype={positon:null,index:null,__class__:flipbookMM_toolbar_searchText_PageCoreStrPositonType};var flipbookMM_toolbar_searchText_SearchTextDecode=function(){this.pageTotalNum=0;this.pageContent=[];this.targetContent=[];this.targetContentPosition=[];this.pageTextIndex=[]};$hxClasses["flipbookMM.toolbar.searchText.SearchTextDecode"]=flipbookMM_toolbar_searchText_SearchTextDecode;flipbookMM_toolbar_searchText_SearchTextDecode.__name__=["flipbookMM","toolbar","searchText","SearchTextDecode"];flipbookMM_toolbar_searchText_SearchTextDecode.getInstance=function(){if(flipbookMM_toolbar_searchText_SearchTextDecode.instance==null){flipbookMM_toolbar_searchText_SearchTextDecode.instance=new flipbookMM_toolbar_searchText_SearchTextDecode}return flipbookMM_toolbar_searchText_SearchTextDecode.instance};flipbookMM_toolbar_searchText_SearchTextDecode.prototype={loader:null,textSrcFast:null,searchString:null,pageTotalNum:null,pageTextIndex:null,pageContent:null,targetContent:null,targetContentPosition:null,searchText:function(e){this.distoryMe();this.searchString=e;this.pageTotalNum=0;this.pageContent=[];this.targetContent=[];this.targetContentPosition=[];this.getXmlData()},distoryMe:function(){this.searchString=null;this.pageContent=null;this.targetContent=null;this.targetContentPosition=null;var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SEARCH_TEXT_CANCEL,new flipbookMM_events_EventObject(this,null,null)));e=null},getXmlData:function(){var s=this;var e=function(e){var t=Xml.parse(e.target.data);s.textSrcFast=new haxe_xml_Fast(t);s.loader.destroyMe();s.loader=null;s.searchStr()};var t=function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,new flipbookMM_events_EventObject(s,null,null)));t=null};this.loader=new base_baseLoad_LoadData(flipbookMM_config_Resource.FLIPBOOKTEXT_FILENAME,e,null,t)},searchStr:function(){var e=null;if(this.textSrcFast.hasNode.resolve("Search")){if(this.textSrcFast.node.resolve("Search").hasNode.resolve("pages")){e=this.textSrcFast.node.resolve("Search").node.resolve("pages");if(e.get_innerHTML().length>0){if(e.has.resolve("Count")){this.pageTotalNum=Std.parseInt(e.att.resolve("Count"))}var t=e.get_elements();while(t.hasNext()){var s=t.next();var i=new flipbookMM_toolbar_searchText_PageTextContentType;i.index=Std.parseInt(s.att.resolve("Index"));i.content=s.get_innerData();this.pageContent.push(i);this.pageTextIndex.push(i.index);i=null}var a=0;var r=this.pageTotalNum;while(a0){this.coreStrPositionParse(1)}}}}e=null},coreStrContentParse:function(e){if(e0){if(t.indexOf("\r\n")!=-1){s="\r\n"}else{if(t.indexOf("\r")!=-1){s="\r"}if(t.indexOf("\n")!=-1){s="\n"}}t=StringTools.replace(t,s,",");var a=t.split(",");var r=0;var _=g.targetContent.length;while(r<_){var n=r++;if(g.targetContent[n].pageIndex==d){var o=0;var l=g.searchString.length;while(o0){var u=new flipbookMM_toolbar_searchText_PageCoreStrPositonType;u.index=d;u.positon=i;g.targetContentPosition.push(u);i=null;u=null}if(d==g.pageTotalNum){var f=flipbookMM_events_EventCenter.getInstance();f.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,new flipbookMM_events_EventObject(g,null,null)));f=null}else{m+=1;g.coreStrPositionParse(m)}t=null}else if(d==g.pageTotalNum){var p=flipbookMM_events_EventCenter.getInstance();p.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,new flipbookMM_events_EventObject(g,null,null)));p=null}else{m+=1;g.coreStrPositionParse(m)}v.destroyMe();v=null};if(this.pageTextIndex.indexOf(d)!=-1){var t="./files/texts/text"+d+".xml";v=new base_baseLoad_LoadData(t,e)}else if(d==this.pageTotalNum){var s=flipbookMM_events_EventCenter.getInstance();s.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,new flipbookMM_events_EventObject(this,null,null)));s=null}else{m+=1;this.coreStrPositionParse(m)}},__class__:flipbookMM_toolbar_searchText_SearchTextDecode};var flipbookMM_toolbar_searchText_SearchTextJs=function(e,t){if(e==null){e=16777215}var s=this;var i="./img/toolbarImg/ic_search_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,i,e,t);this.div.addEventListener("click",function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.AUTO_FLIP_PAGE_ON_OFF,new flipbookMM_events_EventObject(s,"off",null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(s,3,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(s,"off",null)));t=null})};$hxClasses["flipbookMM.toolbar.searchText.SearchTextJs"]=flipbookMM_toolbar_searchText_SearchTextJs;flipbookMM_toolbar_searchText_SearchTextJs.__name__=["flipbookMM","toolbar","searchText","SearchTextJs"];flipbookMM_toolbar_searchText_SearchTextJs.__super__=flipbookMM_toolbar_IconBtnSpriteJs;flipbookMM_toolbar_searchText_SearchTextJs.prototype=$extend(flipbookMM_toolbar_IconBtnSpriteJs.prototype,{__class__:flipbookMM_toolbar_searchText_SearchTextJs});var flipbookMM_toolbar_searchText_SearchTextNode=function(e,t,s){var i=this;openfl_display_Sprite.call(this);this.clickFlag=0;this.offsetX=10;this.nodeContent=new openfl_display_Sprite;this.addChild(this.nodeContent);this.nodeContentBack=new openfl_display_Sprite;this.nodeContent.addChild(this.nodeContentBack);this.searchContStyle=new openfl_display_Sprite;this.nodeContent.addChild(this.searchContStyle);this.pageId=new base_baseSprite_TextSprite("page "+(s.pageIndex==null?"null":""+s.pageIndex));this.pageId.set_textColor(16777215);this.nodeContent.addChild(this.pageId);this.nearStr=new base_baseSprite_TextSprite(s.nearString);this.nearStr.set_textColor(13421772);this.nodeContent.addChild(this.nearStr);this.nearStrMask=new openfl_display_Shape;this.nearStr.addChild(this.nearStrMask);this.nearStr.set_mask(this.nearStrMask);this.line=new openfl_display_Sprite;this.addChild(this.line);this.resize(e,t);this.nodeContent.addEventListener("mouseDown",function(e){i.clickFlag=1});this.nodeContent.addEventListener("mouseUp",function(e){if(i.clickFlag==1){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(i,s.pageIndex,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(i,null,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(i,"on",null)));t=null}i.clickFlag=0});this.nodeContent.addEventListener("mouseOut",function(e){i.clickFlag=0})};$hxClasses["flipbookMM.toolbar.searchText.SearchTextNode"]=flipbookMM_toolbar_searchText_SearchTextNode;flipbookMM_toolbar_searchText_SearchTextNode.__name__=["flipbookMM","toolbar","searchText","SearchTextNode"];flipbookMM_toolbar_searchText_SearchTextNode.__super__=openfl_display_Sprite;flipbookMM_toolbar_searchText_SearchTextNode.prototype=$extend(openfl_display_Sprite.prototype,{nodeWidth:null,nodeHeight:null,offsetX:null,pageId:null,nearStr:null,nodeContent:null,nodeContentBack:null,nearStrMask:null,searchContStyle:null,line:null,clickFlag:null,resize:function(e,t){this.nodeWidth=e;this.nodeHeight=t;this.nearStr.set_x(0);this.nearStr.set_y((this.nodeHeight-this.pageId.get_height())/2);this.pageId.set_x(this.nodeWidth-this.pageId.get_width()-this.offsetX);this.pageId.set_y(this.nearStr.get_y());this.line.get_graphics().clear();this.line.get_graphics().beginFill(8947848);this.line.get_graphics().drawRect(0,0,this.nodeWidth,1);this.line.set_alpha(.3);this.line.set_x(0);this.line.set_y(this.nodeHeight);this.searchContStyle.get_graphics().clear();this.searchContStyle.get_graphics().beginFill(16777215);this.searchContStyle.get_graphics().drawRect(0,0,this.nodeWidth,this.nodeHeight);this.searchContStyle.get_graphics().endFill();this.searchContStyle.set_alpha(.6);this.searchContStyle.set_x(0);this.searchContStyle.set_y(0);this.searchContStyle.set_visible(false);var s=this.nodeWidth-this.nodeContent.get_x()-this.offsetX-this.pageId.get_width();this.nodeContentBack.get_graphics().clear();this.nodeContentBack.get_graphics().beginFill(65280);this.nodeContentBack.get_graphics().drawRect(0,0,s,this.nodeHeight);this.nodeContentBack.get_graphics().endFill();this.nodeContentBack.set_alpha(0);this.nearStrMask.get_graphics().clear();this.nearStrMask.get_graphics().beginFill(255);this.nearStrMask.get_graphics().drawRect(0,0,s-this.offsetX,this.nodeHeight);this.nearStrMask.get_graphics().endFill();this.nearStrMask.set_alpha(0)},__class__:flipbookMM_toolbar_searchText_SearchTextNode});var flipbookMM_toolbar_searchText_SearchTextUI=function(e,t,s,i){var r=this;base_baseSprite_TouchSprite.call(this);this.color=s;this.backAlpha=i;this.coreStr="";this.back=new openfl_display_Sprite;this.addChild(this.back);this.searchPanel=new openfl_display_Sprite;this.addChild(this.searchPanel);this.inputBox=new openfl_display_Sprite;this.addChild(this.inputBox);this.tray=new openfl_display_Sprite;this.searchPanel.addChild(this.tray);this.searchPanelMask=new openfl_display_Shape;this.addChild(this.searchPanelMask);this.searchPanel.set_mask(this.searchPanelMask);this.tableContent=[];this.displayNode=new haxe_ds_IntMap;this.displayHeight=0;this.curRowNum=-1;this.bufferRow=1;this.noResoult=new base_baseSprite_TextSprite;this.preTrayPosition=new openfl_geom_Point;this.resize(e,t);var a=flipbookMM_events_EventCenter.getInstance();a.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,this,function(e){if(r.searchTextDecode!=null){r.tableContent=null;r.tableContent=[];var t=0;var s=r.searchTextDecode.targetContent;while(t0){r.displayHeight=r.tableContent.length*r.unitHeight;r.displayNode=null;r.tray.removeChildren();r.displayNode=new haxe_ds_IntMap;r.curRowNum=-1;r.updateShowData(0)}else{r.displayHeight=0;r.noResoult.set_text("No result.");r.noResoult.set_textColor(16711680);r.tray.addChild(r.noResoult)}}});a=null;this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_UP_SLIDE,function(e){var t=r.tray.get_y();t+=e.get_touchSlidePoint().y*3;if(r.displayHeight<=r.panelHeigth){t=0}else if(t0){t=0}motion_Actuate.tween(r.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-r.tray.get_y()/r.unitHeight|0;r.updateShowData(e)}).onComplete(function(){r.tray.set_y(t);var e=-r.tray.get_y()/r.unitHeight|0;r.updateShowData(e)})});this.addEventListener("mouseDown",function(e){r.preTrayPosition.y=r.tray.get_y()});this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG,function(e){var t=r.preTrayPosition.y+e.get_touchSlidePoint().y;if(t>0||r.displayHeight<=r.panelHeigth){r.tray.set_y(0)}else if(t0){t=r.tray.get_y();t+=e.delta*2;if(r.displayHeight<=r.panelHeigth){t=0}else if(t>0){t=0}}else{t=r.tray.get_y();t+=e.delta*2;if(r.displayHeight<=r.panelHeigth){t=0}else if(t0){i.tray.removeChildren()}if(i.searchTextDecode!=null){i.searchTextDecode.targetContent=null;i.searchTextDecode=null}i.coreStr=t;if(StringTools.trim(i.coreStr).length>1){i.inputContent.div.blur();i.searchTextDecode=flipbookMM_toolbar_searchText_SearchTextDecode.getInstance();i.searchTextDecode.searchText(i.coreStr)}else{flipbookMM_toolbar_searchText_SearchTextDecode.getInstance().distoryMe();i.displayHeight=0;i.noResoult.set_text("Please enter at least two characters.");i.noResoult.set_textColor(16711680);i.tray.addChild(i.noResoult)}}}};this.inputContent.cancleBtn.onclick=function(){i.coreStr="";i.inputContent.input.value="";i.tableContent=null;var e=i.tray.get_numChildren();if(e>0){i.tray.removeChildren()}flipbookMM_toolbar_searchText_SearchTextDecode.getInstance().distoryMe()};this.inputContent.searchBtn.onclick=function(){var e=i.inputContent.input.value;if(i.coreStr!=e){i.tableContent=null;var t=i.tray.get_numChildren();if(t>0){i.tray.removeChildren(0)}if(i.searchTextDecode!=null){i.searchTextDecode.targetContent=null;i.searchTextDecode=null}i.coreStr=e;if(StringTools.trim(i.coreStr).length>1){i.searchTextDecode=flipbookMM_toolbar_searchText_SearchTextDecode.getInstance();i.searchTextDecode.searchText(i.coreStr)}}}},updateShowData:function(e){if(this.curRowNum==e){return}this.curRowNum=e;var t=this.curRowNum;if(t>=this.bufferRow){t-=this.bufferRow}var s=t;var i=t+this.maxRow+this.bufferRow+1;while(s=0){if(!this.displayNode.h.hasOwnProperty(a)){this.displayNode.h[a]=this.tableContent[a];var r=this.displayNode.h[a];this.tray.addChild(r);r.set_x(0);r.set_y(a*this.unitHeight);r=null}}}var _=this.displayNode.keys();while(_.hasNext()){var n=_.next();if(nt+this.maxRow+this.bufferRow){this.tray.removeChild(this.displayNode.h[n]);this.displayNode.remove(n)}}},resize:function(e,t){this.UI_Width=e;this.UI_Height=t;this.unitWidth=this.UI_Width;this.unitHeight=40*window.devicePixelRatio;this.maxRow=this.UI_Height/this.unitHeight|0;this.inputBoxWidth=this.UI_Width/window.devicePixelRatio;this.inputBoxHeight=30;this.panelWidth=this.UI_Width;this.panelHeigth=this.UI_Height-this.inputBoxHeight;if(this.inputContent!=null){this.inputContent.set_x(0);this.inputContent.set_y(50);this.inputContent.resize(this.inputBoxWidth,this.inputBoxHeight)}else{this.inputBoxInit();this.inputContent.set_x(0);this.inputContent.set_y(50);this.inputContent.resize(this.inputBoxWidth,this.inputBoxHeight)}this.back.get_graphics().clear();this.back.get_graphics().beginFill(this.color);this.back.get_graphics().drawRect(0,0,this.UI_Width,this.UI_Height);this.back.get_graphics().endFill();this.back.set_alpha(this.backAlpha);this.searchPanelMask.get_graphics().clear();this.searchPanelMask.get_graphics().beginFill(0);this.searchPanelMask.get_graphics().drawRect(0,0,this.UI_Width,this.panelHeigth);this.searchPanelMask.get_graphics().endFill();this.searchPanelMask.set_x(0);this.searchPanelMask.set_y(this.inputBoxHeight*window.devicePixelRatio);this.searchPanel.set_x(0);this.searchPanel.set_y(this.inputBoxHeight*window.devicePixelRatio);if(this.tableContent!=null){var s=0;var i=this.tableContent;while(s0){this.tray.removeChildren();this.displayNode=null;this.displayNode=new haxe_ds_IntMap;var r=this.curRowNum;this.curRowNum=-1;this.updateShowData(r)}}},__class__:flipbookMM_toolbar_searchText_SearchTextUI});var flipbookMM_toolbar_share_ShareJs=function(e,t){var s=this;var i="./img/toolbarImg/ic_share_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,i,e,t);this.div.onclick=function(){var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SHARE_ON_OFF,new flipbookMM_events_EventObject(s,null,null)));e=null}};$hxClasses["flipbookMM.toolbar.share.ShareJs"]=flipbookMM_toolbar_share_ShareJs;flipbookMM_toolbar_share_ShareJs.__name__=["flipbookMM","toolbar","share","ShareJs"];flipbookMM_toolbar_share_ShareJs.__super__=flipbookMM_toolbar_IconBtnSpriteJs;flipbookMM_toolbar_share_ShareJs.prototype=$extend(flipbookMM_toolbar_IconBtnSpriteJs.prototype,{__class__:flipbookMM_toolbar_share_ShareJs});var flipbookMM_toolbar_share_ShareUIJs=function(){this._linkUrl="";base_baseSprite_SpriteJs.call(this);this.init()};$hxClasses["flipbookMM.toolbar.share.ShareUIJs"]=flipbookMM_toolbar_share_ShareUIJs;flipbookMM_toolbar_share_ShareUIJs.__name__=["flipbookMM","toolbar","share","ShareUIJs"];flipbookMM_toolbar_share_ShareUIJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_share_ShareUIJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{_linkUrl:null,init:function(){var t=this;this.setBackgroundColor(16777215);this.div.style.borderRadius=10+"px";this.set_width(260);this.set_height(100);this.div.style.textAlign="center";this.div.style.border="1px solid #888";var e=window.document.createElement("div");e.style.height=40+"px";e.style.lineHeight=40+"px";e.innerHTML="share";this.div.appendChild(e);var s=window.document.createElement("img");s.src="./img/socialShare/facebook.png";s.style.padding=8+"px";this.div.appendChild(s);s.onclick=function(){t.set_visible(false);t.openUrl("https://api.addthis.com/oexchange/0.8/forward/facebook/offer?")};var i=window.document.createElement("img");i.src="./img/socialShare/twitter.png";i.style.padding=8+"px";this.div.appendChild(i);i.onclick=function(){t.set_visible(false);t.openUrl("https://api.addthis.com/oexchange/0.8/forward/twitter/offer?")};var a=window.document.createElement("img");a.src="./img/socialShare/google_plusone_share.png";a.style.padding=8+"px";this.div.appendChild(a);a.onclick=function(){t.set_visible(false);t.openUrl("https://api.addthis.com/oexchange/0.8/forward/google_plusone_share/offer?")};var r=window.document.createElement("img");r.src="./img/socialShare/linkedin.png";r.style.padding=8+"px";this.div.appendChild(r);r.onclick=function(e){t.set_visible(false);t.openUrl("https://api.addthis.com/oexchange/0.8/forward/linkedin/offer?")};var _=window.document.createElement("img");_.src="./img/socialShare/addthis.png";_.style.padding=8+"px";this.div.appendChild(_);_.onclick=function(){t.set_visible(false);t.openUrl("https://www.addthis.com/bookmark.php?source=tbx32nj-1.0&v=300&")};return},openUrl:function(e){var t=window.location.href;t=StringTools.replace(t,"mobile.html","");var s;var i=flipbookMM_config_ConfigSetting.getInstance();var a=i.get(flipbookMM_config_ConfigKey.AppShowName);if(a.indexOf("Next")==0){s=e+"url="+t+"&pubid=ra-57870619ab04adca&ct=1&pco=tbxnj-1.0"}else{s=e+"url="+t+"&pubid=ra-5786fca66f6f5cc9&ct=1&pco=tbxnj-1.0"}i=null;try{if(this._linkUrl.toLowerCase().indexOf("www")==0){s="http://"+s}if(this._linkUrl.toLowerCase().indexOf("mailto:")==0){s=this._linkUrl;openfl_Lib.getURL(new openfl_net_URLRequest(s),"_blank")}else{openfl_Lib.getURL(new openfl_net_URLRequest(s),"_blank")}}catch(e){haxe_CallStack.lastException=e;return}},__class__:flipbookMM_toolbar_share_ShareUIJs});var flipbookMM_toolbar_sound_SoundBtnJs=function(e,t){var s=this;base_baseSprite_SpriteJs.call(this);this.soundOnUrl="./img/toolbarImg/ic_volume_up_black_36dp.png";this.soundOffUrl="./img/toolbarImg/ic_volume_off_black_36dp.png";this.soundOnOffFlag=true;this.soundOnBtn=new flipbookMM_toolbar_IconBtnSpriteJs(this.soundOnUrl,e,t);this.div.appendChild(this.soundOnBtn.div);this.soundOffBtn=new flipbookMM_toolbar_IconBtnSpriteJs(this.soundOffUrl,e,t);this.div.appendChild(this.soundOffBtn.div);this.soundOffBtn.set_visible(false);this.updateStatus();this.div.addEventListener("click",function(e){s.soundOnOffFlag=!s.soundOnOffFlag;s.updateStatus()})};$hxClasses["flipbookMM.toolbar.sound.SoundBtnJs"]=flipbookMM_toolbar_sound_SoundBtnJs;flipbookMM_toolbar_sound_SoundBtnJs.__name__=["flipbookMM","toolbar","sound","SoundBtnJs"];flipbookMM_toolbar_sound_SoundBtnJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_sound_SoundBtnJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{soundOnOffFlag:null,soundOnUrl:null,soundOffUrl:null,soundOnBtn:null,soundOffBtn:null,updateBgAlpha:function(e){this.soundOnBtn.updateBgAlpha(e);this.soundOffBtn.updateBgAlpha(e)},updateStatus:function(){var e;if(this.soundOnOffFlag){e="on";this.soundOnBtn.set_visible(true);this.soundOffBtn.set_visible(false)}else{e="off";this.soundOnBtn.set_visible(false);this.soundOffBtn.set_visible(true)}var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SOUNDBTN_ON_OFF,new flipbookMM_events_EventObject(this,e,null)));t=null},__class__:flipbookMM_toolbar_sound_SoundBtnJs});var flipbookMM_toolbar_thumbnails_Thumbnails=function(e,t){if(e==null){e=16777215}var s=this;var i="./img/toolbarImg/ic_view_module_black_36dp.png";flipbookMM_toolbar_IconBtnSprite.call(this,i,e,t);this.addEventListener("click",function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.AUTO_FLIP_PAGE_ON_OFF,new flipbookMM_events_EventObject(s,"off",null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(s,2,null)));t=null})};$hxClasses["flipbookMM.toolbar.thumbnails.Thumbnails"]=flipbookMM_toolbar_thumbnails_Thumbnails;flipbookMM_toolbar_thumbnails_Thumbnails.__name__=["flipbookMM","toolbar","thumbnails","Thumbnails"];flipbookMM_toolbar_thumbnails_Thumbnails.__super__=flipbookMM_toolbar_IconBtnSprite;flipbookMM_toolbar_thumbnails_Thumbnails.prototype=$extend(flipbookMM_toolbar_IconBtnSprite.prototype,{__class__:flipbookMM_toolbar_thumbnails_Thumbnails});var flipbookMM_toolbar_thumbnails_ThumbnailsJs=function(e,t){if(e==null){e=16777215}var s=this;var i="./img/toolbarImg/ic_view_module_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,i,e,t);this.div.addEventListener("click",function(e){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.AUTO_FLIP_PAGE_ON_OFF,new flipbookMM_events_EventObject(s,"off",null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(s,2,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(s,"off",null)));t=null})};$hxClasses["flipbookMM.toolbar.thumbnails.ThumbnailsJs"]=flipbookMM_toolbar_thumbnails_ThumbnailsJs;flipbookMM_toolbar_thumbnails_ThumbnailsJs.__name__=["flipbookMM","toolbar","thumbnails","ThumbnailsJs"];flipbookMM_toolbar_thumbnails_ThumbnailsJs.__super__=flipbookMM_toolbar_IconBtnSpriteJs;flipbookMM_toolbar_thumbnails_ThumbnailsJs.prototype=$extend(flipbookMM_toolbar_IconBtnSpriteJs.prototype,{__class__:flipbookMM_toolbar_thumbnails_ThumbnailsJs});var flipbookMM_toolbar_thumbnails_ThumbnailsNode=function(s,e,t,i){var a=this;openfl_display_Sprite.call(this);this.pageW=e;this.pageH=t;this.isFinished=false;this.clickFlag=0;var r=flipbookMM_bookBox_PagesConfigGet.getInstance();var _=r.thumbPageList[s-1];r=null;if(i==null){this.loader=new base_baseLoad_LoadImg(_,$bind(this,this.onCom))}else{this.loader=new base_baseLoad_LoadImg(_,i)}this.addChild(this.loader);this.pageT=new base_baseSprite_TextSprite(s==null?"null":""+s);this.loader.addEventListener("mouseDown",function(e){a.clickFlag=1});this.loader.addEventListener("mouseUp",function(e){if(a.clickFlag==1){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(a,s,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(a,null,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(a,"on",null)));t=null}a.clickFlag=0});this.loader.addEventListener("mouseOut",function(e){a.clickFlag=0})};$hxClasses["flipbookMM.toolbar.thumbnails.ThumbnailsNode"]=flipbookMM_toolbar_thumbnails_ThumbnailsNode;flipbookMM_toolbar_thumbnails_ThumbnailsNode.__name__=["flipbookMM","toolbar","thumbnails","ThumbnailsNode"];flipbookMM_toolbar_thumbnails_ThumbnailsNode.__super__=openfl_display_Sprite;flipbookMM_toolbar_thumbnails_ThumbnailsNode.prototype=$extend(openfl_display_Sprite.prototype,{loader:null,pageW:null,pageH:null,realW:null,realH:null,isFinished:null,pageT:null,clickFlag:null,onCom:function(e){var t=js_Boot.__cast(e.target,openfl_display_LoaderInfo);this.realW=t.content.get_width();this.realH=t.content.get_height();var s=this.pageW/this.realW;var i=this.pageH/this.realH;var a=s=(t+this.row+this.bufferLength*2+1)*this.column){this.tableContent.h[f].destroyMe();this.tray.removeChild(this.tableContent.h[f]);this.tableContent.remove(f)}}},resize:function(e,t){this.TWidth=e;this.THeight=t;this.TUnitWidth=140*window.devicePixelRatio;this.TUnitHeight=180*window.devicePixelRatio;this.column=this.TWidth/this.TUnitWidth|0;this.row=this.THeight/this.TUnitHeight|0;this.offsetX=this.TWidth%this.TUnitWidth/2;var s=this.maxCount%this.column;if(s==0){s=this.maxCount/this.column}else{s=this.maxCount/this.column+1|0}this.tableHeight=this.TUnitHeight*s;this.back.get_graphics().clear();this.back.get_graphics().beginFill(this.backColor);this.back.get_graphics().drawRect(0,0,this.TWidth,this.THeight);this.back.get_graphics().endFill();this.back.set_alpha(this.backAlpha);this.trayMask.get_graphics().clear();this.trayMask.get_graphics().beginFill(0);this.trayMask.get_graphics().drawRect(0,0,this.TWidth,this.THeight);this.trayMask.get_graphics().endFill();var i=this.curRowNum;this.curRowNum=-1;this.tray.removeChildren();this.tableContent=null;this.tableContent=new haxe_ds_IntMap;this.updateShowData(i)},addListEvent:function(){var i=this;this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_UP_SLIDE,function(e){var t=i.tray.get_y();t+=e.get_touchSlidePoint().y*3;if(i.tableHeight<=i.THeight){t=0}else if(t0){t=0}motion_Actuate.tween(i.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-i.tray.get_y()/i.TUnitHeight|0;i.updateShowData(e)}).onComplete(function(){i.tray.set_y(t);var e=-i.tray.get_y()/i.TUnitHeight|0;i.updateShowData(e)})});this.addEventListener("mouseDown",function(e){i.preTrayPosition.y=i.tray.get_y()});this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG,function(e){var t=i.preTrayPosition.y+e.get_touchSlidePoint().y;if(t>0||i.tableHeight<=i.THeight){i.tray.set_y(0)}else if(t0){t=i.tray.get_y();t+=e.delta*2;if(i.tableHeight<=i.THeight){t=0}else if(t>0){t=0}}else{t=i.tray.get_y();t+=e.delta*2;if(i.tableHeight<=i.THeight){t=0}else if(t>>16&255};flipbookMM_utils_color_ColorUtils.green=function(e){return e>>>8&255};flipbookMM_utils_color_ColorUtils.blue=function(e){return e>>>0&255};flipbookMM_utils_color_ColorUtils.alpha=function(e){return e>>>24&255};flipbookMM_utils_color_ColorUtils.argbMake=function(e,t,s,i){if(i==null){i=0}var a=(e&255)<<16;var r=(t&255)<<8;var _=s&255;var n=(i&255)<<24;return a|r|_|n};flipbookMM_utils_color_ColorUtils.transform=function(e,t,s,i,a,r,_,n,o){if(o==null){o=0}if(n==null){n=0}if(_==null){_=0}if(r==null){r=0}if(a==null){a=1}if(i==null){i=1}if(s==null){s=1}if(t==null){t=1}if(e==null){e=16777215}var l=flipbookMM_utils_color_ColorUtils.red(e);var h=flipbookMM_utils_color_ColorUtils.green(e);var c=flipbookMM_utils_color_ColorUtils.blue(e);var u=flipbookMM_utils_color_ColorUtils.alpha(e);var f=l*t+r|0;var p=h*s+_|0;var d=c*i+n|0;var g=u*a+o|0;f=Math.max(Math.min(f,255),0)|0;p=Math.max(Math.min(p,255),0)|0;d=Math.max(Math.min(d,255),0)|0;g=Math.max(Math.min(g,255),0)|0;return flipbookMM_utils_color_ColorUtils.argbMake(f,p,d,g)};var format_SVG=function(e){if(e!=null){this.data=new format_svg_SVGData(Xml.parse(e))}};$hxClasses["format.SVG"]=format_SVG;format_SVG.__name__=["format","SVG"];format_SVG.prototype={data:null,render:function(e,t,s,i,a,r){if(a==null){a=-1}if(i==null){i=-1}if(s==null){s=0}if(t==null){t=0}if(this.data==null){return}var _=new openfl_geom_Matrix;_.identity();if(i>-1&&a>-1){_.scale(i/this.data.width,a/this.data.height)}_.translate(t,s);var n=new format_svg_SVGRenderer(this.data,r);n.render(e,_)},__class__:format_SVG};var format_gfx_Gfx=function(){};$hxClasses["format.gfx.Gfx"]=format_gfx_Gfx;format_gfx_Gfx.__name__=["format","gfx","Gfx"];format_gfx_Gfx.prototype={geometryOnly:function(){return false},beginGradientFill:function(e){},beginFill:function(e,t){},endFill:function(){},lineStyle:function(e){},endLineStyle:function(){},moveTo:function(e,t){},lineTo:function(e,t){},curveTo:function(e,t,s,i){},renderText:function(e){},__class__:format_gfx_Gfx};var format_gfx_GfxGraphics=function(e){format_gfx_Gfx.call(this);this.graphics=e};$hxClasses["format.gfx.GfxGraphics"]=format_gfx_GfxGraphics;format_gfx_GfxGraphics.__name__=["format","gfx","GfxGraphics"];format_gfx_GfxGraphics.__super__=format_gfx_Gfx;format_gfx_GfxGraphics.prototype=$extend(format_gfx_Gfx.prototype,{graphics:null,beginGradientFill:function(e){this.graphics.beginGradientFill(e.type,e.colors,e.alphas,e.ratios,e.matrix,e.spread,e.interp,e.focus)},beginFill:function(e,t){this.graphics.beginFill(e,t)},endFill:function(){this.graphics.endFill()},lineStyle:function(e){this.graphics.lineStyle(e.thickness,e.color,e.alpha,e.pixelHinting,e.scaleMode,e.capsStyle,e.jointStyle,e.miterLimit)},endLineStyle:function(){this.graphics.lineStyle()},moveTo:function(e,t){this.graphics.moveTo(e,t)},lineTo:function(e,t){this.graphics.lineTo(e,t)},curveTo:function(e,t,s,i){this.graphics.curveTo(e,t,s,i)},__class__:format_gfx_GfxGraphics});var format_gfx_Gradient=function(){this.type=0;this.colors=[];this.alphas=[];this.ratios=[];this.matrix=new openfl_geom_Matrix;this.spread=0;this.interp=1;this.focus=0};$hxClasses["format.gfx.Gradient"]=format_gfx_Gradient;format_gfx_Gradient.__name__=["format","gfx","Gradient"];format_gfx_Gradient.prototype={type:null,colors:null,alphas:null,ratios:null,matrix:null,spread:null,interp:null,focus:null,__class__:format_gfx_Gradient};var format_gfx_LineStyle=function(){this.thickness=1;this.color=0;this.alpha=1;this.pixelHinting=false;this.scaleMode=2;this.capsStyle=1;this.jointStyle=2;this.miterLimit=3};$hxClasses["format.gfx.LineStyle"]=format_gfx_LineStyle;format_gfx_LineStyle.__name__=["format","gfx","LineStyle"];format_gfx_LineStyle.prototype={thickness:null,color:null,alpha:null,pixelHinting:null,scaleMode:null,capsStyle:null,jointStyle:null,miterLimit:null,__class__:format_gfx_LineStyle};var format_svg_FillType=$hxClasses["format.svg.FillType"]={__ename__:["format","svg","FillType"],__constructs__:["FillGrad","FillSolid","FillNone"]};format_svg_FillType.FillGrad=function(e){var t=["FillGrad",0,e];t.__enum__=format_svg_FillType;t.toString=$estr;return t};format_svg_FillType.FillSolid=function(e){var t=["FillSolid",1,e];t.__enum__=format_svg_FillType;t.toString=$estr;return t};format_svg_FillType.FillNone=["FillNone",2];format_svg_FillType.FillNone.toString=$estr;format_svg_FillType.FillNone.__enum__=format_svg_FillType;var format_svg_Grad=function(e){format_gfx_Gradient.call(this);this.type=e;this.radius=0;this.gradMatrix=new openfl_geom_Matrix;this.x1=0;this.y1=0;this.x2=0;this.y2=0};$hxClasses["format.svg.Grad"]=format_svg_Grad;format_svg_Grad.__name__=["format","svg","Grad"];format_svg_Grad.__super__=format_gfx_Gradient;format_svg_Grad.prototype=$extend(format_gfx_Gradient.prototype,{gradMatrix:null,radius:null,x1:null,y1:null,x2:null,y2:null,updateMatrix:function(e){var t=this.x2-this.x1;var s=this.y2-this.y1;var i=Math.atan2(s,t);var a=Math.sqrt(t*t+s*s);var r=new openfl_geom_Matrix;if(this.type==0){r.createGradientBox(1,1);r.scale(a,a)}else{if(this.radius!=0){this.focus=a/this.radius}r.createGradientBox(1,1);r.translate(-.5,-.5);r.scale(this.radius*2,this.radius*2)}r.rotate(i);r.translate(this.x1,this.y1);r.concat(this.gradMatrix);r.concat(e);this.matrix=r},__class__:format_svg_Grad});var format_svg_Group=function(){this.name="";this.children=[]};$hxClasses["format.svg.Group"]=format_svg_Group;format_svg_Group.__name__=["format","svg","Group"];format_svg_Group.prototype={findGroup:function(e){var t=0;var s=this.children;while(t0&&h<128?format_svg_PathParser.sCommandArgs[h]:-1;if(c==-1){throw new js__$Boot_HaxeError("failed parsing path near '"+HxOverrides.substr(e,s,null)+"'")}if(c==-2){++s}else if(c<=-3){var u=s+1;var f=-1;var p=c==-5;if(c==-6){f=0;p=true}while(u127?-1:format_svg_PathParser.sCommandArgs[d];if(g>-3){break}if(g==-5&&p){break}if(f>=0){if(g==-4){if(f!=0){break}}else if(g!=-3){break}++f}else if(g==-6){if(f>=0){break}f=0;p=true}else if(g==-4){break}++u}if(_>=0){var m=parseFloat(HxOverrides.substr(e,s,u-s));i.push(m)}s=u}else{_=h;n=c;l=false;r=s;i=[];++s}var v=0;var b=0;if(_>=0){if(n==i.length){if(t&&this.prev!=null){v=this.prev.prevX();b=this.prev.prevY()}this.prev=this.createCommand(_,i);if(this.prev==null){throw new js__$Boot_HaxeError("Unknown command "+String.fromCharCode(_)+" near '"+HxOverrides.substr(e,r,null)+"'")}if(t&&this.prev.getType()==4){var y=this.prev;var x=y.toQuadratics(v,b);var P=0;while(P=0&&!l){throw new js__$Boot_HaxeError("Unfinished command ("+i.length+"/"+n+") near '"+HxOverrides.substr(e,r,null)+"'")}return a},commandArgs:function(e){if(e==10){return-2}var t=String.fromCharCode(e).toUpperCase();if(t>="0"&&t<="9"){return-3}switch(t){case"+":return-4;case"\t":case"\n":case"\r":case" ":case",":return-2;case"-":return-4;case".":return-5;case"A":return 7;case"C":return 6;case"E":case"e":return-6;case"Q":case"S":return 4;case"L":case"M":case"T":return 2;case"H":case"V":return 1;case"Z":return 0}return-1},prevX:function(){if(this.prev!=null){return this.prev.prevX()}else{return 0}},prevY:function(){if(this.prev!=null){return this.prev.prevY()}else{return 0}},prevCX:function(){if(this.prev!=null){return this.prev.prevCX()}else{return 0}},prevCY:function(){if(this.prev!=null){return this.prev.prevCY()}else{return 0}},createCommand:function(e,t){switch(e){case 65:return new format_svg_ArcSegment(this.prevX(),this.prevY(),t[0],t[1],t[2],t[3]!=0,t[4]!=0,t[5],t[6]);case 67:return new format_svg_CubicSegment(t[0],t[1],t[2],t[3],t[4],t[5]);case 72:return new format_svg_DrawSegment(t[0],this.prevY());case 76:return new format_svg_DrawSegment(t[0],t[1]);case 77:this.lastMoveX=t[0];this.lastMoveY=t[1];return new format_svg_MoveSegment(this.lastMoveX,this.lastMoveY);case 81:return new format_svg_QuadraticSegment(t[0],t[1],t[2],t[3]);case 83:var s=this.prevX();var i=this.prevY();return new format_svg_CubicSegment(s*2-this.prevCX(),i*2-this.prevCY(),t[0],t[1],t[2],t[3]);case 84:var a=this.prevX();var r=this.prevY();return new format_svg_QuadraticSegment(a*2-this.prevCX(),a*2-this.prevCY(),t[2],t[3]);case 86:return new format_svg_DrawSegment(this.prevX(),t[0]);case 90:return new format_svg_DrawSegment(this.lastMoveX,this.lastMoveY);case 97:var _=this.prevX();var n=this.prevY();return new format_svg_ArcSegment(_,n,t[0],t[1],t[2],t[3]!=0,t[4]!=0,t[5]+_,t[6]+n);case 99:var o=this.prevX();var l=this.prevY();return new format_svg_CubicSegment(t[0]+o,t[1]+l,t[2]+o,t[3]+l,t[4]+o,t[5]+l);case 104:return new format_svg_DrawSegment(t[0]+this.prevX(),this.prevY());case 108:return new format_svg_DrawSegment(t[0]+this.prevX(),t[1]+this.prevY());case 109:this.lastMoveX=t[0]+this.prevX();this.lastMoveY=t[1]+this.prevY();return new format_svg_MoveSegment(this.lastMoveX,this.lastMoveY);case 113:var h=this.prevX();var c=this.prevY();return new format_svg_QuadraticSegment(t[0]+h,t[1]+c,t[2]+h,t[3]+c);case 115:var u=this.prevX();var f=this.prevY();return new format_svg_CubicSegment(u*2-this.prevCX(),f*2-this.prevCY(),t[0]+u,t[1]+f,t[2]+u,t[3]+f);case 116:var p=this.prevX();var d=this.prevY();return new format_svg_QuadraticSegment(p*2-this.prevCX(),d*2-this.prevCY(),t[0]+p,t[1]+d);case 118:return new format_svg_DrawSegment(this.prevX(),t[0]+this.prevY());case 122:return new format_svg_DrawSegment(this.lastMoveX,this.lastMoveY)}return null},__class__:format_svg_PathParser};var format_svg_PathSegment=function(e,t){this.x=e;this.y=t};$hxClasses["format.svg.PathSegment"]=format_svg_PathSegment;format_svg_PathSegment.__name__=["format","svg","PathSegment"];format_svg_PathSegment.prototype={x:null,y:null,getType:function(){return 0},prevX:function(){return this.x},prevY:function(){return this.y},prevCX:function(){return this.x},prevCY:function(){return this.y},toGfx:function(e,t){t.setLast(this.x,this.y);t.firstX=t.lastX;t.firstY=t.lastY;e.moveTo(t.lastX,t.lastY)},__class__:format_svg_PathSegment};var format_svg_MoveSegment=function(e,t){format_svg_PathSegment.call(this,e,t)};$hxClasses["format.svg.MoveSegment"]=format_svg_MoveSegment;format_svg_MoveSegment.__name__=["format","svg","MoveSegment"];format_svg_MoveSegment.__super__=format_svg_PathSegment;format_svg_MoveSegment.prototype=$extend(format_svg_PathSegment.prototype,{getType:function(){return 1},__class__:format_svg_MoveSegment});var format_svg_DrawSegment=function(e,t){format_svg_PathSegment.call(this,e,t)};$hxClasses["format.svg.DrawSegment"]=format_svg_DrawSegment;format_svg_DrawSegment.__name__=["format","svg","DrawSegment"];format_svg_DrawSegment.__super__=format_svg_PathSegment;format_svg_DrawSegment.prototype=$extend(format_svg_PathSegment.prototype,{toGfx:function(e,t){t.setLast(this.x,this.y);e.lineTo(t.lastX,t.lastY)},getType:function(){return 2},__class__:format_svg_DrawSegment});var format_svg_QuadraticSegment=function(e,t,s,i){format_svg_PathSegment.call(this,s,i);this.cx=e;this.cy=t};$hxClasses["format.svg.QuadraticSegment"]=format_svg_QuadraticSegment;format_svg_QuadraticSegment.__name__=["format","svg","QuadraticSegment"];format_svg_QuadraticSegment.__super__=format_svg_PathSegment;format_svg_QuadraticSegment.prototype=$extend(format_svg_PathSegment.prototype,{cx:null,cy:null,prevCX:function(){return this.cx},prevCY:function(){return this.cy},toGfx:function(e,t){t.setLast(this.x,this.y);e.curveTo(t.transX(this.cx,this.cy),t.transY(this.cx,this.cy),t.lastX,t.lastY)},getType:function(){return 3},__class__:format_svg_QuadraticSegment});var format_svg_CubicSegment=function(e,t,s,i,a,r){format_svg_PathSegment.call(this,a,r);this.cx1=e;this.cy1=t;this.cx2=s;this.cy2=i};$hxClasses["format.svg.CubicSegment"]=format_svg_CubicSegment;format_svg_CubicSegment.__name__=["format","svg","CubicSegment"];format_svg_CubicSegment.__super__=format_svg_PathSegment;format_svg_CubicSegment.prototype=$extend(format_svg_PathSegment.prototype,{cx1:null,cy1:null,cx2:null,cy2:null,prevCX:function(){return this.cx2},prevCY:function(){return this.cy2},Interp:function(e,t,s){return e+(t-e)*s},toGfx:function(e,t){var s=t.lastX;var i=t.lastY;var a=t.transX(this.cx1,this.cy1);var r=t.transY(this.cx1,this.cy1);var _=t.transX(this.cx2,this.cy2);var n=t.transY(this.cx2,this.cy2);t.setLast(this.x,this.y);var o=t.lastX;var l=t.lastY;var h=this.Interp(s,a,.75);var c=this.Interp(i,r,.75);var u=this.Interp(o,_,.75);var f=this.Interp(l,n,.75);var p=(o-s)/16;var d=(l-i)/16;var g=this.Interp(s,a,.375);var m=this.Interp(i,r,.375);var v=this.Interp(h,u,.375)-p;var b=this.Interp(c,f,.375)-d;var y=this.Interp(u,h,.375)+p;var x=this.Interp(f,c,.375)+d;var P=this.Interp(o,_,.375);var k=this.Interp(l,n,.375);var w=(g+v)*.5;var C=(m+b)*.5;var T=(h+u)*.5;var S=(c+f)*.5;var M=(y+P)*.5;var $=(x+k)*.5;e.curveTo(g,m,w,C);e.curveTo(v,b,T,S);e.curveTo(y,x,M,$);e.curveTo(P,k,o,l)},toQuadratics:function(e,t){var s=[];var i=this.Interp(e,this.cx1,.75);var a=this.Interp(t,this.cy1,.75);var r=this.Interp(this.x,this.cx2,.75);var _=this.Interp(this.y,this.cy2,.75);var n=(this.x-e)/16;var o=(this.y-t)/16;var l=this.Interp(e,this.cx1,.375);var h=this.Interp(t,this.cy1,.375);var c=this.Interp(i,r,.375)-n;var u=this.Interp(a,_,.375)-o;var f=this.Interp(r,i,.375)+n;var p=this.Interp(_,a,.375)+o;var d=this.Interp(this.x,this.cx2,.375);var g=this.Interp(this.y,this.cy2,.375);var m=(l+c)*.5;var v=(h+u)*.5;var b=(i+r)*.5;var y=(a+_)*.5;var x=(f+d)*.5;var P=(p+g)*.5;s.push(new format_svg_QuadraticSegment(l,h,m,v));s.push(new format_svg_QuadraticSegment(c,u,b,y));s.push(new format_svg_QuadraticSegment(f,p,x,P));s.push(new format_svg_QuadraticSegment(d,g,this.x,this.y));return s},getType:function(){return 4},__class__:format_svg_CubicSegment});var format_svg_ArcSegment=function(e,t,s,i,a,r,_,n,o){this.x1=e;this.y1=t;format_svg_PathSegment.call(this,n,o);this.rx=s;this.ry=i;this.phi=a;this.fA=r;this.fS=_};$hxClasses["format.svg.ArcSegment"]=format_svg_ArcSegment;format_svg_ArcSegment.__name__=["format","svg","ArcSegment"];format_svg_ArcSegment.__super__=format_svg_PathSegment;format_svg_ArcSegment.prototype=$extend(format_svg_PathSegment.prototype,{x1:null,y1:null,rx:null,ry:null,phi:null,fA:null,fS:null,toGfx:function(e,t){if(this.x1==this.x&&this.y1==this.y){return}t.setLast(this.x,this.y);if(this.rx==0||this.ry==0){e.lineTo(t.lastX,t.lastY);return}if(this.rx<0){this.rx=-this.rx}if(this.ry<0){this.ry=-this.ry}var s=this.phi*Math.PI/180;var i=Math.cos(s);var a=Math.sin(s);var r=(this.x1-this.x)*.5;var _=(this.y1-this.y)*.5;var n=i*r+a*_;var o=-a*r+i*_;var l=this.rx*this.rx;var h=this.ry*this.ry;var c=n*n;var u=o*o;var f=(l*h-l*u-h*c)/(l*u+h*c);if(f<0){f=0}else if(this.fA==this.fS){f=-Math.sqrt(f)}else{f=Math.sqrt(f)}var p=f*this.rx*o/this.ry;var d=-f*this.ry*n/this.rx;var g=(this.x1+this.x)*.5;var m=(this.y1+this.y)*.5;var v=i*p-a*d+g;var b=a*p+i*d+m;var y=Math.atan2((o-d)/this.ry,(n-p)/this.rx);var x=Math.atan2((-o-d)/this.ry,(-n-p)/this.rx)-y;if(this.fS&&x<0){x+=2*Math.PI}else if(!this.fS&&x>0){x-=2*Math.PI}var P=t.matrix;var k;var w;var C;var T;var S;var M;if(P!=null){k=P.a*this.rx;w=P.c*this.ry;C=P.a*v+P.c*b+P.tx;T=P.b*this.rx;S=P.d*this.ry;M=P.b*v+P.d*b+P.ty}else{k=this.rx;w=0;C=v+P.tx;T=0;S=this.ry;M=b+P.ty}var $=Math.abs(x)*Math.sqrt(k*k+w*w+T*T+S*S);$*=5;var E=Math.round($);if(E>1){x/=E;var B=1;var L=E-1;while(Bthis.rect.x){if(e>this.rect.get_right()){e+=this.rectW-this.rect.width}else{e=this.rect.x+this.rectW*(e-this.rect.x)/this.rect.width}}return e*this.matrix.a+t*this.matrix.c+this.matrix.tx},transY:function(e,t){if(this.rect!=null&&t>this.rect.y){if(t>this.rect.get_right()){t+=this.rectH-this.rect.height}else{t=this.rect.y+this.rectH*(t-this.rect.y)/this.rect.height}}return e*this.matrix.b+t*this.matrix.d+this.matrix.ty},setLast:function(e,t){this.lastX=this.transX(e,t);this.lastY=this.transY(e,t)},matrix:null,rect:null,rectW:null,rectH:null,firstX:null,firstY:null,lastX:null,lastY:null,__class__:format_svg_RenderContext};var format_svg_SVGData=function(e,t){if(t==null){t=false}format_svg_Group.call(this);var s=e.firstElement();var i;if(s!=null){if(s.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+s.nodeType)}if(s.nodeName!="svg"){if(s.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+s.nodeType)}i=s.nodeName!="svg:svg"}else{i=false}}else{i=true}if(i){var a;if(s==null){a="null"}else{if(s.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+s.nodeType)}a=s.nodeName}throw new js__$Boot_HaxeError("Not an SVG file ("+a+")")}this.mGrads=new haxe_ds_StringMap;this.mPathParser=new format_svg_PathParser;this.mConvertCubics=t;this.width=this.getFloatStyle("width",s,null,0);this.height=this.getFloatStyle("height",s,null,0);if(this.width==0&&this.height==0){this.width=this.height=400}else if(this.width==0){this.width=this.height}else if(this.height==0){this.height=this.width}var r=new openfl_geom_Rectangle(0,0,this.width,this.height);if(s.exists("viewBox")){var _=s.get("viewBox");var n=_.indexOf(",")!=-1?_.split(","):_.split(" ");r=new openfl_geom_Rectangle(parseFloat(StringTools.trim(n[0])),parseFloat(StringTools.trim(n[1])),parseFloat(StringTools.trim(n[2])),parseFloat(StringTools.trim(n[3])))}this.loadGroup(this,s,new openfl_geom_Matrix(1,0,0,1,-r.x,-r.y),null)};$hxClasses["format.svg.SVGData"]=format_svg_SVGData;format_svg_SVGData.__name__=["format","svg","SVGData"];format_svg_SVGData.__super__=format_svg_Group;format_svg_SVGData.prototype=$extend(format_svg_Group.prototype,{height:null,width:null,mConvertCubics:null,mGrads:null,mPathParser:null,applyTransform:function(e,t){var s=1;if(format_svg_SVGData.mTranslateMatch.match(t)){e.translate(parseFloat(format_svg_SVGData.mTranslateMatch.matched(1)),parseFloat(format_svg_SVGData.mTranslateMatch.matched(2)))}else if(format_svg_SVGData.mScaleMatch.match(t)){var i=parseFloat(format_svg_SVGData.mScaleMatch.matched(1));e.scale(i,i);s=i}else if(format_svg_SVGData.mMatrixMatch.match(t)){var a=new openfl_geom_Matrix(parseFloat(format_svg_SVGData.mMatrixMatch.matched(1)),parseFloat(format_svg_SVGData.mMatrixMatch.matched(2)),parseFloat(format_svg_SVGData.mMatrixMatch.matched(3)),parseFloat(format_svg_SVGData.mMatrixMatch.matched(4)),parseFloat(format_svg_SVGData.mMatrixMatch.matched(5)),parseFloat(format_svg_SVGData.mMatrixMatch.matched(6)));a.concat(e);e.a=a.a;e.b=a.b;e.c=a.c;e.d=a.d;e.tx=a.tx;e.ty=a.ty;s=Math.sqrt(e.a*e.a+e.c*e.c)}else if(format_svg_SVGData.mRotationMatch.match(t)){var r=parseFloat(format_svg_SVGData.mRotationMatch.matched(1));var _=parseFloat(format_svg_SVGData.mRotationMatch.matched(2));if(isNaN(_)){_=0}var n=parseFloat(format_svg_SVGData.mRotationMatch.matched(3));if(isNaN(n)){n=0}var o=r*Math.PI/180;e.translate(-_,-n);e.rotate(o);e.translate(_,n)}return s},getColorStyle:function(e,t,s,i){var a=this.getStyle(e,t,s,"");if(a==""){return i}if(a.charAt(0)=="#"){var r=HxOverrides.substr(a,1,null);if(r.length==3){r=HxOverrides.substr(r,0,1)+HxOverrides.substr(r,0,1)+HxOverrides.substr(r,1,1)+HxOverrides.substr(r,1,1)+HxOverrides.substr(r,2,1)+HxOverrides.substr(r,2,1)}return Std.parseInt("0x"+r)}return Std.parseInt(a)},getFillStyle:function(e,t,s){var i=this.getStyle(e,t,s,"");if(i==""){return format_svg_SVGData.defaultFill}if(i.charAt(0)=="#"){var a=HxOverrides.substr(i,1,null);if(a.length==3){a=HxOverrides.substr(a,0,1)+HxOverrides.substr(a,0,1)+HxOverrides.substr(a,1,1)+HxOverrides.substr(a,1,1)+HxOverrides.substr(a,2,1)+HxOverrides.substr(a,2,1)}return format_svg_FillType.FillSolid(Std.parseInt("0x"+a))}if(format_svg_SVGData.mRGBMatch.match(i)){var r=format_svg_SVGData.mRGBMatch;var _=parseFloat(r.matched(1));if(r.matched(2)=="%"){_=_*255/100}var n=parseFloat(r.matched(3));if(r.matched(4)=="%"){n=n*255/100}var o=parseFloat(r.matched(5));if(r.matched(6)=="%"){o=o*255/100}var l=_;if(l<0){l=0}if(l>255){l=255}var h=n;if(h<0){h=0}if(h>255){h=255}var c=o;if(c<0){c=0}if(c>255){c=255}return format_svg_FillType.FillSolid((l|0)<<16|(h|0)<<8|(c|0))}if(i=="none"){return format_svg_FillType.FillNone}if(format_svg_SVGData.mURLMatch.match(i)){var u=format_svg_SVGData.mURLMatch.matched(1);var f=this.mGrads;if(__map_reserved[u]!=null?f.existsReserved(u):f.h.hasOwnProperty(u)){var p=this.mGrads;return format_svg_FillType.FillGrad(__map_reserved[u]!=null?p.getReserved(u):p.h[u])}throw new js__$Boot_HaxeError("Unknown url:"+u)}throw new js__$Boot_HaxeError("Unknown fill string:"+i)},getFloat:function(e,t,s){if(s==null){s=0}if(e.exists(t)){return parseFloat(e.get(t))}return s},getFloatStyle:function(e,t,s,i){var a=this.getStyle(e,t,s,"");if(a==""){return i}return parseFloat(a)},getStyleAndConvert:function(e,t,s,i,a){var r=this.getStyle(e,t,s,"");if(r==""||!(__map_reserved[r]!=null?a.existsReserved(r):a.h.hasOwnProperty(r))){return i}return __map_reserved[r]!=null?a.getReserved(r):a.h[r]},getStrokeStyle:function(e,t,s,i){var a=this.getStyle(e,t,s,"");if(a==""){return i}if(format_svg_SVGData.mRGBMatch.match(a)){var r=format_svg_SVGData.mRGBMatch;var _=parseFloat(r.matched(1));if(r.matched(2)=="%"){_=_*255/100}var n=parseFloat(r.matched(3));if(r.matched(4)=="%"){n=n*255/100}var o=parseFloat(r.matched(5));if(r.matched(6)=="%"){o=o*255/100}var l=_;if(l<0){l=0}if(l>255){l=255}var h=n;if(h<0){h=0}if(h>255){h=255}var c=o;if(c<0){c=0}if(c>255){c=255}return(l|0)<<16|(h|0)<<8|(c|0)}if(a=="none"){return null}if(a.charAt(0)=="#"){var u=HxOverrides.substr(a,1,null);if(u.length==3){u=HxOverrides.substr(u,0,1)+HxOverrides.substr(u,0,1)+HxOverrides.substr(u,1,1)+HxOverrides.substr(u,1,1)+HxOverrides.substr(u,2,1)+HxOverrides.substr(u,2,1)}return Std.parseInt("0x"+u)}return Std.parseInt(a)},getStyle:function(e,t,s,i){if(t!=null&&t.exists(e)){return t.get(e)}if(s!=null&&(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e))){return __map_reserved[e]!=null?s.getReserved(e):s.h[e]}return i},getStyles:function(e,t){if(!e.exists("style")){return t}var s=new haxe_ds_StringMap;if(t!=null){var i=t.keys();while(i.hasNext()){var a=i.next();var r=__map_reserved[a]!=null?t.getReserved(a):t.h[a];if(__map_reserved[a]!=null){s.setReserved(a,r)}else{s.h[a]=r}}}var _=e.get("style");var n=format_svg_SVGData.mStyleSplit.split(_);var o=0;while(o=0){this.bmaps[this.pos].set_visible(this.frames[this.pos].disposalMethod==1)}this.pos=(this.pos+1)%this.bmaps.length;if(this.pos==0){var e=1;var t=this.bmaps.length;while(e10){return this.frames[this.pos].delayTime*10}else{return 100}},timerTick:function(e){this.timer.stop();this.timer.set_delay(this.nextFrame());this.timer.start()},__class__:gif_AnimatedGif});var gif_bytes_Endian=$hxClasses["gif.bytes.Endian"]={__ename__:["gif","bytes","Endian"],__constructs__:["BigEndian","LittleEndian"]};gif_bytes_Endian.BigEndian=["BigEndian",0];gif_bytes_Endian.BigEndian.toString=$estr;gif_bytes_Endian.BigEndian.__enum__=gif_bytes_Endian;gif_bytes_Endian.LittleEndian=["LittleEndian",1];gif_bytes_Endian.LittleEndian.toString=$estr;gif_bytes_Endian.LittleEndian.__enum__=gif_bytes_Endian;var haxe_io_Input=function(){};$hxClasses["haxe.io.Input"]=haxe_io_Input;haxe_io_Input.__name__=["haxe","io","Input"];haxe_io_Input.prototype={bigEndian:null,readByte:function(){throw new js__$Boot_HaxeError("Not implemented")},readBytes:function(e,t,s){var i=s;var a=e.b;if(t<0||s<0||t+s>e.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}try{while(i>0){a[t]=this.readByte();++t;--i}}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,haxe_io_Eof)){}else throw e}return s-i},set_bigEndian:function(e){this.bigEndian=e;return e},readFullBytes:function(e,t,s){while(s>0){var i=this.readBytes(e,t,s);if(i==0){throw new js__$Boot_HaxeError(haxe_io_Error.Blocked)}t+=i;s-=i}},read:function(e){var t=new haxe_io_Bytes(new ArrayBuffer(e));var s=0;while(e>0){var i=this.readBytes(t,s,e);if(i==0){throw new js__$Boot_HaxeError(haxe_io_Error.Blocked)}s+=i;e-=i}return t},readInt16:function(){var e=this.readByte();var t=this.readByte();var s=this.bigEndian?t|e<<8:e|t<<8;if((s&32768)!=0){return s-65536}return s},readUInt16:function(){var e=this.readByte();var t=this.readByte();if(this.bigEndian){return t|e<<8}else{return e|t<<8}},readInt32:function(){var e=this.readByte();var t=this.readByte();var s=this.readByte();var i=this.readByte();if(this.bigEndian){return i|s<<8|t<<16|e<<24}else{return e|t<<8|s<<16|i<<24}},readString:function(e){var t=new haxe_io_Bytes(new ArrayBuffer(e));this.readFullBytes(t,0,e);return t.toString()},__class__:haxe_io_Input,__properties__:{set_bigEndian:"set_bigEndian"}};var haxe_io_BytesInput=function(e,t,s){if(t==null){t=0}if(s==null){s=e.length-t}if(t<0||s<0||t+s>e.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}this.b=e.b;this.pos=t;this.len=s;this.totlen=s};$hxClasses["haxe.io.BytesInput"]=haxe_io_BytesInput;haxe_io_BytesInput.__name__=["haxe","io","BytesInput"];haxe_io_BytesInput.__super__=haxe_io_Input;haxe_io_BytesInput.prototype=$extend(haxe_io_Input.prototype,{b:null,pos:null,len:null,totlen:null,readByte:function(){if(this.len==0){throw new js__$Boot_HaxeError(new haxe_io_Eof)}this.len--;return this.b[this.pos++]},readBytes:function(e,t,s){if(t<0||s<0||t+s>e.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}if(this.len==0&&s>0){throw new js__$Boot_HaxeError(new haxe_io_Eof)}if(this.len255){return 255}else{var s=e;if(s<0){return 0}else{return e}}};var gif_images_Error=$hxClasses["gif.images.Error"]={__ename__:["gif","images","Error"],__constructs__:["InvalidFormat","UnsupportedFormat"]};gif_images_Error.InvalidFormat=["InvalidFormat",0];gif_images_Error.InvalidFormat.toString=$estr;gif_images_Error.InvalidFormat.__enum__=gif_images_Error;gif_images_Error.UnsupportedFormat=["UnsupportedFormat",1];gif_images_Error.UnsupportedFormat.toString=$estr;gif_images_Error.UnsupportedFormat.__enum__=gif_images_Error;var gif_images_GifDecoder=function(){};$hxClasses["gif.images.GifDecoder"]=gif_images_GifDecoder;gif_images_GifDecoder.__name__=["gif","images","GifDecoder"];gif_images_GifDecoder.decode=function(e){var t=new gif_bytes_BytesInputWrapper(e,gif_bytes_Endian.LittleEndian);var s=new gif_images_GifInfo;gif_images_GifDecoder.readHeader(t,s);if(s.globalColorTableFlag){gif_images_GifDecoder.readGlobalColorTable(t,s)}var i=new gif_images_GifFrameInfo(s);try{while(true){var a=t.readByte();switch(a){case 33:var r=t.readByte();switch(r){case 249:gif_images_GifDecoder.readGraphicControlExtension(t,i);break;case 254:gif_images_GifDecoder.readComment(t,i);break;case 255:gif_images_GifDecoder.readApplicationExtension(t,i);break}break;case 44:gif_images_GifDecoder.readImageDescriptor(t,i);if(i.localColorTableFlag){gif_images_GifDecoder.readLocalColorTable(t,i)}gif_images_GifDecoder.readImageData(t,i);s.frameList.push(i);i=new gif_images_GifFrameInfo(s);break;case 59:throw"__break__";break;default:throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}}}catch(e){if(e!="__break__")throw e}return s};gif_images_GifDecoder.readHeader=function(e,t){gif_images_GifDecoder.validateSignature(e.read(3));gif_images_GifDecoder.readVersion(e.read(3),t);t.logicalScreenWidth=e.readInt16();t.logicalScreenHeight=e.readInt16();var s=e.readByte();t.globalColorTableFlag=(s&128)==128;t.colorResolution=(s&112)>>4;t.sortFlag=(s&8)==8;t.sizeOfGlobalTable=s&7;t.backgroundColorIndex=e.readByte();t.pixelAspectRaito=e.readByte()};gif_images_GifDecoder.validateSignature=function(e){if(e.toString()!="GIF"){throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}};gif_images_GifDecoder.readVersion=function(e,t){var s=e.toString();switch(s){case"87a":t.version=gif_images_Version.Gif87a;throw new js__$Boot_HaxeError(gif_images_Error.UnsupportedFormat);break;case"89a":t.version=gif_images_Version.Gif89a;break;default:throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}};gif_images_GifDecoder.readGlobalColorTable=function(e,t){var s=1<>2;t.userInputFlag=(i&2)==2;t.transparentColorFlag=(i&1)==1;t.delayTime=e.readInt16();t.transparentColorIndex=e.readByte();var a=e.readByte();if(a!=0){throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}};gif_images_GifDecoder.readComment=function(e,t){var s;while(true){s=e.readByte()&255;if(s>0){e.read(s)}if(!(s>0)){break}}};gif_images_GifDecoder.readApplicationExtension=function(e,t){var s=e.readByte();if(s!=11){throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}var i=e.readInt32();var a=e.readInt32();var r=e.readByte();var _=e.readByte();var n=e.readByte();if(i==1346454355&&a==808333893&&r==50&&_==46&&n==48){var o=e.readByte();if(o==3){e.readByte();t.parent.animationLoopCount=e.readInt16()}else{throw new js__$Boot_HaxeError(gif_images_Error.UnsupportedFormat)}var l=e.readByte();if(l!=0){throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}}else{var h;while(true){h=e.readByte()&255;if(h>0){e.read(h)}if(!(h>0)){break}}}};gif_images_GifDecoder.readImageDescriptor=function(e,t){t.imageLeftPosition=e.readInt16();t.imageTopPosition=e.readInt16();t.imageWidth=e.readInt16();t.imageHeight=e.readInt16();var s=e.readByte();t.localColorTableFlag=(s&128)==128;t.interlaceFlag=(s&64)==64;t.sortFlag=(s&32)==32;t.sizeOfLocalColorTable=s&7};gif_images_GifDecoder.readLocalColorTable=function(e,t){var s=1<0){try{var a=0;while(i>=o;u-=o;if(f>r||f==l){break}if(f==_){o=m+1;n=(1<_){M[b++]=T[f];f=w[f]}v=T[f]&255;if(r>=i){break}M[b++]=v;w[r]=c;T[r]=v;++r;if((r&n)==0&&r=0){var o=HxOverrides.substr(_,0,n);var l=HxOverrides.substr(_,n+1,null);r=haxe_StackItem.Method(o,l)}}s.push(haxe_StackItem.FilePos(r,a.getFileName(),a.getLineNumber()))}return s};var s=haxe_CallStack.makeStack(e.stack);Error.prepareStackTrace=t;return s};haxe_CallStack.callStack=function(){try{throw new Error}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;var t=haxe_CallStack.getStack(e);t.shift();return t}};haxe_CallStack.exceptionStack=function(){return haxe_CallStack.getStack(haxe_CallStack.lastException)};haxe_CallStack.toString=function(e){var t=new StringBuf;var s=0;while(s0){if(_==1){this.buf.b+="n"}else{this.buf.b+="u";this.buf.b+=_==null?"null":""+_}_=0}this.serialize(e[h])}}if(_>0){if(_==1){this.buf.b+="n"}else{this.buf.b+="u";this.buf.b+=_==null?"null":""+_}}this.buf.b+="h";break;case Date:var c=e;this.buf.b+="v";this.buf.b+=Std.string(c.getTime());break;case List:this.buf.b+="l";var u=e;var f=u.h;while(f!=null){var p=f.item;f=f.next;var d=p;this.serialize(d)}this.buf.b+="h";break;case haxe_ds_IntMap:this.buf.b+="q";var g=e;var m=g.keys();while(m.hasNext()){var v=m.next();this.buf.b+=":";this.buf.b+=v==null?"null":""+v;this.serialize(g.h[v])}this.buf.b+="h";break;case haxe_ds_ObjectMap:this.buf.b+="M";var b=e;var y=b.keys();while(y.hasNext()){var x=y.next();var P=Reflect.field(x,"__id__");Reflect.deleteField(x,"__id__");this.serialize(x);x["__id__"]=P;this.serialize(b.h[x.__id__])}this.buf.b+="h";break;case haxe_ds_StringMap:this.buf.b+="b";var k=e;var w=k.keys();while(w.hasNext()){var C=w.next();this.serializeString(C);this.serialize(__map_reserved[C]!=null?k.getReserved(C):k.h[C])}this.buf.b+="h";break;case haxe_io_Bytes:var T=e;this.buf.b+="s";this.buf.b+=Std.string(Math.ceil(T.length*8/6));this.buf.b+=":";var S=0;var M=T.length-2;var $=haxe_Serializer.BASE64_CODES;if($==null){var E=haxe_Serializer.BASE64.length;var B=new Array(E);$=B;var L=0;var R=haxe_Serializer.BASE64.length;while(L>2]);this.buf.b+=String.fromCharCode($[(I<<4|D>>4)&63]);this.buf.b+=String.fromCharCode($[(D<<2|F>>6)&63]);this.buf.b+=String.fromCharCode($[F&63])}if(S==M){var O=T.b[S++];var G=T.b[S++];this.buf.b+=String.fromCharCode($[O>>2]);this.buf.b+=String.fromCharCode($[(O<<4|G>>4)&63]);this.buf.b+=String.fromCharCode($[G<<2&63])}else if(S==M+1){var j=T.b[S++];this.buf.b+=String.fromCharCode($[j>>2]);this.buf.b+=String.fromCharCode($[j<<4&63])}break;default:if(this.useCache){this.cache.pop()}if(e.hxSerialize!=null){this.buf.b+="C";this.serializeString(Type.getClassName(r));if(this.useCache){this.cache.push(e)}e.hxSerialize(this);this.buf.b+="g"}else{this.buf.b+="c";this.serializeString(Type.getClassName(r));if(this.useCache){this.cache.push(e)}this.serializeFields(e)}}break;case 7:var H=t[2];if(this.useCache){if(this.serializeRef(e)){return}this.cache.pop()}this.buf.b+=Std.string(this.useEnumIndex?"j":"w");this.serializeString(Type.getEnumName(H));if(this.useEnumIndex){this.buf.b+=":";this.buf.b+=Std.string(e[1])}else{this.serializeString(e[0])}this.buf.b+=":";var U=e["length"];this.buf.b+=Std.string(U-2);var N=2;var V=U;while(N57){break}e=e*10+(i-48);this.pos++}if(t){e*=-1}return e},readFloat:function(){var e=this.pos;while(true){var t=this.buf.charCodeAt(this.pos);if(t!=t){break}if(t>=43&&t<58||t==101||t==69){this.pos++}else{break}}return parseFloat(HxOverrides.substr(this.buf,e,this.pos-e))},unserializeObject:function(e){while(true){if(this.pos>=this.length){throw new js__$Boot_HaxeError("Invalid object")}if(this.buf.charCodeAt(this.pos)==103){break}var t=this.unserialize();if(typeof t!="string"){throw new js__$Boot_HaxeError("Invalid object key")}var s=this.unserialize();e[t]=s}this.pos++},unserializeEnum:function(e,t){if(this.buf.charCodeAt(this.pos++)!=58){throw new js__$Boot_HaxeError("Invalid enum format")}var s=this.readDigits();if(s==0){return Type.createEnum(e,t)}var i=[];while(s-- >0)i.push(this.unserialize());return Type.createEnum(e,t,i)},unserialize:function(){var e=this.buf.charCodeAt(this.pos++);switch(e){case 65:var t=this.unserialize();var s=this.resolver.resolveClass(t);if(s==null){throw new js__$Boot_HaxeError("Class not found "+t)}return s;case 66:var i=this.unserialize();var a=this.resolver.resolveEnum(i);if(a==null){throw new js__$Boot_HaxeError("Enum not found "+i)}return a;case 67:var r=this.unserialize();var _=this.resolver.resolveClass(r);if(_==null){throw new js__$Boot_HaxeError("Class not found "+r)}var n=Type.createEmptyInstance(_);this.cache.push(n);n.hxUnserialize(this);if(this.buf.charCodeAt(this.pos++)!=103){throw new js__$Boot_HaxeError("Invalid custom data")}return n;case 77:var o=new haxe_ds_ObjectMap;this.cache.push(o);var l=this.buf;while(this.buf.charCodeAt(this.pos)!=104){var h=this.unserialize();o.set(h,this.unserialize())}this.pos++;return o;case 82:var c=this.readDigits();if(c<0||c>=this.scache.length){throw new js__$Boot_HaxeError("Invalid string reference")}return this.scache[c];case 97:var u=this.buf;var f=[];this.cache.push(f);while(true){var p=this.buf.charCodeAt(this.pos);if(p==104){this.pos++;break}if(p==117){this.pos++;var d=this.readDigits();f[f.length+d-1]=null}else{f.push(this.unserialize())}}return f;case 98:var g=new haxe_ds_StringMap;this.cache.push(g);var m=this.buf;while(this.buf.charCodeAt(this.pos)!=104){var v=this.unserialize();var b=this.unserialize();if(__map_reserved[v]!=null){g.setReserved(v,b)}else{g.h[v]=b}}this.pos++;return g;case 99:var y=this.unserialize();var x=this.resolver.resolveClass(y);if(x==null){throw new js__$Boot_HaxeError("Class not found "+y)}var P=Type.createEmptyInstance(x);this.cache.push(P);this.unserializeObject(P);return P;case 100:return this.readFloat();case 102:return false;case 105:return this.readDigits();case 106:var k=this.unserialize();var w=this.resolver.resolveEnum(k);if(w==null){throw new js__$Boot_HaxeError("Enum not found "+k)}this.pos++;var C=this.readDigits();var T=w.__constructs__.slice()[C];if(T==null){throw new js__$Boot_HaxeError("Unknown enum index "+k+"@"+C)}var S=this.unserializeEnum(w,T);this.cache.push(S);return S;case 107:return NaN;case 108:var M=new List;this.cache.push(M);var $=this.buf;while(this.buf.charCodeAt(this.pos)!=104)M.add(this.unserialize());this.pos++;return M;case 109:return-Infinity;case 110:return null;case 111:var E={};this.cache.push(E);this.unserializeObject(E);return E;case 112:return Infinity;case 113:var B=new haxe_ds_IntMap;this.cache.push(B);var L=this.buf;var R=this.buf.charCodeAt(this.pos++);while(R==58){var A=this.readDigits();var I=this.unserialize();B.h[A]=I;R=this.buf.charCodeAt(this.pos++)}if(R!=104){throw new js__$Boot_HaxeError("Invalid IntMap format")}return B;case 114:var D=this.readDigits();if(D<0||D>=this.cache.length){throw new js__$Boot_HaxeError("Invalid reference")}return this.cache[D];case 115:var F=this.readDigits();var O=this.buf;if(this.buf.charCodeAt(this.pos++)!=58||this.length-this.pos>2)*3+(H>=2?H-1:0);var N=j+(F-H);var V=new haxe_io_Bytes(new ArrayBuffer(U));var W=0;while(j>4)&255;var Y=G[O.charCodeAt(j++)];V.b[W++]=(X<<4|Y>>2)&255;var q=G[O.charCodeAt(j++)];V.b[W++]=(Y<<6|q)&255}if(H>=2){var K=G[O.charCodeAt(j++)];var J=G[O.charCodeAt(j++)];V.b[W++]=(K<<2|J>>4)&255;if(H==3){var Z=G[O.charCodeAt(j++)];V.b[W++]=(J<<4|Z>>2)&255}}this.pos+=F;this.cache.push(V);return V;case 116:return true;case 118:var Q;if(this.buf.charCodeAt(this.pos)>=48&&this.buf.charCodeAt(this.pos)<=57&&this.buf.charCodeAt(this.pos+1)>=48&&this.buf.charCodeAt(this.pos+1)<=57&&this.buf.charCodeAt(this.pos+2)>=48&&this.buf.charCodeAt(this.pos+2)<=57&&this.buf.charCodeAt(this.pos+3)>=48&&this.buf.charCodeAt(this.pos+3)<=57&&this.buf.charCodeAt(this.pos+4)==45){Q=HxOverrides.strDate(HxOverrides.substr(this.buf,this.pos,19));this.pos+=19}else{var ee=this.readFloat();Q=new Date(ee)}this.cache.push(Q);return Q;case 119:var te=this.unserialize();var se=this.resolver.resolveEnum(te);if(se==null){throw new js__$Boot_HaxeError("Enum not found "+te)}var ie=this.unserializeEnum(se,this.unserialize());this.cache.push(ie);return ie;case 120:throw js__$Boot_HaxeError.wrap(this.unserialize());break;case 121:var ae=this.readDigits();if(this.buf.charCodeAt(this.pos++)!=58||this.length-this.pos>6);s.push(128|a&63)}else if(a<=65535){s.push(224|a>>12);s.push(128|a>>6&63);s.push(128|a&63)}else{s.push(240|a>>18);s.push(128|a>>12&63);s.push(128|a>>6&63);s.push(128|a&63)}}return new haxe_io_Bytes(new Uint8Array(s).buffer)};haxe_io_Bytes.ofData=function(e){var t=e.hxBytes;if(t!=null){return t}return new haxe_io_Bytes(e)};haxe_io_Bytes.fastGet=function(e,t){return e.bytes[t]};haxe_io_Bytes.prototype={length:null,b:null,data:null,blit:function(e,t,s,i){if(e<0||s<0||i<0||e+i>this.length||s+i>t.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}if(s==0&&i==t.b.byteLength){this.b.set(t.b,e)}else{this.b.set(t.b.subarray(s,s+i),e)}},getString:function(e,t,s){if(e<0||t<0||e+t>this.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}var i="";var a=this.b;var r=String.fromCharCode;var _=e;var n=e+t;while(_>10)+55232);i+=r(u&1023|56320)}}return i},toString:function(){return this.getString(0,this.length)},__class__:haxe_io_Bytes};var haxe_crypto_Base64=function(){};$hxClasses["haxe.crypto.Base64"]=haxe_crypto_Base64;haxe_crypto_Base64.__name__=["haxe","crypto","Base64"];haxe_crypto_Base64.encode=function(e,t){if(t==null){t=true}var s=new haxe_crypto_BaseCode(haxe_crypto_Base64.BYTES).encodeBytes(e).toString();if(t){var i=e.length%3;switch(i){case 1:s+="==";break;case 2:s+="=";break;default:}}return s};haxe_crypto_Base64.decode=function(e,t){if(t==null){t=true}if(t){while(HxOverrides.cca(e,e.length-1)==61)e=HxOverrides.substr(e,0,-1)}return new haxe_crypto_BaseCode(haxe_crypto_Base64.BYTES).decodeBytes(haxe_io_Bytes.ofString(e))};var haxe_crypto_BaseCode=function(e){var t=e.length;var s=1;while(t>1<8||t!=1<>_&n]&255}if(_>0){a.b[l++]=s.b[r<>3;var r=new haxe_io_Bytes(new ArrayBuffer(a));var _=0;var n=0;var o=0;var l=0;while(l>n&255&255}return r},__class__:haxe_crypto_BaseCode};var haxe_ds_ArraySort=function(){};$hxClasses["haxe.ds.ArraySort"]=haxe_ds_ArraySort;haxe_ds_ArraySort.__name__=["haxe","ds","ArraySort"];haxe_ds_ArraySort.sort=function(e,t){haxe_ds_ArraySort.rec(e,t,0,e.length)};haxe_ds_ArraySort.rec=function(e,t,s,i){var a=s+i>>1;if(i-s<12){if(i<=s){return}var r=s+1;var _=i;while(r<_){var n=r++;var o=n;while(o>s){if(t(e[o],e[o-1])<0){haxe_ds_ArraySort.swap(e,o-1,o)}else{break}--o}}return}haxe_ds_ArraySort.rec(e,t,s,a);haxe_ds_ArraySort.rec(e,t,a,i);haxe_ds_ArraySort.doMerge(e,t,s,a,i,a-s,i-a)};haxe_ds_ArraySort.doMerge=function(e,t,s,i,a,r,_){var n;var o;var l;var h;var c;if(r==0||_==0){return}if(r+_==2){if(t(e[i],e[s])<0){haxe_ds_ArraySort.swap(e,i,s)}return}if(r>_){l=r>>1;n=s+l;o=haxe_ds_ArraySort.lower(e,t,i,a,n);h=o-i}else{h=_>>1;o=i+h;n=haxe_ds_ArraySort.upper(e,t,s,i,o);l=n-s}haxe_ds_ArraySort.rotate(e,t,n,i,o);c=n+h;haxe_ds_ArraySort.doMerge(e,t,s,n,c,l,h);haxe_ds_ArraySort.doMerge(e,t,c,o,a,r-l,_-h)};haxe_ds_ArraySort.rotate=function(e,t,s,i,a){var r;if(s==i||i==a){return}r=haxe_ds_ArraySort.gcd(a-s,i-s);while(r--!=0){var _=e[s+r];var n=i-s;var o=s+r;var l=s+r+n;while(l!=s+r){e[o]=e[l];o=l;if(a-l>n){l+=n}else{l=s+(n-(a-l))}}e[o]=_}};haxe_ds_ArraySort.gcd=function(e,t){while(t!=0){var s=e%t;e=t;t=s}return e};haxe_ds_ArraySort.upper=function(e,t,s,i,a){var r=i-s;var _;var n;while(r>0){_=r>>1;n=s+_;if(t(e[a],e[n])<0){r=_}else{s=n+1;r=r-_-1}}return s};haxe_ds_ArraySort.lower=function(e,t,s,i,a){var r=i-s;var _;var n;while(r>0){_=r>>1;n=s+_;if(t(e[n],e[a])<0){s=n+1;r=r-_-1}else{r=_}}return s};haxe_ds_ArraySort.swap=function(e,t,s){var i=e[t];e[t]=e[s];e[s]=i};var haxe_ds_IntMap=function(){this.h={}};$hxClasses["haxe.ds.IntMap"]=haxe_ds_IntMap;haxe_ds_IntMap.__name__=["haxe","ds","IntMap"];haxe_ds_IntMap.__interfaces__=[haxe_IMap];haxe_ds_IntMap.prototype={h:null,set:function(e,t){this.h[e]=t},get:function(e){return this.h[e]},exists:function(e){return this.h.hasOwnProperty(e)},remove:function(e){if(!this.h.hasOwnProperty(e)){return false}delete this.h[e];return true},keys:function(){var e=[];for(var t in this.h)if(this.h.hasOwnProperty(t)){e.push(t|0)}return HxOverrides.iter(e)},iterator:function(){return{ref:this.h,it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){var e=this.it.next();return this.ref[e]}}},__class__:haxe_ds_IntMap};var haxe_ds__$StringMap_StringMapIterator=function(e,t){this.map=e;this.keys=t;this.index=0;this.count=t.length};$hxClasses["haxe.ds._StringMap.StringMapIterator"]=haxe_ds__$StringMap_StringMapIterator;haxe_ds__$StringMap_StringMapIterator.__name__=["haxe","ds","_StringMap","StringMapIterator"];haxe_ds__$StringMap_StringMapIterator.prototype={map:null,keys:null,index:null,count:null,hasNext:function(){return this.index>>31<<1);var s=e>>>23&255;var i=e&8388607;if(i==0&&s==0){return 0}return t*(1+Math.pow(2,-23)*i)*Math.pow(2,s-127)};haxe_io_FPHelper.floatToI32=function(e){if(e==0){return 0}var t=e<0?-e:e;var s=Math.floor(Math.log(t)/.6931471805599453);if(s<-127){s=-127}else if(s>128){s=128}var i=Math.round((t/Math.pow(2,s)-1)*8388608);if(i==8388608&&s<128){i=0;++s}return(e<0?-2147483648:0)|s+127<<23|i};haxe_io_FPHelper.i64ToDouble=function(e,t){var s=1-(t>>>31<<1);var i=(t>>20&2047)-1023;var a=(t&1048575)*4294967296+(e>>>31)*2147483648+(e&2147483647);if(a==0&&i==-1023){return 0}return s*(1+Math.pow(2,-52)*a)*Math.pow(2,i)};haxe_io_FPHelper.doubleToI64=function(e){var t=haxe_io_FPHelper.i64tmp;if(e==0){t.low=0;t.high=0}else if(!isFinite(e)){if(e>0){t.low=0;t.high=2146435072}else{t.low=0;t.high=-1048576}}else{var s=e<0?-e:e;var i=Math.floor(Math.log(s)/.6931471805599453);var a=Math.round((s/Math.pow(2,i)-1)*4503599627370496);var r=a|0;var _=a/4294967296|0;t.low=r;t.high=(e<0?-2147483648:0)|i+1023<<20|_}return t};var haxe_io_Path=function(e){switch(e){case".":case"..":this.dir=e;this.file="";return}var t=e.lastIndexOf("/");var s=e.lastIndexOf("\\");if(t=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c==58||c==46||c==95||c==45)){if(s==o){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected node name",e,s))}a=Xml.createElement(HxOverrides.substr(e,o,s-o));i.addChild(a);++l;r=0;_=4;continue}break;case 4:switch(c){case 47:r=11;break;case 62:r=9;break;default:r=5;o=s;continue}break;case 5:if(!(c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c==58||c==46||c==95||c==45)){var d;if(o==s){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected attribute name",e,s))}d=HxOverrides.substr(e,o,s-o);n=d;if(a.exists(n)){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Duplicate attribute ["+n+"]",e,s))}r=0;_=6;continue}break;case 6:if(c==61){r=0;_=7}else{throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected =",e,s))}break;case 7:switch(c){case 34:case 39:u=new StringBuf;r=8;o=s+1;p=c;break;default:throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException('Expected "',e,s))}break;case 8:switch(c){case 38:var g=s-o;u.b+=g==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,g);r=18;f=8;o=s+1;break;case 60:case 62:if(t){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Invalid unescaped "+String.fromCharCode(c)+" in attribute value",e,s))}else if(c==p){var m=s-o;u.b+=m==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,m);var v=u.b;u=new StringBuf;a.set(n,v);r=0;_=4}break;default:if(c==p){var b=s-o;u.b+=b==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,b);var y=u.b;u=new StringBuf;a.set(n,y);r=0;_=4}}break;case 9:s=haxe_xml_Parser.doParse(e,t,s,a);o=s;r=1;break;case 10:if(!(c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c==58||c==46||c==95||c==45)){if(o==s){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected node name",e,s))}var x=HxOverrides.substr(e,o,s-o);if(i.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+i.nodeType)}if(x!=i.nodeName){if(i.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+i.nodeType)}throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected ",e,s))}r=0;_=12;continue}break;case 11:if(c==62){r=1}else{throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected >",e,s))}break;case 12:if(c==62){if(l==0){i.addChild(Xml.createPCData(""))}return s}else{throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected >",e,s))}break;case 13:if(c==60){var P=s-o;u.b+=P==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,P);var k=Xml.createPCData(u.b);u=new StringBuf;i.addChild(k);++l;r=0;_=2}else if(c==38){var w=s-o;u.b+=w==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,w);r=18;f=13;o=s+1}break;case 14:if(c==63&&e.charCodeAt(s+1)==62){++s;var C=HxOverrides.substr(e,o+1,s-o-2);i.addChild(Xml.createProcessingInstruction(C));++l;r=1}break;case 15:if(c==45&&e.charCodeAt(s+1)==45&&e.charCodeAt(s+2)==62){i.addChild(Xml.createComment(HxOverrides.substr(e,o,s-o)));++l;s+=2;r=1}break;case 16:if(c==91){++h}else if(c==93){--h}else if(c==62&&h==0){i.addChild(Xml.createDocType(HxOverrides.substr(e,o,s-o)));++l;r=1}break;case 17:if(c==93&&e.charCodeAt(s+1)==93&&e.charCodeAt(s+2)==62){var T=Xml.createCData(HxOverrides.substr(e,o,s-o));i.addChild(T);++l;s+=2;r=1}break;case 18:if(c==59){var S=HxOverrides.substr(e,o,s-o);if(S.charCodeAt(0)==35){var M=S.charCodeAt(1)==120?Std.parseInt("0"+HxOverrides.substr(S,1,S.length-1)):Std.parseInt(HxOverrides.substr(S,1,S.length-1));u.b+=String.fromCharCode(M)}else{var $=haxe_xml_Parser.escapes;if(!(__map_reserved[S]!=null?$.existsReserved(S):$.h.hasOwnProperty(S))){if(t){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Undefined entity: "+S,e,s))}u.b+=Std.string("&"+S+";")}else{var E=haxe_xml_Parser.escapes;var B=__map_reserved[S]!=null?E.getReserved(S):E.h[S];u.b+=Std.string(B)}}o=s+1;r=f}else if(!(c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c==58||c==46||c==95||c==45)&&c!=35){if(t){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Invalid character in entity: "+String.fromCharCode(c),e,s))}u.b+="&";var L=s-o;u.b+=L==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,L);o=s--;r=f}break}c=e.charCodeAt(++s)}if(r==1){o=s;r=13}if(r==13){if(s!=o||l==0){var R=s-o;u.b+=R==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,R);i.addChild(Xml.createPCData(u.b));++l}return s}if(!t&&r==18&&f==13){u.b+="&";var A=s-o;u.b+=A==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,A);i.addChild(Xml.createPCData(u.b));++l;return s}throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Unexpected end",e,s))};var haxe_xml_Printer=function(e){this.output=new StringBuf;this.pretty=e};$hxClasses["haxe.xml.Printer"]=haxe_xml_Printer;haxe_xml_Printer.__name__=["haxe","xml","Printer"];haxe_xml_Printer.print=function(e,t){if(t==null){t=false}var s=new haxe_xml_Printer(t);s.writeNode(e,"");return s.output.b};haxe_xml_Printer.prototype={output:null,pretty:null,writeNode:function(e,t){var s=e.nodeType;switch(s){case 0:this.output.b+=Std.string(t+"<");if(e.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+e.nodeType)}this.output.b+=Std.string(e.nodeName);var i=e.attributes();while(i.hasNext()){var a=i.next();this.output.b+=Std.string(" "+a+'="');var r=StringTools.htmlEscape(e.get(a),true);this.output.b+=Std.string(r);this.output.b+='"'}if(this.hasChildren(e)){this.output.b+=">";if(this.pretty){this.output.b+="\n"}if(e.nodeType!=Xml.Document&&e.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found "+e.nodeType)}var _=HxOverrides.iter(e.children);while(_.hasNext()){var n=_.next();this.writeNode(n,this.pretty?t+"\t":t)}this.output.b+=Std.string(t+"";if(this.pretty){this.output.b+="\n"}}else{this.output.b+="/>";if(this.pretty){this.output.b+="\n"}}break;case 1:if(e.nodeType==Xml.Document||e.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+e.nodeType)}var o=e.nodeValue;if(o.length!=0){var l=t+StringTools.htmlEscape(o);this.output.b+=Std.string(l);if(this.pretty){this.output.b+="\n"}}break;case 2:this.output.b+=Std.string(t+"";if(this.pretty){this.output.b+="\n"}break;case 3:if(e.nodeType==Xml.Document||e.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+e.nodeType)}var c=e.nodeValue;var u=new RegExp("[\n\r\t]+","g".split("u").join(""));c=c.replace(u,"");c="\x3c!--"+c+"--\x3e";this.output.b+=t==null?"null":""+t;var f=StringTools.trim(c);this.output.b+=Std.string(f);if(this.pretty){this.output.b+="\n"}break;case 4:if(e.nodeType==Xml.Document||e.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+e.nodeType)}this.output.b+=Std.string("");if(this.pretty){this.output.b+="\n"}break;case 5:if(e.nodeType==Xml.Document||e.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+e.nodeType)}this.output.b+=Std.string("");if(this.pretty){this.output.b+="\n"}break;case 6:if(e.nodeType!=Xml.Document&&e.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found "+e.nodeType)}var p=HxOverrides.iter(e.children);while(p.hasNext()){var d=p.next();this.writeNode(d,t)}break}},hasChildren:function(e){if(e.nodeType!=Xml.Document&&e.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found "+e.nodeType)}var t=HxOverrides.iter(e.children);while(t.hasNext()){var s=t.next();var i=s.nodeType;switch(i){case 0:case 1:return true;case 2:case 3:if(s.nodeType==Xml.Document||s.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+s.nodeType)}if(StringTools.ltrim(s.nodeValue).length!=0){return true}break;default:}}return false},__class__:haxe_xml_Printer};var haxe_zip_ExtraField=$hxClasses["haxe.zip.ExtraField"]={__ename__:["haxe","zip","ExtraField"],__constructs__:["FUnknown","FInfoZipUnicodePath","FUtf8"]};haxe_zip_ExtraField.FUnknown=function(e,t){var s=["FUnknown",0,e,t];s.__enum__=haxe_zip_ExtraField;s.toString=$estr;return s};haxe_zip_ExtraField.FInfoZipUnicodePath=function(e,t){var s=["FInfoZipUnicodePath",1,e,t];s.__enum__=haxe_zip_ExtraField;s.toString=$estr;return s};haxe_zip_ExtraField.FUtf8=["FUtf8",2];haxe_zip_ExtraField.FUtf8.toString=$estr;haxe_zip_ExtraField.FUtf8.__enum__=haxe_zip_ExtraField;var haxe_zip_Huffman=$hxClasses["haxe.zip.Huffman"]={__ename__:["haxe","zip","Huffman"],__constructs__:["Found","NeedBit","NeedBits"]};haxe_zip_Huffman.Found=function(e){var t=["Found",0,e];t.__enum__=haxe_zip_Huffman;t.toString=$estr;return t};haxe_zip_Huffman.NeedBit=function(e,t){var s=["NeedBit",1,e,t];s.__enum__=haxe_zip_Huffman;s.toString=$estr;return s};haxe_zip_Huffman.NeedBits=function(e,t){var s=["NeedBits",2,e,t];s.__enum__=haxe_zip_Huffman;s.toString=$estr;return s};var haxe_zip_HuffTools=function(){};$hxClasses["haxe.zip.HuffTools"]=haxe_zip_HuffTools;haxe_zip_HuffTools.__name__=["haxe","zip","HuffTools"];haxe_zip_HuffTools.prototype={treeDepth:function(e){switch(e[1]){case 0:return 0;case 1:var t=e[3];var s=e[2];var i=this.treeDepth(s);var a=this.treeDepth(t);return 1+(i0){this.treeWalk(e,t,s+1,i-1,_);this.treeWalk(e,t|1<t){throw new js__$Boot_HaxeError("Invalid huffman")}var a=s<<5|i;if(e.h.hasOwnProperty(a)){return haxe_zip_Huffman.Found(e.h[a])}s<<=1;++i;return haxe_zip_Huffman.NeedBit(this.treeMake(e,t,s,i),this.treeMake(e,t,s|1,i))},make:function(e,t,s,i){var a=[];var r=[];if(i>32){throw new js__$Boot_HaxeError("Invalid huffman")}var _=0;var n=i;while(_=i){throw new js__$Boot_HaxeError("Invalid huffman")}a[u]++}var f=0;var p=1;var d=i-1;while(p65536){this.slide()}this.buffer.blit(this.pos,e,t,s);this.pos+=s},addByte:function(e){if(this.pos==65536){this.slide()}this.buffer.b[this.pos]=e&255;this.pos++},getLastChar:function(){return this.buffer.b[this.pos-1]},available:function(){return this.pos},checksum:function(){if(this.crc!=null){this.crc.update(this.buffer,0,this.pos)}return this.crc},__class__:haxe_zip__$InflateImpl_Window};var haxe_zip__$InflateImpl_State=$hxClasses["haxe.zip._InflateImpl.State"]={__ename__:["haxe","zip","_InflateImpl","State"],__constructs__:["Head","Block","CData","Flat","Crc","Dist","DistOne","Done"]};haxe_zip__$InflateImpl_State.Head=["Head",0];haxe_zip__$InflateImpl_State.Head.toString=$estr;haxe_zip__$InflateImpl_State.Head.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.Block=["Block",1];haxe_zip__$InflateImpl_State.Block.toString=$estr;haxe_zip__$InflateImpl_State.Block.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.CData=["CData",2];haxe_zip__$InflateImpl_State.CData.toString=$estr;haxe_zip__$InflateImpl_State.CData.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.Flat=["Flat",3];haxe_zip__$InflateImpl_State.Flat.toString=$estr;haxe_zip__$InflateImpl_State.Flat.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.Crc=["Crc",4];haxe_zip__$InflateImpl_State.Crc.toString=$estr;haxe_zip__$InflateImpl_State.Crc.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.Dist=["Dist",5];haxe_zip__$InflateImpl_State.Dist.toString=$estr;haxe_zip__$InflateImpl_State.Dist.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.DistOne=["DistOne",6];haxe_zip__$InflateImpl_State.DistOne.toString=$estr;haxe_zip__$InflateImpl_State.DistOne.__enum__=haxe_zip__$InflateImpl_State;haxe_zip__$InflateImpl_State.Done=["Done",7];haxe_zip__$InflateImpl_State.Done.toString=$estr;haxe_zip__$InflateImpl_State.Done.__enum__=haxe_zip__$InflateImpl_State;var haxe_zip_InflateImpl=function(e,t,s){if(s==null){s=true}if(t==null){t=true}this["final"]=false;this.htools=new haxe_zip_HuffTools;this.huffman=this.buildFixedHuffman();this.huffdist=null;this.len=0;this.dist=0;this.state=t?haxe_zip__$InflateImpl_State.Head:haxe_zip__$InflateImpl_State.Block;this.input=e;this.bits=0;this.nbits=0;this.needed=0;this.output=null;this.outpos=0;this.lengths=[];var i=0;while(i<19){var a=i++;this.lengths.push(-1)}this.window=new haxe_zip__$InflateImpl_Window(s)};$hxClasses["haxe.zip.InflateImpl"]=haxe_zip_InflateImpl;haxe_zip_InflateImpl.__name__=["haxe","zip","InflateImpl"];haxe_zip_InflateImpl.prototype={nbits:null,bits:null,state:null,final:null,huffman:null,huffdist:null,htools:null,len:null,dist:null,needed:null,output:null,outpos:null,input:null,lengths:null,window:null,buildFixedHuffman:function(){if(haxe_zip_InflateImpl.FIXED_HUFFMAN!=null){return haxe_zip_InflateImpl.FIXED_HUFFMAN}var e=[];var t=0;while(t<288){var s=t++;e.push(s<=143?8:s<=255?9:s<=279?7:8)}haxe_zip_InflateImpl.FIXED_HUFFMAN=this.htools.make(e,0,288,10);return haxe_zip_InflateImpl.FIXED_HUFFMAN},readBytes:function(e,t,s){this.needed=s;this.outpos=t;this.output=e;if(s>0){while(this.inflateLoop()){}}return s-this.needed},getBits:function(e){while(this.nbits>=e;return t},getBit:function(){if(this.nbits==0){this.nbits=8;this.bits=this.input.readByte()}var e=(this.bits&1)==1;this.nbits--;this.bits>>=1;return e},getRevBits:function(e){if(e==0){return 0}else if(this.getBit()){return 1<t){throw new js__$Boot_HaxeError("Invalid data")}while(st){throw new js__$Boot_HaxeError("Invalid data")}break;case 18:s+=11+this.getBits(7);if(s>t){throw new js__$Boot_HaxeError("Invalid data")}break;default:throw new js__$Boot_HaxeError("Invalid data")}}},inflateLoop:function(){var e=this.state;switch(e[1]){case 0:var t=this.input.readByte();var s=t&15;var i=t>>4;if(s!=8){throw new js__$Boot_HaxeError("Invalid data")}var a=this.input.readByte();var r=(a&32)!=0;if(((t<<8)+a)%31!=0){throw new js__$Boot_HaxeError("Invalid data")}if(r){throw new js__$Boot_HaxeError("Unsupported dictionary")}this.state=haxe_zip__$InflateImpl_State.Block;return true;case 1:this["final"]=this.getBit();var _=this.getBits(2);switch(_){case 0:this.len=this.input.readUInt16();var n=this.input.readUInt16();if(n!=65535-this.len){throw new js__$Boot_HaxeError("Invalid data")}this.state=haxe_zip__$InflateImpl_State.Flat;var o=this.inflateLoop();this.resetBits();return o;case 1:this.huffman=this.buildFixedHuffman();this.huffdist=null;this.state=haxe_zip__$InflateImpl_State.CData;return true;case 2:var l=this.getBits(5)+257;var h=this.getBits(5)+1;var c=this.getBits(4)+4;var u=0;var f=c;while(u0}else if(x==256){this.state=this["final"]?haxe_zip__$InflateImpl_State.Crc:haxe_zip__$InflateImpl_State.Block;return true}else{x-=257;var P=haxe_zip_InflateImpl.LEN_EXTRA_BITS_TBL[x];if(P==-1){throw new js__$Boot_HaxeError("Invalid data")}this.len=haxe_zip_InflateImpl.LEN_BASE_VAL_TBL[x]+this.getBits(P);var k=this.huffdist==null?this.getRevBits(5):this.applyHuffman(this.huffdist);P=haxe_zip_InflateImpl.DIST_EXTRA_BITS_TBL[k];if(P==-1){throw new js__$Boot_HaxeError("Invalid data")}this.dist=haxe_zip_InflateImpl.DIST_BASE_VAL_TBL[k]+this.getBits(P);if(this.dist>this.window.available()){throw new js__$Boot_HaxeError("Invalid data")}this.state=this.dist==1?haxe_zip__$InflateImpl_State.DistOne:haxe_zip__$InflateImpl_State.Dist;return true}break;case 3:var w=this.len0;case 4:var T=this.window.checksum();if(T==null){this.state=haxe_zip__$InflateImpl_State.Done;return true}var S=haxe_crypto_Adler32.read(this.input);if(!T.equals(S)){throw new js__$Boot_HaxeError("Invalid CRC")}this.state=haxe_zip__$InflateImpl_State.Done;return true;case 5:while(this.len>0&&this.needed>0){var M=this.len0;case 6:var E=this.len0;case 7:return false}},__class__:haxe_zip_InflateImpl};var haxe_zip_Reader=function(e){this.i=e};$hxClasses["haxe.zip.Reader"]=haxe_zip_Reader;haxe_zip_Reader.__name__=["haxe","zip","Reader"];haxe_zip_Reader.prototype={i:null,readZipDate:function(){var e=this.i.readUInt16();var t=e>>11&31;var s=e>>5&63;var i=e&31;var a=this.i.readUInt16();var r=a>>9;var _=a>>5&15;var n=a&31;return new Date(r+1980,_-1,n,t,s,i<<1)},readExtraFields:function(e){var t=new List;while(e>0){if(e<4){throw new js__$Boot_HaxeError("Invalid extra fields data")}var s=this.i.readUInt16();var i=this.i.readUInt16();if(es.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}var o=r.b;var l=s.b;var h=0;var c=n;while(h0){f.push(d)}}}u.sort($bind(this,this.__sortDepths));var g;var m;var v;var b;var y;var x=0;var P=u.length;while(xC.depth&&m<=C.clipDepth){b.set_mask(C.displayObject);y=true;break}}if(f.length>0&&!y&&b.get_mask()!=null){b.set_mask(null)}}var T;var S=u.length;var M=this.__children.length;while(S1){this.play()}this.__enterFrame(0);this.__instanceFields=Type.getInstanceFields(js_Boot.getClass(this));this.__updateInstanceFields()},__getNextFrame:function(e){var t=0;this.__timeElapsed+=e;t=this.__currentFrame+Math.floor(this.__timeElapsed/this.__frameTime);if(t<1){t=1}if(t>this.__totalFrames){t=Math.floor((t-1)%this.__totalFrames)+1}this.__timeElapsed%=this.__frameTime;return t},__goto:function(e){if(this.__symbol==null){return}if(e<1){e=1}else if(e>this.__totalFrames){e=this.__totalFrames}this.__currentFrame=e;this.__enterFrame(0)},__resolveFrameReference:function(e){if(typeof e=="number"&&(e|0)===e){return e}else if(typeof e=="string"){var t=e;var s=0;var i=this.__currentLabels;while(s0){this._currentObject.alpha-=.1}else{this._currentObject.visible=false;this._fadeOutTimer.stop()}},fadeInTimer:function(e){if(this._currentObject.alpha<1){this._currentObject.alpha+=.1}else{this._fadeInTimer.stop()}},fadeOut:function(e,t){if(t==null){t=500}if(!e.visible){e.visible=true}e.alpha=1;this._currentObject=e;this._fadeOutTimer=new openfl_utils_Timer(t/10);this._fadeOutTimer.addEventListener("timer",$bind(this,this.fadeOutTimer));this._fadeOutTimer.start()},fadeIn:function(e,t){if(t==null){t=500}if(e.visible){e.visible=false}e.alpha=0;this._currentObject=e;this._currentObject.visible=true;this._fadeInTimer=new openfl_utils_Timer(t/10);this._fadeInTimer.addEventListener("timer",$bind(this,this.fadeInTimer));this._fadeInTimer.start()},__class__:jaris_animation_AnimationsBase};var jaris_display_Loader=function(e){openfl_display_Sprite.call(this);this._movieClip=e;this._background=new openfl_display_Sprite;this.addChild(this._background);this._loaderTrack=new openfl_display_Sprite;this.addChild(this._loaderTrack);this._loaderThumb=new openfl_display_Sprite;this.addChild(this._loaderThumb);this._brightColor=5000268;this._controlColor=16777215;this._forward=true;this._visible=true;this.addEventListener("enterFrame",$bind(this,this.onEnterFrame));this._movieClip.addEventListener("resize",$bind(this,this.onResize));this.drawLoader()};$hxClasses["jaris.display.Loader"]=jaris_display_Loader;jaris_display_Loader.__name__=["jaris","display","Loader"];jaris_display_Loader.__super__=openfl_display_Sprite;jaris_display_Loader.prototype=$extend(openfl_display_Sprite.prototype,{_movieClip:null,_background:null,_loaderTrack:null,_loaderThumb:null,_visible:null,_brightColor:null,_controlColor:null,_forward:null,onEnterFrame:function(e){if(this._visible){if(this._forward){if(this._loaderThumb.get_x()+this._loaderThumb.get_width()>=this._loaderTrack.get_x()+this._loaderTrack.get_width()){this._forward=false}else{var t=this._loaderThumb;t.set_x(t.get_x()+10)}}else if(this._loaderThumb.get_x()<=this._loaderTrack.get_x()){this._forward=true}else{var s=this._loaderThumb;s.set_x(s.get_x()-10)}}},onResize:function(e){this.drawLoader()},drawLoader:function(){this._background.get_graphics().clear();this._loaderTrack.get_graphics().clear();this._loaderThumb.get_graphics().clear();var e=.65*this._movieClip.get_width();var t=30;this._background.set_x(this._movieClip.get_width()/2-e/2);this._background.set_y(this._movieClip.get_height()/2-t/2);this._background.get_graphics().lineStyle();this._background.get_graphics().beginFill(this._brightColor,.5);this._background.get_graphics().drawRoundRect(0,0,e,t,6,6);this._background.get_graphics().endFill();var s=.5*this._movieClip.get_width();var i=15;this._loaderTrack.set_x(this._movieClip.get_width()/2-s/2);this._loaderTrack.set_y(this._movieClip.get_height()/2-i/2);this._loaderTrack.get_graphics().lineStyle(2,this._controlColor);this._loaderTrack.get_graphics().drawRect(0,0,s,i);this._loaderThumb.set_x(this._loaderTrack.get_x());this._loaderThumb.set_y(this._loaderTrack.get_y());this._loaderThumb.get_graphics().lineStyle();this._loaderThumb.get_graphics().beginFill(this._controlColor,1);this._loaderThumb.get_graphics().drawRect(0,0,i,i)},show:function(){this.set_visible(true);this._visible=true},setColors:function(e){this._brightColor=e[0].length>0?Std.parseInt("0x"+e[0]):5000268;this._controlColor=e[1].length>0?Std.parseInt("0x"+e[1]):16777215;this.drawLoader()},__class__:jaris_display_Loader});var jaris_display_Logo=function(e,t,s,i){if(i==null){i=0}openfl_display_Sprite.call(this);this._stage=openfl_Lib.get_current().stage;this._movieClip=openfl_Lib.get_current();this._loader=new openfl_display_Loader;this._position=t;this._alpha=s;this._source=e;this._width=i;this._loading=true;this.set_tabEnabled(false);this._loader.contentLoaderInfo.addEventListener("complete",$bind(this,this.onLoaderComplete));this._loader.contentLoaderInfo.addEventListener("ioError",$bind(this,this.onNotLoaded));this._loader.load(new openfl_net_URLRequest(e))};$hxClasses["jaris.display.Logo"]=jaris_display_Logo;jaris_display_Logo.__name__=["jaris","display","Logo"];jaris_display_Logo.__super__=openfl_display_Sprite;jaris_display_Logo.prototype=$extend(openfl_display_Sprite.prototype,{_stage:null,_movieClip:null,_loader:null,_position:null,_alpha:null,_source:null,_width:null,_link:null,_loading:null,onNotLoaded:function(e){},onLoaderComplete:function(e){this.addChild(this._loader);this.setWidth(this._width);this.setPosition(this._position);this.setAlpha(this._alpha);this._loading=false;this._stage.addEventListener("resize",$bind(this,this.onStageResize))},onStageResize:function(e){this.setPosition(this._position)},onLogoClick:function(e){openfl_Lib.getURL(new openfl_net_URLRequest(this._link),"_blank");e.stopPropagation()},setPosition:function(e){switch(e){case"bottom left":this.set_x(25);this.set_y(this._stage.stageHeight-this.get_height()-25);break;case"bottom right":this.set_x(this._stage.stageWidth-this.get_width()-25);this.set_y(this._stage.stageHeight-this.get_height()-25);break;case"top left":this.set_x(25);this.set_y(25);break;case"top right":this.set_x(this._stage.stageWidth-this._width-25);this.set_y(25);break;default:this.set_x(25);this.set_y(25)}},setAlpha:function(e){this.set_alpha(e)},setWidth:function(e){if(e>0){this.set_height(this.get_height()/this.get_width()*e);this.set_width(e)}},setLink:function(e){this._link=e;this.set_buttonMode(true);this.useHandCursor=true;this.addEventListener("click",$bind(this,this.onLogoClick))},__class__:jaris_display_Logo});var jaris_display_Poster=function(e,t){openfl_display_Sprite.call(this);this._movieClip=t;this._loader=new openfl_display_Loader;this._source=e;this._loading=true;var s=openfl_Lib.get_current().get_loaderInfo().parameters;var i=["","","",""];i[0]=s.brightcolor!=null?s.brightcolor:"";i[1]=s.controlcolor!=null?s.controlcolor:"";this._loaderStatus=new jaris_display_Loader(this._movieClip);this._loaderStatus.show();this._loaderStatus.setColors(i);this._loader.contentLoaderInfo.addEventListener("complete",$bind(this,this.onLoaderComplete));this._loader.contentLoaderInfo.addEventListener("ioError",$bind(this,this.onNotLoaded));this._loader.load(new openfl_net_URLRequest(e))};$hxClasses["jaris.display.Poster"]=jaris_display_Poster;jaris_display_Poster.__name__=["jaris","display","Poster"];jaris_display_Poster.__super__=openfl_display_Sprite;jaris_display_Poster.prototype=$extend(openfl_display_Sprite.prototype,{_movieClip:null,_loader:null,_source:null,_width:null,_height:null,_loading:null,_loaderStatus:null,_player:null,onNotLoaded:function(e){},onLoaderComplete:function(e){this.addChild(this._loader);this._width=this.get_width();this._height=this.get_height();this._loading=false;this._movieClip.addEventListener("resize",$bind(this,this.onStageResize));this.resizeImage()},onStageResize:function(e){this.resizeImage()},onPlayerMediaInitialized:function(e){if(this._player.getType()==jaris_player_InputType.VIDEO){this.set_visible(false)}},onPlayerPlay:function(e){if(this._player.getType()==jaris_player_InputType.VIDEO){this.set_visible(false)}},onPlayBackFinished:function(e){this.set_visible(true)},resizeImage:function(){var e=this._width/this._height;var t=this._movieClip.get_realWidth();var s=this._movieClip.get_realHeight();var i=this._movieClip.get_realWidth();var a=this._movieClip.get_realHeight();if(e>=1){a=t/e;if(a>s){a=s;i=a*e}}else{i=s*e;if(i>t){i=t;a=i/e}}this.set_height(a);this.set_width(i);this.set_x(this._movieClip.get_realWidth()/2-this.get_width()/2)},setPlayer:function(e){this._player=e;this._player.addEventListener(jaris_events_PlayerEvents.MEDIA_INITIALIZED,$bind(this,this.onPlayerMediaInitialized));this._player.addEventListener(jaris_events_PlayerEvents.PLAYBACK_FINISHED,$bind(this,this.onPlayBackFinished));this._player.addEventListener(jaris_events_PlayerEvents.PLAY_PAUSE,$bind(this,this.onPlayerPlay))},__class__:jaris_display_Poster});var jaris_events_PlayerEvents=function(e,t,s){if(s==null){s=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,s);this.fullscreen=false;this.mute=false;this.volume=1;this.duration=0;this.width=0;this.height=0;this.time=0;this.name=e;this.errinfo=""};$hxClasses["jaris.events.PlayerEvents"]=jaris_events_PlayerEvents;jaris_events_PlayerEvents.__name__=["jaris","events","PlayerEvents"];jaris_events_PlayerEvents.__super__=openfl_events_Event;jaris_events_PlayerEvents.prototype=$extend(openfl_events_Event.prototype,{name:null,aspectRatio:null,duration:null,fullscreen:null,mute:null,volume:null,width:null,height:null,stream:null,sound:null,time:null,id3Info:null,errinfo:null,__class__:jaris_events_PlayerEvents});var jaris_player_AspectRatio=function(){};$hxClasses["jaris.player.AspectRatio"]=jaris_player_AspectRatio;jaris_player_AspectRatio.__name__=["jaris","player","AspectRatio"];jaris_player_AspectRatio.getAspectRatio=function(e,t){return e/t};var jaris_player_InputType=function(){};$hxClasses["jaris.player.InputType"]=jaris_player_InputType;jaris_player_InputType.__name__=["jaris","player","InputType"];var jaris_player_Loop=function(e){this._player=e;this._player.addEventListener(jaris_events_PlayerEvents.PLAYBACK_FINISHED,$bind(this,this.onPlayerStop))};$hxClasses["jaris.player.Loop"]=jaris_player_Loop;jaris_player_Loop.__name__=["jaris","player","Loop"];jaris_player_Loop.prototype={_player:null,onPlayerStop:function(e){this._player.togglePlay()},__class__:jaris_player_Loop};var openfl_media_Video=function(e,t){if(t==null){t=240}if(e==null){e=320}openfl_display_DisplayObject.call(this);this.__width=e;this.__height=t;this.__textureTime=-1;this.smoothing=false;this.deblocking=0};$hxClasses["openfl.media.Video"]=openfl_media_Video;openfl_media_Video.__name__=["openfl","media","Video"];openfl_media_Video.__super__=openfl_display_DisplayObject;openfl_media_Video.prototype=$extend(openfl_display_DisplayObject.prototype,{deblocking:null,smoothing:null,__active:null,__dirty:null,__height:null,__indexBuffer:null,__indexBufferContext:null,__indexBufferData:null,__stream:null,__texture:null,__textureTime:null,__vertexBuffer:null,__vertexBufferContext:null,__vertexBufferData:null,__width:null,attachNetStream:function(e){this.__stream=e;if(this.__stream!=null&&this.__stream.__video!=null&&!this.__stream.__closed){this.__stream.__video.play()}},__enterFrame:function(e){if(this.__renderable&&this.__stream!=null){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}},__getBounds:function(e,t){var s=openfl_geom_Rectangle.__pool.get();s.setTo(0,0,this.__width,this.__height);s.__transform(s,t);e.__expand(s.x,s.y,s.width,s.height);openfl_geom_Rectangle.__pool.release(s)},__getIndexBuffer:function(e){var t=e.gl;if(this.__indexBuffer==null||this.__indexBufferContext!=e.__context){var s=new Uint16Array(6);this.__indexBufferData=s;this.__indexBufferData[0]=0;this.__indexBufferData[1]=1;this.__indexBufferData[2]=2;this.__indexBufferData[3]=2;this.__indexBufferData[4]=1;this.__indexBufferData[5]=3;this.__indexBufferContext=e.__context;this.__indexBuffer=e.createIndexBuffer(6);this.__indexBuffer.uploadFromTypedArray(this.__indexBufferData)}return this.__indexBuffer},__getTexture:function(e){if(this.__stream==null||this.__stream.__video==null){return null}var t=e.__context.webgl;var s=t.RGBA;var i=t.RGBA;if(!this.__stream.__closed&&this.__stream.__video.currentTime!=this.__textureTime){if(this.__texture==null){this.__texture=e.createRectangleTexture(this.__stream.__video.videoWidth,this.__stream.__video.videoHeight,1,false)}e.__bindGLTexture2D(this.__texture.__textureID);lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.texImage2D(t,t.TEXTURE_2D,0,s,i,t.UNSIGNED_BYTE,this.__stream.__video);this.__textureTime=this.__stream.__video.currentTime}return this.__texture},__getVertexBuffer:function(e){var t=e.gl;if(this.__vertexBuffer==null||this.__vertexBufferContext!=e.__context){var s=1;var i=1;var a=new Float32Array(20);this.__vertexBufferData=a;this.__vertexBufferData[0]=this.get_width();this.__vertexBufferData[1]=this.get_height();this.__vertexBufferData[3]=s;this.__vertexBufferData[4]=i;this.__vertexBufferData[6]=this.get_height();this.__vertexBufferData[9]=i;this.__vertexBufferData[10]=this.get_width();this.__vertexBufferData[13]=s;this.__vertexBufferContext=e.__context;this.__vertexBuffer=e.createVertexBuffer(3,5);this.__vertexBuffer.uploadFromTypedArray(this.__vertexBufferData)}return this.__vertexBuffer},__hitTest:function(e,t,s,i,a,r){if(!r.get_visible()||this.__isMask){return false}if(this.get_mask()!=null&&!this.get_mask().__hitTestMask(e,t)){return false}this.__getRenderTransform();var _=this.__renderTransform;var n=_.a*_.d-_.b*_.c;var o=n==0?-_.tx:1/n*(_.c*(_.ty-t)+_.d*(e-_.tx));var l=this.__renderTransform;var h=l.a*l.d-l.b*l.c;var c=h==0?-l.ty:1/h*(l.a*(t-l.ty)+l.b*(l.tx-e));if(o>0&&c>0&&o<=this.__width&&c<=this.__height){if(i!=null&&!a){i.push(r)}return true}return false},__hitTestMask:function(e,t){var s=openfl_geom_Point.__pool.get();s.setTo(e,t);this.__globalToLocal(s,s);var i=s.x>0&&s.y>0&&s.x<=this.__width&&s.y<=this.__height;openfl_geom_Point.__pool.release(s);return i},__renderCanvas:function(e){openfl__$internal_renderer_canvas_CanvasVideo.render(this,e);this.__renderEvent(e)},__renderDOM:function(e){openfl__$internal_renderer_dom_DOMVideo.render(this,e);this.__renderEvent(e)},__renderGL:function(e){openfl__$internal_renderer_context3D_Context3DVideo.render(this,e);this.__renderEvent(e)},__renderGLMask:function(e){openfl__$internal_renderer_context3D_Context3DVideo.renderMask(this,e)},get_height:function(){return this.__height*this.get_scaleY()},set_height:function(e){if(this.get_scaleY()!=1||e!=this.__height){this.__setTransformDirty();this.__dirty=true}this.set_scaleY(1);return this.__height=e},get_width:function(){return this.__width*this.__scaleX},set_width:function(e){if(this.__scaleX!=1||this.__width!=e){this.__setTransformDirty();this.__dirty=true}this.set_scaleX(1);return this.__width=e},__class__:openfl_media_Video});var openfl_net_NetStream=function(e,t){openfl_events_EventDispatcher.call(this);this.__connection=e;this.__video=window.document.createElement("video");this.__video.setAttribute("playsinline","");this.__video.setAttribute("webkit-playsinline","");this.__video.addEventListener("error",$bind(this,this.video_onError),false);this.__video.addEventListener("waiting",$bind(this,this.video_onWaiting),false);this.__video.addEventListener("ended",$bind(this,this.video_onEnd),false);this.__video.addEventListener("pause",$bind(this,this.video_onPause),false);this.__video.addEventListener("seeking",$bind(this,this.video_onSeeking),false);this.__video.addEventListener("playing",$bind(this,this.video_onPlaying),false);this.__video.addEventListener("timeupdate",$bind(this,this.video_onTimeUpdate),false);this.__video.addEventListener("loadstart",$bind(this,this.video_onLoadStart),false);this.__video.addEventListener("stalled",$bind(this,this.video_onStalled),false);this.__video.addEventListener("durationchanged",$bind(this,this.video_onDurationChanged),false);this.__video.addEventListener("canplay",$bind(this,this.video_onCanPlay),false);this.__video.addEventListener("canplaythrough",$bind(this,this.video_onCanPlayThrough),false);this.__video.addEventListener("loadedmetadata",$bind(this,this.video_onLoadMetaData),false)};$hxClasses["openfl.net.NetStream"]=openfl_net_NetStream;openfl_net_NetStream.__name__=["openfl","net","NetStream"];openfl_net_NetStream.__super__=openfl_events_EventDispatcher;openfl_net_NetStream.prototype=$extend(openfl_events_EventDispatcher.prototype,{bufferTime:null,bytesLoaded:null,bytesTotal:null,client:null,soundTransform:null,time:null,__closed:null,__connection:null,__video:null,play:function(e,t,s,i,a,r){if(this.__video==null){return}this.__video.src=e;this.__video.play()},resume:function(){if(this.__video!=null){this.__video.play()}},togglePause:function(){if(this.__video==null){return}if(this.__video.paused){this.__video.play()}else{this.__video.pause()}},__playStatus:function(e){if(this.__video==null){return}if(this.client!=null){try{var t=this.client.onPlayStatus;t({code:e,duration:this.__video.duration,position:this.__video.currentTime,speed:this.__video.playbackRate,start:this.__video.startTime})}catch(e){haxe_CallStack.lastException=e}}},video_onCanPlay:function(e){this.__playStatus("NetStream.Play.canplay")},video_onCanPlayThrough:function(e){this.__playStatus("NetStream.Play.canplaythrough")},video_onDurationChanged:function(e){this.__playStatus("NetStream.Play.durationchanged")},video_onEnd:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.Stop"}));this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.Complete"}));this.__playStatus("NetStream.Play.Complete")},video_onError:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.Stop"}));this.__playStatus("NetStream.Play.error")},video_onLoadMetaData:function(e){if(this.__video==null){return}if(this.client!=null){try{var t=this.client.onMetaData;t({width:this.__video.videoWidth,height:this.__video.videoHeight,duration:this.__video.duration})}catch(e){haxe_CallStack.lastException=e}}},video_onLoadStart:function(e){this.__playStatus("NetStream.Play.loadstart")},video_onPause:function(e){this.__playStatus("NetStream.Play.pause")},video_onPlaying:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.Start"}));this.__playStatus("NetStream.Play.playing")},video_onSeeking:function(e){this.__playStatus("NetStream.Play.seeking");this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Seek.Complete"}))},video_onStalled:function(e){this.__playStatus("NetStream.Play.stalled")},video_onTimeUpdate:function(e){if(this.__video==null){return}this.time=this.__video.currentTime;this.__playStatus("NetStream.Play.timeupdate")},video_onWaiting:function(e){this.__playStatus("NetStream.Play.waiting")},__class__:openfl_net_NetStream});var jaris_player_MyNetStream=function(e){openfl_net_NetStream.call(this,e);this.displayStatus=false;window.document.getElementById("openfl-content").appendChild(this.__video);this.__video.addEventListener("seeked",$bind(this,this.video_onSeeked),false);this.__video.addEventListener("progress",$bind(this,this.video_onProgress),false);this.__video.addEventListener("volumechange",$bind(this,this.video_onVolumechange),false)};$hxClasses["jaris.player.MyNetStream"]=jaris_player_MyNetStream;jaris_player_MyNetStream.__name__=["jaris","player","MyNetStream"];jaris_player_MyNetStream.__super__=openfl_net_NetStream;jaris_player_MyNetStream.prototype=$extend(openfl_net_NetStream.prototype,{displayStatus:null,seek:function(e){var t=e;if(t<0){t=0}else if(t>this.__video.duration){t=this.__video.duration}this.__video.currentTime=t},set_displayState:function(e){if(e){var t=function(e){if(e.requestFullscreen)e.requestFullscreen();else if(e.msRequestFullscreen)e.msRequestFullscreen();else if(e.mozRequestFullScreen)e.mozRequestFullScreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen();e.webkitEnterFullscreen()};t(this.__video)}else{var s=function(){if(document.exitFullscreen){document.exitFullscreen()}else if(document.msExitFullscreen){document.msExitFullscreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else if(document.webkitExitFullscreen){document.webkitExitFullscreen()}};s()}this.displayStatus=e;return this.displayStatus},video_onCanPlayThrough:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.canplaythrough"}));this.__playStatus("NetStream.Play.canplaythrough")},video_onError:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.Error"}));this.__playStatus("NetStream.Play.error")},video_onPause:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.pause"}));this.__playStatus("NetStream.Play.pause")},video_onPlaying:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.Start",duration:this.__video.duration,position:this.__video.currentTime,speed:this.__video.playbackRate,width:this.__video.videoWidth,height:this.__video.videoHeight,start:this.__video.startTime}));this.__playStatus("NetStream.Play.playing")},video_onSeeking:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.SeekStart.Notify"}));this.__playStatus("NetStream.SeekStart.Notify")},video_onSeeked:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Seek.Notify"}));this.__playStatus("NetStream.Seek.Notify")},video_onProgress:function(e){this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Buffer.Empty"}));try{this.bytesLoaded=this.__video.buffered.end(0)|0;this.bytesTotal=this.__video.duration|0}catch(e){haxe_CallStack.lastException=e}this.__playStatus("NetStream.Buffer.Empty")},video_onTimeUpdate:function(e){this.time=this.__video.currentTime;if(this.soundTransform!=null){if(this.soundTransform.volume!=null){if(this.__video.volume!=this.soundTransform.volume){this.__video.volume=this.soundTransform.volume}}}this.__playStatus("NetStream.Play.timeupdate")},video_onVolumechange:function(e){if(this.soundTransform!=null){if(null!=this.soundTransform.volume){this.soundTransform.volume=this.__video.volume}}this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{code:"NetStream.Play.volumechange"}));this.__playStatus("NetStream.Play.volumechange")},__class__:jaris_player_MyNetStream});var jaris_player_Player=function(e){openfl_events_EventDispatcher.call(this);this._stage=openfl_Lib.get_current().stage;this._movieClip=e;this._mouseVisible=true;this._soundMuted=false;this._volume=1;this._bufferTime=10;this._fullscreen=false;this._mediaLoaded=false;this._hideMouseTimer=new openfl_utils_Timer(1500);this._checkAudioTimer=new openfl_utils_Timer(100);this._seekPoints=[];this._downloadCompleted=false;this._startTime=0;this._firstLoad=true;this._stopped=false;this._videoQualityHigh=false;this._isPlaying=false;this._streamType=jaris_player_StreamType.FILE;this._type=jaris_player_InputType.VIDEO;this._server="";this._currentAspectRatio="original";this._aspectRatio=0;this._lastTime=0;this._lastProgress=0;this._userSettings=new jaris_player_UserSettings;this._sound=new openfl_media_Sound;this._sound.addEventListener("complete",$bind(this,this.onSoundComplete));this._sound.addEventListener("id3",$bind(this,this.onSoundID3));this._sound.addEventListener("ioError",$bind(this,this.onSoundIOError));this._sound.addEventListener("progress",$bind(this,this.onSoundProgress));this._connection=new openfl_net_NetConnection;this._connection.connect(null);this._stream=new jaris_player_MyNetStream(this._connection);this._video=new openfl_media_Video(this._movieClip.get_realWidth()|0,this._movieClip.get_realHeight()|0);this._movieClip.addChild(this._video);this._video.attachNetStream(this._stream);this._videoMask=new openfl_display_Sprite;this._movieClip.addChild(this._videoMask);this.toggleQuality();this._movieClip.addEventListener("enterFrame",$bind(this,this.onEnterFrame));this._movieClip.addEventListener("keyDown",$bind(this,this.onKeyDown));this._movieClip.addEventListener("mouseMove",$bind(this,this.onMouseMove));this._movieClip.addEventListener("resize",$bind(this,this.onResize));this._hideMouseTimer.addEventListener("timer",$bind(this,this.hideMouseTimer));this._checkAudioTimer.addEventListener("timer",$bind(this,this.checkAudioTimer));this._connection.addEventListener("netStatus",$bind(this,this.onNetStatus));this._connection.addEventListener("asyncError",$bind(this,this.errorHandler));this._connection.addEventListener("ioError",$bind(this,this.errorHandler))};$hxClasses["jaris.player.Player"]=jaris_player_Player;jaris_player_Player.__name__=["jaris","player","Player"];jaris_player_Player.__super__=openfl_events_EventDispatcher;jaris_player_Player.prototype=$extend(openfl_events_EventDispatcher.prototype,{_stage:null,_movieClip:null,_connection:null,_stream:null,_fullscreen:null,_soundMuted:null,_volume:null,_bufferTime:null,_mouseVisible:null,_mediaLoaded:null,_hideMouseTimer:null,_checkAudioTimer:null,_mediaSource:null,_type:null,_streamType:null,_server:null,_sound:null,_soundChannel:null,_id3Info:null,_video:null,_videoWidth:null,_videoHeight:null,_videoMask:null,_videoQualityHigh:null,_mediaDuration:null,_lastTime:null,_lastProgress:null,_isPlaying:null,_aspectRatio:null,_currentAspectRatio:null,_originalAspectRatio:null,_mediaEndReached:null,_seekPoints:null,_downloadCompleted:null,_startTime:null,_firstLoad:null,_stopped:null,_useHardWareScaling:null,_youtubeLoader:null,_userSettings:null,_org_parent:null,_org_RealWidth:null,_org_RealHeight:null,get_movieClip:function(){return this._movieClip},hideMouseTimer:function(e){if(this._fullscreen){if(this._mouseVisible){this._mouseVisible=false}else{openfl_ui_Mouse.hide();this.callEvents(jaris_events_PlayerEvents.MOUSE_HIDE);this._hideMouseTimer.stop()}}},checkAudioTimer:function(e){if(this._soundChannel.get_position()+100>=this._sound.get_length()){this._isPlaying=false;this._mediaEndReached=true;this.callEvents(jaris_events_PlayerEvents.PLAYBACK_FINISHED);this._checkAudioTimer.stop()}},errorHandler:function(e){this.callEvents(jaris_events_PlayerEvents.ERROR,e.text)},onNetStatus:function(e){var t=e.info.code;switch(t){case"NetStream.Buffer.Empty":if(this._stream.bytesLoaded!=this._stream.bytesTotal){this.callEvents(jaris_events_PlayerEvents.BUFFERING)}break;case"NetStream.Play.Error":this.callEvents(jaris_events_PlayerEvents.CONNECTION_FAILED);break;case"NetStream.Play.Start":this.onConnectFinished(e);this._isPlaying=true;this._mediaEndReached=false;if(this._stream.bytesLoaded!=this._stream.bytesTotal||this._streamType==jaris_player_StreamType.RTMP){this.callEvents(jaris_events_PlayerEvents.BUFFERING)}break;case"NetStream.Play.Stop":if(this._streamType!=jaris_player_StreamType.RTMP){this._isPlaying=false;this._mediaEndReached=true;this.callEvents(jaris_events_PlayerEvents.PLAYBACK_FINISHED)}break;case"NetStream.Play.canplaythrough":if(this._stream.bytesLoaded==this._stream.bytesTotal){this.callEvents(jaris_events_PlayerEvents.NOT_BUFFERING);this._downloadCompleted=true}break;case"NetStream.Play.volumechange":this.setVolume(this._stream.soundTransform.volume);break;case"NetStream.Seek.Notify":this._mediaEndReached=false;if(this._streamType==jaris_player_StreamType.RTMP){this._isPlaying=true;this.callEvents(jaris_events_PlayerEvents.PLAY_PAUSE)}break;case"connectSuccess":if(this._streamType==jaris_player_StreamType.RTMP){this._stream=new jaris_player_MyNetStream(this._connection);this._stream.addEventListener("netStatus",$bind(this,this.onNetStatus));this._stream.bufferTime=10;this._stream.play(jaris_utils_Utils.rtmpSourceParser(this._mediaSource),true);this._stream.client=this;if(this._type==jaris_player_InputType.VIDEO){this._video.attachNetStream(this._stream)}}this.callEvents(jaris_events_PlayerEvents.CONNECTION_SUCCESS);break}},onKeyDown:function(e){var t=70;var s=77;var i=88;if(e.keyCode==9){this.toggleAspectRatio()}else if(e.keyCode==t){this.toggleFullscreen()}else if(e.keyCode==s){this.toggleMute()}else if(e.keyCode==38){this.volumeUp()}else if(e.keyCode==40){this.volumeDown()}else if(e.keyCode==39){this.forward()}else if(e.keyCode==37){this.rewind()}else if(e.keyCode==32){this.togglePlay()}else if(e.keyCode==i){this.stopAndClose()}e.stopPropagation()},onMouseMove:function(e){if(this._fullscreen&&!this._mouseVisible){if(!this._hideMouseTimer.running){this._hideMouseTimer.start()}this._mouseVisible=true;openfl_ui_Mouse.show();this.callEvents(jaris_events_PlayerEvents.MOUSE_SHOW)}e.stopPropagation()},onResize:function(e){this.resizeAndCenterPlayer()},onmyFullScreen:function(){if(!this._fullscreen){openfl_ui_Mouse.show();this.callEvents(jaris_events_PlayerEvents.MOUSE_SHOW);this._mouseVisible=true}else{this._mouseVisible=true;this._hideMouseTimer.start()}this.resizeAndCenterPlayer();this.callEvents(jaris_events_PlayerEvents.FULLSCREEN)},onConnectFinished:function(e){if(this._firstLoad){this._isPlaying=true;this._firstLoad=false;if(e.info.width){this._videoWidth=e.info.width;this._videoHeight=e.info.height}else{this._videoWidth=this._video.get_width();this._videoHeight=this._video.get_height()}this._mediaLoaded=true;this._mediaDuration=e.info.duration;this._originalAspectRatio=jaris_player_AspectRatio.getAspectRatio(this._videoWidth,this._videoHeight);if(this._aspectRatio<=0){this._aspectRatio=this._originalAspectRatio}this.callEvents(jaris_events_PlayerEvents.MEDIA_INITIALIZED);this.resizeAndCenterPlayer();this.setVolume(this._userSettings.getVolume())}},onEnterFrame:function(e){if(this.getDuration()>0&&this._lastTime!=this.getCurrentTime()){this._lastTime=this.getCurrentTime();this.callEvents(jaris_events_PlayerEvents.TIME)}if(this.getBytesLoaded()>0&&this._lastProgress0){this._video.set_width(this._video.get_height()*this._aspectRatio)}this._video.set_x(this._movieClip.get_realWidth()/2-this._video.get_width()/2);this._video.set_y(0);if(this._video.get_width()>this._movieClip.get_realWidth()&&this._aspectRatio==this._originalAspectRatio){var e=this._videoHeight/this._videoWidth;this._video.set_width(this._movieClip.get_realWidth());this._video.set_height(e*this._video.get_width());this._video.set_x(0);this._video.set_y(this._movieClip.get_realHeight()/2-this._video.get_height()/2)}this._videoMask.get_graphics().clear();this._videoMask.get_graphics().lineStyle();this._videoMask.get_graphics().beginFill(0,0);this._videoMask.get_graphics().drawRect(this._video.get_x(),this._video.get_y(),this._video.get_width(),this._video.get_height());this._videoMask.get_graphics().endFill()}else{if(this._youtubeLoader!=null){if(Reflect.field(this._youtubeLoader.content,"setSize")!=null){Reflect.field(this._youtubeLoader.content,"setSize")(this._movieClip.get_realWidth(),this._movieClip.get_realHeight())}}this._videoMask.get_graphics().clear();this._videoMask.get_graphics().lineStyle();this._videoMask.get_graphics().beginFill(0,0);this._videoMask.get_graphics().drawRect(0,0,this._movieClip.get_realWidth(),this._movieClip.get_realHeight());this._videoMask.get_graphics().endFill()}this.callEvents(jaris_events_PlayerEvents.RESIZE)},getBestSeekPoint:function(e){if(this._seekPoints.length>0){var t="0";var s="0";var i=0;var a=Reflect.fields(this._seekPoints);while(i=this._startTime&&ee){e=this.seek(e)}return e},rewind:function(){var e=this.getCurrentTime()-8+this._startTime;if(e>=this._startTime){e=this.seek(e)}return e},seek:function(e){if(this._startTime<=1&&this._downloadCompleted){if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._stream.seek(e)}else if(this._type==jaris_player_InputType.AUDIO){this._soundChannel.stop();this._soundChannel=this._sound.play(e*1e3);if(!this._isPlaying){this._soundChannel.stop()}this.setVolume(this._userSettings.getVolume())}}else if(this._seekPoints.length>0&&this._streamType==jaris_player_StreamType.PSEUDOSTREAM){e=this.getBestSeekPoint(e);if(this.canSeek(e)){this._stream.seek(e-this._startTime)}else if(e!=this._startTime){this._startTime=e;var t;if(this._mediaSource.indexOf("?")!=-1){t=this._mediaSource+"&start="+e}else{t=this._mediaSource+"?start="+e}this._stream.play(t)}}else if(this._streamType==jaris_player_StreamType.YOUTUBE){if(!this.canSeek(e)){if(this._youtubeLoader!=null){this._startTime=e;var s=Reflect.field(this._youtubeLoader.content,"seekTo");if(s!=null){s(e)}}}else if(this._youtubeLoader!=null){var i=Reflect.field(this._youtubeLoader.content,"seekTo");if(i!=null){i(e)}}}else if(this._streamType==jaris_player_StreamType.RTMP){this._stream.seek(e)}else if(this.canSeek(e)){if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._stream.seek(e)}else if(this._type==jaris_player_InputType.AUDIO){this._soundChannel.stop();this._soundChannel=this._sound.play(e*1e3);if(!this._isPlaying){this._soundChannel.stop()}this.setVolume(this._userSettings.getVolume())}}this.callEvents(jaris_events_PlayerEvents.SEEK);return e},isPlaying:function(){return this._isPlaying},toggleAspectRatio:function(){var e=this._currentAspectRatio;switch(e){case"14:10":this._aspectRatio=1.7777777777777777;this._currentAspectRatio="16:9";break;case"14:9":this._aspectRatio=1.4;this._currentAspectRatio="14:10";break;case"16:10":this._aspectRatio=this._originalAspectRatio;this._currentAspectRatio="original";break;case"16:9":this._aspectRatio=1.6;this._currentAspectRatio="16:10";break;case"1:1":this._aspectRatio=1.5;this._currentAspectRatio="3:2";break;case"3:2":this._aspectRatio=1.3333333333333333;this._currentAspectRatio="4:3";break;case"4:3":this._aspectRatio=1.25;this._currentAspectRatio="5:4";break;case"5:4":this._aspectRatio=1.5555555555555556;this._currentAspectRatio="14:9";break;case"original":this._aspectRatio=1;this._currentAspectRatio="1:1";break;default:this._aspectRatio=this._originalAspectRatio;this._currentAspectRatio="original"}this.resizeAndCenterPlayer();this.callEvents(jaris_events_PlayerEvents.ASPECT_RATIO);if(this._aspectRatio==this._originalAspectRatio){this._userSettings.setAspectRatio(0)}else{this._userSettings.setAspectRatio(this._aspectRatio)}return this._aspectRatio},togglePlay:function(){if(this._mediaLoaded){if(this._mediaEndReached){this._mediaEndReached=false;if(this._streamType==jaris_player_StreamType.YOUTUBE){Reflect.field(this._youtubeLoader.content,"seekTo")(0);Reflect.field(this._youtubeLoader.content,"playVideo")()}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._stream.seek(0);this._stream.togglePause()}else if(this._type==jaris_player_InputType.AUDIO){this._checkAudioTimer.start();this._soundChannel=this._sound.play();this.setVolume(this._userSettings.getVolume())}}else if(this._mediaLoaded){if(this._streamType==jaris_player_StreamType.YOUTUBE){if(this._isPlaying){Reflect.field(this._youtubeLoader.content,"pauseVideo")()}else{Reflect.field(this._youtubeLoader.content,"playVideo")()}}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._stream.togglePause()}else if(this._type==jaris_player_InputType.AUDIO){if(this._isPlaying){this._soundChannel.stop()}else{if(this._soundChannel.get_position()+100>=this._sound.get_length()){this._soundChannel=this._sound.play()}else{this._soundChannel=this._sound.play(this._soundChannel.get_position())}this.setVolume(this._userSettings.getVolume())}}}else if(this._stopped){this.load(this._mediaSource,this._type,this._streamType,this._server)}this._isPlaying=!this._isPlaying;this.callEvents(jaris_events_PlayerEvents.PLAY_PAUSE);return this._isPlaying}else if(this._mediaSource!=""){this.load(this._mediaSource,this._type,this._streamType,this._server);return true}this.callEvents(jaris_events_PlayerEvents.PLAY_PAUSE);return false},toggleFullscreen:function(){if(this._fullscreen){if(this._org_parent!=null){this._org_parent.addChild(this._movieClip)}this._movieClip.resize(this._org_RealWidth,this._org_RealHeight);this._stage.set_displayState(2);this._fullscreen=false;this.onmyFullScreen();return false}else{this._org_parent=js_Boot.__cast(this._movieClip.parent,openfl_display_Sprite);this._org_RealWidth=this._movieClip.get_realWidth();this._org_RealHeight=this._movieClip.get_realHeight();if(this._useHardWareScaling){var e=openfl_system_Capabilities.get_screenResolutionY()/openfl_system_Capabilities.get_screenResolutionX()}this._stage.set_displayState(0);this._stage.addChild(this._movieClip);this._movieClip.set_x(0);this._movieClip.set_y(0);this._movieClip.resize(this._stage.stageWidth,this._stage.stageHeight);this._stage.set_focus(this._stage);this._fullscreen=true;this.onmyFullScreen();return true}},toggleQuality:function(){if(this._videoQualityHigh){this._video.smoothing=false;this._video.deblocking=1}else{this._video.smoothing=true;this._video.deblocking=5}this._videoQualityHigh=this._videoQualityHigh?false:true;return this._videoQualityHigh},toggleMute:function(){var e=new openfl_media_SoundTransform;var t;if(this._soundMuted){this._soundMuted=false;if(this._volume>0){e.volume=this._volume}else{this._volume=1;e.volume=this._volume}t=false}else{this._soundMuted=true;this._volume=this._stream.soundTransform.volume;e.volume=0;this._stream.soundTransform=e;t=true}if(this._streamType==jaris_player_StreamType.YOUTUBE){Reflect.field(this._youtubeLoader.content,"setVolume")(e.volume*100)}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._stream.soundTransform=e}else if(this._type==jaris_player_InputType.AUDIO){this._soundChannel.set_soundTransform(e);this.setVolume(this._userSettings.getVolume())}this.callEvents(jaris_events_PlayerEvents.MUTE);return t},isFullscreen:function(){return this._stage.get_displayState()==0},volumeUp:function(){var e=new openfl_media_SoundTransform;if(this._soundMuted){this._soundMuted=false}if(this._volume<1){if(this._streamType==jaris_player_StreamType.YOUTUBE){this._volume=(Reflect.field(this._youtubeLoader.content,"getVolume")()+10)/100;if(this._volume>1){this._volume=1}Reflect.field(this._youtubeLoader.content,"setVolume")(this._volume*100)}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._volume=this._stream.soundTransform.volume+.1;if(this._volume>1){this._volume=1}e.volume=this._volume;this._stream.soundTransform=e}else if(this._type==jaris_player_InputType.AUDIO){this._volume=this._soundChannel.get_soundTransform().volume+.1;if(this._volume>1){this._volume=1}e.volume=this._volume;this._soundChannel.set_soundTransform(e)}}if(this._volume>=1){this._volume=1}this._userSettings.setVolume(this._volume);this.callEvents(jaris_events_PlayerEvents.VOLUME_UP);return this._volume},volumeDown:function(){var e=new openfl_media_SoundTransform;if(!this._soundMuted){if(this._streamType==jaris_player_StreamType.YOUTUBE){this._volume=(Reflect.field(this._youtubeLoader.content,"getVolume")()-10)/100;if(this._volume<0){this._volume=0}Reflect.field(this._youtubeLoader.content,"setVolume")(this._volume*100)}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._volume=this._stream.soundTransform.volume-.1;if(this._volume<0){this._volume=0}e.volume=this._volume;this._stream.soundTransform=e}else if(this._type==jaris_player_InputType.AUDIO){this._volume=this._soundChannel.get_soundTransform().volume-.1;if(this._volume<0){this._volume=0}e.volume=this._volume;this._soundChannel.set_soundTransform(e)}if(this._volume<=0){this._soundMuted=true;this._volume=0}}this._userSettings.setVolume(this._volume);this.callEvents(jaris_events_PlayerEvents.VOLUME_DOWN);return this._volume},setStreamType:function(e){this._streamType=e},setSource:function(e){this._mediaSource=e},setVolume:function(e){var t=new openfl_media_SoundTransform;if(e>this._volume){this.callEvents(jaris_events_PlayerEvents.VOLUME_UP)}if(e0){this._soundMuted=false;this._volume=e}else{this._soundMuted=true;this._volume=1}t.volume=e;if(!this._firstLoad){if(this._streamType==jaris_player_StreamType.YOUTUBE){Reflect.field(this._youtubeLoader.content,"setVolume")(t.volume*100)}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){this._stream.soundTransform=t}else if(this._type==jaris_player_InputType.AUDIO){this._soundChannel.set_soundTransform(t)}}this._userSettings.setVolume(this._volume);this.callEvents(jaris_events_PlayerEvents.VOLUME_CHANGE)},getVolume:function(){return this._volume},getAspectRatio:function(){return this._aspectRatio},getAspectRatioString:function(){return this._currentAspectRatio},getDuration:function(){return this._mediaDuration},getStartTime:function(){return this._startTime},getNetStream:function(){return this._stream},getSound:function(){return this._sound},getId3Info:function(){return this._id3Info},getMute:function(){return this._soundMuted},getBytesTotal:function(){var e=0;if(this._streamType==jaris_player_StreamType.YOUTUBE){if(this._youtubeLoader!=null&&this._mediaLoaded){e=Reflect.field(this._youtubeLoader.content,"getVideoBytesTotal")()}}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){e=this._stream.bytesTotal}else if(this._type==jaris_player_InputType.AUDIO){e=this._sound.bytesTotal}return e},getBytesLoaded:function(){var e=0;if(this._streamType==jaris_player_StreamType.YOUTUBE){if(this._youtubeLoader!=null&&this._mediaLoaded){e=Reflect.field(this._youtubeLoader.content,"getVideoBytesLoaded")()}}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){e=this._stream.bytesLoaded}else if(this._type==jaris_player_InputType.AUDIO){e=this._sound.bytesLoaded}return e},getType:function(){return this._type},getCurrentTime:function(){var e=0;if(this._streamType==jaris_player_StreamType.YOUTUBE){if(this._youtubeLoader!=null){if(this._youtubeLoader.content!=null){var t=Reflect.field(this._youtubeLoader.content,"getCurrentTime");if(t!=null){e=t()}else{e=0}}else{e=0}}else{e=0}}else if(this._streamType==jaris_player_StreamType.PSEUDOSTREAM){e=this.getStartTime()+this._stream.time}else if(this._type==jaris_player_InputType.VIDEO||this._streamType==jaris_player_StreamType.RTMP){e=this._stream.time}else if(this._type==jaris_player_InputType.AUDIO){if(this._soundChannel!=null){e=this._soundChannel.get_position()/1e3}else{e=0}}return e},__class__:jaris_player_Player});var jaris_player_StreamType=function(){};$hxClasses["jaris.player.StreamType"]=jaris_player_StreamType;jaris_player_StreamType.__name__=["jaris","player","StreamType"];var jaris_player_UserSettings=function(){this._settings=openfl_net_SharedObject.getLocal("JarisPlayerUserSettings")};$hxClasses["jaris.player.UserSettings"]=jaris_player_UserSettings;jaris_player_UserSettings.__name__=["jaris","player","UserSettings"];jaris_player_UserSettings.prototype={_settings:null,isSet:function(e){return Object.prototype.hasOwnProperty.call(this._settings.data,e)},setVolume:function(e){this._settings.data.volume=e;this._settings.flush()},setAspectRatio:function(e){this._settings.data.aspectratio=e;this._settings.flush()},getVolume:function(){if(!this.isSet("volume")){return 1}return this._settings.data.volume},__class__:jaris_player_UserSettings};var jaris_player_newcontrols_AspectRatioIcon=function(e,t,s,i,a,r){openfl_display_Sprite.call(this);this.set_x(e);this.set_y(t);this.set_buttonMode(true);this.useHandCursor=true;this.set_tabEnabled(false);this._width=s;this._height=i;this._normalColor=a;this._hoverColor=r;this.addEventListener("mouseOver",$bind(this,this.onMouseOver));this.addEventListener("mouseOut",$bind(this,this.onMouseOut));this.draw(this._normalColor)};$hxClasses["jaris.player.newcontrols.AspectRatioIcon"]=jaris_player_newcontrols_AspectRatioIcon;jaris_player_newcontrols_AspectRatioIcon.__name__=["jaris","player","newcontrols","AspectRatioIcon"];jaris_player_newcontrols_AspectRatioIcon.__super__=openfl_display_Sprite;jaris_player_newcontrols_AspectRatioIcon.prototype=$extend(openfl_display_Sprite.prototype,{_width:null,_height:null,_normalColor:null,_hoverColor:null,onMouseOver:function(e){this.draw(this._hoverColor)},onMouseOut:function(e){this.draw(this._normalColor)},draw:function(e){this.get_graphics().clear();this.get_graphics().lineStyle(0,e,0);this.get_graphics().beginFill(e,0);this.get_graphics().drawRect(0,0,this._width,this._height);this.get_graphics().endFill();var t=new openfl_geom_Matrix;t.createGradientBox(this._width,this._height,jaris_utils_Utils.degreesToRadians(-90),this._width,0);var s=[e,e];var i=[.75,1];var a=[0,255];var r=.7*this.get_width();var _=.4*this.get_height();var n=this.get_width()/2-r/2+1;var o=this.get_height()/2-_/2+1;this.get_graphics().lineStyle();this.get_graphics().beginGradientFill(0,s,i,a,t);this.get_graphics().drawRect(0,0,1,this._height+1);this.get_graphics().drawRect(0,0,this._width+1,1);this.get_graphics().drawRect(this._width+1,0,1,this._height+1);this.get_graphics().drawRect(0,this._height+1,this._width+1,1);this.get_graphics().drawRect(n,o,r,_);this.get_graphics().endFill()},setNormalColor:function(e){this._normalColor=e;this.draw(this._normalColor)},setHoverColor:function(e){this._hoverColor=e;this.draw(this._hoverColor)},setPosition:function(e,t){this.set_x(e);this.set_y(t);this.draw(this._normalColor)},setSize:function(e,t){this._width=e;this._height=t;this.draw(this._normalColor)},__class__:jaris_player_newcontrols_AspectRatioIcon});var jaris_player_newcontrols_FullscreenIcon=function(e,t,s,i,a,r){openfl_display_Sprite.call(this);this.set_x(e);this.set_y(t);this.set_buttonMode(true);this.useHandCursor=true;this.set_tabEnabled(false);this._width=s;this._height=i;this._normalColor=a;this._hoverColor=r;this.addEventListener("mouseOver",$bind(this,this.onMouseOver));this.addEventListener("mouseOut",$bind(this,this.onMouseOut));this.draw(this._normalColor)};$hxClasses["jaris.player.newcontrols.FullscreenIcon"]=jaris_player_newcontrols_FullscreenIcon;jaris_player_newcontrols_FullscreenIcon.__name__=["jaris","player","newcontrols","FullscreenIcon"];jaris_player_newcontrols_FullscreenIcon.__super__=openfl_display_Sprite;jaris_player_newcontrols_FullscreenIcon.prototype=$extend(openfl_display_Sprite.prototype,{_width:null,_height:null,_normalColor:null,_hoverColor:null,onMouseOver:function(e){this.draw(this._hoverColor);e.stopPropagation()},onMouseOut:function(e){this.draw(this._normalColor);e.stopPropagation()},draw:function(e){this.get_graphics().clear();this.get_graphics().lineStyle(0,e,0);this.get_graphics().beginFill(e,0);this.get_graphics().drawRect(0,0,this._width,this._height);this.get_graphics().endFill();var t=this._width/2*.8|0;var s=new openfl_geom_Matrix;s.createGradientBox(this._width,this._height,jaris_utils_Utils.degreesToRadians(-90),this._width,0);var i=[e,e];var a=[.75,1];var r=[0,255];this.get_graphics().lineStyle(0,e,0,true);this.get_graphics().beginGradientFill(0,i,a,r,s);this.get_graphics().drawRect(0,0,t,2);this.get_graphics().drawRect(0,2,2,t-2);this.get_graphics().drawRect(this._width-t+1,0,t,2);this.get_graphics().drawRect(this._width-1,2,2,t-2);this.get_graphics().drawRect(0,this._height-t+2,2,t);this.get_graphics().drawRect(2,this._height,t-2,2);this.get_graphics().drawRect(this._width-1,this._height-t+2,2,t-2);this.get_graphics().drawRect(this._width-t+1,this._height,t,2);this.get_graphics().endFill()},setNormalColor:function(e){this._normalColor=e;this.draw(this._normalColor)},setHoverColor:function(e){this._hoverColor=e;this.draw(this._hoverColor)},setPosition:function(e,t){this.set_x(e);this.set_y(t);this.draw(this._normalColor)},setSize:function(e,t){this._width=e;this._height=t;this.draw(this._normalColor)},__class__:jaris_player_newcontrols_FullscreenIcon});var jaris_player_newcontrols_Loader=function(e){openfl_display_Sprite.call(this);this._movieClip=e;this._background=new openfl_display_Sprite;this.addChild(this._background);this._loaderTrack=new openfl_display_Sprite;this.addChild(this._loaderTrack);this._loaderThumb=new openfl_display_Sprite;this.addChild(this._loaderThumb);this._darkColor=0;this._controlColor=16777215;this._seekColor=7631988;this._forward=true;this._visible=true;this.addEventListener("enterFrame",$bind(this,this.onEnterFrame));this._movieClip.addEventListener("resize",$bind(this,this.onResize));this.drawLoader()};$hxClasses["jaris.player.newcontrols.Loader"]=jaris_player_newcontrols_Loader;jaris_player_newcontrols_Loader.__name__=["jaris","player","newcontrols","Loader"];jaris_player_newcontrols_Loader.__super__=openfl_display_Sprite;jaris_player_newcontrols_Loader.prototype=$extend(openfl_display_Sprite.prototype,{_movieClip:null,_background:null,_loaderTrack:null,_loaderThumb:null,_visible:null,_darkColor:null,_controlColor:null,_seekColor:null,_forward:null,onEnterFrame:function(e){if(this._visible){if(this._forward){if(this._loaderThumb.get_x()+this._loaderThumb.get_width()>=this._loaderTrack.get_x()+this._loaderTrack.get_width()){this._forward=false}else{var t=this._loaderThumb;t.set_x(t.get_x()+10)}}else if(this._loaderThumb.get_x()<=this._loaderTrack.get_x()){this._forward=true}else{var s=this._loaderThumb;s.set_x(s.get_x()-10)}}},onResize:function(e){this.drawLoader()},drawLoader:function(){this._background.get_graphics().clear();this._loaderTrack.get_graphics().clear();this._loaderThumb.get_graphics().clear();var e=.65*this._movieClip.get_realWidth();var t=30;this._background.set_x(this._movieClip.get_realWidth()/2-e/2);this._background.set_y(this._movieClip.get_realHeight()/2-t/2);this._background.get_graphics().lineStyle();this._background.get_graphics().beginFill(this._darkColor,.75);this._background.get_graphics().drawRoundRect(0,0,e,t,6,6);this._background.get_graphics().endFill();var s=.5*this._movieClip.get_realWidth();var i=11;this._loaderTrack.set_x(this._movieClip.get_realWidth()/2-s/2);this._loaderTrack.set_y(this._movieClip.get_realHeight()/2-i/2);this._loaderTrack.get_graphics().lineStyle();this._loaderTrack.get_graphics().beginFill(this._seekColor,.3);this._loaderTrack.get_graphics().drawRoundRect(0,i/2/2,s,i/2,5,5);var a=new openfl_geom_Matrix;a.createGradientBox(i*3,i,jaris_utils_Utils.degreesToRadians(-90),i*3,0);var r=[this._controlColor,this._controlColor];var _=[.75,1];var n=[0,255];this._loaderThumb.set_x(this._loaderTrack.get_x());this._loaderThumb.set_y(this._loaderTrack.get_y());this._loaderThumb.get_graphics().lineStyle();this._loaderThumb.get_graphics().beginGradientFill(0,r,_,n,a);this._loaderThumb.get_graphics().drawRoundRect(0,0,i*3,i,10,10)},hide:function(){this.set_visible(false);this._visible=false},setColors:function(e){this._darkColor=e[0].length>0?Std.parseInt("0x"+e[0]):0;this._controlColor=e[1].length>0?Std.parseInt("0x"+e[1]):16777215;this._seekColor=e[2].length>0?Std.parseInt("0x"+e[2]):7631988;this.drawLoader()},__class__:jaris_player_newcontrols_Loader});var jaris_player_newcontrols_TVideooPlayerBigButton=function(e){openfl_display_Sprite.call(this);this._container=new openfl_display_Sprite;var t=new openfl_display_Bitmap(openfl_utils_Assets.getBitmapData(e));this._container.addChild(t);this.addChild(this._container);this.addEventListener("mouseDown",$bind(this,this.onMouseClick));this.addEventListener("mouseUp",$bind(this,this.onMouseUp));this.addEventListener("rollOut",$bind(this,this.onMouseOut));this.addEventListener("rollOver",$bind(this,this.onMouseOver))};$hxClasses["jaris.player.newcontrols.TVideooPlayerBigButton"]=jaris_player_newcontrols_TVideooPlayerBigButton;jaris_player_newcontrols_TVideooPlayerBigButton.__name__=["jaris","player","newcontrols","TVideooPlayerBigButton"];jaris_player_newcontrols_TVideooPlayerBigButton.__super__=openfl_display_Sprite;jaris_player_newcontrols_TVideooPlayerBigButton.prototype=$extend(openfl_display_Sprite.prototype,{OnClick:null,_container:null,onMouseUp:function(e){this._container.set_alpha(1);e.stopPropagation()},onMouseClick:function(e){this._container.set_alpha(.8);if(this.OnClick!=null){this.OnClick()}e.stopPropagation()},onMouseOver:function(e){this._container.set_alpha(.8);e.stopPropagation()},onMouseOut:function(e){this._container.set_alpha(1);e.stopPropagation()},__class__:jaris_player_newcontrols_TVideooPlayerBigButton});var jaris_player_newcontrols_NewControls=function(e){var t=this;openfl_display_MovieClip.call(this);this._stage=openfl_Lib.get_current().stage;this._movieClip=e.get_movieClip();this._player=e;this._darkColor=0;this._brightColor=5000268;this._controlColor=16777215;this._hoverColor=6793409;this._seekColor=8158332;this._controlSize=40;this._percentLoaded=0;this._hideControlsTimer=new openfl_utils_Timer(500);this._hideAspectRatioLabelTimer=new openfl_utils_Timer(500);this._controlsVisible=false;this._textFormat=new openfl_text_TextFormat;this._textFormat.font="arial";this._textFormat.color=this._controlColor;this._textFormat.size=14;this._controlsBar=new openfl_display_Sprite;this._controlsBar.set_visible(true);this.addChild(this._controlsBar);this._controlsBar.addEventListener("mouseDown",function(e){e.stopPropagation()});this._controlsBar.addEventListener("mouseUp",function(e){e.stopPropagation()});this._playControl=new jaris_player_newcontrols_PlayIcon(0,0,0,0,this._controlColor,this._hoverColor);this._controlsBar.addChild(this._playControl);this._pauseControl=new jaris_player_newcontrols_PauseIcon(0,0,0,0,this._controlColor,this._hoverColor);this._pauseControl.set_visible(false);this._controlsBar.addChild(this._pauseControl);this._aspectRatioControl=new jaris_player_newcontrols_AspectRatioIcon(0,0,0,0,this._controlColor,this._hoverColor);this._controlsBar.addChild(this._aspectRatioControl);this._fullscreenControl=new jaris_player_newcontrols_FullscreenIcon(0,0,0,0,this._controlColor,this._hoverColor);this._controlsBar.addChild(this._fullscreenControl);this._volumeIcon=new jaris_player_newcontrols_VolumeIcon(0,0,0,0,this._controlColor,this._hoverColor);this._controlsBar.addChild(this._volumeIcon);this._volumeSlider=new openfl_display_Sprite;this._volumeSlider.set_visible(false);this._controlsBar.addChild(this._volumeSlider);this._volumeTrack=new openfl_display_Sprite;this._volumeTrack.set_visible(false);this._volumeTrack.set_buttonMode(true);this._volumeTrack.useHandCursor=true;this._volumeTrack.set_tabEnabled(false);this._controlsBar.addChild(this._volumeTrack);this._seekBar=new openfl_display_Sprite;this._controlsBar.addChild(this._seekBar);this._trackDownloaded=new openfl_display_Sprite;this._trackDownloaded.set_tabEnabled(false);this._seekBar.addChild(this._trackDownloaded);this._track=new openfl_display_Sprite;this._track.set_tabEnabled(false);this._track.set_buttonMode(true);this._track.useHandCursor=true;this._seekBar.addChild(this._track);this._thumb=new openfl_display_Sprite;this._thumb.set_buttonMode(true);this._thumb.useHandCursor=true;this._thumb.set_tabEnabled(false);this._seekBar.addChild(this._thumb);this._currentPlayTimeLabel=new openfl_text_TextField;this._currentPlayTimeLabel.set_autoSize(1);this._currentPlayTimeLabel.set_text("00:00:00");this._currentPlayTimeLabel.set_tabEnabled(false);this._currentPlayTimeLabel.setTextFormat(this._textFormat);this._seekBar.addChild(this._currentPlayTimeLabel);this._totalPlayTimeLabel=new openfl_text_TextField;this._totalPlayTimeLabel.set_autoSize(1);this._totalPlayTimeLabel.set_text("00:00:00");this._totalPlayTimeLabel.set_tabEnabled(false);this._totalPlayTimeLabel.setTextFormat(this._textFormat);this._seekBar.addChild(this._totalPlayTimeLabel);this._seekPlayTimeLabel=new openfl_text_TextField;this._seekPlayTimeLabel.set_visible(false);this._seekPlayTimeLabel.set_autoSize(1);this._seekPlayTimeLabel.set_text("00:00:00");this._seekPlayTimeLabel.set_tabEnabled(false);this._seekPlayTimeLabel.setTextFormat(this._textFormat);this.addChild(this._seekPlayTimeLabel);this._aspectRatioLabelContainer=new openfl_display_Sprite;this.addChild(this._aspectRatioLabelContainer);this._aspectRatioLabel=new openfl_text_TextField;this._aspectRatioLabel.set_autoSize(0);this._aspectRatioLabel.set_text("original");this._aspectRatioLabel.set_tabEnabled(false);this._aspectRatioLabelContainer.addChild(this._aspectRatioLabel);this._errorContainer=new openfl_display_Sprite;this.addChild(this._errorContainer);this._errorLabel=new openfl_text_TextField;this._errorLabel.set_autoSize(0);this._errorLabel.set_text("");this._errorLabel.set_tabEnabled(false);this._errorLabel.set_multiline(true);this._errorLabel.set_wordWrap(true);this._errorContainer.addChild(this._errorLabel);this.hide_errorLabel();this._bigPlayButton=new jaris_player_newcontrols_TVideooPlayerBigButton("img/videoplayer1/ic_play_circle_fill_white_24dp.png");this.addChild(this._bigPlayButton);this._bigPlayButton.addEventListener("click",function(e){t.onPlayClick(e)});this.redrawControls();this._loader=new jaris_player_newcontrols_Loader(e.get_movieClip());this._loader.hide();var s=["","","",""];s[0]=Std.string(_$UInt_UInt_$Impl_$.toFloat(this._darkColor));s[1]=Std.string(_$UInt_UInt_$Impl_$.toFloat(this._controlColor));s[2]=Std.string(_$UInt_UInt_$Impl_$.toFloat(this._seekColor));this._loader.setColors(s);this.addChild(this._loader);this._movieClip.addEventListener("enterFrame",$bind(this,this.onEnterFrame));this._thumb.addEventListener("mouseDown",$bind(this,this.onThumbMouseDown));this._thumb.addEventListener("mouseUp",$bind(this,this.onThumbMouseUp));this._thumb.addEventListener("mouseOver",$bind(this,this.onThumbHover));this._thumb.addEventListener("mouseOut",$bind(this,this.onThumbMouseOut));this._thumb.addEventListener("mouseMove",$bind(this,this.onTrackMouseMove));this._thumb.addEventListener("mouseOut",$bind(this,this.onTrackMouseOut));this._track.addEventListener("click",$bind(this,this.onTrackClick));this._track.addEventListener("mouseMove",$bind(this,this.onTrackMouseMove));this._track.addEventListener("mouseOut",$bind(this,this.onTrackMouseOut));this._playControl.addEventListener("click",$bind(this,this.onPlayClick));this._pauseControl.addEventListener("click",$bind(this,this.onPauseClick));this._aspectRatioControl.addEventListener("click",$bind(this,this.onAspectRatioClick));this._fullscreenControl.addEventListener("click",$bind(this,this.onFullscreenClick));this._volumeIcon.addEventListener("click",$bind(this,this.onVolumeIconClick));this._volumeTrack.addEventListener("click",$bind(this,this.onVolumeTrackClick));this._player.addEventListener(jaris_events_PlayerEvents.MOUSE_HIDE,$bind(this,this.onPlayerMouseHide));this._player.addEventListener(jaris_events_PlayerEvents.MOUSE_SHOW,$bind(this,this.onPlayerMouseShow));this._player.addEventListener(jaris_events_PlayerEvents.MEDIA_INITIALIZED,$bind(this,this.onPlayerMediaInitialized));this._player.addEventListener(jaris_events_PlayerEvents.BUFFERING,$bind(this,this.onPlayerBuffering));this._player.addEventListener(jaris_events_PlayerEvents.NOT_BUFFERING,$bind(this,this.onPlayerNotBuffering));this._player.addEventListener(jaris_events_PlayerEvents.RESIZE,$bind(this,this.onPlayerResize));this._player.addEventListener(jaris_events_PlayerEvents.PLAY_PAUSE,$bind(this,this.onPlayerPlayPause));this._player.addEventListener(jaris_events_PlayerEvents.PLAYBACK_FINISHED,$bind(this,this.onPlayerPlaybackFinished));this._player.addEventListener(jaris_events_PlayerEvents.CONNECTION_FAILED,$bind(this,this.onPlayerStreamNotFound));this._player.addEventListener(jaris_events_PlayerEvents.ASPECT_RATIO,$bind(this,this.onPlayerAspectRatio));this._player.addEventListener(jaris_events_PlayerEvents.ERROR,$bind(this,this.onError));this._stage.addEventListener("mouseUp",$bind(this,this.onThumbMouseUp));this._stage.addEventListener("mouseOut",$bind(this,this.onThumbMouseUp));this._movieClip.addEventListener("mouseMove",$bind(this,this.onMouseMove));this._movieClip.addEventListener("resize",$bind(this,this.onStageResize));this._hideControlsTimer.addEventListener("timer",$bind(this,this.hideControlsTimer));this._hideAspectRatioLabelTimer.addEventListener("timer",$bind(this,this.hideAspectRatioLabelTimer));this._hideControlsTimer.start()};$hxClasses["jaris.player.newcontrols.NewControls"]=jaris_player_newcontrols_NewControls;jaris_player_newcontrols_NewControls.__name__=["jaris","player","newcontrols","NewControls"];jaris_player_newcontrols_NewControls.__super__=openfl_display_MovieClip;jaris_player_newcontrols_NewControls.prototype=$extend(openfl_display_MovieClip.prototype,{_thumb:null,_track:null,_trackDownloaded:null,_scrubbing:null,_stage:null,_movieClip:null,_player:null,_darkColor:null,_brightColor:null,_seekColor:null,_controlColor:null,_controlSize:null,_hoverColor:null,_hideControlsTimer:null,_hideAspectRatioLabelTimer:null,_currentPlayTimeLabel:null,_totalPlayTimeLabel:null,_seekPlayTimeLabel:null,_percentLoaded:null,_controlsVisible:null,_seekBar:null,_controlsBar:null,_playControl:null,_pauseControl:null,_aspectRatioControl:null,_fullscreenControl:null,_volumeIcon:null,_volumeTrack:null,_volumeSlider:null,_loader:null,_aspectRatioLabelContainer:null,_aspectRatioLabel:null,_textFormat:null,_errorContainer:null,_errorLabel:null,_bigPlayButton:null,hide_errorLabel:function(){if(this._errorContainer.get_visible()){this._errorContainer.set_visible(false)}},show_errorLabel:function(e){this._loader.hide();this._errorContainer.get_graphics().clear();this._errorContainer.set_visible(false);var t=new openfl_text_TextFormat;t.font="arial";t.bold=true;t.size=16;t.color=this._controlColor;this._errorLabel.set_text(e);this._errorLabel.set_width(this._movieClip.get_realWidth()-20);this._errorLabel.setTextFormat(t);this._errorLabel.set_x(this._movieClip.get_realWidth()/2-this._errorLabel.get_width()/2);this._errorLabel.set_y(this._movieClip.get_realHeight()/2-this._errorLabel.get_height()/2);this._errorContainer.set_x(this._errorLabel.get_x()-10);this._errorContainer.set_y(this._errorLabel.get_y()-10);this._errorLabel.set_x(10);this._errorLabel.set_y(10);this._errorContainer.set_visible(true)},hideControlsTimer:function(e){if(this._player.isPlaying()){if(this._controlsVisible){if(!this._movieClip.hitTestPoint(this._stage.get_mouseX(),this._stage.get_mouseY(),true)){this._controlsVisible=false}}else{this.hideControls();this._hideControlsTimer.stop()}}},hideAspectRatioLabelTimer:function(e){if(this._aspectRatioLabelContainer.get_alpha()>=1){jaris_animation_Animation.fadeOut(this._aspectRatioLabelContainer,300);this._hideAspectRatioLabelTimer.stop()}},onEnterFrame:function(e){if(this._player.getDuration()>0){if(this._scrubbing){this._player.seek((this._thumb.get_x()-this._track.get_x())/this._track.get_width()*this._player.getDuration())}else{this._currentPlayTimeLabel.set_text(jaris_utils_Utils.formatTime(this._player.getCurrentTime()));this._currentPlayTimeLabel.setTextFormat(this._textFormat);this._thumb.set_x(this._player.getCurrentTime()/this._player.getDuration()*(this._track.get_width()-this._thumb.get_width())+this._track.get_x())}}this._volumeSlider.set_height(this._volumeTrack.get_height()*(this._player.getVolume()/1));this._volumeSlider.set_y(this._volumeTrack.get_y()+this._volumeTrack.get_height()-this._volumeSlider.get_height());this.drawDownloadProgress()},onMouseMove:function(e){if(!this._hideControlsTimer.running){this._hideControlsTimer.start()}this._controlsVisible=true;this.showControls();e.stopPropagation()},onStageResize:function(e){this.redrawControls()},onPlayClick:function(e){this._player.togglePlay();this._playControl.set_visible(!this._player.isPlaying());this._pauseControl.set_visible(this._player.isPlaying());if(e!=null){e.stopPropagation()}},onPauseClick:function(e){this._player.togglePlay();this._playControl.set_visible(!this._player.isPlaying());this._pauseControl.set_visible(this._player.isPlaying());e.stopPropagation()},onAspectRatioClick:function(e){this._player.toggleAspectRatio();e.stopPropagation()},onFullscreenClick:function(e){this._player._stream.set_displayState(true);e.stopPropagation()},onVolumeIconClick:function(e){if(this._volumeSlider.get_visible()){this._volumeSlider.set_visible(false);this._volumeTrack.set_visible(false)}else{this._volumeSlider.set_visible(true);this._volumeTrack.set_visible(true)}e.stopPropagation()},onVolumeTrackClick:function(e){var t=this._volumeTrack.get_height()-this._volumeTrack.get_mouseY();var s=t/this._volumeTrack.get_height();this._player.setVolume(s);e.stopPropagation()},onPlayerStreamNotFound:function(e){},onPlayerBuffering:function(e){if(this._bigPlayButton.get_visible()){this._bigPlayButton.set_visible(false)}this.hide_errorLabel();this._player.removeEventListener(jaris_events_PlayerEvents.BUFFERING,$bind(this,this.onPlayerBuffering))},onPlayerNotBuffering:function(e){this._loader.hide();this._player.removeEventListener(jaris_events_PlayerEvents.NOT_BUFFERING,$bind(this,this.onPlayerNotBuffering))},onPlayerAspectRatio:function(e){this._hideAspectRatioLabelTimer.stop();this._aspectRatioLabel.set_text(this._player.getAspectRatioString());this.drawAspectRatioLabel();while(this._aspectRatioLabelContainer.get_visible()){}jaris_animation_Animation.fadeIn(this._aspectRatioLabelContainer,1);this._hideAspectRatioLabelTimer.start()},onPlayerPlaybackFinished:function(e){this._playControl.set_visible(!this._player.isPlaying());this._pauseControl.set_visible(this._player.isPlaying());if(!this._bigPlayButton.get_visible()){this._bigPlayButton.set_visible(true)}this.showControls()},onPlayerPlayPause:function(e){this._playControl.set_visible(!this._player.isPlaying());this._pauseControl.set_visible(this._player.isPlaying());if(this._bigPlayButton.get_visible()){this._bigPlayButton.set_visible(false)}},onPlayerResize:function(e){},onPlayerMediaInitialized:function(e){this._totalPlayTimeLabel.set_text(jaris_utils_Utils.formatTime(e.duration));this._totalPlayTimeLabel.setTextFormat(this._textFormat);this._playControl.set_visible(!this._player.isPlaying());this._pauseControl.set_visible(this._player.isPlaying());if(this._bigPlayButton.get_visible()){this._bigPlayButton.set_visible(false)}this.hide_errorLabel()},onPlayerMouseHide:function(e){if(this._controlsBar.get_visible()&&this._player.isFullscreen()){this.hideControls()}},onPlayerMouseShow:function(e){if(this._player.isFullscreen()&&!this._controlsBar.get_visible()){this._controlsBar.set_visible(true)}else if(!this._controlsBar.get_visible()){this._controlsBar.set_visible(true)}},onError:function(e){this.show_errorLabel(e.errinfo)},onTrackClick:function(e){var t=this._track.get_mouseX();this._player.seek(this._player.getDuration()*(t/this._track.get_width()));e.stopPropagation()},onTrackMouseMove:function(e){var t=this._track.get_mouseX();this._seekPlayTimeLabel.set_text(jaris_utils_Utils.formatTime(this._player.getDuration()*(t/this._track.get_width())));this._seekPlayTimeLabel.setTextFormat(this._textFormat);this._seekPlayTimeLabel.set_y(this._movieClip.get_realHeight()-this._seekBar.get_height()-this._seekPlayTimeLabel.get_height()-1);this._seekPlayTimeLabel.set_x(t+this._seekPlayTimeLabel.get_width()/2+(this._playControl.get_width()+10)*2);this._seekPlayTimeLabel.set_backgroundColor(this._darkColor);this._seekPlayTimeLabel.set_background(true);this._seekPlayTimeLabel.set_textColor(this._controlColor);this._seekPlayTimeLabel.set_borderColor(this._darkColor);this._seekPlayTimeLabel.set_border(true);if(!this._seekPlayTimeLabel.get_visible()){this._seekPlayTimeLabel.set_visible(true)}e.stopPropagation()},onTrackMouseOut:function(e){this._seekPlayTimeLabel.set_visible(false);e.stopPropagation()},onThumbMouseDown:function(e){this._scrubbing=true;var t=new openfl_geom_Rectangle(this._track.get_x(),this._track.get_y(),this._track.get_width()-this._thumb.get_width(),0);this._thumb.startDrag(false,t);e.stopPropagation()},onThumbHover:function(e){this._thumb.get_graphics().lineStyle();this._thumb.get_graphics().beginFill(this._hoverColor);this._thumb.get_graphics().drawRoundRect(0,this._seekBar.get_height()/2-5.5,11,11,10,10);this._thumb.get_graphics().endFill();e.stopPropagation()},onThumbMouseOut:function(e){var t=new openfl_geom_Matrix;t.createGradientBox(11,11,jaris_utils_Utils.degreesToRadians(-90),11,0);var s=[this._controlColor,this._controlColor];var i=[.75,1];var a=[0,255];this._thumb.get_graphics().beginGradientFill(0,s,i,a,t);this._thumb.get_graphics().drawRoundRect(0,this._seekBar.get_height()/2-5.5,11,11,10,10);this._thumb.get_graphics().endFill();e.stopPropagation()},onThumbMouseUp:function(e){this._scrubbing=false;this._thumb.stopDrag();e.stopPropagation()},redrawControls:function(){this.drawControls();this.drawAspectRatioLabel()},drawDownloadProgress:function(){if(this._player.getBytesTotal()>0){var e=this._player.getBytesLoaded();var t=this._player.getBytesTotal();this._percentLoaded=e/t}var s=this._player.getStartTime()/this._player.getDuration();var i=(s>0?s*this._track.get_width():0)+this._track.get_x();this._trackDownloaded.get_graphics().clear();this._trackDownloaded.get_graphics().lineStyle();this._trackDownloaded.set_x(i);this._trackDownloaded.get_graphics().beginFill(this._seekColor,.5);this._trackDownloaded.get_graphics().drawRoundRect(0,this._seekBar.get_height()/2-2.5,(this._track.get_width()+this._track.get_x()-this._trackDownloaded.get_x())*this._percentLoaded,5,3,3);this._trackDownloaded.get_graphics().endFill()},drawControls:function(){this._controlsBar.get_graphics().clear();this._volumeTrack.get_graphics().clear();this._volumeSlider.get_graphics().clear();this._volumeSlider.set_visible(false);this._volumeTrack.set_visible(false);this._seekBar.get_graphics().clear();this._track.get_graphics().clear();this._thumb.get_graphics().clear();var e=10;var t=this._movieClip.get_realWidth();var s=this._controlSize;var i=t/2;var a=.8*(s-e*2)|0;this._controlsBar.set_x(0);this._controlsBar.set_y(this._movieClip.get_realHeight()-s);var r=new openfl_geom_Matrix;r.createGradientBox(t,s,jaris_utils_Utils.degreesToRadians(-90),t,0);var _=[this._brightColor,this._darkColor];var n=[1,1];var o=[0,255];this._controlsBar.get_graphics().lineStyle();this._controlsBar.get_graphics().beginGradientFill(0,_,n,o,r);this._controlsBar.get_graphics().drawRect(0,2,t,s-2);this._controlsBar.get_graphics().endFill();this._controlsBar.get_graphics().beginFill(this._darkColor,1);this._controlsBar.get_graphics().drawRect(0,0,t,1);this._controlsBar.get_graphics().endFill();this._controlsBar.get_graphics().beginFill(this._brightColor,1);this._controlsBar.get_graphics().drawRect(0,1,t,1);this._controlsBar.get_graphics().endFill();var l=t-(a+e)*3-(this._playControl.get_x()+this._playControl.get_width()+e)-e;var h=s;this._seekBar.set_x(this._playControl.get_x()+this._playControl.get_width()+e);this._seekBar.set_y(0);this._seekBar.get_graphics().lineStyle();this._seekBar.get_graphics().beginFill(this._darkColor,0);this._seekBar.get_graphics().drawRect(0,0,l,h);this._seekBar.get_graphics().endFill();this._playControl.setNormalColor(this._controlColor);this._playControl.setHoverColor(this._hoverColor);this._playControl.setPosition(e,e);this._playControl.setSize(a+5,a+5);this._pauseControl.setNormalColor(this._controlColor);this._pauseControl.setHoverColor(this._hoverColor);this._pauseControl.setPosition(this._playControl.get_x(),this._playControl.get_y());this._pauseControl.setSize(a+5,a+5);this._textFormat.color=this._seekColor;this._currentPlayTimeLabel.set_x(0);this._currentPlayTimeLabel.set_y(h-h/2-this._currentPlayTimeLabel.get_height()/2);this._currentPlayTimeLabel.set_antiAliasType(0);this._currentPlayTimeLabel.setTextFormat(this._textFormat);this._totalPlayTimeLabel.set_x(l-this._totalPlayTimeLabel.get_width());this._totalPlayTimeLabel.set_y(h-h/2-this._totalPlayTimeLabel.get_height()/2);this._totalPlayTimeLabel.set_antiAliasType(0);this._totalPlayTimeLabel.setTextFormat(this._textFormat);this.drawDownloadProgress();this._track.set_x(this._currentPlayTimeLabel.get_x()+this._currentPlayTimeLabel.get_width()+e);this._track.get_graphics().lineStyle();this._track.get_graphics().beginFill(this._seekColor,0);this._track.get_graphics().drawRect(0,h/2-(a+e)/2,this._totalPlayTimeLabel.get_x()-this._totalPlayTimeLabel.get_width()-e-e,a+e);this._track.get_graphics().endFill();this._track.get_graphics().lineStyle();this._track.get_graphics().beginFill(this._seekColor,.3);this._track.get_graphics().drawRoundRect(0,h/2-2.5,this._totalPlayTimeLabel.get_x()-this._totalPlayTimeLabel.get_width()-e-e,5,3,3);this._track.get_graphics().endFill();var c=new openfl_geom_Matrix;c.createGradientBox(11,11,jaris_utils_Utils.degreesToRadians(-90),11,0);var u=[this._controlColor,this._controlColor];var f=[.75,1];var p=[0,255];this._thumb.set_x(this._currentPlayTimeLabel.get_width()+this._currentPlayTimeLabel.get_x()+e);this._thumb.get_graphics().lineStyle();this._thumb.get_graphics().beginGradientFill(0,u,f,p,c);this._thumb.get_graphics().drawRoundRect(0,h/2-5.5,11,11,10,10);this._thumb.get_graphics().endFill();this._volumeIcon.setNormalColor(this._controlColor);this._volumeIcon.setHoverColor(this._hoverColor);this._volumeIcon.setPosition(this._seekBar.get_x()+this._seekBar.get_width()+e,this._playControl.get_y()+1);this._volumeIcon.setSize(a,a);this._aspectRatioControl.setNormalColor(this._controlColor);this._aspectRatioControl.setHoverColor(this._hoverColor);this._aspectRatioControl.setPosition(this._volumeIcon.get_x()+this._volumeIcon.get_width()+e,this._playControl.get_y()+1);this._aspectRatioControl.setSize(a,a);this._fullscreenControl.setNormalColor(this._controlColor);this._fullscreenControl.setHoverColor(this._hoverColor);this._fullscreenControl.setPosition(this._aspectRatioControl.get_x()+this._aspectRatioControl.get_width()+e,this._playControl.get_y()+1);this._fullscreenControl.setSize(a,a);this._volumeTrack.set_x(this._controlsBar.get_width()-(a+e)*3);this._volumeTrack.set_y(-this._controlsBar.get_height()-2);this._volumeTrack.get_graphics().lineStyle(1,this._controlColor);this._volumeTrack.get_graphics().beginFill(0,0);this._volumeTrack.get_graphics().drawRect(0,0,a,this._controlsBar.get_height());this._volumeTrack.get_graphics().endFill();var d=new openfl_geom_Matrix;d.createGradientBox(this._volumeTrack.get_width(),this._volumeTrack.get_height(),jaris_utils_Utils.degreesToRadians(-90),this._volumeTrack.get_width(),0);var g=[this._hoverColor,this._hoverColor];var m=[.75,1];var v=[0,255];this._volumeSlider.set_x(this._volumeTrack.get_x());this._volumeSlider.set_y(this._volumeTrack.get_y());this._volumeSlider.get_graphics().lineStyle();this._volumeSlider.get_graphics().beginGradientFill(0,g,m,v,d);this._volumeSlider.get_graphics().drawRect(0,0,this._volumeTrack.get_width(),this._volumeTrack.get_height());this._volumeSlider.get_graphics().endFill();this._bigPlayButton.set_x((this._movieClip.get_realWidth()-this._bigPlayButton.get_width())*.5);this._bigPlayButton.set_y((this._movieClip.get_realHeight()-this._bigPlayButton.get_height())*.5)},drawAspectRatioLabel:function(){this._aspectRatioLabelContainer.get_graphics().clear();this._aspectRatioLabelContainer.set_visible(false);var e=new openfl_text_TextFormat;e.font="arial";e.bold=true;e.size=40;e.color=this._controlColor;this._aspectRatioLabel.setTextFormat(e);this._aspectRatioLabel.set_x(this._movieClip.get_realWidth()/2-this._aspectRatioLabel.get_width()/2);this._aspectRatioLabel.set_y(this._movieClip.get_realHeight()/2-this._aspectRatioLabel.get_height()/2);this._aspectRatioLabelContainer.set_x(this._aspectRatioLabel.get_x()-10);this._aspectRatioLabelContainer.set_y(this._aspectRatioLabel.get_y()-10);this._aspectRatioLabelContainer.get_graphics().lineStyle(0,this._darkColor);this._aspectRatioLabelContainer.get_graphics().beginFill(this._darkColor,1);this._aspectRatioLabelContainer.get_graphics().drawRoundRect(0,0,this._aspectRatioLabel.get_width()+20,this._aspectRatioLabel.get_height()+20,15,15);this._aspectRatioLabelContainer.get_graphics().endFill();this._aspectRatioLabel.set_x(10);this._aspectRatioLabel.set_y(10)},hideControls:function(){if(this._controlsBar.get_visible()){this.drawControls();this._controlsBar.set_visible(false)}},showControls:function(){if(!this._controlsBar.get_visible()){this.drawControls();this._controlsBar.set_visible(true)}},setControlColors:function(e){this._darkColor=e[0].length>0?Std.parseInt(e[0]):0;this._brightColor=e[1].length>0?Std.parseInt(e[1]):5000268;this._controlColor=e[2].length>0?Std.parseInt(e[2]):16777215;this._hoverColor=e[3].length>0?Std.parseInt(e[3]):6793409;this._seekColor=e[4].length>0?Std.parseInt(e[4]):8158332;var t=["",""];t[0]=e[0];t[1]=e[2];t[2]=e[4];this._loader.setColors(t);this.redrawControls()},setControlSize:function(e){if(e==0){return}this._controlSize=e;this.redrawControls()},setDurationLabel:function(e){if(e.indexOf(":")!=-1){this._totalPlayTimeLabel.set_text(e)}else{this._totalPlayTimeLabel.set_text(Std.string(jaris_utils_Utils.formatTime(parseFloat(e))))}this._totalPlayTimeLabel.setTextFormat(this._textFormat)},__class__:jaris_player_newcontrols_NewControls});var jaris_player_newcontrols_PauseIcon=function(e,t,s,i,a,r){openfl_display_Sprite.call(this);this.set_x(e);this.set_y(t);this.set_buttonMode(true);this.useHandCursor=true;this.set_tabEnabled(false);this._width=s;this._height=i;this._normalColor=a;this._hoverColor=r;this.addEventListener("mouseOver",$bind(this,this.onMouseOver));this.addEventListener("mouseOut",$bind(this,this.onMouseOut));this.draw(this._normalColor)};$hxClasses["jaris.player.newcontrols.PauseIcon"]=jaris_player_newcontrols_PauseIcon;jaris_player_newcontrols_PauseIcon.__name__=["jaris","player","newcontrols","PauseIcon"];jaris_player_newcontrols_PauseIcon.__super__=openfl_display_Sprite;jaris_player_newcontrols_PauseIcon.prototype=$extend(openfl_display_Sprite.prototype,{_width:null,_height:null,_normalColor:null,_hoverColor:null,onMouseOver:function(e){this.draw(this._hoverColor);e.stopPropagation()},onMouseOut:function(e){this.draw(this._normalColor);e.stopPropagation()},draw:function(e){this.get_graphics().clear();this.get_graphics().lineStyle(0,e,0);this.get_graphics().beginFill(e,0);this.get_graphics().drawRect(0,0,this._width,this._height);this.get_graphics().endFill();var t=new openfl_geom_Matrix;t.createGradientBox(this._width,this._height,jaris_utils_Utils.degreesToRadians(-90),this._width,0);var s=[e,e];var i=[.75,1];var a=[0,255];this.get_graphics().lineStyle();this.get_graphics().beginGradientFill(0,s,i,a,t);this.get_graphics().drawRoundRect(0,0,.33*this._width,this._height,6,6);this.get_graphics().drawRoundRect(this._width-.33*this._width,0,.33*this._width,this._height,6,6);this.get_graphics().endFill();this.get_graphics().lineStyle();this.get_graphics().beginFill(e,0);this.get_graphics().drawRect(0,0,this._width,this._height);this.get_graphics().endFill()},setNormalColor:function(e){this._normalColor=e;this.draw(this._normalColor)},setHoverColor:function(e){this._hoverColor=e;this.draw(this._hoverColor)},setPosition:function(e,t){this.set_x(e);this.set_y(t);this.draw(this._normalColor)},setSize:function(e,t){this._width=e;this._height=t;this.draw(this._normalColor)},__class__:jaris_player_newcontrols_PauseIcon});var jaris_player_newcontrols_PlayIcon=function(e,t,s,i,a,r){openfl_display_Sprite.call(this);this.set_x(e);this.set_y(t);this.set_buttonMode(true);this.useHandCursor=true;this.set_tabEnabled(false);this._width=s;this._height=i;this._normalColor=a;this._hoverColor=r;this.addEventListener("mouseOver",$bind(this,this.onMouseOver));this.addEventListener("mouseOut",$bind(this,this.onMouseOut));this.draw(this._normalColor)};$hxClasses["jaris.player.newcontrols.PlayIcon"]=jaris_player_newcontrols_PlayIcon;jaris_player_newcontrols_PlayIcon.__name__=["jaris","player","newcontrols","PlayIcon"];jaris_player_newcontrols_PlayIcon.__super__=openfl_display_Sprite;jaris_player_newcontrols_PlayIcon.prototype=$extend(openfl_display_Sprite.prototype,{_width:null,_height:null,_normalColor:null,_hoverColor:null,onMouseOver:function(e){this.draw(this._hoverColor);e.stopPropagation()},onMouseOut:function(e){this.draw(this._normalColor);e.stopPropagation()},draw:function(e){this.get_graphics().clear();this.get_graphics().lineStyle(0,e,0);this.get_graphics().beginFill(e,0);this.get_graphics().drawRect(0,0,this._width,this._height);this.get_graphics().endFill();var t=new openfl_geom_Matrix;t.createGradientBox(this._width,this._height,jaris_utils_Utils.degreesToRadians(-90),this._width,0);var s=[e,e];var i=[.75,1];var a=[0,255];this.get_graphics().lineStyle();this.get_graphics().beginGradientFill(0,s,i,a,t);this.get_graphics().lineTo(0,this._height);this.get_graphics().lineTo(this._width,this._height/2);this.get_graphics().lineTo(0,0);this.get_graphics().endFill()},setNormalColor:function(e){this._normalColor=e;this.draw(this._normalColor)},setHoverColor:function(e){this._hoverColor=e;this.draw(this._hoverColor)},setPosition:function(e,t){this.set_x(e);this.set_y(t);this.draw(this._normalColor)},setSize:function(e,t){this._width=e;this._height=t;this.draw(this._normalColor)},__class__:jaris_player_newcontrols_PlayIcon});var jaris_player_newcontrols_VolumeIcon=function(e,t,s,i,a,r){openfl_display_Sprite.call(this);this.set_x(e);this.set_y(t);this.set_buttonMode(true);this.useHandCursor=true;this.set_tabEnabled(false);this._width=s;this._height=i;this._normalColor=a;this._hoverColor=r;this.addEventListener("mouseOver",$bind(this,this.onMouseOver));this.addEventListener("mouseOut",$bind(this,this.onMouseOut));this.draw(this._normalColor)};$hxClasses["jaris.player.newcontrols.VolumeIcon"]=jaris_player_newcontrols_VolumeIcon;jaris_player_newcontrols_VolumeIcon.__name__=["jaris","player","newcontrols","VolumeIcon"];jaris_player_newcontrols_VolumeIcon.__super__=openfl_display_Sprite;jaris_player_newcontrols_VolumeIcon.prototype=$extend(openfl_display_Sprite.prototype,{_width:null,_height:null,_normalColor:null,_hoverColor:null,onMouseOver:function(e){this.draw(this._hoverColor);e.stopPropagation()},onMouseOut:function(e){this.draw(this._normalColor);e.stopPropagation()},draw:function(e){this.get_graphics().clear();this.get_graphics().lineStyle(0,e,0);this.get_graphics().beginFill(e,0);this.get_graphics().drawRect(0,0,this._width,this._height);this.get_graphics().endFill();var t=new openfl_geom_Matrix;t.createGradientBox(this._width,this._height,jaris_utils_Utils.degreesToRadians(-90),this._width,0);var s=[e,e];var i=[.75,1];var a=[0,255];this.get_graphics().lineStyle();this.get_graphics().beginGradientFill(0,s,i,a,t);this.get_graphics().drawRect(0,.5*this._height/2+1,this._width/2-1,.5*this._height);this.get_graphics().moveTo(this._width/2-1,.5*this._height/2+1);this.get_graphics().lineTo(this._width,0);this.get_graphics().lineTo(this._width,this._height+2);this.get_graphics().lineTo(this._width/2-1,.5*this._height+.5*this._height/2+1);this.get_graphics().endFill()},setNormalColor:function(e){this._normalColor=e;this.draw(this._normalColor)},setHoverColor:function(e){this._hoverColor=e;this.draw(this._hoverColor)},setPosition:function(e,t){this.set_x(e);this.set_y(t);this.draw(this._normalColor)},setSize:function(e,t){this._width=e;this._height=t;this.draw(this._normalColor)},__class__:jaris_player_newcontrols_VolumeIcon});var jaris_utils_Utils=function(){};$hxClasses["jaris.utils.Utils"]=jaris_utils_Utils;jaris_utils_Utils.__name__=["jaris","utils","Utils"];jaris_utils_Utils.degreesToRadians=function(e){return Math.PI/180*e};jaris_utils_Utils.formatTime=function(e){var t="";var s="";var i="";var a="";if(e/60/60>=1){if(Math.floor(e/60)/60<10){i="0"+Math.floor(e/60/60)+":"}else{i=Math.floor(e/60/60)+":"}if(Math.floor(e/60%60)<10){s="0"+Math.floor(e/60%60)+":"}else{s=Math.floor(e/60%60)+":"}if(Math.floor(e%60)<10){t="0"+Math.floor(e%60)}else{t=Std.string(Math.floor(e%60))}}else if(e/60>=1){i="00:";if(Math.floor(e/60)<10){s="0"+Math.floor(e/60)+":"}else{s=Math.floor(e/60)+":"}if(Math.floor(e%60)<10){t="0"+Math.floor(e%60)}else{t=Std.string(Math.floor(e%60))}}else{i="00:";s="00:";if(Math.floor(e)<10){t="0"+Math.floor(e)}else{t=Std.string(Math.floor(e))}}a+=i+s+t;return a};jaris_utils_Utils.rtmpSourceParser=function(e){if(e.indexOf(".flv")!=-1){return e.split(".flv").join("")}else if(e.indexOf(".mp3")!=-1){return"mp3:"+e.split(".mp3").join("")}else if(e.indexOf(".mp4")!=-1){return"mp4:"+e}else if(e.indexOf(".f4v")!=-1){return"mp4:"+e}return e};jaris_utils_Utils.youtubeSourceParse=function(e){return e.split("watch?v=").join("v/")};var js__$Boot_HaxeError=function(e){Error.call(this);this.val=e;this.message=String(e);if(Error.captureStackTrace){Error.captureStackTrace(this,js__$Boot_HaxeError)}};$hxClasses["js._Boot.HaxeError"]=js__$Boot_HaxeError;js__$Boot_HaxeError.__name__=["js","_Boot","HaxeError"];js__$Boot_HaxeError.wrap=function(e){if(e instanceof Error){return e}else{return new js__$Boot_HaxeError(e)}};js__$Boot_HaxeError.__super__=Error;js__$Boot_HaxeError.prototype=$extend(Error.prototype,{val:null,__class__:js__$Boot_HaxeError});var js_Boot=function(){};$hxClasses["js.Boot"]=js_Boot;js_Boot.__name__=["js","Boot"];js_Boot.getClass=function(e){if(e instanceof Array&&e.__enum__==null){return Array}else{var t=e.__class__;if(t!=null){return t}var s=js_Boot.__nativeClassName(e);if(s!=null){return js_Boot.__resolveNativeClass(s)}return null}};js_Boot.__string_rec=function(e,t){if(e==null){return"null"}if(t.length>=5){return"<...>"}var s=typeof e;if(s=="function"&&(e.__name__||e.__ename__)){s="object"}switch(s){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(e.length==2){return e[0]}var i=e[0]+"(";t+="\t";var a=2;var r=e.length;while(a0?",":"")+js_Boot.__string_rec(e[u],t)}l+="]";return l}var f;try{f=e.toString}catch(e){haxe_CallStack.lastException=e;return"???"}if(f!=null&&f!=Object.toString&&typeof f=="function"){var p=e.toString();if(p!="[object Object]"){return p}}var d=null;var g="{\n";t+="\t";var m=e.hasOwnProperty!=null;for(var d in e){if(m&&!e.hasOwnProperty(d)){continue}if(d=="prototype"||d=="__class__"||d=="__super__"||d=="__interfaces__"||d=="__properties__"){continue}if(g.length!=2){g+=", \n"}g+=t+d+" : "+js_Boot.__string_rec(e[d],t)}t=t.substring(1);g+="\n"+t+"}";return g;case"string":return e;default:return String(e)}};js_Boot.__interfLoop=function(e,t){if(e==null){return false}if(e==t){return true}var s=e.__interfaces__;if(s!=null){var i=0;var a=s.length;while(ie.byteLength){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}this.byteLength=this.length;this.byteOffset=this.offset;this.buffer=this.buf};$hxClasses["js.html.compat.DataView"]=js_html_compat_DataView;js_html_compat_DataView.__name__=["js","html","compat","DataView"];js_html_compat_DataView.prototype={buf:null,offset:null,length:null,byteLength:null,byteOffset:null,buffer:null,getInt8:function(e){var t=this.buf.a[this.offset+e];if(t>=128){return t-256}else{return t}},getUint8:function(e){return this.buf.a[this.offset+e]},getInt16:function(e,t){var s=this.getUint16(e,t);if(s>=32768){return s-65536}else{return s}},getUint16:function(e,t){if(t){return this.buf.a[this.offset+e]|this.buf.a[this.offset+e+1]<<8}else{return this.buf.a[this.offset+e]<<8|this.buf.a[this.offset+e+1]}},getInt32:function(e,t){var s=this.offset+e;var i=this.buf.a[s++];var a=this.buf.a[s++];var r=this.buf.a[s++];var _=this.buf.a[s++];if(t){return i|a<<8|r<<16|_<<24}else{return _|r<<8|a<<16|i<<24}},getUint32:function(e,t){var s=this.getInt32(e,t);if(s<0){return s+4294967296}else{return s}},getFloat32:function(e,t){return haxe_io_FPHelper.i32ToFloat(this.getInt32(e,t))},getFloat64:function(e,t){var s=this.getInt32(e,t);var i=this.getInt32(e+4,t);return haxe_io_FPHelper.i64ToDouble(t?s:i,t?i:s)},setInt8:function(e,t){this.buf.a[e+this.offset]=t<0?t+128&255:t&255},setUint8:function(e,t){this.buf.a[e+this.offset]=t&255},setInt16:function(e,t,s){this.setUint16(e,t<0?t+65536:t,s)},setUint16:function(e,t,s){var i=e+this.offset;if(s){this.buf.a[i]=t&255;this.buf.a[i++]=t>>8&255}else{this.buf.a[i++]=t>>8&255;this.buf.a[i]=t&255}},setInt32:function(e,t,s){this.setUint32(e,t,s)},setUint32:function(e,t,s){var i=e+this.offset;if(s){this.buf.a[i++]=t&255;this.buf.a[i++]=t>>8&255;this.buf.a[i++]=t>>16&255;this.buf.a[i++]=t>>>24}else{this.buf.a[i++]=t>>>24;this.buf.a[i++]=t>>16&255;this.buf.a[i++]=t>>8&255;this.buf.a[i++]=t&255}},setFloat32:function(e,t,s){this.setUint32(e,haxe_io_FPHelper.floatToI32(t),s)},setFloat64:function(e,t,s){var i=haxe_io_FPHelper.doubleToI64(t);if(s){this.setUint32(e,i.low);this.setUint32(e,i.high)}else{this.setUint32(e,i.high);this.setUint32(e,i.low)}},__class__:js_html_compat_DataView};var js_html_compat_Float32Array=function(){};$hxClasses["js.html.compat.Float32Array"]=js_html_compat_Float32Array;js_html_compat_Float32Array.__name__=["js","html","compat","Float32Array"];js_html_compat_Float32Array._new=function(e,t,s){var i;if(typeof e=="number"){i=[];var a=0;var r=e;while(a>2}i=[];var u=0;var f=s;while(u>8&255);g.push(b>>16&255);g.push(b>>>24)}i.byteLength=i.length<<2;i.byteOffset=0;i.buffer=new js_html_compat_ArrayBuffer(g)}else{throw new js__$Boot_HaxeError("TODO "+Std.string(e))}i.subarray=js_html_compat_Float32Array._subarray;i.set=js_html_compat_Float32Array._set;return i};js_html_compat_Float32Array._set=function(e,t){if(js_Boot.__instanceof(e.buffer,js_html_compat_ArrayBuffer)){var s=e;if(e.byteLength+t>this.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var i=0;var a=e.byteLength;while(ithis.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var n=0;var o=_.length;while(nthis.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var i=0;var a=e.byteLength;while(ithis.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var n=0;var o=_.length;while(n0){this.loops--;this.stop();this.play();return}else if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){this.parent.buffer.__srcHowl.stop(this.id)}this.completed=true;this.parent.onComplete.dispatch()},getCurrentTime:function(){if(this.id==-1){return 0}if(this.completed){return this.getLength()}else if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){var e=(this.parent.buffer.__srcHowl.seek(this.id)*1e3|0)-this.parent.offset;if(e<0){return 0}return e}return 0},setCurrentTime:function(e){if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){var t=(e+this.parent.offset)/1e3;if(t<0){t=0}this.parent.buffer.__srcHowl.seek(t,this.id)}return e},getGain:function(){return this.gain},setGain:function(e){if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null&&this.id!=-1){this.parent.buffer.__srcHowl.volume(e,this.id)}return this.gain=e},getLength:function(){if(this.length!=0){return this.length}if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){return this.parent.buffer.__srcHowl.duration()*1e3|0}return 0},setLength:function(e){return this.length=e},setLoops:function(e){return this.loops=e},getPosition:function(){return this.position},setPosition:function(e){this.position.x=e.x;this.position.y=e.y;this.position.z=e.z;this.position.w=e.w;if(this.parent.buffer.__srcHowl!=null&&($_=this.parent.buffer.__srcHowl,$bind($_,$_.pos))!=null){this.parent.buffer.__srcHowl.pos(this.position.x,this.position.y,this.position.z,this.id)}return this.position},__class__:lime__$internal_backend_html5_HTML5AudioSource};var lime__$internal_backend_html5_HTML5HTTPRequest=function(){this.validStatus0=new EReg("Tizen","gi").match(window.navigator.userAgent)};$hxClasses["lime._internal.backend.html5.HTML5HTTPRequest"]=lime__$internal_backend_html5_HTML5HTTPRequest;lime__$internal_backend_html5_HTML5HTTPRequest.__name__=["lime","_internal","backend","html5","HTML5HTTPRequest"];lime__$internal_backend_html5_HTML5HTTPRequest.loadImage=function(e){var t=new lime_app_Promise;if(lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests0){lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests++;var e=lime__$internal_backend_html5_HTML5HTTPRequest.requestQueue.pop();var t=e.type;switch(t){case"BINARY":e.instance.__loadData(e.uri,e.promise);break;case"IMAGE":lime__$internal_backend_html5_HTML5HTTPRequest.__loadImage(e.uri,e.promise);break;case"TEXT":e.instance.__loadText(e.uri,e.promise);break;default:lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--}}};lime__$internal_backend_html5_HTML5HTTPRequest.__fixHostname=function(e){if(e==null){return""}else{return e}};lime__$internal_backend_html5_HTML5HTTPRequest.__fixPort=function(e,t){if(e==null||e==""){switch(t){case"ftp:":return"21";case"gopher:":return"70";case"http:":return"80";case"https:":return"443";case"ws:":return"80";case"wss:":return"443";default:return""}}return e};lime__$internal_backend_html5_HTML5HTTPRequest.__fixProtocol=function(e){if(e==null||e==""){return"http:"}else{return e}};lime__$internal_backend_html5_HTML5HTTPRequest.__isSameOrigin=function(e){if(lime__$internal_backend_html5_HTML5HTTPRequest.originElement==null){lime__$internal_backend_html5_HTML5HTTPRequest.originElement=window.document.createElement("a");lime__$internal_backend_html5_HTML5HTTPRequest.originHostname=lime__$internal_backend_html5_HTML5HTTPRequest.__fixHostname(window.location.hostname);lime__$internal_backend_html5_HTML5HTTPRequest.originProtocol=lime__$internal_backend_html5_HTML5HTTPRequest.__fixProtocol(window.location.protocol);lime__$internal_backend_html5_HTML5HTTPRequest.originPort=lime__$internal_backend_html5_HTML5HTTPRequest.__fixPort(window.location.port,lime__$internal_backend_html5_HTML5HTTPRequest.originProtocol)}var t=lime__$internal_backend_html5_HTML5HTTPRequest.originElement;t.href=e;if(t.hostname==""){t.href=t.href}var s=lime__$internal_backend_html5_HTML5HTTPRequest.__fixHostname(t.hostname);var i=lime__$internal_backend_html5_HTML5HTTPRequest.__fixProtocol(t.protocol);var a=lime__$internal_backend_html5_HTML5HTTPRequest.__fixPort(t.port,i);var r=s==""||s==lime__$internal_backend_html5_HTML5HTTPRequest.originHostname;var _=a==""||a==lime__$internal_backend_html5_HTML5HTTPRequest.originPort;if(i!="file:"&&r){return _}else{return false}};lime__$internal_backend_html5_HTML5HTTPRequest.__loadImage=function(e,s){var i=new Image;if(!lime__$internal_backend_html5_HTML5HTTPRequest.__isSameOrigin(e)){i.crossOrigin="Anonymous"}if(lime__$internal_backend_html5_HTML5HTTPRequest.supportsImageProgress==null){lime__$internal_backend_html5_HTML5HTTPRequest.supportsImageProgress="onprogress"in i}if(lime__$internal_backend_html5_HTML5HTTPRequest.supportsImageProgress||StringTools.startsWith(e,"data:")){i.addEventListener("load",function(e){var t=new lime_graphics_ImageBuffer(null,i.width,i.height);t.__srcImage=i;lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--;lime__$internal_backend_html5_HTML5HTTPRequest.processQueue();s.complete(new lime_graphics_Image(t))},false);i.addEventListener("progress",function(e){s.progress(e.loaded,e.total)},false);i.addEventListener("error",function(e){lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--;lime__$internal_backend_html5_HTML5HTTPRequest.processQueue();s.error(e.detail)},false);i.src=e}else{var a=new XMLHttpRequest;a.onload=function(e){lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--;lime__$internal_backend_html5_HTML5HTTPRequest.processQueue();var t=new lime_graphics_Image;t.__fromBytes(haxe_io_Bytes.ofData(a.response),function(e){s.complete(e)})};a.onerror=function(e){s.error(e.message)};a.onprogress=function(e){if(e.lengthComputable){s.progress(e.loaded,e.total)}};a.open("GET",e,true);a.responseType="arraybuffer";a.overrideMimeType("text/plain; charset=x-user-defined");a.send(null)}};lime__$internal_backend_html5_HTML5HTTPRequest.prototype={binary:null,parent:null,request:null,validStatus0:null,init:function(e){this.parent=e},load:function(e,t,s){this.request=new XMLHttpRequest;if(this.parent.method=="POST"){this.request.upload.addEventListener("progress",t,false)}else{this.request.addEventListener("progress",t,false)}this.request.onreadystatechange=s;var i="";if(this.parent.data==null){var a=this.parent.formData.keys();while(a.hasNext()){var r=a.next();if(i.length>0){i+="&"}var _=encodeURIComponent(r)+"=";var n=this.parent.formData;var o=Std.string(__map_reserved[r]!=null?n.getReserved(r):n.h[r]);i+=_+encodeURIComponent(o)}if(this.parent.method=="GET"&&i!=""){if(e.indexOf("?")>-1){e+="&"+i}else{e+="?"+i}i=""}}this.request.open(Std.string(this.parent.method),e,true);if(this.parent.timeout>0){this.request.timeout=this.parent.timeout}if(this.binary){this.request.responseType="arraybuffer"}var l=null;var h=0;var c=this.parent.headers;while(h=200&&i.request.status<400||i.validStatus0&&i.request.status==0)){var t=null;if(i.request.responseType==""){if(i.request.responseText!=null){t=haxe_io_Bytes.ofString(i.request.responseText)}}else if(i.request.response!=null){t=haxe_io_Bytes.ofData(i.request.response)}i.processResponse();s.complete(t)}else{i.processResponse();s.error(i.request.status)}i.request=null;lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--;lime__$internal_backend_html5_HTML5HTTPRequest.processQueue()};this.binary=true;this.load(e,t,a)},__loadText:function(e,t){var s=this;var i=function(e){t.progress(e.loaded,e.total)};var a=function(e){if(s.request.readyState!=4){return}if(s.request.status!=null&&(s.request.status>=200&&s.request.status<=400||s.validStatus0&&s.request.status==0)){s.processResponse();t.complete(s.request.responseText)}else{s.processResponse();t.error(s.request.status)}s.request=null;lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--;lime__$internal_backend_html5_HTML5HTTPRequest.processQueue()};this.binary=false;this.load(e,i,a)},__class__:lime__$internal_backend_html5_HTML5HTTPRequest};var lime__$internal_backend_html5_HTML5Window=function(e){this.unusedTouchesPool=new List;this.scale=1;this.currentTouches=new haxe_ds_IntMap;this.parent=e;this.cursor=lime_ui_MouseCursor.DEFAULT;this.cacheMouseX=0;this.cacheMouseY=0;var t=e.__attributes;if(!Object.prototype.hasOwnProperty.call(t,"context")){t.context={}}this.renderType=t.context.type;if(Object.prototype.hasOwnProperty.call(t,"element")){e.element=t.element}var s=e.element;if(Object.prototype.hasOwnProperty.call(t,"allowHighDPI")&&t.allowHighDPI&&this.renderType!="dom"){this.scale=window.devicePixelRatio}e.__scale=this.scale;this.setWidth=Object.prototype.hasOwnProperty.call(t,"width")?t.width:0;this.setHeight=Object.prototype.hasOwnProperty.call(t,"height")?t.height:0;e.__width=this.setWidth;e.__height=this.setHeight;e.id=lime__$internal_backend_html5_HTML5Window.windowID++;if(js_Boot.__instanceof(s,HTMLCanvasElement)){this.canvas=s}else if(this.renderType=="dom"){this.div=window.document.createElement("div")}else{this.canvas=window.document.createElement("canvas")}if(this.canvas!=null){var i=this.canvas.style;i.setProperty("-webkit-transform","translateZ(0)",null);i.setProperty("transform","translateZ(0)",null)}else if(this.div!=null){var a=this.div.style;a.setProperty("-webkit-transform","translate3D(0,0,0)",null);a.setProperty("transform","translate3D(0,0,0)",null);a.position="relative";a.overflow="hidden";a.setProperty("-webkit-user-select","none",null);a.setProperty("-moz-user-select","none",null);a.setProperty("-ms-user-select","none",null);a.setProperty("-o-user-select","none",null)}if(e.__width==0&&e.__height==0){if(s!=null){e.__width=s.clientWidth;e.__height=s.clientHeight}else{e.__width=window.innerWidth;e.__height=window.innerHeight}this.cacheElementWidth=e.__width;this.cacheElementHeight=e.__height;this.resizeElement=true}if(this.canvas!=null){this.canvas.width=Math.round(e.__width*this.scale);this.canvas.height=Math.round(e.__height*this.scale);this.canvas.style.width=e.__width+"px";this.canvas.style.height=e.__height+"px"}else{this.div.style.width=e.__width+"px";this.div.style.height=e.__height+"px"}if(Object.prototype.hasOwnProperty.call(t,"resizable")&&t.resizable||!Object.prototype.hasOwnProperty.call(t,"width")&&this.setWidth==0&&this.setHeight==0){e.__resizable=true}this.updateSize();if(s!=null){if(this.canvas!=null){if(s!=this.canvas){s.appendChild(this.canvas)}}else{s.appendChild(this.div)}var r=["mousedown","mouseenter","mouseleave","mousemove","mouseup","wheel"];var _=0;while(_16,antialias:l,depth:Object.prototype.hasOwnProperty.call(t,"depth")?t.depth:true,premultipliedAlpha:true,stencil:Object.prototype.hasOwnProperty.call(t,"stencil")&&t.stencil,preserveDrawingBuffer:false};var c=["webgl","experimental-webgl"];if(r){c.unshift("webgl2")}var u=0;while(u0){this.parent.onTextInput.dispatch(t)}lime__$internal_backend_html5_HTML5Window.textInput.value=lime__$internal_backend_html5_HTML5Window.dummyCharacter}},handleMouseEvent:function(e){var t=0;var s=0;if(e.type!="wheel"){if(this.parent.element!=null){if(this.canvas!=null){var i=this.canvas.getBoundingClientRect();t=(e.clientX-i.left)*(this.parent.__width/i.width);s=(e.clientY-i.top)*(this.parent.__height/i.height)}else if(this.div!=null){var a=this.div.getBoundingClientRect();t=e.clientX-a.left;s=e.clientY-a.top}else{var r=this.parent.element.getBoundingClientRect();t=(e.clientX-r.left)*(this.parent.__width/r.width);s=(e.clientY-r.top)*(this.parent.__height/r.height)}}else{t=e.clientX;s=e.clientY}var _=e.type;switch(_){case"mousedown":if(e.currentTarget==this.parent.element){window.addEventListener("mouseup",$bind(this,this.handleMouseEvent))}this.parent.onMouseDown.dispatch(t,s,e.button);if(this.parent.onMouseDown.canceled&&e.cancelable){e.preventDefault()}break;case"mouseenter":if(e.target==this.parent.element){this.parent.onEnter.dispatch();if(this.parent.onEnter.canceled&&e.cancelable){e.preventDefault()}}break;case"mouseleave":if(e.target==this.parent.element){this.parent.onLeave.dispatch();if(this.parent.onLeave.canceled&&e.cancelable){e.preventDefault()}}break;case"mousemove":if(t!=this.cacheMouseX||s!=this.cacheMouseY){this.parent.onMouseMove.dispatch(t,s);this.parent.onMouseMoveRelative.dispatch(t-this.cacheMouseX,s-this.cacheMouseY);if((this.parent.onMouseMove.canceled||this.parent.onMouseMoveRelative.canceled)&&e.cancelable){e.preventDefault()}}break;case"mouseup":window.removeEventListener("mouseup",$bind(this,this.handleMouseEvent));if(e.currentTarget==this.parent.element){e.stopPropagation()}this.parent.onMouseUp.dispatch(t,s,e.button);if(this.parent.onMouseUp.canceled&&e.cancelable){e.preventDefault()}break;default:}this.cacheMouseX=t;this.cacheMouseY=s}else{var n;var o=e.deltaMode;switch(o){case 0:n=lime_ui_MouseWheelMode.PIXELS;break;case 1:n=lime_ui_MouseWheelMode.LINES;break;case 2:n=lime_ui_MouseWheelMode.PAGES;break;default:n=lime_ui_MouseWheelMode.UNKNOWN}this.parent.onMouseWheel.dispatch(e.deltaX,-e.deltaY,n);if(this.parent.onMouseWheel.canceled&&e.cancelable){e.preventDefault()}}},handlePasteEvent:function(e){if(e.clipboardData.types.indexOf("text/plain")>-1){var t=e.clipboardData.getData("text/plain");lime_system_Clipboard.set_text(t);if(this.textInputEnabled){this.parent.onTextInput.dispatch(t)}if(e.cancelable){e.preventDefault()}}},handleResizeEvent:function(e){this.primaryTouch=null;this.updateSize()},handleTouchEvent:function(e){if(e.cancelable){e.preventDefault()}var t=null;if(this.parent.element!=null){if(this.canvas!=null){t=this.canvas.getBoundingClientRect()}else if(this.div!=null){t=this.div.getBoundingClientRect()}else{t=this.parent.element.getBoundingClientRect()}}var s=this.setWidth;var i=this.setHeight;if(s==0||i==0){if(t!=null){s=t.width;i=t.height}else{s=1;i=1}}var a;var r;var _;var n;var o;var l=0;var h=e.changedTouches;while(l=e.width||i.y>=e.height||s==null||s.width<1||s.height<1){return}if(a!=null&&a.get_transparent()){if(r==null){r=new lime_math_Vector2}var n=e.clone();n.copyChannel(a,new lime_math_Rectangle(r.x,r.y,s.width,s.height),new lime_math_Vector2(s.x,s.y),lime_graphics_ImageChannel.ALPHA,lime_graphics_ImageChannel.ALPHA);t=n}lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(e,true);if(!_){if(e.get_transparent()&&t.get_transparent()){e.buffer.__srcContext.clearRect(i.x+e.offsetX,i.y+e.offsetY,s.width+e.offsetX,s.height+e.offsetY)}}lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(t);if(t.buffer.get_src()!=null){e.buffer.__srcContext.globalCompositeOperation="source-over";e.buffer.__srcContext.drawImage(t.buffer.get_src(),s.x+t.offsetX|0,s.y+t.offsetY|0,s.width|0,s.height|0,i.x+e.offsetX|0,i.y+e.offsetY|0,s.width|0,s.height|0)}e.dirty=true;e.version++};lime__$internal_graphics_ImageCanvasUtil.createCanvas=function(e,t,s){var i=e.buffer;if(i.__srcCanvas==null){i.__srcCanvas=window.document.createElement("canvas");i.__srcCanvas.width=t;i.__srcCanvas.height=s;if(!e.get_transparent()){if(!e.get_transparent()){i.__srcCanvas.setAttribute("moz-opaque","true")}i.__srcContext=i.__srcCanvas.getContext("2d",{alpha:false})}else{i.__srcContext=i.__srcCanvas.getContext("2d")}i.__srcContext.imageSmoothingEnabled=false}};lime__$internal_graphics_ImageCanvasUtil.createImageData=function(e){var t=e.buffer;if(t.__srcImageData==null){if(t.data==null){t.__srcImageData=t.__srcContext.getImageData(0,0,t.width,t.height)}else{t.__srcImageData=t.__srcContext.createImageData(t.width,t.height);t.__srcImageData.data.set(t.data)}var s=t.__srcImageData.data.buffer;var i;if(s!=null){i=new Uint8Array(s)}else{i=null}t.data=i}};lime__$internal_graphics_ImageCanvasUtil.fillRect=function(e,t,s,i){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(e);var a;var r;var _;var n;if(i==1){a=s>>16&255;r=s>>8&255;_=s&255;if(e.get_transparent()){n=s>>24&255}else{n=255}}else{a=s>>24&255;r=s>>16&255;_=s>>8&255;if(e.get_transparent()){n=s&255}else{n=255}}if(t.x==0&&t.y==0&&t.width==e.width&&t.height==e.height){if(e.get_transparent()&&n==0){e.buffer.__srcCanvas.width=e.buffer.width;return}}if(n<255){e.buffer.__srcContext.clearRect(t.x+e.offsetX,t.y+e.offsetY,t.width+e.offsetX,t.height+e.offsetY)}if(n>0){e.buffer.__srcContext.fillStyle="rgba("+a+", "+r+", "+_+", "+n/255+")";e.buffer.__srcContext.fillRect(t.x+e.offsetX,t.y+e.offsetY,t.width+e.offsetX,t.height+e.offsetY)}e.dirty=true;e.version++};lime__$internal_graphics_ImageCanvasUtil.getPixel32=function(e,t,s,i){lime__$internal_graphics_ImageCanvasUtil.convertToData(e);return lime__$internal_graphics_ImageDataUtil.getPixel32(e,t,s,i)};lime__$internal_graphics_ImageCanvasUtil.setPixel32=function(e,t,s,i,a){lime__$internal_graphics_ImageCanvasUtil.convertToData(e);lime__$internal_graphics_ImageDataUtil.setPixel32(e,t,s,i,a)};lime__$internal_graphics_ImageCanvasUtil.sync=function(e,t){if(e==null){return}if(e.type==lime_graphics_ImageType.CANVAS&&(e.buffer.__srcCanvas!=null||e.buffer.data!=null)){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(e,t)}else if(e.type==lime_graphics_ImageType.DATA){lime__$internal_graphics_ImageCanvasUtil.convertToData(e,t)}};var lime__$internal_graphics_ImageDataUtil=function(){};$hxClasses["lime._internal.graphics.ImageDataUtil"]=lime__$internal_graphics_ImageDataUtil;lime__$internal_graphics_ImageDataUtil.__name__=["lime","_internal","graphics","ImageDataUtil"];lime__$internal_graphics_ImageDataUtil.colorTransform=function(e,t,s){var i=e.buffer.data;if(i==null){return}var a=e.buffer.format;var r=e.buffer.premultiplied;var _=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(e,t);var n=lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getAlphaTable(s);var o=lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getRedTable(s);var l=lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getGreenTable(s);var h=lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getBlueTable(s);var c;var u;var f;var p=0;var d=_.height;while(p>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((f>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((f>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|f&255&255}}f=(o[f>>>24&255]&255)<<24|(l[f>>>16&255]&255)<<16|(h[f>>>8&255]&255)<<8|n[f&255]&255;if(r){if((f&255)==0){if(f!=0){f=0}}else if((f&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[f&255];f=((f>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((f>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((f>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|f&255&255}}switch(a){case 0:i[u]=f>>>24&255;i[u+1]=f>>>16&255;i[u+2]=f>>>8&255;i[u+3]=f&255;break;case 1:i[u]=f&255;i[u+1]=f>>>24&255;i[u+2]=f>>>16&255;i[u+3]=f>>>8&255;break;case 2:i[u]=f>>>8&255;i[u+1]=f>>>16&255;i[u+2]=f>>>24&255;i[u+3]=f&255;break}}}e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.copyChannel=function(e,t,s,i,a,r){var _;switch(r[1]){case 0:_=0;break;case 1:_=1;break;case 2:_=2;break;case 3:_=3;break}var n;switch(a[1]){case 0:n=0;break;case 1:n=1;break;case 2:n=2;break;case 3:n=3;break}var o=t.buffer.data;var l=e.buffer.data;if(o==null||l==null){return}var h=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(t,s);var c=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(e,new lime_math_Rectangle(i.x,i.y,h.width,h.height));var u=t.buffer.format;var f=e.buffer.format;var p=t.buffer.premultiplied;var d=e.buffer.premultiplied;var g;var m;var v;var b;var y=0;var x=0;var P=c.height;while(x>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((v>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((v>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|v&255&255}}switch(f){case 0:b=(l[m]&255)<<24|(l[m+1]&255)<<16|(l[m+2]&255)<<8|l[m+3]&255;break;case 1:b=(l[m+1]&255)<<24|(l[m+2]&255)<<16|(l[m+3]&255)<<8|l[m]&255;break;case 2:b=(l[m+2]&255)<<24|(l[m+1]&255)<<16|(l[m]&255)<<8|l[m+3]&255;break}if(d){if((b&255)!=0&&(b&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(b&255);b=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((b>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((b>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((b>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|b&255&255}}switch(n){case 0:y=v>>>24&255;break;case 1:y=v>>>16&255;break;case 2:y=v>>>8&255;break;case 3:y=v&255;break}switch(_){case 0:b=(y&255)<<24|(b>>>16&255&255)<<16|(b>>>8&255&255)<<8|b&255&255;break;case 1:b=(b>>>24&255&255)<<24|(y&255)<<16|(b>>>8&255&255)<<8|b&255&255;break;case 2:b=(b>>>24&255&255)<<24|(b>>>16&255&255)<<16|(y&255)<<8|b&255&255;break;case 3:b=(b>>>24&255&255)<<24|(b>>>16&255&255)<<16|(b>>>8&255&255)<<8|y&255;break}if(d){if((b&255)==0){if(b!=0){b=0}}else if((b&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[b&255];b=((b>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((b>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((b>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|b&255&255}}switch(f){case 0:l[m]=b>>>24&255;l[m+1]=b>>>16&255;l[m+2]=b>>>8&255;l[m+3]=b&255;break;case 1:l[m]=b&255;l[m+1]=b>>>24&255;l[m+2]=b>>>16&255;l[m+3]=b>>>8&255;break;case 2:l[m]=b>>>8&255;l[m+1]=b>>>16&255;l[m+2]=b>>>24&255;l[m+3]=b&255;break}g+=4;m+=4}}e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.copyPixels=function(e,t,s,i,a,r,_){if(_==null){_=false}if(e.width==t.width&&e.height==t.height&&s.width==t.width&&s.height==t.height&&s.x==0&&s.y==0&&i.x==0&&i.y==0&&a==null&&r==null&&_==false&&e.get_format()==t.get_format()){e.buffer.data.set(t.buffer.data)}else{var n=t.buffer.data;var o=e.buffer.data;if(n==null||o==null){return}var l=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(t,s);var h=new lime_math_Rectangle(i.x,i.y,l.width,l.height);var c=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(e,h);var u=t.buffer.format;var f=e.buffer.format;var p;var d;var g;var m;var v;var b;var y;var x;var P=t.buffer.premultiplied;var k=e.buffer.premultiplied;var w=t.buffer.bitsPerPixel/8|0;var C=e.buffer.bitsPerPixel/8|0;var T=a!=null&&a.get_transparent();var S=_||T&&!e.get_transparent();if(!T){if(S){var M=0;var $=c.height;while(M<$){var E=M++;p=l.byteOffset+l.stride*E;d=c.byteOffset+c.stride*E;var B=0;var L=c.width;while(B>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|y&255&255}}switch(f){case 0:x=(o[d]&255)<<24|(o[d+1]&255)<<16|(o[d+2]&255)<<8|o[d+3]&255;break;case 1:x=(o[d+1]&255)<<24|(o[d+2]&255)<<16|(o[d+3]&255)<<8|o[d]&255;break;case 2:x=(o[d+2]&255)<<24|(o[d+1]&255)<<16|(o[d]&255)<<8|o[d+3]&255;break}if(k){if((x&255)!=0&&(x&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(x&255);x=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|x&255&255}}g=(y&255)/255;m=(x&255)/255;v=1-g;b=g+m*v;if(b==0){x=0}else{var A=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>24&255)*g+(x>>>24&255)*m*v)/b)];x=(A&255)<<24|(x>>>16&255&255)<<16|(x>>>8&255&255)<<8|x&255&255;var I=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>16&255)*g+(x>>>16&255)*m*v)/b)];x=(x>>>24&255&255)<<24|(I&255)<<16|(x>>>8&255&255)<<8|x&255&255;var D=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>8&255)*g+(x>>>8&255)*m*v)/b)];x=(x>>>24&255&255)<<24|(x>>>16&255&255)<<16|(D&255)<<8|x&255&255;var F=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(b*255)];x=(x>>>24&255&255)<<24|(x>>>16&255&255)<<16|(x>>>8&255&255)<<8|F&255}if(k){if((x&255)==0){if(x!=0){x=0}}else if((x&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[x&255];x=((x>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((x>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((x>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|x&255&255}}switch(f){case 0:o[d]=x>>>24&255;o[d+1]=x>>>16&255;o[d+2]=x>>>8&255;o[d+3]=x&255;break;case 1:o[d]=x&255;o[d+1]=x>>>24&255;o[d+2]=x>>>16&255;o[d+3]=x>>>8&255;break;case 2:o[d]=x>>>8&255;o[d+1]=x>>>16&255;o[d+2]=x>>>24&255;o[d+3]=x&255;break}p+=4;d+=4}}}else if(u==f&&P==k&&w==C){var O=0;var G=c.height;while(O>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|y&255&255}}if(k){if((y&255)==0){if(y!=0){y=0}}else if((y&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[y&255];y=((y>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((y>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((y>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|y&255&255}}switch(f){case 0:o[d]=y>>>24&255;o[d+1]=y>>>16&255;o[d+2]=y>>>8&255;o[d+3]=y&255;break;case 1:o[d]=y&255;o[d+1]=y>>>24&255;o[d+2]=y>>>16&255;o[d+3]=y>>>8&255;break;case 2:o[d]=y>>>8&255;o[d+1]=y>>>16&255;o[d+2]=y>>>24&255;o[d+3]=y&255;break}p+=4;d+=4}}}}else{if(r==null){r=new lime_math_Vector2}var X=a.buffer.data;var Y=a.buffer.format;var q;var K;var J=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(a,new lime_math_Rectangle(r.x,r.y,a.width,a.height));J.offset(l.x,l.y);c.clip(i.x|0,i.y|0,J.width,J.height);if(S){var Z=0;var Q=c.height;while(Z>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|y&255&255}}switch(f){case 0:x=(o[d]&255)<<24|(o[d+1]&255)<<16|(o[d+2]&255)<<8|o[d+3]&255;break;case 1:x=(o[d+1]&255)<<24|(o[d+2]&255)<<16|(o[d+3]&255)<<8|o[d]&255;break;case 2:x=(o[d+2]&255)<<24|(o[d+1]&255)<<16|(o[d]&255)<<8|o[d+3]&255;break}if(k){if((x&255)!=0&&(x&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(x&255);x=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((x>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|x&255&255}}switch(Y){case 0:K=(X[q]&255)<<24|(X[q+1]&255)<<16|(X[q+2]&255)<<8|X[q+3]&255;break;case 1:K=(X[q+1]&255)<<24|(X[q+2]&255)<<16|(X[q+3]&255)<<8|X[q]&255;break;case 2:K=(X[q+2]&255)<<24|(X[q+1]&255)<<16|(X[q]&255)<<8|X[q+3]&255;break}g=(K&255)/255*((y&255)/255);if(g>0){m=(x&255)/255;v=1-g;b=g+m*v;var ae=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>24&255)*g+(x>>>24&255)*m*v)/b)];x=(ae&255)<<24|(x>>>16&255&255)<<16|(x>>>8&255&255)<<8|x&255&255;var re=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>16&255)*g+(x>>>16&255)*m*v)/b)];x=(x>>>24&255&255)<<24|(re&255)<<16|(x>>>8&255&255)<<8|x&255&255;var _e=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((y>>>8&255)*g+(x>>>8&255)*m*v)/b)];x=(x>>>24&255&255)<<24|(x>>>16&255&255)<<16|(_e&255)<<8|x&255&255;var ne=lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round(b*255)];x=(x>>>24&255&255)<<24|(x>>>16&255&255)<<16|(x>>>8&255&255)<<8|ne&255;if(k){if((x&255)==0){if(x!=0){x=0}}else if((x&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[x&255];x=((x>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((x>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((x>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|x&255&255}}switch(f){case 0:o[d]=x>>>24&255;o[d+1]=x>>>16&255;o[d+2]=x>>>8&255;o[d+3]=x&255;break;case 1:o[d]=x&255;o[d+1]=x>>>24&255;o[d+2]=x>>>16&255;o[d+3]=x>>>8&255;break;case 2:o[d]=x>>>8&255;o[d+1]=x>>>16&255;o[d+2]=x>>>24&255;o[d+3]=x&255;break}}p+=4;d+=4;q+=4}}}else{var oe=0;var le=c.height;while(oe>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|y&255&255}}switch(Y){case 0:K=(X[q]&255)<<24|(X[q+1]&255)<<16|(X[q+2]&255)<<8|X[q+3]&255;break;case 1:K=(X[q+1]&255)<<24|(X[q+2]&255)<<16|(X[q+3]&255)<<8|X[q]&255;break;case 2:K=(X[q+2]&255)<<24|(X[q+1]&255)<<16|(X[q]&255)<<8|X[q+3]&255;break}var pe=Math.round((y&255)*((K&255)/255));y=(y>>>24&255&255)<<24|(y>>>16&255&255)<<16|(y>>>8&255&255)<<8|pe&255;if(k){if((y&255)==0){if(y!=0){y=0}}else if((y&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[y&255];y=((y>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((y>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((y>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|y&255&255}}switch(f){case 0:o[d]=y>>>24&255;o[d+1]=y>>>16&255;o[d+2]=y>>>8&255;o[d+3]=y&255;break;case 1:o[d]=y&255;o[d+1]=y>>>24&255;o[d+2]=y>>>16&255;o[d+3]=y>>>8&255;break;case 2:o[d]=y>>>8&255;o[d+1]=y>>>16&255;o[d+2]=y>>>24&255;o[d+3]=y&255;break}p+=4;d+=4;q+=4}}}}}e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.fillRect=function(e,t,s,i){var a;switch(i){case 1:var r=s;var _=0;var n=_;n=(r>>>16&255&255)<<24|(r>>>8&255&255)<<16|(r&255&255)<<8|r>>>24&255&255;a=n;break;case 2:var o=s;var l=0;var h=l;h=(o>>>8&255&255)<<24|(o>>>16&255&255)<<16|(o>>>24&255&255)<<8|o&255&255;a=h;break;default:a=s}if(!e.get_transparent()){a=(a>>>24&255&255)<<24|(a>>>16&255&255)<<16|(a>>>8&255&255)<<8|255}var c=e.buffer.data;if(c==null){return}var u=e.buffer.format;var f=e.buffer.premultiplied;if(f){if((a&255)==0){if(a!=0){a=0}}else if((a&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[a&255];a=((a>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((a>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((a>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|a&255&255}}var p=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(e,t);var d;var g=0;var m=p.height;while(g>>24&255;c[P+1]=a>>>16&255;c[P+2]=a>>>8&255;c[P+3]=a&255;break;case 1:c[P]=a&255;c[P+1]=a>>>24&255;c[P+2]=a>>>16&255;c[P+3]=a>>>8&255;break;case 2:c[P]=a>>>8&255;c[P+1]=a>>>16&255;c[P+2]=a>>>24&255;c[P+3]=a&255;break}}}e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.gaussianBlur=function(e,t,s,i,a,r,_,n,o){if(n==null){n=1}if(_==null){_=1}if(r==null){r=4}if(a==null){a=4}var l=e.get_premultiplied();var h=t.get_premultiplied();if(l){e.set_premultiplied(false)}if(h){t.set_premultiplied(false)}var c=e.get_data();var u=t.get_data();var f=s.width|0;var p=s.height|0;var d=a|0;var g=r|0;var m=i.x|0;var v=i.y|0;var b=_*2-1;var y=Math.pow(2,_)*.125;var x=lime__$internal_graphics_ImageDataUtil.__getBoxesForGaussianBlur(d*y,b);var P=lime__$internal_graphics_ImageDataUtil.__getBoxesForGaussianBlur(g*y,b);var k=(f*v+m)*4|0;lime__$internal_graphics_ImageDataUtil.__boxBlur(u,c,f,p,(x[0]-1)/2,(P[0]-1)/2);var w=1;var C=0;var T=b/2|0;while(C=0){M=f-1;while(M>=0){lime__$internal_graphics_ImageDataUtil.__translatePixel(c,t.get_rect(),e.get_rect(),i,M,$,n);--M}--$}}}e.dirty=true;e.version++;t.dirty=true;t.version++;if(l){e.set_premultiplied(true)}if(h){t.set_premultiplied(true)}if(c==e.get_data()){return e}return t};lime__$internal_graphics_ImageDataUtil.getPixel32=function(e,t,s,i){var a;var r=e.buffer.data;var _=4*(s+e.offsetY)*e.buffer.width+(t+e.offsetX)*4;var n=e.buffer.premultiplied;switch(e.buffer.format){case 0:a=(r[_]&255)<<24|(r[_+1]&255)<<16|(r[_+2]&255)<<8|r[_+3]&255;break;case 1:a=(r[_+1]&255)<<24|(r[_+2]&255)<<16|(r[_+3]&255)<<8|r[_]&255;break;case 2:a=(r[_+2]&255)<<24|(r[_+1]&255)<<16|(r[_]&255)<<8|r[_+3]&255;break}if(n){if((a&255)!=0&&(a&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(a&255);a=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|a&255&255}}switch(i){case 1:var o=0;var l=o;l=(a&255&255)<<24|(a>>>24&255&255)<<16|(a>>>16&255&255)<<8|a>>>8&255&255;return l;case 2:var h=0;var c=h;c=(a>>>8&255&255)<<24|(a>>>16&255&255)<<16|(a>>>24&255&255)<<8|a&255&255;return c;default:return a}};lime__$internal_graphics_ImageDataUtil.multiplyAlpha=function(e){var t=e.buffer.data;if(t==null||!e.buffer.transparent){return}var s=e.buffer.format;var i=t.length/4|0;var a;var r=0;var _=i;while(r<_){var n=r++;var o=n*4;switch(s){case 0:a=(t[o]&255)<<24|(t[o+1]&255)<<16|(t[o+2]&255)<<8|t[o+3]&255;break;case 1:a=(t[o+1]&255)<<24|(t[o+2]&255)<<16|(t[o+3]&255)<<8|t[o]&255;break;case 2:a=(t[o+2]&255)<<24|(t[o+1]&255)<<16|(t[o]&255)<<8|t[o+3]&255;break}var l=n*4;if((a&255)==0){if(a!=0){a=0}}else if((a&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[a&255];a=((a>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((a>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((a>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|a&255&255}switch(s){case 0:t[l]=a>>>24&255;t[l+1]=a>>>16&255;t[l+2]=a>>>8&255;t[l+3]=a&255;break;case 1:t[l]=a&255;t[l+1]=a>>>24&255;t[l+2]=a>>>16&255;t[l+3]=a>>>8&255;break;case 2:t[l]=a>>>8&255;t[l+1]=a>>>16&255;t[l+2]=a>>>24&255;t[l+3]=a&255;break}}e.buffer.premultiplied=true;e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.setFormat=function(e,t){var s=e.buffer.data;if(s==null){return}var i;var a;var r=s.length/4|0;var _;var n;var o;var l;var h;var c;var u;var f;var p;var d;var g;var m;var v=e.get_format();switch(v){case 0:_=0;n=1;o=2;l=3;break;case 1:_=1;n=2;o=3;l=0;break;case 2:_=2;n=1;o=0;l=3;break}switch(t){case 0:h=0;c=1;u=2;f=3;break;case 1:h=1;c=2;u=3;f=0;break;case 2:h=2;c=1;u=0;f=3;break}var b=0;var y=r;while(b>>16&255&255)<<24|(_>>>8&255&255)<<16|(_&255&255)<<8|_>>>24&255&255;r=o;break;case 2:var l=i;var h=0;var c=h;c=(l>>>8&255&255)<<24|(l>>>16&255&255)<<16|(l>>>24&255&255)<<8|l&255&255;r=c;break;default:r=i}if(!e.get_transparent()){r=(r>>>24&255&255)<<24|(r>>>16&255&255)<<16|(r>>>8&255&255)<<8|255}var u=e.buffer.data;var f=4*(s+e.offsetY)*e.buffer.width+(t+e.offsetX)*4;if(e.buffer.premultiplied){if((r&255)==0){if(r!=0){r=0}}else if((r&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[r&255];r=((r>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((r>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((r>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|r&255&255}}switch(e.buffer.format){case 0:u[f]=r>>>24&255;u[f+1]=r>>>16&255;u[f+2]=r>>>8&255;u[f+3]=r&255;break;case 1:u[f]=r&255;u[f+1]=r>>>24&255;u[f+2]=r>>>16&255;u[f+3]=r>>>8&255;break;case 2:u[f]=r>>>8&255;u[f+1]=r>>>16&255;u[f+2]=r>>>24&255;u[f+3]=r&255;break}e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.unmultiplyAlpha=function(e){var t=e.buffer.data;if(t==null){return}var s=e.buffer.format;var i=t.length/4|0;var a;var r=0;var _=i;while(r<_){var n=r++;var o=n*4;switch(s){case 0:a=(t[o]&255)<<24|(t[o+1]&255)<<16|(t[o+2]&255)<<8|t[o+3]&255;break;case 1:a=(t[o+1]&255)<<24|(t[o+2]&255)<<16|(t[o+3]&255)<<8|t[o]&255;break;case 2:a=(t[o+2]&255)<<24|(t[o+1]&255)<<16|(t[o]&255)<<8|t[o+3]&255;break}if((a&255)!=0&&(a&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(a&255);a=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((a>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|a&255&255}var l=n*4;switch(s){case 0:t[l]=a>>>24&255;t[l+1]=a>>>16&255;t[l+2]=a>>>8&255;t[l+3]=a&255;break;case 1:t[l]=a&255;t[l+1]=a>>>24&255;t[l+2]=a>>>16&255;t[l+3]=a>>>8&255;break;case 2:t[l]=a>>>8&255;t[l+1]=a>>>16&255;t[l+2]=a>>>24&255;t[l+3]=a&255;break}}e.buffer.premultiplied=false;e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.__boxBlur=function(e,t,s,i,a,r){t.set(e);var _=a|0;var n=r|0;lime__$internal_graphics_ImageDataUtil.__boxBlurH(t,e,s,i,_,0);lime__$internal_graphics_ImageDataUtil.__boxBlurH(t,e,s,i,_,1);lime__$internal_graphics_ImageDataUtil.__boxBlurH(t,e,s,i,_,2);lime__$internal_graphics_ImageDataUtil.__boxBlurH(t,e,s,i,_,3);var o=1/(n+n+1);var l=s*4;var h;var c;var u;var f;var p;var d;var g=0;var m=s;while(g=e.width||r>=e.height){_=-1}else{_=4*(r*(e.width|0)+a)}return _};lime__$internal_graphics_ImageDataUtil.__getBoxesForGaussianBlur=function(e,t){var s=Math.sqrt(12*e*e/t+1);var i=Math.floor(s);if(i%2==0){--i}var a=i+2;var r=(12*e*e-t*i*i-4*t*i-3*t)/(-4*i-4);var _=Math.round(r);var n=[];var o=0;var l=t;while(o255?255:l}};var lime__$internal_graphics__$ImageDataUtil_ImageDataView=function(e,t){this.image=e;if(t==null){this.rect=e.get_rect()}else{if(t.x<0){t.x=0}if(t.y<0){t.y=0}if(t.x+t.width>e.width){t.width=e.width-t.x}if(t.y+t.height>e.height){t.height=e.height-t.y}if(t.width<0){t.width=0}if(t.height<0){t.height=0}this.rect=t}this.stride=e.buffer.get_stride();this.__update()};$hxClasses["lime._internal.graphics._ImageDataUtil.ImageDataView"]=lime__$internal_graphics__$ImageDataUtil_ImageDataView;lime__$internal_graphics__$ImageDataUtil_ImageDataView.__name__=["lime","_internal","graphics","_ImageDataUtil","ImageDataView"];lime__$internal_graphics__$ImageDataUtil_ImageDataView.prototype={x:null,y:null,height:null,width:null,byteOffset:null,image:null,rect:null,stride:null,tempRect:null,clip:function(e,t,s,i){if(this.tempRect==null){this.tempRect=new lime_math_Rectangle}this.tempRect.setTo(e,t,s,i);this.rect.intersection(this.tempRect,this.rect);this.__update()},offset:function(e,t){if(e<0){this.rect.x+=e;if(this.rect.x<0){this.rect.x=0}}else{this.rect.x+=e;this.rect.width-=e}if(t<0){this.rect.y+=t;if(this.rect.y<0){this.rect.y=0}}else{this.rect.y+=t;this.rect.height-=t}this.__update()},__update:function(){this.x=Math.ceil(this.rect.x);this.y=Math.ceil(this.rect.y);this.width=Math.floor(this.rect.width);this.height=Math.floor(this.rect.height);this.byteOffset=this.stride*(this.y+this.image.offsetY)+(this.x+this.image.offsetX)*4},__class__:lime__$internal_graphics__$ImageDataUtil_ImageDataView};var lime__$internal_unifill_Exception=function(){};$hxClasses["lime._internal.unifill.Exception"]=lime__$internal_unifill_Exception;lime__$internal_unifill_Exception.__name__=["lime","_internal","unifill","Exception"];lime__$internal_unifill_Exception.prototype={__class__:lime__$internal_unifill_Exception};var lime__$internal_unifill_InvalidCodeUnitSequence=function(e){lime__$internal_unifill_Exception.call(this);this.index=e};$hxClasses["lime._internal.unifill.InvalidCodeUnitSequence"]=lime__$internal_unifill_InvalidCodeUnitSequence;lime__$internal_unifill_InvalidCodeUnitSequence.__name__=["lime","_internal","unifill","InvalidCodeUnitSequence"];lime__$internal_unifill_InvalidCodeUnitSequence.__super__=lime__$internal_unifill_Exception;lime__$internal_unifill_InvalidCodeUnitSequence.prototype=$extend(lime__$internal_unifill_Exception.prototype,{index:null,toString:function(){return"InvalidCodeUnitSequence(index: "+this.index+")"},__class__:lime__$internal_unifill_InvalidCodeUnitSequence});var lime__$internal_unifill_Unifill=function(){};$hxClasses["lime._internal.unifill.Unifill"]=lime__$internal_unifill_Unifill;lime__$internal_unifill_Unifill.__name__=["lime","_internal","unifill","Unifill"];lime__$internal_unifill_Unifill.uCompare=function(e,t){var s;var i;var a;var r;a=0;s=e;i=0;r=e.length;var _;var n;var o;var l;o=0;_=t;n=0;l=t.length;while(ix){return 1}}if(n=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t,s){this.canceled=false;var i=this.__listeners;var a=this.__repeat;var r=0;while(rthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},cancel:function(){this.canceled=true},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t,s){this.canceled=false;var i=this.__listeners;var a=this.__repeat;var r=0;while(rthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t){this.canceled=false;var s=this.__listeners;var i=this.__repeat;var a=0;while(athis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},cancel:function(){this.canceled=true},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t,s){this.canceled=false;var i=this.__listeners;var a=this.__repeat;var r=0;while(rthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t,s){this.canceled=false;var i=this.__listeners;var a=this.__repeat;var r=0;while(rthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},__listeners:null,__class__:lime_app__$Event_$Int_$Float_$Float_$Void};var lime_app__$Event_$Int_$Float_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_Int_Float_Void"]=lime_app__$Event_$Int_$Float_$Void;lime_app__$Event_$Int_$Float_$Void.__name__=["lime","app","_Event_Int_Float_Void"];lime_app__$Event_$Int_$Float_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,s){if(s==null){s=0}if(t==null){t=false}var i=0;var a=this.__priorities.length;while(ithis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t){this.canceled=false;var s=this.__listeners;var i=this.__repeat;var a=0;while(athis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t){this.canceled=false;var s=this.__listeners;var i=this.__repeat;var a=0;while(athis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var s=this.__repeat;var i=0;while(ithis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},__listeners:null,__class__:lime_app__$Event_$Int_$lime_$ui_$JoystickHatPosition_$Void};var lime_app__$Event_$String_$Int_$Int_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_String_Int_Int_Void"]=lime_app__$Event_$String_$Int_$Int_$Void;lime_app__$Event_$String_$Int_$Int_$Void.__name__=["lime","app","_Event_String_Int_Int_Void"];lime_app__$Event_$String_$Int_$Int_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,s){if(s==null){s=0}if(t==null){t=false}var i=0;var a=this.__priorities.length;while(ithis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},__listeners:null,__class__:lime_app__$Event_$String_$Int_$Int_$Void};var lime_app__$Event_$String_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_String_Void"]=lime_app__$Event_$String_$Void;lime_app__$Event_$String_$Void.__name__=["lime","app","_Event_String_Void"];lime_app__$Event_$String_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,s){if(s==null){s=0}if(t==null){t=false}var i=0;var a=this.__priorities.length;while(ithis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},cancel:function(){this.canceled=true},has:function(e){var t=0;var s=this.__listeners;while(t=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var s=this.__repeat;var i=0;while(ithis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(){this.canceled=false;var e=this.__listeners;var t=this.__repeat;var s=0;while(sthis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var s=this.__repeat;var i=0;while(ithis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},cancel:function(){this.canceled=true},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var s=this.__repeat;var i=0;while(ithis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t){this.canceled=false;var s=this.__listeners;var i=this.__repeat;var a=0;while(athis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var s=this.__repeat;var i=0;while(ithis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var s=this.__repeat;var i=0;while(ithis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var s=this.__repeat;var i=0;while(ithis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},cancel:function(){this.canceled=true},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e,t){this.canceled=false;var s=this.__listeners;var i=this.__repeat;var a=0;while(athis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var s=this.__repeat;var i=0;while(ithis.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,s);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(s);this.__repeat.push(!t)},remove:function(e){var t=this.__listeners.length;while(--t>=0)if(Reflect.compareMethods(this.__listeners[t],e)){this.__listeners.splice(t,1);this.__priorities.splice(t,1);this.__repeat.splice(t,1)}},__listeners:null,dispatch:function(e){this.canceled=false;var t=this.__listeners;var s=this.__repeat;var i=0;while(i0&&a>0){var n=this.type;switch(n[1]){case 0:this.buffer=new lime_graphics_ImageBuffer(null,i,a);lime__$internal_graphics_ImageCanvasUtil.createCanvas(this,i,a);if(r!=null&&r!=0){this.fillRect(new lime_math_Rectangle(0,0,i,a),r)}break;case 1:var o=i*a*4;var l;if(o!=null){l=new Uint8Array(o)}else{l=null}this.buffer=new lime_graphics_ImageBuffer(l,i,a);if(r!=null&&r!=0){this.fillRect(new lime_math_Rectangle(0,0,i,a),r)}break;case 2:break;default:}}}else{this.__fromImageBuffer(e)}};$hxClasses["lime.graphics.Image"]=lime_graphics_Image;lime_graphics_Image.__name__=["lime","graphics","Image"];lime_graphics_Image.fromBase64=function(e,t){if(e==null){return null}var s=new lime_graphics_Image;s.__fromBase64(e,t);return s};lime_graphics_Image.fromBitmapData=function(e){if(e==null){return null}return e.image};lime_graphics_Image.fromBytes=function(e){if(e==null){return null}var t=new lime_graphics_Image;if(t.__fromBytes(e)){return t}else{return null}};lime_graphics_Image.fromCanvas=function(e){if(e==null){return null}var t=new lime_graphics_ImageBuffer(null,e.width,e.height);t.set_src(e);var s=new lime_graphics_Image(t);s.type=lime_graphics_ImageType.CANVAS;return s};lime_graphics_Image.fromFile=function(e){if(e==null){return null}var t=new lime_graphics_Image;if(t.__fromFile(e)){return t}else{return null}};lime_graphics_Image.fromImageElement=function(e){if(e==null){return null}var t=new lime_graphics_ImageBuffer(null,e.width,e.height);t.set_src(e);var s=new lime_graphics_Image(t);s.type=lime_graphics_ImageType.CANVAS;return s};lime_graphics_Image.loadFromBase64=function(e,t){if(e==null||t==null){return lime_app_Future.withValue(null)}return lime__$internal_backend_html5_HTML5HTTPRequest.loadImage("data:"+t+";base64,"+e)};lime_graphics_Image.loadFromBytes=function(e){if(e==null){return lime_app_Future.withValue(null)}var t="";if(lime_graphics_Image.__isPNG(e)){t="image/png"}else if(lime_graphics_Image.__isJPG(e)){t="image/jpeg"}else if(lime_graphics_Image.__isGIF(e)){t="image/gif"}else if(lime_graphics_Image.__isWebP(e)){t="image/webp"}else{return lime_app_Future.withValue(null)}return lime_graphics_Image.loadFromBase64(lime_graphics_Image.__base64Encode(e),t)};lime_graphics_Image.loadFromFile=function(e){if(e==null){return lime_app_Future.withValue(null)}return lime__$internal_backend_html5_HTML5HTTPRequest.loadImage(e)};lime_graphics_Image.__base64Encode=function(e){var t;var s=e.length%3;switch(s){case 1:t="==";break;case 2:t="=";break;default:t=""}if(lime_graphics_Image.__base64Encoder==null){lime_graphics_Image.__base64Encoder=new haxe_crypto_BaseCode(haxe_io_Bytes.ofString(lime_graphics_Image.__base64Chars))}return lime_graphics_Image.__base64Encoder.encodeBytes(e).toString()+t};lime_graphics_Image.__isGIF=function(e){if(e==null||e.length<6){return false}var t=e.getString(0,6);if(t!="GIF87a"){return t=="GIF89a"}else{return true}};lime_graphics_Image.__isJPG=function(e){if(e==null||e.length<4){return false}if(e.b[0]==255&&e.b[1]==216&&e.b[e.length-2]==255){return e.b[e.length-1]==217}else{return false}};lime_graphics_Image.__isPNG=function(e){if(e==null||e.length<8){return false}if(e.b[0]==137&&e.b[1]==80&&e.b[2]==78&&e.b[3]==71&&e.b[4]==13&&e.b[5]==10&&e.b[6]==26){return e.b[7]==10}else{return false}};lime_graphics_Image.__isWebP=function(e){if(e==null||e.length<16){return false}if(e.getString(0,4)=="RIFF"){return e.getString(8,4)=="WEBP"}else{return false}};lime_graphics_Image.prototype={buffer:null,dirty:null,height:null,offsetX:null,offsetY:null,type:null,version:null,width:null,clone:function(){if(this.buffer!=null){if(this.type==lime_graphics_ImageType.CANVAS){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this)}else{lime__$internal_graphics_ImageCanvasUtil.convertToData(this)}var e=new lime_graphics_Image(this.buffer.clone(),this.offsetX,this.offsetY,this.width,this.height,null,this.type);e.version=this.version;return e}else{return new lime_graphics_Image(null,this.offsetX,this.offsetY,this.width,this.height,null,this.type)}},colorTransform:function(e,t){e=this.__clipRect(e);if(this.buffer==null||e==null){return}var s=this.type;switch(s[1]){case 0:lime__$internal_graphics_ImageCanvasUtil.colorTransform(this,e,t);break;case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageDataUtil.colorTransform(this,e,t);break;case 2:e.offset(this.offsetX,this.offsetY);this.buffer.__srcBitmapData.colorTransform(e.__toFlashRectangle(),lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__toFlashColorTransform(t));break;default:}},copyChannel:function(e,t,s,i,a){t=this.__clipRect(t);if(this.buffer==null||t==null){return}if(a==lime_graphics_ImageChannel.ALPHA&&!this.get_transparent()){return}if(t.width<=0||t.height<=0){return}if(t.x+t.width>e.width){t.width=e.width-t.x}if(t.y+t.height>e.height){t.height=e.height-t.y}var r=this.type;switch(r[1]){case 0:lime__$internal_graphics_ImageCanvasUtil.copyChannel(this,e,t,s,i,a);break;case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageCanvasUtil.convertToData(e);lime__$internal_graphics_ImageDataUtil.copyChannel(this,e,t,s,i,a);break;case 2:var _;switch(i[1]){case 0:_=1;break;case 1:_=2;break;case 2:_=4;break;case 3:_=8;break}var n;switch(a[1]){case 0:n=1;break;case 1:n=2;break;case 2:n=4;break;case 3:n=8;break}t.offset(e.offsetX,e.offsetY);s.offset(this.offsetX,this.offsetY);this.buffer.__srcBitmapData.copyChannel(e.buffer.get_src(),t.__toFlashRectangle(),s.__toFlashPoint(),_,n);break;default:}},copyPixels:function(e,t,s,i,a,r){if(r==null){r=false}if(this.buffer==null||e==null){return}if(t.width<=0||t.height<=0){return}if(this.width<=0||this.height<=0){return}if(t.x+t.width>e.width){t.width=e.width-t.x}if(t.y+t.height>e.height){t.height=e.height-t.y}if(t.x<0){t.width+=t.x;t.x=0}if(t.y<0){t.height+=t.y;t.y=0}if(s.x+t.width>this.width){t.width=this.width-s.x}if(s.y+t.height>this.height){t.height=this.height-s.y}if(s.x<0){t.width+=s.x;t.x-=s.x;s.x=0}if(s.y<0){t.height+=s.y;t.y-=s.y;s.y=0}if(e==this&&s.x>>24&255&255)<<16|(r>>>16&255&255)<<8|r>>>8&255&255;a=n}else{switch(s){case 1:a=t;break;case 2:var o=t;var l=0;var h=l;h=(o&255&255)<<24|(o>>>8&255&255)<<16|(o>>>16&255&255)<<8|o>>>24&255&255;a=h;break;default:var c=t;var u=0;var f=u;f=(c&255&255)<<24|(c>>>24&255&255)<<16|(c>>>16&255&255)<<8|c>>>8&255&255;a=f}}this.buffer.__srcBitmapData.fillRect(e.__toFlashRectangle(),a);break;default:}},getPixel32:function(e,t,s){if(this.buffer==null||e<0||t<0||e>=this.width||t>=this.height){return 0}var i=this.type;switch(i[1]){case 0:return lime__$internal_graphics_ImageCanvasUtil.getPixel32(this,e,t,s);case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);return lime__$internal_graphics_ImageDataUtil.getPixel32(this,e,t,s);case 2:var a=this.buffer.__srcBitmapData.getPixel32(e+this.offsetX,t+this.offsetY);if(s==null){var r=0;var _=r;_=(a>>>16&255&255)<<24|(a>>>8&255&255)<<16|(a&255&255)<<8|a>>>24&255&255;var n=_;return n}else{switch(s){case 1:return a;case 2:var o=0;var l=o;l=(a&255&255)<<24|(a>>>8&255&255)<<16|(a>>>16&255&255)<<8|a>>>24&255&255;var h=l;return h;default:var c=0;var u=c;u=(a>>>16&255&255)<<24|(a>>>8&255&255)<<16|(a&255&255)<<8|a>>>24&255&255;var f=u;return f}}break;default:return 0}},setPixel32:function(e,t,s,i){if(this.buffer==null||e<0||t<0||e>=this.width||t>=this.height){return}var a=this.type;switch(a[1]){case 0:lime__$internal_graphics_ImageCanvasUtil.setPixel32(this,e,t,s,i);break;case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageDataUtil.setPixel32(this,e,t,s,i);break;case 2:var r;if(i==null){var _=s;var n=0;var o=n;o=(_&255&255)<<24|(_>>>24&255&255)<<16|(_>>>16&255&255)<<8|_>>>8&255&255;r=o}else{switch(i){case 1:r=s;break;case 2:var l=s;var h=0;var c=h;c=(l&255&255)<<24|(l>>>8&255&255)<<16|(l>>>16&255&255)<<8|l>>>24&255&255;r=c;break;default:var u=s;var f=0;var p=f;p=(u&255&255)<<24|(u>>>24&255&255)<<16|(u>>>16&255&255)<<8|u>>>8&255&255;r=p}}this.buffer.__srcBitmapData.setPixel32(e+this.offsetX,t+this.offsetY,r);break;default:}},__clipRect:function(e){if(e==null){return null}if(e.x<0){e.width-=-e.x;e.x=0;if(e.x+e.width<=0){return null}}if(e.y<0){e.height-=-e.y;e.y=0;if(e.y+e.height<=0){return null}}if(e.x+e.width>=this.width){e.width-=e.x+e.width-this.width;if(e.width<=0){return null}}if(e.y+e.height>=this.height){e.height-=e.y+e.height-this.height;if(e.height<=0){return null}}return e},__fromBase64:function(e,t,s){var i=this;var a=new Image;var r=function(e){i.buffer=new lime_graphics_ImageBuffer(null,a.width,a.height);i.buffer.__srcImage=a;i.offsetX=0;i.offsetY=0;i.width=i.buffer.width;i.height=i.buffer.height;if(s!=null){s(i)}};a.addEventListener("load",r,false);a.src="data:"+t+";base64,"+e},__fromBytes:function(e,t){var s="";if(lime_graphics_Image.__isPNG(e)){s="image/png"}else if(lime_graphics_Image.__isJPG(e)){s="image/jpeg"}else if(lime_graphics_Image.__isGIF(e)){s="image/gif"}else{return false}this.__fromBase64(lime_graphics_Image.__base64Encode(e),s,t);return true},__fromFile:function(e,t,s){var i=this;var a=new Image;if(!lime__$internal_backend_html5_HTML5HTTPRequest.__isSameOrigin(e)){a.crossOrigin="Anonymous"}a.onload=function(e){i.buffer=new lime_graphics_ImageBuffer(null,a.width,a.height);i.buffer.__srcImage=a;i.width=a.width;i.height=a.height;if(t!=null){t(i)}};a.onerror=function(e){if(s!=null){s()}};a.src=e;var r=a.complete;return true},__fromImageBuffer:function(e){this.buffer=e;if(e!=null){if(this.width==-1){this.width=e.width}if(this.height==-1){this.height=e.height}}},get_data:function(){if(this.buffer.data==null&&this.buffer.width>0&&this.buffer.height>0){lime__$internal_graphics_ImageCanvasUtil.convertToData(this)}return this.buffer.data},get_format:function(){return this.buffer.format},set_format:function(e){if(this.buffer.format!=e){var t=this.type;if(t[1]==1){lime__$internal_graphics_ImageDataUtil.setFormat(this,e)}}return this.buffer.format=e},get_premultiplied:function(){return this.buffer.premultiplied},set_premultiplied:function(e){if(e&&!this.buffer.premultiplied){var t=this.type;switch(t[1]){case 0:case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageDataUtil.multiplyAlpha(this);break;default:}}else if(!e&&this.buffer.premultiplied){var s=this.type;if(s[1]==1){lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageDataUtil.unmultiplyAlpha(this)}}return e},get_rect:function(){return new lime_math_Rectangle(0,0,this.width,this.height)},get_src:function(){if(this.buffer.__srcCanvas==null&&(this.buffer.data!=null||this.type==lime_graphics_ImageType.DATA)){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this)}return this.buffer.get_src()},get_transparent:function(){if(this.buffer==null){return false}return this.buffer.transparent},set_transparent:function(e){if(this.buffer==null){return false}return this.buffer.transparent=e},__class__:lime_graphics_Image,__properties__:{get_rect:"get_rect",set_transparent:"set_transparent",get_transparent:"get_transparent",get_src:"get_src",set_premultiplied:"set_premultiplied",get_premultiplied:"get_premultiplied",set_format:"set_format",get_format:"get_format",get_data:"get_data"}};var lime_graphics_ImageBuffer=function(e,t,s,i,a){if(i==null){i=32}if(s==null){s=0}if(t==null){t=0}this.data=e;this.width=t;this.height=s;this.bitsPerPixel=i;this.format=a==null?0:a;this.premultiplied=false;this.transparent=true};$hxClasses["lime.graphics.ImageBuffer"]=lime_graphics_ImageBuffer;lime_graphics_ImageBuffer.__name__=["lime","graphics","ImageBuffer"];lime_graphics_ImageBuffer.prototype={bitsPerPixel:null,data:null,format:null,height:null,premultiplied:null,transparent:null,width:null,__srcBitmapData:null,__srcCanvas:null,__srcContext:null,__srcImage:null,__srcImageData:null,clone:function(){var e=new lime_graphics_ImageBuffer(this.data,this.width,this.height,this.bitsPerPixel);if(this.data!=null){var t=this.data.byteLength;var s;if(t!=null){s=new Uint8Array(t)}else{s=null}e.data=s;var i=this.data;var a;if(i!=null){a=new Uint8Array(i)}else{a=null}var r=a;e.data.set(r)}else if(this.__srcImageData!=null){e.__srcCanvas=window.document.createElement("canvas");e.__srcContext=e.__srcCanvas.getContext("2d");e.__srcCanvas.width=this.__srcImageData.width;e.__srcCanvas.height=this.__srcImageData.height;e.__srcImageData=e.__srcContext.createImageData(this.__srcImageData.width,this.__srcImageData.height);var _=new Uint8ClampedArray(this.__srcImageData.data);e.__srcImageData.data.set(_)}else if(this.__srcCanvas!=null){e.__srcCanvas=window.document.createElement("canvas");e.__srcContext=e.__srcCanvas.getContext("2d");e.__srcCanvas.width=this.__srcCanvas.width;e.__srcCanvas.height=this.__srcCanvas.height;e.__srcContext.drawImage(this.__srcCanvas,0,0)}else{e.__srcImage=this.__srcImage}e.bitsPerPixel=this.bitsPerPixel;e.format=this.format;e.premultiplied=this.premultiplied;e.transparent=this.transparent;return e},get_src:function(){if(this.__srcImage!=null){return this.__srcImage}return this.__srcCanvas},set_src:function(e){if(js_Boot.__instanceof(e,Image)){this.__srcImage=e}else if(js_Boot.__instanceof(e,HTMLCanvasElement)){this.__srcCanvas=e;this.__srcContext=this.__srcCanvas.getContext("2d")}return e},get_stride:function(){return this.width*4},__class__:lime_graphics_ImageBuffer,__properties__:{get_stride:"get_stride",set_src:"set_src",get_src:"get_src"}};var lime_graphics_ImageChannel=$hxClasses["lime.graphics.ImageChannel"]={__ename__:["lime","graphics","ImageChannel"],__constructs__:["RED","GREEN","BLUE","ALPHA"]};lime_graphics_ImageChannel.RED=["RED",0];lime_graphics_ImageChannel.RED.toString=$estr;lime_graphics_ImageChannel.RED.__enum__=lime_graphics_ImageChannel;lime_graphics_ImageChannel.GREEN=["GREEN",1];lime_graphics_ImageChannel.GREEN.toString=$estr;lime_graphics_ImageChannel.GREEN.__enum__=lime_graphics_ImageChannel;lime_graphics_ImageChannel.BLUE=["BLUE",2];lime_graphics_ImageChannel.BLUE.toString=$estr;lime_graphics_ImageChannel.BLUE.__enum__=lime_graphics_ImageChannel;lime_graphics_ImageChannel.ALPHA=["ALPHA",3];lime_graphics_ImageChannel.ALPHA.toString=$estr;lime_graphics_ImageChannel.ALPHA.__enum__=lime_graphics_ImageChannel;var lime_graphics_ImageType=$hxClasses["lime.graphics.ImageType"]={__ename__:["lime","graphics","ImageType"],__constructs__:["CANVAS","DATA","FLASH","CUSTOM"]};lime_graphics_ImageType.CANVAS=["CANVAS",0];lime_graphics_ImageType.CANVAS.toString=$estr;lime_graphics_ImageType.CANVAS.__enum__=lime_graphics_ImageType;lime_graphics_ImageType.DATA=["DATA",1];lime_graphics_ImageType.DATA.toString=$estr;lime_graphics_ImageType.DATA.__enum__=lime_graphics_ImageType;lime_graphics_ImageType.FLASH=["FLASH",2];lime_graphics_ImageType.FLASH.toString=$estr;lime_graphics_ImageType.FLASH.__enum__=lime_graphics_ImageType;lime_graphics_ImageType.CUSTOM=["CUSTOM",3];lime_graphics_ImageType.CUSTOM.toString=$estr;lime_graphics_ImageType.CUSTOM.__enum__=lime_graphics_ImageType;var lime_graphics_RenderContext=function(){};$hxClasses["lime.graphics.RenderContext"]=lime_graphics_RenderContext;lime_graphics_RenderContext.__name__=["lime","graphics","RenderContext"];lime_graphics_RenderContext.prototype={attributes:null,canvas2D:null,dom:null,type:null,version:null,webgl:null,webgl2:null,window:null,__class__:lime_graphics_RenderContext};var lime_graphics__$WebGL2RenderContext_WebGL2RenderContext_$Impl_$={};$hxClasses["lime.graphics._WebGL2RenderContext.WebGL2RenderContext_Impl_"]=lime_graphics__$WebGL2RenderContext_WebGL2RenderContext_$Impl_$;lime_graphics__$WebGL2RenderContext_WebGL2RenderContext_$Impl_$.__name__=["lime","graphics","_WebGL2RenderContext","WebGL2RenderContext_Impl_"];lime_graphics__$WebGL2RenderContext_WebGL2RenderContext_$Impl_$.uniform2fv=function(e,t,s,i,a){if(i!=null){e.uniform2fv(t,s,i,a)}else{e.uniform2fv(t,s)}};var lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$={};$hxClasses["lime.graphics._WebGLRenderContext.WebGLRenderContext_Impl_"]=lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$;lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.__name__=["lime","graphics","_WebGLRenderContext","WebGLRenderContext_Impl_"];lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.bufferData=function(e,t,s,i){e.bufferData(t,s,i)};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.texImage2D=function(e,t,s,i,a,r,_,n,o,l){if(n!=null){e.texImage2D(t,s,i,a,r,_,n,o,l)}else{e.texImage2D(t,s,i,a,r,_)}};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix2fv=function(e,t,s,i){e.uniformMatrix2fv(t,s,i)};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix3fv=function(e,t,s,i){e.uniformMatrix3fv(t,s,i)};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix4fv=function(e,t,s,i){e.uniformMatrix4fv(t,s,i)};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.fromWebGL2RenderContext=function(e){return e};var lime_graphics_cairo_Cairo=function(){};$hxClasses["lime.graphics.cairo.Cairo"]=lime_graphics_cairo_Cairo;lime_graphics_cairo_Cairo.__name__=["lime","graphics","cairo","Cairo"];lime_graphics_cairo_Cairo.prototype={__class__:lime_graphics_cairo_Cairo};var lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$={};$hxClasses["lime.graphics.cairo._CairoSurface.CairoSurface_Impl_"]=lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$;lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.__name__=["lime","graphics","cairo","_CairoSurface","CairoSurface_Impl_"];lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.flush=function(e){};var lime_graphics_opengl_GL=function(){};$hxClasses["lime.graphics.opengl.GL"]=lime_graphics_opengl_GL;lime_graphics_opengl_GL.__name__=["lime","graphics","opengl","GL"];var lime_graphics_opengl_ext_KHR_$debug=function(){this.STACK_UNDERFLOW=1284;this.STACK_OVERFLOW=1283;this.CONTEXT_FLAG_DEBUG_BIT=2;this.DEBUG_OUTPUT=37600;this.DEBUG_SEVERITY_LOW=37192;this.DEBUG_SEVERITY_MEDIUM=37191;this.DEBUG_SEVERITY_HIGH=37190;this.DEBUG_LOGGED_MESSAGES=37189;this.MAX_DEBUG_LOGGED_MESSAGES=37188;this.MAX_DEBUG_MESSAGE_LENGTH=37187;this.MAX_LABEL_LENGTH=33512;this.SAMPLER=33510;this.QUERY=33507;this.PROGRAM=33506;this.SHADER=33505;this.BUFFER=33504;this.DEBUG_GROUP_STACK_DEPTH=33389;this.MAX_DEBUG_GROUP_STACK_DEPTH=33388;this.DEBUG_SEVERITY_NOTIFICATION=33387;this.DEBUG_TYPE_POP_GROUP=33386;this.DEBUG_TYPE_PUSH_GROUP=33385;this.DEBUG_TYPE_MARKER=33384;this.DEBUG_TYPE_OTHER=33361;this.DEBUG_TYPE_PERFORMANCE=33360;this.DEBUG_TYPE_PORTABILITY=33359;this.DEBUG_TYPE_UNDEFINED_BEHAVIOR=33358;this.DEBUG_TYPE_DEPRECATED_BEHAVIOR=33357;this.DEBUG_TYPE_ERROR=33356;this.DEBUG_SOURCE_OTHER=33355;this.DEBUG_SOURCE_APPLICATION=33354;this.DEBUG_SOURCE_THIRD_PARTY=33353;this.DEBUG_SOURCE_SHADER_COMPILER=33352;this.DEBUG_SOURCE_WINDOW_SYSTEM=33351;this.DEBUG_SOURCE_API=33350;this.DEBUG_CALLBACK_USER_PARAM=33349;this.DEBUG_CALLBACK_FUNCTION=33348;this.DEBUG_NEXT_LOGGED_MESSAGE_LENGTH=33347;this.DEBUG_OUTPUT_SYNCHRONOUS=33346};$hxClasses["lime.graphics.opengl.ext.KHR_debug"]=lime_graphics_opengl_ext_KHR_$debug;lime_graphics_opengl_ext_KHR_$debug.__name__=["lime","graphics","opengl","ext","KHR_debug"];lime_graphics_opengl_ext_KHR_$debug.prototype={DEBUG_OUTPUT_SYNCHRONOUS:null,DEBUG_NEXT_LOGGED_MESSAGE_LENGTH:null,DEBUG_CALLBACK_FUNCTION:null,DEBUG_CALLBACK_USER_PARAM:null,DEBUG_SOURCE_API:null,DEBUG_SOURCE_WINDOW_SYSTEM:null,DEBUG_SOURCE_SHADER_COMPILER:null,DEBUG_SOURCE_THIRD_PARTY:null,DEBUG_SOURCE_APPLICATION:null,DEBUG_SOURCE_OTHER:null,DEBUG_TYPE_ERROR:null,DEBUG_TYPE_DEPRECATED_BEHAVIOR:null,DEBUG_TYPE_UNDEFINED_BEHAVIOR:null,DEBUG_TYPE_PORTABILITY:null,DEBUG_TYPE_PERFORMANCE:null,DEBUG_TYPE_OTHER:null,DEBUG_TYPE_MARKER:null,DEBUG_TYPE_PUSH_GROUP:null,DEBUG_TYPE_POP_GROUP:null,DEBUG_SEVERITY_NOTIFICATION:null,MAX_DEBUG_GROUP_STACK_DEPTH:null,DEBUG_GROUP_STACK_DEPTH:null,BUFFER:null,SHADER:null,PROGRAM:null,QUERY:null,SAMPLER:null,MAX_LABEL_LENGTH:null,MAX_DEBUG_MESSAGE_LENGTH:null,MAX_DEBUG_LOGGED_MESSAGES:null,DEBUG_LOGGED_MESSAGES:null,DEBUG_SEVERITY_HIGH:null,DEBUG_SEVERITY_MEDIUM:null,DEBUG_SEVERITY_LOW:null,DEBUG_OUTPUT:null,CONTEXT_FLAG_DEBUG_BIT:null,STACK_OVERFLOW:null,STACK_UNDERFLOW:null,__class__:lime_graphics_opengl_ext_KHR_$debug};var lime_math__$ColorMatrix_ColorMatrix_$Impl_$={};$hxClasses["lime.math._ColorMatrix.ColorMatrix_Impl_"]=lime_math__$ColorMatrix_ColorMatrix_$Impl_$;lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__name__=["lime","math","_ColorMatrix","ColorMatrix_Impl_"];lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getAlphaTable=function(e){if(lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable==null){var t=new Uint8Array(256);lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable=t}var s;lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable[0]=0;var i=1;while(i<256){var a=i++;s=Math.floor(a*e[18]+e[19]*255);if(s>255){s=255}if(s<0){s=0}lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable[a]=s}return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable};lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getBlueTable=function(e){if(lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__blueTable==null){var t=new Uint8Array(256);lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__blueTable=t}var s;var i=0;while(i<256){var a=i++;s=Math.floor(a*e[12]+e[14]*255);if(s>255){s=255}if(s<0){s=0}lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__blueTable[a]=s}return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__blueTable};lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getGreenTable=function(e){if(lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__greenTable==null){var t=new Uint8Array(256);lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__greenTable=t}var s;var i=0;while(i<256){var a=i++;s=Math.floor(a*e[6]+e[9]*255);if(s>255){s=255}if(s<0){s=0}lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__greenTable[a]=s}return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__greenTable};lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getRedTable=function(e){if(lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__redTable==null){var t=new Uint8Array(256);lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__redTable=t}var s;var i=0;while(i<256){var a=i++;s=Math.floor(a*e[0]+e[4]*255);if(s>255){s=255}if(s<0){s=0}lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__redTable[a]=s}return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__redTable};lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__toFlashColorTransform=function(e){return null};var lime_math_Matrix3=function(){};$hxClasses["lime.math.Matrix3"]=lime_math_Matrix3;lime_math_Matrix3.__name__=["lime","math","Matrix3"];var lime_math__$Matrix4_Matrix4_$Impl_$={};$hxClasses["lime.math._Matrix4.Matrix4_Impl_"]=lime_math__$Matrix4_Matrix4_$Impl_$;lime_math__$Matrix4_Matrix4_$Impl_$.__name__=["lime","math","_Matrix4","Matrix4_Impl_"];lime_math__$Matrix4_Matrix4_$Impl_$._new=function(e){var t;if(e!=null&&e.length==16){t=e}else{var s=lime_math__$Matrix4_Matrix4_$Impl_$.__identity;var i;if(s!=null){i=new Float32Array(s)}else{i=null}t=i}return t};lime_math__$Matrix4_Matrix4_$Impl_$.append=function(e,t){var s=e[0];var i=e[4];var a=e[8];var r=e[12];var _=e[1];var n=e[5];var o=e[9];var l=e[13];var h=e[2];var c=e[6];var u=e[10];var f=e[14];var p=e[3];var d=e[7];var g=e[11];var m=e[15];var v=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,0);var b=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,4);var y=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,8);var x=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,12);var P=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,1);var k=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,5);var w=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,9);var C=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,13);var T=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,2);var S=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,6);var M=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,10);var $=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,14);var E=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,3);var B=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,7);var L=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,11);var R=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,15);e[0]=s*v+_*b+h*y+p*x;e[1]=s*P+_*k+h*w+p*C;e[2]=s*T+_*S+h*M+p*$;e[3]=s*E+_*B+h*L+p*R;e[4]=i*v+n*b+c*y+d*x;e[5]=i*P+n*k+c*w+d*C;e[6]=i*T+n*S+c*M+d*$;e[7]=i*E+n*B+c*L+d*R;e[8]=a*v+o*b+u*y+g*x;e[9]=a*P+o*k+u*w+g*C;e[10]=a*T+o*S+u*M+g*$;e[11]=a*E+o*B+u*L+g*R;e[12]=r*v+l*b+f*y+m*x;e[13]=r*P+l*k+f*w+m*C;e[14]=r*T+l*S+f*M+m*$;e[15]=r*E+l*B+f*L+m*R};lime_math__$Matrix4_Matrix4_$Impl_$.createOrtho=function(e,t,s,i,a,r,_){var n=1/(s-t);var o=1/(a-i);var l=1/(_-r);e[0]=2*n;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2*o;e[6]=0;e[7]=0;e[8]=0;e[9]=0;e[10]=-2*l;e[11]=0;e[12]=-(t+s)*n;e[13]=-(i+a)*o;e[14]=-(r+_)*l;e[15]=1};lime_math__$Matrix4_Matrix4_$Impl_$.identity=function(e){e[0]=1;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=1;e[6]=0;e[7]=0;e[8]=0;e[9]=0;e[10]=1;e[11]=0;e[12]=0;e[13]=0;e[14]=0;e[15]=1};lime_math__$Matrix4_Matrix4_$Impl_$.get=function(e,t){return e[t]};lime_math__$Matrix4_Matrix4_$Impl_$.set=function(e,t,s){e[t]=s;return s};var lime_math__$RGBA_RGBA_$Impl_$={};$hxClasses["lime.math._RGBA.RGBA_Impl_"]=lime_math__$RGBA_RGBA_$Impl_$;lime_math__$RGBA_RGBA_$Impl_$.__name__=["lime","math","_RGBA","RGBA_Impl_"];var lime_math_Rectangle=function(e,t,s,i){if(i==null){i=0}if(s==null){s=0}if(t==null){t=0}if(e==null){e=0}this.x=e;this.y=t;this.width=s;this.height=i};$hxClasses["lime.math.Rectangle"]=lime_math_Rectangle;lime_math_Rectangle.__name__=["lime","math","Rectangle"];lime_math_Rectangle.prototype={height:null,width:null,x:null,y:null,intersection:function(e,t){if(t==null){t=new lime_math_Rectangle}var s=this.xe.get_right()?e.get_right():this.get_right();if(i<=s){t.setEmpty();return t}var a=this.ye.get_bottom()?e.get_bottom():this.get_bottom();if(r<=a){t.setEmpty();return t}t.x=s;t.y=a;t.width=i-s;t.height=r-a;return t},offset:function(e,t){this.x+=e;this.y+=t},setEmpty:function(){this.x=this.y=this.width=this.height=0},setTo:function(e,t,s,i){this.x=e;this.y=t;this.width=s;this.height=i},__toFlashRectangle:function(){return null},get_bottom:function(){return this.y+this.height},get_right:function(){return this.x+this.width},__class__:lime_math_Rectangle,__properties__:{get_right:"get_right",get_bottom:"get_bottom"}};var lime_math_Vector2=function(e,t){if(t==null){t=0}if(e==null){e=0}this.x=e;this.y=t};$hxClasses["lime.math.Vector2"]=lime_math_Vector2;lime_math_Vector2.__name__=["lime","math","Vector2"];lime_math_Vector2.prototype={x:null,y:null,offset:function(e,t){this.x+=e;this.y+=t},__toFlashPoint:function(){return null},__class__:lime_math_Vector2};var lime_math_Vector4=function(e,t,s,i){if(i==null){i=0}if(s==null){s=0}if(t==null){t=0}if(e==null){e=0}this.w=i;this.x=e;this.y=t;this.z=s};$hxClasses["lime.math.Vector4"]=lime_math_Vector4;lime_math_Vector4.__name__=["lime","math","Vector4"];lime_math_Vector4.prototype={w:null,x:null,y:null,z:null,__class__:lime_math_Vector4};var lime_media_AudioBuffer=function(){};$hxClasses["lime.media.AudioBuffer"]=lime_media_AudioBuffer;lime_media_AudioBuffer.__name__=["lime","media","AudioBuffer"];lime_media_AudioBuffer.fromBase64=function(e){if(e==null){return null}if(e.indexOf(",")==-1){e="data:"+lime_media_AudioBuffer.__getCodec(haxe_crypto_Base64.decode(e))+";base64,"+e}var t=new lime_media_AudioBuffer;t.set_src(new Howl({src:[e],html5:true,preload:false}));return t};lime_media_AudioBuffer.fromBytes=function(e){if(e==null){return null}var t=new lime_media_AudioBuffer;t.set_src(new Howl({src:["data:"+lime_media_AudioBuffer.__getCodec(e)+";base64,"+haxe_crypto_Base64.encode(e)],html5:true,preload:false}));return t};lime_media_AudioBuffer.fromFile=function(e){if(e==null){return null}var t=new lime_media_AudioBuffer;t.__srcHowl=new Howl({src:[e],preload:false});return t};lime_media_AudioBuffer.fromFiles=function(e){var t=new lime_media_AudioBuffer;t.__srcHowl=new Howl({src:e,preload:false});return t};lime_media_AudioBuffer.fromVorbisFile=function(e){return null};lime_media_AudioBuffer.loadFromFile=function(e){var s=new lime_app_Promise;var t=lime_media_AudioBuffer.fromFile(e);if(t!=null){if(t!=null){t.__srcHowl.on("load",function(){s.complete(t)});t.__srcHowl.on("loaderror",function(e,t){s.error(t)});t.__srcHowl.load()}}else{s.error(null)}return s.future};lime_media_AudioBuffer.loadFromFiles=function(e){var t=new lime_app_Promise;var s=lime_media_AudioBuffer.fromFiles(e);if(s!=null){s.__srcHowl.on("load",function(){t.complete(s)});s.__srcHowl.on("loaderror",function(){t.error(null)});s.__srcHowl.load()}else{t.error(null)}return t.future};lime_media_AudioBuffer.__getCodec=function(e){var t=e.getString(0,4);switch(t){case"OggS":return"audio/ogg";case"RIFF":if(e.getString(8,4)=="WAVE"){return"audio/wav"}else{var s=e.b[2];var i=e.b[1];var a=e.b[0];switch(a){case 73:if(i==68){if(s==51){return"audio/mp3"}}break;case 255:switch(i){case 243:case 250:case 251:return"audio/mp3";default:}break;default:}}break;case"fLaC":return"audio/flac";default:var r=e.b[2];var _=e.b[1];var n=e.b[0];switch(n){case 73:if(_==68){if(r==51){return"audio/mp3"}}break;case 255:switch(_){case 243:case 250:case 251:return"audio/mp3";default:}break;default:}}lime_utils_Log.error("Unsupported sound format",{fileName:"AudioBuffer.hx",lineNumber:443,className:"lime.media.AudioBuffer",methodName:"__getCodec"});return null};lime_media_AudioBuffer.prototype={__srcHowl:null,dispose:function(){this.__srcHowl.unload()},get_src:function(){return this.__srcHowl},set_src:function(e){return this.__srcHowl=e},__class__:lime_media_AudioBuffer,__properties__:{set_src:"set_src",get_src:"get_src"}};var lime_media_AudioContext=function(e){if(e!="custom"){if(e==null||e=="web"){try{window.AudioContext=window.AudioContext||window.webkitAudioContext;this.web=new window.AudioContext;this.type="web"}catch(e){haxe_CallStack.lastException=e}}if(this.web==null&&e!="web"){this.html5=new lime_media_HTML5AudioContext;this.type="html5"}}else{this.type="custom"}};$hxClasses["lime.media.AudioContext"]=lime_media_AudioContext;lime_media_AudioContext.__name__=["lime","media","AudioContext"];lime_media_AudioContext.prototype={html5:null,openal:null,type:null,web:null,__class__:lime_media_AudioContext};var lime_media_AudioManager=function(){};$hxClasses["lime.media.AudioManager"]=lime_media_AudioManager;lime_media_AudioManager.__name__=["lime","media","AudioManager"];lime_media_AudioManager.init=function(e){if(lime_media_AudioManager.context==null){if(e==null){lime_media_AudioManager.context=new lime_media_AudioContext;e=lime_media_AudioManager.context;if(e.type=="openal"){var t=e.openal;var s=t.openDevice();var i=t.createContext(s);t.makeContextCurrent(i);t.processContext(i)}}lime_media_AudioManager.context=e}};var lime_media_AudioSource=function(e,t,s,i){if(i==null){i=0}if(t==null){t=0}this.onComplete=new lime_app__$Event_$Void_$Void;this.buffer=e;this.offset=t;this.__backend=new lime__$internal_backend_html5_HTML5AudioSource(this);if(s!=null&&s!=0){this.set_length(s)}this.set_loops(i);if(e!=null){this.init()}};$hxClasses["lime.media.AudioSource"]=lime_media_AudioSource;lime_media_AudioSource.__name__=["lime","media","AudioSource"];lime_media_AudioSource.prototype={onComplete:null,buffer:null,offset:null,__backend:null,dispose:function(){this.__backend.dispose()},init:function(){this.__backend.init()},play:function(){this.__backend.play()},stop:function(){this.__backend.stop()},get_currentTime:function(){return this.__backend.getCurrentTime()},set_currentTime:function(e){return this.__backend.setCurrentTime(e)},get_gain:function(){return this.__backend.getGain()},set_gain:function(e){return this.__backend.setGain(e)},set_length:function(e){return this.__backend.setLength(e)},set_loops:function(e){return this.__backend.setLoops(e)},get_position:function(){return this.__backend.getPosition()},set_position:function(e){return this.__backend.setPosition(e)},__class__:lime_media_AudioSource,__properties__:{set_position:"set_position",get_position:"get_position",set_loops:"set_loops",set_length:"set_length",set_gain:"set_gain",get_gain:"get_gain",set_currentTime:"set_currentTime",get_currentTime:"get_currentTime"}};var lime_media_HTML5AudioContext=function(){};$hxClasses["lime.media.HTML5AudioContext"]=lime_media_HTML5AudioContext;lime_media_HTML5AudioContext.__name__=["lime","media","HTML5AudioContext"];lime_media_HTML5AudioContext.prototype={__class__:lime_media_HTML5AudioContext};var lime_media_OpenALAudioContext=function(){};$hxClasses["lime.media.OpenALAudioContext"]=lime_media_OpenALAudioContext;lime_media_OpenALAudioContext.__name__=["lime","media","OpenALAudioContext"];lime_media_OpenALAudioContext.prototype={createContext:function(e,t){return lime_media_openal_ALC.createContext(e,t)},makeContextCurrent:function(e){return lime_media_openal_ALC.makeContextCurrent(e)},openDevice:function(e){return lime_media_openal_ALC.openDevice(e)},processContext:function(e){lime_media_openal_ALC.processContext(e)},__class__:lime_media_OpenALAudioContext};var lime_media_openal_ALC=function(){};$hxClasses["lime.media.openal.ALC"]=lime_media_openal_ALC;lime_media_openal_ALC.__name__=["lime","media","openal","ALC"];lime_media_openal_ALC.createContext=function(e,t){return null};lime_media_openal_ALC.makeContextCurrent=function(e){return false};lime_media_openal_ALC.openDevice=function(e){return null};lime_media_openal_ALC.processContext=function(e){};var lime_net__$IHTTPRequest=function(){};$hxClasses["lime.net._IHTTPRequest"]=lime_net__$IHTTPRequest;lime_net__$IHTTPRequest.__name__=["lime","net","_IHTTPRequest"];lime_net__$IHTTPRequest.prototype={contentType:null,data:null,enableResponseHeaders:null,followRedirects:null,formData:null,headers:null,method:null,responseHeaders:null,responseStatus:null,timeout:null,uri:null,userAgent:null,withCredentials:null,__class__:lime_net__$IHTTPRequest};var lime_net__$HTTPRequest_AbstractHTTPRequest=function(e){this.uri=e;this.contentType="application/x-www-form-urlencoded";this.followRedirects=true;this.enableResponseHeaders=false;this.formData=new haxe_ds_StringMap;this.headers=[];this.method="GET";this.timeout=3e4;this.withCredentials=false;this.__backend=new lime__$internal_backend_html5_HTML5HTTPRequest;this.__backend.init(this)};$hxClasses["lime.net._HTTPRequest.AbstractHTTPRequest"]=lime_net__$HTTPRequest_AbstractHTTPRequest;lime_net__$HTTPRequest_AbstractHTTPRequest.__name__=["lime","net","_HTTPRequest","AbstractHTTPRequest"];lime_net__$HTTPRequest_AbstractHTTPRequest.__interfaces__=[lime_net__$IHTTPRequest];lime_net__$HTTPRequest_AbstractHTTPRequest.prototype={contentType:null,data:null,enableResponseHeaders:null,followRedirects:null,formData:null,headers:null,method:null,responseData:null,responseHeaders:null,responseStatus:null,timeout:null,uri:null,userAgent:null,withCredentials:null,__backend:null,__class__:lime_net__$HTTPRequest_AbstractHTTPRequest};var lime_net__$HTTPRequest_$Bytes=function(e){lime_net__$HTTPRequest_AbstractHTTPRequest.call(this,e)};$hxClasses["lime.net._HTTPRequest_Bytes"]=lime_net__$HTTPRequest_$Bytes;lime_net__$HTTPRequest_$Bytes.__name__=["lime","net","_HTTPRequest_Bytes"];lime_net__$HTTPRequest_$Bytes.__super__=lime_net__$HTTPRequest_AbstractHTTPRequest;lime_net__$HTTPRequest_$Bytes.prototype=$extend(lime_net__$HTTPRequest_AbstractHTTPRequest.prototype,{fromBytes:function(e){return e},load:function(e){var t=this;if(e!=null){this.uri=e}var s=new lime_app_Promise;var i=this.__backend.loadData(this.uri);i.onProgress($bind(s,s.progress));i.onError($bind(s,s.error));i.onComplete(function(e){t.responseData=t.fromBytes(e);s.complete(t.responseData)});return s.future},__class__:lime_net__$HTTPRequest_$Bytes});var lime_net__$HTTPRequest_$String=function(e){lime_net__$HTTPRequest_AbstractHTTPRequest.call(this,e)};$hxClasses["lime.net._HTTPRequest_String"]=lime_net__$HTTPRequest_$String;lime_net__$HTTPRequest_$String.__name__=["lime","net","_HTTPRequest_String"];lime_net__$HTTPRequest_$String.__super__=lime_net__$HTTPRequest_AbstractHTTPRequest;lime_net__$HTTPRequest_$String.prototype=$extend(lime_net__$HTTPRequest_AbstractHTTPRequest.prototype,{load:function(e){var t=this;if(e!=null){this.uri=e}var s=new lime_app_Promise;var i=this.__backend.loadText(this.uri);i.onProgress($bind(s,s.progress));i.onError($bind(s,s.error));i.onComplete(function(e){t.responseData=e;s.complete(t.responseData)});return s.future},__class__:lime_net__$HTTPRequest_$String});var lime_net_HTTPRequestHeader=function(e,t){if(t==null){t=""}this.name=e;this.value=t};$hxClasses["lime.net.HTTPRequestHeader"]=lime_net_HTTPRequestHeader;lime_net_HTTPRequestHeader.__name__=["lime","net","HTTPRequestHeader"];lime_net_HTTPRequestHeader.prototype={name:null,value:null,__class__:lime_net_HTTPRequestHeader};var lime_net__$HTTPRequest_$lime_$utils_$Bytes=function(e){lime_net__$HTTPRequest_$Bytes.call(this,e)};$hxClasses["lime.net._HTTPRequest_lime_utils_Bytes"]=lime_net__$HTTPRequest_$lime_$utils_$Bytes;lime_net__$HTTPRequest_$lime_$utils_$Bytes.__name__=["lime","net","_HTTPRequest_lime_utils_Bytes"];lime_net__$HTTPRequest_$lime_$utils_$Bytes.__super__=lime_net__$HTTPRequest_$Bytes;lime_net__$HTTPRequest_$lime_$utils_$Bytes.prototype=$extend(lime_net__$HTTPRequest_$Bytes.prototype,{fromBytes:function(e){return lime_utils__$Bytes_Bytes_$Impl_$.fromBytes(e)},__class__:lime_net__$HTTPRequest_$lime_$utils_$Bytes});var lime_net__$HTTPRequest_$openfl_$utils_$ByteArray=function(e){lime_net__$HTTPRequest_$Bytes.call(this,e)};$hxClasses["lime.net._HTTPRequest_openfl_utils_ByteArray"]=lime_net__$HTTPRequest_$openfl_$utils_$ByteArray;lime_net__$HTTPRequest_$openfl_$utils_$ByteArray.__name__=["lime","net","_HTTPRequest_openfl_utils_ByteArray"];lime_net__$HTTPRequest_$openfl_$utils_$ByteArray.__super__=lime_net__$HTTPRequest_$Bytes;lime_net__$HTTPRequest_$openfl_$utils_$ByteArray.prototype=$extend(lime_net__$HTTPRequest_$Bytes.prototype,{fromBytes:function(e){return openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(e)},__class__:lime_net__$HTTPRequest_$openfl_$utils_$ByteArray});var lime_system_Clipboard=function(){};$hxClasses["lime.system.Clipboard"]=lime_system_Clipboard;lime_system_Clipboard.__name__=["lime","system","Clipboard"];lime_system_Clipboard.__properties__={set_text:"set_text",get_text:"get_text"};lime_system_Clipboard.__update=function(){var e=lime_system_Clipboard._text;if(lime_system_Clipboard._text!=e){lime_system_Clipboard.onUpdate.dispatch()}};lime_system_Clipboard.get_text=function(){lime_system_Clipboard.__update();return lime_system_Clipboard._text};lime_system_Clipboard.set_text=function(e){var t=lime_system_Clipboard._text;lime_system_Clipboard._text=e;var s=lime_app_Application.current.__window;if(s!=null){s.__backend.setClipboard(e)}if(lime_system_Clipboard._text!=t){lime_system_Clipboard.onUpdate.dispatch()}return e};var lime_system_Display=function(){};$hxClasses["lime.system.Display"]=lime_system_Display;lime_system_Display.__name__=["lime","system","Display"];lime_system_Display.prototype={bounds:null,currentMode:null,id:null,dpi:null,name:null,supportedModes:null,__class__:lime_system_Display};var lime_system_DisplayMode=function(e,t,s,i){this.width=e;this.height=t;this.refreshRate=s;this.pixelFormat=i};$hxClasses["lime.system.DisplayMode"]=lime_system_DisplayMode;lime_system_DisplayMode.__name__=["lime","system","DisplayMode"];lime_system_DisplayMode.prototype={height:null,pixelFormat:null,refreshRate:null,width:null,__class__:lime_system_DisplayMode};var lime_system_Endian=$hxClasses["lime.system.Endian"]={__ename__:["lime","system","Endian"],__constructs__:["LITTLE_ENDIAN","BIG_ENDIAN"]};lime_system_Endian.LITTLE_ENDIAN=["LITTLE_ENDIAN",0];lime_system_Endian.LITTLE_ENDIAN.toString=$estr;lime_system_Endian.LITTLE_ENDIAN.__enum__=lime_system_Endian;lime_system_Endian.BIG_ENDIAN=["BIG_ENDIAN",1];lime_system_Endian.BIG_ENDIAN.toString=$estr;lime_system_Endian.BIG_ENDIAN.__enum__=lime_system_Endian;var lime_system_Sensor=function(e,t){this.onUpdate=new lime_app__$Event_$Float_$Float_$Float_$Void;this.type=e;this.id=t};$hxClasses["lime.system.Sensor"]=lime_system_Sensor;lime_system_Sensor.__name__=["lime","system","Sensor"];lime_system_Sensor.registerSensor=function(e,t){var s=new lime_system_Sensor(e,t);lime_system_Sensor.sensors.push(s);lime_system_Sensor.sensorByID.h[t]=s;return s};lime_system_Sensor.prototype={id:null,onUpdate:null,type:null,__class__:lime_system_Sensor};var lime_system_SensorType=$hxClasses["lime.system.SensorType"]={__ename__:["lime","system","SensorType"],__constructs__:["ACCELEROMETER"]};lime_system_SensorType.ACCELEROMETER=["ACCELEROMETER",0];lime_system_SensorType.ACCELEROMETER.toString=$estr;lime_system_SensorType.ACCELEROMETER.__enum__=lime_system_SensorType;var lime_system_System=function(){};$hxClasses["lime.system.System"]=lime_system_System;lime_system_System.__name__=["lime","system","System"];lime_system_System.__properties__={get_endianness:"get_endianness"};lime_system_System.embed=$hx_exports["lime"]["embed"]=function(e,t,s,i,a){if(lime_system_System.__applicationEntryPoint==null){return}var r=lime_system_System.__applicationEntryPoint;if(__map_reserved[e]!=null?r.existsReserved(e):r.h.hasOwnProperty(e)){var _=null;if(typeof t=="string"){_=window.document.getElementById(t)}else if(t==null){_=window.document.createElement("div")}else{_=t}if(_==null){window.console.log("[lime.embed] ERROR: Cannot find target element: "+Std.string(t));return}if(s==null){s=0}if(i==null){i=0}if(a==null){a={}}if(Object.prototype.hasOwnProperty.call(a,"background")&&typeof a.background=="string"){var n=StringTools.replace(Std.string(a.background),"#","");if(n.indexOf("0x")>-1){a.background=Std.parseInt(n)}else{a.background=Std.parseInt("0x"+n)}}a.element=_;a.width=s;a.height=i;var o=lime_system_System.__applicationEntryPoint;(__map_reserved[e]!=null?o.getReserved(e):o.h[e])(a)}};lime_system_System.exit=function(e){};lime_system_System.getDisplay=function(e){if(e==0){var t=new lime_system_Display;t.id=0;t.name="Generic Display";t.dpi=96*window.devicePixelRatio;t.currentMode=new lime_system_DisplayMode(window.screen.width,window.screen.height,60,1);t.supportedModes=[t.currentMode];t.bounds=new lime_math_Rectangle(0,0,t.currentMode.width,t.currentMode.height);return t}return null};lime_system_System.getTimer=function(){return window.performance.now()|0};lime_system_System.openURL=function(e,t){if(t==null){t="_blank"}if(e!=null){window.open(e,t)}};lime_system_System.__registerEntryPoint=function(e,t){if(lime_system_System.__applicationEntryPoint==null){lime_system_System.__applicationEntryPoint=new haxe_ds_StringMap}var s=lime_system_System.__applicationEntryPoint;if(__map_reserved[e]!=null){s.setReserved(e,t)}else{s.h[e]=t}};lime_system_System.get_endianness=function(){if(lime_system_System.__endianness==null){var e=new ArrayBuffer(2);var t;if(e!=null){t=new Uint8Array(e,0)}else{t=null}var s=t;var i;if(e!=null){i=new Uint16Array(e,0)}else{i=null}var a=i;s[0]=170;s[1]=187;if(a[0]==43707){lime_system_System.__endianness=lime_system_Endian.BIG_ENDIAN}else{lime_system_System.__endianness=lime_system_Endian.LITTLE_ENDIAN}}return lime_system_System.__endianness};var lime_system_ThreadPool=function(e,t){if(t==null){t=1}if(e==null){e=0}this.onRun=new lime_app__$Event_$haxe_$Function_$Void;this.onError=new lime_app__$Event_$haxe_$Function_$Void;this.onComplete=new lime_app__$Event_$haxe_$Function_$Void;this.doWork=new lime_app__$Event_$haxe_$Function_$Void;this.minThreads=e;this.maxThreads=t;this.currentThreads=0};$hxClasses["lime.system.ThreadPool"]=lime_system_ThreadPool;lime_system_ThreadPool.__name__=["lime","system","ThreadPool"];lime_system_ThreadPool.prototype={currentThreads:null,doWork:null,maxThreads:null,minThreads:null,onComplete:null,onError:null,onRun:null,queue:function(e){this.runWork(e)},sendComplete:function(e){this.onComplete.dispatch(e)},sendError:function(e){this.onError.dispatch(e)},runWork:function(e){this.onRun.dispatch(e);this.doWork.dispatch(e)},__class__:lime_system_ThreadPool};var lime_text_Font=function(e){if(e!=null){this.name=e}if(!this.__init){if(this.ascender==undefined){this.ascender=0}if(this.descender==undefined){this.descender=0}if(this.height==undefined){this.height=0}if(this.numGlyphs==undefined){this.numGlyphs=0}if(this.underlinePosition==undefined){this.underlinePosition=0}if(this.underlineThickness==undefined){this.underlineThickness=0}if(this.unitsPerEM==undefined){this.unitsPerEM=0}if(this.__fontID!=null){if(lime_utils_Assets.isLocal(this.__fontID)){this.__fromBytes(lime_utils_Assets.getBytes(this.__fontID))}}else if(this.__fontPath!=null){this.__fromFile(this.__fontPath)}}};$hxClasses["lime.text.Font"]=lime_text_Font;lime_text_Font.__name__=["lime","text","Font"];lime_text_Font.fromFile=function(e){if(e==null){return null}var t=new lime_text_Font;t.__fromFile(e);return t};lime_text_Font.loadFromName=function(e){var t=new lime_text_Font;return t.__loadFromName(e)};lime_text_Font.__measureFontNode=function(e){var t=window.document.createElement("span");t.setAttribute("aria-hidden","true");var s=window.document.createTextNode("BESbswy");t.appendChild(s);var i=t.style;i.display="block";i.position="absolute";i.top="-9999px";i.left="-9999px";i.fontSize="300px";i.width="auto";i.height="auto";i.lineHeight="normal";i.margin="0";i.padding="0";i.fontVariant="normal";i.whiteSpace="nowrap";i.fontFamily=e;window.document.body.appendChild(t);return t};lime_text_Font.prototype={ascender:null,descender:null,height:null,name:null,numGlyphs:null,src:null,underlinePosition:null,underlineThickness:null,unitsPerEM:null,__fontID:null,__fontPath:null,__init:null,__copyFrom:function(e){if(e!=null){this.ascender=e.ascender;this.descender=e.descender;this.height=e.height;this.name=e.name;this.numGlyphs=e.numGlyphs;this.src=e.src;this.underlinePosition=e.underlinePosition;this.underlineThickness=e.underlineThickness;this.unitsPerEM=e.unitsPerEM;this.__fontID=e.__fontID;this.__fontPath=e.__fontPath;this.__init=true}},__fromBytes:function(e){this.__fontPath=null},__fromFile:function(e){this.__fontPath=e},__loadFromName:function(t){var s=this;var i=new lime_app_Promise;this.name=t;var e=window.navigator.userAgent.toLowerCase();var a=e.indexOf(" safari/")>=0&&e.indexOf(" chrome/")<0;var r=new EReg("(iPhone|iPod|iPad).*AppleWebKit(?!.*Version)","i").match(e);if(!a&&!r&&(window.document.fonts&&($_=window.document.fonts,$bind($_,$_.load)))){window.document.fonts.load("1em '"+t+"'").then(function(e){i.complete(s)},function(e){lime_utils_Log.warn('Could not load web font "'+t+'"',{fileName:"Font.hx",lineNumber:549,className:"lime.text.Font",methodName:"__loadFromName"});i.complete(s)})}else{var _=lime_text_Font.__measureFontNode("'"+t+"', sans-serif");var n=lime_text_Font.__measureFontNode("'"+t+"', serif");var o=_.offsetWidth;var l=n.offsetWidth;var h=-1;var c=3e3;var u=50;var f=0;var p;var d;var g=function(){f+=1;if(_.offsetWidth==o){p=n.offsetWidth!=l}else{p=true}d=f*u>=c;if(p||d){window.clearInterval(h);_.parentNode.removeChild(_);n.parentNode.removeChild(n);_=null;n=null;if(d){lime_utils_Log.warn('Could not load web font "'+t+'"',{fileName:"Font.hx",lineNumber:585,className:"lime.text.Font",methodName:"__loadFromName"})}i.complete(s)}};h=window.setInterval(g,u)}return i.future},__class__:lime_text_Font};var lime_text__$UTF8String_UTF8String_$Impl_$={};$hxClasses["lime.text._UTF8String.UTF8String_Impl_"]=lime_text__$UTF8String_UTF8String_$Impl_$;lime_text__$UTF8String_UTF8String_$Impl_$.__name__=["lime","text","_UTF8String","UTF8String_Impl_"];lime_text__$UTF8String_UTF8String_$Impl_$.__properties__={get_length:"get_length"};lime_text__$UTF8String_UTF8String_$Impl_$.charAt=function(e,t){var s=e;var i=s;var a=i;var r;if(t>=0){var _=0;var n=a.length;var o=0;while(o=0){var i=e;var a=i;s=t>=lime__$internal_unifill__$Utf16_Utf16_$Impl_$.codePointCount(a,0,e.length)}else{s=true}if(s){return null}var r=e;var _=r;var n=_;var o;if(t>=0){var l=0;var h=n.length;var c=0;while(c=0){var n=0;var o=r.length;var l=0;while(l=0){var d=e;var g=d;return lime__$internal_unifill__$Utf16_Utf16_$Impl_$.codePointCount(g,0,p)}else{return-1}};lime_text__$UTF8String_UTF8String_$Impl_$.substr=function(e,t,s){if(s==null){s=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(e)-t}return HxOverrides.substr(e,t,s)};lime_text__$UTF8String_UTF8String_$Impl_$.substring=function(e,t,s){var i;if(t<0){i=0}else{var a=e;var r=a;var _=r;if(t>=0){var n=0;var o=_.length;var l=0;while(l=0){var v=0;var b=m.length;var y=0;while(y0}else{return true}};lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey=function(e){if((e&64)<=0){return(e&128)>0}else{return true}};lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey=function(e){if((e&1024)<=0){return(e&2048)>0}else{return true}};lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey=function(e){if((e&1)<=0){return(e&2)>0}else{return true}};var lime_ui_MouseCursor=$hxClasses["lime.ui.MouseCursor"]={__ename__:["lime","ui","MouseCursor"],__constructs__:["ARROW","CROSSHAIR","DEFAULT","MOVE","POINTER","RESIZE_NESW","RESIZE_NS","RESIZE_NWSE","RESIZE_WE","TEXT","WAIT","WAIT_ARROW","CUSTOM"]};lime_ui_MouseCursor.ARROW=["ARROW",0];lime_ui_MouseCursor.ARROW.toString=$estr;lime_ui_MouseCursor.ARROW.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.CROSSHAIR=["CROSSHAIR",1];lime_ui_MouseCursor.CROSSHAIR.toString=$estr;lime_ui_MouseCursor.CROSSHAIR.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.DEFAULT=["DEFAULT",2];lime_ui_MouseCursor.DEFAULT.toString=$estr;lime_ui_MouseCursor.DEFAULT.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.MOVE=["MOVE",3];lime_ui_MouseCursor.MOVE.toString=$estr;lime_ui_MouseCursor.MOVE.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.POINTER=["POINTER",4];lime_ui_MouseCursor.POINTER.toString=$estr;lime_ui_MouseCursor.POINTER.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.RESIZE_NESW=["RESIZE_NESW",5];lime_ui_MouseCursor.RESIZE_NESW.toString=$estr;lime_ui_MouseCursor.RESIZE_NESW.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.RESIZE_NS=["RESIZE_NS",6];lime_ui_MouseCursor.RESIZE_NS.toString=$estr;lime_ui_MouseCursor.RESIZE_NS.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.RESIZE_NWSE=["RESIZE_NWSE",7];lime_ui_MouseCursor.RESIZE_NWSE.toString=$estr;lime_ui_MouseCursor.RESIZE_NWSE.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.RESIZE_WE=["RESIZE_WE",8];lime_ui_MouseCursor.RESIZE_WE.toString=$estr;lime_ui_MouseCursor.RESIZE_WE.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.TEXT=["TEXT",9];lime_ui_MouseCursor.TEXT.toString=$estr;lime_ui_MouseCursor.TEXT.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.WAIT=["WAIT",10];lime_ui_MouseCursor.WAIT.toString=$estr;lime_ui_MouseCursor.WAIT.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.WAIT_ARROW=["WAIT_ARROW",11];lime_ui_MouseCursor.WAIT_ARROW.toString=$estr;lime_ui_MouseCursor.WAIT_ARROW.__enum__=lime_ui_MouseCursor;lime_ui_MouseCursor.CUSTOM=["CUSTOM",12];lime_ui_MouseCursor.CUSTOM.toString=$estr;lime_ui_MouseCursor.CUSTOM.__enum__=lime_ui_MouseCursor;var lime_ui_MouseWheelMode=$hxClasses["lime.ui.MouseWheelMode"]={__ename__:["lime","ui","MouseWheelMode"],__constructs__:["PIXELS","LINES","PAGES","UNKNOWN"]};lime_ui_MouseWheelMode.PIXELS=["PIXELS",0];lime_ui_MouseWheelMode.PIXELS.toString=$estr;lime_ui_MouseWheelMode.PIXELS.__enum__=lime_ui_MouseWheelMode;lime_ui_MouseWheelMode.LINES=["LINES",1];lime_ui_MouseWheelMode.LINES.toString=$estr;lime_ui_MouseWheelMode.LINES.__enum__=lime_ui_MouseWheelMode;lime_ui_MouseWheelMode.PAGES=["PAGES",2];lime_ui_MouseWheelMode.PAGES.toString=$estr;lime_ui_MouseWheelMode.PAGES.__enum__=lime_ui_MouseWheelMode;lime_ui_MouseWheelMode.UNKNOWN=["UNKNOWN",3];lime_ui_MouseWheelMode.UNKNOWN.toString=$estr;lime_ui_MouseWheelMode.UNKNOWN.__enum__=lime_ui_MouseWheelMode;var lime_ui_Touch=function(e,t,s,i,a,r,_){this.x=e;this.y=t;this.id=s;this.dx=i;this.dy=a;this.pressure=r;this.device=_};$hxClasses["lime.ui.Touch"]=lime_ui_Touch;lime_ui_Touch.__name__=["lime","ui","Touch"];lime_ui_Touch.prototype={device:null,dx:null,dy:null,id:null,pressure:null,x:null,y:null,__class__:lime_ui_Touch};var lime_ui_Window=function(e,t){this.onTextInput=new lime_app__$Event_$String_$Void;this.onTextEdit=new lime_app__$Event_$String_$Int_$Int_$Void;this.onRestore=new lime_app__$Event_$Void_$Void;this.onResize=new lime_app__$Event_$Int_$Int_$Void;this.onRenderContextRestored=new lime_app__$Event_$lime_$graphics_$RenderContext_$Void;this.onRenderContextLost=new lime_app__$Event_$Void_$Void;this.onRender=new lime_app__$Event_$lime_$graphics_$RenderContext_$Void;this.onMove=new lime_app__$Event_$Float_$Float_$Void;this.onMouseWheel=new lime_app__$Event_$Float_$Float_$lime_$ui_$MouseWheelMode_$Void;this.onMouseUp=new lime_app__$Event_$Float_$Float_$Int_$Void;this.onMouseMoveRelative=new lime_app__$Event_$Float_$Float_$Void;this.onMouseMove=new lime_app__$Event_$Float_$Float_$Void;this.onMouseDown=new lime_app__$Event_$Float_$Float_$lime_$ui_$MouseButton_$Void;this.onMinimize=new lime_app__$Event_$Void_$Void;this.onLeave=new lime_app__$Event_$Void_$Void;this.onKeyUp=new lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void;this.onKeyDown=new lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void;this.onFullscreen=new lime_app__$Event_$Void_$Void;this.onFocusOut=new lime_app__$Event_$Void_$Void;this.onFocusIn=new lime_app__$Event_$Void_$Void;this.onExpose=new lime_app__$Event_$Void_$Void;this.onEnter=new lime_app__$Event_$Void_$Void;this.onDropFile=new lime_app__$Event_$String_$Void;this.onDeactivate=new lime_app__$Event_$Void_$Void;this.onClose=new lime_app__$Event_$Void_$Void;this.onActivate=new lime_app__$Event_$Void_$Void;this.application=e;this.__attributes=t!=null?t:{};if(Object.prototype.hasOwnProperty.call(this.__attributes,"parameters")){this.parameters=this.__attributes.parameters}this.__width=0;this.__height=0;this.__fullscreen=false;this.__scale=1;this.__x=0;this.__y=0;this.__title="";this.id=-1;this.__backend=new lime__$internal_backend_html5_HTML5Window(this)};$hxClasses["lime.ui.Window"]=lime_ui_Window;lime_ui_Window.__name__=["lime","ui","Window"];lime_ui_Window.prototype={application:null,context:null,element:null,id:null,onActivate:null,onClose:null,onDeactivate:null,onDropFile:null,onEnter:null,onExpose:null,onFocusIn:null,onFocusOut:null,onFullscreen:null,onKeyDown:null,onKeyUp:null,onLeave:null,onMinimize:null,onMouseDown:null,onMouseMove:null,onMouseMoveRelative:null,onMouseUp:null,onMouseWheel:null,onMove:null,onRender:null,onRenderContextLost:null,onRenderContextRestored:null,onResize:null,onRestore:null,onTextEdit:null,onTextInput:null,parameters:null,stage:null,__attributes:null,__backend:null,__fullscreen:null,__height:null,__resizable:null,__scale:null,__title:null,__width:null,__x:null,__y:null,close:function(){this.__backend.close()},set_cursor:function(e){return this.__backend.setCursor(e)},get_display:function(){return this.__backend.getDisplay()},set_fullscreen:function(e){return this.__fullscreen=this.__backend.setFullscreen(e)},__class__:lime_ui_Window,__properties__:{get_display:"get_display",set_fullscreen:"set_fullscreen",set_cursor:"set_cursor"}};var lime_utils_AssetCache=function(){this.enabled=true;this.audio=new haxe_ds_StringMap;this.font=new haxe_ds_StringMap;this.image=new haxe_ds_StringMap;this.version=712679};$hxClasses["lime.utils.AssetCache"]=lime_utils_AssetCache;lime_utils_AssetCache.__name__=["lime","utils","AssetCache"];lime_utils_AssetCache.prototype={audio:null,enabled:null,image:null,font:null,version:null,exists:function(e,t){if(t=="IMAGE"||t==null){var s=this.image;if(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e)){return true}}if(t=="FONT"||t==null){var i=this.font;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){return true}}if(t=="SOUND"||t=="MUSIC"||t==null){var a=this.audio;if(__map_reserved[e]!=null?a.existsReserved(e):a.h.hasOwnProperty(e)){return true}}return false},set:function(e,t,s){switch(t){case"FONT":this.font.set(e,s);break;case"IMAGE":if(!js_Boot.__instanceof(s,lime_graphics_Image)){throw new js__$Boot_HaxeError("Cannot cache non-Image asset: "+Std.string(s)+" as Image")}this.image.set(e,s);break;case"MUSIC":case"SOUND":if(!js_Boot.__instanceof(s,lime_media_AudioBuffer)){throw new js__$Boot_HaxeError("Cannot cache non-AudioBuffer asset: "+Std.string(s)+" as AudioBuffer")}this.audio.set(e,s);break;default:throw new js__$Boot_HaxeError(t+" assets are not cachable")}},clear:function(e){if(e==null){this.audio=new haxe_ds_StringMap;this.font=new haxe_ds_StringMap;this.image=new haxe_ds_StringMap}else{var t=this.audio.keys();var s=t;while(s.hasNext()){var i=s.next();if(StringTools.startsWith(i,e)){this.audio.remove(i)}}var a=this.font.keys();var r=a;while(r.hasNext()){var _=r.next();if(StringTools.startsWith(_,e)){this.font.remove(_)}}var n=this.image.keys();var o=n;while(o.hasNext()){var l=o.next();if(StringTools.startsWith(l,e)){this.image.remove(l)}}}},__class__:lime_utils_AssetCache};var lime_utils_AssetLibrary=function(){this.types=new haxe_ds_StringMap;this.sizes=new haxe_ds_StringMap;this.preload=new haxe_ds_StringMap;this.paths=new haxe_ds_StringMap;this.pathGroups=new haxe_ds_StringMap;this.classTypes=new haxe_ds_StringMap;this.cachedText=new haxe_ds_StringMap;this.cachedImages=new haxe_ds_StringMap;this.cachedFonts=new haxe_ds_StringMap;this.cachedBytes=new haxe_ds_StringMap;this.cachedAudioBuffers=new haxe_ds_StringMap;this.onChange=new lime_app__$Event_$Void_$Void;this.bytesLoaded=0;this.bytesTotal=0};$hxClasses["lime.utils.AssetLibrary"]=lime_utils_AssetLibrary;lime_utils_AssetLibrary.__name__=["lime","utils","AssetLibrary"];lime_utils_AssetLibrary.fromManifest=function(e){if(e==null){return null}var t=null;if(e.libraryType==null){t=new lime_utils_AssetLibrary}else{var s=Type.resolveClass(e.libraryType);if(s!=null){t=Type.createInstance(s,e.libraryArgs)}else{lime_utils_Log.warn("Could not find library type: "+e.libraryType,{fileName:"AssetLibrary.hx",lineNumber:141,className:"lime.utils.AssetLibrary",methodName:"fromManifest"});return null}}t.__fromManifest(e);return t};lime_utils_AssetLibrary.prototype={onChange:null,assetsLoaded:null,assetsTotal:null,bytesLoaded:null,bytesLoadedCache:null,bytesTotal:null,cachedAudioBuffers:null,cachedBytes:null,cachedFonts:null,cachedImages:null,cachedText:null,classTypes:null,loaded:null,pathGroups:null,paths:null,preload:null,promise:null,sizes:null,types:null,exists:function(e,t){var s=t!=null?js_Boot.__cast(t,String):null;var i=this.types;var a=__map_reserved[e]!=null?i.getReserved(e):i.h[e];if(a!=null){if(a==s||(s=="SOUND"||s=="MUSIC")&&(a=="MUSIC"||a=="SOUND")){return true}if(s=="BINARY"||s==null||a=="BINARY"&&s=="TEXT"){return true}}return false},getAsset:function(e,t){switch(t){case"BINARY":return this.getBytes(e);case"FONT":return this.getFont(e);case"IMAGE":return this.getImage(e);case"MUSIC":case"SOUND":return this.getAudioBuffer(e);case"TEMPLATE":throw new js__$Boot_HaxeError("Not sure how to get template: "+e);break;case"TEXT":return this.getText(e);default:throw new js__$Boot_HaxeError("Unknown asset type: "+t)}},getAudioBuffer:function(e){var t=this.cachedAudioBuffers;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var s=this.cachedAudioBuffers;if(__map_reserved[e]!=null){return s.getReserved(e)}else{return s.h[e]}}else{var i=this.classTypes;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){var a=this.classTypes;return lime_media_AudioBuffer.fromBytes(js_Boot.__cast(Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]),haxe_io_Bytes))}else{var r=this.paths;return lime_media_AudioBuffer.fromFile(__map_reserved[e]!=null?r.getReserved(e):r.h[e])}}},getBytes:function(e){var t=this.cachedBytes;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var s=this.cachedBytes;if(__map_reserved[e]!=null){return s.getReserved(e)}else{return s.h[e]}}else{var i=this.cachedText;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){var a=this.cachedText;var r=lime_utils__$Bytes_Bytes_$Impl_$.ofString(__map_reserved[e]!=null?a.getReserved(e):a.h[e]);var _=this.cachedBytes;if(__map_reserved[e]!=null){_.setReserved(e,r)}else{_.h[e]=r}return r}else{var n=this.classTypes;if(__map_reserved[e]!=null?n.existsReserved(e):n.h.hasOwnProperty(e)){var o=this.classTypes;return js_Boot.__cast(Type.createInstance(__map_reserved[e]!=null?o.getReserved(e):o.h[e],[]),haxe_io_Bytes)}else{var l=this.paths;return lime_utils__$Bytes_Bytes_$Impl_$.fromFile(__map_reserved[e]!=null?l.getReserved(e):l.h[e])}}}},getFont:function(e){var t=this.cachedFonts;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var s=this.cachedFonts;if(__map_reserved[e]!=null){return s.getReserved(e)}else{return s.h[e]}}else{var i=this.classTypes;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){var a=this.classTypes;return js_Boot.__cast(Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]),lime_text_Font)}else{var r=this.paths;return lime_text_Font.fromFile(__map_reserved[e]!=null?r.getReserved(e):r.h[e])}}},getImage:function(e){var t=this.cachedImages;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var s=this.cachedImages;if(__map_reserved[e]!=null){return s.getReserved(e)}else{return s.h[e]}}else{var i=this.classTypes;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){var a=this.classTypes;return js_Boot.__cast(Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]),lime_graphics_Image)}else{var r=this.paths;return lime_graphics_Image.fromFile(__map_reserved[e]!=null?r.getReserved(e):r.h[e])}}},getText:function(e){var t=this.cachedText;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var s=this.cachedText;if(__map_reserved[e]!=null){return s.getReserved(e)}else{return s.h[e]}}else{var i=this.getBytes(e);if(i==null){return null}else{return i.getString(0,i.length)}}},isLocal:function(e,t){var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e)){return true}var i=t!=null?js_Boot.__cast(t,String):null;switch(i){case"FONT":return this.cachedFonts.exists(e);case"IMAGE":return this.cachedImages.exists(e);case"MUSIC":case"SOUND":return this.cachedAudioBuffers.exists(e);default:if(!this.cachedBytes.exists(e)){return this.cachedText.exists(e)}else{return true}}},load:function(){if(this.loaded){return lime_app_Future.withValue(this)}if(this.promise==null){this.promise=new lime_app_Promise;this.bytesLoadedCache=new haxe_ds_StringMap;this.assetsLoaded=0;this.assetsTotal=1;var e=this.preload.keys();while(e.hasNext()){var t=e.next();var s=this.preload;if(!(__map_reserved[t]!=null?s.getReserved(t):s.h[t])){continue}var i=this.types;lime_utils_Log.verbose("Preloading asset: "+t+" ["+(__map_reserved[t]!=null?i.getReserved(t):i.h[t])+"]",{fileName:"AssetLibrary.hx",lineNumber:453,className:"lime.utils.AssetLibrary",methodName:"load"});var a=this.types.get(t);if(a!=null){switch(a){case"BINARY":this.assetsTotal++;var r=this.loadBytes(t);r.onProgress(function(s,i){return function(e,t){i[0](s[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));r.onError(function(t,s){return function(e){s[0](t[0],e)}}([t],[$bind(this,this.load_onError)]));r.onComplete(function(t,s){return function(e){s[0](t[0],e)}}([t],[$bind(this,this.loadBytes_onComplete)]));break;case"FONT":this.assetsTotal++;var _=this.loadFont(t);_.onProgress(function(s,i){return function(e,t){i[0](s[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));_.onError(function(t,s){return function(e){s[0](t[0],e)}}([t],[$bind(this,this.load_onError)]));_.onComplete(function(t,s){return function(e){s[0](t[0],e)}}([t],[$bind(this,this.loadFont_onComplete)]));break;case"IMAGE":this.assetsTotal++;var n=this.loadImage(t);n.onProgress(function(s,i){return function(e,t){i[0](s[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));n.onError(function(t,s){return function(e){s[0](t[0],e)}}([t],[$bind(this,this.load_onError)]));n.onComplete(function(t,s){return function(e){s[0](t[0],e)}}([t],[$bind(this,this.loadImage_onComplete)]));break;case"MUSIC":case"SOUND":this.assetsTotal++;var o=this.loadAudioBuffer(t);o.onProgress(function(s,i){return function(e,t){i[0](s[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));o.onError(function(t,s){return function(e){s[0](t[0],e)}}([t],[$bind(this,this.loadAudioBuffer_onError)]));o.onComplete(function(t,s){return function(e){s[0](t[0],e)}}([t],[$bind(this,this.loadAudioBuffer_onComplete)]));break;case"TEXT":this.assetsTotal++;var l=this.loadText(t);l.onProgress(function(s,i){return function(e,t){i[0](s[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));l.onError(function(t,s){return function(e){s[0](t[0],e)}}([t],[$bind(this,this.load_onError)]));l.onComplete(function(t,s){return function(e){s[0](t[0],e)}}([t],[$bind(this,this.loadText_onComplete)]));break;default:}}}this.__assetLoaded(null)}return this.promise.future},loadAudioBuffer:function(e){var t=this.cachedAudioBuffers;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var s=this.cachedAudioBuffers;return lime_app_Future.withValue(__map_reserved[e]!=null?s.getReserved(e):s.h[e])}else{var i=this.classTypes;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){var a=this.classTypes;return lime_app_Future.withValue(Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]))}else{var r=this.pathGroups;if(__map_reserved[e]!=null?r.existsReserved(e):r.h.hasOwnProperty(e)){var _=this.pathGroups;return lime_media_AudioBuffer.loadFromFiles(__map_reserved[e]!=null?_.getReserved(e):_.h[e])}else{var n=this.paths;return lime_media_AudioBuffer.loadFromFile(__map_reserved[e]!=null?n.getReserved(e):n.h[e])}}}},loadBytes:function(e){var t=this.cachedBytes;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var s=this.cachedBytes;return lime_app_Future.withValue(__map_reserved[e]!=null?s.getReserved(e):s.h[e])}else{var i=this.classTypes;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){var a=this.classTypes;return lime_app_Future.withValue(Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]))}else{var r=this.paths;return lime_utils__$Bytes_Bytes_$Impl_$.loadFromFile(__map_reserved[e]!=null?r.getReserved(e):r.h[e])}}},loadFont:function(e){var t=this.cachedFonts;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var s=this.cachedFonts;return lime_app_Future.withValue(__map_reserved[e]!=null?s.getReserved(e):s.h[e])}else{var i=this.classTypes;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){var a=this.classTypes;var r=Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]);return r.__loadFromName(r.name)}else{var _=this.paths;return lime_text_Font.loadFromName(__map_reserved[e]!=null?_.getReserved(e):_.h[e])}}},loadImage:function(e){var t=this.cachedImages;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var s=this.cachedImages;return lime_app_Future.withValue(__map_reserved[e]!=null?s.getReserved(e):s.h[e])}else{var i=this.classTypes;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){var a=this.classTypes;return lime_app_Future.withValue(Type.createInstance(__map_reserved[e]!=null?a.getReserved(e):a.h[e],[]))}else{var r=this.paths;return lime_graphics_Image.loadFromFile(__map_reserved[e]!=null?r.getReserved(e):r.h[e])}}},loadText:function(e){var t=this.cachedText;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var s=this.cachedText;return lime_app_Future.withValue(__map_reserved[e]!=null?s.getReserved(e):s.h[e])}else{var i;var a=this.cachedBytes;if(!(__map_reserved[e]!=null?a.existsReserved(e):a.h.hasOwnProperty(e))){var r=this.classTypes;if(__map_reserved[e]!=null){i=r.existsReserved(e)}else{i=r.h.hasOwnProperty(e)}}else{i=true}if(i){var _=this.getBytes(e);if(_==null){return lime_app_Future.withValue(null)}else{var n=_.getString(0,_.length);var o=this.cachedText;if(__map_reserved[e]!=null){o.setReserved(e,n)}else{o.h[e]=n}return lime_app_Future.withValue(n)}}else{var l=new lime_net__$HTTPRequest_$String;var h=this.paths;return l.load(__map_reserved[e]!=null?h.getReserved(e):h.h[e])}}},unload:function(){},__assetLoaded:function(e){this.assetsLoaded++;if(e!=null){var t=this.types;lime_utils_Log.verbose("Loaded asset: "+e+" ["+(__map_reserved[e]!=null?t.getReserved(e):t.h[e])+"] ("+(this.assetsLoaded-1)+"/"+(this.assetsTotal-1)+")",{fileName:"AssetLibrary.hx",lineNumber:699,className:"lime.utils.AssetLibrary",methodName:"__assetLoaded"})}if(e!=null){var s=this.sizes;var i=__map_reserved[e]!=null?s.getReserved(e):s.h[e];var a=this.bytesLoadedCache;if(!(__map_reserved[e]!=null?a.existsReserved(e):a.h.hasOwnProperty(e))){this.bytesLoaded+=i}else{var r=this.bytesLoadedCache;var _=__map_reserved[e]!=null?r.getReserved(e):r.h[e];if(_=2;var s;var i;var a;var r;var _=e.rootPath;if(_==null){_=""}if(_!=""){_+="/"}var n=0;var o=e.assets;while(n-1){var c=this.cachedAudioBuffers;if(__map_reserved[n]!=null){c.setReserved(n,t)}else{c.h[n]=t}break}}}}this.__assetLoaded(e)},loadAudioBuffer_onError:function(e,t){if(t!=null&&t!=""){lime_utils_Log.warn('Could not load "'+e+'": '+Std.string(t),{fileName:"AssetLibrary.hx",lineNumber:872,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"})}else{lime_utils_Log.warn('Could not load "'+e+'"',{fileName:"AssetLibrary.hx",lineNumber:876,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"})}this.loadAudioBuffer_onComplete(e,new lime_media_AudioBuffer)},loadBytes_onComplete:function(e,t){var s=this.cachedBytes;if(__map_reserved[e]!=null){s.setReserved(e,t)}else{s.h[e]=t}this.__assetLoaded(e)},loadFont_onComplete:function(e,t){var s=this.cachedFonts;if(__map_reserved[e]!=null){s.setReserved(e,t)}else{s.h[e]=t}this.__assetLoaded(e)},loadImage_onComplete:function(e,t){var s=this.cachedImages;if(__map_reserved[e]!=null){s.setReserved(e,t)}else{s.h[e]=t}this.__assetLoaded(e)},loadText_onComplete:function(e,t){var s=this.cachedText;if(__map_reserved[e]!=null){s.setReserved(e,t)}else{s.h[e]=t}this.__assetLoaded(e)},load_onError:function(e,t){if(t!=null&&t!=""){this.promise.error('Error loading asset "'+e+'": '+Std.string(t))}else{this.promise.error('Error loading asset "'+e+'"')}},load_onProgress:function(e,t,s){if(t>0){var i=this.sizes;var a=__map_reserved[e]!=null?i.getReserved(e):i.h[e];var r;if(s>0){r=t/s;if(r>1){r=1}t=Math.floor(r*a)}else if(t>a){t=a}var _=this.bytesLoadedCache;if(__map_reserved[e]!=null?_.existsReserved(e):_.h.hasOwnProperty(e)){var n=this.bytesLoadedCache;var o=__map_reserved[e]!=null?n.getReserved(e):n.h[e];if(t!=o){this.bytesLoaded+=t-o}}else{this.bytesLoaded+=t}var l=this.bytesLoadedCache;if(__map_reserved[e]!=null){l.setReserved(e,t)}else{l.h[e]=t}this.promise.progress(this.bytesLoaded,this.bytesTotal)}},__class__:lime_utils_AssetLibrary};var lime_utils_AssetManifest=function(){this.assets=[];this.libraryArgs=[];this.version=2};$hxClasses["lime.utils.AssetManifest"]=lime_utils_AssetManifest;lime_utils_AssetManifest.__name__=["lime","utils","AssetManifest"];lime_utils_AssetManifest.fromBytes=function(e,t){if(e!=null){return lime_utils_AssetManifest.parse(e.getString(0,e.length),t)}else{return null}};lime_utils_AssetManifest.fromFile=function(e,t){e=lime_utils_AssetManifest.__resolvePath(e);t=lime_utils_AssetManifest.__resolveRootPath(t,e);if(e==null){return null}return lime_utils_AssetManifest.fromBytes(lime_utils__$Bytes_Bytes_$Impl_$.fromFile(e),t)};lime_utils_AssetManifest.loadFromBytes=function(e,t){return lime_app_Future.withValue(lime_utils_AssetManifest.fromBytes(e,t))};lime_utils_AssetManifest.loadFromFile=function(e,t){e=lime_utils_AssetManifest.__resolvePath(e);t=lime_utils_AssetManifest.__resolveRootPath(t,e);if(e==null){return null}return lime_utils__$Bytes_Bytes_$Impl_$.loadFromFile(e).then(function(e){return lime_app_Future.withValue(lime_utils_AssetManifest.fromBytes(e,t))})};lime_utils_AssetManifest.parse=function(e,t){if(e==null||e==""){return null}var s=JSON.parse(e);var i=new lime_utils_AssetManifest;i.name=s.name;i.libraryType=s.libraryType;i.libraryArgs=s.libraryArgs;i.assets=haxe_Unserializer.run(s.assets);if(Object.prototype.hasOwnProperty.call(s,"rootPath")){i.rootPath=s.rootPath}if(t!=null&&t!=""){if(i.rootPath==null||i.rootPath==""){i.rootPath=t}else{i.rootPath=t+"/"+i.rootPath}}return i};lime_utils_AssetManifest.__resolvePath=function(e){if(e==null){return null}var t=e.indexOf("?");var s;if(t>-1){s=HxOverrides.substr(e,0,t)}else{s=e}StringTools.replace(s,"\\","/");while(StringTools.endsWith(s,"/"))s=HxOverrides.substr(s,0,s.length-1);if(StringTools.endsWith(s,".bundle")){if(t>-1){return s+"/library.json"+HxOverrides.substr(e,t,null)}else{return s+"/library.json"}}else{return e}};lime_utils_AssetManifest.__resolveRootPath=function(e,t){if(e!=null){return e}var s=t.indexOf("?");if(s>-1){e=HxOverrides.substr(t,0,s)}else{e=t}StringTools.replace(e,"\\","/");while(StringTools.endsWith(e,"/")){if(e=="/"){return e}e=HxOverrides.substr(e,0,e.length-1)}if(StringTools.endsWith(e,".bundle")){return e}else{return haxe_io_Path.directory(e)}};lime_utils_AssetManifest.prototype={assets:null,libraryArgs:null,libraryType:null,name:null,rootPath:null,version:null,__class__:lime_utils_AssetManifest};var lime_utils_Assets=function(){};$hxClasses["lime.utils.Assets"]=lime_utils_Assets;lime_utils_Assets.__name__=["lime","utils","Assets"];lime_utils_Assets.exists=function(e,t){if(t==null){t="BINARY"}var s;var i;var a;var r=e.indexOf(":");i=e.substring(0,r);s=e.substring(r+1);a=lime_utils_Assets.getLibrary(i);if(a!=null){return a.exists(s,t)}return false};lime_utils_Assets.getAsset=function(e,t,s){if(s&&lime_utils_Assets.cache.enabled){switch(t){case"BINARY":case"TEXT":s=false;break;case"FONT":var i=lime_utils_Assets.cache.font.get(e);if(i!=null){return i}break;case"IMAGE":var a=lime_utils_Assets.cache.image.get(e);if(lime_utils_Assets.isValidImage(a)){return a}break;case"MUSIC":case"SOUND":var r=lime_utils_Assets.cache.audio.get(e);if(lime_utils_Assets.isValidAudio(r)){return r}break;case"TEMPLATE":throw new js__$Boot_HaxeError("Not sure how to get template: "+e);break;default:return null}}var _;var n;var o;var l=e.indexOf(":");n=e.substring(0,l);_=e.substring(l+1);o=lime_utils_Assets.getLibrary(n);if(o!=null){if(o.exists(_,t)){if(o.isLocal(_,t)){var h=o.getAsset(_,t);if(s&&lime_utils_Assets.cache.enabled){lime_utils_Assets.cache.set(e,t,h)}return h}else{lime_utils_Log.error(t+' asset "'+e+'" exists, but only asynchronously',{fileName:"Assets.hx",lineNumber:160,className:"lime.utils.Assets",methodName:"getAsset"})}}else{lime_utils_Log.error("There is no "+t+' asset with an ID of "'+e+'"',{fileName:"Assets.hx",lineNumber:166,className:"lime.utils.Assets",methodName:"getAsset"})}}else{lime_utils_Log.error(lime_utils_Assets.__libraryNotFound(n),{fileName:"Assets.hx",lineNumber:172,className:"lime.utils.Assets",methodName:"getAsset"})}return null};lime_utils_Assets.getBytes=function(e){return lime_utils_Assets.getAsset(e,"BINARY",false)};lime_utils_Assets.getImage=function(e,t){if(t==null){t=true}return lime_utils_Assets.getAsset(e,"IMAGE",t)};lime_utils_Assets.getLibrary=function(e){if(e==null||e==""){e="default"}var t=lime_utils_Assets.libraries;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}};lime_utils_Assets.hasLibrary=function(e){if(e==null||e==""){e="default"}var t=lime_utils_Assets.libraries;if(__map_reserved[e]!=null){return t.existsReserved(e)}else{return t.h.hasOwnProperty(e)}};lime_utils_Assets.isLocal=function(e,t,s){if(s==null){s=true}if(s&&lime_utils_Assets.cache.enabled){if(lime_utils_Assets.cache.exists(e,t)){return true}}var i;var a;var r;var _=e.indexOf(":");a=e.substring(0,_);i=e.substring(_+1);r=lime_utils_Assets.getLibrary(a);if(r!=null){return r.isLocal(i,t)}else{return false}};lime_utils_Assets.isValidAudio=function(e){return e!=null};lime_utils_Assets.isValidImage=function(e){if(e!=null){return e.buffer!=null}else{return false}};lime_utils_Assets.loadLibrary=function(a){var r=new lime_app_Promise;var e=lime_utils_Assets.getLibrary(a);if(e!=null){return e.load()}var t=a;var s=null;var i=lime_utils_Assets.libraryPaths;if(__map_reserved[a]!=null?i.existsReserved(a):i.h.hasOwnProperty(a)){var _=lime_utils_Assets.libraryPaths;if(__map_reserved[a]!=null){t=_.getReserved(a)}else{t=_.h[a]}s=lime_utils_Assets.defaultRootPath}else{if(StringTools.endsWith(t,".bundle")){t+="/library.json"}t=lime_utils_Assets.__cacheBreak(t)}lime_utils_AssetManifest.loadFromFile(t,s).onComplete(function(e){if(e==null){r.error('Cannot parse asset manifest for library "'+a+'"');return}var t=lime_utils_AssetLibrary.fromManifest(e);if(t==null){r.error('Cannot open library "'+a+'"')}else{var s=lime_utils_Assets.libraries;if(__map_reserved[a]!=null){s.setReserved(a,t)}else{s.h[a]=t}t.onChange.add(($_=lime_utils_Assets.onChange,$bind($_,$_.dispatch)));var i=t.load();r.completeWith(i)}}).onError(function(e){r.error('There is no asset library with an ID of "'+a+'"')});return r.future};lime_utils_Assets.registerLibrary=function(e,t){var s=lime_utils_Assets.libraries;if(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e)){var i=lime_utils_Assets.libraries;if((__map_reserved[e]!=null?i.getReserved(e):i.h[e])==t){return}else{lime_utils_Assets.unloadLibrary(e)}}if(t!=null){t.onChange.add(lime_utils_Assets.library_onChange)}var a=lime_utils_Assets.libraries;if(__map_reserved[e]!=null){a.setReserved(e,t)}else{a.h[e]=t}};lime_utils_Assets.unloadLibrary=function(e){var t=lime_utils_Assets.libraries;var s=__map_reserved[e]!=null?t.getReserved(e):t.h[e];if(s!=null){lime_utils_Assets.cache.clear(e+":");s.onChange.remove(lime_utils_Assets.library_onChange);s.unload()}lime_utils_Assets.libraries.remove(e)};lime_utils_Assets.__cacheBreak=function(e){if(lime_utils_Assets.cache.version>0){if(e.indexOf("?")>-1){e+="&"+lime_utils_Assets.cache.version}else{e+="?"+lime_utils_Assets.cache.version}}return e};lime_utils_Assets.__libraryNotFound=function(e){if(e==null||e==""){e="default"}if(lime_app_Application.current!=null&&lime_app_Application.current.__preloader!=null&&!lime_app_Application.current.__preloader.complete){return'There is no asset library named "'+e+'", or it is not yet preloaded'}else{return'There is no asset library named "'+e+'"'}};lime_utils_Assets.library_onChange=function(){lime_utils_Assets.cache.clear();lime_utils_Assets.onChange.dispatch()};var lime_utils_BytePointerData=function(e,t){this.bytes=e;this.offset=t};$hxClasses["lime.utils.BytePointerData"]=lime_utils_BytePointerData;lime_utils_BytePointerData.__name__=["lime","utils","BytePointerData"];lime_utils_BytePointerData.prototype={bytes:null,offset:null,__class__:lime_utils_BytePointerData};var lime_utils__$Bytes_Bytes_$Impl_$={};$hxClasses["lime.utils._Bytes.Bytes_Impl_"]=lime_utils__$Bytes_Bytes_$Impl_$;lime_utils__$Bytes_Bytes_$Impl_$.__name__=["lime","utils","_Bytes","Bytes_Impl_"];lime_utils__$Bytes_Bytes_$Impl_$._new=function(e,t){var s=new haxe_io_Bytes(t);return s};lime_utils__$Bytes_Bytes_$Impl_$.fromBytes=function(e){if(e==null){return null}return lime_utils__$Bytes_Bytes_$Impl_$._new(e.length,e.b.bufferValue)};lime_utils__$Bytes_Bytes_$Impl_$.fromFile=function(e){return null};lime_utils__$Bytes_Bytes_$Impl_$.loadFromFile=function(e){var t=new lime_net__$HTTPRequest_$lime_$utils_$Bytes;return t.load(e)};lime_utils__$Bytes_Bytes_$Impl_$.ofString=function(e){var t=haxe_io_Bytes.ofString(e);return lime_utils__$Bytes_Bytes_$Impl_$._new(t.length,t.b.bufferValue)};var lime_utils_Log=function(){};$hxClasses["lime.utils.Log"]=lime_utils_Log;lime_utils_Log.__name__=["lime","utils","Log"];lime_utils_Log.error=function(e,t){if(lime_utils_Log.level>=1){var s="["+t.className+"] ERROR: "+Std.string(e);if(lime_utils_Log.throwErrors){throw new js__$Boot_HaxeError(s)}else{console.error(s)}}};lime_utils_Log.info=function(e,t){if(lime_utils_Log.level>=3){console.info("["+t.className+"] "+Std.string(e))}};lime_utils_Log.verbose=function(e,t){if(lime_utils_Log.level>=5){console.log("["+t.className+"] "+Std.string(e))}};lime_utils_Log.warn=function(e,t){if(lime_utils_Log.level>=2){console.warn("["+t.className+"] WARNING: "+Std.string(e))}};var lime_utils_Preloader=function(){this.bytesTotalCache=new haxe_ds_StringMap;this.bytesLoadedCache2=new haxe_ds_StringMap;this.bytesLoadedCache=new haxe_ds_ObjectMap;this.onProgress=new lime_app__$Event_$Int_$Int_$Void;this.onComplete=new lime_app__$Event_$Void_$Void;this.bytesLoaded=0;this.bytesTotal=0;this.libraries=[];this.libraryNames=[];this.onProgress.add($bind(this,this.update))};$hxClasses["lime.utils.Preloader"]=lime_utils_Preloader;lime_utils_Preloader.__name__=["lime","utils","Preloader"];lime_utils_Preloader.prototype={complete:null,onComplete:null,onProgress:null,bytesLoaded:null,bytesLoadedCache:null,bytesLoadedCache2:null,bytesTotal:null,bytesTotalCache:null,initLibraryNames:null,libraries:null,libraryNames:null,loadedLibraries:null,preloadComplete:null,preloadStarted:null,simulateProgress:null,addLibrary:function(e){this.libraries.push(e)},addLibraryName:function(e){if(this.libraryNames.indexOf(e)==-1){this.libraryNames.push(e)}},load:function(){var i=this;var e=0;var t=this.libraries;while(e0){var s=o.bytesTotalCache;if(!(__map_reserved[n[0]]!=null?s.existsReserved(n[0]):s.h.hasOwnProperty(n[0]))){var i=o.bytesTotalCache;if(__map_reserved[n[0]]!=null){i.setReserved(n[0],t)}else{i.h[n[0]]=t}o.bytesTotal+=t-200}if(e>t){e=t}var a=o.bytesLoadedCache2;if(!(__map_reserved[n[0]]!=null?a.existsReserved(n[0]):a.h.hasOwnProperty(n[0]))){o.bytesLoaded+=e}else{var r=o.bytesLoadedCache2;o.bytesLoaded+=e-(__map_reserved[n[0]]!=null?r.getReserved(n[0]):r.h[n[0]])}var _=o.bytesLoadedCache2;if(__map_reserved[n[0]]!=null){_.setReserved(n[0],e)}else{_.h[n[0]]=e}if(!o.simulateProgress){o.onProgress.dispatch(o.bytesLoaded,o.bytesTotal)}}}}(s)).onComplete(function(_){return function(e){var t=200;var s=o.bytesTotalCache;if(__map_reserved[_[0]]!=null?s.existsReserved(_[0]):s.h.hasOwnProperty(_[0])){var i=o.bytesTotalCache;if(__map_reserved[_[0]]!=null){t=i.getReserved(_[0])}else{t=i.h[_[0]]}}var a=o.bytesLoadedCache2;if(!(__map_reserved[_[0]]!=null?a.existsReserved(_[0]):a.h.hasOwnProperty(_[0]))){o.bytesLoaded+=t}else{var r=o.bytesLoadedCache2;o.bytesLoaded+=t-(__map_reserved[_[0]]!=null?r.getReserved(_[0]):r.h[_[0]])}o.loadedAssetLibrary(_[0])}}(s)).onError(function(){return function(e){lime_utils_Log.error(e,{fileName:"Preloader.hx",lineNumber:332,className:"lime.utils.Preloader",methodName:"updateProgress"})}}())}}if(!this.simulateProgress&&this.loadedLibraries==this.libraries.length+this.libraryNames.length){if(!this.preloadComplete){this.preloadComplete=true;lime_utils_Log.verbose("Preload complete",{fileName:"Preloader.hx",lineNumber:346,className:"lime.utils.Preloader",methodName:"updateProgress"})}this.start()}},__class__:lime_utils_Preloader};var motion_actuators_IGenericActuator=function(){};$hxClasses["motion.actuators.IGenericActuator"]=motion_actuators_IGenericActuator;motion_actuators_IGenericActuator.__name__=["motion","actuators","IGenericActuator"];motion_actuators_IGenericActuator.prototype={stop:null,__class__:motion_actuators_IGenericActuator};var motion_actuators_GenericActuator=function(e,t,s){this._autoVisible=true;this._delay=0;this._reflect=false;this._repeat=0;this._reverse=false;this._smartRotation=false;this._snapping=false;this.special=false;this.target=e;this.properties=s;this.duration=t;this._ease=motion_Actuate.defaultEase};$hxClasses["motion.actuators.GenericActuator"]=motion_actuators_GenericActuator;motion_actuators_GenericActuator.__name__=["motion","actuators","GenericActuator"];motion_actuators_GenericActuator.__interfaces__=[motion_actuators_IGenericActuator];motion_actuators_GenericActuator.prototype={duration:null,id:null,properties:null,target:null,_autoVisible:null,_delay:null,_ease:null,_onComplete:null,_onCompleteParams:null,_onRepeat:null,_onRepeatParams:null,_onUpdate:null,_onUpdateParams:null,_onResume:null,_onResumeParams:null,_onPause:null,_onPauseParams:null,_reflect:null,_repeat:null,_reverse:null,_smartRotation:null,_snapping:null,special:null,apply:function(){var e=0;var t=Reflect.fields(this.properties);while(e=s.timeOffset){s.update(t)}++i}else{motion_actuators_SimpleActuator.actuators.splice(i,1);--motion_actuators_SimpleActuator.actuatorsLength}}};motion_actuators_SimpleActuator.__super__=motion_actuators_GenericActuator;motion_actuators_SimpleActuator.prototype=$extend(motion_actuators_GenericActuator.prototype,{setField_openfl_geom_Transform:function(e,t,s){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=s}else{Reflect.setProperty(e,t,s)}},setField_motion_actuators_TransformActuator_T:function(e,t,s){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=s}else{Reflect.setProperty(e,t,s)}},setField_motion_actuators_MotionPathActuator_T:function(e,t,s){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=s}else{Reflect.setProperty(e,t,s)}},setField_openfl_display_DisplayObject:function(e,t,s){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=s}else{Reflect.setProperty(e,t,s)}},setField_motion_actuators_SimpleActuator_T:function(e,t,s){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=s}else{Reflect.setProperty(e,t,s)}},timeOffset:null,active:null,cacheVisible:null,detailsLength:null,initialized:null,paused:null,pauseTime:null,propertyDetails:null,sendChange:null,setVisible:null,startTime:null,toggleVisible:null,autoVisible:function(e){if(e==null){e=true}this._autoVisible=e;if(!e){this.toggleVisible=false;if(this.setVisible){var t=this.target;var s=this.cacheVisible;if(Object.prototype.hasOwnProperty.call(t,"visible")){t["visible"]=s}else{Reflect.setProperty(t,"visible",s)}}}return this},delay:function(e){this._delay=e;this.timeOffset=this.startTime+e;return this},getField:function(e,t){var s=null;if(Object.prototype.hasOwnProperty.call(e,t)){s=Reflect.field(e,t)}else{s=Reflect.getProperty(e,t)}return s},initialize:function(){var e;var t;var s=0;var i=Reflect.fields(this.properties);while(s1){a=1}if(!this.initialized){this.initialize()}if(!this.special){s=this._ease.calculate(a);var r=0;var _=this.detailsLength;while(r<_){var n=r++;t=this.propertyDetails[n];var o=t.start+t.change*s;if(t.isField){t.target[t.propertyName]=o}else{Reflect.setProperty(t.target,t.propertyName,o)}}}else{if(!this._reverse){s=this._ease.calculate(a)}else{s=this._ease.calculate(1-a)}var l;var h=0;var c=this.detailsLength;while(h180){f-=360}else if(f<-180){f+=360}l=t.start+f*s}else{l=t.start+t.change*s}if(!this._snapping){if(t.isField){t.target[t.propertyName]=l}else{Reflect.setProperty(t.target,t.propertyName,l)}}else{var p=Math.round(l);if(t.isField){t.target[t.propertyName]=p}else{Reflect.setProperty(t.target,t.propertyName,p)}}}}if(a==1){if(this._repeat==0){this.active=false;var d;if(this.toggleVisible){var g=this.target;var m=null;if(Object.prototype.hasOwnProperty.call(g,"alpha")){m=Reflect.field(g,"alpha")}else{m=Reflect.getProperty(g,"alpha")}d=m==0}else{d=false}if(d){var v=this.target;if(Object.prototype.hasOwnProperty.call(v,"visible")){v["visible"]=false}else{Reflect.setProperty(v,"visible",false)}}this.complete(true);return}else{if(this._onRepeat!=null){var b=this._onRepeat;var y=this._onRepeatParams;if(y==null){y=[]}b.apply(b,y)}if(this._reflect){this._reverse=!this._reverse}this.startTime=e;this.timeOffset=this.startTime+this._delay;if(this._repeat>0){this._repeat--}}}if(this.sendChange){this.change()}}},__class__:motion_actuators_SimpleActuator});var motion_easing_Expo=function(){};$hxClasses["motion.easing.Expo"]=motion_easing_Expo;motion_easing_Expo.__name__=["motion","easing","Expo"];motion_easing_Expo.__properties__={get_easeOut:"get_easeOut"};motion_easing_Expo.get_easeOut=function(){return new motion_easing_ExpoEaseOut};var motion_easing_IEasing=function(){};$hxClasses["motion.easing.IEasing"]=motion_easing_IEasing;motion_easing_IEasing.__name__=["motion","easing","IEasing"];motion_easing_IEasing.prototype={calculate:null,__class__:motion_easing_IEasing};var motion_easing_ExpoEaseOut=function(){};$hxClasses["motion.easing.ExpoEaseOut"]=motion_easing_ExpoEaseOut;motion_easing_ExpoEaseOut.__name__=["motion","easing","ExpoEaseOut"];motion_easing_ExpoEaseOut.__interfaces__=[motion_easing_IEasing];motion_easing_ExpoEaseOut.prototype={calculate:function(e){if(e==1){return 1}else{return 1-Math.pow(2,-10*e)}},__class__:motion_easing_ExpoEaseOut};var motion_Actuate=function(){};$hxClasses["motion.Actuate"]=motion_Actuate;motion_Actuate.__name__=["motion","Actuate"];motion_Actuate.apply=function(e,t,s){motion_Actuate.stop(e,t);if(s==null){s=motion_Actuate.defaultActuator}var i=Type.createInstance(s,[e,0,t]);i.apply();return i};motion_Actuate.getLibrary=function(e,t){if(t==null){t=true}if(motion_Actuate.targetLibraries.h.__keys__[e.__id__]==null&&t){motion_Actuate.targetLibraries.set(e,[])}return motion_Actuate.targetLibraries.h[e.__id__]};motion_Actuate.stop=function(e,t,s,i){if(i==null){i=true}if(s==null){s=false}if(e!=null){if(js_Boot.__instanceof(e,motion_actuators_IGenericActuator)){var a=e;a.stop(null,s,i)}else{var r=motion_Actuate.getLibrary(e,false);if(r!=null){if(typeof t=="string"){var _={};_[t]=null;t=_}else if(t instanceof Array&&t.__enum__==null){var n={};var o=0;var l=js_Boot.__cast(t,Array);while(o=0){r[c].stop(t,s,i);--c}}}}};motion_Actuate.tween=function(e,t,s,i,a){if(i==null){i=true}if(e!=null){if(t>0){if(a==null){a=motion_Actuate.defaultActuator}var r=Type.createInstance(a,[e,t,s]);var _=motion_Actuate.getLibrary(r.target);if(i){var n=_.length-1;while(n>=0){_[n].stop(r.properties,false,false);--n}_=motion_Actuate.getLibrary(r.target)}_.push(r);r.move();return r}else{return motion_Actuate.apply(e,s,a)}}return null};motion_Actuate.unload=function(e){var t=e.target;if(motion_Actuate.targetLibraries.h.__keys__[t.__id__]!=null){HxOverrides.remove(motion_Actuate.targetLibraries.h[t.__id__],e);if(motion_Actuate.targetLibraries.h[t.__id__].length==0){motion_Actuate.targetLibraries.remove(t)}}};var motion_IComponentPath=function(){};$hxClasses["motion.IComponentPath"]=motion_IComponentPath;motion_IComponentPath.__name__=["motion","IComponentPath"];motion_IComponentPath.prototype={get_end:null,start:null,calculate:null,__class__:motion_IComponentPath,__properties__:{get_end:"get_end"}};var motion_actuators_FilterActuator=function(e,t,s){this.filterIndex=-1;motion_actuators_SimpleActuator.call(this,e,t,s);if(js_Boot.__instanceof(s.filter,Class)){this.filterClass=s.filter;if(e.get_filters().length==0){e.set_filters([Type.createInstance(this.filterClass,[])])}var i=0;var a=e.get_filters();while(i-1){t[this.properties.filter]=this.filter}else{var s=0;var i=t.length;while(s1){i=1}if(!this.initialized){this.initialize()}if(!this.special){s=this._ease.calculate(i);var a=0;var r=this.propertyDetails;while(a0){this._repeat--}}}if(this.sendChange){this.change()}}},__class__:motion_actuators_MotionPathActuator});var motion_actuators_PropertyDetails=function(e,t,s,i,a){if(a==null){a=true}this.target=e;this.propertyName=t;this.start=s;this.change=i;this.isField=a};$hxClasses["motion.actuators.PropertyDetails"]=motion_actuators_PropertyDetails;motion_actuators_PropertyDetails.__name__=["motion","actuators","PropertyDetails"];motion_actuators_PropertyDetails.prototype={change:null,isField:null,propertyName:null,start:null,target:null,__class__:motion_actuators_PropertyDetails};var motion_actuators_PropertyPathDetails=function(e,t,s,i){if(i==null){i=true}motion_actuators_PropertyDetails.call(this,e,t,0,0,i);this.path=s};$hxClasses["motion.actuators.PropertyPathDetails"]=motion_actuators_PropertyPathDetails;motion_actuators_PropertyPathDetails.__name__=["motion","actuators","PropertyPathDetails"];motion_actuators_PropertyPathDetails.__super__=motion_actuators_PropertyDetails;motion_actuators_PropertyPathDetails.prototype=$extend(motion_actuators_PropertyDetails.prototype,{path:null,__class__:motion_actuators_PropertyPathDetails});var motion_actuators_TransformActuator=function(e,t,s){motion_actuators_SimpleActuator.call(this,e,t,s)};$hxClasses["motion.actuators.TransformActuator"]=motion_actuators_TransformActuator;motion_actuators_TransformActuator.__name__=["motion","actuators","TransformActuator"];motion_actuators_TransformActuator.__super__=motion_actuators_SimpleActuator;motion_actuators_TransformActuator.prototype=$extend(motion_actuators_SimpleActuator.prototype,{endColorTransform:null,endSoundTransform:null,tweenColorTransform:null,tweenSoundTransform:null,apply:function(){this.initialize();if(this.endColorTransform!=null){var e=this.target;var t=null;if(Object.prototype.hasOwnProperty.call(e,"transform")){t=Reflect.field(e,"transform")}else{t=Reflect.getProperty(e,"transform")}var s=t;var i=this.endColorTransform;if(Object.prototype.hasOwnProperty.call(s,"colorTransform")){s["colorTransform"]=i}else{Reflect.setProperty(s,"colorTransform",i)}}if(this.endSoundTransform!=null){var a=this.target;var r=this.endSoundTransform;if(Object.prototype.hasOwnProperty.call(a,"soundTransform")){a["soundTransform"]=r}else{Reflect.setProperty(a,"soundTransform",r)}}},initialize:function(){if(Object.prototype.hasOwnProperty.call(this.properties,"colorValue")&&js_Boot.__instanceof(this.target,openfl_display_DisplayObject)){this.initializeColor()}if(Object.prototype.hasOwnProperty.call(this.properties,"soundVolume")||Object.prototype.hasOwnProperty.call(this.properties,"soundPan")){this.initializeSound()}this.detailsLength=this.propertyDetails.length;this.initialized=true},initializeColor:function(){this.endColorTransform=new openfl_geom_ColorTransform;var e=this.properties.colorValue;var t=this.properties.colorStrength;if(t<1){var s;var i;if(t<.5){s=1;i=t*2}else{s=1-(t-.5)*2;i=1}this.endColorTransform.redMultiplier=s;this.endColorTransform.greenMultiplier=s;this.endColorTransform.blueMultiplier=s;this.endColorTransform.redOffset=i*(e>>16&255);this.endColorTransform.greenOffset=i*(e>>8&255);this.endColorTransform.blueOffset=i*(e&255)}else{this.endColorTransform.redMultiplier=0;this.endColorTransform.greenMultiplier=0;this.endColorTransform.blueMultiplier=0;this.endColorTransform.redOffset=e>>16&255;this.endColorTransform.greenOffset=e>>8&255;this.endColorTransform.blueOffset=e&255}var a=["redMultiplier","greenMultiplier","blueMultiplier","redOffset","greenOffset","blueOffset"];if(Object.prototype.hasOwnProperty.call(this.properties,"colorAlpha")){this.endColorTransform.alphaMultiplier=this.properties.colorAlpha;a.push("alphaMultiplier")}else{var r=this.target;var _=null;if(Object.prototype.hasOwnProperty.call(r,"alpha")){_=Reflect.field(r,"alpha")}else{_=Reflect.getProperty(r,"alpha")}this.endColorTransform.alphaMultiplier=_}var n=this.target;var o=null;if(Object.prototype.hasOwnProperty.call(n,"transform")){o=Reflect.field(n,"transform")}else{o=Reflect.getProperty(n,"transform")}var l=o;var h=null;if(Object.prototype.hasOwnProperty.call(l,"colorTransform")){h=Reflect.field(l,"colorTransform")}else{h=Reflect.getProperty(l,"colorTransform")}var c=h;this.tweenColorTransform=new openfl_geom_ColorTransform;var u;var f;var p=0;while(p0){i+="&"}var n=encodeURIComponent(_)+"=";var o=Std.string(Reflect.field(e.data,_));i+=n+encodeURIComponent(o)}if(s.indexOf("?")>-1){s+="&"+i}else{s+="?"+i}}lime_system_System.openURL(s,t)};openfl_Lib.get_current=function(){if(openfl__$internal_Lib.current==null){openfl__$internal_Lib.current=new openfl_display_MovieClip}return openfl__$internal_Lib.current};var openfl__$Vector_IVector=function(){};$hxClasses["openfl._Vector.IVector"]=openfl__$Vector_IVector;openfl__$Vector_IVector.__name__=["openfl","_Vector","IVector"];openfl__$Vector_IVector.prototype={get_length:null,set_length:null,get:null,__class__:openfl__$Vector_IVector,__properties__:{set_length:"set_length",get_length:"get_length"}};var openfl__$Vector_BoolVector=function(){};$hxClasses["openfl._Vector.BoolVector"]=openfl__$Vector_BoolVector;openfl__$Vector_BoolVector.__name__=["openfl","_Vector","BoolVector"];openfl__$Vector_BoolVector.__interfaces__=[openfl__$Vector_IVector];openfl__$Vector_BoolVector.prototype={fixed:null,__array:null,get:function(e){if(e>=this.__array.length){return false}else{return this.__array[e]}},toJSON:function(){return this.__array},get_length:function(){return this.__array.length},set_length:function(e){if(!this.fixed){var t=this.__array.length;if(e<0){e=0}if(e>t){var s=t;var i=e;while(se)this.__array.pop()}}return this.__array.length},__class__:openfl__$Vector_BoolVector,__properties__:{set_length:"set_length",get_length:"get_length"}};var openfl__$Vector_FloatVector=function(e,t,s,i){if(i==null){i=false}if(i){this.__array=[];if(s!=null){var a=0;var r=s.length;while(a0){this.set_length(e)}this.fixed=t==true};$hxClasses["openfl._Vector.FloatVector"]=openfl__$Vector_FloatVector;openfl__$Vector_FloatVector.__name__=["openfl","_Vector","FloatVector"];openfl__$Vector_FloatVector.__interfaces__=[openfl__$Vector_IVector];openfl__$Vector_FloatVector.prototype={fixed:null,__array:null,concat:function(e){if(e==null){return new openfl__$Vector_FloatVector(null,null,this.__array.slice())}else{var t=e;if(t.__array.length>0){return new openfl__$Vector_FloatVector(null,null,this.__array.concat(t.__array))}else{return new openfl__$Vector_FloatVector(null,null,this.__array.slice())}}},copy:function(){return new openfl__$Vector_FloatVector(null,this.fixed,this.__array.slice())},get:function(e){return this.__array[e]},push:function(e){if(!this.fixed){return this.__array.push(e)}else{return this.__array.length}},set:function(e,t){if(!this.fixed||et){var s=t;var i=e;while(se)this.__array.pop()}}return this.__array.length},__class__:openfl__$Vector_FloatVector,__properties__:{set_length:"set_length",get_length:"get_length"}};var openfl__$Vector_FunctionVector=function(){};$hxClasses["openfl._Vector.FunctionVector"]=openfl__$Vector_FunctionVector;openfl__$Vector_FunctionVector.__name__=["openfl","_Vector","FunctionVector"];openfl__$Vector_FunctionVector.__interfaces__=[openfl__$Vector_IVector];openfl__$Vector_FunctionVector.prototype={fixed:null,__array:null,get:function(e){if(e>=this.__array.length){return null}else{return this.__array[e]}},toJSON:function(){return this.__array},get_length:function(){return this.__array.length},set_length:function(e){if(!this.fixed){var t=this.__array.length;if(e<0){e=0}if(e>t){var s=t;var i=e;while(se)this.__array.pop()}}return this.__array.length},__class__:openfl__$Vector_FunctionVector,__properties__:{set_length:"set_length",get_length:"get_length"}};var openfl__$Vector_IntVector=function(e,t,s){if(s==null){s=[]}this.__array=s;if(e!=null&&e>0){this.set_length(e)}this.fixed=t==true};$hxClasses["openfl._Vector.IntVector"]=openfl__$Vector_IntVector;openfl__$Vector_IntVector.__name__=["openfl","_Vector","IntVector"];openfl__$Vector_IntVector.__interfaces__=[openfl__$Vector_IVector];openfl__$Vector_IntVector.prototype={fixed:null,__array:null,get:function(e){return this.__array[e]},toJSON:function(){return this.__array},get_length:function(){return this.__array.length},set_length:function(e){if(!this.fixed){var t=this.__array.length;if(e<0){e=0}if(e>t){var s=t;var i=e;while(se)this.__array.pop()}}return this.__array.length},__class__:openfl__$Vector_IntVector,__properties__:{set_length:"set_length",get_length:"get_length"}};var openfl__$Vector_ObjectVector=function(e,t,s,i){if(i==null){i=false}if(i){this.__array=[];if(s!=null){var a=0;var r=s.length;while(a0){this.set_length(e)}this.fixed=t==true};$hxClasses["openfl._Vector.ObjectVector"]=openfl__$Vector_ObjectVector;openfl__$Vector_ObjectVector.__name__=["openfl","_Vector","ObjectVector"];openfl__$Vector_ObjectVector.__interfaces__=[openfl__$Vector_IVector];openfl__$Vector_ObjectVector.prototype={fixed:null,__array:null,get:function(e){return this.__array[e]},indexOf:function(e,t){if(t==null){t=0}var s=t;var i=this.__array.length;while(st){var s=t;var i=e;while(se)this.__array.pop()}}return this.__array.length},__class__:openfl__$Vector_ObjectVector,__properties__:{set_length:"set_length",get_length:"get_length"}};var openfl__$internal_Lib=function(){};$hxClasses["openfl._internal.Lib"]=openfl__$internal_Lib;openfl__$internal_Lib.__name__=["openfl","_internal","Lib"];var openfl__$internal_formats_agal_AGALConverter=function(){};$hxClasses["openfl._internal.formats.agal.AGALConverter"]=openfl__$internal_formats_agal_AGALConverter;openfl__$internal_formats_agal_AGALConverter.__name__=["openfl","_internal","formats","agal","AGALConverter"];openfl__$internal_formats_agal_AGALConverter.prefixFromType=function(e,t){switch(e){case 0:return"va";case 1:if(t==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX){return"vc"}else{return"fc"}break;case 2:if(t==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX){return"vt"}else{return"ft"}break;case 3:return"output_";case 4:return"v";case 5:return"sampler";default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Invalid data!"))}};openfl__$internal_formats_agal_AGALConverter.readUInt64=function(e){var t=e.readInt();var s=e.readInt();var i=new haxe__$Int64__$_$_$Int64(s,t);return i};openfl__$internal_formats_agal_AGALConverter.convertToGLSL=function(e,t){e.position=0;e.__endian=1;var s=e.readByte()&255;if(s==176){return e.readUTF()}if(s!=160){throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Magic value must be 0xA0, may not be AGAL"))}var i=e.readInt();if(i!=1){throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Version must be 1"))}var a=e.readByte()&255;if(a!=161){throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Shader type ID must be 0xA1"))}var r=(e.readByte()&255)==0?openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX:openfl__$internal_formats_agal__$AGALConverter_ProgramType.FRAGMENT;var _=new openfl__$internal_formats_agal_RegisterMap;var n="";while(true){var o=e.position;if(!_$UInt_UInt_$Impl_$.gt(openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e),o)){break}var l=e.readInt();var h=e.readUnsignedInt();var c=openfl__$internal_formats_agal_AGALConverter.readUInt64(e);var u=openfl__$internal_formats_agal_AGALConverter.readUInt64(e);var f=openfl__$internal_formats_agal__$AGALConverter_DestRegister.parse(h,r);var p=openfl__$internal_formats_agal__$AGALConverter_SourceRegister.parse(c,r,f.mask);var d=openfl__$internal_formats_agal__$AGALConverter_SourceRegister.parse(u,r,f.mask);n+="\t";switch(l){case 0:n+=Std.string(f.toGLSL()+" = "+p.toGLSL()+"; // mov");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 1:n+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" + "+d.toGLSL()+"; // add");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 2:n+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" - "+d.toGLSL()+"; // sub");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 3:n+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" * "+d.toGLSL()+"; // mul");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 4:n+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" / "+d.toGLSL()+"; // div");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 5:var g=p.toGLSL();if(g.indexOf(".")>-1){n+=Std.string(f.toGLSL()+" = 1.0 / "+p.toGLSL()+"; // rcp")}else{n+=Std.string(f.toGLSL()+" = vec4(1) / "+p.toGLSL()+"; // rcp")}_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 6:n+=Std.string(f.toGLSL()+" = min("+p.toGLSL()+", "+d.toGLSL()+"); // min");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 7:n+=Std.string(f.toGLSL()+" = max("+p.toGLSL()+", "+d.toGLSL()+"); // max");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 8:n+=Std.string(f.toGLSL()+" = fract("+p.toGLSL()+"); // frc");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 9:n+=Std.string(f.toGLSL()+" = sqrt("+p.toGLSL()+"); // sqrt");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 10:n+=Std.string(f.toGLSL()+" = inversesqrt("+p.toGLSL()+"); // rsq");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 11:n+=Std.string(f.toGLSL()+" = pow("+p.toGLSL()+", "+d.toGLSL()+"); // pow");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 12:n+=Std.string(f.toGLSL()+" = log2("+p.toGLSL()+"); // log");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 13:n+=Std.string(f.toGLSL()+" = exp2("+p.toGLSL()+"); // exp");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 14:n+=Std.string(f.toGLSL()+" = normalize("+p.toGLSL()+"); // normalize");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 15:n+=Std.string(f.toGLSL()+" = sin("+p.toGLSL()+"); // sin");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 16:n+=Std.string(f.toGLSL()+" = cos("+p.toGLSL()+"); // cos");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 17:p.sourceMask=d.sourceMask=7;n+=Std.string(f.toGLSL()+" = cross(vec3("+p.toGLSL()+"), vec3("+d.toGLSL()+")); // crs");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 18:p.sourceMask=d.sourceMask=7;n+=Std.string(f.toGLSL()+" = vec4(dot(vec3("+p.toGLSL()+"), vec3("+d.toGLSL()+")))"+f.getWriteMask()+"; // dp3");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 19:p.sourceMask=d.sourceMask=15;n+=Std.string(f.toGLSL()+" = vec4(dot(vec4("+p.toGLSL()+"), vec4("+d.toGLSL()+")))"+f.getWriteMask()+"; // dp4");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 20:n+=Std.string(f.toGLSL()+" = abs("+p.toGLSL()+"); // abs");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 21:n+=Std.string(f.toGLSL()+" = -"+p.toGLSL()+"; // neg");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 22:n+=Std.string(f.toGLSL()+" = clamp("+p.toGLSL()+", 0.0, 1.0); // saturate");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 23:var m=_.getRegisterUsage(d);if(m!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4&&m!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY){n+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" * mat3("+d.toGLSL(false)+"); // m33");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.MATRIX_4_4)}else{p.sourceMask=d.sourceMask=7;n+=Std.string(f.toGLSL()+" = vec3("+"dot("+p.toGLSL(true)+","+d.toGLSL(true,0)+"), "+"dot("+p.toGLSL(true)+","+d.toGLSL(true,1)+"),"+"dot("+p.toGLSL(true)+","+d.toGLSL(true,2)+")); // m33");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,0);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,1);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,2)}break;case 24:var v=_.getRegisterUsage(d);if(v!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4&&v!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY){n+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" * "+d.toGLSL(false)+"; // m44");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.MATRIX_4_4)}else{p.sourceMask=d.sourceMask=15;n+=Std.string(f.toGLSL()+" = vec4("+"dot("+p.toGLSL(true)+","+d.toGLSL(true,0)+"), "+"dot("+p.toGLSL(true)+","+d.toGLSL(true,1)+"), "+"dot("+p.toGLSL(true)+","+d.toGLSL(true,2)+"), "+"dot("+p.toGLSL(true)+","+d.toGLSL(true,3)+")); // m44");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,0);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,1);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,2);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,3)}break;case 25:f.mask&=7;var b=_.getRegisterUsage(d);if(b!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4&&b!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY){n+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" * "+d.toGLSL(false)+"; // m34");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.MATRIX_4_4)}else{p.sourceMask=d.sourceMask=15;n+=Std.string(f.toGLSL()+" = vec3("+"dot("+p.toGLSL(true)+","+d.toGLSL(true,0)+"), "+"dot("+p.toGLSL(true)+","+d.toGLSL(true,1)+"),"+"dot("+p.toGLSL(true)+","+d.toGLSL(true,2)+")); // m34");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,0);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,1);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,2)}break;case 39:p.sourceMask=15;n+=Std.string("if (any(lessThan("+p.toGLSL()+", vec4(0)))) discard;");_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 40:var y=openfl__$internal_formats_agal__$AGALConverter_SamplerRegister.parse(u,r);var x=y.d;switch(x){case 0:if(y.t==2){p.sourceMask=3;_.addSaR(y,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_2D_ALPHA);n+=Std.string("if ("+y.toGLSL()+"_alphaEnabled) {\n");n+=Std.string("\t\t"+f.toGLSL()+" = vec4(texture2D("+y.toGLSL()+", "+p.toGLSL()+").xyz, texture2D("+y.toGLSL()+"_alpha, "+p.toGLSL()+").x); // tex + alpha\n");n+="\t} else {\n";n+=Std.string("\t\t"+f.toGLSL()+" = texture2D("+y.toGLSL()+", "+p.toGLSL()+"); // tex\n");n+="\t}"}else{p.sourceMask=3;_.addSaR(y,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_2D);n+=Std.string(f.toGLSL()+" = texture2D("+y.toGLSL()+", "+p.toGLSL()+"); // tex")}break;case 1:if(y.t==2){p.sourceMask=7;_.addSaR(y,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_CUBE_ALPHA);n+=Std.string("if ("+y.toGLSL()+"_alphaEnabled) {\n");n+=Std.string("\t\t"+f.toGLSL()+" = vec4(textureCube("+y.toGLSL()+", "+p.toGLSL()+").xyz, textureCube("+y.toGLSL()+"_alpha, "+p.toGLSL()+").x); // tex + alpha\n");n+="\t} else {\n";n+=Std.string("\t\t"+f.toGLSL()+" = textureCube("+y.toGLSL()+", "+p.toGLSL()+"); // tex");n+="\t}"}else{p.sourceMask=7;n+=Std.string(f.toGLSL()+" = textureCube("+y.toGLSL()+", "+p.toGLSL()+"); // tex");_.addSaR(y,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_CUBE)}break}_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);if(t!=null){t[y.n]=y.toSamplerState()}break;case 41:p.sourceMask=d.sourceMask=15;n+=Std.string(f.toGLSL()+" = vec4(greaterThanEqual("+p.toGLSL()+", "+d.toGLSL()+"))"+f.getWriteMask()+"; // ste");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 42:p.sourceMask=d.sourceMask=15;n+=Std.string(f.toGLSL()+" = vec4(lessThan("+p.toGLSL()+", "+d.toGLSL()+"))"+f.getWriteMask()+"; // slt");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 44:p.sourceMask=d.sourceMask=15;n+=Std.string(f.toGLSL()+" = vec4(equal("+p.toGLSL()+", "+d.toGLSL()+"))"+f.getWriteMask()+"; // seq");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 45:p.sourceMask=d.sourceMask=15;n+=Std.string(f.toGLSL()+" = vec4(notEqual("+p.toGLSL()+", "+d.toGLSL()+"))"+f.getWriteMask()+"; // sne");_.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);_.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Opcode "+l))}n+="\n"}if(openfl__$internal_formats_agal_AGALConverter.limitedProfile==null){var P=lime_graphics_opengl_GL.context.getParameter(7938);openfl__$internal_formats_agal_AGALConverter.limitedProfile=P.indexOf("OpenGL ES")>-1||P.indexOf("WebGL")>-1}var k="";k+=Std.string("// AGAL "+(r==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX?"vertex":"fragment")+" shader\n");if(openfl__$internal_formats_agal_AGALConverter.limitedProfile){k+="#version 100\n";k+="precision highp float;\n"}else{k+="#version 120\n"}k+=Std.string(_.toGLSL(false));if(r==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX){k+="uniform vec4 vcPositionScale;\n"}k+="void main() {\n";k+=Std.string(_.toGLSL(true));k+=Std.string(n);if(r==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX){k+="\tgl_Position *= vcPositionScale;\n"}k+="}\n";return k};var openfl__$internal_formats_agal__$AGALConverter_DestRegister=function(){};$hxClasses["openfl._internal.formats.agal._AGALConverter.DestRegister"]=openfl__$internal_formats_agal__$AGALConverter_DestRegister;openfl__$internal_formats_agal__$AGALConverter_DestRegister.__name__=["openfl","_internal","formats","agal","_AGALConverter","DestRegister"];openfl__$internal_formats_agal__$AGALConverter_DestRegister.parse=function(e,t){var s=new openfl__$internal_formats_agal__$AGALConverter_DestRegister;s.programType=t;s.type=e>>>24&15;s.mask=e>>>16&15;s.n=e&65535;return s};openfl__$internal_formats_agal__$AGALConverter_DestRegister.prototype={mask:null,n:null,programType:null,type:null,getWriteMask:function(){var e=".";if((this.mask&1)!=0){e+="x"}if((this.mask&2)!=0){e+="y"}if((this.mask&4)!=0){e+="z"}if((this.mask&8)!=0){e+="w"}return e},toGLSL:function(e){if(e==null){e=true}var t;if(this.type==3){if(this.programType==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX){t="gl_Position"}else{t="gl_FragColor"}}else{t=openfl__$internal_formats_agal_AGALConverter.prefixFromType(this.type,this.programType)+this.n}if(e&&this.mask!=15){t+=this.getWriteMask()}return t},__class__:openfl__$internal_formats_agal__$AGALConverter_DestRegister};var openfl__$internal_formats_agal__$AGALConverter_ProgramType=$hxClasses["openfl._internal.formats.agal._AGALConverter.ProgramType"]={__ename__:["openfl","_internal","formats","agal","_AGALConverter","ProgramType"],__constructs__:["VERTEX","FRAGMENT"]};openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX=["VERTEX",0];openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX.toString=$estr;openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX.__enum__=openfl__$internal_formats_agal__$AGALConverter_ProgramType;openfl__$internal_formats_agal__$AGALConverter_ProgramType.FRAGMENT=["FRAGMENT",1];openfl__$internal_formats_agal__$AGALConverter_ProgramType.FRAGMENT.toString=$estr;openfl__$internal_formats_agal__$AGALConverter_ProgramType.FRAGMENT.__enum__=openfl__$internal_formats_agal__$AGALConverter_ProgramType;var openfl__$internal_formats_agal_RegisterMap=function(){this.mEntries=[]};$hxClasses["openfl._internal.formats.agal.RegisterMap"]=openfl__$internal_formats_agal_RegisterMap;openfl__$internal_formats_agal_RegisterMap.__name__=["openfl","_internal","formats","agal","RegisterMap"];openfl__$internal_formats_agal_RegisterMap.prototype={mEntries:null,add:function(e,t,s,i){var a=0;var r=this.mEntries;while(a>i,e.high<<32-i|e.low>>>i);a=_}else{var n=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>i-32);a=n}var o=new haxe__$Int64__$_$_$Int64(0,15);var l=o;var h=new haxe__$Int64__$_$_$Int64(a.high&l.high,a.low&l.low);s.f=h.low;var c=56;c&=63;var u;if(c==0){var f=new haxe__$Int64__$_$_$Int64(e.high,e.low);u=f}else if(c<32){var p=new haxe__$Int64__$_$_$Int64(e.high>>c,e.high<<32-c|e.low>>>c);u=p}else{var d=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>c-32);u=d}var g=new haxe__$Int64__$_$_$Int64(0,15);var m=g;var v=new haxe__$Int64__$_$_$Int64(u.high&m.high,u.low&m.low);s.m=v.low;var b=52;b&=63;var y;if(b==0){var x=new haxe__$Int64__$_$_$Int64(e.high,e.low);y=x}else if(b<32){var P=new haxe__$Int64__$_$_$Int64(e.high>>b,e.high<<32-b|e.low>>>b);y=P}else{var k=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>b-32);y=k}var w=new haxe__$Int64__$_$_$Int64(0,15);var C=w;var T=new haxe__$Int64__$_$_$Int64(y.high&C.high,y.low&C.low);s.w=T.low;var S=48;S&=63;var M;if(S==0){var $=new haxe__$Int64__$_$_$Int64(e.high,e.low);M=$}else if(S<32){var E=new haxe__$Int64__$_$_$Int64(e.high>>S,e.high<<32-S|e.low>>>S);M=E}else{var B=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>S-32);M=B}var L=new haxe__$Int64__$_$_$Int64(0,15);var R=L;var A=new haxe__$Int64__$_$_$Int64(M.high&R.high,M.low&R.low);s.s=A.low;var I=44;I&=63;var D;if(I==0){var F=new haxe__$Int64__$_$_$Int64(e.high,e.low);D=F}else if(I<32){var O=new haxe__$Int64__$_$_$Int64(e.high>>I,e.high<<32-I|e.low>>>I);D=O}else{var G=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>I-32);D=G}var j=new haxe__$Int64__$_$_$Int64(0,15);var H=j;var U=new haxe__$Int64__$_$_$Int64(D.high&H.high,D.low&H.low);s.d=U.low;var N=40;N&=63;var V;if(N==0){var W=new haxe__$Int64__$_$_$Int64(e.high,e.low);V=W}else if(N<32){var z=new haxe__$Int64__$_$_$Int64(e.high>>N,e.high<<32-N|e.low>>>N);V=z}else{var X=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>N-32);V=X}var Y=new haxe__$Int64__$_$_$Int64(0,15);var q=Y;var K=new haxe__$Int64__$_$_$Int64(V.high&q.high,V.low&q.low);s.t=K.low;var J=32;J&=63;var Z;if(J==0){var Q=new haxe__$Int64__$_$_$Int64(e.high,e.low);Z=Q}else if(J<32){var ee=new haxe__$Int64__$_$_$Int64(e.high>>J,e.high<<32-J|e.low>>>J);Z=ee}else{var te=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>J-32);Z=te}var se=new haxe__$Int64__$_$_$Int64(0,15);var ie=se;var ae=new haxe__$Int64__$_$_$Int64(Z.high&ie.high,Z.low&ie.low);s.type=ae.low;var re=16;re&=63;var _e;if(re==0){var ne=new haxe__$Int64__$_$_$Int64(e.high,e.low);_e=ne}else if(re<32){var oe=new haxe__$Int64__$_$_$Int64(e.high>>re,e.high<<32-re|e.low>>>re);_e=oe}else{var le=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>re-32);_e=le}var he=new haxe__$Int64__$_$_$Int64(0,255);var ce=he;var ue=new haxe__$Int64__$_$_$Int64(_e.high&ce.high,_e.low&ce.low);s.b=ue.low;var fe=new haxe__$Int64__$_$_$Int64(0,65535);var pe=fe;var de=new haxe__$Int64__$_$_$Int64(e.high&pe.high,e.low&pe.low);s.n=de.low;return s};openfl__$internal_formats_agal__$AGALConverter_SamplerRegister.prototype={b:null,d:null,f:null,m:null,n:null,programType:null,s:null,t:null,type:null,w:null,toGLSL:function(){var e=openfl__$internal_formats_agal_AGALConverter.prefixFromType(this.type,this.programType)+this.n;return e},toSamplerState:function(){var e;var t;var s;var i=this.f;switch(i){case 0:t=5;break;case 1:t=4;break;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError)}var a=this.m;switch(a){case 0:s=2;break;case 1:s=1;break;case 2:s=0;break;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError)}var r=this.w;switch(r){case 0:e=0;break;case 1:e=2;break;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError)}var _=(this.s&4)==4;var n=(this.s&1)==1;var o=this.t==2;var l=(this.b<<24>>24)/8;return new openfl__$internal_renderer_SamplerState(e,t,s,l,_,n,o)},__class__:openfl__$internal_formats_agal__$AGALConverter_SamplerRegister};var openfl__$internal_formats_agal__$AGALConverter_SourceRegister=function(){};$hxClasses["openfl._internal.formats.agal._AGALConverter.SourceRegister"]=openfl__$internal_formats_agal__$AGALConverter_SourceRegister;openfl__$internal_formats_agal__$AGALConverter_SourceRegister.__name__=["openfl","_internal","formats","agal","_AGALConverter","SourceRegister"];openfl__$internal_formats_agal__$AGALConverter_SourceRegister.parse=function(e,t,s){var i=new openfl__$internal_formats_agal__$AGALConverter_SourceRegister;i.programType=t;var a=63;a&=63;var r;if(a==0){var _=new haxe__$Int64__$_$_$Int64(e.high,e.low);r=_}else if(a<32){var n=new haxe__$Int64__$_$_$Int64(e.high>>a,e.high<<32-a|e.low>>>a);r=n}else{var o=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>a-32);r=o}var l=new haxe__$Int64__$_$_$Int64(0,1);var h=l;var c=new haxe__$Int64__$_$_$Int64(r.high&h.high,r.low&h.low);i.d=c.low;var u=48;u&=63;var f;if(u==0){var p=new haxe__$Int64__$_$_$Int64(e.high,e.low);f=p}else if(u<32){var d=new haxe__$Int64__$_$_$Int64(e.high>>u,e.high<<32-u|e.low>>>u);f=d}else{var g=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>u-32);f=g}var m=new haxe__$Int64__$_$_$Int64(0,3);var v=m;var b=new haxe__$Int64__$_$_$Int64(f.high&v.high,f.low&v.low);i.q=b.low;var y=40;y&=63;var x;if(y==0){var P=new haxe__$Int64__$_$_$Int64(e.high,e.low);x=P}else if(y<32){var k=new haxe__$Int64__$_$_$Int64(e.high>>y,e.high<<32-y|e.low>>>y);x=k}else{var w=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>y-32);x=w}var C=new haxe__$Int64__$_$_$Int64(0,15);var T=C;var S=new haxe__$Int64__$_$_$Int64(x.high&T.high,x.low&T.low);i.itype=S.low;var M=32;M&=63;var $;if(M==0){var E=new haxe__$Int64__$_$_$Int64(e.high,e.low);$=E}else if(M<32){var B=new haxe__$Int64__$_$_$Int64(e.high>>M,e.high<<32-M|e.low>>>M);$=B}else{var L=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>M-32);$=L}var R=new haxe__$Int64__$_$_$Int64(0,15);var A=R;var I=new haxe__$Int64__$_$_$Int64($.high&A.high,$.low&A.low);i.type=I.low;var D=24;D&=63;var F;if(D==0){var O=new haxe__$Int64__$_$_$Int64(e.high,e.low);F=O}else if(D<32){var G=new haxe__$Int64__$_$_$Int64(e.high>>D,e.high<<32-D|e.low>>>D);F=G}else{var j=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>D-32);F=j}var H=new haxe__$Int64__$_$_$Int64(0,255);var U=H;var N=new haxe__$Int64__$_$_$Int64(F.high&U.high,F.low&U.low);i.s=N.low;var V=16;V&=63;var W;if(V==0){var z=new haxe__$Int64__$_$_$Int64(e.high,e.low);W=z}else if(V<32){var X=new haxe__$Int64__$_$_$Int64(e.high>>V,e.high<<32-V|e.low>>>V);W=X}else{var Y=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>V-32);W=Y}var q=new haxe__$Int64__$_$_$Int64(0,255);var K=q;var J=new haxe__$Int64__$_$_$Int64(W.high&K.high,W.low&K.low);i.o=J.low;var Z=new haxe__$Int64__$_$_$Int64(0,65535);var Q=Z;var ee=new haxe__$Int64__$_$_$Int64(e.high&Q.high,e.low&Q.low);i.n=ee.low;i.sourceMask=s;return i};openfl__$internal_formats_agal__$AGALConverter_SourceRegister.prototype={d:null,itype:null,n:null,o:null,programType:null,q:null,s:null,sourceMask:null,type:null,toGLSL:function(e,t){if(t==null){t=0}if(e==null){e=true}if(this.type==3){if(this.programType==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX){return"gl_Position"}else{return"gl_FragColor"}}var s=this.s==228&&this.sourceMask==15;var i="";if(this.type!=5&&!s){var a=0;while(a<4){var r=a++;if((this.sourceMask&1<>r*2&3;switch(_){case 0:i+="x";break;case 1:i+="y";break;case 2:i+="z";break;case 3:i+="w";break}}}}var n=openfl__$internal_formats_agal_AGALConverter.prefixFromType(this.type,this.programType);if(this.d==0){n+=this.n+t}else{n+=this.o;var o=String.fromCharCode(HxOverrides.cca("x",0)+this.q);var l=openfl__$internal_formats_agal_AGALConverter.prefixFromType(this.itype,this.programType)+this.n+"."+o;n+="[ int("+l+") +"+t+"]"}if(e&&i!=""){n+="."+i}return n},__class__:openfl__$internal_formats_agal__$AGALConverter_SourceRegister};var openfl__$internal_formats_html_HTMLParser=function(){};$hxClasses["openfl._internal.formats.html.HTMLParser"]=openfl__$internal_formats_html_HTMLParser;openfl__$internal_formats_html_HTMLParser.__name__=["openfl","_internal","formats","html","HTMLParser"];openfl__$internal_formats_html_HTMLParser.parse=function(e,t,s){e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexBreakTag.r,"\n");e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[0].r,'"');e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[1].r,"'");e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[2].r,"&");e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[5].r," ");var i=e.split("<");if(i.length==1){e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexHTMLTag.r,"");if(s.get_length()>1){s.splice(1,s.get_length()-1)}e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[3].r,"<");e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[4].r,">");var a=s.get(0);a.format=t;a.start=0;a.end=e.length;return e}else{s.splice(0,s.get_length());e="";var r;var _=0;var n=i.length;while(_");i[o]=r}var l=[t.clone()];var h=[];var c;var u=false;var f=0;while(f");var m=g+1;var v=p.indexOf(" ");var b=p.substring(d?1:0,v>-1&&v0){e+="\n";u=true}if(m-1){var x=b.toLowerCase();switch(x){case"a":if(openfl__$internal_formats_html_HTMLParser.__regexHref.match(p)){y.url=openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexHref)}break;case"b":y.bold=true;break;case"em":case"i":y.italic=true;break;case"font":if(openfl__$internal_formats_html_HTMLParser.__regexFace.match(p)){y.font=openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexFace)}if(openfl__$internal_formats_html_HTMLParser.__regexColor.match(p)){y.color=Std.parseInt("0x"+openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexColor))}if(openfl__$internal_formats_html_HTMLParser.__regexSize.match(p)){var P=openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexSize);var k=HxOverrides.cca(P,0);if(k==43||k==45){var w=l.length>=2?l[l.length-2]:t;y.size=w.size+Std.parseInt(P)}else{y.size=Std.parseInt(P)}}break;case"p":if(s.get_length()>0&&!u){e+="\n"}if(openfl__$internal_formats_html_HTMLParser.__regexAlign.match(p)){var C=openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexAlign).toLowerCase();y.align=openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.fromString(C)}break;case"textformat":if(openfl__$internal_formats_html_HTMLParser.__regexBlockIndent.match(p)){y.blockIndent=Std.parseInt(openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexBlockIndent))}if(openfl__$internal_formats_html_HTMLParser.__regexIndent.match(p)){y.indent=Std.parseInt(openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexIndent))}if(openfl__$internal_formats_html_HTMLParser.__regexLeading.match(p)){y.leading=Std.parseInt(openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexLeading))}if(openfl__$internal_formats_html_HTMLParser.__regexLeftMargin.match(p)){y.leftMargin=Std.parseInt(openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexLeftMargin))}if(openfl__$internal_formats_html_HTMLParser.__regexRightMargin.match(p)){y.rightMargin=Std.parseInt(openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexRightMargin))}if(openfl__$internal_formats_html_HTMLParser.__regexTabStops.match(p)){var T=openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexTabStops).split(" ");var S=[];var M=0;while(M>>16;x=(v&65280)>>>8;P=v&255;k=i[T]/255;if(k<0){k=0}if(k>1){k=1}o.addColorStop(k,"rgba("+y+", "+x+", "+P+", "+b+")")}if(l!=null){openfl_geom_Point.__pool.release(l)}if(h!=null){openfl_geom_Point.__pool.release(h)}if(c){openfl_geom_Matrix.__pool.release(a)}return o};openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas=function(e,t,s,i){var a=window.document.createElement("canvas");var r=a.getContext("2d");a.width=s;a.height=i;var _=e.image.get_src();r.fillStyle=r.createPattern(_,t?"repeat":"no-repeat");r.beginPath();r.moveTo(0,0);r.lineTo(0,i);r.lineTo(s,i);r.lineTo(s,0);r.lineTo(0,0);r.closePath();if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting){r.fill(openfl__$internal_renderer_canvas_CanvasGraphics.windingRule)}return a};openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect=function(e,t,s,i,a,r){if(r==null){r=a}a*=.5;r*=.5;if(a>s/2){a=s/2}if(r>i/2){r=i/2}var _=e+s;var n=t+i;var o=-a+a*openfl__$internal_renderer_canvas_CanvasGraphics.SIN45;var l=-a+a*openfl__$internal_renderer_canvas_CanvasGraphics.TAN22;var h=-r+r*openfl__$internal_renderer_canvas_CanvasGraphics.SIN45;var c=-r+r*openfl__$internal_renderer_canvas_CanvasGraphics.TAN22;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(_,n-r);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(_,n+c,_+o,n+h);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(_+l,n,_-a,n);openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(e+a,n);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(e-l,n,e-o,n+h);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(e,n+c,e,n-r);openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(e,t+r);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(e,t-c,e-o,t-h);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(e-l,t,e+a,t);openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(_-a,t);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(_+l,t,_+o,t-h);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(_,t-c,_,t+r);openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(_,n-r)};openfl__$internal_renderer_canvas_CanvasGraphics.endFill=function(){openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();openfl__$internal_renderer_canvas_CanvasGraphics.playCommands(openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands,false);openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear()};openfl__$internal_renderer_canvas_CanvasGraphics.endStroke=function(){openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();openfl__$internal_renderer_canvas_CanvasGraphics.playCommands(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands,true);openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear()};openfl__$internal_renderer_canvas_CanvasGraphics.hitTest=function(e,t,s){openfl__$internal_renderer_canvas_CanvasGraphics.bounds=e.__bounds;openfl__$internal_renderer_canvas_CanvasGraphics.graphics=e;if(e.__commands.get_length()==0||openfl__$internal_renderer_canvas_CanvasGraphics.bounds==null||openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width<=0||openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height<=0){return false}else{openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting=true;var i=e.__renderTransform;var a=t*i.a+s*i.c+i.tx;var r=t*i.b+s*i.d+i.ty;t=a;s=r;t-=openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x*i.a+openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y*i.c+i.tx;s-=openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x*i.b+openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y*i.d+i.ty;var _=e.__canvas;var n=e.__context;e.__canvas=openfl__$internal_renderer_canvas_CanvasGraphics.hitTestCanvas;e.__context=openfl__$internal_renderer_canvas_CanvasGraphics.hitTestContext;openfl__$internal_renderer_canvas_CanvasGraphics.context=e.__context;openfl__$internal_renderer_canvas_CanvasGraphics.context.setTransform(i.a,i.b,i.c,i.d,i.tx,i.ty);openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear();openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear();openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=false;openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke=false;openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=null;openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat=false;openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="evenodd";var o=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var l=0;var h=e.__commands.types;while(l0){openfl__$internal_renderer_canvas_CanvasGraphics.endFill()}if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill&&openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(t,s,openfl__$internal_renderer_canvas_CanvasGraphics.windingRule)){_e=true}if(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.get_length()>0){openfl__$internal_renderer_canvas_CanvasGraphics.endStroke()}if(openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke&&openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInStroke(t,s)){_e=true}o.destroy();e.__canvas=_;e.__context=n;return _e}};openfl__$internal_renderer_canvas_CanvasGraphics.normalizeUVT=function(e,t){if(t==null){t=false}var s=-Infinity;var i=-Infinity;var a=e.get_length();var r=1;var _=a+1;while(r<_){var n=r++;if(t&&n%3==0){continue}i=e.get(n-1);if(s>>16;w=(U.buffer.i[U.iPos]&65280)>>>8;C=U.buffer.i[U.iPos]&255;openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle="rgba("+k+", "+w+", "+C+", "+U.buffer.f[U.fPos]+")"}openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=null;openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=true}break;case 2:var V=c.prev;switch(V[1]){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 13:break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;var W=c;var z=W;openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle=openfl__$internal_renderer_canvas_CanvasGraphics.createGradientPattern(z.buffer.o[z.oPos],z.buffer.ii[z.iiPos],z.buffer.ff[z.ffPos],z.buffer.ii[z.iiPos+1],z.buffer.o[z.oPos+1],z.buffer.o[z.oPos+2],z.buffer.o[z.oPos+3],z.buffer.f[z.fPos]);openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=null;openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=true;break;case 3:var X=c.prev;switch(X[1]){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 13:break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL;var Y=c;var q=Y;var K=q.buffer.o[q.oPos];if(K.inputCount>0){openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=K.inputs[0];openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle=openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill,K.inputWrap[0]!=0,K.inputFilter[0]!=5);openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=true;openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix=null;openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix=null}break;case 4:var J=c.prev;switch(J[1]){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 13:break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;var Z=c;var Q=Z;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(Q.buffer.f[Q.fPos]-s,Q.buffer.f[Q.fPos+1]-i,Q.buffer.f[Q.fPos+2]-s,Q.buffer.f[Q.fPos+3]-i,Q.buffer.f[Q.fPos+4]-s,Q.buffer.f[Q.fPos+5]-i);break;case 5:var ee=c.prev;switch(ee[1]){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 13:break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.CURVE_TO;var te=c;var se=te;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(se.buffer.f[se.fPos]-s,se.buffer.f[se.fPos+1]-i,se.buffer.f[se.fPos+2]-s,se.buffer.f[se.fPos+3]-i);break;case 6:var ie=c.prev;switch(ie[1]){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 13:break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;var ae=c;var re=ae;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(re.buffer.f[re.fPos]-s+re.buffer.f[re.fPos+2],re.buffer.f[re.fPos+1]-i);openfl__$internal_renderer_canvas_CanvasGraphics.context.arc(re.buffer.f[re.fPos]-s,re.buffer.f[re.fPos+1]-i,re.buffer.f[re.fPos+2],0,Math.PI*2,true);break;case 7:var _e=c.prev;switch(_e[1]){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 13:break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;var ne=c;var oe=ne;h=true;u=oe.buffer.f[oe.fPos];f=oe.buffer.f[oe.fPos+1];p=oe.buffer.f[oe.fPos+2];d=oe.buffer.f[oe.fPos+3];u-=s;f-=i;m=p/2*g;v=d/2*g;b=u+p;y=f+d;x=u+p/2;P=f+d/2;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(u,P);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(u,P-v,x-m,f,x,f);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x+m,f,b,P-v,b,P);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(b,P+v,x+m,y,x,y);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x-m,y,u,P+v,u,P);break;case 8:var le=c.prev;switch(le[1]){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 13:break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.DRAW_QUADS;var he=c;var ce=he;var ue=ce.buffer.o[ce.oPos];var fe=ce.buffer.o[ce.oPos+1];var pe=ce.buffer.o[ce.oPos+2];var de=fe!=null;var ge=false;var me=false;var ve=de?fe.get_length():Math.floor(ue.get_length()/4);if(ve==0){return}if(pe!=null){if(pe.get_length()>=ve*6){ge=true;me=true}else if(pe.get_length()>=ve*4){ge=true}else if(pe.get_length()>=ve*2){me=true}}var be=openfl_geom_Rectangle.__pool.get();var ye=openfl_geom_Matrix.__pool.get();var xe=openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill!=null?openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.rect:null;var Pe=openfl__$internal_renderer_canvas_CanvasGraphics.graphics.__renderTransform;var ke=openfl__$internal_renderer_canvas_CanvasGraphics.worldAlpha;var we;var Ce;openfl__$internal_renderer_canvas_CanvasGraphics.context.save();var Te=0;var Se=ve;while(Te=0&&B>=0&&$<=openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width&&E<=openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height){T=true;if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting){openfl__$internal_renderer_canvas_CanvasGraphics.context.drawImage(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.image.get_src(),B,M,$-B,E-M,Be.buffer.f[Be.fPos]-s,Be.buffer.f[Be.fPos+1]-i,Be.buffer.f[Be.fPos+2],Be.buffer.f[Be.fPos+3])}}}if(!T){h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.rect(Be.buffer.f[Be.fPos]-s,Be.buffer.f[Be.fPos+1]-i,Be.buffer.f[Be.fPos+2],Be.buffer.f[Be.fPos+3])}break;case 10:var Oe=c.prev;switch(Oe[1]){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 13:break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;var Ge=c;var je=Ge;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect(je.buffer.f[je.fPos]-s,je.buffer.f[je.fPos+1]-i,je.buffer.f[je.fPos+2],je.buffer.f[je.fPos+3],je.buffer.f[je.fPos+4],je.buffer.o[je.oPos]);break;case 12:var He=c.prev;switch(He[1]){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 13:break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;var Ue=c;var Ne=Ue;var Ve=Ne.buffer.o[Ne.oPos];var We=Ne.buffer.o[Ne.oPos+1];var ze=Ne.buffer.o[Ne.oPos+2];var Xe=null;var Ye=openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill==null;if(Ye&&ze!=null){throw"__break__"}if(!Ye){if(ze==null){ze=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);var qe=0;var Ke=Ve.get_length()/2|0;while(qe1){Xe=openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width|0,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height|0)}else{Xe=openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height)}}var tt=0;var st=We.get_length();var it;var at;var rt;var _t;var nt;var ot;var lt;var ht;var ct;var ut;var ft;var pt;var dt;var gt;var mt;var vt;var bt;var yt;var xt;var Pt;var kt;var wt;var Ct;var Tt;var St;var Mt;var $t;var Et;while(tt0?jt.buffer.o[jt.oPos]:1;var Ht=jt.buffer.o[jt.oPos+3]==null?"round":openfl_display__$JointStyle_JointStyle_$Impl_$.toString(jt.buffer.o[jt.oPos+3]).toLowerCase();openfl__$internal_renderer_canvas_CanvasGraphics.context.lineJoin=Ht;var Ut;if(jt.buffer.o[jt.oPos+2]==null){Ut="round"}else{var Nt=jt.buffer.o[jt.oPos+2];if(Nt==0){Ut="butt"}else{Ut=openfl_display__$CapsStyle_CapsStyle_$Impl_$.toString(jt.buffer.o[jt.oPos+2]).toLowerCase()}}openfl__$internal_renderer_canvas_CanvasGraphics.context.lineCap=Ut;openfl__$internal_renderer_canvas_CanvasGraphics.context.miterLimit=jt.buffer.f[jt.fPos+1];if(jt.buffer.f[jt.fPos]==1){var Vt=StringTools.hex(jt.buffer.i[jt.iPos]&16777215,6);openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle="#"+Vt}else{k=(jt.buffer.i[jt.iPos]&16711680)>>>16;w=(jt.buffer.i[jt.iPos]&65280)>>>8;C=jt.buffer.i[jt.iPos]&255;openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle="rgba("+k+", "+w+", "+C+", "+jt.buffer.f[jt.fPos]+")"}openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke=true}break;case 17:var Wt=c.prev;switch(Wt[1]){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 13:break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.LINE_TO;var zt=c;var Xt=zt;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(Xt.buffer.f[Xt.fPos]-s,Xt.buffer.f[Xt.fPos+1]-i);a=Xt.buffer.f[Xt.fPos];r=Xt.buffer.f[Xt.fPos+1];if(a==n&&r==o){_=true}break;case 18:var Yt=c.prev;switch(Yt[1]){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 13:break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1;break;case 21:case 22:break;default:}c.prev=openfl__$internal_renderer_DrawCommandType.MOVE_TO;var qt=c;var Kt=qt;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(Kt.buffer.f[Kt.fPos]-s,Kt.buffer.f[Kt.fPos+1]-i);a=Kt.buffer.f[Kt.fPos];r=Kt.buffer.f[Kt.fPos+1];if(l){_=true}n=Kt.buffer.f[Kt.fPos];o=Kt.buffer.f[Kt.fPos+1];l=true;break;case 21:openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="evenodd";break;case 22:openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="nonzero";break;default:var Jt=c.prev;switch(Jt[1]){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 13:break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1;break;case 21:case 22:break;default:}c.prev=D}}}catch(e){if(e!="__break__")throw e}if(L!=null){openfl_geom_Point.__pool.release(L)}if(R!=null){openfl_geom_Point.__pool.release(R)}c.destroy();if(h){if(t&&openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke){if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill&&_){openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(n-s,o-i);openfl__$internal_renderer_canvas_CanvasGraphics.closePath(false)}else if(_&&a==n&&r==o){openfl__$internal_renderer_canvas_CanvasGraphics.closePath(false)}if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting){openfl__$internal_renderer_canvas_CanvasGraphics.context.stroke()}}if(!t){if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill||openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill!=null){openfl__$internal_renderer_canvas_CanvasGraphics.context.translate(-openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x,-openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y);if(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix!=null){openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.a,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.b,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.c,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.d,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.tx,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.ty);if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting){openfl__$internal_renderer_canvas_CanvasGraphics.context.fill(openfl__$internal_renderer_canvas_CanvasGraphics.windingRule)}openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.a,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.b,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.c,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.d,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.tx,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.ty)}else if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting){openfl__$internal_renderer_canvas_CanvasGraphics.context.fill(openfl__$internal_renderer_canvas_CanvasGraphics.windingRule)}openfl__$internal_renderer_canvas_CanvasGraphics.context.translate(openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y);openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath()}}}};openfl__$internal_renderer_canvas_CanvasGraphics.render=function(e,t){e.__update(t.__worldTransform);if(e.__softwareDirty){openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting=false;openfl__$internal_renderer_canvas_CanvasGraphics.graphics=e;openfl__$internal_renderer_canvas_CanvasGraphics.allowSmoothing=t.__allowSmoothing;openfl__$internal_renderer_canvas_CanvasGraphics.worldAlpha=t.__getAlpha(e.__owner.__worldAlpha);openfl__$internal_renderer_canvas_CanvasGraphics.bounds=e.__bounds;var s=e.__width;var i=e.__height;if(!e.__visible||e.__commands.get_length()==0||openfl__$internal_renderer_canvas_CanvasGraphics.bounds==null||s<1||i<1){e.__canvas=null;e.__context=null;e.__bitmap=null}else{if(e.__canvas==null){e.__canvas=window.document.createElement("canvas");e.__context=e.__canvas.getContext("2d")}openfl__$internal_renderer_canvas_CanvasGraphics.context=e.__context;var a=e.__renderTransform;var r=e.__canvas;var _=t.pixelRatio;var n=s*_|0;var o=i*_|0;t.__setBlendModeContext(openfl__$internal_renderer_canvas_CanvasGraphics.context,10);if(t.__isDOM){if(r.width==n&&r.height==o){openfl__$internal_renderer_canvas_CanvasGraphics.context.clearRect(0,0,n,o)}else{r.width=n;r.height=o;r.style.width=s+"px";r.style.height=i+"px"}var l=e.__renderTransform;openfl__$internal_renderer_canvas_CanvasGraphics.context.setTransform(l.a*_,l.b*_,l.c*_,l.d*_,l.tx*_,l.ty*_)}else{if(r.width==n&&r.height==o){openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();openfl__$internal_renderer_canvas_CanvasGraphics.context.setTransform(1,0,0,1,0,0);openfl__$internal_renderer_canvas_CanvasGraphics.context.clearRect(0,0,n,o)}else{r.width=s;r.height=i}openfl__$internal_renderer_canvas_CanvasGraphics.context.setTransform(a.a,a.b,a.c,a.d,a.tx,a.ty)}openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear();openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear();openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=false;openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke=false;openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=null;openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat=false;var h=false;var c=0;var u=0;openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="evenodd";var f=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var p=0;var d=e.__commands.types;while(p0){openfl__$internal_renderer_canvas_CanvasGraphics.endFill()}if(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.get_length()>0){openfl__$internal_renderer_canvas_CanvasGraphics.endStroke()}f.destroy();e.__bitmap=openfl_display_BitmapData.fromCanvas(e.__canvas)}e.__softwareDirty=false;e.set___dirty(false)}};openfl__$internal_renderer_canvas_CanvasGraphics.renderMask=function(e,t){if(e.__commands.get_length()!=0){openfl__$internal_renderer_canvas_CanvasGraphics.context=t.context;var s=0;var i=0;var a=0;var r=0;var _=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var n;var o;var l;var h;var c=.5522848;var u;var f;var p;var d;var g;var m;var v=0;var b=e.__commands.types;while(vthis.vertexCount){this.vertexCount=this.vertexBufferData.length;this.vertexBuffer=this.context3D.createVertexBuffer(this.vertexCount,this.dataPerVertex,0)}this.vertexBuffer.uploadFromTypedArray(this.vertexBufferData)},resize:function(e,t){if(t==null){t=-1}this.elementCount=e;if(t==-1){t=this.dataPerVertex}if(t!=this.dataPerVertex){this.vertexBuffer=null;this.vertexCount=0;this.dataPerVertex=t}var s=0;var i=this.elementType;switch(i[1]){case 0:s=e*4;break;case 1:s=e*3;break;case 2:s=e*3;break}var a=s*t;if(this.vertexBufferData==null){var r;if(a!=null){r=new Float32Array(a)}else{r=null}this.vertexBufferData=r}else if(a>this.vertexBufferData.length){var _=this.vertexBufferData;var n;if(a!=null){n=new Float32Array(a)}else{n=null}this.vertexBufferData=n;this.vertexBufferData.set(_)}},__class__:openfl__$internal_renderer_context3D_Context3DBuffer};var openfl__$internal_renderer_context3D_Context3DElementType=$hxClasses["openfl._internal.renderer.context3D.Context3DElementType"]={__ename__:["openfl","_internal","renderer","context3D","Context3DElementType"],__constructs__:["QUADS","TRIANGLES","TRIANGLE_INDICES"]};openfl__$internal_renderer_context3D_Context3DElementType.QUADS=["QUADS",0];openfl__$internal_renderer_context3D_Context3DElementType.QUADS.toString=$estr;openfl__$internal_renderer_context3D_Context3DElementType.QUADS.__enum__=openfl__$internal_renderer_context3D_Context3DElementType;openfl__$internal_renderer_context3D_Context3DElementType.TRIANGLES=["TRIANGLES",1];openfl__$internal_renderer_context3D_Context3DElementType.TRIANGLES.toString=$estr;openfl__$internal_renderer_context3D_Context3DElementType.TRIANGLES.__enum__=openfl__$internal_renderer_context3D_Context3DElementType;openfl__$internal_renderer_context3D_Context3DElementType.TRIANGLE_INDICES=["TRIANGLE_INDICES",2];openfl__$internal_renderer_context3D_Context3DElementType.TRIANGLE_INDICES.toString=$estr;openfl__$internal_renderer_context3D_Context3DElementType.TRIANGLE_INDICES.__enum__=openfl__$internal_renderer_context3D_Context3DElementType;var openfl_display_BitmapData=function(e,t,s,i){if(i==null){i=-1}if(s==null){s=true}this.transparent=s;if(e==null){e=0}else{e=e}if(t==null){t=0}else{t=t}if(e<0){e=0}else{e=e}if(t<0){t=0}else{t=t}this.width=e;this.height=t;this.rect=new openfl_geom_Rectangle(0,0,e,t);this.__textureWidth=e;this.__textureHeight=t;if(e>0&&t>0){if(s){if((i&-16777216)==0){i=0}}else{i=-16777216|i&16777215}i=i<<8|i>>>24&255;this.image=new lime_graphics_Image(null,0,0,e,t,i);this.image.set_transparent(s);this.__isValid=true;this.readable=true}this.__renderTransform=new openfl_geom_Matrix;this.__worldAlpha=1;this.__worldTransform=new openfl_geom_Matrix;this.__worldColorTransform=new openfl_geom_ColorTransform;this.__renderable=true};$hxClasses["openfl.display.BitmapData"]=openfl_display_BitmapData;openfl_display_BitmapData.__name__=["openfl","display","BitmapData"];openfl_display_BitmapData.__interfaces__=[openfl_display_IBitmapDrawable];openfl_display_BitmapData.fromBase64=function(e,t){return null};openfl_display_BitmapData.fromBytes=function(e,t){return null};openfl_display_BitmapData.fromCanvas=function(e,t){if(t==null){t=true}if(e==null){return null}var s=new openfl_display_BitmapData(0,0,t,0);s.__fromImage(lime_graphics_Image.fromCanvas(e));s.image.set_transparent(t);return s};openfl_display_BitmapData.fromFile=function(e){return null};openfl_display_BitmapData.fromImage=function(e,t){if(t==null){t=true}if(e==null||e.buffer==null){return null}var s=new openfl_display_BitmapData(0,0,t,0);s.__fromImage(e);s.image.set_transparent(t);if(s.image!=null){return s}else{return null}};openfl_display_BitmapData.fromTexture=function(e){if(e==null){return null}var t=new openfl_display_BitmapData(e.__width,e.__height,true,0);t.readable=false;t.__texture=e;t.__textureContext=e.__textureContext;t.image=null;return t};openfl_display_BitmapData.loadFromBase64=function(e,t){return lime_graphics_Image.loadFromBase64(e,t).then(function(e){return lime_app_Future.withValue(openfl_display_BitmapData.fromImage(e))})};openfl_display_BitmapData.loadFromBytes=function(e,s){return lime_graphics_Image.loadFromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(e)).then(function(e){var t=openfl_display_BitmapData.fromImage(e);if(s!=null){t.__applyAlpha(s)}return lime_app_Future.withValue(t)})};openfl_display_BitmapData.loadFromFile=function(e){return lime_graphics_Image.loadFromFile(e).then(function(e){return lime_app_Future.withValue(openfl_display_BitmapData.fromImage(e))})};openfl_display_BitmapData.prototype={height:null,image:null,readable:null,rect:null,transparent:null,width:null,__framebuffer:null,__framebufferContext:null,__indexBuffer:null,__indexBufferContext:null,__indexBufferData:null,__isValid:null,__mask:null,__renderable:null,__renderTransform:null,__scrollRect:null,__surface:null,__texture:null,__textureContext:null,__textureHeight:null,__textureVersion:null,__textureWidth:null,__uvRect:null,__vertexBuffer:null,__vertexBufferContext:null,__vertexBufferData:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,colorTransform:function(e,t){if(!this.readable){return}this.image.colorTransform(e.__toLimeRectangle(),t.__toLimeColorMatrix())},copyPixels:function(e,t,s,i,a,r){if(r==null){r=false}if(!this.readable||e==null){return}if(a!=null){openfl_display_BitmapData.__tempVector.x=a.x;openfl_display_BitmapData.__tempVector.y=a.y}this.image.copyPixels(e.image,t.__toLimeRectangle(),s.__toLimeVector2(),i!=null?i.image:null,a!=null?openfl_display_BitmapData.__tempVector:null,r)},dispose:function(){this.image=null;this.width=0;this.height=0;this.rect=null;this.__isValid=false;this.readable=false;this.__surface=null;this.__vertexBuffer=null;this.__framebuffer=null;this.__framebufferContext=null;this.__texture=null;this.__textureContext=null},draw:function(e,t,s,i,a,r){if(r==null){r=false}if(e==null){return}e.__update(false,true);var _=openfl_geom_Matrix.__pool.get();_.copyFrom(e.__renderTransform);_.invert();if(t!=null){_.concat(t)}var n=null;if(a!=null){n=openfl_geom_Matrix.__pool.get();n.copyFrom(_);n.invert()}var o=new openfl_geom_ColorTransform;o.__copyFrom(e.__worldColorTransform);o.__invert();if(!this.readable&&openfl_Lib.get_current().stage.context3D!=null){if(this.__textureContext==null){this.__textureContext=lime_app_Application.current.__window.context}if(s!=null){o.__combine(s)}var l=new openfl_display_OpenGLRenderer(openfl_Lib.get_current().stage.context3D,this);l.__allowSmoothing=r;l.__overrideBlendMode=i;l.__worldTransform=_;l.__worldAlpha=1/e.__worldAlpha;l.__worldColorTransform=o;l.__resize(this.width,this.height);if(a!=null){l.__pushMaskRect(a,n)}this.__drawGL(e,l);if(a!=null){l.__popMaskRect();openfl_geom_Matrix.__pool.release(n)}}else{if(s!=null){var h=openfl_geom_Rectangle.__pool.get();var c=openfl_geom_Matrix.__pool.get();e.__getBounds(h,c);var u=Math.ceil(h.width);var f=Math.ceil(h.height);c.tx=-h.x;c.ty=-h.y;var p=new openfl_display_BitmapData(u,f,true,0);p.draw(e,c);p.colorTransform(p.rect,s);p.__renderTransform.identity();p.__renderTransform.tx=h.x;p.__renderTransform.ty=h.y;p.__renderTransform.concat(e.__renderTransform);p.__worldAlpha=e.__worldAlpha;p.__worldColorTransform.__copyFrom(e.__worldColorTransform);e=p;openfl_geom_Rectangle.__pool.release(h);openfl_geom_Matrix.__pool.release(c)}lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this.image);var d=new openfl_display_CanvasRenderer(this.image.buffer.__srcContext);d.__allowSmoothing=r;d.__overrideBlendMode=i;d.__worldTransform=_;d.__worldAlpha=1/e.__worldAlpha;d.__worldColorTransform=o;if(a!=null){d.__pushMaskRect(a,n)}this.__drawCanvas(e,d);if(a!=null){d.__popMaskRect();openfl_geom_Matrix.__pool.release(n)}}openfl_geom_Matrix.__pool.release(_)},fillRect:function(e,t){this.__fillRect(e,t,true)},getIndexBuffer:function(e){var t=e.gl;if(this.__indexBuffer==null||this.__indexBufferContext!=e.__context){var s=new Uint16Array(6);this.__indexBufferData=s;this.__indexBufferData[0]=0;this.__indexBufferData[1]=1;this.__indexBufferData[2]=2;this.__indexBufferData[3]=2;this.__indexBufferData[4]=1;this.__indexBufferData[5]=3;this.__indexBufferContext=e.__context;this.__indexBuffer=e.createIndexBuffer(6);this.__indexBuffer.uploadFromTypedArray(this.__indexBufferData)}return this.__indexBuffer},getVertexBuffer:function(e){var t=e.gl;if(this.__vertexBuffer==null||this.__vertexBufferContext!=e.__context){this.__uvRect=new openfl_geom_Rectangle(0,0,this.width,this.height);var s=1;var i=1;var a=new Float32Array(56);this.__vertexBufferData=a;this.__vertexBufferData[0]=this.width;this.__vertexBufferData[1]=this.height;this.__vertexBufferData[3]=s;this.__vertexBufferData[4]=i;this.__vertexBufferData[15]=this.height;this.__vertexBufferData[18]=i;this.__vertexBufferData[28]=this.width;this.__vertexBufferData[31]=s;this.__vertexBufferContext=e.__context;this.__vertexBuffer=e.createVertexBuffer(3,14);this.__vertexBuffer.uploadFromTypedArray(this.__vertexBufferData)}return this.__vertexBuffer},getPixel32:function(e,t){if(!this.readable){return 0}return this.image.getPixel32(e,t,1)},getTexture:function(e){if(!this.__isValid){return null}if(this.__texture==null||this.__textureContext!=e.__context){this.__textureContext=e.__context;this.__texture=e.createRectangleTexture(this.width,this.height,1,false);this.__textureVersion=-1}lime__$internal_graphics_ImageCanvasUtil.sync(this.image,false);if(this.image!=null&&this.image.version>this.__textureVersion){if(this.__surface!=null){lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.flush(this.__surface)}var t=this.image;if(!openfl_display3D_textures_TextureBase.__supportsBGRA&&t.get_format()!=0){t=t.clone();t.set_format(0)}this.__texture.__uploadFromImage(t);this.__textureVersion=this.image.version;this.__textureWidth=t.buffer.width;this.__textureHeight=t.buffer.height}if(!this.readable&&this.image!=null){this.__surface=null;this.image=null}return this.__texture},setPixel32:function(e,t,s){if(!this.readable){return}this.image.setPixel32(e,t,s,1)},__applyAlpha:function(e){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this.image);lime__$internal_graphics_ImageCanvasUtil.createImageData(this.image);var t=this.image.buffer.data;var s=0;var i=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e);while(s>>16&255)/255,(r>>>8&255)/255,(r&255)/255,this.transparent?(r>>>24&255)/255:1,0,0,1);if(_){a.setScissorRectangle(null)}if(n!=null){a.setRenderToTexture(n,o,l,h)}else{a.setRenderToBackBuffer()}}else if(this.readable){this.image.fillRect(e.__toLimeRectangle(),t,1)}},__fromImage:function(e){if(e!=null&&e.buffer!=null){this.image=e;this.width=e.width;this.height=e.height;this.rect=new openfl_geom_Rectangle(0,0,e.width,e.height);this.__textureWidth=this.width;this.__textureHeight=this.height;this.readable=true;this.__isValid=true}},__getBounds:function(e,t){var s=openfl_geom_Rectangle.__pool.get();this.rect.__transform(s,t);e.__expand(s.x,s.y,s.width,s.height);openfl_geom_Rectangle.__pool.release(s)},__renderCanvas:function(e){if(!this.readable){return}if(this.image.type==lime_graphics_ImageType.DATA){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this.image)}var t=e.context;t.globalAlpha=1;e.setTransform(this.__renderTransform,t);t.drawImage(this.image.get_src(),0,0,this.image.width,this.image.height)},__renderDOM:function(e){},__renderGL:function(e){var t=e.__context3D;var s=t.gl;e.__setBlendMode(10);var i=e.__defaultDisplayShader;e.setShader(i);e.applyBitmapData(this,e.__allowSmoothing&&e.__upscaled);e.applyMatrix(e.__getMatrix(this.__worldTransform,1));e.applyAlpha(this.__worldAlpha);e.applyColorTransform(this.__worldColorTransform);e.updateShader();var a=this.getVertexBuffer(t);if(i.__position!=null){t.setVertexBufferAt(i.__position.index,a,0,3)}if(i.__textureCoord!=null){t.setVertexBufferAt(i.__textureCoord.index,a,3,2)}var r=this.getIndexBuffer(t);t.drawTriangles(r);e.__clearShader()},__setUVRect:function(e,t,s,i,a){var r=this.getVertexBuffer(e);if(r!=null&&(i!=this.__uvRect.width||a!=this.__uvRect.height||t!=this.__uvRect.x||s!=this.__uvRect.y)){var _=e.gl;if(this.__uvRect==null){this.__uvRect=new openfl_geom_Rectangle}this.__uvRect.setTo(t,s,i,a);var n=this.__textureWidth>0?t/this.__textureWidth:0;var o=this.__textureHeight>0?s/this.__textureHeight:0;var l=this.__textureWidth>0?i/this.__textureWidth:0;var h=this.__textureHeight>0?a/this.__textureHeight:0;this.__vertexBufferData[0]=i;this.__vertexBufferData[1]=a;this.__vertexBufferData[3]=n+l;this.__vertexBufferData[4]=o+h;this.__vertexBufferData[15]=a;this.__vertexBufferData[17]=n;this.__vertexBufferData[18]=o+h;this.__vertexBufferData[28]=i;this.__vertexBufferData[31]=n+l;this.__vertexBufferData[32]=o;this.__vertexBufferData[45]=n;this.__vertexBufferData[46]=o;this.__vertexBuffer.uploadFromTypedArray(this.__vertexBufferData)}},__update:function(e,t){this.__updateTransforms()},__updateTransforms:function(e){if(e==null){this.__worldTransform.identity()}else{this.__worldTransform.copyFrom(e)}this.__renderTransform.copyFrom(this.__worldTransform)},__class__:openfl_display_BitmapData};var openfl_geom_Rectangle=function(e,t,s,i){if(i==null){i=0}if(s==null){s=0}if(t==null){t=0}if(e==null){e=0}this.x=e;this.y=t;this.width=s;this.height=i};$hxClasses["openfl.geom.Rectangle"]=openfl_geom_Rectangle;openfl_geom_Rectangle.__name__=["openfl","geom","Rectangle"];openfl_geom_Rectangle.prototype={height:null,width:null,x:null,y:null,clone:function(){return new openfl_geom_Rectangle(this.x,this.y,this.width,this.height)},contains:function(e,t){if(e>=this.x&&t>=this.y&&ee+s){_=e+s-this.get_right()}if(this.get_bottom()>t+i){n=t+i-this.get_bottom()}this.x+=a;this.y+=r;this.width+=_-a;this.height+=n-r},__expand:function(e,t,s,i){if(this.width==0&&this.height==0){this.x=e;this.y=t;this.width=s;this.height=i;return}var a=this.get_right();var r=this.get_bottom();if(this.x>e){this.x=e;this.width=a-e}if(this.y>t){this.y=t;this.height=r-t}if(ai){i=_}if(n>r){r=n}_=t.a*(this.x+this.width)+t.c*(this.y+this.height);n=t.b*(this.x+this.width)+t.d*(this.y+this.height);if(_i){i=_}if(n>r){r=n}_=t.a*this.x+t.c*(this.y+this.height);n=t.b*this.x+t.d*(this.y+this.height);if(_i){i=_}if(n>r){r=n}e.setTo(s+t.tx,a+t.ty,i-s,r-a)},get_bottom:function(){return this.y+this.height},get_left:function(){return this.x},get_right:function(){return this.x+this.width},get_top:function(){return this.y},__class__:openfl_geom_Rectangle,__properties__:{get_top:"get_top",get_right:"get_right",get_left:"get_left",get_bottom:"get_bottom"}};var openfl_geom_Matrix=function(e,t,s,i,a,r){if(r==null){r=0}if(a==null){a=0}if(i==null){i=1}if(s==null){s=0}if(t==null){t=0}if(e==null){e=1}this.a=e;this.b=t;this.c=s;this.d=i;this.tx=a;this.ty=r};$hxClasses["openfl.geom.Matrix"]=openfl_geom_Matrix;openfl_geom_Matrix.__name__=["openfl","geom","Matrix"];openfl_geom_Matrix.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,clone:function(){return new openfl_geom_Matrix(this.a,this.b,this.c,this.d,this.tx,this.ty)},concat:function(e){var t=this.a*e.a+this.b*e.c;this.b=this.a*e.b+this.b*e.d;this.a=t;var s=this.c*e.a+this.d*e.c;this.d=this.c*e.b+this.d*e.d;this.c=s;var i=this.tx*e.a+this.ty*e.c+e.tx;this.ty=this.tx*e.b+this.ty*e.d+e.ty;this.tx=i},copyFrom: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},createGradientBox:function(e,t,s,i,a){if(a==null){a=0}if(i==null){i=0}if(s==null){s=0}this.a=e/1638.4;this.d=t/1638.4;if(s!=0){var r=Math.cos(s);var _=Math.sin(s);this.b=_*this.d;this.c=-_*this.a;this.a*=r;this.d*=r}else{this.b=0;this.c=0}this.tx=i+e/2;this.ty=a+t/2},equals:function(e){if(e!=null&&this.tx==e.tx&&this.ty==e.ty&&this.a==e.a&&this.b==e.b&&this.c==e.c){return this.d==e.d}else{return false}},identity:function(){this.a=1;this.b=0;this.c=0;this.d=1;this.tx=0;this.ty=0},invert:function(){var e=this.a*this.d-this.b*this.c;if(e==0){this.a=this.b=this.c=this.d=0;this.tx=-this.tx;this.ty=-this.ty}else{e=1/e;var t=this.d*e;this.d=this.a*e;this.a=t;this.b*=-e;this.c*=-e;var s=-this.a*this.tx-this.c*this.ty;this.ty=-this.b*this.tx-this.d*this.ty;this.tx=s}return this},rotate:function(e){var t=Math.cos(e);var s=Math.sin(e);var i=this.a*t-this.b*s;this.b=this.a*s+this.b*t;this.a=i;var a=this.c*t-this.d*s;this.d=this.c*s+this.d*t;this.c=a;var r=this.tx*t-this.ty*s;this.ty=this.tx*s+this.ty*t;this.tx=r},scale:function(e,t){this.a*=e;this.b*=t;this.c*=e;this.d*=t;this.tx*=e;this.ty*=t},setTo:function(e,t,s,i,a,r){this.a=e;this.b=t;this.c=s;this.d=i;this.tx=a;this.ty=r},transformPoint:function(e){return new openfl_geom_Point(e.x*this.a+e.y*this.c+this.tx,e.x*this.b+e.y*this.d+this.ty)},translate:function(e,t){this.tx+=e;this.ty+=t},__class__:openfl_geom_Matrix};var openfl_geom_ColorTransform=function(e,t,s,i,a,r,_,n){if(n==null){n=0}if(_==null){_=0}if(r==null){r=0}if(a==null){a=0}if(i==null){i=1}if(s==null){s=1}if(t==null){t=1}if(e==null){e=1}this.redMultiplier=e;this.greenMultiplier=t;this.blueMultiplier=s;this.alphaMultiplier=i;this.redOffset=a;this.greenOffset=r;this.blueOffset=_;this.alphaOffset=n};$hxClasses["openfl.geom.ColorTransform"]=openfl_geom_ColorTransform;openfl_geom_ColorTransform.__name__=["openfl","geom","ColorTransform"];openfl_geom_ColorTransform.prototype={alphaMultiplier:null,alphaOffset:null,blueMultiplier:null,blueOffset:null,greenMultiplier:null,greenOffset:null,redMultiplier:null,redOffset:null,__copyFrom:function(e){this.redMultiplier=e.redMultiplier;this.greenMultiplier=e.greenMultiplier;this.blueMultiplier=e.blueMultiplier;this.alphaMultiplier=e.alphaMultiplier;this.redOffset=e.redOffset;this.greenOffset=e.greenOffset;this.blueOffset=e.blueOffset;this.alphaOffset=e.alphaOffset},__combine:function(e){this.redMultiplier*=e.redMultiplier;this.greenMultiplier*=e.greenMultiplier;this.blueMultiplier*=e.blueMultiplier;this.alphaMultiplier*=e.alphaMultiplier;this.redOffset+=e.redOffset;this.greenOffset+=e.greenOffset;this.blueOffset+=e.blueOffset;this.alphaOffset+=e.alphaOffset},__identity:function(){this.redMultiplier=1;this.greenMultiplier=1;this.blueMultiplier=1;this.alphaMultiplier=1;this.redOffset=0;this.greenOffset=0;this.blueOffset=0;this.alphaOffset=0},__invert:function(){this.redMultiplier=1/this.redMultiplier;this.greenMultiplier=1/this.greenMultiplier;this.blueMultiplier=1/this.blueMultiplier;this.alphaMultiplier=1/this.alphaMultiplier;this.redOffset=-this.redOffset;this.greenOffset=-this.greenOffset;this.blueOffset=-this.blueOffset;this.alphaOffset=-this.alphaOffset},__equals:function(e,t){if(e!=null&&this.redMultiplier==e.redMultiplier&&this.greenMultiplier==e.greenMultiplier&&this.blueMultiplier==e.blueMultiplier&&(t||this.alphaMultiplier==e.alphaMultiplier)&&this.redOffset==e.redOffset&&this.greenOffset==e.greenOffset&&this.blueOffset==e.blueOffset){return this.alphaOffset==e.alphaOffset}else{return false}},__isDefault:function(e){if(e){if(this.redMultiplier==1&&this.greenMultiplier==1&&this.blueMultiplier==1&&this.redOffset==0&&this.greenOffset==0&&this.blueOffset==0){return this.alphaOffset==0}else{return false}}else if(this.redMultiplier==1&&this.greenMultiplier==1&&this.blueMultiplier==1&&this.alphaMultiplier==1&&this.redOffset==0&&this.greenOffset==0&&this.blueOffset==0){return this.alphaOffset==0}else{return false}},__setArrays:function(e,t){e[0]=this.redMultiplier;e[1]=this.greenMultiplier;e[2]=this.blueMultiplier;e[3]=this.alphaMultiplier;t[0]=this.redOffset;t[1]=this.greenOffset;t[2]=this.blueOffset;t[3]=this.alphaOffset},__toLimeColorMatrix:function(){if(openfl_geom_ColorTransform.__limeColorMatrix==null){var e=new Float32Array(20);openfl_geom_ColorTransform.__limeColorMatrix=e}openfl_geom_ColorTransform.__limeColorMatrix[0]=this.redMultiplier;openfl_geom_ColorTransform.__limeColorMatrix[4]=this.redOffset/255;openfl_geom_ColorTransform.__limeColorMatrix[6]=this.greenMultiplier;openfl_geom_ColorTransform.__limeColorMatrix[9]=this.greenOffset/255;openfl_geom_ColorTransform.__limeColorMatrix[12]=this.blueMultiplier;openfl_geom_ColorTransform.__limeColorMatrix[14]=this.blueOffset/255;openfl_geom_ColorTransform.__limeColorMatrix[18]=this.alphaMultiplier;openfl_geom_ColorTransform.__limeColorMatrix[19]=this.alphaOffset/255;return openfl_geom_ColorTransform.__limeColorMatrix},__class__:openfl_geom_ColorTransform};var openfl__$internal_renderer_context3D_Context3DGraphics=function(){};$hxClasses["openfl._internal.renderer.context3D.Context3DGraphics"]=openfl__$internal_renderer_context3D_Context3DGraphics;openfl__$internal_renderer_context3D_Context3DGraphics.__name__=["openfl","_internal","renderer","context3D","Context3DGraphics"];openfl__$internal_renderer_context3D_Context3DGraphics.buildBuffer=function(e,t){var s=0;var i=0;var a=0;var r=0;var _=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var n=t.__context3D;var o=openfl_geom_Rectangle.__pool.get();var l=openfl_geom_Matrix.__pool.get();var h=null;var c=0;var u=e.__commands.types;while(c=B*6){$=true;E=true}else if(S.get_length()>=B*4){$=true}else if(S.get_length()>=B*2){E=true}}var L=4;var R=L*4;if(e.__quadBuffer==null){e.__quadBuffer=new openfl__$internal_renderer_context3D_Context3DBuffer(n,openfl__$internal_renderer_context3D_Context3DElementType.QUADS,B,L)}else{e.__quadBuffer.resize(s+B,L)}var A;var I=1;var D;var F;var O;var G;var j;var H;var U;var N;var V;var W;var z;var X;var Y;var q;var K;var J;var Z;var Q;var ee;var te;var se=e.__quadBuffer.vertexBufferData;O=h.width;G=h.height;var ie=h.rect;var ae=0;var re=B;while(ae=de*3;var be=ve?4:2;var ye=ve?3:2;var xe=be+2;var Pe=ve?r:a;openfl__$internal_renderer_context3D_Context3DGraphics.resizeVertexBuffer(e,ve,Pe+ge*xe);var ke=ve?e.__vertexBufferDataUVT:e.__vertexBufferData;var we;var Ce;var Te;var Se;var Me=0;var $e=ge;while(Me<$e){var Ee=Me++;we=Pe+Ee*xe;if(pe){Ce=ce.get(Ee)*2}else{Ce=Ee*2}if(pe){Te=ce.get(Ee)*ye}else{Te=Ee*ye}if(ve){Se=ue.get(Te+2);ke[we]=he.get(Ce)/Se;ke[we+1]=he.get(Ce+1)/Se;ke[we+2]=0;ke[we+3]=1/Se}else{ke[we]=he.get(Ce);ke[we+1]=he.get(Ce+1)}ke[we+be]=me?ue.get(Te):0;ke[we+be+1]=me?ue.get(Te+1):0}if(ve){r+=ge*xe}else{a+=ge*xe}break;case 13:h=null;break;default:var Be=_.prev;switch(Be[1]){case 0:_.oPos+=2;_.bPos+=2;break;case 1:_.iPos+=1;_.fPos+=1;break;case 2:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 3:_.oPos+=1;break;case 4:_.fPos+=6;break;case 5:_.fPos+=4;break;case 6:_.fPos+=3;break;case 7:_.fPos+=4;break;case 8:_.oPos+=3;break;case 9:_.fPos+=4;break;case 10:_.fPos+=5;_.oPos+=1;break;case 12:_.oPos+=4;break;case 13:break;case 14:_.oPos+=2;_.bPos+=2;break;case 15:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 16:_.oPos+=4;_.iPos+=1;_.fPos+=2;_.bPos+=1;break;case 17:_.fPos+=2;break;case 18:_.fPos+=2;break;case 19:_.oPos+=1;break;case 20:_.oPos+=1;break;case 21:case 22:break;default:}_.prev=f}}if(s>0){e.__quadBuffer.flushVertexBufferData()}if(i>0){var Le=e.__triangleIndexBuffer;if(Le==null||i>e.__triangleIndexBufferCount){Le=n.createIndexBuffer(i,0);e.__triangleIndexBuffer=Le;e.__triangleIndexBufferCount=i}Le.uploadFromTypedArray(e.__triangleIndexBufferData)}if(a>0){var Re=e.__vertexBuffer;if(Re==null||a>e.__vertexBufferCount){Re=n.createVertexBuffer(a,4,0);e.__vertexBuffer=Re;e.__vertexBufferCount=a}Re.uploadFromTypedArray(e.__vertexBufferData)}if(r>0){var Ae=e.__vertexBufferUVT;if(Ae==null||r>e.__vertexBufferCountUVT){Ae=n.createVertexBuffer(r,6,0);e.__vertexBufferUVT=Ae;e.__vertexBufferCountUVT=r}Ae.uploadFromTypedArray(e.__vertexBufferDataUVT)}openfl_geom_Rectangle.__pool.release(o);openfl_geom_Matrix.__pool.release(l)};openfl__$internal_renderer_context3D_Context3DGraphics.isCompatible=function(e){var t=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var s=false;var i=false;var a=false;var r=0;var _=e.__commands.types;while(r<_.length){var n=_[r];++r;switch(n[1]){case 0:i=true;s=false;a=false;var o=t.prev;switch(o[1]){case 0:t.oPos+=2;t.bPos+=2;break;case 1:t.iPos+=1;t.fPos+=1;break;case 2:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 3:t.oPos+=1;break;case 4:t.fPos+=6;break;case 5:t.fPos+=4;break;case 6:t.fPos+=3;break;case 7:t.fPos+=4;break;case 8:t.oPos+=3;break;case 9:t.fPos+=4;break;case 10:t.fPos+=5;t.oPos+=1;break;case 12:t.oPos+=4;break;case 13:break;case 14:t.oPos+=2;t.bPos+=2;break;case 15:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 16:t.oPos+=4;t.iPos+=1;t.fPos+=2;t.bPos+=1;break;case 17:t.fPos+=2;break;case 18:t.fPos+=2;break;case 19:t.oPos+=1;break;case 20:t.oPos+=1;break;case 21:case 22:break;default:}t.prev=n;break;case 1:i=false;s=true;a=false;var l=t.prev;switch(l[1]){case 0:t.oPos+=2;t.bPos+=2;break;case 1:t.iPos+=1;t.fPos+=1;break;case 2:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 3:t.oPos+=1;break;case 4:t.fPos+=6;break;case 5:t.fPos+=4;break;case 6:t.fPos+=3;break;case 7:t.fPos+=4;break;case 8:t.oPos+=3;break;case 9:t.fPos+=4;break;case 10:t.fPos+=5;t.oPos+=1;break;case 12:t.oPos+=4;break;case 13:break;case 14:t.oPos+=2;t.bPos+=2;break;case 15:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 16:t.oPos+=4;t.iPos+=1;t.fPos+=2;t.bPos+=1;break;case 17:t.fPos+=2;break;case 18:t.fPos+=2;break;case 19:t.oPos+=1;break;case 20:t.oPos+=1;break;case 21:case 22:break;default:}t.prev=n;break;case 3:i=false;s=false;a=true;var h=t.prev;switch(h[1]){case 0:t.oPos+=2;t.bPos+=2;break;case 1:t.iPos+=1;t.fPos+=1;break;case 2:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 3:t.oPos+=1;break;case 4:t.fPos+=6;break;case 5:t.fPos+=4;break;case 6:t.fPos+=3;break;case 7:t.fPos+=4;break;case 8:t.oPos+=3;break;case 9:t.fPos+=4;break;case 10:t.fPos+=5;t.oPos+=1;break;case 12:t.oPos+=4;break;case 13:break;case 14:t.oPos+=2;t.bPos+=2;break;case 15:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 16:t.oPos+=4;t.iPos+=1;t.fPos+=2;t.bPos+=1;break;case 17:t.fPos+=2;break;case 18:t.fPos+=2;break;case 19:t.oPos+=1;break;case 20:t.oPos+=1;break;case 21:case 22:break;default:}t.prev=n;break;case 8:if(i||a){var c=t.prev;switch(c[1]){case 0:t.oPos+=2;t.bPos+=2;break;case 1:t.iPos+=1;t.fPos+=1;break;case 2:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 3:t.oPos+=1;break;case 4:t.fPos+=6;break;case 5:t.fPos+=4;break;case 6:t.fPos+=3;break;case 7:t.fPos+=4;break;case 8:t.oPos+=3;break;case 9:t.fPos+=4;break;case 10:t.fPos+=5;t.oPos+=1;break;case 12:t.oPos+=4;break;case 13:break;case 14:t.oPos+=2;t.bPos+=2;break;case 15:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 16:t.oPos+=4;t.iPos+=1;t.fPos+=2;t.bPos+=1;break;case 17:t.fPos+=2;break;case 18:t.fPos+=2;break;case 19:t.oPos+=1;break;case 20:t.oPos+=1;break;case 21:case 22:break;default:}t.prev=n}else{t.destroy();return false}break;case 9:if(s){var u=t.prev;switch(u[1]){case 0:t.oPos+=2;t.bPos+=2;break;case 1:t.iPos+=1;t.fPos+=1;break;case 2:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 3:t.oPos+=1;break;case 4:t.fPos+=6;break;case 5:t.fPos+=4;break;case 6:t.fPos+=3;break;case 7:t.fPos+=4;break;case 8:t.oPos+=3;break;case 9:t.fPos+=4;break;case 10:t.fPos+=5;t.oPos+=1;break;case 12:t.oPos+=4;break;case 13:break;case 14:t.oPos+=2;t.bPos+=2;break;case 15:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 16:t.oPos+=4;t.iPos+=1;t.fPos+=2;t.bPos+=1;break;case 17:t.fPos+=2;break;case 18:t.fPos+=2;break;case 19:t.oPos+=1;break;case 20:t.oPos+=1;break;case 21:case 22:break;default:}t.prev=n}else{t.destroy();return false}break;case 12:if(i||a){var f=t.prev;switch(f[1]){case 0:t.oPos+=2;t.bPos+=2;break;case 1:t.iPos+=1;t.fPos+=1;break;case 2:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 3:t.oPos+=1;break;case 4:t.fPos+=6;break;case 5:t.fPos+=4;break;case 6:t.fPos+=3;break;case 7:t.fPos+=4;break;case 8:t.oPos+=3;break;case 9:t.fPos+=4;break;case 10:t.fPos+=5;t.oPos+=1;break;case 12:t.oPos+=4;break;case 13:break;case 14:t.oPos+=2;t.bPos+=2;break;case 15:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 16:t.oPos+=4;t.iPos+=1;t.fPos+=2;t.bPos+=1;break;case 17:t.fPos+=2;break;case 18:t.fPos+=2;break;case 19:t.oPos+=1;break;case 20:t.oPos+=1;break;case 21:case 22:break;default:}t.prev=n}else{t.destroy();return false}break;case 13:i=false;s=false;a=false;var p=t.prev;switch(p[1]){case 0:t.oPos+=2;t.bPos+=2;break;case 1:t.iPos+=1;t.fPos+=1;break;case 2:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 3:t.oPos+=1;break;case 4:t.fPos+=6;break;case 5:t.fPos+=4;break;case 6:t.fPos+=3;break;case 7:t.fPos+=4;break;case 8:t.oPos+=3;break;case 9:t.fPos+=4;break;case 10:t.fPos+=5;t.oPos+=1;break;case 12:t.oPos+=4;break;case 13:break;case 14:t.oPos+=2;t.bPos+=2;break;case 15:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 16:t.oPos+=4;t.iPos+=1;t.fPos+=2;t.bPos+=1;break;case 17:t.fPos+=2;break;case 18:t.fPos+=2;break;case 19:t.oPos+=1;break;case 20:t.oPos+=1;break;case 21:case 22:break;default:}t.prev=n;break;case 18:var d=t.prev;switch(d[1]){case 0:t.oPos+=2;t.bPos+=2;break;case 1:t.iPos+=1;t.fPos+=1;break;case 2:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 3:t.oPos+=1;break;case 4:t.fPos+=6;break;case 5:t.fPos+=4;break;case 6:t.fPos+=3;break;case 7:t.fPos+=4;break;case 8:t.oPos+=3;break;case 9:t.fPos+=4;break;case 10:t.fPos+=5;t.oPos+=1;break;case 12:t.oPos+=4;break;case 13:break;case 14:t.oPos+=2;t.bPos+=2;break;case 15:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 16:t.oPos+=4;t.iPos+=1;t.fPos+=2;t.bPos+=1;break;case 17:t.fPos+=2;break;case 18:t.fPos+=2;break;case 19:t.oPos+=1;break;case 20:t.oPos+=1;break;case 21:case 22:break;default:}t.prev=n;break;case 19:var g=t.prev;switch(g[1]){case 0:t.oPos+=2;t.bPos+=2;break;case 1:t.iPos+=1;t.fPos+=1;break;case 2:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 3:t.oPos+=1;break;case 4:t.fPos+=6;break;case 5:t.fPos+=4;break;case 6:t.fPos+=3;break;case 7:t.fPos+=4;break;case 8:t.oPos+=3;break;case 9:t.fPos+=4;break;case 10:t.fPos+=5;t.oPos+=1;break;case 12:t.oPos+=4;break;case 13:break;case 14:t.oPos+=2;t.bPos+=2;break;case 15:t.oPos+=4;t.iiPos+=2;t.ffPos+=1;t.fPos+=1;break;case 16:t.oPos+=4;t.iPos+=1;t.fPos+=2;t.bPos+=1;break;case 17:t.fPos+=2;break;case 18:t.fPos+=2;break;case 19:t.oPos+=1;break;case 20:t.oPos+=1;break;case 21:case 22:break;default:}t.prev=n;break;default:t.destroy();return false}}t.destroy();return true};openfl__$internal_renderer_context3D_Context3DGraphics.render=function(e,t){if(!e.__visible||e.__commands.get_length()==0){return}if(e.__bitmap!=null&&!e.__dirty||!openfl__$internal_renderer_context3D_Context3DGraphics.isCompatible(e)){var s=t.__softwareRenderer.__worldTransform;t.__softwareRenderer.__worldTransform=t.__worldTransform;openfl__$internal_renderer_canvas_CanvasGraphics.render(e,t.__softwareRenderer);t.__softwareRenderer.__worldTransform=s}else{e.__bitmap=null;e.__update(t.__worldTransform);var i=e.__bounds;var a=e.__width;var r=e.__height;if(i!=null&&a>=1&&r>=1){if(e.__hardwareDirty||e.__quadBuffer==null&&e.__vertexBuffer==null&&e.__vertexBufferUVT==null){openfl__$internal_renderer_context3D_Context3DGraphics.buildBuffer(e,t)}var _=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var n=t.__context3D;var o=n.gl;var l=openfl_geom_Matrix.__pool.get();var h=null;var c=null;var u=false;var f=false;var p=null;var d=0;var g=0;var m=0;var v=0;var b=0;var y=0;var x=0;var P=0;var k=e.__commands.types;while(P>>16&255;openfl__$internal_renderer_context3D_Context3DGraphics.tempColorTransform.greenOffset=ee>>>8&255;openfl__$internal_renderer_context3D_Context3DGraphics.tempColorTransform.blueOffset=ee&255;openfl__$internal_renderer_context3D_Context3DGraphics.tempColorTransform.__combine(e.__owner.__worldColorTransform);l.identity();l.scale(Z,Q);l.tx=K;l.ty=J;l.concat(e.__owner.__renderTransform);var te=openfl__$internal_renderer_context3D_Context3DGraphics.maskRender?t.__maskShader:t.__initGraphicsShader(null);t.setShader(te);t.applyMatrix(t.__getMatrix(l,1));t.applyBitmapData(openfl__$internal_renderer_context3D_Context3DGraphics.blankBitmapData,t.__allowSmoothing,u);t.applyAlpha((ee>>>24&255)/255*e.__owner.__worldAlpha);t.applyColorTransform(openfl__$internal_renderer_context3D_Context3DGraphics.tempColorTransform);t.updateShader();var se=openfl__$internal_renderer_context3D_Context3DGraphics.blankBitmapData.getVertexBuffer(n);if(te.__position!=null){n.setVertexBufferAt(te.__position.index,se,0,3)}if(te.__textureCoord!=null){n.setVertexBufferAt(te.__textureCoord.index,se,3,2)}var ie=openfl__$internal_renderer_context3D_Context3DGraphics.blankBitmapData.getIndexBuffer(n);n.drawTriangles(ie);v+=4;t.__clearShader()}break;case 12:var ae=_.prev;switch(ae[1]){case 0:_.oPos+=2;_.bPos+=2;break;case 1:_.iPos+=1;_.fPos+=1;break;case 2:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 3:_.oPos+=1;break;case 4:_.fPos+=6;break;case 5:_.fPos+=4;break;case 6:_.fPos+=3;break;case 7:_.fPos+=4;break;case 8:_.oPos+=3;break;case 9:_.fPos+=4;break;case 10:_.fPos+=5;_.oPos+=1;break;case 12:_.oPos+=4;break;case 13:break;case 14:_.oPos+=2;_.bPos+=2;break;case 15:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 16:_.oPos+=4;_.iPos+=1;_.fPos+=2;_.bPos+=1;break;case 17:_.fPos+=2;break;case 18:_.fPos+=2;break;case 19:_.oPos+=1;break;case 20:_.oPos+=1;break;case 21:case 22:break;default:}_.prev=openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;var re=_;var _e=re;var ne=_e.buffer.o[_e.oPos];var oe=_e.buffer.o[_e.oPos+1];var le=_e.buffer.o[_e.oPos+2];var he=_e.buffer.o[_e.oPos+3];var ce=oe!=null;var ue=Math.floor(ne.get_length()/2);var fe=ce?oe.get_length():ue;var pe=le!=null;var de=pe&&le.get_length()>=ue*3;var ge=de?4:2;var me=de?3:2;var ve=ge+2;var be=de?e.__vertexBufferUVT:e.__vertexBuffer;var ye=de?x:y;var xe=t.__getMatrix(e.__owner.__renderTransform,1);var Pe;if(h!=null&&!openfl__$internal_renderer_context3D_Context3DGraphics.maskRender){Pe=t.__initShaderBuffer(h);t.__setShaderBuffer(h);t.applyMatrix(xe);t.applyBitmapData(c,false,u);t.applyAlpha(1);t.applyColorTransform(null);t.__updateShaderBuffer(v)}else{if(openfl__$internal_renderer_context3D_Context3DGraphics.maskRender){Pe=t.__maskShader}else{Pe=t.__initGraphicsShader(null)}t.setShader(Pe);t.applyMatrix(xe);t.applyBitmapData(c,t.__allowSmoothing&&f,u);t.applyAlpha(e.__owner.__worldAlpha);t.applyColorTransform(e.__owner.__worldColorTransform);t.updateShader()}if(Pe.__position!=null){n.setVertexBufferAt(Pe.__position.index,be,ye,de?4:2)}if(Pe.__textureCoord!=null){n.setVertexBufferAt(Pe.__textureCoord.index,be,ye+ge,2)}switch(he){case 0:n.setCulling(0);break;case 2:n.setCulling(1);break;default:}n.__drawTriangles(ye,fe);v+=fe;if(pe){x+=ve*fe}else{y+=ve*fe}if(he!=1){n.setCulling(0)}t.__clearShader();break;case 13:c=null;p=null;h=null;var ke=_.prev;switch(ke[1]){case 0:_.oPos+=2;_.bPos+=2;break;case 1:_.iPos+=1;_.fPos+=1;break;case 2:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 3:_.oPos+=1;break;case 4:_.fPos+=6;break;case 5:_.fPos+=4;break;case 6:_.fPos+=3;break;case 7:_.fPos+=4;break;case 8:_.oPos+=3;break;case 9:_.fPos+=4;break;case 10:_.fPos+=5;_.oPos+=1;break;case 12:_.oPos+=4;break;case 13:break;case 14:_.oPos+=2;_.bPos+=2;break;case 15:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 16:_.oPos+=4;_.iPos+=1;_.fPos+=2;_.bPos+=1;break;case 17:_.fPos+=2;break;case 18:_.fPos+=2;break;case 19:_.oPos+=1;break;case 20:_.oPos+=1;break;case 21:case 22:break;default:}_.prev=w;break;case 18:var we=_.prev;switch(we[1]){case 0:_.oPos+=2;_.bPos+=2;break;case 1:_.iPos+=1;_.fPos+=1;break;case 2:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 3:_.oPos+=1;break;case 4:_.fPos+=6;break;case 5:_.fPos+=4;break;case 6:_.fPos+=3;break;case 7:_.fPos+=4;break;case 8:_.oPos+=3;break;case 9:_.fPos+=4;break;case 10:_.fPos+=5;_.oPos+=1;break;case 12:_.oPos+=4;break;case 13:break;case 14:_.oPos+=2;_.bPos+=2;break;case 15:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 16:_.oPos+=4;_.iPos+=1;_.fPos+=2;_.bPos+=1;break;case 17:_.fPos+=2;break;case 18:_.fPos+=2;break;case 19:_.oPos+=1;break;case 20:_.oPos+=1;break;case 21:case 22:break;default:}_.prev=openfl__$internal_renderer_DrawCommandType.MOVE_TO;var Ce=_;var Te=Ce;d=Te.buffer.f[Te.fPos];g=Te.buffer.f[Te.fPos+1];break;case 19:var Se=_.prev;switch(Se[1]){case 0:_.oPos+=2;_.bPos+=2;break;case 1:_.iPos+=1;_.fPos+=1;break;case 2:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 3:_.oPos+=1;break;case 4:_.fPos+=6;break;case 5:_.fPos+=4;break;case 6:_.fPos+=3;break;case 7:_.fPos+=4;break;case 8:_.oPos+=3;break;case 9:_.fPos+=4;break;case 10:_.fPos+=5;_.oPos+=1;break;case 12:_.oPos+=4;break;case 13:break;case 14:_.oPos+=2;_.bPos+=2;break;case 15:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 16:_.oPos+=4;_.iPos+=1;_.fPos+=2;_.bPos+=1;break;case 17:_.fPos+=2;break;case 18:_.fPos+=2;break;case 19:_.oPos+=1;break;case 20:_.oPos+=1;break;case 21:case 22:break;default:}_.prev=openfl__$internal_renderer_DrawCommandType.OVERRIDE_BLEND_MODE;var Me=_;var $e=Me;t.__setBlendMode($e.buffer.o[$e.oPos]);break;default:var Ee=_.prev;switch(Ee[1]){case 0:_.oPos+=2;_.bPos+=2;break;case 1:_.iPos+=1;_.fPos+=1;break;case 2:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 3:_.oPos+=1;break;case 4:_.fPos+=6;break;case 5:_.fPos+=4;break;case 6:_.fPos+=3;break;case 7:_.fPos+=4;break;case 8:_.oPos+=3;break;case 9:_.fPos+=4;break;case 10:_.fPos+=5;_.oPos+=1;break;case 12:_.oPos+=4;break;case 13:break;case 14:_.oPos+=2;_.bPos+=2;break;case 15:_.oPos+=4;_.iiPos+=2;_.ffPos+=1;_.fPos+=1;break;case 16:_.oPos+=4;_.iPos+=1;_.fPos+=2;_.bPos+=1;break;case 17:_.fPos+=2;break;case 18:_.fPos+=2;break;case 19:_.oPos+=1;break;case 20:_.oPos+=1;break;case 21:case 22:break;default:}_.prev=w}}openfl_geom_Matrix.__pool.release(l)}e.__hardwareDirty=false;e.set___dirty(false)}};openfl__$internal_renderer_context3D_Context3DGraphics.renderMask=function(e,t){openfl__$internal_renderer_context3D_Context3DGraphics.maskRender=true;openfl__$internal_renderer_context3D_Context3DGraphics.render(e,t);openfl__$internal_renderer_context3D_Context3DGraphics.maskRender=false};openfl__$internal_renderer_context3D_Context3DGraphics.resizeVertexBuffer=function(e,t,s){var i=t?e.__vertexBufferDataUVT:e.__vertexBufferData;var a=null;if(i==null){var r;if(s!=null){r=new Float32Array(s)}else{r=null}a=r}else if(s>i.length){var _;if(s!=null){_=new Float32Array(s)}else{_=null}a=_;a.set(i)}if(a!=null){if(t){e.__vertexBufferDataUVT=a}else{e.__vertexBufferData=a}}};var openfl_display_Shader=function(e){this.byteCode=e;this.precisionHint=1;this.__glSourceDirty=true;this.__numPasses=1;this.__data=openfl_display__$ShaderData_ShaderData_$Impl_$._new(e)};$hxClasses["openfl.display.Shader"]=openfl_display_Shader;openfl_display_Shader.__name__=["openfl","display","Shader"];openfl_display_Shader.prototype={byteCode:null,glProgram:null,precisionHint:null,program:null,__alpha:null,__bitmap:null,__colorMultiplier:null,__colorOffset:null,__context:null,__data:null,__glFragmentSource:null,__glSourceDirty:null,__glVertexSource:null,__hasColorTransform:null,__inputBitmapData:null,__isGenerated:null,__matrix:null,__numPasses:null,__paramBool:null,__paramFloat:null,__paramInt:null,__position:null,__textureCoord:null,__texture:null,__textureSize:null,__clearUseArray:function(){var e=0;var t=this.__paramBool;while(e-1&&StringTools.startsWith(o.name,"openfl_")){s.bindAttribLocation(r,0,o.name);break}}s.attachShader(r,i);s.attachShader(r,a);s.linkProgram(r);if(s.getProgramParameter(r,s.LINK_STATUS)==0){var l="Unable to initialize the shader program";l+="\n"+s.getProgramInfoLog(r);lime_utils_Log.error(l,{fileName:"Shader.hx",lineNumber:224,className:"openfl.display.Shader",methodName:"__createGLProgram"})}return r},__disable:function(){if(this.program!=null){this.__disableGL()}},__disableGL:function(){var e=this.__context.gl;var t=0;var s=0;var i=this.__inputBitmapData;while(s0){t.enable(t.TEXTURE_2D)}},__init:function(){if(this.__data==null){this.__data=openfl_display__$ShaderData_ShaderData_$Impl_$._new(null)}if(this.__glFragmentSource!=null&&this.__glVertexSource!=null&&(this.program==null||this.__glSourceDirty)){this.__initGL()}},__initGL:function(){if(this.__glSourceDirty||this.__paramBool==null){this.__glSourceDirty=false;this.program=null;this.__inputBitmapData=[];this.__paramBool=[];this.__paramFloat=[];this.__paramInt=[];this.__processGLData(this.get_glVertexSource(),"attribute");this.__processGLData(this.get_glVertexSource(),"uniform");this.__processGLData(this.get_glFragmentSource(),"uniform")}if(this.__context!=null&&this.program==null){var e=this.__context.gl;var t="#ifdef GL_ES\n\t\t\t\t"+(this.precisionHint==1?"#ifdef GL_FRAGMENT_PRECISION_HIGH\n\t\t\t\tprecision highp float;\n\t\t\t\t#else\n\t\t\t\tprecision mediump float;\n\t\t\t\t#endif":"precision lowp float;")+"\n\t\t\t\t#endif\n\t\t\t\t";var s=t+this.get_glVertexSource();var i=t+this.get_glFragmentSource();var a=s+i;var r=this.__context.__programs;if(__map_reserved[a]!=null?r.existsReserved(a):r.h.hasOwnProperty(a)){var _=this.__context.__programs;this.program=__map_reserved[a]!=null?_.getReserved(a):_.h[a]}else{this.program=this.__context.createProgram(1);this.program.__glProgram=this.__createGLProgram(s,i);var n=this.program;var o=this.__context.__programs;if(__map_reserved[a]!=null){o.setReserved(a,n)}else{o.h[a]=n}}if(this.program!=null){this.glProgram=this.program.__glProgram;var l=0;var h=this.__inputBitmapData;while(l0){var d=c*c;var g;if(d!=null){g=new Float32Array(d)}else{g=null}p.__uniformMatrix=g}p.__isFloat=true;p.__isUniform=n;p.__length=h;this.__paramFloat.push(p);if(StringTools.startsWith(r,"openfl_")){switch(r){case"openfl_Alpha":this.__alpha=p;break;case"openfl_ColorMultiplier":this.__colorMultiplier=p;break;case"openfl_ColorOffset":this.__colorOffset=p;break;case"openfl_Matrix":this.__matrix=p;break;case"openfl_Position":this.__position=p;break;case"openfl_TextureCoord":this.__textureCoord=p;break;case"openfl_TextureSize":this.__textureSize=p;break;default:}}this.__data[r]=p;if(this.__isGenerated){this[r]=p}}}i=a.matchedPos();s=i.pos+i.len}},__update:function(){if(this.program!=null){this.__updateGL()}},__updateFromBuffer:function(e,t){if(this.program!=null){this.__updateGLFromBuffer(e,t)}},__updateGL:function(){var e=0;var t=0;var s=this.__inputBitmapData;while(t0){if(e.paramDataBuffer==null){e.paramDataBuffer=c.createBuffer()}this.__context.__bindGLArrayBuffer(e.paramDataBuffer);lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.bufferData(c,c.ARRAY_BUFFER,e.paramData,c.DYNAMIC_DRAW)}else{this.__context.__bindGLArrayBuffer(null)}var u=0;var f=0;var p=0;var d=e.paramBoolCount;var g=e.paramFloatCount;var m=e.paramData;var v;var b;var y;var x;var P=null;var k=null;var w=null;var C=0;var T=e.paramCount;while(C>24&255)/255);break;case 3:var x=b[5];var P=b[4];var k=b[3];var w=b[2];s.curveTo(w*o+_,k*o+n,P*o+_,x*o+n);break;case 4:s.endFill();break;case 5:var C=b[9];var T=b[8];var S=b[7];var M=b[6];var $=b[5];var E=b[4];var B=b[3];var L=b[2];if(L!=null){s.lineStyle(L,B,E,$,M,S,T,C)}else{s.lineStyle()}break;case 6:var R=b[3];var A=b[2];s.lineTo(A*o+_,R*o+n);break;case 7:var I=b[3];var D=b[2];s.moveTo(D*o+_,I*o+n);break;default:}}_+=f.advances[g]*.05}}}}t.text=i;this.records=null;this.rendered=new openfl_text_StaticText;this.rendered.text=i;this.rendered.__graphics.copyFrom(t.__graphics);return t},__class__:openfl__$internal_symbols_StaticTextSymbol});var openfl__$internal_symbols_StaticTextRecord=function(){};$hxClasses["openfl._internal.symbols.StaticTextRecord"]=openfl__$internal_symbols_StaticTextRecord;openfl__$internal_symbols_StaticTextRecord.__name__=["openfl","_internal","symbols","StaticTextRecord"];openfl__$internal_symbols_StaticTextRecord.prototype={advances:null,color:null,fontHeight:null,fontID:null,glyphs:null,offsetX:null,offsetY:null,__class__:openfl__$internal_symbols_StaticTextRecord};var openfl__$internal_symbols_timeline_Frame=function(){};$hxClasses["openfl._internal.symbols.timeline.Frame"]=openfl__$internal_symbols_timeline_Frame;openfl__$internal_symbols_timeline_Frame.__name__=["openfl","_internal","symbols","timeline","Frame"];openfl__$internal_symbols_timeline_Frame.prototype={label:null,objects:null,script:null,scriptSource:null,__class__:openfl__$internal_symbols_timeline_Frame};var openfl__$internal_symbols_timeline_FrameObject=function(){};$hxClasses["openfl._internal.symbols.timeline.FrameObject"]=openfl__$internal_symbols_timeline_FrameObject;openfl__$internal_symbols_timeline_FrameObject.__name__=["openfl","_internal","symbols","timeline","FrameObject"];openfl__$internal_symbols_timeline_FrameObject.prototype={blendMode:null,cacheAsBitmap:null,clipDepth:null,colorTransform:null,depth:null,filters:null,id:null,matrix:null,name:null,symbol:null,type:null,visible:null,__class__:openfl__$internal_symbols_timeline_FrameObject};var openfl__$internal_symbols_timeline_FrameObjectType=$hxClasses["openfl._internal.symbols.timeline.FrameObjectType"]={__ename__:["openfl","_internal","symbols","timeline","FrameObjectType"],__constructs__:["CREATE","UPDATE","DESTROY"]};openfl__$internal_symbols_timeline_FrameObjectType.CREATE=["CREATE",0];openfl__$internal_symbols_timeline_FrameObjectType.CREATE.toString=$estr;openfl__$internal_symbols_timeline_FrameObjectType.CREATE.__enum__=openfl__$internal_symbols_timeline_FrameObjectType;openfl__$internal_symbols_timeline_FrameObjectType.UPDATE=["UPDATE",1];openfl__$internal_symbols_timeline_FrameObjectType.UPDATE.toString=$estr;openfl__$internal_symbols_timeline_FrameObjectType.UPDATE.__enum__=openfl__$internal_symbols_timeline_FrameObjectType;openfl__$internal_symbols_timeline_FrameObjectType.DESTROY=["DESTROY",2];openfl__$internal_symbols_timeline_FrameObjectType.DESTROY.toString=$estr;openfl__$internal_symbols_timeline_FrameObjectType.DESTROY.__enum__=openfl__$internal_symbols_timeline_FrameObjectType;var openfl__$internal_text_TextEngine=function(e){this.textField=e;this.width=100;this.height=100;this.set_text("");this.bounds=new openfl_geom_Rectangle(0,0,0,0);this.textBounds=new openfl_geom_Rectangle(0,0,0,0);this.type=0;this.autoSize=2;this.embedFonts=false;this.selectable=true;this.borderColor=0;this.border=false;this.backgroundColor=16777215;this.background=false;this.gridFitType=1;this.maxChars=0;this.multiline=false;this.sharpness=0;this.scrollH=0;this.scrollV=1;this.wordWrap=false;this.lineAscents=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);this.lineBreaks=openfl__$Vector_Vector_$Impl_$.toIntVector(null);this.lineDescents=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);this.lineLeadings=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);this.lineHeights=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);this.lineWidths=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);this.layoutGroups=openfl__$Vector_Vector_$Impl_$.toObjectVector(null);this.textFormatRanges=openfl__$Vector_Vector_$Impl_$.toObjectVector(null);openfl__$internal_text_TextEngine.__canvas=window.document.createElement("canvas");openfl__$internal_text_TextEngine.__context=openfl__$internal_text_TextEngine.__canvas.getContext("2d")};$hxClasses["openfl._internal.text.TextEngine"]=openfl__$internal_text_TextEngine;openfl__$internal_text_TextEngine.__name__=["openfl","_internal","text","TextEngine"];openfl__$internal_text_TextEngine.findFont=function(e){var t=openfl_text_Font.__fontByName;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}};openfl__$internal_text_TextEngine.findFontVariant=function(e){var t=e.font;var s=e.bold;var i=e.italic;if(t==null){t="_serif"}var a=StringTools.replace(StringTools.replace(t," Normal","")," Regular","");var r;if(s&&i){var _=openfl_text_Font.__fontByName;var n=a+" Bold Italic";if(__map_reserved[n]!=null){r=_.existsReserved(n)}else{r=_.h.hasOwnProperty(n)}}else{r=false}if(r){return openfl__$internal_text_TextEngine.findFont(a+" Bold Italic")}else{var o;if(s){var l=openfl_text_Font.__fontByName;var h=a+" Bold";if(__map_reserved[h]!=null){o=l.existsReserved(h)}else{o=l.h.hasOwnProperty(h)}}else{o=false}if(o){return openfl__$internal_text_TextEngine.findFont(a+" Bold")}else{var c;if(i){var u=openfl_text_Font.__fontByName;var f=a+" Italic";if(__map_reserved[f]!=null){c=u.existsReserved(f)}else{c=u.h.hasOwnProperty(f)}}else{c=false}if(c){return openfl__$internal_text_TextEngine.findFont(a+" Italic")}}}return openfl__$internal_text_TextEngine.findFont(t)};openfl__$internal_text_TextEngine.getFormatHeight=function(e){var t;var s;var i;openfl__$internal_text_TextEngine.__context.font=openfl__$internal_text_TextEngine.getFont(e);var a=openfl__$internal_text_TextEngine.getFontInstance(e);if(e.__ascent!=null){t=e.size*e.__ascent;s=e.size*e.__descent}else if(a!=null&&a.unitsPerEM!=0){t=a.ascender/a.unitsPerEM*e.size;s=Math.abs(a.descender/a.unitsPerEM*e.size)}else{t=e.size;s=e.size*.185}i=e.leading;return t+s+i};openfl__$internal_text_TextEngine.getFont=function(e){var t=e.font;var s=e.bold;var i=e.italic;if(t==null){t="_serif"}var a=StringTools.replace(StringTools.replace(t," Normal","")," Regular","");var r;if(s&&i){var _=openfl_text_Font.__fontByName;var n=a+" Bold Italic";if(__map_reserved[n]!=null){r=_.existsReserved(n)}else{r=_.h.hasOwnProperty(n)}}else{r=false}if(r){t=a+" Bold Italic";s=false;i=false}else{var o;if(s){var l=openfl_text_Font.__fontByName;var h=a+" Bold";if(__map_reserved[h]!=null){o=l.existsReserved(h)}else{o=l.h.hasOwnProperty(h)}}else{o=false}if(o){t=a+" Bold";s=false}else{var c;if(i){var u=openfl_text_Font.__fontByName;var f=a+" Italic";if(__map_reserved[f]!=null){c=u.existsReserved(f)}else{c=u.h.hasOwnProperty(f)}}else{c=false}if(c){t=a+" Italic";i=false}else{if(s&&(t.indexOf(" Bold ")>-1||StringTools.endsWith(t," Bold"))){s=false}if(i&&(t.indexOf(" Italic ")>-1||StringTools.endsWith(t," Italic"))){i=false}}}}var p=i?"italic ":"normal ";p+="normal ";p+=s?"bold ":"normal ";p+=e.size+"px";p+="/"+(e.leading+e.size+3)+"px ";var d;switch(t){case"_sans":d="sans-serif";break;case"_serif":d="serif";break;case"_typewriter":d="monospace";break;default:var g=new RegExp("^[\\s'\"]+(.*)[\\s'\"]+$","".split("u").join(""));d="'"+t.replace(g,"$1")+"'"}p+=""+d;return p};openfl__$internal_text_TextEngine.getFontInstance=function(e){return openfl__$internal_text_TextEngine.findFontVariant(e)};openfl__$internal_text_TextEngine.prototype={antiAliasType:null,autoSize:null,background:null,backgroundColor:null,border:null,borderColor:null,bottomScrollV:null,bounds:null,embedFonts:null,gridFitType:null,height:null,layoutGroups:null,lineAscents:null,lineBreaks:null,lineDescents:null,lineLeadings:null,lineHeights:null,lineWidths:null,maxChars:null,maxScrollH:null,maxScrollV:null,multiline:null,numLines:null,scrollH:null,scrollV:null,selectable:null,sharpness:null,text:null,textBounds:null,textHeight:null,textFormatRanges:null,textWidth:null,type:null,width:null,wordWrap:null,textField:null,__hasFocus:null,__restrictRegexp:null,__useIntAdvances:null,getBounds:function(){var e=this.border?1:0;this.bounds.width=this.width+e;this.bounds.height=this.height+e;var t=this.width;var s=this.width;var i=0;var a=this.layoutGroups;while(i=this.width){t=2}if(s>=this.height){s=2}var _=this.textHeight*1.185;this.textBounds.setTo(Math.max(t-2,0),Math.max(s-2,0),Math.min(this.textWidth+4,this.bounds.width+4),Math.min(_+4,this.bounds.height+4))},getLineBreakIndex:function(e){if(e==null){e=0}var t=lime_text__$UTF8String_UTF8String_$Impl_$.indexOf(this.text,"\n",e);var s=lime_text__$UTF8String_UTF8String_$Impl_$.indexOf(this.text,"\r",e);if(t==-1){return s}if(s==-1){return t}if(tthis.numLines-1){this.lineAscents.push(e);this.lineDescents.push(t);this.lineLeadings.push(s!=null?s:0);this.lineHeights.push(i);this.lineWidths.push(a);e=0;t=0;s=null;i=0;a=0;this.numLines++;if(this.textHeight<=this.height-2){this.bottomScrollV++}}e=Math.max(e,o.ascent);t=Math.max(t,o.descent);if(s==null){s=o.leading}else{s=Math.max(s,o.leading)|0}i=Math.max(i,o.height);a=o.offsetX-2+o.width;if(a>this.textWidth){this.textWidth=a}r=o.offsetY-2+o.ascent+o.descent;if(r>this.textHeight){this.textHeight=r}}if(this.textHeight==0&&this.textField!=null&&this.textField.get_type()==1){var l=this.textField.__textFormat;var h;var c;var u;var f;var p=openfl__$internal_text_TextEngine.getFontInstance(l);if(l.__ascent!=null){h=l.size*l.__ascent;c=l.size*l.__descent}else if(p!=null&&p.unitsPerEM!=0){h=p.ascender/p.unitsPerEM*l.size;c=Math.abs(p.descender/p.unitsPerEM*l.size)}else{h=l.size;c=l.size*.185}u=l.leading;f=h+c+u;e=h;t=c;s=u;r=h+c;this.textHeight=r}this.lineAscents.push(e);this.lineDescents.push(t);this.lineLeadings.push(s!=null?s:0);this.lineHeights.push(i);this.lineWidths.push(a);if(this.numLines==1){this.bottomScrollV=1;if(s>0){this.textHeight+=s}}else if(this.textHeight<=this.height-2){this.bottomScrollV++}if(this.autoSize!=2){var d=this.autoSize;switch(d){case 0:case 1:case 3:if(!this.wordWrap){this.width=this.textWidth+4}this.height=this.textHeight+4;this.bottomScrollV=this.numLines;break;default:}}if(this.textWidth>this.width-4){this.maxScrollH=this.textWidth-this.width+4|0}else{this.maxScrollH=0}this.maxScrollV=this.numLines-this.bottomScrollV+1;if(this.scrollV>this.maxScrollV){this.scrollV=this.maxScrollV}if(this.scrollH>this.maxScrollH){this.scrollH=this.maxScrollH}},getLayoutGroups:function(){var m=this;this.layoutGroups.set_length(0);if(this.text==null||lime_text__$UTF8String_UTF8String_$Impl_$.equals(this.text,"")){return}var _=-1;var v=null;var t=null;var s=openfl_text_TextField.__defaultTextFormat.clone();var i=0;var a=0;var r=0;var n=0;var o=null;var l=null;var h=0;var c=0;var u=0;var e=-2;var f=lime_text__$UTF8String_UTF8String_$Impl_$.indexOf(this.text," ");var p=this.getLineBreakIndex();var d=2;var g=2;var b=0;var y=0;var x=null;var P=function(e,t,s){var i=[];var a=0;if(v.format.letterSpacing!=null){a=v.format.letterSpacing}if(m.__useIntAdvances==null){var r=new EReg("Trident/7.0","");m.__useIntAdvances=r.match(window.navigator.userAgent)}if(m.__useIntAdvances){var _=0;var n;var o=t;var l=s;while(ou){u=c}if(a>r){r=a}};var S=function(){var e=m.textFormatRanges.get_length()-1;if(_-1){var t=m.layoutGroups.get(e);if(t.lineIndexy){continue}t.ascent=r;t.height=u}g+=u;r=0;u=0;y+=1;d=2};var B=function(e){var t=l;var s;var i;var a;var r;var _;var n;var o=k(t);while(d+o>m.width-2){i=0;s=i;r=0;while(d+rm.width-2){if(b+s-i==e){break}}else{while(d+r>m.width-2){--s;if(s-i>0){M(b,b+s-i);r=h}else{s=1;i=0;M(b,b+1);r=0}}}a=b+s-i;$(a);E();M(a,e);t=l;o=h}};var L=function(e){if(m.width>=4&&m.wordWrap){B(e)}$(e)};S();T();x=v.format;var R;var A=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text)+1;while(b-1&&(f==-1||p=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text)-1){g-=u}E();b=p+1;p=this.getLineBreakIndex(b)}else if(f>-1){if(o!=null&&o.startIndex!=o.endIndex){o=null}R=false;while(true){var I=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text);if(b>=I){break}var D=-1;if(f==-1){D=p}else{D=f+1;if(p>-1&&p0&&b==e){b+=1;var F=l.shift();h-=F;d+=F}if(l.length>0&&D==f+1){--D;var O=l.pop();h-=O}}if(this.wordWrap){if(d+h>this.width-2){R=true;if(l.length>0&&D==f+1){var G=l[l.length-1];var j=G;if(d+h-j<=this.width-2){R=false}}}}if(R){if(x.align!=2&&(o!=null||this.layoutGroups.get_length()>0)){var H=o;if(H==null){H=this.layoutGroups.get(this.layoutGroups.get_length()-1)}H.width-=H.positions[H.positions.length-1];H.endIndex--}var U=this.layoutGroups.get_length()-1;var N=0;while(true){o=this.layoutGroups.get(U);if(U>0&&o.startIndex>e){++N}else{break}--U}if(b==e+1){E()}d=2;if(N>0){var V=this.layoutGroups.get(this.layoutGroups.get_length()-N).offsetX;var W=this.layoutGroups.get_length()-N;var z=this.layoutGroups.get_length();while(W-1&&p<=b&&(f>p||f==-1))){var J=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text);K=b>J}else{K=true}if(K){break}}}else{var Z=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text);if(b1){i=this.layoutGroups.get(o+a-1);var f=lime_text__$UTF8String_UTF8String_$Impl_$.charCodeAt(this.text,i.endIndex);if(i.endIndex0){i.offsetX+=t}}if(r){this.getLineMeasurements()}},update:function(){if(this.text==null||this.textFormatRanges.get_length()==0){this.lineAscents.set_length(0);this.lineBreaks.set_length(0);this.lineDescents.set_length(0);this.lineLeadings.set_length(0);this.lineHeights.set_length(0);this.lineWidths.set_length(0);this.layoutGroups.set_length(0);this.textWidth=0;this.textHeight=0;this.numLines=1;this.maxScrollH=0;this.maxScrollV=1;this.bottomScrollV=1}else{this.getLayoutGroups();this.getLineMeasurements();this.setTextAlignment()}this.getBounds()},set_text:function(e){return this.text=e},__class__:openfl__$internal_text_TextEngine,__properties__:{set_text:"set_text"}};var openfl__$internal_text_TextFormatRange=function(e,t,s){this.format=e;this.start=t;this.end=s};$hxClasses["openfl._internal.text.TextFormatRange"]=openfl__$internal_text_TextFormatRange;openfl__$internal_text_TextFormatRange.__name__=["openfl","_internal","text","TextFormatRange"];openfl__$internal_text_TextFormatRange.prototype={end:null,format:null,start:null,__class__:openfl__$internal_text_TextFormatRange};var openfl__$internal_text_TextLayoutGroup=function(e,t,s){this.format=e;this.startIndex=t;this.endIndex=s};$hxClasses["openfl._internal.text.TextLayoutGroup"]=openfl__$internal_text_TextLayoutGroup;openfl__$internal_text_TextLayoutGroup.__name__=["openfl","_internal","text","TextLayoutGroup"];openfl__$internal_text_TextLayoutGroup.prototype={ascent:null,descent:null,endIndex:null,format:null,height:null,leading:null,lineIndex:null,offsetX:null,offsetY:null,positions:null,startIndex:null,width:null,__class__:openfl__$internal_text_TextLayoutGroup};var openfl__$internal_utils_TouchData=function(){this.rollOutStack=[]};$hxClasses["openfl._internal.utils.TouchData"]=openfl__$internal_utils_TouchData;openfl__$internal_utils_TouchData.__name__=["openfl","_internal","utils","TouchData"];openfl__$internal_utils_TouchData.prototype={rollOutStack:null,touch:null,touchDownTarget:null,touchOverTarget:null,reset:function(){this.touch=null;this.touchDownTarget=null;this.touchOverTarget=null;this.rollOutStack.splice(0,this.rollOutStack.length)},__class__:openfl__$internal_utils_TouchData};var openfl_display_Application=function(){lime_app_Application.call(this);if(openfl__$internal_Lib.application==null){openfl__$internal_Lib.application=this}if(openfl__$internal_Lib.current==null){openfl__$internal_Lib.current=new openfl_display_MovieClip}openfl__$internal_Lib.current.__loaderInfo=openfl_display_LoaderInfo.create(null);openfl__$internal_Lib.current.__loaderInfo.content=openfl__$internal_Lib.current};$hxClasses["openfl.display.Application"]=openfl_display_Application;openfl_display_Application.__name__=["openfl","display","Application"];openfl_display_Application.__super__=lime_app_Application;openfl_display_Application.prototype=$extend(lime_app_Application.prototype,{createWindow:function(e){var t=new openfl_display_Window(this,e);this.__windows.push(t);this.__windowByID.h[t.id]=t;var s=$bind(this,this.__onWindowClose);var i=t;var a=function(){s(i)};t.onClose.add(a,false,-1e4);if(this.__window==null){this.__window=t;t.onActivate.add($bind(this,this.onWindowActivate));t.onRenderContextLost.add($bind(this,this.onRenderContextLost));t.onRenderContextRestored.add($bind(this,this.onRenderContextRestored));t.onDeactivate.add($bind(this,this.onWindowDeactivate));t.onDropFile.add($bind(this,this.onWindowDropFile));t.onEnter.add($bind(this,this.onWindowEnter));t.onExpose.add($bind(this,this.onWindowExpose));t.onFocusIn.add($bind(this,this.onWindowFocusIn));t.onFocusOut.add($bind(this,this.onWindowFocusOut));t.onFullscreen.add($bind(this,this.onWindowFullscreen));t.onKeyDown.add($bind(this,this.onKeyDown));t.onKeyUp.add($bind(this,this.onKeyUp));t.onLeave.add($bind(this,this.onWindowLeave));t.onMinimize.add($bind(this,this.onWindowMinimize));t.onMouseDown.add($bind(this,this.onMouseDown));t.onMouseMove.add($bind(this,this.onMouseMove));t.onMouseMoveRelative.add($bind(this,this.onMouseMoveRelative));t.onMouseUp.add($bind(this,this.onMouseUp));t.onMouseWheel.add($bind(this,this.onMouseWheel));t.onMove.add($bind(this,this.onWindowMove));t.onRender.add($bind(this,this.render));t.onResize.add($bind(this,this.onWindowResize));t.onRestore.add($bind(this,this.onWindowRestore));t.onTextEdit.add($bind(this,this.onTextEdit));t.onTextInput.add($bind(this,this.onTextInput));this.onWindowCreate()}this.onCreateWindow.dispatch(t);return t},__class__:openfl_display_Application});var openfl_display_Bitmap=function(e,t,s){if(s==null){s=false}openfl_display_DisplayObject.call(this);this.__bitmapData=e;this.pixelSnapping=t;this.smoothing=s;if(t==null){this.pixelSnapping=1}};$hxClasses["openfl.display.Bitmap"]=openfl_display_Bitmap;openfl_display_Bitmap.__name__=["openfl","display","Bitmap"];openfl_display_Bitmap.__super__=openfl_display_DisplayObject;openfl_display_Bitmap.prototype=$extend(openfl_display_DisplayObject.prototype,{pixelSnapping:null,smoothing:null,__image:null,__bitmapData:null,__imageVersion:null,__enterFrame:function(e){if(this.__bitmapData!=null&&this.__bitmapData.image!=null&&this.__bitmapData.image.version!=this.__imageVersion){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}},__getBounds:function(e,t){if(this.__bitmapData!=null){var s=openfl_geom_Rectangle.__pool.get();s.setTo(0,0,this.__bitmapData.width,this.__bitmapData.height);s.__transform(s,t);e.__expand(s.x,s.y,s.width,s.height);openfl_geom_Rectangle.__pool.release(s)}},__hitTest:function(e,t,s,i,a,r){if(!r.get_visible()||this.__isMask||this.__bitmapData==null){return false}if(this.get_mask()!=null&&!this.get_mask().__hitTestMask(e,t)){return false}this.__getRenderTransform();var _=this.__renderTransform;var n=_.a*_.d-_.b*_.c;var o=n==0?-_.tx:1/n*(_.c*(_.ty-t)+_.d*(e-_.tx));var l=this.__renderTransform;var h=l.a*l.d-l.b*l.c;var c=h==0?-l.ty:1/h*(l.a*(t-l.ty)+l.b*(l.tx-e));if(o>0&&c>0&&o<=this.__bitmapData.width&&c<=this.__bitmapData.height){if(this.__scrollRect!=null&&!this.__scrollRect.contains(o,c)){return false}if(i!=null&&!a){i.push(r)}return true}return false},__hitTestMask:function(e,t){if(this.__bitmapData==null){return false}this.__getRenderTransform();var s=this.__renderTransform;var i=s.a*s.d-s.b*s.c;var a=i==0?-s.tx:1/i*(s.c*(s.ty-t)+s.d*(e-s.tx));var r=this.__renderTransform;var _=r.a*r.d-r.b*r.c;var n=_==0?-r.ty:1/_*(r.a*(t-r.ty)+r.b*(r.tx-e));if(a>0&&n>0&&a<=this.__bitmapData.width&&n<=this.__bitmapData.height){return true}return false},__renderCanvas:function(e){this.__updateCacheBitmap(e,false);if(this.__bitmapData!=null&&this.__bitmapData.image!=null){this.__imageVersion=this.__bitmapData.image.version}if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){var t=this.__cacheBitmap;if(!!t.__renderable){var s=e.__getAlpha(t.__worldAlpha);if(s>0&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){var i=e.context;e.__setBlendMode(t.__worldBlendMode);e.__pushMaskObject(t,false);lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(t.__bitmapData.image);i.globalAlpha=s;var a=t.__scrollRect;e.setTransform(t.__renderTransform,i);if(!e.__allowSmoothing||!t.smoothing){i.imageSmoothingEnabled=false}if(a==null){i.drawImage(t.__bitmapData.image.get_src(),0,0,t.__bitmapData.image.width,t.__bitmapData.image.height)}else{i.drawImage(t.__bitmapData.image.get_src(),a.x,a.y,a.width,a.height)}if(!e.__allowSmoothing||!t.smoothing){i.imageSmoothingEnabled=true}e.__popMaskObject(t,false)}}}else{if(!(this.opaqueBackground==null&&this.__graphics==null)){if(!!this.__renderable){var r=e.__getAlpha(this.__worldAlpha);if(!(r<=0)){if(this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var _=e.context;e.setTransform(this.__renderTransform,_);var n=this.opaqueBackground;_.fillStyle="rgb("+(n>>>16&255)+","+(n>>>8&255)+","+(n&255)+")";_.fillRect(0,0,this.get_width(),this.get_height());e.__popMaskObject(this)}if(this.__graphics!=null){if(!!this.__renderable){var o=e.__getAlpha(this.__worldAlpha);if(!(o<=0)){var l=this.__graphics;if(l!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(l,e);var h=l.__bounds;var c=l.__width;var u=l.__height;if(l.__canvas!=null){var f=e.context;var p=this.__scrollRect;if(c>0&&u>0&&(p==null||p.width>0&&p.height>0)){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);f.globalAlpha=o;e.setTransform(l.__worldTransform,f);if(e.__isDOM){var d=1/e.pixelRatio;f.scale(d,d)}f.drawImage(l.__canvas,0,0,c,u);e.__popMaskObject(this)}}}}}}}}}if(!!this.__renderable){var g=e.__getAlpha(this.__worldAlpha);if(g>0&&this.__bitmapData!=null&&this.__bitmapData.__isValid&&this.__bitmapData.readable){var m=e.context;e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this,false);lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this.__bitmapData.image);m.globalAlpha=g;var v=this.__scrollRect;e.setTransform(this.__renderTransform,m);if(!e.__allowSmoothing||!this.smoothing){m.imageSmoothingEnabled=false}if(v==null){m.drawImage(this.__bitmapData.image.get_src(),0,0,this.__bitmapData.image.width,this.__bitmapData.image.height)}else{m.drawImage(this.__bitmapData.image.get_src(),v.x,v.y,v.width,v.height)}if(!e.__allowSmoothing||!this.smoothing){m.imageSmoothingEnabled=true}e.__popMaskObject(this,false)}}}this.__renderEvent(e)},__renderCanvasMask:function(e){e.context.rect(0,0,this.get_width(),this.get_height())},__renderDOM:function(e){this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){this.__renderDOMClear(e);this.__cacheBitmap.stage=this.stage;var t=this.__cacheBitmap;if(t.stage!=null&&t.__worldVisible&&t.__renderable&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){e.__pushMaskObject(t);if(t.__bitmapData.image.buffer.__srcImage!=null){openfl__$internal_renderer_dom_DOMBitmap.renderImage(t,e)}else{openfl__$internal_renderer_dom_DOMBitmap.renderCanvas(t,e)}e.__popMaskObject(t)}else{openfl__$internal_renderer_dom_DOMBitmap.clear(t,e)}}else{var s=this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0;var i=this.__graphics;if(this.stage!=null&&this.__worldVisible&&this.__renderable&&i!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(i,e.__canvasRenderer);if(i.__softwareDirty||this.__worldAlphaChanged||this.__canvas!=i.__canvas){if(i.__canvas!=null){if(this.__canvas!=i.__canvas){if(this.__canvas!=null){e.element.removeChild(this.__canvas)}this.__canvas=i.__canvas;this.__context=i.__context;e.__initializeElement(this,this.__canvas)}}else{openfl__$internal_renderer_dom_DOMShape.clear(this,e)}}if(this.__canvas!=null){e.__pushMaskObject(this);var a=this.__renderTransform;this.__renderTransform=i.__worldTransform;if(i.__transformDirty){i.__transformDirty=false;this.__renderTransformChanged=true}e.__updateClip(this);e.__applyStyle(this,true,true,true);this.__renderTransform=a;e.__popMaskObject(this)}}else{openfl__$internal_renderer_dom_DOMShape.clear(this,e)}if(this.stage!=null&&this.__worldVisible&&this.__renderable&&this.__bitmapData!=null&&this.__bitmapData.__isValid&&this.__bitmapData.readable){e.__pushMaskObject(this);if(this.__bitmapData.image.buffer.__srcImage!=null){openfl__$internal_renderer_dom_DOMBitmap.renderImage(this,e)}else{openfl__$internal_renderer_dom_DOMBitmap.renderCanvas(this,e)}e.__popMaskObject(this)}else{openfl__$internal_renderer_dom_DOMBitmap.clear(this,e)}}this.__renderEvent(e)},__renderDOMClear:function(e){openfl__$internal_renderer_dom_DOMBitmap.clear(this,e)},__renderGL:function(e){this.__updateCacheBitmap(e,false);if(this.__bitmapData!=null&&this.__bitmapData.image!=null){this.__imageVersion=this.__bitmapData.image.version}if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){openfl__$internal_renderer_context3D_Context3DBitmap.render(this.__cacheBitmap,e)}else{if(!(this.opaqueBackground==null&&this.__graphics==null)){if(!(!this.__renderable||this.__worldAlpha<=0)){if(this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var t=e.__context3D;var s=openfl_geom_Rectangle.__pool.get();s.setTo(0,0,this.get_width(),this.get_height());e.__pushMaskRect(s,this.__renderTransform);var i=this.opaqueBackground;t.clear((i>>>16&255)/255,(i>>>8&255)/255,(i&255)/255,1,0,0,1);e.__popMaskRect();e.__popMaskObject(this);openfl_geom_Rectangle.__pool.release(s)}if(this.__graphics!=null){openfl__$internal_renderer_context3D_Context3DShape.render(this,e)}}}openfl__$internal_renderer_context3D_Context3DBitmap.render(this,e)}this.__renderEvent(e)},__renderGLMask:function(e){openfl__$internal_renderer_context3D_Context3DBitmap.renderMask(this,e)},__updateCacheBitmap:function(e,t){if(this.__bitmapData==null||this.__filters==null&&e.__type=="opengl"&&this.__cacheBitmap==null){return false}return openfl_display_DisplayObject.prototype.__updateCacheBitmap.call(this,e,this.__bitmapData.image!=null&&this.__bitmapData.image.version!=this.__imageVersion)},get_bitmapData:function(){return this.__bitmapData},get_height:function(){if(this.__bitmapData!=null){return this.__bitmapData.height*Math.abs(this.get_scaleY())}return 0},set_height:function(e){if(this.__bitmapData!=null){if(e!=this.__bitmapData.height){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}this.set_scaleY(e/this.__bitmapData.height)}return e}return 0},get_width:function(){if(this.__bitmapData!=null){return this.__bitmapData.width*Math.abs(this.__scaleX)}return 0},set_width:function(e){if(this.__bitmapData!=null){if(e!=this.__bitmapData.width){if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}this.set_scaleX(e/this.__bitmapData.width)}return e}return 0},__class__:openfl_display_Bitmap,__properties__:$extend(openfl_display_DisplayObject.prototype.__properties__,{get_bitmapData:"get_bitmapData"})});var openfl_display_DisplayObjectRenderer=function(){openfl_events_EventDispatcher.call(this);this.__allowSmoothing=true;this.__tempColorTransform=new openfl_geom_ColorTransform;this.__worldAlpha=1};$hxClasses["openfl.display.DisplayObjectRenderer"]=openfl_display_DisplayObjectRenderer;openfl_display_DisplayObjectRenderer.__name__=["openfl","display","DisplayObjectRenderer"];openfl_display_DisplayObjectRenderer.__super__=openfl_events_EventDispatcher;openfl_display_DisplayObjectRenderer.prototype=$extend(openfl_events_EventDispatcher.prototype,{__allowSmoothing:null,__blendMode:null,__cleared:null,__context:null,__overrideBlendMode:null,__roundPixels:null,__stage:null,__tempColorTransform:null,__type:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__clear:function(){},__getAlpha:function(e){return e*this.__worldAlpha},__popMaskObject:function(e,t){if(t==null){t=true}},__pushMaskObject:function(e,t){if(t==null){t=true}},__render:function(e){},__resize:function(e,t){},__setBlendMode:function(e){},__class__:openfl_display_DisplayObjectRenderer});var openfl_display_CanvasRenderer=function(e){this.pixelRatio=1;openfl_display_DisplayObjectRenderer.call(this);this.context=e;this.__tempMatrix=new openfl_geom_Matrix;this.__type="canvas"};$hxClasses["openfl.display.CanvasRenderer"]=openfl_display_CanvasRenderer;openfl_display_CanvasRenderer.__name__=["openfl","display","CanvasRenderer"];openfl_display_CanvasRenderer.__super__=openfl_display_DisplayObjectRenderer;openfl_display_CanvasRenderer.prototype=$extend(openfl_display_DisplayObjectRenderer.prototype,{context:null,pixelRatio:null,__isDOM:null,__tempMatrix:null,applySmoothing:function(e,t){e.imageSmoothingEnabled=t},setTransform:function(e,t){if(t==null){t=this.context}else if(this.context==t&&this.__worldTransform!=null){this.__tempMatrix.copyFrom(e);this.__tempMatrix.concat(this.__worldTransform);e=this.__tempMatrix}if(this.__roundPixels){t.setTransform(e.a,e.b,e.c,e.d,e.tx|0,e.ty|0)}else{t.setTransform(e.a,e.b,e.c,e.d,e.tx,e.ty)}},__clear:function(){if(this.__stage!=null){var e=this.__blendMode;this.__blendMode=null;this.__setBlendMode(10);this.context.setTransform(1,0,0,1,0,0);this.context.globalAlpha=1;if(!this.__stage.__transparent&&this.__stage.__clearBeforeRender){this.context.fillStyle=this.__stage.__colorString;this.context.fillRect(0,0,this.__stage.stageWidth*this.__stage.window.__scale,this.__stage.stageHeight*this.__stage.window.__scale)}else if(this.__stage.__transparent&&this.__stage.__clearBeforeRender){this.context.clearRect(0,0,this.__stage.stageWidth*this.__stage.window.__scale,this.__stage.stageHeight*this.__stage.window.__scale)}this.__setBlendMode(e)}},__popMask:function(){this.context.restore()},__popMaskObject:function(e,t){if(t==null){t=true}if(!e.__isCacheBitmapRender&&e.__mask!=null){this.__popMask()}if(t&&e.__scrollRect!=null){this.__popMaskRect()}},__popMaskRect:function(){this.context.restore()},__pushMask:function(e){this.context.save();this.setTransform(e.__renderTransform,this.context);this.context.beginPath();e.__renderCanvasMask(this);this.context.closePath();this.context.clip()},__pushMaskObject:function(e,t){if(t==null){t=true}if(t&&e.__scrollRect!=null){this.__pushMaskRect(e.__scrollRect,e.__renderTransform)}if(!e.__isCacheBitmapRender&&e.__mask!=null){this.__pushMask(e.__mask)}},__pushMaskRect:function(e,t){this.context.save();this.setTransform(t,this.context);this.context.beginPath();this.context.rect(e.x,e.y,e.width,e.height);this.context.clip()},__render:function(e){e.__renderCanvas(this)},__setBlendMode:function(e){if(this.__overrideBlendMode!=null){e=this.__overrideBlendMode}if(this.__blendMode==e){return}this.__blendMode=e;this.__setBlendModeContext(this.context,e)},__setBlendModeContext:function(e,t){switch(t){case 0:e.globalCompositeOperation="lighter";break;case 2:e.globalCompositeOperation="darken";break;case 3:e.globalCompositeOperation="difference";break;case 5:e.globalCompositeOperation="hard-light";break;case 8:e.globalCompositeOperation="lighten";break;case 9:e.globalCompositeOperation="multiply";break;case 11:e.globalCompositeOperation="overlay";break;case 12:e.globalCompositeOperation="screen";break;default:e.globalCompositeOperation="source-over"}},__class__:openfl_display_CanvasRenderer});var openfl_display__$CapsStyle_CapsStyle_$Impl_$={};$hxClasses["openfl.display._CapsStyle.CapsStyle_Impl_"]=openfl_display__$CapsStyle_CapsStyle_$Impl_$;openfl_display__$CapsStyle_CapsStyle_$Impl_$.__name__=["openfl","display","_CapsStyle","CapsStyle_Impl_"];openfl_display__$CapsStyle_CapsStyle_$Impl_$.toString=function(e){switch(e){case 0:return"none";case 1:return"round";case 2:return"square";default:return null}};var openfl_display_DOMRenderer=function(e){this.pixelRatio=1;openfl_display_DisplayObjectRenderer.call(this);this.element=e;openfl_display_DisplayObject.__supportDOM=true;var t=function(){var e=window.getComputedStyle(document.documentElement,""),t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||e.OLink===""&&["","o"])[1],s="WebKit|Moz|MS|O".match(new RegExp("("+t+")","i"))[1];return{dom:s,lowercase:t,css:"-"+t+"-",js:t[0].toUpperCase()+t.substr(1)}}();this.__vendorPrefix=t.lowercase;this.__transformProperty=t.lowercase=="webkit"?"-webkit-transform":"transform";this.__transformOriginProperty=t.lowercase=="webkit"?"-webkit-transform-origin":"transform-origin";this.__clipRects=[];this.__numClipRects=0;this.__z=0;this.__type="dom";this.__canvasRenderer=new openfl_display_CanvasRenderer(null);this.__canvasRenderer.__isDOM=true};$hxClasses["openfl.display.DOMRenderer"]=openfl_display_DOMRenderer;openfl_display_DOMRenderer.__name__=["openfl","display","DOMRenderer"];openfl_display_DOMRenderer.__super__=openfl_display_DisplayObjectRenderer;openfl_display_DOMRenderer.prototype=$extend(openfl_display_DisplayObjectRenderer.prototype,{element:null,pixelRatio:null,__canvasRenderer:null,__clipRects:null,__currentClipRect:null,__numClipRects:null,__transformOriginProperty:null,__transformProperty:null,__vendorPrefix:null,__z:null,__applyStyle:function(e,t,s,i){var a=e.__style;if(t&&e.__renderTransformChanged){var r=e.__renderTransform;a.setProperty(this.__transformProperty,this.__roundPixels?"matrix3d("+r.a+", "+r.b+", 0, 0, "+r.c+", "+r.d+", 0, 0, 0, 0, 1, 0, "+(r.tx|0)+", "+(r.ty|0)+", 0, 1)":"matrix3d("+r.a+", "+r.b+", 0, 0, "+r.c+", "+r.d+", 0, 0, 0, 0, 1, 0, "+r.tx+", "+r.ty+", 0, 1)",null)}if(e.__worldZ!=++this.__z){e.__worldZ=this.__z;a.setProperty("z-index",e.__worldZ==null?"null":""+e.__worldZ,null)}if(s&&e.__worldAlphaChanged){if(e.__worldAlpha<1){a.setProperty("opacity",e.__worldAlpha==null?"null":""+e.__worldAlpha,null)}else{a.removeProperty("opacity")}}if(i&&e.__worldClipChanged){if(e.__worldClip==null){a.removeProperty("clip")}else{var _=e.__worldClip;a.setProperty("clip","rect("+_.y+"px, "+_.get_right()+"px, "+_.get_bottom()+"px, "+_.x+"px)",null)}}},__initializeElement:function(e,t){var s=e.__style=t.style;s.setProperty("position","absolute",null);s.setProperty("top","0",null);s.setProperty("left","0",null);s.setProperty(this.__transformOriginProperty,"0 0 0",null);this.element.appendChild(t);e.__worldAlphaChanged=true;e.__renderTransformChanged=true;e.__worldVisibleChanged=true;e.__worldClipChanged=true;e.__worldClip=null;e.__worldZ=-1},__popMask:function(){this.__popMaskRect()},__popMaskObject:function(e,t){if(t==null){t=true}if(e.__mask!=null){this.__popMask()}if(t&&e.__scrollRect!=null){this.__popMaskRect()}},__popMaskRect:function(){if(this.__numClipRects>0){this.__numClipRects--;if(this.__numClipRects>0){this.__currentClipRect=this.__clipRects[this.__numClipRects-1]}else{this.__currentClipRect=null}}},__pushMask:function(e){this.__pushMaskRect(e.getBounds(e),e.__renderTransform)},__pushMaskObject:function(e,t){if(t==null){t=true}if(t&&e.__scrollRect!=null){this.__pushMaskRect(e.__scrollRect,e.__renderTransform)}if(e.__mask!=null){this.__pushMask(e.__mask)}},__pushMaskRect:function(e,t){if(this.__numClipRects==this.__clipRects.length){this.__clipRects[this.__numClipRects]=new openfl_geom_Rectangle}var s=this.__clipRects[this.__numClipRects];e.__transform(s,t);if(this.__numClipRects>0){var i=this.__clipRects[this.__numClipRects-1];s.__contract(i.x,i.y,i.width,i.height)}if(s.height<0){s.height=0}if(s.width<0){s.width=0}this.__currentClipRect=s;this.__numClipRects++},__render:function(e){if(!this.__stage.__transparent){this.element.style.background=this.__stage.__colorString}else{this.element.style.background="none"}this.__z=1;e.__renderDOM(this)},__setBlendMode:function(e){if(this.__overrideBlendMode!=null){e=this.__overrideBlendMode}if(this.__blendMode==e){return}this.__blendMode=e},__updateClip:function(e){if(this.__currentClipRect==null){e.__worldClipChanged=e.__worldClip!=null;e.__worldClip=null}else{if(e.__worldClip==null){e.__worldClip=new openfl_geom_Rectangle}var t=openfl_geom_Rectangle.__pool.get();var s=openfl_geom_Matrix.__pool.get();s.copyFrom(e.__renderTransform);s.invert();this.__currentClipRect.__transform(t,s);if(t.equals(e.__worldClip)){e.__worldClipChanged=false}else{e.__worldClip.copyFrom(t);e.__worldClipChanged=true}openfl_geom_Rectangle.__pool.release(t);openfl_geom_Matrix.__pool.release(s)}},__class__:openfl_display_DOMRenderer});var openfl_display_DisplayObjectShader=function(e){if(this.__glFragmentSource==null){this.__glFragmentSource="varying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec2 openfl_TextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\t\t\n\t\tif (color.a == 0.0) {\n\t\t\t\n\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\t\t\t\n\t\t} else if (openfl_HasColorTransform) {\n\t\t\t\n\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\t\t\t\n\t\t\tmat4 colorMultiplier = mat4 (0);\n\t\t\tcolorMultiplier[0][0] = openfl_ColorMultiplierv.x;\n\t\t\tcolorMultiplier[1][1] = openfl_ColorMultiplierv.y;\n\t\t\tcolorMultiplier[2][2] = openfl_ColorMultiplierv.z;\n\t\t\tcolorMultiplier[3][3] = 1.0; // openfl_ColorMultiplierv.w;\n\t\t\t\n\t\t\tcolor = clamp (openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);\n\t\t\t\n\t\t\tif (color.a > 0.0) {\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tgl_FragColor = color * openfl_Alphav;\n\t\t\t\n\t\t}\n\t\t\t\n\t\t}"}if(this.__glVertexSource==null){this.__glVertexSource="attribute float openfl_Alpha;\n\t\tattribute vec4 openfl_ColorMultiplier;\n\t\tattribute vec4 openfl_ColorOffset;\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\t\n\t\tvarying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\topenfl_Alphav = openfl_Alpha;\n\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\t\t\n\t\tif (openfl_HasColorTransform) {\n\t\t\t\n\t\t\topenfl_ColorMultiplierv = openfl_ColorMultiplier;\n\t\t\topenfl_ColorOffsetv = openfl_ColorOffset / 255.0;\n\t\t\t\n\t\t}\n\t\t\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\t\n\t\t}"}openfl_display_Shader.call(this,e);this.__isGenerated=true;this.__initGL()};$hxClasses["openfl.display.DisplayObjectShader"]=openfl_display_DisplayObjectShader;openfl_display_DisplayObjectShader.__name__=["openfl","display","DisplayObjectShader"];openfl_display_DisplayObjectShader.__super__=openfl_display_Shader;openfl_display_DisplayObjectShader.prototype=$extend(openfl_display_Shader.prototype,{openfl_Alpha:null,openfl_ColorMultiplier:null,openfl_ColorOffset:null,openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_HasColorTransform:null,openfl_TextureSize:null,openfl_Texture:null,__class__:openfl_display_DisplayObjectShader});var openfl_display_FrameLabel=function(e,t){openfl_events_EventDispatcher.call(this);this.__name=e;this.__frame=t};$hxClasses["openfl.display.FrameLabel"]=openfl_display_FrameLabel;openfl_display_FrameLabel.__name__=["openfl","display","FrameLabel"];openfl_display_FrameLabel.__super__=openfl_events_EventDispatcher;openfl_display_FrameLabel.prototype=$extend(openfl_events_EventDispatcher.prototype,{__frame:null,__name:null,get_frame:function(){return this.__frame},get_name:function(){return this.__name},__class__:openfl_display_FrameLabel,__properties__:{get_name:"get_name",get_frame:"get_frame"}});var openfl_display_Graphics=function(e){this.__dirty=true;this.__owner=e;this.__commands=new openfl__$internal_renderer_DrawCommandBuffer;this.__strokePadding=0;this.__positionX=0;this.__positionY=0;this.__renderTransform=new openfl_geom_Matrix;this.__usedShaderBuffers=new List;this.__worldTransform=new openfl_geom_Matrix;this.__width=0;this.__height=0;this.__shaderBufferPool=new lime_utils_ObjectPool(function(){return new openfl__$internal_renderer_ShaderBuffer});this.moveTo(0,0)};$hxClasses["openfl.display.Graphics"]=openfl_display_Graphics;openfl_display_Graphics.__name__=["openfl","display","Graphics"];openfl_display_Graphics.prototype={__bounds:null,__commands:null,__dirty:null,__hardwareDirty:null,__height:null,__positionX:null,__positionY:null,__quadBuffer:null,__renderTransform:null,__shaderBufferPool:null,__softwareDirty:null,__strokePadding:null,__transformDirty:null,__triangleIndexBuffer:null,__triangleIndexBufferCount:null,__triangleIndexBufferData:null,__usedShaderBuffers:null,__vertexBuffer:null,__vertexBufferCount:null,__vertexBufferCountUVT:null,__vertexBufferData:null,__vertexBufferDataUVT:null,__vertexBufferUVT:null,__visible:null,__owner:null,__width:null,__worldTransform:null,__canvas:null,__context:null,__bitmap:null,beginBitmapFill:function(e,t,s,i){if(i==null){i=false}if(s==null){s=true}this.__commands.beginBitmapFill(e,t!=null?t.clone():null,s,i);this.__visible=true},beginFill:function(e,t){if(t==null){t=1}if(e==null){e=0}this.__commands.beginFill(e&16777215,t);if(t>0){this.__visible=true}},beginGradientFill:function(e,t,s,i,a,r,_,n){if(n==null){n=0}if(_==null){_=1}if(r==null){r=0}if(t==null||t.length==0){return}if(s==null){s=[];var o=0;var l=t.length;while(o0){this.__visible=true;break}}},clear:function(){var e=this.__usedShaderBuffers.h;while(e!=null){var t=e.item;e=e.next;var s=t;this.__shaderBufferPool.release(s)}this.__usedShaderBuffers.clear();this.__commands.clear();this.__strokePadding=0;if(this.__bounds!=null){this.set___dirty(true);this.__transformDirty=true;this.__bounds=null}this.__visible=false;this.__positionX=0;this.__positionY=0;this.moveTo(0,0)},copyFrom:function(e){this.__bounds=e.__bounds!=null?e.__bounds.clone():null;this.__commands=e.__commands.copy();this.set___dirty(true);this.__strokePadding=e.__strokePadding;this.__positionX=e.__positionX;this.__positionY=e.__positionY;this.__transformDirty=true;this.__visible=e.__visible},curveTo:function(e,t,s,i){this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);var a;var r;if(ethis.__positionX||e>s&&ethis.__positionY||t>i&&tthis.__strokePadding){this.__strokePadding=e}}else if(e/2>this.__strokePadding){this.__strokePadding=e/2}}this.__commands.lineStyle(e,t,s,i,a,r,_,n);if(e!=null){this.__visible=true}},lineTo:function(e,t){if(!isFinite(e)||!isFinite(t)){return}this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);this.__positionX=e;this.__positionY=t;this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding*2,this.__positionY+this.__strokePadding);this.__commands.lineTo(e,t);this.set___dirty(true)},moveTo:function(e,t){this.__positionX=e;this.__positionY=t;this.__commands.moveTo(e,t)},__calculateBezierQuadPoint:function(e,t,s,i){var a=1-e;return a*a*t+2*a*e*s+e*e*i},__cleanup:function(){if(this.__bounds!=null&&this.__canvas!=null){this.set___dirty(true);this.__transformDirty=true}this.__bitmap=null;this.__canvas=null;this.__context=null},__getBounds:function(e,t){if(this.__bounds==null){return}var s=openfl_geom_Rectangle.__pool.get();this.__bounds.__transform(s,t);e.__expand(s.x,s.y,s.width,s.height);openfl_geom_Rectangle.__pool.release(s)},__hitTest:function(e,t,s,i){if(this.__bounds==null){return false}var a=i.a*i.d-i.b*i.c;var r=a==0?-i.tx:1/a*(i.c*(i.ty-t)+i.d*(e-i.tx));var _=i.a*i.d-i.b*i.c;var n=_==0?-i.ty:1/_*(i.a*(t-i.ty)+i.b*(i.tx-e));if(r>this.__bounds.x&&n>this.__bounds.y&&this.__bounds.contains(r,n)){if(s){return openfl__$internal_renderer_canvas_CanvasGraphics.hitTest(this,r,n)}return true}return false},__inflateBounds:function(e,t){if(this.__bounds==null){this.__bounds=new openfl_geom_Rectangle(e,t,0,0);this.__transformDirty=true;return}if(ethis.__bounds.x+this.__bounds.width){this.__bounds.width=e-this.__bounds.x}if(t>this.__bounds.y+this.__bounds.height){this.__bounds.height=t-this.__bounds.y}},__update:function(e){if(this.__bounds==null||this.__bounds.width<=0||this.__bounds.height<=0){return}var t=this.__owner.__renderTransform;var s=1;var i=1;if(t!=null){if(t.b==0){s=Math.abs(t.a)}else{s=Math.sqrt(t.a*t.a+t.b*t.b)}if(t.c==0){i=Math.abs(t.d)}else{i=Math.sqrt(t.c*t.c+t.d*t.d)}}else{return}if(e!=null){if(e.b==0){s*=e.a}else{s*=Math.sqrt(e.a*e.a+e.b*e.b)}if(e.c==0){i*=e.d}else{i*=Math.sqrt(e.c*e.c+e.d*e.d)}}var a=this.__bounds.width*s;var r=this.__bounds.height*i;if(a<1||r<1){if(this.__width>=1||this.__height>=1){this.set___dirty(true)}this.__width=0;this.__height=0;return}if(openfl_display_Graphics.maxTextureWidth!=null&&a>openfl_display_Graphics.maxTextureWidth){a=openfl_display_Graphics.maxTextureWidth;s=openfl_display_Graphics.maxTextureWidth/this.__bounds.width}if(openfl_display_Graphics.maxTextureWidth!=null&&r>openfl_display_Graphics.maxTextureHeight){r=openfl_display_Graphics.maxTextureHeight;i=openfl_display_Graphics.maxTextureHeight/this.__bounds.height}this.__renderTransform.a=a/this.__bounds.width;this.__renderTransform.d=r/this.__bounds.height;var _=1/this.__renderTransform.a;var n=1/this.__renderTransform.d;this.__worldTransform.a=_*t.a;this.__worldTransform.b=_*t.b;this.__worldTransform.c=n*t.c;this.__worldTransform.d=n*t.d;var o=this.__bounds.x;var l=this.__bounds.y;var h=o*t.a+l*t.c+t.tx;var c=o*t.b+l*t.d+t.ty;this.__worldTransform.tx=Math.floor(h);this.__worldTransform.ty=Math.floor(c);var u=this.__worldTransform;var f=u.a*u.d-u.b*u.c;this.__renderTransform.tx=f==0?-u.tx:1/f*(u.c*(u.ty-c)+u.d*(h-u.tx));var p=this.__worldTransform;var d=p.a*p.d-p.b*p.c;this.__renderTransform.ty=d==0?-p.ty:1/d*(p.a*(c-p.ty)+p.b*(p.tx-h));var g=Math.ceil(a+this.__renderTransform.tx);var m=Math.ceil(r+this.__renderTransform.ty);if(g!=this.__width||m!=this.__height){this.set___dirty(true)}this.__width=g;this.__height=m},set___dirty:function(e){if(e&&this.__owner!=null){var t=this.__owner;if(!t.__renderDirty){t.__renderDirty=true;t.__setParentRenderDirty()}}if(e){this.__softwareDirty=true;this.__hardwareDirty=true}return this.__dirty=e},__class__:openfl_display_Graphics,__properties__:{set___dirty:"set___dirty"}};var openfl_display_GraphicsShader=function(e){if(this.__glFragmentSource==null){this.__glFragmentSource="varying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform sampler2D bitmap;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvec4 color = texture2D (bitmap, openfl_TextureCoordv);\n\t\t\n\t\tif (color.a == 0.0) {\n\t\t\t\n\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\t\t\t\n\t\t} else if (openfl_HasColorTransform) {\n\t\t\t\n\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\t\t\t\n\t\t\tmat4 colorMultiplier = mat4 (0);\n\t\t\tcolorMultiplier[0][0] = openfl_ColorMultiplierv.x;\n\t\t\tcolorMultiplier[1][1] = openfl_ColorMultiplierv.y;\n\t\t\tcolorMultiplier[2][2] = openfl_ColorMultiplierv.z;\n\t\t\tcolorMultiplier[3][3] = 1.0; // openfl_ColorMultiplierv.w;\n\t\t\t\n\t\t\tcolor = clamp (openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);\n\t\t\t\n\t\t\tif (color.a > 0.0) {\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tgl_FragColor = color * openfl_Alphav;\n\t\t\t\n\t\t}\n\t\t\t\n\t\t}"}if(this.__glVertexSource==null){this.__glVertexSource="attribute float openfl_Alpha;\n\t\tattribute vec4 openfl_ColorMultiplier;\n\t\tattribute vec4 openfl_ColorOffset;\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\t\n\t\tvarying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\topenfl_Alphav = openfl_Alpha;\n\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\t\t\n\t\tif (openfl_HasColorTransform) {\n\t\t\t\n\t\t\topenfl_ColorMultiplierv = openfl_ColorMultiplier;\n\t\t\topenfl_ColorOffsetv = openfl_ColorOffset / 255.0;\n\t\t\t\n\t\t}\n\t\t\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\t\n\t\t}"}openfl_display_Shader.call(this,e);this.__isGenerated=true;this.__initGL()};$hxClasses["openfl.display.GraphicsShader"]=openfl_display_GraphicsShader;openfl_display_GraphicsShader.__name__=["openfl","display","GraphicsShader"];openfl_display_GraphicsShader.__super__=openfl_display_Shader;openfl_display_GraphicsShader.prototype=$extend(openfl_display_Shader.prototype,{openfl_Alpha:null,openfl_ColorMultiplier:null,openfl_ColorOffset:null,openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_HasColorTransform:null,openfl_TextureSize:null,bitmap:null,__class__:openfl_display_GraphicsShader});var openfl_display__$JointStyle_JointStyle_$Impl_$={};$hxClasses["openfl.display._JointStyle.JointStyle_Impl_"]=openfl_display__$JointStyle_JointStyle_$Impl_$;openfl_display__$JointStyle_JointStyle_$Impl_$.__name__=["openfl","display","_JointStyle","JointStyle_Impl_"];openfl_display__$JointStyle_JointStyle_$Impl_$.toString=function(e){switch(e){case 0:return"bevel";case 1:return"miter";case 2:return"round";default:return null}};var openfl_display_Loader=function(){openfl_display_DisplayObjectContainer.call(this);this.contentLoaderInfo=openfl_display_LoaderInfo.create(this);this.uncaughtErrorEvents=this.contentLoaderInfo.uncaughtErrorEvents};$hxClasses["openfl.display.Loader"]=openfl_display_Loader;openfl_display_Loader.__name__=["openfl","display","Loader"];openfl_display_Loader.__super__=openfl_display_DisplayObjectContainer;openfl_display_Loader.prototype=$extend(openfl_display_DisplayObjectContainer.prototype,{content:null,contentLoaderInfo:null,uncaughtErrorEvents:null,__library:null,__path:null,__unloaded:null,load:function(e,t){this.contentLoaderInfo.loaderURL=openfl_Lib.get_current().get_loaderInfo().url;this.contentLoaderInfo.url=e.url;this.__unloaded=false;if(e.contentType==null||e.contentType==""){var s="";this.__path=e.url;var i=this.__path.indexOf("?");if(i>-1){this.__path=this.__path.substring(0,i)}while(StringTools.endsWith(this.__path,"/"))this.__path=this.__path.substring(0,this.__path.length-1);if(StringTools.endsWith(this.__path,".bundle")){this.__path+="/library.json";if(i>-1){e.url=this.__path+e.url.substring(i)}else{e.url=this.__path}}var a=this.__path.lastIndexOf(".");if(a>-1){s=this.__path.substring(a+1)}var r;switch(s){case"gif":r="image/gif";break;case"jpeg":case"jpg":r="image/jpeg";break;case"js":r="application/javascript";break;case"json":r="application/json";break;case"png":r="image/png";break;case"swf":r="application/x-shockwave-flash";break;default:r="application/x-www-form-urlencoded"}this.contentLoaderInfo.contentType=r}else{this.contentLoaderInfo.contentType=e.contentType}if(this.contentLoaderInfo.contentType.indexOf("image/")>-1&&e.method=="GET"&&(e.requestHeaders==null||e.requestHeaders.length==0)&&e.userAgent==null){openfl_display_BitmapData.loadFromFile(e.url).onComplete($bind(this,this.BitmapData_onLoad)).onError($bind(this,this.BitmapData_onError)).onProgress($bind(this,this.BitmapData_onProgress));return}var _=new openfl_net_URLLoader;_.dataFormat=0;if(this.contentLoaderInfo.contentType.indexOf("/json")>-1||this.contentLoaderInfo.contentType.indexOf("/javascript")>-1||this.contentLoaderInfo.contentType.indexOf("/ecmascript")>-1){_.dataFormat=1}_.addEventListener("complete",$bind(this,this.loader_onComplete));_.addEventListener("ioError",$bind(this,this.loader_onError));_.addEventListener("progress",$bind(this,this.loader_onProgress));_.load(e)},unload:function(){if(!this.__unloaded){while(this.get_numChildren()>0)this.removeChildAt(0);if(this.__library!=null){openfl_utils_Assets.unloadLibrary(this.contentLoaderInfo.url);this.__library=null}this.content=null;this.contentLoaderInfo.url=null;this.contentLoaderInfo.contentType=null;this.contentLoaderInfo.content=null;this.contentLoaderInfo.bytesLoaded=0;this.contentLoaderInfo.bytesTotal=0;this.contentLoaderInfo.width=0;this.contentLoaderInfo.height=0;this.__unloaded=true;this.contentLoaderInfo.dispatchEvent(new openfl_events_Event("unload"))}},__dispatchError:function(e){var t=new openfl_events_IOErrorEvent("ioError");t.text=e;this.contentLoaderInfo.dispatchEvent(t)},BitmapData_onError:function(e){this.__dispatchError(Std.string(e))},BitmapData_onLoad:function(e){if(e==null){this.__dispatchError("Unknown error");return}this.content=new openfl_display_Bitmap(e);this.contentLoaderInfo.content=this.content;var t=this.content.get_width()|0;this.contentLoaderInfo.width=t;var s=this.content.get_height()|0;this.contentLoaderInfo.height=s;this.addChild(this.content);this.contentLoaderInfo.dispatchEvent(new openfl_events_Event("complete"))},BitmapData_onProgress:function(e,t){var s=new openfl_events_ProgressEvent("progress");s.bytesLoaded=e;s.bytesTotal=t;this.contentLoaderInfo.dispatchEvent(s)},loader_onComplete:function(event){var _gthis=this;var loader=event.target;if(this.contentLoaderInfo.contentType!=null&&this.contentLoaderInfo.contentType.indexOf("/json")>-1){var manifest=lime_utils_AssetManifest.parse(loader.data,haxe_io_Path.directory(this.__path));if(manifest==null){this.__dispatchError("Cannot parse asset manifest");return}var library=lime_utils_AssetLibrary.fromManifest(manifest);if(library==null){this.__dispatchError("Cannot open library");return}if(js_Boot.__instanceof(library,openfl_utils_AssetLibrary)){library.load().onComplete(function(e){_gthis.__library=library;openfl_utils_Assets.registerLibrary(_gthis.contentLoaderInfo.url,_gthis.__library);if(manifest.name!=null&&!openfl_utils_Assets.hasLibrary(manifest.name)){openfl_utils_Assets.registerLibrary(manifest.name,_gthis.__library)}_gthis.content=_gthis.__library.getMovieClip("");_gthis.contentLoaderInfo.content=_gthis.content;_gthis.addChild(_gthis.content);_gthis.contentLoaderInfo.dispatchEvent(new openfl_events_Event("complete"))}).onError(function(e){_gthis.__dispatchError(e)})}}else if(this.contentLoaderInfo.contentType!=null&&(this.contentLoaderInfo.contentType.indexOf("/javascript")>-1||this.contentLoaderInfo.contentType.indexOf("/ecmascript")>-1)){this.content=new openfl_display_Sprite;this.contentLoaderInfo.content=this.content;this.addChild(this.content);eval("(function () {"+Std.string(loader.data)+"})()");this.contentLoaderInfo.dispatchEvent(new openfl_events_Event("complete"))}else{this.contentLoaderInfo.bytes=loader.data;openfl_display_BitmapData.loadFromBytes(loader.data).onComplete($bind(this,this.BitmapData_onLoad)).onError($bind(this,this.BitmapData_onError))}},loader_onError:function(e){e.target=this.contentLoaderInfo;this.contentLoaderInfo.dispatchEvent(e)},loader_onProgress:function(e){e.target=this.contentLoaderInfo;this.contentLoaderInfo.dispatchEvent(e)},__class__:openfl_display_Loader});var openfl_display_LoaderInfo=function(){openfl_events_EventDispatcher.call(this);this.applicationDomain=openfl_system_ApplicationDomain.currentDomain;this.bytesLoaded=0;this.bytesTotal=0;this.childAllowsParent=true;this.parameters={}};$hxClasses["openfl.display.LoaderInfo"]=openfl_display_LoaderInfo;openfl_display_LoaderInfo.__name__=["openfl","display","LoaderInfo"];openfl_display_LoaderInfo.create=function(e){var t=new openfl_display_LoaderInfo;t.uncaughtErrorEvents=new openfl_events_UncaughtErrorEvents;if(e!=null){t.loader=e}else{t.url=openfl_display_LoaderInfo.__rootURL}return t};openfl_display_LoaderInfo.__super__=openfl_events_EventDispatcher;openfl_display_LoaderInfo.prototype=$extend(openfl_events_EventDispatcher.prototype,{applicationDomain:null,bytes:null,bytesLoaded:null,bytesTotal:null,childAllowsParent:null,content:null,contentType:null,height:null,loader:null,loaderURL:null,parameters:null,uncaughtErrorEvents:null,url:null,width:null,__completed:null,__complete:function(){if(!this.__completed){if(this.bytesLoaded.999)&&(s.d<1.001&&s.d>.999)){s.tx=Math.round(s.tx);s.ty=Math.round(s.ty)}lime_math__$Matrix4_Matrix4_$Impl_$.identity(this.__matrix);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,0,s.a);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,1,s.b);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,4,s.c);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,5,s.d);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,12,s.tx);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,13,s.ty);lime_math__$Matrix4_Matrix4_$Impl_$.append(this.__matrix,this.__flipped?this.__projectionFlipped:this.__projection);var i=0;while(i<16){var a=i++;this.__values[a]=lime_math__$Matrix4_Matrix4_$Impl_$.get(this.__matrix,a)}openfl_geom_Matrix.__pool.release(s);return this.__values},__initShader:function(e){if(e!=null){if(e.__context==null){e.__context=this.__context3D;e.__init()}return e}return this.__defaultShader},__initDisplayShader:function(e){if(e!=null){if(e.__context==null){e.__context=this.__context3D;e.__init()}return e}return this.__defaultDisplayShader},__initGraphicsShader:function(e){if(e!=null){if(e.__context==null){e.__context=this.__context3D;e.__init()}return e}return this.__defaultGraphicsShader},__initShaderBuffer:function(e){if(e!=null){return this.__initGraphicsShader(e.shader)}return this.__defaultGraphicsShader},__popMask:function(){if(this.__stencilReference==0){return}var e=this.__maskObjects.pop();if(this.__stencilReference>1){this.__context3D.setStencilActions(2,1,0,0,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,255);this.__context3D.setColorMask(false,false,false,false);e.__renderGLMask(this);this.__stencilReference--;this.__context3D.setStencilActions(2,1,5,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,0);this.__context3D.setColorMask(true,true,true,true)}else{this.__stencilReference=0;this.__context3D.setStencilActions();this.__context3D.setStencilReferenceValue(0,0,0)}},__popMaskObject:function(e,t){if(t==null){t=true}if(e.__mask!=null){this.__popMask()}if(t&&e.__scrollRect!=null){if(e.__renderTransform.b!=0||e.__renderTransform.c!=0){this.__scrollRectMasks.release(this.__maskObjects[this.__maskObjects.length-1]);this.__popMask()}else{this.__popMaskRect()}}},__popMaskRect:function(){if(this.__numClipRects>0){this.__numClipRects--;if(this.__numClipRects>0){this.__scissorRect(this.__clipRects[this.__numClipRects-1])}else{this.__scissorRect()}}},__pushMask:function(e){if(this.__stencilReference==0){this.__context3D.clear(0,0,0,0,0,0,4);this.__updatedStencil=true}this.__context3D.setStencilActions(2,1,2,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,255);this.__context3D.setColorMask(false,false,false,false);e.__renderGLMask(this);this.__maskObjects.push(e);this.__stencilReference++;this.__context3D.setStencilActions(2,1,5,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,0);this.__context3D.setColorMask(true,true,true,true)},__pushMaskObject:function(e,t){if(t==null){t=true}if(t&&e.__scrollRect!=null){if(e.__renderTransform.b!=0||e.__renderTransform.c!=0){var s=this.__scrollRectMasks.get();s.get_graphics().clear();s.get_graphics().beginFill(65280);s.get_graphics().drawRect(e.__scrollRect.x,e.__scrollRect.y,e.__scrollRect.width,e.__scrollRect.height);s.__renderTransform.copyFrom(e.__renderTransform);this.__pushMask(s)}else{this.__pushMaskRect(e.__scrollRect,e.__renderTransform)}}if(e.__mask!=null){this.__pushMask(e.__mask)}},__pushMaskRect:function(e,t){if(this.__numClipRects==this.__clipRects.length){this.__clipRects[this.__numClipRects]=new openfl_geom_Rectangle}var s=openfl_geom_Matrix.__pool.get();s.copyFrom(t);s.concat(this.__worldTransform);var i=this.__clipRects[this.__numClipRects];e.__transform(i,s);if(this.__numClipRects>0){var a=this.__clipRects[this.__numClipRects-1];i.__contract(a.x,a.y,a.width,a.height)}if(i.height<0){i.height=0}if(i.width<0){i.width=0}openfl_geom_Matrix.__pool.release(s);this.__scissorRect(i);this.__numClipRects++},__render:function(e){this.__context3D.setColorMask(true,true,true,true);this.__context3D.setCulling(3);this.__context3D.setDepthTest(false,0);this.__context3D.setStencilActions();this.__context3D.setStencilReferenceValue(0,0,0);this.__context3D.setScissorRectangle(null);this.__blendMode=null;this.__setBlendMode(10);if(this.__defaultRenderTarget==null){openfl_display_OpenGLRenderer.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle);this.__upscaled=this.__worldTransform.a!=1||this.__worldTransform.d!=1;e.__renderGL(this);if(this.__offsetX>0||this.__offsetY>0){if(this.__offsetX>0){openfl_display_OpenGLRenderer.__scissorRectangle.setTo(0,0,this.__offsetX,this.__height);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle);this.__context3D.__flushGL();this.__gl.clearColor(0,0,0,1);this.__gl.clear(this.__gl.COLOR_BUFFER_BIT);openfl_display_OpenGLRenderer.__scissorRectangle.setTo(this.__offsetX+this.__displayWidth,0,this.__width,this.__height);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle);this.__context3D.__flushGL();this.__gl.clearColor(0,0,0,1);this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)}if(this.__offsetY>0){openfl_display_OpenGLRenderer.__scissorRectangle.setTo(0,0,this.__width,this.__offsetY);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle);this.__context3D.__flushGL();this.__gl.clearColor(0,0,0,1);this.__gl.clear(this.__gl.COLOR_BUFFER_BIT);openfl_display_OpenGLRenderer.__scissorRectangle.setTo(0,this.__offsetY+this.__displayHeight,this.__width,this.__height);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle);this.__context3D.__flushGL();this.__gl.clearColor(0,0,0,1);this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)}this.__context3D.setScissorRectangle(null)}}else{openfl_display_OpenGLRenderer.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle);var t=e.__mask;var s=e.__scrollRect;e.__mask=null;e.__scrollRect=null;e.__renderGL(this);e.__mask=t;e.__scrollRect=s}this.__context3D.present()},__renderFilterPass:function(e,t,s,i){if(i==null){i=true}if(e==null||t==null){return}if(this.__defaultRenderTarget==null){return}var a=this.__context3D.__state.renderToTexture;var r=this.__context3D.__state.renderToTextureDepthStencil;var _=this.__context3D.__state.renderToTextureAntiAlias;var n=this.__context3D.__state.renderToTextureSurfaceSelector;this.__context3D.setRenderToTexture(this.__defaultRenderTarget.getTexture(this.__context3D),false);if(i){this.__context3D.clear(0,0,0,0,0,0,1)}var o=this.__initShader(t);this.setShader(o);this.applyAlpha(1);this.applyBitmapData(e,s);this.applyColorTransform(null);this.applyMatrix(this.__getMatrix(e.__renderTransform,1));this.updateShader();var l=e.getVertexBuffer(this.__context3D);if(o.__position!=null){this.__context3D.setVertexBufferAt(o.__position.index,l,0,3)}if(o.__textureCoord!=null){this.__context3D.setVertexBufferAt(o.__textureCoord.index,l,3,2)}var h=e.getIndexBuffer(this.__context3D);this.__context3D.drawTriangles(h);if(a!=null){this.__context3D.setRenderToTexture(a,r,_,n)}else{this.__context3D.setRenderToBackBuffer()}this.__clearShader()},__resize:function(e,t){this.__width=e;this.__height=t;var s=this.__defaultRenderTarget==null?this.__stage.stageWidth:this.__defaultRenderTarget.width;var i=this.__defaultRenderTarget==null?this.__stage.stageHeight:this.__defaultRenderTarget.height;var a;if(this.__defaultRenderTarget==null){var r=this.__worldTransform;a=Math.round(0*r.a+0*r.c+r.tx)}else{a=0}this.__offsetX=a;var _;if(this.__defaultRenderTarget==null){var n=this.__worldTransform;_=Math.round(0*n.b+0*n.d+n.ty)}else{_=0}this.__offsetY=_;var o;if(this.__defaultRenderTarget==null){var l=this.__worldTransform;o=Math.round(s*l.a+0*l.c+l.tx-this.__offsetX)}else{o=s}this.__displayWidth=o;var h;if(this.__defaultRenderTarget==null){var c=this.__worldTransform;h=Math.round(0*c.b+i*c.d+c.ty-this.__offsetY)}else{h=i}this.__displayHeight=h;lime_math__$Matrix4_Matrix4_$Impl_$.createOrtho(this.__projection,0,this.__displayWidth+this.__offsetX*2,0,this.__displayHeight+this.__offsetY*2,-1e3,1e3);lime_math__$Matrix4_Matrix4_$Impl_$.createOrtho(this.__projectionFlipped,0,this.__displayWidth+this.__offsetX*2,this.__displayHeight+this.__offsetY*2,0,-1e3,1e3)},__resumeClipAndMask:function(e){if(this.__stencilReference>0){this.__context3D.setStencilActions(2,1,5,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,0)}else{this.__context3D.setStencilActions();this.__context3D.setStencilReferenceValue(0,0,0)}if(this.__numClipRects>0){this.__scissorRect(this.__clipRects[this.__numClipRects-1])}else{this.__scissorRect()}},__scissorRect:function(e){if(e!=null){var t=Math.floor(e.x);var s=Math.floor(e.y);var i=e.width>0?Math.ceil(e.get_right())-t:0;var a=e.height>0?Math.ceil(e.get_bottom())-s:0;if(i<0){i=0}if(a<0){a=0}openfl_display_OpenGLRenderer.__scissorRectangle.setTo(t,s,i,a);this.__context3D.setScissorRectangle(openfl_display_OpenGLRenderer.__scissorRectangle)}else{this.__context3D.setScissorRectangle(null)}},__setBlendMode:function(e){if(this.__overrideBlendMode!=null){e=this.__overrideBlendMode}if(this.__blendMode==e){return}this.__blendMode=e;switch(e){case 0:this.__context3D.setBlendFactors(2,2);break;case 9:this.__context3D.setBlendFactors(1,5);break;case 12:this.__context3D.setBlendFactors(2,6);break;case 14:this.__context3D.setBlendFactors(2,2);this.__context3D.__setGLBlendEquation(this.__gl.FUNC_REVERSE_SUBTRACT);break;default:this.__context3D.setBlendFactors(2,5)}},__setRenderTarget:function(e){this.__defaultRenderTarget=e;this.__flipped=e==null;if(e!=null){this.__resize(e.width,e.height)}},__setShaderBuffer:function(e){this.setShader(e.shader);this.__currentShaderBuffer=e},__suspendClipAndMask:function(){if(this.__stencilReference>0){this.__context3D.setStencilActions();this.__context3D.setStencilReferenceValue(0,0,0)}if(this.__numClipRects>0){this.__scissorRect()}},__updateShaderBuffer:function(e){if(this.__currentShader!=null&&this.__currentShaderBuffer!=null){this.__currentShader.__updateFromBuffer(this.__currentShaderBuffer,e)}},__class__:openfl_display_OpenGLRenderer});var openfl_display_Preloader=function(e){this.onComplete=new lime_app__$Event_$Void_$Void;this.display=e;if(e!=null){e.addEventListener("unload",$bind(this,this.display_onUnload));openfl_Lib.get_current().addChild(e)}};$hxClasses["openfl.display.Preloader"]=openfl_display_Preloader;openfl_display_Preloader.__name__=["openfl","display","Preloader"];openfl_display_Preloader.prototype={onComplete:null,complete:null,display:null,ready:null,start:function(){this.ready=true;openfl_Lib.get_current().get_loaderInfo().__complete();if(this.display!=null){var e=new openfl_events_Event("complete",true,true);this.display.dispatchEvent(e);if(!e.isDefaultPrevented()){this.display.dispatchEvent(new openfl_events_Event("unload"))}}else if(!this.complete){this.complete=true;this.onComplete.dispatch()}},update:function(e,t){openfl_Lib.get_current().get_loaderInfo().__update(e,t);if(this.display!=null){this.display.dispatchEvent(new openfl_events_ProgressEvent("progress",true,true,e,t))}},display_onUnload:function(e){if(this.display!=null){this.display.removeEventListener("unload",$bind(this,this.display_onUnload));if(this.display.parent==openfl_Lib.get_current()){openfl_Lib.get_current().removeChild(this.display)}openfl_Lib.get_current().stage.set_focus(null);this.display=null}if(this.ready){if(!this.complete){this.complete=true;this.onComplete.dispatch()}}},__class__:openfl_display_Preloader};var openfl_display_DefaultPreloader=function(){openfl_display_Sprite.call(this);var e=this.getBackgroundColor();var t=e>>16&255;var s=e>>8&255;var i=e&255;var a=.299*t+.587*s+.114*i;var r=0;if(a<70){r=16777215}var _=30;var n=7;var o=this.getHeight()/2-n/2;var l=this.getWidth()-_*2;var h=2;this.outline=new openfl_display_Sprite;this.outline.get_graphics().beginFill(r,.07);this.outline.get_graphics().drawRect(0,0,l,n);this.outline.set_x(_);this.outline.set_y(o);this.outline.set_alpha(0);this.addChild(this.outline);this.progress=new openfl_display_Sprite;this.progress.get_graphics().beginFill(r,.35);this.progress.get_graphics().drawRect(0,0,l-h*2,n-h*2);this.progress.set_x(_+h);this.progress.set_y(o+h);this.progress.set_scaleX(0);this.progress.set_alpha(0);this.addChild(this.progress);this.startAnimation=openfl_Lib.getTimer()+100;this.endAnimation=this.startAnimation+1e3;this.addEventListener("addedToStage",$bind(this,this.this_onAddedToStage))};$hxClasses["openfl.display.DefaultPreloader"]=openfl_display_DefaultPreloader;openfl_display_DefaultPreloader.__name__=["openfl","display","DefaultPreloader"];openfl_display_DefaultPreloader.__super__=openfl_display_Sprite;openfl_display_DefaultPreloader.prototype=$extend(openfl_display_Sprite.prototype,{endAnimation:null,outline:null,progress:null,startAnimation:null,getBackgroundColor:function(){var e=openfl_Lib.get_current().stage.window.context.attributes;if(Object.prototype.hasOwnProperty.call(e,"background")&&e.background!=null){return e.background}else{return 0}},getHeight:function(){var e=openfl_Lib.get_current().stage.window.__height;if(e>0){return e}else{return openfl_Lib.get_current().stage.stageHeight}},getWidth:function(){var e=openfl_Lib.get_current().stage.window.__width;if(e>0){return e}else{return openfl_Lib.get_current().stage.stageWidth}},onInit:function(){this.addEventListener("enterFrame",$bind(this,this.this_onEnterFrame))},onLoaded:function(){this.removeEventListener("enterFrame",$bind(this,this.this_onEnterFrame));this.dispatchEvent(new openfl_events_Event("unload"))},onUpdate:function(e,t){var s=0;if(t>0){s=e/t;if(s>1){s=1}}this.progress.set_scaleX(s)},this_onAddedToStage:function(e){this.removeEventListener("addedToStage",$bind(this,this.this_onAddedToStage));this.onInit();this.onUpdate(this.get_loaderInfo().bytesLoaded,this.get_loaderInfo().bytesTotal);this.addEventListener("progress",$bind(this,this.this_onProgress));this.addEventListener("complete",$bind(this,this.this_onComplete))},this_onComplete:function(e){e.preventDefault();this.removeEventListener("progress",$bind(this,this.this_onProgress));this.removeEventListener("complete",$bind(this,this.this_onComplete));this.onLoaded()},this_onEnterFrame:function(e){var t=openfl_Lib.getTimer()-this.startAnimation;var s=this.endAnimation-this.startAnimation;var i=t/s;if(i<0){i=0}if(i>1){i=1}this.outline.set_alpha(i);this.progress.set_alpha(i)},this_onProgress:function(e){this.onUpdate(e.bytesLoaded|0,e.bytesTotal|0)},__class__:openfl_display_DefaultPreloader});var openfl_display__$ShaderData_ShaderData_$Impl_$={};$hxClasses["openfl.display._ShaderData.ShaderData_Impl_"]=openfl_display__$ShaderData_ShaderData_$Impl_$;openfl_display__$ShaderData_ShaderData_$Impl_$.__name__=["openfl","display","_ShaderData","ShaderData_Impl_"];openfl_display__$ShaderData_ShaderData_$Impl_$._new=function(e){var t={};return t};var openfl_display_ShaderInput=function(){this.channels=0;this.filter=5;this.height=0;this.index=0;this.mipFilter=2;this.width=0;this.wrap=0};$hxClasses["openfl.display.ShaderInput"]=openfl_display_ShaderInput;openfl_display_ShaderInput.__name__=["openfl","display","ShaderInput"];openfl_display_ShaderInput.prototype={channels:null,filter:null,height:null,index:null,input:null,mipFilter:null,name:null,width:null,wrap:null,__isUniform:null,__disableGL:function(e,t){var s=e.gl;e.setTextureAt(t,null)},__updateGL:function(e,t,s,i,a,r){var _=e.gl;var n=s!=null?s:this.input;var o=i!=null?i:this.filter;var l=a!=null?a:this.mipFilter;var h=r!=null?r:this.wrap;if(n!=null){var c=n;e.setTextureAt(t,c.getTexture(e));e.setSamplerStateAt(t,h,o,l)}else{e.setTextureAt(t,null)}},__class__:openfl_display_ShaderInput};var openfl_display_ShaderParameter=function(){this.index=0};$hxClasses["openfl.display.ShaderParameter"]=openfl_display_ShaderParameter;openfl_display_ShaderParameter.__name__=["openfl","display","ShaderParameter"];openfl_display_ShaderParameter.prototype={index:null,name:null,type:null,value:null,__arrayLength:null,__internal:null,__isBool:null,__isFloat:null,__isInt:null,__isUniform:null,__length:null,__uniformMatrix:null,__useArray:null,__disableGL:function(e){var t=e.gl;if(!this.__isUniform){var s=0;var i=this.__arrayLength;while(s=this.__length){var n=this.type;switch(n){case 0:s.uniform1i(this.index,a[0]?1:0);break;case 1:s.uniform2i(this.index,a[0]?1:0,a[1]?1:0);break;case 2:s.uniform3i(this.index,a[0]?1:0,a[1]?1:0,a[2]?1:0);break;case 3:s.uniform4i(this.index,a[0]?1:0,a[1]?1:0,a[2]?1:0,a[3]?1:0);break;case 4:s.uniform1f(this.index,r[0]);break;case 5:s.uniform2f(this.index,r[0],r[1]);break;case 6:s.uniform3f(this.index,r[0],r[1],r[2]);break;case 7:s.uniform4f(this.index,r[0],r[1],r[2],r[3]);break;case 8:s.uniform1i(this.index,_[0]);break;case 9:s.uniform2i(this.index,_[0],_[1]);break;case 10:s.uniform3i(this.index,_[0],_[1],_[2]);break;case 11:s.uniform4i(this.index,_[0],_[1],_[2],_[3]);break;case 12:var o=0;while(o<4){var l=o++;this.__uniformMatrix[l]=r[l]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix2fv(s,this.index,false,this.__uniformMatrix);break;case 16:var h=0;while(h<9){var c=h++;this.__uniformMatrix[c]=r[c]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix3fv(s,this.index,false,this.__uniformMatrix);break;case 20:var u=0;while(u<16){var f=u++;this.__uniformMatrix[f]=r[f]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix4fv(s,this.index,false,this.__uniformMatrix);break;default:}}else{var p=this.type;switch(p){case 1:case 9:s.uniform2i(this.index,0,0);break;case 3:case 11:s.uniform4i(this.index,0,0,0,0);break;case 4:s.uniform1f(this.index,0);break;case 5:s.uniform2f(this.index,0,0);break;case 6:s.uniform3f(this.index,0,0,0);break;case 7:s.uniform4f(this.index,0,0,0,0);break;case 0:case 8:s.uniform1i(this.index,0);break;case 2:case 10:s.uniform3i(this.index,0,0,0);break;case 12:var d=0;while(d<4){var g=d++;this.__uniformMatrix[g]=0}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix2fv(s,this.index,false,this.__uniformMatrix);break;case 16:var m=0;while(m<9){var v=m++;this.__uniformMatrix[v]=0}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix3fv(s,this.index,false,this.__uniformMatrix);break;case 20:var b=0;while(b<16){var y=b++;this.__uniformMatrix[y]=0}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix4fv(s,this.index,false,this.__uniformMatrix);break;default:}}}else if(!this.__useArray&&(i==null||i.length==this.__length)){var x=0;var P=this.__arrayLength;while(x=this.__length){var _=this.type;switch(_){case 1:case 9:r.uniform2i(this.index,t[s]|0,t[s+1]|0);break;case 3:case 11:r.uniform4i(this.index,t[s]|0,t[s+1]|0,t[s+2]|0,t[s+3]|0);break;case 4:r.uniform1f(this.index,t[s]);break;case 5:r.uniform2f(this.index,t[s],t[s+1]);break;case 6:r.uniform3f(this.index,t[s],t[s+1],t[s+2]);break;case 7:r.uniform4f(this.index,t[s],t[s+1],t[s+2],t[s+3]);break;case 0:case 8:r.uniform1i(this.index,t[s]|0);break;case 2:case 10:r.uniform3i(this.index,t[s]|0,t[s+1]|0,t[s+2]|0);break;case 12:var n=0;while(n<4){var o=n++;this.__uniformMatrix[o]=t[s+o]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix2fv(r,this.index,false,this.__uniformMatrix);break;case 16:var l=0;while(l<9){var h=l++;this.__uniformMatrix[h]=t[s+h]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix3fv(r,this.index,false,this.__uniformMatrix);break;case 20:var c=0;while(c<16){var u=c++;this.__uniformMatrix[u]=t[s+u]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix4fv(r,this.index,false,this.__uniformMatrix);break;default:}}}else if(!this.__internal&&(i==0||i==this.__length)){var f=0;var p=this.__arrayLength;while(f0){var g=this.type;switch(g){case 1:case 5:case 9:r.vertexAttrib2f(this.index,t[s],t[s+1]);break;case 3:case 7:case 11:r.vertexAttrib4f(this.index,t[s],t[s+1],t[s+2],t[s+3]);break;case 0:case 4:case 8:r.vertexAttrib1f(this.index,t[s]);break;case 2:case 6:case 10:r.vertexAttrib3f(this.index,t[s],t[s+1],t[s+2]);break;case 12:var m=0;while(m<2){var v=m++;r.vertexAttrib2f(this.index+v,t[s+v*2],t[s+v*2+1])}break;case 16:var b=0;while(b<3){var y=b++;r.vertexAttrib3f(this.index+y,t[s+y*3],t[s+y*3+1],t[s+y*3+2])}break;case 20:var x=0;while(x<4){var P=x++;r.vertexAttrib4f(this.index+P,t[s+P*4],t[s+P*4+1],t[s+P*4+2],t[s+P*4+3])}break;default:}}else{var k=this.type;switch(k){case 1:case 5:case 9:r.vertexAttrib2f(this.index,0,0);break;case 3:case 7:case 11:r.vertexAttrib4f(this.index,0,0,0,0);break;case 0:case 4:case 8:r.vertexAttrib1f(this.index,0);break;case 2:case 6:case 10:r.vertexAttrib3f(this.index,0,0,0);break;case 12:var w=0;while(w<2){var C=w++;r.vertexAttrib2f(this.index+C,0,0)}break;case 16:var T=0;while(T<3){var S=T++;r.vertexAttrib3f(this.index+S,0,0,0)}break;case 20:var M=0;while(M<4){var $=M++;r.vertexAttrib4f(this.index+$,0,0,0,0)}break;default:}}}else{var E=r.FLOAT;if(this.__isBool){E=r.INT}else if(this.__isInt){E=r.INT}var B=0;var L=this.__arrayLength;while(B0){var A=0;var I=this.__arrayLength;while(A1&&i[i.length-1]==i[i.length-2])i.pop()}return _},__hitTestMask:function(e,t){var s=false;if(this.__currentState.__hitTestMask(e,t)){s=true}return s},__renderCanvas:function(e){if(!this.__renderable||this.__worldAlpha<=0||this.__currentState==null){return}e.__pushMaskObject(this);this.__currentState.__renderCanvas(e);e.__popMaskObject(this);this.__renderEvent(e)},__renderCanvasMask:function(e){this.__currentState.__renderCanvasMask(e)},__renderDOM:function(e){e.__pushMaskObject(this);var t=0;var s=this.__previousStates;while(t-1){this.__previousStates.splice(t,1)}}if(e!=null){e.__renderParent=this;if(!e.__renderDirty){e.__renderDirty=true;e.__setParentRenderDirty()}}if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}this.__currentState=e;return e},__this_onMouseDown:function(e){if(this.enabled){this.set___currentState(this.get_downState())}},__this_onMouseOut:function(e){this.__ignoreEvent=false;if(this.enabled&&this.get_upState()!=this.__currentState){this.set___currentState(this.get_upState())}},__this_onMouseOver:function(e){if(e.buttonDown){this.__ignoreEvent=true}if(this.get_overState()!=this.__currentState&&this.get_overState()!=null&&!this.__ignoreEvent&&this.enabled){this.set___currentState(this.get_overState())}},__this_onMouseUp:function(e){this.__ignoreEvent=false;if(this.enabled){if(this.get_overState()!=null){this.set___currentState(this.get_overState())}else{this.set___currentState(this.get_upState())}}},__class__:openfl_display_SimpleButton,__properties__:$extend(openfl_display_InteractiveObject.prototype.__properties__,{set___currentState:"set___currentState",set_upState:"set_upState",get_upState:"get_upState",set_overState:"set_overState",get_overState:"get_overState",set_hitTestState:"set_hitTestState",get_hitTestState:"get_hitTestState",set_downState:"set_downState",get_downState:"get_downState"})});var openfl_display_Stage=function(e,t){openfl_display_DisplayObjectContainer.call(this);this.set_name(null);this.__color=-1;this.__colorSplit=[255,255,255];this.__colorString="#FFFFFF";this.__contentsScaleFactor=1;this.__currentTabOrderIndex=0;this.__deltaTime=0;this.__displayState=2;this.__mouseX=0;this.__mouseY=0;this.__lastClickTime=0;this.__logicalWidth=0;this.__logicalHeight=0;this.__displayMatrix=new openfl_geom_Matrix;this.__displayRect=new openfl_geom_Rectangle;this.__renderDirty=true;this.stage3Ds=openfl__$Vector_Vector_$Impl_$.toObjectVector(null);var s=0;while(s<4){var i=s++;this.stage3Ds.push(new openfl_display_Stage3D(this))}this.stage=this;this.align=6;this.allowsFullScreen=true;this.allowsFullScreenInteractive=true;this.__quality=1;this.__scaleMode=2;this.showDefaultContextMenu=true;this.softKeyboardRect=new openfl_geom_Rectangle;this.stageFocusRect=true;this.__macKeyboard=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent)||/Mac/.test(navigator.platform);this.__clearBeforeRender=true;this.__forceRender=false;this.__stack=[];this.__rollOutStack=[];this.__mouseOutStack=[];this.__touchData=new haxe_ds_IntMap;this.application=e.application;this.window=e;this.set_color(t);this.__contentsScaleFactor=e.__scale;this.__wasFullscreen=e.__fullscreen;this.__resize();if(openfl_Lib.get_current().stage==null){this.stage.addChild(openfl_Lib.get_current())}};$hxClasses["openfl.display.Stage"]=openfl_display_Stage;openfl_display_Stage.__name__=["openfl","display","Stage"];openfl_display_Stage.__interfaces__=[lime_app_IModule];openfl_display_Stage.__super__=openfl_display_DisplayObjectContainer;openfl_display_Stage.prototype=$extend(openfl_display_DisplayObjectContainer.prototype,{align:null,allowsFullScreen:null,allowsFullScreenInteractive:null,application:null,context3D:null,showDefaultContextMenu:null,softKeyboardRect:null,stage3Ds:null,stageFocusRect:null,stageHeight:null,stageWidth:null,window:null,__cacheFocus:null,__clearBeforeRender:null,__color:null,__colorSplit:null,__colorString:null,__contentsScaleFactor:null,__currentTabOrderIndex:null,__deltaTime:null,__displayMatrix:null,__displayRect:null,__displayState:null,__dragBounds:null,__dragObject:null,__dragOffsetX:null,__dragOffsetY:null,__focus:null,__forceRender:null,__fullScreenSourceRect:null,__invalidated:null,__lastClickTime:null,__logicalWidth:null,__logicalHeight:null,__macKeyboard:null,__mouseDownLeft:null,__mouseDownMiddle:null,__mouseDownRight:null,__mouseOutStack:null,__mouseOverTarget:null,__mouseX:null,__mouseY:null,__pendingMouseEvent:null,__pendingMouseX:null,__pendingMouseY:null,__quality:null,__renderer:null,__rendering:null,__rollOutStack:null,__scaleMode:null,__stack:null,__touchData:null,__transparent:null,__wasDirty:null,__wasFullscreen:null,__primaryTouch:null,localToGlobal:function(e){return e.clone()},onGamepadAxisMove:function(e,t,s){try{openfl_ui_GameInput.__onGamepadAxisMove(e,t,s)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}},onGamepadButtonDown:function(e,t){try{openfl_ui_GameInput.__onGamepadButtonDown(e,t)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}},onGamepadButtonUp:function(e,t){try{openfl_ui_GameInput.__onGamepadButtonUp(e,t)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}},onGamepadConnect:function(e){try{openfl_ui_GameInput.__onGamepadConnect(e)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}},onGamepadDisconnect:function(e){try{openfl_ui_GameInput.__onGamepadDisconnect(e)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}},onKeyDown:function(e,t,s){if(this.window==null||this.window!=e){return}this.__onKey("keyDown",t,s)},onKeyUp:function(e,t,s){if(this.window==null||this.window!=e){return}this.__onKey("keyUp",t,s)},onModuleExit:function(e){if(this.window!=null){this.__broadcastEvent(new openfl_events_Event("deactivate"))}},onMouseDown:function(e,t,s,i){if(this.window==null||this.window!=e){return}this.__dispatchPendingMouseEvent();var a;switch(i){case 1:a="middleMouseDown";break;case 2:a="rightMouseDown";break;default:a="mouseDown"}this.__onMouse(a,t*e.__scale|0,s*e.__scale|0,i);if(!this.showDefaultContextMenu&&i==2){e.onMouseDown.cancel()}},onMouseMove:function(e,t,s){if(this.window==null||this.window!=e){return}this.__pendingMouseEvent=true;this.__pendingMouseX=t*e.__scale|0;this.__pendingMouseY=s*e.__scale|0},onMouseMoveRelative:function(e,t,s){},onMouseUp:function(e,t,s,i){if(this.window==null||this.window!=e){return}this.__dispatchPendingMouseEvent();var a;switch(i){case 1:a="middleMouseUp";break;case 2:a="rightMouseUp";break;default:a="mouseUp"}this.__onMouse(a,t*e.__scale|0,s*e.__scale|0,i);if(!this.showDefaultContextMenu&&i==2){e.onMouseUp.cancel()}},onMouseWheel:function(e,t,s,i){if(this.window==null||this.window!=e){return}this.__dispatchPendingMouseEvent();if(i==lime_ui_MouseWheelMode.PIXELS){this.__onMouseWheel(t*e.__scale|0,s*e.__scale|0,i)}else{this.__onMouseWheel(t|0,s|0,i)}},onRenderContextLost:function(){this.__renderer=null;this.context3D=null;var e=0;var t=this.stage3Ds;while(e0){s.reverse();this.__dispatchStack(i,s)}else{this.__dispatchEvent(i)}if(i.isDefaultPrevented()){e.onTextInput.cancel()}},onTouchCancel:function(e){if(this.__primaryTouch==e){this.__primaryTouch=null}this.__onTouch("touchEnd",e)},onTouchMove:function(e){this.__onTouch("touchMove",e)},onTouchEnd:function(e){if(this.__primaryTouch==e){this.__primaryTouch=null}this.__onTouch("touchEnd",e)},onTouchStart:function(e){if(this.__primaryTouch==null){this.__primaryTouch=e}this.__onTouch("touchBegin",e)},onWindowActivate:function(e){if(this.window==null||this.window!=e){return}},onWindowClose:function(e){if(this.window==e){this.window=null}this.__primaryTouch=null;this.__broadcastEvent(new openfl_events_Event("deactivate"))},onWindowCreate:function(e){if(this.window==null||this.window!=e){return}if(e.context!=null){this.__createRenderer()}},onWindowDeactivate:function(e){if(this.window==null||this.window!=e){return}},onWindowDropFile:function(e,t){},onWindowEnter:function(e){},onWindowExpose:function(e){if(this.window==null||this.window!=e){return}this.__renderDirty=true},onWindowFocusIn:function(e){if(this.window==null||this.window!=e){return}this.__renderDirty=true;this.__broadcastEvent(new openfl_events_Event("activate"));this.set_focus(this.__cacheFocus)},onWindowFocusOut:function(e){if(this.window==null||this.window!=e){return}this.__primaryTouch=null;this.__broadcastEvent(new openfl_events_Event("deactivate"));var t=this.get_focus();this.set_focus(null);this.__cacheFocus=t},onWindowFullscreen:function(e){if(this.window==null||this.window!=e){return}this.__resize();if(!this.__wasFullscreen){this.__wasFullscreen=true;if(this.__displayState==2){this.__displayState=1}this.__dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,true,true))}},onWindowLeave:function(e){if(this.window==null||this.window!=e||openfl_events_MouseEvent.__buttonDown){return}this.__dispatchPendingMouseEvent();this.__dispatchEvent(new openfl_events_Event("mouseLeave"))},onWindowMinimize:function(e){if(this.window==null||this.window!=e){return}},onWindowMove:function(e,t,s){},onWindowResize:function(e,t,s){if(this.window==null||this.window!=e){return}this.__resize();if(this.__wasFullscreen&&!e.__fullscreen){this.__wasFullscreen=false;this.__displayState=2;this.__dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,false,true))}},onWindowRestore:function(e){if(this.window==null||this.window!=e){return}if(this.__wasFullscreen&&!e.__fullscreen){this.__wasFullscreen=false;this.__displayState=2;this.__dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,false,true))}},render:function(e){if(this.__rendering){return}this.__rendering=true;this.__broadcastEvent(new openfl_events_Event("enterFrame"));this.__broadcastEvent(new openfl_events_Event("frameConstructed"));this.__broadcastEvent(new openfl_events_Event("exitFrame"));this.__renderable=true;this.__enterFrame(this.__deltaTime);this.__deltaTime=0;var t=this.__renderer!=null&&(this.__renderDirty||this.__forceRender);if(this.__invalidated&&t){this.__invalidated=false;this.__broadcastEvent(new openfl_events_Event("render"))}this.__update(false,true);if(this.__renderer!=null){if(this.context3D!=null){var s=0;var i=this.stage3Ds;while(s1){if(!this.window.devicePixelRatio){e=1}else{e=true}}var t=this.window.__width*this.window.__scale|0;var s=this.window.__height*this.window.__scale|0;var i=this.window.context.type;switch(i){case"cairo":break;case"canvas":this.__renderer=new openfl_display_CanvasRenderer(this.window.context.canvas2D);js_Boot.__cast(this.__renderer,openfl_display_CanvasRenderer).pixelRatio=e;break;case"dom":this.__renderer=new openfl_display_DOMRenderer(this.window.context.dom);js_Boot.__cast(this.__renderer,openfl_display_DOMRenderer).pixelRatio=e;break;case"opengl":case"opengles":case"webgl":break;default:}if(this.__renderer!=null){var a=this.get_quality();this.__renderer.__allowSmoothing=a!=2;this.__renderer.__worldTransform=this.__displayMatrix;this.__renderer.__stage=this;this.__renderer.__resize(t,s)}},__dispatchEvent:function(e){try{return openfl_display_DisplayObjectContainer.prototype.__dispatchEvent.call(this,e)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e);return false}},__dispatchPendingMouseEvent:function(){if(this.__pendingMouseEvent){this.__onMouse("mouseMove",this.__pendingMouseX,this.__pendingMouseY,0);this.__pendingMouseEvent=false}},__dispatchStack:function(e,t){try{var s;var i=t.length;if(i==0){e.eventPhase=2;s=e.target;s.__dispatch(e)}else{e.eventPhase=1;e.target=t[t.length-1];var a=0;var r=i-1;while(a=0){t[n].__dispatch(e);if(e.__isCanceled){return}--n}}}}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}},__dispatchTarget:function(e,t){try{return e.__dispatchEvent(t)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e);return false}},__drag:function(e){var t=this.__dragObject.parent;if(t!=null){var s=t.__getWorldTransform();var i=s.a*s.d-s.b*s.c;if(i==0){e.x=-s.tx;e.y=-s.ty}else{var a=1/i*(s.c*(s.ty-e.y)+s.d*(e.x-s.tx));e.y=1/i*(s.a*(e.y-s.ty)+s.b*(s.tx-e.x));e.x=a}}var r=e.x+this.__dragOffsetX;var _=e.y+this.__dragOffsetY;if(this.__dragBounds!=null){if(rthis.__dragBounds.get_right()){r=this.__dragBounds.get_right()}if(_this.__dragBounds.get_bottom()){_=this.__dragBounds.get_bottom()}}this.__dragObject.set_x(r);this.__dragObject.set_y(_)},__getInteractive:function(e){if(e!=null){e.push(this)}return true},__globalToLocal:function(e,t){if(e!=t){t.copyFrom(e)}return t},__handleError:function(e){var t=new openfl_events_UncaughtErrorEvent("uncaughtError",true,true,e);try{openfl_Lib.get_current().__loaderInfo.uncaughtErrorEvents.dispatchEvent(t)}catch(e){haxe_CallStack.lastException=e}if(!t.__preventDefault){try{var s=haxe_CallStack.lastException;if(s!=null&&Object.prototype.hasOwnProperty.call(s,"stack")&&s.stack!=null&&s.stack!=""){console.log(s.stack);e.stack=s.stack}else{var i=haxe_CallStack.toString(haxe_CallStack.callStack());console.log(i)}}catch(e){haxe_CallStack.lastException=e}throw e}},__onKey:function(e,t,s){this.__dispatchPendingMouseEvent();openfl_events_MouseEvent.__altKey=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey(s);openfl_events_MouseEvent.__commandKey=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(s);openfl_events_MouseEvent.__ctrlKey=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(s);openfl_events_MouseEvent.__shiftKey=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(s);var i=[];if(this.__focus==null){this.__getInteractive(i)}else{this.__focus.__getInteractive(i)}if(i.length>0){var a;switch(t){case 1073741908:case 1073741909:case 1073741910:case 1073741911:case 1073741912:case 1073741913:case 1073741914:case 1073741915:case 1073741916:case 1073741917:case 1073741918:case 1073741919:case 1073741920:case 1073741921:case 1073741922:case 1073741923:case 1073742044:a=3;break;case 1073742048:case 1073742049:case 1073742050:case 1073742051:a=1;break;case 1073742052:case 1073742053:case 1073742054:case 1073742055:a=2;break;default:a=0}var r;switch(t){case 8:r=8;break;case 9:r=9;break;case 13:r=13;break;case 27:r=27;break;case 32:r=32;break;case 33:r=49;break;case 34:r=222;break;case 35:r=51;break;case 36:r=52;break;case 37:r=53;break;case 38:r=55;break;case 39:r=222;break;case 40:r=57;break;case 41:r=48;break;case 42:r=56;break;case 44:r=188;break;case 45:r=189;break;case 46:r=190;break;case 47:r=191;break;case 48:r=48;break;case 49:r=49;break;case 50:r=50;break;case 51:r=51;break;case 52:r=52;break;case 53:r=53;break;case 54:r=54;break;case 55:r=55;break;case 56:r=56;break;case 57:r=57;break;case 58:r=186;break;case 59:r=186;break;case 60:r=60;break;case 61:r=187;break;case 62:r=190;break;case 63:r=191;break;case 64:r=50;break;case 91:r=219;break;case 92:r=220;break;case 93:r=221;break;case 94:r=54;break;case 95:r=189;break;case 96:r=192;break;case 97:r=65;break;case 98:r=66;break;case 99:r=67;break;case 100:r=68;break;case 101:r=69;break;case 102:r=70;break;case 103:r=71;break;case 104:r=72;break;case 105:r=73;break;case 106:r=74;break;case 107:r=75;break;case 108:r=76;break;case 109:r=77;break;case 110:r=78;break;case 111:r=79;break;case 112:r=80;break;case 113:r=81;break;case 114:r=82;break;case 115:r=83;break;case 116:r=84;break;case 117:r=85;break;case 118:r=86;break;case 119:r=87;break;case 120:r=88;break;case 121:r=89;break;case 122:r=90;break;case 127:r=46;break;case 1073741881:r=20;break;case 1073741882:r=112;break;case 1073741883:r=113;break;case 1073741884:r=114;break;case 1073741885:r=115;break;case 1073741886:r=116;break;case 1073741887:r=117;break;case 1073741888:r=118;break;case 1073741889:r=119;break;case 1073741890:r=120;break;case 1073741891:r=121;break;case 1073741892:r=122;break;case 1073741893:r=123;break;case 1073741894:r=301;break;case 1073741895:r=145;break;case 1073741896:r=19;break;case 1073741897:r=45;break;case 1073741898:r=36;break;case 1073741899:r=33;break;case 1073741901:r=35;break;case 1073741902:r=34;break;case 1073741903:r=39;break;case 1073741904:r=37;break;case 1073741905:r=40;break;case 1073741906:r=38;break;case 1073741907:r=144;break;case 1073741908:r=111;break;case 1073741909:r=106;break;case 1073741910:r=109;break;case 1073741911:r=107;break;case 1073741912:r=13;break;case 1073741913:r=97;break;case 1073741914:r=98;break;case 1073741915:r=99;break;case 1073741916:r=100;break;case 1073741917:r=101;break;case 1073741918:r=102;break;case 1073741919:r=103;break;case 1073741920:r=104;break;case 1073741921:r=105;break;case 1073741922:r=96;break;case 1073741923:r=110;break;case 1073741925:r=302;break;case 1073741928:r=124;break;case 1073741929:r=125;break;case 1073741930:r=126;break;case 1073741982:r=13;break;case 1073742044:r=110;break;case 1073742048:r=17;break;case 1073742049:r=16;break;case 1073742050:r=18;break;case 1073742051:r=15;break;case 1073742052:r=17;break;case 1073742053:r=16;break;case 1073742054:r=18;break;case 1073742055:r=15;break;default:r=t}var _=openfl_ui_Keyboard.__getCharCode(r,lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(s));var n=new openfl_events_KeyboardEvent(e,true,true,_,r,a,this.__macKeyboard?lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(s)||lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(s):lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(s),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey(s),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(s),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(s),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(s));i.reverse();this.__dispatchStack(n,i);if(n.__preventDefault){if(e=="keyDown"){this.window.onKeyDown.cancel()}else{this.window.onKeyUp.cancel()}}else if(e=="keyDown"&&r==9){var o=[];this.__tabTest(o);var l=-1;var h=null;var c=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(s)?-1:1;if(o.length>1){haxe_ds_ArraySort.sort(o,function(e,t){return e.get_tabIndex()-t.get_tabIndex()});if(o[o.length-1].get_tabIndex()==-1){if(this.get_focus()!=null){l=0}else{l=this.__currentTabOrderIndex}}else{var u=0;while(u-1){if(u>0){o.splice(0,u)}break}++u}if(this.get_focus()!=null){var f=o.indexOf(this.get_focus());if(f<0){l=0}else{l=f+c}}else{l=this.__currentTabOrderIndex}}}else if(o.length==1){h=o[0];if(this.get_focus()==h){h=null}}if(o.length==1||o.length==0&&this.get_focus()!=null){l=0}else if(o.length>1){if(l<0){l+=o.length}l%=o.length;h=o[l];if(h==this.get_focus()){l+=c;if(l<0){l+=o.length}l%=o.length;h=o[l]}}var p=null;if(this.get_focus()!=null){p=new openfl_events_FocusEvent("keyFocusChange",true,true,h,lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(s),0);i=[];this.get_focus().__getInteractive(i);i.reverse();this.__dispatchStack(p,i)}if(p==null||!p.isDefaultPrevented()){this.__currentTabOrderIndex=l;if(h!=null){this.set_focus(h)}}}}},__onGamepadConnect:function(e){this.onGamepadConnect(e);var s=$bind(this,this.onGamepadAxisMove);var i=e;var t=function(e,t){s(i,e,t)};e.onAxisMove.add(t);var a=$bind(this,this.onGamepadButtonDown);var r=e;var _=function(e){a(r,e)};e.onButtonDown.add(_);var n=$bind(this,this.onGamepadButtonUp);var o=e;var l=function(e){n(o,e)};e.onButtonUp.add(l);var h=$bind(this,this.onGamepadDisconnect);var c=e;var u=function(){h(c)};e.onDisconnect.add(u)},__onMouse:function(e,t,s,i){if(i>2){return}var a=openfl_geom_Point.__pool.get();a.setTo(t,s);var r=this.__displayMatrix;var _=r.a*r.d-r.b*r.c;if(_==0){a.x=-r.tx;a.y=-r.ty}else{var n=1/_*(r.c*(r.ty-a.y)+r.d*(a.x-r.tx));a.y=1/_*(r.a*(a.y-r.ty)+r.b*(r.tx-a.x));a.x=n}this.__mouseX=a.x;this.__mouseY=a.y;var o=[];var l=null;if(this.__hitTest(this.__mouseX,this.__mouseY,true,o,true,this)){l=o[o.length-1]}else{l=this;o=[this]}if(l==null){l=this}var h=null;switch(e){case"middleMouseDown":this.__mouseDownMiddle=l;break;case"middleMouseUp":if(this.__mouseDownMiddle==l){h="middleClick"}this.__mouseDownMiddle=null;break;case"mouseDown":if(l.__allowMouseFocus()){if(this.get_focus()!=null){var c=new openfl_events_FocusEvent("mouseFocusChange",true,true,l,false,0);this.__dispatchStack(c,o);if(!c.isDefaultPrevented()){this.set_focus(l)}}else{this.set_focus(l)}}else{this.set_focus(null)}this.__mouseDownLeft=l;openfl_events_MouseEvent.__buttonDown=true;break;case"mouseUp":if(this.__mouseDownLeft!=null){openfl_events_MouseEvent.__buttonDown=false;if(this.__mouseDownLeft==l){h="click"}else{this.__mouseDownLeft.dispatchEvent(openfl_events_MouseEvent.__create("releaseOutside",1,this.__mouseX,this.__mouseY,new openfl_geom_Point(this.__mouseX,this.__mouseY),this))}this.__mouseDownLeft=null}break;case"rightMouseDown":this.__mouseDownRight=l;break;case"rightMouseUp":if(this.__mouseDownRight==l){h="rightClick"}this.__mouseDownRight=null;break;default:}var u=openfl_geom_Point.__pool.get();this.__dispatchStack(openfl_events_MouseEvent.__create(e,i,this.__mouseX,this.__mouseY,l.__globalToLocal(a,u),l),o);if(h!=null){this.__dispatchStack(openfl_events_MouseEvent.__create(h,i,this.__mouseX,this.__mouseY,l.__globalToLocal(a,u),l),o);if(e=="mouseUp"&&js_Boot.__cast(l,openfl_display_InteractiveObject).doubleClickEnabled){var f=openfl_Lib.getTimer();if(f-this.__lastClickTime<500){this.__dispatchStack(openfl_events_MouseEvent.__create("doubleClick",i,this.__mouseX,this.__mouseY,l.__globalToLocal(a,u),l),o);this.__lastClickTime=0}else{this.__lastClickTime=f}}}if(openfl_ui_Mouse.__cursor=="auto"&&!openfl_ui_Mouse.__hidden){var p=null;if(this.__mouseDownLeft!=null){p=this.__mouseDownLeft.__getCursor()}else{var d=0;while(d>>16;var s=(e&65280)>>>8;var i=e&255;this.__colorSplit[0]=t/255;this.__colorSplit[1]=s/255;this.__colorSplit[2]=i/255;this.__colorString="#"+StringTools.hex(e&16777215,6);this.__renderDirty=true;this.__color=-16777216|e&16777215}return e},get_displayState:function(){return this.__displayState},set_displayState:function(e){if(this.window!=null){if(e==2){if(this.window.__fullscreen){this.window.set_fullscreen(false)}}else if(!this.window.__fullscreen){this.window.set_fullscreen(true)}}return this.__displayState=e},get_focus:function(){return this.__focus},set_focus:function(e){if(e!=this.__focus){var t=this.__focus;this.__focus=e;this.__cacheFocus=e;if(t!=null){var s=new openfl_events_FocusEvent("focusOut",true,false,e,false,0);var i=[];t.__getInteractive(i);i.reverse();this.__dispatchStack(s,i)}if(e!=null){var a=new openfl_events_FocusEvent("focusIn",true,false,t,false,0);var r=[];e.__getInteractive(r);r.reverse();this.__dispatchStack(a,r)}}return e},get_fullScreenSourceRect:function(){if(this.__fullScreenSourceRect==null){return null}else{return this.__fullScreenSourceRect.clone()}},set_height:function(e){return this.get_height()},get_mouseX:function(){return this.__mouseX},get_mouseY:function(){return this.__mouseY},get_quality:function(){return this.__quality},set_rotation:function(e){return 0},set_scaleX:function(e){return 0},set_scaleY:function(e){return 0},get_tabEnabled:function(){return false},set_tabEnabled:function(e){throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Error: The Stage class does not implement this property or method."))},get_tabIndex:function(){return-1},set_transform:function(e){return this.get_transform()},set_width:function(e){return this.get_width()},set_x:function(e){return 0},set_y:function(e){return 0},__class__:openfl_display_Stage,__properties__:$extend(openfl_display_DisplayObjectContainer.prototype.__properties__,{get_quality:"get_quality",get_fullScreenSourceRect:"get_fullScreenSourceRect",set_focus:"set_focus",get_focus:"get_focus",set_displayState:"set_displayState",get_displayState:"get_displayState",set_color:"set_color"})});var openfl_display_Stage3D=function(e){openfl_events_EventDispatcher.call(this);this.__stage=e;this.__height=0;this.__projectionTransform=new openfl_geom_Matrix3D;this.__renderTransform=new openfl_geom_Matrix3D;this.__width=0;this.__x=0;this.__y=0;this.visible=true;if(e.stageWidth>0&&e.stageHeight>0){this.__resize(e.stageWidth,e.stageHeight)}};$hxClasses["openfl.display.Stage3D"]=openfl_display_Stage3D;openfl_display_Stage3D.__name__=["openfl","display","Stage3D"];openfl_display_Stage3D.__super__=openfl_events_EventDispatcher;openfl_display_Stage3D.prototype=$extend(openfl_events_EventDispatcher.prototype,{context3D:null,visible:null,__contextLost:null,__contextRequested:null,__height:null,__indexBuffer:null,__projectionTransform:null,__renderTransform:null,__stage:null,__vertexBuffer:null,__width:null,__x:null,__y:null,__canvas:null,__webgl:null,__createContext:function(){var e=this.__stage;var t=e.__renderer;if(t.__type=="cairo"||t.__type=="canvas"){this.__dispatchError();return}if(t.__type=="opengl"){this.context3D=new openfl_display3D_Context3D(e,e.context3D.__contextState,this);this.__dispatchCreate()}else if(t.__type=="dom"){this.__canvas=window.document.createElement("canvas");this.__canvas.width=e.stageWidth;this.__canvas.height=e.stageHeight;var s=e.window;var i=t.__context.attributes;var a=Object.prototype.hasOwnProperty.call(i,"background")&&i.background==null;var r=Object.prototype.hasOwnProperty.call(i,"colorDepth")?i.colorDepth:32;var _={alpha:a||r>16,antialias:Object.prototype.hasOwnProperty.call(i,"antialiasing")&&i.antialiasing>0,depth:true,premultipliedAlpha:true,stencil:true,preserveDrawingBuffer:false};this.__webgl=js_html__$CanvasElement_CanvasUtil.getContextWebGL(this.__canvas,_);if(this.__webgl!=null){this.__dispatchError()}else{this.__dispatchError()}}},__dispatchError:function(){this.__contextRequested=false;this.dispatchEvent(new openfl_events_ErrorEvent("error",false,false,"Context3D not available"))},__dispatchCreate:function(){if(this.__contextRequested){this.__contextRequested=false;this.dispatchEvent(new openfl_events_Event("context3DCreate"))}},__lostContext:function(){this.__contextLost=true;if(this.context3D!=null){this.context3D.__dispose();this.__contextRequested=true}},__resize:function(e,t){if(e!=this.__width||t!=this.__height){if(this.__canvas!=null){this.__canvas.width=e;this.__canvas.height=t}this.__projectionTransform.copyRawDataFrom(openfl__$Vector_Vector_$Impl_$.toFloatVector(null,null,null,[2/(e>0?e:1),0,0,0,0,-2/(t>0?t:1),0,0,0,0,-.001,0,-1,1,0,1]));this.__renderTransform.identity();this.__renderTransform.appendTranslation(this.__x,this.__y,0);this.__renderTransform.append(this.__projectionTransform);this.__width=e;this.__height=t}},__restoreContext:function(){this.__contextLost=false;this.__createContext()},get_x:function(){return this.__x},get_y:function(){return this.__y},__class__:openfl_display_Stage3D,__properties__:{get_y:"get_y",get_x:"get_x"}});var openfl_display_Window=function(e,t){lime_ui_Window.call(this,e,t);this.stage=new openfl_display_Stage(this,Object.prototype.hasOwnProperty.call(t.context,"background")?t.context.background:16777215);if(Object.prototype.hasOwnProperty.call(t,"parameters")){try{this.stage.get_loaderInfo().parameters=t.parameters}catch(e){haxe_CallStack.lastException=e}}if(Object.prototype.hasOwnProperty.call(t,"resizable")&&!t.resizable){this.stage.__setLogicalSize(t.width,t.height)}e.addModule(this.stage)};$hxClasses["openfl.display.Window"]=openfl_display_Window;openfl_display_Window.__name__=["openfl","display","Window"];openfl_display_Window.__super__=lime_ui_Window;openfl_display_Window.prototype=$extend(lime_ui_Window.prototype,{__class__:openfl_display_Window});var openfl_display3D_Context3D=function(e,t,s){this.driverInfo="OpenGL (Direct blitting)";this.backBufferWidth=0;this.backBufferHeight=0;openfl_events_EventDispatcher.call(this);this.__stage=e;this.__contextState=t;this.__stage3D=s;this.__context=e.window.context;this.gl=this.__context.webgl;if(this.__contextState==null){this.__contextState=new openfl__$internal_renderer_context3D_Context3DState}this.__state=new openfl__$internal_renderer_context3D_Context3DState;var i=new Float32Array(512);this.__vertexConstants=i;var a=new Float32Array(512);this.__fragmentConstants=a;var r=[1,1,1,1];var _;if(r!=null){_=new Float32Array(r)}else{_=null}this.__positionScale=_;this.__programs=new haxe_ds_StringMap;if(openfl_display3D_Context3D.GL_MAX_VIEWPORT_DIMS==-1){openfl_display3D_Context3D.GL_MAX_VIEWPORT_DIMS=this.gl.getParameter(this.gl.MAX_VIEWPORT_DIMS)}this.maxBackBufferWidth=openfl_display3D_Context3D.GL_MAX_VIEWPORT_DIMS;this.maxBackBufferHeight=openfl_display3D_Context3D.GL_MAX_VIEWPORT_DIMS;if(openfl_display3D_Context3D.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT==-1){var n=this.gl.getExtension("EXT_texture_filter_anisotropic");if(n==null||!Object.prototype.hasOwnProperty.call(n,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")){n=this.gl.getExtension("MOZ_EXT_texture_filter_anisotropic")}if(n==null||!Object.prototype.hasOwnProperty.call(n,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")){n=this.gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")}if(n!=null){openfl_display3D_Context3D.GL_TEXTURE_MAX_ANISOTROPY_EXT=n.TEXTURE_MAX_ANISOTROPY_EXT;openfl_display3D_Context3D.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT=this.gl.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else{openfl_display3D_Context3D.GL_TEXTURE_MAX_ANISOTROPY_EXT=0;openfl_display3D_Context3D.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT=0}}if(openfl_display3D_Context3D.GL_DEPTH_STENCIL==-1){openfl_display3D_Context3D.GL_DEPTH_STENCIL=this.gl.DEPTH_STENCIL}if(openfl_display3D_Context3D.__driverInfo==null){var o=this.gl.getParameter(this.gl.VENDOR);var l=this.gl.getParameter(this.gl.VERSION);var h=this.gl.getParameter(this.gl.RENDERER);var c=this.gl.getParameter(this.gl.SHADING_LANGUAGE_VERSION);openfl_display3D_Context3D.__driverInfo="OpenGL Vendor="+o+" Version="+l+" Renderer="+h+" GLSL="+c}this.driverInfo=openfl_display3D_Context3D.__driverInfo;this.__quadIndexBufferElements=16383;this.__quadIndexBufferCount=this.__quadIndexBufferElements*6;var u=this.__quadIndexBufferCount;var f;if(u!=null){f=new Uint16Array(u)}else{f=null}var p=f;var d=0;var g=0;var m=0;var v=this.__quadIndexBufferElements;while(m0&&this.backBufferWidth>0){if(this.__renderStage3DProgram==null){var s=new openfl_utils_AGALMiniAssembler;s.assemble(openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.toString(1),"m44 op, va0, vc0\n"+"mov v0, va1");var i=new openfl_utils_AGALMiniAssembler;i.assemble(openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.toString(0),"tex ft1, v0, fs0 <2d,nearest,nomip>\n"+"mov oc, ft1");this.__renderStage3DProgram=this.createProgram();this.__renderStage3DProgram.upload(s.agalcode,i.agalcode)}this.setProgram(this.__renderStage3DProgram);this.setBlendFactors(2,9);this.setColorMask(true,true,true,true);this.setCulling(3);this.setDepthTest(false,0);this.setStencilActions();this.setStencilReferenceValue(0,0,0);this.setScissorRectangle(null);this.setTextureAt(0,t.__frontBufferTexture);this.setVertexBufferAt(0,e.__vertexBuffer,0,3);this.setVertexBufferAt(1,e.__vertexBuffer,3,2);this.setProgramConstantsFromMatrix(1,0,e.__renderTransform,true);this.drawTriangles(e.__indexBuffer);this.__present=true}},__setGLBlend:function(e){if(this.__contextState.__enableGLBlend!=e){if(e){this.gl.enable(this.gl.BLEND)}else{this.gl.disable(this.gl.BLEND)}this.__contextState.__enableGLBlend=e}},__setGLBlendEquation:function(e){if(this.__contextState.__glBlendEquation!=e){this.gl.blendEquation(e);this.__contextState.__glBlendEquation=e}},__setGLCullFace:function(e){if(this.__contextState.__enableGLCullFace!=e){if(e){this.gl.enable(this.gl.CULL_FACE)}else{this.gl.disable(this.gl.CULL_FACE)}this.__contextState.__enableGLCullFace=e}},__setGLDepthTest:function(e){if(this.__contextState.__enableGLDepthTest!=e){if(e){this.gl.enable(this.gl.DEPTH_TEST)}else{this.gl.disable(this.gl.DEPTH_TEST)}this.__contextState.__enableGLDepthTest=e}},__setGLFrontFace:function(e){if(this.__contextState.__frontFaceGLCCW!=e){this.gl.frontFace(e?this.gl.CCW:this.gl.CW);this.__contextState.__frontFaceGLCCW=e}},__setGLScissorTest:function(e){if(this.__contextState.__enableGLScissorTest!=e){if(e){this.gl.enable(this.gl.SCISSOR_TEST)}else{this.gl.disable(this.gl.SCISSOR_TEST)}this.__contextState.__enableGLScissorTest=e}},__setGLStencilTest:function(e){if(this.__contextState.__enableGLStencilTest!=e){if(e){this.gl.enable(this.gl.STENCIL_TEST)}else{this.gl.disable(this.gl.STENCIL_TEST)}this.__contextState.__enableGLStencilTest=e}},__class__:openfl_display3D_Context3D});var openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$={};$hxClasses["openfl.display3D._Context3DBufferUsage.Context3DBufferUsage_Impl_"]=openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$;openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.__name__=["openfl","display3D","_Context3DBufferUsage","Context3DBufferUsage_Impl_"];openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.fromString=function(e){switch(e){case"dynamicDraw":return 0;case"staticDraw":return 1;default:return null}};openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.toString=function(e){switch(e){case 0:return"dynamicDraw";case 1:return"staticDraw";default:return null}};var openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$={};$hxClasses["openfl.display3D._Context3DProgramType.Context3DProgramType_Impl_"]=openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$;openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.__name__=["openfl","display3D","_Context3DProgramType","Context3DProgramType_Impl_"];openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.toString=function(e){switch(e){case 0:return"fragment";case 1:return"vertex";default:return null}};var openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$={};$hxClasses["openfl.display3D._Context3DTextureFormat.Context3DTextureFormat_Impl_"]=openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$;openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.__name__=["openfl","display3D","_Context3DTextureFormat","Context3DTextureFormat_Impl_"];openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.toString=function(e){switch(e){case 0:return"bgrPacked565";case 1:return"bgra";case 2:return"bgraPacked4444";case 3:return"compressed";case 4:return"compressedAlpha";case 5:return"rgbaHalfFloat";default:return null}};var openfl_display3D_IndexBuffer3D=function(e,t,s){this.__context=e;this.__numIndices=t;var i=this.__context.gl;this.__elementType=i.UNSIGNED_SHORT;this.__id=i.createBuffer();this.__usage=s==0?i.DYNAMIC_DRAW:i.STATIC_DRAW};$hxClasses["openfl.display3D.IndexBuffer3D"]=openfl_display3D_IndexBuffer3D;openfl_display3D_IndexBuffer3D.__name__=["openfl","display3D","IndexBuffer3D"];openfl_display3D_IndexBuffer3D.prototype={__context:null,__elementType:null,__id:null,__numIndices:null,__tempUInt16Array:null,__usage:null,uploadFromTypedArray:function(e,t){if(t==null){t=-1}if(e==null){return}var s=this.__context.gl;this.__context.__bindGLElementArrayBuffer(this.__id);lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.bufferData(s,s.ELEMENT_ARRAY_BUFFER,e,this.__usage)},uploadFromVector:function(e,t,s){if(e==null){return}var i=this.__context.gl;var a=t+s;var r=this.__tempUInt16Array;if(this.__tempUInt16Array==null||this.__tempUInt16Array.length=0){c.name=c.name.substring(0,u)}var f=c.type;switch(f){case 35674:c.regCount=2;break;case 35675:c.regCount=3;break;case 35676:c.regCount=4;break;default:c.regCount=1}c.regCount*=c.size;this.__agalUniforms.add(c);if(c.name=="vcPositionScale"){this.__agalPositionScale=c}else if(StringTools.startsWith(c.name,"vc")){c.regIndex=Std.parseInt(c.name.substring(2));c.regData=this.__context.__vertexConstants;s.add(c)}else if(StringTools.startsWith(c.name,"fc")){c.regIndex=Std.parseInt(c.name.substring(2));c.regData=this.__context.__fragmentConstants;i.add(c)}else if(StringTools.startsWith(c.name,"sampler")&&c.name.indexOf("alpha")==-1){c.regIndex=Std.parseInt(c.name.substring(7));this.__agalSamplerUniforms.add(c);var p=0;var d=c.regCount;while(p-1&&StringTools.startsWith(h,"openfl_")){s.bindAttribLocation(this.__glProgram,0,h);break}}}s.attachShader(this.__glProgram,this.__glVertexShader);s.attachShader(this.__glProgram,this.__glFragmentShader);s.linkProgram(this.__glProgram);if(s.getProgramParameter(this.__glProgram,s.LINK_STATUS)==0){var c="Unable to initialize the shader program";c+="\n"+s.getProgramInfoLog(this.__glProgram);lime_utils_Log.error(c,{fileName:"Program3D.hx",lineNumber:756,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"})}},__class__:openfl_display3D_Program3D};var openfl_display3D_Uniform=function(e){this.context=e;this.isDirty=true;var t=new lime_utils_BytePointerData(null,0);this.regDataPointer=t};$hxClasses["openfl.display3D.Uniform"]=openfl_display3D_Uniform;openfl_display3D_Uniform.__name__=["openfl","display3D","Uniform"];openfl_display3D_Uniform.prototype={name:null,location:null,type:null,size:null,regData:null,regIndex:null,regCount:null,isDirty:null,context:null,regDataPointer:null,flush:function(){var e=this.context.gl;var t=this.regIndex*4;var s=this.type;switch(s){case 35664:lime_graphics__$WebGL2RenderContext_WebGL2RenderContext_$Impl_$.uniform2fv(e,this.location,this.regData.subarray(t,t+this.regCount*2));break;case 35665:var i=this.location;var a=this.regData.subarray(t,t+this.regCount*3);e.uniform3fv(i,a);break;case 35666:var r=this.location;var _=this.regData.subarray(t,t+this.regCount*4);e.uniform4fv(r,_);break;case 35674:lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix2fv(e,this.location,false,this.regData.subarray(t,t+this.size*2*2));break;case 35675:lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix3fv(e,this.location,false,this.regData.subarray(t,t+this.size*3*3));break;case 35676:lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix4fv(e,this.location,false,this.regData.subarray(t,t+this.size*4*4));break;default:var n=this.location;var o=this.regData.subarray(t,t+this.regCount*4);e.uniform4fv(n,o)}},__class__:openfl_display3D_Uniform};var openfl_display3D_UniformMap=function(e){this.__uniforms=e;this.__uniforms.sort(function(e,t){return Reflect.compare(e.regIndex,t.regIndex)});var t=0;var s=0;var i=this.__uniforms;while(st){t=a.regIndex+a.regCount}}this.__registerLookup=openfl__$Vector_Vector_$Impl_$.toObjectVector(null,t);var r=0;var _=this.__uniforms;while(r<_.length){var n=_[r];++r;var o=0;var l=n.regCount;while(othis.__registerLookup.get_length()){s=this.__registerLookup.get_length()}var i=e;while(iopenfl_display3D_Context3D.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT){s=openfl_display3D_Context3D.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT}t.texParameterf(t.TEXTURE_CUBE_MAP,openfl_display3D_Context3D.GL_TEXTURE_MAX_ANISOTROPY_EXT,s)}return true}return false},__class__:openfl_display3D_textures_CubeTexture});var openfl_display3D_textures_RectangleTexture=function(e,t,s,i,a){openfl_display3D_textures_TextureBase.call(this,e);this.__width=t;this.__height=s;this.__optimizeForRenderToTexture=a;this.__textureTarget=this.__context.gl.TEXTURE_2D;this.uploadFromTypedArray(null);if(a){this.__getGLFramebuffer(true,0,0)}};$hxClasses["openfl.display3D.textures.RectangleTexture"]=openfl_display3D_textures_RectangleTexture;openfl_display3D_textures_RectangleTexture.__name__=["openfl","display3D","textures","RectangleTexture"];openfl_display3D_textures_RectangleTexture.__super__=openfl_display3D_textures_TextureBase;openfl_display3D_textures_RectangleTexture.prototype=$extend(openfl_display3D_textures_TextureBase.prototype,{uploadFromTypedArray:function(e){var t=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.texImage2D(t,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,t.UNSIGNED_BYTE,e);this.__context.__bindGLTexture2D(null)},__setSamplerState:function(e){if(openfl_display3D_textures_TextureBase.prototype.__setSamplerState.call(this,e)){var t=this.__context.gl;if(openfl_display3D_Context3D.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT!=0){var s;var i=e.filter;switch(i){case 0:s=16;break;case 1:s=2;break;case 2:s=4;break;case 3:s=8;break;default:s=1}if(s>openfl_display3D_Context3D.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT){s=openfl_display3D_Context3D.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT}t.texParameterf(t.TEXTURE_2D,openfl_display3D_Context3D.GL_TEXTURE_MAX_ANISOTROPY_EXT,s)}return true}return false},__uploadFromImage:function(e){var t=this.__context.gl;var s;var i;if(e.buffer.bitsPerPixel==1){s=t.ALPHA;i=t.ALPHA}else{s=openfl_display3D_textures_TextureBase.__textureInternalFormat;i=openfl_display3D_textures_TextureBase.__textureFormat}this.__context.__bindGLTexture2D(this.__textureID);if(e.type!=lime_graphics_ImageType.DATA&&!e.get_premultiplied()){t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1)}else if(!e.get_premultiplied()&&e.get_transparent()){t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1)}if(e.type==lime_graphics_ImageType.DATA){lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.texImage2D(t,t.TEXTURE_2D,0,s,e.buffer.width,e.buffer.height,0,i,t.UNSIGNED_BYTE,e.get_data())}else{lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.texImage2D(t,t.TEXTURE_2D,0,s,i,t.UNSIGNED_BYTE,e.get_src())}this.__context.__bindGLTexture2D(null)},__class__:openfl_display3D_textures_RectangleTexture});var openfl_display3D_textures_Texture=function(){};$hxClasses["openfl.display3D.textures.Texture"]=openfl_display3D_textures_Texture;openfl_display3D_textures_Texture.__name__=["openfl","display3D","textures","Texture"];openfl_display3D_textures_Texture.__super__=openfl_display3D_textures_TextureBase;openfl_display3D_textures_Texture.prototype=$extend(openfl_display3D_textures_TextureBase.prototype,{__setSamplerState:function(e){if(openfl_display3D_textures_TextureBase.prototype.__setSamplerState.call(this,e)){var t=this.__context.gl;if(e.mipfilter!=2&&!this.__samplerState.mipmapGenerated){t.generateMipmap(t.TEXTURE_2D);this.__samplerState.mipmapGenerated=true}if(openfl_display3D_Context3D.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT!=0){var s;var i=e.filter;switch(i){case 0:s=16;break;case 1:s=2;break;case 2:s=4;break;case 3:s=8;break;default:s=1}if(s>openfl_display3D_Context3D.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT){s=openfl_display3D_Context3D.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT}t.texParameterf(t.TEXTURE_2D,openfl_display3D_Context3D.GL_TEXTURE_MAX_ANISOTROPY_EXT,s)}return true}return false},__class__:openfl_display3D_textures_Texture});var openfl_errors_Error=function(e,t){if(t==null){t=0}if(e==null){e=""}this.message=e;this.errorID=t;this.name="Error"};$hxClasses["openfl.errors.Error"]=openfl_errors_Error;openfl_errors_Error.__name__=["openfl","errors","Error"];openfl_errors_Error.prototype={errorID:null,message:null,name:null,getStackTrace:function(){return haxe_CallStack.toString(haxe_CallStack.exceptionStack())},toString:function(){if(this.message!=null){return this.message}else{return"Error"}},__class__:openfl_errors_Error};var openfl_errors_ArgumentError=function(e){if(e==null){e=""}openfl_errors_Error.call(this,e);this.name="ArgumentError"};$hxClasses["openfl.errors.ArgumentError"]=openfl_errors_ArgumentError;openfl_errors_ArgumentError.__name__=["openfl","errors","ArgumentError"];openfl_errors_ArgumentError.__super__=openfl_errors_Error;openfl_errors_ArgumentError.prototype=$extend(openfl_errors_Error.prototype,{__class__:openfl_errors_ArgumentError});var openfl_errors_IOError=function(e){if(e==null){e=""}openfl_errors_Error.call(this,e);this.name="IOError"};$hxClasses["openfl.errors.IOError"]=openfl_errors_IOError;openfl_errors_IOError.__name__=["openfl","errors","IOError"];openfl_errors_IOError.__super__=openfl_errors_Error;openfl_errors_IOError.prototype=$extend(openfl_errors_Error.prototype,{__class__:openfl_errors_IOError});var openfl_errors_EOFError=function(e,t){if(t==null){t=0}openfl_errors_IOError.call(this,"End of file was encountered");this.name="EOFError";this.errorID=2030};$hxClasses["openfl.errors.EOFError"]=openfl_errors_EOFError;openfl_errors_EOFError.__name__=["openfl","errors","EOFError"];openfl_errors_EOFError.__super__=openfl_errors_IOError;openfl_errors_EOFError.prototype=$extend(openfl_errors_IOError.prototype,{__class__:openfl_errors_EOFError});var openfl_errors_IllegalOperationError=function(e){if(e==null){e=""}openfl_errors_Error.call(this,e,0);this.name="IllegalOperationError"};$hxClasses["openfl.errors.IllegalOperationError"]=openfl_errors_IllegalOperationError;openfl_errors_IllegalOperationError.__name__=["openfl","errors","IllegalOperationError"];openfl_errors_IllegalOperationError.__super__=openfl_errors_Error;openfl_errors_IllegalOperationError.prototype=$extend(openfl_errors_Error.prototype,{__class__:openfl_errors_IllegalOperationError});var openfl_errors_RangeError=function(e){if(e==null){e=""}openfl_errors_Error.call(this,e,0);this.name="RangeError"};$hxClasses["openfl.errors.RangeError"]=openfl_errors_RangeError;openfl_errors_RangeError.__name__=["openfl","errors","RangeError"];openfl_errors_RangeError.__super__=openfl_errors_Error;openfl_errors_RangeError.prototype=$extend(openfl_errors_Error.prototype,{__class__:openfl_errors_RangeError});var openfl_errors_TypeError=function(e){if(e==null){e=""}openfl_errors_Error.call(this,e,0);this.name="TypeError"};$hxClasses["openfl.errors.TypeError"]=openfl_errors_TypeError;openfl_errors_TypeError.__name__=["openfl","errors","TypeError"];openfl_errors_TypeError.__super__=openfl_errors_Error;openfl_errors_TypeError.prototype=$extend(openfl_errors_Error.prototype,{__class__:openfl_errors_TypeError});var openfl_events_ActivityEvent=function(e,t,s,i){if(i==null){i=false}if(s==null){s=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,s);this.activating=i};$hxClasses["openfl.events.ActivityEvent"]=openfl_events_ActivityEvent;openfl_events_ActivityEvent.__name__=["openfl","events","ActivityEvent"];openfl_events_ActivityEvent.__super__=openfl_events_Event;openfl_events_ActivityEvent.prototype=$extend(openfl_events_Event.prototype,{activating:null,__class__:openfl_events_ActivityEvent});var openfl_events_TextEvent=function(e,t,s,i){if(i==null){i=""}if(s==null){s=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,s);this.text=i};$hxClasses["openfl.events.TextEvent"]=openfl_events_TextEvent;openfl_events_TextEvent.__name__=["openfl","events","TextEvent"];openfl_events_TextEvent.__super__=openfl_events_Event;openfl_events_TextEvent.prototype=$extend(openfl_events_Event.prototype,{text:null,__class__:openfl_events_TextEvent});var openfl_events_ErrorEvent=function(e,t,s,i,a){if(a==null){a=0}if(i==null){i=""}if(s==null){s=false}if(t==null){t=false}openfl_events_TextEvent.call(this,e,t,s,i);this.errorID=a};$hxClasses["openfl.events.ErrorEvent"]=openfl_events_ErrorEvent;openfl_events_ErrorEvent.__name__=["openfl","events","ErrorEvent"];openfl_events_ErrorEvent.__super__=openfl_events_TextEvent;openfl_events_ErrorEvent.prototype=$extend(openfl_events_TextEvent.prototype,{errorID:null,__class__:openfl_events_ErrorEvent});var openfl_events_AsyncErrorEvent=function(){};$hxClasses["openfl.events.AsyncErrorEvent"]=openfl_events_AsyncErrorEvent;openfl_events_AsyncErrorEvent.__name__=["openfl","events","AsyncErrorEvent"];openfl_events_AsyncErrorEvent.__super__=openfl_events_ErrorEvent;openfl_events_AsyncErrorEvent.prototype=$extend(openfl_events_ErrorEvent.prototype,{__class__:openfl_events_AsyncErrorEvent});var openfl_events__$EventDispatcher_DispatchIterator=function(e){this.active=false;this.reset(e)};$hxClasses["openfl.events._EventDispatcher.DispatchIterator"]=openfl_events__$EventDispatcher_DispatchIterator;openfl_events__$EventDispatcher_DispatchIterator.__name__=["openfl","events","_EventDispatcher","DispatchIterator"];openfl_events__$EventDispatcher_DispatchIterator.prototype={active:null,index:null,isCopy:null,list:null,copy:function(){if(!this.isCopy){this.list=this.list.slice();this.isCopy=true}},hasNext:function(){return this.index0){functionName+=".bind("+thisArg+")"}}var fn;try{fn=eval(functionName)}catch(e){haxe_CallStack.lastException=e;return null}if(Type["typeof"](fn)!=ValueType.TFunction){return null}if(p1==null){callResponse=fn()}else if(p2==null){callResponse=fn(p1)}else if(p3==null){callResponse=fn(p1,p2)}else if(p4==null){callResponse=fn(p1,p2,p3)}else if(p5==null){callResponse=fn(p1,p2,p3,p4)}else{callResponse=fn(p1,p2,p3,p4,p5)}return callResponse};var openfl_filters_BitmapFilter=function(){this.__bottomExtension=0;this.__leftExtension=0;this.__needSecondBitmapData=true;this.__numShaderPasses=0;this.__preserveObject=false;this.__rightExtension=0;this.__shaderBlendMode=10;this.__topExtension=0;this.__smooth=true};$hxClasses["openfl.filters.BitmapFilter"]=openfl_filters_BitmapFilter;openfl_filters_BitmapFilter.__name__=["openfl","filters","BitmapFilter"];openfl_filters_BitmapFilter.prototype={__bottomExtension:null,__leftExtension:null,__needSecondBitmapData:null,__numShaderPasses:null,__preserveObject:null,__renderDirty:null,__rightExtension:null,__shaderBlendMode:null,__smooth:null,__topExtension:null,__applyFilter:function(e,t,s,i){return t},__initShader:function(e,t){return null},__class__:openfl_filters_BitmapFilter};var openfl_filters_BitmapFilterShader=function(e){if(this.__glFragmentSource==null){this.__glFragmentSource="varying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec2 openfl_TextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tgl_FragColor = texture2D (openfl_Texture, openfl_TextureCoordv);\n\t\t\t\n\t\t}"}if(this.__glVertexSource==null){this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\t\n\t\tvarying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\t\t\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\t\n\t\t}"}openfl_display_Shader.call(this,e);this.__isGenerated=true;this.__initGL()};$hxClasses["openfl.filters.BitmapFilterShader"]=openfl_filters_BitmapFilterShader;openfl_filters_BitmapFilterShader.__name__=["openfl","filters","BitmapFilterShader"];openfl_filters_BitmapFilterShader.__super__=openfl_display_Shader;openfl_filters_BitmapFilterShader.prototype=$extend(openfl_display_Shader.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_TextureSize:null,openfl_Texture:null,__class__:openfl_filters_BitmapFilterShader});var openfl_filters__$BlurFilter_BlurShader=function(){if(this.__glFragmentSource==null){this.__glFragmentSource="uniform sampler2D openfl_Texture;\n\t\t\n\t\tvarying vec2 vBlurCoords[7];\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvec4 sum = vec4(0.0);\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[0]) * 0.00443;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[1]) * 0.05399;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[2]) * 0.24197;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[3]) * 0.39894;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[4]) * 0.24197;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[5]) * 0.05399;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[6]) * 0.00443;\n\t\t\t\n\t\t\tgl_FragColor = sum;\n\t\t\t\n\t\t}"}if(this.__glVertexSource==null){this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\t\n\t\tuniform vec2 uRadius;\n\t\tvarying vec2 vBlurCoords[7];\n\t\tuniform vec2 uTextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\t\n\t\t\tvec2 r = uRadius / uTextureSize;\n\t\t\tvBlurCoords[0] = openfl_TextureCoord - r * 1.0;\n\t\t\tvBlurCoords[1] = openfl_TextureCoord - r * 0.75;\n\t\t\tvBlurCoords[2] = openfl_TextureCoord - r * 0.5;\n\t\t\tvBlurCoords[3] = openfl_TextureCoord;\n\t\t\tvBlurCoords[4] = openfl_TextureCoord + r * 0.5;\n\t\t\tvBlurCoords[5] = openfl_TextureCoord + r * 0.75;\n\t\t\tvBlurCoords[6] = openfl_TextureCoord + r * 1.0;\n\t\t\t\n\t\t}"}openfl_filters_BitmapFilterShader.call(this);this.uRadius.value=[0,0];this.__isGenerated=true;this.__initGL()};$hxClasses["openfl.filters._BlurFilter.BlurShader"]=openfl_filters__$BlurFilter_BlurShader;openfl_filters__$BlurFilter_BlurShader.__name__=["openfl","filters","_BlurFilter","BlurShader"];openfl_filters__$BlurFilter_BlurShader.__super__=openfl_filters_BitmapFilterShader;openfl_filters__$BlurFilter_BlurShader.prototype=$extend(openfl_filters_BitmapFilterShader.prototype,{__update:function(){this.uTextureSize.value=[this.__texture.input.width,this.__texture.input.height];openfl_filters_BitmapFilterShader.prototype.__update.call(this)},uRadius:null,uTextureSize:null,__class__:openfl_filters__$BlurFilter_BlurShader});var openfl_filters_BlurFilter=function(e,t,s){if(s==null){s=1}if(t==null){t=4}if(e==null){e=4}openfl_filters_BitmapFilter.call(this);this.set_blurX(e);this.set_blurY(t);this.set_quality(s);this.__needSecondBitmapData=true;this.__preserveObject=false;this.__renderDirty=true};$hxClasses["openfl.filters.BlurFilter"]=openfl_filters_BlurFilter;openfl_filters_BlurFilter.__name__=["openfl","filters","BlurFilter"];openfl_filters_BlurFilter.__super__=openfl_filters_BitmapFilter;openfl_filters_BlurFilter.prototype=$extend(openfl_filters_BitmapFilter.prototype,{__blurX:null,__blurY:null,__horizontalPasses:null,__quality:null,__verticalPasses:null,__applyFilter:function(e,t,s,i){var a=lime__$internal_graphics_ImageDataUtil.gaussianBlur(e.image,t.image,s.__toLimeRectangle(),i.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality);if(a==e.image){return e}return t},__initShader:function(e,t){if(t<=this.__horizontalPasses){var s=Math.pow(.5,t>>1);openfl_filters_BlurFilter.__blurShader.uRadius.value[0]=this.get_blurX()*s;openfl_filters_BlurFilter.__blurShader.uRadius.value[1]=0}else{var i=Math.pow(.5,t-this.__horizontalPasses>>1);openfl_filters_BlurFilter.__blurShader.uRadius.value[0]=0;openfl_filters_BlurFilter.__blurShader.uRadius.value[1]=this.get_blurY()*i}return openfl_filters_BlurFilter.__blurShader},get_blurX:function(){return this.__blurX},set_blurX:function(e){if(e!=this.__blurX){this.__blurX=e;this.__renderDirty=true;this.__leftExtension=e>0?Math.ceil(e):0;this.__rightExtension=this.__leftExtension}return e},get_blurY:function(){return this.__blurY},set_blurY:function(e){if(e!=this.__blurY){this.__blurY=e;this.__renderDirty=true;this.__topExtension=e>0?Math.ceil(e):0;this.__bottomExtension=this.__topExtension}return e},set_quality:function(e){this.__horizontalPasses=this.__blurX<=0?0:Math.round(this.__blurX*(e/4))+1;this.__verticalPasses=this.__blurY<=0?0:Math.round(this.__blurY*(e/4))+1;this.__numShaderPasses=this.__horizontalPasses+this.__verticalPasses;if(e!=this.__quality){this.__renderDirty=true}return this.__quality=e},__class__:openfl_filters_BlurFilter,__properties__:{set_quality:"set_quality",set_blurY:"set_blurY",get_blurY:"get_blurY",set_blurX:"set_blurX",get_blurX:"get_blurX"}});var openfl_filters__$ColorMatrixFilter_ColorMatrixShader=function(){if(this.__glFragmentSource==null){this.__glFragmentSource="varying vec2 openfl_TextureCoordv;\n\t\tuniform sampler2D openfl_Texture;\n\t\t\n\t\tuniform mat4 uMultipliers;\n\t\tuniform vec4 uOffsets;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\t\t\t\n\t\t\tif (color.a == 0.0) {\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\t\t\t\tcolor = uOffsets + color * uMultipliers;\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a, color.a);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}"}if(this.__glVertexSource==null){this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\t\n\t\tvarying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\t\t\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t\t\n\t\t}"}openfl_filters_BitmapFilterShader.call(this);this.uMultipliers.value=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];this.uOffsets.value=[0,0,0,0];this.__isGenerated=true;this.__initGL()};$hxClasses["openfl.filters._ColorMatrixFilter.ColorMatrixShader"]=openfl_filters__$ColorMatrixFilter_ColorMatrixShader;openfl_filters__$ColorMatrixFilter_ColorMatrixShader.__name__=["openfl","filters","_ColorMatrixFilter","ColorMatrixShader"];openfl_filters__$ColorMatrixFilter_ColorMatrixShader.__super__=openfl_filters_BitmapFilterShader;openfl_filters__$ColorMatrixFilter_ColorMatrixShader.prototype=$extend(openfl_filters_BitmapFilterShader.prototype,{init:function(e){var t=this.uMultipliers.value;var s=this.uOffsets.value;t[0]=e[0];t[1]=e[1];t[2]=e[2];t[3]=e[3];t[4]=e[5];t[5]=e[6];t[6]=e[7];t[7]=e[8];t[8]=e[10];t[9]=e[11];t[10]=e[12];t[11]=e[13];t[12]=e[15];t[13]=e[16];t[14]=e[17];t[15]=e[18];s[0]=e[4]/255;s[1]=e[9]/255;s[2]=e[14]/255;s[3]=e[19]/255},uMultipliers:null,uOffsets:null,__class__:openfl_filters__$ColorMatrixFilter_ColorMatrixShader});var openfl_filters_ColorMatrixFilter=function(e){openfl_filters_BitmapFilter.call(this);this.set_matrix(e);this.__numShaderPasses=1;this.__needSecondBitmapData=false};$hxClasses["openfl.filters.ColorMatrixFilter"]=openfl_filters_ColorMatrixFilter;openfl_filters_ColorMatrixFilter.__name__=["openfl","filters","ColorMatrixFilter"];openfl_filters_ColorMatrixFilter.__super__=openfl_filters_BitmapFilter;openfl_filters_ColorMatrixFilter.prototype=$extend(openfl_filters_BitmapFilter.prototype,{__matrix:null,__applyFilter:function(e,t,s,i){var a=t.image;var r=e.image;lime__$internal_graphics_ImageCanvasUtil.convertToData(a);lime__$internal_graphics_ImageCanvasUtil.convertToData(r);var _=a.get_data();var n=r.get_data();var o=i.x-s.x|0;var l=i.y-s.y|0;var h=t.width*4;var c=e.width*4;var u=a.buffer.format;var f=r.buffer.format;var p=a.buffer.premultiplied;var d=r.buffer.premultiplied;var g;var m=0;var v;var b;var y=s.y|0;var x=s.height|0;while(y>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<24|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((g>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<16|(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((g>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.unmult)]&255)<<8|g&255&255}}if((g&255)==0){m=0}else{var T=Math.max(0,Math.min(this.__matrix[0]*(g>>>24&255)+this.__matrix[1]*(g>>>16&255)+this.__matrix[2]*(g>>>8&255)+this.__matrix[3]*(g&255)+this.__matrix[4],255))|0;m=(T&255)<<24|(m>>>16&255&255)<<16|(m>>>8&255&255)<<8|m&255&255;var S=Math.max(0,Math.min(this.__matrix[5]*(g>>>24&255)+this.__matrix[6]*(g>>>16&255)+this.__matrix[7]*(g>>>8&255)+this.__matrix[8]*(g&255)+this.__matrix[9],255))|0;m=(m>>>24&255&255)<<24|(S&255)<<16|(m>>>8&255&255)<<8|m&255&255;var M=Math.max(0,Math.min(this.__matrix[10]*(g>>>24&255)+this.__matrix[11]*(g>>>16&255)+this.__matrix[12]*(g>>>8&255)+this.__matrix[13]*(g&255)+this.__matrix[14],255))|0;m=(m>>>24&255&255)<<24|(m>>>16&255&255)<<16|(M&255)<<8|m&255&255;var $=Math.max(0,Math.min(this.__matrix[15]*(g>>>24&255)+this.__matrix[16]*(g>>>16&255)+this.__matrix[17]*(g>>>8&255)+this.__matrix[18]*(g&255)+this.__matrix[19],255))|0;m=(m>>>24&255&255)<<24|(m>>>16&255&255)<<16|(m>>>8&255&255)<<8|$&255}if(d){if((m&255)==0){if(m!=0){m=0}}else if((m&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.a16=lime_math__$RGBA_RGBA_$Impl_$.__alpha16[m&255];m=((m>>>24&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<24|((m>>>16&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<16|((m>>>8&255)*lime_math__$RGBA_RGBA_$Impl_$.a16>>16&255)<<8|m&255&255}}switch(f){case 0:n[b]=m>>>24&255;n[b+1]=m>>>16&255;n[b+2]=m>>>8&255;n[b+3]=m&255;break;case 1:n[b]=m&255;n[b+1]=m>>>24&255;n[b+2]=m>>>16&255;n[b+3]=m>>>8&255;break;case 2:n[b]=m>>>8&255;n[b+1]=m>>>16&255;n[b+2]=m>>>24&255;n[b+3]=m&255;break}}}e.image.dirty=true;return e},__initShader:function(e,t){openfl_filters_ColorMatrixFilter.__colorMatrixShader.init(this.get_matrix());return openfl_filters_ColorMatrixFilter.__colorMatrixShader},get_matrix:function(){return this.__matrix},set_matrix:function(e){if(e==null){e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]}return this.__matrix=e},__class__:openfl_filters_ColorMatrixFilter,__properties__:{set_matrix:"set_matrix",get_matrix:"get_matrix"}});var openfl_filters_DropShadowFilter=function(e,t,s,i,a,r,_,n,o,l,h){if(h==null){h=false}if(l==null){l=false}if(o==null){o=false}if(n==null){n=1}if(_==null){_=1}if(r==null){r=4}if(a==null){a=4}if(i==null){i=1}if(s==null){s=0}if(t==null){t=45}if(e==null){e=4}openfl_filters_BitmapFilter.call(this);this.__offsetX=0;this.__offsetY=0;this.__distance=e;this.__angle=t;this.__color=s;this.__alpha=i;this.__blurX=a;this.__blurY=r;this.__strength=_;this.__quality=n;this.__inner=o;this.__knockout=l;this.__hideObject=h;this.__updateSize();this.__needSecondBitmapData=true;this.__preserveObject=!this.__hideObject;this.__renderDirty=true};$hxClasses["openfl.filters.DropShadowFilter"]=openfl_filters_DropShadowFilter;openfl_filters_DropShadowFilter.__name__=["openfl","filters","DropShadowFilter"];openfl_filters_DropShadowFilter.__super__=openfl_filters_BitmapFilter;openfl_filters_DropShadowFilter.prototype=$extend(openfl_filters_BitmapFilter.prototype,{__alpha:null,__angle:null,__blurX:null,__blurY:null,__color:null,__distance:null,__hideObject:null,__inner:null,__knockout:null,__offsetX:null,__offsetY:null,__quality:null,__strength:null,__applyFilter:function(e,t,s,i){var a=this.__color>>16&255;var r=this.__color>>8&255;var _=this.__color&255;var n=new openfl_geom_Point(i.x+this.__offsetX,i.y+this.__offsetY);var o=lime__$internal_graphics_ImageDataUtil.gaussianBlur(e.image,t.image,s.__toLimeRectangle(),n.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality,this.__strength);o.colorTransform(o.get_rect(),new openfl_geom_ColorTransform(0,0,0,this.__alpha,a,r,_,0).__toLimeColorMatrix());if(o==e.image){return e}return t},__updateSize:function(){this.__offsetX=this.__distance*Math.cos(this.__angle*Math.PI/180)|0;this.__offsetY=this.__distance*Math.sin(this.__angle*Math.PI/180)|0;this.__topExtension=Math.ceil((this.__offsetY<0?-this.__offsetY:0)+this.__blurY);this.__bottomExtension=Math.ceil((this.__offsetY>0?this.__offsetY:0)+this.__blurY);this.__leftExtension=Math.ceil((this.__offsetX<0?-this.__offsetX:0)+this.__blurX);this.__rightExtension=Math.ceil((this.__offsetX>0?this.__offsetX:0)+this.__blurX)},set_alpha:function(e){if(e!=this.__alpha){this.__renderDirty=true}return this.__alpha=e},set_angle:function(e){if(e!=this.__angle){this.__angle=e;this.__renderDirty=true;this.__updateSize()}return e},set_blurX:function(e){if(e!=this.__blurX){this.__blurX=e;this.__renderDirty=true;this.__updateSize()}return e},set_blurY:function(e){if(e!=this.__blurY){this.__blurY=e;this.__renderDirty=true;this.__updateSize()}return e},set_distance:function(e){if(e!=this.__distance){this.__distance=e;this.__renderDirty=true;this.__updateSize()}return e},set_quality:function(e){if(e!=this.__quality){this.__renderDirty=true}return this.__quality=e},__class__:openfl_filters_DropShadowFilter,__properties__:{set_quality:"set_quality",set_distance:"set_distance",set_blurY:"set_blurY",set_blurX:"set_blurX",set_angle:"set_angle",set_alpha:"set_alpha"}});var openfl_filters__$GlowFilter_GlowShader=function(){if(this.__glFragmentSource==null){this.__glFragmentSource="uniform sampler2D openfl_Texture;\n\t\t\n\t\tuniform vec4 uColor;\n\t\t\n\t\tvarying vec2 vBlurCoords[7];\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tfloat a = 0.0;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[0]).a * 0.00443;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[1]).a * 0.05399;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[2]).a * 0.24197;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[3]).a * 0.39894;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[4]).a * 0.24197;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[5]).a * 0.05399;\n\t\t\ta += texture2D(openfl_Texture, vBlurCoords[6]).a * 0.00443;\n\t\t\ta *= uColor.a;\n\t\t\t\n\t\t\tgl_FragColor = vec4(uColor.rgb * a, a);\n\t\t\t\n\t\t}"}if(this.__glVertexSource==null){this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\t\n\t\tuniform vec2 uRadius;\n\t\tvarying vec2 vBlurCoords[7];\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\t\n\t\t\tvec2 r = uRadius / openfl_TextureSize;\n\t\t\tvBlurCoords[0] = openfl_TextureCoord - r * 1.0;\n\t\t\tvBlurCoords[1] = openfl_TextureCoord - r * 0.75;\n\t\t\tvBlurCoords[2] = openfl_TextureCoord - r * 0.5;\n\t\t\tvBlurCoords[3] = openfl_TextureCoord;\n\t\t\tvBlurCoords[4] = openfl_TextureCoord + r * 0.5;\n\t\t\tvBlurCoords[5] = openfl_TextureCoord + r * 0.75;\n\t\t\tvBlurCoords[6] = openfl_TextureCoord + r * 1.0;\n\t\t\t\n\t\t}"}openfl_filters_BitmapFilterShader.call(this);this.uRadius.value=[0,0];this.uColor.value=[0,0,0,0];this.__isGenerated=true;this.__initGL()};$hxClasses["openfl.filters._GlowFilter.GlowShader"]=openfl_filters__$GlowFilter_GlowShader;openfl_filters__$GlowFilter_GlowShader.__name__=["openfl","filters","_GlowFilter","GlowShader"];openfl_filters__$GlowFilter_GlowShader.__super__=openfl_filters_BitmapFilterShader;openfl_filters__$GlowFilter_GlowShader.prototype=$extend(openfl_filters_BitmapFilterShader.prototype,{uRadius:null,uColor:null,__class__:openfl_filters__$GlowFilter_GlowShader});var openfl_filters_GlowFilter=function(e,t,s,i,a,r,_,n){if(n==null){n=false}if(_==null){_=false}if(r==null){r=1}if(a==null){a=2}if(i==null){i=6}if(s==null){s=6}if(t==null){t=1}if(e==null){e=16711680}openfl_filters_BitmapFilter.call(this);this.__color=e;this.__alpha=t;this.set_blurX(s);this.set_blurY(i);this.__strength=a;this.set_quality(r);this.__inner=_;this.__knockout=n;this.__needSecondBitmapData=true;this.__preserveObject=true;this.__renderDirty=true};$hxClasses["openfl.filters.GlowFilter"]=openfl_filters_GlowFilter;openfl_filters_GlowFilter.__name__=["openfl","filters","GlowFilter"];openfl_filters_GlowFilter.__super__=openfl_filters_BitmapFilter;openfl_filters_GlowFilter.prototype=$extend(openfl_filters_BitmapFilter.prototype,{__alpha:null,__blurX:null,__blurY:null,__color:null,__horizontalPasses:null,__inner:null,__knockout:null,__quality:null,__strength:null,__verticalPasses:null,__applyFilter:function(e,t,s,i){var a=this.__color>>16&255;var r=this.__color>>8&255;var _=this.__color&255;var n=lime__$internal_graphics_ImageDataUtil.gaussianBlur(e.image,t.image,s.__toLimeRectangle(),i.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality,this.__strength);n.colorTransform(n.get_rect(),new openfl_geom_ColorTransform(0,0,0,this.__alpha,a,r,_,0).__toLimeColorMatrix());if(n==e.image){return e}return t},__initShader:function(e,t){if(t<=this.__horizontalPasses){var s=Math.pow(.5,t>>1);openfl_filters_GlowFilter.__glowShader.uRadius.value[0]=this.get_blurX()*s;openfl_filters_GlowFilter.__glowShader.uRadius.value[1]=0}else{var i=Math.pow(.5,t-this.__horizontalPasses>>1);openfl_filters_GlowFilter.__glowShader.uRadius.value[0]=0;openfl_filters_GlowFilter.__glowShader.uRadius.value[1]=this.get_blurY()*i}openfl_filters_GlowFilter.__glowShader.uColor.value[0]=(this.get_color()>>16&255)/255;openfl_filters_GlowFilter.__glowShader.uColor.value[1]=(this.get_color()>>8&255)/255;openfl_filters_GlowFilter.__glowShader.uColor.value[2]=(this.get_color()&255)/255;openfl_filters_GlowFilter.__glowShader.uColor.value[3]=this.get_alpha()*(this.__strength/this.__numShaderPasses);return openfl_filters_GlowFilter.__glowShader},get_alpha:function(){return this.__alpha},set_alpha:function(e){if(e!=this.__alpha){this.__renderDirty=true}return this.__alpha=e},get_blurX:function(){return this.__blurX},set_blurX:function(e){if(e!=this.__blurX){this.__blurX=e;this.__renderDirty=true;this.__leftExtension=e>0?Math.ceil(e*1.5):0;this.__rightExtension=this.__leftExtension}return e},get_blurY:function(){return this.__blurY},set_blurY:function(e){if(e!=this.__blurY){this.__blurY=e;this.__renderDirty=true;this.__topExtension=e>0?Math.ceil(e*1.5):0;this.__bottomExtension=this.__topExtension}return e},get_color:function(){return this.__color},set_color:function(e){if(e!=this.__color){this.__renderDirty=true}return this.__color=e},set_inner:function(e){if(e!=this.__inner){this.__renderDirty=true}return this.__inner=e},set_quality:function(e){this.__horizontalPasses=this.__blurX<=0?0:Math.round(this.__blurX*(e/4))+1;this.__verticalPasses=this.__blurY<=0?0:Math.round(this.__blurY*(e/4))+1;this.__numShaderPasses=this.__horizontalPasses+this.__verticalPasses;if(e!=this.__quality){this.__renderDirty=true}return this.__quality=e},__class__:openfl_filters_GlowFilter,__properties__:{set_quality:"set_quality",set_inner:"set_inner",set_color:"set_color",get_color:"get_color",set_blurY:"set_blurY",get_blurY:"get_blurY",set_blurX:"set_blurX",get_blurX:"get_blurX",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var openfl_geom_Matrix3D=function(e){if(e!=null&&e.get_length()==16){this.rawData=e.concat(null)}else{this.rawData=openfl__$Vector_Vector_$Impl_$.toFloatVector(null,null,null,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}};$hxClasses["openfl.geom.Matrix3D"]=openfl_geom_Matrix3D;openfl_geom_Matrix3D.__name__=["openfl","geom","Matrix3D"];openfl_geom_Matrix3D.prototype={rawData:null,append:function(e){var t=this.rawData.get(0);var s=this.rawData.get(4);var i=this.rawData.get(8);var a=this.rawData.get(12);var r=this.rawData.get(1);var _=this.rawData.get(5);var n=this.rawData.get(9);var o=this.rawData.get(13);var l=this.rawData.get(2);var h=this.rawData.get(6);var c=this.rawData.get(10);var u=this.rawData.get(14);var f=this.rawData.get(3);var p=this.rawData.get(7);var d=this.rawData.get(11);var g=this.rawData.get(15);var m=e.rawData.get(0);var v=e.rawData.get(4);var b=e.rawData.get(8);var y=e.rawData.get(12);var x=e.rawData.get(1);var P=e.rawData.get(5);var k=e.rawData.get(9);var w=e.rawData.get(13);var C=e.rawData.get(2);var T=e.rawData.get(6);var S=e.rawData.get(10);var M=e.rawData.get(14);var $=e.rawData.get(3);var E=e.rawData.get(7);var B=e.rawData.get(11);var L=e.rawData.get(15);this.rawData.set(0,t*m+r*v+l*b+f*y);this.rawData.set(1,t*x+r*P+l*k+f*w);this.rawData.set(2,t*C+r*T+l*S+f*M);this.rawData.set(3,t*$+r*E+l*B+f*L);this.rawData.set(4,s*m+_*v+h*b+p*y);this.rawData.set(5,s*x+_*P+h*k+p*w);this.rawData.set(6,s*C+_*T+h*S+p*M);this.rawData.set(7,s*$+_*E+h*B+p*L);this.rawData.set(8,i*m+n*v+c*b+d*y);this.rawData.set(9,i*x+n*P+c*k+d*w);this.rawData.set(10,i*C+n*T+c*S+d*M);this.rawData.set(11,i*$+n*E+c*B+d*L);this.rawData.set(12,a*m+o*v+u*b+g*y);this.rawData.set(13,a*x+o*P+u*k+g*w);this.rawData.set(14,a*C+o*T+u*S+g*M);this.rawData.set(15,a*$+o*E+u*B+g*L)},appendTranslation:function(e,t,s){var i=this.rawData;i.set(12,i.get(12)+e);var a=this.rawData;a.set(13,a.get(13)+t);var r=this.rawData;r.set(14,r.get(14)+s)},copyRawDataFrom:function(e,t,s){if(s==null){s=false}if(t==null){t=0}if(s){this.transpose()}var i=e.get_length()-t;var a=0;var r=i;while(a=32){return null}if(s==null){s=new openfl_media_SoundTransform}else{s=s.clone()}var i=openfl_media_SoundMixer.__soundTransform.pan+s.pan;if(i>1){i=1}if(i<-1){i=-1}var a=openfl_media_SoundMixer.__soundTransform.volume*s.volume;var r=new lime_media_AudioSource(this.__buffer);r.offset=e|0;if(t>1){r.set_loops(t-1)}r.set_gain(a);var _=r.get_position();_.x=i;_.z=-1*Math.sqrt(1-Math.pow(i,2));r.set_position(_);return new openfl_media_SoundChannel(r,s)},get_id3:function(){return new openfl_media_ID3Info},get_length:function(){if(this.__buffer!=null){return this.__buffer.get_src().duration()*1e3|0}return 0},AudioBuffer_onURLLoad:function(e){if(e==null){this.dispatchEvent(new openfl_events_IOErrorEvent("ioError"))}else{this.__buffer=e;this.dispatchEvent(new openfl_events_Event("complete"))}},__class__:openfl_media_Sound,__properties__:{get_length:"get_length",get_id3:"get_id3"}});var openfl_media_SoundChannel=function(e,t){openfl_events_EventDispatcher.call(this,this);this.leftPeak=1;this.rightPeak=1;if(t!=null){this.__soundTransform=t}else{this.__soundTransform=new openfl_media_SoundTransform}if(e!=null){this.__source=e;this.__source.onComplete.add($bind(this,this.source_onComplete));this.__isValid=true;this.__source.play()}openfl_media_SoundMixer.__registerSoundChannel(this)};$hxClasses["openfl.media.SoundChannel"]=openfl_media_SoundChannel;openfl_media_SoundChannel.__name__=["openfl","media","SoundChannel"];openfl_media_SoundChannel.__super__=openfl_events_EventDispatcher;openfl_media_SoundChannel.prototype=$extend(openfl_events_EventDispatcher.prototype,{leftPeak:null,rightPeak:null,__isValid:null,__soundTransform:null,__source:null,stop:function(){openfl_media_SoundMixer.__unregisterSoundChannel(this);if(!this.__isValid){return}this.__source.stop();this.__dispose()},__dispose:function(){if(!this.__isValid){return}this.__source.onComplete.remove($bind(this,this.source_onComplete));this.__source.dispose();this.__isValid=false},__updateTransform:function(){this.set_soundTransform(this.get_soundTransform())},get_position:function(){if(!this.__isValid){return 0}return this.__source.get_currentTime()+this.__source.offset},set_position:function(e){if(!this.__isValid){return 0}this.__source.set_currentTime((e|0)-this.__source.offset);return e},get_soundTransform:function(){return this.__soundTransform.clone()},set_soundTransform:function(e){if(e!=null){this.__soundTransform.pan=e.pan;this.__soundTransform.volume=e.volume;var t=openfl_media_SoundMixer.__soundTransform.pan+this.__soundTransform.pan;if(t<-1){t=-1}if(t>1){t=1}var s=openfl_media_SoundMixer.__soundTransform.volume*this.__soundTransform.volume;if(this.__isValid){this.__source.set_gain(s);var i=this.__source.get_position();i.x=t;i.z=-1*Math.sqrt(1-Math.pow(t,2));this.__source.set_position(i);return e}}return e},source_onComplete:function(){openfl_media_SoundMixer.__unregisterSoundChannel(this);this.__dispose();this.dispatchEvent(new openfl_events_Event("soundComplete"))},__class__:openfl_media_SoundChannel,__properties__:{set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_position:"set_position",get_position:"get_position"}});var openfl_media_SoundLoaderContext=function(){};$hxClasses["openfl.media.SoundLoaderContext"]=openfl_media_SoundLoaderContext;openfl_media_SoundLoaderContext.__name__=["openfl","media","SoundLoaderContext"];var openfl_media_SoundTransform=function(e,t){if(t==null){t=0}if(e==null){e=1}this.volume=e;this.pan=t;this.leftToLeft=0;this.leftToRight=0;this.rightToLeft=0;this.rightToRight=0};$hxClasses["openfl.media.SoundTransform"]=openfl_media_SoundTransform;openfl_media_SoundTransform.__name__=["openfl","media","SoundTransform"];openfl_media_SoundTransform.prototype={leftToLeft:null,leftToRight:null,pan:null,rightToLeft:null,rightToRight:null,volume:null,clone:function(){return new openfl_media_SoundTransform(this.volume,this.pan)},__class__:openfl_media_SoundTransform};var openfl_media_SoundMixer=function(){};$hxClasses["openfl.media.SoundMixer"]=openfl_media_SoundMixer;openfl_media_SoundMixer.__name__=["openfl","media","SoundMixer"];openfl_media_SoundMixer.__registerSoundChannel=function(e){openfl_media_SoundMixer.__soundChannels.push(e)};openfl_media_SoundMixer.__unregisterSoundChannel=function(e){HxOverrides.remove(openfl_media_SoundMixer.__soundChannels,e)};var openfl_net_NetConnection=function(){openfl_events_EventDispatcher.call(this)};$hxClasses["openfl.net.NetConnection"]=openfl_net_NetConnection;openfl_net_NetConnection.__name__=["openfl","net","NetConnection"];openfl_net_NetConnection.__super__=openfl_events_EventDispatcher;openfl_net_NetConnection.prototype=$extend(openfl_events_EventDispatcher.prototype,{connect:function(e,t,s,i,a,r){if(e!=null){throw new js__$Boot_HaxeError('Error: Can only connect in "HTTP streaming" mode')}this.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,true,{code:"NetConnection.Connect.Success"}))},__class__:openfl_net_NetConnection});var openfl_net_SharedObject=function(){openfl_events_EventDispatcher.call(this);this.client=this;this.objectEncoding=openfl_net_SharedObject.defaultObjectEncoding};$hxClasses["openfl.net.SharedObject"]=openfl_net_SharedObject;openfl_net_SharedObject.__name__=["openfl","net","SharedObject"];openfl_net_SharedObject.getLocal=function(e,t,s){if(s==null){s=false}var i=[" ","~","%","&","\\",";",":",'"',"'",",","<",">","?","#"];var a=true;if(e==null||e==""){a=false}else{var r=0;while(r-1){a=false;break}}}if(!a){throw new js__$Boot_HaxeError(new openfl_errors_Error("Error #2134: Cannot create SharedObject."))}if(t==null){t=window.location.href}if(openfl_net_SharedObject.__sharedObjects==null){openfl_net_SharedObject.__sharedObjects=new haxe_ds_StringMap;if(lime_app_Application.current!=null){lime_app_Application.current.onExit.add(openfl_net_SharedObject.application_onExit)}}var n=t+"/"+e;var o=openfl_net_SharedObject.__sharedObjects;if(!(__map_reserved[n]!=null?o.existsReserved(n):o.h.hasOwnProperty(n))){var l=new openfl_net_SharedObject;l.data={};l.__localPath=t;l.__name=e;var h=null;try{var c=js_Browser.getLocalStorage();if(c!=null){h=c.getItem(t+":"+e)}}catch(e){haxe_CallStack.lastException=e}if(h!=null&&h!=""){try{var u=new haxe_Unserializer(h);u.setResolver({resolveEnum:Type.resolveEnum,resolveClass:openfl_net_SharedObject.__resolveClass});l.data=u.unserialize()}catch(e){haxe_CallStack.lastException=e}}var f=openfl_net_SharedObject.__sharedObjects;if(__map_reserved[n]!=null){f.setReserved(n,l)}else{f.h[n]=l}}var p=openfl_net_SharedObject.__sharedObjects;if(__map_reserved[n]!=null){return p.getReserved(n)}else{return p.h[n]}};openfl_net_SharedObject.__resolveClass=function(e){if(e!=null){if(StringTools.startsWith(e,"neash.")){e=StringTools.replace(e,"neash.","openfl.")}if(StringTools.startsWith(e,"native.")){e=StringTools.replace(e,"native.","openfl.")}if(StringTools.startsWith(e,"flash.")){e=StringTools.replace(e,"flash.","openfl.")}if(StringTools.startsWith(e,"openfl._v2.")){e=StringTools.replace(e,"openfl._v2.","openfl.")}if(StringTools.startsWith(e,"openfl._legacy.")){e=StringTools.replace(e,"openfl._legacy.","openfl.")}return Type.resolveClass(e)}return null};openfl_net_SharedObject.application_onExit=function(e){var t=openfl_net_SharedObject.__sharedObjects;var s=new haxe_ds__$StringMap_StringMapIterator(t,t.arrayKeys());while(s.hasNext()){var i=s.next();i.flush()}};openfl_net_SharedObject.__super__=openfl_events_EventDispatcher;openfl_net_SharedObject.prototype=$extend(openfl_events_EventDispatcher.prototype,{client:null,data:null,objectEncoding:null,__localPath:null,__name:null,flush:function(e){if(e==null){e=0}if(Reflect.fields(this.data).length==0){return 0}var t=haxe_Serializer.run(this.data);try{var s=js_Browser.getLocalStorage();if(s!=null){s.removeItem(this.__localPath+":"+this.__name);s.setItem(this.__localPath+":"+this.__name,t)}}catch(e){haxe_CallStack.lastException=e;return 1}return 0},__class__:openfl_net_SharedObject});var openfl_net_URLLoader=function(e){openfl_events_EventDispatcher.call(this);this.bytesLoaded=0;this.bytesTotal=0;this.dataFormat=1;if(e!=null){this.load(e)}};$hxClasses["openfl.net.URLLoader"]=openfl_net_URLLoader;openfl_net_URLLoader.__name__=["openfl","net","URLLoader"];openfl_net_URLLoader.__super__=openfl_events_EventDispatcher;openfl_net_URLLoader.prototype=$extend(openfl_events_EventDispatcher.prototype,{bytesLoaded:null,bytesTotal:null,data:null,dataFormat:null,__httpRequest:null,load:function(e){var s=this;if(this.dataFormat==0){var t=new lime_net__$HTTPRequest_$openfl_$utils_$ByteArray;this.__prepareRequest(t,e);t.load().onProgress($bind(this,this.httpRequest_onProgress)).onError($bind(this,this.httpRequest_onError)).onComplete(function(e){s.__dispatchStatus();s.data=e;var t=new openfl_events_Event("complete");s.dispatchEvent(t)})}else{var i=new lime_net__$HTTPRequest_$String;this.__prepareRequest(i,e);i.load().onProgress($bind(this,this.httpRequest_onProgress)).onError($bind(this,this.httpRequest_onError)).onComplete(function(e){s.__dispatchStatus();s.data=e;var t=new openfl_events_Event("complete");s.dispatchEvent(t)})}},__dispatchStatus:function(){var e=new openfl_events_HTTPStatusEvent("httpStatus",false,false,this.__httpRequest.responseStatus);e.responseURL=this.__httpRequest.uri;var t=[];if(this.__httpRequest.enableResponseHeaders&&this.__httpRequest.responseHeaders!=null){var s=0;var i=this.__httpRequest.responseHeaders;while(s0?openfl_net_URLRequestDefaults.idleTimeout:3e4;this.manageCookies=openfl_net_URLRequestDefaults.manageCookies;this.method="GET";this.requestHeaders=[];this.userAgent=openfl_net_URLRequestDefaults.userAgent};$hxClasses["openfl.net.URLRequest"]=openfl_net_URLRequest;openfl_net_URLRequest.__name__=["openfl","net","URLRequest"];openfl_net_URLRequest.prototype={contentType:null,data:null,followRedirects:null,idleTimeout:null,manageCookies:null,method:null,requestHeaders:null,url:null,userAgent:null,__class__:openfl_net_URLRequest};var openfl_net_URLRequestDefaults=function(){};$hxClasses["openfl.net.URLRequestDefaults"]=openfl_net_URLRequestDefaults;openfl_net_URLRequestDefaults.__name__=["openfl","net","URLRequestDefaults"];var openfl_net_URLRequestHeader=function(e,t){if(t==null){t=""}if(e==null){e=""}this.name=e;this.value=t};$hxClasses["openfl.net.URLRequestHeader"]=openfl_net_URLRequestHeader;openfl_net_URLRequestHeader.__name__=["openfl","net","URLRequestHeader"];openfl_net_URLRequestHeader.prototype={name:null,value:null,__class__:openfl_net_URLRequestHeader};var openfl_system_ApplicationDomain=function(e){if(e!=null){this.parentDomain=e}else{this.parentDomain=openfl_system_ApplicationDomain.currentDomain}};$hxClasses["openfl.system.ApplicationDomain"]=openfl_system_ApplicationDomain;openfl_system_ApplicationDomain.__name__=["openfl","system","ApplicationDomain"];openfl_system_ApplicationDomain.prototype={parentDomain:null,__class__:openfl_system_ApplicationDomain};var openfl_system_Capabilities=function(){};$hxClasses["openfl.system.Capabilities"]=openfl_system_Capabilities;openfl_system_Capabilities.__name__=["openfl","system","Capabilities"];openfl_system_Capabilities.__properties__={get_screenResolutionY:"get_screenResolutionY",get_screenResolutionX:"get_screenResolutionX"};openfl_system_Capabilities.get_screenResolutionX=function(){var e=openfl__$internal_Lib.current.stage;var t=0;if(e==null){return 0}if(e.window!=null){var s=e.window.get_display();if(s!=null){t=Math.ceil(s.currentMode.width*e.window.__scale)}}if(t>0){return t}return e.stageWidth};openfl_system_Capabilities.get_screenResolutionY=function(){var e=openfl__$internal_Lib.current.stage;var t=0;if(e==null){return 0}if(e.window!=null){var s=e.window.get_display();if(s!=null){t=Math.ceil(s.currentMode.height*e.window.__scale)}}if(t>0){return t}return e.stageHeight};var openfl_system_LoaderContext=function(){};$hxClasses["openfl.system.LoaderContext"]=openfl_system_LoaderContext;openfl_system_LoaderContext.__name__=["openfl","system","LoaderContext"];var openfl_system_Security=function(){};$hxClasses["openfl.system.Security"]=openfl_system_Security;openfl_system_Security.__name__=["openfl","system","Security"];openfl_system_Security.allowDomain=function(e,t,s,i,a){};var openfl_text_Font=function(e){lime_text_Font.call(this,e)};$hxClasses["openfl.text.Font"]=openfl_text_Font;openfl_text_Font.__name__=["openfl","text","Font"];openfl_text_Font.enumerateFonts=function(e){if(e==null){e=false}return openfl_text_Font.__registeredFonts};openfl_text_Font.fromFile=function(e){var t=new openfl_text_Font;t.__fromFile(e);return t};openfl_text_Font.loadFromName=function(e){return lime_text_Font.loadFromName(e).then(function(e){var t=new openfl_text_Font;t.__fromLimeFont(e);return lime_app_Future.withValue(t)})};openfl_text_Font.__super__=lime_text_Font;openfl_text_Font.prototype=$extend(lime_text_Font.prototype,{__fromLimeFont:function(e){this.__copyFrom(e)},__class__:openfl_text_Font});var openfl_text_StaticText=function(){openfl_display_DisplayObject.call(this);this.__graphics=new openfl_display_Graphics(this)};$hxClasses["openfl.text.StaticText"]=openfl_text_StaticText;openfl_text_StaticText.__name__=["openfl","text","StaticText"];openfl_text_StaticText.__super__=openfl_display_DisplayObject;openfl_text_StaticText.prototype=$extend(openfl_display_DisplayObject.prototype,{text:null,__class__:openfl_text_StaticText});var openfl_text_TextField=function(){this.__forceCachedBitmapUpdate=false;this.__renderedOnCanvasWhileOnDOM=false;openfl_display_InteractiveObject.call(this);this.__caretIndex=-1;this.__displayAsPassword=false;this.__graphics=new openfl_display_Graphics(this);this.__textEngine=new openfl__$internal_text_TextEngine(this);this.__layoutDirty=true;this.__offsetX=0;this.__offsetY=0;this.__mouseWheelEnabled=true;this.__text="";if(openfl_text_TextField.__defaultTextFormat==null){openfl_text_TextField.__defaultTextFormat=new openfl_text_TextFormat("Times New Roman",12,0,false,false,false,"","",3,0,0,0,0);openfl_text_TextField.__defaultTextFormat.blockIndent=0;openfl_text_TextField.__defaultTextFormat.bullet=false;openfl_text_TextField.__defaultTextFormat.letterSpacing=0;openfl_text_TextField.__defaultTextFormat.kerning=false}this.__textFormat=openfl_text_TextField.__defaultTextFormat.clone();this.__textEngine.textFormatRanges.push(new openfl__$internal_text_TextFormatRange(this.__textFormat,0,0));this.addEventListener("mouseDown",$bind(this,this.this_onMouseDown));this.addEventListener("focusIn",$bind(this,this.this_onFocusIn));this.addEventListener("focusOut",$bind(this,this.this_onFocusOut));this.addEventListener("keyDown",$bind(this,this.this_onKeyDown));this.addEventListener("mouseWheel",$bind(this,this.this_onMouseWheel))};$hxClasses["openfl.text.TextField"]=openfl_text_TextField;openfl_text_TextField.__name__=["openfl","text","TextField"];openfl_text_TextField.__super__=openfl_display_InteractiveObject;openfl_text_TextField.prototype=$extend(openfl_display_InteractiveObject.prototype,{__caretIndex:null,__cursorTimer:null,__dirty:null,__displayAsPassword:null,__domRender:null,__inputEnabled:null,__isHTML:null,__layoutDirty:null,__mouseWheelEnabled:null,__offsetX:null,__offsetY:null,__selectionIndex:null,__showCursor:null,__symbol:null,__text:null,__textEngine:null,__textFormat:null,__div:null,__renderedOnCanvasWhileOnDOM:null,__rawHtmlText:null,__forceCachedBitmapUpdate:null,getCharBoundaries:function(e){if(e<0||e>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)-1){return null}var t=new openfl_geom_Rectangle;if(this.__getCharBoundaries(e,t)){return t}else{return null}},getLineIndexOfChar:function(e){if(e<0||e>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){return-1}this.__updateLayout();var t=0;var s=this.__textEngine.layoutGroups;while(t=e){return i.lineIndex}}return-1},getLineOffset:function(e){this.__updateLayout();if(e<0||e>this.__textEngine.numLines-1){return-1}var t=0;var s=this.__textEngine.layoutGroups;while(t=i){this.__textFormat.__merge(e);var r=0;var _=this.__textEngine.textFormatRanges.get_length();while(r<_){var n=r++;a=this.__textEngine.textFormatRanges.get(n);a.format.__merge(this.__textFormat)}}else{var o=this.__textEngine.textFormatRanges.get_length();var l;while(o>0){--o;a=this.__textEngine.textFormatRanges.get(o);if(a.start==t&&a.end==s){a.format=this.__textFormat.clone();a.format.__merge(e);this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}return}if(a.start>=t&&a.end<=s){l=this.__textEngine.textFormatRanges.indexOf(a,0);if(l>-1){this.__textEngine.textFormatRanges.splice(l,1)}}}var h=null;var c=null;if(t>0){var u=0;var f=this.__textEngine.textFormatRanges.get_length();while(u=t){h=a;break}}}if(s=0){a=this.__textEngine.textFormatRanges.get(d);if(a.start<=s){c=a;break}}}if(c==h){c=new openfl__$internal_text_TextFormatRange(c.format.clone(),c.start,c.end);this.__textEngine.textFormatRanges.push(c)}if(h!=null){h.end=t}if(c!=null){c.start=s}var g=this.__textFormat.clone();g.__merge(e);this.__textEngine.textFormatRanges.push(new openfl__$internal_text_TextFormatRange(g,t,s));this.__textEngine.textFormatRanges.sort(function(e,t){if(e.startt.start||e.end>t.end){return 1}return 0})}this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}},__allowMouseFocus:function(){if(!(this.__textEngine.type==1||this.get_tabEnabled())){return this.get_selectable()}else{return true}},__caretBeginningOfLine:function(){if(this.__selectionIndex==this.__caretIndex||this.__caretIndex0){this.__caretIndex--}},__caretPreviousLine:function(e,t){if(e==null){e=this.getLineIndexOfChar(this.__caretIndex)}if(e>0){if(t==null){t=this.__caretIndex}this.__caretIndex=this.__getCharIndexOnDifferentLine(t,e-1)}else{this.__caretIndex=0}},__disableInput:function(){if(this.__inputEnabled&&this.stage!=null){this.stage.window.__backend.setTextInputEnabled(false);this.stage.window.onTextInput.remove($bind(this,this.window_onTextInput));this.stage.window.onKeyDown.remove($bind(this,this.window_onKeyDown));this.__inputEnabled=false;this.__stopCursorTimer()}},__dispatch:function(e){if(e.eventPhase==2&&e.type=="mouseUp"){var t=e;var s=this.__getGroup(this.get_mouseX(),this.get_mouseY(),true);if(s!=null){var i=s.format.url;if(i!=null&&i!=""){if(StringTools.startsWith(i,"event:")){this.dispatchEvent(new openfl_events_TextEvent("link",false,false,HxOverrides.substr(i,6,null)))}else{openfl_Lib.getURL(new openfl_net_URLRequest(i))}}}}return openfl_display_InteractiveObject.prototype.__dispatch.call(this,e)},__enableInput:function(){if(this.stage!=null){this.stage.window.__backend.setTextInputEnabled(true);if(!this.__inputEnabled){this.stage.window.__backend.setTextInputEnabled(true);if(!this.stage.window.onTextInput.has($bind(this,this.window_onTextInput))){this.stage.window.onTextInput.add($bind(this,this.window_onTextInput));this.stage.window.onKeyDown.add($bind(this,this.window_onKeyDown))}this.__inputEnabled=true;this.__startCursorTimer()}}},__fromSymbol:function(e,t){this.__symbol=t;this.set_width(t.width);this.set_height(t.height);this.__offsetX=t.x;this.__offsetY=t.y;this.set_multiline(t.multiline);this.set_wordWrap(t.wordWrap);this.set_displayAsPassword(t.password);if(t.border){this.set_border(true);this.set_background(true)}this.set_selectable(t.selectable);if(t.input){this.set_type(1)}var s=new openfl_text_TextFormat;if(t.color!=null){s.color=t.color&16777215}s.size=Math.round(t.fontHeight/20);var i=e.symbols.h[t.fontID];if(i!=null){s.__ascent=i.ascent/20/1024;s.__descent=i.descent/20/1024}s.font=t.fontName;var a=false;var r=s.font;if(r==null){a=true}else{switch(r){case"":case"_sans":case"_serif":case"_typewriter":a=true;break;default:var _=0;var n=openfl_text_Font.enumerateFonts();while(_lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)-1){return false}this.__updateLayout();var s=0;var i=this.__textEngine.layoutGroups;while(s=a.startIndex&&e<=a.endIndex){try{var r=a.offsetX;var _=0;var n=e-a.startIndex;while(_lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){return-1}if(t<0||t>this.__textEngine.numLines-1){return-1}var s=null;var i=null;var a=0;var r=this.__textEngine.layoutGroups;while(a=_.startIndex&&e<=_.endIndex){s=_.offsetX;var n=0;var o=e-_.startIndex;while(nthis.__textEngine.textHeight){t=this.__textEngine.textHeight}var _=true;var n;var o;var l=0;var h=this.__textEngine.layoutGroups.get_length();while(l=n.offsetY&&t<=n.offsetY+n.height||!s&&o==null){if(e>=n.offsetX&&e<=n.offsetX+n.width||!s&&(o==null||o.lineIndex!=n.lineIndex)){return n}}}return null},__getPosition:function(e,t){var s=this.__getGroup(e,t);if(s==null){return lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}var i=0;var a=0;var r=s.positions.length;while(a0&&this.get_mask().get_height()>0){this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){var t=this.__cacheBitmap;if(!!t.__renderable){var s=e.__getAlpha(t.__worldAlpha);if(s>0&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){var i=e.context;e.__setBlendMode(t.__worldBlendMode);e.__pushMaskObject(t,false);lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(t.__bitmapData.image);i.globalAlpha=s;var a=t.__scrollRect;e.setTransform(t.__renderTransform,i);if(!e.__allowSmoothing||!t.smoothing){i.imageSmoothingEnabled=false}if(a==null){i.drawImage(t.__bitmapData.image.get_src(),0,0,t.__bitmapData.image.width,t.__bitmapData.image.height)}else{i.drawImage(t.__bitmapData.image.get_src(),a.x,a.y,a.width,a.height)}if(!e.__allowSmoothing||!t.smoothing){i.imageSmoothingEnabled=true}e.__popMaskObject(t,false)}}}else{var r=this.__worldTransform;var _=this.__textEngine;var n=_.background||_.border?_.bounds:_.textBounds;var o=this.__graphics;if(this.__dirty){this.__updateLayout();if(o.__bounds==null){o.__bounds=new openfl_geom_Rectangle}o.__bounds.copyFrom(n)}o.__update(e.__worldTransform);if(this.__dirty||o.__softwareDirty){var l=o.__width;var h=o.__height;if((_.text==null||lime_text__$UTF8String_UTF8String_$Impl_$.equals(_.text,""))&&!_.background&&!_.border&&!_.__hasFocus&&(_.type!=1||!_.selectable)||(_.width<=0||_.height<=0)&&_.autoSize!=2){this.__graphics.__canvas=null;this.__graphics.__context=null;this.__graphics.__bitmap=null;this.__graphics.__softwareDirty=false;this.__graphics.set___dirty(false);this.__dirty=false}else{if(this.__graphics.__canvas==null){this.__graphics.__canvas=window.document.createElement("canvas");this.__graphics.__context=this.__graphics.__canvas.getContext("2d")}openfl__$internal_renderer_canvas_CanvasTextField.context=o.__context;var c=o.__renderTransform;if(e.__isDOM){var u=e.pixelRatio;o.__canvas.width=l*u|0;o.__canvas.height=h*u|0;o.__canvas.style.width=l+"px";o.__canvas.style.height=h+"px";var f=openfl_geom_Matrix.__pool.get();f.copyFrom(c);f.scale(u,u);e.setTransform(f,openfl__$internal_renderer_canvas_CanvasTextField.context);openfl_geom_Matrix.__pool.release(f)}else{o.__canvas.width=l;o.__canvas.height=h;openfl__$internal_renderer_canvas_CanvasTextField.context.setTransform(c.a,c.b,c.c,c.d,c.tx,c.ty)}if(openfl__$internal_renderer_canvas_CanvasTextField.clearRect==null){openfl__$internal_renderer_canvas_CanvasTextField.clearRect=typeof navigator!=="undefined"&&typeof navigator["isCocoonJS"]!=="undefined"}if(openfl__$internal_renderer_canvas_CanvasTextField.clearRect){openfl__$internal_renderer_canvas_CanvasTextField.context.clearRect(0,0,o.__canvas.width,o.__canvas.height)}if(_.text!=null&&_.text!=""||_.__hasFocus){var p=_.text;if(!e.__allowSmoothing||_.antiAliasType==0&&_.sharpness==400){o.__context.imageSmoothingEnabled=false}else{o.__context.imageSmoothingEnabled=true}if(_.border||_.background){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,n.width-1,n.height-1);if(_.background){var d=StringTools.hex(_.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+d;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(_.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var g=StringTools.hex(_.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+g;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline="alphabetic";openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign="start";var m=-this.get_scrollH();var v=0;var b=0;var y=this.get_scrollV()-1;while(bthis.get_scrollV()+_.bottomScrollV-2){break}var T="#"+StringTools.hex(C.format.color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.font=openfl__$internal_text_TextEngine.getFont(C.format);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle=T;openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(p,C.startIndex,C.endIndex),C.offsetX+m-n.x,C.offsetY+C.ascent+v-n.y);if(this.__caretIndex>-1&&_.selectable){if(this.__selectionIndex==this.__caretIndex){if(this.__showCursor&&C.startIndex<=this.__caretIndex&&C.endIndex>=this.__caretIndex){P=0;var S=0;var M=this.__caretIndex-C.startIndex;while(S=this.__caretIndex||C.startIndex<=this.__selectionIndex&&C.endIndex>=this.__selectionIndex||C.startIndex>this.__caretIndex&&C.endIndexthis.__selectionIndex&&C.endIndexI){I=C.startIndex}if(C.endIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(_.text)){O=this.getCharBoundaries(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(_.text)-1);O.x+=O.width+2}else{O=this.getCharBoundaries(D)}if(F!=null&&O!=null){openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#000000";openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(F.x+m,F.y+v,O.x-F.x,C.height);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#FFFFFF";openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(p,I,D),m+F.x,C.offsetY+C.ascent+v)}}}if(C.format.underline){openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle=T;openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var G=C.offsetX+m-n.x;var j=Math.floor(C.offsetY+v+C.ascent-n.y)+.5;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(G,j);openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(G+C.width,j);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}}else{if(_.border||_.background){if(_.border){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,n.width-1,n.height-1)}else{openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,n.width,n.height)}if(_.background){var H=StringTools.hex(_.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+H;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(_.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap="square";var U=StringTools.hex(_.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+U;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}if(this.__caretIndex>-1&&_.selectable&&this.__showCursor){var N=-this.get_scrollH();var V=0;var W=0;var z=this.get_scrollV()-1;while(W0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var J=e.context;e.setTransform(this.__renderTransform,J);var Z=this.opaqueBackground;J.fillStyle="rgb("+(Z>>>16&255)+","+(Z>>>8&255)+","+(Z&255)+")";J.fillRect(0,0,this.get_width(),this.get_height());e.__popMaskObject(this)}if(this.__graphics!=null){if(!!this.__renderable){var Q=e.__getAlpha(this.__worldAlpha);if(!(Q<=0)){var ee=this.__graphics;if(ee!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(ee,e);var te=ee.__bounds;var se=ee.__width;var ie=ee.__height;if(ee.__canvas!=null){var ae=e.context;var re=this.__scrollRect;if(se>0&&ie>0&&(re==null||re.width>0&&re.height>0)){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);ae.globalAlpha=Q;e.setTransform(ee.__worldTransform,ae);if(e.__isDOM){var _e=1/e.pixelRatio;ae.scale(_e,_e)}ae.drawImage(ee.__canvas,0,0,se,ie);e.__popMaskObject(this)}}}}}}}}}if(q){e.context.imageSmoothingEnabled=true}}}},__renderDOM:function(e){this.__domRender=true;this.__updateCacheBitmap(e,this.__forceCachedBitmapUpdate);this.__forceCachedBitmapUpdate=false;this.__domRender=false;if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){this.__renderDOMClear(e);this.__cacheBitmap.stage=this.stage;var t=this.__cacheBitmap;if(t.stage!=null&&t.__worldVisible&&t.__renderable&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){e.__pushMaskObject(t);if(t.__bitmapData.image.buffer.__srcImage!=null){openfl__$internal_renderer_dom_DOMBitmap.renderImage(t,e)}else{openfl__$internal_renderer_dom_DOMBitmap.renderCanvas(t,e)}e.__popMaskObject(t)}else{openfl__$internal_renderer_dom_DOMBitmap.clear(t,e)}}else{if(this.__renderedOnCanvasWhileOnDOM){this.__renderedOnCanvasWhileOnDOM=false;if(this.__isHTML&&this.__rawHtmlText!=null){this.__updateText(this.__rawHtmlText);this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}}var s=this;var i=s.__textEngine;if(s.stage!=null&&s.__worldVisible&&s.__renderable){if(s.__dirty||s.__renderTransformChanged||s.__div==null){if(i.text!=""||i.background||i.border||i.type==1){if(s.__div==null){s.__div=window.document.createElement("div");e.__initializeElement(s,s.__div);s.__style.setProperty("outline","none",null);s.__div.addEventListener("input",function(e){e.preventDefault();if(s.get_htmlText()!=s.__div.innerHTML){s.set_htmlText(s.__div.innerHTML);var t=s.__displayAsPassword;s.__dirty=false}},true)}if(!i.wordWrap){s.__style.setProperty("white-space","nowrap",null)}else{s.__style.setProperty("word-wrap","break-word",null)}s.__style.setProperty("overflow","hidden",null);if(i.selectable){s.__style.setProperty("cursor","text",null);s.__style.setProperty("-webkit-user-select","text",null);s.__style.setProperty("-moz-user-select","text",null);s.__style.setProperty("-ms-user-select","text",null);s.__style.setProperty("-o-user-select","text",null)}else{s.__style.setProperty("cursor","inherit",null)}s.__div.contentEditable=i.type==1;var a=s.__style;if(i.background){a.setProperty("background-color","#"+StringTools.hex(i.backgroundColor&16777215,6),null)}else{a.removeProperty("background-color")}var r=i.width;var _=i.height;var n=1;var o=s.__textFormat.size;var l=o;var h=s.__renderTransform;if(h.a!=1||h.d!=1){if(h.a==h.d){n=h.a;h.a=h.d=1}else if(h.a>h.d){n=h.a;h.d/=h.a;h.a=1}else{n=h.d;h.a/=h.d;h.d=1}l*=n;r=Math.ceil(r*n);_=Math.ceil(_*n)}s.__textFormat.size=l;var c=i.text;var u=0;if(!s.__isHTML){c=StringTools.htmlEscape(c)}else{var f=c;while(openfl__$internal_renderer_dom_DOMTextField.__regexFont.match(f)){var p=openfl__$internal_renderer_dom_DOMTextField.__regexFont.matched(0);var d="";if(openfl__$internal_renderer_dom_DOMTextField.__regexFace.match(p)){d+="font-family:'"+openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexFace)+"';"}if(openfl__$internal_renderer_dom_DOMTextField.__regexColor.match(p)){d+="color:#"+openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexColor)+";"}if(openfl__$internal_renderer_dom_DOMTextField.__regexSize.match(p)){var g=openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexSize);var m=HxOverrides.cca(g,0);var v;u=parseFloat(g)*n;if(m==43||m==45){v=l+u}else{v=u}d+="font-size:"+v+"px;"}c=StringTools.replace(c,p,"");f=openfl__$internal_renderer_dom_DOMTextField.__regexFont.matchedRight()}c=c.replace(openfl__$internal_renderer_dom_DOMTextField.__regexCloseFont.r,"")}c=StringTools.replace(c,"

");s.__div.innerHTML=x;var P=new RegExp("\n","g".split("u").join(""));var k=s.__div.innerHTML.replace(P,"
");s.__div.innerHTML=k;var w=new RegExp("\r","g".split("u").join(""));var C=s.__div.innerHTML.replace(w,"
");s.__div.innerHTML=C;a.setProperty("font",openfl__$internal_text_TextEngine.getFont(s.__textFormat),null);s.__textFormat.size=o;s.__textFormat.leading=b;a.setProperty("top","3px",null);if(i.border){a.setProperty("border","solid 1px #"+StringTools.hex(i.borderColor&16777215,6),null);s.__renderTransform.translate(-1,-1);s.__renderTransformChanged=true;s.__transformDirty=true}else if(a.border!=""){a.removeProperty("border");s.__renderTransformChanged=true}a.setProperty("color","#"+StringTools.hex(s.__textFormat.color&16777215,6),null);a.setProperty("width",r+"px",null);a.setProperty("height",_+"px",null);var T=s.__textFormat.align;switch(T){case 0:a.setProperty("text-align","center",null);break;case 4:a.setProperty("text-align","right",null);break;default:a.setProperty("text-align","left",null)}s.__dirty=false}else if(s.__div!=null){e.element.removeChild(s.__div);s.__div=null}}if(s.__div!=null){var S=e.__roundPixels;e.__roundPixels=true;e.__updateClip(s);e.__applyStyle(s,true,true,true);e.__roundPixels=S}}else{openfl__$internal_renderer_dom_DOMTextField.clear(s,e)}}this.__renderEvent(e)},__renderDOMClear:function(e){openfl__$internal_renderer_dom_DOMTextField.clear(this,e)},__renderGL:function(e){this.__updateCacheBitmap(e,false);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){openfl__$internal_renderer_context3D_Context3DBitmap.render(this.__cacheBitmap,e)}else{var t=e.__softwareRenderer;var s=this.__worldTransform;var i=this.__textEngine;var a=i.background||i.border?i.bounds:i.textBounds;var r=this.__graphics;if(this.__dirty){this.__updateLayout();if(r.__bounds==null){r.__bounds=new openfl_geom_Rectangle}r.__bounds.copyFrom(a)}r.__update(t.__worldTransform);if(this.__dirty||r.__softwareDirty){var _=r.__width;var n=r.__height;if((i.text==null||lime_text__$UTF8String_UTF8String_$Impl_$.equals(i.text,""))&&!i.background&&!i.border&&!i.__hasFocus&&(i.type!=1||!i.selectable)||(i.width<=0||i.height<=0)&&i.autoSize!=2){this.__graphics.__canvas=null;this.__graphics.__context=null;this.__graphics.__bitmap=null;this.__graphics.__softwareDirty=false;this.__graphics.set___dirty(false);this.__dirty=false}else{if(this.__graphics.__canvas==null){this.__graphics.__canvas=window.document.createElement("canvas");this.__graphics.__context=this.__graphics.__canvas.getContext("2d")}openfl__$internal_renderer_canvas_CanvasTextField.context=r.__context;var o=r.__renderTransform;if(t.__isDOM){var l=t.pixelRatio;r.__canvas.width=_*l|0;r.__canvas.height=n*l|0;r.__canvas.style.width=_+"px";r.__canvas.style.height=n+"px";var h=openfl_geom_Matrix.__pool.get();h.copyFrom(o);h.scale(l,l);t.setTransform(h,openfl__$internal_renderer_canvas_CanvasTextField.context);openfl_geom_Matrix.__pool.release(h)}else{r.__canvas.width=_;r.__canvas.height=n;openfl__$internal_renderer_canvas_CanvasTextField.context.setTransform(o.a,o.b,o.c,o.d,o.tx,o.ty)}if(openfl__$internal_renderer_canvas_CanvasTextField.clearRect==null){openfl__$internal_renderer_canvas_CanvasTextField.clearRect=typeof navigator!=="undefined"&&typeof navigator["isCocoonJS"]!=="undefined"}if(openfl__$internal_renderer_canvas_CanvasTextField.clearRect){openfl__$internal_renderer_canvas_CanvasTextField.context.clearRect(0,0,r.__canvas.width,r.__canvas.height)}if(i.text!=null&&i.text!=""||i.__hasFocus){var c=i.text;if(!t.__allowSmoothing||i.antiAliasType==0&&i.sharpness==400){r.__context.imageSmoothingEnabled=false}else{r.__context.imageSmoothingEnabled=true}if(i.border||i.background){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,a.width-1,a.height-1);if(i.background){var u=StringTools.hex(i.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+u;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(i.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var f=StringTools.hex(i.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+f;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline="alphabetic";openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign="start";var p=-this.get_scrollH();var d=0;var g=0;var m=this.get_scrollV()-1;while(gthis.get_scrollV()+i.bottomScrollV-2){break}var k="#"+StringTools.hex(P.format.color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.font=openfl__$internal_text_TextEngine.getFont(P.format);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle=k;openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(c,P.startIndex,P.endIndex),P.offsetX+p-a.x,P.offsetY+P.ascent+d-a.y);if(this.__caretIndex>-1&&i.selectable){if(this.__selectionIndex==this.__caretIndex){if(this.__showCursor&&P.startIndex<=this.__caretIndex&&P.endIndex>=this.__caretIndex){b=0;var w=0;var C=this.__caretIndex-P.startIndex;while(w=this.__caretIndex||P.startIndex<=this.__selectionIndex&&P.endIndex>=this.__selectionIndex||P.startIndex>this.__caretIndex&&P.endIndexthis.__selectionIndex&&P.endIndexL){L=P.startIndex}if(P.endIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(i.text)){I=this.getCharBoundaries(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(i.text)-1);I.x+=I.width+2}else{I=this.getCharBoundaries(R)}if(A!=null&&I!=null){openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#000000";openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(A.x+p,A.y+d,I.x-A.x,P.height);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#FFFFFF";openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(c,L,R),p+A.x,P.offsetY+P.ascent+d)}}}if(P.format.underline){openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle=k;openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var D=P.offsetX+p-a.x;var F=Math.floor(P.offsetY+d+P.ascent-a.y)+.5;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(D,F);openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(D+P.width,F);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}}else{if(i.border||i.background){if(i.border){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,a.width-1,a.height-1)}else{openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,a.width,a.height)}if(i.background){var O=StringTools.hex(i.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+O;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(i.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap="square";var G=StringTools.hex(i.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+G;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}if(this.__caretIndex>-1&&i.selectable&&this.__showCursor){var j=-this.get_scrollH();var H=0;var U=0;var N=this.get_scrollV()-1;while(U0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var z=e.__context3D;var X=openfl_geom_Rectangle.__pool.get();X.setTo(0,0,this.get_width(),this.get_height());e.__pushMaskRect(X,this.__renderTransform);var Y=this.opaqueBackground;z.clear((Y>>>16&255)/255,(Y>>>8&255)/255,(Y&255)/255,1,0,0,1);e.__popMaskRect();e.__popMaskObject(this);openfl_geom_Rectangle.__pool.release(X)}if(this.__graphics!=null){openfl__$internal_renderer_context3D_Context3DShape.render(this,e)}}}}this.__renderEvent(e)},__renderGLMask:function(e){var t=e.__softwareRenderer;var s=this.__worldTransform;var i=this.__textEngine;var a=i.background||i.border?i.bounds:i.textBounds;var r=this.__graphics;if(this.__dirty){this.__updateLayout();if(r.__bounds==null){r.__bounds=new openfl_geom_Rectangle}r.__bounds.copyFrom(a)}r.__update(t.__worldTransform);if(this.__dirty||r.__softwareDirty){var _=r.__width;var n=r.__height;if((i.text==null||lime_text__$UTF8String_UTF8String_$Impl_$.equals(i.text,""))&&!i.background&&!i.border&&!i.__hasFocus&&(i.type!=1||!i.selectable)||(i.width<=0||i.height<=0)&&i.autoSize!=2){this.__graphics.__canvas=null;this.__graphics.__context=null;this.__graphics.__bitmap=null;this.__graphics.__softwareDirty=false;this.__graphics.set___dirty(false);this.__dirty=false}else{if(this.__graphics.__canvas==null){this.__graphics.__canvas=window.document.createElement("canvas");this.__graphics.__context=this.__graphics.__canvas.getContext("2d")}openfl__$internal_renderer_canvas_CanvasTextField.context=r.__context;var o=r.__renderTransform;if(t.__isDOM){var l=t.pixelRatio;r.__canvas.width=_*l|0;r.__canvas.height=n*l|0;r.__canvas.style.width=_+"px";r.__canvas.style.height=n+"px";var h=openfl_geom_Matrix.__pool.get();h.copyFrom(o);h.scale(l,l);t.setTransform(h,openfl__$internal_renderer_canvas_CanvasTextField.context);openfl_geom_Matrix.__pool.release(h)}else{r.__canvas.width=_;r.__canvas.height=n;openfl__$internal_renderer_canvas_CanvasTextField.context.setTransform(o.a,o.b,o.c,o.d,o.tx,o.ty)}if(openfl__$internal_renderer_canvas_CanvasTextField.clearRect==null){openfl__$internal_renderer_canvas_CanvasTextField.clearRect=typeof navigator!=="undefined"&&typeof navigator["isCocoonJS"]!=="undefined"}if(openfl__$internal_renderer_canvas_CanvasTextField.clearRect){openfl__$internal_renderer_canvas_CanvasTextField.context.clearRect(0,0,r.__canvas.width,r.__canvas.height)}if(i.text!=null&&i.text!=""||i.__hasFocus){var c=i.text;if(!t.__allowSmoothing||i.antiAliasType==0&&i.sharpness==400){r.__context.imageSmoothingEnabled=false}else{r.__context.imageSmoothingEnabled=true}if(i.border||i.background){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,a.width-1,a.height-1);if(i.background){var u=StringTools.hex(i.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+u;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(i.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var f=StringTools.hex(i.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+f;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline="alphabetic";openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign="start";var p=-this.get_scrollH();var d=0;var g=0;var m=this.get_scrollV()-1;while(gthis.get_scrollV()+i.bottomScrollV-2){break}var k="#"+StringTools.hex(P.format.color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.font=openfl__$internal_text_TextEngine.getFont(P.format);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle=k;openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(c,P.startIndex,P.endIndex),P.offsetX+p-a.x,P.offsetY+P.ascent+d-a.y);if(this.__caretIndex>-1&&i.selectable){if(this.__selectionIndex==this.__caretIndex){if(this.__showCursor&&P.startIndex<=this.__caretIndex&&P.endIndex>=this.__caretIndex){b=0;var w=0;var C=this.__caretIndex-P.startIndex;while(w=this.__caretIndex||P.startIndex<=this.__selectionIndex&&P.endIndex>=this.__selectionIndex||P.startIndex>this.__caretIndex&&P.endIndexthis.__selectionIndex&&P.endIndexL){L=P.startIndex}if(P.endIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(i.text)){I=this.getCharBoundaries(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(i.text)-1);I.x+=I.width+2}else{I=this.getCharBoundaries(R)}if(A!=null&&I!=null){openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#000000";openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(A.x+p,A.y+d,I.x-A.x,P.height);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#FFFFFF";openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(c,L,R),p+A.x,P.offsetY+P.ascent+d)}}}if(P.format.underline){openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle=k;openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var D=P.offsetX+p-a.x;var F=Math.floor(P.offsetY+d+P.ascent-a.y)+.5;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(D,F);openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(D+P.width,F);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}}else{if(i.border||i.background){if(i.border){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,a.width-1,a.height-1)}else{openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,a.width,a.height)}if(i.background){var O=StringTools.hex(i.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+O;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(i.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap="square";var G=StringTools.hex(i.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+G;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}if(this.__caretIndex>-1&&i.selectable&&this.__showCursor){var j=-this.get_scrollH();var H=0;var U=0;var N=this.get_scrollV()-1;while(Uthis.__selectionIndex?this.__caretIndex:this.__selectionIndex;if(s==i&&this.__textEngine.maxChars>0&&lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)==this.__textEngine.maxChars){return}if(s>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){s=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}if(i>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){i=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}if(ilime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){r=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}this.setSelection(r,r);this.__updateScrollH()},__replaceText:function(e,t,s,i){if(tlime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)||s==null){return}if(i){s=this.__textEngine.restrictText(s);if(this.__textEngine.maxChars>0){var a=t-e;var r=this.__textEngine.maxChars-lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)+a;if(r<=0){s=""}else if(rlime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){t=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}var _=s.length-(t-e);var n=0;var o;while(n=t){o.end+=_;++n}else if(o.start>=e&&o.end<=t){if(n>0){this.__textEngine.textFormatRanges.splice(n,1)}else{o.start=0;o.end=e+s.length;++n}_-=o.end-o.start}else if(o.start>e&&o.start<=t){o.start+=_;++n}else{++n}}this.__updateScrollH();this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}},__shouldCacheHardware:function(e){if(e==true){return true}else{return false}},__startCursorTimer:function(){this.__cursorTimer=haxe_Timer.delay($bind(this,this.__startCursorTimer),600);this.__showCursor=!this.__showCursor;this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}},__startTextInput:function(){if(this.__caretIndex<0){this.__caretIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text);this.__selectionIndex=this.__caretIndex}var e=openfl_display_DisplayObject.__supportDOM?this.__renderedOnCanvasWhileOnDOM:true;if(e){this.__enableInput()}},__stopCursorTimer:function(){if(this.__cursorTimer!=null){this.__cursorTimer.stop();this.__cursorTimer=null}if(this.__showCursor){this.__showCursor=false;this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}},__stopTextInput:function(){var e=openfl_display_DisplayObject.__supportDOM?this.__renderedOnCanvasWhileOnDOM:true;if(e){this.__disableInput()}},__updateCacheBitmap:function(e,t){if(this.__filters==null&&e.__type=="opengl"&&this.__cacheBitmap==null&&!this.__domRender){return false}if(openfl_display_InteractiveObject.prototype.__updateCacheBitmap.call(this,e,t||this.__dirty)){if(this.__cacheBitmap!=null){this.__cacheBitmap.__renderTransform.tx-=this.__offsetX;this.__cacheBitmap.__renderTransform.ty-=this.__offsetY}return true}return false},__updateLayout:function(){if(this.__layoutDirty){var e=this.__textEngine.width;var t=this.__textEngine.height;this.__textEngine.update();if(this.__textEngine.autoSize!=2){if(this.__textEngine.width!=e){var s=this.__textEngine.autoSize;switch(s){case 0:var i=this;i.set_x(i.get_x()+(e-this.__textEngine.width)/2);break;case 3:var a=this;a.set_x(a.get_x()+(e-this.__textEngine.width));break;default:}}this.__textEngine.getBounds()}this.__layoutDirty=false}},__updateScrollH:function(){if(!this.get_multiline()&&this.get_type()==1){this.__layoutDirty=true;this.__updateLayout();var e=this.__textEngine.textWidth-this.__textEngine.width+4;if(e>0){if(this.__caretIndex>=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.get_text())){this.set_scrollH(Math.ceil(e))}else{var t=openfl_geom_Rectangle.__pool.get();this.__getCharBoundaries(this.__caretIndex,t);if(t.xthis.get_scrollH()+this.__textEngine.width){this.set_scrollH(Math.ceil(t.x-this.__textEngine.width-2))}openfl_geom_Rectangle.__pool.release(t)}}else{this.set_scrollH(0)}}},__updateText:function(e){if(openfl_display_DisplayObject.__supportDOM&&this.__renderedOnCanvasWhileOnDOM){this.__forceCachedBitmapUpdate=this.__text!=e}this.__textEngine.set_text(e);this.__text=this.__textEngine.text;if(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)1){this.__textEngine.textFormatRanges.splice(1,this.__textEngine.textFormatRanges.get_length()-1)}var t=this.__textEngine.textFormatRanges.get(0);t.format=this.__textFormat;t.start=0;if(this.__renderedOnCanvasWhileOnDOM){t.end=e.length;this.__updateText(e)}else{t.end=this.__rawHtmlText.length;this.__updateText(this.__rawHtmlText)}}else{this.__updateText(e)}return e},get_multiline:function(){return this.__textEngine.multiline},set_multiline:function(e){if(e!=this.__textEngine.multiline){this.__dirty=true;this.__layoutDirty=true;this.__updateText(this.__text);this.__updateScrollH();if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__textEngine.multiline=e},get_scrollH:function(){return this.__textEngine.scrollH},set_scrollH:function(e){this.__updateLayout();if(e>this.__textEngine.maxScrollH){e=this.__textEngine.maxScrollH}if(e<0){e=0}if(e!=this.__textEngine.scrollH){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}this.dispatchEvent(new openfl_events_Event("scroll"))}return this.__textEngine.scrollH=e},get_scrollV:function(){return this.__textEngine.scrollV},set_scrollV:function(e){this.__updateLayout();if(e>this.__textEngine.maxScrollV){e=this.__textEngine.maxScrollV}if(e<1){e=1}if(e!=this.__textEngine.scrollV){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}this.dispatchEvent(new openfl_events_Event("scroll"))}return this.__textEngine.scrollV=e},get_selectable:function(){return this.__textEngine.selectable},set_selectable:function(e){if(e!=this.__textEngine.selectable&&this.get_type()==1){if(this.stage!=null&&this.stage.get_focus()==this){this.__startTextInput()}else if(!e){this.__stopTextInput()}}return this.__textEngine.selectable=e},set_sharpness:function(e){if(e!=this.__textEngine.sharpness){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__textEngine.sharpness=e},get_tabEnabled:function(){if(this.__tabEnabled==null){return this.__textEngine.type==1}else{return this.__tabEnabled}},get_text:function(){return this.__text},set_text:function(e){if(this.__isHTML||this.__text!=e){this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}else{return e}if(this.__textEngine.textFormatRanges.get_length()>1){this.__textEngine.textFormatRanges.splice(1,this.__textEngine.textFormatRanges.get_length()-1)}var t=e;var s=this.__textEngine.textFormatRanges.get(0);s.format=this.__textFormat;s.start=0;s.end=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(t);this.__isHTML=false;this.__updateText(e);return e},set_textColor:function(e){if(e!=this.__textFormat.color){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}var t=0;var s=this.__textEngine.textFormatRanges;while(t=0){this.__updateLayout();var t=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY());if(t!=this.__caretIndex){this.__caretIndex=t;if(openfl_display_DisplayObject.__supportDOM){if(this.__renderedOnCanvasWhileOnDOM){this.__forceCachedBitmapUpdate=true}}else{this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}}}},stage_onMouseUp:function(e){if(this.stage==null){return}this.stage.removeEventListener("mouseMove",$bind(this,this.stage_onMouseMove));this.stage.removeEventListener("mouseUp",$bind(this,this.stage_onMouseUp));if(this.stage.get_focus()==this){this.__getWorldTransform();this.__updateLayout();var t=this.__worldTransform;var s=this.get_x();var i=this.get_y();var a=t.a*t.d-t.b*t.c;var r=a==0?-t.tx:1/a*(t.c*(t.ty-i)+t.d*(s-t.tx));var _=this.__worldTransform;var n=this.get_x();var o=this.get_y();var l=_.a*_.d-_.b*_.c;var h=l==0?-_.ty:1/l*(_.a*(o-_.ty)+_.b*(_.tx-n));var c=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY());var u;var f;u=Math.min(this.__selectionIndex,c)|0;f=Math.max(this.__selectionIndex,c)|0;this.__selectionIndex=u;this.__caretIndex=f;if(this.__inputEnabled){this.this_onFocusIn(null);this.__stopCursorTimer();this.__startCursorTimer();if(openfl_display_DisplayObject.__supportDOM&&this.__renderedOnCanvasWhileOnDOM){this.__forceCachedBitmapUpdate=true}}}},this_onAddedToStage:function(e){this.this_onFocusIn(null)},this_onFocusIn:function(e){if(this.get_type()==1&&this.stage!=null&&this.stage.get_focus()==this){this.__startTextInput()}},this_onFocusOut:function(e){this.__stopCursorTimer();if(e.relatedObject==null||!js_Boot.__instanceof(e.relatedObject,openfl_text_TextField)){this.__stopTextInput()}else{if(this.stage!=null){this.stage.window.onTextInput.remove($bind(this,this.window_onTextInput));this.stage.window.onKeyDown.remove($bind(this,this.window_onKeyDown))}this.__inputEnabled=false}if(this.__selectionIndex!=this.__caretIndex){this.__selectionIndex=this.__caretIndex;this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}},this_onKeyDown:function(e){if(this.get_selectable()&&this.get_type()!=1&&e.keyCode==67&&(e.commandKey||e.ctrlKey)){if(this.__caretIndex!=this.__selectionIndex){lime_system_Clipboard.set_text(lime_text__$UTF8String_UTF8String_$Impl_$.substring(this.__text,this.__caretIndex,this.__selectionIndex))}}},this_onMouseDown:function(e){if(!this.get_selectable()&&this.get_type()!=1){return}this.__updateLayout();this.__caretIndex=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY());this.__selectionIndex=this.__caretIndex;if(!openfl_display_DisplayObject.__supportDOM){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}this.stage.addEventListener("mouseMove",$bind(this,this.stage_onMouseMove));this.stage.addEventListener("mouseUp",$bind(this,this.stage_onMouseUp))},this_onMouseWheel:function(e){var t=this;t.set_scrollV(t.get_scrollV()-e.delta)},window_onKeyDown:function(e,t){switch(e){case 8:if(this.__selectionIndex==this.__caretIndex&&this.__caretIndex>0){this.__selectionIndex=this.__caretIndex-1}if(this.__selectionIndex!=this.__caretIndex){this.replaceSelectedText("");this.__selectionIndex=this.__caretIndex;this.dispatchEvent(new openfl_events_Event("change",true))}break;case 97:if(this.get_selectable()){if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(t)||lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(t)){this.__caretIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text);this.__selectionIndex=0}}break;case 99:if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(t)||lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(t)){if(this.__caretIndex!=this.__selectionIndex){lime_system_Clipboard.set_text(lime_text__$UTF8String_UTF8String_$Impl_$.substring(this.__text,this.__caretIndex,this.__selectionIndex))}}break;case 120:if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(t)||lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(t)){if(this.__caretIndex!=this.__selectionIndex){lime_system_Clipboard.set_text(lime_text__$UTF8String_UTF8String_$Impl_$.substring(this.__text,this.__caretIndex,this.__selectionIndex));this.replaceSelectedText("");this.dispatchEvent(new openfl_events_Event("change",true))}}break;case 127:if(this.__selectionIndex==this.__caretIndex&&this.__caretIndex=48&&e<=57){return e-48+48}if(e>=65&&e<=90){return e-65+97}}else{switch(e){case 48:return 41;case 49:return 33;case 50:return 64;case 51:return 35;case 52:return 36;case 53:return 37;case 54:return 94;case 55:return 38;case 56:return 42;case 57:return 40;case 186:return 58;case 187:return 43;case 188:return 60;case 189:return 95;case 190:return 62;case 191:return 63;case 192:return 126;case 219:return 123;case 220:return 124;case 221:return 125;case 222:return 34}if(e>=65&&e<=90){return e-65+65}}if(e>=96&&e<=105){return e-96+48}switch(e){case 8:return 8;case 13:return 13;case 46:return 127;case 106:return 42;case 107:return 43;case 108:return 44;case 110:return 45;case 111:return 46}return 0};var openfl_ui_Mouse=function(){};$hxClasses["openfl.ui.Mouse"]=openfl_ui_Mouse;openfl_ui_Mouse.__name__=["openfl","ui","Mouse"];openfl_ui_Mouse.__properties__={set_cursor:"set_cursor"};openfl_ui_Mouse.hide=function(){openfl_ui_Mouse.__hidden=true;var e=0;var t=lime_app_Application.current.__windows;while(e","g");var u=new EReg("([\\w\\.\\-\\+]+)","gi");var f=new EReg("^\\w{3}","ig");var p=new EReg("vc\\[([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw](\\+\\d{1,3})?)?\\](\\.[xyzw]{1,4})?|([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw]{1,4})?","gi");var d=new EReg("\\[.*\\]","ig");var g=new EReg("^\\b[A-Za-z]{1,3}","ig");var m=new EReg("\\d+","");var v=new EReg("(\\.[xyzw]{1,4})","");var b=new EReg("[A-Za-z]{1,3}","ig");var y=new EReg("(\\.[xyzw]{1,1})","");var x=new EReg("\\+\\d{1,3}","ig");var P=0;while(P=3;++P;continue}var B=this.debugEnabled;if(M==null){var L=k.length>=3;++P;continue}k=HxOverrides.substr(k,k.indexOf(M.name)+M.name.length,null);if((M.flags&256)!=0&&s<2){this.error="error: opcode requires version 2.";break}if((M.flags&64)!=0&&_){this.error="error: opcode is only allowed in vertex programs.";break}if((M.flags&32)!=0&&!_){this.error="error: opcode is only allowed in fragment programs.";break}var R=this.verbose;this.agalcode.writeUnsignedInt(M.emitCode);++l;if(l>4096){this.error="error: too many opcodes. maximum is "+4096+".";break}var A=this.match(k,p);if(A.length!=M.numRegister){this.error="error: wrong number of operands. found "+A.length+" but expected "+M.numRegister+".";break}var I=false;var D=160;var F=A.length;var O=0;var G=F;while(O0){A[j]=StringTools.replace(A[j],U[0],"0");var N=this.verbose;H=true}var V=this.match(A[j],g);if(V.length==0){this.error="error: could not parse operand "+j+" ("+A[j]+").";I=true;break}var W=openfl_utils_AGALMiniAssembler.REGMAP;var z=V[0];var X=__map_reserved[z]!=null?W.getReserved(z):W.h[z];var Y=this.debugEnabled;if(X==null){this.error="error: could not find register name for operand "+j+" ("+A[j]+").";I=true;break}if(_){if((X.flags&32)==0){this.error="error: register operand "+j+" ("+A[j]+") only allowed in vertex programs.";I=true;break}if(H){this.error="error: register operand "+j+" ("+A[j]+") relative adressing not allowed in fragment programs.";I=true;break}}else if((X.flags&64)==0){this.error="error: register operand "+j+" ("+A[j]+") only allowed in fragment programs.";I=true;break}var q=A[j].indexOf(X.name)+X.name.length;A[j]=HxOverrides.substr(A[j],q,null);var K=H?this.match(U[0],m):this.match(A[j],m);var J=0;if(K.length>0){J=Std.parseInt(K[0])}if(_$UInt_UInt_$Impl_$.gt(J,X.range)){this.error="error: register operand "+j+" ("+A[j]+") index exceeds limit of "+Std.string(_$UInt_UInt_$Impl_$.toFloat(X.range+1))+".";I=true;break}var Z=0;var Q=this.match(A[j],v);var ee=j==0&&(M.flags&128)==0;var te=j==2&&(M.flags&8)!=0;var se=0;var ie=0;var ae=0;if(ee&&H){this.error="error: relative can not be destination";I=true;break}if(Q.length>0){Z=0;var re=0;var _e=Q[0].length;var ne=1;while(ne<_e){re=HxOverrides.cca(Q[0],ne)-120;if(_$UInt_UInt_$Impl_$.gt(re,2)){re=3}if(ee){Z|=1<0){ae=Std.parseInt(fe[0])}if(ae<0||ae>255){this.error="error: index offset "+ae+" out of bounds. [0..255]";I=true;break}var pe=this.verbose}var de=this.verbose;if(ee){this.agalcode.writeShort(J);this.agalcode.writeByte(Z);this.agalcode.writeByte(X.emitCode);D-=32}else if(te){var ge=this.verbose;var me=5;var ve=T==null?0:T.length;var be=0;var ye=0;var xe=ve;while(ye0){e.__resize(t);if(tthis.length){throw new js__$Boot_HaxeError(new openfl_errors_EOFError)}if(e.lengththis.length){throw new js__$Boot_HaxeError(new openfl_errors_EOFError)}this.position+=e;return this.getString(this.position-e,e)},writeByte:function(e){this.__resize(this.position+1);this.b[this.position++]=e&255&255},writeBytes:function(e,t,s){if(s==null){s=0}if(t==null){t=0}if(openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e)==0){return}if(s==0){s=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e)-t}this.__resize(this.position+s);this.blit(this.position,e,t,s);this.position=this.position+s},writeInt:function(e){this.__resize(this.position+4);if(this.__endian==1){this.b[this.position++]=e&255&255;this.b[this.position++]=e>>8&255&255;this.b[this.position++]=e>>16&255&255;this.b[this.position++]=e>>24&255&255}else{this.b[this.position++]=e>>24&255&255;this.b[this.position++]=e>>16&255&255;this.b[this.position++]=e>>8&255&255;this.b[this.position++]=e&255&255}},writeShort:function(e){this.__resize(this.position+2);if(this.__endian==1){this.b[this.position++]=e&255;this.b[this.position++]=e>>8&255}else{this.b[this.position++]=e>>8&255;this.b[this.position++]=e&255}},writeUnsignedInt:function(e){this.writeInt(e)},writeUTFBytes:function(e){var t=haxe_io_Bytes.ofString(e);this.writeBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(haxe_io_Bytes.ofString(e)))},__fromBytes:function(e){this.b=e.b;this.__length=e.length;this.data=e.data;this.length=e.length},__resize:function(e){if(e>this.__length){var t=new haxe_io_Bytes(new ArrayBuffer((e+1)*3>>1));if(this.__length>0){var s=this.length;this.length=this.__length;t.blit(0,this,0,this.__length);this.length=s}this.b=t.b;this.__length=t.length;this.data=t.data}if(this.length0&&this.currentCount>=this.__repeatCount){this.stop();this.dispatchEvent(new openfl_events_TimerEvent("timer"));this.dispatchEvent(new openfl_events_TimerEvent("timerComplete"))}else{this.dispatchEvent(new openfl_events_TimerEvent("timer"))}},__class__:openfl_utils_Timer,__properties__:{set_delay:"set_delay"}});var trcharts_ErrorMsg=function(e){openfl_display_Sprite.call(this);var t=new openfl_text_TextField;t.set_text(e);t.set_selectable(false);var s=new openfl_text_TextFormat;s.color=0;s.font="Courier";s.size=10;s.align=3;t.setTextFormat(s);t.set_autoSize(1);t.set_border(true);t.set_x(5);t.set_y(5);this.addChild(t)};$hxClasses["trcharts.ErrorMsg"]=trcharts_ErrorMsg;trcharts_ErrorMsg.__name__=["trcharts","ErrorMsg"];trcharts_ErrorMsg.__super__=openfl_display_Sprite;trcharts_ErrorMsg.prototype=$extend(openfl_display_Sprite.prototype,{__class__:trcharts_ErrorMsg});var trcharts_JsonErrorMsg=function(e,t){var s="Open Flash Chart\n\n";s+="JSON Parse Error ["+t.message+"]\n";var i=e.indexOf("\n",t.errorID);var a=HxOverrides.substr(e,0,i);var r=a.split("\n");s+="Error at character "+t.errorID+", line "+r.length+":\n\n";var _=3;while(_>0){if(r.length-_>-1){s+=Std.string(r.length-_)+": "+r[r.length-_]}--_}trcharts_ErrorMsg.call(this,s)};$hxClasses["trcharts.JsonErrorMsg"]=trcharts_JsonErrorMsg;trcharts_JsonErrorMsg.__name__=["trcharts","JsonErrorMsg"];trcharts_JsonErrorMsg.__super__=trcharts_ErrorMsg;trcharts_JsonErrorMsg.prototype=$extend(trcharts_ErrorMsg.prototype,{__class__:trcharts_JsonErrorMsg});var trcharts_JsonInspector=function(){};$hxClasses["trcharts.JsonInspector"]=trcharts_JsonInspector;trcharts_JsonInspector.__name__=["trcharts","JsonInspector"];trcharts_JsonInspector.has_pie_chart=function(e){var t=Reflect.field(e,"elements");var s=0;while(s-1){if(o%3==0&&r.length>0){r=","+r;o=0}++o;r=HxOverrides.substr(n,l,1)+r;--l}if(_[1]!=null){if(s){_[1]+="0000000000000000"}r+="."+Std.string(_[1].substr(0,t))}else if(s&&t>0){_[1]="0000000000000000";r+="."+Std.string(_[1].substr(0,t))}if(e<0){r="-"+r}if(a){r=StringTools.replace(r,",","")}if(i){r=trcharts_NumberUtils.toDecimalSeperatorComma(r)}return r};trcharts_NumberUtils.toDecimalSeperatorComma=function(e){e=StringTools.replace(e,".","|");e=StringTools.replace(e,",",".");e=StringTools.replace(e,"|",",");return e};var trcharts_Object_$helper=function(){};$hxClasses["trcharts.Object_helper"]=trcharts_Object_$helper;trcharts_Object_$helper.__name__=["trcharts","Object_helper"];trcharts_Object_$helper.merge=function(e,t){var s=Reflect.fields(t);var i=0;while(ithis.x_range.max;var s=this.x_range.count();s+=t&&this.x_range.offset?-2:0;var i=this.width_()/s;var a=e-this.x_range.min;var r=0;if(this.x_offset){r=Math.abs(i/2)}return this.left_()+r+a*i},get_x_from_pos:function(e){var t=this.x_range.min>this.x_range.max;var s=this.x_range.count();s+=t&&this.x_range.offset?-2:0;var i=Math.abs(this.width_()/s);var a=0;if(this.x_offset){a=i/2}return this.left_()+a+e*i},get_x_tick_pos:function(e){return this.get_x_from_pos(e)-this.tick_offset},set_bar_groups:function(e){this.bar_groups=e},get_bar_coords:function(e,t){var s=this.width_()/this.x_range.count();var i=s*.8;var a=0;if(this.x_offset){a=s}var r=i/this.bar_groups;var _=this.left_()+(a-i)/2;var n=_+e*s;n+=r*t;return{x:n,width:r}},get_horiz_bar_coords:function(e,t){var s=this.height/this.y_range.count();var i=s*.8;var a=i/this.bar_groups;var r=this.top+(s-i)/2;var _=r+e*s;_+=a*t;return{y:_,width:a}},__class__:trcharts_ScreenCoords});var trcharts_ScreenCoordsRadar=function(e,t,s,i){this.TO_RADIANS=Math.PI/180;trcharts_ScreenCoordsBase.call(this,e,t,s,i);this.radius=Math.min(this.width,this.height)/2};$hxClasses["trcharts.ScreenCoordsRadar"]=trcharts_ScreenCoordsRadar;trcharts_ScreenCoordsRadar.__name__=["trcharts","ScreenCoordsRadar"];trcharts_ScreenCoordsRadar.__super__=trcharts_ScreenCoordsBase;trcharts_ScreenCoordsRadar.prototype=$extend(trcharts_ScreenCoordsBase.prototype,{TO_RADIANS:null,range:null,angles:null,angle:null,radius:null,set_range:function(e){this.range=e},get_max:function(){return this.range.max},set_angles:function(e){this.angles=e;this.angle=360/e},get_angles:function(){return this.angles},get_radius:function(){return this.radius},reduce_radius:function(){this.radius--},get_pos:function(e,t){var s=(e-90)*this.TO_RADIANS;var i=this.get_radius()*t;var a=new openfl_geom_Point(i*Math.cos(s),i*Math.sin(s));return a},get_get_x_from_pos_and_y_from_val:function(e,t,s){if(s==null){s=false}var i=this.get_pos(this.angle*e,t/this.range.count());i.x+=this.get_center_x();i.y+=this.get_center_y();return i},get_y_from_val:function(e,t){if(t==null){t=false}var s=this.get_pos(0,e/this.range.count());s.y+=this.get_center_y();return s.y},__class__:trcharts_ScreenCoordsRadar});var trcharts_TRChartsBase=function(e,t){this._g=new trcharts_global_Global;openfl_display_Sprite.call(this);this._realWidth=e;this._realHeight=t};$hxClasses["trcharts.TRChartsBase"]=trcharts_TRChartsBase;trcharts_TRChartsBase.__name__=["trcharts","TRChartsBase"];trcharts_TRChartsBase.__super__=openfl_display_Sprite;trcharts_TRChartsBase.prototype=$extend(openfl_display_Sprite.prototype,{_realWidth:null,_realHeight:null,_g:null,get_realWidth:function(){return this._realWidth},get_realHeight:function(){return this._realHeight},__class__:trcharts_TRChartsBase,__properties__:$extend(openfl_display_Sprite.prototype.__properties__,{get_realHeight:"get_realHeight",get_realWidth:"get_realWidth"})});var trcharts_TRCharts=function(e,t){this.title=null;this.VERSION="2 TRCharts";trcharts_TRChartsBase.call(this,e,t);this.VERSION="new TRCharts3";this.title=null;this._main()};$hxClasses["trcharts.TRCharts"]=trcharts_TRCharts;trcharts_TRCharts.__name__=["trcharts","TRCharts"];trcharts_TRCharts.__super__=trcharts_TRChartsBase;trcharts_TRCharts.prototype=$extend(trcharts_TRChartsBase.prototype,{VERSION:null,title:null,x_axis:null,radar_axis:null,x_legend:null,y_axis:null,y_axis_right:null,y_legend:null,y_legend_2:null,keys:null,obs:null,sc:null,tooltip:null,background:null,menu:null,ok:null,URL:null,_main:function(){this.ok=false;this.set_the_stage()},reload:function(e){this.load_external_file(e)},load_external_file:function(e){var t=this;this.URL=e;var s=new base_baseLoad_LoadDataStringJs(e,function(e){t.parse_json(e)})},set_the_stage:function(){this.addEventListener("rollOut",$bind(this,this.mouseOut));this.addEventListener("mouseOver",$bind(this,this.mouseMove))},mouseMove:function(e){if(this.tooltip==null){return}var t=this.tooltip.get_tip_style();switch(t){case 0:this.mouse_move_closest(e);break;case 1:this.mouse_move_proximity(js_Boot.__cast(e,openfl_events_MouseEvent));break;case 2:this.mouse_move_follow(js_Boot.__cast(e,openfl_events_MouseEvent));break}},mouse_move_follow:function(e){if(js_Boot.__instanceof(e.target,trcharts_charts_series_Has_$tooltip)){this.tooltip.draw(js_Boot.__cast(e.target,trcharts_charts_series_Has_$tooltip))}else{this.tooltip.hide()}},mouse_move_proximity:function(e){var t=this.obs.mouse_move_proximity(this.get_mouseX(),this.get_mouseY());this.tooltip.closest(t)},mouse_move_closest:function(e){var t=this.obs.closest_2(this.get_mouseX(),this.get_mouseY());this.tooltip.closest(t)},resize_pie:function(){this.addEventListener("mouseMove",$bind(this,this.mouseMove));this.background.resize();this.title.resize();this.sc=new trcharts_ScreenCoords(this.title.get_height(),0,this._realWidth,this._realHeight,null,null,null,0,0,false);this.obs.resize(this.sc);return this.sc},resize_radar:function(){this.addEventListener("mouseMove",$bind(this,this.mouseMove));this.background.resize();this.title.resize();this.keys.resize(0,this.title.get_height());var e=this.title.get_height()+this.keys.get_height();var t=new trcharts_ScreenCoordsRadar(e,0,this._realWidth,this.get_realHeight());t.set_range(this.radar_axis.get_range());t.set_angles(this.obs.get_max_x()-this.obs.get_min_x()+1);this.radar_axis.resize(t);this.obs.resize(t);return t},resize:function(){if(!this.ok){return}var e;if(this.radar_axis!=null){e=this.resize_radar()}else if(this.obs.has_pie()){e=this.resize_pie()}else{e=this.resize_chart()}if(this.menu!=null){this.menu.resize()}e=null},resize_chart:function(){this.addEventListener("mouseMove",$bind(this,this.mouseMove));this.background.resize();this.title.resize();var e=this.y_legend.get_width()+this.y_axis.get_width();this.keys.resize(e,this.title.get_height());var t=this.title.get_height()+this.keys.get_height();var s=this._realHeight;s-=this.x_legend.get_height()+this.x_axis.get_height();var i=this._realWidth;i-=this.y_legend_2.get_width();i-=this.y_axis_right.get_width();this.sc=new trcharts_ScreenCoords(t,e,i,s,this.y_axis.get_range(),this.y_axis_right.get_range(),this.x_axis.get_range(),this.x_axis.first_label_width(),this.x_axis.last_label_width(),false);this.sc.set_bar_groups(this.obs.groups);this.x_axis.resize(this.sc,this._realHeight-(this.x_legend.get_height()+this.x_axis.labels.get_height()));this.y_axis.resize(this.y_legend.get_width(),this.sc);this.y_axis_right.resize(0,this.sc);this.x_legend.resize(this.sc);this.y_legend.resize();this.y_legend_2.resize();this.obs.resize(this.sc);this.dispatchEvent(new openfl_events_Event("on-show"));return this.sc},mouseOut:function(e){if(this.tooltip!=null){this.tooltip.hide()}if(this.obs!=null){this.obs.mouse_out()}},parse_json:function(t){var e=null;var s=false;try{e=JSON.parse(t);s=true}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,openfl_errors_Error)){this.addChild(new trcharts_JsonErrorMsg(t,e))}else throw e}if(s){this.build_chart(e);e=null}t=""},build_chart:function(e){if(this.obs!=null){this.die()}trcharts_NumberFormat.getInstance(e);trcharts_NumberFormat.getInstanceY2(e);this.tooltip=new trcharts_Tooltip(e.tooltip);var t=this._g;t.set_tooltip_string(this.tooltip.tip_text);this.background=new trcharts_elements_Background(e,this);this.title=new trcharts_elements_labels_Title(e.title,this);this.addChild(this.background);if(trcharts_JsonInspector.is_radar(e)){this.obs=trcharts_charts_Factory.MakeChart(e,this);this.radar_axis=new trcharts_elements_axis_RadarAxis(e.radar_axis);this.keys=new trcharts_elements_labels_Keys(this.obs);this.addChild(this.radar_axis);this.addChild(this.keys)}else if(!trcharts_JsonInspector.has_pie_chart(e)){this.build_chart_background(e)}else{this.obs=trcharts_charts_Factory.MakeChart(e,this);this.tooltip.set_tip_style(2)}this.addChild(this.title);var s=0;var i=this.obs.sets;while(s0)this.removeChildAt(0);if(this.hasEventListener("mouseMove")){this.removeEventListener("mouseMove",$bind(this,this.mouseMove))}},__class__:trcharts_TRCharts});var trcharts_Tooltip=function(e){openfl_display_Sprite.call(this);this.mouseEnabled=false;this.tip_showing=false;this.style={shadow:true,rounded:6,stroke:2,colour:"#808080",background:"#f0f0f0",title:"color: #0000F0; font-weight: bold; font-size: 12;",body:"color: #000000; font-weight: normal; font-size: 12;",mouse:0,text:"_default"};if(e){this.style=trcharts_Object_$helper.merge(e,this.style)}this.style.colour=trcharts_string_Utils.get_colour(this.style.colour);this.style.background=trcharts_string_Utils.get_colour(this.style.background);this.style.title=new trcharts_string_Css(this.style.title);this.style.body=new trcharts_string_Css(this.style.body);this.tip_style=this.style.mouse;this.tip_text=this.style.text;this.cached_elements=[];if(this.style.shadow==1){var t=new openfl_filters_DropShadowFilter;t.set_blurX(4);t.set_blurY(4);t.set_distance(4);t.set_angle(45);t.set_quality(2);t.set_alpha(.5);this.set_filters([t])}};$hxClasses["trcharts.Tooltip"]=trcharts_Tooltip;trcharts_Tooltip.__name__=["trcharts","Tooltip"];trcharts_Tooltip.__super__=openfl_display_Sprite;trcharts_Tooltip.prototype=$extend(openfl_display_Sprite.prototype,{style:null,tip_style:null,cached_elements:null,tip_showing:null,tip_text:null,make_tip:function(e){this.get_graphics().clear();while(this.get_numChildren()>0)this.removeChildAt(0);var t=0;var s=5;var i=0;while(i");var a=5;var r=0;if(i.length>1){var _=this.make_title(i.shift());_.mouseEnabled=false;_.set_selectable(false);_.set_x(t);_.set_y(a);a+=_.get_height();r=_.get_width();this.addChild(_)}var n=this.make_body(i.join("\n"));n.mouseEnabled=false;n.set_selectable(false);n.set_x(t);n.set_y(a);r=Math.max(r,n.get_width());this.addChild(n);a+=n.get_height();return{width:r,height:a}},make_title:function(e){var t=new openfl_text_TextField;t.mouseEnabled=false;t.set_selectable(false);t.set_htmlText(e);var s=new openfl_text_TextFormat;s.color=this.style.title.color;s.font="Verdana";s.bold=this.style.title.font_weight=="bold";s.size=this.style.title.font_size;t.setTextFormat(s);t.set_autoSize(1);return t},make_body:function(e){var t=new openfl_text_TextField;t.mouseEnabled=false;t.set_selectable(false);t.set_htmlText(e);var s=new openfl_text_TextFormat;s.color=this.style.body.color;s.font="Verdana";s.bold=this.style.body.font_weight=="bold";s.size=this.style.body.font_size;s.align=3;t.setTextFormat(s);t.set_autoSize(1);return t},get_pos:function(e){var t=e.get_tip_pos();var s=t.x+this.get_width()+16>this.stage.stageWidth?this.stage.stageWidth-this.get_width()-16:t.x;var i=t.y;i-=4;i-=this.get_height()+10;if(i<0){i=0}return new openfl_geom_Point(s,i)},show_tip:function(e){motion_Actuate.stop(this);var t=this.get_pos(e);if(this.style.mouse==0){this.set_visible(true);this.set_alpha(1);this.set_x(t.x);this.set_y(t.y)}else{this.tip_showing=true;this.set_alpha(0);this.set_visible(true);this.set_x(t.x);this.set_y(t.y);motion_Actuate.tween(this,1,{alpha:1}).ease(motion_easing_Expo.get_easeOut())}},draw:function(e){if(this.cached_elements[0]==e){if(!this.tip_showing){this.show_tip(e)}}else{this.untip();this.cached_elements=[e];this.make_tip([e]);this.show_tip(e)}},closest:function(e){if(e.length==0){return}if(this.is_cached(e)){return}this.untip();this.cached_elements=e;this.tip();this.make_tip(e);var t=this.get_pos(e[0]);this.set_visible(true);motion_Actuate.tween(this,1,{x:t.x}).ease(motion_easing_Expo.get_easeOut());motion_Actuate.tween(this,1,{y:t.y}).ease(motion_easing_Expo.get_easeOut())},is_cached:function(e){if(this.cached_elements.length==0){return false}var t=0;while(t0)this.removeChildAt(0);this.style=null;this.cached_elements=null},__class__:trcharts_Tooltip});var trcharts_charts_Base=function(e){openfl_display_Sprite.call(this);this._trcharts=e};$hxClasses["trcharts.charts.Base"]=trcharts_charts_Base;trcharts_charts_Base.__name__=["trcharts","charts","Base"];trcharts_charts_Base.__super__=openfl_display_Sprite;trcharts_charts_Base.prototype=$extend(openfl_display_Sprite.prototype,{key:null,font_size:null,colour:null,line_width:null,circle_size:null,values:null,_trcharts:null,get_colour:function(){return this.colour},get_keys:function(){var e=[];if(this.font_size>0&&this.key!=""){e.push({text:this.key,"font-size":this.font_size,colour:this.get_colour()})}return e},get_max_x:function(){var e=2225e-311;var t=0;var s=this.get_numChildren();while(t0)this.removeChildAt(0)},__class__:trcharts_charts_Base});var trcharts_charts_Line=function(e,t){trcharts_charts_Base.call(this,t);var s=new trcharts_Properties({values:[],width:2,colour:"#3030d0",text:"","font-size":12,tip:"#val#",loop:false,axis:"left"});this.props=new trcharts_Properties(e,s);this.line_style=new trcharts_charts_LineStyle(Reflect.field(e,"line-style"));this.dot_style=new trcharts_charts_series_dots_DefaultDotProperties(Reflect.field(e,"dot-style"),this.props.get("colour"),this.props.get("axis"));var i=new trcharts_Properties({type:"none",cascade:.5,delay:0});this.on_show=new trcharts_Properties(Reflect.field(e,"on-show"),i);this.on_show_start=true;this.key=this.props.get("text");this.font_size=this.props.get("font-size");this.values=this.props.get("values");this.add_values();this.set_blendMode(7)};$hxClasses["trcharts.charts.Line"]=trcharts_charts_Line;trcharts_charts_Line.__name__=["trcharts","charts","Line"];trcharts_charts_Line.__super__=trcharts_charts_Base;trcharts_charts_Line.prototype=$extend(trcharts_charts_Base.prototype,{props:null,dot_style:null,on_show:null,line_style:null,on_show_timer:null,on_show_start:null,get_element:function(e,t){if(typeof t=="number"){t={value:t}}var s=new trcharts_Properties(t,this.dot_style);s.set("tip",s.get("tip").replace("#key#",this.key));s.set("on-show",this.on_show);return trcharts_charts_series_dots_Dot_$factory.make(e,s)},resize:function(e){this.set_x(this.set_y(0));this.move_dots(e);if(this.on_show_start){this.start_on_show_timer()}else{this.draw()}},start_on_show_timer:function(){this.on_show_start=false;this.on_show_timer=new openfl_utils_Timer(16.666666666666668);this.on_show_timer.addEventListener("timer",$bind(this,this.animationManager));this.on_show_timer.start()},animationManager:function(e){this.draw();if(!this.still_animating()){this.on_show_timer.stop()}},still_animating:function(){var e;var t;e=0;while(e#x_label#",alpha:.6,"on-click":false,axis:"left"});this.props=new trcharts_Properties(e,i);this.on_show=this.get_on_show(Reflect.field(e,"on-show"));this.colour=this.props.get_colour("colour");this.key=this.props.get("text");this.font_size=this.props.get("font-size");this.props.set("tip",this.props.get("tip").replace("#key#",this.key));this.group=t;this.values=this.props.get("values");this.add_values()};$hxClasses["trcharts.charts.BarBase"]=trcharts_charts_BarBase;trcharts_charts_BarBase.__name__=["trcharts","charts","BarBase"];trcharts_charts_BarBase.__super__=trcharts_charts_Base;trcharts_charts_BarBase.prototype=$extend(trcharts_charts_Base.prototype,{group:null,props:null,on_show:null,get_on_show:function(e){var t=new trcharts_Properties({type:"none",cascade:3,delay:0});return new trcharts_Properties(e,t)},resize:function(e){var t=0;while(tTotal: #total#",alpha:.6,"on-click":false,axis:"left"});this.props=new trcharts_Properties(e,a);this.on_show=this.get_on_show(Reflect.field(e,"on-show"));this.group=s;this.values=e.values;this.add_values()};$hxClasses["trcharts.charts.BarStack"]=trcharts_charts_BarStack;trcharts_charts_BarStack.__name__=["trcharts","charts","BarStack"];trcharts_charts_BarStack.__super__=trcharts_charts_BarBase;trcharts_charts_BarStack.prototype=$extend(trcharts_charts_BarBase.prototype,{get_keys:function(){var e=[];var t=this.props.get("keys");var s=0;while(s0&&js_Boot.__instanceof(this.sets[0],trcharts_charts_Pie)){return true}else{return false}},die:function(){var e=0;var t=this.sets;while(e=0){var f=this.props.get("tip").replace("#total#",trcharts_NumberUtils.formatNumber(this.total_value));f=StringTools.replace(f,"#percent#",trcharts_NumberUtils.formatNumber(c/this.total_value*100)+"%");this.addChild(this.add_slice(i,s,u,h,f,Std.string(this.colours[i%this.colours.length])))}++i;s+=u}},add_slice:function(e,t,s,i,a,r){var _=new trcharts_Properties({colour:r,tip:a,start:t,angle:s},this.props);var n={};if(typeof i=="number"){n.value=i}else{n=i}var o=new trcharts_Properties(n,_);if(!o.has("label")){o.set("label",o.get("value").toString())}return new trcharts_charts_series_pies_PieSliceContainer(e,o)},resize:function(e){var t=this.style.radius;var s;if(isNaN(t)){t=Math.min(e.width,e.height)/2;var i={top:0,right:0,bottom:0,left:0};var a=0;while(aReflect.field(i,o)){i[o]=Reflect.field(r,o)}}++a}var l=t;l-=Math.max(i.top,i.bottom);if(l+i.left>e.width/2){l=e.width/2-i.left}if(l+i.right>e.width/2){l=e.width/2-i.right}t=Math.max(l,10)}var h=720;var c=-1;var u=-720;var f=-1;var p=720;var d=-1;var g=-720;var m=-1;var v;var b=0;while(b=270){if(v90&&uu||u>90){u=v;f=b}if(h>360||h<=90&&v360||p360||v>p){p=v;d=b}if(g<0||g>v){g=v;m=b}}++b}var y=c;var x=e.top;var P=false;while(y>=0&&!P){s=js_Boot.__cast(this.getChildAt(y),trcharts_charts_series_pies_PieSliceContainer);v=s.getTicAngle();if(v>=270||v<=90){x=s.moveLabelDown(e,x);++y;if(y>=this.get_numChildren()){y=0}P=y==c}else{P=true}}y=f;x=e.bottom;P=false;while(y>=0&&!P){s=js_Boot.__cast(this.getChildAt(y),trcharts_charts_series_pies_PieSliceContainer);v=s.getTicAngle();if(v>=270||v<=90){x=s.moveLabelUp(e,x);--y;if(y<0){y=this.get_numChildren()-1}P=y==f}else{P=true}}y=m;x=e.bottom;P=false;while(y>=0&&!P){s=js_Boot.__cast(this.getChildAt(y),trcharts_charts_series_pies_PieSliceContainer);v=s.getTicAngle();if(v>90&&v<270){x=s.moveLabelUp(e,x);++y;if(y>=this.get_numChildren()){y=0}P=y==m}else{P=true}}y=d;x=e.top;P=false;while(y>=0&&!P){s=js_Boot.__cast(this.getChildAt(y),trcharts_charts_series_pies_PieSliceContainer);v=s.getTicAngle();if(v>90&&v<270){x=s.moveLabelDown(e,x);--y;if(y<0){y=this.get_numChildren()-1}P=y==d}else{P=true}}},__class__:trcharts_charts_Pie});var trcharts_charts_series_Has_$tooltip=function(){};$hxClasses["trcharts.charts.series.Has_tooltip"]=trcharts_charts_series_Has_$tooltip;trcharts_charts_series_Has_$tooltip.__name__=["trcharts","charts","series","Has_tooltip"];trcharts_charts_series_Has_$tooltip.prototype={get_tooltip:null,get_tip_pos:null,__class__:trcharts_charts_series_Has_$tooltip};var trcharts_charts_series_Element=function(){this.set_cacheAsBitmap(true);this.right_axis=false;openfl_display_Sprite.call(this)};$hxClasses["trcharts.charts.series.Element"]=trcharts_charts_series_Element;trcharts_charts_series_Element.__name__=["trcharts","charts","series","Element"];trcharts_charts_series_Element.__interfaces__=[trcharts_charts_series_Has_$tooltip];trcharts_charts_series_Element.__super__=openfl_display_Sprite;trcharts_charts_series_Element.prototype=$extend(openfl_display_Sprite.prototype,{_x:null,_y:null,index:null,tooltip:null,link:null,is_tip:null,line_mask:null,right_axis:null,resize:function(e){var t=e.get_get_x_from_pos_and_y_from_val(this._x,this._y,this.right_axis);this.set_x(t.x);this.set_y(t.y)},get_mid_point:function(){return new openfl_geom_Point(this.get_x(),this.get_y())},get_x:function(){return openfl_display_Sprite.prototype.get_x.call(this)},set_tip:function(e){},attach_events:function(){this.addEventListener("mouseOver",$bind(this,this.mouseOver),false,0,true);this.addEventListener("mouseOut",$bind(this,this.mouseOut),false,0,true)},mouseOver:function(e){this.pulse()},pulse:function(){motion_Actuate.tween(this,.5,{alpha:.5}).ease(motion_easing_Elastic.get_easeOut());motion_Actuate.tween(this,1,{alpha:1}).delay(.4).onComplete($bind(this,this.pulse)).ease(motion_easing_Elastic.get_easeOut())},mouseOut:function(e){motion_Actuate.stop(this);motion_Actuate.tween(this,1,{alpha:1}).ease(motion_easing_Elastic.get_easeOut())},set_on_click:function(e){this.link=e;this.set_buttonMode(true);this.useHandCursor=true;this.addEventListener("mouseUp",$bind(this,this.mouseUp),false,0,true)},mouseUp:function(e){if(this.link.substring(0,6)!="trace:"){if(this.link.substring(0,5)=="http:"){this.browse_url(this.link)}else if(this.link.substring(0,6)=="https:"){this.browse_url(this.link)}else{openfl_external_ExternalInterface.call(this.link,this.index)}}},browse_url:function(e){var t=new openfl_net_URLRequest(this.link);try{openfl_Lib.getURL(t)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,haxe_io_Error)){}else throw e}},get_tip_pos:function(){return{x:this.get_x(),y:this.get_y()}},get_tooltip:function(){return this.tooltip},tooltip_replace_labels:function(e){this.tooltip=StringTools.replace(this.tooltip,"#x_label#",e.get(this._x))},die:function(){if(this.line_mask!=null){this.line_mask.get_graphics().clear();this.line_mask=null}},__class__:trcharts_charts_series_Element});var trcharts_charts_series_bars_Base=function(e,t,s){trcharts_charts_series_Element.call(this);this.index=e;this.parse_value(t);this.colour=t.get_colour("colour");this.tooltip=this.replace_magic_values(t.get("tip"));this.group=s;this.set_visible(true);this.on_show_animate=true;this.on_show=t.get("on-show");this.mouse_out_alpha=t.get("alpha");this.set_alpha(this.mouse_out_alpha);this.addEventListener("mouseOver",$bind(this,this.mouseOver));this.addEventListener("mouseOut",$bind(this,this.mouseOut));if(t.has("on-click")){if(t.get("on-click")!=false){this.set_on_click(t.get("on-click"))}}if(t.has("axis")){if(t.get("axis")=="right"){this.right_axis=true}}};$hxClasses["trcharts.charts.series.bars.Base"]=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Base.__name__=["trcharts","charts","series","bars","Base"];trcharts_charts_series_bars_Base.__super__=trcharts_charts_series_Element;trcharts_charts_series_bars_Base.prototype=$extend(trcharts_charts_series_Element.prototype,{tip_pos:null,colour:null,group:null,top:null,bottom:null,mouse_out_alpha:null,on_show_animate:null,on_show:null,parse_value:function(e){if(!e.has("bottom")){e.set("bottom",0)}this.top=e.get("top");this.bottom=e.get("bottom")},replace_magic_values:function(e){e=StringTools.replace(e,"#top#",trcharts_NumberUtils.formatNumber(this.top));e=StringTools.replace(e,"#bottom#",trcharts_NumberUtils.formatNumber(this.bottom));e=StringTools.replace(e,"#val#",trcharts_NumberUtils.formatNumber(this.top-this.bottom));return e},get_mid_point:function(){return new openfl_geom_Point(this.get_x()+this.get_width()/2,this.get_y())},mouseOver:function(e){this.is_tip=true;motion_Actuate.tween(this,1,{alpha:1}).ease(motion_easing_Elastic.get_easeOut())},mouseOut:function(e){this.is_tip=false;motion_Actuate.tween(this,1,{alpha:this.mouse_out_alpha}).ease(motion_easing_Elastic.get_easeOut())},resize:function(e){},get_tip_pos:function(){return{x:this.tip_pos.x,y:this.tip_pos.y}},resize_helper:function(e){var t=e.get_bar_coords(this.index,this.group);var s=e.get_y_from_val(this.top,this.right_axis);var i;if(this.bottom==2225e-311){i=e.get_y_bottom(this.right_axis)}else{i=e.get_y_from_val(this.bottom,this.right_axis)}var a;var r;var _=false;if(i0){var p=isNaN(_)?s:_;var d=isNaN(n)?i:n;this.get_graphics().lineStyle(0,o,0);this.get_graphics().lineTo(p,d);this.get_graphics().endFill();a=true}t=true}else if(t){if(r){var g=isNaN(_)?f.get_x():_;var m=isNaN(n)?f.get_y():n;this.get_graphics().beginFill(o,l);this.get_graphics().lineStyle(0,o,0);this.get_graphics().moveTo(g,m);this.get_graphics().lineTo(f.get_x(),f.get_y());a=false;this.get_graphics().lineStyle(this.style.width,this.style.colour,1)}else{this.get_graphics().moveTo(f.get_x(),f.get_y())}t=false}else{if(this.stepgraph==trcharts_charts_ScatterLine.STEP_HORIZONTAL){this.get_graphics().lineTo(f.get_x(),i)}else if(this.stepgraph==trcharts_charts_ScatterLine.STEP_VERTICAL){this.get_graphics().lineTo(s,f.get_y())}this.get_graphics().lineTo(f.get_x(),f.get_y())}s=f.get_x();i=f.get_y()}++c}if(r&&!a){var v=isNaN(_)?s:_;var b=isNaN(n)?i:n;this.get_graphics().lineStyle(0,o,0);this.get_graphics().lineTo(v,b);this.get_graphics().endFill()}},__class__:trcharts_charts_ScatterLine});var trcharts_charts_Shape=function(e,t){trcharts_charts_Base.call(this,t);this.style={points:[],colour:"#808080",alpha:.5};trcharts_Object_$helper.merge_2(e,this.style);this.style.colour=trcharts_string_Utils.get_colour(this.style.colour);var s=e.values;var i=0;while(i>16;var i=(t&65280)>>8;var a=t&255;var r=2;s+=s/r;if(s>255){s=255}i+=i/r;if(i>255){i=255}a+=a/r;if(a>255){a=255}return s<<16|i<<8|a};trcharts_charts_series_bars_Bar3D.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Bar3D.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{resize:function(e){var t=this.resize_helper(js_Boot.__cast(e,trcharts_ScreenCoords));this.get_graphics().clear();this.draw_top(t.width,t.height);this.draw_front(t.width,t.height);this.draw_side(t.width,t.height)},draw_top:function(e,t){this.get_graphics().lineStyle(0,0,0);var s=trcharts_charts_series_bars_Bar3D.Lighten(this.colour);var i=[this.colour,s];var a=[1,1];var r=[0,255];var _=new openfl_geom_Matrix;_.createGradientBox(e+12,12,1.5*Math.PI);this.get_graphics().beginGradientFill(0,i,a,r,_,0);var n=0;if(t<0){n=t}this.get_graphics().moveTo(0,n);this.get_graphics().lineTo(e,n);this.get_graphics().lineTo(e-12,n+12);this.get_graphics().lineTo(-12,n+12);this.get_graphics().endFill()},draw_front:function(e,t){var s=7;var i=trcharts_charts_series_bars_Bar3D.Lighten(this.colour);var a=[i,this.colour];var r=[1,1];var _=[0,127];var n=new openfl_geom_Matrix;n.createGradientBox(e-12,t+12,.5*Math.PI);this.get_graphics().beginGradientFill(0,a,r,_,n,0);this.get_graphics().moveTo(-12,12);this.get_graphics().lineTo(-12,t+12);this.get_graphics().lineTo(e-12,t+12);this.get_graphics().lineTo(e-12,12);this.get_graphics().endFill()},draw_side:function(e,t){var s=7;var i=trcharts_charts_series_bars_Bar3D.Lighten(this.colour);var a=[this.colour,i];var r=[1,1];var _=[0,255];var n=new openfl_geom_Matrix;n.createGradientBox(e,t+12,1.5*Math.PI);this.get_graphics().beginGradientFill(0,a,r,_,n,0);this.get_graphics().lineStyle(0,0,0);this.get_graphics().moveTo(e,0);this.get_graphics().lineTo(e,t);this.get_graphics().lineTo(e-12,t+12);this.get_graphics().lineTo(e-12,12);this.get_graphics().endFill()},__class__:trcharts_charts_series_bars_Bar3D});var trcharts_charts_series_bars_Cylinder=function(e,t,s){trcharts_charts_series_bars_Base.call(this,e,t,s);var i=new openfl_filters_DropShadowFilter;i.set_blurX(5);i.set_blurY(5);i.set_distance(3);i.set_angle(45);i.set_quality(2);i.set_alpha(.4);this.set_filters([i])};$hxClasses["trcharts.charts.series.bars.Cylinder"]=trcharts_charts_series_bars_Cylinder;trcharts_charts_series_bars_Cylinder.__name__=["trcharts","charts","series","bars","Cylinder"];trcharts_charts_series_bars_Cylinder.GetColours=function(e){var t=e;var s=(t&16711680)>>16;var i=(t&65280)>>8;var a=t&255;var r=2;var _=e;var n=e;var o=(t&16711680)>>16;var l=(t&65280)>>8;var h=t&255;var c=(t&16711680)>>16;var u=(t&65280)>>8;var f=t&255;if(s+s/r>255||i+i/r>255||a+a/r>255){o=s-s/r;l=i-i/r;h=a-a/r}c=o+s/r;f=h+a/r;u=l+i/r;_=(o|0)<<16|(l|0)<<8|(h|0);n=(c|0)<<16|(u|0)<<8|(f|0);return[n,_]};trcharts_charts_series_bars_Cylinder.magicTrigFunctionX=function(e){return Math.cos(e*2*Math.PI)};trcharts_charts_series_bars_Cylinder.magicTrigFunctionY=function(e){return Math.sin(e*2*Math.PI)};trcharts_charts_series_bars_Cylinder.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Cylinder.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{resize:function(e){this.get_graphics().clear();var t=this.resize_helper(js_Boot.__cast(e,trcharts_ScreenCoords));this.bg(t.width,t.height,t.upside_down);this.glass(t.width,t.height,t.upside_down)},bg:function(e,t,s){var i=e/3;if(i>e/2){i=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_Cylinder.GetColours(this.colour);var r=[1,1];var _=[0,255];var n=new openfl_geom_Matrix;var o;var l;var h;var c;n.createGradientBox(e,t,Math.PI);this.get_graphics().beginGradientFill(0,a,r,_,n,0);h=e/2;c=t;o=e/2;l=i/2;this.halfEllipse(h,c,o,l,100);this.get_graphics().beginGradientFill(0,a,r,_,n,0);this.get_graphics().moveTo(0,0);this.get_graphics().lineTo(0,t);this.get_graphics().lineTo(e,t);this.get_graphics().lineTo(e,0);this.get_graphics().beginFill(this.colour,1);h=e/2;c=0;o=e/2;l=i/2;this.Ellipse(h,c,o,l,100);this.get_graphics().endFill()},glass:function(e,t,s){this.get_graphics().lineStyle(0,0,0);var i=[16777215,16777215];var a=[0,.5];var r=[150,255];var _;var n;var o;var l;var h=new openfl_geom_Matrix;h.createGradientBox(this.get_width(),this.get_height(),Math.PI);this.get_graphics().beginGradientFill(0,i,a,r,h,0);var c=e/3;o=e/2;l=t;_=e/2;n=c/2;this.halfEllipse(o,l,_,n,100);this.get_graphics().moveTo(0,0);this.get_graphics().lineTo(0,t);this.get_graphics().lineTo(e,t);this.get_graphics().lineTo(e,0);this.get_graphics().beginFill(this.colour,1);o=e/2;l=0;_=e/2;n=c/2;this.Ellipse(o,l,_,n,100);this.get_graphics().beginGradientFill(0,i,a,[25,255],h,0);o=e/2;l=0;_=e/2;n=c/2;this.Ellipse(o,l,_,n,100);this.get_graphics().endFill()},Ellipse:function(e,t,s,i,a){this.get_graphics().moveTo(e+s,t);var r=0;while(r<=a){var _=r/a;var n=trcharts_charts_series_bars_Cylinder.magicTrigFunctionX(_);var o=trcharts_charts_series_bars_Cylinder.magicTrigFunctionY(_);var l=e+n*s;var h=t+o*i;this.get_graphics().lineTo(l,h);++r}return 1},halfEllipse:function(e,t,s,i,a){this.get_graphics().moveTo(e+s,t);var r=0;while(r<=a/2){var _=r/a;var n=trcharts_charts_series_bars_Cylinder.magicTrigFunctionX(_);var o=trcharts_charts_series_bars_Cylinder.magicTrigFunctionY(_);var l=e+n*s;var h=t+o*i;this.get_graphics().lineTo(l,h);++r}return 1},__class__:trcharts_charts_series_bars_Cylinder});var trcharts_charts_series_bars_CylinderOutline=function(e,t,s){trcharts_charts_series_bars_Base.call(this,e,t,s);var i=new openfl_filters_DropShadowFilter;i.set_blurX(5);i.set_blurY(5);i.set_distance(3);i.set_angle(45);i.set_quality(2);i.set_alpha(.4);this.set_filters([i])};$hxClasses["trcharts.charts.series.bars.CylinderOutline"]=trcharts_charts_series_bars_CylinderOutline;trcharts_charts_series_bars_CylinderOutline.__name__=["trcharts","charts","series","bars","CylinderOutline"];trcharts_charts_series_bars_CylinderOutline.GetColours=function(e){var t=e;var s=(t&16711680)>>16;var i=(t&65280)>>8;var a=t&255;var r=2;var _=e;var n=e;var o=(t&16711680)>>16;var l=(t&65280)>>8;var h=t&255;var c=(t&16711680)>>16;var u=(t&65280)>>8;var f=t&255;if(s+s/r>255||i+i/r>255||a+a/r>255){o=s-s/r;l=i-i/r;h=a-a/r}c=o+s/r;f=h+a/r;u=l+i/r;_=(o|0)<<16|(l|0)<<8|(h|0);n=(c|0)<<16|(u|0)<<8|(f|0);return[n,_]};trcharts_charts_series_bars_CylinderOutline.magicTrigFunctionX=function(e){return Math.cos(e*2*Math.PI)};trcharts_charts_series_bars_CylinderOutline.magicTrigFunctionY=function(e){return Math.sin(e*2*Math.PI)};trcharts_charts_series_bars_CylinderOutline.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_CylinderOutline.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{resize:function(e){this.get_graphics().clear();var t=this.resize_helper(js_Boot.__cast(e,trcharts_ScreenCoords));this.bg(t.width,t.height,t.upside_down);this.glass(t.width,t.height,t.upside_down)},bg:function(e,t,s){var i=e/3;if(i>e/2){i=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_CylinderOutline.GetColours(this.colour);var r=[1,1];var _=[0,255];var n=new openfl_geom_Matrix;var o;var l;var h;var c;n.createGradientBox(e,t,Math.PI);this.get_graphics().beginGradientFill(0,a,r,_,n,0);h=e/2;c=t;o=e/2;l=i/2;this.halfEllipse(h,c,o,l,100,false);this.get_graphics().beginGradientFill(0,a,r,_,n,0);this.get_graphics().moveTo(0,0);this.get_graphics().lineTo(0,t);this.get_graphics().lineTo(e,t);this.get_graphics().lineTo(e,0);this.get_graphics().beginGradientFill(0,a,r,_,n,0);h=e/2;c=0;o=e/2;l=i/2;this.Ellipse(h,c,o,l,100);this.get_graphics().endFill()},glass:function(e,t,s){this.get_graphics().lineStyle(0,0,0);var i=trcharts_charts_series_bars_CylinderOutline.GetColours(this.colour);var a=[1,1];var r=[0,255];var _=new openfl_geom_Matrix;var n=[16777215,16777215];var o=[0,.5];var l=[150,255];var h;var c;var u;var f;var p=new openfl_geom_Matrix;p.createGradientBox(this.get_width(),this.get_height(),Math.PI);this.get_graphics().beginGradientFill(0,n,o,l,p,0);var d=e/3;u=e/2;f=t;h=e/2-.025*e;c=d/2-.025*e;this.halfEllipse(u,f,h,c,100,false);this.get_graphics().moveTo(.025*e,.025*e);this.get_graphics().lineTo(.025*e,t);this.get_graphics().lineTo(e-.025*e,t);this.get_graphics().lineTo(e-.025*e,.025*e);this.get_graphics().beginGradientFill(0,i,a,r,_,0);u=e/2;f=0;h=e/2;c=d/2;this.Ellipse(u,f,h,c,100);this.get_graphics().beginGradientFill(0,n,o,[25,255],p,0);u=e/2;f=0;h=e/2-.025*e;c=d/2-.025*e;this.Ellipse(u,f,h,c,100);this.get_graphics().endFill()},Ellipse:function(e,t,s,i,a){this.get_graphics().moveTo(e+s,t);var r=0;while(r<=a){var _=r/a;var n=trcharts_charts_series_bars_CylinderOutline.magicTrigFunctionX(_);var o=trcharts_charts_series_bars_CylinderOutline.magicTrigFunctionY(_);var l=e+n*s;var h=t+o*i;this.get_graphics().lineTo(l,h);++r}return 1},halfEllipse:function(e,t,s,i,a,r){var _;var n;if(r==true){_=a/2;n=a}else{_=0;n=a/2}this.get_graphics().moveTo(e+s,t);var o=_;while(o<=n){var l=o/a;var h=trcharts_charts_series_bars_CylinderOutline.magicTrigFunctionX(l);var c=trcharts_charts_series_bars_CylinderOutline.magicTrigFunctionY(l);var u=e+h*s;var f=t+c*i;this.get_graphics().lineTo(u,f);++o}return 1},__class__:trcharts_charts_series_bars_CylinderOutline});var trcharts_charts_series_bars_Dome=function(e,t,s){trcharts_charts_series_bars_Base.call(this,e,t,s);var i=new openfl_filters_DropShadowFilter;i.set_blurX(5);i.set_blurY(5);i.set_distance(3);i.set_angle(45);i.set_quality(2);i.set_alpha(.4);this.set_filters([i])};$hxClasses["trcharts.charts.series.bars.Dome"]=trcharts_charts_series_bars_Dome;trcharts_charts_series_bars_Dome.__name__=["trcharts","charts","series","bars","Dome"];trcharts_charts_series_bars_Dome.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Dome.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{__class__:trcharts_charts_series_bars_Dome});var trcharts_charts_series_bars_ECandle=function(e,t,s){trcharts_charts_series_bars_Base.call(this,e,t,s);if(t.has("negative-colour")){this.negative_colour=t.get_colour("negative-colour")}else{this.negative_colour=this.colour}};$hxClasses["trcharts.charts.series.bars.ECandle"]=trcharts_charts_series_bars_ECandle;trcharts_charts_series_bars_ECandle.__name__=["trcharts","charts","series","bars","ECandle"];trcharts_charts_series_bars_ECandle.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_ECandle.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{high:null,low:null,negative_colour:null,parse_value:function(e){trcharts_charts_series_bars_Base.prototype.parse_value.call(this,e);this.high=e.get("high");this.low=e.get("low")},replace_magic_values:function(e){return e},resize:function(e){var t=this.resize_helper(js_Boot.__cast(e,trcharts_ScreenCoords));var s=e.get_y_from_val(Math.max(this.top,this.bottom),this.right_axis);var i=e.get_y_from_val(this.high,this.right_axis)-s;var a=0;var r=e.get_y_from_val(this.bottom,this.right_axis)-s;var _=e.get_y_from_val(this.low,this.right_axis)-s;this.tip_pos=new openfl_geom_Point(this.get_x()+t.width/2,this.get_y());var n=t.width/2;this.get_graphics().clear();var o=this.colour;if(t.upside_down){o=this.negative_colour}this.top_line(o,n,i);if(this.top==this.bottom){this.draw_doji(o,t.width,a)}else{this.draw_box(o,a,t.height,t.width,t.upside_down)}this.bottom_line(o,n,t.height,_);this.tip_pos=new openfl_geom_Point(this.get_x()+t.width/2,this.get_y()+i)},top_line:function(e,t,s){this.get_graphics().beginFill(e,1);this.get_graphics().moveTo(t-1,0);this.get_graphics().lineTo(t+1,0);this.get_graphics().lineTo(t+1,s);this.get_graphics().lineTo(t-1,s);this.get_graphics().endFill()},bottom_line:function(e,t,s,i){this.get_graphics().beginFill(e,1);this.get_graphics().moveTo(t-1,s);this.get_graphics().lineTo(t+1,s);this.get_graphics().lineTo(t+1,i);this.get_graphics().lineTo(t-1,i);this.get_graphics().endFill()},draw_doji:function(e,t,s){this.get_graphics().beginFill(e,1);this.get_graphics().moveTo(0,s-1);this.get_graphics().lineTo(t,s-1);this.get_graphics().lineTo(t,s+1);this.get_graphics().lineTo(0,s+1);this.get_graphics().endFill()},draw_box:function(e,t,s,i,a){this.get_graphics().beginFill(e,1);this.get_graphics().moveTo(0,t);this.get_graphics().lineTo(i,t);this.get_graphics().lineTo(i,s);this.get_graphics().lineTo(0,s);this.get_graphics().lineTo(0,t);if(a){this.get_graphics().moveTo(2,t+2);this.get_graphics().lineTo(i-2,t+2);this.get_graphics().lineTo(i-2,s-2);this.get_graphics().lineTo(2,s-2);this.get_graphics().lineTo(2,t+2)}this.get_graphics().endFill();if(a){this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(0,0);this.get_graphics().moveTo(2,t-2);this.get_graphics().lineTo(i-2,t-2);this.get_graphics().lineTo(i-2,s-2);this.get_graphics().lineTo(2,s-2);this.get_graphics().endFill()}},__class__:trcharts_charts_series_bars_ECandle});var trcharts_charts_series_bars_Glass=function(e,t,s){trcharts_charts_series_bars_Base.call(this,e,t,s);var i=new openfl_filters_DropShadowFilter;i.set_blurX(5);i.set_blurY(5);i.set_distance(3);i.set_angle(45);i.set_quality(2);i.set_alpha(.4);this.set_filters([i])};$hxClasses["trcharts.charts.series.bars.Glass"]=trcharts_charts_series_bars_Glass;trcharts_charts_series_bars_Glass.__name__=["trcharts","charts","series","bars","Glass"];trcharts_charts_series_bars_Glass.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Glass.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{resize:function(e){this.get_graphics().clear();var t=this.resize_helper(js_Boot.__cast(e,trcharts_ScreenCoords));if(t.height==0){return}this.bg(t.width,t.height,t.upside_down);this.glass(t.width,t.height,t.upside_down)},bg:function(e,t,s){var i=7;if(i>e/2){i=e/2}this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(this.colour,1);if(!s){this.get_graphics().moveTo(i,0);this.get_graphics().lineTo(e-i,0);this.get_graphics().curveTo(e,0,e,i);this.get_graphics().lineTo(e,t);this.get_graphics().lineTo(0,t);this.get_graphics().lineTo(0,i);this.get_graphics().curveTo(0,0,i,0)}else{this.get_graphics().moveTo(0,0);this.get_graphics().lineTo(e,0);this.get_graphics().lineTo(e,t-i);this.get_graphics().curveTo(e,t,e-i,t);this.get_graphics().lineTo(i,t);this.get_graphics().curveTo(0,t,0,t-i);this.get_graphics().lineTo(0,0)}this.get_graphics().endFill()},glass:function(e,t,s){var i=2;var a=i;var r=e/2-i;if(s){a-=i}t-=i;this.get_graphics().lineStyle(0,0,0);var _=[16777215,16777215];var n=[.3,.7];var o=[0,255];var l=new openfl_geom_Matrix;l.createGradientBox(r,this.get_height(),Math.PI);this.get_graphics().beginGradientFill(0,_,n,o,l,0);var h=4;var c=r;if(!s){this.get_graphics().moveTo(i+h,a);this.get_graphics().lineTo(i+c,a);this.get_graphics().lineTo(i+c,a+t);this.get_graphics().lineTo(i,a+t);this.get_graphics().lineTo(i,a+h);this.get_graphics().curveTo(i,a,i+h,a)}else{this.get_graphics().moveTo(i,a);this.get_graphics().lineTo(i+c,a);this.get_graphics().lineTo(i+c,a+t);this.get_graphics().lineTo(i+h,a+t);this.get_graphics().curveTo(i,a+t,i,a+t-h)}this.get_graphics().endFill()},__class__:trcharts_charts_series_bars_Glass});var trcharts_charts_series_bars_Horizontal=function(e,t,s){trcharts_charts_series_Element.call(this);this.index=e;this.left=t.left?t.left:0;this.right=t.right?t.right:0;this.colour=t.colour;this.group=s;this.set_visible(true);this.set_alpha(.5);this.tooltip=this.replace_magic_values(t.tip);this.addEventListener("mouseOver",$bind(this,this.mouseOver));this.addEventListener("mouseOut",$bind(this,this.mouseOut))};$hxClasses["trcharts.charts.series.bars.Horizontal"]=trcharts_charts_series_bars_Horizontal;trcharts_charts_series_bars_Horizontal.__name__=["trcharts","charts","series","bars","Horizontal"];trcharts_charts_series_bars_Horizontal.__super__=trcharts_charts_series_Element;trcharts_charts_series_bars_Horizontal.prototype=$extend(trcharts_charts_series_Element.prototype,{right:null,left:null,colour:null,group:null,replace_magic_values:function(e){e=StringTools.replace(e,"#right#",trcharts_NumberUtils.formatNumber(this.right));e=StringTools.replace(e,"#left#",trcharts_NumberUtils.formatNumber(this.left));e=StringTools.replace(e,"#val#",trcharts_NumberUtils.formatNumber(this.right-this.left));return e},mouseOver:function(e){motion_Actuate.tween(this,1,{alpha:0})},mouseOut:function(e){motion_Actuate.tween(this,.5,{alpha:.5}).ease(motion_easing_Elastic.get_easeOut())},resize:function(e){var t=js_Boot.__cast(e,trcharts_ScreenCoords);var s=t.get_horiz_bar_coords(this.index,this.group);var i=e.get_x_from_val(this.left);var a=e.get_x_from_val(this.right);var r=a-i;this.get_graphics().clear();this.get_graphics().beginFill(this.colour,1);this.get_graphics().drawRect(0,0,r,s.width);this.get_graphics().endFill();this.set_x(i);this.set_y(s.y)},get_mid_point:function(){return new openfl_geom_Point(this.get_x()+this.get_width()/2,this.get_y())},get_tip_pos:function(){return{x:this.get_x()+this.get_width()-20,y:this.get_y()}},get_max_x:function(){return this.right},__class__:trcharts_charts_series_bars_Horizontal});var trcharts_charts_series_bars_Outline=function(e,t,s){this.outline=0;trcharts_charts_series_bars_Base.call(this,e,t,s);this.outline=t.get_colour("outline-colour")};$hxClasses["trcharts.charts.series.bars.Outline"]=trcharts_charts_series_bars_Outline;trcharts_charts_series_bars_Outline.__name__=["trcharts","charts","series","bars","Outline"];trcharts_charts_series_bars_Outline.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Outline.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{outline:null,resize:function(e){var t=this.resize_helper(js_Boot.__cast(e,trcharts_ScreenCoords));this.get_graphics().clear();this.get_graphics().lineStyle(1,this.outline,1);this.get_graphics().beginFill(this.colour,1);this.get_graphics().moveTo(0,0);this.get_graphics().lineTo(t.width,0);this.get_graphics().lineTo(t.width,t.height);this.get_graphics().lineTo(0,t.height);this.get_graphics().lineTo(0,0);this.get_graphics().endFill()},__class__:trcharts_charts_series_bars_Outline});var trcharts_charts_series_bars_Plastic=function(e,t,s){trcharts_charts_series_bars_Base.call(this,e,t,s);var i=new openfl_filters_DropShadowFilter;i.set_blurX(5);i.set_blurY(5);i.set_distance(3);i.set_angle(45);i.set_quality(2);i.set_alpha(.4);this.set_filters([i])};$hxClasses["trcharts.charts.series.bars.Plastic"]=trcharts_charts_series_bars_Plastic;trcharts_charts_series_bars_Plastic.__name__=["trcharts","charts","series","bars","Plastic"];trcharts_charts_series_bars_Plastic.GetColours=function(e){var t=e;var s=(t&16711680)>>16;var i=(t&65280)>>8;var a=t&255;var r=.15;var _=1.75;var n=e;var o=e;var l=e;var h=(t&16711680)>>16;var c=(t&65280)>>8;var u=t&255;var f=(t&16711680)>>16;var p=(t&65280)>>8;var d=t&255;var g=(t&16711680)>>16;var m=(t&65280)>>8;var v=t&255;if(s+s*r<255&&s-_*s*r>0){h=s}else if(s+s*r<255){h=s+s/r}else{h=s-_*s*r}if(a+a*r<255&&a-_*a*r>0){u=a}else if(a+a*r<255){u=a+a*r}else{u=a-_*a*r}if(i+i*r<255&&i-_*i*r>0){c=i}else if(i+i*r<255){c=i+i*r}else{c=i-_*i*r}g=h+s*r;f=h-_*(s*r);v=u+a*r;d=u-_*(a*r);m=c+i*r;p=c-_*(i*r);n=(h|0)<<16|(c|0)<<8|(u|0);l=(g|0)<<16|(m|0)<<8|(v|0);o=(f|0)<<16|(p|0)<<8|(d|0);return[l,n,o]};trcharts_charts_series_bars_Plastic.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Plastic.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{resize:function(e){this.get_graphics().clear();var t=this.resize_helper(js_Boot.__cast(e,trcharts_ScreenCoords));this.bg(t.width,t.height,t.upside_down);this.glass(t.width,t.height,t.upside_down)},bg:function(e,t,s){var i=e/3;if(i>e/2){i=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_Plastic.GetColours(this.colour);var r=a[2];var _=a[0];var n=[a[1],a[2],a[2]];var o=[1,1,1];var l=[0,115,255];var h=new openfl_geom_Matrix;var c;var u;var f;var p;var d=.02*e;var g=3;h.createGradientBox(e,t,Math.PI);this.get_graphics().beginGradientFill(0,n,o,l,h,0);if(t>0||t<0){this.get_graphics().beginFill(0,1);this.get_graphics().drawRoundRect(0,0,e,t,e/g,e/g);this.get_graphics().beginFill(_,1);this.get_graphics().drawRoundRect(d,d,e-2*d,t-2*d,e/g-2*d,e/g-2*d);d*=3;this.get_graphics().beginGradientFill(0,n,o,l,h,0);this.get_graphics().drawRoundRect(d,d,e-2*d,t-2*d,e/g-2*d,e/g-2*d)}else{this.get_graphics().beginFill(0,1);this.get_graphics().drawRoundRect(0,0-2*d,e,t+4*d,e/g,e/g);this.get_graphics().beginFill(_,1);this.get_graphics().drawRoundRect(d,0-2*d+d,e-2*d,t+4*d-2*d,e/g-2*d,e/g-2*d);d*=3;this.get_graphics().beginGradientFill(0,n,o,l,h,0);this.get_graphics().drawRoundRect(d,0-2*d+d,e-2*d,t+4*d-2*d,e/g-2*d,e/g-2*d)}this.get_graphics().endFill()},glass:function(e,t,s){this.get_graphics().lineStyle(0,0,0);var i=trcharts_charts_series_bars_Plastic.GetColours(this.colour);var a=new openfl_geom_Matrix;var r=1;var _=1;var n=0;var o=255;var l=[16777215,16777215,16777215];var h=[0,.05,.75];var c=[0,123,255];var u;var f;var p;var d;var g=new openfl_geom_Matrix;var m=.02*e;var v=3;g.createGradientBox(this.get_width(),this.get_height(),Math.PI);this.get_graphics().beginGradientFill(0,l,h,c,g,0);var b=e/3;if(t>0||t<0){this.get_graphics().drawRoundRect(m,m,e-2*m,t-2*m,e/v-2*m,e/v-2*m)}else{this.get_graphics().drawRoundRect(m,0-2*m+m,e-2*m,t+4*m-2*m,e/v-2*m,e/v-2*m)}this.get_graphics().endFill()},__class__:trcharts_charts_series_bars_Plastic});var trcharts_charts_series_bars_PlasticFlat=function(e,t,s){trcharts_charts_series_bars_Base.call(this,e,t,s);var i=new openfl_filters_DropShadowFilter;i.set_blurX(5);i.set_blurY(5);i.set_distance(3);i.set_angle(45);i.set_quality(2);i.set_alpha(.4);this.set_filters([i])};$hxClasses["trcharts.charts.series.bars.PlasticFlat"]=trcharts_charts_series_bars_PlasticFlat;trcharts_charts_series_bars_PlasticFlat.__name__=["trcharts","charts","series","bars","PlasticFlat"];trcharts_charts_series_bars_PlasticFlat.GetColours=function(e){var t=e;var s=(t&16711680)>>16;var i=(t&65280)>>8;var a=t&255;var r=.15;var _=1.75;var n=e;var o=e;var l=e;var h=(t&16711680)>>16;var c=(t&65280)>>8;var u=t&255;var f=(t&16711680)>>16;var p=(t&65280)>>8;var d=t&255;var g=(t&16711680)>>16;var m=(t&65280)>>8;var v=t&255;if(s+s*r<255&&s-_*s*r>0){h=s}else if(s+s*r<255){h=s+s/r}else{h=s-_*s*r}if(a+a*r<255&&a-_*a*r>0){u=a}else if(a+a*r<255){u=a+a*r}else{u=a-_*a*r}if(i+i*r<255&&i-_*i*r>0){c=i}else if(i+i*r<255){c=i+i*r}else{c=i-_*i*r}g=h+s*r;f=h-_*(s*r);v=u+a*r;d=u-_*(a*r);m=c+i*r;p=c-_*(i*r);n=(h|0)<<16|(c|0)<<8|(u|0);l=(g|0)<<16|(m|0)<<8|(v|0);o=(f|0)<<16|(p|0)<<8|(d|0);return[l,n,o]};trcharts_charts_series_bars_PlasticFlat.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_PlasticFlat.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{resize:function(e){this.get_graphics().clear();var t=this.resize_helper(js_Boot.__cast(e,trcharts_ScreenCoords));this.bg(t.width,t.height,t.upside_down);this.glass(t.width,t.height,t.upside_down)},bg:function(e,t,s){var i=e/3;if(i>e/2){i=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_PlasticFlat.GetColours(this.colour);var r=a[2];var _=a[0];var n=[a[1],a[2],a[2]];var o=[1,1,1];var l=[0,115,255];var h=new openfl_geom_Matrix;var c;var u;var f;var p;var d=.02*e;var g=3;h.createGradientBox(e,t,Math.PI);this.get_graphics().beginGradientFill(0,n,o,l,h,0);if(t>0||t<0){this.get_graphics().beginFill(0,1);this.get_graphics().drawRoundRect(0,0,e,t,e/g,e/g);this.get_graphics().beginFill(_,1);this.get_graphics().drawRoundRect(d,d,e-2*d,t-2*d,e/g-2*d,e/g-2*d);d*=3;this.get_graphics().beginGradientFill(0,n,o,l,h,0);this.get_graphics().drawRoundRect(d,d,e-2*d,t-2*d,e/g-2*d,e/g-2*d)}else{this.get_graphics().beginFill(0,1);this.get_graphics().drawRoundRect(0,0-2*d,e,t+4*d,e/g,e/g);this.get_graphics().beginFill(_,1);this.get_graphics().drawRoundRect(d,0-2*d+d,e-2*d,t+4*d-2*d,e/g-2*d,e/g-2*d);d*=3;this.get_graphics().beginGradientFill(0,n,o,l,h,0);this.get_graphics().drawRoundRect(d,0-2*d+d,e-2*d,t+4*d-2*d,e/g-2*d,e/g-2*d)}this.get_graphics().endFill()},glass:function(e,t,s){this.get_graphics().lineStyle(0,0,0);var i=trcharts_charts_series_bars_PlasticFlat.GetColours(this.colour);var a=i[2];var r=i[0];var _=[i[1],i[2],i[2]];var n=[1,1,1];var o=[0,115,255];var l=new openfl_geom_Matrix;var h=[16777215,16777215,16777215];var c=[0,.05,.75];var u=[0,123,255];var f;var p;var d;var g;var m=new openfl_geom_Matrix;var v=.02*e;var b=3;l.createGradientBox(e,t,Math.PI);m.createGradientBox(this.get_width(),this.get_height(),Math.PI);this.get_graphics().beginGradientFill(0,h,c,u,m,0);var y=e/3;if(t>0&&!s){this.get_graphics().drawRoundRect(v,v,e-2*v,t-2*v,e/b-2*v,e/b-2*v);this.get_graphics().beginFill(0,1);this.get_graphics().drawRect(0,t-t/2,e,t/2);this.get_graphics().beginFill(r,1);this.get_graphics().drawRect(v,t-t/2,e-2*v,t/2-v);v*=3;this.get_graphics().beginGradientFill(0,_,n,o,l,0);this.get_graphics().drawRect(v,t-t/2,e-2*v,t/2-v);v/=3;this.get_graphics().beginGradientFill(0,h,c,u,m,0);this.get_graphics().drawRect(v,t-t/2,e-2*v,t/2-v)}else if(t>0){this.get_graphics().drawRoundRect(v,v,e-2*v,t-2*v,e/b-2*v,e/b-2*v);this.get_graphics().beginFill(0,1);this.get_graphics().drawRect(0,0,e,t/2);this.get_graphics().beginFill(r,1);this.get_graphics().drawRect(v,v,e-2*v,t/2-v);v*=3;this.get_graphics().beginGradientFill(0,_,n,o,l,0);this.get_graphics().drawRect(v,v,e-2*v,t/2-v);v/=3;this.get_graphics().beginGradientFill(0,h,c,u,m,0);this.get_graphics().drawRect(v,v,e-2*v,t/2-v)}else{this.get_graphics().drawRoundRect(v,0-2*v+v,e-2*v,t+4*v-2*v,e/b-2*v,e/b-2*v)}this.get_graphics().endFill()},__class__:trcharts_charts_series_bars_PlasticFlat});var trcharts_charts_series_bars_Round=function(e,t,s){trcharts_charts_series_bars_Base.call(this,e,t,s);var i=new openfl_filters_DropShadowFilter;i.set_blurX(5);i.set_blurY(5);i.set_distance(3);i.set_angle(45);i.set_quality(2);i.set_alpha(.4);this.set_filters([i])};$hxClasses["trcharts.charts.series.bars.Round"]=trcharts_charts_series_bars_Round;trcharts_charts_series_bars_Round.__name__=["trcharts","charts","series","bars","Round"];trcharts_charts_series_bars_Round.GetColours=function(e){var t=e;var s=(t&16711680)>>16;var i=(t&65280)>>8;var a=t&255;var r=2;var _=e;var n=e;var o=(t&16711680)>>16;var l=(t&65280)>>8;var h=t&255;var c=(t&16711680)>>16;var u=(t&65280)>>8;var f=t&255;if(s+s/r>255||i+i/r>255||a+a/r>255){o=s-s/r;l=i-i/r;h=a-a/r}c=o+s/r;f=h+a/r;u=l+i/r;_=(o|0)<<16|(l|0)<<8|(h|0);n=(c|0)<<16|(u|0)<<8|(f|0);return[n,_]};trcharts_charts_series_bars_Round.magicTrigFunctionX=function(e){return Math.cos(e*2*Math.PI)};trcharts_charts_series_bars_Round.magicTrigFunctionY=function(e){return Math.sin(e*2*Math.PI)};trcharts_charts_series_bars_Round.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Round.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{resize:function(e){this.get_graphics().clear();var t=this.resize_helper(js_Boot.__cast(e,trcharts_ScreenCoords));this.bg(t.width,t.height,t.upside_down);this.glass(t.width,t.height,t.upside_down)},bg:function(e,t,s){var i=e/3;if(i>e/2){i=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_Round.GetColours(this.colour);var r=[1,1];var _=[0,255];var n=new openfl_geom_Matrix;var o;var l;var h;var c;n.createGradientBox(e,t,Math.PI);this.get_graphics().beginGradientFill(0,a,r,_,n,0);if(t>0){if(t>=e){h=e/2;c=t-e/2;o=e/2;l=o;this.halfEllipse(h,c,o,l,100,false);this.get_graphics().beginGradientFill(0,a,r,_,n,0);this.get_graphics().moveTo(0,e/2);this.get_graphics().lineTo(0,t-e/2);this.get_graphics().lineTo(e,t-e/2);this.get_graphics().lineTo(e,e/2);h=e/2;c=e/2;o=e/2;l=o;this.halfEllipse(h,c,o,l,100,true)}else{h=e/2;c=t/2;o=e/2;l=t/2;this.halfEllipse(h,c,o,l,100,false);h=e/2;c=t/2;o=e/2;l=t/2;this.halfEllipse(h,c,o,l,100,true)}}else{h=e/2;c=t;o=e/2;l=i/4;this.Ellipse(h,c,o,l,100)}this.get_graphics().endFill()},glass:function(e,t,s){this.get_graphics().lineStyle(0,0,0);var i=trcharts_charts_series_bars_Round.GetColours(this.colour);var a=1;var r=1;var _=0;var n=255;var o=new openfl_geom_Matrix;o.createGradientBox(e,t,Math.PI);var l=[16777215,16777215];var h=[0,.75];var c=[100,255];var u;var f;var p;var d;var g=new openfl_geom_Matrix;g.createGradientBox(this.get_width(),this.get_height(),Math.PI);this.get_graphics().beginGradientFill(0,l,h,c,g,0);var m=e/3;if(t>0){if(t>=e){this.get_graphics().beginGradientFill(0,l,h,c,g,0);p=e/3;d=t-e/2;u=e/3-.05*e;f=u+.05*e;this.halfEllipse(p,d,u,f,100,false);this.get_graphics().moveTo(.05*e,e/2);this.get_graphics().lineTo(.05*e,t-e/2);this.get_graphics().lineTo(e-.05*e,t-e/2);this.get_graphics().lineTo(e-.05*e,e/2);this.get_graphics().beginGradientFill(0,l,h,c,g,0);p=e/3;d=e/2;u=e/3-.05*e;f=u+.05*e;this.halfEllipse(p,d,u,f,100,true)}else{this.get_graphics().beginGradientFill(0,l,h,c,g,0);p=e/3;d=t/2;u=e/3-.05*e;f=t/2-3*(.05*e);this.Ellipse(p,d,u,f,100)}}else{p=e/2;d=t;u=e/2-.05*e;f=m/4-.05*e;this.Ellipse(p,d,u,f,100)}this.get_graphics().endFill()},Ellipse:function(e,t,s,i,a){this.get_graphics().moveTo(e+s,t);var r=0;while(r<=a){var _=r/a;var n=trcharts_charts_series_bars_Round.magicTrigFunctionX(_);var o=trcharts_charts_series_bars_Round.magicTrigFunctionY(_);var l=e+n*s;var h=t+o*i;this.get_graphics().lineTo(l,h);++r}return 1},halfEllipse:function(e,t,s,i,a,r){var _;var n;if(r==true){_=a/2;n=a}else{_=0;n=a/2}this.get_graphics().moveTo(e+s,t);var o=_;while(o<=n){var l=o/a;var h=trcharts_charts_series_bars_Round.magicTrigFunctionX(l);var c=trcharts_charts_series_bars_Round.magicTrigFunctionY(l);var u=e+h*s;var f=t+c*i;this.get_graphics().lineTo(u,f);++o}return 1},__class__:trcharts_charts_series_bars_Round});var trcharts_charts_series_bars_Round3D=function(e,t,s){trcharts_charts_series_bars_Base.call(this,e,t,s);var i=new openfl_filters_DropShadowFilter;i.set_blurX(5);i.set_blurY(5);i.set_distance(3);i.set_angle(45);i.set_quality(2);i.set_alpha(.4);this.set_filters([i])};$hxClasses["trcharts.charts.series.bars.Round3D"]=trcharts_charts_series_bars_Round3D;trcharts_charts_series_bars_Round3D.__name__=["trcharts","charts","series","bars","Round3D"];trcharts_charts_series_bars_Round3D.GetColours=function(e){var t=e;var s=(t&16711680)>>16;var i=(t&65280)>>8;var a=t&255;var r=2;var _=e;var n=e;var o=(t&16711680)>>16;var l=(t&65280)>>8;var h=t&255;var c=(t&16711680)>>16;var u=(t&65280)>>8;var f=t&255;if(s+s/r>255||i+i/r>255||a+a/r>255){o=s-s/r;l=i-i/r;h=a-a/r}c=o+s/r;f=h+a/r;u=l+i/r;_=(o|0)<<16|(l|0)<<8|(h|0);n=(c|0)<<16|(u|0)<<8|(f|0);return[n,_]};trcharts_charts_series_bars_Round3D.magicTrigFunctionX=function(e){return Math.cos(e*2*Math.PI)};trcharts_charts_series_bars_Round3D.magicTrigFunctionY=function(e){return Math.sin(e*2*Math.PI)};trcharts_charts_series_bars_Round3D.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Round3D.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{resize:function(e){this.get_graphics().clear();var t=this.resize_helper(js_Boot.__cast(e,trcharts_ScreenCoords));this.bg(t.width,t.height,t.upside_down);this.glass(t.width,t.height,t.upside_down)},bg:function(e,t,s){var i=e/3;if(i>e/2){i=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_Round3D.GetColours(this.colour);var r=[1,1];var _=[0,255];var n=new openfl_geom_Matrix;var o;var l;var h;var c;n.createGradientBox(e,t,Math.PI);this.get_graphics().beginGradientFill(0,a,r,_,n,0);if(!s&&t>0){if(t>=e/2){h=e/2;c=t;o=e/2;l=i/2;this.halfEllipse(h,c,o,l,100,false);this.get_graphics().beginGradientFill(0,a,r,_,n,0);this.get_graphics().moveTo(0,e/2);this.get_graphics().lineTo(0,t);this.get_graphics().lineTo(e,t);this.get_graphics().lineTo(e,e/2);h=e/2;c=e/2;o=e/2;l=o;this.halfEllipse(h,c,o,l,100,true)}else{h=e/2;c=t;o=e/2;l=i/2;this.halfEllipse(h,c,o,l,100,false);h=e/2;c=t;o=e/2;l=t;this.halfEllipse(h,c,o,l,100,true)}}else if(t>=e/2){h=e/2;c=0;o=e/2;l=i/2;this.halfEllipse(h,c,o,l,100,true);this.get_graphics().beginGradientFill(0,a,r,_,n,0);this.get_graphics().moveTo(0,0);this.get_graphics().lineTo(0,t-e/2);this.get_graphics().lineTo(e,t-e/2);this.get_graphics().lineTo(e,0);h=e/2;c=t-e/2;o=e/2;l=o;this.halfEllipse(h,c,o,l,100,false)}else if(t>0){h=e/2;c=0;o=e/2;l=i/2;this.halfEllipse(h,c,o,l,100,true);h=e/2;c=0;o=e/2;l=t;this.halfEllipse(h,c,o,l,100,false)}else{h=e/2;c=t;o=e/2;l=i/4;this.Ellipse(h,c,o,l,100)}this.get_graphics().endFill()},glass:function(e,t,s){this.get_graphics().lineStyle(0,0,0);var i=trcharts_charts_series_bars_Round3D.GetColours(this.colour);var a=[1,1];var r=[0,255];var _=new openfl_geom_Matrix;_.createGradientBox(e,t,Math.PI);var n=[16777215,16777215];var o=[0,.75];var l=[100,255];var h;var c;var u;var f;var p=new openfl_geom_Matrix;p.createGradientBox(this.get_width(),this.get_height(),Math.PI);this.get_graphics().beginGradientFill(0,n,o,l,p,0);var d=e/3;if(!s&&t>0){if(t>=e/2){u=e/2;f=t;h=e/2-.05*e;c=d/2-.05*e;this.halfEllipse(u,f,h,c,100,false);this.get_graphics().moveTo(.05*e,e/2);this.get_graphics().lineTo(.05*e,t);this.get_graphics().lineTo(e-.05*e,t);this.get_graphics().lineTo(e-.05*e,e/2);this.get_graphics().beginGradientFill(0,i,a,r,_,0);u=e/2;f=e/2;h=e/2;c=h;this.halfEllipse(u,f,h,c,100,true);this.get_graphics().beginGradientFill(0,n,o,l,p,0);u=e/3;f=e/2;h=e/3-.05*e;c=h+.05*e;this.halfEllipse(u,f,h,c,100,true)}else{u=e/2;f=t;h=e/2-.05*e;c=d/2-.05*e;this.halfEllipse(u,f,h,c,100,false);this.get_graphics().beginGradientFill(0,n,o,l,p,0);u=e/3;f=t;h=e/3-.05*e;c=t-2.5*(.05*e);this.halfEllipse(u,f,h,c,100,true)}}else if(t>=e/2){this.get_graphics().moveTo(.05*e,0);this.get_graphics().lineTo(.05*e,t-e/2);this.get_graphics().lineTo(e-.05*e,t-e/2);this.get_graphics().lineTo(e-.05*e,0);this.get_graphics().beginGradientFill(0,i,a,r,_,0);u=e/2;f=t-e/2;h=e/2;c=h;this.halfEllipse(u,f,h,c,100,false);this.get_graphics().beginGradientFill(0,n,o,l,p,0);u=e/3;f=t-e/2;h=e/3-.05*e;c=h+.05*e;this.halfEllipse(u,f,h,c,100,false);this.get_graphics().beginGradientFill(0,i,a,r,_,0);u=e/2;f=0;h=e/2;c=d/2;this.Ellipse(u,f,h,c,100);this.get_graphics().beginGradientFill(0,n,[.1,.7],[0,255],p,0);u=e/2;f=0;h=e/2-.05*e;c=d/2-.05*e;this.Ellipse(u,f,h,c,100)}else if(t>0){this.get_graphics().beginGradientFill(0,n,o,l,p,0);u=e/3;f=0;h=e/3-.05*e;c=t-2.5*(.05*e);this.halfEllipse(u,f,h,c,100,false);this.get_graphics().beginGradientFill(0,i,a,r,_,0);u=e/2;f=0;h=e/2;c=d/2;this.Ellipse(u,f,h,c,100);this.get_graphics().beginGradientFill(0,n,[.1,.67],[0,255],p,0);u=e/2;f=0;h=e/2-.05*e;c=d/2-.05*e;this.Ellipse(u,f,h,c,100)}else{this.get_graphics().beginGradientFill(0,i,a,r,_,0);u=e/2;f=0;h=e/2;c=d/2;this.Ellipse(u,f,h,c,100);this.get_graphics().beginGradientFill(0,n,[.1,.7],[0,255],p,0);u=e/2;f=0;h=e/2-.05*e;c=d/2-.05*e;this.Ellipse(u,f,h,c,100)}this.get_graphics().endFill()},Ellipse:function(e,t,s,i,a){this.get_graphics().moveTo(e+s,t);var r=0;while(r<=a){var _=r/a;var n=trcharts_charts_series_bars_Round3D.magicTrigFunctionX(_);var o=trcharts_charts_series_bars_Round3D.magicTrigFunctionY(_);var l=e+n*s;var h=t+o*i;this.get_graphics().lineTo(l,h);++r}return 1},halfEllipse:function(e,t,s,i,a,r){var _;var n;if(r==true){_=a/2;n=a}else{_=0;n=a/2}this.get_graphics().moveTo(e+s,t);var o=_;while(o<=n){var l=o/a;var h=trcharts_charts_series_bars_Round3D.magicTrigFunctionX(l);var c=trcharts_charts_series_bars_Round3D.magicTrigFunctionY(l);var u=e+h*s;var f=t+c*i;this.get_graphics().lineTo(u,f);++o}return 1},__class__:trcharts_charts_series_bars_Round3D});var trcharts_charts_series_bars_RoundGlass=function(e,t,s){trcharts_charts_series_bars_Base.call(this,e,t,s);var i=new openfl_filters_DropShadowFilter;i.set_blurX(5);i.set_blurY(5);i.set_distance(3);i.set_angle(45);i.set_quality(2);i.set_alpha(.4);this.set_filters([i])};$hxClasses["trcharts.charts.series.bars.RoundGlass"]=trcharts_charts_series_bars_RoundGlass;trcharts_charts_series_bars_RoundGlass.__name__=["trcharts","charts","series","bars","RoundGlass"];trcharts_charts_series_bars_RoundGlass.GetColours=function(e){var t=e;var s=(t&16711680)>>16;var i=(t&65280)>>8;var a=t&255;var r=2;var _=e;var n=e;var o=(t&16711680)>>16;var l=(t&65280)>>8;var h=t&255;var c=(t&16711680)>>16;var u=(t&65280)>>8;var f=t&255;if(s+s/r>255||i+i/r>255||a+a/r>255){o=s-s/r;l=i-i/r;h=a-a/r}c=o+s/r;f=h+a/r;u=l+i/r;_=(o|0)<<16|(l|0)<<8|(h|0);n=(c|0)<<16|(u|0)<<8|(f|0);return[n,_]};trcharts_charts_series_bars_RoundGlass.magicTrigFunctionX=function(e){return Math.cos(e*2*Math.PI)};trcharts_charts_series_bars_RoundGlass.magicTrigFunctionY=function(e){return Math.sin(e*2*Math.PI)};trcharts_charts_series_bars_RoundGlass.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_RoundGlass.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{resize:function(e){this.get_graphics().clear();var t=this.resize_helper(js_Boot.__cast(e,trcharts_ScreenCoords));this.bg(t.width,t.height,t.upside_down);this.glass(t.width,t.height,t.upside_down)},bg:function(e,t,s){var i=e/3;if(i>e/2){i=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_RoundGlass.GetColours(this.colour);var r=[1,1];var _=[0,255];var n=new openfl_geom_Matrix;var o;var l;var h;var c;n.createGradientBox(e,t,Math.PI);this.get_graphics().beginGradientFill(0,a,r,_,n,0);if(!s&&t>0){if(t>=e/2){this.get_graphics().beginGradientFill(0,a,r,_,n,0);this.get_graphics().moveTo(0,e/2);this.get_graphics().lineTo(0,t);this.get_graphics().lineTo(e,t);this.get_graphics().lineTo(e,e/2);h=e/2;c=e/2;o=e/2;l=o;this.halfEllipse(h,c,o,l,100,true)}else{h=e/2;c=t;o=e/2;l=t;this.halfEllipse(h,c,o,l,100,true)}}else if(t>=e/2){this.get_graphics().beginGradientFill(0,a,r,_,n,0);this.get_graphics().moveTo(0,0);this.get_graphics().lineTo(0,t-e/2);this.get_graphics().lineTo(e,t-e/2);this.get_graphics().lineTo(e,0);h=e/2;c=t-e/2;o=e/2;l=o;this.halfEllipse(h,c,o,l,100,false)}else if(t>0){h=e/2;c=0;o=e/2;l=t;this.halfEllipse(h,c,o,l,100,false)}else{this.get_graphics().beginGradientFill(0,a,r,_,n,0);this.get_graphics().moveTo(0,-.05*e);this.get_graphics().lineTo(0,t+.05*e);this.get_graphics().lineTo(e,t+.05*e);this.get_graphics().lineTo(e,-.05*e)}this.get_graphics().endFill()},glass:function(e,t,s){this.get_graphics().lineStyle(0,0,0);var i=trcharts_charts_series_bars_RoundGlass.GetColours(this.colour);var a=[1,1];var r=[0,255];var _=new openfl_geom_Matrix;_.createGradientBox(e,t,Math.PI);var n=[16777215,16777215];var o=[0,.75];var l=[100,255];var h;var c;var u;var f;var p=new openfl_geom_Matrix;p.createGradientBox(this.get_width(),this.get_height(),Math.PI);this.get_graphics().beginGradientFill(0,n,o,l,p,0);var d=e/3;if(!s&&t>0){if(t>=e/2){this.get_graphics().moveTo(.05*e,e/2);this.get_graphics().lineTo(.05*e,t-.05*e);this.get_graphics().lineTo(e-.05*e,t-.05*e);this.get_graphics().lineTo(e-.05*e,e/2);this.get_graphics().beginGradientFill(0,i,a,r,_,0);u=e/2;f=e/2;h=e/2;c=h;this.halfEllipse(u,f,h,c,100,true);this.get_graphics().beginGradientFill(0,n,o,l,p,0);u=e/3;f=e/2;h=e/3-.05*e;c=h+.05*e;this.halfEllipse(u,f,h,c,100,true)}else{this.get_graphics().beginGradientFill(0,n,o,l,p,0);u=e/3;f=t-.05*e;h=e/3-.05*e;c=t-2.5*(.05*e);this.halfEllipse(u,f,h,c,100,true)}}else if(t>=e/2){this.get_graphics().moveTo(.05*e,.05*e);this.get_graphics().lineTo(.05*e,t-e/2);this.get_graphics().lineTo(e-.05*e,t-e/2);this.get_graphics().lineTo(e-.05*e,.05*e);this.get_graphics().beginGradientFill(0,i,a,r,_,0);u=e/2;f=t-e/2;h=e/2;c=h;this.halfEllipse(u,f,h,c,100,false);this.get_graphics().beginGradientFill(0,n,o,l,p,0);u=e/3;f=t-e/2;h=e/3-.05*e;c=h+.05*e;this.halfEllipse(u,f,h,c,100,false)}else if(t>0){this.get_graphics().beginGradientFill(0,n,o,l,p,0);u=e/3;f=.05*e;h=e/3-.05*e;c=t-2.5*(.05*e);this.halfEllipse(u,f,h,c,100,false)}else{this.get_graphics().moveTo(.025*e,-.025*e);this.get_graphics().lineTo(.025*e,t+.025*e);this.get_graphics().lineTo(e,t+.025*e);this.get_graphics().lineTo(e,-.025*e)}this.get_graphics().endFill()},halfEllipse:function(e,t,s,i,a,r){var _;var n;if(r==true){_=a/2;n=a}else{_=0;n=a/2}this.get_graphics().moveTo(e+s,t);var o=_;while(o<=n){var l=o/a;var h=trcharts_charts_series_bars_RoundGlass.magicTrigFunctionX(l);var c=trcharts_charts_series_bars_RoundGlass.magicTrigFunctionY(l);var u=e+h*s;var f=t+c*i;this.get_graphics().lineTo(u,f);++o}return 1},__class__:trcharts_charts_series_bars_RoundGlass});var trcharts_charts_series_bars_Sketch=function(e,t,s){trcharts_charts_series_bars_Base.call(this,e,t,s);this.outline=t.get_colour("outline-colour");this.offset=t.get("offset")};$hxClasses["trcharts.charts.series.bars.Sketch"]=trcharts_charts_series_bars_Sketch;trcharts_charts_series_bars_Sketch.__name__=["trcharts","charts","series","bars","Sketch"];trcharts_charts_series_bars_Sketch.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Sketch.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{outline:null,offset:null,resize:function(e){var t=this.resize_helper(js_Boot.__cast(e,trcharts_ScreenCoords));var s=this.offset;var i=s/2;var a=6;var r=t.width/a;this.get_graphics().clear();this.get_graphics().lineStyle(r+1,this.colour,.85,true,1,1,1,.8);var _=0;while(_0){var a=t.get("halo-size")+this.radius;var r=new openfl_display_Sprite;r.get_graphics().lineStyle(0,0,0);r.get_graphics().beginFill(0,1);this.drawAnchor(r.get_graphics(),a,t.get("sides"),this.get_rotation());r.set_blendMode(4);r.get_graphics().endFill();this.line_mask=r}};$hxClasses["trcharts.charts.series.dots.Anchor"]=trcharts_charts_series_dots_Anchor;trcharts_charts_series_dots_Anchor.__name__=["trcharts","charts","series","dots","Anchor"];trcharts_charts_series_dots_Anchor.__super__=trcharts_charts_series_dots_PointDotBase;trcharts_charts_series_dots_Anchor.prototype=$extend(trcharts_charts_series_dots_PointDotBase.prototype,{set_tip:function(e){if(e){if(!this.is_tip){var t=this.line_mask!=null}this.is_tip=true}else{this.set_scaleX(1);this.set_scaleY(1);if(this.line_mask!=null){this.line_mask.set_scaleX(1);this.line_mask.set_scaleY(1)}this.is_tip=false}},drawAnchor:function(e,t,s,i){if(s<3){s=3}if(s>360){s=360}var a=360/s;var r=0;while(r<=s){var _=-90+i+r%s*a;var n=this.calcXOnCircle(t,_);var o=this.calcYOnCircle(t,_);if(r==0){e.moveTo(n,o)}else{e.lineTo(n,o)}++r}},__class__:trcharts_charts_series_dots_Anchor});var trcharts_charts_series_dots_Bow=function(e,t){var s=trcharts_string_Utils.get_colour(t.get("colour"));trcharts_charts_series_dots_PointDotBase.call(this,e,t);this.tooltip=this.replace_magic_values(t.get("tip"));this.attach_events();var i;if(t.get("hollow")){if(t.get("background-colour")!=null){i=trcharts_string_Utils.get_colour(t.get("background-colour"))}else{i=s}this.get_graphics().beginFill(i,t.get("background-alpha"))}else{this.get_graphics().beginFill(s,t.get("alpha"))}this.get_graphics().lineStyle(t.get("width"),s,t.get("alpha"));this.draw(this.get_graphics(),this.radius,t.get("rotation"));if(t.get("halo-size")>0){var a=new openfl_display_Sprite;a.get_graphics().lineStyle(0,0,0);a.get_graphics().beginFill(0,1);this.draw(a.get_graphics(),t.get("halo-size")+this.radius,t.get("rotation"));a.set_blendMode(4);a.get_graphics().endFill();this.line_mask=a}};$hxClasses["trcharts.charts.series.dots.Bow"]=trcharts_charts_series_dots_Bow;trcharts_charts_series_dots_Bow.__name__=["trcharts","charts","series","dots","Bow"];trcharts_charts_series_dots_Bow.__super__=trcharts_charts_series_dots_PointDotBase;trcharts_charts_series_dots_Bow.prototype=$extend(trcharts_charts_series_dots_PointDotBase.prototype,{set_tip:function(e){if(e){if(!this.is_tip){motion_Actuate.tween(this,1,{scaleX:1.3}).ease(motion_easing_Bounce.get_easeOut());motion_Actuate.tween(this,1,{scaleY:1.3}).ease(motion_easing_Bounce.get_easeOut());if(this.line_mask!=null){motion_Actuate.tween(this.line_mask,1,{scaleX:1.3}).ease(motion_easing_Bounce.get_easeOut());motion_Actuate.tween(this.line_mask,1,{scaleY:1.3}).ease(motion_easing_Bounce.get_easeOut())}}this.is_tip=true}else{motion_Actuate.stop(this);motion_Actuate.stop(this.line_mask);this.set_scaleX(1);this.set_scaleY(1);if(this.line_mask!=null){this.line_mask.set_scaleX(1);this.line_mask.set_scaleY(1)}this.is_tip=false}},draw:function(e,t,s){var i=60;e.moveTo(0,0);var a=-90+s+i;var r=this.calcXOnCircle(t,a);var _=this.calcYOnCircle(t,a);e.lineTo(r,_);a+=i;r=this.calcXOnCircle(t,a);_=this.calcYOnCircle(t,a);e.lineTo(r,_);e.lineTo(r,_);a=-90+s-i;r=this.calcXOnCircle(t,a);_=this.calcYOnCircle(t,a);e.lineTo(r,_);a-=i;r=this.calcXOnCircle(t,a);_=this.calcYOnCircle(t,a);e.lineTo(r,_);e.lineTo(r,_)},__class__:trcharts_charts_series_dots_Bow});var trcharts_charts_series_dots_DefaultDotProperties=function(e,t,s){var i=new trcharts_Properties({axis:s,type:"dot","dot-size":5,"halo-size":2,colour:t,tip:"#val#",alpha:1,rotation:0,sides:3,width:1});trcharts_Properties.call(this,e,i)};$hxClasses["trcharts.charts.series.dots.DefaultDotProperties"]=trcharts_charts_series_dots_DefaultDotProperties;trcharts_charts_series_dots_DefaultDotProperties.__name__=["trcharts","charts","series","dots","DefaultDotProperties"];trcharts_charts_series_dots_DefaultDotProperties.__super__=trcharts_Properties;trcharts_charts_series_dots_DefaultDotProperties.prototype=$extend(trcharts_Properties.prototype,{__class__:trcharts_charts_series_dots_DefaultDotProperties});var trcharts_charts_series_dots_Dot_$factory=function(){};$hxClasses["trcharts.charts.series.dots.Dot_factory"]=trcharts_charts_series_dots_Dot_$factory;trcharts_charts_series_dots_Dot_$factory.__name__=["trcharts","charts","series","dots","Dot_factory"];trcharts_charts_series_dots_Dot_$factory.make=function(e,t){var s=t.get("type");switch(s){case"anchor":return new trcharts_charts_series_dots_Anchor(e,t);case"bow":return new trcharts_charts_series_dots_Bow(e,t);case"dot":return new trcharts_charts_series_dots_Point(e,t);case"hollow-dot":return new trcharts_charts_series_dots_Hollow(e,t);case"solid-dot":return new trcharts_charts_series_dots_PointDot(e,t);case"star":return new trcharts_charts_series_dots_Star(e,t);default:return new trcharts_charts_series_dots_Point(e,t)}};var trcharts_charts_series_dots_Hollow=function(e,t){trcharts_charts_series_dots_PointDotBase.call(this,e,t);var s=trcharts_string_Utils.get_colour(t.get("colour"));this.get_graphics().clear();this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(s,1);this.get_graphics().drawCircle(0,0,t.get("dot-size"));this.get_graphics().drawCircle(0,0,t.get("dot-size")-t.get("width"));this.get_graphics().endFill();this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(0,0);this.get_graphics().drawCircle(0,0,t.get("dot-size"));this.get_graphics().endFill();var i=new openfl_display_Sprite;i.get_graphics().lineStyle(0,0,0);i.get_graphics().beginFill(0,1);i.get_graphics().drawCircle(0,0,t.get("dot-size")+t.get("halo-size"));i.set_blendMode(4);this.line_mask=i;this.attach_events()};$hxClasses["trcharts.charts.series.dots.Hollow"]=trcharts_charts_series_dots_Hollow;trcharts_charts_series_dots_Hollow.__name__=["trcharts","charts","series","dots","Hollow"];trcharts_charts_series_dots_Hollow.__super__=trcharts_charts_series_dots_PointDotBase;trcharts_charts_series_dots_Hollow.prototype=$extend(trcharts_charts_series_dots_PointDotBase.prototype,{__class__:trcharts_charts_series_dots_Hollow});var trcharts_charts_series_dots_Point=function(e,t){trcharts_charts_series_dots_PointDotBase.call(this,e,t);var s=trcharts_string_Utils.get_colour(t.get("colour"));this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(s,1);this.get_graphics().drawCircle(0,0,t.get("dot-size"));this.set_visible(false);this.attach_events();var i=new openfl_display_Sprite;i.get_graphics().lineStyle(0,0,0);i.get_graphics().beginFill(0,1);i.get_graphics().drawCircle(0,0,t.get("dot-size")+t.get("halo-size"));i.set_blendMode(4);i.set_visible(false);this.line_mask=i};$hxClasses["trcharts.charts.series.dots.Point"]=trcharts_charts_series_dots_Point;trcharts_charts_series_dots_Point.__name__=["trcharts","charts","series","dots","Point"];trcharts_charts_series_dots_Point.__super__=trcharts_charts_series_dots_PointDotBase;trcharts_charts_series_dots_Point.prototype=$extend(trcharts_charts_series_dots_PointDotBase.prototype,{set_tip:function(e){this.set_visible(e);this.line_mask.set_visible(e)},__class__:trcharts_charts_series_dots_Point});var trcharts_charts_series_dots_PointDot=function(e,t){trcharts_charts_series_dots_PointDotBase.call(this,e,t);var s=trcharts_string_Utils.get_colour(t.get("colour"));this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(s,1);this.get_graphics().drawCircle(0,0,t.get("dot-size"));this.get_graphics().endFill();var i=new openfl_display_Sprite;i.get_graphics().lineStyle(0,0,0);i.get_graphics().beginFill(0,1);i.get_graphics().drawCircle(0,0,t.get("dot-size")+t.get("halo-size"));i.set_blendMode(4);this.line_mask=i;this.attach_events()};$hxClasses["trcharts.charts.series.dots.PointDot"]=trcharts_charts_series_dots_PointDot;trcharts_charts_series_dots_PointDot.__name__=["trcharts","charts","series","dots","PointDot"];trcharts_charts_series_dots_PointDot.__super__=trcharts_charts_series_dots_PointDotBase;trcharts_charts_series_dots_PointDot.prototype=$extend(trcharts_charts_series_dots_PointDotBase.prototype,{__class__:trcharts_charts_series_dots_PointDot});var trcharts_charts_series_dots_Star=function(e,t){trcharts_charts_series_dots_PointDotBase.call(this,e,t);var s=trcharts_string_Utils.get_colour(t.get("colour"));this.tooltip=this.replace_magic_values(t.get("tip"));this.attach_events();if(t.get("hollow")){var i;if(t.has("background-colour")){i=trcharts_string_Utils.get_colour(t.get("background-colour"))}else{i=s}this.get_graphics().beginFill(i,t.get("background-alpha"))}else{this.get_graphics().beginFill(s,t.get("alpha"))}this.get_graphics().lineStyle(t.get("width"),s,t.get("alpha"));this.drawStar_2(this.get_graphics(),this.radius,t.get("rotation"));if(t.get("halo-size")>0){var a=new openfl_display_Sprite;a.get_graphics().lineStyle(0,0,0);a.get_graphics().beginFill(0,1);this.drawStar_2(a.get_graphics(),t.get("halo-size")+this.radius,t.get("rotation"));a.set_blendMode(4);a.get_graphics().endFill();this.line_mask=a}};$hxClasses["trcharts.charts.series.dots.Star"]=trcharts_charts_series_dots_Star;trcharts_charts_series_dots_Star.__name__=["trcharts","charts","series","dots","Star"];trcharts_charts_series_dots_Star.__super__=trcharts_charts_series_dots_PointDotBase;trcharts_charts_series_dots_Star.prototype=$extend(trcharts_charts_series_dots_PointDotBase.prototype,{set_tip:function(e){if(e){if(!this.is_tip){motion_Actuate.tween(this,1,{scaleX:1.3}).ease(motion_easing_Bounce.get_easeOut());motion_Actuate.tween(this,1,{scaleY:1.3}).ease(motion_easing_Bounce.get_easeOut());if(this.line_mask!=null){motion_Actuate.tween(this.line_mask,1,{scaleX:1.3}).ease(motion_easing_Bounce.get_easeOut());motion_Actuate.tween(this.line_mask,1,{scaleY:1.3}).ease(motion_easing_Bounce.get_easeOut())}}this.is_tip=true}else{motion_Actuate.stop(this);motion_Actuate.stop(this.line_mask);this.set_scaleX(1);this.set_scaleY(1);if(this.line_mask!=null){this.line_mask.set_scaleX(1);this.line_mask.set_scaleY(1)}this.is_tip=false}},drawStar_2:function(e,t,s){var i=36;var a=-90+s;var r=0;while(r<11){var _=r++;var n=_%2==0?t:t/2;var o=this.calcXOnCircle(n,a);var l=this.calcYOnCircle(n,a);if(_==0){e.moveTo(o,l)}else{e.lineTo(o,l)}a+=i}},__class__:trcharts_charts_series_dots_Star});var trcharts_charts_series_pies_DefaultPieProperties=function(e){var t=new trcharts_Properties({alpha:.5,"start-angle":90,"label-colour":null,"font-size":10,"gradient-fill":false,stroke:1,colours:["#900000","#009000"],animate:[{type:"fade-in"}],tip:"#val# of #total#","no-labels":false,"on-click":null});trcharts_Properties.call(this,e,t)};$hxClasses["trcharts.charts.series.pies.DefaultPieProperties"]=trcharts_charts_series_pies_DefaultPieProperties;trcharts_charts_series_pies_DefaultPieProperties.__name__=["trcharts","charts","series","pies","DefaultPieProperties"];trcharts_charts_series_pies_DefaultPieProperties.__super__=trcharts_Properties;trcharts_charts_series_pies_DefaultPieProperties.prototype=$extend(trcharts_Properties.prototype,{__class__:trcharts_charts_series_pies_DefaultPieProperties});var trcharts_charts_series_pies_PieLabel=function(e){openfl_text_TextField.call(this);this.set_text(lime_text__$UTF8String_UTF8String_$Impl_$.fromDynamic(e.label));var t=new openfl_text_TextFormat;t.color=trcharts_string_Utils.get_colour(Reflect.field(e,"colour"));t.font="Verdana";t.size=Reflect.field(e,"font-size");this.setTextFormat(t);this.set_autoSize(1);this.mouseEnabled=false;this.set_selectable(false)};$hxClasses["trcharts.charts.series.pies.PieLabel"]=trcharts_charts_series_pies_PieLabel;trcharts_charts_series_pies_PieLabel.__name__=["trcharts","charts","series","pies","PieLabel"];trcharts_charts_series_pies_PieLabel.__interfaces__=[trcharts_charts_series_Has_$tooltip];trcharts_charts_series_pies_PieLabel.__super__=openfl_text_TextField;trcharts_charts_series_pies_PieLabel.prototype=$extend(openfl_text_TextField.prototype,{get_tooltip:function(){return js_Boot.__cast(this.parent,trcharts_charts_series_Has_$tooltip).get_tooltip()},get_tip_pos:function(){return js_Boot.__cast(this.parent,trcharts_charts_series_Has_$tooltip).get_tip_pos()},__class__:trcharts_charts_series_pies_PieLabel});var trcharts_charts_series_pies_PieSlice=function(e,t){this.TO_RADIANS=Math.PI/180;trcharts_charts_series_Element.call(this);this.colour=t.get_colour("colour");this.slice_angle=t.get("angle");this.border_width=1;this.angle=t.get("start");this.animate=t.get("animate");this.nolabels=t.get("no-labels");this.value=t.get("value");this.gradientFill=t.get("gradient-fill");this.index=e;this.rawToolTip=t.get("tip");this.label=this.replace_magic_values(t.get("label"));this.tooltip=this.replace_magic_values(t.get("tip"));if(t.has("on-click")){this.set_on_click(t.get("on-click"))}this.finished_animating=false};$hxClasses["trcharts.charts.series.pies.PieSlice"]=trcharts_charts_series_pies_PieSlice;trcharts_charts_series_pies_PieSlice.__name__=["trcharts","charts","series","pies","PieSlice"];trcharts_charts_series_pies_PieSlice.__super__=trcharts_charts_series_Element;trcharts_charts_series_pies_PieSlice.prototype=$extend(trcharts_charts_series_Element.prototype,{TO_RADIANS:null,colour:null,slice_angle:null,border_width:null,angle:null,nolabels:null,animate:null,finished_animating:null,value:null,gradientFill:null,label:null,pieRadius:null,rawToolTip:null,set_tip:function(e){},get_tip_pos:function(){var e=this.localToGlobal(new openfl_geom_Point(this.get_mouseX(),this.get_mouseY()));return{x:e.x,y:e.y}},replace_magic_values:function(e){e=StringTools.replace(e,"#label#",this.label);e=StringTools.replace(e,"#val#",trcharts_NumberUtils.formatNumber(this.value));e=StringTools.replace(e,"#radius#",trcharts_NumberUtils.formatNumber(this.pieRadius));return e},get_tooltip:function(){this.tooltip=this.replace_magic_values(this.rawToolTip);return this.tooltip},resize:function(e){},pie_resize:function(e,t){this.pieRadius=t;this.set_x(e.get_center_x());this.set_y(e.get_center_y());var s=10;this.get_graphics().clear();this.get_graphics().lineStyle(this.border_width,this.colour,1);if(this.gradientFill){var i=[this.colour,this.colour];var a=[1,.5];var r=[100,255];var _=new openfl_geom_Matrix;_.createGradientBox(t*2,t*2,0,-t,-t);this.get_graphics().beginGradientFill(1,i,a,r,_)}else{this.get_graphics().beginFill(this.colour,1)}this.get_graphics().moveTo(0,0);this.get_graphics().lineTo(t,0);var n=4;var o=Math.tan(n/2*this.TO_RADIANS);var l=0;var h;var c;var u;var f;l=0;while(l+n=270)){return this.getTicAngle()<=90}else{return true}},get_colour:function(){return this.colour},__class__:trcharts_charts_series_pies_PieSlice});var trcharts_charts_series_pies_PieSliceContainer=function(e,t){this.animationOffset=30;this.label_margin=2;this.tick_extension_size=4;this.tick_size=10;this.TO_RADIANS=Math.PI/180;trcharts_charts_series_Element.call(this);this.pieSlice=new trcharts_charts_series_pies_PieSlice(e,t);this.addChild(this.pieSlice);var s=t.get("label");this.set_alpha(this.original_alpha=t.get("alpha"));if(!t.has("label-colour")){t.set("label-colour",t.get("colour"))}var i=t.get("no-labels")?"":t.get("label");this.pieLabel=new trcharts_charts_series_pies_PieLabel({label:i,colour:t.get("label-colour"),"font-size":t.get("font-size"),"on-click":t.get("on-click")});this.addChild(this.pieLabel);this.attach_events__(t);this.animating=false};$hxClasses["trcharts.charts.series.pies.PieSliceContainer"]=trcharts_charts_series_pies_PieSliceContainer;trcharts_charts_series_pies_PieSliceContainer.__name__=["trcharts","charts","series","pies","PieSliceContainer"];trcharts_charts_series_pies_PieSliceContainer.__super__=trcharts_charts_series_Element;trcharts_charts_series_pies_PieSliceContainer.prototype=$extend(trcharts_charts_series_Element.prototype,{TO_RADIANS:null,animating:null,pieSlice:null,pieLabel:null,pieRadius:null,tick_size:null,tick_extension_size:null,label_margin:null,animationOffset:null,saveX:null,saveY:null,moveToX:null,moveToY:null,original_alpha:null,resize:function(e){},pie_resize:function(e,t){this.pieRadius=t;this.pieSlice.pie_resize(e,t);var s=this.getTicAngle();this.saveX=this.get_x();this.saveY=this.get_y();this.moveToX=this.get_x()+this.animationOffset*Math.cos(s*this.TO_RADIANS);this.moveToY=this.get_y()+this.animationOffset*Math.sin(s*this.TO_RADIANS);if(this.pieLabel.get_visible()){var i=t+this.tick_size;var a=s*this.TO_RADIANS;this.pieLabel.set_x(this.pieSlice.get_x()+i*Math.cos(a));this.pieLabel.set_y(this.pieSlice.get_y()+i*Math.sin(a));if(this.isRightSide()){var r=this.pieLabel;r.set_x(r.get_x()+(this.tick_extension_size+this.label_margin))}else{this.pieLabel.set_x(this.pieLabel.get_x()-this.pieLabel.get_width()-this.tick_extension_size-this.label_margin-4)}var _=this.pieLabel;_.set_y(_.get_y()-this.pieLabel.get_height()/2);this.drawTicLines()}},get_tooltip:function(){return this.pieSlice.get_tooltip()},get_tip_pos:function(){var e=this.localToGlobal(new openfl_geom_Point(this.get_mouseX(),this.get_mouseY()));return{x:e.x,y:e.y}},attach_events__:function(e){var t=e.get("animate");if(!(t instanceof Array&&t.__enum__==null)){if(t==null||t){t=[{type:"bounce",distance:5}]}else{t=[]}}var s=js_Boot.__cast(t,Array);this.addEventListener("mouseOver",$bind(this,this.mouseOver_first),false,0,true);this.addEventListener("mouseOut",$bind(this,this.mouseOut_first),false,0,true);var i=0;while(ie.bottom-1){a=e.bottom-this.pieLabel.get_height()-i;s=true}var r=this.pieLabel;r.set_y(r.get_y()+a);if(!s){var _=this.pieRadius+this.tick_size;var n=(this.pieLabel.get_y()+this.pieLabel.get_height()/2-this.pieSlice.get_y())/_;n=Math.max(-1,Math.min(1,n));var o=Math.asin(n)/this.TO_RADIANS;if(this.getTicAngle()>90&&this.getTicAngle()<270){o=180-o}else if(this.getTicAngle()>=270){o=360+o}var l=this.pieSlice.get_x()+_*Math.cos(o*this.TO_RADIANS);if(this.isRightSide()){this.pieLabel.set_x(l+this.tick_extension_size+this.label_margin)}else{this.pieLabel.set_x(l-this.pieLabel.get_width()-this.tick_extension_size-this.label_margin-4)}}}this.drawTicLines();return this.pieLabel.get_y()+this.pieLabel.get_height()}else{return t}},moveLabelUp:function(e,t){if(this.pieLabel.get_visible()){var s=1;var i=false;var a=this.getLabelBottomY();if(a>t){var r=t-a;if(t-this.pieLabel.get_height()90&&this.getTicAngle()<270){l=180-l;s=-1}else if(this.getTicAngle()>=270){l=360+l}var h=this.pieSlice.get_x()+n*Math.cos(l*this.TO_RADIANS);if(this.isRightSide()){this.pieLabel.set_x(h+this.tick_extension_size+this.label_margin)}else{this.pieLabel.set_x(h-this.pieLabel.get_width()-this.tick_extension_size-this.label_margin-4)}}}this.drawTicLines();return this.pieLabel.get_y()}else{return t}},get_radius_offsets:function(){var e={top:this.animationOffset,right:this.animationOffset,bottom:this.animationOffset,left:this.animationOffset};if(this.pieLabel.get_visible()){var t=this.getTicAngle();var s=20;var i=this.tick_size;if(t>=0&&t<=90){e.bottom=t/90*i+this.pieLabel.get_height()/2+1;e.right=(90-t)/90*i+this.tick_extension_size+this.label_margin+this.pieLabel.get_width()}else if(t>90&&t<=180){e.bottom=(180-t)/90*i+this.pieLabel.get_height()/2+1;e.left=(t-90)/90*i+this.tick_extension_size+this.label_margin+this.pieLabel.get_width()+4}else if(t>180&&t<270){e.top=(t-180)/90*i+this.pieLabel.get_height()/2+1;e.left=(270-t)/90*i+this.tick_extension_size+this.label_margin+this.pieLabel.get_width()+4}else{e.top=(360-t)/90*i+this.pieLabel.get_height()/2+1;e.right=(t-270)/90*i+this.tick_extension_size+this.label_margin+this.pieLabel.get_width()}}return e},drawTicLines:function(){if(this.pieLabel.get_text()!=""&&this.pieLabel.get_visible()){var e=this.getTicAngle();var t=this.pieRadius+this.tick_size;var s=e*this.TO_RADIANS;var i;var a;if(this.pieSlice.isRightSide()){i=this.pieLabel.get_x()-this.label_margin}else{i=this.pieLabel.get_x()+this.pieLabel.get_width()+this.label_margin+4}a=this.pieLabel.get_y()+this.pieLabel.get_height()/2;var r=this.pieSlice.get_x()+this.pieRadius*Math.cos(s);var _=this.pieSlice.get_y()+this.pieRadius*Math.sin(s);this.get_graphics().clear();var n=this.pieSlice.get_colour();this.get_graphics().lineStyle(1,n,1);this.get_graphics().moveTo(i,a);if(this.pieSlice.isRightSide()){this.get_graphics().lineTo(i-this.tick_extension_size,a)}else{this.get_graphics().lineTo(i+this.tick_extension_size,a)}this.get_graphics().lineTo(r,_)}},getTicAngle:function(){return this.pieSlice.getTicAngle()},isRightSide:function(){return this.pieSlice.isRightSide()},__class__:trcharts_charts_series_pies_PieSliceContainer});var trcharts_charts_series_tags_Tag=function(e){this.yAdj=0;this.xAdj=0;openfl_text_TextField.call(this);this._x=e.x;this._y=e.y;this.right_axis=e.axis=="right";if(Reflect.field(e,"on-click")){this.set_on_click(Reflect.field(e,"on-click"))}this.set_htmlText(this.replace_magic_values(e.text));this.set_autoSize(1);this.set_alpha(e.alpha);this.set_border(e.border);if(e.background!=null){this.set_background(true);this.set_backgroundColor(trcharts_string_Utils.get_colour(e.background))}var t=new openfl_text_TextFormat;if(e.rotate!=0){t.font="spArial";this.set_embedFonts(true)}else{t.font=e.font}t.color=e.colour;t.size=Reflect.field(e,"font-size");t.bold=e.bold;t.underline=e.underline;this.setTextFormat(t);this.set_selectable(false);this.rotate_and_align(e.rotate,Reflect.field(e,"align-x"),Reflect.field(e,"align-y"),Reflect.field(e,"pad-x"),Reflect.field(e,"pad-y"))};$hxClasses["trcharts.charts.series.tags.Tag"]=trcharts_charts_series_tags_Tag;trcharts_charts_series_tags_Tag.__name__=["trcharts","charts","series","tags","Tag"];trcharts_charts_series_tags_Tag.__super__=openfl_text_TextField;trcharts_charts_series_tags_Tag.prototype=$extend(openfl_text_TextField.prototype,{_x:null,_y:null,xAdj:null,yAdj:null,link:null,right_axis:null,rotate_and_align:function(e,t,s,i,a){e%=360;if(e<0){e+=360}this.set_rotation(e);var r=this.get_width()*Math.cos(e*Math.PI/180);var _=this.get_height()*Math.cos((90-e)*Math.PI/180);var n=this.get_height()*Math.sin((90-e)*Math.PI/180);var o=this.get_width()*Math.sin(e*Math.PI/180);if(t=="right"){switch(e){case 0:this.xAdj=0;break;case 90:this.xAdj=this.get_width();break;case 180:this.xAdj=this.get_width();break;case 270:this.xAdj=0;break}this.xAdj+=i}else if(t=="left"){switch(e){case 0:this.xAdj=-this.get_width();break;case 90:this.xAdj=0;break;case 180:this.xAdj=0;break;case 270:this.xAdj=-this.get_width();break}this.xAdj-=i}else{switch(e){case 0:this.xAdj=-this.get_width()/2;break;case 90:this.xAdj=this.get_width()/2;break;case 180:this.xAdj=this.get_width()/2;break;case 270:this.xAdj=-this.get_width()/2;break}}if(s=="center"){switch(e){case 0:this.yAdj=-this.get_height()/2;break;case 90:this.yAdj=-this.get_height()/2;break;case 180:this.yAdj=this.get_height()/2;break;case 270:this.yAdj=this.get_height()/2;break}}else if(s=="below"){switch(e){case 0:this.yAdj=0;break;case 90:this.yAdj=0;break;case 180:this.yAdj=this.get_height();break;case 270:this.yAdj=this.get_height();break}this.yAdj+=a}else{switch(e){case 0:this.yAdj=-this.get_height();break;case 90:this.yAdj=-this.get_height();break;case 180:this.yAdj=0;break;case 270:this.yAdj=0;break}this.yAdj-=a}},replace_magic_values:function(e){e=StringTools.replace(e,"/#x#/g",trcharts_NumberUtils.formatNumber(this._x));e=StringTools.replace(e,"#y#",trcharts_NumberUtils.formatNumber(this._y));e=trcharts_string_DateUtils.replace_magic_values(e,this._x);e=StringTools.replace(e,"/#ygmdate/g","#gmdate");e=StringTools.replace(e,"#ydate","#date");e=trcharts_string_DateUtils.replace_magic_values(e,this._y);return e},set_on_click:function(e){this.link=e;this.addEventListener("mouseUp",$bind(this,this.mouseUp),false,0,true)},mouseUp:function(e){if(this.link.substring(0,6)!="trace:"){if(this.link.substring(0,5)=="http:"){this.browse_url(this.link)}else{openfl_external_ExternalInterface.call(this.link,this._x)}}},browse_url:function(e){var t=new openfl_net_URLRequest(this.link);try{openfl_Lib.getURL(t)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,openfl_errors_Error)){}else throw e}},resize:function(e){this.set_x(e.get_x_from_val(this._x)+this.xAdj);this.set_y(e.get_y_from_val(this._y,this.right_axis)+this.yAdj)},__class__:trcharts_charts_series_tags_Tag});var trcharts_elements_Background=function(e,t){openfl_display_Sprite.call(this);this._trcharts=t;if(Object.prototype.hasOwnProperty.call(e,"bg_colour")&&Reflect.field(e,"bg_colour")!=null){this.colour=trcharts_string_Utils.get_colour(e.bg_colour)}else{this.colour=16316632}if(Object.prototype.hasOwnProperty.call(e,"bg_image")&&Reflect.field(e,"bg_image")!=null){this.load_img(e.bg_image)}};$hxClasses["trcharts.elements.Background"]=trcharts_elements_Background;trcharts_elements_Background.__name__=["trcharts","elements","Background"];trcharts_elements_Background.__super__=openfl_display_Sprite;trcharts_elements_Background.prototype=$extend(openfl_display_Sprite.prototype,{colour:null,img_x:null,img_y:null,_trcharts:null,load_img:function(e){if(Object.prototype.hasOwnProperty.call(e,"bg_image_x")&&Reflect.field(e,"bg_image_x")!=null){this.img_x=e.bg_image_x}if(Object.prototype.hasOwnProperty.call(e,"bg_image_y")&&Reflect.field(e,"bg_image_y")!=null){this.img_y=e.bg_image_y}},resize:function(){this.get_graphics().clear();this.get_graphics().beginFill(this.colour);this.get_graphics().drawRect(0,0,this._trcharts.get_realWidth(),this._trcharts.get_realHeight())},die:function(){this.get_graphics().clear()},__class__:trcharts_elements_Background});var trcharts_elements_axis_AxisLabel=function(){this.xVal=NaN;this.rightOverhang=0;this.leftOverhang=0;this.yAdj=0;this.xAdj=0;openfl_text_TextField.call(this)};$hxClasses["trcharts.elements.axis.AxisLabel"]=trcharts_elements_axis_AxisLabel;trcharts_elements_axis_AxisLabel.__name__=["trcharts","elements","axis","AxisLabel"];trcharts_elements_axis_AxisLabel.__super__=openfl_text_TextField;trcharts_elements_axis_AxisLabel.prototype=$extend(openfl_text_TextField.prototype,{xAdj:null,yAdj:null,leftOverhang:null,rightOverhang:null,xVal:null,rotate_and_align:function(e,t,s){e%=360;if(e<0){e+=360}var i=this.get_width()*Math.cos(e*Math.PI/180);var a=this.get_height()*Math.cos((90-e)*Math.PI/180);var r=this.get_height()*Math.sin((90-e)*Math.PI/180);var _=this.get_width()*Math.sin(e*Math.PI/180);if(e%90==0||t=="center"){this.xAdj=(a-i)/2}else{this.xAdj=e<180?a/2:-i+a/2}if(e>90){this.yAdj=-r}if(e>180){this.yAdj=-r-_}if(e>270){this.yAdj=-_}this.set_rotation(e);var n=this.getBounds(s);this.leftOverhang=Math.abs(n.x+this.xAdj);this.rightOverhang=Math.abs(n.x+n.width+this.xAdj)},__class__:trcharts_elements_axis_AxisLabel});var trcharts_elements_axis_RadarAxis=function(e){openfl_display_Sprite.call(this);this.style={stroke:2,colour:"#784016","grid-colour":"#F5E1AA",min:0,max:null,steps:1};if(e!=null){trcharts_Object_$helper.merge_2(e,this.style)}this.colour=trcharts_string_Utils.get_colour(this.style.colour);this.grid_colour=trcharts_string_Utils.get_colour(Reflect.field(this.style,"grid-colour"));this.labels=new trcharts_elements_axis_RadarAxisLabels(e.labels);this.addChild(this.labels);this.spoke_labels=new trcharts_elements_axis_RadarSpokeLabels(Reflect.field(e,"spoke-labels"));this.addChild(this.spoke_labels)};$hxClasses["trcharts.elements.axis.RadarAxis"]=trcharts_elements_axis_RadarAxis;trcharts_elements_axis_RadarAxis.__name__=["trcharts","elements","axis","RadarAxis"];trcharts_elements_axis_RadarAxis.__super__=openfl_display_Sprite;trcharts_elements_axis_RadarAxis.prototype=$extend(openfl_display_Sprite.prototype,{style:null,colour:null,grid_colour:null,labels:null,spoke_labels:null,get_range:function(){return new trcharts_Range(this.style.min,this.style.max,this.style.steps,false)},resize:function(e){this.set_x(0);this.set_y(0);this.get_graphics().clear();this.spoke_labels.resize(e);var t=e.get_angles();this.draw_grid(e,t);this.draw_axis(e,t);this.labels.resize(e)},draw_axis:function(e,t){this.get_graphics().lineStyle(this.style.stroke,this.colour,1,true);var s=0;while(s0)this.removeChildAt(0)},__class__:trcharts_elements_axis_RadarAxis});var trcharts_elements_axis_RadarAxisLabels=function(e){openfl_display_Sprite.call(this);this.style={colour:"#784016",steps:1};if(e!=null){trcharts_Object_$helper.merge_2(e,this.style)}this.style.colour=trcharts_string_Utils.get_colour(this.style.colour);this.labels=[];var t;var s=false;if(this.style.labels instanceof Array&&this.style.labels.__enum__==null&&this.style.labels.length>0){var i=this.style.labels;var a=0;while(a0)this.removeChildAt(0)},__class__:trcharts_elements_axis_RadarAxisLabels});var trcharts_elements_axis_RadarSpokeLabels=function(e){openfl_display_Sprite.call(this);this.style={colour:"#784016"};if(e!=null){trcharts_Object_$helper.merge_2(e,this.style)}this.style.colour=trcharts_string_Utils.get_colour(this.style.colour);this.labels=[];var t;var s=false;if(this.style.labels instanceof Array&&this.style.labels.__enum__==null&&this.style.labels.length>0){var i=this.style.labels;var a=0;while(a");var a=i.join("\n");t.set_text(a);t.set_selectable(false);var r=new openfl_text_TextFormat;r.color=e.colour;r.font="Verdana";r.size=e.size;r.align=4;t.setTextFormat(r);t.set_autoSize(1);t.set_visible(true);return t},resize:function(e){var t;var s=0;var i;while(true){i=false;this.resize_2(e);s=0;while(se.bottom||t.get_x()+t.get_width()>e.right){i=true}++s}e.reduce_radius();if(!(i&&e.get_radius()>10)){break}}},resize_2:function(e){var t;var s;var i=e.get_center_x();t=0;while(ti){s.set_x(a.x)}else{s.set_x(a.x-s.get_width())}if(t==0){s.set_y(a.y-s.get_height());s.set_x(a.x)}else{s.set_y(a.y)}++t}},die:function(){this.style=null;this.labels=null;this.get_graphics().clear();while(this.get_numChildren()>0)this.removeChildAt(0)},__class__:trcharts_elements_axis_RadarSpokeLabels});var trcharts_elements_axis_XAxis=function(e,t,s){openfl_display_Sprite.call(this);this.style={stroke:2,"tick-height":3,colour:"#784016",offset:true,"grid-colour":"#F5E1AA","grid-visible":true,"3d":0,steps:1,min:0,max:null};if(e!=null){trcharts_Object_$helper.merge_2(e.x_axis,this.style)}this.calcSteps();this.stroke=this.style.stroke;this.tick_height=Reflect.field(this.style,"tick-height");this.colour=this.style.colour;this.offset=this.style.offset;this.grid_visible=Reflect.field(this.style,"grid-visible");this.colour=trcharts_string_Utils.get_colour(this.style.colour);this.grid_colour=trcharts_string_Utils.get_colour(Reflect.field(this.style,"grid-colour"));if(Reflect.field(this.style,"3d")>0){this.three_d=true;this.three_d_height=Std.parseInt(Reflect.field(this.style,"3d"))}else{this.three_d=false}if(e){if(e.x_label_style!=null){if(e.x_label_style.alt_axis_step!=null){this.alt_axis_step=e.x_label_style.alt_axis_step}if(e.x_label_style.alt_axis_colour!=null){this.alt_axis_colour=trcharts_string_Utils.get_colour(e.x_label_style.alt_axis_colour)}}}this.labels=new trcharts_elements_axis_XAxisLabels(e);this.addChild(this.labels);if(!this.range_set()){if(this.labels.need_labels){this.set_range(t,s)}else if(this.labels.count()>s){this.set_range(0,this.labels.count())}else{this.set_range(t,s)}}else{this.labels.auto_label(this.get_range(),this.get_steps())}this.make_user_ticks()};$hxClasses["trcharts.elements.axis.XAxis"]=trcharts_elements_axis_XAxis;trcharts_elements_axis_XAxis.__name__=["trcharts","elements","axis","XAxis"];trcharts_elements_axis_XAxis.__super__=openfl_display_Sprite;trcharts_elements_axis_XAxis.prototype=$extend(openfl_display_Sprite.prototype,{steps:null,alt_axis_colour:null,alt_axis_step:null,three_d:null,three_d_height:null,stroke:null,tick_height:null,colour:null,offset:null,grid_colour:null,grid_visible:null,user_ticks:null,user_labels:null,labels:null,style:null,make_user_ticks:function(){if(this.style.labels!=null&&this.style.labels.labels!=null&&(this.style.labels.labels instanceof Array&&this.style.labels.labels.__enum__==null)&&this.style.labels.labels.length>0){this.user_labels=[];var e=this.style.labels.labels;var t=0;while(t=this.style.max;this.steps=this.style.steps!=null&&this.style.steps!=0?this.style.steps:1;if(Math.abs(e)/this.steps>250){this.steps=e/250}this.steps=t?-Math.abs(this.steps):Math.abs(this.steps)}},range_set:function(){return this.style.max!=null},set_range:function(e,t){this.style.min=e;this.style.max=t;this.calcSteps();this.labels.auto_label(this.get_range(),this.get_steps())},get_range:function(){return new trcharts_Range(this.style.min,this.style.max,this.steps,this.offset)},get_steps:function(){return this.steps},resize:function(e,t){this.get_graphics().clear();if(this.user_ticks){var s=0;var i=this.user_labels;while(s=this.style.max;var n=this.style.max;var o=this.style.min;while(_?o>=n:o<=n){if(this.alt_axis_step>1&&o%this.alt_axis_step==0){this.get_graphics().beginFill(this.alt_axis_colour,1)}else{this.get_graphics().beginFill(this.grid_colour,1)}var l=e.get_x_from_val(o);this.get_graphics().drawRect(l,e.top,1,e.height);this.get_graphics().endFill();o+=this.steps}}if(this.three_d){this.three_d_axis(e)}else{this.two_d_axis(e)}this.labels.resize(e,t)},three_d_axis:function(e){var t=this.three_d_height;var s=12;var i=t+s;var a=e.width/this.style.max;this.get_graphics().lineStyle(0,0,0);var r=1;if(this.user_ticks){var _=0;var n=this.user_labels;while(_0)this.removeChildAt(0);if(this.labels!=null){this.labels.die()}this.labels=null},__class__:trcharts_elements_axis_XAxis});var trcharts_elements_axis_XAxisLabels=function(e){openfl_display_Sprite.call(this);this.need_labels=true;this.style={rotate:0,visible:null,labels:null,text:"#val#",steps:null,size:10,align:"auto",colour:"#000000","visible-steps":null};this.axis_labels=[];if(e.x_axis!=null&&e.x_axis.labels!=null){trcharts_Object_$helper.merge_2(e.x_axis.labels,this.style)}this.userSpecifiedVisible=this.style.visible;if(this.style.visible==null){this.style.visible=true}if(typeof this.style.rotate=="string"){if(this.style.rotate=="vertical"){this.style.rotate=270}else if(this.style.rotate=="diagonal"){this.style.rotate=-45}}this.style.colour=trcharts_string_Utils.get_colour(this.style.colour);if(this.style.labels instanceof Array&&this.style.labels.__enum__==null&&this.style.labels.length>0){this.need_labels=false;if(this.style.steps==null){this.style.steps=1}var t=0;var s=0;var i=Reflect.field(this.style,"visible-steps")==null?this.style.steps:Reflect.field(this.style,"visible-steps");var a=this.style.labels;var r=0;while(r=e.max;var i=1;if(this.style.steps!=null){i=this.style.steps}if(Math.abs(e.count()/i)>250){i=e.count()/250}if(s){i=-Math.abs(i)}else{i=Math.abs(i)}var a=Reflect.field(this.style,"visible-steps")==null?t:Reflect.field(this.style,"visible-steps");var r={};trcharts_Object_$helper.merge_2(this.style,r);var _=0;var n=e.min;while(s?n>=e.max:n<=e.max){r.x=n;if(this.userSpecifiedVisible==null){r.visible=_%a==0;++_}else{r.visible=this.userSpecifiedVisible}this.add(null,r);n+=i}}},add:function(e,t){var s={colour:t.colour,text:t.text,rotate:t.rotate,size:t.size,align:t.align,visible:t.visible,x:t.x};if(typeof e=="string"){s.text=js_Boot.__cast(e,String)}else{trcharts_Object_$helper.merge_2(e,s)}if(s.x!=null){s.text=this.replace_magic_values(s.text,s.x)}var i=Reflect.field(s,"text");var a=i.split("
");i+="\n";s["text"]=i;this.axis_labels[s.x]=s.text;if(s.visible){if(typeof s.colour=="string"){s.colour=trcharts_string_Utils.get_colour(s.colour)}var r=this.make_label(s);this.addChild(r)}},get:function(e){if(e0){return(new trcharts_elements_axis_AxisLabel).rightOverhang*2}else{return 0}},first_label_width:function(){if(this.get_numChildren()>0){this.getChildAt(0);return(new trcharts_elements_axis_AxisLabel).leftOverhang*2}else{return 0}},die:function(){this.axis_labels=null;this.style=null;this.get_graphics().clear();while(this.get_numChildren()>0)this.removeChildAt(0)},replace_magic_values:function(e,t){e=StringTools.replace(e,"#val#",trcharts_NumberUtils.formatNumber(t));e=trcharts_string_DateUtils.replace_magic_values(e,t);return e},__class__:trcharts_elements_axis_XAxisLabels});var trcharts_elements_axis_YAxisBase=function(){openfl_display_Sprite.call(this)};$hxClasses["trcharts.elements.axis.YAxisBase"]=trcharts_elements_axis_YAxisBase;trcharts_elements_axis_YAxisBase.__name__=["trcharts","elements","axis","YAxisBase"];trcharts_elements_axis_YAxisBase.__super__=openfl_display_Sprite;trcharts_elements_axis_YAxisBase.prototype=$extend(openfl_display_Sprite.prototype,{stroke:null,tick_length:null,colour:null,grid_colour:null,style:null,labels:null,user_labels:null,user_ticks:null,init:function(e){},_init:function(e,t,s){this.style=s;if(Reflect.field(e,t)){trcharts_Object_$helper.merge_2(Reflect.field(e,t),this.style)}this.colour=trcharts_string_Utils.get_colour(s.colour);this.grid_colour=trcharts_string_Utils.get_colour(Reflect.field(s,"grid-colour"));this.stroke=s.stroke;this.tick_length=Reflect.field(s,"tick-length");if(this.style.max==null){this.style.max=this.labels.y_max}var i=Math.min(this.style.min,this.style.max);var a=Math.max(this.style.min,this.style.max);this.style.steps=this.get_steps(i,a,this.stage.stageHeight);if(this.labels.i_need_labels){this.labels.make_labels(i,a,this.style.steps)}if(this.style.labels!=null&&this.style.labels.labels!=null&&(this.style.labels.labels instanceof Array&&this.style.labels.labels.__enum__==null)&&this.style.labels.labels.length>0){this.user_labels=[];var r=this.style.labels.labels;var _=0;while(_0)this.removeChildAt(0)},get_steps:function(e,t,s){if(this.style.steps==0){this.style.steps=1}if(this.style.steps<0){this.style.steps*=-1}var i=(t-e)/this.style.steps;if(i>s/2){return(t-e)/5}return this.style.steps},resize:function(e,t){},resize_helper:function(e,t,s){var i=0;var a;var r;var _;var n=Math.min(this.style.min,this.style.max);var o=Math.max(this.style.min,this.style.max);if(!s){this.labels.resize(e,t)}else{this.labels.resize(t.right+this.stroke+this.tick_length,t)}if(!this.style.visible){return}this.get_graphics().clear();this.get_graphics().lineStyle(0,0,0);if(Reflect.field(this.style,"grid-visible")){this.draw_grid_lines(this.style.steps,n,o,s,t)}var l;if(!s){l=t.left-this.stroke}else{l=t.right}this.get_graphics().beginFill(this.colour,1);this.get_graphics().drawRect(l|0,t.top,this.stroke,t.height);this.get_graphics().endFill();var h;if(this.user_ticks){var c=0;var u=this.user_labels;while(c250){break}l+=i}this.add_labels(r)},make_label:function(e){e.colour=trcharts_string_Utils.get_colour(e.colour);var t=new trcharts_elements_axis_YTextField;t.set_text(this.replace_magic_values(e.val,e.pos));t.set_selectable(false);var s=new openfl_text_TextFormat;s.color=e.colour;s.font=e.rotate=="vertical"?"spArial":"Verdana";s.size=e.size;t.setTextFormat(s);t.set_autoSize(3);if(e.rotate=="vertical"){t.set_rotation(270);t.set_embedFonts(true);t.set_antiAliasType(0)}return t},resize:function(e,t){},get_width:function(){var e=0;var t=0;while(t0)this.removeChildAt(0)},replace_magic_values:function(e,t){e=StringTools.replace(e,"#val#",trcharts_NumberUtils.formatNumber(t));return e},__class__:trcharts_elements_axis_YAxisLabelsBase});var trcharts_elements_axis_YAxisLabelsLeft=function(e){trcharts_elements_axis_YAxisLabelsBase.call(this,e,"y_axis");this.lblText="#val#";this.i_need_labels=true};$hxClasses["trcharts.elements.axis.YAxisLabelsLeft"]=trcharts_elements_axis_YAxisLabelsLeft;trcharts_elements_axis_YAxisLabelsLeft.__name__=["trcharts","elements","axis","YAxisLabelsLeft"];trcharts_elements_axis_YAxisLabelsLeft.__super__=trcharts_elements_axis_YAxisLabelsBase;trcharts_elements_axis_YAxisLabelsLeft.prototype=$extend(trcharts_elements_axis_YAxisLabelsBase.prototype,{resize:function(e,t){var s=this.get_width();var i;var a;i=0;while(i-1){this.style.show_labels=false}}else{a=Reflect.field(e,t+"_label_style").split(",");if(a.length>0){this.style.size=a[0]}if(a.length>1){this.style.colour=trcharts_string_Utils.get_colour(a[1])}}};$hxClasses["trcharts.elements.axis.YLabelStyle"]=trcharts_elements_axis_YLabelStyle;trcharts_elements_axis_YLabelStyle.__name__=["trcharts","elements","axis","YLabelStyle"];trcharts_elements_axis_YLabelStyle.prototype={style:null,__class__:trcharts_elements_axis_YLabelStyle};var trcharts_elements_axis_YTextField=function(){openfl_text_TextField.call(this);this.y_val=0};$hxClasses["trcharts.elements.axis.YTextField"]=trcharts_elements_axis_YTextField;trcharts_elements_axis_YTextField.__name__=["trcharts","elements","axis","YTextField"];trcharts_elements_axis_YTextField.__super__=openfl_text_TextField;trcharts_elements_axis_YTextField.prototype=$extend(openfl_text_TextField.prototype,{y_val:null,__class__:trcharts_elements_axis_YTextField});var trcharts_elements_labels_BaseLabel=function(e){openfl_display_Sprite.call(this);this._trcharts=e};$hxClasses["trcharts.elements.labels.BaseLabel"]=trcharts_elements_labels_BaseLabel;trcharts_elements_labels_BaseLabel.__name__=["trcharts","elements","labels","BaseLabel"];trcharts_elements_labels_BaseLabel.__super__=openfl_display_Sprite;trcharts_elements_labels_BaseLabel.prototype=$extend(openfl_display_Sprite.prototype,{text:null,css:null,style:null,_trcharts:null,build:function(e){var t=new openfl_text_TextField;t.set_x(0);t.set_y(0);this.text=e;t.set_selectable(false);t.set_htmlText(this.text);var s=new openfl_text_TextFormat;s.color=this.css.color;s.font="Verdana";s.bold=this.css.font_weight=="bold";s.size=this.css.font_size|0;t.setTextFormat(s);t.set_autoSize(1);t.set_y(this.css.padding_top+this.css.margin_top);t.set_x(this.css.padding_left+this.css.margin_left);if(this.css.background_colour_set){this.get_graphics().beginFill(this.css.background_colour,1);this.get_graphics().drawRect(0,0,this.css.padding_left+t.get_width()+this.css.padding_right,this.css.padding_top+t.get_height()+this.css.padding_bottom);this.get_graphics().endFill()}this.addChild(t)},get_width:function(){return this.getChildAt(0).get_width()},die:function(){this.get_graphics().clear();while(this.get_numChildren()>0)this.removeChildAt(0)},__class__:trcharts_elements_labels_BaseLabel});var trcharts_elements_labels_Keys=function(e){this.count=0;this._height=0;openfl_display_Sprite.call(this);this.colours=[];var t=0;var s=0;var i=e.sets;while(sthis.stage.stageWidth){i=0;a+=this.getChildAt(r).get_height();s+=this.getChildAt(r).get_height()}this.draw_line(i,a,this.getChildAt(r).get_height(),this.colours[r]);i+=12;this.getChildAt(r).set_x(i);this.getChildAt(r).set_y(a);i+=_+10;++r}s+=this.getChildAt(0).get_height();this._height=s},get_height:function(){return this._height},die:function(){this.colours=null;this.get_graphics().clear();while(this.get_numChildren()>0)this.removeChildAt(0)},__class__:trcharts_elements_labels_Keys});var trcharts_elements_labels_Title=function(e,t){trcharts_elements_labels_BaseLabel.call(this,t);if(!e){return}this.style="font-size: 12px";trcharts_Object_$helper.merge_2(e,this);this.css=new trcharts_string_Css(this.style);this.build(this.text)};$hxClasses["trcharts.elements.labels.Title"]=trcharts_elements_labels_Title;trcharts_elements_labels_Title.__name__=["trcharts","elements","labels","Title"];trcharts_elements_labels_Title.__super__=trcharts_elements_labels_BaseLabel;trcharts_elements_labels_Title.prototype=$extend(trcharts_elements_labels_BaseLabel.prototype,{resize:function(){if(this.text==null){return}this.getChildAt(0).set_width(this._trcharts.get_realWidth());var e=this.css.text_align;switch(e){case"center":break;case"left":this.set_x(this.css.margin_left);break;case"right":this.set_x(this._trcharts.get_realWidth()-(this.get_width()+this.css.margin_right));break;default:this.set_x(this._trcharts.get_realWidth()/2-this.get_width()/2)}this.set_y(this.css.margin_top)},get_height:function(){if(this.text==null){return 0}else{return this.css.padding_top+this.css.margin_top+this.getChildAt(0).get_height()+this.css.padding_bottom+this.css.margin_bottom}},__class__:trcharts_elements_labels_Title});var trcharts_elements_labels_XLegend=function(e,t){trcharts_elements_labels_BaseLabel.call(this,t);if(!e){return}trcharts_Object_$helper.merge_2(e,this);this.css=new trcharts_string_Css(this.style);this.build(this.text)};$hxClasses["trcharts.elements.labels.XLegend"]=trcharts_elements_labels_XLegend;trcharts_elements_labels_XLegend.__name__=["trcharts","elements","labels","XLegend"];trcharts_elements_labels_XLegend.__super__=trcharts_elements_labels_BaseLabel;trcharts_elements_labels_XLegend.prototype=$extend(trcharts_elements_labels_BaseLabel.prototype,{resize:function(e){if(this.text==null){return}this.set_x(e.left+(e.width/2-this.get_width()/2));this.getChildAt(0).set_y(0)},get_height:function(){return 0},__class__:trcharts_elements_labels_XLegend});var trcharts_elements_labels_YLegendBase=function(e,t){openfl_display_Sprite.call(this);if(Reflect.field(e,t+"_legend")==null){return}if(Reflect.field(e,t+"_legend")){trcharts_Object_$helper.merge_2(Reflect.field(e,t+"_legend"),this)}this.css=new trcharts_string_Css(this.style);this.build(this.text)};$hxClasses["trcharts.elements.labels.YLegendBase"]=trcharts_elements_labels_YLegendBase;trcharts_elements_labels_YLegendBase.__name__=["trcharts","elements","labels","YLegendBase"];trcharts_elements_labels_YLegendBase.__super__=openfl_display_Sprite;trcharts_elements_labels_YLegendBase.prototype=$extend(openfl_display_Sprite.prototype,{text:null,style:null,css:null,build:function(e){var t=new openfl_text_TextField;t.set_x(0);t.set_y(0);t.set_selectable(false);var s=new openfl_text_TextFormat;s.color=this.css.color;s.font="spArial";s.size=this.css.font_size|0;s.align=0;t.set_htmlText(e);t.setTextFormat(s);t.set_autoSize(1);t.set_embedFonts(true);t.set_rotation(270);t.set_height(t.get_textHeight());t.set_antiAliasType(0);t.set_autoSize(1);this.addChild(t)},resize:function(){if(this.text==null){return}},get_width:function(){if(this.get_numChildren()==0){return 0}else{return this.getChildAt(0).get_width()}},die:function(){while(this.get_numChildren()>0)this.removeChildAt(0)},__class__:trcharts_elements_labels_YLegendBase});var trcharts_elements_labels_YLegendLeft=function(e){trcharts_elements_labels_YLegendBase.call(this,e,"y")};$hxClasses["trcharts.elements.labels.YLegendLeft"]=trcharts_elements_labels_YLegendLeft;trcharts_elements_labels_YLegendLeft.__name__=["trcharts","elements","labels","YLegendLeft"];trcharts_elements_labels_YLegendLeft.__super__=trcharts_elements_labels_YLegendBase;trcharts_elements_labels_YLegendLeft.prototype=$extend(trcharts_elements_labels_YLegendBase.prototype,{resize:function(){if(this.get_numChildren()==0){return}this.set_y(this.stage.stageHeight/2+this.getChildAt(0).get_height()/2);this.set_x(0)},__class__:trcharts_elements_labels_YLegendLeft});var trcharts_elements_labels_YLegendRight=function(e){trcharts_elements_labels_YLegendBase.call(this,e,"y2")};$hxClasses["trcharts.elements.labels.YLegendRight"]=trcharts_elements_labels_YLegendRight;trcharts_elements_labels_YLegendRight.__name__=["trcharts","elements","labels","YLegendRight"];trcharts_elements_labels_YLegendRight.__super__=trcharts_elements_labels_YLegendBase;trcharts_elements_labels_YLegendRight.prototype=$extend(trcharts_elements_labels_YLegendBase.prototype,{resize:function(){if(this.get_numChildren()==0){return}this.set_y(this.stage.stageHeight/2+this.getChildAt(0).get_height()/2);this.set_x(this.stage.stageWidth-this.getChildAt(0).get_width())},__class__:trcharts_elements_labels_YLegendRight});var trcharts_elements_menu_MenuItem=function(e,t){openfl_display_Sprite.call(this);this.props=t;this.set_buttonMode(true);this.useHandCursor=true;this.chartId=e;this.set_alpha(.5);var s=this.add_elements();this.draw_bg(s+10);this.addEventListener("click",$bind(this,this.mouseClickHandler));this.addEventListener("mouseDown",$bind(this,this.mouseDownHandler));this.addEventListener("mouseOver",$bind(this,this.mouseOverHandler));this.addEventListener("mouseOut",$bind(this,this.mouseOutHandler))};$hxClasses["trcharts.elements.menu.MenuItem"]=trcharts_elements_menu_MenuItem;trcharts_elements_menu_MenuItem.__name__=["trcharts","elements","menu","MenuItem"];trcharts_elements_menu_MenuItem.__super__=openfl_display_Sprite;trcharts_elements_menu_MenuItem.prototype=$extend(openfl_display_Sprite.prototype,{chartId:null,props:null,add_elements:function(){var e=this.add_text(this.props.get("text"),5);return e},draw_bg:function(e){this.get_graphics().beginFill(trcharts_string_Utils.get_colour(this.props.get("background-colour")));this.get_graphics().drawRoundRect(0,0,e,20,5,5);this.get_graphics().endFill()},add_text:function(e,t){var s=new openfl_text_TextField;s.set_x(t);s.set_y(0);s.set_selectable(false);s.set_htmlText(e);var i=new openfl_text_TextFormat;i.color=trcharts_string_Utils.get_colour(this.props.get("text-colour"));i.font="Verdana";i.size=10;i.underline=true;s.setTextFormat(i);s.set_autoSize(1);s.mouseEnabled=false;s.set_selectable(false);this.addChild(s);return s.get_width()},mouseClickHandler:function(e){this.set_alpha(0);openfl_external_ExternalInterface.call(this.props.get("javascript-function"),this.chartId);this.set_alpha(1)},mouseOverHandler:function(e){this.set_alpha(1);var t=new openfl_filters_GlowFilter;t.set_color(trcharts_string_Utils.get_colour(this.props.get("glow-colour")));t.set_alpha(.8);t.set_blurX(4);t.set_blurY(4);t.set_inner(false);var s=[];s.push(t);this.set_filters(s)},mouseDownHandler:function(e){this.set_alpha(1)},mouseOutHandler:function(e){this.set_alpha(.5);this.set_filters([])},__class__:trcharts_elements_menu_MenuItem});var trcharts_elements_menu_CameraIcon=function(e,t){trcharts_elements_menu_MenuItem.call(this,e,t)};$hxClasses["trcharts.elements.menu.CameraIcon"]=trcharts_elements_menu_CameraIcon;trcharts_elements_menu_CameraIcon.__name__=["trcharts","elements","menu","CameraIcon"];trcharts_elements_menu_CameraIcon.__super__=trcharts_elements_menu_MenuItem;trcharts_elements_menu_CameraIcon.prototype=$extend(trcharts_elements_menu_MenuItem.prototype,{add_elements:function(){this.draw_camera();var e=this.add_text(this.props.get("text"),35);return e+30},draw_camera:function(){var e=new openfl_display_Sprite;e.get_graphics().beginFill(5263440);e.get_graphics().drawRoundRect(2,4,26,14,2,2);e.get_graphics().drawRect(20,1,5,3);e.get_graphics().endFill();e.get_graphics().beginFill(2105376);e.get_graphics().drawCircle(9,11,4.5);e.get_graphics().endFill();this.addChild(e)},__class__:trcharts_elements_menu_CameraIcon});var trcharts_elements_menu_DefaultCameraIconProperties=function(e){var t=new trcharts_Properties({colour:"#0000E0",text:"Save chart","javascript-function":"save_image","background-colour":"#ffffff","glow-colour":"#148DCF","text-colour":"#0000ff"});trcharts_Properties.call(this,e,t)};$hxClasses["trcharts.elements.menu.DefaultCameraIconProperties"]=trcharts_elements_menu_DefaultCameraIconProperties;trcharts_elements_menu_DefaultCameraIconProperties.__name__=["trcharts","elements","menu","DefaultCameraIconProperties"];trcharts_elements_menu_DefaultCameraIconProperties.__super__=trcharts_Properties;trcharts_elements_menu_DefaultCameraIconProperties.prototype=$extend(trcharts_Properties.prototype,{__class__:trcharts_elements_menu_DefaultCameraIconProperties});var trcharts_elements_menu_DefaultMenuProperties=function(e){var t=new trcharts_Properties({colour:"#E0E0E0","outline-colour":"#707070","camera-text":"Save chart"});trcharts_Properties.call(this,e,t)};$hxClasses["trcharts.elements.menu.DefaultMenuProperties"]=trcharts_elements_menu_DefaultMenuProperties;trcharts_elements_menu_DefaultMenuProperties.__name__=["trcharts","elements","menu","DefaultMenuProperties"];trcharts_elements_menu_DefaultMenuProperties.__super__=trcharts_Properties;trcharts_elements_menu_DefaultMenuProperties.prototype=$extend(trcharts_Properties.prototype,{__class__:trcharts_elements_menu_DefaultMenuProperties});var trcharts_elements_menu_Menu=function(e,t){openfl_display_Sprite.call(this);this.props=new trcharts_elements_menu_DefaultMenuProperties(t);this.original_alpha=.4;this.set_alpha(1);var s=5;var i=0;this.first_showing=true;var a=t.values;var r=0;while(r=0){a=e.indexOf("#",i+1)+1;r=HxOverrides.substr(r,6,r.length-7);n=trcharts_string_DateUtils.formatDate(s,_);e=StringTools.replace(e,r,n);i=e.indexOf("#date:")}i=e.indexOf("#gmdate:");while(i>=0){a=e.indexOf("#",i+1)+1;r=HxOverrides.substr(e,i,a-i);_=HxOverrides.substr(r,8,r.length-9);n=trcharts_string_DateUtils.formatUTCDate(s,_);e=StringTools.replace(e,r,n);i=e.indexOf("#gmdate:")}return e};trcharts_string_DateUtils.formatDate=function(e,t){var s="";var i=0;try{while(i12?e.getHours()-12:e.getHours();throw"__break__";break;case"h":break;case"i":s+=(e.getMinutes()<10?"0":"")+e.getMinutes();throw"__break__";break;case"j":s+=e.getDate();break;case"l":s+=trcharts_string_DateUtils.dateConsts.longDays[e.getDay()];break;case"m":s+=(e.getMonth()<9?"0":"")+(e.getMonth()+1);throw"__break__";break;case"n":s+=e.getMonth()+1;throw"__break__";break;case"r":s+=HxOverrides.dateStr(e);throw"__break__";break;case"s":s+=(e.getSeconds()<10?"0":"")+e.getSeconds();throw"__break__";break;case"w":s+=e.getDay();break;case"y":s+=HxOverrides.substr(""+e.getFullYear(),2,null);throw"__break__";break;default:s+=a}++i}}catch(e){if(e!="__break__")throw e}return s};trcharts_string_DateUtils.formatUTCDate=function(e,t){var s="not supper has remove!";return s};var trcharts_string_Utils=function(){};$hxClasses["trcharts.string.Utils"]=trcharts_string_Utils;trcharts_string_Utils.__name__=["trcharts","string","Utils"];trcharts_string_Utils.get_colour=function(e){if(e.length>2){if(HxOverrides.substr(e,0,2)=="0x"){return Std.parseInt(e)}if(HxOverrides.substr(e,0,1)=="#"){return Std.parseInt("0x"+HxOverrides.substr(e,1,e.length))}if(e.length==6){return Std.parseInt("0x"+e)}}if(e.length>0){return Std.parseInt(e)}else{return 0}};var xeditor_objects_XEditoriObject=function(){openfl_display_Sprite.call(this);this._uid=Std.string(xeditor_utils_TRUID.getUID())};$hxClasses["xeditor.objects.XEditoriObject"]=xeditor_objects_XEditoriObject;xeditor_objects_XEditoriObject.__name__=["xeditor","objects","XEditoriObject"];xeditor_objects_XEditoriObject.__super__=openfl_display_Sprite;xeditor_objects_XEditoriObject.prototype=$extend(openfl_display_Sprite.prototype,{_uid:null,set_uid:function(e){this._uid=e;return e},get_uid:function(){return this._uid},__class__:xeditor_objects_XEditoriObject,__properties__:$extend(openfl_display_Sprite.prototype.__properties__,{set_uid:"set_uid",get_uid:"get_uid"})});var xeditor_objects_TrObject=function(e,t){this.mySound=window.document.createElement("audio");this._actionType=null;xeditor_objects_XEditoriObject.call(this);this._realWidth=e;this._realHeight=t};$hxClasses["xeditor.objects.TrObject"]=xeditor_objects_TrObject;xeditor_objects_TrObject.__name__=["xeditor","objects","TrObject"];xeditor_objects_TrObject.__super__=xeditor_objects_XEditoriObject;xeditor_objects_TrObject.prototype=$extend(xeditor_objects_XEditoriObject.prototype,{_container:null,_realWidth:null,_realHeight:null,_actionType:null,mySound:null,get_realWidth:function(){return this._realWidth},set_realWidth:function(e){this._realWidth=e;this.render();return this._realWidth},get_realHeight:function(){return this._realHeight},set_realHeight:function(e){this._realHeight=e;this.render();return this._realHeight},render:function(){},set_actionType:function(e){if(this._actionType!=null){var t=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(t,"linkurl")){this.removeEventListener("click",$bind(this,this.invoketype_MouseClick))}else{var s=this._actionType.get_invoketype();switch(s){case"mouseDown":this.removeEventListener("mouseDown",$bind(this,this.invoketype_MouseClick));break;case"mouseOut":this.removeEventListener("rollOut",$bind(this,this.invoketype_MouseOut));break;case"mouseOver":this.removeEventListener("rollOver",$bind(this,this.invoketype_MouseOver));break;case"mouseUp":this.removeEventListener("mouseUp",$bind(this,this.invoketype_onMouseUP));break}}}this._actionType=e;if(this._actionType!=null){var i=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(i,"linkurl")){this.addEventListener("click",$bind(this,this.invoketype_MouseClick))}else{var a=this._actionType.get_invoketype();switch(a){case"mouseDown":this.addEventListener("mouseDown",$bind(this,this.invoketype_MouseClick));break;case"mouseOut":this.addEventListener("rollOut",$bind(this,this.invoketype_MouseOut));break;case"mouseOver":this.addEventListener("rollOver",$bind(this,this.invoketype_MouseOver));break;case"mouseUp":this.addEventListener("mouseUp",$bind(this,this.invoketype_onMouseUP));break}}}return this._actionType},invoketype_MouseOut:function(e){this.call_action();e.stopPropagation()},invoketype_MouseOver:function(e){this.call_action();e.stopPropagation()},invoketype_MouseClick:function(e){this.call_action();e.stopPropagation()},invoketype_onMouseUP:function(e){this.call_action();e.stopPropagation()},call_action:function(){if(this._actionType==null||this._actionType.get_params()==null){return}var e=this._actionType.get_actiontype();switch(e){case"callJS":var t=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(t,"jsfun")){this.action_callJS(this._actionType.get_params().jsfun)}break;case"gotoPage":var s=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(s,"pageindex")){this.action_gotoPage(this._actionType.get_params().pageindex)}break;case"openLink":var i=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(i,"linkurl")){this.action_openLink(this._actionType.get_params().linkurl)}break;case"playAudio":var a=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(a,"audiourl")){this.action_playAudio(this._actionType.get_params().audiourl)}break}},action_gotoPage:function(e){if(xeditor_objects_TrObject._fn_gotoPage!=null){xeditor_objects_TrObject._fn_gotoPage(e)}},action_openLink:function(e){openfl_Lib.getURL(new openfl_net_URLRequest(e),"_blank")},action_callJS:function(e){openfl_external_ExternalInterface.call(e)},action_playAudio:function(e){if(null==this.mySound){return}this.mySound.src=e;this.mySound.load();this.mySound.play()},ff_active:function(){},ff_deactive:function(){},ff_active_BK_music:function(){},ff_deactive_BK_music:function(){},__class__:xeditor_objects_TrObject,__properties__:$extend(xeditor_objects_XEditoriObject.prototype.__properties__,{set_actionType:"set_actionType",set_realHeight:"set_realHeight",get_realHeight:"get_realHeight",set_realWidth:"set_realWidth",get_realWidth:"get_realWidth"})});var xeditor_objects_TrObjectEx=function(e,t){this._orgbounds=new openfl_geom_Rectangle;xeditor_objects_TrObject.call(this,e,t);this._realWidth=e;this._realHeight=t};$hxClasses["xeditor.objects.TrObjectEx"]=xeditor_objects_TrObjectEx;xeditor_objects_TrObjectEx.__name__=["xeditor","objects","TrObjectEx"];xeditor_objects_TrObjectEx.__super__=xeditor_objects_TrObject;xeditor_objects_TrObjectEx.prototype=$extend(xeditor_objects_TrObject.prototype,{_orgbounds:null,__class__:xeditor_objects_TrObjectEx});var xeditor_objects_AudioPlayerObject=function(e,t,s,i,a){if(a==null){a=false}if(i==null){i=2263244}if(s==null){s=14}this._player=null;xeditor_objects_TrObjectEx.call(this,e,t);this._container=new openfl_display_Sprite;this._container.set_name("audioplayer_container");this.addChild(this._container);this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this._player=new xeditor_objects_FFAudioPlayerJS(e,t,s,i,a);this._container.addChild(this._player);this._realHeight=this._player.get_realHeight();this._parameters=this._player.get_params();this.render()};$hxClasses["xeditor.objects.AudioPlayerObject"]=xeditor_objects_AudioPlayerObject;xeditor_objects_AudioPlayerObject.__name__=["xeditor","objects","AudioPlayerObject"];xeditor_objects_AudioPlayerObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_AudioPlayerObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_parameters:null,_player:null,set_params:function(e){var t={};if(this._player!=null){this._parameters=this._player.get_params();this._container.removeChild(this._player);this._player=null}var s=0;var i=Reflect.fields(e);while(se.get_bottom()){if(t.x<=s){return xeditor_objects__$CalloutObject_ControlLocal.bottom_left}else{return xeditor_objects__$CalloutObject_ControlLocal.bottom_right}}else if(t.x<=s){if(t.y<=i){return xeditor_objects__$CalloutObject_ControlLocal.left_top}else{return xeditor_objects__$CalloutObject_ControlLocal.left_bottom}}else if(t.y<=i){return xeditor_objects__$CalloutObject_ControlLocal.right_top}else{return xeditor_objects__$CalloutObject_ControlLocal.right_bottom}},getObjectBounds:function(){var e=this._container.localToGlobal(this._topcornerPoint);var t=this.globalToLocal(e);var s=this._container.localToGlobal(this._bottomcornerPoint);var i=this.globalToLocal(s);var a=new openfl_geom_Rectangle(t.x,t.y,i.x-t.x,i.y-t.y);return a},render:function(){this._container.get_graphics().clear();if(this._params.strokeColor!=-1){if(this._type=="round_rectangle"||this._type=="rectangle"){this._container.get_graphics().lineStyle(this._params.strokeWidth,this._params.strokeColor,this._params.strokeAlpha,false,2,2,1)}else{this._container.get_graphics().lineStyle(this._params.strokeWidth,this._params.strokeColor,this._params.strokeAlpha)}}if(this._params.fillColor!=-1){this._container.get_graphics().beginFill(this._params.fillColor,this._params.fillAlpha)}var e=new openfl_geom_Rectangle(this._topcornerPoint.x,this._topcornerPoint.y,this._bottomcornerPoint.x-this._topcornerPoint.x,this._bottomcornerPoint.y-this._topcornerPoint.y);if(this._type=="oval"){this.drawOvalCallout(this._container.get_graphics(),e,this._controlPoint)}else if(this._type=="round_rectangle"){this.drawRoundRectCallout(this._container.get_graphics(),e,this._controlPoint)}else if(this._type=="rectangle"){this.drawRectCallout(this._container.get_graphics(),e,this._controlPoint)}if(this._params.fillColor!=-1){this._container.get_graphics().endFill()}},cal_twopoint_angle:function(e,t){var s=t.x-e.x;var i=t.y-e.y;var a=Math.atan2(i,s);a=(a>0?a:2*Math.PI+a)*360/(2*Math.PI);return a},drawRectCallout:function(e,t,s){var i=new openfl_geom_Point;var a=new openfl_geom_Point;var r=this.get_controlAt(t,s);e.moveTo(t.x,t.y);if(r==xeditor_objects__$CalloutObject_ControlLocal.top_lef||r==xeditor_objects__$CalloutObject_ControlLocal.top_right){if(r==xeditor_objects__$CalloutObject_ControlLocal.top_lef){a.x=t.x+t.width/2-.2*(t.width/2);i.x=a.x-.45*(t.width/2)}else{i.x=t.x+t.width/2+.2*(t.width/2);a.x=i.x+.45*(t.width/2)}e.lineTo(i.x,t.get_top());e.lineTo(s.x,s.y);e.lineTo(a.x,t.get_top());e.lineTo(t.x+t.width,t.y)}else{e.lineTo(t.x+t.width,t.y)}if(r==xeditor_objects__$CalloutObject_ControlLocal.right_top||r==xeditor_objects__$CalloutObject_ControlLocal.right_bottom){if(r==xeditor_objects__$CalloutObject_ControlLocal.right_top){a.y=t.get_top()+t.height/2-.2*(t.height/2);i.y=a.y-.45*(t.height/2)}else{i.y=t.get_top()+t.height/2+.2*(t.height/2);a.y=i.y+.45*(t.height/2)}e.lineTo(t.get_right(),i.y);e.lineTo(s.x,s.y);e.lineTo(t.get_right(),a.y);e.lineTo(t.get_right(),t.get_bottom())}else{e.lineTo(t.get_right(),t.get_bottom())}if(r==xeditor_objects__$CalloutObject_ControlLocal.bottom_left||r==xeditor_objects__$CalloutObject_ControlLocal.bottom_right){if(r==xeditor_objects__$CalloutObject_ControlLocal.bottom_left){i.x=t.x+t.width/2-.2*(t.width/2);a.x=i.x-.45*(t.width/2)}else{a.x=t.x+t.width/2+.2*(t.width/2);i.x=a.x+.45*(t.width/2)}e.lineTo(i.x,t.get_bottom());e.lineTo(s.x,s.y);e.lineTo(a.x,t.get_bottom());e.lineTo(t.x,t.get_bottom())}else{e.lineTo(t.x,t.get_bottom())}if(r==xeditor_objects__$CalloutObject_ControlLocal.left_top||r==xeditor_objects__$CalloutObject_ControlLocal.left_bottom){if(r==xeditor_objects__$CalloutObject_ControlLocal.left_top){i.y=t.get_top()+t.height/2-.2*(t.height/2);a.y=i.y-.45*(t.height/2)}else{a.y=t.get_top()+t.height/2+.2*(t.height/2);i.y=a.y+.45*(t.height/2)}e.lineTo(t.get_left(),i.y);e.lineTo(s.x,s.y);e.lineTo(t.get_left(),a.y);e.lineTo(t.get_left(),t.get_top())}else{e.lineTo(t.get_left(),t.get_top())}},drawRoundRectCallout:function(e,t,s){var i=t.width<=t.height?.15*t.width:.15*t.height;var a=new openfl_geom_Point;var r=new openfl_geom_Point;var _=this.get_controlAt(t,s);e.moveTo(t.x+i,t.y);if(_==xeditor_objects__$CalloutObject_ControlLocal.top_lef||_==xeditor_objects__$CalloutObject_ControlLocal.top_right){if(_==xeditor_objects__$CalloutObject_ControlLocal.top_lef){r.x=t.x+t.width/2-.2*(t.width/2);a.x=r.x-.45*(t.width/2)}else{a.x=t.x+t.width/2+.2*(t.width/2);r.x=a.x+.45*(t.width/2)}e.lineTo(a.x,t.get_top());e.lineTo(s.x,s.y);e.lineTo(r.x,t.get_top());e.lineTo(t.x+t.width-i,t.get_top())}else{e.lineTo(t.x+t.width-i,t.y)}e.curveTo(t.x+t.width,t.y,t.x+t.width,t.y+i);if(_==xeditor_objects__$CalloutObject_ControlLocal.right_top||_==xeditor_objects__$CalloutObject_ControlLocal.right_bottom){if(_==xeditor_objects__$CalloutObject_ControlLocal.right_top){r.y=t.get_top()+t.height/2-.2*(t.height/2);a.y=r.y-.45*(t.height/2)}else{a.y=t.get_top()+t.height/2+.2*(t.height/2);r.y=a.y+.45*(t.height/2)}e.lineTo(t.get_right(),a.y);e.lineTo(s.x,s.y);e.lineTo(t.get_right(),r.y);e.lineTo(t.get_right(),t.get_bottom()-i)}else{e.lineTo(t.get_right(),t.get_bottom()-i)}e.curveTo(t.x+t.width,t.y+t.height,t.x+t.width-i,t.y+t.height);if(_==xeditor_objects__$CalloutObject_ControlLocal.bottom_left||_==xeditor_objects__$CalloutObject_ControlLocal.bottom_right){if(_==xeditor_objects__$CalloutObject_ControlLocal.bottom_left){a.x=t.x+t.width/2-.2*(t.width/2);r.x=a.x-.45*(t.width/2)}else{r.x=t.x+t.width/2+.2*(t.width/2);a.x=r.x+.45*(t.width/2)}e.lineTo(a.x,t.get_bottom());e.lineTo(s.x,s.y);e.lineTo(r.x,t.get_bottom());e.lineTo(t.x+i,t.get_bottom())}else{e.lineTo(t.x+i,t.get_bottom())}e.curveTo(t.x,t.y+t.height,t.x,t.y+t.height-i);if(_==xeditor_objects__$CalloutObject_ControlLocal.left_top||_==xeditor_objects__$CalloutObject_ControlLocal.left_bottom){if(_==xeditor_objects__$CalloutObject_ControlLocal.left_top){a.y=t.get_top()+t.height/2-.2*(t.height/2);r.y=a.y-.45*(t.height/2)}else{r.y=t.get_top()+t.height/2+.2*(t.height/2);a.y=r.y+.45*(t.height/2)}e.lineTo(t.get_left(),a.y);e.lineTo(s.x,s.y);e.lineTo(t.get_left(),r.y);e.lineTo(t.get_left(),t.get_top()+i)}else{e.lineTo(t.get_left(),t.get_top()+i)}e.curveTo(t.x,t.y,t.x+i,t.y)},drawOvalCallout:function(e,t,s){var i;var a;var r;var _;var n;var o=20;var l;var h;var c;var u;var f;var p;var d;var g=new openfl_geom_Point;var m=new openfl_geom_Point;var v=t.width;var b=t.height;l=v/2;h=b/2;c=l/Math.cos(xeditor_utils_Conversions.radians(.5*o));u=h/Math.cos(xeditor_utils_Conversions.radians(.5*o));d=new openfl_geom_Point(t.x+v/2,t.y+b/2);var y=this.cal_twopoint_angle(d,s)|0;y-=10;y=Math.ceil(y/20)*20;if(y>=360){y=0}e.moveTo(d.x+l,d.y);i=o/2|0;var x=0;while(i<361){f=xeditor_utils_Conversions.radians(i);p=xeditor_utils_Conversions.radians(i+o/2);a=c*Math.cos(f);r=u*Math.sin(f);_=l*Math.cos(p);n=h*Math.sin(p);if(i>=y&&i0){this.re_pos();this._textStartTM.set_text(xeditor_utils_TRUtil.formatTime(this.getCurrentTime()))}},onEnded:function(){this._sound.currentTime=0;if(this._sound_loop){this._sound.play()}else{this._sound.pause();this._isPlaying=false;this.onPlayerPlaybackFinished()}},onWaiting:function(){this._isWaiting=true},get_params:function(){return{url:this._mediaSource,fontsize:this._fontsize,bkColor:this._bkColor,autoStart:this._autoStart,autoRewind:this._autoRewind,isflat:this._isflat,songname:this._songName,duration:this._mediaDuration}},set_params:function(e){if(Object.prototype.hasOwnProperty.call(e,"fontsize")){this._fontsize=Reflect.field(e,"fontsize");this.cal_em();this._realHeight=2.8*this._em;this._pauseButton.set_size(.675*this._realHeight|0,.675*this._realHeight|0);this._playButton.set_size(.675*this._realHeight|0,.675*this._realHeight|0);this._spinButton.set_size(.675*this._realHeight|0,.675*this._realHeight|0);if(!this.bIsIpad){this._volButton.set_size(.56*this._realHeight|0,.56*this._realHeight|0)}this._playlistformat.size=this._fontsize*1.2|0;this._textFieldPlaylist.setTextFormat(this._playlistformat);this._tmformat.size=this._fontsize*.8|0;this._textStartTM.setTextFormat(this._tmformat);this._textEndTM.setTextFormat(this._tmformat);this._trackball.set_size(.934*this._em|0,.934*this._em|0)}this._bkColor=Object.prototype.hasOwnProperty.call(e,"bkColor")?Reflect.field(e,"bkColor"):this._bkColor;this._autoStart=Object.prototype.hasOwnProperty.call(e,"autoStart")?Reflect.field(e,"autoStart"):this._autoStart;this._autoRewind=Object.prototype.hasOwnProperty.call(e,"autoRewind")?Reflect.field(e,"autoRewind"):this._autoRewind;this._isflat=Object.prototype.hasOwnProperty.call(e,"isflat")?Reflect.field(e,"isflat"):this._isflat;this._songName=Object.prototype.hasOwnProperty.call(e,"songname")?Reflect.field(e,"songname"):this._songName;this._textFieldPlaylist.set_text(this._songName);this.render();this.re_pos();if(Object.prototype.hasOwnProperty.call(e,"url")){this._mediaSource=Reflect.field(e,"url")}if(Object.prototype.hasOwnProperty.call(e,"duration")){this._mediaDuration=Reflect.field(e,"duration");this._textEndTM.set_text(xeditor_utils_TRUtil.formatTime(this._mediaDuration))}return null},onTrackBallMouseClick:function(e){if(!this._mediaLoaded){return}this._isSeeking=true;e.stopPropagation();this.addEventListener("mouseUp",$bind(this,this.onTrackBallMouseUp));this.addEventListener("mouseMove",$bind(this,this.onTrackBallMouseMove))},onTrackBallMouseUp:function(e){var t=this.get_mouseX()-this._trackball.get_width()*.5;if(tthis._trackRect.x+this._trackRect.width-this._trackball.get_width()){this.seek(this.getDuration())}else{var s=(t-this._trackRect.x)/(this._trackRect.width-this._trackball.get_width());var i=s*this.getDuration();this.seek(i)}this._isSeeking=false;e.stopPropagation();this.removeEventListener("mouseUp",$bind(this,this.onTrackBallMouseUp));this.removeEventListener("mouseMove",$bind(this,this.onTrackBallMouseMove))},onTrackBallMouseMove:function(e){e.stopPropagation();if(!this._mediaLoaded){return}var t=this.get_mouseX()-this._trackball.get_width()*.5;if(tthis._trackRect.x+this._trackRect.width-this._trackball.get_width()){return}this._trackball.set_x(t);var s=(t-this._trackRect.x)/(this._trackRect.width-this._trackball.get_width());this._textStartTM.set_text(xeditor_utils_TRUtil.formatTime(this.getDuration()*s))},onCanplay:function(){this._isWaiting=false;if(this._firstLoad){this._sound.play();this._isPlaying=true;this._firstLoad=false;this._mediaLoaded=true;this._mediaDuration=this.getDuration()}this.onPlayerMediaInitialized()},load:function(e){if(null==this._sound){return}this.stopAndClose();this._mediaSource=e;this._stopped=false;this._mediaLoaded=false;this._firstLoad=true;this._startTime=0;this.onPlayerBuffering();this._sound.src=e;this._sound.load()},seek:function(e){if(null!=this._sound){this._sound.currentTime=e;this._saveTime=e}return e},isPlaying:function(){return this._isPlaying},togglePlay:function(){if(this._mediaLoaded){if(this._mediaLoaded){if(this._isPlaying){this._sound.pause();this._saveTime=this.getCurrentTime()}else{this.seek(this._saveTime);this._sound.play()}}else if(this._stopped){this.load(this._mediaSource)}this._isPlaying=!this._isPlaying;this.onPlayerPlayPause();return this._isPlaying}else if(this._mediaSource!=""){this.load(this._mediaSource);this.onPlayerBuffering();return true}this.onPlayerPlayPause();return false},stopAndClose:function(){if(this._mediaLoaded){this._mediaLoaded=false;this._isPlaying=false;this._stopped=true;this._startTime=0;this._sound.pause()}},setVolume:function(e){if(e>0){if(e>1){e=1}this._soundMuted=false;this._volume=e}else{this._soundMuted=true;this._volume=0}if(null!=this._sound){this._sound.volume=this._volume}},getDuration:function(){if(null!=this._sound){var e=this._sound.duration;if(isNaN(e)||e==null){return 0}else{return e}}return 0},getCurrentTime:function(){var e=0;if(null!=this._sound){e=this._sound.currentTime}else{e=0}return e},onPlayerBuffering:function(){this._spinButton.start()},onPlayerPlaybackFinished:function(){this.onPlayerPlayPause()},onPlayerPlayPause:function(){this._playButton.set_visible(!this.isPlaying());this._pauseButton.set_visible(this.isPlaying());this._spinButton.Stop()},onPlayerMediaInitialized:function(){this._textEndTM.set_text(xeditor_utils_TRUtil.formatTime(this.getDuration()));this.onPlayerPlayPause()},cal_em:function(){var e=new openfl_text_TextFormat("Arial",this._fontsize|0);var t=xeditor_utils_TRUtil.measureString("Abc",e);this._em=t.height},re_pos_trackball:function(e){this._trackball.set_x(this._trackRect.x+e*(this._trackRect.width-this._trackball.get_width()));this._trackball.set_y(this._trackRect.y)},re_pos:function(){this._playButton.set_x(this._playButton.set_y(.32499999999999996*this._realHeight*.5));this._spinButton.set_x(this._pauseButton.set_x(this._playButton.get_x()));this._spinButton.set_y(this._pauseButton.set_y(this._playButton.get_y()));if(!this.bIsIpad){this._volButton.set_x(this._realWidth-this._realHeight+.43999999999999995*this._realHeight*.5);this._volButton.set_y(.43999999999999995*this._realHeight*.5)}var e=new openfl_geom_Rectangle(this._realHeight+.2*this._em,0,this._realWidth-this._realHeight-(this._realHeight+.2*this._em));this._textFieldPlaylist.set_x(e.x+(e.width-this._textFieldPlaylist.get_width())*.5);this._textFieldPlaylist.set_y(0);var t=new openfl_geom_Rectangle(e.x,this._realHeight/2+(this._realHeight/2-.65*this._em)*.5,e.width,0);this._textStartTM.set_x(t.x);this._textStartTM.set_y(t.y);this._textEndTM.set_x(t.x+t.width-this._textEndTM.get_width());this._textEndTM.set_y(t.y);var s=new openfl_geom_Rectangle(t.x+this._textStartTM.get_width()+.8*this._em,t.y,t.width-(this._textStartTM.get_width()+this._textEndTM.get_width()+1.6*this._em),0);this._track.set_x(s.x);this._track.set_y(s.y+.15*this._em);this._track.set_size(s.width,.65*this._em);this._trackRect=s;if(this.getDuration()<=0){this.re_pos_trackball(0)}else{this.re_pos_trackball(this.getCurrentTime()/this.getDuration())}},render:function(){this._container.get_graphics().clear();this._container.get_graphics().lineStyle();var e=[xeditor_utils_TRUtil.rgb(255,255,255),xeditor_utils_TRUtil.rgb(255,255,255),xeditor_utils_TRUtil.rgb(255,255,255),xeditor_utils_TRUtil.rgb(0,0,0),xeditor_utils_TRUtil.rgb(0,0,0)];var t=[.125,.125,.15,.1,.1];var s=[12,114,127,127,242];var i=new openfl_geom_Matrix;this._container.get_graphics().beginFill(this._bkColor,1);this._container.get_graphics().drawRoundRect(0,0,this._realWidth,this._realHeight,4);if(!this._isflat){i.createGradientBox(this._realWidth-2,this._realHeight,90*Math.PI/180,0,0);this._container.get_graphics().beginGradientFill(0,e,t,s,i);this._container.get_graphics().drawRect(0,0,this._realWidth,this._realHeight)}this._container.get_graphics();this._container.get_graphics().lineStyle(1,xeditor_utils_TRUtil.rgb(0,0,0),.0980392);this._container.get_graphics().moveTo(this._realHeight,0);this._container.get_graphics().lineTo(this._realHeight,this._realHeight);this._container.get_graphics().moveTo(this._realWidth-this._realHeight,0);this._container.get_graphics().lineTo(this._realWidth-this._realHeight,this._realHeight)},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},setPlay:function(){if(this.isPlaying()!=true){this.togglePlay()}},setPause:function(){if(this.isPlaying()==true){this.togglePlay()}},__class__:xeditor_objects_FFAudioPlayerJS,__properties__:$extend(openfl_display_Sprite.prototype.__properties__,{get_realHeight:"get_realHeight",set_params:"set_params",get_params:"get_params"})});var xeditor_objects_ImageObject=function(e,t,s){this._contentType="image";this._gif=null;this._imgContainer=new openfl_display_Sprite;this._imgLoader=new openfl_display_Loader;this._alpha=1;this._strokeColor=xeditor_utils_TRUtil.rgb(26,147,31);this._strokeWidth=3;this._hasborder=false;xeditor_objects_TrObjectEx.call(this,e,t);this._container=new openfl_display_Sprite;this._container.set_name("image_container");this.addChild(this._container);this.set_params_i(s);this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render();this._container.addChild(this._imgContainer)};$hxClasses["xeditor.objects.ImageObject"]=xeditor_objects_ImageObject;xeditor_objects_ImageObject.__name__=["xeditor","objects","ImageObject"];xeditor_objects_ImageObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_ImageObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_url:null,_hasborder:null,_strokeWidth:null,_strokeColor:null,_alpha:null,_tmpBitmap:null,_imgLoader:null,_imgContainer:null,_gif:null,_contentType:null,load_gif:function(e){var o=this;var t=new openfl_net_URLLoader;t.dataFormat=0;var s=new openfl_net_URLRequest(e);t.addEventListener("complete",function(e){var t=js_Boot.__cast(e.target,openfl_net_URLLoader).data;var s=new haxe_io_BytesBuffer;var i=0;var a=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(t);while(i0){this._imgContainer.removeChildAt(0)}this._imgLoader.unload();this._gif.stop();this._gif=null}var s=Reflect.field(e,"url");if(s.length>0){var i=s;var a=i.lastIndexOf(".");var r=a>0?HxOverrides.substr(i,a+1,null).toLowerCase():"";if(r.indexOf("?")!=-1){r=r.split("?")[0]}if(r=="gif"){this._contentType="gif";this.load_gif(s)}else{this._contentType="image";this.load_image(s)}}else{var _=openfl_utils_Assets.getBitmapData("img/imgdefault.png");this._tmpBitmap=new openfl_display_Bitmap(_);this._imgContainer.addChild(this._tmpBitmap)}this._url=Reflect.field(e,"url")}this._hasborder=Object.prototype.hasOwnProperty.call(e,"hasborder")?Reflect.field(e,"hasborder"):this._hasborder;this._strokeWidth=Object.prototype.hasOwnProperty.call(e,"strokeWidth")?Reflect.field(e,"strokeWidth"):this._strokeWidth;this._strokeColor=Object.prototype.hasOwnProperty.call(e,"strokeColor")?Reflect.field(e,"strokeColor"):this._strokeColor;this._alpha=Object.prototype.hasOwnProperty.call(e,"alpha")?Reflect.field(e,"alpha"):this._alpha;if(t){this.render()}this._container.set_alpha(this._alpha);return null},render:function(){if(this._imgContainer.get_width()>0&&this._imgContainer.get_height()>0){this._imgContainer.set_scaleX(this._realWidth/(this._imgContainer.get_width()/this._imgContainer.get_scaleX()));this._imgContainer.set_scaleY(this._realHeight/(this._imgContainer.get_height()/this._imgContainer.get_scaleY()))}var e=new openfl_geom_Rectangle(0,0,this._realWidth,this._realHeight);var t=e.width<=e.height?e.width/2:e.height/2;if(this._hasborder){this._container.get_graphics().clear();this._container.get_graphics().lineStyle(this._strokeWidth,this._strokeColor,1,false,2,2,1);this._container.get_graphics().drawRect(0,0,this._realWidth,this._realHeight)}},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},__class__:xeditor_objects_ImageObject});var xeditor_objects_LineObject=function(e,t,s){this._endPoint=new openfl_geom_Point;this._startPoint=new openfl_geom_Point;this.LINE_SEGMENT_LENGTH_BASE=4;this.THETA=45;xeditor_objects_TrObjectEx.call(this,e.realWidth,e.realHeight);if(t!=null){this._startPoint=t}if(s!=null){this._endPoint=s}this._lineDefinition=e;this._dotSpacing=2*this._lineDefinition.strokeSize;this._r=this._lineDefinition.strokeSize*.5;this._d=this._r/Math.cos(xeditor_utils_Conversions.radians(.5*this.THETA));this._container=new openfl_display_Sprite;this._container.set_name("line_container");this.addChild(this._container);this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render()};$hxClasses["xeditor.objects.LineObject"]=xeditor_objects_LineObject;xeditor_objects_LineObject.__name__=["xeditor","objects","LineObject"];xeditor_objects_LineObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_LineObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_lineDefinition:null,THETA:null,LINE_SEGMENT_LENGTH_BASE:null,_r:null,_d:null,_dotSpacing:null,_startPoint:null,_endPoint:null,apply:function(e,t,s){var i=js_Boot.__cast(e,openfl_display_Sprite);i.get_graphics().clear();var a=Math.sqrt(Math.pow(s.x-t.x,2)+Math.pow(s.y-t.y,2));var r=Math.atan2(s.y-t.y,s.x-t.x);var _;if(s!=null){i.get_graphics().moveTo(t.x,t.y);if(this._lineDefinition.type=="solid"){i.get_graphics().lineStyle(this._lineDefinition.strokeSize,this._lineDefinition.strokeColor,this._lineDefinition.strokeAlpha);i.get_graphics().lineTo(s.x,s.y)}else if(this._lineDefinition.type=="dashed"){i.get_graphics().lineStyle(this._lineDefinition.strokeSize,this._lineDefinition.strokeColor,this._lineDefinition.strokeAlpha,false,2,2,1);var n=this.LINE_SEGMENT_LENGTH_BASE*this._lineDefinition.strokeSize|0;var o=this.LINE_SEGMENT_LENGTH_BASE*this._lineDefinition.strokeSize|0;var l=Math.floor(a/(n+o));var h=new openfl_geom_Point;var c=new openfl_geom_Point;_=0;while(_<=l){h.x=t.x+Math.cos(r)*(_*(n+o));h.y=t.y+Math.sin(r)*(_*(n+o));c.x=t.x+Math.cos(r)*((_+1)*(n+o)-o);c.y=t.y+Math.sin(r)*((_+1)*(n+o)-o);if(_==l){var u=Math.sqrt(Math.pow(s.x-h.x,2)+Math.pow(s.y-h.y,2));if(u<=n){c.x=s.x;c.y=s.y}}i.get_graphics().moveTo(h.x,h.y);i.get_graphics().lineTo(c.x,c.y);++_}}else if(this._lineDefinition.type=="dotted"){i.get_graphics().lineStyle(0,16711680,0);i.get_graphics().beginFill(this._lineDefinition.strokeColor,this._lineDefinition.strokeAlpha);var f;var p;var d;var g;var m;var v;var b;var y=new openfl_geom_Point;_=0;while(_<=a){y.x=t.x+Math.cos(r)*_;y.y=t.y+Math.sin(r)*_;i.get_graphics().moveTo(y.x+this._r,y.y);f=this.THETA/2|0;while(f<361){v=xeditor_utils_Conversions.radians(f);b=xeditor_utils_Conversions.radians(f+this.THETA/2);p=this._d*Math.cos(v);d=this._d*Math.sin(v);g=this._r*Math.cos(b);m=this._r*Math.sin(b);i.get_graphics().curveTo(y.x+p,y.y+d,y.x+g,y.y+m);f=f+this.THETA|0}_+=this._dotSpacing|0}i.get_graphics().endFill()}}},render:function(){this._container.get_graphics().clear();this.apply(this._container,this._startPoint,this._endPoint)},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},__class__:xeditor_objects_LineObject});var xeditor_objects_LinkObject=function(e,t,s){this._params={};this._status="normal";xeditor_objects_TrObjectEx.call(this,e,t);this._params=Reflect.copy(s);this._container=new openfl_display_Sprite;this._container.set_name("hyperlink_container");this.addChild(this._container);this.addEventListener("rollOut",$bind(this,this.onMouseOut));this.addEventListener("rollOver",$bind(this,this.onMouseOver));this.addEventListener("mouseOut",$bind(this,this.onMouseOut));this.addEventListener("mouseOver",$bind(this,this.onMouseOver));this.addEventListener("mouseDown",$bind(this,this.onMouseClick));this.addEventListener("mouseUp",$bind(this,this.onMouseUP));this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render();this._orgbounds=this._container.getBounds(this)};$hxClasses["xeditor.objects.LinkObject"]=xeditor_objects_LinkObject;xeditor_objects_LinkObject.__name__=["xeditor","objects","LinkObject"];xeditor_objects_LinkObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_LinkObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_status:null,_params:null,render:function(){var e=new openfl_geom_Rectangle(0,0,this._realWidth,this._realHeight);this._container.get_graphics().clear();if(this._status=="normal"){this._container.get_graphics().beginFill(this._params.normalColor,this._params.normalApha);this._container.get_graphics().drawRect(e.x,e.y,e.width,e.height)}else if(this._status=="hover"){this._container.get_graphics().beginFill(this._params.overColor,this._params.overAhpa);if(this._params.overBorder){this._container.get_graphics().lineStyle(5,this._params.overBorderColor,100,false,2,2,1)}this._container.get_graphics().drawRect(e.x,e.y,e.width,e.height)}else if(this._status=="down"){this._container.get_graphics().beginFill(this._params.downColor,this._params.downAhpa);if(this._params.overBorder){this._container.get_graphics().lineStyle(5,this._params.overBorderColor,100,false,2,2,1)}this._container.get_graphics().drawRect(e.x,e.y,e.width,e.height)}this._container.get_graphics().endFill()},onMouseUP:function(e){this._status="normal";this.render()},onMouseClick:function(e){this._status="down";this.render()},onMouseOver:function(e){this._status="hover";this.render()},onMouseOut:function(e){this._status="normal";this.render()},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},__class__:xeditor_objects_LinkObject});var xeditor_objects_PlayMusicJS=function(e){this.pausePosition=0;if(e!=null&&e.length>0){this.snd=window.document.createElement("audio");this.snd.src=new openfl_net_URLRequest(e).url;this.snd.onended=$bind(this,this.onCom);flipbookMM_global_GetDivJs.getInstance().music.appendChild(this.snd);this.snd.style.display="none"}};$hxClasses["xeditor.objects.PlayMusicJS"]=xeditor_objects_PlayMusicJS;xeditor_objects_PlayMusicJS.__name__=["xeditor","objects","PlayMusicJS"];xeditor_objects_PlayMusicJS.prototype={snd:null,pausePosition:null,loopCount:null,play:function(e){if(e==null){e=1}if(this.snd==null){return}this.loopCount=e;if(this.loopCount==-1||this.loopCount>0){this.changeStatus(true)}},changeStatus:function(e){if(this.snd==null){return}if(e){this.snd.play()}else{this.pausePosition=this.snd.currentTime;this.snd.pause()}},ContinuePlay:function(){this.changeStatus(true)},stop:function(){this.changeStatus(false)},onCom:function(e){if(this.loopCount>0){this.loopCount-=1}if(this.loopCount==-1||this.loopCount>0){this.changeStatus(true)}},destroyMe:function(){this.changeStatus(false);flipbookMM_global_GetDivJs.getInstance().music.removeChild(this.snd);this.snd.onended=null;this.snd=null},__class__:xeditor_objects_PlayMusicJS};var xeditor_objects_Shape2Object=function(e,t,s){xeditor_objects_TrObjectEx.call(this,e,t);this._params=s;this._container=new openfl_display_Sprite;this._container.set_name("shape2_container");this.addChild(this._container);this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render()};$hxClasses["xeditor.objects.Shape2Object"]=xeditor_objects_Shape2Object;xeditor_objects_Shape2Object.__name__=["xeditor","objects","Shape2Object"];xeditor_objects_Shape2Object.__super__=xeditor_objects_TrObjectEx;xeditor_objects_Shape2Object.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_params:null,render:function(){this._container.get_graphics().clear();var e=new openfl_geom_Rectangle(0,0,this._realWidth,this._realHeight);var t=e.width<=e.height?e.width/2:e.height/2;if(this._params.strokeColor!=-1){if(this._params.type=="rectangle"||this._params.type=="square"||this._params.type=="triangle"||this._params.type=="right-triangle"||this._params.type=="diamond"||this._params.type=="pentagon"){this._container.get_graphics().lineStyle(this._params.strokeWidth,this._params.strokeColor,this._params.strokeAlpha,false,2,2,1)}else{this._container.get_graphics().lineStyle(this._params.strokeWidth,this._params.strokeColor,this._params.strokeAlpha)}}if(this._params.fillColor!=-1){this._container.get_graphics().beginFill(this._params.fillColor,this._params.fillAlpha)}if(this._params.type=="rectangle"){this._container.get_graphics().drawRect(e.x,e.y,e.width,e.height)}else if(this._params.type=="round_rectangle"){var s=Object.prototype.hasOwnProperty.call(this._params,"radius_RoundRect")?Reflect.field(this._params,"radius_RoundRect"):e.width*.2;this._container.get_graphics().drawRoundRect(e.x,e.y,e.width,e.height,s)}else if(this._params.type=="oval"){this._container.get_graphics().drawEllipse(e.x,e.y,e.width,e.height)}else if(this._params.type=="right-triangle"){xeditor_utils_DrawingShapes.drawRightTriangle(this._container.get_graphics(),e)}else if(this._params.type=="triangle"){xeditor_utils_DrawingShapes.drawTriangle(this._container.get_graphics(),e)}else if(this._params.type=="diamond"){xeditor_utils_DrawingShapes.drawPolygon2Ex_inRect(this._container.get_graphics(),4,e,0)}else if(this._params.type=="pentagon"){xeditor_utils_DrawingShapes.drawPolygon2Ex_inRect(this._container.get_graphics(),5,e,0)}else if(this._params.type=="five-star"){xeditor_utils_DrawingShapes.drawStarEx_inRect(this._container.get_graphics(),5,e,t*Math.sin(.1*Math.PI)/Math.sin(.7*Math.PI),18)}if(this._params.fillColor!=-1){this._container.get_graphics().endFill()}},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},__class__:xeditor_objects_Shape2Object});var xeditor_objects_StepObject=function(e,t,s,i,a,r,_){if(_==null){_=.001}xeditor_objects_TrObjectEx.call(this,t,s);this._stepType=e;this._title=i;this._bkgrColor=a;this._titleColor=r;this._fontsize=_;this._container=new openfl_display_Sprite;this._container.set_name("step_container");this.addChild(this._container);if(_<.1){var n=this._stepType;switch(n){case"circle":_=this.cal_font_size(this._realWidth,this._realHeight);break;case"circle-pointer":_=this.cal_font_size(this._realWidth*.7,this._realHeight);break;case"square":_=this.cal_font_size(this._realWidth,this._realHeight);break;case"square-pointer":_=this.cal_font_size(this._realWidth,this._realHeight);break}this._fontsize=_}var o=new openfl_text_TextFormat("Arial",_|0,this._titleColor,true);this._textField=new openfl_text_TextField;this._textField.set_autoSize(1);this._textField.set_defaultTextFormat(o);this._textField.set_text(this._title);this._textField.set_selectable(false);this._container.addChild(this._textField);this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render()};$hxClasses["xeditor.objects.StepObject"]=xeditor_objects_StepObject;xeditor_objects_StepObject.__name__=["xeditor","objects","StepObject"];xeditor_objects_StepObject.createDropShadowFilter=function(e){var t=new openfl_filters_DropShadowFilter(parseFloat(e[0]),parseFloat(e[1]),Std.parseInt(e[2]),parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6]),Std.parseInt(e[7]),e[8]=="true",e[9]=="true",e[10]=="true");return t};xeditor_objects_StepObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_StepObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_stepType:null,_title:null,_bkgrColor:null,_titleColor:null,_fontsize:null,_textField:null,measureString:function(e,t){var s=new openfl_text_TextField;s.set_defaultTextFormat(t);s.set_text(e);return new openfl_geom_Rectangle(0,0,s.get_textWidth(),s.get_textHeight())},cal_font_size:function(e,t){var s;if(e>t){s=.75*t}else{s=.75*e}var i=new openfl_text_TextFormat("Arial",s|0,this._titleColor,true);var a=this.measureString(this._title,i);var r=1;if(a.width>e){r=a.width/e}if(a.height>t){if(a.height/t>r){r=a.height/t}}s/=r;while(true){var _=new openfl_text_TextFormat("Arial",s|0,this._titleColor,true);var n=this.measureString(this._title,_);if(n.width>.9*e||n.height>.9*t){--s}else{break}}return s},draw_title:function(e,t,s,i,a){var r=js_Boot.__cast(e,openfl_display_Sprite);var _=r.get_graphics();var n=new openfl_text_TextFormat("Arial",this._fontsize|0,this._titleColor,true);this._textField.set_autoSize(1);this._textField.set_defaultTextFormat(n);this._textField.set_text(this._title);this._textField.set_x((i-this._textField.get_width())*.5);this._textField.set_y((a-this._textField.get_height())*.5)},drawRoundRectComplex:function(e,t,s,i,a,r,_,n,o){var l=t+i;var h=s+a;var c=i=l?l:o;n.lineStyle(.5,0,1);n.beginFill(this._bkgrColor,1);this.drawRoundRectComplex(n,t,s,i,a,h*2,h*2,h*2,h*2);n.endFill();_.set_filters([xeditor_objects_StepObject.createDropShadowFilter(r)])},draw_square_pointer:function(e,t,s,i,a){var r=["1","90","0","0.6","1","1","1","1","false","false","false"];var _=js_Boot.__cast(e,openfl_display_Sprite);var n=_.get_graphics();var o=i/42;var l=a/42;n.lineStyle(1,0,1);n.beginFill(this._bkgrColor,1);n.moveTo(13*o,l);n.lineTo(39*o,l);n.curveTo(40*o,l,41*o,3*l);n.lineTo(41*o,29*l);n.curveTo(41*o,35*l,27*o,41*l);n.lineTo(13*o,41*l);n.curveTo(7*o,41*l,o,29*l);n.lineTo(o,15*l);n.curveTo(o,8*l,13*o,l);n.endFill();_.set_filters([xeditor_objects_StepObject.createDropShadowFilter(r)])},draw_Circle:function(e,t,s,i,a){var r=["1","90","0","0.6","1","1","1","1","false","false","false"];var _=js_Boot.__cast(e,openfl_display_Sprite);var n=_.get_graphics();var o=i/42;var l=a/42;n.lineStyle(.5,0,1);n.beginFill(this._bkgrColor,1);n.drawEllipse(t,s,i,a);n.endFill();_.set_filters([xeditor_objects_StepObject.createDropShadowFilter(r)])},draw_Circle_Pointer:function(e,t,s,i,a){var r=["1","90","0","0.6","1","1","1","1","false","false","false"];var _=js_Boot.__cast(e,openfl_display_Sprite);var n=_.get_graphics();var o=i/64;var l=a/42;n.lineStyle(.5,0,1);n.beginFill(this._bkgrColor,1);n.moveTo(63*o,21*l);n.curveTo(63*o,21*l,21*o,41*l);n.curveTo(5*o,41*l,o,21*l);n.curveTo(o,10*l,21*o,l);n.curveTo(20*o,l,63*o,21*l);n.endFill();_.set_filters([xeditor_objects_StepObject.createDropShadowFilter(r)])},render:function(){this._container.get_graphics().clear();var e=this._stepType;switch(e){case"circle":this.draw_Circle(this._container,0,0,this._realWidth,this._realHeight);this.draw_title(this._container,0,0,this._realWidth,this._realHeight);break;case"circle-pointer":this.draw_Circle_Pointer(this._container,0,0,this._realWidth,this._realHeight);this.draw_title(this._container,0,0,this._realWidth*.7,this._realHeight);break;case"square":this.draw_square(this._container,0,0,this._realWidth,this._realHeight);this.draw_title(this._container,0,0,this._realWidth,this._realHeight);break;case"square-pointer":this.draw_square_pointer(this._container,0,0,this._realWidth,this._realHeight);this.draw_title(this._container,0,0,this._realWidth,this._realHeight);break}},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},__class__:xeditor_objects_StepObject});var xeditor_objects_TextObject=function(e,t,s,i,a){if(a==null){a=0}if(i==null){i=0}if(s==null){s=-1}if(t==null){t=-1}xeditor_objects_TrObject.call(this,i,a);this._textFormat=e;this._backgroundColor=t;this._borderColor=s;this._bg=new openfl_display_Sprite;this._bg.set_alpha(0);this.addChild(this._bg);this._textfield=new openfl_text_TextField;this._textfield.set_name("text_label");this._textfield.set_antiAliasType(0);this._textfield.set_autoSize(1);this._textfield.set_multiline(true);this._textfield.set_wordWrap(true);this._textfield.set_defaultTextFormat(e);this._textfield.set_type(1);this._textfield.set_selectable(false);this._textfield.set_background(t!=-1);this._textfield.set_backgroundColor(t!=-1?t:16777215);this._textfield.set_border(s!=-1);this._textfield.set_borderColor(s!=-1?s:16777215);if(this._realWidth>0){this._textfield.set_width(this._realWidth)}this.addChild(this._textfield);this._textfield.addEventListener("change",$bind(this,this.updateBackground),false,0,true);this.addEventListener("addedToStage",$bind(this,this.init));this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.updateBackground(null)};$hxClasses["xeditor.objects.TextObject"]=xeditor_objects_TextObject;xeditor_objects_TextObject.__name__=["xeditor","objects","TextObject"];xeditor_objects_TextObject.__super__=xeditor_objects_TrObject;xeditor_objects_TextObject.prototype=$extend(xeditor_objects_TrObject.prototype,{_textfield:null,_textFormat:null,_bg:null,_backgroundColor:null,_borderColor:null,set_htmltext:function(e){this._textfield.set_htmlText(e);this.updateBackground(null);return this._textfield.get_htmlText()},init:function(e){this.removeEventListener("addedToStage",$bind(this,this.init))},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},updateBackground:function(e){this._bg.get_graphics().clear();this._bg.get_graphics().beginFill(16777215,1);this._bg.get_graphics().drawRect(0,0,this._textfield.get_width(),this._textfield.get_height())},__class__:xeditor_objects_TextObject,__properties__:$extend(xeditor_objects_TrObject.prototype.__properties__,{set_htmltext:"set_htmltext"})});var xeditor_objects_TrButtonObject=function(e,t,s,i,a,r,_){if(_==null){_=""}if(r==null){r="normal"}if(a==null){a=14}if(i==null){i="Arial"}this._props=[];this._draw_type="roundrect";this._status="normal";this._text="";xeditor_objects_TrObjectEx.call(this,t,s);this._container=new openfl_display_Sprite;this._container.set_name("button_container");this.addChild(this._container);this._realWidth=t;this._realHeight=s;this._fontname=i;this._fontsize=a;this._font_weight=r;this._text=_;this.pre_init();this.change_button_type(e);this.init();this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render()};$hxClasses["xeditor.objects.TrButtonObject"]=xeditor_objects_TrButtonObject;xeditor_objects_TrButtonObject.__name__=["xeditor","objects","TrButtonObject"];xeditor_objects_TrButtonObject.createBlurFilter=function(e){var t=new openfl_filters_BlurFilter(parseFloat(e[0]),parseFloat(e[1]),Std.parseInt(e[2]));return t};xeditor_objects_TrButtonObject.createDropShadowFilter=function(e){var t=new openfl_filters_DropShadowFilter(parseFloat(e[0]),parseFloat(e[1]),Std.parseInt(e[2]),parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6]),Std.parseInt(e[7]),e[8]=="true",e[9]=="true",e[10]=="true");return t};xeditor_objects_TrButtonObject.convert_box_shadow=function(e,t,s,i,a,r){var _=new openfl_geom_Point(0,0);var n=new openfl_geom_Point(i,a);var o=xeditor_utils_TRUtil.cal_twopoint_angle(_,n);var l=Std.string(openfl_geom_Point.distance(_,n));var h=Std.string(_$UInt_UInt_$Impl_$.toFloat(t));return[l,o==null?"null":""+o,h,s==null?"null":""+s,r==null?"null":""+r,r==null?"null":""+r,"1","1",e?"true":"false","false","false"]};xeditor_objects_TrButtonObject.convert_box_shadow_byObject=function(e){return xeditor_objects_TrButtonObject.convert_box_shadow(e.inner,e.color,e.alpha,e.offset_x,e.offset_y,e.blur_radius)};xeditor_objects_TrButtonObject.convert_text_shadow=function(e,t,s,i,a){if(a==null){a=1}var r=new openfl_geom_Point(0,0);var _=new openfl_geom_Point(t,s);var n=xeditor_utils_TRUtil.cal_twopoint_angle(r,_);var o=Std.string(openfl_geom_Point.distance(r,_));var l=Std.string(_$UInt_UInt_$Impl_$.toFloat(e));return[o,n==null?"null":""+n,l,a==null?"null":""+a,Std.string(Math.abs(Math.cos(n)*i)),Std.string(Math.abs(Math.sin(n)*i)),"1","1","false","false","false"]};xeditor_objects_TrButtonObject.convert_text_shadow_byObject=function(e){return xeditor_objects_TrButtonObject.convert_text_shadow(e.color,e.offset_x,e.offset_y,e.blur_radius,e.alpha)};xeditor_objects_TrButtonObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_TrButtonObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_fontname:null,_fontsize:null,_font_weight:null,_text:null,_textField:null,_tf_normal:null,_tf_hover:null,_tf_active:null,_status:null,_button_type:null,_draw_type:null,_props:null,get_prop_field:function(e,t){var s=this._props.length;if(t=="normal"){var i=s;while(i>0){if(Object.prototype.hasOwnProperty.call(this._props[i-1].normal,e)){return Reflect.field(this._props[i-1].normal,e)}--i}}else{var a=s;while(a>0){var r=t=="hover"?this._props[a-1].hover:this._props[a-1].active;if(Object.prototype.hasOwnProperty.call(r,e)){return Reflect.field(r,e)}--a}a=s;while(a>0){if(Object.prototype.hasOwnProperty.call(this._props[a-1].normal,e)){return Reflect.field(this._props[a-1].normal,e)}--a}}return null},register_prop:function(e,t,s){this._props.push({normal:e,hover:t,active:s})},pre_init:function(){var e=xeditor_utils_TRUtil.rgb(102,102,102);var t=xeditor_utils_TRUtil.rgb(238,238,238);var s={dropShadow_1:xeditor_objects_TrButtonObject.convert_box_shadow(true,xeditor_utils_TRUtil.rgb(255,255,255),.5,0,1,0),dropShadow_2:xeditor_objects_TrButtonObject.convert_box_shadow(false,xeditor_utils_TRUtil.rgb(0,0,0),.15,0,1,2)};var i=xeditor_objects_TrButtonObject.convert_text_shadow(xeditor_utils_TRUtil.rgb(255,255,255),0,1,1);var a={color:e,border_width:1,border_color:13948116,border_radius:3,background_color:t,background:{angle:90,color1:16514043,color2:14803425,alpha1:1,alpha2:1,ratio1:0,ratio2:255},box_shadow:s,text_shadow:i};var r={color:xeditor_utils_TRUtil.rgb(102,102,102),background_color:xeditor_utils_TRUtil.rgb(238,238,238),background:{angle:90,color1:16777215,color2:14474460,alpha1:1,alpha2:1,ratio1:0,ratio2:255}};var _={dropShadow_1:xeditor_objects_TrButtonObject.convert_box_shadow(true,xeditor_utils_TRUtil.rgb(0,0,0),.3,0,1,3),dropShadow_2:xeditor_objects_TrButtonObject.convert_box_shadow(false,xeditor_utils_TRUtil.rgb(255,255,255),.4,0,1,0)};var n=xeditor_objects_TrButtonObject.convert_text_shadow(xeditor_utils_TRUtil.rgb(255,255,255),0,1,0,.4);var o={color:12303291,background_color:15658734,background:{angle:90,color1:16514043,color2:14803425,alpha1:1,alpha2:1,ratio1:0,ratio2:255},box_shadow:_,text_shadow:n};this.register_prop(a,r,o)},create_textformat:function(e,t,s){this._tf_normal=new openfl_text_TextFormat(e,t|0,this.get_prop_field("color","normal"));this._tf_normal.bold=s=="bold";this._tf_hover=new openfl_text_TextFormat(e,t|0,this.get_prop_field("color","hover"));this._tf_hover.bold=s=="bold";this._tf_active=new openfl_text_TextFormat(e,t|0,this.get_prop_field("color","active"));this._tf_active.bold=s=="bold";this._fontname=e;this._fontsize=t;this._font_weight=s},init:function(){this.create_textformat(this._fontname,this._fontsize,this._font_weight);this._textField=new openfl_text_TextField;this._textField.set_defaultTextFormat(this._tf_normal);this._textField.set_autoSize(1);this._textField.set_text(this._text);this._textField.set_selectable(false);this._container.addChild(this._textField);this.addEventListener("rollOut",$bind(this,this.onMouseOut));this.addEventListener("rollOver",$bind(this,this.onMouseOver));this.addEventListener("mouseDown",$bind(this,this.onMouseClick));this.addEventListener("mouseUp",$bind(this,this.onMouseUP))},change_button_type:function(e,t){if(t==null){t=false}if(t){var s=this._props.length;while(s>1){this._props.pop();--s}}this._button_type=e;this._draw_type="roundrect";switch(e){case"wol_circle_action":this._draw_type="circle";this.register_prop(xeditor_type_TrButton_$Prop.button_circle.normal,xeditor_type_TrButton_$Prop.button_circle.hover,xeditor_type_TrButton_$Prop.button_circle.active);this.register_prop(xeditor_type_TrButton_$Prop.button_action.normal,xeditor_type_TrButton_$Prop.button_action.hover,xeditor_type_TrButton_$Prop.button_action.active);break;case"wol_circle_caution":this._draw_type="circle";this.register_prop(xeditor_type_TrButton_$Prop.button_circle.normal,xeditor_type_TrButton_$Prop.button_circle.hover,xeditor_type_TrButton_$Prop.button_circle.active);this.register_prop(xeditor_type_TrButton_$Prop.button_caution.normal,xeditor_type_TrButton_$Prop.button_caution.hover,xeditor_type_TrButton_$Prop.button_caution.active);break;case"wol_circle_default":this._draw_type="circle";this.register_prop(xeditor_type_TrButton_$Prop.button_circle.normal,xeditor_type_TrButton_$Prop.button_circle.hover,xeditor_type_TrButton_$Prop.button_circle.active);break;case"wol_circle_highlight":this._draw_type="circle";this.register_prop(xeditor_type_TrButton_$Prop.button_circle.normal,xeditor_type_TrButton_$Prop.button_circle.hover,xeditor_type_TrButton_$Prop.button_circle.active);this.register_prop(xeditor_type_TrButton_$Prop.button_highlight.normal,xeditor_type_TrButton_$Prop.button_highlight.hover,xeditor_type_TrButton_$Prop.button_highlight.active);break;case"wol_circle_primary":this._draw_type="circle";this.register_prop(xeditor_type_TrButton_$Prop.button_circle.normal,xeditor_type_TrButton_$Prop.button_circle.hover,xeditor_type_TrButton_$Prop.button_circle.active);this.register_prop(xeditor_type_TrButton_$Prop.button_primary.normal,xeditor_type_TrButton_$Prop.button_primary.hover,xeditor_type_TrButton_$Prop.button_primary.active);break;case"wol_circle_royal":this._draw_type="circle";this.register_prop(xeditor_type_TrButton_$Prop.button_circle.normal,xeditor_type_TrButton_$Prop.button_circle.hover,xeditor_type_TrButton_$Prop.button_circle.active);this.register_prop(xeditor_type_TrButton_$Prop.button_royal.normal,xeditor_type_TrButton_$Prop.button_royal.hover,xeditor_type_TrButton_$Prop.button_royal.active);break;case"wol_rounded_action":this.register_prop({border_radius:3},{},{});this.register_prop(xeditor_type_TrButton_$Prop.button_action.normal,xeditor_type_TrButton_$Prop.button_action.hover,xeditor_type_TrButton_$Prop.button_action.active);break;case"wol_rounded_caution":this.register_prop({border_radius:3},{},{});this.register_prop(xeditor_type_TrButton_$Prop.button_caution.normal,xeditor_type_TrButton_$Prop.button_caution.hover,xeditor_type_TrButton_$Prop.button_caution.active);break;case"wol_rounded_default":this.register_prop({border_radius:3},{},{});break;case"wol_rounded_highlight":this.register_prop({border_radius:3},{},{});this.register_prop(xeditor_type_TrButton_$Prop.button_highlight.normal,xeditor_type_TrButton_$Prop.button_highlight.hover,xeditor_type_TrButton_$Prop.button_highlight.active);break;case"wol_rounded_primary":this.register_prop({border_radius:3},{},{});this.register_prop(xeditor_type_TrButton_$Prop.button_primary.normal,xeditor_type_TrButton_$Prop.button_primary.hover,xeditor_type_TrButton_$Prop.button_primary.active);break;case"wol_rounded_royal":this.register_prop({border_radius:3},{},{});this.register_prop(xeditor_type_TrButton_$Prop.button_royal.normal,xeditor_type_TrButton_$Prop.button_royal.hover,xeditor_type_TrButton_$Prop.button_royal.active);break}},onMouseUP:function(e){this._status="normal";this.render();e.stopPropagation()},onMouseClick:function(e){this._status="active";this.render();e.stopPropagation()},onMouseOver:function(e){this._status="hover";this.render();e.stopPropagation()},onMouseOut:function(e){this._status="normal";this.render();e.stopPropagation()},re_pos:function(){this._textField.set_x((this._realWidth-this._textField.get_width())*.5);this._textField.set_y((this._realHeight-this._textField.get_height())*.5)},drawRoundRectComplex:function(e,t,s,i,a,r,_,n,o){var l=t+i;var h=s+a;var c=i0){this.createYoutubeDivs();this.loadYoutubeJs()}if(base_baseUtils_MapUtil.strLength(this.vimeoList)>0){this.createVimeoDivs();this.loadVimeoJs()}},loadYoutubeJs:function(){var t=this;var e=window.document.createElement("script");e.id="youtube_iframe_api";e.src="https://www.youtube.com/iframe_api";var s=window.document.getElementsByTagName("script")[0];s.parentNode.insertBefore(e,s);e.onload=function(){var e=$bind(t,t.youtubeStart);window.onYouTubeIframeAPIReady=e}},createYoutubeDivs:function(){this.youtubeVideoList=new haxe_ds_StringMap;var e=this.youtubeList.keys();while(e.hasNext()){var t=e.next();var s=new xeditor_objects_YoutubeVideoJs(100,100,t);var i=this.youtubeVideoList;if(__map_reserved[t]!=null){i.setReserved(t,s)}else{i.h[t]=s}}},youtubeStart:function(){var e=this.youtubeVideoList.keys();while(e.hasNext()){var t=e.next();var s=this.youtubeVideoList;var i=__map_reserved[t]!=null?s.getReserved(t):s.h[t];var a=this.youtubeList;i.load(t,__map_reserved[t]!=null?a.getReserved(t):a.h[t])}},getYoutubeVideo:function(e){var t=this.youtubeVideoList;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}},loadVimeoJs:function(){var e=this;var t=window.document.createElement("script");t.src="https://player.vimeo.com/api/player.js";var s=window.document.getElementsByTagName("script")[0];s.parentNode.insertBefore(t,s);t.onload=function(){e.vimeoStart()}},vimeoStart:function(){var e=this.vimeoVideoList.keys();while(e.hasNext()){var t=e.next();var s=this.vimeoVideoList;var i=__map_reserved[t]!=null?s.getReserved(t):s.h[t];var a=this.vimeoList;i.load(t,__map_reserved[t]!=null?a.getReserved(t):a.h[t])}},createVimeoDivs:function(){this.vimeoVideoList=new haxe_ds_StringMap;var e=this.vimeoList.keys();while(e.hasNext()){var t=e.next();var s=new xeditor_objects_VimeoPlayerJs(100,100,t);var i=this.vimeoVideoList;if(__map_reserved[t]!=null){i.setReserved(t,s)}else{i.h[t]=s}}},getVimeoVide:function(e){var t=this.vimeoVideoList;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}},__class__:xeditor_objects_VideoHtmlManage};var xeditor_objects_VimeoPlayerJs=function(e,t,s){this.video=null;this.player=null;var a=this;xeditor_objects_TrObjectEx.call(this,e,t);this.vid=s;this.isReady=false;this.isloop=false;this.isAutoPlay=false;this.istrigger=false;this.video=window.document.createElement("iframe");this.video.id=this.vid;this.video.style.left=0+"px";this.video.style.top=0+"px";this.video.style.position="absolute";this.video.style.display="none";this.video.style.setProperty("frameborder","0");this.video.frameBorder="0";this.video.allowFullscreen=true;flipbookMM_global_GetDivJs.getInstance().vimeo.appendChild(this.video);this.lastPositon=this.localToGlobal(new openfl_geom_Point(this.get_x(),this.get_y()));this.addEventListener("enterFrame",function(e){if(a.video.style.display=="block"){var t=a.get_x();var s=a.get_y();var i=a.localToGlobal(new openfl_geom_Point(t,s));if(a.lastPositon.x!=i.x||a.lastPositon.y!=i.y){a.updateVideo(true);a.lastPositon.x=i.x;a.lastPositon.y=i.y}}})};$hxClasses["xeditor.objects.VimeoPlayerJs"]=xeditor_objects_VimeoPlayerJs;xeditor_objects_VimeoPlayerJs.__name__=["xeditor","objects","VimeoPlayerJs"];xeditor_objects_VimeoPlayerJs.__super__=xeditor_objects_TrObjectEx;xeditor_objects_VimeoPlayerJs.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{player:null,video:null,isReady:null,istrigger:null,vid:null,isloop:null,isAutoPlay:null,lastPositon:null,render:function(){this.get_graphics().clear();this.get_graphics().beginFill(0,.01);this.get_graphics().drawRect(0,0,this.get_realWidth(),this.get_realHeight());this.get_graphics().endFill()},setInitPara:function(e,t,s,i){this.set_realWidth(e);this.set_realHeight(t);if(s=="false"){this.isloop=false}else{this.isloop=true}if(i=="false"){this.isAutoPlay=false}else{this.isAutoPlay=true}this.render()},load:function(e,t){var s=this;this.video.src="https://player.vimeo.com/video/"+t;this.player=new Vimeo.Player(e);this.player.on("play",function(){window.console.log("played the handstick video!")});this.player.ready().then(function(){s.isReady=true;s.play()});this.player.on("ended",function(){if(s.isloop){s.play()}})},triggerPlay:function(){this.istrigger=true;this.play()},triggerPause:function(){this.istrigger=false;this.pause()},play:function(){if(this.istrigger){this.updateVideo(true)}if(this.isReady&&this.isAutoPlay&&this.istrigger){this.player.play()}},pause:function(){this.updateVideo(false);if(this.isReady){this.player.pause()}},updateVideo:function(e){if(e){var t=this.localToGlobal(new openfl_geom_Point(this.get_x(),this.get_y()));if(this.isReady){var s=this.get_width()*this.getScaleX(this)/window.devicePixelRatio;this.video.style.width=s+"px";var i=this.get_height()*this.getScaleY(this)/window.devicePixelRatio;this.video.style.height=i+"px"}else{this.video.style.width=2+"px";this.video.style.height=2+"px"}this.video.style.left=(t.x|0)/window.devicePixelRatio+"px";this.video.style.top=(t.y|0)/window.devicePixelRatio+"px";this.video.style.display="block";this.video.style.position="absolute"}else{this.video.style.display="none"}},getScaleX:function(e){if(e!=null){if(e.parent!=null){return e.get_scaleX()*this.getScaleX(e.parent)}else{return e.get_scaleX()}}else{return 0}},getScaleY:function(e){if(e!=null){if(e.parent!=null){return e.get_scaleY()*this.getScaleY(e.parent)}else{return e.get_scaleY()}}else{return 0}},__class__:xeditor_objects_VimeoPlayerJs});var xeditor_objects_VimeoVideoPlayerObject=function(e,t,s){this._parameters={};xeditor_objects_TrObjectEx.call(this,e,t);this.init_parameters();this.set_parameters(s)};$hxClasses["xeditor.objects.VimeoVideoPlayerObject"]=xeditor_objects_VimeoVideoPlayerObject;xeditor_objects_VimeoVideoPlayerObject.__name__=["xeditor","objects","VimeoVideoPlayerObject"];xeditor_objects_VimeoVideoPlayerObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_VimeoVideoPlayerObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{vimeo:null,_parameters:null,set_uid:function(e){xeditor_objects_TrObjectEx.prototype.set_uid.call(this,e);this.vimeo=null;if(this._parameters.url!=null){this.vimeo=xeditor_objects_VideoHtmlManage.getInstance().getVimeoVide(this.get_uid());this.vimeo.setInitPara(this.get_realWidth(),this.get_realHeight(),this._parameters.loop,this._parameters.autostart);this.addChild(this.vimeo)}return this.get_uid()},init_parameters:function(){this._parameters.url="";this._parameters.autostart="false";this._parameters.id="";this._parameters.loop="false"},set_parameters:function(e){var t=0;var s=Reflect.fields(e);while(t0?a:2*Math.PI+a)*360/(2*Math.PI);return a};xeditor_utils_TRUtil.measureString=function(e,t){var s=new openfl_text_TextField;s.set_defaultTextFormat(t);s.set_text(e);return new openfl_geom_Rectangle(0,0,s.get_textWidth(),s.get_textHeight())};xeditor_utils_TRUtil.formatTime=function(e){var t="";var s="";var i="";var a="";if(e/60/60>=1){if(Math.floor(e/60)/60<10){i="0"+Math.floor(e/60/60)+":"}else{i=Math.floor(e/60/60)+":"}if(Math.floor(e/60%60)<10){s="0"+Math.floor(e/60%60)+":"}else{s=Math.floor(e/60%60)+":"}if(Math.floor(e%60)<10){t="0"+Math.floor(e%60)}else{t=Std.string(Math.floor(e%60))}}else if(e/60>=1){i="00:";if(Math.floor(e/60)<10){s="0"+Math.floor(e/60)+":"}else{s=Math.floor(e/60)+":"}if(Math.floor(e%60)<10){t="0"+Math.floor(e%60)}else{t=Std.string(Math.floor(e%60))}}else{i="00:";s="00:";if(Math.floor(e)<10){t="0"+Math.floor(e)}else{t=Std.string(Math.floor(e))}}a+=i+s+t;return a};var xeditor_type_TrButton_$Prop=function(){};$hxClasses["xeditor.type.TrButton_Prop"]=xeditor_type_TrButton_$Prop;xeditor_type_TrButton_$Prop.__name__=["xeditor","type","TrButton_Prop"];var xeditor_utils_Conversions=function(){};$hxClasses["xeditor.utils.Conversions"]=xeditor_utils_Conversions;xeditor_utils_Conversions.__name__=["xeditor","utils","Conversions"];xeditor_utils_Conversions.radians=function(e){return e*Math.PI/180};var xeditor_utils_DrawingShapes=function(){};$hxClasses["xeditor.utils.DrawingShapes"]=xeditor_utils_DrawingShapes;xeditor_utils_DrawingShapes.__name__=["xeditor","utils","DrawingShapes"];xeditor_utils_DrawingShapes.drawRightTriangle=function(e,t){var s=new openfl_geom_Point(t.x,t.y);var i=new openfl_geom_Point(t.x,t.get_bottom());var a=new openfl_geom_Point(t.get_right(),t.get_bottom());e.moveTo(s.x,s.y);e.lineTo(i.x,i.y);e.lineTo(a.x,a.y);e.lineTo(s.x,s.y)};xeditor_utils_DrawingShapes.drawTriangle=function(e,t){var s=new openfl_geom_Point(t.x,t.get_bottom());var i=new openfl_geom_Point(t.get_right(),t.get_bottom());var a=new openfl_geom_Point(t.x+t.width/2,t.y);e.moveTo(s.x,s.y);e.lineTo(i.x,i.y);e.lineTo(a.x,a.y);e.lineTo(s.x,s.y)};xeditor_utils_DrawingShapes.drawStarEx_inRect=function(e,t,s,i,a){if(a==null){a=0}if(s.width<=0||s.height<=0){return}var r=s.x+s.width/2;var _=s.y+s.height/2;var n=s.width<=s.height?s.width/2:s.height/2;var o=s.width<=s.height?1:s.width/s.height;var l=s.height<=s.width?1:s.height/s.width;xeditor_utils_DrawingShapes.drawStarEx(e,r,_,t,i,n,a,o,l)};xeditor_utils_DrawingShapes.drawStarEx=function(e,t,s,i,a,r,_,n,o){if(o==null){o=1}if(n==null){n=1}if(_==null){_=0}var l=t;var h=s;s=0;t=s;if(_$UInt_UInt_$Impl_$.gte(2,i)){return}if(_$UInt_UInt_$Impl_$.gt(i,2)){var c;var u;var f;var p;var d;var g;c=Math.PI*2/_$UInt_UInt_$Impl_$.toFloat(i);u=c/2;f=_/180*Math.PI;e.moveTo((t+Math.cos(f)*r)*n+l,(s-Math.sin(f)*r)*o+h);var m=1;var v=i+1;while(m")}else{s.h["gt"]=">"}if(__map_reserved["amp"]!=null){s.setReserved("amp","&")}else{s.h["amp"]="&"}if(__map_reserved["quot"]!=null){s.setReserved("quot",'"')}else{s.h["quot"]='"'}if(__map_reserved["apos"]!=null){s.setReserved("apos","'")}else{s.h["apos"]="'"}t=s;return t}(this);haxe_zip_InflateImpl.LEN_EXTRA_BITS_TBL=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,-1,-1];haxe_zip_InflateImpl.LEN_BASE_VAL_TBL=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258];haxe_zip_InflateImpl.DIST_EXTRA_BITS_TBL=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,-1,-1];haxe_zip_InflateImpl.DIST_BASE_VAL_TBL=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];haxe_zip_InflateImpl.CODE_LENGTHS_POS=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];openfl_display_MovieClip.__useParentFPS=false;jaris_events_PlayerEvents.ASPECT_RATIO="onAspectRatio";jaris_events_PlayerEvents.MOUSE_SHOW="onMouseShow";jaris_events_PlayerEvents.MOUSE_HIDE="onMouseHide";jaris_events_PlayerEvents.FULLSCREEN="onFullscreen";jaris_events_PlayerEvents.VOLUME_UP="onVolumeUp";jaris_events_PlayerEvents.VOLUME_DOWN="onVolumeDown";jaris_events_PlayerEvents.VOLUME_CHANGE="onVolumeChange";jaris_events_PlayerEvents.MUTE="onMute";jaris_events_PlayerEvents.PLAY_PAUSE="onPlayPause";jaris_events_PlayerEvents.SEEK="onSeek";jaris_events_PlayerEvents.TIME="onTimeUpdate";jaris_events_PlayerEvents.PROGRESS="onProgress";jaris_events_PlayerEvents.BUFFERING="onBuffering";jaris_events_PlayerEvents.NOT_BUFFERING="onNotBuffering";jaris_events_PlayerEvents.CONNECTION_FAILED="onConnectionFailed";jaris_events_PlayerEvents.CONNECTION_SUCCESS="onConnectionSuccess";jaris_events_PlayerEvents.MEDIA_INITIALIZED="onDataInitialized";jaris_events_PlayerEvents.PLAYBACK_FINISHED="onPlaybackFinished";jaris_events_PlayerEvents.STOP_CLOSE="onStopAndClose";jaris_events_PlayerEvents.RESIZE="onResize";jaris_events_PlayerEvents.ERROR="onError";jaris_player_InputType.AUDIO="audio";jaris_player_InputType.VIDEO="video";jaris_player_StreamType.FILE="file";jaris_player_StreamType.PSEUDOSTREAM="http";jaris_player_StreamType.RTMP="rtmp";jaris_player_StreamType.YOUTUBE="youtube";js_Boot.__toStr={}.toString;js_html_compat_Float32Array.BYTES_PER_ELEMENT=4;js_html_compat_Uint8Array.BYTES_PER_ELEMENT=1;lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests=0;lime__$internal_backend_html5_HTML5HTTPRequest.requestLimit=17;lime__$internal_backend_html5_HTML5HTTPRequest.requestQueue=new List;lime__$internal_backend_html5_HTML5Window.dummyCharacter="";lime__$internal_backend_html5_HTML5Window.windowID=0;lime_graphics_Image.__base64Chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";lime_math__$Matrix4_Matrix4_$Impl_$.__identity=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];lime_system_Clipboard.onUpdate=new lime_app__$Event_$Void_$Void;lime_system_Sensor.sensorByID=new haxe_ds_IntMap;lime_system_Sensor.sensors=[];lime_ui_Gamepad.devices=new haxe_ds_IntMap;lime_ui_Gamepad.onConnect=new lime_app__$Event_$lime_$ui_$Gamepad_$Void;lime_ui_Joystick.devices=new haxe_ds_IntMap;lime_ui_Joystick.onConnect=new lime_app__$Event_$lime_$ui_$Joystick_$Void;lime_ui_Touch.onCancel=new lime_app__$Event_$lime_$ui_$Touch_$Void;lime_ui_Touch.onEnd=new lime_app__$Event_$lime_$ui_$Touch_$Void;lime_ui_Touch.onMove=new lime_app__$Event_$lime_$ui_$Touch_$Void;lime_ui_Touch.onStart=new lime_app__$Event_$lime_$ui_$Touch_$Void;lime_utils_Assets.cache=new lime_utils_AssetCache;lime_utils_Assets.onChange=new lime_app__$Event_$Void_$Void;lime_utils_Assets.libraries=new haxe_ds_StringMap;lime_utils_Assets.libraryPaths=new haxe_ds_StringMap;lime_utils_Log.throwErrors=true;motion_actuators_SimpleActuator.actuators=[];motion_actuators_SimpleActuator.actuatorsLength=0;motion_actuators_SimpleActuator.addedEvent=false;motion_Actuate.defaultActuator=motion_actuators_SimpleActuator;motion_Actuate.defaultEase=motion_easing_Expo.get_easeOut();motion_Actuate.targetLibraries=new haxe_ds_ObjectMap;openfl__$internal_formats_agal_AGALConverter.limitedProfile=true;openfl__$internal_formats_html_HTMLParser.__regexAlign=new EReg("align=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexBreakTag=new EReg("","gi");openfl__$internal_formats_html_HTMLParser.__regexBlockIndent=new EReg("blockindent=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexColor=new EReg("color=(\"#([^\"]+)\"|'#([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexEntities=[new EReg(""","g"),new EReg("'","g"),new EReg("&","g"),new EReg("<","g"),new EReg(">","g"),new EReg(" ","g")];openfl__$internal_formats_html_HTMLParser.__regexFace=new EReg("face=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexHTMLTag=new EReg("<.*?>","g");openfl__$internal_formats_html_HTMLParser.__regexHref=new EReg("href=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexIndent=new EReg(" indent=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexLeading=new EReg("leading=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexLeftMargin=new EReg("leftmargin=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexRightMargin=new EReg("rightmargin=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexSize=new EReg("size=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexTabStops=new EReg("tabstops=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_swf_SWFLite.instances=new haxe_ds_StringMap;openfl__$internal_renderer_DrawCommandBuffer.empty=new openfl__$internal_renderer_DrawCommandBuffer;openfl__$internal_renderer_canvas_CanvasGraphics.SIN45=.7071067811865476;openfl__$internal_renderer_canvas_CanvasGraphics.TAN22=.41421356237309503;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands=new openfl__$internal_renderer_DrawCommandBuffer;openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands=new openfl__$internal_renderer_DrawCommandBuffer;openfl_display_BitmapData.__vertexBufferStride=14;openfl_display_BitmapData.__tempVector=new lime_math_Vector2;openfl_geom_Rectangle.__pool=new lime_utils_ObjectPool(function(){return new openfl_geom_Rectangle},function(e){e.setTo(0,0,0,0)});openfl_geom_Matrix.__pool=new lime_utils_ObjectPool(function(){return new openfl_geom_Matrix},function(e){e.identity()});openfl_geom_ColorTransform.__pool=new lime_utils_ObjectPool(function(){return new openfl_geom_ColorTransform},function(e){e.__identity()});openfl__$internal_renderer_context3D_Context3DGraphics.blankBitmapData=new openfl_display_BitmapData(1,1,false,0);openfl__$internal_renderer_context3D_Context3DGraphics.tempColorTransform=new openfl_geom_ColorTransform(1,1,1,1,0,0,0,0);openfl__$internal_renderer_context3D_Context3DMaskShader.opaqueBitmapData=new openfl_display_BitmapData(1,1,false,0);openfl__$internal_renderer_context3D_Context3DVideo.__textureSizeValue=[0,0];openfl__$internal_renderer_dom_DOMTextField.__regexColor=new EReg("color=(\"#([^\"]+)\"|'#([^']+)')","i");openfl__$internal_renderer_dom_DOMTextField.__regexFace=new EReg("face=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_renderer_dom_DOMTextField.__regexFont=new EReg("]+)>","gi");openfl__$internal_renderer_dom_DOMTextField.__regexCloseFont=new EReg("","gi");openfl__$internal_renderer_dom_DOMTextField.__regexSize=new EReg("size=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_utils_TouchData.__pool=new lime_utils_ObjectPool(function(){return new openfl__$internal_utils_TouchData},function(e){e.reset()});openfl_display_LoaderInfo.__rootURL=typeof window!="undefined"?window.document.URL:"";openfl_display_OpenGLRenderer.__alphaValue=[1];openfl_display_OpenGLRenderer.__colorMultipliersValue=[0,0,0,0];openfl_display_OpenGLRenderer.__colorOffsetsValue=[0,0,0,0];openfl_display_OpenGLRenderer.__emptyColorValue=[0,0,0,0];openfl_display_OpenGLRenderer.__hasColorTransformValue=[false];openfl_display_OpenGLRenderer.__scissorRectangle=new openfl_geom_Rectangle;openfl_display_OpenGLRenderer.__textureSizeValue=[0,0];openfl_display3D_Context3D.GL_DEPTH_STENCIL=-1;openfl_display3D_Context3D.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT=-1;openfl_display3D_Context3D.GL_MAX_VIEWPORT_DIMS=-1;openfl_display3D_Context3D.GL_TEXTURE_MAX_ANISOTROPY_EXT=-1;openfl_display3D_textures_Texture.__lowMemoryMode=false;openfl_events_KeyboardEvent.KEY_DOWN="keyDown";openfl_events_KeyboardEvent.KEY_UP="keyUp";openfl_events_MouseEvent.CLICK="click";openfl_events_MouseEvent.DOUBLE_CLICK="doubleClick";openfl_events_MouseEvent.MIDDLE_CLICK="middleClick";openfl_events_MouseEvent.MIDDLE_MOUSE_DOWN="middleMouseDown";openfl_events_MouseEvent.MIDDLE_MOUSE_UP="middleMouseUp";openfl_events_MouseEvent.MOUSE_DOWN="mouseDown";openfl_events_MouseEvent.MOUSE_MOVE="mouseMove";openfl_events_MouseEvent.MOUSE_OUT="mouseOut";openfl_events_MouseEvent.MOUSE_OVER="mouseOver";openfl_events_MouseEvent.MOUSE_UP="mouseUp";openfl_events_MouseEvent.MOUSE_WHEEL="mouseWheel";openfl_events_MouseEvent.RELEASE_OUTSIDE="releaseOutside";openfl_events_MouseEvent.RIGHT_CLICK="rightClick";openfl_events_MouseEvent.RIGHT_MOUSE_DOWN="rightMouseDown";openfl_events_MouseEvent.RIGHT_MOUSE_UP="rightMouseUp";openfl_events_MouseEvent.ROLL_OUT="rollOut";openfl_events_MouseEvent.ROLL_OVER="rollOver";openfl_events_TouchEvent.TOUCH_BEGIN="touchBegin";openfl_events_TouchEvent.TOUCH_END="touchEnd";openfl_events_TouchEvent.TOUCH_MOVE="touchMove";openfl_events_TouchEvent.TOUCH_OUT="touchOut";openfl_events_TouchEvent.TOUCH_OVER="touchOver";openfl_events_TouchEvent.TOUCH_ROLL_OUT="touchRollOut";openfl_events_TouchEvent.TOUCH_ROLL_OVER="touchRollOver";openfl_events_TouchEvent.TOUCH_TAP="touchTap";openfl_filters_BlurFilter.__blurShader=new openfl_filters__$BlurFilter_BlurShader;openfl_filters_ColorMatrixFilter.__colorMatrixShader=new openfl_filters__$ColorMatrixFilter_ColorMatrixShader;openfl_filters_GlowFilter.__glowShader=new openfl_filters__$GlowFilter_GlowShader;openfl_geom_Point.__pool=new lime_utils_ObjectPool(function(){return new openfl_geom_Point},function(e){e.setTo(0,0)});openfl_media_SoundMixer.__soundChannels=[];openfl_media_SoundMixer.__soundTransform=new openfl_media_SoundTransform;openfl_net_SharedObject.defaultObjectEncoding=10;openfl_net_URLRequestDefaults.followRedirects=true;openfl_net_URLRequestDefaults.idleTimeout=0;openfl_net_URLRequestDefaults.manageCookies=false;openfl_system_ApplicationDomain.currentDomain=new openfl_system_ApplicationDomain(null);openfl_text_Font.__fontByName=new haxe_ds_StringMap;openfl_text_Font.__registeredFonts=[];openfl_text_TextField.__missingFontWarning=new haxe_ds_StringMap;openfl_ui_GameInput.numDevices=0;openfl_ui_GameInput.__deviceList=[];openfl_ui_GameInput.__instances=[];openfl_ui_GameInput.__devices=new haxe_ds_ObjectMap;openfl_ui_Mouse.__cursor="auto";openfl_utils_AGALMiniAssembler.OPMAP=new haxe_ds_StringMap;openfl_utils_AGALMiniAssembler.REGMAP=new haxe_ds_StringMap;openfl_utils_AGALMiniAssembler.SAMPLEMAP=new haxe_ds_StringMap;openfl_utils_AGALMiniAssembler.initialized=false;openfl_utils_Assets.cache=new openfl_utils_AssetCache;openfl_utils_ByteArrayData.defaultObjectEncoding=10;trcharts_NumberFormat.DEFAULT_NUM_DECIMALS=2;trcharts_charts_ScatterLine.STEP_HORIZONTAL=1;trcharts_charts_ScatterLine.STEP_VERTICAL=2;trcharts_string_DateUtils.dateConsts={shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]};xeditor_objects_TrVideoPlayerObject.YoutubeType="youtube";xeditor_utils_TRcssUtil.css_colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};xeditor_type_TrButton_$Prop.button_circle={normal:{border_radius:240,border_width:4,box_shadow:{dropShadow_1:xeditor_objects_TrButtonObject.convert_box_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_box_shadow("inset 0 1px 1px rgba(255,255,255,.5)")),dropShadow_2:xeditor_objects_TrButtonObject.convert_box_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_box_shadow("0 1px 2px rgba(0,0,0,.2)"))}},hover:{},active:{}};xeditor_type_TrButton_$Prop.button_primary={normal:{background_color:xeditor_utils_TRcssUtil.color_cal("#00A1CB").color,border_color:xeditor_utils_TRcssUtil.color_cal("#007998").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#00b5e5,#008db2"),text_shadow:xeditor_objects_TrButtonObject.convert_text_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_text_shadow("0 -1px 1px rgba(0,40,50,.35)"))},hover:{background_color:xeditor_utils_TRcssUtil.color_cal("##00A1CB").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#00c9fe,#008db2")},active:{background:xeditor_utils_TRcssUtil.color_cal("#1495b7").color,color:xeditor_utils_TRcssUtil.color_cal("#005065").color}};xeditor_type_TrButton_$Prop.button_action={normal:{background_color:xeditor_utils_TRcssUtil.color_cal("#7db500").color,border_color:xeditor_utils_TRcssUtil.color_cal("#5a8200").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#8fcf00,#6b9c00"),text_shadow:xeditor_objects_TrButtonObject.convert_text_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_text_shadow("0 -1px 1px rgba(19,28,0,.35)"))},hover:{background_color:xeditor_utils_TRcssUtil.color_cal("#7db500").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#a0e800,#6b9c00")},active:{background:xeditor_utils_TRcssUtil.color_cal("#76a312").color,color:xeditor_utils_TRcssUtil.color_cal("#374f00").color}};xeditor_type_TrButton_$Prop.button_highlight={normal:{background_color:xeditor_utils_TRcssUtil.color_cal("#F18D05").color,border_color:xeditor_utils_TRcssUtil.color_cal("#bf7004").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#fa9915,#d87e04"),text_shadow:xeditor_objects_TrButtonObject.convert_text_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_text_shadow("0 -1px 1px rgba(91,53,2,.35)"))},hover:{background_color:xeditor_utils_TRcssUtil.color_cal("#F18D05").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#fba42e,#d87e04")},active:{background:xeditor_utils_TRcssUtil.color_cal("#d8891e").color,color:xeditor_utils_TRcssUtil.color_cal("#8d5303").color}};xeditor_type_TrButton_$Prop.button_caution={normal:{background_color:xeditor_utils_TRcssUtil.color_cal("#E54028").color,border_color:xeditor_utils_TRcssUtil.color_cal("#c22d18").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#e8543f,#d9331a"),text_shadow:xeditor_objects_TrButtonObject.convert_text_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_text_shadow("0 -1px 1px rgba(103,24,13,.35)"))},hover:{background_color:xeditor_utils_TRcssUtil.color_cal("#E54028").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#eb6855,#d9331a")},active:{background:xeditor_utils_TRcssUtil.color_cal("#cd5240").color,color:xeditor_utils_TRcssUtil.color_cal("#952312").color}};xeditor_type_TrButton_$Prop.button_royal={normal:{background_color:xeditor_utils_TRcssUtil.color_cal("#87318C").color,border_color:xeditor_utils_TRcssUtil.color_cal("#632466").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#99389f,#752a79"),text_shadow:xeditor_objects_TrButtonObject.convert_text_shadow_byObject(xeditor_utils_TRcssUtil.parse_css_text_shadow("0 -1px 1px rgba(26,9,27,.35)"))},hover:{background_color:xeditor_utils_TRcssUtil.color_cal("#87318C").color,color:xeditor_utils_TRcssUtil.color_cal("#FFF").color,background:xeditor_utils_TRcssUtil.parse_css_linear_gradient("to bottom,#ab3eb2,#752a79")},active:{background:xeditor_utils_TRcssUtil.color_cal("#764479").color,color:xeditor_utils_TRcssUtil.color_cal("#3e1740").color}};xeditor_utils_TRUID._lastUID=0;ApplicationMain.main()})(typeof exports!="undefined"?exports:typeof window!="undefined"?window:typeof self!="undefined"?self:this,typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this);